@font-face {
  font-family: 'Public Sans';
  src: url('../fonts/public-sans.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}

/* Palette: white, black and silver, with the logo blue (#0a86c6) as the accent. --accent is a slightly deeper
   blue so white text on it and links on it pass WCAG AA; green / amber / red stay as status colours only. */
:root {
  --paper: #f4f4f5;
  --surface: #ffffff;
  --surface-2: #ededee;
  --line: #dedfe2;
  --line-strong: #c6c8cc;
  --ink: #0a0a0b;
  --ink-2: #45474c;
  --ink-3: #6b6e74;
  --accent: #0a74ae;
  --accent-2: #0a86c6;
  --accent-soft: #e2f0f9;
  --on-accent: #ffffff;
  --silver: #c0c2c6;
  --silver-soft: #e4e5e7;
  --metal: linear-gradient(135deg, #9a9da3 0%, #e9eaec 45%, #b4b7bc 100%);
  --amber: #b87712;
  --amber-soft: #fbf0db;
  --red: #b83a34;
  --red-soft: #f8e3e1;
  --green: #2c7a4b;
  --green-soft: #e0f1e6;
  --blue: #55585e;
  --blue-soft: #ececed;
  --slate-soft: #efeff0;
  --side: #0a0a0b;
  --side-ink: #b4b6bb;
  --side-ink-2: #7c7f85;
  --side-hover: #1d1e21;
  --side-mark: #0a86c6;
  --shade: rgba(0, 0, 0, .14);
  --focus: 0 0 0 3px rgba(10, 134, 198, .35);
  --r-lg: 12px;
  --r: 8px;
  --r-sm: 6px;
  --font: 'Public Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0b0b0c; --surface: #141416; --surface-2: #1c1d20; --line: #2a2b2f; --line-strong: #3d3f44;
    --ink: #f4f4f5; --ink-2: #b9bbc0; --ink-3: #8a8d93;
    --accent: #5ab4e8; --accent-2: #7cc4ee; --accent-soft: #0f2c40; --on-accent: #0a0a0b;
    --silver: #b4b6bb; --silver-soft: #2a2b2f;
    --amber: #e3a948; --amber-soft: #3a2e17; --red: #ec7b72; --red-soft: #3d2120;
    --green: #5cc485; --green-soft: #183524; --blue: #a4a7ad; --blue-soft: #1f2023; --slate-soft: #1f2023;
    --side: #000000; --side-ink: #a4a7ad; --side-ink-2: #6f7278; --side-hover: #1a1b1e; --side-mark: #0a86c6;
    --shade: rgba(0, 0, 0, .5);
    --focus: 0 0 0 3px rgba(90, 180, 232, .4);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0b0b0c; --surface: #141416; --surface-2: #1c1d20; --line: #2a2b2f; --line-strong: #3d3f44;
  --ink: #f4f4f5; --ink-2: #b9bbc0; --ink-3: #8a8d93;
  --accent: #5ab4e8; --accent-2: #7cc4ee; --accent-soft: #0f2c40; --on-accent: #0a0a0b;
  --silver: #b4b6bb; --silver-soft: #2a2b2f;
  --amber: #e3a948; --amber-soft: #3a2e17; --red: #ec7b72; --red-soft: #3d2120;
  --green: #5cc485; --green-soft: #183524; --blue: #a4a7ad; --blue-soft: #1f2023; --slate-soft: #1f2023;
  --side: #000000; --side-ink: #a4a7ad; --side-ink-2: #6f7278; --side-hover: #1a1b1e; --side-mark: #0a86c6;
  --shade: rgba(0, 0, 0, .5);
  --focus: 0 0 0 3px rgba(90, 180, 232, .4);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--font); font-size: 15px; line-height: 1.5; color: var(--ink); background: var(--paper);
  -webkit-font-smoothing: antialiased; font-feature-settings: 'tnum' 1;
}
h1, h2, h3, h4 { margin: 0; line-height: 1.25; font-weight: 650; letter-spacing: -0.01em; }
h1 { font-size: 1.6rem; font-weight: 700; letter-spacing: -0.02em; }
h2 { font-size: 1.1rem; }
h3 { font-size: 1rem; }
p { margin: 0; }
a { color: var(--accent); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }
.menu a, .person a.n, .list a.t, .kpi a { text-decoration: none; }
.person a.n:hover, .list a.t:hover, .kpi a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: var(--r-sm); }
.muted { color: var(--ink-2); }
.faint { color: var(--ink-3); font-size: .875rem; }
.small { font-size: .85rem; }
.nowrap { white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hidden { display: none !important; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ---------- App shell ---------- */
.shell { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; background: linear-gradient(to right, var(--side) 248px, var(--paper) 248px); }
.sidebar {
  background: var(--side); color: var(--side-ink); display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh; overflow-y: auto; padding: 18px 12px;
}
.brand { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 6px 10px 20px; color: #fff; }
.brand-logo { display: block; width: 100%; max-width: 200px; height: auto; }
.brand-sub { font-size: .7rem; color: var(--side-ink); font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-group { font-size: .75rem; color: var(--side-ink-2); padding: 16px 12px 6px; font-weight: 600; }
.nav a {
  display: flex; align-items: center; gap: 11px; padding: 8px 12px; border-radius: var(--r); color: var(--side-ink);
  font-weight: 500; font-size: .92rem; text-decoration: none;
}
.nav a:hover { background: var(--side-hover); color: #fff; }
.nav a.active { background: var(--side-hover); color: #fff; box-shadow: inset 3px 0 0 var(--side-mark); }
.nav svg { width: 18px; height: 18px; flex: none; opacity: .9; }
.nav .count {
  margin-left: auto; background: var(--side-mark); color: #0a0a0b; font-size: .72rem; font-weight: 700;
  border-radius: 999px; padding: 1px 7px;
}
.sidebar-foot { margin-top: auto; padding: 14px 10px 0; font-size: .78rem; color: var(--side-ink-2); }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  display: flex; align-items: center; gap: 12px; padding: 14px 32px; border-bottom: 1px solid var(--line);
  background: var(--surface); position: sticky; top: 0; z-index: 20;
}
.topbar .title { font-weight: 650; font-size: 1rem; }
.topbar .spacer { flex: 1; }
.icon-btn.menu-btn { display: none; }
.content { padding: 28px 32px 64px; max-width: 1280px; width: 100%; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head .sub { color: var(--ink-2); margin-top: 4px; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.icon-btn {
  position: relative; width: 38px; height: 38px; display: grid; place-items: center; border-radius: var(--r);
  border: 1px solid transparent; background: transparent; cursor: pointer; color: var(--ink-2);
}
.icon-btn:hover { background: var(--surface-2); color: var(--ink); }
.icon-btn svg { width: 20px; height: 20px; }
.icon-btn .dot {
  position: absolute; top: 5px; right: 4px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 999px;
  background: var(--red); color: #fff; font-size: .68rem; font-weight: 700; display: grid; place-items: center;
  border: 2px solid var(--surface);
}
.user-chip {
  display: flex; align-items: center; gap: 10px; padding: 4px 10px 4px 4px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line); background: var(--surface);
}
.user-chip:hover { border-color: var(--line-strong); }
.user-chip .who { line-height: 1.15; text-align: left; }
.user-chip .who b { font-size: .88rem; font-weight: 600; display: block; }
.user-chip .who span { font-size: .75rem; color: var(--ink-3); }

.avatar {
  width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: .78rem;
  color: #fff; flex: none; letter-spacing: .02em; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14);
}
.avatar.lg { width: 64px; height: 64px; font-size: 1.3rem; }
.avatar.sm { width: 26px; height: 26px; font-size: .68rem; }

.menu {
  position: absolute; right: 0; top: calc(100% + 6px); background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r); box-shadow: 0 12px 32px var(--shade); min-width: 220px; padding: 6px; z-index: 50;
}
.menu button, .menu a {
  display: block; width: 100%; text-align: left; padding: 8px 10px; border-radius: var(--r-sm); border: 0; background: none;
  cursor: pointer; color: var(--ink); font-size: .9rem;
}
.menu button:hover, .menu a:hover { background: var(--surface-2); text-decoration: none; }
.menu hr { border: 0; border-top: 1px solid var(--line); margin: 6px 0; }

/* ---------- Panels ---------- */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px 0; flex-wrap: wrap; }
.panel-head .hint { font-size: .85rem; color: var(--ink-3); }
.panel-body { padding: 16px 20px 20px; }
.panel-body.flush { padding: 12px 0 4px; }
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-main { grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); }
.stack { display: flex; flex-direction: column; gap: 20px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.between { justify-content: space-between; }

/* KPI row: one strip, divided, not a row of identical cards */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(122px, 1fr)); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }
.kpi { padding: 16px 20px; border-left: 1px solid var(--line); min-width: 0; }
.kpi:first-child { border-left: 0; }
.kpi .v { font-size: 1.7rem; font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; }
.kpi .l { font-size: .85rem; color: var(--ink-2); margin-top: 4px; }
.kpi .v.warn { color: var(--amber); }
.kpi .v.bad { color: var(--red); }
.kpi a { color: inherit; }

/* ---------- Buttons & forms ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 8px 15px; min-height: 38px;
  border-radius: var(--r); border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink);
  font-weight: 600; font-size: .9rem; cursor: pointer; white-space: nowrap; text-decoration: none;
}
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn svg { width: 16px; height: 16px; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn.primary:hover { background: color-mix(in srgb, var(--accent) 86%, #000); border-color: color-mix(in srgb, var(--accent) 86%, #000); }
.btn.danger { color: var(--red); border-color: color-mix(in srgb, var(--red) 40%, var(--line)); }
.btn.danger:hover { background: var(--red-soft); }
.btn.success { color: var(--green); border-color: color-mix(in srgb, var(--green) 40%, var(--line)); }
.btn.success:hover { background: var(--green-soft); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--surface-2); }
.btn.sm { padding: 4px 10px; min-height: 30px; font-size: .84rem; }
.btn.block { width: 100%; }
.btn.lg { min-height: 48px; font-size: 1rem; padding: 10px 22px; }

.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .label { font-size: .86rem; font-weight: 600; color: var(--ink); }
.field .help { font-size: .8rem; color: var(--ink-3); }
.input, select.input, textarea.input {
  width: 100%; padding: 9px 12px; border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--surface);
  min-height: 40px; color: var(--ink);
}
textarea.input { min-height: 90px; resize: vertical; }
.input:focus { border-color: var(--accent-2); box-shadow: var(--focus); outline: none; }
.input:disabled { background: var(--surface-2); color: var(--ink-2); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 18px; }
.form-grid .span-2 { grid-column: 1 / -1; }
.check { display: flex; align-items: flex-start; gap: 10px; font-size: .92rem; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); margin-top: 2px; flex: none; }
.form-error { background: var(--red-soft); color: var(--red); border-radius: var(--r); padding: 10px 12px; font-size: .9rem; }
.form-ok { background: var(--green-soft); color: var(--green); border-radius: var(--r); padding: 10px 12px; font-size: .9rem; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 16px; }
.filters .input { width: auto; min-width: 150px; }
.filters .grow { flex: 1; min-width: 200px; }
.date-range { display: flex; align-items: center; gap: 6px; }
.date-range .input { min-width: 0 !important; }
.weekday-pick { display: flex; gap: 6px; flex-wrap: wrap; }
.weekday-pick label {
  border: 1px solid var(--line-strong); border-radius: var(--r); padding: 6px 11px; cursor: pointer; font-weight: 600; font-size: .85rem;
  user-select: none;
}
.weekday-pick input { position: absolute; opacity: 0; pointer-events: none; }
.weekday-pick input:checked + span { color: var(--on-accent); }
.weekday-pick label:has(input:checked) { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.weekday-pick label:has(input:focus-visible) { box-shadow: var(--focus); }

/* ---------- Tabs ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 20px; overflow-x: auto; }
.tabs a {
  padding: 10px 14px; font-weight: 600; color: var(--ink-2); border-bottom: 2px solid transparent; margin-bottom: -1px;
  white-space: nowrap; text-decoration: none; font-size: .93rem;
}
.tabs a:hover { color: var(--ink); }
.tabs a.active { color: var(--accent); border-bottom-color: var(--accent); }
.tabs .count { background: var(--silver-soft); color: var(--ink); font-weight: 700; border-radius: 999px; padding: 0 7px; font-size: .75rem; margin-left: 6px; }

/* ---------- Badges ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px; font-size: .78rem; font-weight: 600;
  background: var(--slate-soft); color: var(--ink-2); white-space: nowrap;
}
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .85; }
.badge.plain::before { display: none; }
.b-green { background: var(--green-soft); color: var(--green); }
.b-amber { background: var(--amber-soft); color: var(--amber); }
.b-red { background: var(--red-soft); color: var(--red); }
.b-blue { background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-strong); }
.b-teal { background: var(--silver-soft); color: var(--ink); }
.b-slate { background: var(--slate-soft); color: var(--ink-2); }

/* ---------- Service chips ---------- */
.chips { display: inline-flex; flex-wrap: wrap; gap: 5px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; font-size: .76rem; font-weight: 600; padding: 2px 9px 2px 7px; border-radius: 6px;
  background: color-mix(in srgb, var(--c) 12%, var(--surface)); color: color-mix(in srgb, var(--c) 80%, var(--ink)); white-space: nowrap;
}
.chip::before { content: ''; width: 7px; height: 7px; border-radius: 2px; background: var(--c); }
.chips.lg .chip { font-size: .9rem; padding: 6px 12px 6px 10px; border-radius: 8px; }
.chips.lg .chip::before { width: 10px; height: 10px; }
.service-pick { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.service-pick label {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: var(--r);
  cursor: pointer; font-weight: 600; font-size: .9rem;
}
.service-pick label:has(input:checked) { border-color: var(--c); background: color-mix(in srgb, var(--c) 10%, var(--surface)); box-shadow: inset 3px 0 0 var(--c); }
.service-pick input { accent-color: var(--c); width: 17px; height: 17px; }
.service-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.service-tile { border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; border-top: 3px solid var(--c); text-decoration: none; color: var(--ink); display: block; }
.service-tile:hover { background: var(--surface-2); text-decoration: none; }
.service-tile .n { font-size: 1.4rem; font-weight: 700; }
.service-tile .l { font-size: .85rem; font-weight: 600; }
.service-tile .s { font-size: .78rem; color: var(--ink-3); }
.money-bar { height: 10px; border-radius: 999px; background: var(--surface-2); overflow: hidden; display: flex; }
.money-bar span { display: block; height: 100%; }
.kpi .sub { font-size: .78rem; color: var(--ink-3); margin-top: 2px; }
.payslip { max-width: 760px; margin: 0 auto; padding: 28px; }
.payslip-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; padding-bottom: 18px; border-bottom: 2px solid var(--ink); }
.payslip-total { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }
.payslip table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.payslip td, .payslip th { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; }
.payslip td.num, .payslip th.num { text-align: right; font-variant-numeric: tabular-nums; }
.payslip .net { font-size: 1.5rem; font-weight: 750; }
.payslip-logo { display: block; width: 240px; max-width: 100%; height: auto; margin-bottom: 6px; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th {
  text-align: left; font-weight: 600; color: var(--ink-2); font-size: .82rem; padding: 10px 14px;
  border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--surface);
}
.table td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr.clickable { cursor: pointer; }
.table tbody tr.clickable:hover { background: var(--surface-2); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table td.num { white-space: nowrap; }
@media (min-width: 641px) { .table td.lead { min-width: 190px; } }
.table td.actions { text-align: right; white-space: nowrap; }
.person { display: flex; align-items: center; gap: 10px; min-width: 0; }
.person .n { font-weight: 600; line-height: 1.25; }
.person .d { font-size: .8rem; color: var(--ink-3); line-height: 1.2; }

/* ---------- Lists ---------- */
.list { list-style: none; margin: 0; padding: 0; }
.list > li { display: flex; align-items: center; gap: 12px; padding: 11px 20px; border-top: 1px solid var(--line); }
.list > li:first-child { border-top: 0; }
.list .grow { flex: 1; min-width: 0; }
.list > li > svg { width: 18px; height: 18px; flex: none; color: var(--ink-3); }
.list .t { font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.list .s { font-size: .82rem; color: var(--ink-3); }
.list a.t { color: var(--ink); }

.empty { text-align: center; padding: 36px 20px; color: var(--ink-2); }
.empty b { display: block; color: var(--ink); margin-bottom: 4px; font-weight: 600; }
.empty .btn { margin-top: 14px; }

.progress { height: 6px; background: var(--surface-2); border-radius: 999px; overflow: hidden; min-width: 60px; }
.progress > span { display: block; height: 100%; background: var(--accent-2); border-radius: 999px; }
.progress.done > span { background: var(--green); }
.progress.blocked > span { background: var(--red); }

/* ---------- Time card (signature element) ---------- */
.clock-card { display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center; padding: 22px 24px; }
.clock-time { font-size: 3rem; font-weight: 750; letter-spacing: -0.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.clock-time small { font-size: 1.1rem; font-weight: 600; color: var(--ink-3); margin-left: 4px; letter-spacing: 0; }
.clock-date { color: var(--ink-2); margin-top: 6px; }
.clock-meta { display: flex; gap: 22px; margin-top: 16px; flex-wrap: wrap; }
.clock-meta div { font-size: .82rem; color: var(--ink-3); }
.clock-meta b { display: block; color: var(--ink); font-size: 1.02rem; font-weight: 650; }
.punch {
  width: 148px; height: 148px; border-radius: 50%; border: 0; cursor: pointer; font-weight: 700; font-size: 1.02rem;
  display: grid; place-items: center; text-align: center; line-height: 1.25; color: var(--on-accent); background: var(--accent);
  box-shadow: 0 0 0 8px var(--accent-soft); transition: transform .12s ease, box-shadow .2s ease;
}
.punch:hover { transform: scale(1.03); }
.punch:active { transform: scale(.98); }
.punch.out { background: var(--metal); color: #0a0a0b; box-shadow: 0 0 0 8px var(--surface-2); }
.punch:disabled { background: var(--surface-2); color: var(--ink-3); box-shadow: none; cursor: default; transform: none; }
.punch span { display: block; font-size: .78rem; font-weight: 500; opacity: .8; }

.timecard { display: grid; grid-template-columns: repeat(auto-fill, minmax(22px, 1fr)); gap: 4px; }
.timecard .d {
  aspect-ratio: 1; border-radius: 4px; background: var(--surface-2); position: relative; min-width: 0;
  display: grid; place-items: center; font-size: .62rem; color: var(--ink-3); font-weight: 600;
}
.timecard .d.present { background: var(--green); color: #fff; }
.timecard .d.late { background: var(--amber); color: #fff; }
.timecard .d.half_day { background: linear-gradient(135deg, var(--green) 50%, var(--surface-2) 50%); color: var(--ink); }
.timecard .d.absent { background: var(--red); color: #fff; }
.timecard .d.leave { background: var(--blue); color: #fff; }
.timecard .d.holiday { background: repeating-linear-gradient(45deg, var(--surface-2), var(--surface-2) 3px, var(--line) 3px, var(--line) 6px); }
.timecard .d.not_marked { background: var(--surface); outline: 2px dashed var(--amber); outline-offset: -2px; }
.timecard .d.today { box-shadow: 0 0 0 2px var(--ink); }
.legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: .8rem; color: var(--ink-2); margin-top: 12px; }
.legend i { display: inline-block; width: 11px; height: 11px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }

/* ---------- Charts ---------- */
.bars { display: flex; align-items: flex-end; gap: 10px; height: 150px; padding-top: 10px; }
.bars .col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; min-width: 0; }
.bars .stack-bar { flex: 1; width: 100%; max-width: 38px; display: flex; flex-direction: column; justify-content: flex-end; background: var(--surface-2); border-radius: 5px; overflow: hidden; }
.bars .stack-bar span { display: block; width: 100%; }
.bars .lbl { font-size: .72rem; color: var(--ink-3); white-space: nowrap; }
.bars .val { font-size: .75rem; font-weight: 600; }
.hbar { display: grid; grid-template-columns: 110px 1fr 36px; align-items: center; gap: 10px; font-size: .88rem; padding: 5px 0; }
.hbar .track { height: 10px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.hbar .track span { display: block; height: 100%; border-radius: 999px; }
.hbar .n { text-align: right; font-weight: 600; }

/* ---------- Calendar ---------- */
.cal-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.cal-head h2 { font-size: 1.25rem; min-width: 170px; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; background: var(--surface); }
.cal .dow { padding: 8px 10px; font-size: .78rem; font-weight: 600; color: var(--ink-3); border-bottom: 1px solid var(--line); background: var(--surface); }
.cal .day { min-height: 112px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 6px 6px 8px; min-width: 0; transition: background .15s ease; }
.cal .day:hover { background: color-mix(in srgb, var(--surface-2) 35%, var(--surface)); }
.cal .day:nth-child(7n) { border-right: 0; }
.cal .day.out { background: var(--paper); }
.cal .day.out:hover { background: color-mix(in srgb, var(--surface-2) 20%, var(--paper)); }
.cal .day.out .num { color: var(--ink-3); }
.cal .day.off { background: color-mix(in srgb, var(--surface-2) 60%, var(--surface)); }
.cal .day.off:hover { background: color-mix(in srgb, var(--surface-2) 80%, var(--surface)); }
.cal .day .num { font-size: .82rem; font-weight: 600; padding: 2px 6px; display: inline-block; border-radius: 999px; }
.cal .day.today .num { background: var(--accent); color: var(--on-accent); }
.cal .ev {
  display: block; font-size: .74rem; line-height: 1.25; padding: 2px 6px; border-radius: 4px; margin-top: 3px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-left: 3px solid; background: var(--surface-2); color: var(--ink);
}
.cal .ev.clickable { cursor: pointer; }
.cal .ev.clickable:hover { filter: brightness(0.92); }
.cal .ev.pending { border-left-style: dashed; opacity: .85; }
.cal .ev.holiday { background: var(--amber-soft); border-color: var(--amber); color: var(--ink); font-weight: 600; }
.cal .ev.task { border-color: var(--ink-3); }
.cal .ev.swap_on, .cal .ev.swap_off { border-color: var(--blue); }
.cal .more { font-size: .72rem; color: var(--ink-3); padding: 2px 6px; cursor: pointer; background: none; border: 0; }
.cal-agenda { display: none; }

/* ---------- Org chart ---------- */
.org ul { list-style: none; margin: 0; padding-left: 26px; position: relative; }
.org > ul { padding-left: 0; }
.org li { position: relative; padding: 6px 0 6px 0; }
.org ul ul li::before { content: ''; position: absolute; left: -16px; top: 0; bottom: 0; border-left: 1px solid var(--line-strong); }
.org ul ul li:last-child::before { bottom: calc(100% - 26px); }
.org ul ul li::after { content: ''; position: absolute; left: -16px; top: 26px; width: 12px; border-top: 1px solid var(--line-strong); }
.org .node {
  display: inline-flex; align-items: center; gap: 10px; padding: 8px 14px 8px 8px; border: 1px solid var(--line);
  border-radius: var(--r); background: var(--surface); min-width: 240px;
}
.org .node.inactive { opacity: .55; }
.org .node .n { font-weight: 600; font-size: .92rem; }
.org .node .d { font-size: .78rem; color: var(--ink-3); }
.org .node.me { border-color: var(--accent-2); box-shadow: inset 3px 0 0 var(--accent-2); }

/* ---------- Timeline ---------- */
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { position: relative; padding: 0 0 18px 22px; }
.timeline li::before { content: ''; position: absolute; left: 5px; top: 8px; bottom: -2px; border-left: 1px solid var(--line-strong); }
.timeline li:last-child::before { display: none; }
.timeline li::after { content: ''; position: absolute; left: 1px; top: 6px; width: 9px; height: 9px; border-radius: 50%; background: var(--accent-2); }
.timeline .meta { font-size: .8rem; color: var(--ink-3); }
.timeline .note { margin-top: 4px; padding: 8px 12px; background: var(--surface-2); border-radius: var(--r); font-size: .9rem; white-space: pre-wrap; }

/* ---------- Dialog / drawer / toast ---------- */
dialog.modal {
  border: 0; padding: 0; border-radius: var(--r-lg); background: var(--surface); color: var(--ink);
  width: min(560px, calc(100vw - 24px)); max-height: calc(100vh - 40px); box-shadow: 0 24px 64px rgba(0, 0, 0, .28);
}
dialog.modal[open] { display: flex; flex-direction: column; overflow: hidden; }
.modal-body { overflow-y: auto; min-height: 0; }
dialog.modal.wide { width: min(760px, calc(100vw - 24px)); }
dialog.modal::backdrop { background: rgba(0, 0, 0, .5); }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px 0; gap: 12px; }
.modal-body { padding: 18px 22px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 22px 18px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.toasts { position: fixed; bottom: 20px; right: 20px; display: flex; flex-direction: column; gap: 8px; z-index: 100; }
.toast {
  background: var(--ink); color: var(--paper); padding: 11px 16px; border-radius: var(--r); font-size: .9rem; max-width: 360px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, .22); animation: toast-in .18s ease-out;
}
.toast.error { background: var(--red); color: #fff; }
@keyframes toast-in { from { transform: translateY(8px); opacity: 0; } }

.scrim { display: none; }

/* ---------- Auth pages ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); }
.auth-side {
  background: var(--side); color: var(--side-ink); padding: 48px; display: flex; flex-direction: column; justify-content: space-between;
  position: relative; overflow: hidden;
}
.auth-side .brand { padding: 0; }
.auth-side .brand-logo { max-width: 280px; }
.auth-side h2 { color: #fff; font-size: 2rem; font-weight: 700; letter-spacing: -0.025em; max-width: 420px; line-height: 1.15; }
.auth-side p { max-width: 400px; margin-top: 12px; }
.auth-card-strip { display: grid; grid-template-columns: repeat(14, 1fr); gap: 5px; max-width: 420px; margin-top: 28px; }
.auth-card-strip i { aspect-ratio: 1; border-radius: 4px; background: #1d1e21; }
.auth-card-strip i.g { background: #c0c2c6; } .auth-card-strip i.a { background: #6f7278; } .auth-card-strip i.b { background: #3a3b40; }
.auth-main { display: grid; place-items: center; padding: 32px 20px; background: var(--surface); }
.auth-form { width: 100%; max-width: 380px; display: flex; flex-direction: column; gap: 16px; }
.auth-form h1 { font-size: 1.6rem; }
.pw-wrap { position: relative; }
.pw-wrap .input { padding-right: 64px; }
.pw-wrap button {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: none; color: var(--accent);
  font-weight: 600; font-size: .82rem; cursor: pointer; padding: 6px 8px;
}

/* ---------- Detail header ---------- */
.profile-head { display: flex; gap: 18px; align-items: center; padding: 22px 24px; flex-wrap: wrap; }
.profile-head .grow { flex: 1; min-width: 200px; }
.dl { display: grid; grid-template-columns: 170px 1fr; gap: 10px 16px; font-size: .93rem; }
.dl dt { color: var(--ink-3); }
.dl dd { margin: 0; overflow-wrap: anywhere; }

.loading { padding: 40px; text-align: center; color: var(--ink-3); }
.skeleton { background: linear-gradient(90deg, var(--surface-2), var(--surface), var(--surface-2)); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: var(--r); height: 14px; }
@keyframes sk { to { background-position: -200% 0; } }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .grid-main, .grid-3 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed; left: 0; top: 0; bottom: 0; width: 272px; z-index: 60; transform: translateX(-100%);
    transition: transform .2s ease;
  }
  body.nav-open .sidebar { transform: none; }
  body.nav-open .scrim { display: block; position: fixed; inset: 0; background: rgba(0, 0, 0, .45); z-index: 55; }
  .icon-btn.menu-btn { display: grid; }
  .shell { background: var(--paper); }
  .topbar { padding: 10px 16px; }
  .content { padding: 20px 16px 56px; }
  .grid-2 { grid-template-columns: minmax(0, 1fr); }
  .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .auth { grid-template-columns: 1fr; }
  .auth-side { padding: 28px 24px; }
  .auth-side h2 { font-size: 1.4rem; }
  .auth-side .hide-sm { display: none; }
  .user-chip .who { display: none; }
  .user-chip { padding: 3px; }
}
@media (max-width: 640px) {
  h1 { font-size: 1.35rem; }
  .form-grid { grid-template-columns: 1fr; }
  .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi { border-left: 0; border-top: 1px solid var(--line); padding: 14px 16px; }
  .kpi:nth-child(-n+2) { border-top: 0; }
  .kpi:nth-child(even) { border-left: 1px solid var(--line); }
  .kpi .v { font-size: 1.4rem; }
  .clock-card { grid-template-columns: 1fr; justify-items: start; }
  .clock-time { font-size: 2.4rem; }
  .punch { width: 100%; height: 56px; border-radius: var(--r); box-shadow: none; }
  .punch span { display: inline; margin-left: 6px; }
  .filters .input, .filters .grow { width: 100%; min-width: 0; flex: 1 1 100%; }
  .date-range { width: 100%; }
  .date-range .input { flex: 1 1 0 !important; width: auto !important; }
  .page-actions { width: 100%; }
  .page-actions .btn { flex: 1; }
  .dl { grid-template-columns: 1fr; gap: 2px 0; }
  .dl dd { margin-bottom: 10px; }
  .hbar { grid-template-columns: 84px 1fr 30px; }
  .service-pick, .service-tiles { grid-template-columns: 1fr; }

  .list > li { flex-wrap: wrap; row-gap: 6px; }
  .list > li > .grow { min-width: 58%; }

  /* Tables become stacked cards */
  table.table.stack-sm thead { display: none; }
  table.table.stack-sm, .table.stack-sm tbody, .table.stack-sm tr, .table.stack-sm td { display: block; width: 100%; }
  .table.stack-sm tr { border-bottom: 1px solid var(--line); padding: 10px 16px; }
  .table.stack-sm tbody tr:last-child { border-bottom: 0; }
  .table.stack-sm td { border: 0; padding: 3px 0; display: flex; justify-content: space-between; gap: 12px; text-align: right; }
  .table.stack-sm td::before { content: attr(data-label); color: var(--ink-3); font-size: .82rem; text-align: left; flex: none; }
  .table.stack-sm td.lead { text-align: left; padding-bottom: 6px; }
  .table.stack-sm td.lead::before { display: none; }
  .table.stack-sm td.blank { display: none; }
  .table.stack-sm td.actions { justify-content: flex-end; padding-top: 8px; }
  .table.stack-sm td.actions::before { display: none; }
  .table.stack-sm .num { text-align: right; }

  .cal { display: none; }
  .cal-agenda { display: block; }
  .org .node { min-width: 0; }
  .toasts { left: 12px; right: 12px; bottom: 12px; }
  .toast { max-width: none; }
}
.cal-agenda .a-day { padding: 10px 16px; border-top: 1px solid var(--line); }
.cal-agenda .a-day:first-child { border-top: 0; }
.cal-agenda .a-date { font-weight: 650; font-size: .9rem; margin-bottom: 4px; }
.cal-agenda .a-date.today { color: var(--accent); }
.cal-agenda .ev { display: block; font-size: .86rem; padding: 4px 8px; border-left: 3px solid; border-radius: 4px; margin-top: 4px; background: var(--surface-2); }
.cal-agenda .ev.holiday { background: var(--amber-soft); border-color: var(--amber); }

@media print {
  .sidebar, .topbar, .page-actions, .filters, .tabs, .no-print { display: none !important; }
  body { background: #fff; }
  .shell { background: #fff; }
  .shell { display: block; }
  .content { padding: 0; }
  .panel { border: 0; }
}

/* ---------- Sidebar sub-menu (Tasks → Assigned tasks / Daily log) ---------- */
.nav-sub { display: flex; flex-direction: column; gap: 2px; margin-bottom: 2px; }
.nav a.sub { padding: 6px 12px 6px 41px; font-size: .86rem; }
.nav a.has-sub.active { box-shadow: none; background: transparent; }

/* ---------- Daily log ---------- */
.btn.icon-only { padding: 0; width: 32px; min-height: 32px; justify-content: center; }
.btn.icon-only svg { width: 17px; height: 17px; }
.btn.danger-icon:not(:disabled):hover { color: var(--red); background: var(--red-soft); }
.wl-actions { display: inline-flex; gap: 2px; justify-content: flex-end; }
.wl-proj { font-size: .76rem; font-weight: 600; padding: 2px 8px; border-radius: 6px; background: var(--silver-soft); color: var(--ink); white-space: nowrap; }
.wl-callout { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 16px; margin-bottom: 16px; border-radius: var(--r-lg); background: var(--amber-soft); border: 1px solid color-mix(in srgb, var(--amber) 25%, transparent); }
.wl-callout > svg { width: 20px; height: 20px; color: var(--amber); flex: none; }
.wl-callout .grow { flex: 1; min-width: 200px; }
.wl-review { display: flex; gap: 10px; padding: 10px 12px; border-radius: var(--r); background: var(--green-soft); }
.wl-review svg { width: 18px; height: 18px; flex: none; margin-top: 2px; color: var(--green); }
.wl-text { white-space: pre-wrap; overflow-wrap: anywhere; }
/* List: every day as a block of rows, one per task; date, status and actions span the block */
table.wl-sheet { min-width: 720px; }
.wl-sheet td { vertical-align: top; }
.wl-sheet td.num { width: 1%; color: var(--ink-3); font-size: .82rem; }
.wl-sheet td.wl-text { min-width: 240px; max-width: 560px; }
.wl-sheet td.wl-projcol { min-width: 180px; }
.wl-sheet .wl-proj { white-space: normal; display: inline-block; }
.wl-sheet tbody tr.wl-day-start:not(:first-child) td { border-top: 2px solid var(--line-strong); }
.wl-sheet tbody tr.clickable:hover { background: none; }
.wl-sheet tbody tr.clickable:hover td:not(.wl-span) { background: var(--surface-2); }
/* Day page: spreadsheet grid, one row per task */
table.wl-grid { width: 100%; min-width: 560px; border-collapse: separate; border-spacing: 0; border: 1px solid var(--line-strong); border-radius: var(--r); overflow: hidden; font-size: .92rem; }
.wl-grid th { background: var(--surface-2); color: var(--ink-2); font-size: .8rem; font-weight: 600; text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line-strong); border-right: 1px solid var(--line); }
.wl-grid td { padding: 0; vertical-align: top; border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); background: var(--surface); }
.wl-grid tbody tr:last-child td { border-bottom: 0; }
.wl-grid th:last-child, .wl-grid td:last-child { border-right: 0; }
.wl-grid .num { width: 44px; text-align: center; background: var(--surface-2); color: var(--ink-3); font-size: .82rem; font-variant-numeric: tabular-nums; }
.wl-grid td.num { padding: 10px 0; }
.wl-grid .wl-proj-td { width: 34%; min-width: 190px; }
.wl-grid .act { width: 44px; text-align: center; }
.wl-grid td.act { padding: 4px 0; }
.wl-cell { display: block; width: 100%; min-height: 40px; margin: 0; padding: 9px 10px; border: 0; border-radius: 0; background: transparent; color: var(--ink); font: inherit; line-height: 1.45; resize: none; overflow: hidden; }
select.wl-cell { cursor: pointer; }
.wl-cell:focus { outline: none; box-shadow: inset 0 0 0 2px var(--accent-2); background: var(--surface); }
.wl-cell-text { padding: 9px 10px; line-height: 1.45; }
.wl-grid-foot { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
.wl-daybar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: -8px 0 18px; }
.wl-daybar .input { width: auto; }
.wl-save { position: sticky; bottom: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  margin: 18px -20px -20px; padding: 12px 20px; background: var(--surface); border-top: 1px solid var(--line); border-radius: 0 0 var(--r-lg) var(--r-lg); }
.wl-missing summary { cursor: pointer; padding: 14px 20px; font-weight: 600; }
.wl-missing .names { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 20px 16px; }
.wl-missing .names span { display: inline-flex; align-items: center; gap: 6px; font-size: .85rem; padding: 3px 10px 3px 3px; border: 1px solid var(--line); border-radius: 999px; }
.pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 14px 0 0; margin-top: 8px; border-top: 1px solid var(--line); }
.pager .pages { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.pager .btn { min-width: 32px; justify-content: center; }
.pager .btn.current { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.pager .btn[aria-disabled] { opacity: .45; cursor: default; }

/* ---------- Roles & permissions ---------- */
.perm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.perm-module { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; background: var(--surface); }
.perm-head { display: flex; align-items: center; gap: 10px; padding-bottom: 10px; margin-bottom: 10px; border-bottom: 1px solid var(--line); cursor: pointer; }
.perm-head input { width: 18px; height: 18px; accent-color: var(--accent); flex: none; }
.perm-head b { flex: 1; }
.perm-actions { display: flex; flex-direction: column; gap: 10px; }
.perm-actions .check:has(input:disabled) { cursor: default; }
.perm-actions .check:has(input:disabled:not(:checked)) { opacity: .6; }
.perm-save { position: sticky; bottom: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  margin: 18px -20px -20px; padding: 12px 20px; background: var(--surface); border-top: 1px solid var(--line); border-radius: 0 0 var(--r-lg) var(--r-lg); }
.perm-meter { display: flex; align-items: center; gap: 10px; }
.perm-meter .bar { width: 90px; height: 6px; border-radius: 3px; background: var(--surface-2); overflow: hidden; flex: none; }
.perm-meter .bar i { display: block; height: 100%; background: var(--accent-2); }

/* ---------- Companies ---------- */
.co-mark { width: 26px; height: 26px; border-radius: 7px; background: var(--silver-soft); color: var(--ink); display: grid; place-items: center; font-weight: 700; font-size: .78rem; flex: none; }

/* ---------- Orders sheet: spreadsheet grid with a sticky header row and S.No column ---------- */
.sheet-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.sheet-bar .grow { flex: 1; min-width: 200px; max-width: 360px; }
.sheet-wrap { overflow: auto; max-height: calc(100vh - 300px); min-height: 240px; border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--surface); }
table.sheet { border-collapse: separate; border-spacing: 0; min-width: 100%; font-size: .9rem; }
.sheet th {
  position: sticky; top: 0; z-index: 2; padding: 0; background: var(--surface-2); color: var(--ink-2); font-size: .8rem; font-weight: 600;
  text-align: left; white-space: nowrap; border-bottom: 1px solid var(--line-strong); border-right: 1px solid var(--line);
}
.sheet td { padding: 0; background: var(--surface); border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); }
.sheet .c-text { min-width: 260px; }
.sheet .c-number { min-width: 120px; }
.sheet .c-date, .sheet .c-select { min-width: 160px; }
.sheet .sn {
  position: sticky; left: 0; z-index: 1; width: 60px; min-width: 60px; text-align: center; background: var(--surface-2); color: var(--ink-3);
  font-size: .8rem; font-variant-numeric: tabular-nums; border-right: 1px solid var(--line-strong);
}
.sheet th.sn { z-index: 3; padding: 9px 6px; }
.sheet th.add, .sheet td.act { width: 48px; min-width: 48px; text-align: center; border-right: 0; }
.sheet td.act { padding: 3px 0; }
.sheet .col-btn {
  display: flex; align-items: center; gap: 8px; width: 100%; padding: 9px 10px; border: 0; background: none; color: inherit;
  font: inherit; cursor: pointer; text-align: left; border-radius: 0;
}
.sheet .col-btn:hover { background: var(--line); color: var(--ink); }
.sheet .col-btn .t { margin-left: auto; font-weight: 500; font-size: .7rem; color: var(--ink-3); text-transform: uppercase; letter-spacing: .03em; }
.sheet th.add .col-btn { justify-content: center; }
.sheet th.add svg { width: 16px; height: 16px; }
.sheet tbody tr:hover td.sn { color: var(--ink); }
.sheet-cell { display: block; width: 100%; min-height: 38px; margin: 0; padding: 8px 10px; border: 0; border-radius: 0; background: transparent; color: var(--ink); font: inherit; }
.sheet-cell.num { text-align: right; font-variant-numeric: tabular-nums; }
select.sheet-cell { cursor: pointer; }
.sheet-cell:focus { outline: none; box-shadow: inset 0 0 0 2px var(--accent-2); background: var(--surface); }
.sheet-cell.invalid { box-shadow: inset 0 0 0 2px var(--red); background: var(--red-soft); }
.sheet-cell[data-tone] { font-weight: 600; }
.sheet-cell[data-tone="green"] { color: var(--green); }
.sheet-cell[data-tone="blue"] { color: var(--blue); }
.sheet-cell[data-tone="amber"] { color: var(--amber); }
.sheet-cell[data-tone="red"] { color: var(--red); }
.sheet .empty-row td { padding: 32px 16px; text-align: center; color: var(--ink-2); border-right: 0; }
.sheet-foot { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 12px; }
.sheet-status.error { color: var(--red); font-weight: 600; }
@media (max-width: 640px) {
  .sheet-wrap { max-height: none; }
  .sheet .c-text { min-width: 180px; }
  .sheet .sn { width: 44px; min-width: 44px; }
}
@media print {
  .sheet-wrap { max-height: none; overflow: visible; }
}
/* Import: matching the file's columns to the sheet's */
.import-map td { padding: 8px 10px; }
.import-map th { padding: 8px 10px; }
.import-map .input { min-height: 34px; padding: 5px 8px; min-width: 150px; }
.import-map td.ex { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); }
