/* Timebook — app shell: fixed left sidebar, scrolling work area. Quiet neutrals, one iris accent, tinted status chips. */
:root {
  --bg: #f6f6f8; --surface: #ffffff; --surface-2: #f9f9fb; --hover: #f2f2f6;
  --fg: #17171c; --fg2: #50505c; --muted: #8a8a96;
  --line: #ebebf0; --line2: #dcdce3;
  --accent: #5b5bd6; --accent-hover: #4b4bc4; --accent-fg: #ffffff; --accent-soft: #eeeefc; --accent-ink: #4545b8;
  --s-up: #2a78d6; --s-man: #1baf7a; --s-non: #eb6834; --s-idle: #e9e9ef; --s-idle-ink: #c9c9d3;
  --good: #0ca30c; --good-ink: #0b7a2a; --warn: #fab219; --warn-ink: #8a5a00; --serious: #ec835a; --serious-ink: #b2471c; --crit: #d03b3b; --crit-ink: #c02d2d;
  --shadow: 0 1px 2px rgba(20, 20, 40, .04), 0 1px 1px rgba(20, 20, 40, .02);
  --shadow-lg: 0 12px 32px -12px rgba(20, 20, 40, .18), 0 2px 6px rgba(20, 20, 40, .05);
  --font: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --r: 12px; --r-sm: 8px; --side: 236px;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #0e0e11; --surface: #16161a; --surface-2: #1b1b20; --hover: #212127;
  --fg: #ededf0; --fg2: #b3b3bd; --muted: #7e7e8a; --line: #25252c; --line2: #33333b;
  --accent: #8c8cf3; --accent-hover: #a0a0f6; --accent-fg: #101018; --accent-soft: #23233f; --accent-ink: #b0b0fa;
  --s-up: #3987e5; --s-man: #199e70; --s-non: #d95926; --s-idle: #24242b; --s-idle-ink: #3a3a44;
  --good-ink: #3fcf5e; --warn-ink: #fab219; --serious-ink: #f09a76; --crit-ink: #f07272;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3); --shadow-lg: 0 16px 40px -12px rgba(0, 0, 0, .6);
  color-scheme: dark; } }
:root[data-theme="dark"] {
  --bg: #0e0e11; --surface: #16161a; --surface-2: #1b1b20; --hover: #212127;
  --fg: #ededf0; --fg2: #b3b3bd; --muted: #7e7e8a; --line: #25252c; --line2: #33333b;
  --accent: #8c8cf3; --accent-hover: #a0a0f6; --accent-fg: #101018; --accent-soft: #23233f; --accent-ink: #b0b0fa;
  --s-up: #3987e5; --s-man: #199e70; --s-non: #d95926; --s-idle: #24242b; --s-idle-ink: #3a3a44;
  --good-ink: #3fcf5e; --warn-ink: #fab219; --serious-ink: #f09a76; --crit-ink: #f07272;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3); --shadow-lg: 0 16px 40px -12px rgba(0, 0, 0, .6);
  color-scheme: dark; }

