/* AquaChemie Sample Management — design tokens follow the brand: aqua blue + charcoal grey + silver */
:root {
  --aqua: #1ca1dc; --aqua-600: #0f86bd; --aqua-700: #0b6a96; --aqua-50: #eaf6fc; --aqua-100: #d3edf9;
  --char: #54565a; --char-900: #23262b;
  --bg: #f4f6f9; --surface: #ffffff; --surface-2: #f8fafc; --border: #e3e7ed; --border-strong: #cfd6df;
  --text: #1f2328; --text-2: #5b6470; --text-3: #8a93a0;
  --green: #1f9d55; --green-bg: #e7f6ed; --red: #d63b3b; --red-bg: #fdecec; --amber: #c27c0e; --amber-bg: #fdf3e1;
  --blue: #2f6fdb; --blue-bg: #e9f0fd; --purple: #7a4fd0; --purple-bg: #f1ecfc; --indigo: #4b55c9; --indigo-bg: #eceefd;
  --teal: #0f8f86; --teal-bg: #e3f6f4; --orange: #d0651b; --orange-bg: #fdefe4; --gray: #6b7280; --gray-bg: #eef0f3;
  --radius: 10px; --radius-sm: 7px; --shadow: 0 1px 2px rgba(16,24,40,.05), 0 1px 3px rgba(16,24,40,.06); --shadow-lg: 0 12px 32px rgba(16,24,40,.18);
  --nav-w: 248px; --top-h: 58px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1216; --surface: #171b21; --surface-2: #1c2128; --border: #2a3039; --border-strong: #38404b;
    --text: #e7eaee; --text-2: #a8b0bb; --text-3: #7c8591; --char: #c3c6cb; --aqua-50: #10283a; --aqua-100: #143449;
    --green-bg: #133322; --red-bg: #3a1a1a; --amber-bg: #3a2b10; --blue-bg: #16243f; --purple-bg: #261c3d; --indigo-bg: #1c1f40;
    --teal-bg: #0f302d; --orange-bg: #3a2414; --gray-bg: #242a32; --shadow: 0 1px 2px rgba(0,0,0,.4); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0f1216; --surface: #171b21; --surface-2: #1c2128; --border: #2a3039; --border-strong: #38404b;
  --text: #e7eaee; --text-2: #a8b0bb; --text-3: #7c8591; --char: #c3c6cb; --aqua-50: #10283a; --aqua-100: #143449;
  --green-bg: #133322; --red-bg: #3a1a1a; --amber-bg: #3a2b10; --blue-bg: #16243f; --purple-bg: #261c3d; --indigo-bg: #1c1f40;
  --teal-bg: #0f302d; --orange-bg: #3a2414; --gray-bg: #242a32; --shadow: 0 1px 2px rgba(0,0,0,.4); color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font: 14px/1.45 var(--font); color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; }
a { color: var(--aqua-600); text-decoration: none; } a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; }
button, input, select, textarea { font: inherit; color: inherit; }
.mono { font-family: var(--mono); font-size: 12.5px; }
.muted { color: var(--text-2); } .faint { color: var(--text-3); } .small { font-size: 12px; } .right { text-align: right; } .nowrap { white-space: nowrap; }
.hidden { display: none !important; }

/* ---------- login */
.login-wrap { min-height: 100%; display: grid; place-items: center; padding: 24px 16px;
  background: radial-gradient(1200px 500px at 15% -10%, var(--aqua-100), transparent 60%), radial-gradient(900px 500px at 110% 110%, var(--aqua-50), transparent 60%), var(--bg); }
.login-card { width: min(420px, 100%); background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow-lg); padding: 30px 28px 24px; }
.login-card .logo { display: block; height: 70px; margin: 0 auto 6px; }
.login-card h1 { font-size: 18px; text-align: center; font-weight: 600; color: var(--char); margin-bottom: 22px; }
.login-card .foot { margin-top: 18px; text-align: center; font-size: 12px; color: var(--text-3); }

/* ---------- shell */
.shell { display: grid; grid-template-columns: var(--nav-w) 1fr; grid-template-rows: var(--top-h) 1fr; height: 100vh; }
.topbar { grid-column: 1 / -1; display: flex; align-items: center; gap: 12px; padding: 0 16px; background: var(--surface); border-bottom: 1px solid var(--border); z-index: 20; }
.brand { display: flex; align-items: center; gap: 10px; width: calc(var(--nav-w) - 16px); flex-shrink: 0; }
.brand img { height: 34px; } .brand span { font-weight: 600; font-size: 13px; color: var(--char); letter-spacing: .2px; border-left: 1px solid var(--border); padding-left: 10px; line-height: 1.15; }
.search { position: relative; flex: 1; max-width: 560px; }
.search input { width: 100%; height: 38px; border-radius: 19px; border: 1px solid var(--border); background: var(--surface-2); padding: 0 14px 0 38px; outline: none; }
.search input:focus { border-color: var(--aqua); box-shadow: 0 0 0 3px var(--aqua-100); background: var(--surface); }
.search svg { position: absolute; left: 12px; top: 10px; width: 18px; height: 18px; color: var(--text-3); }
.search-results { position: absolute; top: 44px; left: 0; right: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg); max-height: 70vh; overflow: auto; z-index: 50; }
.search-results a { display: flex; gap: 10px; padding: 9px 14px; border-bottom: 1px solid var(--border); color: var(--text); text-decoration: none; }
.search-results a:hover, .search-results a.active { background: var(--aqua-50); }
.search-results .type { width: 110px; flex-shrink: 0; font-size: 11px; text-transform: uppercase; letter-spacing: .4px; color: var(--text-3); padding-top: 2px; }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.icon-btn { position: relative; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; border: 0; background: transparent; cursor: pointer; color: var(--text-2); }
.icon-btn:hover { background: var(--surface-2); color: var(--text); } .icon-btn svg { width: 20px; height: 20px; }
.icon-btn .dot { position: absolute; top: 5px; right: 5px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: var(--red); color: #fff; font-size: 10.5px; font-weight: 700; display: grid; place-items: center; }
.user-chip { display: flex; align-items: center; gap: 8px; padding: 4px 10px 4px 4px; border-radius: 20px; border: 1px solid var(--border); cursor: pointer; background: var(--surface); }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: linear-gradient(135deg, var(--aqua), var(--aqua-700)); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 12px; }
.user-chip .nm { font-size: 13px; font-weight: 600; } .user-chip .rl { font-size: 11px; color: var(--text-3); }
.menu-btn { display: none; }

