/* team // DASH — light theme matched to älg // DASH */
:root {
  --bg: #eef1f4;
  --bg-2: #f6f8fa;
  --card: #ffffff;
  --field: #f1f4f7;
  --line: #e1e6eb;
  --line-2: #d3dae1;
  --ink: #1b2229;
  --ink-2: #4c5864;
  --muted: #8a96a2;
  --accent: #157a96;
  --accent-ink: #0e5f76;
  --accent-soft: #e4f2f6;
  --ok: #22a55a;
  --ok-soft: #e8f7ee;
  --warn: #d9822b;
  --warn-soft: #fdf1e4;
  --bad: #e0565b;
  --bad-soft: #fdecec;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(20, 40, 60, .04), 0 8px 24px rgba(20, 40, 60, .04);
  --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
  --sans: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
/* The hidden attribute must always win over component display rules (menus, overlays, toggled fields). */
[hidden] { display: none !important; }
html, body { margin: 0; }
body {
  font: 14px/1.5 var(--sans);
  color: var(--ink);
  background: radial-gradient(1200px 500px at 20% -10%, #fff 0, transparent 60%), var(--bg);
  background-attachment: fixed;
  min-height: 100vh;
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-ink); }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }

/* header */
.top { display: flex; align-items: center; justify-content: space-between; padding: 28px 0 36px; }
.brand { color: var(--ink); display: flex; flex-direction: column; gap: 4px; }
.logo { font-size: 26px; font-weight: 500; letter-spacing: -.01em; display: flex; align-items: center; gap: 8px; }
.logo i { font-style: normal; color: var(--muted); font-weight: 400; }
.logo b { font-family: var(--mono); font-weight: 600; letter-spacing: .12em; font-size: 22px; }
.mark { display: block; flex: none; border-radius: 7px; box-shadow: 0 1px 2px rgba(20, 40, 60, .12); }
.brand small { font-size: 10px; letter-spacing: .2em; color: var(--accent); font-weight: 600; padding-left: 34px; }

.usermenu { position: relative; }
.me { display: flex; align-items: center; gap: 8px; background: none; border: 1px solid transparent;
  border-radius: 12px; padding: 6px 10px; font: 600 13px var(--sans); color: var(--ink); cursor: pointer; }
.me:hover, .me[aria-expanded="true"] { border-color: var(--line-2); background: var(--card); }
.avatar { width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--line-2); display: grid;
  place-items: center; color: var(--accent); font-size: 12px; background: var(--card); }
.burger { color: var(--muted); font-size: 18px; }
.menu { position: absolute; right: 0; top: calc(100% + 8px); min-width: 200px; background: var(--card);
  border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 12px 32px rgba(20, 40, 60, .12);
  padding: 8px; z-index: 20; display: flex; flex-direction: column; }
.menu a, .menu button { display: block; text-align: left; padding: 9px 12px; border-radius: 8px; color: var(--ink);
  font: 500 14px var(--sans); background: none; border: 0; width: 100%; cursor: pointer; }
.menu a:hover, .menu button:hover { background: var(--field); }
.menu hr { border: 0; border-top: 1px solid var(--line); margin: 6px 4px; }
.menu-h { font-size: 10px; letter-spacing: .14em; color: var(--muted); padding: 4px 12px; font-weight: 700; }

/* type */
h1 { font-size: 28px; margin: 0 0 4px; letter-spacing: -.01em; }
h2 { font-size: 18px; margin: 0 0 4px; }
h3 { font-size: 13px; font-weight: 600; margin: 0 0 10px; color: var(--ink-2); }
.sub { color: var(--ink-2); margin: 0 0 20px; }
.muted { color: var(--muted); }
.label { font-size: 12px; color: var(--muted); display: block; margin-bottom: 4px; }
.num { font-family: var(--mono); font-weight: 600; font-size: 20px; letter-spacing: -.02em; }
.num small { font-size: 10px; color: var(--ink-2); font-weight: 600; margin-left: 3px; }
.mono { font-family: var(--mono); }