/* ---------- base ---------- */
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 14px/1.5 var(--font); -webkit-font-smoothing: antialiased; font-feature-settings: "ss01"; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.num, .kpi-val, .t td.r { font-family: var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
h1 { font-size: 24px; line-height: 1.2; font-weight: 600; letter-spacing: -0.025em; margin: 0; text-wrap: balance; }
h2 { font-size: 14px; font-weight: 600; letter-spacing: -0.005em; margin: 0; }
.sub, .head p { color: var(--muted); }
.head p { margin: 4px 0 0; font-size: 14px; }
.ico { font-size: 9px; line-height: 1; }
svg.i { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- shell ---------- */
.side { position: fixed; inset: 0 auto 0 0; width: var(--side); background: var(--surface); border-right: 1px solid var(--line);
  display: flex; flex-direction: column; padding: calc(18px + env(safe-area-inset-top, 0px)) 12px calc(14px + env(safe-area-inset-bottom, 0px)) max(12px, env(safe-area-inset-left, 0px)); z-index: 10; }
.brand { display: flex; align-items: center; gap: 10px; padding: 0 8px 18px; color: var(--fg); text-decoration: none; font-weight: 650; font-size: 16px; letter-spacing: -0.02em; }
.brand-mark { width: 26px; height: 26px; border-radius: 8px; background: var(--accent); color: var(--accent-fg); display: grid; place-items: center; }
.brand-mark svg.i { width: 15px; height: 15px; stroke-width: 2.2; }
.nav { display: grid; gap: 2px; }
.nav-label { font-size: 11px; font-weight: 500; color: var(--muted); padding: 14px 10px 6px; text-transform: uppercase; letter-spacing: .06em; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: var(--r-sm); color: var(--fg2); text-decoration: none; font-weight: 500; }
.nav a:hover { background: var(--hover); color: var(--fg); }
.nav a[aria-current="page"] { background: var(--accent-soft); color: var(--accent-ink); }
.nav a .badge { margin-left: auto; }
.me { margin-top: auto; border-top: 1px solid var(--line); padding: 12px 6px 0; display: grid; gap: 8px; }
.me-row { display: flex; align-items: center; gap: 10px; min-width: 0; }
.me-row div { min-width: 0; }
.me-row b { display: block; font-weight: 550; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me-row small { color: var(--muted); font-size: 12px; }
.me-links { display: flex; gap: 4px; }
.me-links a, .me-links button { flex: 1; text-align: center; font-size: 12px; padding: 5px 8px; border-radius: 6px; border: 1px solid var(--line); background: var(--surface); color: var(--fg2); text-decoration: none; }
.me-links a:hover, .me-links button:hover { background: var(--hover); color: var(--fg); }
.me-links form { flex: 1; display: flex; }

.wrap { margin-left: var(--side); padding: 28px max(32px, env(safe-area-inset-right, 0px)) 64px 32px; display: grid; gap: 18px; max-width: calc(1240px + var(--side)); }
.wrap > * { min-width: 0; }
.guest .side { display: none; }
.guest .wrap { margin-left: 0; max-width: none; }

@media (max-width: 860px) {
  .side { position: sticky; inset: auto; top: 0; width: auto; height: auto; flex-direction: row; align-items: center; gap: 8px; flex-wrap: wrap;
    padding: calc(10px + env(safe-area-inset-top, 0px)) max(14px, env(safe-area-inset-right, 0px)) 10px max(14px, env(safe-area-inset-left, 0px)); border-right: 0; border-bottom: 1px solid var(--line); }
  .brand { padding: 0; flex: 1; }
  .nav { order: 3; width: 100%; display: flex; overflow-x: auto; scrollbar-width: none; gap: 4px; margin: 0 -4px; }
  .nav a { white-space: nowrap; padding: 6px 10px; }
  .nav-label { display: none; }
  .me { margin: 0; border: 0; padding: 0; display: flex; align-items: center; }
  .me-row div { display: none; }
  .me-links a, .me-links button { flex: none; }
  .wrap { margin-left: 0; padding: 18px max(16px, env(safe-area-inset-right, 0px)) 48px max(16px, env(safe-area-inset-left, 0px)); }
}

/* ---------- page header & period bar ---------- */
.head { display: flex; justify-content: space-between; align-items: flex-end; gap: 14px 20px; flex-wrap: wrap; }
.back { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); text-decoration: none; font-weight: 500; font-size: 13px; }
.back:hover { color: var(--fg); }
.pbar { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.seg { display: inline-flex; padding: 3px; gap: 2px; background: var(--hover); border-radius: 10px; }
.seg a, .seg button { border: 0; background: none; padding: 5px 12px; border-radius: 7px; color: var(--fg2); text-decoration: none; font-weight: 500; font-size: 13px; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.seg a:hover { color: var(--fg); }
.seg [aria-pressed="true"] { background: var(--surface); color: var(--fg); box-shadow: var(--shadow), 0 0 0 1px var(--line); }
.ibtn { display: inline-flex; align-items: center; justify-content: center; min-width: 32px; height: 32px; padding: 0 10px; border-radius: var(--r-sm); border: 1px solid var(--line2);
  background: var(--surface); color: var(--fg); text-decoration: none; font-weight: 500; font-size: 13px; box-shadow: var(--shadow); }
a.ibtn:hover { background: var(--hover); }
.ibtn[aria-disabled="true"] { opacity: .4; box-shadow: none; }
.plabel { font-weight: 600; min-width: 150px; text-align: center; font-size: 13px; }

/* ---------- cards, KPIs ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; box-shadow: var(--shadow); min-width: 0; }
.card-h { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.cols { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; align-items: start; }
@media (max-width: 1100px) { .cols { grid-template-columns: minmax(0, 1fr); } }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; display: grid; gap: 4px; box-shadow: var(--shadow); }
.kpi-label { font-size: 12.5px; color: var(--fg2); display: flex; align-items: center; gap: 7px; font-weight: 500; }
.kpi-val { font-size: 26px; font-weight: 500; letter-spacing: -0.03em; line-height: 1.15; }
.kpi-val small { font-size: 13px; color: var(--muted); font-weight: 400; margin-left: 3px; letter-spacing: 0; }
.kpi-sub { font-size: 12px; color: var(--muted); }
.sw { width: 9px; height: 9px; border-radius: 3px; flex: none; display: inline-block; }

/* ---------- charts ---------- */
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: var(--fg2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.chart { position: relative; width: 100%; }
.chart svg { display: block; width: 100%; }
.tip { position: absolute; pointer-events: none; background: var(--surface); color: var(--fg); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font-size: 12px; min-width: 180px; z-index: 3; box-shadow: var(--shadow-lg); }
.tip b { display: block; margin-bottom: 6px; font-weight: 600; }
.tip div { display: flex; justify-content: space-between; gap: 12px; color: var(--fg2); }
.tip div span:first-child { display: inline-flex; align-items: center; gap: 6px; }

/* ---------- tables ---------- */
.tscroll { overflow-x: auto; margin: 0 -18px; padding: 0 18px; }
table.t { width: 100%; border-collapse: collapse; font-size: 13px; }
.t th { text-align: left; font-weight: 500; color: var(--muted); font-size: 12px; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.t td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.t tbody tr:last-child td { border-bottom: 0; }
.t th.r, .t td.r { text-align: right; }
.t td.r { white-space: nowrap; }
.t tr.click { cursor: pointer; }
.t tr.click:hover td { background: var(--surface-2); }
.t tfoot td { font-weight: 600; border-top: 1px solid var(--line2); border-bottom: 0; }
.who { display: flex; align-items: center; gap: 10px; min-width: 160px; color: inherit; text-decoration: none; }
.who small { display: block; color: var(--muted); font-size: 12px; }
.av { width: 28px; height: 28px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-ink); display: inline-grid; place-items: center; font-size: 11px; font-weight: 600; flex: none; letter-spacing: 0; }
.av-stack { display: inline-flex; }
.av-stack .av { width: 24px; height: 24px; font-size: 10px; box-shadow: 0 0 0 2px var(--surface); }
.av-stack .av + .av { margin-left: -6px; }
.task { max-width: 340px; }
.task small { display: block; color: var(--muted); }

.ubar { display: flex; align-items: center; gap: 8px; min-width: 120px; }
.ubar .track { flex: 1; height: 6px; border-radius: 99px; background: var(--s-idle); overflow: hidden; display: flex; gap: 2px; }
.ubar .fill { height: 100%; border-radius: 99px; }
.ubar .num { font-size: 12px; width: 40px; text-align: right; color: var(--fg2); }

/* ---------- pills, chips, notices ---------- */
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; padding: 2px 9px; border-radius: 99px; background: var(--hover); color: var(--fg2); white-space: nowrap; font-weight: 500; line-height: 1.6; }
.pill .sw { width: 7px; height: 7px; border-radius: 50%; }
.pill.st-good, .pill.st-warn, .pill.st-serious, .pill.st-crit { background: color-mix(in srgb, currentColor 11%, transparent); }
.st-good { color: var(--good-ink); } .st-warn { color: var(--warn-ink); } .st-serious { color: var(--serious-ink); } .st-crit { color: var(--crit-ink); }
.chip { display: inline-flex; align-items: center; gap: 6px; background: var(--surface); border: 1px solid var(--line2); border-radius: 99px; padding: 3px 10px; font-size: 12.5px; color: var(--fg); text-decoration: none; }
a.chip:hover, button.chip:hover { border-color: var(--accent); color: var(--accent-ink); }
button.chip { cursor: pointer; font: inherit; font-size: 12.5px; }
.badge { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--crit); color: #fff; font-size: 11px; font-weight: 600; font-family: var(--mono); }
.notice { display: flex; gap: 8px 12px; align-items: center; flex-wrap: wrap; font-size: 13px; padding: 12px 16px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.notice > b:first-child { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.notice-error { border-color: color-mix(in srgb, var(--crit) 40%, var(--line)); background: color-mix(in srgb, var(--crit) 6%, var(--surface)); }
.notice details summary { cursor: pointer; }
.empty { color: var(--muted); padding: 22px 0; text-align: center; font-size: 13px; }

/* ---------- forms & buttons ---------- */
form.f, .f { display: grid; gap: 14px; }
.f label { display: grid; gap: 6px; font-size: 12.5px; color: var(--fg2); font-weight: 500; }
input:not([type=checkbox]):not([type=radio]), select, textarea {
  background: var(--surface); border: 1px solid var(--line2); border-radius: var(--r-sm); padding: 8px 11px; min-width: 0; font-size: 14px; color: var(--fg);
  box-shadow: var(--shadow); transition: border-color .12s, box-shadow .12s; }
input:not([type=checkbox]):not([type=radio]):hover, select:hover { border-color: color-mix(in srgb, var(--fg) 22%, var(--line2)); }
input:not([type=checkbox]):not([type=radio]):focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
input::placeholder { color: var(--muted); }
select { appearance: none; padding-right: 32px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238a8a96' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; }
input[type=checkbox] { accent-color: var(--accent); width: 15px; height: 15px; }
.f input:not([type=checkbox]):not([type=radio]), .f select { width: 100%; }
.g2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.g3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
@media (max-width: 600px) { .g2, .g3 { grid-template-columns: 1fr; } }
.hint { margin: 0; font-size: 12.5px; color: var(--muted); }
.err { color: var(--crit-ink); font-size: 13px; }
.err:empty { display: none; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; background: var(--accent); color: var(--accent-fg); border: 1px solid transparent; border-radius: var(--r-sm);
  padding: 8px 14px; font-weight: 550; font-size: 13.5px; text-decoration: none; white-space: nowrap; box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, .12); transition: background .12s; }
.btn:hover { background: var(--accent-hover); }
.btn:disabled { opacity: .55; cursor: default; }
.btn.ghost { background: var(--surface); color: var(--fg); border-color: var(--line2); box-shadow: var(--shadow); }
.btn.ghost:hover { background: var(--hover); }
.btn.sm { padding: 5px 10px; font-size: 12.5px; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }
.link { border: 0; background: none; color: var(--accent-ink); padding: 2px 4px; font-size: 12.5px; font-weight: 500; text-decoration: none; }
.link:hover { text-decoration: underline; }
.link.del { color: var(--crit-ink); }
.checks { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.checks label { display: inline-flex; flex-direction: row; align-items: center; gap: 8px; font-weight: 400; color: var(--fg); font-size: 13.5px; }
.fs { border: 0; padding: 0; margin: 0; display: grid; gap: 14px; min-width: 0; }
.fs:disabled { opacity: .5; }

/* Toggle chips: a checkbox styled as a selectable person chip */
.picks { display: flex; flex-wrap: wrap; gap: 6px; }
.pick { position: relative; display: inline-flex !important; flex-direction: row !important; align-items: center; gap: 7px !important; padding: 4px 12px 4px 4px; border: 1px solid var(--line2); border-radius: 99px;
  background: var(--surface); color: var(--fg2) !important; font-weight: 500 !important; font-size: 13px !important; cursor: pointer; user-select: none; transition: background .12s, border-color .12s; }
.pick input { position: absolute; opacity: 0; pointer-events: none; }
.pick .av { width: 22px; height: 22px; font-size: 9.5px; background: var(--hover); color: var(--muted); }
.pick:hover { border-color: color-mix(in srgb, var(--accent) 50%, var(--line2)); }
.pick:has(input:checked) { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 45%, transparent); color: var(--accent-ink) !important; }
.pick:has(input:checked) .av { background: var(--accent); color: var(--accent-fg); }
.pick:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- Log screen ---------- */
.daybar { display: grid; gap: 10px; }
.daybar .track { height: 10px; background: var(--s-idle); border-radius: 99px; display: flex; gap: 2px; overflow: hidden; }
.daybar .track > div { height: 100%; }
.daybar-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.daybar-top b { font-size: 26px; font-weight: 500; letter-spacing: -0.03em; }
.week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.wd { border: 1px solid var(--line); background: var(--surface); border-radius: var(--r); padding: 10px 4px 8px; text-align: center; display: grid; gap: 1px; color: var(--fg); text-decoration: none; box-shadow: var(--shadow); transition: border-color .12s, background .12s; }
a.wd:hover { border-color: var(--line2); background: var(--surface-2); }
.wd small { color: var(--muted); font-size: 11px; font-weight: 500; text-transform: uppercase; letter-spacing: .06em; }
.wd > span:nth-child(2) { font-size: 17px; font-weight: 600; letter-spacing: -0.02em; }
.wd .num { font-size: 12px; color: var(--fg2); }
.wd > span:last-child { font-size: 11px; line-height: 1; min-height: 11px; }
.wd.sel { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
.wd.miss { background: color-mix(in srgb, var(--crit) 5%, var(--surface)); border-color: color-mix(in srgb, var(--crit) 30%, var(--line)); }
.wd.miss .num { color: var(--crit-ink); font-weight: 500; }
.wd.future { opacity: .45; box-shadow: none; }
.subbox { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; border-top: 1px solid var(--line); padding-top: 14px; margin-top: 2px; }
form.subbox { display: grid; gap: 12px; align-items: stretch; }
.entry { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-top: 1px solid var(--line); }
.entry:first-child { border-top: 0; padding-top: 0; }
.entry .h { font-family: var(--mono); font-weight: 500; font-size: 13px; min-width: 44px; padding: 3px 0; text-align: center; border-radius: 6px; background: var(--hover); flex: none; }
.entry .body { flex: 1; min-width: 0; }
.entry .meta { color: var(--muted); font-size: 12px; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: 4px; }
.entry.pending { opacity: .55; }

/* ---------- Setup ---------- */
.req { display: grid; gap: 10px; padding: 14px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface-2); }
.req-acts { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
details.req > summary { list-style: none; cursor: pointer; }
details.req > summary::-webkit-details-marker { display: none; }
.split { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 18px; align-items: start; }
@media (max-width: 1000px) { .split { grid-template-columns: minmax(0, 1fr); } }
.plist { display: grid; gap: 2px; padding: 6px; }
.plist a { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 10px 12px; border-radius: var(--r-sm); text-decoration: none; color: var(--fg); }
.plist a:hover { background: var(--hover); }
.plist a[aria-current="true"] { background: var(--accent-soft); }
.plist a b { font-weight: 550; font-size: 13.5px; }
.plist a small { color: var(--muted); font-size: 12px; grid-column: 1; }
.plist a .pill { grid-row: 1 / span 2; grid-column: 2; align-self: center; }
.plist-h { display: flex; align-items: center; justify-content: space-between; padding: 8px 8px 6px 12px; }
.section { display: grid; gap: 12px; padding-top: 18px; margin-top: 18px; border-top: 1px solid var(--line); }
.section:first-of-type { border-top: 0; padding-top: 0; margin-top: 0; }
.section-h { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.section-h p { margin: 2px 0 0; color: var(--muted); font-size: 12.5px; }
.mods { display: grid; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.mod { display: grid; grid-template-columns: minmax(0, 1fr) 120px 80px auto auto; gap: 10px; align-items: center; padding: 8px 10px; border-top: 1px solid var(--line); background: var(--surface); }
.mod:first-child { border-top: 0; }
.mod-h { background: var(--surface-2); font-size: 12px; color: var(--muted); font-weight: 500; padding: 8px 12px; }
.mod input:not([type=checkbox]) { box-shadow: none; border-color: transparent; background: transparent; }
.mod input:not([type=checkbox]):hover { border-color: var(--line2); }
.mod input:not([type=checkbox]):focus { background: var(--surface); }
.mod .used { font-family: var(--mono); font-size: 12.5px; color: var(--fg2); text-align: right; }
.mod.add { background: var(--surface-2); }
.mod.add input:not([type=checkbox]) { background: var(--surface); border-color: var(--line2); }
.mod .arch { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
@media (max-width: 640px) { .mod { grid-template-columns: 1fr 90px; } .mod .used, .mod .arch { display: none; } .mod-h { display: none; } }

/* ---------- misc ---------- */
details.how { font-size: 13px; color: var(--fg2); }
details.how summary { cursor: pointer; font-weight: 550; color: var(--fg); }
details.how dl { display: grid; grid-template-columns: max-content 1fr; gap: 8px 18px; margin: 12px 0 0; }
details.how dt { font-weight: 550; color: var(--fg); }
details.how dd { margin: 0; }
@media (max-width: 600px) { details.how dl { grid-template-columns: 1fr; } details.how dd { margin-bottom: 6px; } }
.auth { display: grid; place-items: center; min-height: 80vh; padding-block: 40px; }
.auth form { width: 100%; max-width: 380px; padding: 28px; }
.auth .brand { justify-content: center; padding-bottom: 6px; }
.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); background: var(--fg); color: var(--bg); padding: 10px 16px; border-radius: 10px; font-size: 13px; font-weight: 500; z-index: 40; box-shadow: var(--shadow-lg); }
textarea.csv { width: 100%; height: 120px; font-family: var(--mono); font-size: 11px; }
body.loading::after { content: ""; position: fixed; left: 0; right: 0; top: env(safe-area-inset-top, 0px); height: 2px; z-index: 50; background: var(--accent); transform-origin: left; animation: tb-load 1.2s ease-out infinite; }
@keyframes tb-load { from { transform: scaleX(0); } to { transform: scaleX(.9); } }
@media (prefers-reduced-motion: reduce) { body.loading::after { animation: none; transform: scaleX(.6); } * { transition: none !important; } }
.viewer { display: flex; align-items: center; gap: 8px; color: var(--fg2); font-size: 13px; font-weight: 500; }
.viewer select { min-width: 200px; }
.entry .meta form { display: inline; }
.switch select { width: 100%; font-size: 13px; padding: 6px 30px 6px 10px; }
.switched { display: flex; align-items: center; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap; padding: 10px 14px; border-radius: var(--r);
  background: color-mix(in srgb, var(--warn) 16%, var(--surface)); border: 1px solid color-mix(in srgb, var(--warn) 45%, var(--line)); font-size: 13px; }
@media (max-width: 860px) { .switch { display: none; } }
.card.requests { border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 8%, transparent), var(--shadow); }
.card.requests h2 { display: inline-flex; align-items: center; gap: 8px; }
.rqs { display: grid; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.rq { display: grid; gap: 12px; padding: 14px 16px; background: var(--surface); border-top: 1px solid var(--line); }
.rq:first-child { border-top: 0; }
.rq-h { display: flex; align-items: center; gap: 8px 10px; flex-wrap: wrap; }
.rq-h b { font-weight: 600; font-size: 14px; }
.rq-meta { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12.5px; }
.rq-meta .av { width: 22px; height: 22px; font-size: 9.5px; }
.rq-approve { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; }
.rq-approve label { display: grid; gap: 4px; font-size: 12px; color: var(--fg2); font-weight: 500; flex: 1 1 160px; max-width: 260px; }
.rq-approve label input, .rq-approve label select { width: 100%; }
.rq-all { margin-top: 12px; }
@media (max-width: 600px) { .rq-meta { margin-left: 0; width: 100%; } .rq-approve label { max-width: none; } }

/* Company logo */
.brand { flex-direction: column; align-items: flex-start; gap: 4px; padding: 2px 8px 16px; }
.brand-logo { display: block; width: 116px; height: auto; max-width: 100%; }
.brand-icon { display: none; width: 30px; height: 30px; }
.brand-app { font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); padding-left: 2px; }
.auth-brand { display: grid; justify-items: center; gap: 6px; padding-bottom: 8px; }
.auth-brand img { width: 140px; height: auto; max-width: 100%; }
.auth-brand span { font-size: 12px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.auth h1 { text-align: center; font-size: 20px; }
@media (max-width: 860px) {
  .brand { flex-direction: row; align-items: center; gap: 8px; padding: 0; }
  .brand-logo { display: none; }
  .brand-icon { display: block; }
  .brand-app { font-size: 15px; letter-spacing: -0.01em; text-transform: none; color: var(--fg); padding: 0; }
}
