/* CYBEX HR Management System — professional desktop-style UI. Brand: navy #001E57, blue #0270FC, gold #C99C37 */
@view-transition { navigation: auto; }
:root {
  --bg: #eef1f6; --panel: #ffffff; --panel-2: #f7f9fc; --ink: #101a2e; --muted: #5d6a82; --line: #e2e7f0; --line-2: #cfd7e4;
  --accent: #0a5fd8; --accent-2: #0270fc; --accent-ink: #ffffff; --accent-soft: #e8f1ff;
  --navy: #001e57; --navy-2: #00123a; --blue: #0270fc; --gold: #c99c37; --gold-soft: #f6ecd6;
  --ok: #138a52; --ok-soft: #e3f5ea; --warn: #a8640a; --warn-soft: #fbf0dc; --bad: #b3261e; --bad-soft: #f9e3e1;
  --side: #00184a; --side-2: #001038; --side-ink: #b9c8e6; --side-hover: rgba(255,255,255,.07); --radius: 12px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 2px 8px rgba(16, 24, 40, .05);
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;
  --brand-font: "Montserrat", "Segoe UI", system-ui, sans-serif;
  --s-P: #d8efe0; --s-L: #fdf0c9; --s-EL: #fde2c4; --s-LE: #fbd2a6; --s-HD: #f9e1d3; --s-M: #f6d0c0;
  --s-A: #f9dcd9; --s-LV: #dbe9f7; --s-H: #e8e2f2; --s-W: #eceef2; --s-OD: #d3efe9;
  font-family: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", sans-serif; color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #080e1b; --panel: #101827; --panel-2: #0d1422; --ink: #e6ebf4; --muted: #8c99b3; --line: #1f2b42; --line-2: #2c3b58;
    --accent: #4c9bff; --accent-2: #4c9bff; --accent-ink: #04122b; --accent-soft: #11254a; --gold-soft: #3a2f16;
    --ok: #46c487; --ok-soft: #12301f; --warn: #e0a24a; --warn-soft: #33270f; --bad: #ef7a70; --bad-soft: #3a1714;
    --side: #050c20; --side-2: #030816; --side-ink: #aab9d8; --shadow: 0 1px 2px rgba(0,0,0,.3), 0 2px 8px rgba(0,0,0,.25);
    --s-P: #173326; --s-L: #3a3112; --s-EL: #3d2a12; --s-LE: #44290c; --s-HD: #3b2519; --s-M: #43231a;
    --s-A: #3a1714; --s-LV: #15283b; --s-H: #2a2236; --s-W: #1d2534; --s-OD: #12332d;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font-size: 14px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 21px; margin: 0 0 2px; font-weight: 650; letter-spacing: -.015em; }
h2 { font-size: 15px; margin: 0 0 12px; font-weight: 650; letter-spacing: -.005em; }
h3 { font-size: 14px; margin: 0 0 8px; font-weight: 650; }
.muted { color: var(--muted); } .small { font-size: 12.5px; } .center { text-align: center; } .mono { font-family: var(--mono); }
.right { text-align: right; } .nowrap { white-space: nowrap; } .hide { display: none !important; }
.ico { width: 18px; height: 18px; flex: none; }

/* ---------- app shell (sidebar + title bar + work area + status bar) */
.app { display: grid; grid-template-columns: 252px minmax(0, 1fr); min-height: 100vh; }
.side { background: linear-gradient(180deg, var(--side) 0%, var(--side-2) 100%); color: var(--side-ink); padding: 14px 12px 12px;
        display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto; z-index: 30; }
.side .brand { display: flex; gap: 11px; align-items: center; padding: 6px 8px 16px; margin-bottom: 6px; border-bottom: 1px solid rgba(255,255,255,.08); }
.side .brand img, .side .mono-logo { width: 42px; height: 42px; border-radius: 10px; object-fit: contain; background: #fff; padding: 3px; flex: none; }
.side .mono-logo { display: grid; place-items: center; background: linear-gradient(135deg, var(--blue), var(--navy)); color: #fff; font-weight: 700; font-size: 18px; padding: 0; }
.side .brand b { display: block; color: #fff; font-size: 13.5px; line-height: 1.25; font-weight: 650; }
.side .brand small { display: block; color: var(--gold); font-size: 10.5px; letter-spacing: .09em; text-transform: uppercase; margin-top: 2px; font-weight: 600; }
.side nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.side nav a { display: flex; align-items: center; gap: 11px; color: var(--side-ink); padding: 9px 11px; border-radius: 9px; font-size: 13.5px; font-weight: 500; position: relative; }
.side nav a .ico { opacity: .8; }
.side nav a:hover { background: var(--side-hover); text-decoration: none; color: #fff; }
.side nav a.on { background: linear-gradient(90deg, rgba(2,112,252,.38), rgba(2,112,252,.14)); color: #fff; }
.side nav a.on .ico { opacity: 1; color: #6db2ff; }
.side nav a.on::before { content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--gold); }
.side nav .label { font-size: 10.5px; text-transform: uppercase; letter-spacing: .12em; color: rgba(185,200,230,.45); padding: 14px 11px 4px; font-weight: 650; }
.side .foot { display: flex; align-items: center; gap: 6px; margin-top: 10px; padding: 10px 6px 0; border-top: 1px solid rgba(255,255,255,.08); }
.side .foot form { margin: 0; }
.side .me { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; color: var(--side-ink); padding: 4px; border-radius: 9px; }
.side .me:hover { background: var(--side-hover); text-decoration: none; }
.side .av { width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(135deg, var(--blue), #6a5cff); color: #fff; display: grid; place-items: center; font-weight: 700; flex: none; }
.side .who { min-width: 0; } .side .who b { display: block; color: #fff; font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side .who small { display: block; font-size: 11px; opacity: .65; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side .out { background: none; border: 0; color: var(--side-ink); padding: 8px; border-radius: 8px; cursor: pointer; display: grid; place-items: center; }
.side .out:hover { background: var(--side-hover); color: #fff; }
.shell { display: flex; flex-direction: column; min-width: 0; min-height: 100vh; }
.appbar { display: flex; align-items: center; gap: 12px; height: 52px; padding: 0 28px; background: var(--panel); border-bottom: 1px solid var(--line);
          position: sticky; top: 0; z-index: 20; }
.crumb { font-size: 13px; color: var(--muted); display: flex; gap: 8px; align-items: center; min-width: 0; }
.crumb b { color: var(--ink); font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .crumb i { font-style: normal; opacity: .5; }
.crumb .co { letter-spacing: .06em; font-weight: 700; font-size: 11.5px; color: var(--accent); }
.bar-right { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.clock { font-variant-numeric: tabular-nums; font-size: 12.5px; color: var(--muted); padding: 5px 11px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 999px; }
.pill-mark { display: inline-flex; align-items: center; gap: 6px; font-family: var(--brand-font); font-weight: 700; font-size: 12px; letter-spacing: .05em; color: var(--navy); }
@media (prefers-color-scheme: dark) { .pill-mark { color: #cfe0ff; } }
.iconbtn { background: none; border: 0; cursor: pointer; color: var(--ink); padding: 6px; border-radius: 8px; } .iconbtn.menu { display: none; }
.main { padding: 24px 28px 28px; min-width: 0; flex: 1; }
.head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.head p { margin: 0; color: var(--muted); }
.head .actions { flex-wrap: nowrap; } .head .actions input[type=date] { width: auto; }
.statusbar { display: flex; align-items: center; gap: 14px; padding: 7px 28px; font-size: 11.5px; color: var(--muted); background: var(--panel); border-top: 1px solid var(--line); }
.statusbar .sp { flex: 1; } .statusbar a { color: var(--accent); } .statusbar b { color: var(--ink); font-weight: 600; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--line-2); margin-right: 4px; vertical-align: 0; }
.dot.ok { background: #1fa763; box-shadow: 0 0 0 3px rgba(31,167,99,.18); } .dot.warn { background: #e0a24a; } .dot.bad { background: #d6453b; }

/* ---------- cards & grids */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.card + .card { margin-top: 16px; } .grid > .card + .card, .grid > .card { margin-top: 0; }
.card > h2:first-child { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } .g5 { grid-template-columns: repeat(5, minmax(0, 1fr)); } .g6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.stat b { display: block; font-size: 26px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.02em; line-height: 1.15; }
.stat span { color: var(--muted); font-size: 12.5px; }
.stat.ok b { color: var(--accent); } .stat.bad b { color: var(--bad); } .stat.warn b { color: var(--warn); }
.kpi { display: flex; gap: 12px; align-items: center; padding: 14px 16px; }
.kpi .ic { width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; flex: none; background: var(--accent-soft); color: var(--accent); }
.kpi .ic .ico { width: 21px; height: 21px; }
.kpi.t-ok .ic { background: var(--ok-soft); color: var(--ok); } .kpi.t-warn .ic { background: var(--warn-soft); color: var(--warn); }
.kpi.t-bad .ic { background: var(--bad-soft); color: var(--bad); } .kpi.t-gold .ic { background: var(--gold-soft); color: #9a7414; }
.kpi.t-ok b { color: var(--ink); } .kpi b { font-size: 24px; } .kpi.t-bad b { color: var(--bad); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 0; }
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--panel); font-size: 12.5px; color: var(--muted); box-shadow: var(--shadow); }
.chip b { color: var(--ink); font-variant-numeric: tabular-nums; }
.steps { display: flex; gap: 10px; flex-wrap: wrap; }
.steps a { flex: 1 1 200px; border: 1px dashed var(--line-2); border-radius: 10px; padding: 10px 12px; color: var(--ink); background: var(--panel-2); }
.steps a.done { opacity: .5; text-decoration: line-through; }
.steps a b { color: var(--accent); }
/* donut + bars */
.donut-wrap { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.donut { width: 168px; height: 168px; flex: none; }
.donut circle { fill: none; stroke-width: 4.2; } .donut .track { stroke: var(--line); }
.donut text { fill: var(--ink); font-weight: 700; } .donut .sub { fill: var(--muted); font-weight: 500; }
.legend { display: grid; gap: 7px; flex: 1; min-width: 150px; font-size: 13px; }
.legend div { display: flex; align-items: center; gap: 8px; } .legend i { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.legend b { margin-left: auto; font-variant-numeric: tabular-nums; }
.bars { display: grid; gap: 13px; }
.bar-row .top { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 4px; gap: 8px; }
.bar-row .top span { color: var(--muted); font-size: 12px; white-space: nowrap; }
.bar { height: 8px; border-radius: 99px; background: var(--line); overflow: hidden; display: flex; }
.bar i { display: block; height: 100%; } .bar .p { background: #1fa763; } .bar .l { background: #e0a24a; } .bar .a { background: #d6453b; } .bar .v { background: #4c9bff; }
.dev-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.dev-row:last-child { border-bottom: 0; } .dev-row .n { flex: 1; min-width: 0; } .dev-row .n small { display: block; color: var(--muted); font-size: 11.5px; }
.avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: inline-grid; place-items: center; font-size: 12px; font-weight: 700; margin-right: 8px; vertical-align: middle; }

/* ---------- forms */
label { display: block; font-size: 12.5px; font-weight: 600; margin: 10px 0 4px; color: var(--ink); }
input:not([type]), input[type=text], input[type=search], input[type=email], input[type=password], input[type=tel], input[type=date], input[type=time],
input[type=month], input[type=number], input[type=datetime-local], input[type=file], select, textarea {
  width: 100%; padding: 8px 11px; min-height: 36px; border: 1px solid var(--line-2); border-radius: 9px; background: var(--panel);
  color: var(--ink); font: inherit; font-size: 13.5px; transition: border-color .12s, box-shadow .12s; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.check { display: flex; align-items: center; gap: 8px; font-weight: 500; margin: 8px 0; }
.check input { width: 16px; height: 16px; accent-color: var(--accent); min-height: 0; }
.row { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.row > * { flex: 1 1 160px; }
.row > .shrink { flex: 0 0 auto; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; padding: 10px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.filters > * { flex: 0 0 auto; }
.filters input, .filters select { width: auto; min-width: 150px; }
.filters .btn { min-width: 0; }
.hint { font-size: 12.5px; color: var(--muted); margin: 4px 0 0; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 7px 14px; min-height: 36px; border-radius: 9px;
       border: 1px solid var(--line-2); background: var(--panel); color: var(--ink); font: inherit; font-size: 13.5px;
       font-weight: 600; cursor: pointer; white-space: nowrap; transition: background .12s, border-color .12s, box-shadow .12s; box-shadow: 0 1px 1px rgba(16,24,40,.04); }
.btn:hover { text-decoration: none; border-color: var(--muted); background: var(--panel-2); }
.btn.primary { background: linear-gradient(180deg, var(--accent-2), var(--accent)); border-color: var(--accent); color: var(--accent-ink); box-shadow: 0 1px 2px rgba(10,95,216,.35); }
.btn.primary:hover { filter: brightness(1.07); }
.btn.danger { color: var(--bad); }
.btn.sm { padding: 3px 10px; min-height: 28px; font-size: 12.5px; border-radius: 7px; }
.btn.wide { width: 100%; padding: 11px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
form.inline { display: inline; }

/* ---------- tables */
.tbl-wrap { overflow: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); box-shadow: var(--shadow); }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 9px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
th { background: var(--panel-2); font-weight: 650; font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); position: sticky; top: 0; z-index: 1; white-space: nowrap; border-bottom: 1px solid var(--line-2); }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: color-mix(in srgb, var(--panel) 94%, var(--accent)); }
.rep td { white-space: nowrap; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
tr.total td { font-weight: 700; background: var(--accent-soft); }
.reg td, .reg th { padding: 4px 5px; text-align: center; font-size: 12px; }
.reg td:nth-child(-n+3), .reg th:nth-child(-n+3) { text-align: left; }
.pill { display: inline-block; padding: 2px 9px; border-radius: 99px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.st-P, .st-Present { background: var(--s-P); } .st-L, .st-Late { background: var(--s-L); }
.st-EL, .st-Early-Leave { background: var(--s-EL); } .st-LE, .st-Late-Early { background: var(--s-LE); }
.st-HD, .st-Half-Day { background: var(--s-HD); } .st-M, .st-Missing-Punch { background: var(--s-M); }
.st-A, .st-Absent { background: var(--s-A); } .st-LV, .st-Leave { background: var(--s-LV); }
.st-H, .st-Holiday { background: var(--s-H); } .st-W, .st-Weekly-Off { background: var(--s-W); }
.st-OD, .st-Off-day-Duty { background: var(--s-OD); }
.badge { display: inline-block; padding: 1px 8px; border-radius: 99px; font-size: 11.5px; font-weight: 600; background: var(--accent-soft); color: var(--accent); }
.badge.gray { background: var(--line); color: var(--muted); } .badge.bad { background: var(--bad-soft); color: var(--bad); }
.badge.warn { background: var(--warn-soft); color: var(--warn); } .badge.ok { background: var(--ok-soft); color: var(--ok); }

/* ---------- notes & flashes */
.note { padding: 10px 14px; border-radius: 10px; margin: 0 0 12px; background: var(--accent-soft); color: var(--ink); border: 1px solid color-mix(in srgb, var(--accent) 18%, transparent); }
.note.bad { background: var(--bad-soft); border-color: color-mix(in srgb, var(--bad) 25%, transparent); }
.note.warn { background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 25%, transparent); }
.note.ok { background: var(--ok-soft); border-color: color-mix(in srgb, var(--ok) 25%, transparent); }
.flashes { margin-bottom: 14px; }
.code { font-family: var(--mono); background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px;
        word-break: break-all; display: block; }
ol.howto { margin: 6px 0 0; padding-left: 20px; } ol.howto li { margin: 3px 0; }

/* ---------- dialog / drawer */
dialog { border: 1px solid var(--line); border-radius: 12px; padding: 0; background: var(--panel); color: var(--ink);
         width: min(520px, 94vw); box-shadow: 0 20px 60px rgba(0,0,0,.25); }
dialog::backdrop { background: rgba(10, 16, 13, .45); }
dialog .dh { padding: 14px 18px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; }
dialog .db { padding: 6px 18px 16px; }
dialog .df { padding: 12px 18px; border-top: 1px solid var(--line); display: flex; gap: 8px; justify-content: flex-end; }
.x { background: none; border: 0; font-size: 20px; cursor: pointer; color: var(--muted); }

/* ---------- auth: split screen (form left, product brand right) */
.auth-page { min-height: 100vh; display: grid; grid-template-columns: minmax(380px, 46%) 1fr; grid-template-rows: 1fr auto; }
.auth-left { display: flex; flex-direction: column; padding: 26px 40px 20px; background: var(--bg); }
.auth-left header { display: flex; justify-content: space-between; align-items: center; }
.cybex-corner { height: 78px; width: auto; display: block; }
.cybex-corner.on-dark { display: none; }
@media (prefers-color-scheme: dark) { .cybex-corner.on-light { display: none; } .cybex-corner.on-dark { display: block; } }
@media (max-width: 900px) { .cybex-corner { height: 56px; } }
.auth-left .top-link { font-size: 13px; color: var(--muted); }
.auth-form { flex: 1; display: grid; place-items: center; padding: 28px 0; }
.card.auth { width: min(430px, 100%); padding: 28px 28px 24px; box-shadow: 0 10px 30px rgba(0, 30, 87, .08); border-top: 3px solid var(--gold); }
.auth h2.welcome { font-family: var(--brand-font); font-size: 21px; margin: 0 0 4px; color: var(--ink); }
.auth p.lead { color: var(--muted); margin: 0 0 16px; font-size: 13.5px; }
.auth-brand { position: relative; overflow: hidden; display: grid; place-items: center; padding: 40px;
  background: radial-gradient(circle at 78% 18%, rgba(2, 112, 252, .35), transparent 42%),
              radial-gradient(circle at 15% 88%, rgba(201, 156, 55, .18), transparent 40%),
              linear-gradient(150deg, #002a78 0%, var(--navy) 45%, var(--navy-2) 100%); color: #fff; }
.auth-brand::before { content: ""; position: absolute; inset: 0; opacity: .08;
  background-image: linear-gradient(#fff 1px, transparent 1px), linear-gradient(90deg, #fff 1px, transparent 1px);
  background-size: 44px 44px; }
.auth-brand::after { content: ""; position: absolute; width: 520px; height: 10px; background: var(--gold); right: -120px; bottom: 90px;
  transform: rotate(-38deg); opacity: .85; }
.brand-center { position: relative; z-index: 1; text-align: center; max-width: 460px; }
.brand-center .mark { width: 128px; height: 128px; margin: 0 auto 22px; filter: drop-shadow(0 18px 30px rgba(0, 0, 0, .35)); }
.brand-center .mark img { width: 100%; height: 100%; }
.wordmark { font-family: var(--brand-font); line-height: 1; }
.wordmark .w1 { display: block; font-size: 44px; font-weight: 800; letter-spacing: .02em; }
.wordmark .w1 span { color: #4aa3ff; }
.wordmark .w2 { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 12px; font-size: 14px;
  font-weight: 700; letter-spacing: .32em; color: #dbe6fb; }
.wordmark .w2::before, .wordmark .w2::after { content: ""; width: 34px; height: 2px; background: var(--gold); }
.brand-center .tag { margin: 22px auto 26px; color: #c3d2f0; font-size: 15px; line-height: 1.6; }
.brand-center ul { list-style: none; padding: 0; margin: 0 auto; display: grid; gap: 10px; text-align: left; max-width: 340px; }
.brand-center li { display: flex; gap: 10px; align-items: flex-start; color: #e3ebfb; font-size: 14px; }
.brand-center li::before { content: ""; flex: 0 0 8px; height: 8px; margin-top: 7px; border-radius: 2px; background: var(--gold); transform: rotate(45deg); }
.auth-foot { grid-column: 1 / -1; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px 18px;
  padding: 14px 24px; background: var(--navy-2); color: #a9b8d6; font-size: 12.5px; border-top: 3px solid var(--gold); }
.auth-foot b { color: #fff; } .auth-foot a { color: #8fc0ff; }
.auth-foot .sep { width: 4px; height: 4px; background: var(--gold); transform: rotate(45deg); }
.tabs { display: grid; grid-template-columns: 1fr 1fr; background: var(--bg); border-radius: 9px; padding: 3px; margin-bottom: 16px; border: 1px solid var(--line); }
.tabs a { text-align: center; padding: 7px; border-radius: 7px; color: var(--muted); font-weight: 600; }
.tabs a.on { background: var(--panel); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 30, 87, .12); }
.tabs a:hover { text-decoration: none; }
.gbtn { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; padding: 10px; border: 1px solid var(--line);
        border-radius: 8px; color: var(--ink); background: var(--panel); font-weight: 600; }
.gbtn:hover { text-decoration: none; border-color: var(--muted); }
.or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12.5px; margin: 14px 0 4px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.err { color: var(--bad); font-size: 13px; margin: 8px 0 0; }
.trial { background: var(--gold-soft); border-radius: 8px; padding: 8px 12px; font-size: 13px; margin: 0 0 6px; }
.login { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
@media (max-width: 900px) {
  .auth-page { grid-template-columns: 1fr; }
  .auth-brand { order: -1; padding: 26px 20px; }
  .auth-brand::after { display: none; }
  .brand-center .mark { width: 64px; height: 64px; margin-bottom: 12px; }
  .wordmark .w1 { font-size: 28px; } .wordmark .w2 { font-size: 11px; letter-spacing: .24em; }
  .brand-center .tag, .brand-center ul { display: none; }
  .auth-left { padding: 18px 16px; }
  .auth-form { padding: 16px 0; }
  .auth-foot { flex-direction: column; gap: 4px; text-align: center; }
  .auth-foot .sep { display: none; }
}

/* ---------- dashboard live-sync chip */
.sync-chip { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--panel); font-size: 12.5px; color: var(--muted); cursor: pointer; user-select: none; white-space: nowrap; box-shadow: var(--shadow); }
.sync-chip i { width: 8px; height: 8px; border-radius: 50%; background: #1fa763; flex: none; }
.sync-chip.busy i { background: var(--blue); animation: syncpulse 1s ease-in-out infinite; }
.sync-chip.err i { background: #c0392b; }
@keyframes syncpulse { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }

/* ---------- report letterhead (screen + print) */
.rep-head { display: flex; align-items: center; gap: 16px; padding: 14px 18px; margin: 18px 0 12px; background: var(--panel);
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); border-top: 3px solid var(--gold); }
.rep-head img { height: 58px; max-width: 160px; object-fit: contain; flex: none; }
.rep-head .org { flex: 1; min-width: 0; }
.rep-head .org b { display: block; font-size: 19px; color: var(--navy); line-height: 1.2; }
.rep-head .org span { display: block; font-size: 12.5px; color: var(--muted); }
.rep-head .rt { text-align: right; }
.rep-head .rt b { display: block; font-size: 15px; }
.rep-head .rt span { display: block; font-size: 12px; color: var(--muted); }
.print-only { display: none; }
@media screen and (prefers-color-scheme: dark) { .rep-head .org b { color: var(--ink); } .rep-head img { background: #fff; border-radius: 6px; padding: 3px; } }

/* ---------- responsive */
@media (max-width: 1280px) { .g6 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 1100px) { .g5 { grid-template-columns: repeat(3, 1fr); } .g4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .side { position: fixed; inset: 0 auto 0 0; width: 270px; transform: translateX(-100%); transition: transform .2s; z-index: 50; }
  .side.open { transform: none; box-shadow: 0 0 0 100vmax rgba(0,0,0,.4); }
  .iconbtn.menu { display: grid; } .appbar { padding: 0 14px; } .clock, .pill-mark { display: none; }
  .main { padding: 16px 14px 24px; } .statusbar { padding: 7px 14px; flex-wrap: wrap; }
  .g2, .g3, .g4, .g5, .g6 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) { .g2, .g3 { grid-template-columns: 1fr; } }
@media print {
  .side, .appbar, .statusbar, .no-print, .filters, .flashes { display: none !important; }
  .app { display: block; } .main { padding: 0; } .tbl-wrap { border: 0; overflow: visible; box-shadow: none; }
  body { background: #fff; font-size: 11px; }
  .print-only { display: flex; }
  .rep-head { box-shadow: none; border: 0; border-bottom: 2px solid #1f4e79; border-radius: 0; padding: 0 0 8px; margin: 0 0 8px; }
  .rep-head .org b { color: #1f4e79; }
}
@media (max-width: 640px) { .rep-head { flex-wrap: wrap; } .rep-head .rt { text-align: left; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
