@font-face { font-family: Inter; src: url('../fonts/InterVariable.woff2') format('woff2'); font-style: normal; font-weight: 100 900; font-display: swap; }

:root {
    --ink: #101828;
    --ink-soft: #475467;
    --muted: #8a94a6;
    --line: #e4e8ee;
    --line-soft: #f1f4f8;
    --surface: #ffffff;
    --canvas: #f4f6f9;
    --primary: #1d6f5f;
    --primary-hover: #175a4d;
    --primary-soft: #e8f3f0;
    --accent: #b5832c;
    --accent-soft: #fbf3e4;
    --info: #2563eb;
    --info-soft: #eaf1ff;
    --success: #15803d;
    --success-soft: #e9f6ee;
    --danger: #c0352b;
    --danger-soft: #fdedec;
    --warning: #b45309;
    --warning-soft: #fef4e6;
    --shadow: 0 1px 2px rgba(16, 24, 40, .05);
    --shadow-md: 0 6px 18px rgba(16, 24, 40, .07);
    font-family: Inter, Arial, sans-serif;
    color: var(--ink);
    background: var(--canvas);
    -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }
html { min-height: 100%; }
body { margin: 0; min-height: 100vh; background: var(--canvas); font-size: 14px; line-height: 1.5; }
button, input, select, textarea { font: inherit; }
a { color: inherit; text-decoration: none; }