.nav { background: var(--surface); border-right: 1px solid var(--border); overflow-y: auto; padding: 10px 10px 30px; }
.nav .grp { font-size: 10.5px; text-transform: uppercase; letter-spacing: .7px; color: var(--text-3); padding: 14px 10px 5px; font-weight: 600; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: var(--radius-sm); color: var(--text-2); font-weight: 500; text-decoration: none; }
.nav a svg { width: 18px; height: 18px; flex-shrink: 0; opacity: .8; }
.nav a:hover { background: var(--surface-2); color: var(--text); }
.nav a.active { background: var(--aqua-50); color: var(--aqua-700); } .nav a.active svg { opacity: 1; color: var(--aqua-600); }
:root[data-theme="dark"] .nav a.active, .nav a.active { }
.nav .count { margin-left: auto; background: var(--aqua); color: #fff; border-radius: 9px; font-size: 11px; padding: 0 7px; font-weight: 700; }
.main { overflow-y: auto; overflow-x: hidden; padding: 22px 26px 60px; min-width: 0; }
.search { min-width: 0; } .topbar > * { min-width: 0; }
.backdrop { display: none; }

/* ---------- page */
.page-head { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head h1 { font-size: 21px; font-weight: 650; letter-spacing: -.2px; }
.page-head .sub { color: var(--text-2); margin-top: 3px; }
.page-head .actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.crumbs { font-size: 12px; color: var(--text-3); margin-bottom: 4px; } .crumbs a { color: var(--text-3); }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 16px; }
.card-h { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.card-h h3 { font-size: 14px; font-weight: 650; } .card-h .actions { margin-left: auto; display: flex; gap: 6px; }
.card-b { padding: 16px; } .card-b.flush { padding: 0; }
.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)); } .g-auto { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.span2 { grid-column: span 2; } .span-all { grid-column: 1 / -1; }

/* KPI tiles */
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 13px 14px 12px; box-shadow: var(--shadow); display: block; color: inherit; text-decoration: none; position: relative; overflow: hidden; }
.kpi::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--tone, var(--aqua)); }
a.kpi:hover { border-color: var(--aqua); text-decoration: none; }
.kpi .l { font-size: 12px; color: var(--text-2); font-weight: 500; } .kpi .v { font-size: 24px; font-weight: 700; margin-top: 4px; letter-spacing: -.4px; font-variant-numeric: tabular-nums; }
.kpi .s { font-size: 11.5px; color: var(--text-3); margin-top: 1px; }
.kpi.warn { --tone: var(--amber); } .kpi.bad { --tone: var(--red); } .kpi.good { --tone: var(--green); } .kpi.info { --tone: var(--indigo); }

/* badges */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 11px; font-size: 11.5px; font-weight: 600; white-space: nowrap; background: var(--gray-bg); color: var(--gray); }
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.green { background: var(--green-bg); color: var(--green); } .badge.red { background: var(--red-bg); color: var(--red); }
.badge.amber { background: var(--amber-bg); color: var(--amber); } .badge.blue { background: var(--blue-bg); color: var(--blue); }
.badge.purple { background: var(--purple-bg); color: var(--purple); } .badge.indigo { background: var(--indigo-bg); color: var(--indigo); }
.badge.teal { background: var(--teal-bg); color: var(--teal); } .badge.orange { background: var(--orange-bg); color: var(--orange); }
.badge.plain::before { display: none; }
.pill { display: inline-block; padding: 1px 8px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); font-size: 11.5px; color: var(--text-2); }

