/* ═══════════════════════════════════════════════════════════════════════════
   PFUND UI — shared components used by every page.
   Tokens (--surface, --primary, …) come from styles.css.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Status palette ─────────────────────────────────────────────────────── */
.st-planned, .st-pending, .st-not-started { --st: #64748b; --st-bg: #f1f5f9; --st-fg: #334155; }
.st-in-progress, .st-submitted, .st-on-track { --st: #4f46e5; --st-bg: #eef2ff; --st-fg: #3730a3; }
.st-completed, .st-approved, .st-resolved, .st-done, .st-verified { --st: #059669; --st-bg: #ecfdf5; --st-fg: #065f46; }
.st-on-hold, .st-at-risk, .st-draft, .st-under-review { --st: #d97706; --st-bg: #fffbeb; --st-fg: #92400e; }
.st-cancelled, .st-canceled, .st-rejected, .st-behind, .st-overdue { --st: #dc2626; --st-bg: #fef2f2; --st-fg: #991b1b; }
.st-ongoing { --st: #0891b2; --st-bg: #ecfeff; --st-fg: #155e75; }
.st-delayed { --st: #ea580c; --st-bg: #fff7ed; --st-fg: #9a3412; }
.st-unknown { --st: #94a3b8; --st-bg: #f8fafc; --st-fg: #475569; }

/* ── Page layout ────────────────────────────────────────────────────────── */
.page { display: flex; flex-direction: column; gap: 1.25rem; min-width: 0; }
.page.narrow { max-width: 880px; margin: 0 auto; width: 100%; }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem; }
.page-head h1 { margin: 0; font-size: 1.6rem; line-height: 1.2; }
.page-head p { margin: 0.3rem 0 0; color: var(--text-2); font-size: 0.9rem; max-width: 70ch; }
.page-head .crumbs { font-size: 0.8rem; color: var(--text-3); margin-bottom: 0.25rem; }
.page-head .crumbs a { color: var(--text-2); text-decoration: none; }
.page-head .crumbs a:hover { color: var(--primary); text-decoration: underline; }
.page-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }

/* ── Buttons ────────────────────────────────────────────────────────────── */
.ui-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 0.35rem;
    padding: 0.5rem 0.9rem; border: 1px solid var(--border-2); border-radius: 8px;
    background: var(--surface); color: var(--text-1); font: inherit; font-size: 0.85rem; font-weight: 600;
    text-decoration: none; cursor: pointer; white-space: nowrap; line-height: 1.2;
}
.ui-btn:hover { background: var(--surface-2); color: var(--text-1); text-decoration: none; }
.ui-btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.ui-btn.primary:hover { background: var(--primary-h); border-color: var(--primary-h); color: #fff; }
.ui-btn.danger { color: var(--danger); border-color: #fecaca; }
.ui-btn.danger:hover { background: var(--danger-dim); }
.ui-btn.ghost { border-color: transparent; background: transparent; color: var(--text-2); }
.ui-btn.ghost:hover { background: var(--surface-2); color: var(--text-1); }
.ui-btn.small { padding: 0.3rem 0.65rem; font-size: 0.78rem; }
.ui-btn[disabled] { opacity: 0.55; cursor: not-allowed; }

/* ── KPI tiles ──────────────────────────────────────────────────────────── */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0.75rem; }
.kpi {
    background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
    padding: 0.9rem 1rem; display: flex; flex-direction: column; gap: 0.35rem; min-width: 0;
}
.kpi-label { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--text-3); }
.kpi-value { font-size: 1.6rem; font-weight: 700; color: var(--text-1); font-variant-numeric: tabular-nums; line-height: 1.1; }
.kpi-value.warn { color: var(--danger); }
.kpi-sub { font-size: 0.75rem; color: var(--text-2); display: flex; flex-wrap: wrap; gap: 0.25rem 0.6rem; }
.kpi-sub span { display: inline-flex; align-items: center; gap: 0.25rem; }
.kpi-sub i { width: 7px; height: 7px; border-radius: 50%; background: var(--st); display: inline-block; }
.kpi .meter { flex: none; }
.seg-bar { display: flex; height: 6px; border-radius: 3px; overflow: hidden; gap: 2px; background: var(--surface-2); }
.seg-bar span { background: var(--st); }

/* ── Meters ─────────────────────────────────────────────────────────────── */
.meter { height: 6px; background: var(--surface-3); border-radius: 3px; overflow: hidden; flex: 1; min-width: 40px; }
.meter span { display: block; height: 100%; background: var(--primary); border-radius: 3px; }
.meter.ok span { background: var(--success); }
.meter.warn span { background: var(--warning); }
.meter.bad span { background: var(--danger); }
.exec { display: flex; align-items: center; gap: 0.5rem; min-width: 110px; }
.exec > span { font-size: 0.78rem; font-weight: 600; color: var(--text-2); font-variant-numeric: tabular-nums; min-width: 2.6em; text-align: right; }
.exec.over .meter span { background: var(--warning); }
.exec.over > span { color: #b45309; }

/* ── Panels (cards) ─────────────────────────────────────────────────────── */
.panels { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 0.75rem; }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 1rem; min-width: 0; }
.panel.flush { padding: 0; overflow: hidden; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; margin-bottom: 0.6rem; }
.panel.flush .panel-head { padding: 0.85rem 1rem 0; }
.panel-head h2, .panel-head h3 { margin: 0; font-size: 0.95rem; }
.panel-head .hint { font-size: 0.78rem; color: var(--text-3); }
.panel-note { font-size: 0.7rem; font-weight: 600; color: var(--primary); background: var(--primary-dim); border-radius: 999px; padding: 0.1rem 0.5rem; }
.panel-scroll { overflow-x: auto; }

.mini-table { width: 100%; border-collapse: collapse; font-size: 0.82rem; }
.mini-table th { text-align: left; font-size: 0.7rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-3); padding: 0.35rem 0.5rem; border-bottom: 1px solid var(--border); }
.mini-table td { padding: 0.45rem 0.5rem; border-bottom: 1px solid var(--surface-2); color: var(--text-1); }
.mini-table td:first-child { white-space: nowrap; }
.mini-table tfoot td { font-weight: 700; border-top: 1px solid var(--border); border-bottom: none; }
.mini-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.mini-table .warn { color: var(--danger); font-weight: 600; }
.mini-table .empty { text-align: center; color: var(--text-3); padding: 1rem; }
a.plain { color: inherit; text-decoration: none; }
a.plain:hover { color: var(--primary); text-decoration: underline; }

/* ── Filters bar ────────────────────────────────────────────────────────── */
.filters-bar {
    background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
    padding: 0.75rem; display: flex; flex-direction: column; gap: 0.65rem;
}
.filter-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.filter-row .search { flex: 1 1 260px; }
.filter-row .search input, .filter-row select, .filter-row input[type="date"], .filter-row input[type="text"] {
    width: 100%; box-sizing: border-box; padding: 0.5rem 0.75rem; border: 1px solid var(--border-2);
    border-radius: 8px; font: inherit; font-size: 0.85rem; background: var(--surface); color: var(--text-1);
}
.filter-row select { width: auto; min-width: 150px; }
.filter-row label.inline { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.8rem; font-weight: 600; color: var(--text-2); }
.filters-bar .multiselect-wrapper { position: relative; flex: 0 1 auto; width: auto; min-width: 0; }
.filters-bar .multiselect-display {
    display: flex; align-items: center; justify-content: flex-start; flex-wrap: nowrap; gap: 0.35rem;
    padding: 0.45rem 0.7rem; min-height: 0; border: 1px solid var(--border-2); border-radius: 8px;
    background: var(--surface); font-size: 0.82rem; cursor: pointer; white-space: nowrap;
}
.filters-bar .ms-label { font-weight: 600; color: var(--text-2); }
.filters-bar .multiselect-placeholder { color: var(--text-3); }
.filters-bar .multiselect-arrow { margin-left: 0.25rem; color: var(--text-3); }
.filters-bar .multiselect-tags { display: flex; flex-wrap: wrap; gap: 0.25rem; flex: 0 1 auto; min-width: 0; }
.filters-bar .multiselect-dropdown { min-width: 240px; }
.ms-actions { display: flex; justify-content: flex-end; padding: 0.5rem; border-top: 1px solid var(--border); }
.clear-link { font-size: 0.82rem; color: var(--primary); text-decoration: none; margin-left: 0.25rem; }
.clear-link:hover { text-decoration: underline; }

.chips { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.chip {
    display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.3rem 0.7rem;
    border: 1px solid var(--border); border-radius: 999px; background: var(--surface);
    color: var(--text-2); font-size: 0.8rem; font-weight: 500; text-decoration: none; cursor: pointer;
}
.chip i { width: 8px; height: 8px; border-radius: 50%; background: var(--st); }
.chip b { font-weight: 700; color: var(--text-1); font-variant-numeric: tabular-nums; }
.chip:hover { border-color: var(--border-2); background: var(--surface-2); text-decoration: none; color: var(--text-1); }
.chip.active { background: var(--st-bg, var(--primary-dim)); border-color: var(--st, var(--primary)); color: var(--st-fg, var(--primary)); }
.chip.active b { color: inherit; }

/* ── Tabs ───────────────────────────────────────────────────────────────── */
.tabs { display: flex; gap: 0.25rem; border-bottom: 1px solid var(--border); overflow-x: auto; }
.tabs a, .tabs button {
    padding: 0.6rem 0.9rem; border: none; background: none; font: inherit; font-size: 0.875rem; font-weight: 600;
    color: var(--text-2); text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -1px; cursor: pointer; white-space: nowrap;
}
.tabs a:hover, .tabs button:hover { color: var(--text-1); }
.tabs .active, .tabs [aria-selected="true"] { color: var(--primary); border-bottom-color: var(--primary); }

/* ── Data table ─────────────────────────────────────────────────────────── */
.table-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; min-width: 0; }
.table-card-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.75rem; padding: 0.85rem 1rem 0.5rem; }
.table-card-head h2 { margin: 0; font-size: 1rem; }
.table-card-head .hint { font-size: 0.78rem; color: var(--text-3); }
.table-card-head .spacer { flex: 1; }
.table-scroll { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; overflow: visible; border-radius: 0; }
.data-table thead th {
    position: sticky; top: 0; background: var(--surface-2); z-index: 1;
    text-align: left; font-size: 0.72rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em;
    color: var(--text-2); padding: 0.55rem 0.75rem; border-bottom: 1px solid var(--border); white-space: nowrap;
}
.data-table thead th a { color: inherit; text-decoration: none; display: inline-flex; gap: 0.25rem; align-items: center; }
.data-table thead th a:hover { color: var(--text-1); }
.data-table thead th.sorted { color: var(--primary); }
.data-table thead th.num a { justify-content: flex-end; width: 100%; }
.sort-ind { font-size: 0.6rem; }
.data-table tbody td { padding: 0.65rem 0.75rem; border-bottom: 1px solid var(--surface-2); vertical-align: middle; color: var(--text-1); }
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr.clickable { cursor: pointer; }
.data-table tbody tr:hover td { background: #f8fafc; }
.data-table tbody tr:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }
.data-table .num, .data-table th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.data-table .muted { color: var(--text-3); }
.data-table .nowrap { white-space: nowrap; }
.data-table .empty { text-align: center; color: var(--text-2); padding: 2rem 1rem; }
.data-table tfoot td { padding: 0.6rem 0.75rem; font-weight: 700; border-top: 1px solid var(--border); background: var(--surface-2); }
.cell-title { line-height: 1.35; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.cell-meta { font-size: 0.74rem; color: var(--text-3); margin-top: 0.15rem; }
.cell-code { font-weight: 700; color: var(--text-2); white-space: nowrap; font-size: 0.8rem; }
.table-card .pagination, .table-card nav.pagination { padding: 0.75rem 1rem; }

/* ── Pills & tags ───────────────────────────────────────────────────────── */
.pill {
    display: inline-flex; align-items: center; gap: 0.35rem; white-space: nowrap;
    padding: 0.15rem 0.55rem; border-radius: 999px; font-size: 0.74rem; font-weight: 600;
    background: var(--st-bg, var(--surface-2)); color: var(--st-fg, var(--text-2));
}
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--st, var(--text-3)); }
.tag {
    display: inline-flex; align-items: center; padding: 0.1rem 0.5rem; border-radius: 6px;
    font-size: 0.72rem; font-weight: 600; background: var(--surface-2); color: var(--text-2); white-space: nowrap;
}
.tag.primary { background: var(--primary-dim); color: var(--primary); }
.tag.success { background: var(--success-dim); color: #047857; }
.tag.warn { background: var(--warning-dim); color: #b45309; }
.tag.danger { background: var(--danger-dim); color: #b91c1c; }

/* ── Row actions ────────────────────────────────────────────────────────── */
.col-actions { white-space: nowrap; text-align: right; width: 1%; }
.row-btn {
    display: inline-flex; align-items: center; justify-content: center; height: 30px; padding: 0 0.65rem;
    border: 1px solid var(--border); border-radius: 7px; background: var(--surface);
    color: var(--text-2); font: inherit; font-size: 0.78rem; font-weight: 600; cursor: pointer; list-style: none; text-decoration: none;
}
.row-btn:hover { background: var(--surface-2); color: var(--text-1); text-decoration: none; }
.row-menu { display: inline-block; position: relative; margin-left: 0.25rem; }
.row-menu summary { width: 30px; padding: 0; font-size: 1rem; }
.row-menu summary::-webkit-details-marker { display: none; }
.row-menu .menu {
    position: absolute; right: 0; top: calc(100% + 4px); z-index: 20; min-width: 180px;
    background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.12); padding: 0.3rem; text-align: left;
}
.row-menu .menu a, .row-menu .menu button {
    display: block; width: 100%; box-sizing: border-box; padding: 0.45rem 0.65rem; border: none; background: none;
    border-radius: 6px; color: var(--text-1); font: inherit; font-size: 0.82rem; text-align: left; text-decoration: none; cursor: pointer;
}
.row-menu .menu a:hover, .row-menu .menu button:hover { background: var(--surface-2); }
.row-menu .menu .danger { color: var(--danger); }
.row-menu .menu .danger:hover { background: var(--danger-dim); }
.row-menu .menu form { margin: 0; }
.row-menu .menu hr { border: none; border-top: 1px solid var(--border); margin: 0.25rem 0; }
/* static/js/row-menu.js pins the open menu with position:fixed so scrolling tables can't clip it */
.row-menu .menu.fixed { position: fixed; right: auto; top: auto; }

/* ── Empty state ────────────────────────────────────────────────────────── */
.empty-state {
    padding: 2.5rem 1rem; text-align: center; color: var(--text-2); background: var(--surface);
    border: 1px dashed var(--border-2); border-radius: 12px;
}
.empty-state h3 { margin: 0 0 0.35rem; font-size: 1rem; color: var(--text-1); }
.empty-state p { margin: 0 0 1rem; font-size: 0.875rem; }

/* ── Forms ──────────────────────────────────────────────────────────────── */
.form-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 1.25rem; }
.form-section { border-top: 1px solid var(--border); padding-top: 1.1rem; margin-top: 1.1rem; }
.form-section:first-of-type { border-top: none; padding-top: 0; margin-top: 0; }
.form-section > h2, .form-section > h3 { margin: 0 0 0.2rem; font-size: 1rem; }
/* styles.css uppercases every h3; components use sentence case */
.form-section > h3, .panel-head h3, .empty-state h3 { text-transform: none; letter-spacing: normal; color: var(--text-1); }
.form-section > .help { margin: 0 0 0.85rem; font-size: 0.8rem; color: var(--text-2); }
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0.9rem 1rem; }
.form-grid .span-all { grid-column: 1 / -1; }
.form-grid .span-2 { grid-column: span 2; }
.field { display: flex; flex-direction: column; gap: 0.3rem; min-width: 0; }
.field > label, .field > .label { font-size: 0.8rem; font-weight: 600; color: var(--text-1); text-transform: none; letter-spacing: normal; }
.field .hint, .field small { font-size: 0.74rem; color: var(--text-3); font-weight: 400; }
.field input:not([type="checkbox"]):not([type="radio"]), .field select, .field textarea {
    width: 100%; box-sizing: border-box; padding: 0.5rem 0.7rem; border: 1px solid var(--border-2); border-radius: 8px;
    font: inherit; font-size: 0.875rem; background: var(--surface); color: var(--text-1);
}
.field input:focus, .field select:focus, .field textarea:focus,
.filter-row input:focus, .filter-row select:focus {
    outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-dim);
}
.field input:not([type="checkbox"]):not([type="radio"])[readonly],
.field input:not([type="checkbox"]):not([type="radio"]):disabled,
.field select:disabled, .field textarea[readonly] { background: var(--surface-2); color: var(--text-2); cursor: not-allowed; }
.field.error input:not([type="checkbox"]):not([type="radio"]), .field.error select, .field.error textarea { border-color: var(--danger); }
.field .error-text { font-size: 0.75rem; color: var(--danger); }
.check { display: inline-flex; align-items: center; gap: 0.45rem; font-size: 0.85rem; color: var(--text-1); }
.form-actions-bar {
    display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: flex-end; align-items: center;
    padding-top: 1rem; margin-top: 1.25rem; border-top: 1px solid var(--border);
}
.form-actions-bar .spacer { flex: 1; }
.notice {
    border-radius: 10px; padding: 0.7rem 0.9rem; font-size: 0.85rem; line-height: 1.45;
    background: var(--primary-dim); color: #3730a3; border: 1px solid #c7d2fe;
}
.notice.warn { background: var(--warning-dim); color: #92400e; border-color: #fde68a; }
.notice.danger { background: var(--danger-dim); color: #991b1b; border-color: #fecaca; }
.notice.success { background: var(--success-dim); color: #065f46; border-color: #a7f3d0; }
.notice ul { margin: 0.3rem 0 0; padding-left: 1.1rem; }

/* ── Key / value lists ──────────────────────────────────────────────────── */
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 0.45rem 1rem; font-size: 0.875rem; margin: 0; }
.kv dt { color: var(--text-2); font-weight: 500; }
.kv dd { margin: 0; color: var(--text-1); }

/* ── Navigation ─────────────────────────────────────────────────────────── */
.top-bar { gap: 1rem; }
.top-bar nav.main-nav { flex: 1; display: flex; align-items: center; gap: 0.15rem; overflow: visible; }
.nav-group { position: relative; }
.nav-group > summary {
    list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 0.3rem;
    padding: 0.45rem 0.75rem; border-radius: 8px; color: rgba(255, 255, 255, 0.72); font-size: 0.875rem; font-weight: 500;
}
.nav-group > summary::-webkit-details-marker { display: none; }
.nav-group > summary::after { content: "▾"; font-size: 0.7rem; opacity: 0.7; }
.nav-group > summary:hover, .nav-group[open] > summary { color: #fff; background: rgba(255, 255, 255, 0.08); }
.nav-group.active > summary { color: #fff; background: rgba(255, 255, 255, 0.12); }
.nav-menu {
    position: absolute; top: calc(100% + 6px); left: 0; z-index: 50; min-width: 210px;
    background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.18); padding: 0.35rem; display: flex; flex-direction: column;
}
.nav-menu.right { left: auto; right: 0; }
.top-bar nav .nav-menu a {
    color: var(--text-1); padding: 0.5rem 0.7rem; border-radius: 6px; font-size: 0.85rem; background: none;
    display: flex; flex-direction: column; gap: 0.05rem;
}
.top-bar nav .nav-menu a small { color: var(--text-3); font-size: 0.72rem; font-weight: 400; }
.top-bar nav .nav-menu a:hover { background: var(--surface-2); color: var(--text-1); }
.top-bar nav .nav-menu a.active { background: var(--primary-dim); color: var(--primary); }
.nav-menu .menu-head { padding: 0.45rem 0.7rem 0.3rem; font-size: 0.78rem; color: var(--text-2); border-bottom: 1px solid var(--border); margin-bottom: 0.3rem; }
.nav-menu .menu-head strong { display: block; color: var(--text-1); font-size: 0.85rem; }
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 0.35rem; }
.nav-avatar {
    width: 28px; height: 28px; border-radius: 50%; background: var(--primary); color: #fff;
    display: inline-flex; align-items: center; justify-content: center; font-size: 0.78rem; font-weight: 700; text-transform: uppercase;
}
.nav-group.user > summary { padding: 0.25rem 0.5rem 0.25rem 0.25rem; }
.nav-toggle {
    display: none; margin-left: auto; background: none; border: 1px solid rgba(255, 255, 255, 0.25); color: #fff;
    border-radius: 8px; padding: 0.35rem 0.6rem; font-size: 1rem; cursor: pointer;
}

@media (max-width: 1080px) {
    .nav-toggle { display: inline-flex; }
    .top-bar { flex-wrap: wrap; height: auto; min-height: 52px; }
    .top-bar.nav-open { max-height: 100vh; overflow-y: auto; }
    .top-bar nav.main-nav > a, .nav-right > a { padding: 0.55rem 0.75rem; }
    .top-bar nav.main-nav {
        display: none; flex-basis: 100%; flex-direction: column; align-items: stretch; gap: 0.1rem; padding: 0.5rem 0 0.75rem;
    }
    .top-bar.nav-open nav.main-nav { display: flex; }
    .nav-right { margin-left: 0; flex-direction: column; align-items: stretch; }
    .nav-menu { position: static; box-shadow: none; border: none; background: rgba(255, 255, 255, 0.06); margin: 0.2rem 0 0.4rem 0.75rem; }
    .top-bar nav .nav-menu a { color: rgba(255, 255, 255, 0.85); }
    .top-bar nav .nav-menu a small { color: rgba(255, 255, 255, 0.5); }
    .top-bar nav .nav-menu a:hover, .top-bar nav .nav-menu a.active { background: rgba(255, 255, 255, 0.1); color: #fff; }
    .nav-menu .menu-head { color: rgba(255, 255, 255, 0.6); border-color: rgba(255, 255, 255, 0.15); }
    .nav-menu .menu-head strong { color: #fff; }
}

@media (max-width: 640px) {
    .page-head h1 { font-size: 1.35rem; }
    .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .kpi-value { font-size: 1.3rem; }
    .page-actions { width: 100%; }
    .filters-bar .multiselect-wrapper { flex: 1 1 140px; }
    .form-grid .span-2 { grid-column: auto; }
    .kv { grid-template-columns: 1fr; gap: 0.1rem; }
    .kv dd { margin-bottom: 0.5rem; }
}
