/* Altekore Time — the dashboard. Same direction as the sample (web/sample.html): a night-blue band carries the company
   and the headline; the work area is calm paper with hairline structure. Hours in a book serif, clock times in a mono
   face, the day drawn as lanes, one per app. Colours are the sample's validated activity palette. */
:root {
  --night: #0f1833; --night-2: #18234a; --night-3: #26335f; --night-ink: #eef1fa; --night-ink-2: #a2abc8;
  --paper: #f3f4f7; --surface: #ffffff; --surface-2: #f8f9fb; --sunk: #eceef3;
  --line: #e1e4eb; --line-2: #edeff4;
  --ink: #111a30; --ink-2: #4a546d; --ink-3: #737c93;
  --brand: #2a5bd7; --brand-2: #1f49b8; --brand-soft: #e8eefc; --on-brand: #ffffff;
  --c-prod: #2a78d6; --c-neutral: #1baf7a; --c-unprod: #eb6834; --c-flag: #6250d6;
  --c-break: #b8bfcd; --c-off: #d6453f; --c-move: #e0a23a; --c-lock: #8790a6;
  --green: #12805c; --green-soft: #dcf2e9; --amber: #9a5a05; --amber-soft: #fbefdc; --brick: #b42318; --brick-soft: #fbe8e6;
  --outlier: #6250d6; --outlier-soft: #ece9fb;
  --shadow: 0 1px 2px rgba(17,26,48,.05), 0 10px 30px -18px rgba(17,26,48,.22);
  --f-display: "Newsreader", Georgia, serif;
  --f-ui: "Instrument Sans", "Segoe UI", system-ui, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, "Cascadia Mono", Menlo, monospace;
  --r-s: 7px; --r: 14px;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --night: #090f22; --night-2: #141d3c; --night-3: #212c55;
  --paper: #0c1222; --surface: #131b30; --surface-2: #172039; --sunk: #0f1629; --line: #252f4d; --line-2: #1c2541;
  --ink: #e9edf7; --ink-2: #b2bace; --ink-3: #8b94ac;
  --brand: #8ea7f6; --brand-2: #a8bbfa; --brand-soft: #1b2650; --on-brand: #0b1120;
  --c-prod: #3987e5; --c-neutral: #199e70; --c-unprod: #d95926; --c-flag: #9085e9; --c-break: #3a4565; --c-off: #e66767;
  --c-move: #c98c2a; --c-lock: #5b6584;
  --green: #4cc79f; --green-soft: #10312a; --amber: #f0b453; --amber-soft: #33260f; --brick: #f1877c; --brick-soft: #3a1915;
  --outlier: #a99ff0; --outlier-soft: #221d45;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 10px 30px -18px rgba(0,0,0,.6); color-scheme: dark; } }
:root[data-theme="dark"] {
  --night: #090f22; --night-2: #141d3c; --night-3: #212c55;
  --paper: #0c1222; --surface: #131b30; --surface-2: #172039; --sunk: #0f1629; --line: #252f4d; --line-2: #1c2541;
  --ink: #e9edf7; --ink-2: #b2bace; --ink-3: #8b94ac;
  --brand: #8ea7f6; --brand-2: #a8bbfa; --brand-soft: #1b2650; --on-brand: #0b1120;
  --c-prod: #3987e5; --c-neutral: #199e70; --c-unprod: #d95926; --c-flag: #9085e9; --c-break: #3a4565; --c-off: #e66767;
  --c-move: #c98c2a; --c-lock: #5b6584;
  --green: #4cc79f; --green-soft: #10312a; --amber: #f0b453; --amber-soft: #33260f; --brick: #f1877c; --brick-soft: #3a1915;
  --outlier: #a99ff0; --outlier-soft: #221d45;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 10px 30px -18px rgba(0,0,0,.6); color-scheme: dark; }

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--paper); color: var(--ink); font: 15px/1.55 var(--f-ui); -webkit-font-smoothing: antialiased; min-height: 100vh; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
[hidden] { display: none !important; }
.mono { font-family: var(--f-mono); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.muted { color: var(--ink-3); }
h1, h2, h3 { text-wrap: balance; margin: 0; }
a { color: var(--brand); }
.wrap { max-width: 1280px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 900px) { .wrap { padding: 0 36px; } }

/* ---------- band ---------- */
.band { background: var(--night); color: var(--night-ink); }
.band .bar { display: flex; align-items: center; gap: 14px; min-height: 60px; flex-wrap: wrap; }
.band .co { display: flex; align-items: center; gap: 10px; font-weight: 600; min-width: 0; }
.band .co img, .band .co .mk { width: 30px; height: 30px; border-radius: 8px; object-fit: contain; background: var(--night-2); flex: none; }
.band .co span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.band nav { display: flex; gap: 2px; flex-wrap: wrap; }
.band nav a { color: var(--night-ink-2); text-decoration: none; padding: 7px 12px; border-radius: 8px; font-weight: 500; font-size: 14px; }
.band nav a:hover { color: var(--night-ink); background: var(--night-2); }
.band nav a.on { color: var(--night-ink); background: var(--night-3); }
.band nav a .count { display: inline-block; min-width: 18px; padding: 0 5px; margin-left: 4px; border-radius: 9px; background: var(--c-flag); color: #fff; font-size: 11px; line-height: 18px; text-align: center; }
.band .right { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.band select, .band .who { background: var(--night-2); border: 1px solid var(--night-3); color: var(--night-ink); border-radius: 8px; padding: 6px 10px; font-size: 13.5px; }
.band .who { cursor: pointer; }
.head { padding: 26px 0 22px; display: flex; gap: 20px; align-items: flex-end; flex-wrap: wrap; }
.head h1 { font: 500 34px/1.1 var(--f-display); letter-spacing: -.01em; }
.head p { margin: 6px 0 0; color: var(--night-ink-2); }
.head .ctl { margin-left: auto; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.btn-n { background: var(--night-2); border: 1px solid var(--night-3); color: var(--night-ink); border-radius: 8px; padding: 7px 12px; cursor: pointer; font-size: 14px; }
.btn-n:hover { background: var(--night-3); }
.btn-n[disabled] { opacity: .4; cursor: default; }
.band input[type=date] { background: var(--night-2); border: 1px solid var(--night-3); color: var(--night-ink); border-radius: 8px; padding: 6px 10px; color-scheme: dark; }

/* ---------- page ---------- */
main { padding: 22px 0 60px; }
.grid { display: grid; gap: 16px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); padding: 18px 20px; min-width: 0; }
.card h2 { font: 600 15px/1.3 var(--f-ui); margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.card h2 .muted { font-weight: 400; font-size: 13px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; min-width: 0; }
.kpi .l { font-size: 12.5px; color: var(--ink-3); font-weight: 500; }
.kpi .v { font: 500 28px/1.15 var(--f-display); margin-top: 4px; }
.kpi .v small { font: 400 14px var(--f-ui); color: var(--ink-3); }
.kpi .s { font-size: 12.5px; color: var(--ink-2); margin-top: 2px; }
.meter { height: 6px; border-radius: 3px; background: var(--sunk); overflow: hidden; margin-top: 8px; }
.meter i { display: block; height: 100%; background: var(--c-prod); border-radius: 3px; }
.two { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
.two { align-items: start; }
@media (min-width: 1000px) { .two { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); } }
.empty { padding: 34px 20px; text-align: center; color: var(--ink-3); }
.empty b { display: block; color: var(--ink-2); font-size: 16px; margin-bottom: 4px; }

/* ---------- day lanes ---------- */
.lanes { position: relative; }
.lane { display: grid; grid-template-columns: 150px minmax(0, 1fr) 64px; align-items: center; height: 30px; border-top: 1px solid var(--line-2); }
.lane:first-child { border-top: 0; }
.lane .nm { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-right: 10px; display: flex; gap: 7px; align-items: center; }
.lane .nm i { width: 8px; height: 8px; border-radius: 2px; flex: none; }
.lane .tr { position: relative; height: 18px; }
.lane .tt { font-size: 12.5px; text-align: right; color: var(--ink-2); }
.seg { position: absolute; top: 0; bottom: 0; border-radius: 3px; min-width: 2px; cursor: pointer; }
.seg:hover, .seg.sel { outline: 2px solid var(--ink); outline-offset: 1px; z-index: 2; }
.seg.productive { background: var(--c-prod); } .seg.neutral { background: var(--c-neutral); } .seg.unproductive { background: var(--c-unprod); }
.seg.meeting { background: var(--c-flag); }
.seg.idle { background: repeating-linear-gradient(135deg, var(--c-break) 0 4px, transparent 4px 7px); border: 1px solid var(--c-break); }
.seg.movement_only { background: repeating-linear-gradient(135deg, var(--c-move) 0 4px, transparent 4px 7px); border: 1px solid var(--c-move); }
.seg.locked { background: var(--c-lock); opacity: .55; }
.seg.paused { background: var(--sunk); border: 1px dashed var(--ink-3); }
.seg.marked { background: var(--c-flag); opacity: .75; }
.seg.flag { background: transparent; border: 2px dashed var(--c-flag); top: -3px; bottom: -3px; pointer-events: none; }
.axis { display: grid; grid-template-columns: 150px minmax(0, 1fr) 64px; height: 24px; }
.axis .tr { position: relative; }
.axis span { position: absolute; transform: translateX(-50%); font-size: 11.5px; color: var(--ink-3); top: 4px; white-space: nowrap; }
.axis span::before { content: ""; position: absolute; left: 50%; top: -6px; height: 4px; border-left: 1px solid var(--line); }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--ink-2); margin-top: 12px; }
.legend i { display: inline-block; width: 12px; height: 10px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; }
@media (max-width: 640px) {
  .lane, .axis { grid-template-columns: 92px minmax(0, 1fr) 46px; }
  .lane .nm { font-size: 12px; }
}
.tip { position: fixed; z-index: 50; pointer-events: none; background: var(--night); color: var(--night-ink); border-radius: 8px; padding: 8px 10px;
  font-size: 12.5px; max-width: 320px; box-shadow: var(--shadow); }
.tip b { display: block; }
.tip .muted { color: var(--night-ink-2); }

/* ---------- inspector, forms ---------- */
.insp { border-top: 1px solid var(--line); margin-top: 14px; padding-top: 14px; }
.insp dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; margin: 8px 0 0; font-size: 13.5px; }
.insp dt { color: var(--ink-3); }
.insp dd { margin: 0; overflow-wrap: anywhere; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.btn { border: 1px solid var(--line); background: var(--surface); border-radius: 8px; padding: 7px 13px; cursor: pointer; font-weight: 500; font-size: 14px; }
.btn:hover { background: var(--surface-2); }
.btn.pri { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.btn.pri:hover { background: var(--brand-2); }
.btn.on { background: var(--brand-soft); border-color: var(--brand); }
.btn[disabled] { opacity: .5; cursor: default; }
.field { display: grid; gap: 4px; font-size: 13px; color: var(--ink-2); font-weight: 500; }
.field input, .field select, .field textarea { border: 1px solid var(--line); background: var(--surface-2); border-radius: 8px; padding: 8px 10px; font-weight: 400; color: var(--ink); }
.form { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(140px, 100%), 1fr)); align-items: end; min-width: 0; }
.form .field, .form input, .form select { min-width: 0; width: 100%; }
.form .wide { grid-column: 1 / -1; }
.msg { font-size: 13.5px; margin-top: 8px; } .msg.err { color: var(--brick); } .msg.ok { color: var(--green); }

/* ---------- lists ---------- */
.list { display: grid; }
.item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; padding: 12px 0; border-top: 1px solid var(--line-2); align-items: center; }
.item:first-child { border-top: 0; }
.item .t { font-weight: 500; }
.item .d { font-size: 13px; color: var(--ink-2); grid-column: 1 / -1; }
.pill { display: inline-block; font-size: 12px; font-weight: 600; padding: 1px 8px; border-radius: 999px; background: var(--sunk); color: var(--ink-2); }
.pill.open { background: var(--amber-soft); color: var(--amber); }
.pill.accepted { background: var(--green-soft); color: var(--green); }
.pill.declined, .pill.withdrawn { background: var(--brick-soft); color: var(--brick); }
.pill.outlier { background: var(--outlier-soft); color: var(--outlier); }
.bars .b { display: grid; grid-template-columns: minmax(0, 160px) minmax(0, 1fr) 70px; gap: 10px; align-items: center; padding: 5px 0; font-size: 13.5px; }
.bars .b .nm { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bars .b .tk { height: 10px; background: var(--sunk); border-radius: 5px; overflow: hidden; }
.bars .b .tk i { display: block; height: 100%; border-radius: 5px; }
.bars .b .v { text-align: right; font-family: var(--f-mono); font-size: 12.5px; color: var(--ink-2); }

/* ---------- team roster ---------- */
.roster { width: 100%; border-collapse: collapse; font-size: 14px; }
.roster th { text-align: left; font-size: 12px; font-weight: 600; color: var(--ink-3); padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.roster td { padding: 10px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.roster tr.p { cursor: pointer; }
.roster tr.p:hover td { background: var(--surface-2); }
.roster .nm { display: flex; gap: 10px; align-items: center; min-width: 160px; }
.roster .nm small { display: block; color: var(--ink-3); font-size: 12px; }
.roster .num { text-align: right; font-family: var(--f-mono); font-size: 13px; white-space: nowrap; }
.wvx { position: relative; height: 8px; background: var(--sunk); border-radius: 4px; min-width: 110px; }
.wvx i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 4px; background: var(--c-prod); }
.wvx b { position: absolute; top: -3px; bottom: -3px; border-left: 2px solid var(--ink); }
.scroll { overflow-x: auto; }
.av { width: 30px; height: 30px; border-radius: 50%; display: inline-grid; place-items: center; color: #fff; font-size: 12px; font-weight: 600; flex: none; }

/* ---------- trend ---------- */
.trend { position: relative; display: flex; align-items: flex-end; gap: 4px; height: 140px; padding-top: 10px; }
.trend .c { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; min-width: 0; height: 100%; position: relative; }
.trend .c i { width: 100%; max-width: 34px; background: var(--c-prod); border-radius: 4px 4px 0 0; }
.trend .c i.p { background: var(--c-neutral); }
.trend .c span { font-size: 10.5px; color: var(--ink-3); margin-top: 4px; white-space: nowrap; }
.trend .exp { position: absolute; left: 0; right: 0; border-top: 1px dashed var(--ink-3); }

/* ---------- sign in ---------- */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: var(--night); }
.auth .card { width: min(420px, 100%); padding: 28px; }
.auth h1 { font: 500 28px/1.2 var(--f-display); margin: 14px 0 6px; }
.auth p { color: var(--ink-2); margin: 0 0 14px; }
.auth .field { margin-top: 12px; }
.auth .btn { width: 100%; margin-top: 16px; padding: 11px; }
.auth .link { background: none; border: 0; color: var(--brand); cursor: pointer; padding: 0; margin-top: 12px; font-size: 13.5px; }
footer.foot { text-align: center; font-size: 12.5px; color: var(--ink-3); padding: 20px 0 30px; }
a.btn { text-decoration: none; color: inherit; display: inline-block; }
a.btn.on { color: var(--ink); }
tr.left td { opacity: .55; }