/* buttons */
.btn { display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 14px; border-radius: var(--radius-sm); border: 1px solid var(--border-strong); background: var(--surface); cursor: pointer; font-weight: 550; white-space: nowrap; color: var(--text); }
.btn:hover { background: var(--surface-2); text-decoration: none; } .btn svg { width: 16px; height: 16px; }
.btn.primary { background: var(--aqua); border-color: var(--aqua); color: #fff; } .btn.primary:hover { background: var(--aqua-600); }
.btn.danger { color: var(--red); border-color: color-mix(in srgb, var(--red) 40%, var(--border)); } .btn.danger:hover { background: var(--red-bg); }
.btn.success { background: var(--green); border-color: var(--green); color: #fff; }
.btn.ghost { border-color: transparent; background: transparent; } .btn.ghost:hover { background: var(--surface-2); }
.btn.sm { height: 30px; padding: 0 10px; font-size: 12.5px; } .btn.lg { height: 44px; padding: 0 20px; font-size: 15px; }
.btn[disabled] { opacity: .55; pointer-events: none; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }

/* forms */
.form { display: grid; grid-template-columns: repeat(12, 1fr); gap: 12px 14px; }
.fld { grid-column: span 6; display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.fld.s3 { grid-column: span 3; } .fld.s4 { grid-column: span 4; } .fld.s12 { grid-column: span 12; } .fld.s8 { grid-column: span 8; } .fld.s2 { grid-column: span 2; }
.fld label { font-size: 12px; font-weight: 600; color: var(--text-2); } .fld label .req { color: var(--red); margin-left: 2px; }
.fld .help { font-size: 11.5px; color: var(--text-3); }
.inp, select.inp, textarea.inp { height: 36px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); padding: 0 10px; background: var(--surface); outline: none; width: 100%; min-width: 0; }
textarea.inp { height: auto; min-height: 72px; padding: 8px 10px; resize: vertical; }
.inp:focus { border-color: var(--aqua); box-shadow: 0 0 0 3px var(--aqua-100); }
.inp:disabled { background: var(--surface-2); color: var(--text-2); }
.chk { display: flex; align-items: center; gap: 8px; height: 36px; } .chk input { width: 17px; height: 17px; accent-color: var(--aqua); }
.form-section { grid-column: 1 / -1; font-size: 12px; text-transform: uppercase; letter-spacing: .6px; color: var(--aqua-700); font-weight: 700; padding-top: 6px; border-top: 1px dashed var(--border); margin-top: 4px; }
.form-section:first-child { border-top: 0; margin-top: 0; padding-top: 0; }
.err-box { background: var(--red-bg); color: var(--red); border-radius: var(--radius-sm); padding: 9px 12px; font-weight: 500; margin-bottom: 10px; }
.info-box { background: var(--aqua-50); color: var(--aqua-700); border-radius: var(--radius-sm); padding: 9px 12px; margin-bottom: 12px; font-size: 13px; }
.warn-box { background: var(--amber-bg); color: var(--amber); border-radius: var(--radius-sm); padding: 9px 12px; margin-bottom: 12px; font-size: 13px; font-weight: 500; }

/* tables */
.tbl-tools { display: flex; gap: 8px; align-items: center; padding: 10px 12px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.tbl-tools .inp { max-width: 260px; height: 32px; }
.tbl-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th { text-align: left; font-size: 11.5px; font-weight: 650; color: var(--text-2); background: var(--surface-2); padding: 8px 12px; border-bottom: 1px solid var(--border); white-space: nowrap; position: sticky; top: 0; cursor: pointer; user-select: none; }
.tbl th.num, .tbl td.num { text-align: right; font-variant-numeric: tabular-nums; }
.tbl td { padding: 9px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tr.click { cursor: pointer; } .tbl tr.click:hover td { background: var(--aqua-50); }
.tbl .empty { text-align: center; color: var(--text-3); padding: 28px; }
.tbl-foot { padding: 8px 12px; font-size: 12px; color: var(--text-3); border-top: 1px solid var(--border); }
.tbl tr.row-bad td { background: color-mix(in srgb, var(--red-bg) 55%, transparent); }
.tbl tr.row-warn td { background: color-mix(in srgb, var(--amber-bg) 55%, transparent); }

/* definition lists */
.dl { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px 18px; }
.dl > div { min-width: 0; } .dl dt { font-size: 11.5px; color: var(--text-3); font-weight: 600; text-transform: uppercase; letter-spacing: .3px; }
.dl dd { margin: 2px 0 0; font-weight: 500; overflow-wrap: anywhere; }

/* tabs */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); margin-bottom: 16px; overflow-x: auto; scrollbar-width: none; }
.tabs button { border: 0; background: none; padding: 9px 13px; font-weight: 600; color: var(--text-2); cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs button.active { color: var(--aqua-700); border-color: var(--aqua); } .tabs button .n { font-size: 11px; color: var(--text-3); margin-left: 4px; }

/* timeline */
.tl { position: relative; margin: 0; padding: 0 0 0 20px; list-style: none; }
.tl::before { content: ''; position: absolute; left: 6px; top: 4px; bottom: 4px; width: 2px; background: var(--border); }
.tl li { position: relative; padding: 0 0 14px 12px; }
.tl li::before { content: ''; position: absolute; left: -19px; top: 4px; width: 10px; height: 10px; border-radius: 50%; background: var(--surface); border: 2px solid var(--aqua); }
.tl li.good::before { border-color: var(--green); background: var(--green); } .tl li.bad::before { border-color: var(--red); background: var(--red); }
.tl li.warn::before { border-color: var(--amber); }
.tl .when { font-size: 11.5px; color: var(--text-3); font-variant-numeric: tabular-nums; } .tl .what { font-weight: 600; } .tl .det { color: var(--text-2); font-size: 12.5px; }

/* lifecycle stepper (360 view) */
.stepper { display: flex; gap: 0; overflow-x: auto; padding: 4px 2px 10px; scrollbar-width: thin; }
.step { flex: 1; min-width: 92px; text-align: center; position: relative; font-size: 11.5px; color: var(--text-3); }
.step::before { content: ''; position: absolute; top: 11px; left: -50%; right: 50%; height: 2px; background: var(--border); }
.step:first-child::before { display: none; }
.step .o { width: 24px; height: 24px; border-radius: 50%; margin: 0 auto 6px; background: var(--surface); border: 2px solid var(--border-strong); position: relative; z-index: 1; display: grid; place-items: center; font-size: 12px; }
.step.done { color: var(--text-2); } .step.done .o { background: var(--aqua); border-color: var(--aqua); color: #fff; } .step.done::before { background: var(--aqua); }
.step.now { color: var(--aqua-700); font-weight: 700; } .step.now .o { border-color: var(--aqua); box-shadow: 0 0 0 4px var(--aqua-100); }
.step.fail .o { background: var(--red); border-color: var(--red); color: #fff; }

/* 360 header */
.s360-head { display: grid; grid-template-columns: auto 1fr auto; gap: 18px; align-items: center; }
.s360-head .qr { width: 108px; height: 108px; border: 1px solid var(--border); border-radius: 8px; padding: 6px; background: #fff; }
.s360-head .code { font: 700 22px var(--mono); letter-spacing: .3px; }
.answers { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 10px; }
.answer { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 12px; background: var(--surface-2); }
.answer .q { font-size: 11.5px; font-weight: 700; color: var(--aqua-700); text-transform: uppercase; letter-spacing: .3px; }
.answer .a { margin-top: 3px; }
.qty-bar { display: flex; height: 12px; border-radius: 6px; overflow: hidden; background: var(--gray-bg); margin: 8px 0 6px; }
.qty-bar span { display: block; height: 100%; }
.legend { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12px; color: var(--text-2); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }

/* bars (mini charts) */
.hbars { display: grid; gap: 7px; }
.hbar { display: grid; grid-template-columns: minmax(90px, 36%) 1fr 56px; align-items: center; gap: 10px; font-size: 12.5px; }
.hbar .track { height: 10px; background: var(--gray-bg); border-radius: 5px; overflow: hidden; } .hbar .fill { height: 100%; background: var(--aqua); border-radius: 5px; }
.hbar .n { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.vbars { display: flex; align-items: flex-end; gap: 8px; height: 140px; padding-top: 10px; }
.vbars .col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 11px; color: var(--text-3); height: 100%; justify-content: flex-end; }
.vbars .b { width: 100%; max-width: 38px; background: var(--aqua); border-radius: 4px 4px 0 0; min-height: 2px; }
.sla-row { display: grid; grid-template-columns: 1fr repeat(3, 64px); gap: 6px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.sla-row:last-child { border-bottom: 0; } .sla-row.h { font-size: 11px; color: var(--text-3); font-weight: 700; text-transform: uppercase; }
.sla-row .c { text-align: center; font-weight: 700; border-radius: 6px; padding: 2px 0; }
.sla-row .ok { color: var(--green); } .sla-row .dt { color: var(--amber); } .sla-row .od { color: var(--red); }
.sla-row .od.has { background: var(--red-bg); } .sla-row .dt.has { background: var(--amber-bg); }

/* modal & toast */
.modal-bg { position: fixed; inset: 0; background: rgba(15,18,24,.45); display: grid; place-items: center; z-index: 100; padding: 16px; animation: fade .12s ease-out; }
.modal { background: var(--surface); border-radius: 14px; box-shadow: var(--shadow-lg); width: min(640px, 100%); max-height: calc(100vh - 32px); display: flex; flex-direction: column; }
.modal.wide { width: min(980px, 100%); }
.modal-h { padding: 14px 18px; border-bottom: 1px solid var(--border); display: flex; align-items: center; } .modal-h h3 { font-size: 16px; }
.modal-h .x { margin-left: auto; }
.modal-b { padding: 16px 18px; overflow-y: auto; } .modal-f { padding: 12px 18px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 8px; }
@keyframes fade { from { opacity: 0 } }
.toasts { position: fixed; right: 16px; bottom: 16px; display: grid; gap: 8px; z-index: 200; max-width: min(420px, calc(100vw - 32px)); }
.toast { background: var(--char-900); color: #fff; padding: 11px 14px; border-radius: 9px; box-shadow: var(--shadow-lg); font-weight: 500; animation: fade .15s; }
.toast.ok { background: var(--green); } .toast.err { background: var(--red); }

/* notification drawer */
.drawer { position: fixed; top: var(--top-h); right: 0; bottom: 0; width: min(400px, 100vw); background: var(--surface); border-left: 1px solid var(--border); box-shadow: var(--shadow-lg); z-index: 60; display: flex; flex-direction: column; }
.drawer .hd { padding: 12px 16px; display: flex; align-items: center; border-bottom: 1px solid var(--border); }
.drawer .list { overflow-y: auto; flex: 1; }
.notif { display: block; padding: 11px 16px; border-bottom: 1px solid var(--border); color: var(--text); text-decoration: none; }
.notif:hover { background: var(--surface-2); text-decoration: none; } .notif.unread { background: var(--aqua-50); }
.notif .t { font-weight: 600; } .notif .m { font-size: 12.5px; color: var(--text-2); } .notif .w { font-size: 11px; color: var(--text-3); margin-top: 2px; }

/* approvals (mobile-first cards) */
.appr { border: 1px solid var(--border); border-radius: 12px; background: var(--surface); box-shadow: var(--shadow); margin-bottom: 12px; overflow: hidden; }
.appr .top { padding: 14px 16px; display: flex; gap: 12px; align-items: flex-start; }
.appr .amt { margin-left: auto; text-align: right; font-weight: 700; font-size: 16px; }
.appr .lines { padding: 0 16px 10px; font-size: 13px; }
.appr .lines div { display: flex; justify-content: space-between; gap: 10px; padding: 4px 0; border-top: 1px dashed var(--border); }
.appr .acts { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--border); }
.appr .acts button { height: 48px; border: 0; background: none; font-weight: 700; font-size: 14px; cursor: pointer; }
.appr .acts .ap { color: var(--green); } .appr .acts .rj { color: var(--red); border-right: 1px solid var(--border); }
.appr .acts button:hover { background: var(--surface-2); }

/* signature pad & scanner */
.sig { border: 1.5px dashed var(--border-strong); border-radius: var(--radius-sm); background: #fff; touch-action: none; width: 100%; height: 160px; display: block; }
.scan-video { width: 100%; max-height: 60vh; background: #000; border-radius: var(--radius); object-fit: cover; }
.scan-frame { position: relative; } .scan-frame::after { content: ''; position: absolute; inset: 18% 22%; border: 3px solid var(--aqua); border-radius: 14px; box-shadow: 0 0 0 999px rgba(0,0,0,.25); pointer-events: none; }

.spec-chips { display: flex; gap: 6px; flex-wrap: wrap; } .spec-chips span { background: var(--aqua-50); color: var(--aqua-700); border-radius: 6px; padding: 1px 8px; font-size: 12px; }
.line-card { border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; margin-bottom: 12px; background: var(--surface-2); }
.line-card .lh { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; font-weight: 700; }
.chain { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 12.5px; margin-top: 8px; }
.chain .arr { color: var(--text-3); }
.loading { padding: 40px; text-align: center; color: var(--text-3); }
.perm-grid td, .perm-grid th { text-align: center; } .perm-grid td:first-child, .perm-grid th:first-child { text-align: left; }
.foot-credit { text-align: center; color: var(--text-3); font-size: 11.5px; padding: 30px 0 0; }

/* ---------- responsive */
@media (max-width: 1100px) { .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .nav { position: fixed; top: var(--top-h); left: 0; bottom: 0; width: 270px; z-index: 40; transform: translateX(-100%); transition: transform .18s ease; box-shadow: var(--shadow-lg); }
  .shell.nav-open .nav { transform: none; } .shell.nav-open .backdrop { display: block; position: fixed; inset: var(--top-h) 0 0 0; background: rgba(0,0,0,.3); z-index: 30; }
  .topbar { gap: 6px; padding: 0 8px; } .top-actions { gap: 0; } .icon-btn { width: 34px; height: 34px; } .theme-btn { display: none; }
  .brand img { height: 28px; }
  .menu-btn { display: grid; } .brand { width: auto; } .brand span { display: none; } .user-chip .nm, .user-chip .rl { display: none; } .user-chip { padding: 3px; }
  .main { padding: 16px 16px 60px; }
  .g2, .g3, .g4 { grid-template-columns: 1fr; } .span2 { grid-column: auto; }
  .fld, .fld.s3, .fld.s4, .fld.s8, .fld.s2 { grid-column: span 12; }
  .s360-head { grid-template-columns: 1fr auto; } .s360-head .actions { grid-column: 1 / -1; }
  /* tables become cards */
  table.tbl.cards thead { display: none; }
  table.tbl.cards, .tbl.cards tbody, .tbl.cards tr, .tbl.cards td { display: block; width: 100%; }
  .tbl.cards tr { border-bottom: 1px solid var(--border); padding: 8px 4px; }
  .tbl.cards td { border: 0; padding: 3px 10px; display: flex; justify-content: space-between; gap: 12px; text-align: right; }
  .tbl.cards td::before { content: attr(data-label); color: var(--text-3); font-size: 12px; font-weight: 600; text-align: left; }
  .tbl.cards td.num { text-align: right; }
  .search { max-width: none; }
}
@media (max-width: 520px) { .search-results .type { width: 80px; } .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .page-head h1 { font-size: 19px; } }
@media print { .nav, .topbar, .page-head .actions, .tabs { display: none !important; } .shell { display: block; height: auto; } .main { overflow: visible; } }

/* compact editable matrix (lite: products / quality parameters on a request) */
.tbl.mtx th { cursor: default; padding: 7px 8px; }
.tbl.mtx td { padding: 4px 8px; vertical-align: middle; border-bottom: 1px solid var(--border); }
.tbl.mtx td.num { color: var(--text-3); }
.tbl.mtx .inp { height: 32px; }
.tbl.mtx tfoot td { background: var(--surface-2); padding: 8px; border-bottom: 0; border-top: 1px solid var(--border); }
.btn.icon-only { padding: 0; width: 30px; height: 30px; justify-content: center; }
.split-7-5 { display: grid; grid-template-columns: 7fr 5fr; gap: 16px; align-items: start; }
@media (max-width: 1100px) { .split-7-5 { grid-template-columns: 1fr; } }
.tbl.mtx tr.sub > td { background: var(--surface-2); padding: 2px 8px 10px; }
.tbl.mtx tr.sub .tbl.mtx { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.tbl.mtx tr.sub .tbl.mtx th { background: var(--surface); }

/* ================================================================== v2 — shell & dashboard as per the AquaChemie mockup */
:root { --top-h: 64px; --nav-w: 248px; }
.topbar { gap: 20px; padding: 0 24px 0 18px; }
.brand { width: auto; gap: 16px; }
.brand img { height: 40px; }
.brand .app-name { font-size: 17px; font-weight: 600; color: var(--text); border-left: 1px solid var(--border); padding-left: 18px; white-space: nowrap; line-height: 1.2; letter-spacing: 0; }
.topbar .search { flex: 1; max-width: 560px; margin: 0 auto; }
.topbar .search input { border-radius: 8px; height: 40px; background: var(--surface); padding-left: 40px; }
.topbar .search svg { top: 11px; left: 13px; }
.search-results .sec { font-size: 10.5px; text-transform: uppercase; letter-spacing: .6px; color: var(--text-3); padding: 8px 14px 4px; font-weight: 600; background: var(--surface-2); }
.search-results .empty-s { padding: 14px; color: var(--text-3); }
.top-actions { margin-left: 0; gap: 14px; }
.top-sep { width: 1px; height: 34px; background: var(--border); }
.pop-anchor { position: relative; }
.user-chip { border: 0; padding: 4px 6px 4px 4px; border-radius: 10px; gap: 12px; }
.user-chip:hover { background: var(--surface-2); }
.user-chip .avatar { width: 42px; height: 42px; font-size: 14px; background: var(--aqua-600); }
.user-chip .nm { font-size: 14px; font-weight: 600; } .user-chip .rl { font-size: 12px; color: var(--text-2); }
.user-chip > svg { width: 16px; height: 16px; color: var(--text-2); }
.dropdown { position: absolute; top: calc(100% + 8px); right: 0; min-width: 250px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-lg); z-index: 60; padding: 6px; }
.dropdown .dd-head { padding: 10px 10px 8px; border-bottom: 1px solid var(--border); margin-bottom: 4px; }
.dropdown .dd-item { display: flex; gap: 10px; align-items: center; padding: 9px 10px; border-radius: 8px; color: var(--text); cursor: pointer; text-decoration: none; background: none; border: 0; width: 100%; text-align: left; font: inherit; }
.dropdown .dd-item:hover { background: var(--surface-2); text-decoration: none; }
.dropdown .dd-item svg { width: 17px; height: 17px; color: var(--text-2); }
.dropdown.notif { width: 360px; right: -10px; }

.nav { padding: 16px 12px 16px; display: flex; flex-direction: column; }
.nav a { padding: 10px 12px; gap: 14px; font-size: 14px; color: var(--text); font-weight: 500; margin-bottom: 3px; border-radius: 8px; }
.nav a svg { width: 20px; height: 20px; color: var(--text-2); opacity: 1; }
.nav a.active { background: var(--aqua-50); color: var(--aqua-700); font-weight: 600; } .nav a.active svg { color: var(--aqua-700); }
.nav .count { background: var(--aqua-100); color: var(--aqua-700); border-radius: 10px; padding: 1px 8px; font-size: 11.5px; font-weight: 700; }
.nav-foot { margin-top: auto; padding: 28px 6px 4px; display: flex; align-items: flex-end; gap: 4px; }
.nav-foot svg { width: 70px; height: 76px; flex-shrink: 0; }
.nav-foot span { color: var(--aqua-600); font-size: 13px; font-weight: 500; line-height: 1.35; padding-bottom: 4px; }

/* page header */
.dash-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.dash-head h1 { font-size: 26px; font-weight: 700; letter-spacing: -.3px; }
.dash-head .sub { color: var(--text-2); margin-top: 2px; font-size: 14.5px; }
.dash-head .actions { margin-left: auto; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.dash-head .btn { height: 42px; border-radius: 8px; }
.dash-head .btn.primary { padding: 0 20px; font-size: 14.5px; }
.range-btn { gap: 10px; min-width: 230px; justify-content: space-between; }
.range-btn svg { width: 17px; height: 17px; color: var(--text-2); }
.filter-btn { width: 42px; padding: 0; justify-content: center; }
.filter-btn.on { border-color: var(--aqua); color: var(--aqua-700); background: var(--aqua-50); }
.pop { position: absolute; top: calc(100% + 8px); right: 0; width: 320px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-lg); z-index: 60; padding: 14px; }
.pop .presets { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.pop .presets .btn { height: 30px; font-size: 12.5px; padding: 0 10px; }
.pop .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.pop label { font-size: 12px; font-weight: 600; color: var(--text-2); display: block; margin-bottom: 4px; }
.pop .foot { display: flex; justify-content: flex-end; gap: 8px; }

/* KPI cards */
.kgrid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.k2 { --c: var(--blue); --cb: var(--blue-bg); border-radius: 10px; border: 1px solid color-mix(in srgb, var(--c) 28%, transparent); padding: 18px 16px 14px;
  display: grid; grid-template-columns: 42px 1fr; column-gap: 12px; text-decoration: none; color: var(--text); background: color-mix(in srgb, var(--cb) 45%, var(--surface)); transition: box-shadow .15s, transform .15s; }
.k2:hover { text-decoration: none; box-shadow: var(--shadow); transform: translateY(-1px); }
.k2 .ic { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--cb); color: var(--c); grid-row: span 3; }
.k2 .ic svg { width: 21px; height: 21px; }
.k2 .lbl { font-weight: 600; font-size: 14px; padding-top: 1px; }
.k2 .val { font-size: 28px; font-weight: 700; line-height: 1.15; margin: 8px 0 10px; font-variant-numeric: tabular-nums; }
.k2 .tr { display: flex; gap: 6px; align-items: center; font-size: 12.5px; color: var(--text-2); }
.k2 .tr b { font-weight: 700; } .k2 .tr svg { width: 15px; height: 15px; }
.k2 .tr .good { color: var(--green); } .k2 .tr .bad { color: var(--red); } .k2 .tr .flat { color: var(--text-2); }
.k2 .tr .vs { margin-left: 18px; }
.t-blue { --c: var(--blue); --cb: var(--blue-bg); } .t-amber { --c: var(--amber); --cb: var(--amber-bg); } .t-orange { --c: var(--orange); --cb: var(--orange-bg); }
.t-green { --c: var(--green); --cb: var(--green-bg); } .t-teal { --c: var(--teal); --cb: var(--teal-bg); } .t-indigo { --c: var(--indigo); --cb: var(--indigo-bg); }
.t-purple { --c: var(--purple); --cb: var(--purple-bg); } .t-red { --c: var(--red); --cb: var(--red-bg); }
.k2.t-green.solid .ic, .k2.t-red.solid .ic { background: var(--c); color: #fff; }

/* request lifecycle */
.card-h .h-ic { width: 22px; height: 22px; color: var(--char); }
.card-h.big h3 { font-size: 16px; font-weight: 700; } .card-h.big { padding: 16px 18px; border-bottom: 0; }
.card-h .va { margin-left: auto; font-size: 12.5px; font-weight: 600; }
.lc { display: flex; align-items: flex-start; gap: 2px; padding: 4px 16px 18px; overflow-x: auto; }
.lc-step { flex: 1 0 96px; display: flex; flex-direction: column; align-items: center; text-align: center; text-decoration: none; color: var(--text); }
.lc-step:hover { text-decoration: none; } .lc-step:hover .lc-ic { box-shadow: 0 0 0 4px var(--aqua-100); }
.lc-ic { width: 50px; height: 50px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--border); color: var(--char); margin-bottom: 9px; transition: box-shadow .15s; }
.lc-ic svg { width: 24px; height: 24px; }
.lc-ic.fill { color: #fff; border: 0; background: var(--f); }
.lc-step b { font-size: 13px; font-weight: 600; } .lc-step.first b { color: var(--aqua-600); }
.lc-step .n { font-size: 11.5px; color: var(--text-3); margin-top: 2px; }
.lc-arrow { color: var(--text-3); padding-top: 15px; flex: 0 0 22px; display: grid; place-items: center; } .lc-arrow svg { width: 18px; height: 18px; }
.lc-sub { margin: 6px 0 0; background: var(--aqua-50); border-radius: 6px; padding: 5px 10px 6px 24px; text-align: left; font-size: 12px; list-style: disc; color: var(--text); }
.lc-sub li { margin: 2px 0; white-space: nowrap; } .lc-sub li::marker { color: var(--aqua-700); } .lc-sub .c { color: var(--text-3); margin-left: 4px; }

/* recent requests + alerts */
.dash-bottom { display: grid; grid-template-columns: minmax(0, 2.4fr) minmax(300px, 1fr); gap: 16px; align-items: start; }
.rtbl { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 12.5px; }
.rtbl th { text-align: left; font-weight: 600; font-size: 12px; background: var(--surface-2); padding: 10px 10px; color: var(--text); white-space: nowrap; }
.rtbl th:first-child { border-radius: 8px 0 0 8px; } .rtbl th:last-child { border-radius: 0 8px 8px 0; }
.rtbl td { padding: 9px 10px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.rtbl tr:last-child td { border-bottom: 0; }
.rtbl .more { color: var(--text-3); font-size: 11.5px; }
.src { display: inline-block; padding: 3px 10px; border-radius: 6px; font-size: 11.5px; font-weight: 600; white-space: nowrap; margin: 1px 2px 1px 0; }
.src-STOCK { background: var(--green-bg); color: var(--green); } .src-SUPPLIER_SAMPLE { background: var(--blue-bg); color: var(--blue); }
.src-PURCHASE { background: var(--orange-bg); color: var(--orange); } .src-DEVELOP { background: var(--purple-bg); color: var(--purple); }
.src-none { background: var(--gray-bg); color: var(--gray); }
.st { display: inline-block; padding: 3px 10px; border-radius: 6px; font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.row-acts { display: flex; gap: 6px; align-items: center; position: relative; }
.btn.xs { height: 26px; padding: 0 14px; font-size: 12px; border-radius: 5px; }
.btn.xs.icon-only { width: 28px; padding: 0; justify-content: center; } .btn.xs svg { width: 14px; height: 14px; }
.alert-row { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--border); border-radius: 10px; margin-bottom: 10px; color: var(--text); text-decoration: none; background: var(--surface); }
.alert-row:hover { background: var(--surface-2); text-decoration: none; }
.alert-row .ic { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--cb); color: var(--c); flex-shrink: 0; }
.alert-row .ic svg { width: 21px; height: 21px; }
.alert-row .n { font-size: 22px; font-weight: 700; color: var(--c); min-width: 20px; text-align: center; }
.alert-row .t b { font-size: 13px; display: block; } .alert-row .t span { font-size: 11.5px; color: var(--text-2); }
.alert-row > svg { margin-left: auto; width: 18px; height: 18px; color: var(--text-2); flex-shrink: 0; }
.alert-row.zero { opacity: .55; }
.tabs2 { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 16px; }
.tabs2 a { padding: 9px 14px; color: var(--text-2); font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px; text-decoration: none; }
.tabs2 a.on { color: var(--aqua-700); border-bottom-color: var(--aqua); } .tabs2 a .count { margin-left: 6px; background: var(--aqua-100); color: var(--aqua-700); border-radius: 9px; padding: 0 7px; font-size: 11px; }
.stars { color: #e6a700; letter-spacing: 1px; }

@media (max-width: 1400px) { .kgrid { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; } .k2 { padding: 14px 12px 12px; column-gap: 10px; } .k2 .val { font-size: 24px; } .k2 .tr .vs { margin-left: 6px; } }
@media (max-width: 1250px) { .kgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); } .dash-bottom { grid-template-columns: 1fr; } }
@media (max-width: 1000px) { .brand .app-name { display: none; } }
@media (max-width: 860px) { .top-sep { display: none; } .user-chip > svg { display: none; } .user-chip .avatar { width: 34px; height: 34px; } .nav-foot { display: none; }
  .dash-head .actions { margin-left: 0; width: 100%; } .range-btn { min-width: 0; flex: 1; } .dropdown.notif { width: min(360px, calc(100vw - 24px)); right: -60px; } }
@media (max-width: 620px) { .kgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .topbar .search { display: none; } .rtbl .hide-sm { display: none; } }
.card-h > svg { width: 22px; height: 22px; flex-shrink: 0; color: var(--char); }
:root { --nav-w: 262px; }
.nav a { white-space: nowrap; }
.dash-bottom { grid-template-columns: minmax(0, 2.7fr) minmax(290px, 1fr); }
.rtbl { font-size: 12px; } .rtbl th, .rtbl td { padding: 8px 8px; } .rtbl td.prod { min-width: 130px; max-width: 190px; }
.rtbl td.cust { min-width: 110px; max-width: 160px; }
.rtbl th, .rtbl td { padding: 8px 6px; } .rtbl td.prod { max-width: 165px; } .rtbl td.cust { max-width: 140px; }
.dash-bottom { grid-template-columns: minmax(0, 2.8fr) minmax(280px, 1fr); }
.rtbl .btn.xs:not(.icon-only) { padding: 0 11px; } .rtbl .btn.xs.icon-only { width: 24px; }
@media (max-width: 620px) {
  .k2 { grid-template-columns: 30px 1fr; column-gap: 8px; padding: 12px 10px 10px; }
  .k2 .ic { width: 30px; height: 30px; } .k2 .ic svg { width: 17px; height: 17px; }
  .k2 .lbl { font-size: 12.5px; line-height: 1.25; } .k2 .val { font-size: 22px; margin: 4px 0 6px; }
  .k2 .tr { flex-wrap: wrap; gap: 2px 6px; font-size: 11.5px; } .k2 .tr .vs { margin-left: 0; }
  .dash-head h1 { font-size: 22px; } .dash-head .btn.primary { width: 100%; justify-content: center; }
}
/* level of interest — segmented control */
.seg { display: flex; gap: 6px; }
.seg-b { flex: 1; height: 36px; border: 1px solid var(--border-strong); background: var(--surface); border-radius: var(--radius-sm); cursor: pointer; font-weight: 600; color: var(--text-2); }
.seg-b:hover { background: var(--surface-2); }
.seg-b.on.red { background: var(--red-bg); border-color: var(--red); color: var(--red); }
.seg-b.on.amber { background: var(--amber-bg); border-color: var(--amber); color: var(--amber); }
.seg-b.on.blue { background: var(--blue-bg); border-color: var(--blue); color: var(--blue); }
label.check { display: flex; align-items: center; gap: 9px; font-weight: 500; cursor: pointer; margin-bottom: 10px; }
label.check input { width: 17px; height: 17px; accent-color: var(--aqua); }
/* attachments & quality comparison */
.files { display: flex; flex-direction: column; gap: 6px; }
.file-row { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2); }
.file-row svg { width: 17px; height: 17px; color: var(--text-2); flex-shrink: 0; }
.file-row .nm { font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-row select { margin-left: auto; height: 30px; }
.cmp { border-bottom: 1px solid var(--border); } .cmp:last-child { border-bottom: 0; }
.cmp-h { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 14px 8px; }
.modal h4 { font-size: 13px; font-weight: 700; color: var(--char); text-transform: uppercase; letter-spacing: .4px; }
.k2 > * { min-width: 0; } .k2 .val { overflow-wrap: anywhere; } .k2 .tr { overflow-wrap: anywhere; }
/* the sign-in page must fill the window (percentage heights need a sized #app) */
#app { min-height: 100%; }
.login-wrap { min-height: 100vh; min-height: 100dvh; }

/* ================================================================== compact density — fits a laptop window without losing the look */
:root { --top-h: 56px; --nav-w: 226px; }
.topbar { gap: 14px; padding: 0 16px 0 14px; }
.brand { gap: 12px; } .brand img { height: 32px; }
.brand .app-name { font-size: 15px; padding-left: 13px; }
.topbar .search { max-width: 460px; } .topbar .search input { height: 34px; font-size: 13px; padding-left: 36px; }
.topbar .search svg { top: 8px; left: 11px; width: 16px; height: 16px; }
.top-actions { gap: 10px; } .top-sep { height: 26px; }
.icon-btn { width: 34px; height: 34px; } .icon-btn svg { width: 18px; height: 18px; }
.user-chip { gap: 9px; padding: 3px 5px 3px 3px; } .user-chip .avatar { width: 32px; height: 32px; font-size: 12px; }
.user-chip .nm { font-size: 13px; } .user-chip .rl { font-size: 11px; }

.nav { padding: 10px 9px; } .nav a { padding: 7px 10px; gap: 11px; font-size: 13.5px; margin-bottom: 1px; }
.nav a svg { width: 18px; height: 18px; } .nav .count { font-size: 11px; padding: 0 6px; }
.nav-foot { padding: 18px 4px 2px; } .nav-foot svg { width: 54px; height: 58px; } .nav-foot span { font-size: 12px; }
.main { padding: 16px 18px 44px; }

.dash-head { margin-bottom: 14px; gap: 10px; }
.dash-head h1 { font-size: 21px; } .dash-head .sub { font-size: 13px; margin-top: 1px; }
.dash-head .actions { gap: 8px; } .dash-head .btn { height: 34px; border-radius: 7px; font-size: 13px; }
.dash-head .btn.primary { padding: 0 14px; font-size: 13px; }
.range-btn { min-width: 190px; font-size: 12.5px; } .filter-btn { width: 34px; }

.kgrid { gap: 10px; margin-bottom: 14px; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.k2 { padding: 11px 12px 10px; grid-template-columns: 32px 1fr; column-gap: 9px; border-radius: 9px; }
.k2 .ic { width: 32px; height: 32px; } .k2 .ic svg { width: 17px; height: 17px; }
.k2 .lbl { font-size: 12.5px; line-height: 1.25; } .k2 .val { font-size: 21px; margin: 3px 0 5px; }
.k2 .tr { font-size: 11.5px; gap: 4px; } .k2 .tr svg { width: 13px; height: 13px; } .k2 .tr .vs { margin-left: 6px; }

.card { margin-bottom: 12px; } .card-b { padding: 13px; }
.card-h { padding: 10px 13px; } .card-h h3 { font-size: 13.5px; } .card-h.big { padding: 11px 14px; } .card-h.big h3 { font-size: 14px; }
.card-h > svg, .card-h .h-ic { width: 18px; height: 18px; }
.lc { padding: 2px 10px 12px; } .lc-step { flex: 1 0 78px; } .lc-ic { width: 40px; height: 40px; margin-bottom: 6px; } .lc-ic svg { width: 19px; height: 19px; }
.lc-step b { font-size: 11.5px; line-height: 1.2; } .lc-step .n { font-size: 11px; } .lc-arrow { padding-top: 11px; flex-basis: 16px; } .lc-arrow svg { width: 15px; height: 15px; }
.lc-sub { font-size: 11px; padding: 4px 8px 5px 20px; margin-top: 5px; }
.rtbl th, .rtbl td { padding: 7px 6px; } .rtbl { font-size: 11.5px; }
.alert-row { padding: 9px 10px; margin-bottom: 8px; } .alert-row .ic { width: 32px; height: 32px; } .alert-row .ic svg { width: 17px; height: 17px; }
.alert-row .n { font-size: 18px; } .alert-row .t b { font-size: 12.5px; } .alert-row .t span { font-size: 11px; }
.tbl th { padding: 7px 10px; } .tbl td { padding: 7px 10px; } table.tbl { font-size: 12.5px; }
.tbl-tools { padding: 8px 10px; } .btn { height: 33px; font-size: 13px; } .btn.sm { height: 28px; }
.page-head { margin-bottom: 14px; } .page-head h1 { font-size: 20px; }
.dl dt { font-size: 10.5px; } .dl dd { font-size: 13px; }
.stepper { padding: 6px 4px; }

@media (max-width: 1380px) { .kgrid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 1150px) { .kgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); } .dash-bottom { grid-template-columns: 1fr; } }
@media (max-width: 820px) { .kgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* denser KPI rows and a lifecycle that wraps instead of scrolling sideways */
.k2 { padding: 10px 11px 9px; } .k2 .val { margin: 2px 0 4px; }
.lc { flex-wrap: wrap; justify-content: center; row-gap: 10px; overflow-x: visible; }
.lc-step { flex: 0 1 86px; }
@media (max-width: 1380px) { .kgrid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 1150px) { .kgrid { grid-template-columns: repeat(4, minmax(0, 1fr)); } .dash-bottom { grid-template-columns: 1fr; } }
@media (max-width: 900px) { .kgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 700px) { .kgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.k2 .tr { white-space: nowrap; font-size: 11px; } .k2 .tr .vs { margin-left: 5px; }
.lc-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; padding: 0 14px 12px; font-size: 11.5px; }
.lc-legend > b { color: var(--text-2); font-size: 11px; text-transform: uppercase; letter-spacing: .4px; margin-right: 2px; }
.lc-legend .src { text-decoration: none; } .lc-legend .src:hover { filter: brightness(.96); }
@media (max-width: 1150px) { .k2 .tr .vs { display: none; } }
/* keep the ten KPIs on two rows wherever they fit */
@media (min-width: 1151px) { .kgrid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.lc-step { flex: 0 1 80px; } .lc-arrow { flex-basis: 14px; } .lc { column-gap: 0; padding-left: 6px; padding-right: 6px; }
.tbl td.prod { max-width: 170px; } .tbl td { vertical-align: middle; }
.tbl td.prod, .tbl td { line-height: 1.35; }
.ell { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tbl td.prod { max-width: 165px; } .tbl td.cust { max-width: 145px; }
table.tbl { font-size: 12px; } .tbl th, .tbl td { padding: 7px 8px; }
/* in the stacked card layout there is no column to truncate against */
@media (max-width: 860px) {
  .tbl.cards td.prod, .tbl.cards td.cust { max-width: none; }
  .tbl.cards .ell { display: inline; white-space: normal; overflow: visible; text-overflow: clip; }
}
@media (max-width: 1320px) { .req-list .tbl th:nth-child(10), .req-list .tbl td:nth-child(10) { display: none; } }   /* Owner */
@media (max-width: 1180px) { .req-list .tbl th:nth-child(9), .req-list .tbl td:nth-child(9) { display: none; } }     /* Required date */
@media (max-width: 860px) { .req-list .tbl.cards td:nth-child(9), .req-list .tbl.cards td:nth-child(10) { display: flex; } }   /* stacked cards show every field again */
