/* Neeyat Foundation — admin panel
   Layout: fixed navy sidebar (9 groups) + top bar + content.
   Brand: navy ink, red only for primary actions, marigold = needs attention, leaf = done. */

:root {
  --ink: #0d1f45;          /* sidebar */
  --ink-2: #16295a;
  --ink-line: rgba(255,255,255,.08);
  --page: #f2f4f8;
  --surface: #ffffff;
  --line: #e3e7ef;
  --line-2: #eef1f6;
  --text: #1d2433;
  --muted: #667085;
  --faint: #98a2b3;
  --red: #e31937;
  --red-ink: #b80f29;
  --red-soft: #fdeceF;
  --marigold: #c98a00;
  --marigold-soft: #fff4d6;
  --leaf: #1f8a5b;
  --leaf-soft: #e3f4ec;
  --sky: #2563c9;
  --sky-soft: #e6eefb;
  --plum: #7a3db8;
  --plum-soft: #f1e8fb;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(16,24,40,.05), 0 1px 3px rgba(16,24,40,.06);
  --head: "PT Sans", "Segoe UI", Arial, sans-serif;
  --body: "Lato", "Segoe UI", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--page); color: var(--text); font: 15px/1.55 var(--body); }
a { color: var(--sky); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { font-family: var(--head); color: var(--text); margin: 0 0 .4em; line-height: 1.25; text-wrap: balance; }
h1 { font-size: 26px; } h2 { font-size: 20px; } h3 { font-size: 17px; } h4 { font-size: 15px; }
p { margin: 0 0 .8em; }
img { max-width: 100%; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.num, td.num, .tabular { font-variant-numeric: tabular-nums; }
.right { text-align: right; }
.hp { position: absolute; left: -9999px; }
:focus-visible { outline: 2px solid var(--sky); outline-offset: 2px; }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: 252px minmax(0, 1fr); min-height: 100vh; }
.sidebar {
  background: var(--ink); color: #c9d2e6; position: sticky; top: 0; height: 100vh; overflow-y: auto;
  display: flex; flex-direction: column; scrollbar-width: thin; scrollbar-color: #33467a transparent;
}
.brand { display: flex; align-items: center; gap: 12px; padding: 18px 18px 14px; color: #fff; border-bottom: 1px solid var(--ink-line); }
.brand img { width: 40px; height: 40px; object-fit: contain; background: #fff; border-radius: 10px; padding: 3px; }
.brand b { display: block; font: 700 16px/1.1 var(--head); }
.brand small { color: #8fa0c7; font-size: 12px; }
.brand:hover { text-decoration: none; }
.nav { padding: 8px 10px 30px; flex: 1; }
.nav-group { margin-top: 6px; }
.nav-group > button {
  width: 100%; display: flex; align-items: center; justify-content: space-between; background: none; border: 0; cursor: pointer;
  color: #8fa0c7; font: 700 12.5px/1 var(--head); letter-spacing: .02em; padding: 12px 10px 8px; text-align: left;
}
.nav-group > button svg { transition: transform .2s; }
.nav-group.closed > button svg { transform: rotate(-90deg); }
.nav-group.closed ul { display: none; }
.nav ul { list-style: none; margin: 0; padding: 0; }
.nav a {
  display: flex; align-items: center; gap: 10px; color: #d5ddef; padding: 7px 10px; border-radius: 8px; font-size: 14px;
}
.nav a:hover { background: var(--ink-2); color: #fff; text-decoration: none; }
.nav a.active { background: #fff; color: var(--ink); font-weight: 700; }
.nav a .count { margin-left: auto; background: var(--red); color: #fff; font-size: 11px; font-weight: 700; border-radius: 10px; padding: 1px 7px; }
.nav a.active .count { background: var(--red); }
.nav .ico { width: 18px; height: 18px; flex: none; opacity: .8; }
.side-foot { padding: 14px 18px; border-top: 1px solid var(--ink-line); font-size: 12px; color: #7f90b8; }
.side-foot a { color: #b8c4e0; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 30; background: rgba(255,255,255,.92); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 14px; padding: 10px 26px; min-height: 60px;
}
.menu-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; cursor: pointer; }
.gsearch { flex: 1; max-width: 460px; position: relative; }
.gsearch input, .gsearch input[type=search] { width: 100%; border: 1px solid var(--line); background: var(--page); border-radius: 10px; padding: 9px 12px 9px 36px; font: inherit; }
.gsearch svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--faint); }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.quick { position: relative; }
.userchip { display: flex; align-items: center; gap: 10px; background: none; border: 0; cursor: pointer; padding: 4px; font: inherit; color: var(--text); }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--sky-soft); color: var(--sky); font: 700 13px var(--head); flex: none; }
.userchip small { display: block; color: var(--muted); font-size: 12px; line-height: 1.1; }
.userchip span { text-align: left; line-height: 1.2; }
.dropdown { position: absolute; right: 0; top: calc(100% + 6px); background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 32px rgba(16,24,40,.12); min-width: 220px; padding: 6px; display: none; z-index: 50; }
.dropdown.open { display: block; }
.dropdown a, .dropdown button { display: block; width: 100%; text-align: left; padding: 8px 10px; border-radius: 8px; color: var(--text); background: none; border: 0; font: inherit; cursor: pointer; }
.dropdown a:hover, .dropdown button:hover { background: var(--page); text-decoration: none; }
.dropdown hr { border: 0; border-top: 1px solid var(--line); margin: 6px 0; }

.content { padding: 24px 26px 60px; width: 100%; max-width: 1440px; }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 20px; margin-bottom: 18px; }
.page-head h1 { margin: 0; }
.page-head .sub { color: var(--muted); margin: 4px 0 0; }
.crumbs { font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.crumbs a { color: var(--muted); }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line); background: #fff; color: var(--text);
  font: 700 14px/1 var(--head); padding: 10px 14px; border-radius: 9px; cursor: pointer; white-space: nowrap; text-decoration: none !important;
  transition: background .15s, border-color .15s;
}
.btn:hover { background: var(--page); border-color: #cfd6e3; }
.btn.primary { background: var(--red); border-color: var(--red); color: #fff; }
.btn.primary:hover { background: var(--red-ink); border-color: var(--red-ink); }
.btn.ok { background: var(--leaf); border-color: var(--leaf); color: #fff; }
.btn.ok:hover { filter: brightness(.95); }
.btn.warn { background: var(--marigold-soft); border-color: #f0d48a; color: #7a5300; }
.btn.danger { color: var(--red-ink); border-color: #f3c3cb; background: #fff; }
.btn.danger:hover { background: var(--red-soft); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.sm { padding: 7px 10px; font-size: 13px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.linklike { background: none; border: 0; padding: 0; color: var(--sky); cursor: pointer; font: inherit; }

/* ---------- panels ---------- */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.panel + .panel { margin-top: 18px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line-2); }
.panel-head h2, .panel-head h3 { margin: 0; font-size: 16px; }
.panel-body { padding: 18px; }
.panel-body.flush { padding: 0; }
.grid { display: grid; gap: 18px; }
.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cols-main { grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr); }
.stack > * + * { margin-top: 18px; }

/* KPI strip: one container, segments divided (not a row of identical cards) */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; margin-bottom: 18px; }
.kpi { padding: 16px 18px; border-right: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); display: block; color: inherit; }
a.kpi:hover { background: #fafbfd; text-decoration: none; }
.kpi .v { font: 700 24px/1.15 var(--head); font-variant-numeric: tabular-nums; }
.kpi .l { color: var(--muted); font-size: 13px; }
.kpi .d { font-size: 12px; margin-top: 2px; color: var(--muted); }
.kpi.hl .v { color: var(--red); }

/* Work queue: the dashboard's main element */
.queue { list-style: none; margin: 0; padding: 0; }
.queue li a { display: grid; grid-template-columns: 6px 1fr auto; align-items: center; gap: 14px; padding: 12px 18px 12px 0; color: var(--text); border-bottom: 1px solid var(--line-2); }
.queue li:last-child a { border-bottom: 0; }
.queue li a:hover { background: #fafbfd; text-decoration: none; }
.queue .mark { width: 6px; height: 34px; border-radius: 0 4px 4px 0; background: var(--marigold); }
.queue .danger .mark { background: var(--red); }
.queue .ok .mark { background: var(--leaf); }
.queue .n { font: 700 20px/1 var(--head); font-variant-numeric: tabular-nums; min-width: 40px; text-align: right; }
.queue-empty { padding: 26px 18px; color: var(--muted); }

/* ---------- tables ---------- */
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--line-2); }
.toolbar .search { flex: 1 1 220px; min-width: 180px; }
.toolbar select, .toolbar input[type=date], .toolbar input[type=month] { width: auto; min-width: 130px; }
.toolbar label { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 14px; color: var(--muted); }
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 14px; }
table.data th { text-align: left; font: 700 12.5px/1.2 var(--head); color: var(--muted); background: #f8f9fc; padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.data th a { color: var(--muted); }
table.data th a.sorted { color: var(--text); }
table.data td { padding: 11px 14px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
table.data tbody tr:hover { background: #fafbfd; }
table.data td.actions-cell { white-space: nowrap; text-align: right; }
table.data .thumb { width: 40px; height: 40px; border-radius: 8px; object-fit: cover; background: var(--page); }
table.data tfoot td { font-weight: 700; background: #f8f9fc; }
.row-title { font-weight: 700; color: var(--text); }
.pager { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; justify-content: space-between; padding: 12px 14px; font-size: 13px; color: var(--muted); }
.pager .pages { display: flex; gap: 4px; }
.pager a, .pager span.cur { min-width: 32px; padding: 6px 9px; border: 1px solid var(--line); border-radius: 7px; text-align: center; color: var(--text); background: #fff; }
.pager span.cur { background: var(--ink); color: #fff; border-color: var(--ink); }
.empty { text-align: center; padding: 48px 20px; color: var(--muted); }
.empty h3 { color: var(--text); }
.colmenu { position: relative; }
.colmenu .dropdown label { display: flex; gap: 8px; align-items: center; padding: 6px 8px; font-size: 14px; cursor: pointer; }

/* ---------- badges ---------- */
.badge { display: inline-flex; align-items: center; gap: 5px; font: 700 12px/1 var(--head); padding: 5px 9px; border-radius: 20px; background: var(--line-2); color: #475467; white-space: nowrap; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .7; }
.badge.green { background: var(--leaf-soft); color: var(--leaf); }
.badge.amber { background: var(--marigold-soft); color: #8a5d00; }
.badge.red { background: var(--red-soft); color: var(--red-ink); }
.badge.blue { background: var(--sky-soft); color: var(--sky); }
.badge.plum { background: var(--plum-soft); color: var(--plum); }
.badge.grey { background: #eef0f4; color: #5b6476; }

/* ---------- forms ---------- */
label.lbl { display: block; font: 700 13.5px/1.3 var(--head); margin-bottom: 6px; color: #344054; }
label.lbl .req { color: var(--red); }
input[type=text], input[type=email], input[type=tel], input[type=number], input[type=password], input[type=date], input[type=datetime-local],
input[type=time], input[type=search], input[type=url], input[type=month], input[type=file], input:not([type]), select, textarea {
  width: 100%; font: 15px/1.4 var(--body); color: var(--text); background: #fff; border: 1px solid #d0d5dd; border-radius: 9px; padding: 9px 11px;
}
textarea { min-height: 96px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--sky); box-shadow: 0 0 0 3px rgba(37,99,201,.15); }
.field { margin-bottom: 16px; min-width: 0; }
.field .help { font-size: 12.5px; color: var(--muted); margin-top: 5px; }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: var(--red); }
.field .error { color: var(--red-ink); font-size: 13px; margin-top: 5px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 20px; }
.form-grid .full { grid-column: 1 / -1; }
.form-section { padding: 18px 20px 4px; border-bottom: 1px solid var(--line-2); }
.form-section:last-of-type { border-bottom: 0; }
.form-section > h3 { font-size: 15px; margin-bottom: 14px; color: var(--ink); }
.form-foot { display: flex; gap: 10px; justify-content: flex-end; padding: 14px 20px; background: #f8f9fc; border-top: 1px solid var(--line); border-radius: 0 0 var(--radius) var(--radius); position: sticky; bottom: 0; }
.check { display: flex; align-items: center; gap: 9px; font-weight: 400; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--red); }
.img-preview { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.img-preview img { width: 72px; height: 72px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); }

/* rich text editor */
.rte { border: 1px solid #d0d5dd; border-radius: 9px; overflow: hidden; background: #fff; }
.rte-bar { display: flex; flex-wrap: wrap; gap: 2px; padding: 6px; background: #f8f9fc; border-bottom: 1px solid var(--line); }
.rte-bar button { border: 0; background: none; padding: 6px 9px; border-radius: 6px; cursor: pointer; font: 700 13px var(--head); color: #344054; }
.rte-bar button:hover { background: #e9edf5; }
.rte-area { min-height: 200px; padding: 12px 14px; outline: none; max-height: 520px; overflow: auto; }
.rte-area img { max-width: 240px; }

/* ---------- detail ---------- */
.detail-head { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }
.detail-head .big-avatar { width: 64px; height: 64px; border-radius: 16px; object-fit: cover; background: var(--sky-soft); display: grid; place-items: center; font: 700 22px var(--head); color: var(--sky); }
dl.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0; margin: 0; }
dl.facts > div { padding: 12px 18px; border-bottom: 1px solid var(--line-2); min-width: 0; }
dl.facts dt { font-size: 12.5px; color: var(--muted); margin-bottom: 2px; }
dl.facts dd { margin: 0; word-break: break-word; }
dl.facts .wide { grid-column: 1 / -1; }
.richtext { line-height: 1.65; }
.richtext img { max-width: 100%; height: auto; border-radius: 8px; }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); padding: 0 12px; overflow-x: auto; }
.tabs a { padding: 12px 12px; color: var(--muted); font: 700 14px var(--head); border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs a.on { color: var(--ink); border-color: var(--red); }
.tabs a:hover { text-decoration: none; color: var(--text); }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: grid; grid-template-columns: 34px 1fr; gap: 12px; padding: 12px 18px; border-bottom: 1px solid var(--line-2); }
.timeline li:last-child { border-bottom: 0; }
.timeline .dot { width: 30px; height: 30px; border-radius: 50%; background: var(--page); display: grid; place-items: center; color: var(--muted); font: 700 12px var(--head); }
.timeline .meta { font-size: 12.5px; color: var(--muted); }
.progress { height: 8px; background: var(--line-2); border-radius: 6px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--leaf); border-radius: 6px; }
.progress.red > span { background: var(--red); }
.workflow { display: flex; flex-wrap: wrap; gap: 8px; }
.workflow form { display: inline; }
.inline-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; align-items: end; padding: 14px 18px; background: #fafbfd; border-top: 1px solid var(--line-2); }
.inline-form .field { margin: 0; }

/* ---------- alerts ---------- */
.flash { border-radius: 10px; padding: 12px 16px; margin-bottom: 14px; border: 1px solid; display: block; line-height: 1.5; }
.flash.success { background: var(--leaf-soft); border-color: #b8e2cc; color: #155c3d; }
.flash.error { background: var(--red-soft); border-color: #f5c2cb; color: #8f0c22; }
.flash.info { background: var(--sky-soft); border-color: #c4d6f5; color: #1c4a96; }
.flash.warn, .flash.warning { background: var(--marigold-soft); border-color: #f0d48a; color: #6b4a00; }
.notice-strip { background: var(--marigold-soft); border: 1px solid #f0d48a; border-radius: 10px; padding: 10px 14px; margin-bottom: 14px; font-size: 14px; }
.notice-strip b { color: #6b4a00; }

/* ---------- charts ---------- */
.chart { width: 100%; height: auto; display: block; }
.chart .grid { stroke: #edf0f5; stroke-width: 1; }
.chart .axis { fill: #8a94a6; font: 11px var(--body); }
.chart .bar.s1 { fill: var(--ink); } .chart .bar.s2 { fill: var(--red); } .chart .bar.s3 { fill: #f2b233; }
.chart .line { fill: none; stroke: var(--red); stroke-width: 2.5; stroke-linejoin: round; }
.chart .area { fill: rgba(227,25,55,.08); }
.chart .dot { fill: var(--red); stroke: #fff; stroke-width: 2; }
.legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 13px; color: var(--muted); margin-top: 8px; }
.sw { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.sw.s1, .seg.s1 { background: var(--ink); stroke: var(--ink); } .sw.s2, .seg.s2 { background: var(--red); stroke: var(--red); }
.sw.s3, .seg.s3 { background: #f2b233; stroke: #f2b233; } .sw.s4, .seg.s4 { background: var(--leaf); stroke: var(--leaf); }
.sw.s5, .seg.s5 { background: var(--sky); stroke: var(--sky); } .sw.s6, .seg.s6 { background: var(--plum); stroke: var(--plum); }
.donut-wrap { display: grid; grid-template-columns: 170px 1fr; gap: 16px; align-items: center; }
.donut .seg { fill: none; stroke-width: 26; }
.donut .donut-bg { fill: none; stroke: var(--line-2); stroke-width: 26; }
.donut-num { font: 700 22px var(--head); fill: var(--text); }
.donut-lab { font: 12px var(--body); fill: var(--muted); }
.donut-legend { list-style: none; margin: 0; padding: 0; font-size: 13.5px; }
.donut-legend li { display: grid; grid-template-columns: auto 1fr auto; gap: 6px; align-items: center; padding: 5px 0; border-bottom: 1px dashed var(--line-2); }
.donut-legend b { font-variant-numeric: tabular-nums; }

/* ---------- login ---------- */
.auth-page { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.auth-art { background: var(--ink) url("/assets/images/2026/03/hero-one.jpg") center / cover; position: relative; color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: flex-end; }
.auth-art::before { content: ""; position: absolute; inset: 0; background: var(--ink); mix-blend-mode: multiply; opacity: .92; }
.auth-art > * { position: relative; }
.auth-art h2 { color: #fff; font-size: 30px; max-width: 420px; }
.auth-art p { color: #c9d2e6; max-width: 420px; }
.auth-box { display: grid; place-items: center; padding: 40px 20px; background: #fff; }
.auth-form { width: 100%; max-width: 380px; }
.auth-form .logo { width: 64px; height: auto; margin-bottom: 18px; }
.auth-form .btn { width: 100%; justify-content: center; padding: 13px; }

/* ---------- misc ---------- */
.kv { display: grid; grid-template-columns: 160px 1fr; gap: 6px 14px; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.matrix th, .matrix td { text-align: center; }
.matrix td:first-child, .matrix th:first-child { text-align: left; }
.matrix tr.grp td { background: #f8f9fc; font: 700 13px var(--head); color: var(--ink); text-align: left; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { background: var(--page); border: 1px solid var(--line); border-radius: 20px; padding: 3px 10px; font-size: 13px; }
.att-grid td, .att-grid th { padding: 6px !important; text-align: center; }
.att-grid select { padding: 5px; font-size: 13px; min-width: 96px; }
.att-p { background: var(--leaf-soft); } .att-a { background: var(--red-soft); } .att-l { background: var(--marigold-soft); }
.doc-list { list-style: none; margin: 0; padding: 0; }
.doc-list li { display: flex; align-items: center; gap: 12px; padding: 10px 18px; border-bottom: 1px solid var(--line-2); }
.doc-list .fi { width: 34px; height: 34px; border-radius: 8px; background: var(--sky-soft); color: var(--sky); display: grid; place-items: center; font: 700 10px var(--head); text-transform: uppercase; flex: none; }
.code { font-family: Consolas, Menlo, monospace; font-size: 13px; background: var(--page); padding: 2px 6px; border-radius: 5px; }
pre.json { background: #0f172a; color: #e2e8f0; padding: 12px; border-radius: 8px; font-size: 12px; overflow: auto; max-height: 260px; margin: 6px 0 0; }
.sticky-side { position: sticky; top: 80px; }

/* ---------- print (tables, receipts, certificates, ID cards) ---------- */
@media print {
  .sidebar, .topbar, .toolbar, .pager, .page-head .actions, .no-print, .form-foot, .workflow, .report-tabs { display: none !important; }
  .print-only { display: block !important; }
  .shell { display: block; }
  body { background: #fff; }
  .panel { box-shadow: none; border: 0; }
  .content { padding: 0; max-width: none; }
  table.data th { background: #eee !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .cols-main, .cols-3 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 900px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: 280px; z-index: 60; transform: translateX(-100%); transition: transform .25s; }
  .shell.nav-open .sidebar { transform: none; box-shadow: 0 0 0 100vmax rgba(13,31,69,.45); }
  .menu-toggle { display: inline-flex; }
  .topbar { padding: 10px 16px; }
  .content { padding: 18px 16px 50px; }
  .cols-2 { grid-template-columns: minmax(0, 1fr); }
  .auth-page { grid-template-columns: 1fr; }
  .auth-art { display: none; }
  .userchip span { display: none; }
}
@media (max-width: 640px) {
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  h1 { font-size: 22px; }
  .gsearch { display: none; }
  .donut-wrap { grid-template-columns: 1fr; justify-items: center; }
  .kv { grid-template-columns: 1fr; }
  .form-foot { flex-wrap: wrap; }
  .form-foot .btn { flex: 1; justify-content: center; }
  .page-head .actions { width: 100%; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* Import wizard steps */
.stepper { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0 0 16px; counter-reset: st; }
.stepper li { counter-increment: st; display: flex; align-items: center; gap: 8px; padding: 8px 14px 8px 8px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--muted); font-weight: 700; font-size: 14px; }
.stepper li::before { content: counter(st); width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--line-2); color: var(--muted); font-size: 12px; }
.stepper li.on { border-color: var(--ink); color: var(--ink); }
.stepper li.on::before { background: var(--ink); color: #fff; }
.stepper li.done::before { content: "✓"; background: var(--leaf-soft); color: var(--leaf); }
/* Roles layout */
.split { display: grid; gap: 18px; grid-template-columns: minmax(220px, 280px) minmax(0, 1fr); align-items: start; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } }
/* Reports */
.report-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.report-tabs a { padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font-weight: 700; font-size: 14px; text-decoration: none; }
.report-tabs a.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.bar-cell { position: relative; min-width: 120px; }
.bar-cell i { position: absolute; left: 0; top: 50%; height: 8px; margin-top: -4px; border-radius: 4px; background: var(--sky-soft); z-index: 0; }
.bar-cell span { position: relative; z-index: 1; }
.print-only { display: none; }
.grid > .panel, .split > .panel { margin-top: 0; }
.page-head form.filters input[type=date] { width: auto; min-width: 140px; }
.page-head form.filters { align-items: center; }
.minibar { display: block; height: 5px; width: 120px; max-width: 100%; margin: 5px 0 0 auto; background: var(--line-2); border-radius: 3px; overflow: hidden; }
.minibar i { display: block; height: 100%; background: var(--sky); border-radius: 3px; }
table.data td.num, table.data th.num { text-align: right; font-variant-numeric: tabular-nums; }
.split > *, .grid > * { min-width: 0; }
.tabs { overflow-x: auto; scrollbar-width: thin; }
.tabs a { white-space: nowrap; }
