/* CDMS — Codersys Distribution Management System. Plain CSS, no build step. */

:root {
    --ink: #0f2a2e;
    --ink-2: #16393e;
    --ink-3: #20494f;
    --text: #1d2a2c;
    --muted: #63727a;
    --line: #e2e7e9;
    --bg: #f4f6f7;
    --card: #ffffff;
    --primary: #0f766e;
    --primary-dark: #0b5e57;
    --primary-soft: #e6f4f2;
    --accent: #d97706;
    --accent-soft: #fdf3e3;
    --danger: #b42318;
    --danger-soft: #fdecea;
    --success: #157f3d;
    --success-soft: #e7f6ec;
    --info-soft: #eaf2fb;
    --radius: 10px;
    --shadow: 0 1px 2px rgba(16, 42, 46, .06), 0 1px 3px rgba(16, 42, 46, .04);
    --sidebar-w: 248px;
    --font: "Hind Siliguri", "Noto Sans Bengali", "Nirmala UI", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 15px; line-height: 1.55; color: var(--text); background: var(--bg); }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.3; margin: 0; }
code { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: .88em; background: rgba(15, 42, 46, .06); padding: .1em .4em; border-radius: 4px; }
.icon { flex-shrink: 0; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.inline { display: inline; }

/* ---------- App shell ---------- */
.sidebar {
    position: fixed; inset: 0 auto 0 0; width: var(--sidebar-w); z-index: 40;
    background: var(--ink); color: #cfe0e2; display: flex; flex-direction: column;
    transition: transform .2s ease;
}
.brand { display: flex; align-items: center; justify-content: space-between; padding: 20px 20px 16px; border-bottom: 1px solid rgba(255,255,255,.07); }
.brand-link { display: flex; flex-direction: column; color: #fff; text-decoration: none !important; }
.brand-mark { font-weight: 700; font-size: 1.35rem; letter-spacing: .08em; color: #fff; }
.brand-mark::after { content: ""; display: inline-block; width: 7px; height: 7px; margin-left: 4px; border-radius: 2px; background: var(--accent); }
.brand-sub { font-size: .78rem; color: #8fb0b4; letter-spacing: .02em; }
.nav { flex: 1; overflow-y: auto; padding: 12px 10px; display: flex; flex-direction: column; gap: 2px; }
.nav-item {
    display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 8px;
    color: #cfe0e2; font-weight: 500; text-decoration: none !important;
}
.nav-item:hover { background: var(--ink-2); color: #fff; }
.nav-item.is-active { background: var(--ink-3); color: #fff; box-shadow: inset 3px 0 0 var(--accent); }
.nav-item span:nth-child(2) { flex: 1; }
.nav-pill { font-size: .68rem; font-weight: 600; padding: 1px 7px; border-radius: 99px; background: var(--accent); color: #fff; }
.nav-soon { font-size: .68rem; color: #7f9fa3; border: 1px solid #3a5f64; padding: 0 6px; border-radius: 99px; }
.nav-item.is-primary:not(.is-active) { color: #fff; }
.sidebar-foot { padding: 14px 20px; font-size: .72rem; color: #6f9196; border-top: 1px solid rgba(255,255,255,.07); }
.sidebar-close { display: none; color: #cfe0e2; }

.main { margin-left: var(--sidebar-w); min-height: 100vh; display: flex; flex-direction: column; }
.topbar {
    position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px;
    padding: 12px 28px; background: rgba(255,255,255,.92); backdrop-filter: blur(6px);
    border-bottom: 1px solid var(--line);
}
.topbar-title { flex: 1; font-size: 1.2rem; font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar-actions { display: flex; align-items: center; gap: 12px; }
.menu-btn { display: none; }
.user-chip { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.2; }
.user-name { font-weight: 600; font-size: .9rem; }
.user-role { font-size: .75rem; color: var(--muted); }
.content { flex: 1; padding: 24px 28px 32px; width: 100%; max-width: 1280px; }
.footer { padding: 14px 28px; font-size: .8rem; color: var(--muted); border-top: 1px solid var(--line); }
.backdrop { display: none; }

.icon-btn {
    display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px;
    border: 0; border-radius: 8px; background: transparent; color: inherit; cursor: pointer;
}
.icon-btn:hover { background: rgba(15, 42, 46, .07); }
.icon-btn.sidebar-close, .icon-btn.menu-btn { display: none; }

.locale-switch { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #fff; }
.locale-switch form { margin: 0; }
.locale-switch button { border: 0; background: transparent; padding: 5px 10px; font: inherit; font-size: .82rem; cursor: pointer; color: var(--muted); }
.locale-switch button.is-active { background: var(--primary); color: #fff; }

/* ---------- Cards, sections ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; }
.card-flush { padding: 0; overflow: hidden; }
.card-title { font-size: 1.05rem; font-weight: 600; margin-bottom: 14px; }
.section-title { font-size: .82rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; margin: 26px 0 10px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-top: 18px; }

.hero { display: flex; gap: 18px; align-items: flex-start; border-left: 4px solid var(--accent); background: linear-gradient(90deg, var(--accent-soft), #fff 60%); }
.hero-icon { width: 56px; height: 56px; border-radius: 12px; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.hero-body { flex: 1; }
.hero-body h2 { font-size: 1.4rem; margin: 2px 0 6px; }
.hero-body p { margin: 0 0 6px; max-width: 70ch; }
.hero-next { color: var(--muted); font-size: .92rem; }
.eyebrow { font-size: .74rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; color: var(--accent); }

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.stat { display: flex; flex-direction: column; gap: 2px; color: inherit; text-decoration: none !important; transition: border-color .15s; }
a.stat:hover { border-color: var(--primary); }
.stat-label { font-size: .88rem; color: var(--muted); font-weight: 500; }
.stat-value { font-size: 1.9rem; font-weight: 700; line-height: 1.2; font-variant-numeric: tabular-nums; }
.stat-meta { font-size: .78rem; color: var(--muted); }

.checklist, .module-list { list-style: none; margin: 0; padding: 0; }
.checklist li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.checklist li:last-child { border-bottom: 0; }
.check-dot { width: 20px; height: 20px; border-radius: 50%; border: 2px solid #c3ced1; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.checklist li.is-done .check-dot { background: var(--success); border-color: var(--success); color: #fff; }
.checklist li.is-done a, .checklist li.is-done span:last-child { color: var(--muted); text-decoration: line-through; }
.module-list li { display: flex; align-items: center; gap: 10px; padding: 7px 0; color: var(--text); }
.module-list li span:nth-child(2) { flex: 1; }

.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.tile { display: flex; flex-direction: column; gap: 4px; color: var(--text); text-decoration: none !important; }
.tile .icon { color: var(--primary); margin-bottom: 4px; }
.tile:hover { border-color: var(--primary); }
.tile-title { font-weight: 600; }

.details { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 0; }
.details dt { color: var(--muted); }
.details dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }
.role { padding: 10px 0; border-top: 1px solid var(--line); }
.role-head { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font-size: .76rem; padding: 2px 8px; border-radius: 99px; background: var(--bg); border: 1px solid var(--line); }
.chip-accent { background: var(--accent-soft); border-color: #f3d29d; color: #8a4b05; }

/* ---------- Toolbar, tables ---------- */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.filters { display: flex; flex-wrap: wrap; gap: 10px; flex: 1; }
.search { position: relative; display: flex; align-items: center; flex: 1; max-width: 380px; min-width: 200px; }
.search .icon { position: absolute; left: 11px; color: var(--muted); pointer-events: none; }
.search input[type=search] { padding-left: 36px; }
.filters select { width: auto; min-width: 180px; }

.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th { text-align: left; font-weight: 600; font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); background: #fafbfb; padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tbody tr:hover { background: #fafcfc; }
.table tbody tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table .actions { text-align: right; white-space: nowrap; }
.table .actions > * + * { margin-left: 4px; }
.code { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: .84rem; background: var(--bg); border: 1px solid var(--line); padding: 1px 6px; border-radius: 4px; }
.table .code { white-space: nowrap; }

.badge { display: inline-block; font-size: .74rem; font-weight: 600; padding: 2px 8px; border-radius: 99px; white-space: nowrap; vertical-align: middle; }
.badge-success { background: var(--success-soft); color: var(--success); }
.badge-muted { background: #eef1f2; color: var(--muted); }
.badge-accent { background: var(--accent-soft); color: #8a4b05; margin-left: 6px; }

.pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; border-top: 1px solid var(--line); }
.pagination-info { font-size: .85rem; color: var(--muted); }
.pagination-links { display: flex; gap: 6px; }

.empty { text-align: center; padding: 48px 20px; }
.empty-icon { width: 56px; height: 56px; margin: 0 auto 12px; border-radius: 50%; background: var(--primary-soft); color: var(--primary); display: flex; align-items: center; justify-content: center; }
.empty-title { font-weight: 600; font-size: 1.05rem; margin: 0 0 6px; }
.empty-body { color: var(--muted); max-width: 52ch; margin: 0 auto; }
.empty-body p { margin: 0 0 10px; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 16px;
    border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--text);
    font: inherit; font-weight: 500; font-size: .92rem; cursor: pointer; text-decoration: none !important; white-space: nowrap;
}
.btn:hover { border-color: #c5cfd2; background: #fafbfb; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); }
.btn-sm { padding: 4px 10px; font-size: .82rem; }
.btn-block { width: 100%; }
.btn-danger-ghost { color: var(--danger); }
.btn-danger-ghost:hover { background: var(--danger-soft); border-color: #f1b8b2; }
.btn.is-disabled { opacity: .45; pointer-events: none; }

/* ---------- Forms ---------- */
.form-card { max-width: 920px; }
.form-section { font-size: .95rem; font-weight: 600; margin: 4px 0 12px; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.form-section:not(:first-of-type) { margin-top: 22px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 18px; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line); }
.stack { display: flex; flex-direction: column; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field-wide { grid-column: 1 / -1; }
.field label { font-weight: 500; font-size: .9rem; }
.req { color: var(--danger); margin-left: 3px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=tel], input[type=search], input[type=date], select, textarea {
    width: 100%; padding: 9px 12px; font: inherit; font-size: .95rem; color: var(--text);
    background: #fff; border: 1px solid #cfd8db; border-radius: 8px; transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(15, 118, 110, .15); }
select:disabled { background: var(--bg); color: var(--muted); }
.has-error input, .has-error select, .has-error textarea { border-color: var(--danger); }
.hint { color: var(--muted); font-size: .8rem; }
.error { color: var(--danger); font-size: .82rem; font-weight: 500; }
.field-check { justify-content: flex-end; }
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 500; }
.check input { width: 17px; height: 17px; accent-color: var(--primary); }
fieldset.field { border: 0; margin: 0; padding: 0; }
fieldset.field legend { font-weight: 500; font-size: .9rem; margin-bottom: 6px; padding: 0; }
.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px 16px; }

.alert { padding: 11px 14px; border-radius: 8px; margin-bottom: 16px; font-size: .92rem; border: 1px solid transparent; }
.alert-success { background: var(--success-soft); color: var(--success); border-color: #bfe5cb; }
.alert-danger { background: var(--danger-soft); color: var(--danger); border-color: #f5c2bd; }
.alert-info { background: var(--info-soft); color: #1d4f86; border-color: #c7dbf2; }

/* ---------- Inventory ---------- */
.tabs { display: flex; gap: 4px; overflow-x: auto; overflow-y: hidden; margin: -4px 0 18px; border-bottom: 1px solid var(--line); -webkit-overflow-scrolling: touch; }
.tab { padding: 9px 14px; color: var(--muted); font-weight: 500; white-space: nowrap; border-bottom: 2px solid transparent; margin-bottom: -1px; text-decoration: none !important; }
.tab:hover { color: var(--text); }
.tab.is-active { color: var(--primary); border-bottom-color: var(--primary); }
.stats-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); margin-bottom: 18px; }
.stats-6 .stat-value { font-size: 1.5rem; }
.stat-warn { border-left: 3px solid var(--accent); }
.stat-danger { border-left: 3px solid var(--danger); }
.toolbar-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.segmented { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #fff; }
.segmented a { padding: 7px 14px; color: var(--muted); font-weight: 500; text-decoration: none !important; }
.segmented a.is-active { background: var(--primary); color: #fff; }
.filter-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 12px; margin-bottom: 16px; flex: 1; }
.toolbar > .filter-bar { margin-bottom: 0; }
.filter-bar select, .filter-bar input[type=date] { width: auto; min-width: 140px; padding: 7px 10px; }
.filter-bar .search { min-width: 180px; }
.filter-actions { display: flex; gap: 6px; margin-left: auto; }
.inline-field { display: inline-flex; align-items: center; gap: 6px; font-size: .85rem; color: var(--muted); }
.input-sm { width: auto !important; max-width: 170px; padding: 7px 10px !important; }
.qty { font-variant-numeric: tabular-nums; }
.qty-pos { color: var(--success); font-weight: 600; }
.qty-neg { color: var(--danger); font-weight: 600; }
.qty-ctn { display: block; }
.badge-warning { background: var(--accent-soft); color: #8a4b05; }
.badge-danger { background: var(--danger-soft); color: var(--danger); }
.badge-info { background: var(--info-soft); color: #1d4f86; }
.alert-warning { background: var(--accent-soft); color: #7a4204; border-color: #f3d29d; }
.formula { margin-top: 14px; }
.grid-top { margin-top: 0; margin-bottom: 18px; }
.line-items input, .line-items select { min-width: 90px; }
.line-items td:first-child { min-width: 260px; }
.line-items .num input { text-align: right; }
.line-items tfoot td { background: #fafbfb; border-top: 1px solid var(--line); padding: 10px 14px; }
.input-qty { max-width: 130px; text-align: right; margin-left: auto; }
.row-variance { background: #fffaf1; }
.form-actions-pad { padding: 0 16px 16px; }
.form-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.danger-zone { margin-top: 18px; border-color: #f1c9c4; }
.inline-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; }
.inline-form .field { flex: 1; min-width: 220px; }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-danger:hover { background: #8f1c13; border-color: #8f1c13; }
.reject-form { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.hero-stats { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 10px; }
.hero-stats a { color: var(--text); font-size: .9rem; text-decoration: none !important; }
.hero-stats strong { font-size: 1.15rem; margin-right: 3px; }
.hero-stats a.is-warn strong { color: var(--accent); }
.hero-stats a.is-danger strong { color: var(--danger); }

/* ---------- Sales ---------- */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { padding: 8px 0 8px 14px; border-left: 2px solid var(--line); position: relative; }
.timeline li::before { content: ""; position: absolute; left: -5px; top: 14px; width: 8px; height: 8px; border-radius: 50%; background: var(--primary); }
.timeline li .muted { margin-left: 6px; }
.credit-note { margin: 14px 0 0; }
.line-stock .small { white-space: nowrap; }

/* ---------- Guest pages ---------- */
.guest { background: radial-gradient(circle at 20% 0%, #dff0ed, var(--bg) 55%); }
.guest-wrap { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 32px 16px; }
.guest-top { position: absolute; top: 16px; right: 16px; }
.guest-brand { text-align: center; margin-bottom: 18px; }
.brand-mark-lg { color: var(--ink); font-size: 2rem; }
.guest-name { color: var(--muted); font-size: .95rem; }
.guest-card { width: 100%; max-width: 420px; padding: 26px; }
.guest-card .card-title { font-size: 1.15rem; }
.guest-foot { color: var(--muted); font-size: .8rem; margin-top: 18px; }

/* ---------- Responsive ---------- */
@media (max-width: 1200px) {
    .stats-6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1024px) {
    .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .form-grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .grid-2 { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
    .sidebar { transform: translateX(-100%); box-shadow: 0 0 40px rgba(0,0,0,.25); }
    body.sidebar-open .sidebar { transform: none; }
    body.sidebar-open .backdrop { display: block; position: fixed; inset: 0; z-index: 30; background: rgba(15, 42, 46, .45); }
    .icon-btn.sidebar-close, .icon-btn.menu-btn { display: inline-flex; }
    .main { margin-left: 0; }
    .topbar { padding: 10px 16px; }
    .content { padding: 16px; }
    .footer { padding: 12px 16px; }
    .user-chip { display: none; }
}
@media (max-width: 640px) {
    .form-grid { grid-template-columns: 1fr; }
    .hero { flex-direction: column; }
    .search { max-width: none; }
    .filters select { width: 100%; }
    .toolbar > .btn-primary { width: 100%; }
    .stat-value { font-size: 1.55rem; }
    .details { grid-template-columns: 1fr; gap: 0; }
    .details dd { margin-bottom: 8px; }
    .form-grid-3 { grid-template-columns: 1fr; }
    .filter-bar > *, .filter-bar select, .filter-bar input[type=date], .input-sm { width: 100% !important; max-width: none; }
    .filter-actions { margin-left: 0; }

    /* Data tables become stacked cards on phones; each cell shows its column label. */
    .table:has(td[data-label]) thead { display: none; }
    .table:has(td[data-label]), .table:has(td[data-label]) tbody, .table:has(td[data-label]) tr, .table:has(td[data-label]) td { display: block; width: 100%; }
    .table:has(td[data-label]) tr { padding: 10px 14px; border-bottom: 1px solid var(--line); }
    .table:has(td[data-label]) td { border: 0; padding: 3px 0; text-align: left !important; }
    .table td[data-label]::before { content: attr(data-label); display: block; font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
    .table td.num[data-label] { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
    .table td.num[data-label]::before { display: inline; }
    .table:has(td[data-label]) td.actions { text-align: left !important; padding-top: 6px; }
    .table:has(td[data-label]) tfoot { display: block; }
    .input-qty { max-width: none; }
    .line-items td:first-child { min-width: 0; }
}

/* ---------- Charts (server-rendered; one blue series, status colours only with labels) ---------- */
:root {
    --viz-series: #2a78d6;
    --viz-good: #0ca30c;
    --viz-warning: #fab219;
    --viz-critical: #d03b3b;
    --viz-grid: #e8ecee;
}
.chart { margin: 0; }
.chart-title { font-weight: 600; font-size: .92rem; margin-bottom: 6px; color: var(--text); }
.chart-scale { text-align: right; font-variant-numeric: tabular-nums; }
.chart-svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart-grid { stroke: var(--viz-grid); stroke-width: 1; }
.chart-baseline { stroke: var(--muted); stroke-width: 1; }
.chart-bar { fill: var(--viz-series); }
.chart-bar-neg { fill: var(--viz-series); opacity: .6; }
.chart-hit { fill: transparent; }
.chart-col:hover .chart-hit { fill: rgba(42, 120, 214, .07); }
.chart-axis { font-size: 10px; fill: var(--muted); }
.chart-empty { padding: 24px 0; text-align: center; }
.chart-table { margin-top: 6px; }
.chart-table summary { cursor: pointer; color: var(--muted); }
.chart-table .table td { padding: 4px 8px; }
.hbars { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.hbars li { display: grid; grid-template-columns: minmax(90px, 32%) 1fr auto; align-items: center; gap: 10px; font-size: .85rem; }
.hbar-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbar-track { height: 14px; display: block; }
.hbar { display: block; height: 100%; border-radius: 0 4px 4px 0; background: var(--viz-series); }
.hbar-good { background: var(--viz-good); }
.hbar-warning { background: var(--viz-warning); }
.hbar-critical { background: var(--viz-critical); }
.hbar-value { font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--text); }
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-bottom: 18px; }
.chart-grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; margin-bottom: 18px; }
.chart-grid-2 > .card { min-width: 0; }
.chart-grid-2 > .chart-wide { grid-column: 1 / -1; }
