/* Workora - Next-generation time management · design system */
:root {
  color-scheme: light;
  --font: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  --bg: #f5f6fa; --surface: #ffffff; --surface-2: #f8f9fc; --surface-3: #f1f3f8; --chip: #eef0f6;
  --line: #e8eaf1; --line-2: #d9dce6;
  --text: #0f1222; --text-2: #4a5068; --muted: #848aa0;
  --brand: #5b4ff5; --brand-600: #4b3fe0; --brand-50: #efedff; --brand-100: #e2deff;
  --grad: linear-gradient(135deg, #6366f1 0%, #8b5cf6 55%, #a855f7 100%);
  --grad-soft: linear-gradient(135deg, rgba(99,102,241,.10), rgba(168,85,247,.10));
  --side: #0d0f1c; --side-2: #171a2c; --side-line: #1f2337; --side-text: #9aa0bd; --side-head: #5d6383;
  /* chart series (validated categorical slots 1-4) */
  --series-1: #2a78d6; --series-2: #eb6834; --series-3: #1baf7a; --series-4: #eda100;
  /* status */
  --good: #0b8a3e; --good-bg: #e6f6ec; --warn: #a35f00; --warn-bg: #fff3d9; --serious: #c2410c; --serious-bg: #ffece2;
  --bad: #c8283f; --bad-bg: #fde9ec; --info: #2563eb; --info-bg: #e7efff; --leave: #0b7a8f; --leave-bg: #e1f5f8;
  --extra: #7c3aed; --extra-bg: #f1eaff;
  --radius: 14px; --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(16,18,40,.04), 0 6px 20px -10px rgba(16,18,40,.10);
  --shadow-lg: 0 24px 60px -20px rgba(16,18,40,.35);
  --ring: 0 0 0 4px rgba(91,79,245,.16);
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b0d17; --surface: #131626; --surface-2: #171a2c; --surface-3: #1c2033; --chip: #23283d;
  --line: #23273a; --line-2: #2f3449;
  --text: #eceef7; --text-2: #b4b9d0; --muted: #7d83a0;
  --brand: #8b80ff; --brand-600: #7a6ef5; --brand-50: #1f1d3d; --brand-100: #2a2752;
  --side: #090b14; --side-2: #141729; --side-line: #1a1d30;
  --series-1: #3987e5; --series-2: #d95926; --series-3: #199e70; --series-4: #c98500;
  --good: #3ccf75; --good-bg: rgba(60,207,117,.13); --warn: #f5b94a; --warn-bg: rgba(245,185,74,.13);
  --serious: #ff935f; --serious-bg: rgba(255,147,95,.13); --bad: #ff6b81; --bad-bg: rgba(255,107,129,.13);
  --info: #7aa7ff; --info-bg: rgba(122,167,255,.13); --leave: #4fd1e0; --leave-bg: rgba(79,209,224,.12);
  --extra: #b794ff; --extra-bg: rgba(183,148,255,.14);
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px -12px rgba(0,0,0,.5);
  --ring: 0 0 0 4px rgba(139,128,255,.22);
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--font); font-size: 14px; line-height: 1.45; color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; font-feature-settings: "cv11", "ss01"; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 23px; margin: 0; font-weight: 700; letter-spacing: -.4px; }
h2 { font-size: 15px; margin: 0 0 12px; font-weight: 650; letter-spacing: -.15px; }
h3 { font-size: 11.5px; margin: 0 0 8px; font-weight: 650; color: var(--muted); text-transform: uppercase; letter-spacing: .7px; }
code { background: var(--chip); padding: 1px 6px; border-radius: 6px; font-size: 12.5px; }
.icon { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vertical-align: -4px; }
::selection { background: var(--brand-100); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 10px; border: 2px solid transparent; background-clip: padding-box; }