/* Layout */
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 256px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 18px 14px 16px; border-right: 1px solid var(--line); background: linear-gradient(180deg, #ffffff 0%, #ffffff 55%, #f5f9f7 100%); overflow-y: auto; z-index: 20; scrollbar-width: thin; scrollbar-color: #d7dde5 transparent; }
.brand { display: flex; align-items: center; gap: 11px; margin: 0 2px 10px; padding: 6px 8px 16px; border-bottom: 1px solid var(--line-soft); }
.brand-logo { width: 38px; height: 38px; padding: 4px; border: 1px solid var(--line); border-radius: 10px; background: #fff; object-fit: contain; box-shadow: var(--shadow); }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 12px; font-weight: 700; letter-spacing: 1.1px; color: var(--ink); }
.brand small { margin-top: 2px; color: var(--accent); font-size: 9px; font-weight: 600; letter-spacing: 1.6px; }
.primary-nav { display: grid; gap: 1px; }
.nav-section { margin: 18px 10px 6px; color: #a0a9b8; font-size: 10px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; }
.nav-item { position: relative; min-height: 36px; display: flex; align-items: center; gap: 11px; padding: 7px 10px; border-radius: 8px; color: var(--ink-soft); font-size: 13px; font-weight: 500; transition: background .12s ease, color .12s ease; }
a.nav-item:hover, .nav-group summary.nav-item:hover { color: var(--ink); background: #f1f4f8; }
.nav-item.active { color: var(--primary); background: var(--primary-soft); font-weight: 600; }
.nav-item.active::before { content: ''; position: absolute; left: -14px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--primary); }
.nav-icon { min-width: 20px; height: 20px; display: grid; place-items: center; color: var(--muted); }
.nav-icon .icon { width: 18px; height: 18px; }
a.nav-item:hover .nav-icon { color: var(--ink-soft); }
.nav-item.active .nav-icon { color: var(--primary); }
.nav-disabled { color: #9aa3b2; cursor: not-allowed; }
.nav-disabled .nav-icon { color: #b8c0cc; }
.nav-disabled small { margin-left: auto; padding: 1px 7px; border: 1px solid var(--line); border-radius: 99px; color: #9aa3b2; background: #fff; font-size: 9px; font-weight: 600; letter-spacing: .3px; }
.nav-group summary { cursor: pointer; list-style: none; }
.nav-group summary::-webkit-details-marker { display: none; }
.nav-submenu { display: grid; gap: 1px; margin: 2px 0 6px 20px; padding-left: 12px; border-left: 1px solid var(--line); }
.nav-submenu a { padding: 6px 9px; border-radius: 7px; color: var(--ink-soft); font-size: 12.5px; }
.nav-submenu a:hover { color: var(--ink); background: var(--line-soft); }
.nav-submenu a.active { color: var(--primary); background: var(--primary-soft); font-weight: 600; }
.sidebar-footer { margin-top: auto; padding: 20px 2px 0; }
.sidebar-card { display: grid; gap: 10px; padding: 14px; border: 1px solid #d6e9e3; border-radius: 12px; background: linear-gradient(135deg, #f1f8f5, #ffffff); }
.sidebar-card-head { display: flex; align-items: center; gap: 10px; }
.sidebar-card .metric-icon { min-width: 32px; height: 32px; border-radius: 9px; }
.sidebar-card .metric-icon .icon { width: 16px; height: 16px; }
.sidebar-footer strong, .sidebar-footer span { display: block; }
.sidebar-footer strong { color: var(--ink); font-size: 12px; font-weight: 600; }
.sidebar-footer span { margin-top: 1px; color: var(--muted); font-size: 11px; }
.sidebar-footer .progress span { margin: 0; }
.leather-outline { display: none; }

.main-column { min-width: 0; }
.topbar { position: sticky; top: 0; z-index: 15; min-height: 58px; display: flex; align-items: center; gap: 12px; padding: 0 24px; border-bottom: 1px solid var(--line); background: var(--surface); }
.icon-button { width: 36px; height: 36px; display: none; place-items: center; border: 1px solid var(--line); border-radius: 8px; color: var(--ink-soft); background: var(--surface); cursor: pointer; }
.global-search { width: min(420px, 40vw); display: flex; align-items: center; gap: 8px; padding: 0 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--canvas); color: var(--muted); }
.global-search input { width: 100%; height: 32px; border: 0; outline: 0; background: transparent; color: var(--ink-soft); font-size: 13px; }
.topbar-spacer { flex: 1; }
.environment-pill { padding: 4px 10px; border: 1px solid #cfe5df; border-radius: 99px; color: var(--primary); background: var(--primary-soft); font-size: 10px; font-weight: 600; letter-spacing: .4px; text-transform: uppercase; }
.user-menu { position: relative; }
.user-menu summary { display: flex; align-items: center; gap: 9px; cursor: pointer; list-style: none; }
.user-menu summary::-webkit-details-marker { display: none; }
.user-menu strong, .user-menu small { display: block; max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-menu strong { font-size: 13px; font-weight: 600; }
.user-menu small { color: var(--muted); font-size: 11px; }
.avatar { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: linear-gradient(135deg, var(--primary), #2f8f7a); font-size: 12px; font-weight: 600; }
.user-menu-panel { position: absolute; top: 44px; right: 0; width: 240px; display: grid; gap: 8px; padding: 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); box-shadow: 0 8px 24px rgba(24,24,27,.08); }
.user-menu-panel p { margin: 0 0 4px; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }

.content { padding: 28px 24px 40px; }
.page-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-bottom: 20px; }
.page-heading h1 { margin: 0 0 4px; font-size: 20px; font-weight: 600; letter-spacing: -.2px; color: var(--ink); }
.page-heading p:not(.eyebrow) { margin: 0; color: var(--ink-soft); font-size: 13px; }
.eyebrow { margin: 0 0 6px; color: var(--muted); font-size: 10px; font-weight: 600; letter-spacing: .9px; text-transform: uppercase; }
.eyebrow.gold { color: var(--accent); }
.date-card { min-width: 140px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); box-shadow: var(--shadow); }
.date-card span, .date-card strong { display: block; }
.date-card span { color: var(--muted); font-size: 10px; letter-spacing: .4px; text-transform: uppercase; }
.date-card strong { margin-top: 2px; font-size: 13px; font-weight: 600; }

/* Metrics */
.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 12px; }
.metric-card { display: flex; align-items: flex-start; gap: 12px; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: var(--shadow); transition: box-shadow .15s ease, border-color .15s ease; }
a.metric-card:hover { border-color: #cfe5df; box-shadow: var(--shadow-md); }
.metric-icon { min-width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; color: var(--primary); background: var(--primary-soft); }
.metric-icon .icon { width: 18px; height: 18px; }
.tone-accent { color: var(--accent); background: var(--accent-soft); }
.tone-info { color: var(--info); background: var(--info-soft); }
.tone-success { color: var(--success); background: var(--success-soft); }
.tone-warning { color: var(--warning); background: var(--warning-soft); }
.tone-danger { color: var(--danger); background: var(--danger-soft); }
.metric-card p, .metric-card strong, .metric-card small { display: block; }
.metric-card p { margin: 0; color: var(--ink-soft); font-size: 12px; font-weight: 500; }
.metric-card strong { margin: 3px 0 2px; font-size: 20px; font-weight: 600; letter-spacing: -.3px; color: var(--ink); font-variant-numeric: tabular-nums; }
.metric-card small { color: var(--muted); font-size: 11.5px; }

/* Panels */
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(300px, .75fr); gap: 12px; margin-bottom: 12px; }
.dashboard-grid.lower-grid { grid-template-columns: minmax(0, 1.25fr) minmax(320px, .75fr); }
.panel { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: var(--shadow); }
.panel-heading { min-height: 52px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.panel-heading h2 { margin: 0; font-size: 14px; font-weight: 600; }
.status { display: inline-flex; align-items: center; justify-content: center; padding: 3px 8px; border-radius: 99px; font-size: 10px; font-weight: 600; white-space: nowrap; }
.status-active { color: var(--success); background: var(--success-soft); }
.status-muted { color: var(--muted); background: var(--line-soft); }
.status-warning { color: var(--warning); background: var(--warning-soft); }
.status-danger { color: var(--danger); background: var(--danger-soft); }
.status-info { color: var(--info); background: var(--info-soft); }

.phase-track { padding: 6px 18px 16px; }
.phase-step { position: relative; display: flex; gap: 12px; padding: 9px 0; }
.phase-step:not(:last-child)::after { content: ''; position: absolute; left: 13px; top: 36px; bottom: -6px; width: 1px; background: var(--line); }
.phase-step > span { z-index: 1; width: 27px; height: 27px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; color: var(--muted); background: var(--surface); font-size: 10px; font-weight: 600; }
.phase-step.current > span { color: #fff; border-color: var(--primary); background: var(--primary); }
.phase-step.done > span { color: var(--primary); border-color: #cfe5df; background: var(--primary-soft); }
.phase-step strong, .phase-step small { display: block; }
.phase-step strong { font-size: 12px; font-weight: 600; }
.phase-step small { margin-top: 2px; color: var(--muted); font-size: 11px; }

.readiness-panel { padding-bottom: 16px; }
.readiness-score { display: flex; align-items: baseline; gap: 8px; padding: 18px 18px 4px; }
.readiness-score strong { font-size: 30px; font-weight: 600; letter-spacing: -.5px; }
.readiness-score span { color: var(--muted); font-size: 12px; }
.check-list { display: grid; gap: 8px; margin: 12px 18px 16px; padding: 0; list-style: none; }
.check-list li { position: relative; padding-left: 24px; color: var(--muted); font-size: 12px; }
.check-list li::before { content: ''; position: absolute; left: 0; top: 2px; width: 14px; height: 14px; border: 1px solid var(--line); border-radius: 50%; }
.check-list li.done { color: var(--ink-soft); }
.check-list li.done::before { content: '\2713'; display: grid; place-items: center; color: #fff; border-color: var(--success); background: var(--success); font-size: 9px; }
.policy-note { display: flex; align-items: center; gap: 10px; margin: 0 18px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; }
.policy-note strong { color: var(--ink); font-size: 18px; font-weight: 600; }
.policy-note span { color: var(--muted); font-size: 11px; }

.quick-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 16px; }
.quick-link { display: flex; align-items: center; gap: 10px; padding: 11px; border: 1px solid var(--line); border-radius: 8px; transition: background .12s ease; }
.quick-link:hover { background: var(--line-soft); }
.quick-link > span { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 7px; color: var(--muted); background: var(--line-soft); font-size: 9px; font-weight: 600; }
.quick-link div { min-width: 0; flex: 1; }
.quick-link strong, .quick-link small { display: block; }
.quick-link strong { font-size: 12px; font-weight: 600; }
.quick-link small { margin-top: 2px; color: var(--muted); font-size: 11px; }
.quick-link b { color: var(--muted); font-weight: 400; }

.activity-list { padding: 4px 18px 14px; }
.activity-item { display: grid; grid-template-columns: 8px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line-soft); }
.activity-item:last-child { border-bottom: 0; }
.activity-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--muted); }
.activity-item strong, .activity-item small { display: block; }
.activity-item strong { font-size: 12px; font-weight: 600; }
.activity-item small, .activity-item time { color: var(--muted); font-size: 11px; }

/* Forms */
.master-grid { display: grid; grid-template-columns: minmax(280px, 340px) minmax(0, 1fr); gap: 12px; align-items: start; }
.form-panel { position: sticky; top: 74px; }
.stack-form { display: grid; gap: 14px; padding: 18px; }
.stack-form label:not(.check-row) { display: grid; gap: 6px; color: var(--ink-soft); font-size: 12px; font-weight: 500; }
.stack-form input:not([type="checkbox"]), .stack-form select, .stack-form textarea,
.settings-form input, .settings-form select, .settings-form textarea,
.filter-bar input, .filter-bar select {
    width: 100%; min-height: 38px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 6px;
    color: var(--ink); background: var(--surface); font-size: 13px; outline: none;
    transition: border-color .12s ease, box-shadow .12s ease;
}
.stack-form input:focus, .stack-form select:focus, .stack-form textarea:focus,
.settings-form input:focus, .settings-form select:focus, .settings-form textarea:focus,
.filter-bar input:focus, .filter-bar select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(29,111,95,.12); }
.stack-form input::placeholder, .settings-form input::placeholder { color: #b4b8bd; }
.check-row { display: flex; align-items: center; gap: 8px; color: var(--ink-soft); font-size: 12px; }
.check-row input { width: 15px; height: 15px; accent-color: var(--primary); }
.field-error { color: var(--danger); font-size: 11px; }
.field-note { display: inline-block; margin-top: 3px; color: var(--muted); font-size: 11px; line-height: 1.4; }

.table-panel { min-width: 0; }
.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table th, .data-table td { padding: 11px 16px; border-bottom: 1px solid var(--line-soft); text-align: left; vertical-align: middle; }
.data-table tr:last-child td { border-bottom: 0; }
.data-table td:first-child { min-width: 240px; }
.data-table th { color: var(--ink-soft); background: #f8fafc; border-bottom-color: var(--line); font-size: 11px; font-weight: 600; letter-spacing: .3px; text-transform: uppercase; white-space: nowrap; }
.data-table tbody tr:hover td { background: #fafcfd; }
.data-table td a { color: var(--primary); }
.data-table td a.button { color: inherit; }
.actions-cell { position: relative; }
.row-editor summary { list-style: none; cursor: pointer; }
.row-editor summary::-webkit-details-marker { display: none; }
.row-editor-panel { position: absolute; z-index: 10; top: 40px; right: 12px; width: 300px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); box-shadow: 0 12px 32px rgba(24,24,27,.12); }
.row-editor-panel > form:last-child { padding: 0 18px 18px; }
.pagination-row { display: flex; align-items: center; justify-content: center; gap: 14px; padding: 14px; color: var(--muted); font-size: 12px; }

.password-panel { max-width: 820px; }
.password-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; align-items: start; }
.password-rules { margin: 18px 18px 18px 0; padding: 16px; border: 1px solid var(--line); border-radius: 8px; }
.password-rules > strong { font-size: 13px; font-weight: 600; }
.password-rules .check-list { margin: 14px 0 0; }

.choice-fieldset, .permission-group { display: grid; gap: 8px; margin: 0; padding: 12px; border: 1px solid var(--line); border-radius: 8px; }
.choice-fieldset legend, .permission-group legend { padding: 0 5px; color: var(--muted); font-size: 10px; font-weight: 600; letter-spacing: .4px; text-transform: uppercase; }
.role-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.role-card { min-width: 0; }
.permission-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 16px; }
.permission-form > .button { grid-column: 1 / -1; }
.locked-role { display: grid; gap: 4px; padding: 24px 18px; color: var(--ink-soft); font-size: 13px; }
.locked-role span { color: var(--muted); font-size: 12px; }

.settings-panel { max-width: 880px; }
.settings-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; padding: 18px; }
.settings-form label { display: grid; gap: 6px; color: var(--ink-soft); font-size: 12px; font-weight: 500; }
.full-field { grid-column: 1 / -1; }

.filter-bar { display: flex; align-items: end; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.filter-bar label { display: grid; gap: 5px; min-width: 170px; color: var(--ink-soft); font-size: 12px; font-weight: 500; }
.button-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.audit-details summary { color: var(--ink-soft); cursor: pointer; font-size: 12px; }
.audit-details pre { max-width: 360px; max-height: 220px; overflow: auto; margin: 8px 0 0; padding: 10px; border: 1px solid var(--line); border-radius: 6px; color: var(--ink-soft); background: var(--canvas); font-size: 11px; }

/* Controls */
.button { display: inline-flex; min-height: 36px; align-items: center; justify-content: center; gap: 7px; padding: 8px 14px; border: 1px solid transparent; border-radius: 6px; cursor: pointer; font-size: 13px; font-weight: 500; transition: background .12s ease, border-color .12s ease, color .12s ease; }
.button-primary { color: #fff; background: var(--primary); box-shadow: 0 1px 2px rgba(16,24,40,.08); }
.button-primary:hover { background: var(--primary-hover); }
.button-secondary { color: var(--ink); border-color: var(--line); background: var(--surface); }
.button-secondary:hover { background: var(--line-soft); }
.button-danger { color: var(--danger); border-color: var(--line); background: var(--surface); }
.button-danger:hover { border-color: #f3c6c2; background: var(--danger-soft); }
.button-small { min-height: 30px; padding: 5px 10px; font-size: 12px; }
.button-large { min-height: 42px; }
.button-block { width: 100%; }
.button-disabled { color: var(--muted); border-color: var(--line); background: var(--line-soft); cursor: not-allowed; }

.alert { margin-bottom: 16px; padding: 11px 14px; border: 1px solid var(--line); border-radius: 8px; font-size: 13px; }
.alert ul { margin: 6px 0 0 18px; padding: 0; }
.alert-success { color: var(--success); border-color: #cfe7d8; background: var(--success-soft); }
.alert-error { color: var(--danger); border-color: #f3c6c2; background: var(--danger-soft); }
.alert-warning { color: var(--warning); border-color: #f5d9b0; background: var(--warning-soft); }
.bom-version-switch { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.bom-badges { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.empty-state { display: grid; place-items: center; min-height: 100px; padding: 24px; color: var(--muted); text-align: center; }
.empty-state strong, .empty-state span { display: block; }
.empty-state strong { color: var(--ink-soft); font-size: 13px; font-weight: 600; }
.empty-state span { margin-top: 4px; font-size: 12px; }

/* Charts — marks follow the dataviz rules: thin, 4px rounded data ends, hairline grid,
   text in ink tokens, colours validated (chroma, CVD, contrast) against the white surface. */
:root {
    --chart-1: #12876a;
    --chart-2: #2a78d6;
    --chart-3: #b5832c;
    --status-good: #0ca30c;
    --status-warning: #fab219;
    --status-neutral: #98a2b3;
    --status-critical: #d03b3b;
}
.chart-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(300px, .75fr); gap: 12px; margin-bottom: 12px; }
.chart-grid + .chart-grid { grid-template-columns: minmax(0, 1.1fr) minmax(300px, 1fr); }
.panel-sub { display: block; margin-top: 2px; color: var(--muted); font-size: 11.5px; }
.chart-body { padding: 14px 18px 16px; }
.chart { margin: 0; }
.chart-svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart-svg .chart-gridline { stroke: #edf0f4; stroke-width: 1; }
.chart-svg .chart-baseline { stroke: #cbd2dc; stroke-width: 1; }
.chart-svg .chart-tick { fill: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.chart-svg .chart-value { fill: var(--ink); font-size: 11px; font-weight: 600; }
.chart-svg .chart-mark { transition: opacity .12s ease; }
.chart-svg .chart-hit { fill: transparent; cursor: default; outline: none; }
.chart-svg .chart-hit:hover, .chart-svg .chart-hit:focus-visible { fill: rgba(16, 24, 40, .04); }
.chart-table { margin-top: 8px; }
.chart-table summary { color: var(--muted); cursor: pointer; font-size: 11.5px; list-style: none; }
.chart-table summary::-webkit-details-marker { display: none; }
.chart-table summary::before { content: '\25B8  '; }
.chart-table[open] summary::before { content: '\25BE  '; }
.chart-table .data-table { margin-top: 6px; font-size: 12px; }
.chart-table .data-table td { padding: 6px 10px; }
.chart-table .data-table td:first-child { min-width: 0; }
.stack-bar { display: flex; gap: 2px; height: 14px; margin: 6px 0 18px; }
.stack-seg { min-width: 6px; outline: none; transition: filter .12s ease; }
.stack-seg:first-child { border-radius: 4px 0 0 4px; }
.stack-seg:last-child { border-radius: 0 4px 4px 0; }
.stack-seg:only-child { border-radius: 4px; }
.stack-seg:hover, .stack-seg:focus-visible { filter: brightness(1.08); }
.chart-legend { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.chart-legend li { display: grid; grid-template-columns: 10px 16px minmax(0, 1fr) auto 40px; align-items: center; gap: 8px; color: var(--ink-soft); font-size: 12.5px; }
.legend-swatch { width: 10px; height: 10px; border-radius: 3px; }
.legend-icon { color: var(--muted); }
.chart-legend strong { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; }
.chart-legend small { color: var(--muted); font-size: 11px; text-align: right; font-variant-numeric: tabular-nums; }
.hbar-list { display: grid; gap: 12px; }
.hbar-row { display: grid; grid-template-columns: 120px minmax(0, 1fr) 96px; align-items: center; gap: 12px; padding: 2px 0; border-radius: 6px; outline: none; font-size: 12.5px; }
.hbar-row:hover .hbar-fill, .hbar-row:focus-visible .hbar-fill { filter: brightness(1.08); }
.hbar-label { overflow: hidden; color: var(--ink-soft); font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.hbar-track { height: 12px; border-radius: 0 4px 4px 0; background: var(--line-soft); overflow: hidden; }
.hbar-fill { display: block; height: 100%; border-radius: 0 4px 4px 0; }
.hbar-value { color: var(--ink); font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.chart-tooltip { position: fixed; z-index: 60; display: grid; gap: 1px; max-width: 260px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; box-shadow: var(--shadow-md); pointer-events: none; }
.chart-tooltip strong { color: var(--ink); font-size: 13px; font-weight: 650; }
.chart-tooltip span { color: var(--muted); font-size: 11.5px; }
@media (max-width: 1100px) { .chart-grid, .chart-grid + .chart-grid { grid-template-columns: 1fr; } }

/* Size chips */
.size-chips { display: flex; flex-wrap: wrap; gap: 4px; min-width: 140px; }
.size-chip { padding: 2px 7px; border: 1px solid var(--line); border-radius: 6px; color: var(--ink-soft); background: #f8fafc; font-size: 11px; white-space: nowrap; }
.size-chip b { color: var(--ink); font-weight: 650; }
.nowrap { white-space: nowrap; }
.nav-disabled small { white-space: nowrap; }

/* Icons and dashboard */
.icon { flex-shrink: 0; vertical-align: middle; }
.button .icon { margin: 0 -1px; }
.panel-heading .metric-icon { min-width: 32px; height: 32px; border-radius: 8px; }
.panel-heading .metric-icon .icon { width: 16px; height: 16px; }
.attention-list { display: grid; gap: 4px; padding: 10px 12px 16px; }
.attention-item { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 7px 6px; border-radius: 10px; color: var(--ink-soft); font-size: 12.5px; transition: background .12s ease; }
.attention-item:hover { background: var(--line-soft); }
.attention-item strong { color: var(--ink); font-size: 13px; font-weight: 600; margin-right: 2px; }
.attention-arrow { color: var(--muted); }
.coverage { display: grid; gap: 8px; margin: 8px 6px 0; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: #fbfcfd; }
.coverage strong, .coverage span { display: block; }
.coverage strong { font-size: 12px; font-weight: 600; }
.coverage span { color: var(--muted); font-size: 11px; }
.progress { height: 8px; border-radius: 99px; background: var(--line-soft); overflow: hidden; }
.progress span { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--primary), #3aa58c); }
.bar-list { display: grid; gap: 12px; padding: 18px; }
.bar-row { display: grid; grid-template-columns: 130px minmax(0, 1fr) 60px; align-items: center; gap: 12px; font-size: 12px; }
.bar-label { overflow: hidden; color: var(--ink-soft); font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.bar-row strong { text-align: right; font-weight: 600; }
.bar-track { height: 10px; border-radius: 99px; background: var(--line-soft); overflow: hidden; }
.bar-track span { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--accent), #d4a354); }
.phase-panel { margin-top: 0; }
.phase-track-horizontal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; padding: 18px; }
.phase-track-horizontal .phase-step { flex-direction: column; gap: 8px; padding: 0; }
.phase-track-horizontal .phase-step::after { display: none; }
.phase-track-horizontal .phase-step > span { width: 30px; height: 30px; }

/* Login */
.login-body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f1f5f9;
    background-image: 
        radial-gradient(circle at 10% 25%, rgba(162, 230, 218, 0.45) 0%, transparent 40%),
        radial-gradient(circle at 92% 75%, rgba(205, 225, 252, 0.55) 0%, transparent 45%);
    background-attachment: fixed;
    background-repeat: no-repeat;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #1e293b;
    padding: 32px 16px;
    box-sizing: border-box;
}

.login-card {
    width: 100%;
    max-width: 420px;
    background: #ffffff;
    border-radius: 28px;
    padding: 44px 38px 34px;
    box-shadow: 0 20px 50px -10px rgba(15, 23, 42, 0.08), 0 0 1px 1px rgba(15, 23, 42, 0.03);
    box-sizing: border-box;
    position: relative;
}

.login-logo-badge {
    width: 86px;
    height: 86px;
    border-radius: 50%;
    background: #ffffff;
    border: 2px solid #edf2f7;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06), 0 0 0 4px #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 18px;
    overflow: hidden;
    padding: 10px;
    box-sizing: border-box;
}

.login-logo-badge img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.login-title {
    margin: 0 0 6px;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 0.6px;
    color: #1a2233;
    text-transform: uppercase;
    text-align: center;
    line-height: 1.25;
}

.login-subtitle {
    margin: 0 0 26px;
    font-size: 13px;
    font-weight: 450;
    color: #64748b;
    text-align: center;
}

.login-alert {
    margin-bottom: 20px;
    padding: 11px 14px;
    border-radius: 10px;
    background: #fef2f2;
    border: 1px solid #fee2e2;
    color: #b91c1c;
    font-size: 13px;
    line-height: 1.4;
    text-align: left;
}

.login-form {
    display: flex;
    flex-direction: column;
}

.login-field-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.8px;
    color: #64748b;
    text-transform: uppercase;
    margin-bottom: 8px;
    display: block;
}

.login-input-group {
    height: 50px;
    background-color: #edf2fb;
    border-radius: 12px;
    display: flex;
    align-items: center;
    padding: 0 16px;
    gap: 12px;
    border: 1.5px solid transparent;
    transition: all 0.2s ease;
    box-sizing: border-box;
    margin-bottom: 18px;
}

.login-input-group:focus-within {
    background-color: #ffffff;
    border-color: #318c7c;
    box-shadow: 0 0 0 3px rgba(49, 140, 124, 0.15);
}

.login-field-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-input-group input {
    width: 100%;
    height: 100%;
    border: none;
    outline: none;
    background: transparent;
    font-size: 13.5px;
    font-weight: 500;
    color: #1e293b;
    padding: 0;
}

.login-input-group input::placeholder {
    color: #94a3b8;
    font-weight: 400;
}

.login-pwd-toggle {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s ease;
}

.login-pwd-toggle:hover {
    color: #318c7c;
}

.login-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: -4px;
    margin-bottom: 4px;
    font-size: 12.5px;
    color: #64748b;
}

.login-remember {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
}

.login-remember input[type="checkbox"] {
    width: 15px;
    height: 15px;
    border-radius: 4px;
    accent-color: #318c7c;
    cursor: pointer;
}

.login-button {
    height: 50px;
    width: 100%;
    margin-top: 20px;
    background-color: #318c7c;
    color: #ffffff;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(49, 140, 124, 0.3);
    transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.login-button:hover {
    background-color: #277769;
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(49, 140, 124, 0.38);
}

.login-button:active {
    transform: translateY(0);
}

.login-button svg {
    width: 16px;
    height: 16px;
    stroke-width: 2.4;
    transition: transform 0.15s ease;
}

.login-button:hover svg {
    transform: translateX(3px);
}

.login-divider {
    border: none;
    border-top: 1px solid #f1f4f8;
    margin: 28px 0 18px;
    width: 100%;
}

.login-footer-text {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 1px;
    color: #94a3b8;
    text-transform: uppercase;
    text-align: center;
    margin: 0;
}

/* Responsive */
@media (max-width: 1100px) {
    .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .dashboard-grid, .dashboard-grid.lower-grid { grid-template-columns: 1fr; }
    .master-grid { grid-template-columns: 1fr; }
    .form-panel { position: static; }
    .role-grid { grid-template-columns: 1fr; }
}

@media (max-width: 820px) {
    .app-shell { grid-template-columns: 1fr; }
    .sidebar { position: fixed; left: -260px; width: 248px; transition: left .2s ease; box-shadow: 0 0 40px rgba(24,24,27,.12); }
    .sidebar.open { left: 0; }
    .content { padding: 20px 16px 32px; }
    .topbar { padding: 0 16px; }
    .icon-button { display: grid; }
    .environment-pill { display: none; }
    .global-search { width: auto; flex: 1; }
    .user-menu summary > span:not(.avatar) { display: none; }
    .password-layout { grid-template-columns: 1fr; }
    .password-rules { margin: 0 18px 18px; }
    .permission-form, .settings-form { grid-template-columns: 1fr; }
    .full-field { grid-column: auto; }
}

@media (max-width: 560px) {
    .metric-grid, .quick-grid { grid-template-columns: 1fr; }
    .page-heading { display: grid; }
    .date-card { width: 100%; }
    .login-card { padding: 32px 20px 24px; border-radius: 22px; }
    .login-title { font-size: 18px; }
    .login-logo-badge { width: 76px; height: 76px; margin-bottom: 14px; }
}

@media print {
    .sidebar, .topbar, .button, .row-editor { display: none !important; }
    .app-shell { display: block; }
    .content { padding: 0; }
    .panel, .metric-card { break-inside: avoid; }
}