/* cards & layout */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 24px; margin-bottom: 20px; }
.card.inset { background: var(--bg-2); box-shadow: none; }
.grid { display: grid; gap: 20px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 860px) { .g3, .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .g2, .g3, .g4 { grid-template-columns: minmax(0, 1fr); } }
.divider { border: 0; border-top: 1px solid var(--line); margin: 20px 0; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spread { justify-content: space-between; }

.statbar { display: grid; grid-template-columns: repeat(4, 1fr); padding: 18px 24px; }
.statbar div { display: flex; align-items: baseline; gap: 8px; }
.statbar .num { font-size: 18px; }
.statbar span:last-child { font-family: var(--mono); font-size: 10px; color: var(--ink-2); }
@media (max-width: 760px) { .statbar { grid-template-columns: repeat(2, 1fr); gap: 12px; } }

/* pills */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--bg-2); font-size: 12px; color: var(--ink-2); white-space: nowrap; }
.pill i { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); }
.pill.warn i { background: var(--warn); } .pill.bad i { background: var(--bad); }
.pill.muted i { background: var(--line-2); } .pill.info i { background: var(--accent); }
.note { border-radius: var(--radius-sm); padding: 10px 14px; font-size: 13px; }
.note.ok { background: var(--ok-soft); color: #1b7a44; border: 1px solid #bfe6cf; }
.note.warn { background: var(--warn-soft); color: #9a5412; border: 1px solid #f3d3ae; }
.note.bad { background: var(--bad-soft); color: #a23237; border: 1px solid #f3c4c6; }

/* tabs */
.tabs { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 20px; }
.tabs > a, .tabmore > summary { padding: 10px 14px; color: var(--ink-2); font-weight: 500; border-radius: 10px 10px 0 0; white-space: nowrap; }
.tabs > a.on, .tabmore > summary.on { color: var(--accent); box-shadow: inset 0 -2px 0 var(--accent); font-weight: 600; }
.tabs > a:hover, .tabmore > summary:hover { color: var(--accent); }
/* "System ▾" dropdown at the end of the admin tabs */
.tabmore { position: relative; margin-left: auto; }
.tabmore > summary { list-style: none; cursor: pointer; user-select: none; }
.tabmore > summary::-webkit-details-marker { display: none; }
.tabmore > summary span { font-size: 11px; color: var(--muted); }
.tabmore > summary .dot { color: var(--warn); font-weight: 700; }
.tabmore > .menu { min-width: 180px; }
@media (max-width: 560px) { .tabmore { margin-left: 0; } .tabmore > .menu { right: auto; left: 0; } }

/* forms */
input[type=text], input[type=email], input[type=tel], input[type=password], input[type=date], input[type=number],
select, textarea {
  width: 100%; font: 14px var(--sans); color: var(--ink); background: var(--field);
  border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 11px 14px; outline: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--accent); background: #fff; box-shadow: 0 0 0 3px var(--accent-soft); }
.field { margin-bottom: 14px; }
.check { display: flex; align-items: center; gap: 10px; background: var(--field); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 11px 14px; cursor: pointer; }
.check input { accent-color: var(--accent); width: 16px; height: 16px; }
.hint { font-size: 12px; color: var(--muted); margin-top: 4px; font-style: italic; }

.btn { display: inline-flex; align-items: center; gap: 6px; font: 600 14px var(--sans); border-radius: var(--radius-sm);
  padding: 11px 20px; border: 1px solid var(--line-2); background: var(--card); color: var(--ink); cursor: pointer; }
.btn:hover { border-color: var(--muted); color: var(--ink); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-ink); }
.btn.danger { color: var(--bad); border-color: #f3c4c6; }
.btn.sm { padding: 6px 12px; font-size: 12px; border-radius: 999px; }
.btn.block { width: 100%; justify-content: center; }

/* tables */
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted);
  font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.table td { padding: 12px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.tablewrap { overflow-x: auto; }

/* ring gauge (like the fuel gauge on älg // DASH) */
.ring { --p: 50; --c: var(--ok); width: 96px; height: 96px; border-radius: 50%; display: grid; place-items: center;
  background: conic-gradient(var(--c) calc(var(--p) * 1%), var(--line) 0); flex: none; }
.ring > div { width: 80px; height: 80px; border-radius: 50%; background: var(--card); display: grid; place-items: center;
  text-align: center; }
.ring .num { font-size: 18px; line-height: 1; }
.ring small { display: block; font-size: 9px; letter-spacing: .12em; color: var(--muted); margin-top: 3px; }

/* login */
.bare .top { justify-content: center; }
.auth { max-width: 400px; margin: 20px auto; }
.code-input { font-family: var(--mono) !important; font-size: 26px !important; letter-spacing: .5em; text-align: center; }

.flash { border-radius: var(--radius-sm); padding: 12px 16px; margin-bottom: 16px; }
.flash.ok { background: var(--ok-soft); color: #1b7a44; }
.flash.err { background: var(--bad-soft); color: #a23237; }

.foot { text-align: center; color: var(--muted); font-size: 12px; padding: 40px 0 30px; }
.foot span { color: var(--muted); }

.person { display: flex; align-items: center; gap: 12px; }
.person .avatar { width: 34px; height: 34px; }
.list-clean { list-style: none; margin: 0; padding: 0; }
.list-clean li { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.list-clean li:last-child { border-bottom: 0; }
details summary { cursor: pointer; font-weight: 600; color: var(--accent); }

/* team calendar */
.cal { border-collapse: separate; border-spacing: 2px; width: 100%; font-size: 12px; }
.cal th { font-weight: 600; color: var(--ink-2); padding: 8px 0 4px; min-width: 24px; text-align: center; font-family: var(--mono); }
.cal th small { display: block; font-size: 9px; color: var(--muted); font-family: var(--sans); }
.cal th.today { color: var(--accent); }
.cal .who { text-align: left; padding: 6px 12px 6px 16px; white-space: nowrap; font-family: var(--sans); position: sticky; left: 0; background: var(--card); z-index: 1; }
.cal td { height: 28px; border-radius: 6px; background: var(--bg-2); }
.cal td.we, .cal th.we { background: #e9edf1; }
.cal td.hol, .cal th.hol { background: #e4eef2; }
.cal td.off { background: var(--accent); }
.cal td.maybe { background: repeating-linear-gradient(45deg, var(--accent-soft) 0 4px, #b9dce6 4px 8px); }
.cal td.half { background-size: 100% 50%; background-repeat: no-repeat; }
.cal tr.sum td { background: none; text-align: center; font-family: var(--mono); color: var(--ink-2); }
.cal tr.sum td.over { color: var(--bad); font-weight: 700; }

/* company branding */
.logo.company { gap: 12px; font-weight: 700; font-size: 22px; letter-spacing: -.01em; }
.brand-logo { height: 36px; width: auto; max-width: 220px; object-fit: contain; display: block; }
.logo.company + small { padding-left: 0; }
.foot .credit { display: inline-block; margin-top: 4px; }
.foot .credit a { color: var(--ink-2); }
.foot .credit a:hover { color: var(--accent); }

/* dashboard: "action needed" and quick-link cards */
a.card { color: var(--ink); display: flex; transition: border-color .15s, transform .15s; }
a.card:hover { border-color: var(--accent); color: var(--ink); transform: translateY(-1px); }
.card.action { align-items: center; gap: 16px; padding: 18px 20px; border-left: 4px solid var(--accent); }
.card.action.warn { border-left-color: var(--warn); }
.card.action.bad { border-left-color: var(--bad); }
.card.action .num { font-size: 30px; }
.card.action small, .card.quick small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.card.quick { flex-direction: column; padding: 16px 20px; margin: 0; }
.admin-zone { border-top: 1px dashed var(--line-2); margin-top: 10px; padding-top: 10px; }