/* ---------- brand ---------- */
.brandmark { display: flex; align-items: center; gap: 11px; }
.brandmark img { width: 36px; height: 36px; border-radius: 11px; box-shadow: 0 6px 18px -6px rgba(124,58,237,.7); }
.brandmark .name { font-weight: 800; font-size: 19px; letter-spacing: -.5px; color: #fff; line-height: 1.05; }
.brandmark .tagline { font-size: 10.5px; color: var(--side-text); font-weight: 500; letter-spacing: .1px; }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- shell ---------- */
.shell { display: flex; min-height: 100vh; }
.sidebar { width: 252px; background: var(--side); color: var(--side-text); flex: none; position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; border-right: 1px solid var(--side-line);
  background-image: radial-gradient(600px 300px at -10% -10%, rgba(99,102,241,.18), transparent 60%); }
.sidebar::-webkit-scrollbar-thumb { background: #262a40; }
.sidebar .logo { padding: 20px 18px 16px; }
.nav-group { padding: 4px 12px; }
.nav-group .label { font-size: 10.5px; text-transform: uppercase; letter-spacing: 1.1px; color: var(--side-head); padding: 14px 10px 6px; font-weight: 600; }
.nav-group a { display: flex; align-items: center; gap: 11px; color: var(--side-text); padding: 8px 11px; border-radius: 10px; font-size: 13.5px; font-weight: 500; position: relative; transition: background .15s, color .15s; }
.nav-group a .icon { width: 17px; height: 17px; opacity: .85; }
.nav-group a:hover { background: var(--side-2); color: #fff; text-decoration: none; }
.nav-group a.on { background: linear-gradient(135deg, rgba(99,102,241,.95), rgba(139,92,246,.95)); color: #fff; box-shadow: 0 8px 22px -10px rgba(124,58,237,.9); }
.nav-group a.on .icon { opacity: 1; }
.nav-group a .count { margin-left: auto; background: #f43f5e; color: #fff; border-radius: 999px; font-size: 10.5px; padding: 1px 7px; font-weight: 700; }
.sidebar .foot { margin-top: auto; padding: 16px 20px; font-size: 11.5px; color: var(--side-head); border-top: 1px solid var(--side-line); }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { height: 64px; background: color-mix(in srgb, var(--surface) 82%, transparent); backdrop-filter: saturate(180%) blur(14px); -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 14px; padding: 0 26px; position: sticky; top: 0; z-index: 20; }
.topbar .menu-btn { display: none; background: none; border: 0; padding: 6px; cursor: pointer; color: var(--text); }
.topbar .company { font-weight: 600; color: var(--text); display: flex; align-items: center; gap: 8px; }
.topbar .company .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 4px var(--good-bg); }
.topbar .right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.topbar .clock { color: var(--text-2); font-variant-numeric: tabular-nums; font-size: 13px; background: var(--surface-3); padding: 6px 11px; border-radius: 999px; }
.icon-btn { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--text-2); cursor: pointer; }
.icon-btn:hover { color: var(--brand); border-color: var(--brand-100); text-decoration: none; }
.user-chip { display: flex; align-items: center; gap: 10px; padding: 4px 10px 4px 4px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--grad); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 12.5px; flex: none; overflow: hidden; letter-spacing: .3px; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.lg { width: 84px; height: 84px; font-size: 28px; box-shadow: 0 0 0 4px var(--surface), 0 10px 30px -10px rgba(91,79,245,.6); }
.user-chip .who { line-height: 1.15; font-weight: 600; font-size: 13px; }
.user-chip .who small { color: var(--muted); display: block; font-size: 11px; font-weight: 500; }
.content { padding: 26px; max-width: 1520px; width: 100%; }
.page-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 22px; }
.page-head .sub { color: var(--muted); font-size: 13.5px; margin-top: 4px; max-width: 760px; }
.page-head .actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ---------- cards & grid ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; margin-bottom: 20px; }
.card.flush { padding: 0; overflow: hidden; }
.card-head { display: flex; align-items: center; gap: 10px; padding: 15px 20px; border-bottom: 1px solid var(--line); }
.card-head h2 { margin: 0; }
.card-head .actions { margin-left: auto; display: flex; gap: 8px; align-items: center; }
a.card:hover { border-color: var(--brand-100); box-shadow: 0 1px 2px rgba(16,18,40,.04), 0 14px 32px -14px rgba(91,79,245,.35); transform: translateY(-1px); }
a.card { transition: transform .15s, box-shadow .15s, border-color .15s; }
.grid { display: grid; gap: 20px; }
.g-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-main { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); gap: 12px; margin-bottom: 20px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow); display: flex; gap: 13px; align-items: center; position: relative; overflow: hidden; }
.kpi .ic { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; flex: none; }
.kpi .n { font-size: 25px; font-weight: 750; line-height: 1.05; font-variant-numeric: tabular-nums; letter-spacing: -.5px; }
.kpi .l { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.kpi .pct { font-size: 12px; color: var(--text-2); }
.kpi.hero { background: var(--grad); border: 0; color: #fff; box-shadow: 0 16px 36px -18px rgba(124,58,237,.8); }
.kpi.hero .l { color: rgba(255,255,255,.8); }
.kpi.hero .ic { background: rgba(255,255,255,.18); color: #fff; }
.t-ok { background: var(--good-bg); color: var(--good); } .t-warn { background: var(--warn-bg); color: var(--warn); }
.t-bad { background: var(--bad-bg); color: var(--bad); } .t-info { background: var(--info-bg); color: var(--info); }
.t-leave { background: var(--leave-bg); color: var(--leave); } .t-muted { background: var(--chip); color: var(--text-2); }
.t-serious { background: var(--serious-bg); color: var(--serious); } .t-extra { background: var(--extra-bg); color: var(--extra); }
.t-brand { background: var(--brand-50); color: var(--brand); }

/* ---------- forms ---------- */
label { display: block; font-size: 12.5px; color: var(--text-2); margin-bottom: 6px; font-weight: 550; }
input, select, textarea { font: inherit; color: var(--text); padding: 9px 12px; border: 1px solid var(--line-2); border-radius: var(--radius-sm); background: var(--surface); width: 100%; min-width: 0; transition: border-color .15s, box-shadow .15s; }
input:hover, select:hover, textarea:hover { border-color: color-mix(in srgb, var(--brand) 35%, var(--line-2)); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: var(--ring); }
input[type=checkbox], input[type=radio] { width: 16px; height: 16px; accent-color: var(--brand); box-shadow: none; }
input[type=color] { padding: 3px; height: 39px; }
input[type=file] { padding: 7px; background: var(--surface-2); }
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px 16px; }
.form-grid .wide { grid-column: span 2; }
.form-grid .full { grid-column: 1 / -1; }
.field-hint { font-size: 12px; color: var(--muted); margin-top: 6px; }
.filters { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.filters > div { min-width: 150px; }
.filters .grow { flex: 1; min-width: 180px; }
.check { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--text); margin: 0 14px 6px 0; font-weight: 450; }
.form-actions { display: flex; gap: 10px; margin-top: 18px; align-items: center; flex-wrap: wrap; }
.btn { font: inherit; font-weight: 600; font-size: 13.5px; display: inline-flex; align-items: center; gap: 7px; padding: 9px 16px; border-radius: var(--radius-sm); border: 1px solid transparent;
  background: var(--grad); color: #fff; cursor: pointer; white-space: nowrap; text-decoration: none !important; line-height: 1.3; box-shadow: 0 6px 16px -8px rgba(91,79,245,.8); transition: filter .15s, transform .05s, box-shadow .15s; }
.btn:hover { filter: brightness(1.07); box-shadow: 0 10px 22px -10px rgba(91,79,245,.9); }
.btn:active { transform: translateY(1px); }
.btn.secondary { background: var(--surface); color: var(--text); border-color: var(--line-2); box-shadow: 0 1px 2px rgba(16,18,40,.05); }
.btn.secondary:hover { background: var(--surface-2); border-color: var(--brand-100); color: var(--brand); filter: none; }
.btn.ghost { background: transparent; color: var(--brand); padding: 6px 9px; box-shadow: none; }
.btn.ghost:hover { background: var(--brand-50); filter: none; }
.btn.danger { background: var(--surface); color: var(--bad); border-color: color-mix(in srgb, var(--bad) 30%, transparent); box-shadow: none; }
.btn.danger:hover { background: var(--bad-bg); filter: none; }
.btn.success { background: linear-gradient(135deg, #10b981, #0b8a3e); box-shadow: 0 6px 16px -8px rgba(11,138,62,.8); }
.btn.light { background: #fff; color: var(--brand-600); box-shadow: 0 8px 20px -10px rgba(0,0,0,.4); }
.btn.sm { padding: 6px 11px; font-size: 12.5px; border-radius: 9px; }
.btn .icon { width: 16px; height: 16px; }
.inline { display: inline; }
fieldset[disabled] input, fieldset[disabled] select, fieldset[disabled] textarea { background: var(--surface-2); }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: left; font-size: 11px; font-weight: 650; color: var(--muted); text-transform: uppercase; letter-spacing: .6px; background: var(--surface-2); padding: 11px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; position: sticky; top: 0; z-index: 1; }
.tbl td { padding: 11px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr { transition: background .1s; }
.tbl tbody tr:hover td { background: color-mix(in srgb, var(--brand) 4%, var(--surface)); }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; }
.tbl .wrap { white-space: normal; min-width: 180px; }
.tbl .person { display: flex; align-items: center; gap: 11px; }
.tbl .person .avatar { width: 34px; height: 34px; font-size: 12px; }
.tbl .person small { display: block; color: var(--muted); }
.tbl b { font-weight: 600; }
.empty { text-align: center; color: var(--muted); padding: 40px 12px !important; }
.pager { display: flex; gap: 6px; align-items: center; justify-content: flex-end; padding: 12px 18px; color: var(--muted); font-size: 13px; border-top: 1px solid var(--line); }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.badge .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.tag { display: inline-block; padding: 2px 9px; border-radius: 7px; font-size: 12px; background: var(--chip); color: var(--text-2); font-weight: 500; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }

/* ---------- flash & notices ---------- */
.flash { padding: 12px 15px; border-radius: 12px; margin-bottom: 16px; display: flex; gap: 10px; align-items: flex-start; border: 1px solid transparent; animation: slidein .25s ease; }
@keyframes slidein { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.flash.success { background: var(--good-bg); color: var(--good); border-color: color-mix(in srgb, var(--good) 22%, transparent); }
.flash.error { background: var(--bad-bg); color: var(--bad); border-color: color-mix(in srgb, var(--bad) 22%, transparent); }
.flash.info { background: var(--info-bg); color: var(--info); border-color: color-mix(in srgb, var(--info) 22%, transparent); }
.flash div { color: var(--text); }
.notice { background: var(--grad-soft); border: 1px solid var(--brand-100); border-radius: 12px; padding: 13px 15px; color: var(--text); font-size: 13.5px; margin-bottom: 18px; }
.notice.warn { background: var(--warn-bg); border-color: color-mix(in srgb, var(--warn) 25%, transparent); }

/* ---------- tabs ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; flex-wrap: wrap; align-items: center; }
.tabs > a:not(.btn) { padding: 10px 14px; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; font-weight: 600; }
.tabs > a.on:not(.btn) { color: var(--brand); border-color: var(--brand); }
.tabs > a:hover { text-decoration: none; color: var(--text); }
.tabs .count { background: #f43f5e; color: #fff; border-radius: 999px; font-size: 10.5px; padding: 1px 6px; margin-left: 5px; }
.tabs a.btn { padding: 5px 11px; }

/* ---------- charts ---------- */
.chart-legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12.5px; color: var(--text-2); margin-bottom: 10px; }
.chart-legend span { display: inline-flex; align-items: center; gap: 6px; }
.chart-legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart .axis text { fill: var(--muted); font-size: 11px; }
.chart .grid line { stroke: var(--line); stroke-dasharray: 3 4; }
.chart rect.seg { transition: opacity .15s; }
.chart .col:hover rect.seg { opacity: .82; }
.viz-tip { position: fixed; pointer-events: none; background: #0f1222; color: #fff; padding: 9px 11px; border-radius: 10px; font-size: 12px; line-height: 1.55; z-index: 50; box-shadow: 0 10px 30px rgba(0,0,0,.25); display: none; min-width: 150px; border: 1px solid rgba(255,255,255,.08); }
.viz-tip b { display: block; margin-bottom: 3px; }
.viz-tip i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 6px; }
.viz-tip .row { display: flex; justify-content: space-between; gap: 14px; }
.bar-list .item { display: grid; grid-template-columns: minmax(90px, 150px) 1fr 48px; gap: 12px; align-items: center; padding: 7px 0; font-size: 13px; }
.bar-list .track { background: var(--surface-3); border-radius: 6px; height: 10px; overflow: hidden; }
.bar-list .fill { height: 100%; background: var(--series-1); border-radius: 0 6px 6px 0; }
.bar-list .v { text-align: right; font-variant-numeric: tabular-nums; color: var(--text-2); font-weight: 600; }
.feed { max-height: 430px; overflow-y: auto; }
.feed .row { display: flex; gap: 11px; align-items: center; padding: 10px 18px; border-bottom: 1px solid var(--line); }
.feed .row:last-child { border-bottom: 0; }
.feed .row .t { margin-left: auto; text-align: right; font-variant-numeric: tabular-nums; }
.feed .row.new { animation: flashrow 2.2s ease; }
@keyframes flashrow { from { background: var(--brand-50); } to { background: transparent; } }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: #10b981; display: inline-block; box-shadow: 0 0 0 0 rgba(16,185,129,.6); animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(16,185,129,.55); } 70% { box-shadow: 0 0 0 8px rgba(16,185,129,0); } 100% { box-shadow: 0 0 0 0 rgba(16,185,129,0); } }

/* ---------- calendar grid ---------- */
.cal { border-collapse: separate; border-spacing: 0; font-size: 12px; }
.cal th, .cal td { border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); padding: 0; text-align: center; }
.cal th { background: var(--surface-2); padding: 7px 4px; font-weight: 600; color: var(--text-2); min-width: 40px; position: sticky; top: 0; }
.cal th.we { color: var(--bad); }
.cal td.name, .cal th.name { text-align: left; padding: 7px 12px; position: sticky; left: 0; background: var(--surface); z-index: 2; min-width: 200px; white-space: nowrap; }
.cal th.name { z-index: 3; background: var(--surface-2); }
.cal td.hol { background: var(--bad-bg); }
.cal .cell { display: block; width: 100%; min-height: 34px; padding: 8px 2px; border: 0; background: transparent; cursor: pointer; font: inherit; font-size: 11px; font-weight: 700; color: var(--muted); }
.cal .cell:hover { outline: 2px solid var(--brand); outline-offset: -2px; }
.cal .cell.temp { box-shadow: inset 0 -3px 0 #f59e0b; }
.code { display: inline-block; min-width: 26px; padding: 3px 5px; border-radius: 6px; font-weight: 700; font-size: 11px; text-align: center; }
.code.off { background: var(--chip); color: var(--muted); }
i.off { background: var(--chip); border: 1px solid var(--line-2); }
i.hol { background: var(--bad-bg); border: 1px solid color-mix(in srgb, var(--bad) 30%, transparent); }

/* ---------- modal ---------- */
.modal-bg { position: fixed; inset: 0; background: rgba(10,12,25,.5); backdrop-filter: blur(4px); display: none; align-items: flex-start; justify-content: center; padding: 60px 16px; z-index: 60; overflow-y: auto; }
.modal-bg.open { display: flex; animation: fade .15s ease; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.modal { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; width: 100%; max-width: 640px; box-shadow: var(--shadow-lg); animation: pop .18s ease; }
@keyframes pop { from { transform: translateY(8px) scale(.98); opacity: 0; } to { transform: none; opacity: 1; } }
.modal .mh { display: flex; align-items: center; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.modal .mh h2 { margin: 0; }
.modal .mh button { margin-left: auto; background: var(--surface-3); border: 0; width: 32px; height: 32px; border-radius: 9px; font-size: 20px; cursor: pointer; color: var(--text-2); line-height: 1; }
.modal .mb { padding: 22px; }
hr.sep { border: 0; border-top: 1px solid var(--line); margin: 20px 0; }

/* ---------- auth pages ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; background: var(--surface); }
.auth .art { position: relative; overflow: hidden; background: #0b0a1f; color: #fff; padding: 44px 52px; display: flex; flex-direction: column; justify-content: space-between; }
.auth .art::before { content: ""; position: absolute; inset: -20%; background:
    radial-gradient(40% 40% at 20% 20%, rgba(99,102,241,.75), transparent 70%),
    radial-gradient(35% 35% at 80% 30%, rgba(168,85,247,.6), transparent 70%),
    radial-gradient(45% 45% at 60% 90%, rgba(56,189,248,.35), transparent 70%);
  filter: blur(30px); animation: drift 18s ease-in-out infinite alternate; }
.auth .art::after { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px); background-size: 44px 44px; mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%); }
@keyframes drift { from { transform: translate(0, 0) rotate(0deg); } to { transform: translate(3%, -2%) rotate(8deg); } }
.auth .art > * { position: relative; z-index: 1; }
.auth .art h1 { font-size: 40px; line-height: 1.1; max-width: 480px; letter-spacing: -1.2px; font-weight: 800; }
.auth .art p { color: #cfd3f5; max-width: 440px; line-height: 1.65; font-size: 15px; }
.auth .art .features { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; max-width: 480px; margin-top: 26px; }
.auth .art .features div { display: flex; align-items: center; gap: 9px; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.12); border-radius: 12px; padding: 10px 12px; font-size: 13px; color: #e8eaff; backdrop-filter: blur(6px); }
.auth .art .slogan { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px; border-radius: 999px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.16); font-size: 12.5px; color: #e0e2ff; margin-bottom: 18px; }
.auth .art .brandmark .name { font-size: 22px; }
.auth .art .brandmark .tagline { color: #b9bde6; font-size: 12px; }
.auth .panel { display: grid; place-items: center; padding: 36px 20px; background: var(--surface); }
.auth form { width: 100%; max-width: 380px; }
.auth form .field { margin-bottom: 15px; }
.auth form h1 { font-size: 27px; }
.auth .btn { width: 100%; justify-content: center; padding: 12px; font-size: 14.5px; }
.auth .mobile-brand { display: none; margin-bottom: 26px; }
.auth .mobile-brand .name { color: var(--text); }

/* ---------- kiosk ---------- */
.kiosk { background: #0b0a1f; min-height: 100vh; color: #fff; position: relative; overflow: hidden; }
.kiosk::before { content: ""; position: fixed; inset: -20%; background: radial-gradient(40% 40% at 25% 15%, rgba(99,102,241,.6), transparent 70%), radial-gradient(35% 35% at 85% 40%, rgba(168,85,247,.45), transparent 70%); filter: blur(40px); }
.kiosk .box { max-width: 460px; margin: 0 auto; padding: 34px 16px; position: relative; }
.kiosk .brand { display: flex; justify-content: center; }
.kiosk .brand .name { color: #fff; }
.kiosk .company-name { text-align: center; color: #b9bde6; font-size: 13px; margin-top: 8px; }
.kiosk .clock { text-align: center; font-size: 68px; font-weight: 800; font-variant-numeric: tabular-nums; margin-top: 14px; letter-spacing: -2px; }
.kiosk .date { text-align: center; color: #c5c9ee; margin-bottom: 26px; }
.kiosk .panel { background: rgba(255,255,255,.96); color: #0f1222; border-radius: 20px; padding: 24px; box-shadow: 0 30px 70px -20px rgba(0,0,0,.6); }
.kiosk .panel input { font-size: 20px; padding: 14px; text-align: center; margin-bottom: 12px; background: #fff; color: #0f1222; border-color: #d9dce6; }
.kiosk .btns { display: flex; gap: 10px; }
.kiosk .btns button { flex: 1; font: inherit; font-size: 18px; font-weight: 700; padding: 16px; border: 0; border-radius: 14px; color: #fff; cursor: pointer; }
.kiosk .in { background: linear-gradient(135deg, #10b981, #0b8a3e); } .kiosk .out { background: linear-gradient(135deg, #fb7185, #e11d48); }
.kiosk .gps { text-align: center; font-size: 12.5px; color: #848aa0; margin-top: 12px; }
.kiosk .foot { text-align: center; margin-top: 20px; }
.kiosk .foot a { color: #c5c9ee; font-size: 13px; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) { .g-main, .g-3 { grid-template-columns: 1fr; } }
@media (max-width: 900px) {
  .sidebar { position: fixed; left: -270px; z-index: 40; transition: left .22s ease; }
  .sidebar.open { left: 0; box-shadow: 0 0 60px rgba(0,0,0,.5); }
  .topbar .menu-btn { display: block; }
  .topbar .clock, .user-chip .who { display: none; }
  .user-chip { padding: 3px; }
  .g-2 { grid-template-columns: 1fr; }
  .content { padding: 18px 16px; }
  .topbar { padding: 0 16px; }
  .auth { grid-template-columns: 1fr; }
  .auth .art { display: none; }
  .auth .mobile-brand { display: flex; }
  .form-grid .wide { grid-column: auto; }
}
@media print { .sidebar, .topbar, .page-head .actions, .filters { display: none !important; } .card { box-shadow: none; } }

/* ---------- company logo ---------- */
.co-logo { display: inline-grid; place-items: center; background: #fff; border-radius: 9px; padding: 3px 7px; height: 32px; box-shadow: 0 0 0 1px var(--line); }
.co-logo img { max-height: 26px; max-width: 120px; object-fit: contain; display: block; }
.co-logo.lg { height: auto; padding: 10px 16px; border-radius: 14px; }
.co-logo.lg img { max-height: 60px; max-width: 240px; }
.topbar .company .co-logo { margin-right: 2px; }

/* ---------- collapsible side menu (icon rail) ---------- */
.topbar .menu-btn { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--text-2); }
.topbar .menu-btn:hover { color: var(--brand); border-color: var(--brand-100); }
.sidebar { transition: width .2s ease; }
.nav-scrim { display: none; }
@media (min-width: 901px) {
  html[data-nav="rail"] .sidebar { width: 88px; }
  html[data-nav="rail"] .sidebar .logo { padding: 18px 0 10px; display: flex; justify-content: center; }
  html[data-nav="rail"] .sidebar .brandmark > div, html[data-nav="rail"] .sidebar .foot, html[data-nav="rail"] .nav-group .label { display: none; }
  html[data-nav="rail"] .nav-group { padding: 2px 8px; }
  html[data-nav="rail"] .nav-group + .nav-group { border-top: 1px solid var(--side-line); margin-top: 6px; padding-top: 8px; }
  html[data-nav="rail"] .nav-group a { flex-direction: column; gap: 5px; padding: 10px 2px 8px; text-align: center; font-size: 10.5px; line-height: 1.15; }
  html[data-nav="rail"] .nav-group a .icon { width: 21px; height: 21px; }
  html[data-nav="rail"] .nav-group a .lbl { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
  html[data-nav="rail"] .nav-group a .count { position: absolute; top: 4px; right: 12px; margin: 0; padding: 0 5px; font-size: 9.5px; }
}
@media (max-width: 900px) {
  .sidebar.open + .nav-scrim { display: block; position: fixed; inset: 0; background: rgba(10,12,25,.45); z-index: 35; }
}

/* ---------- notification bell ---------- */
.notif { position: relative; }
.notif .icon-btn { position: relative; }
.ndot { position: absolute; top: -5px; right: -5px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: #f43f5e; color: #fff; font-size: 10.5px; font-weight: 700; display: grid; place-items: center; box-shadow: 0 0 0 2px var(--surface); }
.notif-panel { position: absolute; right: 0; top: 46px; width: 360px; max-width: calc(100vw - 24px); background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-lg); z-index: 50; overflow: hidden; animation: pop .15s ease; }
.notif-panel .nh { display: flex; align-items: center; padding: 13px 16px; border-bottom: 1px solid var(--line); }
.notif-panel .nh .btn { margin-left: auto; }
.notif-panel .nl { max-height: 420px; overflow-y: auto; }
.notif-panel .ne { padding: 30px 16px; text-align: center; color: var(--muted); }
.notif-panel .ni { display: flex; gap: 11px; padding: 12px 16px; border-bottom: 1px solid var(--line); color: var(--text); text-decoration: none; position: relative; }
.notif-panel .ni:last-child { border-bottom: 0; }
.notif-panel .ni:hover { background: var(--surface-2); text-decoration: none; }
.notif-panel .ni.unread { background: color-mix(in srgb, var(--brand) 5%, var(--surface)); }
.notif-panel .ni.unread::after { content: ""; position: absolute; right: 14px; top: 18px; width: 8px; height: 8px; border-radius: 50%; background: var(--brand); }
.notif-panel .nic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none; font-size: 15px; }
.notif-panel .nic .icon { width: 17px; height: 17px; }
.notif-panel .nt { display: flex; flex-direction: column; gap: 2px; min-width: 0; padding-right: 14px; }
.notif-panel .nt b { font-size: 13px; }
.notif-panel .nt span { font-size: 12.5px; color: var(--text-2); }
.notif-panel .nt small { font-size: 11px; color: var(--muted); }

/* ---------- Help Center ---------- */
.help-hero { border-radius: 20px; padding: 34px 32px; margin-bottom: 20px; background: var(--grad); color: #fff; position: relative; overflow: hidden; box-shadow: 0 20px 40px -24px rgba(91,79,245,.9); }
.help-hero::after { content: ""; position: absolute; right: -60px; top: -60px; width: 260px; height: 260px; border-radius: 50%; background: rgba(255,255,255,.1); }
.help-hero > div { position: relative; z-index: 1; max-width: 720px; }
.help-hero .badge { background: rgba(255,255,255,.18); color: #fff; }
.help-hero h1 { font-size: 30px; margin: 12px 0 6px; letter-spacing: -.8px; }
.help-hero p { margin: 0 0 18px; color: rgba(255,255,255,.88); }
.help-search { display: flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--line-2); border-radius: 12px; padding: 0 12px; color: var(--muted); }
.help-search input { border: 0; box-shadow: none !important; padding: 10px 0; background: transparent; }
.help-search.big { padding: 4px 14px; box-shadow: 0 10px 30px -12px rgba(0,0,0,.35); border: 0; }
.help-search.big input { font-size: 15px; color: var(--text); }
.help-quick { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 20px; }
.help-quick .card, .help-card { display: flex; gap: 13px; align-items: flex-start; margin: 0; color: var(--text); text-decoration: none !important; }
.help-quick .ic, .help-card .ic, .help-title .ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; flex: none; }
.help-quick b, .help-card b { display: block; }
.help-quick span, .help-card span:not(.ic) { display: block; color: var(--muted); font-size: 13px; margin-top: 3px; }
.help-card small { color: var(--brand); font-size: 11px; font-weight: 650; text-transform: uppercase; letter-spacing: .6px; }
.help-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.help-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 22px; align-items: start; }
.help-nav { position: sticky; top: 84px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; max-height: calc(100vh - 104px); overflow-y: auto; box-shadow: var(--shadow); }
.help-nav .help-search { margin-bottom: 8px; }
.hn-group { font-size: 10.5px; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); font-weight: 650; padding: 12px 8px 4px; }
.help-nav a { display: flex; gap: 9px; align-items: center; padding: 7px 9px; border-radius: 9px; color: var(--text-2); font-size: 13.5px; }
.help-nav a:hover { background: var(--surface-2); text-decoration: none; color: var(--text); }
.help-nav a.on { background: var(--brand-50); color: var(--brand); font-weight: 600; }
.help-nav a .icon { width: 16px; height: 16px; }
.hn-none { color: var(--muted); font-size: 12.5px; padding: 10px 8px; }
.help-body { padding: 30px 36px; line-height: 1.65; font-size: 14.5px; }
.help-crumb { font-size: 12.5px; color: var(--muted); margin-bottom: 14px; }
.help-title { display: flex; gap: 14px; align-items: center; padding-bottom: 18px; border-bottom: 1px solid var(--line); margin-bottom: 8px; flex-wrap: wrap; }
.help-title h1 { font-size: 26px; }
.help-title p { margin: 2px 0 0; }
.help-body h2 { font-size: 18px; margin: 28px 0 10px; letter-spacing: -.3px; display: flex; gap: 8px; align-items: center; }
.help-body p, .help-body ul { margin: 8px 0 12px; }
.help-body ul { padding-left: 22px; }
.help-body li { margin: 4px 0; }
ol.steps { list-style: none; counter-reset: st; padding: 0; margin: 10px 0 16px; }
ol.steps > li { counter-increment: st; position: relative; padding: 2px 0 12px 44px; }
ol.steps > li::before { content: counter(st); position: absolute; left: 0; top: 0; width: 28px; height: 28px; border-radius: 50%; background: var(--brand-50); color: var(--brand); font-weight: 700; font-size: 13px; display: grid; place-items: center; }
ol.steps > li:not(:last-child)::after { content: ""; position: absolute; left: 13.5px; top: 32px; bottom: 2px; width: 1px; background: var(--line-2); }
.help-go { margin: 2px 4px 2px 0; vertical-align: middle; }
.help-tip { background: var(--info-bg); border: 1px solid color-mix(in srgb, var(--info) 22%, transparent); border-radius: 12px; padding: 12px 15px; margin: 14px 0; font-size: 14px; }
.help-tip.warn { background: var(--warn-bg); border-color: color-mix(in srgb, var(--warn) 25%, transparent); }
.help-tip b { margin-right: 4px; }
.help-path b { background: var(--chip); padding: 1px 8px; border-radius: 6px; font-weight: 600; font-size: 13px; white-space: nowrap; }
table.help-table { width: 100%; border-collapse: collapse; margin: 10px 0 16px; font-size: 14px; }
.help-table td { border-bottom: 1px solid var(--line); padding: 10px 12px; vertical-align: top; }
.help-table td:first-child { width: 30%; min-width: 160px; }
.help-table tr:last-child td { border-bottom: 0; }
.help-flow { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 10px 0 18px; }
.help-flow div { background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 10px 16px; }
.help-flow div b { display: block; color: var(--brand); }
.help-flow div span { font-size: 12.5px; color: var(--muted); }
.help-flow i { font-style: normal; font-size: 20px; color: var(--muted); }
.help-faq details { border: 1px solid var(--line); border-radius: 12px; padding: 0 16px; margin-bottom: 10px; background: var(--surface); }
.help-faq summary { cursor: pointer; padding: 14px 0; font-weight: 600; }
.help-faq details[open] summary { color: var(--brand); }
.help-faq details p { margin-top: 0; }
.help-pager { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 30px; }
.help-pager .card { margin: 0; color: var(--text); text-decoration: none; }
.help-pager small { display: block; color: var(--muted); }
kbd { background: var(--chip); border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 5px; padding: 0 5px; font-size: 12px; }
@media (max-width: 1000px) { .help-layout { grid-template-columns: 1fr; } .help-nav { position: static; max-height: none; } .help-quick { grid-template-columns: 1fr; } .help-body { padding: 22px 18px; } }
@media print {
  .help-nav, .help-pager, .help-go, .help-title .btn { display: none !important; }
  .help-layout { display: block; }
  .help-body { border: 0; box-shadow: none; padding: 0; }
}

/* elements with the hidden attribute must stay hidden even when a class sets display */
[hidden] { display: none !important; }
