:root {
    --bg: #0b0d12;
    --bg-soft: #10131a;
    --panel: rgba(22, 26, 35, 0.88);
    --panel-2: rgba(30, 35, 47, 0.92);
    --line: rgba(255, 255, 255, 0.08);
    --line-strong: rgba(255, 255, 255, 0.12);
    --text: #eef1f5;
    --muted: #9aa3b2;
    --accent: #0a84ff;
    --accent-2: #5ac8fa;
    --success: #30d158;
    --warning: #ff9f0a;
    --danger: #ff453a;
    --positive: #34c759;
    --negative: #ff453a;
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
    --radius: 22px;
    --body-grad-1: rgba(10, 132, 255, 0.12);
    --body-grad-2: rgba(90, 200, 250, 0.08);
    --body-grad-3a: #090b10;
    --body-grad-3b: #0d1118;
    --link: #7cc6ff;
    --sidebar-bg: rgba(16, 19, 26, 0.88);
    --brand-bg: linear-gradient(180deg, rgba(22, 26, 35, 0.96) 0%, rgba(14, 18, 27, 0.96) 100%);
    --nav-group-bg: rgba(16, 19, 26, 0.62);
    --sidebar-footer-bg: rgba(16, 19, 26, 0.56);
    --card-bg: linear-gradient(180deg, rgba(22, 26, 35, 0.92) 0%, rgba(15, 19, 28, 0.92) 100%);
    --input-bg: rgba(10, 12, 18, 0.84);
    --button-bg: linear-gradient(180deg, rgba(43, 50, 65, 0.94) 0%, rgba(29, 34, 45, 0.94) 100%);
    --calendar-day-bg: rgba(18, 22, 31, 0.84);
    --calendar-event-bg: rgba(255,255,255,0.04);
    --view-tab-bg: rgba(255,255,255,0.03);
    --view-tab-active-bg: rgba(255,255,255,0.08);
    --map-popup-link: #0f172a;
    --watermark-opacity: 0.05;
    --table-row-bg: rgba(255, 255, 255, 0.02);
    --table-row-alt-bg: rgba(255, 255, 255, 0.035);
    --table-row-hover: rgba(255, 255, 255, 0.055);
    --table-head-bg: rgba(255, 255, 255, 0.03);
    --table-border: rgba(255, 255, 255, 0.07);
    --detail-box-bg: rgba(255, 255, 255, 0.03);
    --detail-box-border: rgba(255, 255, 255, 0.05);
    --leaflet-surface: rgba(18, 22, 31, 0.94);
    --leaflet-surface-2: rgba(25, 30, 40, 0.96);
    --leaflet-text: #eef1f5;
    --leaflet-border: rgba(255, 255, 255, 0.10);
    --leaflet-shadow: 0 16px 34px rgba(0, 0, 0, 0.28);
}


html[data-theme="light"] {
    --bg: #f2f4f7;
    --bg-soft: #ffffff;
    --panel: rgba(255, 255, 255, 0.86);
    --panel-2: rgba(248, 250, 252, 0.94);
    --line: rgba(15, 23, 42, 0.10);
    --line-strong: rgba(15, 23, 42, 0.16);
    --text: #111827;
    --muted: #64748b;
    --accent: #0a84ff;
    --accent-2: #38bdf8;
    --positive: #16a34a;
    --negative: #dc2626;
    --shadow: 0 24px 70px rgba(15, 23, 42, 0.10);
    --body-grad-1: rgba(10, 132, 255, 0.10);
    --body-grad-2: rgba(90, 200, 250, 0.10);
    --body-grad-3a: #f7f9fc;
    --body-grad-3b: #eef2f7;
    --link: #0a66d1;
    --sidebar-bg: rgba(250, 252, 255, 0.92);
    --brand-bg: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(243, 246, 250, 0.98) 100%);
    --nav-group-bg: rgba(255, 255, 255, 0.76);
    --sidebar-footer-bg: rgba(255, 255, 255, 0.76);
    --card-bg: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(247, 249, 252, 0.98) 100%);
    --input-bg: rgba(255, 255, 255, 0.95);
    --button-bg: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(239, 243, 248, 0.98) 100%);
    --calendar-day-bg: rgba(255, 255, 255, 0.9);
    --calendar-event-bg: rgba(15,23,42,0.03);
    --view-tab-bg: rgba(15,23,42,0.04);
    --view-tab-active-bg: rgba(15,23,42,0.08);
    --map-popup-link: #0a66d1;
    --watermark-opacity: 0.03;
    --table-row-bg: rgba(255, 255, 255, 0.82);
    --table-row-alt-bg: rgba(246, 248, 252, 0.96);
    --table-row-hover: rgba(229, 236, 246, 0.95);
    --table-head-bg: rgba(242, 246, 251, 0.96);
    --table-border: rgba(15, 23, 42, 0.08);
    --detail-box-bg: rgba(250, 252, 255, 0.88);
    --detail-box-border: rgba(15, 23, 42, 0.08);
    --leaflet-surface: rgba(255, 255, 255, 0.98);
    --leaflet-surface-2: rgba(246, 248, 252, 0.98);
    --leaflet-text: #0f172a;
    --leaflet-border: rgba(15, 23, 42, 0.10);
    --leaflet-shadow: 0 18px 34px rgba(15, 23, 42, 0.14);
}


* { box-sizing: border-box; }
html, body {
    margin: 0;
    padding: 0;
    min-height: 100%;
    background:
        radial-gradient(circle at top left, var(--body-grad-1), transparent 24%),
        radial-gradient(circle at top right, var(--body-grad-2), transparent 20%),
        linear-gradient(180deg, var(--body-grad-3a) 0%, var(--body-grad-3b) 100%);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", sans-serif;
}

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }

.layout {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    min-height: 100vh;
}

.sidebar {
    position: sticky;
    top: 0;
    align-self: start;
    height: 100vh;
    padding: 28px 20px;
    background: var(--sidebar-bg);
    backdrop-filter: blur(24px);
    border-right: 1px solid var(--line);
    overflow-y: auto;
}

.brand {
    padding: 18px 18px 22px 18px;
    margin-bottom: 20px;
    border-radius: 22px;
    background: var(--brand-bg);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}
.brand-logo {
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
}
.brand-logo-image {
    display: block;
    width: min(100%, 156px);
    height: auto;
}
.brand-logo-light {
    display: none;
}
.brand-subtitle {
    margin-top: 10px;
    color: var(--muted);
    font-size: 0.94rem;
}
html[data-theme="light"] .brand-logo-dark {
    display: none;
}
html[data-theme="light"] .brand-logo-light {
    display: block;
}

.nav-group {
    margin-bottom: 18px;
    padding: 12px;
    border-radius: 18px;
    background: var(--nav-group-bg);
    border: 1px solid rgba(255, 255, 255, 0.05);
}
.nav-group.compact .nav-link { padding-top: 10px; padding-bottom: 10px; }
.nav-caption {
    margin: 0 0 10px 4px;
    color: var(--muted);
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}
.nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 14px;
    color: var(--text);
    transition: background 0.18s ease, transform 0.18s ease;
}
.nav-link:hover {
    background: rgba(255, 255, 255, 0.05);
    text-decoration: none;
}
.nav-link.active {
    background: linear-gradient(180deg, rgba(10, 132, 255, 0.24) 0%, rgba(10, 132, 255, 0.12) 100%);
    border: 1px solid rgba(124, 198, 255, 0.18);
}

.sidebar-footer {
    margin-top: 20px;
    color: var(--muted);
    font-size: 0.86rem;
    line-height: 1.65;
    padding: 14px 16px;
    border-radius: 18px;
    background: var(--sidebar-footer-bg);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.content {
    padding: 30px;
}

.page-header {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: flex-start;
    margin-bottom: 22px;
}
.page-header h1 {
    margin: 0 0 10px 0;
    font-size: 2rem;
    line-height: 1.1;
    letter-spacing: -0.02em;
}
.page-header p {
    margin: 0;
    max-width: 850px;
}
.header-actions,
.form-actions,
.filter-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.flash-stack {
    display: grid;
    gap: 10px;
    margin-bottom: 18px;
}
.flash {
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: rgba(20, 24, 32, 0.9);
}
.flash.success {
    border-color: rgba(48, 209, 88, 0.22);
    background: rgba(48, 209, 88, 0.12);
}
.flash.error {
    border-color: rgba(255, 69, 58, 0.2);
    background: rgba(255, 69, 58, 0.1);
}

.card {
    padding: 22px;
    border-radius: var(--radius);
    background: var(--card-bg);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}
.card + .card,
.card + section,
section + .card { margin-top: 20px; }
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}
.card-header h2,
.card-header h3 {
    margin: 0;
    font-size: 1.06rem;
}
.top-gap { margin-top: 18px; }

.stats-grid {
    display: grid;
    gap: 16px;
    margin-bottom: 18px;
}
.stats-grid-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.stats-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stat-card {
    min-height: 126px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.stat-label {
    color: var(--muted);
    margin-bottom: 10px;
    font-size: 0.93rem;
}
.stat-value {
    font-size: 1.9rem;
    font-weight: 700;
    letter-spacing: -0.03em;
}

.two-column,
.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}
.three-column {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}
.table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: var(--table-head-bg);
    backdrop-filter: blur(12px);
}
.table th,
.table td {
    padding: 13px 12px;
    border-bottom: 1px solid var(--table-border);
    vertical-align: top;
}
.table th {
    text-align: left;
    color: var(--muted);
    font-size: 0.77rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 700;
}
.table tbody tr {
    background: var(--table-row-bg);
    transition: background 0.18s ease, transform 0.18s ease;
}
.table tbody tr:nth-child(even) {
    background: var(--table-row-alt-bg);
}
.table tbody tr:hover {
    background: var(--table-row-hover);
}
.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr td:first-child,
.table thead tr th:first-child {
    border-left: 1px solid var(--table-border);
}
.table tbody tr td:last-child,
.table thead tr th:last-child {
    border-right: 1px solid var(--table-border);
}
.table thead tr th:first-child { border-top-left-radius: 14px; }
.table thead tr th:last-child { border-top-right-radius: 14px; }
.table tbody tr:last-child td:first-child { border-bottom-left-radius: 14px; }
.table tbody tr:last-child td:last-child { border-bottom-right-radius: 14px; }

.field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.field label {
    color: var(--muted);
    font-size: 0.88rem;
}
input, select, textarea {
    width: 100%;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.10);
    background: var(--input-bg);
    color: var(--text);
    font: inherit;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
}
textarea { resize: vertical; min-height: 120px; }
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: rgba(124, 198, 255, 0.34);
    box-shadow: 0 0 0 4px rgba(10, 132, 255, 0.12);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}
.form-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.full-width { grid-column: 1 / -1; }
.filters-grid {
    display: grid;
    gap: 12px;
    align-items: end;
}
.filters-grid-4 { grid-template-columns: 2fr 1fr 1fr 1fr auto; }
.filters-grid-3 { grid-template-columns: 2fr 1fr 1fr auto; }
.filter-card { margin-bottom: 20px; }

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 15px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.10);
    background: var(--button-bg);
    color: var(--text);
    font-weight: 600;
    cursor: pointer;
}
.button:hover {
    filter: brightness(1.05);
    text-decoration: none;
}
.button.primary {
    background: linear-gradient(180deg, rgba(10, 132, 255, 1) 0%, rgba(0, 100, 220, 1) 100%);
    border-color: rgba(124, 198, 255, 0.18);
}
.button.danger {
    background: linear-gradient(180deg, rgba(255, 69, 58, 0.95) 0%, rgba(210, 40, 30, 0.95) 100%);
    border-color: rgba(255, 69, 58, 0.18);
}
.button.small { padding: 8px 12px; font-size: 0.9rem; }

.export-menu {
    position: relative;
}

.export-menu summary {
    list-style: none;
}

.export-menu summary::-webkit-details-marker {
    display: none;
}

.export-menu-toggle {
    min-width: 172px;
    justify-content: space-between;
}

.export-menu-toggle-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    line-height: 1;
    transition: transform 0.2s ease;
}

.export-menu[open] .export-menu-toggle-icon {
    transform: rotate(180deg);
}

.export-menu-panel {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    z-index: 40;
    width: min(360px, calc(100vw - 48px));
    padding: 10px;
    border-radius: 20px;
    border: 1px solid var(--line-strong);
    background: color-mix(in srgb, var(--panel-2) 92%, transparent);
    backdrop-filter: blur(24px);
    box-shadow: 0 24px 46px rgba(0, 0, 0, 0.28);
}

.export-menu-section-title {
    padding: 4px 8px 10px 8px;
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.export-menu-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 14px;
    border-radius: 14px;
    color: var(--text);
    transition: background 0.18s ease, transform 0.18s ease;
}

.export-menu-item:hover {
    background: rgba(255, 255, 255, 0.06);
    text-decoration: none;
}

html[data-theme="light"] .export-menu-item:hover {
    background: rgba(15, 23, 42, 0.05);
}

.export-menu-item-type {
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.monthly-analytics-header-actions {
    align-items: stretch;
}

.badge,
.stage-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 0.8rem;
    border: 1px solid rgba(124, 198, 255, 0.18);
    background: rgba(10, 132, 255, 0.15);
}
.badge-neutral {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.08);
}

.detail-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 18px;
}
.detail-list div {
    padding: 12px 14px;
    border-radius: 16px;
    background: var(--detail-box-bg);
    border: 1px solid var(--detail-box-border);
}
.detail-list span {
    display: block;
    margin-bottom: 6px;
    color: var(--muted);
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.detail-list strong { font-size: 0.98rem; }

.notes-box,
.hint-box {
    margin-top: 18px;
    padding: 16px 18px;
    border-radius: 18px;
    background: var(--detail-box-bg);
    border: 1px solid var(--detail-box-border);
}
.notes-box h3,
.hint-box h3 { margin: 0 0 10px 0; }
.notes-box p,
.hint-box { line-height: 1.6; }
.hint-box.wide { margin-top: 0; }

.simple-list {
    display: grid;
    gap: 12px;
    padding: 0;
    margin: 0;
    list-style: none;
}
.simple-list li {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 13px 14px;
    border-radius: 16px;
    background: var(--detail-box-bg);
    border: 1px solid var(--detail-box-border);
}
.simple-list span { color: var(--muted); font-size: 0.9rem; }

.timeline {
    display: grid;
    gap: 16px;
}
.timeline-item {
    display: grid;
    grid-template-columns: 160px minmax(0, 1fr);
    gap: 16px;
    padding: 16px;
    border-radius: 18px;
    background: var(--detail-box-bg);
    border: 1px solid var(--detail-box-border);
}
.timeline-meta {
    display: grid;
    gap: 8px;
    align-content: start;
}
.timeline-date {
    font-weight: 700;
}
.timeline-type {
    color: var(--muted);
    font-size: 0.9rem;
}
.timeline-content h3 {
    margin: 0 0 8px 0;
    font-size: 1.02rem;
}
.timeline-content p { margin: 0 0 8px 0; line-height: 1.55; }

.bar-list {
    display: grid;
    gap: 12px;
}
.bar-row {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr) 44px;
    align-items: center;
    gap: 12px;
}
.bar-label,
.bar-count { font-size: 0.92rem; }
.bar-track {
    height: 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.07);
    overflow: hidden;
}
.bar-fill {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(10, 132, 255, 0.95) 0%, rgba(90, 200, 250, 0.95) 100%);
}
.bar-fill.secondary {
    background: linear-gradient(90deg, rgba(48, 209, 88, 0.95) 0%, rgba(90, 200, 250, 0.95) 100%);
}

.inline-form {
    display: inline-flex;
    gap: 8px;
    align-items: center;
}
.inline-form.spread { width: 100%; justify-content: space-between; }
.inline-form select { min-width: 180px; }

.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
.text-right { text-align: right; }
.empty-state {
    color: var(--muted);
    padding: 6px 0;
    line-height: 1.6;
}
.narrow-card {
    max-width: 620px;
}
.positive { color: var(--positive); }
.negative { color: var(--negative); }

@media (max-width: 1420px) {
    .stats-grid-5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .stats-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .three-column { grid-template-columns: 1fr; }
}

@media (max-width: 1180px) {
    .layout { grid-template-columns: 1fr; }
    .sidebar {
        position: static;
        height: auto;
        border-right: none;
        border-bottom: 1px solid var(--line);
    }
    .content { padding: 22px; }
    .two-column,
    .detail-grid { grid-template-columns: 1fr; }
    .filters-grid-4,
    .filters-grid-3,
    .form-grid,
    .form-grid.two,
    .detail-list { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
    .content { padding: 16px; }
    .page-header { flex-direction: column; }
    .stats-grid-5,
    .stats-grid-4 { grid-template-columns: 1fr; }
    .timeline-item { grid-template-columns: 1fr; }
    .bar-row { grid-template-columns: 110px minmax(0, 1fr) 36px; }
    .table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}


body::before {
    content: "";
    position: fixed;
    inset: 0;
    background-image: url("logo.png");
    background-repeat: no-repeat;
    background-position: center center;
    background-size: min(58vw, 780px);
    opacity: 0.045;
    pointer-events: none;
    z-index: 0;
}
.layout, .sidebar, .content { position: relative; z-index: 1; }


.watermark {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background-repeat: no-repeat;
    background-position: center center;
    background-size: min(56vw, 760px);
    opacity: var(--watermark-opacity);
    filter: grayscale(1);
}
.layout, .sidebar, .content { position: relative; z-index: 1; }
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 14px;
}
.calendar-day {
    min-height: 220px;
    padding: 16px;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.08);
    background: var(--calendar-day-bg);
}
.calendar-day.muted-day { opacity: 0.52; }
.calendar-day.today { border-color: rgba(10,132,255,0.45); box-shadow: inset 0 0 0 1px rgba(10,132,255,0.25); }
.calendar-day-head { display:flex; justify-content:space-between; align-items:baseline; margin-bottom:14px; }
.calendar-day-title { font-size:0.82rem; color:var(--muted); text-transform:uppercase; letter-spacing:0.08em; }
.calendar-day-date { font-size:1.1rem; font-weight:700; }
.calendar-events { display:grid; gap:10px; }
.calendar-event { padding:10px 12px; border-radius:14px; background: var(--calendar-event-bg); border:1px solid rgba(255,255,255,0.06); }
.calendar-event-title { font-weight:700; display:block; margin-bottom:4px; }
.calendar-event-meta, .calendar-event-actions { font-size:0.83rem; color:var(--muted); }
.calendar-event-actions { margin-top:8px; display:flex; gap:10px; flex-wrap:wrap; }
.toolbar { display:flex; justify-content:space-between; gap:14px; align-items:center; margin-bottom:18px; }
.toolbar-group { display:flex; gap:10px; flex-wrap:wrap; align-items:center; }
.button.small { padding:8px 12px; border-radius:12px; font-size:0.86rem; }
@media (max-width: 1200px) { .calendar-grid { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 780px) { .layout { grid-template-columns: 1fr; } .sidebar { position:relative; height:auto; } .calendar-grid { grid-template-columns: 1fr; } }

.positive { color: var(--positive); }
.negative { color: var(--negative); }
.warning { color: var(--warning); }
.small { font-size: 0.82rem; }
.badge { display: inline-flex; align-items: center; padding: 6px 10px; border-radius: 999px; font-size: 0.82rem; border: 1px solid var(--line-strong); background: var(--calendar-event-bg); }
.badge.positive { background: rgba(48,209,88,0.14); border-color: rgba(48,209,88,0.25); }
.badge.negative { background: rgba(255,69,58,0.14); border-color: rgba(255,69,58,0.25); }
.badge.warning { background: rgba(255,159,10,0.14); border-color: rgba(255,159,10,0.25); }
.badge.muted { color: var(--muted); }
.table-wrap { overflow-x: auto; }
.nested-card { margin-top: 16px; }
.compact-stats { margin-top: 12px; margin-bottom: 18px; }
.checkbox-field { justify-content: end; }
.checkbox-field label { color: var(--text); display: flex; gap: 10px; align-items: center; min-height: 48px; }
.checkbox-field input { width: auto; }


.dashboard-controls-card {
    margin-bottom: 18px;
}
.dashboard-controls-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.toggle-chip {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.08);
    background: var(--calendar-event-bg);
    color: var(--text);
    cursor: pointer;
    user-select: none;
}
.toggle-chip input {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: var(--accent);
}
.dashboard-widget[hidden] {
    display: none !important;
}
.dashboard-widget + .dashboard-widget {
    margin-top: 0;
}


.hint { color: var(--muted); font-size: 0.88rem; margin-top: 6px; }

.top-gap-sm{margin-top:12px}.compact-detail-list{grid-template-columns:repeat(auto-fit,minmax(160px,1fr))}.stack-list{display:grid;gap:12px}

.warning-card { border-color: rgba(245, 158, 11, 0.45); }
.checkbox-row { display:flex; flex-wrap:wrap; gap:12px; }
.check-inline { display:inline-flex; align-items:center; gap:6px; color: var(--text); font-size:0.92rem; }
.check-inline input { width:auto; }

.single-column { grid-template-columns: 1fr; }
.public-page { min-height: 100vh; }
.public-shell { max-width: 920px; margin: 0 auto; padding: 28px 16px 40px; position: relative; z-index: 1; }
.public-card { max-width: 860px; margin: 0 auto; }
.compact-header { margin-bottom: 14px; }
.response-button-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.compact-url-input { min-width: 340px; font-size: 0.9rem; }
.mobile-detail-list strong { line-height: 1.5; }
.response-summary-grid { margin-bottom: 0; }
.compact-stat { min-height: 96px; padding: 16px; }
.compact-stat .stat-value { font-size: 1.5rem; }
.table-responsive { overflow-x: auto; }
@media (max-width: 760px) { .response-button-grid { grid-template-columns: 1fr; } .compact-url-input { min-width: 220px; } }

.wrap-gap { flex-wrap: wrap; gap: 12px; }
.top-gap-xs { margin-top: 6px; }
.top-gap-sm { margin-top: 12px; }
.inline-badge-row { display: inline-flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.response-event-list li { gap: 6px; }
.response-event-list .badge { text-decoration: none; }
.mobile-response-form input[type="file"] { padding: 10px 0; }


.view-tabs { display:flex; gap:0.75rem; margin:0 0 1rem; }
.view-tab { display:inline-flex; align-items:center; padding:0.6rem 0.95rem; border-radius:999px; border:1px solid rgba(255,255,255,0.12); background:var(--view-tab-bg); color:var(--text); text-decoration:none; }
.view-tab.active { background:var(--view-tab-active-bg); border-color:rgba(255,255,255,0.18); }
.inline-form { display:inline; }
.subcontractor-map { width:100%; min-height:560px; border-radius:18px; overflow:hidden; border:1px solid rgba(255,255,255,0.12); margin-top:0.75rem; }
.legend { display:flex; flex-wrap:wrap; gap:1rem; margin-top:1rem; }
.legend-item { display:inline-flex; align-items:center; gap:0.45rem; color:var(--muted); font-size:0.95rem; }
.legend-dot, .sub-pin { width:14px; height:14px; border-radius:999px; display:inline-block; box-shadow:0 0 0 3px rgba(255,255,255,0.12); }
.sub-pin { width:18px; height:18px; border:2px solid rgba(255,255,255,0.85); }
.pin-ready { background:#22c55e; }
.pin-caution { background:#eab308; }
.pin-warning { background:#f97316; }
.pin-blocked { background:#ef4444; }
.pin-archived { background:#6b7280; }
.map-popup { line-height:1.45; min-width:240px; }
.map-popup .popup-actions { margin-top:0.55rem; }
.map-popup a { color:var(--map-popup-link); }
.badge.pin-ready, .badge.pin-caution, .badge.pin-warning, .badge.pin-blocked, .badge.pin-archived { color:#111827; font-weight:600; }
@media (max-width: 840px) { .subcontractor-map { min-height:420px; } .view-tabs { flex-wrap:wrap; } }

.utility-bar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-bottom: 16px;
}

.theme-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px;
    border-radius: 999px;
    border: 1px solid var(--line-strong);
    background: var(--panel);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
    position: sticky;
    top: 18px;
    z-index: 5;
}

.theme-toggle-button {
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.theme-toggle-button:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.06);
}

html[data-theme="light"] .theme-toggle-button:hover {
    background: rgba(15, 23, 42, 0.06);
}

.theme-toggle-button.active {
    color: var(--text);
    background: linear-gradient(180deg, rgba(10, 132, 255, 0.22) 0%, rgba(10, 132, 255, 0.12) 100%);
    box-shadow: inset 0 0 0 1px rgba(10, 132, 255, 0.16);
}

.theme-symbol {
    font-size: 1.1rem;
    line-height: 1;
}

@media (max-width: 760px) {
    .utility-bar {
        margin-bottom: 12px;
    }

    .theme-toggle {
        top: 10px;
    }
}


html[data-theme="light"] .sidebar {
    box-shadow: inset -1px 0 0 rgba(15, 23, 42, 0.04);
}

html[data-theme="light"] .nav-group {
    border-color: rgba(15, 23, 42, 0.06);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.7);
}

html[data-theme="light"] .nav-link:hover {
    background: rgba(15, 23, 42, 0.05);
}

html[data-theme="light"] .nav-link.active {
    background: linear-gradient(180deg, rgba(10, 132, 255, 0.18) 0%, rgba(10, 132, 255, 0.10) 100%);
    border-color: rgba(10, 132, 255, 0.12);
}

html[data-theme="light"] .card,
html[data-theme="light"] .brand,
html[data-theme="light"] .theme-toggle {
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.08);
}

html[data-theme="light"] .button {
    border-color: rgba(15, 23, 42, 0.08);
    box-shadow: 0 1px 0 rgba(255,255,255,0.8), 0 8px 18px rgba(15, 23, 42, 0.06);
}

html[data-theme="light"] .button:hover {
    filter: none;
    transform: translateY(-1px);
}

html[data-theme="light"] .flash {
    background: rgba(255,255,255,0.88);
}

html[data-theme="light"] input,
html[data-theme="light"] select,
html[data-theme="light"] textarea {
    border-color: rgba(15, 23, 42, 0.10);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.9);
}

html[data-theme="light"] .theme-toggle-button.active {
    background: linear-gradient(180deg, rgba(10, 132, 255, 0.18) 0%, rgba(10, 132, 255, 0.10) 100%);
    box-shadow: inset 0 0 0 1px rgba(10, 132, 255, 0.12);
}

.subcontractor-map,
.leaflet-container {
    background: var(--leaflet-surface-2);
}

.leaflet-container {
    font-family: inherit;
}

.leaflet-control-zoom,
.leaflet-bar,
.leaflet-control-layers {
    border: 1px solid var(--leaflet-border) !important;
    box-shadow: var(--leaflet-shadow) !important;
    border-radius: 14px !important;
    overflow: hidden;
}

.leaflet-bar a,
.leaflet-bar a:hover,
.leaflet-control-layers-toggle {
    background: var(--leaflet-surface) !important;
    color: var(--leaflet-text) !important;
    border-bottom-color: var(--leaflet-border) !important;
}

.leaflet-bar a:hover {
    filter: brightness(1.03);
}

.leaflet-popup-content-wrapper,
.leaflet-popup-tip {
    background: var(--leaflet-surface) !important;
    color: var(--leaflet-text) !important;
    box-shadow: var(--leaflet-shadow) !important;
}

.leaflet-popup-content-wrapper {
    border: 1px solid var(--leaflet-border);
    border-radius: 18px;
}

.leaflet-popup-content {
    margin: 14px 16px;
}

.map-popup {
    color: var(--leaflet-text);
}

.map-popup .popup-actions a,
.map-popup a {
    color: var(--link);
}

html[data-theme="light"] .subcontractor-map {
    border-color: rgba(15, 23, 42, 0.10);
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.08);
}

html[data-theme="light"] .legend-item {
    color: #475569;
}

html[data-theme="light"] .view-tab {
    border-color: rgba(15, 23, 42, 0.10);
    box-shadow: 0 1px 0 rgba(255,255,255,0.8);
}


/* --- Apple-style UI refinement --- */
:root {
    --surface-highlight: rgba(255, 255, 255, 0.07);
    --surface-highlight-2: rgba(255, 255, 255, 0.03);
    --elevated-shadow: 0 18px 45px rgba(0, 0, 0, 0.22);
    --elevated-shadow-soft: 0 10px 26px rgba(0, 0, 0, 0.12);
    --form-shadow: inset 0 1px 0 rgba(255,255,255,0.04), 0 1px 0 rgba(255,255,255,0.02);
    --form-focus-ring: 0 0 0 4px rgba(10, 132, 255, 0.14);
    --button-shadow: 0 10px 24px rgba(0, 0, 0, 0.16);
    --button-shadow-hover: 0 14px 28px rgba(0, 0, 0, 0.20);
    --table-head-text: rgba(255,255,255,0.68);
}

html[data-theme="light"] {
    --surface-highlight: rgba(255, 255, 255, 0.82);
    --surface-highlight-2: rgba(255, 255, 255, 0.58);
    --elevated-shadow: 0 20px 45px rgba(15, 23, 42, 0.10);
    --elevated-shadow-soft: 0 12px 24px rgba(15, 23, 42, 0.08);
    --form-shadow: inset 0 1px 0 rgba(255,255,255,0.92), 0 1px 2px rgba(15,23,42,0.04);
    --form-focus-ring: 0 0 0 4px rgba(10, 132, 255, 0.12);
    --button-shadow: 0 10px 18px rgba(15, 23, 42, 0.08);
    --button-shadow-hover: 0 14px 24px rgba(15, 23, 42, 0.10);
    --table-head-text: rgba(15,23,42,0.55);
}

html {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

body {
    letter-spacing: -0.01em;
}

::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(127, 138, 156, 0.34);
    border: 3px solid transparent;
    border-radius: 999px;
    background-clip: padding-box;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(127, 138, 156, 0.48);
    border: 3px solid transparent;
    background-clip: padding-box;
}

.sidebar {
    background:
        linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.00)),
        var(--sidebar-bg);
}

.brand,
.nav-group,
.card,
.sidebar-footer,
.theme-toggle {
    position: relative;
    overflow: hidden;
}

.brand::before,
.nav-group::before,
.card::before,
.sidebar-footer::before,
.theme-toggle::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(180deg, var(--surface-highlight) 0%, transparent 36%);
    opacity: 0.9;
}

.brand {
    border-radius: 26px;
    box-shadow: var(--elevated-shadow);
}

.brand-logo-image {
    filter: drop-shadow(0 10px 22px rgba(0, 0, 0, 0.14));
}

.brand-subtitle {
    letter-spacing: -0.01em;
}

.nav-group {
    border-radius: 20px;
    backdrop-filter: blur(30px);
}

.nav-link {
    min-height: 46px;
    font-weight: 600;
    letter-spacing: -0.01em;
    border: 1px solid transparent;
    position: relative;
}

.nav-link:hover {
    transform: translateX(2px);
}

.nav-link.active {
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 10px 22px rgba(10,132,255,0.16);
}

.content {
    padding: 28px 30px 38px;
}

.utility-bar {
    margin-bottom: 20px;
}

.theme-toggle {
    padding: 5px;
    border-radius: 999px;
    background:
        linear-gradient(180deg, var(--surface-highlight) 0%, transparent 48%),
        var(--panel);
    box-shadow: var(--elevated-shadow-soft);
}

.theme-toggle-button {
    width: 44px;
    height: 44px;
    position: relative;
    z-index: 1;
}

.theme-toggle-button.active {
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.10),
        0 8px 16px rgba(10,132,255,0.14);
}

.page-header h1 {
    font-size: clamp(2rem, 4vw, 2.45rem);
    letter-spacing: -0.04em;
}

.page-header p {
    color: var(--muted);
    line-height: 1.55;
}

.card {
    border-radius: 26px;
    box-shadow: var(--elevated-shadow);
}

.card-header h2,
.card-header h3 {
    letter-spacing: -0.02em;
}

.stat-card {
    position: relative;
    overflow: hidden;
}

.stat-card::after {
    content: "";
    position: absolute;
    inset: auto -12% -36% auto;
    width: 120px;
    height: 120px;
    background: radial-gradient(circle, rgba(10,132,255,0.16) 0%, transparent 68%);
    pointer-events: none;
}

.stat-label {
    font-size: 0.88rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.stat-value {
    font-size: clamp(1.9rem, 3vw, 2.35rem);
    line-height: 1;
}

.table {
    border-collapse: separate;
    border-spacing: 0 8px;
}

.table thead th {
    top: -2px;
    color: var(--table-head-text);
    font-size: 0.74rem;
    padding-top: 11px;
    padding-bottom: 11px;
}

.table th,
.table td {
    padding: 14px 14px;
}

.table tbody tr {
    box-shadow: 0 4px 18px rgba(0,0,0,0.05);
}

.table tbody tr td:first-child,
.table thead tr th:first-child {
    border-left-width: 1px;
    border-top-left-radius: 16px;
    border-bottom-left-radius: 16px;
}

.table tbody tr td:last-child,
.table thead tr th:last-child {
    border-right-width: 1px;
    border-top-right-radius: 16px;
    border-bottom-right-radius: 16px;
}

.table tbody tr:last-child td:first-child,
.table tbody tr:last-child td:last-child {
    border-bottom-left-radius: 16px;
    border-bottom-right-radius: 16px;
}

.table tbody tr:hover {
    transform: translateY(-1px);
}

.field {
    gap: 9px;
}

.field label {
    font-size: 0.83rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

input,
select,
textarea {
    min-height: 48px;
    padding: 13px 15px;
    border-radius: 16px;
    border-color: rgba(255, 255, 255, 0.09);
    box-shadow: var(--form-shadow);
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease, background 0.18s ease;
}

textarea {
    min-height: 132px;
}

input::placeholder,
textarea::placeholder {
    color: color-mix(in srgb, var(--muted) 78%, transparent);
}

input:hover,
select:hover,
textarea:hover {
    border-color: var(--line-strong);
}

input:focus,
select:focus,
textarea:focus {
    box-shadow: var(--form-focus-ring);
    transform: translateY(-1px);
}

input[type="checkbox"],
input[type="radio"] {
    min-height: auto;
    width: 18px;
    height: 18px;
    padding: 0;
    border-radius: 6px;
}

.button {
    min-height: 42px;
    padding: 11px 16px;
    border-radius: 999px;
    font-weight: 700;
    letter-spacing: -0.01em;
    box-shadow: var(--button-shadow);
    transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.button:hover {
    transform: translateY(-1px);
    box-shadow: var(--button-shadow-hover);
}

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

.button.primary {
    box-shadow: 0 12px 24px rgba(10,132,255,0.28);
}

.button.small {
    min-height: 36px;
    padding: 8px 13px;
    font-size: 0.88rem;
}

.badge,
.stage-chip,
.view-tab {
    border-radius: 999px;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.badge,
.stage-chip {
    padding: 7px 11px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
}

.badge-neutral {
    background: var(--surface-highlight-2);
}

.detail-list div,
.simple-list li,
.timeline-item,
.notes-box,
.hint-box {
    border-radius: 20px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
}

.detail-list strong {
    letter-spacing: -0.01em;
}

.view-tabs {
    gap: 10px;
}

.view-tab {
    min-height: 40px;
    padding: 0.62rem 1rem;
    border-color: var(--line-strong);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}

.view-tab.active {
    box-shadow: 0 10px 20px rgba(10,132,255,0.14), inset 0 1px 0 rgba(255,255,255,0.08);
}

.subcontractor-map {
    border-radius: 24px;
    box-shadow: var(--elevated-shadow-soft);
}

.legend-item,
.simple-list span,
.notes-box,
.hint-box,
.timeline-type {
    letter-spacing: -0.01em;
}

.flash {
    border-radius: 18px;
    box-shadow: var(--elevated-shadow-soft);
}

html[data-theme="light"] .nav-link.active {
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.85), 0 10px 18px rgba(10,132,255,0.10);
}

html[data-theme="light"] .theme-toggle {
    background:
        linear-gradient(180deg, rgba(255,255,255,0.98) 0%, rgba(248,250,253,0.98) 100%);
}

html[data-theme="light"] .theme-toggle-button.active {
    background: linear-gradient(180deg, rgba(255,255,255,0.98) 0%, rgba(244,247,251,0.98) 100%);
    color: #0f172a;
    box-shadow: 0 8px 18px rgba(15,23,42,0.10), inset 0 0 0 1px rgba(15,23,42,0.06);
}

html[data-theme="light"] input,
html[data-theme="light"] select,
html[data-theme="light"] textarea {
    background: rgba(255,255,255,0.98);
}

html[data-theme="light"] .table tbody tr {
    box-shadow: 0 6px 18px rgba(15,23,42,0.05);
}

html[data-theme="light"] .badge-neutral {
    background: rgba(248,250,252,0.94);
}

@media (max-width: 1180px) {
    .layout {
        grid-template-columns: 274px minmax(0, 1fr);
    }
}

@media (max-width: 860px) {
    .content {
        padding: 22px 18px 28px;
    }

    .card,
    .brand {
        border-radius: 22px;
    }

    .table {
        border-spacing: 0 6px;
    }
}

.inline-form-group{display:flex;gap:1rem;align-items:flex-end;flex-wrap:wrap}.inline-form-group .grow{flex:1 1 18rem}.inline-form-group .compact-actions{flex:0 0 auto;min-width:12rem}.stack-form{display:flex;flex-direction:column;gap:1rem}.checkbox-row{display:flex;gap:.75rem;flex-wrap:wrap}.checkbox-pill{display:inline-flex;align-items:center;gap:.45rem;padding:.55rem .85rem;border:1px solid var(--line);border-radius:999px;background:var(--panel-soft)}.checkbox-pill input{margin:0}.recurrence-weekdays{display:block}

/* --- refined glassmorphism + stronger light contrast --- */
:root {
    --glass-sheen: linear-gradient(135deg, rgba(255,255,255,0.20) 0%, rgba(255,255,255,0.05) 36%, rgba(255,255,255,0.02) 100%);
    --glass-stroke: rgba(255,255,255,0.14);
    --glass-shadow: 0 22px 54px rgba(0, 0, 0, 0.28);
}
html[data-theme="light"] {
    --panel: rgba(255,255,255,0.74);
    --panel-2: rgba(255,255,255,0.84);
    --sidebar-bg: rgba(250,252,255,0.72);
    --nav-group-bg: rgba(255,255,255,0.62);
    --card-bg: linear-gradient(180deg, rgba(255,255,255,0.82) 0%, rgba(246,249,255,0.76) 100%);
    --button-bg: linear-gradient(180deg, rgba(255,255,255,0.80) 0%, rgba(240,245,252,0.72) 100%);
    --input-bg: rgba(255,255,255,0.80);
    --calendar-day-bg: rgba(255,255,255,0.78);
    --calendar-event-bg: rgba(255,255,255,0.62);
    --detail-box-bg: rgba(255,255,255,0.66);
    --line: rgba(15, 23, 42, 0.14);
    --line-strong: rgba(15, 23, 42, 0.20);
    --muted: #54657c;
    --shadow: 0 22px 48px rgba(15,23,42,0.13);
    --glass-stroke: rgba(255,255,255,0.72);
    --glass-shadow: 0 18px 40px rgba(15,23,42,0.12);
}

.sidebar,
.brand,
.nav-group,
.card,
.theme-toggle,
.button,
.badge,
.badge-neutral,
.checkbox-pill,
.calendar-day,
.calendar-event,
.timeline-item,
.simple-list li,
.stat-card,
.day-timeline-item,
input,
select,
textarea {
    position: relative;
    box-shadow: var(--glass-shadow), inset 0 1px 0 rgba(255,255,255,0.06);
}

.sidebar::before,
.brand::before,
.nav-group::before,
.card::before,
.theme-toggle::before,
.button::before,
.badge::before,
.badge-neutral::before,
.checkbox-pill::before,
.calendar-day::before,
.calendar-event::before,
.timeline-item::before,
.simple-list li::before,
.stat-card::before,
.day-timeline-item::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: var(--glass-sheen);
    pointer-events: none;
}

.sidebar,
.brand,
.nav-group,
.card,
.theme-toggle,
.calendar-day,
.calendar-event,
.timeline-item,
.simple-list li,
.stat-card,
.day-timeline-item {
    border: 1px solid var(--glass-stroke);
}

.button,
.badge,
.badge-neutral,
.checkbox-pill,
input,
select,
textarea {
    border-color: color-mix(in srgb, var(--glass-stroke) 72%, transparent);
    backdrop-filter: blur(24px) saturate(150%);
}

.button,
.badge,
.badge-neutral,
.checkbox-pill {
    overflow: hidden;
}

html[data-theme="light"] .sidebar,
html[data-theme="light"] .brand,
html[data-theme="light"] .nav-group,
html[data-theme="light"] .card,
html[data-theme="light"] .theme-toggle,
html[data-theme="light"] .calendar-day,
html[data-theme="light"] .calendar-event,
html[data-theme="light"] .timeline-item,
html[data-theme="light"] .simple-list li,
html[data-theme="light"] .stat-card,
html[data-theme="light"] .day-timeline-item {
    backdrop-filter: blur(28px) saturate(165%);
}

html[data-theme="light"] .button,
html[data-theme="light"] .badge,
html[data-theme="light"] .badge-neutral,
html[data-theme="light"] .checkbox-pill,
html[data-theme="light"] input,
html[data-theme="light"] select,
html[data-theme="light"] textarea {
    color: #0f172a;
    backdrop-filter: blur(24px) saturate(160%);
}

html[data-theme="light"] .nav-link {
    color: #122032;
}
html[data-theme="light"] .nav-link:hover {
    background: rgba(255,255,255,0.62);
    border-color: rgba(15,23,42,0.10);
}
html[data-theme="light"] .nav-link.active {
    background: linear-gradient(180deg, rgba(255,255,255,0.86) 0%, rgba(236,243,252,0.82) 100%);
    color: #0b223f;
    box-shadow: 0 10px 24px rgba(15,23,42,0.08);
}
html[data-theme="light"] .badge,
html[data-theme="light"] .badge-neutral,
html[data-theme="light"] .checkbox-pill {
    background: rgba(255,255,255,0.58);
}
html[data-theme="light"] .table thead th {
    color: #0f172a;
}
html[data-theme="light"] .table tbody td {
    color: #15253b;
}

html[data-theme="dark"] .badge,
html[data-theme="dark"] .badge-neutral,
html[data-theme="dark"] .checkbox-pill,
html[data-theme="dark"] .button,
html[data-theme="dark"] .theme-toggle-button {
    backdrop-filter: blur(20px) saturate(140%);
}

.day-view-card {
    padding-bottom: 18px;
}
.day-timeline {
    display: grid;
    gap: 14px;
}
.day-timeline-item {
    display: grid;
    grid-template-columns: 128px minmax(0, 1fr);
    gap: 16px;
    padding: 16px;
    border-radius: 22px;
    background: var(--detail-box-bg);
}
.day-time-chip {
    align-self: start;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px 14px;
    border-radius: 999px;
    background: var(--calendar-event-bg);
    border: 1px solid var(--line-strong);
    font-weight: 700;
}
.day-timeline-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}
.day-timeline-content {
    min-width: 0;
}
.day-timeline-item.task .day-time-chip {
    background: rgba(255,159,10,0.14);
    border-color: rgba(255,159,10,0.28);
}
.day-timeline-item.shift .day-time-chip {
    background: rgba(10,132,255,0.14);
    border-color: rgba(10,132,255,0.26);
}
@media (max-width: 840px) {
    .day-timeline-item {
        grid-template-columns: 1fr;
    }
    .day-time-chip {
        justify-content: flex-start;
    }
}


/* 2026-03 glass refinement */
:root {
    --panel: rgba(20, 24, 34, 0.70);
    --panel-2: rgba(26, 31, 43, 0.76);
    --sidebar-bg: rgba(14, 18, 27, 0.70);
    --nav-group-bg: rgba(18, 23, 34, 0.42);
    --sidebar-footer-bg: rgba(18, 23, 34, 0.36);
    --card-bg: linear-gradient(180deg, rgba(24, 29, 41, 0.74) 0%, rgba(16, 20, 30, 0.68) 100%);
    --input-bg: rgba(12, 15, 23, 0.52);
    --button-bg: linear-gradient(180deg, rgba(56, 66, 86, 0.62) 0%, rgba(31, 38, 52, 0.52) 100%);
    --calendar-day-bg: rgba(18, 23, 34, 0.54);
    --calendar-event-bg: rgba(255,255,255,0.06);
    --table-row-bg: rgba(255, 255, 255, 0.028);
    --table-row-alt-bg: rgba(255, 255, 255, 0.052);
    --table-row-hover: rgba(255, 255, 255, 0.082);
    --detail-box-bg: rgba(255,255,255,0.045);
    --detail-box-border: rgba(255,255,255,0.09);
    --shadow: 0 28px 80px rgba(0, 0, 0, 0.34);
}

html[data-theme="light"] {
    --panel: rgba(255, 255, 255, 0.56);
    --panel-2: rgba(255, 255, 255, 0.66);
    --sidebar-bg: rgba(248, 251, 255, 0.60);
    --nav-group-bg: rgba(255, 255, 255, 0.44);
    --sidebar-footer-bg: rgba(255, 255, 255, 0.42);
    --card-bg: linear-gradient(180deg, rgba(255, 255, 255, 0.66) 0%, rgba(246, 250, 255, 0.58) 100%);
    --input-bg: rgba(255, 255, 255, 0.52);
    --button-bg: linear-gradient(180deg, rgba(255,255,255,0.74) 0%, rgba(241,246,253,0.64) 100%);
    --calendar-day-bg: rgba(255,255,255,0.58);
    --calendar-event-bg: rgba(255,255,255,0.50);
    --table-row-bg: rgba(255, 255, 255, 0.72);
    --table-row-alt-bg: rgba(247, 250, 255, 0.82);
    --table-row-hover: rgba(230, 239, 250, 0.92);
    --table-head-bg: rgba(240, 246, 253, 0.88);
    --detail-box-bg: rgba(255,255,255,0.62);
    --detail-box-border: rgba(148, 163, 184, 0.16);
    --shadow: 0 24px 60px rgba(148, 163, 184, 0.22);
}

.sidebar,
.card,
.nav-group,
.sidebar-footer,
.theme-toggle,
.calendar-day,
.calendar-event,
.detail-box,
.checkbox-pill,
.badge,
.badge-neutral,
.button,
input,
select,
textarea,
.table thead th {
    backdrop-filter: blur(30px) saturate(175%);
    -webkit-backdrop-filter: blur(30px) saturate(175%);
}

.card,
.nav-group,
.sidebar-footer,
.calendar-day,
.calendar-event,
.checkbox-pill,
.badge,
.badge-neutral,
.button,
input,
select,
textarea {
    position: relative;
    overflow: hidden;
}

.card::before,
.nav-group::before,
.sidebar-footer::before,
.calendar-day::before,
.calendar-event::before,
.checkbox-pill::before,
.badge::before,
.badge-neutral::before,
.button::before,
input::before,
select::before,
textarea::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.24) 0%, rgba(255,255,255,0.10) 24%, rgba(255,255,255,0.04) 55%, rgba(255,255,255,0.10) 100%);
    pointer-events: none;
}

html[data-theme="light"] .card::before,
html[data-theme="light"] .nav-group::before,
html[data-theme="light"] .sidebar-footer::before,
html[data-theme="light"] .calendar-day::before,
html[data-theme="light"] .calendar-event::before,
html[data-theme="light"] .checkbox-pill::before,
html[data-theme="light"] .badge::before,
html[data-theme="light"] .badge-neutral::before,
html[data-theme="light"] .button::before,
html[data-theme="light"] input::before,
html[data-theme="light"] select::before,
html[data-theme="light"] textarea::before {
    background: linear-gradient(135deg, rgba(255,255,255,0.56) 0%, rgba(255,255,255,0.24) 26%, rgba(255,255,255,0.08) 58%, rgba(255,255,255,0.20) 100%);
}

.card,
.nav-group,
.sidebar-footer {
    border-color: rgba(255,255,255,0.10);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.18), inset 0 1px 0 rgba(255,255,255,0.14);
}

html[data-theme="light"] .card,
html[data-theme="light"] .nav-group,
html[data-theme="light"] .sidebar-footer {
    border-color: rgba(255,255,255,0.52);
    box-shadow: 0 18px 42px rgba(148, 163, 184, 0.18), inset 0 1px 0 rgba(255,255,255,0.72);
}

.button,
.badge,
.badge-neutral,
.checkbox-pill,
.theme-toggle-button {
    box-shadow: 0 14px 30px rgba(0,0,0,0.16), inset 0 1px 0 rgba(255,255,255,0.18);
}

html[data-theme="light"] .button,
html[data-theme="light"] .badge,
html[data-theme="light"] .badge-neutral,
html[data-theme="light"] .checkbox-pill,
html[data-theme="light"] .theme-toggle-button {
    box-shadow: 0 12px 24px rgba(148,163,184,0.16), inset 0 1px 0 rgba(255,255,255,0.78);
}

.table thead th {
    background: linear-gradient(180deg, rgba(255,255,255,0.14) 0%, rgba(255,255,255,0.06) 100%);
}

html[data-theme="light"] .table thead th {
    background: linear-gradient(180deg, rgba(255,255,255,0.92) 0%, rgba(241,246,253,0.88) 100%);
}

html[data-theme="light"] .nav-link:hover {
    background: rgba(255,255,255,0.38);
}

html[data-theme="light"] .nav-link.active {
    background: linear-gradient(180deg, rgba(10, 132, 255, 0.22) 0%, rgba(10, 132, 255, 0.10) 100%);
    border-color: rgba(10,132,255,0.20);
}

/* --- Dashboard Variant C refinement --- */


.dashboard-layout-actions {
    flex-wrap: wrap;
}

.dashboard-layout-note {
    margin: -4px 0 16px;
}

.dashboard-layout-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 16px;
    align-items: start;
}

.dashboard-layout-item {
    grid-column: span 12;
    min-width: 0;
}

.dashboard-span-12 { grid-column: span 12; }
.dashboard-span-6 { grid-column: span 6; }
.dashboard-span-4 { grid-column: span 4; }
.dashboard-span-3 { grid-column: span 3; }

.dashboard-layout-item-shell {
    position: relative;
    min-height: 100%;
}

.dashboard-widget-dragbar {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 6;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.dashboard-drag-handle {
    border: 1px solid var(--line-strong);
    background: color-mix(in srgb, var(--panel) 78%, transparent);
    color: var(--muted);
    border-radius: 999px;
    min-width: 38px;
    height: 38px;
    padding: 0 12px;
    font-size: 1rem;
    backdrop-filter: blur(22px);
    box-shadow: var(--elevated-shadow-soft);
    cursor: grab;
}

html.dashboard-layout-editing .dashboard-widget-dragbar {
    opacity: 1;
    pointer-events: auto;
}

html.dashboard-layout-editing .dashboard-layout-item {
    cursor: grab;
}

html.dashboard-layout-editing .dashboard-layout-item > .dashboard-layout-item-shell > .card,
html.dashboard-layout-editing .dashboard-layout-item > .dashboard-layout-item-shell > .dashboard-kpi-grid,
html.dashboard-layout-editing .dashboard-layout-item > .dashboard-layout-item-shell > details {
    outline: 1px dashed rgba(10, 132, 255, 0.24);
    outline-offset: 8px;
}

html.dashboard-layout-editing .dashboard-layout-item .dashboard-kpi-card,
html.dashboard-layout-editing .dashboard-layout-item a,
html.dashboard-layout-editing .dashboard-layout-item button,
html.dashboard-layout-editing .dashboard-layout-item summary {
    pointer-events: none;
}

html.dashboard-layout-editing .dashboard-layout-item .dashboard-drag-handle,
html.dashboard-layout-editing .dashboard-layout-item .dashboard-layout-item-shell {
    pointer-events: auto;
}

.dashboard-layout-dragging {
    opacity: 0.6;
}

.dashboard-layout-drop-target > .dashboard-layout-item-shell > .card,
.dashboard-layout-drop-target > .dashboard-layout-item-shell > .dashboard-kpi-grid,
.dashboard-layout-drop-target > .dashboard-layout-item-shell > details {
    outline: 2px solid rgba(48, 209, 88, 0.38);
    outline-offset: 6px;
}

.dashboard-kpi-grid,
.dashboard-priority-strip,
.dashboard-advanced {
    margin-bottom: 0;
}

.dashboard-column-card {
    min-height: 100%;
}

@media (max-width: 1320px) {
    .dashboard-span-4,
    .dashboard-span-6,
    .dashboard-span-3 {
        grid-column: span 12;
    }
}

@media (max-width: 920px) {
    .monthly-analytics-header-actions {
        width: 100%;
    }

    .monthly-analytics-header-actions .button,
    .monthly-analytics-header-actions .export-menu {
        width: 100%;
    }

    .monthly-analytics-header-actions .export-menu-toggle {
        width: 100%;
    }

    .export-menu-panel {
        left: 0;
        right: auto;
        width: 100%;
    }

    .dashboard-layout-grid {
        grid-template-columns: 1fr;
    }
    .dashboard-span-12,
    .dashboard-span-6,
    .dashboard-span-4,
    .dashboard-span-3 {
        grid-column: span 1;
    }
}
.dashboard-header-slim {
    margin-bottom: 18px;
}

.dashboard-kpi-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 16px;
}

.dashboard-kpi-card {
    text-decoration: none;
    color: var(--text);
    min-height: 146px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.dashboard-kpi-card .stat-value {
    font-size: clamp(2rem, 3vw, 2.5rem);
}

.dashboard-kpi-hint {
    margin-top: 10px;
}

.dashboard-priority-strip {
    margin-bottom: 18px;
}

.compact-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.priority-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.priority-chip {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 999px;
    border: 1px solid var(--line-strong);
    background: color-mix(in srgb, var(--panel) 86%, transparent);
    color: var(--text);
    text-decoration: none;
    backdrop-filter: blur(24px);
    box-shadow: var(--elevated-shadow-soft);
}

.priority-chip-value {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    border-radius: 999px;
    background: rgba(255,255,255,0.08);
    font-weight: 700;
}

.priority-positive { border-color: rgba(48,209,88,0.24); }
.priority-positive .priority-chip-value { background: rgba(48,209,88,0.16); }
.priority-warning { border-color: rgba(255,159,10,0.28); }
.priority-warning .priority-chip-value { background: rgba(255,159,10,0.18); }
.priority-negative { border-color: rgba(255,69,58,0.28); }
.priority-negative .priority-chip-value { background: rgba(255,69,58,0.18); }

.dashboard-hybrid-grid,
.dashboard-bottom-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.dashboard-bottom-grid {
    grid-template-columns: 1.15fr 1fr;
    margin-top: 16px;
}

.dashboard-column-card {
    min-height: 100%;
}

.dashboard-subsection + .dashboard-subsection {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
}

.section-heading-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.section-heading-row h3 {
    margin: 0;
    font-size: 1rem;
}

.dashboard-shift-stack,
.dashboard-list-stack {
    display: grid;
    gap: 10px;
}

.dashboard-shift-item,
.dashboard-list-item {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 12px;
    align-items: start;
    padding: 14px 15px;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: color-mix(in srgb, var(--panel) 88%, transparent);
    text-decoration: none;
    color: var(--text);
    backdrop-filter: blur(22px);
    box-shadow: var(--elevated-shadow-soft);
}

.dashboard-list-item {
    grid-template-columns: 1fr auto;
    align-items: center;
}

.dashboard-list-item.static-row {
    text-decoration: none;
}

.compact-list-stack .dashboard-list-item {
    padding: 12px 14px;
}

.dashboard-shift-time {
    min-width: 84px;
    padding: 8px 10px;
    border-radius: 14px;
    background: color-mix(in srgb, var(--calendar-event-bg) 88%, transparent);
    text-align: center;
    font-weight: 700;
    font-size: 0.92rem;
}

.dashboard-shift-title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 4px;
}

.dashboard-inline-pills,
.dashboard-quick-stats,
.dashboard-mini-kpis,
.dashboard-bottom-kpis {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.dashboard-mini-kpis {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.dashboard-mini-kpis-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dashboard-bottom-kpis {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.soft-pill,
.mini-stat-pill,
.mini-kpi-card {
    border: 1px solid var(--line-strong);
    background: color-mix(in srgb, var(--panel) 86%, transparent);
    border-radius: 16px;
    backdrop-filter: blur(24px);
    box-shadow: var(--elevated-shadow-soft);
}

.soft-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    color: var(--muted);
}

.warning-pill {
    color: var(--warning);
    border-color: rgba(255,159,10,0.28);
}

.mini-stat-pill,
.mini-kpi-card {
    padding: 14px 15px;
}

.mini-stat-label,
.mini-kpi-label {
    display: block;
    color: var(--muted);
    font-size: 0.82rem;
    margin-bottom: 6px;
}

.mini-stat-pill strong,
.mini-kpi-card strong {
    font-size: 1.15rem;
    line-height: 1.15;
}

.dashboard-advanced {
    margin-top: 18px;
}

.dashboard-advanced > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    cursor: pointer;
    list-style: none;
}

.dashboard-advanced > summary::-webkit-details-marker {
    display: none;
}

.dashboard-advanced-body {
    margin-top: 16px;
}

html[data-theme="light"] .dashboard-kpi-card,
html[data-theme="light"] .dashboard-shift-item,
html[data-theme="light"] .dashboard-list-item,
html[data-theme="light"] .soft-pill,
html[data-theme="light"] .mini-stat-pill,
html[data-theme="light"] .mini-kpi-card,
html[data-theme="light"] .priority-chip {
    background: color-mix(in srgb, rgba(255,255,255,0.84) 92%, transparent);
    border-color: rgba(15,23,42,0.10);
}

html[data-theme="light"] .dashboard-shift-time {
    background: rgba(255,255,255,0.88);
}

html[data-theme="light"] .priority-chip-value {
    background: rgba(15,23,42,0.06);
}

@media (max-width: 1320px) {
    .dashboard-kpi-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    .dashboard-hybrid-grid {
        grid-template-columns: 1fr;
    }
    .dashboard-bottom-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 920px) {
    .dashboard-kpi-grid,
    .dashboard-mini-kpis,
    .dashboard-bottom-kpis,
    .dashboard-quick-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .dashboard-kpi-grid,
    .dashboard-mini-kpis,
    .dashboard-mini-kpis-2,
    .dashboard-bottom-kpis,
    .dashboard-quick-stats {
        grid-template-columns: 1fr;
    }
    .dashboard-shift-item,
    .dashboard-list-item {
        grid-template-columns: 1fr;
    }
    .dashboard-shift-time {
        width: fit-content;
    }
    .compact-header-row,
    .section-heading-row,
    .dashboard-advanced > summary {
        align-items: flex-start;
        flex-direction: column;
    }
}


/* --- Dashboard toolbar variant 1 --- */
.dashboard-toolbar-wrap {
    display: flex;
    justify-content: flex-end;
    align-self: flex-start;
    min-width: min(100%, 640px);
}

.dashboard-toolbar-shell {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    width: 100%;
    min-height: 72px;
    padding: 10px 14px;
    border-radius: 24px;
    border: 1px solid var(--line-strong);
    background: linear-gradient(180deg, color-mix(in srgb, var(--panel) 88%, transparent) 0%, color-mix(in srgb, var(--panel-2) 92%, transparent) 100%);
    box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,0.10);
    backdrop-filter: blur(26px);
}

.dashboard-toolbar-mode {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    width: 100%;
    min-width: 0;
    flex-wrap: wrap;
}

.dashboard-toolbar-normal[hidden],
.dashboard-toolbar-edit[hidden] {
    display: none !important;
}

.dashboard-segment-control {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px;
    border-radius: 999px;
    border: 1px solid var(--line-strong);
    background: color-mix(in srgb, var(--panel) 78%, transparent);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
}

.dashboard-segment-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 16px;
    border-radius: 999px;
    color: var(--text);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.94rem;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.dashboard-segment-link:hover {
    text-decoration: none;
    background: rgba(255,255,255,0.05);
}

.dashboard-segment-link:first-child {
    background: linear-gradient(180deg, rgba(255,255,255,0.10) 0%, rgba(255,255,255,0.04) 100%);
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.10);
}

.dashboard-toolbar-divider {
    width: 1px;
    height: 30px;
    background: linear-gradient(180deg, transparent 0%, var(--line-strong) 20%, var(--line-strong) 80%, transparent 100%);
    margin: 0 2px;
}

.dashboard-toolbar-edit-trigger,
.dashboard-toolbar-primary {
    min-height: 42px;
}

.dashboard-toolbar-status {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid rgba(10,132,255,0.22);
    background: rgba(10,132,255,0.12);
    color: var(--text);
    font-weight: 600;
    letter-spacing: 0.01em;
}

.dashboard-toolbar-edit {
    justify-content: flex-end;
}

html[data-theme="light"] .dashboard-toolbar-shell {
    background: linear-gradient(180deg, rgba(255,255,255,0.92) 0%, rgba(244,247,252,0.92) 100%);
    box-shadow: 0 18px 40px rgba(148,163,184,0.14), inset 0 1px 0 rgba(255,255,255,0.78);
}

html[data-theme="light"] .dashboard-segment-control {
    background: rgba(255,255,255,0.82);
}

html[data-theme="light"] .dashboard-segment-link:hover {
    background: rgba(15,23,42,0.05);
}

html[data-theme="light"] .dashboard-segment-link:first-child {
    background: linear-gradient(180deg, rgba(15,23,42,0.08) 0%, rgba(15,23,42,0.03) 100%);
    border-color: rgba(15,23,42,0.08);
}

@media (max-width: 1320px) {
    .dashboard-toolbar-wrap {
        min-width: 100%;
    }
}

@media (max-width: 920px) {
    .dashboard-toolbar-shell,
    .dashboard-toolbar-mode {
        justify-content: stretch;
    }

    .dashboard-toolbar-mode {
        gap: 8px;
    }

    .dashboard-segment-control,
    .dashboard-toolbar-edit-trigger,
    .dashboard-toolbar-primary,
    .dashboard-toolbar-status,
    .dashboard-toolbar-edit .button {
        width: 100%;
    }

    .dashboard-segment-link {
        flex: 1 1 0;
    }

    .dashboard-toolbar-divider {
        display: none;
    }
}

/* --- 2026-03-22 final visual refinement --- */
.utility-bar {
    justify-content: flex-end;
    padding-right: 8px;
    margin-bottom: 22px;
}

.theme-toggle {
    transform: scale(0.92);
    transform-origin: center right;
    margin-right: 22px;
    margin-top: 0;
    padding: 4px;
    gap: 4px;
    background: linear-gradient(180deg, rgba(28, 34, 48, 0.50) 0%, rgba(16, 20, 31, 0.38) 100%);
    border-color: rgba(255, 255, 255, 0.10);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.18), inset 0 1px 0 rgba(255,255,255,0.12);
}

.theme-toggle-button {
    min-width: 34px;
    min-height: 34px;
    width: 34px;
    height: 34px;
}

html[data-theme="light"] .theme-toggle {
    background: linear-gradient(180deg, rgba(255,255,255,0.56) 0%, rgba(245,248,252,0.50) 100%);
    border-color: rgba(148,163,184,0.18);
}

.sidebar {
    border-radius: 34px;
    background: linear-gradient(180deg, rgba(12, 16, 24, 0.74) 0%, rgba(8, 11, 19, 0.66) 100%);
    border-color: rgba(255,255,255,0.08);
}

.nav-group {
    border-radius: 26px;
    background: linear-gradient(180deg, rgba(21, 26, 38, 0.76) 0%, rgba(14, 18, 28, 0.68) 100%);
}

.nav-link {
    border-radius: 16px;
}

.card,
.mini-kpi-card,
.stat-card,
.dashboard-kpi-card,
.dashboard-column-card,
.dashboard-shift-item,
.dashboard-list-item,
.toggle-chip,
.soft-pill,
.badge,
.button,
.theme-toggle,
.dashboard-toolbar-shell,
.dashboard-segment-control,
input,
select,
textarea {
    transition: background 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease, color 0.24s ease;
}

html[data-theme="dark"] .card,
html[data-theme="dark"] .nested-card,
html[data-theme="dark"] .dashboard-column-card,
html[data-theme="dark"] .dashboard-advanced,
html[data-theme="dark"] .mini-kpi-card,
html[data-theme="dark"] .stat-card,
html[data-theme="dark"] .dashboard-kpi-card,
html[data-theme="dark"] .day-view-card,
html[data-theme="dark"] .calendar-day,
html[data-theme="dark"] .calendar-event,
html[data-theme="dark"] .detail-box,
html[data-theme="dark"] .hint-box,
html[data-theme="dark"] .public-card {
    background: linear-gradient(180deg, rgba(17, 21, 31, 0.88) 0%, rgba(10, 13, 21, 0.82) 100%);
    border-color: rgba(255,255,255,0.08);
    box-shadow: 0 22px 52px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255,255,255,0.08);
}

html[data-theme="dark"] .button,
html[data-theme="dark"] .badge,
html[data-theme="dark"] .badge-neutral,
html[data-theme="dark"] .checkbox-pill,
html[data-theme="dark"] .soft-pill,
html[data-theme="dark"] .toggle-chip,
html[data-theme="dark"] .dashboard-toolbar-shell,
html[data-theme="dark"] .dashboard-segment-control,
html[data-theme="dark"] input,
html[data-theme="dark"] select,
html[data-theme="dark"] textarea {
    background: linear-gradient(180deg, rgba(30, 36, 50, 0.78) 0%, rgba(18, 22, 33, 0.72) 100%);
    border-color: rgba(255,255,255,0.10);
}

html[data-theme="dark"] .sidebar::before,
html[data-theme="dark"] .nav-group::before,
html[data-theme="dark"] .card::before,
html[data-theme="dark"] .button::before,
html[data-theme="dark"] .badge::before,
html[data-theme="dark"] .theme-toggle::before {
    background: linear-gradient(135deg, rgba(255,255,255,0.12) 0%, rgba(255,255,255,0.05) 28%, rgba(255,255,255,0.015) 58%, rgba(255,255,255,0.05) 100%);
}

html[data-theme="light"] .card,
html[data-theme="light"] .nested-card,
html[data-theme="light"] .dashboard-column-card,
html[data-theme="light"] .dashboard-advanced,
html[data-theme="light"] .mini-kpi-card,
html[data-theme="light"] .stat-card,
html[data-theme="light"] .dashboard-kpi-card,
html[data-theme="light"] .day-view-card,
html[data-theme="light"] .calendar-day,
html[data-theme="light"] .calendar-event,
html[data-theme="light"] .detail-box,
html[data-theme="light"] .hint-box,
html[data-theme="light"] .public-card {
    background: linear-gradient(180deg, rgba(255,255,255,0.86) 0%, rgba(244,248,252,0.80) 100%);
    border-color: rgba(148,163,184,0.16);
    box-shadow: 0 18px 44px rgba(148,163,184,0.16), inset 0 1px 0 rgba(255,255,255,0.84);
}

html[data-theme="light"] .sidebar {
    background: linear-gradient(180deg, rgba(247,250,255,0.72) 0%, rgba(240,246,252,0.64) 100%);
    border-color: rgba(148,163,184,0.14);
}

html[data-theme="light"] .nav-group {
    background: linear-gradient(180deg, rgba(255,255,255,0.70) 0%, rgba(248,251,255,0.64) 100%);
}

html[data-theme="light"] .button,
html[data-theme="light"] .badge,
html[data-theme="light"] .badge-neutral,
html[data-theme="light"] .checkbox-pill,
html[data-theme="light"] .soft-pill,
html[data-theme="light"] .toggle-chip,
html[data-theme="light"] .dashboard-toolbar-shell,
html[data-theme="light"] .dashboard-segment-control,
html[data-theme="light"] input,
html[data-theme="light"] select,
html[data-theme="light"] textarea {
    background: linear-gradient(180deg, rgba(255,255,255,0.78) 0%, rgba(243,247,252,0.70) 100%);
}

.dashboard-advanced {
    overflow: hidden;
}

.dashboard-advanced > summary {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 78px;
    padding: 22px 24px;
    cursor: pointer;
}

.dashboard-advanced-summary-copy {
    display: grid;
    gap: 5px;
}

.dashboard-advanced-summary-actions {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.dashboard-expand-hint {
    border-style: dashed;
}

.dashboard-summary-chevron {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: color-mix(in srgb, var(--panel) 82%, transparent);
    font-size: 1rem;
    line-height: 1;
    transition: transform 0.24s ease;
}

.dashboard-advanced[open] .dashboard-summary-chevron {
    transform: rotate(180deg);
}

.dashboard-advanced > summary:hover .dashboard-expand-hint,
.dashboard-advanced > summary:hover .dashboard-summary-chevron {
    border-color: var(--line-strong);
}

.monthly-analytics-page .two-column + .two-column {
    margin-top: 24px;
}

.monthly-analytics-page .card {
    overflow: visible;
}

.backup-archive-table {
    margin-top: 14px;
}

@media (max-width: 920px) {
    .utility-bar {
        padding-right: 0;
        margin-bottom: 18px;
    }

    .theme-toggle {
        margin-right: 0;
        transform: scale(0.9);
    }

    .dashboard-advanced > summary {
        align-items: flex-start;
    }

    .dashboard-advanced-summary-actions {
        width: 100%;
    }
}


/* --- sidebar logo centering + cleaner dashboard header --- */
.brand {
    text-align: center;
}

.brand-logo {
    width: 100%;
    justify-content: center;
    align-items: center;
}

.brand-logo-image {
    margin-left: auto;
    margin-right: auto;
}

.brand-subtitle {
    text-align: center;
}

.dashboard-header-slim {
    margin-bottom: 18px;
}


.filters-grid-5 { grid-template-columns: 2fr 1fr 1fr 1fr 1fr auto; }
.compliance-summary-card { margin-bottom: 20px; }
.compliance-alert { padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); margin-bottom: 12px; }
.compliance-alert-negative { border-color: rgba(255,69,58,0.24); background: rgba(255,69,58,0.10); }
.compliance-alert-warning { border-color: rgba(255,159,10,0.24); background: rgba(255,159,10,0.10); }
.compliance-check-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.compliance-check { padding: 16px; margin-top: 0; }
.compliance-check-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
@media (max-width: 980px) { .compliance-check-grid { grid-template-columns: 1fr; } }

/* --- language switcher --- */
.utility-controls {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 12px;
}

.language-switch {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px;
    transform: scale(0.92);
    transform-origin: center right;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.38);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(18px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

.language-switch-button {
    appearance: none;
    border: 0;
    background: transparent;
    color: var(--muted);
    min-width: 42px;
    height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    cursor: pointer;
    transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.language-switch-button:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.06);
}

.language-switch-button.active {
    color: #ffffff;
    background: linear-gradient(180deg, rgba(10, 132, 255, 0.96) 0%, rgba(10, 132, 255, 0.78) 100%);
    box-shadow: 0 10px 20px rgba(10, 132, 255, 0.26);
}

html[data-theme="light"] .language-switch {
    background: rgba(255, 255, 255, 0.72);
    border-color: rgba(15, 23, 42, 0.08);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.10);
}

html[data-theme="light"] .language-switch-button {
    color: #475569;
}

html[data-theme="light"] .language-switch-button:hover {
    color: #0f172a;
    background: rgba(15, 23, 42, 0.05);
}

html[data-theme="light"] .language-switch-button.active {
    color: #ffffff;
    background: linear-gradient(180deg, rgba(10, 132, 255, 0.96) 0%, rgba(10, 132, 255, 0.78) 100%);
}

@media (max-width: 820px) {
    .utility-controls {
        width: 100%;
        justify-content: flex-end;
        flex-wrap: wrap;
        gap: 10px;
    }

    .language-switch,
    .theme-toggle {
        margin-left: 0;
    }
}


/* --- premium top-right controls alignment fix --- */
.utility-bar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding-right: 8px;
    margin-bottom: 22px;
}

.premium-utility-controls {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 14px;
    margin-left: auto;
}

.utility-control-group {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
}

.utility-control-label {
    font-size: 0.72rem;
    line-height: 1;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
    opacity: 0.88;
    user-select: none;
}

.language-switch,
.theme-toggle {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 44px;
    margin: 0;
    padding: 4px;
    gap: 4px;
    border-radius: 999px;
    transform: none;
    transform-origin: center center;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.20), inset 0 1px 0 rgba(255,255,255,0.10);
}

.language-switch {
    background: linear-gradient(180deg, rgba(28, 34, 48, 0.56) 0%, rgba(16, 20, 31, 0.42) 100%);
    border: 1px solid rgba(255, 255, 255, 0.10);
}

.theme-toggle {
    background: linear-gradient(180deg, rgba(28, 34, 48, 0.56) 0%, rgba(16, 20, 31, 0.42) 100%);
    border: 1px solid rgba(255, 255, 255, 0.10);
}

.language-switch-button,
.theme-toggle-button {
    appearance: none;
    border: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: center;
    line-height: 1;
    margin: 0;
    cursor: pointer;
}

.language-switch-button {
    min-width: 42px;
    height: 36px;
    padding: 0 12px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--muted);
    background: transparent;
    transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.theme-toggle-button {
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
    border-radius: 999px;
    background: transparent;
    transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.theme-symbol {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-size: 0.95rem;
    line-height: 1;
}

.language-switch-button:hover,
.theme-toggle-button:hover {
    transform: translateY(-1px);
}

.language-switch-button.active {
    color: #ffffff;
    background: linear-gradient(180deg, rgba(10, 132, 255, 0.96) 0%, rgba(10, 132, 255, 0.78) 100%);
    box-shadow: 0 10px 20px rgba(10, 132, 255, 0.26);
}

.theme-toggle-button.active {
    color: #ffffff;
    background: linear-gradient(180deg, rgba(10, 132, 255, 0.96) 0%, rgba(10, 132, 255, 0.78) 100%);
    box-shadow: 0 10px 20px rgba(10, 132, 255, 0.26);
}

html[data-theme="light"] .language-switch,
html[data-theme="light"] .theme-toggle {
    background: linear-gradient(180deg, rgba(255,255,255,0.82) 0%, rgba(244,248,252,0.70) 100%);
    border-color: rgba(15, 23, 42, 0.08);
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.10), inset 0 1px 0 rgba(255,255,255,0.86);
}

html[data-theme="light"] .language-switch-button,
html[data-theme="light"] .theme-toggle-button {
    color: #475569;
}

html[data-theme="light"] .language-switch-button:hover,
html[data-theme="light"] .theme-toggle-button:hover {
    background: rgba(15, 23, 42, 0.05);
    color: #0f172a;
}

html[data-theme="light"] .language-switch-button.active,
html[data-theme="light"] .theme-toggle-button.active {
    color: #ffffff;
    background: linear-gradient(180deg, rgba(10, 132, 255, 0.96) 0%, rgba(10, 132, 255, 0.78) 100%);
}

@media (max-width: 980px) {
    .premium-utility-controls {
        width: 100%;
        justify-content: flex-end;
        flex-wrap: wrap;
        gap: 10px;
    }

    .utility-control-group {
        gap: 8px;
        min-height: 40px;
    }

    .utility-control-label {
        font-size: 0.68rem;
    }

    .language-switch,
    .theme-toggle {
        height: 40px;
    }

    .language-switch-button,
    .theme-toggle-button {
        height: 32px;
        min-height: 32px;
    }

    .theme-toggle-button {
        width: 32px;
        min-width: 32px;
    }
}


/* --- 2026-03-22 utility controls final cleanup --- */
.utility-bar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding-right: 8px;
    margin-bottom: 22px;
}

.utility-controls-shell {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 48px;
    padding: 6px;
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(28, 34, 48, 0.58) 0%, rgba(16, 20, 31, 0.44) 100%);
    border: 1px solid rgba(255, 255, 255, 0.10);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.20), inset 0 1px 0 rgba(255,255,255,0.10);
}

.utility-controls-shell .utility-control-label,
.utility-control-label,
.premium-utility-controls,
.utility-control-group {
    display: none !important;
}

.utility-controls-shell .language-switch,
.utility-controls-shell .theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: center;
    height: 36px;
    min-height: 36px;
    margin: 0;
    padding: 0;
    gap: 4px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    box-shadow: none;
    transform: none;
}

.utility-controls-shell .language-switch {
    padding-right: 2px;
}

.utility-controls-shell .language-switch-button,
.utility-controls-shell .theme-toggle-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: center;
    box-sizing: border-box;
    height: 36px;
    min-height: 36px;
    margin: 0;
    border: 0;
    border-radius: 999px;
    line-height: 1;
    transform: none !important;
}

.utility-controls-shell .language-switch-button {
    min-width: 42px;
    padding: 0 12px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--muted);
    background: transparent;
}

.utility-controls-shell .theme-toggle-button {
    width: 36px;
    min-width: 36px;
    padding: 0;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.04);
}

.utility-controls-shell .theme-toggle-button.active,
.utility-controls-shell .language-switch-button.active {
    color: #ffffff;
    background: linear-gradient(180deg, rgba(10, 132, 255, 0.96) 0%, rgba(10, 132, 255, 0.78) 100%);
    box-shadow: 0 10px 20px rgba(10, 132, 255, 0.26);
}

.utility-controls-shell .theme-toggle-button:not(.active):hover,
.utility-controls-shell .language-switch-button:not(.active):hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text);
}

.utility-controls-shell .theme-symbol {
    width: 100%;
    height: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    line-height: 1;
}

html[data-theme="light"] .utility-controls-shell {
    background: linear-gradient(180deg, rgba(255,255,255,0.82) 0%, rgba(244,248,252,0.70) 100%);
    border-color: rgba(15, 23, 42, 0.08);
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.10), inset 0 1px 0 rgba(255,255,255,0.86);
}

html[data-theme="light"] .utility-controls-shell .language-switch-button,
html[data-theme="light"] .utility-controls-shell .theme-toggle-button {
    color: #475569;
}

html[data-theme="light"] .utility-controls-shell .theme-toggle-button:not(.active) {
    background: rgba(15, 23, 42, 0.04);
}

html[data-theme="light"] .utility-controls-shell .theme-toggle-button:not(.active):hover,
html[data-theme="light"] .utility-controls-shell .language-switch-button:not(.active):hover {
    background: rgba(15, 23, 42, 0.05);
    color: #0f172a;
}

@media (max-width: 980px) {
    .utility-controls-shell {
        gap: 8px;
        min-height: 44px;
        padding: 5px;
    }

    .utility-controls-shell .language-switch,
    .utility-controls-shell .theme-toggle,
    .utility-controls-shell .language-switch-button,
    .utility-controls-shell .theme-toggle-button {
        height: 34px;
        min-height: 34px;
    }

    .utility-controls-shell .language-switch-button {
        min-width: 38px;
        padding: 0 10px;
        font-size: 0.74rem;
    }

    .utility-controls-shell .theme-toggle-button {
        width: 34px;
        min-width: 34px;
    }
}

/* Final topbar controls override */
.utility-bar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-bottom: 22px;
    padding-right: 0;
}

.utility-controls-shell {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    height: 50px;
    min-height: 50px;
    padding: 6px 8px;
    border-radius: 999px;
}

.utility-controls-shell .language-switch,
.utility-controls-shell .theme-toggle {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    height: 38px;
    min-height: 38px;
    margin: 0;
    padding: 0;
}

.utility-controls-shell .theme-toggle {
    margin-left: 10px;
    padding-left: 12px;
}

.utility-controls-shell .theme-toggle::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    width: 1px;
    height: 24px;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.10);
}

.utility-controls-shell .language-switch-button,
.utility-controls-shell .theme-toggle-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    min-width: 38px;
    height: 38px;
    min-height: 38px;
    padding: 0;
    margin: 0;
    border: 0;
    border-radius: 999px;
    line-height: 1;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: var(--muted);
    background: transparent;
    box-shadow: none;
}

.utility-controls-shell .theme-toggle-button {
    font-size: 0.98rem;
    letter-spacing: 0;
}

.utility-controls-shell .language-switch-button.active,
.utility-controls-shell .theme-toggle-button.active {
    color: #ffffff;
    background: linear-gradient(180deg, rgba(10, 132, 255, 0.96) 0%, rgba(10, 132, 255, 0.78) 100%);
    box-shadow: 0 10px 20px rgba(10, 132, 255, 0.24);
}

.utility-controls-shell .language-switch-button:hover,
.utility-controls-shell .theme-toggle-button:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.06);
}

.utility-controls-shell .language-switch-button.active:hover,
.utility-controls-shell .theme-toggle-button.active:hover {
    color: #ffffff;
    background: linear-gradient(180deg, rgba(10, 132, 255, 0.96) 0%, rgba(10, 132, 255, 0.78) 100%);
}

.utility-controls-shell .theme-symbol {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    line-height: 1;
    transform: translateY(-0.5px);
}

html[data-theme="light"] .utility-controls-shell .theme-toggle::before {
    background: rgba(15, 23, 42, 0.10);
}

html[data-theme="light"] .utility-controls-shell .language-switch-button,
html[data-theme="light"] .utility-controls-shell .theme-toggle-button {
    color: #475569;
    background: transparent;
}

html[data-theme="light"] .utility-controls-shell .language-switch-button:hover,
html[data-theme="light"] .utility-controls-shell .theme-toggle-button:hover {
    color: #0f172a;
    background: rgba(15, 23, 42, 0.05);
}

html[data-theme="light"] .utility-controls-shell .language-switch-button.active,
html[data-theme="light"] .utility-controls-shell .theme-toggle-button.active {
    color: #ffffff;
}

@media (max-width: 980px) {
    .utility-controls-shell {
        height: 46px;
        min-height: 46px;
        padding: 4px 6px;
    }

    .utility-controls-shell .language-switch,
    .utility-controls-shell .theme-toggle,
    .utility-controls-shell .language-switch-button,
    .utility-controls-shell .theme-toggle-button,
    .utility-controls-shell .theme-symbol {
        width: 34px;
        min-width: 34px;
        height: 34px;
        min-height: 34px;
    }

    .utility-controls-shell .theme-toggle {
        margin-left: 8px;
        padding-left: 10px;
    }
}

/* Definitive topbar control fix */
.utility-bar {
    display: flex !important;
    justify-content: flex-end !important;
    align-items: center !important;
    margin-bottom: 22px !important;
    padding-right: 0 !important;
}

.utility-controls-shell {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0 !important;
    height: 48px !important;
    min-height: 48px !important;
    padding: 5px 8px !important;
    border-radius: 999px !important;
    overflow: hidden !important;
    background: linear-gradient(180deg, rgba(24, 30, 42, 0.72) 0%, rgba(15, 19, 29, 0.60) 100%) !important;
    border: 1px solid rgba(255,255,255,0.10) !important;
    box-shadow: 0 14px 28px rgba(0,0,0,0.18), inset 0 1px 0 rgba(255,255,255,0.08) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
}

.utility-controls-shell .language-switch,
.utility-controls-shell .theme-toggle {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 4px !important;
    height: 100% !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    overflow: visible !important;
    position: relative !important;
}

.utility-controls-shell .theme-toggle {
    margin-left: 8px !important;
    padding-left: 10px !important;
}

.utility-controls-shell .theme-toggle::before {
    content: "" !important;
    position: absolute !important;
    left: 0 !important;
    top: 50% !important;
    width: 1px !important;
    height: 22px !important;
    transform: translateY(-50%) !important;
    background: rgba(255,255,255,0.12) !important;
    border-radius: 999px !important;
}

.utility-controls-shell .language-switch-button,
.utility-controls-shell .theme-toggle-button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 34px !important;
    min-width: 34px !important;
    height: 34px !important;
    min-height: 34px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 999px !important;
    background: transparent !important;
    color: var(--muted) !important;
    line-height: 1 !important;
    font-size: 0.76rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.06em !important;
    box-shadow: none !important;
    transform: none !important;
}

.utility-controls-shell .theme-toggle-button {
    font-size: 0.95rem !important;
    letter-spacing: 0 !important;
}

.utility-controls-shell .theme-symbol {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    height: 100% !important;
    line-height: 1 !important;
    transform: none !important;
}

.utility-controls-shell .language-switch-button:hover,
.utility-controls-shell .theme-toggle-button:hover {
    background: rgba(255,255,255,0.06) !important;
    color: var(--text) !important;
}

.utility-controls-shell .language-switch-button.active,
.utility-controls-shell .theme-toggle-button.active,
.utility-controls-shell .language-switch-button.active:hover,
.utility-controls-shell .theme-toggle-button.active:hover {
    background: linear-gradient(180deg, rgba(10,132,255,0.96) 0%, rgba(10,132,255,0.78) 100%) !important;
    color: #ffffff !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.12), 0 8px 18px rgba(10,132,255,0.22) !important;
}

html[data-theme="light"] .utility-controls-shell {
    background: linear-gradient(180deg, rgba(255,255,255,0.84) 0%, rgba(245,248,252,0.74) 100%) !important;
    border-color: rgba(15,23,42,0.08) !important;
    box-shadow: 0 14px 28px rgba(15,23,42,0.10), inset 0 1px 0 rgba(255,255,255,0.88) !important;
}

html[data-theme="light"] .utility-controls-shell .theme-toggle::before {
    background: rgba(15,23,42,0.10) !important;
}

html[data-theme="light"] .utility-controls-shell .language-switch-button,
html[data-theme="light"] .utility-controls-shell .theme-toggle-button {
    color: #475569 !important;
}

html[data-theme="light"] .utility-controls-shell .language-switch-button:hover,
html[data-theme="light"] .utility-controls-shell .theme-toggle-button:hover {
    background: rgba(15,23,42,0.05) !important;
    color: #0f172a !important;
}

html[data-theme="light"] .utility-controls-shell .language-switch-button.active,
html[data-theme="light"] .utility-controls-shell .theme-toggle-button.active {
    color: #ffffff !important;
}

@media (max-width: 980px) {
    .utility-controls-shell {
        height: 44px !important;
        min-height: 44px !important;
        padding: 4px 6px !important;
    }

    .utility-controls-shell .theme-toggle {
        margin-left: 6px !important;
        padding-left: 8px !important;
    }

    .utility-controls-shell .theme-toggle::before {
        height: 18px !important;
    }

    .utility-controls-shell .language-switch-button,
    .utility-controls-shell .theme-toggle-button {
        width: 32px !important;
        min-width: 32px !important;
        height: 32px !important;
        min-height: 32px !important;
        font-size: 0.72rem !important;
    }

    .utility-controls-shell .theme-toggle-button {
        font-size: 0.9rem !important;
    }
}


/* === Final flat topbar controls override === */
.utility-bar {
    display: flex !important;
    justify-content: flex-end !important;
    align-items: center !important;
    margin-bottom: 18px !important;
}

.utility-controls-flat {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 8px !important;
    height: 52px !important;
    padding: 6px 10px !important;
    border-radius: 999px !important;
    overflow: visible !important;
    white-space: nowrap !important;
}

.utility-controls-flat .utility-chip {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 40px !important;
    min-width: 40px !important;
    height: 40px !important;
    min-height: 40px !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 999px !important;
    background: transparent !important;
    color: var(--muted) !important;
    font-size: 0.92rem !important;
    font-weight: 800 !important;
    letter-spacing: 0.05em !important;
    line-height: 1 !important;
    box-shadow: none !important;
    transform: none !important;
    flex: 0 0 40px !important;
}

.utility-controls-flat .theme-toggle-button {
    font-size: 1.08rem !important;
    letter-spacing: 0 !important;
}

.utility-controls-flat .theme-symbol {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    height: 100% !important;
    line-height: 1 !important;
}

.utility-controls-flat .utility-divider {
    display: block !important;
    width: 1px !important;
    height: 24px !important;
    margin: 0 2px 0 4px !important;
    background: rgba(255,255,255,0.12) !important;
    border-radius: 999px !important;
    flex: 0 0 1px !important;
}

.utility-controls-flat .utility-chip:hover {
    background: rgba(255,255,255,0.06) !important;
    color: var(--text) !important;
}

.utility-controls-flat .utility-chip.active,
.utility-controls-flat .utility-chip.active:hover {
    background: linear-gradient(180deg, rgba(10,132,255,0.96) 0%, rgba(10,132,255,0.78) 100%) !important;
    color: #fff !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.12), 0 8px 18px rgba(10,132,255,0.22) !important;
}

html[data-theme="light"] .utility-controls-flat .utility-chip {
    color: #475569 !important;
}

html[data-theme="light"] .utility-controls-flat .utility-divider {
    background: rgba(15,23,42,0.10) !important;
}

html[data-theme="light"] .utility-controls-flat .utility-chip:hover {
    background: rgba(15,23,42,0.06) !important;
    color: #0f172a !important;
}

html[data-theme="light"] .utility-controls-flat .utility-chip.active,
html[data-theme="light"] .utility-controls-flat .utility-chip.active:hover {
    color: #ffffff !important;
}

@media (max-width: 860px) {
    .utility-controls-flat {
        width: 100% !important;
        justify-content: center !important;
    }
}


/* --- audit log disclosure (collapsed by default, textless control) --- */
.audit-section {
    display: block;
}

.audit-disclosure {
    overflow: hidden;
    padding-top: 0;
}

.audit-disclosure > summary {
    list-style: none;
}

.audit-disclosure > summary::-webkit-details-marker {
    display: none;
}

.audit-disclosure-summary {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    min-height: 52px;
    padding: 14px 18px;
    cursor: pointer;
    user-select: none;
}

.audit-disclosure-summary:focus-visible {
    outline: none;
}

.audit-disclosure-control {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    width: 42px;
    height: 28px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.10);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 8px 24px rgba(0,0,0,0.18);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    transition: transform 0.22s ease, background 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.audit-disclosure-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.70);
}

.audit-disclosure-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    margin-left: 10px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
}

.audit-disclosure[open] .audit-disclosure-control {
    transform: rotate(90deg);
    background: rgba(10, 132, 255, 0.18);
    border-color: rgba(10, 132, 255, 0.28);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.10), 0 10px 28px rgba(10,132,255,0.16);
}

.audit-disclosure-summary:hover .audit-disclosure-control,
.audit-disclosure-summary:focus-visible .audit-disclosure-control {
    background: rgba(255, 255, 255, 0.09);
    border-color: rgba(255, 255, 255, 0.14);
}

.audit-disclosure-summary:hover .audit-disclosure-count,
.audit-disclosure-summary:focus-visible .audit-disclosure-count {
    color: var(--text);
    border-color: rgba(255, 255, 255, 0.12);
}

.audit-disclosure-body {
    padding: 0 18px 18px;
}

html[data-theme="light"] .audit-disclosure-control {
    background: rgba(15, 23, 42, 0.04);
    border-color: rgba(15, 23, 42, 0.08);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.8), 0 10px 28px rgba(15,23,42,0.08);
}

html[data-theme="light"] .audit-disclosure-dot {
    background: rgba(15, 23, 42, 0.48);
}

html[data-theme="light"] .audit-disclosure-count {
    color: #64748b;
    background: rgba(15, 23, 42, 0.03);
    border-color: rgba(15, 23, 42, 0.08);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.9);
}

html[data-theme="light"] .audit-disclosure[open] .audit-disclosure-control {
    background: rgba(10, 132, 255, 0.12);
    border-color: rgba(10, 132, 255, 0.20);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.9), 0 10px 24px rgba(10,132,255,0.12);
}

@media (max-width: 820px) {
    .audit-disclosure-summary {
        min-height: 48px;
        padding: 12px 14px;
    }

    .audit-disclosure-body {
        padding: 0 14px 14px;
    }
}


/* --- apple design system unification: final pass --- */
:root {
    --radius-xs: 12px;
    --radius-sm: 16px;
    --radius-md: 20px;
    --radius-lg: 26px;
    --shadow-soft: 0 14px 36px rgba(0, 0, 0, 0.18);
    --shadow-card: 0 18px 48px rgba(0, 0, 0, 0.22);
    --shadow-strong: 0 26px 64px rgba(0, 0, 0, 0.28);
    --surface-glass: color-mix(in srgb, var(--panel-2) 88%, transparent);
    --surface-glass-soft: color-mix(in srgb, var(--panel) 90%, transparent);
    --field-height: 48px;
    --button-height: 46px;
    --toolbar-height: 42px;
}

html[data-theme="light"] {
    --shadow-soft: 0 12px 28px rgba(15, 23, 42, 0.08);
    --shadow-card: 0 16px 36px rgba(15, 23, 42, 0.10);
    --shadow-strong: 0 22px 52px rgba(15, 23, 42, 0.12);
}

html {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

body {
    line-height: 1.5;
    letter-spacing: -0.011em;
}

.sidebar {
    padding: 26px 20px;
}

.brand,
.card,
.nav-group,
.sidebar-footer,
.calendar-day,
.notes-box,
.hint-box,
.detail-list div,
.simple-list li,
.timeline-item,
.toggle-chip,
.flash,
.theme-toggle,
.language-switch,
.export-menu-panel {
    backdrop-filter: blur(22px) saturate(135%);
    -webkit-backdrop-filter: blur(22px) saturate(135%);
}

.brand {
    padding: 18px 18px 20px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
}

.brand-logo {
    justify-content: center;
    align-items: center;
}

.brand-logo-image {
    width: min(100%, 150px);
}

.brand-subtitle {
    margin-top: 12px;
    text-align: center;
    font-size: 0.9rem;
    letter-spacing: -0.01em;
}

.nav-group {
    border-radius: var(--radius-md);
    padding: 12px;
}

.nav-link {
    min-height: 46px;
    padding: 12px 14px;
    border-radius: 15px;
    font-weight: 560;
    letter-spacing: -0.012em;
}

.nav-link:hover {
    transform: translateY(-1px);
}

.sidebar-footer {
    border-radius: var(--radius-md);
}

.content {
    padding: 28px;
}

.utility-bar {
    margin-bottom: 18px;
}

.page-header {
    gap: 20px;
    margin-bottom: 24px;
}

.page-header h1 {
    font-size: clamp(1.9rem, 2.6vw, 2.35rem);
    letter-spacing: -0.04em;
}

.page-header p,
.card p,
.notes-box p,
.hint-box p,
.empty-state {
    line-height: 1.62;
}

.card {
    padding: 24px;
    border-radius: var(--radius-lg);
    background: var(--surface-glass);
    box-shadow: var(--shadow-card);
}

.card-header {
    margin-bottom: 18px;
}

.card-header h2,
.card-header h3 {
    font-size: 1.08rem;
    letter-spacing: -0.022em;
}

.stats-grid {
    gap: 18px;
}

.stat-card {
    min-height: 132px;
}

.stat-label {
    font-size: 0.9rem;
    letter-spacing: -0.012em;
}

.stat-value {
    font-size: clamp(1.8rem, 2vw, 2.1rem);
    letter-spacing: -0.045em;
}

.table-wrap,
.table-responsive {
    border-radius: var(--radius-md);
}

.table {
    border-collapse: separate;
    border-spacing: 0;
}

.table th,
.table td {
    padding: 14px 14px;
}

.table th {
    font-size: 0.74rem;
    letter-spacing: 0.11em;
}

.table tbody tr {
    transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.table tbody tr:hover {
    transform: translateY(-1px);
}

.field {
    gap: 9px;
}

.field label {
    font-size: 0.84rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}

input,
select,
textarea {
    border-radius: var(--radius-sm);
    min-height: var(--field-height);
    padding: 12px 15px;
    border-color: color-mix(in srgb, var(--line-strong) 82%, transparent);
    background: color-mix(in srgb, var(--input-bg) 96%, transparent);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.04), 0 1px 0 rgba(255,255,255,0.02);
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease, background 0.18s ease;
}

textarea {
    min-height: 128px;
}

input:hover,
select:hover,
textarea:hover {
    border-color: color-mix(in srgb, var(--accent) 22%, var(--line-strong));
}

input:focus,
select:focus,
textarea:focus {
    box-shadow: 0 0 0 4px rgba(10, 132, 255, 0.12), inset 0 1px 0 rgba(255,255,255,0.05);
    transform: translateY(-1px);
}

.button,
.view-tab,
.export-menu-toggle,
.utility-controls-shell .language-switch-button,
.utility-controls-shell .theme-toggle-button {
    min-height: var(--button-height);
    border-radius: var(--radius-sm);
    font-weight: 620;
    letter-spacing: -0.014em;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.button {
    padding: 11px 16px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.04), 0 10px 24px rgba(0,0,0,0.12);
}

.button.small {
    min-height: 38px;
    border-radius: 13px;
}

.button:hover,
.view-tab:hover,
.export-menu-toggle:hover,
.utility-controls-shell .language-switch-button:hover,
.utility-controls-shell .theme-toggle-button:hover {
    transform: translateY(-1px);
}

.button:active,
.view-tab:active,
.export-menu-toggle:active,
.utility-controls-shell .language-switch-button:active,
.utility-controls-shell .theme-toggle-button:active {
    transform: translateY(0);
}

.badge,
.stage-chip {
    min-height: 28px;
    padding: 6px 11px;
    border-radius: 999px;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.detail-list,
.two-column,
.detail-grid,
.three-column,
.form-grid {
    gap: 18px;
}

.detail-list div,
.notes-box,
.hint-box,
.simple-list li,
.timeline-item {
    border-radius: var(--radius-md);
}

.notes-box,
.hint-box {
    padding: 18px 20px;
}

.timeline-item {
    padding: 18px;
}

.toolbar,
.toolbar-group,
.header-actions,
.form-actions,
.filter-actions {
    gap: 12px;
}

.view-tab {
    border-radius: 999px;
    padding: 0.68rem 1rem;
}

.calendar-day {
    border-radius: var(--radius-md);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.04), var(--shadow-soft);
}

.calendar-event {
    border-radius: 15px;
}

.export-menu-panel {
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-strong);
}

.export-menu-item {
    min-height: 44px;
    border-radius: 14px;
}

.utility-controls-shell {
    min-height: var(--toolbar-height);
    border-radius: 999px;
    padding: 4px;
    background: color-mix(in srgb, var(--panel-2) 88%, transparent);
    border: 1px solid color-mix(in srgb, var(--line-strong) 84%, transparent);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(24px) saturate(140%);
    -webkit-backdrop-filter: blur(24px) saturate(140%);
}

.utility-controls-shell .utility-divider {
    width: 1px;
    align-self: stretch;
    margin: 4px 2px;
    background: color-mix(in srgb, var(--line-strong) 80%, transparent);
}

.utility-controls-shell .language-switch-button,
.utility-controls-shell .theme-toggle-button {
    min-width: 40px;
    min-height: 34px;
    padding: 0 12px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    box-shadow: none;
    font-size: 0.84rem;
}

.utility-controls-shell .theme-toggle-button {
    padding: 0 10px;
}

.utility-controls-shell .language-switch-button.active,
.utility-controls-shell .theme-toggle-button.active {
    background: linear-gradient(180deg, rgba(255,255,255,0.14) 0%, rgba(255,255,255,0.08) 100%);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.10), 0 8px 18px rgba(0,0,0,0.16);
}

html[data-theme="light"] .utility-controls-shell .language-switch-button.active,
html[data-theme="light"] .utility-controls-shell .theme-toggle-button.active {
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.08) 0%, rgba(15, 23, 42, 0.04) 100%);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.92), 0 8px 18px rgba(15,23,42,0.08);
}

.audit-disclosure {
    padding: 0;
    overflow: hidden;
}

.audit-disclosure-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    min-height: 54px;
    padding: 14px 18px;
}

.audit-disclosure-leading {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.audit-disclosure-label {
    color: rgba(156, 163, 175, 0.86);
    font-size: 0.76rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    white-space: nowrap;
}

html[data-theme="light"] .audit-disclosure-label {
    color: rgba(107, 114, 128, 0.9);
}

.audit-disclosure-control {
    width: 34px;
    height: 34px;
    border-radius: 999px;
}

.audit-disclosure-count {
    min-width: 34px;
    height: 28px;
    padding: 0 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-size: 0.74rem;
    font-weight: 700;
}

.audit-disclosure-body {
    padding: 0 18px 18px;
}

.flash {
    border-radius: var(--radius-sm);
}

html[data-theme="light"] .card,
html[data-theme="light"] .brand,
html[data-theme="light"] .nav-group,
html[data-theme="light"] .sidebar-footer,
html[data-theme="light"] .utility-controls-shell,
html[data-theme="light"] .export-menu-panel {
    box-shadow: var(--shadow-card);
}

@media (max-width: 1180px) {
    .content {
        padding: 22px;
    }

    .page-header {
        margin-bottom: 20px;
    }
}

@media (max-width: 760px) {
    .sidebar {
        padding: 20px 16px;
    }

    .content {
        padding: 16px;
    }

    .card {
        padding: 18px;
        border-radius: var(--radius-md);
    }

    .button,
    .view-tab,
    .export-menu-toggle {
        min-height: 42px;
    }

    .audit-disclosure-summary {
        min-height: 50px;
        padding: 12px 14px;
    }

    .audit-disclosure-label {
        font-size: 0.72rem;
    }

    .audit-disclosure-body {
        padding: 0 14px 14px;
    }
}


/* --- Unified micro-interactions for tables, forms and dashboard cards --- */
.card,
.stat-card,
.calendar-day,
.timeline-item,
.simple-list li,
.detail-list div,
.notes-box,
.hint-box,
.nav-group,
.brand,
.sidebar-footer,
.table-wrap,
.table-responsive {
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.card:hover,
.stat-card:hover,
.calendar-day:hover,
.timeline-item:hover,
.simple-list li:hover,
.detail-list div:hover,
.notes-box:hover,
.hint-box:hover {
    transform: translateY(-1px);
    box-shadow: var(--elevated-shadow);
    border-color: var(--line-strong);
}

.stat-card {
    position: relative;
    overflow: hidden;
}

.stat-card::after,
.card::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    background: linear-gradient(180deg, rgba(255,255,255,0.08) 0%, transparent 28%);
    opacity: 0;
    transition: opacity 0.22s ease;
}

.stat-card:hover::after,
.card:hover::after {
    opacity: 1;
}

.field label {
    font-size: 0.84rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}

input, select, textarea {
    min-height: 48px;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, transform 0.18s ease;
    box-shadow: var(--form-shadow);
}

textarea {
    min-height: 120px;
}

input:hover, select:hover, textarea:hover {
    border-color: var(--line-strong);
}

input:focus, select:focus, textarea:focus {
    transform: translateY(-1px);
    box-shadow: var(--form-focus-ring);
}

input::placeholder,
textarea::placeholder {
    color: color-mix(in srgb, var(--muted) 88%, transparent);
}

.button,
.view-tab,
.nav-link,
.toggle-chip,
.badge,
.stage-chip,
.export-menu-item,
.theme-toggle-button {
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, border-color 0.18s ease, color 0.18s ease, opacity 0.18s ease;
}

.button {
    min-height: 44px;
    box-shadow: var(--button-shadow);
}

.button:hover,
.view-tab:hover,
.toggle-chip:hover,
.theme-toggle-button:hover {
    transform: translateY(-1px);
}

.button:hover {
    box-shadow: var(--button-shadow-hover);
}

.button:active,
.view-tab:active,
.toggle-chip:active,
.theme-toggle-button:active,
.nav-link:active {
    transform: translateY(0);
}

.button:focus-visible,
.view-tab:focus-visible,
.toggle-chip:focus-visible,
.theme-toggle-button:focus-visible,
.nav-link:focus-visible,
.export-menu summary:focus-visible,
.export-menu-item:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: none;
    box-shadow: var(--form-focus-ring);
}

.table th {
    color: var(--table-head-text);
}

.table tbody tr {
    transform-origin: center;
}

.table tbody tr:hover {
    transform: translateY(-1px);
    box-shadow: inset 0 0 0 1px var(--table-border);
}

.table td {
    transition: background 0.18s ease, color 0.18s ease;
}

.table a {
    transition: opacity 0.18s ease, color 0.18s ease;
}

.table a:hover {
    opacity: 0.88;
}

.dashboard-controls-grid .toggle-chip,
.inline-badge-row .badge {
    backdrop-filter: blur(18px);
}

.card-header h2,
.card-header h3,
.page-header h1,
.stat-value {
    letter-spacing: -0.025em;
}

.page-header p,
.notes-box p,
.timeline-content p,
.empty-state,
.sidebar-footer,
.brand-subtitle {
    line-height: 1.65;
}

.table-wrap,
.table-responsive {
    border-radius: 18px;
}

html[data-theme="light"] .card:hover,
html[data-theme="light"] .stat-card:hover,
html[data-theme="light"] .calendar-day:hover,
html[data-theme="light"] .timeline-item:hover,
html[data-theme="light"] .simple-list li:hover,
html[data-theme="light"] .detail-list div:hover,
html[data-theme="light"] .notes-box:hover,
html[data-theme="light"] .hint-box:hover {
    box-shadow: 0 18px 34px rgba(15, 23, 42, 0.10);
}

@media (prefers-reduced-motion: reduce) {
    .card,
    .stat-card,
    .calendar-day,
    .timeline-item,
    .simple-list li,
    .detail-list div,
    .notes-box,
    .hint-box,
    .button,
    .view-tab,
    .nav-link,
    .toggle-chip,
    .badge,
    .stage-chip,
    .export-menu-item,
    .theme-toggle-button,
    input,
    select,
    textarea,
    .table tbody tr {
        transition: none !important;
        transform: none !important;
    }
}

/* === Unified list/detail headers, actions & filters system === */
.page-header {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 18px;
    margin: 0 0 18px;
    padding: 20px 22px;
    border-radius: calc(var(--radius) + 2px);
    border: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(255,255,255,0.045) 0%, rgba(255,255,255,0.02) 100%), var(--card-bg);
    box-shadow: 0 18px 46px rgba(0, 0, 0, 0.14);
    overflow: hidden;
}
html[data-theme="light"] .page-header {
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
}
.page-header::after {
    content: "";
    position: absolute;
    inset: 0 auto auto 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, rgba(255,255,255,0.18), transparent 45%);
    pointer-events: none;
}
.page-header > div:first-child {
    min-width: 0;
}
.page-header h1 {
    margin: 0 0 8px;
    font-size: clamp(1.72rem, 1.3rem + 1vw, 2.15rem);
    line-height: 1.04;
    letter-spacing: -0.032em;
    font-weight: 700;
}
.page-header p,
.page-header .muted {
    margin: 0;
    max-width: 72ch;
    color: color-mix(in srgb, var(--muted) 92%, var(--text) 8%);
    font-size: 0.95rem;
    line-height: 1.5;
}

.header-actions,
.form-actions,
.filter-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
}
.header-actions {
    padding: 6px;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: color-mix(in srgb, var(--panel) 78%, transparent);
    backdrop-filter: blur(16px);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
}
.header-actions > .button,
.header-actions > a.button,
.header-actions > button.button {
    min-height: 40px;
    padding: 0 15px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

.view-tabs {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 18px;
    padding: 6px;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: color-mix(in srgb, var(--panel) 82%, transparent);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
}
.view-tab {
    min-height: 38px;
    padding: 0 16px;
    border-radius: 13px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.filter-card {
    position: relative;
    margin: 0 0 18px;
    padding-top: 18px;
}
.filter-card::before {
    content: "";
    display: block;
    margin: -2px 0 14px;
    width: 56px;
    height: 5px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--muted) 42%, transparent);
    opacity: 0.42;
}
.filter-card form {
    width: 100%;
}
.filters-grid {
    align-items: end;
    gap: 14px;
}
.filter-actions {
    min-height: 48px;
    align-self: end;
}
.filter-actions .button,
.filter-actions a.button {
    min-height: 40px;
    padding-inline: 15px;
    border-radius: 14px;
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid color-mix(in srgb, var(--line) 85%, transparent);
}
.card-header h2,
.card-header h3 {
    margin: 0;
    letter-spacing: -0.022em;
}
.card-header > div > .muted,
.card-header > .muted {
    font-size: 0.9rem;
}

.detail-grid {
    gap: 18px;
}
.detail-list > div {
    min-height: 58px;
    border-radius: 16px;
}
.table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
}
.table tbody tr td:last-child {
    white-space: nowrap;
}

.notes-box,
.audit-disclosure,
.compliance-summary-card,
.filter-card,
.page-header {
    scroll-margin-top: 18px;
}

@media (max-width: 980px) {
    .page-header {
        grid-template-columns: 1fr;
        align-items: stretch;
    }
    .header-actions,
    .form-actions,
    .filter-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 640px) {
    .page-header {
        padding: 18px;
        border-radius: 20px;
    }
    .header-actions {
        width: 100%;
    }
    .header-actions > .button,
    .header-actions > a.button,
    .header-actions > button.button,
    .filter-actions .button,
    .filter-actions a.button,
    .view-tab {
        flex: 1 1 auto;
    }
    .view-tabs {
        width: 100%;
    }
}

/* === Final dashboard toolbar alignment fix === */
.page-header.dashboard-header-slim {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
}

.dashboard-toolbar-wrap {
    min-width: 0;
    width: auto;
    max-width: 100%;
    justify-self: end;
    align-self: center;
}

.dashboard-toolbar-shell {
    width: auto;
    min-width: 0;
    max-width: 100%;
    min-height: 62px;
    padding: 8px 10px;
    border-radius: 22px;
}

.dashboard-toolbar-mode {
    width: auto;
    flex-wrap: nowrap;
    justify-content: flex-end;
}

.dashboard-segment-control {
    flex: 0 0 auto;
}

.dashboard-toolbar-edit-trigger,
.dashboard-toolbar-primary,
.dashboard-toolbar-edit .button,
.dashboard-toolbar-status {
    flex: 0 0 auto;
    min-height: 40px;
}

@media (max-width: 1180px) {
    .page-header.dashboard-header-slim {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .dashboard-toolbar-wrap {
        width: 100%;
        justify-self: stretch;
    }

    .dashboard-toolbar-shell,
    .dashboard-toolbar-mode {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
    }
}


.app-modal[hidden],
.app-modal-backdrop[hidden],
.app-sheet[hidden],
.app-sheet-backdrop[hidden] {
    display: none !important;
}

/* === Unified dialog / modal system === */
body.modal-open {
    overflow: hidden;
}

.app-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 900;
    background: rgba(3, 8, 20, 0.48);
    backdrop-filter: blur(12px) saturate(140%);
    -webkit-backdrop-filter: blur(12px) saturate(140%);
}

.app-modal {
    position: fixed;
    inset: 0;
    z-index: 910;
    display: grid;
    place-items: center;
    padding: 24px;
}

.app-modal-surface {
    width: min(100%, 440px);
    padding: 22px;
    border-radius: 28px;
    border: 1px solid color-mix(in srgb, var(--line-strong) 90%, transparent);
    background: linear-gradient(180deg, color-mix(in srgb, var(--panel) 92%, transparent) 0%, color-mix(in srgb, var(--panel-2) 94%, transparent) 100%);
    box-shadow: 0 32px 80px rgba(0, 0, 0, 0.34), inset 0 1px 0 rgba(255,255,255,0.10);
    backdrop-filter: blur(26px) saturate(160%);
    -webkit-backdrop-filter: blur(26px) saturate(160%);
}

.app-modal-copy {
    margin-top: 12px;
}

.app-modal-copy h3 {
    margin: 0;
    font-size: 1.18rem;
    line-height: 1.15;
    letter-spacing: -0.022em;
}

.app-modal-copy p {
    margin: 10px 0 0;
    color: var(--muted);
    line-height: 1.55;
}

.app-modal-icon {
    width: 54px;
    height: 54px;
    border-radius: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(180deg, rgba(10,132,255,0.96) 0%, rgba(10,132,255,0.72) 100%);
    box-shadow: 0 16px 34px rgba(10,132,255,0.26), inset 0 1px 0 rgba(255,255,255,0.22);
}

.app-modal[data-variant="danger"] .app-modal-icon {
    background: linear-gradient(180deg, rgba(255,69,58,0.96) 0%, rgba(255,69,58,0.72) 100%);
    box-shadow: 0 16px 34px rgba(255,69,58,0.26), inset 0 1px 0 rgba(255,255,255,0.22);
}

.app-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

.app-modal-actions .button {
    min-height: 42px;
    border-radius: 14px;
    padding-inline: 16px;
}

html[data-theme="light"] .app-modal-backdrop {
    background: rgba(148, 163, 184, 0.32);
}

html[data-theme="light"] .app-modal-surface {
    background: linear-gradient(180deg, rgba(255,255,255,0.94) 0%, rgba(245,247,252,0.94) 100%);
    box-shadow: 0 26px 64px rgba(15, 23, 42, 0.16), inset 0 1px 0 rgba(255,255,255,0.82);
}

@media (max-width: 640px) {
    .app-modal {
        align-items: end;
        padding: 14px;
    }

    .app-modal-surface {
        width: 100%;
        border-radius: 24px;
        padding: 18px;
    }

    .app-modal-actions {
        flex-direction: column-reverse;
    }

    .app-modal-actions .button {
        width: 100%;
    }
}


/* === Action sheet system === */
.app-sheet-backdrop {
    position: fixed;
    inset: 0;
    z-index: 119;
    background: rgba(2, 6, 23, 0.42);
    backdrop-filter: blur(14px);
}
.app-sheet {
    position: fixed;
    inset: auto 0 0 0;
    z-index: 120;
    display: flex;
    justify-content: center;
    padding: 0 18px 20px;
}
.app-sheet-surface {
    width: min(100%, 560px);
    border-radius: 28px;
    border: 1px solid rgba(255,255,255,0.12);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.96), rgba(9, 14, 28, 0.98));
    box-shadow: 0 30px 80px rgba(2, 6, 23, 0.5), inset 0 1px 0 rgba(255,255,255,0.08);
    padding: 12px;
}
.app-sheet-handle {
    width: 56px;
    height: 5px;
    border-radius: 999px;
    background: rgba(255,255,255,0.16);
    margin: 2px auto 10px;
}
.app-sheet-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 4px 6px 10px;
}
.app-sheet-header h3 {
    margin: 0;
    font-size: 1rem;
    letter-spacing: -0.02em;
}
.app-sheet-close {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.05);
    color: var(--text);
    cursor: pointer;
}
.app-sheet-body {
    display: grid;
    gap: 8px;
}
.app-sheet-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    min-height: 56px;
    padding: 14px 16px;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.04);
    text-decoration: none;
    color: var(--text);
    transition: transform 140ms ease, background 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
}
.app-sheet-link:hover,
.app-sheet-link:focus-visible {
    background: rgba(255,255,255,0.07);
    border-color: rgba(96, 165, 250, 0.35);
    box-shadow: 0 16px 30px rgba(2, 6, 23, 0.22);
    transform: translateY(-1px);
}
.app-sheet-link-copy {
    display: grid;
    gap: 3px;
}
.app-sheet-link-title {
    font-weight: 600;
    letter-spacing: -0.01em;
}
.app-sheet-link-meta {
    font-size: 0.86rem;
    color: var(--muted);
}
.app-sheet-link-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 14px;
    background: rgba(59,130,246,0.14);
    color: #93c5fd;
    font-size: 1rem;
    flex: 0 0 auto;
}
html[data-theme="light"] .app-sheet-backdrop {
    background: rgba(148, 163, 184, 0.28);
}
html[data-theme="light"] .app-sheet-surface {
    background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(248,250,252,0.98));
    border-color: rgba(15, 23, 42, 0.08);
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.14), inset 0 1px 0 rgba(255,255,255,0.8);
}
html[data-theme="light"] .app-sheet-close,
html[data-theme="light"] .app-sheet-link {
    border-color: rgba(15,23,42,0.08);
    background: rgba(255,255,255,0.88);
}
@media (max-width: 720px) {
    .app-sheet {
        padding: 0 12px 14px;
    }
    .app-sheet-surface {
        width: 100%;
        border-radius: 24px;
    }
}

.inline-badges{display:flex;align-items:center;gap:.5rem;flex-wrap:wrap}
.compact-inline-form{display:flex;gap:.5rem;align-items:center;flex-wrap:wrap;margin-top:.4rem}
.compact-inline-form select,.compact-inline-form input[type="date"],.compact-inline-form input[type="text"]{min-height:38px;padding:.65rem .8rem;border-radius:14px;background:rgba(255,255,255,.04);border:1px solid var(--line);color:var(--text-primary)}
.compact-inline-form .button{min-height:38px}
.table td .compact-inline-form{margin-top:.55rem}


.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.utility-bar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.role-switch-shell {
  display: inline-flex;
  align-items: center;
  height: 44px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(13, 21, 38, 0.72);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), 0 18px 40px rgba(0,0,0,0.22);
  backdrop-filter: blur(18px);
}

.role-switch-select {
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  background: transparent;
  color: rgba(255,255,255,0.92);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding-right: 18px;
  outline: none;
  cursor: pointer;
}

html[data-theme="light"] .role-switch-shell {
  border-color: rgba(15,23,42,0.08);
  background: rgba(255,255,255,0.82);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.8), 0 16px 32px rgba(15,23,42,0.08);
}

html[data-theme="light"] .role-switch-select {
  color: rgba(15,23,42,0.86);
}

/* === 2026-03-23 UI refinement patch: monthly analytics, role switch, priority translations === */
.monthly-analytics-header-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(220px, 1fr));
    gap: 12px;
    align-items: stretch;
}

.monthly-analytics-header-actions > .button,
.monthly-analytics-header-actions > .export-menu,
.monthly-analytics-header-actions .export-menu-toggle {
    width: 100%;
    min-height: 54px;
}

.monthly-analytics-header-actions .button,
.monthly-analytics-header-actions .export-menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 18px;
    padding: 0 18px;
    text-align: center;
}

.month-picker-field {
    position: relative;
}

.month-picker-shell {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 58px;
    padding: 0 16px;
    border-radius: 18px;
    border: 1px solid rgba(10, 132, 255, 0.28);
    background: linear-gradient(180deg, rgba(10, 132, 255, 0.10) 0%, rgba(10, 132, 255, 0.04) 100%);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 14px 26px rgba(0,0,0,0.22);
}

.month-picker-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 12px;
    background: rgba(10, 132, 255, 0.16);
    font-size: 1rem;
}

.month-picker-input {
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    min-height: 48px;
    padding: 0 !important;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.month-picker-input::-webkit-calendar-picker-indicator {
    cursor: pointer;
    opacity: 1;
}

.form-hint {
    margin-top: 8px;
    font-size: 0.8rem;
    line-height: 1.35;
}

.form-hint.accent {
    color: color-mix(in srgb, var(--text) 82%, var(--accent) 18%);
}

.active-layers-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.active-layers-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.active-layer-pill {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 16px;
    border: 1px solid var(--line-strong);
    background: color-mix(in srgb, var(--panel-2) 84%, transparent);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
}

.active-layer-pill strong {
    font-size: 1rem;
    line-height: 1;
}

.active-layer-pill span:last-child {
    color: var(--muted);
    font-size: 0.84rem;
    font-weight: 600;
}

.active-layers-hint {
    margin-top: -2px;
}

.role-switch-shell {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-height: 50px;
    padding: 0 10px 0 14px;
    border-radius: 18px;
    border: 1px solid var(--line-strong);
    background: color-mix(in srgb, var(--panel-2) 88%, transparent);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.07), 0 16px 28px rgba(0,0,0,0.20);
    backdrop-filter: blur(24px);
}

.role-switch-label {
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.role-switch-control {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 160px;
    padding: 8px 12px;
    border-radius: 14px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.06);
}

.role-switch-select {
    flex: 1 1 auto;
    min-width: 0;
    padding-right: 0;
    font-size: 0.95rem;
    font-weight: 700;
}

.role-switch-chevron {
    color: var(--muted);
    font-size: 0.82rem;
    line-height: 1;
}

.button,
.button.primary,
.export-menu-toggle,
.utility-controls-flat .utility-chip,
.priority-chip,
.role-switch-shell,
.role-switch-control,
.badge,
.stage-chip {
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 14px 26px rgba(0,0,0,0.20) !important;
}

.button.primary,
.utility-controls-flat .utility-chip.active,
.utility-controls-flat .utility-chip.active:hover {
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.12), 0 14px 26px rgba(0,0,0,0.24) !important;
}

.priority-chip {
    background: color-mix(in srgb, var(--panel) 90%, transparent);
}

.priority-chip-value {
    min-width: 40px;
    height: 36px;
}

html[data-theme="light"] .month-picker-shell {
    border-color: rgba(10, 132, 255, 0.18);
    background: linear-gradient(180deg, rgba(10, 132, 255, 0.08) 0%, rgba(255,255,255,0.96) 100%);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.96), 0 14px 26px rgba(15,23,42,0.10);
}

html[data-theme="light"] .month-picker-icon {
    background: rgba(10, 132, 255, 0.12);
}

html[data-theme="light"] .active-layer-pill,
html[data-theme="light"] .role-switch-control {
    background: rgba(255,255,255,0.78);
    border-color: rgba(15,23,42,0.08);
}

html[data-theme="light"] .role-switch-shell,
html[data-theme="light"] .button,
html[data-theme="light"] .button.primary,
html[data-theme="light"] .export-menu-toggle,
html[data-theme="light"] .utility-controls-flat .utility-chip,
html[data-theme="light"] .priority-chip,
html[data-theme="light"] .badge,
html[data-theme="light"] .stage-chip {
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.92), 0 14px 26px rgba(15,23,42,0.10) !important;
}

@media (max-width: 920px) {
    .monthly-analytics-header-actions {
        grid-template-columns: 1fr;
    }

    .role-switch-shell {
        width: 100%;
        justify-content: space-between;
    }

    .role-switch-control {
        min-width: 0;
        flex: 1 1 auto;
    }
}


/* === 2026-03-23 UI patch 2: export dropdown, role switch parity, filter button sizing === */
.monthly-analytics-page .page-header,
.monthly-analytics-page .header-actions,
.monthly-analytics-page .monthly-analytics-header-actions {
    overflow: visible;
}

.monthly-analytics-page .page-header {
    z-index: 3;
}

.monthly-export-menu {
    position: relative;
    isolation: isolate;
}

.monthly-export-menu[open] {
    z-index: 80;
}

.monthly-export-menu .export-menu-panel {
    top: calc(100% + 10px);
    right: 0;
    min-width: 100%;
    width: max(280px, 100%);
}

.role-switch-shell {
    min-height: var(--toolbar-height);
    padding: 4px;
    gap: 0;
    border-radius: 999px;
    border: 1px solid color-mix(in srgb, var(--line-strong) 84%, transparent);
    background: color-mix(in srgb, var(--panel-2) 88%, transparent);
    box-shadow: var(--shadow-soft) !important;
    backdrop-filter: blur(24px) saturate(140%);
    -webkit-backdrop-filter: blur(24px) saturate(140%);
}

.role-switch-shell .utility-divider {
    width: 1px;
    align-self: stretch;
    margin: 4px 2px;
    background: color-mix(in srgb, var(--line-strong) 80%, transparent);
}

.role-switch-label {
    min-width: 72px;
    min-height: 34px;
    padding: 0 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    white-space: nowrap;
}

.role-switch-control {
    min-height: 34px;
    min-width: 154px;
    padding: 0 12px 0 14px;
    gap: 8px;
    border-radius: 999px;
    border: 0;
    background: transparent;
    box-shadow: none !important;
}

.role-switch-select {
    min-height: 34px;
    font-size: 0.84rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.role-switch-chevron {
    font-size: 0.78rem;
    color: var(--muted);
}

.role-switch-shell:hover .role-switch-control,
.role-switch-shell:focus-within .role-switch-control {
    background: linear-gradient(180deg, rgba(255,255,255,0.14) 0%, rgba(255,255,255,0.08) 100%);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.10), 0 8px 18px rgba(0,0,0,0.16) !important;
}

html[data-theme="light"] .role-switch-shell {
    box-shadow: var(--shadow-card) !important;
}

html[data-theme="light"] .role-switch-shell .utility-divider {
    background: color-mix(in srgb, var(--line-strong) 72%, transparent);
}

html[data-theme="light"] .role-switch-shell:hover .role-switch-control,
html[data-theme="light"] .role-switch-shell:focus-within .role-switch-control {
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.08) 0%, rgba(15, 23, 42, 0.04) 100%);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.92), 0 8px 18px rgba(15,23,42,0.08) !important;
}

.filter-actions {
    gap: 12px;
}

.filter-actions .button,
.filter-actions a.button {
    min-height: 46px;
    padding-inline: 18px;
    border-radius: 16px;
    font-weight: 620;
}

@media (max-width: 920px) {
    .role-switch-shell {
        width: auto;
    }

    .role-switch-control {
        min-width: 140px;
    }
}

@media (max-width: 640px) {
    .role-switch-shell {
        width: 100%;
        justify-content: space-between;
    }

    .role-switch-control {
        flex: 1 1 auto;
        min-width: 0;
    }
}


/* === 2026-03-23 UI patch 3: centered role pill + refined month picker === */
.role-switch-shell {
    height: 52px !important;
    min-height: 52px !important;
    padding: 6px !important;
    gap: 0 !important;
}

.role-switch-shell .utility-divider,
.role-switch-label {
    display: none !important;
}

.role-switch-shell .role-switch-control {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 138px;
    height: 40px;
    padding: 0;
    border-radius: 999px;
    background: transparent;
    box-shadow: none !important;
}

.role-switch-shell .role-switch-select {
    appearance: none;
    -webkit-appearance: none;
    width: 100%;
    height: 40px;
    margin: 0;
    padding: 0 34px;
    border: 0;
    background: transparent;
    color: var(--text);
    font-size: 0.94rem;
    font-weight: 800;
    letter-spacing: -0.01em;
    text-align: center;
    text-align-last: center;
    cursor: pointer;
}

.role-switch-shell .role-switch-chevron {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.74rem;
    pointer-events: none;
}

.role-switch-shell:hover .role-switch-control,
.role-switch-shell:focus-within .role-switch-control {
    background: linear-gradient(180deg, rgba(255,255,255,0.10) 0%, rgba(255,255,255,0.06) 100%);
}

html[data-theme="light"] .role-switch-shell:hover .role-switch-control,
html[data-theme="light"] .role-switch-shell:focus-within .role-switch-control {
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.06) 0%, rgba(15, 23, 42, 0.03) 100%);
}

.month-picker-field {
    min-width: 0;
}

.month-picker-shell {
    position: relative;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    column-gap: 14px;
    min-height: 74px;
    padding: 14px 18px;
    border-radius: 24px;
    border: 1px solid color-mix(in srgb, var(--accent) 18%, var(--line-strong));
    background:
        linear-gradient(180deg, rgba(255,255,255,0.07) 0%, rgba(255,255,255,0.03) 100%),
        color-mix(in srgb, var(--panel-2) 90%, transparent);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), var(--shadow-card);
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.month-picker-shell:hover,
.month-picker-shell:focus-within {
    transform: translateY(-1px);
    border-color: color-mix(in srgb, var(--accent) 34%, var(--line-strong));
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.10), 0 20px 40px rgba(0,0,0,0.24);
}

.month-picker-icon {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(10,132,255,0.20) 0%, rgba(10,132,255,0.12) 100%);
    border: 1px solid rgba(10,132,255,0.16);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.10);
    font-size: 1.05rem;
}

.month-picker-copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.month-picker-caption {
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.month-picker-value {
    display: block;
    min-width: 0;
    color: var(--text);
    font-size: 1.18rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.month-picker-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 84px;
    height: 34px;
    padding: 0 14px;
    border-radius: 999px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.08);
    color: var(--text);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.month-picker-input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.month-picker-input::-webkit-calendar-picker-indicator {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.form-hint.accent {
    margin-top: 10px;
}

html[data-theme="light"] .month-picker-shell {
    border-color: rgba(10,132,255,0.14);
    background:
        linear-gradient(180deg, rgba(255,255,255,0.96) 0%, rgba(246,249,253,0.94) 100%),
        rgba(255,255,255,0.92);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.96), var(--shadow-card);
}

html[data-theme="light"] .month-picker-shell:hover,
html[data-theme="light"] .month-picker-shell:focus-within {
    border-color: rgba(10,132,255,0.24);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.98), 0 18px 34px rgba(15,23,42,0.10);
}

html[data-theme="light"] .month-picker-icon {
    background: linear-gradient(180deg, rgba(10,132,255,0.12) 0%, rgba(10,132,255,0.08) 100%);
    border-color: rgba(10,132,255,0.10);
}

html[data-theme="light"] .month-picker-badge {
    background: rgba(15,23,42,0.04);
    border-color: rgba(15,23,42,0.07);
}

@media (max-width: 920px) {
    .month-picker-shell {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .month-picker-badge {
        display: none;
    }
}

.site-briefing-preview {
    border: 1px solid rgba(120, 146, 196, 0.2);
    border-radius: 24px;
    padding: 18px;
    background: linear-gradient(180deg, rgba(22, 30, 47, 0.92), rgba(8, 13, 23, 0.96));
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.05), 0 18px 38px rgba(4, 10, 20, 0.24);
}

.site-briefing-preview.is-empty {
    opacity: 0.92;
}

.briefing-check-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}

.briefing-check-card {
    border-radius: 18px;
    border: 1px solid rgba(255,255,255,0.08);
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    background: rgba(255,255,255,0.03);
}

.briefing-check-card strong {
    font-size: 0.92rem;
}

.briefing-check-card span {
    color: var(--muted);
    font-size: 0.84rem;
}

.briefing-check-card.state-ok {
    border-color: rgba(46, 160, 67, 0.36);
    background: rgba(46, 160, 67, 0.09);
}

.briefing-check-card.state-warning {
    border-color: rgba(227, 179, 65, 0.34);
    background: rgba(227, 179, 65, 0.1);
}

.briefing-check-card.state-blocked {
    border-color: rgba(218, 54, 51, 0.34);
    background: rgba(218, 54, 51, 0.1);
}

.briefing-check-card.state-muted {
    border-color: rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.03);
}

.compliance-alert-danger {
    border-color: rgba(218, 54, 51, 0.28);
    background: rgba(218, 54, 51, 0.12);
    color: #ffd7d5;
}

.compliance-alert-success {
    border-color: rgba(46, 160, 67, 0.28);
    background: rgba(46, 160, 67, 0.12);
    color: #d7f8de;
}

.mobile-briefing-card .detail-grid,
.site-briefing-preview .detail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 980px) {
    .mobile-briefing-card .detail-grid,
    .site-briefing-preview .detail-grid {
        grid-template-columns: 1fr;
    }
}

.signature-pad-shell {
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 20px;
    background: linear-gradient(180deg, rgba(15,23,42,0.96) 0%, rgba(15,23,42,0.9) 100%);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.04), 0 12px 28px rgba(2, 6, 23, 0.24);
    padding: 14px;
}
.signature-pad {
    width: 100%;
    height: 180px;
    display: block;
    border-radius: 16px;
    background: #0f172a;
    touch-action: none;
    cursor: crosshair;
}
.signature-pad-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-top: 10px;
}
.signature-preview-card {
    display: grid;
    gap: 8px;
    padding: 14px 16px;
    border-radius: 18px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.04);
}
.signature-preview-image {
    max-width: 280px;
    width: 100%;
    height: auto;
    border-radius: 12px;
    background: #ffffff;
    padding: 6px;
}
.signature-list-preview {
    display: block;
    margin-top: 8px;
    max-width: 220px;
    width: 100%;
    height: auto;
    border-radius: 12px;
    background: #ffffff;
    padding: 6px;
}
@media (max-width: 760px) {
    .signature-pad { height: 160px; }
    .signature-pad-toolbar { flex-direction: column; align-items: flex-start; }
}

/* --- Auth & user management --- */
.auth-page {
    min-height: 100vh;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px;
    background:
        radial-gradient(circle at top right, rgba(77, 120, 255, 0.18), transparent 28%),
        radial-gradient(circle at bottom left, rgba(60, 180, 120, 0.12), transparent 24%),
        var(--bg-primary, #0b1020);
}

.auth-shell {
    width: min(100%, 520px);
}

.auth-card {
    padding: 28px;
    border-radius: 28px;
}

.auth-brand {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 20px;
}

.auth-logo {
    width: 56px;
    height: 56px;
    object-fit: contain;
    filter: drop-shadow(0 8px 24px rgba(0,0,0,0.22));
}

.auth-form {
    padding: 0;
    background: transparent;
    box-shadow: none;
    border: 0;
}

.auth-actions {
    justify-content: flex-end;
}

.account-shell {
    gap: 8px;
}

.account-chip {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 42px;
    padding-inline: 14px;
}

.account-chip-name {
    font-weight: 600;
}

.account-chip-meta {
    font-size: 12px;
    opacity: 0.82;
}

.utility-button-chip {
    border: 0;
    background: transparent;
    cursor: pointer;
    font: inherit;
}

.table-actions-stack {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

.link-button {
    border: 0;
    background: transparent;
    padding: 0;
    margin: 0;
    color: inherit;
    cursor: pointer;
    font: inherit;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.danger-link {
    color: #ff7272;
}

.scope-card {
    margin-top: 18px;
    padding: 18px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.scope-header h3 {
    margin: 0 0 6px;
}

.scope-toggle-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 16px 0 18px;
}

.scope-toggle-pill {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.scope-toggle-pill input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.scope-toggle-pill span {
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    padding: 0 16px;
    border-radius: 999px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.08);
    font-weight: 600;
}

.scope-toggle-pill input:checked + span {
    background: rgba(77, 120, 255, 0.20);
    border-color: rgba(119, 149, 255, 0.36);
}

.selection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
}

.selection-grid.is-disabled {
    opacity: 0.48;
}

.selection-tile {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-height: 88px;
    padding: 14px 16px 14px 42px;
    border-radius: 18px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    cursor: pointer;
}

.selection-tile input {
    position: absolute;
    left: 14px;
    top: 16px;
}

.selection-title {
    font-weight: 600;
}

.selection-subtitle {
    font-size: 12px;
    opacity: 0.74;
}

html[data-theme="light"] .scope-card {
    background: rgba(244, 247, 252, 0.9);
    border-color: rgba(17, 24, 39, 0.08);
}

html[data-theme="light"] .scope-toggle-pill span,
html[data-theme="light"] .selection-tile {
    background: rgba(255,255,255,0.86);
    border-color: rgba(17, 24, 39, 0.08);
}

@media (max-width: 860px) {
    .account-chip-meta {
        display: none;
    }
}

.scope-notice-card {
    display: flex;
    align-items: center;
    gap: 0.95rem;
    padding: 0.95rem 1.1rem;
    border-radius: 22px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: linear-gradient(180deg, rgba(18, 30, 52, 0.92), rgba(10, 18, 32, 0.92));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

.scope-notice-copy {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    flex-wrap: wrap;
}

.dashboard-scope-card {
    margin: 0 0 1rem;
}

.monthly-scope-card {
    margin-bottom: 1rem;
}

html[data-theme="light"] .scope-notice-card {
    background: linear-gradient(180deg, rgba(246, 248, 253, 0.98), rgba(236, 241, 249, 0.98));
    border-color: rgba(140, 156, 181, 0.28);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

/* === 2026-03-24 scope hardening + utility/header refinement === */
.account-shell {
    gap: 10px !important;
    padding-inline: 8px !important;
    max-width: min(100%, 760px);
}

.account-shell .utility-chip {
    width: auto !important;
    min-width: 0 !important;
    flex: 0 1 auto !important;
    padding: 0 16px !important;
    letter-spacing: 0 !important;
}

.account-shell .account-chip {
    flex: 1 1 auto !important;
    justify-content: flex-start !important;
    min-width: 220px !important;
    max-width: 360px;
    height: 40px !important;
    padding-inline: 16px 18px !important;
    border-radius: 999px !important;
    background: color-mix(in srgb, var(--panel) 86%, transparent) !important;
    border: 1px solid color-mix(in srgb, var(--line-strong) 86%, transparent) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.08) !important;
}

.account-shell .account-chip-copy {
    display: flex;
    flex-direction: column;
    min-width: 0;
    width: 100%;
    gap: 2px;
}

.account-shell .account-chip-name,
.account-shell .account-chip-meta {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.account-shell .account-chip-name {
    font-size: 0.95rem;
    font-weight: 760;
}

.account-shell .account-chip-meta {
    font-size: 0.72rem;
    letter-spacing: 0.01em;
    opacity: 0.78;
}

.account-shell .utility-chip-link,
.account-shell .utility-button-chip {
    min-width: 96px !important;
    justify-content: center !important;
    padding-inline: 16px !important;
}

.dashboard-toolbar-primary-icon {
    width: 52px !important;
    min-width: 52px !important;
    height: 52px !important;
    padding: 0 !important;
    border-radius: 999px !important;
}

.dashboard-toolbar-plus {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-size: 1.55rem;
    font-weight: 900;
    line-height: 1;
    transform: translateY(-1px);
}

.dashboard-toolbar-primary-icon .dashboard-toolbar-plus {
    pointer-events: none;
}

@media (max-width: 1080px) {
    .utility-bar {
        justify-content: space-between !important;
        gap: 12px;
        flex-wrap: wrap;
    }

    .account-shell {
        max-width: 100%;
    }
}

@media (max-width: 760px) {
    .account-shell {
        width: 100%;
        flex-wrap: wrap;
        justify-content: flex-start !important;
    }

    .account-shell .account-chip {
        max-width: none;
        width: 100%;
    }

    .account-shell .utility-chip-link,
    .account-shell .utility-button-chip {
        min-width: 0 !important;
        flex: 1 1 calc(50% - 5px) !important;
    }
}


/* === 2026-03-24 scope drilldowns + dashboard add pill refinement === */
.list-focus-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.list-focus-card .scope-notice-copy {
    min-width: 0;
}

.dashboard-toolbar-primary-icon {
    background: linear-gradient(180deg, rgba(10,132,255,0.96) 0%, rgba(10,132,255,0.78) 100%) !important;
    color: #fff !important;
    border: 1px solid rgba(10,132,255,0.52) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.12), 0 8px 18px rgba(10,132,255,0.22) !important;
}

.dashboard-toolbar-primary-icon:hover,
.dashboard-toolbar-primary-icon:focus-visible {
    background: linear-gradient(180deg, rgba(10,132,255,1) 0%, rgba(10,132,255,0.84) 100%) !important;
    color: #fff !important;
}

.dashboard-toolbar-plus {
    align-items: center !important;
    justify-content: center !important;
    font-size: 1.68rem !important;
    font-weight: 900 !important;
    line-height: 1 !important;
    transform: none !important;
    margin: 0 !important;
}

html[data-theme="light"] .dashboard-toolbar-primary-icon {
    border-color: rgba(10,132,255,0.36) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.22), 0 10px 22px rgba(10,132,255,0.18) !important;
}

@media (max-width: 860px) {
    .list-focus-card {
        flex-direction: column;
        align-items: flex-start;
    }
}


/* === Sidebar redesign: compact glass accordion with icon-led sections === */
.sidebar-nav-shell {
    display: grid;
    gap: 12px;
    margin-top: 4px;
}

.nav-section {
    position: relative;
    padding: 8px;
    border-radius: 24px;
    border: 1px solid color-mix(in srgb, var(--line) 94%, rgba(255,255,255,0.06));
    background: linear-gradient(180deg, color-mix(in srgb, var(--panel-2) 86%, transparent) 0%, color-mix(in srgb, var(--panel) 92%, transparent) 100%);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), 0 14px 34px rgba(0, 0, 0, 0.14);
    overflow: hidden;
}

.nav-section::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255,255,255,0.07), transparent 34%);
    pointer-events: none;
    opacity: 0.9;
}

.nav-section-trigger {
    position: relative;
    z-index: 1;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 8px 10px;
    border: 0;
    border-radius: 18px;
    background: transparent;
    color: inherit;
    cursor: pointer;
}

.nav-section-trigger-main {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-section-icon {
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    border: 1px solid rgba(122, 177, 255, 0.14);
    background: linear-gradient(180deg, rgba(34, 71, 122, 0.24) 0%, rgba(17, 33, 62, 0.16) 100%);
    color: color-mix(in srgb, var(--text) 88%, #7cc6ff 12%);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
}

.nav-section-icon svg {
    width: 20px;
    height: 20px;
}

.nav-section-title {
    min-width: 0;
    font-size: 0.94rem;
    font-weight: 650;
    letter-spacing: -0.014em;
    color: var(--text);
}

.nav-section-chevron {
    flex: 0 0 30px;
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: var(--muted);
    background: color-mix(in srgb, var(--panel) 72%, transparent);
    border: 1px solid color-mix(in srgb, var(--line) 86%, transparent);
    transition: transform 0.24s ease, color 0.24s ease, background 0.24s ease;
}

.nav-section-trigger:hover {
    background: rgba(255,255,255,0.035);
}

.nav-section-trigger:focus-visible {
    outline: none;
    box-shadow: var(--form-focus-ring);
}

.nav-section-panel {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 8px;
    padding: 0 8px 0 54px;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    pointer-events: none;
    transition: max-height 0.28s ease, opacity 0.18s ease, padding-top 0.24s ease, padding-bottom 0.24s ease;
}

.nav-section.is-open .nav-section-panel {
    max-height: 320px;
    opacity: 1;
    pointer-events: auto;
    padding-top: 6px;
    padding-bottom: 8px;
}

.nav-section.is-open .nav-section-chevron {
    transform: rotate(180deg);
    color: var(--text);
    background: rgba(10, 132, 255, 0.12);
}

.nav-section .nav-link {
    min-height: 44px;
    padding: 0 14px;
    border-radius: 16px;
    align-items: center;
    font-weight: 580;
    background: rgba(255,255,255,0.02);
}

.nav-section .nav-link:hover {
    background: rgba(255,255,255,0.055);
}

.nav-section .nav-link.active {
    background: linear-gradient(180deg, rgba(10,132,255,0.30) 0%, rgba(10,132,255,0.16) 100%);
    border: 1px solid rgba(124,198,255,0.26);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.10), 0 10px 24px rgba(10,132,255,0.12);
}

html[data-theme="light"] .nav-section {
    background: linear-gradient(180deg, rgba(255,255,255,0.72) 0%, rgba(248,251,255,0.62) 100%);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.72), 0 12px 28px rgba(15, 23, 42, 0.08);
}

html[data-theme="light"] .nav-section::before {
    background: linear-gradient(180deg, rgba(255,255,255,0.88), transparent 36%);
}

html[data-theme="light"] .nav-section-trigger:hover,
html[data-theme="light"] .nav-section .nav-link:hover {
    background: rgba(15,23,42,0.04);
}

html[data-theme="light"] .nav-section-icon {
    background: linear-gradient(180deg, rgba(10,132,255,0.10) 0%, rgba(10,132,255,0.06) 100%);
    border-color: rgba(10,132,255,0.14);
    color: #0a5fc2;
}

html[data-theme="light"] .nav-section .nav-link {
    background: rgba(255,255,255,0.36);
}

html[data-theme="light"] .nav-section .nav-link.active {
    background: linear-gradient(180deg, rgba(10,132,255,0.18) 0%, rgba(10,132,255,0.10) 100%);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.75), 0 10px 22px rgba(10,132,255,0.10);
}

@media (max-width: 780px) {
    .sidebar-nav-shell {
        gap: 10px;
    }

    .nav-section {
        border-radius: 22px;
    }

    .nav-section-trigger {
        padding: 7px 8px;
    }

    .nav-section-panel {
        padding-left: 50px;
    }
}


/* === 2026-03-24 Glass system harmonization: dashboard cards, filters, table heads === */
:root {
    --glass-panel-strong: linear-gradient(180deg, rgba(28, 34, 48, 0.80) 0%, rgba(16, 20, 30, 0.74) 100%);
    --glass-panel-soft: linear-gradient(180deg, rgba(255,255,255,0.055) 0%, rgba(255,255,255,0.025) 100%);
    --glass-field-surface: linear-gradient(180deg, rgba(18, 24, 36, 0.72) 0%, rgba(12, 16, 24, 0.66) 100%);
    --glass-table-shell: linear-gradient(180deg, rgba(18, 23, 34, 0.66) 0%, rgba(12, 16, 24, 0.58) 100%);
    --glass-table-border: rgba(255,255,255,0.10);
    --glass-table-head: linear-gradient(180deg, rgba(255,255,255,0.14) 0%, rgba(255,255,255,0.06) 100%);
    --glass-table-head-shadow: inset 0 1px 0 rgba(255,255,255,0.12), 0 10px 26px rgba(0,0,0,0.16);
    --glass-row-shadow: 0 14px 28px rgba(0,0,0,0.12);
}

html[data-theme="light"] {
    --glass-panel-strong: linear-gradient(180deg, rgba(255,255,255,0.80) 0%, rgba(243,248,253,0.72) 100%);
    --glass-panel-soft: linear-gradient(180deg, rgba(255,255,255,0.54) 0%, rgba(255,255,255,0.22) 100%);
    --glass-field-surface: linear-gradient(180deg, rgba(255,255,255,0.72) 0%, rgba(246,250,255,0.64) 100%);
    --glass-table-shell: linear-gradient(180deg, rgba(255,255,255,0.78) 0%, rgba(245,249,254,0.70) 100%);
    --glass-table-border: rgba(148,163,184,0.16);
    --glass-table-head: linear-gradient(180deg, rgba(255,255,255,0.96) 0%, rgba(239,245,252,0.90) 100%);
    --glass-table-head-shadow: inset 0 1px 0 rgba(255,255,255,0.86), 0 12px 22px rgba(148,163,184,0.14);
    --glass-row-shadow: 0 12px 24px rgba(148,163,184,0.12);
}

.page-header,
.filter-card,
.scope-notice-card,
.dashboard-toolbar-shell,
.dashboard-kpi-card,
.dashboard-column-card,
.dashboard-priority-strip,
.mini-kpi-card,
.stat-card {
    background:
        linear-gradient(180deg, rgba(255,255,255,0.045) 0%, rgba(255,255,255,0.01) 100%),
        var(--glass-panel-strong);
}

.page-header,
.filter-card,
.scope-notice-card {
    border-color: color-mix(in srgb, var(--glass-table-border) 88%, transparent);
    box-shadow: 0 24px 52px rgba(0,0,0,0.16), inset 0 1px 0 rgba(255,255,255,0.12);
}

html[data-theme="light"] .page-header,
html[data-theme="light"] .filter-card,
html[data-theme="light"] .scope-notice-card {
    box-shadow: 0 18px 38px rgba(148,163,184,0.14), inset 0 1px 0 rgba(255,255,255,0.80);
}

.dashboard-kpi-card,
.dashboard-column-card,
.dashboard-priority-strip,
.mini-kpi-card,
.stat-card {
    border-color: color-mix(in srgb, var(--glass-table-border) 84%, transparent);
    box-shadow: 0 20px 42px rgba(0,0,0,0.14), inset 0 1px 0 rgba(255,255,255,0.10);
}

html[data-theme="light"] .dashboard-kpi-card,
html[data-theme="light"] .dashboard-column-card,
html[data-theme="light"] .dashboard-priority-strip,
html[data-theme="light"] .mini-kpi-card,
html[data-theme="light"] .stat-card {
    box-shadow: 0 16px 34px rgba(148,163,184,0.12), inset 0 1px 0 rgba(255,255,255,0.84);
}

.dashboard-kpi-card,
.dashboard-column-card,
.priority-chip,
.dashboard-shift-item,
.dashboard-list-item,
.mini-stat-pill {
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.dashboard-kpi-card:hover,
.dashboard-column-card:hover,
.priority-chip:hover,
.dashboard-shift-item:hover,
.dashboard-list-item:hover,
.mini-stat-pill:hover {
    text-decoration: none;
    transform: translateY(-2px);
    border-color: color-mix(in srgb, var(--accent) 34%, var(--glass-table-border));
    box-shadow: 0 22px 44px rgba(10,132,255,0.14), inset 0 1px 0 rgba(255,255,255,0.14);
}

.filter-card {
    padding-top: 20px;
}

.filter-card::before {
    width: 72px;
    height: 4px;
    margin: -2px 0 16px;
    background: linear-gradient(90deg, rgba(10,132,255,0.48) 0%, rgba(90,200,250,0.26) 100%);
    opacity: 0.78;
}

.filter-card form {
    position: relative;
    z-index: 1;
}

.filters-grid {
    align-items: stretch;
    gap: 16px;
}

.filters-grid .field {
    min-height: 100%;
    padding: 14px 14px 16px;
    border-radius: 22px;
    border: 1px solid color-mix(in srgb, var(--glass-table-border) 82%, transparent);
    background:
        linear-gradient(180deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0.015) 100%),
        var(--glass-field-surface);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
}

html[data-theme="light"] .filters-grid .field {
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.86);
}

.filters-grid .field label {
    margin: 0;
    font-size: 0.72rem;
    letter-spacing: 0.11em;
    text-transform: uppercase;
    color: color-mix(in srgb, var(--muted) 90%, var(--text) 10%);
}

.filters-grid .field .muted {
    line-height: 1.5;
}

.filters-grid .field input,
.filters-grid .field select,
.filters-grid .field textarea,
.filters-grid .field .month-picker-shell {
    margin-top: 2px;
}

.filter-actions {
    align-self: stretch;
    justify-content: stretch;
    min-height: auto;
    min-width: 180px;
    padding: 10px;
    border-radius: 22px;
    border: 1px solid color-mix(in srgb, var(--glass-table-border) 82%, transparent);
    background:
        linear-gradient(180deg, rgba(255,255,255,0.06) 0%, rgba(255,255,255,0.02) 100%),
        var(--glass-field-surface);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
}

.filter-actions .button,
.filter-actions a.button {
    flex: 1 1 0;
    width: 100%;
    min-height: 48px;
    border-radius: 16px;
    justify-content: center;
}

.card > .table,
.card > .table-wrap,
.card > .table-responsive {
    margin-top: 10px;
}

.card > .table-wrap,
.card > .table-responsive {
    padding: 10px 10px 6px;
    border-radius: 24px;
    border: 1px solid color-mix(in srgb, var(--glass-table-border) 90%, transparent);
    background:
        linear-gradient(180deg, rgba(255,255,255,0.045) 0%, rgba(255,255,255,0.015) 100%),
        var(--glass-table-shell);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
}

.card > .table {
    border-radius: 24px;
}

.card > .table thead th,
.card > .table-wrap .table thead th,
.card > .table-responsive .table thead th {
    top: 0;
    z-index: 2;
    color: var(--table-head-text);
    background: var(--glass-table-head);
    box-shadow: var(--glass-table-head-shadow);
    border-top: 1px solid color-mix(in srgb, var(--glass-table-border) 92%, transparent);
    border-bottom: 1px solid color-mix(in srgb, var(--glass-table-border) 90%, transparent);
}

.card > .table thead tr th:first-child,
.card > .table-wrap .table thead tr th:first-child,
.card > .table-responsive .table thead tr th:first-child {
    border-top-left-radius: 18px;
}

.card > .table thead tr th:last-child,
.card > .table-wrap .table thead tr th:last-child,
.card > .table-responsive .table thead tr th:last-child {
    border-top-right-radius: 18px;
}

.table {
    border-spacing: 0 10px;
}

.table th,
.table td {
    padding: 14px 15px;
}

.table tbody tr {
    background: color-mix(in srgb, var(--table-row-alt-bg) 76%, transparent);
    box-shadow: var(--glass-row-shadow);
}

.table tbody tr:nth-child(even) {
    background: color-mix(in srgb, var(--table-row-bg) 78%, transparent);
}

.table tbody tr:hover {
    background: color-mix(in srgb, var(--table-row-hover) 86%, transparent);
    box-shadow: 0 18px 34px rgba(10,132,255,0.14);
    transform: translateY(-2px);
}

.table tbody tr td {
    background: transparent;
    backdrop-filter: blur(16px);
}

.table tbody tr td:first-child,
.table tbody tr td:last-child {
    position: relative;
}

.table tbody tr td:first-child {
    border-top-left-radius: 18px;
    border-bottom-left-radius: 18px;
}

.table tbody tr td:last-child {
    border-top-right-radius: 18px;
    border-bottom-right-radius: 18px;
}

.table tbody tr td:first-child,
.table thead tr th:first-child {
    border-left-color: color-mix(in srgb, var(--glass-table-border) 88%, transparent);
}

.table tbody tr td:last-child,
.table thead tr th:last-child {
    border-right-color: color-mix(in srgb, var(--glass-table-border) 88%, transparent);
}

.table thead tr th:first-child,
.table thead tr th:last-child,
.table tbody tr td:first-child,
.table tbody tr td:last-child {
    overflow: hidden;
}

.card-header {
    padding-bottom: 14px;
    border-bottom-color: color-mix(in srgb, var(--glass-table-border) 84%, transparent);
}

.compact-header-row {
    align-items: flex-start;
}

.dashboard-kpi-card .stat-label,
.dashboard-column-card .muted,
.dashboard-priority-strip .muted,
.filter-card .muted,
.page-header .muted {
    color: color-mix(in srgb, var(--muted) 88%, var(--text) 12%);
}

.dashboard-kpi-hint {
    line-height: 1.5;
}

.mini-stat-pill,
.dashboard-shift-item,
.dashboard-list-item {
    border: 1px solid color-mix(in srgb, var(--glass-table-border) 82%, transparent);
    background:
        linear-gradient(180deg, rgba(255,255,255,0.045) 0%, rgba(255,255,255,0.012) 100%),
        color-mix(in srgb, var(--panel) 86%, transparent);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.07);
}

html[data-theme="light"] .mini-stat-pill,
html[data-theme="light"] .dashboard-shift-item,
html[data-theme="light"] .dashboard-list-item {
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.86);
}

.monthly-analytics-page .stats-grid .stat-card,
.monthly-analytics-page .two-column > .card {
    background:
        linear-gradient(180deg, rgba(255,255,255,0.04) 0%, rgba(255,255,255,0.01) 100%),
        var(--glass-panel-strong);
}

@media (max-width: 1180px) {
    .filter-actions {
        min-width: 0;
    }
}

@media (max-width: 860px) {
    .filters-grid .field,
    .filter-actions {
        border-radius: 20px;
    }

    .card > .table-wrap,
    .card > .table-responsive {
        padding: 8px 8px 4px;
        border-radius: 20px;
    }

    .table {
        border-spacing: 0 8px;
    }
}

/* === 2026-03-24 Final glass hierarchy: forms, detail boxes, mobile views === */
:root {
    --glass-section-bg: linear-gradient(180deg, rgba(255,255,255,0.055) 0%, rgba(255,255,255,0.018) 100%);
    --glass-section-border: rgba(255,255,255,0.08);
    --glass-section-shadow: inset 0 1px 0 rgba(255,255,255,0.05), 0 16px 32px rgba(0,0,0,0.16);
    --glass-field-bg: linear-gradient(180deg, rgba(255,255,255,0.045) 0%, rgba(255,255,255,0.02) 100%);
    --glass-field-border: rgba(255,255,255,0.08);
    --glass-input-bg: linear-gradient(180deg, rgba(25, 31, 43, 0.86) 0%, rgba(13, 17, 25, 0.84) 100%);
    --glass-prose-bg: linear-gradient(180deg, rgba(255,255,255,0.04) 0%, rgba(255,255,255,0.018) 100%);
}

html[data-theme="light"] {
    --glass-section-bg: linear-gradient(180deg, rgba(255,255,255,0.92) 0%, rgba(246,249,253,0.86) 100%);
    --glass-section-border: rgba(15,23,42,0.08);
    --glass-section-shadow: inset 0 1px 0 rgba(255,255,255,0.92), 0 16px 34px rgba(15,23,42,0.08);
    --glass-field-bg: linear-gradient(180deg, rgba(255,255,255,0.88) 0%, rgba(248,250,253,0.80) 100%);
    --glass-field-border: rgba(15,23,42,0.08);
    --glass-input-bg: linear-gradient(180deg, rgba(255,255,255,0.96) 0%, rgba(243,247,252,0.94) 100%);
    --glass-prose-bg: linear-gradient(180deg, rgba(255,255,255,0.86) 0%, rgba(247,250,253,0.82) 100%);
}

.form-card,
.glass-form-card,
.mobile-surface-card,
.detail-grid > .card,
.two-column > .card,
.three-column > .card,
.report-layout > .card {
    position: relative;
    overflow: hidden;
}

.form-card::before,
.glass-form-card::before,
.mobile-surface-card::before,
.detail-grid > .card::before,
.two-column > .card::before,
.three-column > .card::before,
.report-layout > .card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 82px;
    background: linear-gradient(180deg, rgba(255,255,255,0.08) 0%, rgba(255,255,255,0.018) 52%, transparent 100%);
    pointer-events: none;
    opacity: 0.9;
}

.form-card,
.glass-form-card,
.mobile-response-form.glass-form-card,
.mobile-briefing-card,
.public-card.mobile-surface-card,
.auth-card {
    border-radius: 26px;
}

.form-card > .form-grid,
.glass-form-card > .form-grid,
.glass-form-shell > .form-grid,
.mobile-response-form > .form-grid,
.auth-form {
    position: relative;
    z-index: 1;
}

.form-card > .form-grid,
.glass-form-card > .form-grid,
.glass-form-shell > .form-grid,
.mobile-response-form > .form-grid {
    gap: 18px;
}

.form-card .field,
.glass-form-card .field,
.glass-form-shell .field,
.mobile-response-form .field,
.auth-form .field {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 100%;
    padding: 14px 14px 15px;
    border-radius: 22px;
    border: 1px solid var(--glass-field-border);
    background: var(--glass-field-bg);
    box-shadow: var(--glass-section-shadow);
    backdrop-filter: blur(18px) saturate(140%);
    -webkit-backdrop-filter: blur(18px) saturate(140%);
}

.form-card .field label,
.glass-form-card .field label,
.glass-form-shell .field label,
.mobile-response-form .field label,
.auth-form .field label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    color: color-mix(in srgb, var(--text) 74%, var(--muted));
    font-size: 0.79rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.form-card .field input,
.form-card .field select,
.form-card .field textarea,
.glass-form-card .field input,
.glass-form-card .field select,
.glass-form-card .field textarea,
.glass-form-shell .field input,
.glass-form-shell .field select,
.glass-form-shell .field textarea,
.mobile-response-form .field input,
.mobile-response-form .field select,
.mobile-response-form .field textarea,
.auth-form .field input,
.auth-form .field select,
.auth-form .field textarea {
    min-height: 50px;
    border-radius: 18px;
    border: 1px solid color-mix(in srgb, var(--accent) 10%, var(--line-strong));
    background: var(--glass-input-bg);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.05), 0 10px 24px rgba(0,0,0,0.10);
}

.form-card .field textarea,
.glass-form-card .field textarea,
.glass-form-shell .field textarea,
.mobile-response-form .field textarea {
    min-height: 132px;
}

.form-card .field select[multiple],
.glass-form-card .field select[multiple],
.glass-form-shell .field select[multiple],
.mobile-response-form .field select[multiple] {
    min-height: 180px;
    padding-top: 10px;
    padding-bottom: 10px;
}

.form-card .hint,
.form-card .muted.small,
.glass-form-card .hint,
.glass-form-card .muted.small,
.glass-form-shell .hint,
.mobile-response-form .muted.small,
.mobile-response-form .hint {
    position: relative;
    z-index: 1;
}

.form-card > .form-actions,
.glass-form-card > .form-actions,
.glass-form-shell > .form-actions,
.mobile-response-form > .form-actions,
.auth-form > .form-actions {
    position: relative;
    z-index: 1;
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid color-mix(in srgb, var(--line) 88%, transparent);
}

.auth-card {
    background: linear-gradient(180deg, color-mix(in srgb, var(--panel) 94%, transparent) 0%, color-mix(in srgb, var(--panel-2) 96%, transparent) 100%);
    backdrop-filter: blur(26px) saturate(150%);
    -webkit-backdrop-filter: blur(26px) saturate(150%);
}

.auth-brand {
    padding: 6px 2px 18px;
    margin-bottom: 18px;
    border-bottom: 1px solid color-mix(in srgb, var(--line) 88%, transparent);
}

.detail-grid > .card,
.two-column > .card,
.three-column > .card {
    background: linear-gradient(180deg, color-mix(in srgb, var(--panel) 94%, transparent) 0%, color-mix(in srgb, var(--panel-2) 95%, transparent) 100%);
}

.detail-list {
    gap: 14px;
}

.detail-list > div,
.notes-box,
.hint-box,
.pre-wrap,
.signature-preview-card,
.briefing-check-card,
.simple-list li {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    border: 1px solid var(--glass-section-border);
    background: var(--glass-prose-bg);
    box-shadow: var(--glass-section-shadow);
}

.detail-list > div::before,
.notes-box::before,
.hint-box::before,
.pre-wrap::before,
.signature-preview-card::before,
.briefing-check-card::before,
.simple-list li::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 54px;
    background: linear-gradient(180deg, rgba(255,255,255,0.07) 0%, transparent 100%);
    pointer-events: none;
}

.detail-list > div {
    padding: 16px 18px;
    min-height: 76px;
}

.detail-list > div span {
    display: inline-block;
    margin-bottom: 8px;
    color: color-mix(in srgb, var(--text) 66%, var(--muted));
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.detail-list > div strong {
    display: block;
    font-size: 1rem;
    line-height: 1.48;
    letter-spacing: -0.015em;
}

.notes-box,
.hint-box,
.pre-wrap {
    padding: 18px 20px;
    line-height: 1.7;
}

.notes-box h3,
.hint-box h3 {
    margin-bottom: 12px;
    font-size: 0.95rem;
    letter-spacing: -0.018em;
}

.pre-wrap {
    white-space: pre-wrap;
    font-size: 0.97rem;
}

.nested-card,
.signature-pad-shell,
.site-briefing-preview,
.audit-disclosure,
.mobile-briefing-card .nested-card {
    border-radius: 22px;
    border: 1px solid color-mix(in srgb, var(--line-strong) 88%, transparent);
    background: linear-gradient(180deg, color-mix(in srgb, var(--panel) 90%, transparent) 0%, color-mix(in srgb, var(--panel-2) 92%, transparent) 100%);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), 0 18px 36px rgba(0,0,0,0.18);
}

.signature-pad-shell {
    padding: 16px;
}

.signature-pad {
    border-radius: 18px;
}

.signature-preview-card,
.signature-pad-shell,
.site-briefing-preview {
    backdrop-filter: blur(20px) saturate(150%);
    -webkit-backdrop-filter: blur(20px) saturate(150%);
}

.mobile-response-form.glass-form-card,
.mobile-surface-card,
.mobile-briefing-card.mobile-surface-card {
    background: linear-gradient(180deg, color-mix(in srgb, var(--panel) 96%, transparent) 0%, color-mix(in srgb, var(--panel-2) 98%, transparent) 100%);
}

.mobile-detail-list {
    gap: 12px;
}

.mobile-detail-list > div {
    min-height: 88px;
    padding: 17px 18px;
}

.mobile-detail-list strong {
    font-size: 1.02rem;
}

.mobile-response-form .form-actions .button,
.response-button-grid .button,
.auth-actions .button {
    min-height: 48px;
    border-radius: 17px;
    font-weight: 700;
}

.response-button-grid {
    gap: 14px;
}

.response-button-grid .button {
    width: 100%;
}

.check-inline {
    display: inline-flex;
    align-items: flex-start;
    gap: 12px;
    line-height: 1.55;
}

.check-inline input[type="checkbox"] {
    width: 18px;
    height: 18px;
    min-height: 18px;
    margin-top: 2px;
    flex: 0 0 auto;
}

.hint-box.top-gap,
.notes-box.top-gap,
.signature-preview-card.top-gap-sm,
.site-briefing-preview.top-gap-sm {
    margin-top: 14px;
}

@media (max-width: 920px) {
    .form-card,
    .glass-form-card,
    .mobile-surface-card,
    .auth-card {
        border-radius: 24px;
    }

    .form-card .field,
    .glass-form-card .field,
    .glass-form-shell .field,
    .mobile-response-form .field,
    .auth-form .field {
        border-radius: 20px;
        padding: 13px;
    }
}

@media (max-width: 680px) {
    .form-card,
    .glass-form-card,
    .mobile-surface-card,
    .auth-card,
    .detail-grid > .card,
    .two-column > .card,
    .three-column > .card {
        border-radius: 22px;
    }

    .form-card::before,
    .glass-form-card::before,
    .mobile-surface-card::before,
    .detail-grid > .card::before,
    .two-column > .card::before,
    .three-column > .card::before {
        height: 64px;
    }

    .form-card .field,
    .glass-form-card .field,
    .glass-form-shell .field,
    .mobile-response-form .field,
    .auth-form .field,
    .detail-list > div,
    .notes-box,
    .hint-box,
    .pre-wrap,
    .signature-preview-card,
    .briefing-check-card,
    .simple-list li {
        border-radius: 18px;
    }

    .detail-list > div {
        min-height: 72px;
        padding: 15px 16px;
    }

    .mobile-detail-list > div {
        min-height: 82px;
    }

    .mobile-response-form .form-actions,
    .auth-form .form-actions,
    .response-button-grid {
        grid-template-columns: 1fr;
    }

    .mobile-response-form .form-actions .button,
    .response-button-grid .button,
    .auth-actions .button {
        width: 100%;
    }
}

/* === 2026-03-24 Final design pass: list rows, detail tables, calendar cards === */
:root {
    --final-row-sheen: linear-gradient(135deg, rgba(255,255,255,0.14) 0%, rgba(255,255,255,0.04) 42%, rgba(255,255,255,0.015) 100%);
    --final-row-border: rgba(255,255,255,0.09);
    --final-row-hover-border: rgba(10,132,255,0.26);
    --final-soft-shadow: 0 18px 38px rgba(0,0,0,0.16);
    --final-card-shadow: 0 24px 56px rgba(0,0,0,0.18);
    --final-inset-line: inset 0 1px 0 rgba(255,255,255,0.12);
}

html[data-theme="light"] {
    --final-row-border: rgba(148,163,184,0.16);
    --final-row-hover-border: rgba(10,132,255,0.24);
    --final-soft-shadow: 0 16px 32px rgba(148,163,184,0.14);
    --final-card-shadow: 0 20px 44px rgba(148,163,184,0.16);
    --final-inset-line: inset 0 1px 0 rgba(255,255,255,0.86);
}

.toolbar,
.toolbar-group,
.view-tabs,
.dashboard-inline-pills,
.inline-badges,
.inline-badge-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.toolbar {
    margin-bottom: 22px;
    padding: 12px 14px;
    border-radius: 24px;
    border: 1px solid color-mix(in srgb, var(--final-row-border) 90%, transparent);
    background:
        linear-gradient(180deg, rgba(255,255,255,0.045) 0%, rgba(255,255,255,0.018) 100%),
        color-mix(in srgb, var(--panel) 92%, transparent);
    box-shadow: var(--final-card-shadow), var(--final-inset-line);
    backdrop-filter: blur(30px) saturate(170%);
    -webkit-backdrop-filter: blur(30px) saturate(170%);
}

.toolbar-group {
    min-height: 52px;
    padding: 8px;
    border-radius: 20px;
    border: 1px solid color-mix(in srgb, var(--final-row-border) 88%, transparent);
    background:
        linear-gradient(180deg, rgba(255,255,255,0.038) 0%, rgba(255,255,255,0.012) 100%),
        color-mix(in srgb, var(--panel-2) 88%, transparent);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
}

html[data-theme="light"] .toolbar,
html[data-theme="light"] .toolbar-group {
    box-shadow: var(--final-card-shadow), var(--final-inset-line);
}

.table-responsive,
.table-wrap {
    position: relative;
    overflow-x: auto;
    overflow-y: visible;
    scrollbar-gutter: stable both-edges;
}

.card > .table-responsive,
.card > .table-wrap {
    padding: 12px;
    border-radius: 24px;
    box-shadow: var(--final-soft-shadow), var(--final-inset-line);
}

.card > .table-responsive::after,
.card > .table-wrap::after {
    content: "";
    position: sticky;
    right: 0;
    top: 0;
    width: 24px;
    height: 100%;
    float: right;
    pointer-events: none;
    background: linear-gradient(270deg, color-mix(in srgb, var(--panel) 90%, transparent) 0%, transparent 100%);
    opacity: 0.65;
}

.table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 12px;
}

.table thead th {
    position: sticky;
    top: 0;
    z-index: 3;
    padding-top: 12px;
    padding-bottom: 12px;
    font-size: 0.73rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.table tbody tr {
    position: relative;
    isolation: isolate;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.table tbody tr::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 20px;
    border: 1px solid color-mix(in srgb, var(--final-row-border) 92%, transparent);
    background: var(--final-row-sheen);
    box-shadow: var(--final-soft-shadow), var(--final-inset-line);
    pointer-events: none;
    z-index: 0;
}

.table tbody tr td {
    position: relative;
    z-index: 1;
    vertical-align: middle;
    padding-top: 15px;
    padding-bottom: 15px;
    border-bottom-color: transparent;
}

.table tbody tr td:first-child {
    padding-left: 18px;
}

.table tbody tr td:last-child {
    padding-right: 18px;
}

.table tbody tr:hover {
    transform: translateY(-2px);
    box-shadow: none;
}

.table tbody tr:hover::before {
    border-color: color-mix(in srgb, var(--final-row-hover-border) 92%, transparent);
    box-shadow: 0 22px 40px rgba(10,132,255,0.14), var(--final-inset-line);
}

.table-actions-stack {
    gap: 10px;
}

.table-actions-stack .button,
.table-actions-stack .link-button {
    min-width: 120px;
    text-align: right;
}

.detail-list,
.mobile-detail-list {
    gap: 14px;
}

.detail-list > div,
.mobile-detail-list > div,
.simple-list li,
.timeline-item,
.dashboard-list-item,
.dashboard-shift-item,
.response-event-list li,
.bar-row {
    position: relative;
    overflow: hidden;
    border-radius: 22px;
    border: 1px solid color-mix(in srgb, var(--final-row-border) 90%, transparent);
    background:
        linear-gradient(180deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0.015) 100%),
        color-mix(in srgb, var(--panel) 88%, transparent);
    box-shadow: var(--final-soft-shadow), var(--final-inset-line);
}

.detail-list > div::before,
.mobile-detail-list > div::before,
.simple-list li::before,
.timeline-item::before,
.dashboard-list-item::before,
.dashboard-shift-item::before,
.response-event-list li::before,
.bar-row::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 56px;
    background: linear-gradient(180deg, rgba(255,255,255,0.10) 0%, rgba(255,255,255,0.02) 72%, transparent 100%);
    pointer-events: none;
}

.detail-list > div,
.mobile-detail-list > div {
    min-height: 84px;
    padding: 18px 20px;
}

.detail-list > div:hover,
.mobile-detail-list > div:hover,
.simple-list li:hover,
.timeline-item:hover,
.dashboard-list-item:hover,
.dashboard-shift-item:hover,
.response-event-list li:hover,
.bar-row:hover {
    transform: translateY(-2px);
    border-color: color-mix(in srgb, var(--final-row-hover-border) 90%, transparent);
    box-shadow: 0 22px 40px rgba(10,132,255,0.14), var(--final-inset-line);
}

.detail-list > div span,
.mobile-detail-list span,
.simple-list span,
.timeline-type,
.calendar-day-title {
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-size: 0.73rem;
    font-weight: 700;
}

.detail-list > div strong,
.mobile-detail-list strong,
.simple-list strong,
.dashboard-list-item strong,
.dashboard-shift-item strong,
.timeline-content strong,
.calendar-event-title {
    letter-spacing: -0.018em;
}

.simple-list li {
    display: grid;
    gap: 6px;
    padding: 16px 18px;
}

.dashboard-list-item,
.dashboard-shift-item {
    align-items: flex-start;
    gap: 14px;
    min-height: 78px;
    padding: 16px 18px;
}

.dashboard-list-item > div,
.dashboard-shift-main {
    min-width: 0;
}

.dashboard-inline-pills,
.inline-badges,
.inline-badge-row,
.response-event-list {
    gap: 8px;
}

.calendar-grid {
    gap: 18px;
}

.calendar-day {
    min-height: 248px;
    padding: 16px;
    border-radius: 24px;
    box-shadow: var(--final-card-shadow), var(--final-inset-line);
}

.calendar-day-head {
    margin-bottom: 16px;
    padding: 0 2px 10px;
    border-bottom: 1px solid color-mix(in srgb, var(--final-row-border) 72%, transparent);
}

.calendar-day-date {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 76px;
    min-height: 40px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid color-mix(in srgb, var(--final-row-border) 88%, transparent);
    background:
        linear-gradient(180deg, rgba(255,255,255,0.08) 0%, rgba(255,255,255,0.02) 100%),
        color-mix(in srgb, var(--panel-2) 88%, transparent);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
}

.calendar-events {
    gap: 12px;
}

.calendar-event {
    display: grid;
    gap: 8px;
    padding: 14px 15px;
    border-radius: 20px;
    border: 1px solid color-mix(in srgb, var(--final-row-border) 88%, transparent);
    background:
        linear-gradient(180deg, rgba(255,255,255,0.07) 0%, rgba(255,255,255,0.02) 100%),
        color-mix(in srgb, var(--panel) 90%, transparent);
    box-shadow: var(--final-soft-shadow), inset 0 1px 0 rgba(255,255,255,0.08);
}

.calendar-event:hover {
    transform: translateY(-1px);
    border-color: color-mix(in srgb, var(--final-row-hover-border) 88%, transparent);
    box-shadow: 0 18px 34px rgba(10,132,255,0.12), inset 0 1px 0 rgba(255,255,255,0.10);
}

.calendar-event-title {
    font-size: 0.98rem;
    font-weight: 700;
    line-height: 1.35;
}

.calendar-event-meta {
    color: color-mix(in srgb, var(--muted) 84%, var(--text) 16%);
    line-height: 1.5;
}

.calendar-event-actions {
    margin-top: 2px;
    padding-top: 8px;
    border-top: 1px solid color-mix(in srgb, var(--final-row-border) 68%, transparent);
}

.day-view-card {
    padding-bottom: 12px;
}

.day-timeline {
    gap: 16px;
}

.day-timeline-item {
    align-items: start;
    gap: 18px;
    padding: 18px;
    border-radius: 24px;
    box-shadow: var(--final-card-shadow), var(--final-inset-line);
}

.day-time-chip {
    min-height: 46px;
    padding: 10px 16px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
}

.page-header,
.scope-notice-card,
.list-focus-card,
.filter-card,
.dashboard-toolbar-shell,
.month-picker-shell {
    box-shadow: var(--final-card-shadow), var(--final-inset-line);
}

.list-focus-card,
.scope-notice-card {
    padding: 16px 18px;
    border-radius: 24px;
}

.card-header h2,
.card-header h3,
.page-header h1,
.section-heading-row h3 {
    letter-spacing: -0.03em;
}

.card-header .muted,
.page-header .muted,
.section-heading-row .muted,
.dashboard-list-item .muted,
.dashboard-shift-item .muted,
.calendar-event-meta,
.detail-list > div span,
.mobile-detail-list span {
    color: color-mix(in srgb, var(--muted) 88%, var(--text) 12%);
}

@media (max-width: 980px) {
    .toolbar {
        padding: 10px;
        border-radius: 22px;
    }

    .toolbar-group {
        width: 100%;
        justify-content: flex-start;
    }

    .calendar-day {
        min-height: 0;
    }

    .dashboard-list-item,
    .dashboard-shift-item,
    .detail-list > div,
    .mobile-detail-list > div {
        border-radius: 20px;
    }
}

@media (max-width: 680px) {
    .table {
        border-spacing: 0 8px;
    }

    .table thead th {
        font-size: 0.69rem;
        letter-spacing: 0.08em;
    }

    .table tbody tr::before {
        border-radius: 18px;
    }

    .toolbar,
    .toolbar-group,
    .calendar-day,
    .calendar-event,
    .day-timeline-item,
    .list-focus-card,
    .scope-notice-card,
    .detail-list > div,
    .mobile-detail-list > div,
    .simple-list li,
    .dashboard-list-item,
    .dashboard-shift-item {
        border-radius: 18px;
    }

    .calendar-day {
        padding: 14px;
    }

    .calendar-day-date {
        min-width: 66px;
        min-height: 36px;
        padding-inline: 12px;
    }

    .card > .table-responsive,
    .card > .table-wrap {
        padding: 8px;
    }
}

.dispatch-kpi-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 18px;
}

.dispatch-kpi-card {
    min-height: 132px;
}

.dispatch-layout-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(320px, 0.9fr);
    gap: 18px;
    align-items: start;
}

.dispatch-main-column,
.dispatch-side-column {
    min-width: 0;
}

.dispatch-card {
    overflow: hidden;
}

.dispatch-shift-stack {
    display: grid;
    gap: 14px;
}

.dispatch-shift-card {
    padding: 16px;
    border-radius: 20px;
    border: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(255,255,255,0.028) 0%, rgba(255,255,255,0.012) 100%);
}

.dispatch-shift-card-critical {
    border-color: color-mix(in srgb, var(--negative) 42%, var(--line) 58%);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--negative) 18%, transparent 82%);
}

.dispatch-shift-head,
.dispatch-meta-row,
.dispatch-actions-row,
.dispatch-inline-meta,
.dispatch-shift-title-row {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

.dispatch-shift-time {
    font-size: 0.86rem;
    color: var(--muted);
    text-align: right;
}

.dispatch-meta-row {
    margin-top: 12px;
    justify-content: flex-start;
}

.soft-pill-negative {
    border-color: color-mix(in srgb, var(--negative) 32%, var(--line) 68%);
    color: var(--negative);
}

.soft-pill-warning {
    border-color: color-mix(in srgb, var(--warning) 32%, var(--line) 68%);
    color: var(--warning);
}

.dispatch-issue-stack {
    display: grid;
    gap: 10px;
    margin-top: 14px;
}

.dispatch-issue-item {
    display: grid;
    gap: 4px;
    padding: 11px 12px;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: rgba(255,255,255,0.025);
}

.dispatch-issue-item strong {
    font-size: 0.86rem;
}

.dispatch-issue-item span {
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.45;
}

.dispatch-issue-negative {
    border-color: color-mix(in srgb, var(--negative) 30%, var(--line) 70%);
    background: color-mix(in srgb, var(--negative) 8%, transparent 92%);
}

.dispatch-issue-warning {
    border-color: color-mix(in srgb, var(--warning) 30%, var(--line) 70%);
    background: color-mix(in srgb, var(--warning) 8%, transparent 92%);
}

.dispatch-issue-muted {
    border-color: var(--line);
}

.dispatch-actions-row {
    margin-top: 14px;
    justify-content: flex-start;
}

.dispatch-table td,
.dispatch-table th {
    vertical-align: top;
}

.dispatch-inline-meta {
    justify-content: flex-end;
}

.dispatch-inline-meta a {
    font-size: 0.82rem;
}

.dispatch-timeline-table-wrap {
    overflow-x: auto;
}

@media (max-width: 1280px) {
    .dispatch-kpi-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .dispatch-layout-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .dispatch-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 520px) {
    .dispatch-kpi-grid {
        grid-template-columns: 1fr;
    }
}


/* === 2026-03-24 Mobile operations update + focus steering === */
.mobile-nav-trigger { display: none; }
.mobile-nav-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(6, 10, 16, 0.42);
    backdrop-filter: blur(10px);
    z-index: 60;
}
.mobile-page-header { gap: 14px; }
.header-actions-mobile-wrap { flex-wrap: wrap; gap: 10px; }
.dispatch-focus-card, .operations-quick-strip, .report-form-mobile .form-section-block {
    position: relative;
    overflow: hidden;
}
.dispatch-focus-header {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
}
.dispatch-focus-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}
.soft-pill-action { text-decoration: none; }
.soft-pill-action.active {
    background: rgba(59, 130, 246, 0.22);
    border-color: rgba(96, 165, 250, 0.46);
    color: var(--text-color);
}
.dispatch-mini-kpi-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
    margin-top: 16px;
}
.dispatch-mini-kpi {
    border: 1px solid var(--border-color);
    border-radius: 18px;
    padding: 12px 14px;
    background: rgba(255,255,255,0.03);
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.dispatch-mini-kpi span { font-size: 0.8rem; color: var(--muted); }
.dispatch-mini-kpi strong { font-size: 1.15rem; }
.dispatch-mobile-card-stack, .shift-mobile-card-list { display: none; }
.dispatch-mobile-card, .shift-mobile-card {
    border: 1px solid var(--border-color);
    border-radius: 22px;
    padding: 16px;
    background: rgba(255,255,255,0.04);
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.16);
}
.dispatch-mobile-card + .dispatch-mobile-card,
.shift-mobile-card + .shift-mobile-card { margin-top: 12px; }
.dispatch-mobile-card-head, .shift-mobile-card-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
}
.dispatch-mobile-meta-grid, .shift-mobile-meta-grid, .operations-quick-strip-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 14px;
    margin-top: 14px;
}
.dispatch-mobile-meta-grid div, .shift-mobile-meta-grid div, .operations-quick-strip-grid div {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.dispatch-mobile-meta-grid span, .shift-mobile-meta-grid span, .operations-quick-strip-grid span { color: var(--muted); font-size: 0.78rem; }
.dispatch-actions-row-mobile { flex-wrap: wrap; margin-top: 14px; }
.shift-mobile-warning-row { display: flex; gap: 10px; align-items: center; margin-top: 12px; flex-wrap: wrap; }
.shift-desktop-table-wrap, .dispatch-desktop-table { display: block; }
.report-form-mobile { padding-bottom: 92px; }
.report-form-mobile .form-section-block + .form-section-block { margin-top: 18px; }
.form-section-heading { margin-bottom: 14px; }
.report-form-grid { gap: 16px 18px; }
.report-form-actions-sticky {
    position: sticky;
    bottom: max(14px, env(safe-area-inset-bottom));
    z-index: 6;
    margin-top: 20px;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    backdrop-filter: blur(18px);
    background: rgba(15, 23, 42, 0.72);
}
html[data-theme="light"] .report-form-actions-sticky { background: rgba(255,255,255,0.82); }
.operations-quick-strip-grid strong { font-size: 1rem; }
@media (max-width: 980px) {
    .mobile-nav-trigger {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        min-height: 42px;
    }
    .sidebar {
        position: fixed !important;
        top: 0;
        left: 0;
        height: 100dvh;
        width: min(86vw, 360px);
        z-index: 80;
        transform: translateX(-108%);
        transition: transform 0.24s ease;
        overflow-y: auto;
        padding-top: max(16px, env(safe-area-inset-top));
        padding-bottom: max(18px, env(safe-area-inset-bottom));
    }
    body.mobile-nav-open .sidebar { transform: translateX(0); }
    .layout { grid-template-columns: 1fr !important; }
    .utility-bar {
        position: sticky;
        top: 0;
        z-index: 30;
        padding-top: max(10px, env(safe-area-inset-top));
        backdrop-filter: blur(20px);
    }
    .dispatch-focus-header { flex-direction: column; }
    .dispatch-mini-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .dispatch-mobile-card-stack, .shift-mobile-card-list { display: block; }
    .dispatch-desktop-table, .shift-desktop-table-wrap { display: none; }
    .dispatch-layout-grid, .two-column { grid-template-columns: 1fr; }
    .table-responsive, .dispatch-timeline-table-wrap { overflow: visible; }
}
@media (max-width: 760px) {
    .header-actions-mobile-wrap > * { flex: 1 1 calc(50% - 10px); min-width: 0; }
    .dispatch-mobile-meta-grid, .shift-mobile-meta-grid, .operations-quick-strip-grid { grid-template-columns: 1fr; }
    .dispatch-mini-kpi-grid { grid-template-columns: 1fr 1fr; }
    .report-form-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
    .utility-bar { gap: 10px; }
    .header-actions-mobile-wrap > * { flex-basis: 100%; }
    .dispatch-mini-kpi-grid { grid-template-columns: 1fr; }
}

.ops-site-quick-card {
    border: 1px solid var(--border-color);
    border-radius: 26px;
}
.ops-site-quick-head {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
}
.ops-site-quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}
.ops-site-quick-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-top: 16px;
}
.ops-site-alert-stack {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.ops-site-doc-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.ops-site-doc-item {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
    padding: 14px 16px;
    border: 1px solid var(--border-color);
    border-radius: 18px;
    text-decoration: none;
    color: inherit;
    background: rgba(255,255,255,0.03);
}
.ops-site-doc-item:hover {
    border-color: rgba(96, 165, 250, 0.36);
    background: rgba(96, 165, 250, 0.08);
}
.ops-site-doc-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}
.compact-simple-list li + li { margin-top: 10px; }
@media (max-width: 1100px) {
    .ops-site-quick-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
    .ops-site-quick-head, .ops-site-doc-item {
        flex-direction: column;
    }
    .ops-site-doc-meta {
        justify-content: flex-start;
    }
    .ops-site-quick-actions > * {
        flex: 1 1 calc(50% - 10px);
        min-width: 0;
    }
}
@media (max-width: 560px) {
    .ops-site-quick-actions > * { flex-basis: 100%; }
}

.execution-hero-card {
    border: 1px solid var(--border-color);
    border-radius: 28px;
}
.execution-hero-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
}
.execution-info-grid {
    margin-top: 16px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}
.execution-info-grid > div,
.execution-task-card {
    padding: 14px 16px;
    border-radius: 18px;
    border: 1px solid var(--border-color);
    background: rgba(255,255,255,0.03);
}
.execution-info-grid span,
.execution-task-card .muted.small {
    display: block;
}
.execution-actor-card {
    border-radius: 24px;
}
.execution-actor-form select {
    min-width: 260px;
}
.execution-task-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
}
.execution-task-head {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: flex-start;
    margin-bottom: 8px;
}
.execution-task-done {
    border-color: rgba(34,197,94,0.28);
    background: rgba(34,197,94,0.10);
}
.execution-task-warning {
    border-color: rgba(245,158,11,0.28);
    background: rgba(245,158,11,0.10);
}
.execution-task-muted {
    background: rgba(148,163,184,0.08);
}
.execution-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(320px, 0.9fr);
    gap: 18px;
    align-items: start;
}
.execution-main-column,
.execution-side-column {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.execution-form-card,
.execution-side-card {
    border-radius: 24px;
}
.execution-checklist-phase-stack {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.execution-checklist-phase-card {
    padding: 16px;
    border-radius: 22px;
    border: 1px solid var(--border-color);
    background: rgba(255,255,255,0.03);
}
.execution-checklist-item-stack {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.execution-checklist-item {
    padding: 14px 16px;
    border-radius: 18px;
    border: 1px solid rgba(148,163,184,0.18);
    background: rgba(255,255,255,0.03);
}
.execution-checklist-item.is-done {
    border-color: rgba(34,197,94,0.24);
    background: rgba(34,197,94,0.08);
}
.execution-checklist-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}
.execution-checklist-form .form-actions {
    justify-content: flex-start;
}
.top-gap-xs {
    margin-top: 8px;
}
@media (max-width: 1240px) {
    .execution-task-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .execution-layout { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
    .execution-info-grid,
    .execution-task-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
    .execution-hero-head { flex-direction: column; }
    .execution-info-grid,
    .execution-task-grid { grid-template-columns: 1fr; }
    .execution-actor-form select,
    .execution-actor-form .button { width: 100%; }
    .execution-checklist-head { flex-direction: column; }
}

/* === 2026-03-25 Patrol workflow chain + cleanup === */
.badge.info {
    background: rgba(59, 130, 246, 0.16);
    border-color: rgba(96, 165, 250, 0.3);
}

.badge.neutral {
    background: rgba(148, 163, 184, 0.16);
    border-color: rgba(148, 163, 184, 0.3);
}

.task-workflow-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px;
    margin-top: 12px;
}

.task-workflow-step-form {
    margin: 0;
}

.task-workflow-step {
    width: 100%;
    min-height: 56px;
    border-radius: 18px;
    border: 1px solid var(--border-color);
    background: rgba(255,255,255,0.035);
    color: var(--text-color);
    font: inherit;
    font-weight: 600;
    padding: 10px 12px;
    text-align: left;
    transition: border-color 0.16s ease, background 0.16s ease, transform 0.16s ease;
}

.task-workflow-step:hover {
    transform: translateY(-1px);
    border-color: rgba(96, 165, 250, 0.4);
}

.task-workflow-step.is-active {
    background: rgba(59, 130, 246, 0.16);
    border-color: rgba(96, 165, 250, 0.46);
}

.patrol-actions-summary-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.patrol-actions-table td {
    vertical-align: top;
}

@media (max-width: 960px) {
    .patrol-actions-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .task-workflow-strip,
    .patrol-actions-summary-grid {
        grid-template-columns: 1fr;
    }
}


/* Notification center */
.nav-link-counter { margin-left: auto; }
.notification-global-strip {
    margin-bottom: 20px;
    padding: 18px 20px;
    border: 1px solid color-mix(in srgb, var(--danger) 26%, var(--line) 74%);
    background: linear-gradient(180deg, rgba(255,69,58,0.10) 0%, rgba(255,159,10,0.08) 100%), var(--card-bg);
}
.notification-global-strip-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}
.notification-global-strip-title { font-size: 1.02rem; font-weight: 700; }
.notification-global-strip-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 14px;
}
.notification-global-chip {
    display: grid;
    gap: 8px;
    padding: 14px 16px;
    border-radius: 18px;
    border: 1px solid var(--detail-box-border);
    background: var(--detail-box-bg);
    color: var(--text);
    text-decoration: none;
}
.notification-global-chip:hover { text-decoration: none; }
.notification-global-chip.notification-negative { border-color: color-mix(in srgb, var(--negative) 34%, var(--line) 66%); }
.notification-global-chip.notification-warning { border-color: color-mix(in srgb, var(--warning) 34%, var(--line) 66%); }
.notification-global-chip.notification-muted { border-color: color-mix(in srgb, var(--accent) 22%, var(--line) 78%); }
.notification-summary-card,
.notification-dashboard-card { overflow: hidden; }
.notification-summary-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 12px;
    margin-top: 16px;
}
.notification-stat-card,
.notification-channel-card,
.notification-action-card {
    display: grid;
    gap: 8px;
    padding: 14px 16px;
    border-radius: 18px;
    border: 1px solid var(--detail-box-border);
    background: var(--detail-box-bg);
    color: var(--text);
}
.notification-stat-card:hover { text-decoration: none; }
.notification-stat-card span { color: var(--muted); font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.06em; }
.notification-stat-card strong { font-size: 1.5rem; letter-spacing: -0.03em; }
.notification-center-grid { align-items: start; }
.notification-channel-grid,
.notification-list,
.notification-action-grid {
    display: grid;
    gap: 12px;
}
.notification-channel-grid { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.notification-list-item,
.notification-action-card,
.notification-dashboard-item {
    border-radius: 18px;
    border: 1px solid var(--detail-box-border);
    background: var(--detail-box-bg);
}
.notification-list-item {
    display: grid;
    gap: 10px;
    padding: 16px 18px;
    color: var(--text);
    text-decoration: none;
}
.notification-list-item:hover,
.notification-dashboard-item:hover { text-decoration: none; }
.notification-list-head,
.notification-channel-top {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.notification-dashboard-grid {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 18px;
    margin-top: 16px;
}
.notification-dashboard-kpis {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    align-content: start;
}
.notification-dashboard-list-shell {
    padding: 16px 18px;
    border-radius: 20px;
    border: 1px solid var(--detail-box-border);
    background: var(--detail-box-bg);
}
.notification-dashboard-item { align-items: start; }
.notification-detail-grid { align-items: start; }
.notification-action-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.notification-action-card textarea { min-height: 92px; }
.notification-payload-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
    margin-top: 10px;
}
.notification-payload-grid div {
    padding: 10px 12px;
    border-radius: 14px;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--detail-box-border);
}
.notification-payload-grid span {
    display: block;
    margin-bottom: 6px;
    color: var(--muted);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.notification-timeline-item { grid-template-columns: 190px minmax(0, 1fr); }
@media (max-width: 1200px) {
    .notification-summary-grid,
    .notification-global-strip-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .notification-dashboard-grid { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
    .notification-action-grid,
    .notification-summary-grid,
    .notification-global-strip-list { grid-template-columns: 1fr; }
    .notification-global-strip-header { flex-direction: column; align-items: flex-start; }
}


.automation-inline-card { margin-bottom: 1rem; }
.automation-summary-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); gap:0.9rem; margin:1rem 0; }
.automation-summary-card { padding:1rem 1.05rem; display:flex; flex-direction:column; gap:0.45rem; }
.automation-summary-card strong { font-size:1.5rem; line-height:1; }
.automation-layout { display:grid; grid-template-columns:minmax(0, 2.1fr) minmax(280px, 0.9fr); gap:1rem; align-items:start; }
.automation-shift-stack { display:flex; flex-direction:column; gap:1rem; }
.automation-shift-card { border:1px solid var(--line-color); border-radius:20px; padding:1rem; background:var(--card-bg); box-shadow:var(--card-shadow); }
.automation-shift-head, .automation-candidate-head { display:flex; justify-content:space-between; gap:0.75rem; align-items:flex-start; }
.automation-shift-meta { display:flex; flex-wrap:wrap; gap:0.45rem; margin-top:0.75rem; }
.automation-candidate-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); gap:0.8rem; margin-top:0.9rem; }
.automation-candidate-card { text-decoration:none; }
.automation-candidate-card strong, .automation-shift-card .calendar-event-title { color:inherit; }
.automation-blocker-list { display:flex; flex-direction:column; gap:0.55rem; margin-top:0.85rem; }
.automation-toolbar { align-items:center; gap:0.8rem; flex-wrap:wrap; }
.automation-toolbar .toolbar-form { display:flex; align-items:center; flex-wrap:wrap; gap:0.75rem; }
.automation-toolbar label { display:flex; align-items:center; gap:0.35rem; font-size:0.92rem; }
.automation-toolbar input[type='date'] { min-width:145px; }
.automation-run-item { align-items:center; }
.automation-run-stats { display:flex; flex-direction:column; align-items:flex-end; gap:0.35rem; }
.automation-rule-list { display:flex; flex-direction:column; gap:0.65rem; }
@media (max-width: 980px) { .automation-layout { grid-template-columns:1fr; } }


.app-runtime-strip{margin-bottom:18px}
.app-runtime-strip-main{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap}
.app-runtime-strip-title{font-weight:700}
.app-install-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:16px}
.app-shell-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:16px}
.app-shortcut-card{display:flex;flex-direction:column;gap:10px;padding:18px;border-radius:18px;border:1px solid rgba(148,163,184,.16);background:rgba(15,23,42,.42);text-decoration:none;color:inherit;min-height:140px;box-shadow:0 18px 40px rgba(15,23,42,.18)}
.app-shortcut-card strong{font-size:1.02rem}
.app-shortcut-card span{color:var(--text-muted,#94a3b8);line-height:1.45}
.app-device-list{display:grid;gap:14px}
.app-device-card{display:grid;gap:10px;padding:16px;border-radius:16px;border:1px solid rgba(148,163,184,.16);background:rgba(15,23,42,.36)}
body.app-is-offline .app-runtime-strip{border-color:rgba(248,113,113,.3)}
body.pwa-standalone .utility-bar{position:sticky;top:0;z-index:20;padding-top:max(10px,env(safe-area-inset-top))}
@media (max-width: 980px){
  body.pwa-standalone .sidebar{display:none}
  body.pwa-standalone .layout{grid-template-columns:1fr}
  body.pwa-standalone .content{padding-top:calc(14px + env(safe-area-inset-top));padding-bottom:calc(24px + env(safe-area-inset-bottom))}
}


/* Fix block 2026-03-25 UI quality pass */
.nav-link-counter {
    margin-left: auto;
    min-width: 24px;
    height: 24px;
    padding: 0 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    line-height: 1;
}
.nav-section .nav-link {
    display: flex;
    gap: 10px;
}
.dashboard-layout-grid {
    grid-auto-flow: dense;
}
.notification-summary-grid {
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
}
.notification-center-grid-balanced {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    align-items: stretch;
}
.notification-panel-card {
    height: 100%;
}
.notification-collapsible {
    overflow: hidden;
}
.notification-collapse-summary {
    list-style: none;
    cursor: pointer;
}
.notification-collapse-summary::-webkit-details-marker { display: none; }
.notification-collapsible[open] .notification-collapse-summary {
    border-bottom: 1px solid var(--line);
}
.notification-center-grid-balanced .filters-grid,
.notification-center-grid-balanced .notification-list {
    margin-top: 16px;
}
.analytics-table-wrap {
    overflow-x: auto;
}
.analytics-table {
    border-spacing: 0;
}
.analytics-table thead th,
.analytics-table tbody td {
    text-align: left;
}
.analytics-table tbody tr::before {
    border-radius: 14px;
}
.analytics-table tbody tr td:first-child {
    padding-left: 16px;
}
.analytics-table tbody tr td:last-child {
    padding-right: 16px;
}
.monthly-analytics-page .table thead th,
.monthly-analytics-page .table tbody td {
    white-space: nowrap;
}
.monthly-analytics-page .table tbody td:first-child {
    white-space: normal;
}
.app-runtime-strip-compact {
    padding-top: 14px;
    padding-bottom: 14px;
}
.app-runtime-strip-compact .app-runtime-strip-title {
    font-size: 0.98rem;
}
.dispatch-card-grid-dense {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    align-items: start;
}
.dispatch-card-grid-dense > .dispatch-card:nth-child(-n+2) {
    grid-column: 1 / -1;
}
.dispatch-card-grid-dense > .dispatch-card {
    margin-top: 0 !important;
}
@media (max-width: 1200px) {
    .notification-center-grid-balanced,
    .dispatch-card-grid-dense {
        grid-template-columns: 1fr;
    }
    .dispatch-card-grid-dense > .dispatch-card:nth-child(-n+2) {
        grid-column: auto;
    }
}


/* === 2026-03-26 table alignment + sidebar fit polish === */
.nav-section-panel {
    padding: 0 6px 0 6px;
}
.nav-section.is-open .nav-section-panel {
    padding-top: 6px;
    padding-bottom: 8px;
}
.nav-section .nav-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-width: 0;
    width: 100%;
    padding: 0 12px;
    overflow: hidden;
}
.nav-section .nav-link > span:first-child {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}
.nav-link-counter {
    flex: 0 0 auto;
    margin-left: 10px;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    font-size: 0.72rem;
}
@media (max-width: 780px) {
    .nav-section-panel {
        padding-left: 4px;
        padding-right: 4px;
    }
}

.table-responsive.table-clean-scroll,
.analytics-table-wrap.table-clean-scroll {
    overflow-x: auto;
    overflow-y: hidden;
}
.table.table-ui-fixed {
    width: 100%;
    min-width: 100%;
    table-layout: fixed;
    border-collapse: separate;
    border-spacing: 0 12px;
}
.table.table-ui-fixed thead th,
.table.table-ui-fixed tbody td {
    box-sizing: border-box;
    white-space: normal;
    word-break: break-word;
    overflow-wrap: anywhere;
}
.table.table-ui-fixed thead th {
    vertical-align: bottom;
}
.table.table-ui-fixed tbody td {
    vertical-align: middle;
}
.table.table-ui-fixed td .button.small,
.table.table-ui-fixed td .button,
.table.table-ui-fixed td select,
.table.table-ui-fixed td .badge {
    max-width: 100%;
}
.table.table-ui-fixed td .inline-form,
.table.table-ui-fixed td .inline-form select {
    width: 100%;
}
.table.table-ui-fixed td.text-right {
    text-align: right;
}
.table.table-ui-fixed.compact-actions td:last-child,
.table.table-ui-fixed.compact-actions th:last-child {
    text-align: right;
}
.monthly-analytics-page .card > .table-responsive,
.monthly-analytics-page .card > .analytics-table-wrap,
.reports-page .card > .table-responsive,
.tasks-page .card > .table-responsive {
    padding-top: 8px;
}
.monthly-analytics-page .analytics-table tbody td:first-child,
.reports-page .table-ui-fixed tbody td:first-child,
.tasks-page .table-ui-fixed tbody td:first-child {
    padding-left: 14px;
}
.monthly-analytics-page .analytics-table tbody td:last-child,
.reports-page .table-ui-fixed tbody td:last-child,
.tasks-page .table-ui-fixed tbody td:last-child {
    padding-right: 14px;
}
.monthly-analytics-page .analytics-table tbody tr::before,
.reports-page .table-ui-fixed tbody tr::before,
.tasks-page .table-ui-fixed tbody tr::before {
    inset: 0;
}
.page-header {
    gap: 18px;
}
.page-header .header-actions {
    align-items: center;
}
@media (max-width: 1280px) {
    .monthly-analytics-page .two-column {
        grid-template-columns: 1fr;
    }
}

/* === 2026-03-26 hard fix: sidebar submenu fit + true table left alignment === */
/* Root cause table shift:
   1) scrollbar-gutter: stable both-edges reserved a left gutter inside the table shell
   2) fixed-layout tables plus asymmetric cell padding amplified the visual offset */
.table-responsive,
.table-wrap,
.analytics-table-wrap {
    scrollbar-gutter: auto !important;
}

.nav-section {
    overflow: visible;
}

.nav-section-panel {
    padding-left: 8px !important;
    padding-right: 8px !important;
}

.nav-section.is-open .nav-section-panel {
    padding-top: 8px !important;
    padding-bottom: 10px !important;
}

.nav-section .nav-link {
    min-height: 46px;
    padding: 10px 12px !important;
    gap: 10px;
    align-items: center;
    justify-content: flex-start;
    overflow: visible;
    white-space: normal;
}

.nav-section .nav-link > span:first-child {
    flex: 1 1 auto;
    min-width: 0;
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
    line-height: 1.25;
}

.nav-link-counter {
    flex: 0 0 auto;
    margin-left: auto !important;
    align-self: center;
}

.reports-page .card > .table-responsive,
.tasks-page .card > .table-responsive,
.monthly-analytics-page .card > .table-responsive,
.monthly-analytics-page .card > .analytics-table-wrap {
    padding: 10px 0 8px !important;
}

.reports-page .table-responsive.table-clean-scroll,
.tasks-page .table-responsive.table-clean-scroll,
.monthly-analytics-page .table-responsive.table-clean-scroll,
.monthly-analytics-page .analytics-table-wrap.table-clean-scroll {
    overflow-x: auto;
    overflow-y: hidden;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

.reports-page .table.table-ui-fixed,
.tasks-page .table.table-ui-fixed,
.monthly-analytics-page .table.table-ui-fixed {
    width: max(100%, 980px);
    min-width: 100%;
    table-layout: auto !important;
    border-spacing: 0 10px;
    margin-left: 0;
}

.monthly-analytics-page .table.table-ui-fixed {
    width: max(100%, 920px);
}

.reports-page .table.table-ui-fixed thead th,
.reports-page .table.table-ui-fixed tbody td,
.tasks-page .table.table-ui-fixed thead th,
.tasks-page .table.table-ui-fixed tbody td,
.monthly-analytics-page .table.table-ui-fixed thead th,
.monthly-analytics-page .table.table-ui-fixed tbody td {
    padding-left: 14px !important;
    padding-right: 14px !important;
    text-align: left;
    vertical-align: middle;
}

.reports-page .table.table-ui-fixed thead th:first-child,
.reports-page .table.table-ui-fixed tbody td:first-child,
.tasks-page .table.table-ui-fixed thead th:first-child,
.tasks-page .table.table-ui-fixed tbody td:first-child,
.monthly-analytics-page .table.table-ui-fixed thead th:first-child,
.monthly-analytics-page .table.table-ui-fixed tbody td:first-child {
    padding-left: 18px !important;
}

.reports-page .table.table-ui-fixed thead th:last-child,
.reports-page .table.table-ui-fixed tbody td:last-child,
.tasks-page .table.table-ui-fixed thead th:last-child,
.tasks-page .table.table-ui-fixed tbody td:last-child,
.monthly-analytics-page .table.table-ui-fixed thead th:last-child,
.monthly-analytics-page .table.table-ui-fixed tbody td:last-child {
    padding-right: 18px !important;
}

.reports-page .table.table-ui-fixed tbody tr::before,
.tasks-page .table.table-ui-fixed tbody tr::before,
.monthly-analytics-page .table.table-ui-fixed tbody tr::before {
    left: 0;
    right: 0;
}

.reports-page .table.table-ui-fixed td .inline-form,
.tasks-page .table.table-ui-fixed td .inline-form {
    width: auto;
    display: inline-flex;
    max-width: 100%;
}

.reports-page .table.table-ui-fixed td .inline-form select,
.tasks-page .table.table-ui-fixed td .inline-form select {
    min-width: 0;
    width: 100%;
    max-width: 190px;
}

.monthly-analytics-page .analytics-table tbody td:first-child,
.reports-page .table-ui-fixed tbody td:first-child,
.tasks-page .table-ui-fixed tbody td:first-child,
.monthly-analytics-page .analytics-table tbody td:last-child,
.reports-page .table-ui-fixed tbody td:last-child,
.tasks-page .table-ui-fixed tbody td:last-child {
    padding-left: inherit;
    padding-right: inherit;
}

@media (max-width: 1100px) {
    .reports-page .table.table-ui-fixed,
    .tasks-page .table.table-ui-fixed,
    .monthly-analytics-page .table.table-ui-fixed {
        width: max(100%, 860px);
    }
}

@media (max-width: 780px) {
    .nav-section-panel {
        padding-left: 6px !important;
        padding-right: 6px !important;
    }

    .nav-section .nav-link {
        padding: 10px 10px !important;
    }
}


/* === 2026-03-26 root-cause table alignment fix === */
/* Chrome/macOS can materialize tr::before on table rows as an anonymous table cell.
   That creates a phantom first column and shifts all real cells one column to the right.
   Fix: disable row pseudo-elements for data tables and move the glass row chrome onto td boxes. */
.reports-page .table tbody tr::before,
.tasks-page .table tbody tr::before,
.monthly-analytics-page .table tbody tr::before {
    content: none !important;
    display: none !important;
}

.reports-page .table,
.tasks-page .table,
.monthly-analytics-page .table {
    border-spacing: 0 10px !important;
}

.reports-page .table tbody tr,
.tasks-page .table tbody tr,
.monthly-analytics-page .table tbody tr {
    background: transparent !important;
    box-shadow: none !important;
    transform: none !important;
}

.reports-page .table tbody tr td,
.tasks-page .table tbody tr td,
.monthly-analytics-page .table tbody tr td {
    background: var(--final-row-sheen), color-mix(in srgb, var(--panel) 88%, transparent) !important;
    border-top: 1px solid color-mix(in srgb, var(--final-row-border) 92%, transparent) !important;
    border-bottom: 1px solid color-mix(in srgb, var(--final-row-border) 92%, transparent) !important;
    border-left: 0 !important;
    border-right: 0 !important;
    box-shadow: none !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    background-clip: padding-box;
}

.reports-page .table tbody tr td:first-child,
.tasks-page .table tbody tr td:first-child,
.monthly-analytics-page .table tbody tr td:first-child {
    border-left: 1px solid color-mix(in srgb, var(--final-row-border) 92%, transparent) !important;
    border-top-left-radius: 18px !important;
    border-bottom-left-radius: 18px !important;
    padding-left: 18px !important;
}

.reports-page .table tbody tr td:last-child,
.tasks-page .table tbody tr td:last-child,
.monthly-analytics-page .table tbody tr td:last-child {
    border-right: 1px solid color-mix(in srgb, var(--final-row-border) 92%, transparent) !important;
    border-top-right-radius: 18px !important;
    border-bottom-right-radius: 18px !important;
    padding-right: 18px !important;
}

.reports-page .table tbody tr:hover td,
.tasks-page .table tbody tr:hover td,
.monthly-analytics-page .table tbody tr:hover td {
    border-top-color: color-mix(in srgb, var(--final-row-hover-border) 92%, transparent) !important;
    border-bottom-color: color-mix(in srgb, var(--final-row-hover-border) 92%, transparent) !important;
    background: linear-gradient(135deg, rgba(255,255,255,0.16) 0%, rgba(255,255,255,0.06) 42%, rgba(255,255,255,0.02) 100%), color-mix(in srgb, var(--panel) 90%, transparent) !important;
}

.reports-page .table tbody tr:hover td:first-child,
.tasks-page .table tbody tr:hover td:first-child,
.monthly-analytics-page .table tbody tr:hover td:first-child {
    border-left-color: color-mix(in srgb, var(--final-row-hover-border) 92%, transparent) !important;
}

.reports-page .table tbody tr:hover td:last-child,
.tasks-page .table tbody tr:hover td:last-child,
.monthly-analytics-page .table tbody tr:hover td:last-child {
    border-right-color: color-mix(in srgb, var(--final-row-hover-border) 92%, transparent) !important;
}

.reports-page .table thead th,
.tasks-page .table thead th,
.monthly-analytics-page .table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
}

.nav-section-panel {
    overflow: hidden !important;
}

.nav-section .nav-link {
    box-sizing: border-box !important;
    max-width: 100% !important;
    width: 100% !important;
}

.nav-section .nav-link > span:first-child,
.nav-section-title {
    min-width: 0;
}

.nav-section .nav-link.active,
.nav-section .nav-link {
    padding-right: 12px !important;
}

.nav-link-counter {
    flex-shrink: 0;
    margin-left: 8px !important;
}


/* === 2026-03-26 final rest offset fix: force native table flow on affected pages === */
.reports-page .card > .table-responsive::after,
.tasks-page .card > .table-responsive::after,
.monthly-analytics-page .card > .table-responsive::after,
.monthly-analytics-page .card > .analytics-table-wrap::after {
    content: none !important;
    display: none !important;
}

.reports-page .card > .table-responsive,
.tasks-page .card > .table-responsive,
.monthly-analytics-page .card > .table-responsive,
.monthly-analytics-page .card > .analytics-table-wrap {
    padding: 8px 0 6px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    scrollbar-gutter: auto !important;
}

.reports-page .table,
.tasks-page .table,
.monthly-analytics-page .table {
    display: table !important;
    width: 100% !important;
    min-width: 100% !important;
    table-layout: fixed !important;
    border-collapse: separate !important;
    border-spacing: 0 10px !important;
    margin: 0 !important;
    transform: none !important;
}

.reports-page .table thead,
.tasks-page .table thead,
.monthly-analytics-page .table thead {
    display: table-header-group !important;
}

.reports-page .table tbody,
.tasks-page .table tbody,
.monthly-analytics-page .table tbody {
    display: table-row-group !important;
}

.reports-page .table tr,
.tasks-page .table tr,
.monthly-analytics-page .table tr {
    display: table-row !important;
    position: static !important;
    isolation: auto !important;
    transform: none !important;
}

.reports-page .table thead th,
.tasks-page .table thead th,
.monthly-analytics-page .table thead th,
.reports-page .table tbody td,
.tasks-page .table tbody td,
.monthly-analytics-page .table tbody td {
    display: table-cell !important;
    box-sizing: border-box !important;
    padding: 15px 14px !important;
    text-align: left !important;
    vertical-align: middle !important;
    white-space: normal !important;
    word-break: break-word !important;
    overflow-wrap: anywhere !important;
    transform: none !important;
}

.reports-page .table thead th:first-child,
.tasks-page .table thead th:first-child,
.monthly-analytics-page .table thead th:first-child,
.reports-page .table tbody td:first-child,
.tasks-page .table tbody td:first-child,
.monthly-analytics-page .table tbody td:first-child {
    padding-left: 16px !important;
}

.reports-page .table thead th:last-child,
.tasks-page .table thead th:last-child,
.monthly-analytics-page .table thead th:last-child,
.reports-page .table tbody td:last-child,
.tasks-page .table tbody td:last-child,
.monthly-analytics-page .table tbody td:last-child {
    padding-right: 16px !important;
}

.reports-page .table tbody tr::before,
.tasks-page .table tbody tr::before,
.monthly-analytics-page .table tbody tr::before,
.reports-page .table tbody tr::after,
.tasks-page .table tbody tr::after,
.monthly-analytics-page .table tbody tr::after {
    content: none !important;
    display: none !important;
}

.reports-page .table tbody td,
.tasks-page .table tbody td,
.monthly-analytics-page .table tbody td {
    position: static !important;
    z-index: auto !important;
    background: color-mix(in srgb, var(--panel) 88%, transparent) !important;
    border-top: 1px solid color-mix(in srgb, var(--final-row-border) 92%, transparent) !important;
    border-bottom: 1px solid color-mix(in srgb, var(--final-row-border) 92%, transparent) !important;
    border-left: 0 !important;
    border-right: 0 !important;
    box-shadow: none !important;
    background-clip: padding-box !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.reports-page .table tbody td:first-child,
.tasks-page .table tbody td:first-child,
.monthly-analytics-page .table tbody td:first-child {
    border-left: 1px solid color-mix(in srgb, var(--final-row-border) 92%, transparent) !important;
    border-top-left-radius: 18px !important;
    border-bottom-left-radius: 18px !important;
}

.reports-page .table tbody td:last-child,
.tasks-page .table tbody td:last-child,
.monthly-analytics-page .table tbody td:last-child {
    border-right: 1px solid color-mix(in srgb, var(--final-row-border) 92%, transparent) !important;
    border-top-right-radius: 18px !important;
    border-bottom-right-radius: 18px !important;
}

.reports-page .table tbody tr:hover,
.tasks-page .table tbody tr:hover,
.monthly-analytics-page .table tbody tr:hover {
    transform: none !important;
    box-shadow: none !important;
}

.reports-page .table tbody tr:hover td,
.tasks-page .table tbody tr:hover td,
.monthly-analytics-page .table tbody tr:hover td {
    background: color-mix(in srgb, var(--panel) 92%, transparent) !important;
    border-top-color: color-mix(in srgb, var(--final-row-hover-border) 92%, transparent) !important;
    border-bottom-color: color-mix(in srgb, var(--final-row-hover-border) 92%, transparent) !important;
}

.reports-page .table tbody tr:hover td:first-child,
.tasks-page .table tbody tr:hover td:first-child,
.monthly-analytics-page .table tbody tr:hover td:first-child {
    border-left-color: color-mix(in srgb, var(--final-row-hover-border) 92%, transparent) !important;
}

.reports-page .table tbody tr:hover td:last-child,
.tasks-page .table tbody tr:hover td:last-child,
.monthly-analytics-page .table tbody tr:hover td:last-child {
    border-right-color: color-mix(in srgb, var(--final-row-hover-border) 92%, transparent) !important;
}

.reports-page .table.compact-actions thead th:last-child,
.reports-page .table.compact-actions tbody td:last-child,
.tasks-page .table.compact-actions thead th:last-child,
.tasks-page .table.compact-actions tbody td:last-child,
.monthly-analytics-page .table.compact-actions thead th:last-child,
.monthly-analytics-page .table.compact-actions tbody td:last-child {
    text-align: right !important;
}

.reports-page .table .inline-form,
.tasks-page .table .inline-form {
    display: inline-flex !important;
    width: auto !important;
    max-width: 100% !important;
}

.reports-page .table .inline-form select,
.tasks-page .table .inline-form select {
    width: 100% !important;
    max-width: 190px !important;
    min-width: 0 !important;
}

.nav-section-panel {
    padding-left: 8px !important;
    padding-right: 8px !important;
    overflow: hidden !important;
}

.nav-section .nav-link {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    align-items: center !important;
    column-gap: 10px !important;
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 100% !important;
    min-height: 46px !important;
    padding: 10px 12px !important;
}

.nav-section .nav-link > span:first-child,
.nav-section-title {
    min-width: 0 !important;
}

.nav-link-counter {
    justify-self: end !important;
    margin-left: 0 !important;
    flex-shrink: 0 !important;
}

/* === 2026-03-26 precision rollout: remaining registry / masterdata / logs tables === */
.table-precision-shell {
    padding: 8px 0 6px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    scrollbar-gutter: auto !important;
}

.card > .table-precision-shell::after,
.table-precision-shell::after {
    content: none !important;
    display: none !important;
}

.table.table-precision-fixed {
    display: table !important;
    width: 100% !important;
    min-width: 100% !important;
    table-layout: fixed !important;
    border-collapse: separate !important;
    border-spacing: 0 10px !important;
    margin: 0 !important;
    transform: none !important;
}

.table.table-precision-fixed thead {
    display: table-header-group !important;
}

.table.table-precision-fixed tbody {
    display: table-row-group !important;
}

.table.table-precision-fixed tr {
    display: table-row !important;
    position: static !important;
    isolation: auto !important;
    transform: none !important;
}

.table.table-precision-fixed tbody tr::before,
.table.table-precision-fixed tbody tr::after {
    content: none !important;
    display: none !important;
}

.table.table-precision-fixed thead th,
.table.table-precision-fixed tbody td,
.table.table-precision-fixed tbody th {
    display: table-cell !important;
    box-sizing: border-box !important;
    padding: 15px 14px !important;
    text-align: left !important;
    vertical-align: middle !important;
    white-space: normal !important;
    word-break: break-word !important;
    overflow-wrap: anywhere !important;
    transform: none !important;
}

.table.table-precision-fixed thead th:first-child,
.table.table-precision-fixed tbody td:first-child,
.table.table-precision-fixed tbody th:first-child {
    padding-left: 16px !important;
}

.table.table-precision-fixed thead th:last-child,
.table.table-precision-fixed tbody td:last-child,
.table.table-precision-fixed tbody th:last-child {
    padding-right: 16px !important;
}

.table.table-precision-fixed tbody tr {
    background: transparent !important;
    box-shadow: none !important;
}

.table.table-precision-fixed tbody td,
.table.table-precision-fixed tbody th {
    position: static !important;
    z-index: auto !important;
    background: color-mix(in srgb, var(--panel) 88%, transparent) !important;
    border-top: 1px solid color-mix(in srgb, var(--final-row-border) 92%, transparent) !important;
    border-bottom: 1px solid color-mix(in srgb, var(--final-row-border) 92%, transparent) !important;
    border-left: 0 !important;
    border-right: 0 !important;
    box-shadow: none !important;
    background-clip: padding-box !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.table.table-precision-fixed tbody td:first-child,
.table.table-precision-fixed tbody th:first-child {
    border-left: 1px solid color-mix(in srgb, var(--final-row-border) 92%, transparent) !important;
    border-top-left-radius: 18px !important;
    border-bottom-left-radius: 18px !important;
}

.table.table-precision-fixed tbody td:last-child,
.table.table-precision-fixed tbody th:last-child {
    border-right: 1px solid color-mix(in srgb, var(--final-row-border) 92%, transparent) !important;
    border-top-right-radius: 18px !important;
    border-bottom-right-radius: 18px !important;
}

.table.table-precision-fixed tbody tr:hover {
    transform: none !important;
    box-shadow: none !important;
}

.table.table-precision-fixed tbody tr:hover td,
.table.table-precision-fixed tbody tr:hover th {
    background: color-mix(in srgb, var(--panel) 92%, transparent) !important;
    border-top-color: color-mix(in srgb, var(--final-row-hover-border) 92%, transparent) !important;
    border-bottom-color: color-mix(in srgb, var(--final-row-hover-border) 92%, transparent) !important;
}

.table.table-precision-fixed tbody tr:hover td:first-child,
.table.table-precision-fixed tbody tr:hover th:first-child {
    border-left-color: color-mix(in srgb, var(--final-row-hover-border) 92%, transparent) !important;
}

.table.table-precision-fixed tbody tr:hover td:last-child,
.table.table-precision-fixed tbody tr:hover th:last-child {
    border-right-color: color-mix(in srgb, var(--final-row-hover-border) 92%, transparent) !important;
}

.table.table-precision-fixed td.text-right,
.table.table-precision-fixed th.text-right,
.table.table-precision-fixed.compact-actions thead th:last-child,
.table.table-precision-fixed.compact-actions tbody td:last-child {
    text-align: right !important;
}

.table.table-precision-fixed .inline-form {
    display: inline-flex !important;
    width: auto !important;
    max-width: 100% !important;
}

.table.table-precision-fixed .inline-form select {
    width: 100% !important;
    max-width: 190px !important;
    min-width: 0 !important;
}

.table.table-precision-fixed .table-actions-stack {
    align-items: flex-end;
}


/* === 2026-03-26 direct card table shell rollout fix === */
.card > .table-responsive.table-precision-shell,
.card > .table-precision-shell {
    margin-top: 10px !important;
    padding: 10px 10px 6px !important;
    border-radius: 24px !important;
    border: 1px solid color-mix(in srgb, var(--glass-table-border) 90%, transparent) !important;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.045) 0%, rgba(255,255,255,0.015) 100%),
        var(--glass-table-shell) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.08) !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    scrollbar-gutter: stable !important;
}

.card > .table-responsive.table-precision-shell::after,
.card > .table-precision-shell::after {
    content: none !important;
    display: none !important;
}

.table-precision-shell > .table.table-precision-fixed,
.card > .table.table-precision-fixed {
    display: table !important;
    width: 100% !important;
    min-width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    table-layout: fixed !important;
    border-collapse: separate !important;
    border-spacing: 0 10px !important;
    transform: none !important;
    left: auto !important;
    right: auto !important;
}

.table-precision-shell > .table.table-precision-fixed thead,
.card > .table.table-precision-fixed thead {
    display: table-header-group !important;
}

.table-precision-shell > .table.table-precision-fixed tbody,
.card > .table.table-precision-fixed tbody {
    display: table-row-group !important;
}

.table-precision-shell > .table.table-precision-fixed tr,
.card > .table.table-precision-fixed tr {
    display: table-row !important;
    position: static !important;
    inset: auto !important;
    transform: none !important;
    isolation: auto !important;
}

.table-precision-shell > .table.table-precision-fixed tbody tr::before,
.table-precision-shell > .table.table-precision-fixed tbody tr::after,
.card > .table.table-precision-fixed tbody tr::before,
.card > .table.table-precision-fixed tbody tr::after {
    content: none !important;
    display: none !important;
}

.table-precision-shell > .table.table-precision-fixed thead th,
.table-precision-shell > .table.table-precision-fixed tbody td,
.table-precision-shell > .table.table-precision-fixed tbody th,
.card > .table.table-precision-fixed thead th,
.card > .table.table-precision-fixed tbody td,
.card > .table.table-precision-fixed tbody th {
    display: table-cell !important;
    box-sizing: border-box !important;
    position: static !important;
    z-index: auto !important;
    padding: 15px 14px !important;
    text-align: left !important;
    vertical-align: middle !important;
    white-space: normal !important;
    word-break: break-word !important;
    overflow-wrap: anywhere !important;
    transform: none !important;
    margin: 0 !important;
}

.table-precision-shell > .table.table-precision-fixed thead th:first-child,
.table-precision-shell > .table.table-precision-fixed tbody td:first-child,
.table-precision-shell > .table.table-precision-fixed tbody th:first-child,
.card > .table.table-precision-fixed thead th:first-child,
.card > .table.table-precision-fixed tbody td:first-child,
.card > .table.table-precision-fixed tbody th:first-child {
    padding-left: 16px !important;
    left: auto !important;
    margin-left: 0 !important;
}

.table-precision-shell > .table.table-precision-fixed thead th:last-child,
.table-precision-shell > .table.table-precision-fixed tbody td:last-child,
.table-precision-shell > .table.table-precision-fixed tbody th:last-child,
.card > .table.table-precision-fixed thead th:last-child,
.card > .table.table-precision-fixed tbody td:last-child,
.card > .table.table-precision-fixed tbody th:last-child {
    padding-right: 16px !important;
    right: auto !important;
    margin-right: 0 !important;
}

.table-precision-shell > .table.table-precision-fixed tbody tr,
.card > .table.table-precision-fixed tbody tr {
    background: transparent !important;
    box-shadow: none !important;
}

.table-precision-shell > .table.table-precision-fixed tbody td,
.table-precision-shell > .table.table-precision-fixed tbody th,
.card > .table.table-precision-fixed tbody td,
.card > .table.table-precision-fixed tbody th {
    background: color-mix(in srgb, var(--panel) 88%, transparent) !important;
    border-top: 1px solid color-mix(in srgb, var(--final-row-border) 92%, transparent) !important;
    border-bottom: 1px solid color-mix(in srgb, var(--final-row-border) 92%, transparent) !important;
    border-left: 0 !important;
    border-right: 0 !important;
    box-shadow: none !important;
    background-clip: padding-box !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.table-precision-shell > .table.table-precision-fixed tbody td:first-child,
.table-precision-shell > .table.table-precision-fixed tbody th:first-child,
.card > .table.table-precision-fixed tbody td:first-child,
.card > .table.table-precision-fixed tbody th:first-child {
    border-left: 1px solid color-mix(in srgb, var(--final-row-border) 92%, transparent) !important;
    border-top-left-radius: 18px !important;
    border-bottom-left-radius: 18px !important;
}

.table-precision-shell > .table.table-precision-fixed tbody td:last-child,
.table-precision-shell > .table.table-precision-fixed tbody th:last-child,
.card > .table.table-precision-fixed tbody td:last-child,
.card > .table.table-precision-fixed tbody th:last-child {
    border-right: 1px solid color-mix(in srgb, var(--final-row-border) 92%, transparent) !important;
    border-top-right-radius: 18px !important;
    border-bottom-right-radius: 18px !important;
}

.table-precision-shell > .table.table-precision-fixed tbody tr:hover,
.card > .table.table-precision-fixed tbody tr:hover {
    transform: none !important;
    box-shadow: none !important;
}

.table-precision-shell > .table.table-precision-fixed tbody tr:hover td,
.table-precision-shell > .table.table-precision-fixed tbody tr:hover th,
.card > .table.table-precision-fixed tbody tr:hover td,
.card > .table.table-precision-fixed tbody tr:hover th {
    background: color-mix(in srgb, var(--panel) 92%, transparent) !important;
    border-top-color: color-mix(in srgb, var(--final-row-hover-border) 92%, transparent) !important;
    border-bottom-color: color-mix(in srgb, var(--final-row-hover-border) 92%, transparent) !important;
}

.table-precision-shell > .table.table-precision-fixed tbody tr:hover td:first-child,
.table-precision-shell > .table.table-precision-fixed tbody tr:hover th:first-child,
.card > .table.table-precision-fixed tbody tr:hover td:first-child,
.card > .table.table-precision-fixed tbody tr:hover th:first-child {
    border-left-color: color-mix(in srgb, var(--final-row-hover-border) 92%, transparent) !important;
}

.table-precision-shell > .table.table-precision-fixed tbody tr:hover td:last-child,
.table-precision-shell > .table.table-precision-fixed tbody tr:hover th:last-child,
.card > .table.table-precision-fixed tbody tr:hover td:last-child,
.card > .table.table-precision-fixed tbody tr:hover th:last-child {
    border-right-color: color-mix(in srgb, var(--final-row-hover-border) 92%, transparent) !important;
}

.table-precision-shell > .table.table-precision-fixed td.text-right,
.table-precision-shell > .table.table-precision-fixed th.text-right,
.table-precision-shell > .table.table-precision-fixed.compact-actions thead th:last-child,
.table-precision-shell > .table.table-precision-fixed.compact-actions tbody td:last-child,
.card > .table.table-precision-fixed td.text-right,
.card > .table.table-precision-fixed th.text-right,
.card > .table.table-precision-fixed.compact-actions thead th:last-child,
.card > .table.table-precision-fixed.compact-actions tbody td:last-child {
    text-align: right !important;
}

/* === 2026-03-27 global search / cross-module jump-in === */
.utility-global-search {
    display: flex;
    align-items: center;
    flex: 1 1 320px;
    min-width: 260px;
    max-width: 520px;
}

.utility-global-search-box,
.global-search-searchbox {
    position: relative;
    width: 100%;
}

.utility-global-search-shell,
.global-search-input-shell {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 44px;
    padding: 0 16px 0 46px;
    border-radius: 999px;
    border: 1px solid color-mix(in srgb, var(--line-strong) 82%, transparent);
    background: color-mix(in srgb, var(--panel) 90%, transparent);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
}

.utility-global-search-shell:focus-within,
.global-search-input-shell:focus-within {
    border-color: color-mix(in srgb, var(--accent) 40%, var(--line-strong));
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 18%, transparent), inset 0 1px 0 rgba(255,255,255,0.08);
}

.utility-global-search-icon,
.global-search-input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    width: 16px;
    height: 16px;
    transform: translateY(-50%);
    color: color-mix(in srgb, var(--muted) 86%, transparent);
    pointer-events: none;
}

.utility-global-search-icon::before,
.global-search-input-icon::before {
    content: '';
    display: block;
    width: 100%;
    height: 100%;
    background: currentColor;
    opacity: 0.82;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M10.5 4a6.5 6.5 0 1 0 4.06 11.58l4.43 4.43 1.01-1.01-4.43-4.43A6.5 6.5 0 0 0 10.5 4m0 1.5a5 5 0 1 1 0 10a5 5 0 0 1 0-10'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M10.5 4a6.5 6.5 0 1 0 4.06 11.58l4.43 4.43 1.01-1.01-4.43-4.43A6.5 6.5 0 0 0 10.5 4m0 1.5a5 5 0 1 1 0 10a5 5 0 0 1 0-10'/%3E%3C/svg%3E") center / contain no-repeat;
}

.utility-global-search input,
.global-search-input-shell input {
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--text);
    font: inherit;
}

.utility-global-search input::placeholder,
.global-search-input-shell input::placeholder {
    color: var(--muted);
}

.global-search-suggestions {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    z-index: 80;
    display: grid;
    gap: 8px;
    padding: 10px;
    border-radius: 22px;
    border: 1px solid color-mix(in srgb, var(--line-strong) 76%, transparent);
    background: color-mix(in srgb, var(--panel) 78%, transparent);
    backdrop-filter: blur(18px) saturate(130%);
    -webkit-backdrop-filter: blur(18px) saturate(130%);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
}

.global-search-suggestion-item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 16px;
    border: 1px solid color-mix(in srgb, var(--line-strong) 72%, transparent);
    background: color-mix(in srgb, var(--panel-soft) 74%, transparent);
    color: inherit;
    text-decoration: none;
    transition: transform .14s ease, border-color .14s ease, background .14s ease;
}

.global-search-suggestion-item:hover,
.global-search-suggestion-item.is-active {
    transform: translateY(-1px);
    border-color: color-mix(in srgb, var(--accent) 34%, var(--line-strong));
    background: color-mix(in srgb, var(--panel-soft) 68%, var(--accent) 9%);
}

.global-search-suggestion-copy {
    min-width: 0;
    display: grid;
    gap: 4px;
}

.global-search-suggestion-title-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.global-search-suggestion-group {
    font-size: 0.74rem;
    color: var(--muted);
}

.global-search-suggestion-meta {
    font-size: 0.84rem;
    color: var(--muted);
    overflow-wrap: anywhere;
}

.global-search-suggestion-badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px;
    max-width: 42%;
}

.global-search-suggestion-empty {
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid color-mix(in srgb, var(--line-strong) 72%, transparent);
    background: color-mix(in srgb, var(--panel-soft) 74%, transparent);
    color: var(--muted);
    font-size: 0.92rem;
}

.global-search-hero {
    display: grid;
    gap: 18px;
    align-items: center;
}

.global-search-form-hero {
    display: grid;
    gap: 12px;
}

.global-search-scope-card {
    margin: 0 0 16px;
}

.global-search-summary-grid,
.global-search-shortcut-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 14px;
    margin-bottom: 16px;
}

.global-search-group-stack {
    display: grid;
    gap: 16px;
}

.global-search-group-card {
    overflow: hidden;
}

.global-search-result-list {
    display: grid;
    gap: 10px;
}

.global-search-result-row,
.global-search-shortcut {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 16px;
    border-radius: 18px;
    border: 1px solid color-mix(in srgb, var(--line-strong) 78%, transparent);
    background: color-mix(in srgb, var(--panel-soft) 88%, transparent);
    color: inherit;
    text-decoration: none;
    transition: transform .16s ease, border-color .16s ease, background .16s ease;
}

.global-search-result-row:hover,
.global-search-shortcut:hover {
    transform: translateY(-1px);
    border-color: color-mix(in srgb, var(--accent) 34%, var(--line-strong));
    background: color-mix(in srgb, var(--panel-soft) 78%, var(--accent) 8%);
}

.global-search-result-main,
.global-search-shortcut {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.global-search-result-main strong,
.global-search-shortcut strong {
    font-size: 0.98rem;
}

.global-search-result-main span,
.global-search-shortcut span {
    min-width: 0;
    overflow-wrap: anywhere;
}

.global-search-result-side {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px;
    max-width: 42%;
}
@media (max-width: 1180px) {
    .utility-global-search {
        order: 3;
        flex-basis: 100%;
        max-width: none;
    }
}

@media (max-width: 860px) {
    .global-search-result-row,
    .global-search-shortcut,
    .global-search-suggestion-item {
        flex-direction: column;
    }

    .global-search-result-side,
    .global-search-suggestion-badges {
        max-width: none;
        justify-content: flex-start;
    }
}

/* === 2026-03-27 global search floating suggest + command center === */
.utility-bar {
    overflow: visible !important;
}

.utility-global-search {
    min-width: 0 !important;
    overflow: visible !important;
    position: relative;
    z-index: 36;
}

.utility-global-search-box,
.global-search-searchbox {
    min-width: 0;
    overflow: visible;
}

.global-search-suggestions[hidden] {
    display: none !important;
}

.global-search-suggestions,
.global-search-suggestions-floating {
    position: fixed;
    top: 0;
    left: 0;
    right: auto;
    width: min(640px, calc(100vw - 32px));
    max-width: calc(100vw - 32px);
    max-height: min(62vh, 520px);
    overflow: auto;
    overscroll-behavior: contain;
}

.global-search-suggestion-item,
.global-search-result-row,
.global-search-shortcut,
.global-search-command-action,
.global-search-recent-chip {
    min-width: 0;
}

.global-search-suggestion-copy,
.global-search-result-main,
.global-search-command-head {
    min-width: 0;
}

.global-search-suggestion-title-row strong,
.global-search-command-action strong,
.global-search-recent-chip span {
    overflow-wrap: anywhere;
}

.global-search-command-center,
.global-search-recents-card {
    margin-bottom: 16px;
}

.global-search-command-groups {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 14px;
}

.global-search-command-card {
    display: grid;
    gap: 14px;
    padding: 18px;
    border-radius: 22px;
    border: 1px solid color-mix(in srgb, var(--line-strong) 78%, transparent);
    background: color-mix(in srgb, var(--panel-soft) 82%, transparent);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
}

.global-search-command-head {
    display: grid;
    gap: 6px;
}

.global-search-command-actions {
    display: grid;
    gap: 10px;
}

.global-search-command-action,
.global-search-recent-chip {
    display: grid;
    gap: 4px;
    padding: 14px 16px;
    border-radius: 18px;
    border: 1px solid color-mix(in srgb, var(--line-strong) 78%, transparent);
    background: color-mix(in srgb, var(--panel) 82%, transparent);
    color: inherit;
    text-decoration: none;
    transition: transform .16s ease, border-color .16s ease, background .16s ease;
}

.global-search-command-action:hover,
.global-search-recent-chip:hover {
    transform: translateY(-1px);
    border-color: color-mix(in srgb, var(--accent) 34%, var(--line-strong));
    background: color-mix(in srgb, var(--panel-soft) 78%, var(--accent) 8%);
}

.global-search-recent-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.global-search-recent-chip {
    display: inline-flex;
    align-items: center;
}

@media (max-width: 860px) {
    .global-search-command-groups {
        grid-template-columns: 1fr;
    }
}


/* === 2026-03-27 KI-Helfer / Anwendungsspezialist === */
.app-ai-helper {
    position: fixed;
    right: max(18px, calc(env(safe-area-inset-right) + 18px));
    bottom: max(18px, calc(env(safe-area-inset-bottom) + 18px));
    z-index: 146;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
}

:root {
    --bg: #0b0d12;
    --bg-soft: #10131a;
    --panel: rgba(22, 26, 35, 0.88);
    --panel-2: rgba(30, 35, 47, 0.92);
    --line: rgba(255, 255, 255, 0.08);
    --line-strong: rgba(255, 255, 255, 0.12);
    --text: #eef1f5;
    --muted: #9aa3b2;
    --accent: #0a84ff;
    --accent-2: #5ac8fa;
    --success: #30d158;
    --warning: #ff9f0a;
    --danger: #ff453a;
    --positive: #34c759;
    --negative: #ff453a;
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
    --radius: 22px;
    --body-grad-1: rgba(10, 132, 255, 0.12);
    --body-grad-2: rgba(90, 200, 250, 0.08);
    --body-grad-3a: #090b10;
    --body-grad-3b: #0d1118;
    --link: #7cc6ff;
    --sidebar-bg: rgba(16, 19, 26, 0.88);
    --brand-bg: linear-gradient(180deg, rgba(22, 26, 35, 0.96) 0%, rgba(14, 18, 27, 0.96) 100%);
    --nav-group-bg: rgba(16, 19, 26, 0.62);
    --sidebar-footer-bg: rgba(16, 19, 26, 0.56);
    --card-bg: linear-gradient(180deg, rgba(22, 26, 35, 0.92) 0%, rgba(15, 19, 28, 0.92) 100%);
    --input-bg: rgba(10, 12, 18, 0.84);
    --button-bg: linear-gradient(180deg, rgba(43, 50, 65, 0.94) 0%, rgba(29, 34, 45, 0.94) 100%);
    --calendar-day-bg: rgba(18, 22, 31, 0.84);
    --calendar-event-bg: rgba(255,255,255,0.04);
    --view-tab-bg: rgba(255,255,255,0.03);
    --view-tab-active-bg: rgba(255,255,255,0.08);
    --map-popup-link: #0f172a;
    --watermark-opacity: 0.05;
    --table-row-bg: rgba(255, 255, 255, 0.02);
    --table-row-alt-bg: rgba(255, 255, 255, 0.035);
    --table-row-hover: rgba(255, 255, 255, 0.055);
    --table-head-bg: rgba(255, 255, 255, 0.03);
    --table-border: rgba(255, 255, 255, 0.07);
    --detail-box-bg: rgba(255, 255, 255, 0.03);
    --detail-box-border: rgba(255, 255, 255, 0.05);
    --leaflet-surface: rgba(18, 22, 31, 0.94);
    --leaflet-surface-2: rgba(25, 30, 40, 0.96);
    --leaflet-text: #eef1f5;
    --leaflet-border: rgba(255, 255, 255, 0.10);
    --leaflet-shadow: 0 16px 34px rgba(0, 0, 0, 0.28);
}


html[data-theme="light"] {
    --bg: #f2f4f7;
    --bg-soft: #ffffff;
    --panel: rgba(255, 255, 255, 0.86);
    --panel-2: rgba(248, 250, 252, 0.94);
    --line: rgba(15, 23, 42, 0.10);
    --line-strong: rgba(15, 23, 42, 0.16);
    --text: #111827;
    --muted: #64748b;
    --accent: #0a84ff;
    --accent-2: #38bdf8;
    --positive: #16a34a;
    --negative: #dc2626;
    --shadow: 0 24px 70px rgba(15, 23, 42, 0.10);
    --body-grad-1: rgba(10, 132, 255, 0.10);
    --body-grad-2: rgba(90, 200, 250, 0.10);
    --body-grad-3a: #f7f9fc;
    --body-grad-3b: #eef2f7;
    --link: #0a66d1;
    --sidebar-bg: rgba(250, 252, 255, 0.92);
    --brand-bg: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(243, 246, 250, 0.98) 100%);
    --nav-group-bg: rgba(255, 255, 255, 0.76);
    --sidebar-footer-bg: rgba(255, 255, 255, 0.76);
    --card-bg: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(247, 249, 252, 0.98) 100%);
    --input-bg: rgba(255, 255, 255, 0.95);
    --button-bg: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(239, 243, 248, 0.98) 100%);
    --calendar-day-bg: rgba(255, 255, 255, 0.9);
    --calendar-event-bg: rgba(15,23,42,0.03);
    --view-tab-bg: rgba(15,23,42,0.04);
    --view-tab-active-bg: rgba(15,23,42,0.08);
    --map-popup-link: #0a66d1;
    --watermark-opacity: 0.03;
    --table-row-bg: rgba(255, 255, 255, 0.82);
    --table-row-alt-bg: rgba(246, 248, 252, 0.96);
    --table-row-hover: rgba(229, 236, 246, 0.95);
    --table-head-bg: rgba(242, 246, 251, 0.96);
    --table-border: rgba(15, 23, 42, 0.08);
    --detail-box-bg: rgba(250, 252, 255, 0.88);
    --detail-box-border: rgba(15, 23, 42, 0.08);
    --leaflet-surface: rgba(255, 255, 255, 0.98);
    --leaflet-surface-2: rgba(246, 248, 252, 0.98);
    --leaflet-text: #0f172a;
    --leaflet-border: rgba(15, 23, 42, 0.10);
    --leaflet-shadow: 0 18px 34px rgba(15, 23, 42, 0.14);
}


* { box-sizing: border-box; }
html, body {
    margin: 0;
    padding: 0;
    min-height: 100%;
    background:
        radial-gradient(circle at top left, var(--body-grad-1), transparent 24%),
        radial-gradient(circle at top right, var(--body-grad-2), transparent 20%),
        linear-gradient(180deg, var(--body-grad-3a) 0%, var(--body-grad-3b) 100%);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", sans-serif;
}

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }

.layout {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    min-height: 100vh;
}

.sidebar {
    position: sticky;
    top: 0;
    align-self: start;
    height: 100vh;
    padding: 28px 20px;
    background: var(--sidebar-bg);
    backdrop-filter: blur(24px);
    border-right: 1px solid var(--line);
    overflow-y: auto;
}

.brand {
    padding: 18px 18px 22px 18px;
    margin-bottom: 20px;
    border-radius: 22px;
    background: var(--brand-bg);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}
.brand-logo {
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
}
.brand-logo-image {
    display: block;
    width: min(100%, 156px);
    height: auto;
}
.brand-logo-light {
    display: none;
}
.brand-subtitle {
    margin-top: 10px;
    color: var(--muted);
    font-size: 0.94rem;
}
html[data-theme="light"] .brand-logo-dark {
    display: none;
}
html[data-theme="light"] .brand-logo-light {
    display: block;
}

.nav-group {
    margin-bottom: 18px;
    padding: 12px;
    border-radius: 18px;
    background: var(--nav-group-bg);
    border: 1px solid rgba(255, 255, 255, 0.05);
}
.nav-group.compact .nav-link { padding-top: 10px; padding-bottom: 10px; }
.nav-caption {
    margin: 0 0 10px 4px;
    color: var(--muted);
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}
.nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 14px;
    color: var(--text);
    transition: background 0.18s ease, transform 0.18s ease;
}
.nav-link:hover {
    background: rgba(255, 255, 255, 0.05);
    text-decoration: none;
}
.nav-link.active {
    background: linear-gradient(180deg, rgba(10, 132, 255, 0.24) 0%, rgba(10, 132, 255, 0.12) 100%);
    border: 1px solid rgba(124, 198, 255, 0.18);
}

.sidebar-footer {
    margin-top: 20px;
    color: var(--muted);
    font-size: 0.86rem;
    line-height: 1.65;
    padding: 14px 16px;
    border-radius: 18px;
    background: var(--sidebar-footer-bg);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.content {
    padding: 30px;
}

.page-header {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: flex-start;
    margin-bottom: 22px;
}
.page-header h1 {
    margin: 0 0 10px 0;
    font-size: 2rem;
    line-height: 1.1;
    letter-spacing: -0.02em;
}
.page-header p {
    margin: 0;
    max-width: 850px;
}
.header-actions,
.form-actions,
.filter-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.flash-stack {
    display: grid;
    gap: 10px;
    margin-bottom: 18px;
}
.flash {
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: rgba(20, 24, 32, 0.9);
}
.flash.success {
    border-color: rgba(48, 209, 88, 0.22);
    background: rgba(48, 209, 88, 0.12);
}
.flash.error {
    border-color: rgba(255, 69, 58, 0.2);
    background: rgba(255, 69, 58, 0.1);
}

.card {
    padding: 22px;
    border-radius: var(--radius);
    background: var(--card-bg);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}
.card + .card,
.card + section,
section + .card { margin-top: 20px; }
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}
.card-header h2,
.card-header h3 {
    margin: 0;
    font-size: 1.06rem;
}
.top-gap { margin-top: 18px; }

.stats-grid {
    display: grid;
    gap: 16px;
    margin-bottom: 18px;
}
.stats-grid-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.stats-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stat-card {
    min-height: 126px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.stat-label {
    color: var(--muted);
    margin-bottom: 10px;
    font-size: 0.93rem;
}
.stat-value {
    font-size: 1.9rem;
    font-weight: 700;
    letter-spacing: -0.03em;
}

.two-column,
.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}
.three-column {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}
.table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: var(--table-head-bg);
    backdrop-filter: blur(12px);
}
.table th,
.table td {
    padding: 13px 12px;
    border-bottom: 1px solid var(--table-border);
    vertical-align: top;
}
.table th {
    text-align: left;
    color: var(--muted);
    font-size: 0.77rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 700;
}
.table tbody tr {
    background: var(--table-row-bg);
    transition: background 0.18s ease, transform 0.18s ease;
}
.table tbody tr:nth-child(even) {
    background: var(--table-row-alt-bg);
}
.table tbody tr:hover {
    background: var(--table-row-hover);
}
.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr td:first-child,
.table thead tr th:first-child {
    border-left: 1px solid var(--table-border);
}
.table tbody tr td:last-child,
.table thead tr th:last-child {
    border-right: 1px solid var(--table-border);
}
.table thead tr th:first-child { border-top-left-radius: 14px; }
.table thead tr th:last-child { border-top-right-radius: 14px; }
.table tbody tr:last-child td:first-child { border-bottom-left-radius: 14px; }
.table tbody tr:last-child td:last-child { border-bottom-right-radius: 14px; }

.field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.field label {
    color: var(--muted);
    font-size: 0.88rem;
}
input, select, textarea {
    width: 100%;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.10);
    background: var(--input-bg);
    color: var(--text);
    font: inherit;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
}
textarea { resize: vertical; min-height: 120px; }
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: rgba(124, 198, 255, 0.34);
    box-shadow: 0 0 0 4px rgba(10, 132, 255, 0.12);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}
.form-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.full-width { grid-column: 1 / -1; }
.filters-grid {
    display: grid;
    gap: 12px;
    align-items: end;
}
.filters-grid-4 { grid-template-columns: 2fr 1fr 1fr 1fr auto; }
.filters-grid-3 { grid-template-columns: 2fr 1fr 1fr auto; }
.filter-card { margin-bottom: 20px; }

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 15px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.10);
    background: var(--button-bg);
    color: var(--text);
    font-weight: 600;
    cursor: pointer;
}
.button:hover {
    filter: brightness(1.05);
    text-decoration: none;
}
.button.primary {
    background: linear-gradient(180deg, rgba(10, 132, 255, 1) 0%, rgba(0, 100, 220, 1) 100%);
    border-color: rgba(124, 198, 255, 0.18);
}
.button.danger {
    background: linear-gradient(180deg, rgba(255, 69, 58, 0.95) 0%, rgba(210, 40, 30, 0.95) 100%);
    border-color: rgba(255, 69, 58, 0.18);
}
.button.small { padding: 8px 12px; font-size: 0.9rem; }

.export-menu {
    position: relative;
}

.export-menu summary {
    list-style: none;
}

.export-menu summary::-webkit-details-marker {
    display: none;
}

.export-menu-toggle {
    min-width: 172px;
    justify-content: space-between;
}

.export-menu-toggle-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    line-height: 1;
    transition: transform 0.2s ease;
}

.export-menu[open] .export-menu-toggle-icon {
    transform: rotate(180deg);
}

.export-menu-panel {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    z-index: 40;
    width: min(360px, calc(100vw - 48px));
    padding: 10px;
    border-radius: 20px;
    border: 1px solid var(--line-strong);
    background: color-mix(in srgb, var(--panel-2) 92%, transparent);
    backdrop-filter: blur(24px);
    box-shadow: 0 24px 46px rgba(0, 0, 0, 0.28);
}

.export-menu-section-title {
    padding: 4px 8px 10px 8px;
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.export-menu-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 14px;
    border-radius: 14px;
    color: var(--text);
    transition: background 0.18s ease, transform 0.18s ease;
}

.export-menu-item:hover {
    background: rgba(255, 255, 255, 0.06);
    text-decoration: none;
}

html[data-theme="light"] .export-menu-item:hover {
    background: rgba(15, 23, 42, 0.05);
}

.export-menu-item-type {
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.monthly-analytics-header-actions {
    align-items: stretch;
}

.badge,
.stage-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 0.8rem;
    border: 1px solid rgba(124, 198, 255, 0.18);
    background: rgba(10, 132, 255, 0.15);
}
.badge-neutral {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.08);
}

.detail-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 18px;
}
.detail-list div {
    padding: 12px 14px;
    border-radius: 16px;
    background: var(--detail-box-bg);
    border: 1px solid var(--detail-box-border);
}
.detail-list span {
    display: block;
    margin-bottom: 6px;
    color: var(--muted);
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.detail-list strong { font-size: 0.98rem; }

.notes-box,
.hint-box {
    margin-top: 18px;
    padding: 16px 18px;
    border-radius: 18px;
    background: var(--detail-box-bg);
    border: 1px solid var(--detail-box-border);
}
.notes-box h3,
.hint-box h3 { margin: 0 0 10px 0; }
.notes-box p,
.hint-box { line-height: 1.6; }
.hint-box.wide { margin-top: 0; }

.simple-list {
    display: grid;
    gap: 12px;
    padding: 0;
    margin: 0;
    list-style: none;
}
.simple-list li {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 13px 14px;
    border-radius: 16px;
    background: var(--detail-box-bg);
    border: 1px solid var(--detail-box-border);
}
.simple-list span { color: var(--muted); font-size: 0.9rem; }

.timeline {
    display: grid;
    gap: 16px;
}
.timeline-item {
    display: grid;
    grid-template-columns: 160px minmax(0, 1fr);
    gap: 16px;
    padding: 16px;
    border-radius: 18px;
    background: var(--detail-box-bg);
    border: 1px solid var(--detail-box-border);
}
.timeline-meta {
    display: grid;
    gap: 8px;
    align-content: start;
}
.timeline-date {
    font-weight: 700;
}
.timeline-type {
    color: var(--muted);
    font-size: 0.9rem;
}
.timeline-content h3 {
    margin: 0 0 8px 0;
    font-size: 1.02rem;
}
.timeline-content p { margin: 0 0 8px 0; line-height: 1.55; }

.bar-list {
    display: grid;
    gap: 12px;
}
.bar-row {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr) 44px;
    align-items: center;
    gap: 12px;
}
.bar-label,
.bar-count { font-size: 0.92rem; }
.bar-track {
    height: 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.07);
    overflow: hidden;
}
.bar-fill {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(10, 132, 255, 0.95) 0%, rgba(90, 200, 250, 0.95) 100%);
}
.bar-fill.secondary {
    background: linear-gradient(90deg, rgba(48, 209, 88, 0.95) 0%, rgba(90, 200, 250, 0.95) 100%);
}

.inline-form {
    display: inline-flex;
    gap: 8px;
    align-items: center;
}
.inline-form.spread { width: 100%; justify-content: space-between; }
.inline-form select { min-width: 180px; }

.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
.text-right { text-align: right; }
.empty-state {
    color: var(--muted);
    padding: 6px 0;
    line-height: 1.6;
}
.narrow-card {
    max-width: 620px;
}
.positive { color: var(--positive); }
.negative { color: var(--negative); }

@media (max-width: 1420px) {
    .stats-grid-5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .stats-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .three-column { grid-template-columns: 1fr; }
}

@media (max-width: 1180px) {
    .layout { grid-template-columns: 1fr; }
    .sidebar {
        position: static;
        height: auto;
        border-right: none;
        border-bottom: 1px solid var(--line);
    }
    .content { padding: 22px; }
    .two-column,
    .detail-grid { grid-template-columns: 1fr; }
    .filters-grid-4,
    .filters-grid-3,
    .form-grid,
    .form-grid.two,
    .detail-list { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
    .content { padding: 16px; }
    .page-header { flex-direction: column; }
    .stats-grid-5,
    .stats-grid-4 { grid-template-columns: 1fr; }
    .timeline-item { grid-template-columns: 1fr; }
    .bar-row { grid-template-columns: 110px minmax(0, 1fr) 36px; }
    .table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}


body::before {
    content: "";
    position: fixed;
    inset: 0;
    background-image: url("logo.png");
    background-repeat: no-repeat;
    background-position: center center;
    background-size: min(58vw, 780px);
    opacity: 0.045;
    pointer-events: none;
    z-index: 0;
}
.layout, .sidebar, .content { position: relative; z-index: 1; }


.watermark {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background-repeat: no-repeat;
    background-position: center center;
    background-size: min(56vw, 760px);
    opacity: var(--watermark-opacity);
    filter: grayscale(1);
}
.layout, .sidebar, .content { position: relative; z-index: 1; }
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 14px;
}
.calendar-day {
    min-height: 220px;
    padding: 16px;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.08);
    background: var(--calendar-day-bg);
}
.calendar-day.muted-day { opacity: 0.52; }
.calendar-day.today { border-color: rgba(10,132,255,0.45); box-shadow: inset 0 0 0 1px rgba(10,132,255,0.25); }
.calendar-day-head { display:flex; justify-content:space-between; align-items:baseline; margin-bottom:14px; }
.calendar-day-title { font-size:0.82rem; color:var(--muted); text-transform:uppercase; letter-spacing:0.08em; }
.calendar-day-date { font-size:1.1rem; font-weight:700; }
.calendar-events { display:grid; gap:10px; }
.calendar-event { padding:10px 12px; border-radius:14px; background: var(--calendar-event-bg); border:1px solid rgba(255,255,255,0.06); }
.calendar-event-title { font-weight:700; display:block; margin-bottom:4px; }
.calendar-event-meta, .calendar-event-actions { font-size:0.83rem; color:var(--muted); }
.calendar-event-actions { margin-top:8px; display:flex; gap:10px; flex-wrap:wrap; }
.toolbar { display:flex; justify-content:space-between; gap:14px; align-items:center; margin-bottom:18px; }
.toolbar-group { display:flex; gap:10px; flex-wrap:wrap; align-items:center; }
.button.small { padding:8px 12px; border-radius:12px; font-size:0.86rem; }
@media (max-width: 1200px) { .calendar-grid { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 780px) { .layout { grid-template-columns: 1fr; } .sidebar { position:relative; height:auto; } .calendar-grid { grid-template-columns: 1fr; } }

.positive { color: var(--positive); }
.negative { color: var(--negative); }
.warning { color: var(--warning); }
.small { font-size: 0.82rem; }
.badge { display: inline-flex; align-items: center; padding: 6px 10px; border-radius: 999px; font-size: 0.82rem; border: 1px solid var(--line-strong); background: var(--calendar-event-bg); }
.badge.positive { background: rgba(48,209,88,0.14); border-color: rgba(48,209,88,0.25); }
.badge.negative { background: rgba(255,69,58,0.14); border-color: rgba(255,69,58,0.25); }
.badge.warning { background: rgba(255,159,10,0.14); border-color: rgba(255,159,10,0.25); }
.badge.muted { color: var(--muted); }
.table-wrap { overflow-x: auto; }
.nested-card { margin-top: 16px; }
.compact-stats { margin-top: 12px; margin-bottom: 18px; }
.checkbox-field { justify-content: end; }
.checkbox-field label { color: var(--text); display: flex; gap: 10px; align-items: center; min-height: 48px; }
.checkbox-field input { width: auto; }


.dashboard-controls-card {
    margin-bottom: 18px;
}
.dashboard-controls-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.toggle-chip {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.08);
    background: var(--calendar-event-bg);
    color: var(--text);
    cursor: pointer;
    user-select: none;
}
.toggle-chip input {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: var(--accent);
}
.dashboard-widget[hidden] {
    display: none !important;
}
.dashboard-widget + .dashboard-widget {
    margin-top: 0;
}


.hint { color: var(--muted); font-size: 0.88rem; margin-top: 6px; }

.top-gap-sm{margin-top:12px}.compact-detail-list{grid-template-columns:repeat(auto-fit,minmax(160px,1fr))}.stack-list{display:grid;gap:12px}

.warning-card { border-color: rgba(245, 158, 11, 0.45); }
.checkbox-row { display:flex; flex-wrap:wrap; gap:12px; }
.check-inline { display:inline-flex; align-items:center; gap:6px; color: var(--text); font-size:0.92rem; }
.check-inline input { width:auto; }

.single-column { grid-template-columns: 1fr; }
.public-page { min-height: 100vh; }
.public-shell { max-width: 920px; margin: 0 auto; padding: 28px 16px 40px; position: relative; z-index: 1; }
.public-card { max-width: 860px; margin: 0 auto; }
.compact-header { margin-bottom: 14px; }
.response-button-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.compact-url-input { min-width: 340px; font-size: 0.9rem; }
.mobile-detail-list strong { line-height: 1.5; }
.response-summary-grid { margin-bottom: 0; }
.compact-stat { min-height: 96px; padding: 16px; }
.compact-stat .stat-value { font-size: 1.5rem; }
.table-responsive { overflow-x: auto; }
@media (max-width: 760px) { .response-button-grid { grid-template-columns: 1fr; } .compact-url-input { min-width: 220px; } }

.wrap-gap { flex-wrap: wrap; gap: 12px; }
.top-gap-xs { margin-top: 6px; }
.top-gap-sm { margin-top: 12px; }
.inline-badge-row { display: inline-flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.response-event-list li { gap: 6px; }
.response-event-list .badge { text-decoration: none; }
.mobile-response-form input[type="file"] { padding: 10px 0; }


.view-tabs { display:flex; gap:0.75rem; margin:0 0 1rem; }
.view-tab { display:inline-flex; align-items:center; padding:0.6rem 0.95rem; border-radius:999px; border:1px solid rgba(255,255,255,0.12); background:var(--view-tab-bg); color:var(--text); text-decoration:none; }
.view-tab.active { background:var(--view-tab-active-bg); border-color:rgba(255,255,255,0.18); }
.inline-form { display:inline; }
.subcontractor-map { width:100%; min-height:560px; border-radius:18px; overflow:hidden; border:1px solid rgba(255,255,255,0.12); margin-top:0.75rem; }
.legend { display:flex; flex-wrap:wrap; gap:1rem; margin-top:1rem; }
.legend-item { display:inline-flex; align-items:center; gap:0.45rem; color:var(--muted); font-size:0.95rem; }
.legend-dot, .sub-pin { width:14px; height:14px; border-radius:999px; display:inline-block; box-shadow:0 0 0 3px rgba(255,255,255,0.12); }
.sub-pin { width:18px; height:18px; border:2px solid rgba(255,255,255,0.85); }
.pin-ready { background:#22c55e; }
.pin-caution { background:#eab308; }
.pin-warning { background:#f97316; }
.pin-blocked { background:#ef4444; }
.pin-archived { background:#6b7280; }
.map-popup { line-height:1.45; min-width:240px; }
.map-popup .popup-actions { margin-top:0.55rem; }
.map-popup a { color:var(--map-popup-link); }
.badge.pin-ready, .badge.pin-caution, .badge.pin-warning, .badge.pin-blocked, .badge.pin-archived { color:#111827; font-weight:600; }
@media (max-width: 840px) { .subcontractor-map { min-height:420px; } .view-tabs { flex-wrap:wrap; } }

.utility-bar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-bottom: 16px;
}

.theme-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px;
    border-radius: 999px;
    border: 1px solid var(--line-strong);
    background: var(--panel);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
    position: sticky;
    top: 18px;
    z-index: 5;
}

.theme-toggle-button {
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.theme-toggle-button:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.06);
}

html[data-theme="light"] .theme-toggle-button:hover {
    background: rgba(15, 23, 42, 0.06);
}

.theme-toggle-button.active {
    color: var(--text);
    background: linear-gradient(180deg, rgba(10, 132, 255, 0.22) 0%, rgba(10, 132, 255, 0.12) 100%);
    box-shadow: inset 0 0 0 1px rgba(10, 132, 255, 0.16);
}

.theme-symbol {
    font-size: 1.1rem;
    line-height: 1;
}

@media (max-width: 760px) {
    .utility-bar {
        margin-bottom: 12px;
    }

    .theme-toggle {
        top: 10px;
    }
}


html[data-theme="light"] .sidebar {
    box-shadow: inset -1px 0 0 rgba(15, 23, 42, 0.04);
}

html[data-theme="light"] .nav-group {
    border-color: rgba(15, 23, 42, 0.06);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.7);
}

html[data-theme="light"] .nav-link:hover {
    background: rgba(15, 23, 42, 0.05);
}

html[data-theme="light"] .nav-link.active {
    background: linear-gradient(180deg, rgba(10, 132, 255, 0.18) 0%, rgba(10, 132, 255, 0.10) 100%);
    border-color: rgba(10, 132, 255, 0.12);
}

html[data-theme="light"] .card,
html[data-theme="light"] .brand,
html[data-theme="light"] .theme-toggle {
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.08);
}

html[data-theme="light"] .button {
    border-color: rgba(15, 23, 42, 0.08);
    box-shadow: 0 1px 0 rgba(255,255,255,0.8), 0 8px 18px rgba(15, 23, 42, 0.06);
}

html[data-theme="light"] .button:hover {
    filter: none;
    transform: translateY(-1px);
}

html[data-theme="light"] .flash {
    background: rgba(255,255,255,0.88);
}

html[data-theme="light"] input,
html[data-theme="light"] select,
html[data-theme="light"] textarea {
    border-color: rgba(15, 23, 42, 0.10);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.9);
}

html[data-theme="light"] .theme-toggle-button.active {
    background: linear-gradient(180deg, rgba(10, 132, 255, 0.18) 0%, rgba(10, 132, 255, 0.10) 100%);
    box-shadow: inset 0 0 0 1px rgba(10, 132, 255, 0.12);
}

.subcontractor-map,
.leaflet-container {
    background: var(--leaflet-surface-2);
}

.leaflet-container {
    font-family: inherit;
}

.leaflet-control-zoom,
.leaflet-bar,
.leaflet-control-layers {
    border: 1px solid var(--leaflet-border) !important;
    box-shadow: var(--leaflet-shadow) !important;
    border-radius: 14px !important;
    overflow: hidden;
}

.leaflet-bar a,
.leaflet-bar a:hover,
.leaflet-control-layers-toggle {
    background: var(--leaflet-surface) !important;
    color: var(--leaflet-text) !important;
    border-bottom-color: var(--leaflet-border) !important;
}

.leaflet-bar a:hover {
    filter: brightness(1.03);
}

.leaflet-popup-content-wrapper,
.leaflet-popup-tip {
    background: var(--leaflet-surface) !important;
    color: var(--leaflet-text) !important;
    box-shadow: var(--leaflet-shadow) !important;
}

.leaflet-popup-content-wrapper {
    border: 1px solid var(--leaflet-border);
    border-radius: 18px;
}

.leaflet-popup-content {
    margin: 14px 16px;
}

.map-popup {
    color: var(--leaflet-text);
}

.map-popup .popup-actions a,
.map-popup a {
    color: var(--link);
}

html[data-theme="light"] .subcontractor-map {
    border-color: rgba(15, 23, 42, 0.10);
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.08);
}

html[data-theme="light"] .legend-item {
    color: #475569;
}

html[data-theme="light"] .view-tab {
    border-color: rgba(15, 23, 42, 0.10);
    box-shadow: 0 1px 0 rgba(255,255,255,0.8);
}


/* --- Apple-style UI refinement --- */
:root {
    --surface-highlight: rgba(255, 255, 255, 0.07);
    --surface-highlight-2: rgba(255, 255, 255, 0.03);
    --elevated-shadow: 0 18px 45px rgba(0, 0, 0, 0.22);
    --elevated-shadow-soft: 0 10px 26px rgba(0, 0, 0, 0.12);
    --form-shadow: inset 0 1px 0 rgba(255,255,255,0.04), 0 1px 0 rgba(255,255,255,0.02);
    --form-focus-ring: 0 0 0 4px rgba(10, 132, 255, 0.14);
    --button-shadow: 0 10px 24px rgba(0, 0, 0, 0.16);
    --button-shadow-hover: 0 14px 28px rgba(0, 0, 0, 0.20);
    --table-head-text: rgba(255,255,255,0.68);
}

html[data-theme="light"] {
    --surface-highlight: rgba(255, 255, 255, 0.82);
    --surface-highlight-2: rgba(255, 255, 255, 0.58);
    --elevated-shadow: 0 20px 45px rgba(15, 23, 42, 0.10);
    --elevated-shadow-soft: 0 12px 24px rgba(15, 23, 42, 0.08);
    --form-shadow: inset 0 1px 0 rgba(255,255,255,0.92), 0 1px 2px rgba(15,23,42,0.04);
    --form-focus-ring: 0 0 0 4px rgba(10, 132, 255, 0.12);
    --button-shadow: 0 10px 18px rgba(15, 23, 42, 0.08);
    --button-shadow-hover: 0 14px 24px rgba(15, 23, 42, 0.10);
    --table-head-text: rgba(15,23,42,0.55);
}

html {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

body {
    letter-spacing: -0.01em;
}

::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(127, 138, 156, 0.34);
    border: 3px solid transparent;
    border-radius: 999px;
    background-clip: padding-box;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(127, 138, 156, 0.48);
    border: 3px solid transparent;
    background-clip: padding-box;
}

.sidebar {
    background:
        linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.00)),
        var(--sidebar-bg);
}

.brand,
.nav-group,
.card,
.sidebar-footer,
.theme-toggle {
    position: relative;
    overflow: hidden;
}

.brand::before,
.nav-group::before,
.card::before,
.sidebar-footer::before,
.theme-toggle::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(180deg, var(--surface-highlight) 0%, transparent 36%);
    opacity: 0.9;
}

.brand {
    border-radius: 26px;
    box-shadow: var(--elevated-shadow);
}

.brand-logo-image {
    filter: drop-shadow(0 10px 22px rgba(0, 0, 0, 0.14));
}

.brand-subtitle {
    letter-spacing: -0.01em;
}

.nav-group {
    border-radius: 20px;
    backdrop-filter: blur(30px);
}

.nav-link {
    min-height: 46px;
    font-weight: 600;
    letter-spacing: -0.01em;
    border: 1px solid transparent;
    position: relative;
}

.nav-link:hover {
    transform: translateX(2px);
}

.nav-link.active {
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 10px 22px rgba(10,132,255,0.16);
}

.content {
    padding: 28px 30px 38px;
}

.utility-bar {
    margin-bottom: 20px;
}

.theme-toggle {
    padding: 5px;
    border-radius: 999px;
    background:
        linear-gradient(180deg, var(--surface-highlight) 0%, transparent 48%),
        var(--panel);
    box-shadow: var(--elevated-shadow-soft);
}

.theme-toggle-button {
    width: 44px;
    height: 44px;
    position: relative;
    z-index: 1;
}

.theme-toggle-button.active {
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.10),
        0 8px 16px rgba(10,132,255,0.14);
}

.page-header h1 {
    font-size: clamp(2rem, 4vw, 2.45rem);
    letter-spacing: -0.04em;
}

.page-header p {
    color: var(--muted);
    line-height: 1.55;
}

.card {
    border-radius: 26px;
    box-shadow: var(--elevated-shadow);
}

.card-header h2,
.card-header h3 {
    letter-spacing: -0.02em;
}

.stat-card {
    position: relative;
    overflow: hidden;
}

.stat-card::after {
    content: "";
    position: absolute;
    inset: auto -12% -36% auto;
    width: 120px;
    height: 120px;
    background: radial-gradient(circle, rgba(10,132,255,0.16) 0%, transparent 68%);
    pointer-events: none;
}

.stat-label {
    font-size: 0.88rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.stat-value {
    font-size: clamp(1.9rem, 3vw, 2.35rem);
    line-height: 1;
}

.table {
    border-collapse: separate;
    border-spacing: 0 8px;
}

.table thead th {
    top: -2px;
    color: var(--table-head-text);
    font-size: 0.74rem;
    padding-top: 11px;
    padding-bottom: 11px;
}

.table th,
.table td {
    padding: 14px 14px;
}

.table tbody tr {
    box-shadow: 0 4px 18px rgba(0,0,0,0.05);
}

.table tbody tr td:first-child,
.table thead tr th:first-child {
    border-left-width: 1px;
    border-top-left-radius: 16px;
    border-bottom-left-radius: 16px;
}

.table tbody tr td:last-child,
.table thead tr th:last-child {
    border-right-width: 1px;
    border-top-right-radius: 16px;
    border-bottom-right-radius: 16px;
}

.table tbody tr:last-child td:first-child,
.table tbody tr:last-child td:last-child {
    border-bottom-left-radius: 16px;
    border-bottom-right-radius: 16px;
}

.table tbody tr:hover {
    transform: translateY(-1px);
}

.field {
    gap: 9px;
}

.field label {
    font-size: 0.83rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

input,
select,
textarea {
    min-height: 48px;
    padding: 13px 15px;
    border-radius: 16px;
    border-color: rgba(255, 255, 255, 0.09);
    box-shadow: var(--form-shadow);
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease, background 0.18s ease;
}

textarea {
    min-height: 132px;
}

input::placeholder,
textarea::placeholder {
    color: color-mix(in srgb, var(--muted) 78%, transparent);
}

input:hover,
select:hover,
textarea:hover {
    border-color: var(--line-strong);
}

input:focus,
select:focus,
textarea:focus {
    box-shadow: var(--form-focus-ring);
    transform: translateY(-1px);
}

input[type="checkbox"],
input[type="radio"] {
    min-height: auto;
    width: 18px;
    height: 18px;
    padding: 0;
    border-radius: 6px;
}

.button {
    min-height: 42px;
    padding: 11px 16px;
    border-radius: 999px;
    font-weight: 700;
    letter-spacing: -0.01em;
    box-shadow: var(--button-shadow);
    transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.button:hover {
    transform: translateY(-1px);
    box-shadow: var(--button-shadow-hover);
}

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

.button.primary {
    box-shadow: 0 12px 24px rgba(10,132,255,0.28);
}

.button.small {
    min-height: 36px;
    padding: 8px 13px;
    font-size: 0.88rem;
}

.badge,
.stage-chip,
.view-tab {
    border-radius: 999px;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.badge,
.stage-chip {
    padding: 7px 11px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
}

.badge-neutral {
    background: var(--surface-highlight-2);
}

.detail-list div,
.simple-list li,
.timeline-item,
.notes-box,
.hint-box {
    border-radius: 20px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
}

.detail-list strong {
    letter-spacing: -0.01em;
}

.view-tabs {
    gap: 10px;
}

.view-tab {
    min-height: 40px;
    padding: 0.62rem 1rem;
    border-color: var(--line-strong);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}

.view-tab.active {
    box-shadow: 0 10px 20px rgba(10,132,255,0.14), inset 0 1px 0 rgba(255,255,255,0.08);
}

.subcontractor-map {
    border-radius: 24px;
    box-shadow: var(--elevated-shadow-soft);
}

.legend-item,
.simple-list span,
.notes-box,
.hint-box,
.timeline-type {
    letter-spacing: -0.01em;
}

.flash {
    border-radius: 18px;
    box-shadow: var(--elevated-shadow-soft);
}

html[data-theme="light"] .nav-link.active {
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.85), 0 10px 18px rgba(10,132,255,0.10);
}

html[data-theme="light"] .theme-toggle {
    background:
        linear-gradient(180deg, rgba(255,255,255,0.98) 0%, rgba(248,250,253,0.98) 100%);
}

html[data-theme="light"] .theme-toggle-button.active {
    background: linear-gradient(180deg, rgba(255,255,255,0.98) 0%, rgba(244,247,251,0.98) 100%);
    color: #0f172a;
    box-shadow: 0 8px 18px rgba(15,23,42,0.10), inset 0 0 0 1px rgba(15,23,42,0.06);
}

html[data-theme="light"] input,
html[data-theme="light"] select,
html[data-theme="light"] textarea {
    background: rgba(255,255,255,0.98);
}

html[data-theme="light"] .table tbody tr {
    box-shadow: 0 6px 18px rgba(15,23,42,0.05);
}

html[data-theme="light"] .badge-neutral {
    background: rgba(248,250,252,0.94);
}

@media (max-width: 1180px) {
    .layout {
        grid-template-columns: 274px minmax(0, 1fr);
    }
}

@media (max-width: 860px) {
    .content {
        padding: 22px 18px 28px;
    }

    .card,
    .brand {
        border-radius: 22px;
    }

    .table {
        border-spacing: 0 6px;
    }
}

.inline-form-group{display:flex;gap:1rem;align-items:flex-end;flex-wrap:wrap}.inline-form-group .grow{flex:1 1 18rem}.inline-form-group .compact-actions{flex:0 0 auto;min-width:12rem}.stack-form{display:flex;flex-direction:column;gap:1rem}.checkbox-row{display:flex;gap:.75rem;flex-wrap:wrap}.checkbox-pill{display:inline-flex;align-items:center;gap:.45rem;padding:.55rem .85rem;border:1px solid var(--line);border-radius:999px;background:var(--panel-soft)}.checkbox-pill input{margin:0}.recurrence-weekdays{display:block}

/* --- refined glassmorphism + stronger light contrast --- */
:root {
    --glass-sheen: linear-gradient(135deg, rgba(255,255,255,0.20) 0%, rgba(255,255,255,0.05) 36%, rgba(255,255,255,0.02) 100%);
    --glass-stroke: rgba(255,255,255,0.14);
    --glass-shadow: 0 22px 54px rgba(0, 0, 0, 0.28);
}
html[data-theme="light"] {
    --panel: rgba(255,255,255,0.74);
    --panel-2: rgba(255,255,255,0.84);
    --sidebar-bg: rgba(250,252,255,0.72);
    --nav-group-bg: rgba(255,255,255,0.62);
    --card-bg: linear-gradient(180deg, rgba(255,255,255,0.82) 0%, rgba(246,249,255,0.76) 100%);
    --button-bg: linear-gradient(180deg, rgba(255,255,255,0.80) 0%, rgba(240,245,252,0.72) 100%);
    --input-bg: rgba(255,255,255,0.80);
    --calendar-day-bg: rgba(255,255,255,0.78);
    --calendar-event-bg: rgba(255,255,255,0.62);
    --detail-box-bg: rgba(255,255,255,0.66);
    --line: rgba(15, 23, 42, 0.14);
    --line-strong: rgba(15, 23, 42, 0.20);
    --muted: #54657c;
    --shadow: 0 22px 48px rgba(15,23,42,0.13);
    --glass-stroke: rgba(255,255,255,0.72);
    --glass-shadow: 0 18px 40px rgba(15,23,42,0.12);
}

.sidebar,
.brand,
.nav-group,
.card,
.theme-toggle,
.button,
.badge,
.badge-neutral,
.checkbox-pill,
.calendar-day,
.calendar-event,
.timeline-item,
.simple-list li,
.stat-card,
.day-timeline-item,
input,
select,
textarea {
    position: relative;
    box-shadow: var(--glass-shadow), inset 0 1px 0 rgba(255,255,255,0.06);
}

.sidebar::before,
.brand::before,
.nav-group::before,
.card::before,
.theme-toggle::before,
.button::before,
.badge::before,
.badge-neutral::before,
.checkbox-pill::before,
.calendar-day::before,
.calendar-event::before,
.timeline-item::before,
.simple-list li::before,
.stat-card::before,
.day-timeline-item::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: var(--glass-sheen);
    pointer-events: none;
}

.sidebar,
.brand,
.nav-group,
.card,
.theme-toggle,
.calendar-day,
.calendar-event,
.timeline-item,
.simple-list li,
.stat-card,
.day-timeline-item {
    border: 1px solid var(--glass-stroke);
}

.button,
.badge,
.badge-neutral,
.checkbox-pill,
input,
select,
textarea {
    border-color: color-mix(in srgb, var(--glass-stroke) 72%, transparent);
    backdrop-filter: blur(24px) saturate(150%);
}

.button,
.badge,
.badge-neutral,
.checkbox-pill {
    overflow: hidden;
}

html[data-theme="light"] .sidebar,
html[data-theme="light"] .brand,
html[data-theme="light"] .nav-group,
html[data-theme="light"] .card,
html[data-theme="light"] .theme-toggle,
html[data-theme="light"] .calendar-day,
html[data-theme="light"] .calendar-event,
html[data-theme="light"] .timeline-item,
html[data-theme="light"] .simple-list li,
html[data-theme="light"] .stat-card,
html[data-theme="light"] .day-timeline-item {
    backdrop-filter: blur(28px) saturate(165%);
}

html[data-theme="light"] .button,
html[data-theme="light"] .badge,
html[data-theme="light"] .badge-neutral,
html[data-theme="light"] .checkbox-pill,
html[data-theme="light"] input,
html[data-theme="light"] select,
html[data-theme="light"] textarea {
    color: #0f172a;
    backdrop-filter: blur(24px) saturate(160%);
}

html[data-theme="light"] .nav-link {
    color: #122032;
}
html[data-theme="light"] .nav-link:hover {
    background: rgba(255,255,255,0.62);
    border-color: rgba(15,23,42,0.10);
}
html[data-theme="light"] .nav-link.active {
    background: linear-gradient(180deg, rgba(255,255,255,0.86) 0%, rgba(236,243,252,0.82) 100%);
    color: #0b223f;
    box-shadow: 0 10px 24px rgba(15,23,42,0.08);
}
html[data-theme="light"] .badge,
html[data-theme="light"] .badge-neutral,
html[data-theme="light"] .checkbox-pill {
    background: rgba(255,255,255,0.58);
}
html[data-theme="light"] .table thead th {
    color: #0f172a;
}
html[data-theme="light"] .table tbody td {
    color: #15253b;
}

html[data-theme="dark"] .badge,
html[data-theme="dark"] .badge-neutral,
html[data-theme="dark"] .checkbox-pill,
html[data-theme="dark"] .button,
html[data-theme="dark"] .theme-toggle-button {
    backdrop-filter: blur(20px) saturate(140%);
}

.day-view-card {
    padding-bottom: 18px;
}
.day-timeline {
    display: grid;
    gap: 14px;
}
.day-timeline-item {
    display: grid;
    grid-template-columns: 128px minmax(0, 1fr);
    gap: 16px;
    padding: 16px;
    border-radius: 22px;
    background: var(--detail-box-bg);
}
.day-time-chip {
    align-self: start;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px 14px;
    border-radius: 999px;
    background: var(--calendar-event-bg);
    border: 1px solid var(--line-strong);
    font-weight: 700;
}
.day-timeline-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}
.day-timeline-content {
    min-width: 0;
}
.day-timeline-item.task .day-time-chip {
    background: rgba(255,159,10,0.14);
    border-color: rgba(255,159,10,0.28);
}
.day-timeline-item.shift .day-time-chip {
    background: rgba(10,132,255,0.14);
    border-color: rgba(10,132,255,0.26);
}
@media (max-width: 840px) {
    .day-timeline-item {
        grid-template-columns: 1fr;
    }
    .day-time-chip {
        justify-content: flex-start;
    }
}


/* 2026-03 glass refinement */
:root {
    --panel: rgba(20, 24, 34, 0.70);
    --panel-2: rgba(26, 31, 43, 0.76);
    --sidebar-bg: rgba(14, 18, 27, 0.70);
    --nav-group-bg: rgba(18, 23, 34, 0.42);
    --sidebar-footer-bg: rgba(18, 23, 34, 0.36);
    --card-bg: linear-gradient(180deg, rgba(24, 29, 41, 0.74) 0%, rgba(16, 20, 30, 0.68) 100%);
    --input-bg: rgba(12, 15, 23, 0.52);
    --button-bg: linear-gradient(180deg, rgba(56, 66, 86, 0.62) 0%, rgba(31, 38, 52, 0.52) 100%);
    --calendar-day-bg: rgba(18, 23, 34, 0.54);
    --calendar-event-bg: rgba(255,255,255,0.06);
    --table-row-bg: rgba(255, 255, 255, 0.028);
    --table-row-alt-bg: rgba(255, 255, 255, 0.052);
    --table-row-hover: rgba(255, 255, 255, 0.082);
    --detail-box-bg: rgba(255,255,255,0.045);
    --detail-box-border: rgba(255,255,255,0.09);
    --shadow: 0 28px 80px rgba(0, 0, 0, 0.34);
}

html[data-theme="light"] {
    --panel: rgba(255, 255, 255, 0.56);
    --panel-2: rgba(255, 255, 255, 0.66);
    --sidebar-bg: rgba(248, 251, 255, 0.60);
    --nav-group-bg: rgba(255, 255, 255, 0.44);
    --sidebar-footer-bg: rgba(255, 255, 255, 0.42);
    --card-bg: linear-gradient(180deg, rgba(255, 255, 255, 0.66) 0%, rgba(246, 250, 255, 0.58) 100%);
    --input-bg: rgba(255, 255, 255, 0.52);
    --button-bg: linear-gradient(180deg, rgba(255,255,255,0.74) 0%, rgba(241,246,253,0.64) 100%);
    --calendar-day-bg: rgba(255,255,255,0.58);
    --calendar-event-bg: rgba(255,255,255,0.50);
    --table-row-bg: rgba(255, 255, 255, 0.72);
    --table-row-alt-bg: rgba(247, 250, 255, 0.82);
    --table-row-hover: rgba(230, 239, 250, 0.92);
    --table-head-bg: rgba(240, 246, 253, 0.88);
    --detail-box-bg: rgba(255,255,255,0.62);
    --detail-box-border: rgba(148, 163, 184, 0.16);
    --shadow: 0 24px 60px rgba(148, 163, 184, 0.22);
}

.sidebar,
.card,
.nav-group,
.sidebar-footer,
.theme-toggle,
.calendar-day,
.calendar-event,
.detail-box,
.checkbox-pill,
.badge,
.badge-neutral,
.button,
input,
select,
textarea,
.table thead th {
    backdrop-filter: blur(30px) saturate(175%);
    -webkit-backdrop-filter: blur(30px) saturate(175%);
}

.card,
.nav-group,
.sidebar-footer,
.calendar-day,
.calendar-event,
.checkbox-pill,
.badge,
.badge-neutral,
.button,
input,
select,
textarea {
    position: relative;
    overflow: hidden;
}

.card::before,
.nav-group::before,
.sidebar-footer::before,
.calendar-day::before,
.calendar-event::before,
.checkbox-pill::before,
.badge::before,
.badge-neutral::before,
.button::before,
input::before,
select::before,
textarea::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.24) 0%, rgba(255,255,255,0.10) 24%, rgba(255,255,255,0.04) 55%, rgba(255,255,255,0.10) 100%);
    pointer-events: none;
}

html[data-theme="light"] .card::before,
html[data-theme="light"] .nav-group::before,
html[data-theme="light"] .sidebar-footer::before,
html[data-theme="light"] .calendar-day::before,
html[data-theme="light"] .calendar-event::before,
html[data-theme="light"] .checkbox-pill::before,
html[data-theme="light"] .badge::before,
html[data-theme="light"] .badge-neutral::before,
html[data-theme="light"] .button::before,
html[data-theme="light"] input::before,
html[data-theme="light"] select::before,
html[data-theme="light"] textarea::before {
    background: linear-gradient(135deg, rgba(255,255,255,0.56) 0%, rgba(255,255,255,0.24) 26%, rgba(255,255,255,0.08) 58%, rgba(255,255,255,0.20) 100%);
}

.card,
.nav-group,
.sidebar-footer {
    border-color: rgba(255,255,255,0.10);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.18), inset 0 1px 0 rgba(255,255,255,0.14);
}

html[data-theme="light"] .card,
html[data-theme="light"] .nav-group,
html[data-theme="light"] .sidebar-footer {
    border-color: rgba(255,255,255,0.52);
    box-shadow: 0 18px 42px rgba(148, 163, 184, 0.18), inset 0 1px 0 rgba(255,255,255,0.72);
}

.button,
.badge,
.badge-neutral,
.checkbox-pill,
.theme-toggle-button {
    box-shadow: 0 14px 30px rgba(0,0,0,0.16), inset 0 1px 0 rgba(255,255,255,0.18);
}

html[data-theme="light"] .button,
html[data-theme="light"] .badge,
html[data-theme="light"] .badge-neutral,
html[data-theme="light"] .checkbox-pill,
html[data-theme="light"] .theme-toggle-button {
    box-shadow: 0 12px 24px rgba(148,163,184,0.16), inset 0 1px 0 rgba(255,255,255,0.78);
}

.table thead th {
    background: linear-gradient(180deg, rgba(255,255,255,0.14) 0%, rgba(255,255,255,0.06) 100%);
}

html[data-theme="light"] .table thead th {
    background: linear-gradient(180deg, rgba(255,255,255,0.92) 0%, rgba(241,246,253,0.88) 100%);
}

html[data-theme="light"] .nav-link:hover {
    background: rgba(255,255,255,0.38);
}

html[data-theme="light"] .nav-link.active {
    background: linear-gradient(180deg, rgba(10, 132, 255, 0.22) 0%, rgba(10, 132, 255, 0.10) 100%);
    border-color: rgba(10,132,255,0.20);
}

/* --- Dashboard Variant C refinement --- */


.dashboard-layout-actions {
    flex-wrap: wrap;
}

.dashboard-layout-note {
    margin: -4px 0 16px;
}

.dashboard-layout-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 16px;
    align-items: start;
}

.dashboard-layout-item {
    grid-column: span 12;
    min-width: 0;
}

.dashboard-span-12 { grid-column: span 12; }
.dashboard-span-6 { grid-column: span 6; }
.dashboard-span-4 { grid-column: span 4; }
.dashboard-span-3 { grid-column: span 3; }

.dashboard-layout-item-shell {
    position: relative;
    min-height: 100%;
}

.dashboard-widget-dragbar {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 6;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.dashboard-drag-handle {
    border: 1px solid var(--line-strong);
    background: color-mix(in srgb, var(--panel) 78%, transparent);
    color: var(--muted);
    border-radius: 999px;
    min-width: 38px;
    height: 38px;
    padding: 0 12px;
    font-size: 1rem;
    backdrop-filter: blur(22px);
    box-shadow: var(--elevated-shadow-soft);
    cursor: grab;
}

html.dashboard-layout-editing .dashboard-widget-dragbar {
    opacity: 1;
    pointer-events: auto;
}

html.dashboard-layout-editing .dashboard-layout-item {
    cursor: grab;
}

html.dashboard-layout-editing .dashboard-layout-item > .dashboard-layout-item-shell > .card,
html.dashboard-layout-editing .dashboard-layout-item > .dashboard-layout-item-shell > .dashboard-kpi-grid,
html.dashboard-layout-editing .dashboard-layout-item > .dashboard-layout-item-shell > details {
    outline: 1px dashed rgba(10, 132, 255, 0.24);
    outline-offset: 8px;
}

html.dashboard-layout-editing .dashboard-layout-item .dashboard-kpi-card,
html.dashboard-layout-editing .dashboard-layout-item a,
html.dashboard-layout-editing .dashboard-layout-item button,
html.dashboard-layout-editing .dashboard-layout-item summary {
    pointer-events: none;
}

html.dashboard-layout-editing .dashboard-layout-item .dashboard-drag-handle,
html.dashboard-layout-editing .dashboard-layout-item .dashboard-layout-item-shell {
    pointer-events: auto;
}

.dashboard-layout-dragging {
    opacity: 0.6;
}

.dashboard-layout-drop-target > .dashboard-layout-item-shell > .card,
.dashboard-layout-drop-target > .dashboard-layout-item-shell > .dashboard-kpi-grid,
.dashboard-layout-drop-target > .dashboard-layout-item-shell > details {
    outline: 2px solid rgba(48, 209, 88, 0.38);
    outline-offset: 6px;
}

.dashboard-kpi-grid,
.dashboard-priority-strip,
.dashboard-advanced {
    margin-bottom: 0;
}

.dashboard-column-card {
    min-height: 100%;
}

@media (max-width: 1320px) {
    .dashboard-span-4,
    .dashboard-span-6,
    .dashboard-span-3 {
        grid-column: span 12;
    }
}

@media (max-width: 920px) {
    .monthly-analytics-header-actions {
        width: 100%;
    }

    .monthly-analytics-header-actions .button,
    .monthly-analytics-header-actions .export-menu {
        width: 100%;
    }

    .monthly-analytics-header-actions .export-menu-toggle {
        width: 100%;
    }

    .export-menu-panel {
        left: 0;
        right: auto;
        width: 100%;
    }

    .dashboard-layout-grid {
        grid-template-columns: 1fr;
    }
    .dashboard-span-12,
    .dashboard-span-6,
    .dashboard-span-4,
    .dashboard-span-3 {
        grid-column: span 1;
    }
}
.dashboard-header-slim {
    margin-bottom: 18px;
}

.dashboard-kpi-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 16px;
}

.dashboard-kpi-card {
    text-decoration: none;
    color: var(--text);
    min-height: 146px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.dashboard-kpi-card .stat-value {
    font-size: clamp(2rem, 3vw, 2.5rem);
}

.dashboard-kpi-hint {
    margin-top: 10px;
}

.dashboard-priority-strip {
    margin-bottom: 18px;
}

.compact-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.priority-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.priority-chip {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 999px;
    border: 1px solid var(--line-strong);
    background: color-mix(in srgb, var(--panel) 86%, transparent);
    color: var(--text);
    text-decoration: none;
    backdrop-filter: blur(24px);
    box-shadow: var(--elevated-shadow-soft);
}

.priority-chip-value {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    border-radius: 999px;
    background: rgba(255,255,255,0.08);
    font-weight: 700;
}

.priority-positive { border-color: rgba(48,209,88,0.24); }
.priority-positive .priority-chip-value { background: rgba(48,209,88,0.16); }
.priority-warning { border-color: rgba(255,159,10,0.28); }
.priority-warning .priority-chip-value { background: rgba(255,159,10,0.18); }
.priority-negative { border-color: rgba(255,69,58,0.28); }
.priority-negative .priority-chip-value { background: rgba(255,69,58,0.18); }

.dashboard-hybrid-grid,
.dashboard-bottom-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.dashboard-bottom-grid {
    grid-template-columns: 1.15fr 1fr;
    margin-top: 16px;
}

.dashboard-column-card {
    min-height: 100%;
}

.dashboard-subsection + .dashboard-subsection {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
}

.section-heading-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.section-heading-row h3 {
    margin: 0;
    font-size: 1rem;
}

.dashboard-shift-stack,
.dashboard-list-stack {
    display: grid;
    gap: 10px;
}

.dashboard-shift-item,
.dashboard-list-item {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 12px;
    align-items: start;
    padding: 14px 15px;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: color-mix(in srgb, var(--panel) 88%, transparent);
    text-decoration: none;
    color: var(--text);
    backdrop-filter: blur(22px);
    box-shadow: var(--elevated-shadow-soft);
}

.dashboard-list-item {
    grid-template-columns: 1fr auto;
    align-items: center;
}

.dashboard-list-item.static-row {
    text-decoration: none;
}

.compact-list-stack .dashboard-list-item {
    padding: 12px 14px;
}

.dashboard-shift-time {
    min-width: 84px;
    padding: 8px 10px;
    border-radius: 14px;
    background: color-mix(in srgb, var(--calendar-event-bg) 88%, transparent);
    text-align: center;
    font-weight: 700;
    font-size: 0.92rem;
}

.dashboard-shift-title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 4px;
}

.dashboard-inline-pills,
.dashboard-quick-stats,
.dashboard-mini-kpis,
.dashboard-bottom-kpis {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.dashboard-mini-kpis {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.dashboard-mini-kpis-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dashboard-bottom-kpis {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.soft-pill,
.mini-stat-pill,
.mini-kpi-card {
    border: 1px solid var(--line-strong);
    background: color-mix(in srgb, var(--panel) 86%, transparent);
    border-radius: 16px;
    backdrop-filter: blur(24px);
    box-shadow: var(--elevated-shadow-soft);
}

.soft-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    color: var(--muted);
}

.warning-pill {
    color: var(--warning);
    border-color: rgba(255,159,10,0.28);
}

.mini-stat-pill,
.mini-kpi-card {
    padding: 14px 15px;
}

.mini-stat-label,
.mini-kpi-label {
    display: block;
    color: var(--muted);
    font-size: 0.82rem;
    margin-bottom: 6px;
}

.mini-stat-pill strong,
.mini-kpi-card strong {
    font-size: 1.15rem;
    line-height: 1.15;
}

.dashboard-advanced {
    margin-top: 18px;
}

.dashboard-advanced > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    cursor: pointer;
    list-style: none;
}

.dashboard-advanced > summary::-webkit-details-marker {
    display: none;
}

.dashboard-advanced-body {
    margin-top: 16px;
}

html[data-theme="light"] .dashboard-kpi-card,
html[data-theme="light"] .dashboard-shift-item,
html[data-theme="light"] .dashboard-list-item,
html[data-theme="light"] .soft-pill,
html[data-theme="light"] .mini-stat-pill,
html[data-theme="light"] .mini-kpi-card,
html[data-theme="light"] .priority-chip {
    background: color-mix(in srgb, rgba(255,255,255,0.84) 92%, transparent);
    border-color: rgba(15,23,42,0.10);
}

html[data-theme="light"] .dashboard-shift-time {
    background: rgba(255,255,255,0.88);
}

html[data-theme="light"] .priority-chip-value {
    background: rgba(15,23,42,0.06);
}

@media (max-width: 1320px) {
    .dashboard-kpi-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    .dashboard-hybrid-grid {
        grid-template-columns: 1fr;
    }
    .dashboard-bottom-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 920px) {
    .dashboard-kpi-grid,
    .dashboard-mini-kpis,
    .dashboard-bottom-kpis,
    .dashboard-quick-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .dashboard-kpi-grid,
    .dashboard-mini-kpis,
    .dashboard-mini-kpis-2,
    .dashboard-bottom-kpis,
    .dashboard-quick-stats {
        grid-template-columns: 1fr;
    }
    .dashboard-shift-item,
    .dashboard-list-item {
        grid-template-columns: 1fr;
    }
    .dashboard-shift-time {
        width: fit-content;
    }
    .compact-header-row,
    .section-heading-row,
    .dashboard-advanced > summary {
        align-items: flex-start;
        flex-direction: column;
    }
}


/* --- Dashboard toolbar variant 1 --- */
.dashboard-toolbar-wrap {
    display: flex;
    justify-content: flex-end;
    align-self: flex-start;
    min-width: min(100%, 640px);
}

.dashboard-toolbar-shell {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    width: 100%;
    min-height: 72px;
    padding: 10px 14px;
    border-radius: 24px;
    border: 1px solid var(--line-strong);
    background: linear-gradient(180deg, color-mix(in srgb, var(--panel) 88%, transparent) 0%, color-mix(in srgb, var(--panel-2) 92%, transparent) 100%);
    box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,0.10);
    backdrop-filter: blur(26px);
}

.dashboard-toolbar-mode {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    width: 100%;
    min-width: 0;
    flex-wrap: wrap;
}

.dashboard-toolbar-normal[hidden],
.dashboard-toolbar-edit[hidden] {
    display: none !important;
}

.dashboard-segment-control {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px;
    border-radius: 999px;
    border: 1px solid var(--line-strong);
    background: color-mix(in srgb, var(--panel) 78%, transparent);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
}

.dashboard-segment-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 16px;
    border-radius: 999px;
    color: var(--text);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.94rem;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.dashboard-segment-link:hover {
    text-decoration: none;
    background: rgba(255,255,255,0.05);
}

.dashboard-segment-link:first-child {
    background: linear-gradient(180deg, rgba(255,255,255,0.10) 0%, rgba(255,255,255,0.04) 100%);
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.10);
}

.dashboard-toolbar-divider {
    width: 1px;
    height: 30px;
    background: linear-gradient(180deg, transparent 0%, var(--line-strong) 20%, var(--line-strong) 80%, transparent 100%);
    margin: 0 2px;
}

.dashboard-toolbar-edit-trigger,
.dashboard-toolbar-primary {
    min-height: 42px;
}

.dashboard-toolbar-status {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid rgba(10,132,255,0.22);
    background: rgba(10,132,255,0.12);
    color: var(--text);
    font-weight: 600;
    letter-spacing: 0.01em;
}

.dashboard-toolbar-edit {
    justify-content: flex-end;
}

html[data-theme="light"] .dashboard-toolbar-shell {
    background: linear-gradient(180deg, rgba(255,255,255,0.92) 0%, rgba(244,247,252,0.92) 100%);
    box-shadow: 0 18px 40px rgba(148,163,184,0.14), inset 0 1px 0 rgba(255,255,255,0.78);
}

html[data-theme="light"] .dashboard-segment-control {
    background: rgba(255,255,255,0.82);
}

html[data-theme="light"] .dashboard-segment-link:hover {
    background: rgba(15,23,42,0.05);
}

html[data-theme="light"] .dashboard-segment-link:first-child {
    background: linear-gradient(180deg, rgba(15,23,42,0.08) 0%, rgba(15,23,42,0.03) 100%);
    border-color: rgba(15,23,42,0.08);
}

@media (max-width: 1320px) {
    .dashboard-toolbar-wrap {
        min-width: 100%;
    }
}

@media (max-width: 920px) {
    .dashboard-toolbar-shell,
    .dashboard-toolbar-mode {
        justify-content: stretch;
    }

    .dashboard-toolbar-mode {
        gap: 8px;
    }

    .dashboard-segment-control,
    .dashboard-toolbar-edit-trigger,
    .dashboard-toolbar-primary,
    .dashboard-toolbar-status,
    .dashboard-toolbar-edit .button {
        width: 100%;
    }

    .dashboard-segment-link {
        flex: 1 1 0;
    }

    .dashboard-toolbar-divider {
        display: none;
    }
}

/* --- 2026-03-22 final visual refinement --- */
.utility-bar {
    justify-content: flex-end;
    padding-right: 8px;
    margin-bottom: 22px;
}

.theme-toggle {
    transform: scale(0.92);
    transform-origin: center right;
    margin-right: 22px;
    margin-top: 0;
    padding: 4px;
    gap: 4px;
    background: linear-gradient(180deg, rgba(28, 34, 48, 0.50) 0%, rgba(16, 20, 31, 0.38) 100%);
    border-color: rgba(255, 255, 255, 0.10);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.18), inset 0 1px 0 rgba(255,255,255,0.12);
}

.theme-toggle-button {
    min-width: 34px;
    min-height: 34px;
    width: 34px;
    height: 34px;
}

html[data-theme="light"] .theme-toggle {
    background: linear-gradient(180deg, rgba(255,255,255,0.56) 0%, rgba(245,248,252,0.50) 100%);
    border-color: rgba(148,163,184,0.18);
}

.sidebar {
    border-radius: 34px;
    background: linear-gradient(180deg, rgba(12, 16, 24, 0.74) 0%, rgba(8, 11, 19, 0.66) 100%);
    border-color: rgba(255,255,255,0.08);
}

.nav-group {
    border-radius: 26px;
    background: linear-gradient(180deg, rgba(21, 26, 38, 0.76) 0%, rgba(14, 18, 28, 0.68) 100%);
}

.nav-link {
    border-radius: 16px;
}

.card,
.mini-kpi-card,
.stat-card,
.dashboard-kpi-card,
.dashboard-column-card,
.dashboard-shift-item,
.dashboard-list-item,
.toggle-chip,
.soft-pill,
.badge,
.button,
.theme-toggle,
.dashboard-toolbar-shell,
.dashboard-segment-control,
input,
select,
textarea {
    transition: background 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease, color 0.24s ease;
}

html[data-theme="dark"] .card,
html[data-theme="dark"] .nested-card,
html[data-theme="dark"] .dashboard-column-card,
html[data-theme="dark"] .dashboard-advanced,
html[data-theme="dark"] .mini-kpi-card,
html[data-theme="dark"] .stat-card,
html[data-theme="dark"] .dashboard-kpi-card,
html[data-theme="dark"] .day-view-card,
html[data-theme="dark"] .calendar-day,
html[data-theme="dark"] .calendar-event,
html[data-theme="dark"] .detail-box,
html[data-theme="dark"] .hint-box,
html[data-theme="dark"] .public-card {
    background: linear-gradient(180deg, rgba(17, 21, 31, 0.88) 0%, rgba(10, 13, 21, 0.82) 100%);
    border-color: rgba(255,255,255,0.08);
    box-shadow: 0 22px 52px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255,255,255,0.08);
}

html[data-theme="dark"] .button,
html[data-theme="dark"] .badge,
html[data-theme="dark"] .badge-neutral,
html[data-theme="dark"] .checkbox-pill,
html[data-theme="dark"] .soft-pill,
html[data-theme="dark"] .toggle-chip,
html[data-theme="dark"] .dashboard-toolbar-shell,
html[data-theme="dark"] .dashboard-segment-control,
html[data-theme="dark"] input,
html[data-theme="dark"] select,
html[data-theme="dark"] textarea {
    background: linear-gradient(180deg, rgba(30, 36, 50, 0.78) 0%, rgba(18, 22, 33, 0.72) 100%);
    border-color: rgba(255,255,255,0.10);
}

html[data-theme="dark"] .sidebar::before,
html[data-theme="dark"] .nav-group::before,
html[data-theme="dark"] .card::before,
html[data-theme="dark"] .button::before,
html[data-theme="dark"] .badge::before,
html[data-theme="dark"] .theme-toggle::before {
    background: linear-gradient(135deg, rgba(255,255,255,0.12) 0%, rgba(255,255,255,0.05) 28%, rgba(255,255,255,0.015) 58%, rgba(255,255,255,0.05) 100%);
}

html[data-theme="light"] .card,
html[data-theme="light"] .nested-card,
html[data-theme="light"] .dashboard-column-card,
html[data-theme="light"] .dashboard-advanced,
html[data-theme="light"] .mini-kpi-card,
html[data-theme="light"] .stat-card,
html[data-theme="light"] .dashboard-kpi-card,
html[data-theme="light"] .day-view-card,
html[data-theme="light"] .calendar-day,
html[data-theme="light"] .calendar-event,
html[data-theme="light"] .detail-box,
html[data-theme="light"] .hint-box,
html[data-theme="light"] .public-card {
    background: linear-gradient(180deg, rgba(255,255,255,0.86) 0%, rgba(244,248,252,0.80) 100%);
    border-color: rgba(148,163,184,0.16);
    box-shadow: 0 18px 44px rgba(148,163,184,0.16), inset 0 1px 0 rgba(255,255,255,0.84);
}

html[data-theme="light"] .sidebar {
    background: linear-gradient(180deg, rgba(247,250,255,0.72) 0%, rgba(240,246,252,0.64) 100%);
    border-color: rgba(148,163,184,0.14);
}

html[data-theme="light"] .nav-group {
    background: linear-gradient(180deg, rgba(255,255,255,0.70) 0%, rgba(248,251,255,0.64) 100%);
}

html[data-theme="light"] .button,
html[data-theme="light"] .badge,
html[data-theme="light"] .badge-neutral,
html[data-theme="light"] .checkbox-pill,
html[data-theme="light"] .soft-pill,
html[data-theme="light"] .toggle-chip,
html[data-theme="light"] .dashboard-toolbar-shell,
html[data-theme="light"] .dashboard-segment-control,
html[data-theme="light"] input,
html[data-theme="light"] select,
html[data-theme="light"] textarea {
    background: linear-gradient(180deg, rgba(255,255,255,0.78) 0%, rgba(243,247,252,0.70) 100%);
}

.dashboard-advanced {
    overflow: hidden;
}

.dashboard-advanced > summary {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 78px;
    padding: 22px 24px;
    cursor: pointer;
}

.dashboard-advanced-summary-copy {
    display: grid;
    gap: 5px;
}

.dashboard-advanced-summary-actions {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.dashboard-expand-hint {
    border-style: dashed;
}

.dashboard-summary-chevron {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: color-mix(in srgb, var(--panel) 82%, transparent);
    font-size: 1rem;
    line-height: 1;
    transition: transform 0.24s ease;
}

.dashboard-advanced[open] .dashboard-summary-chevron {
    transform: rotate(180deg);
}

.dashboard-advanced > summary:hover .dashboard-expand-hint,
.dashboard-advanced > summary:hover .dashboard-summary-chevron {
    border-color: var(--line-strong);
}

.monthly-analytics-page .two-column + .two-column {
    margin-top: 24px;
}

.monthly-analytics-page .card {
    overflow: visible;
}

.backup-archive-table {
    margin-top: 14px;
}

@media (max-width: 920px) {
    .utility-bar {
        padding-right: 0;
        margin-bottom: 18px;
    }

    .theme-toggle {
        margin-right: 0;
        transform: scale(0.9);
    }

    .dashboard-advanced > summary {
        align-items: flex-start;
    }

    .dashboard-advanced-summary-actions {
        width: 100%;
    }
}


/* --- sidebar logo centering + cleaner dashboard header --- */
.brand {
    text-align: center;
}

.brand-logo {
    width: 100%;
    justify-content: center;
    align-items: center;
}

.brand-logo-image {
    margin-left: auto;
    margin-right: auto;
}

.brand-subtitle {
    text-align: center;
}

.dashboard-header-slim {
    margin-bottom: 18px;
}


.filters-grid-5 { grid-template-columns: 2fr 1fr 1fr 1fr 1fr auto; }
.compliance-summary-card { margin-bottom: 20px; }
.compliance-alert { padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); margin-bottom: 12px; }
.compliance-alert-negative { border-color: rgba(255,69,58,0.24); background: rgba(255,69,58,0.10); }
.compliance-alert-warning { border-color: rgba(255,159,10,0.24); background: rgba(255,159,10,0.10); }
.compliance-check-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.compliance-check { padding: 16px; margin-top: 0; }
.compliance-check-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
@media (max-width: 980px) { .compliance-check-grid { grid-template-columns: 1fr; } }

/* --- language switcher --- */
.utility-controls {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 12px;
}

.language-switch {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px;
    transform: scale(0.92);
    transform-origin: center right;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.38);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(18px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

.language-switch-button {
    appearance: none;
    border: 0;
    background: transparent;
    color: var(--muted);
    min-width: 42px;
    height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    cursor: pointer;
    transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.language-switch-button:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.06);
}

.language-switch-button.active {
    color: #ffffff;
    background: linear-gradient(180deg, rgba(10, 132, 255, 0.96) 0%, rgba(10, 132, 255, 0.78) 100%);
    box-shadow: 0 10px 20px rgba(10, 132, 255, 0.26);
}

html[data-theme="light"] .language-switch {
    background: rgba(255, 255, 255, 0.72);
    border-color: rgba(15, 23, 42, 0.08);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.10);
}

html[data-theme="light"] .language-switch-button {
    color: #475569;
}

html[data-theme="light"] .language-switch-button:hover {
    color: #0f172a;
    background: rgba(15, 23, 42, 0.05);
}

html[data-theme="light"] .language-switch-button.active {
    color: #ffffff;
    background: linear-gradient(180deg, rgba(10, 132, 255, 0.96) 0%, rgba(10, 132, 255, 0.78) 100%);
}

@media (max-width: 820px) {
    .utility-controls {
        width: 100%;
        justify-content: flex-end;
        flex-wrap: wrap;
        gap: 10px;
    }

    .language-switch,
    .theme-toggle {
        margin-left: 0;
    }
}


/* --- premium top-right controls alignment fix --- */
.utility-bar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding-right: 8px;
    margin-bottom: 22px;
}

.premium-utility-controls {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 14px;
    margin-left: auto;
}

.utility-control-group {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
}

.utility-control-label {
    font-size: 0.72rem;
    line-height: 1;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
    opacity: 0.88;
    user-select: none;
}

.language-switch,
.theme-toggle {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 44px;
    margin: 0;
    padding: 4px;
    gap: 4px;
    border-radius: 999px;
    transform: none;
    transform-origin: center center;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.20), inset 0 1px 0 rgba(255,255,255,0.10);
}

.language-switch {
    background: linear-gradient(180deg, rgba(28, 34, 48, 0.56) 0%, rgba(16, 20, 31, 0.42) 100%);
    border: 1px solid rgba(255, 255, 255, 0.10);
}

.theme-toggle {
    background: linear-gradient(180deg, rgba(28, 34, 48, 0.56) 0%, rgba(16, 20, 31, 0.42) 100%);
    border: 1px solid rgba(255, 255, 255, 0.10);
}

.language-switch-button,
.theme-toggle-button {
    appearance: none;
    border: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: center;
    line-height: 1;
    margin: 0;
    cursor: pointer;
}

.language-switch-button {
    min-width: 42px;
    height: 36px;
    padding: 0 12px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--muted);
    background: transparent;
    transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.theme-toggle-button {
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
    border-radius: 999px;
    background: transparent;
    transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.theme-symbol {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-size: 0.95rem;
    line-height: 1;
}

.language-switch-button:hover,
.theme-toggle-button:hover {
    transform: translateY(-1px);
}

.language-switch-button.active {
    color: #ffffff;
    background: linear-gradient(180deg, rgba(10, 132, 255, 0.96) 0%, rgba(10, 132, 255, 0.78) 100%);
    box-shadow: 0 10px 20px rgba(10, 132, 255, 0.26);
}

.theme-toggle-button.active {
    color: #ffffff;
    background: linear-gradient(180deg, rgba(10, 132, 255, 0.96) 0%, rgba(10, 132, 255, 0.78) 100%);
    box-shadow: 0 10px 20px rgba(10, 132, 255, 0.26);
}

html[data-theme="light"] .language-switch,
html[data-theme="light"] .theme-toggle {
    background: linear-gradient(180deg, rgba(255,255,255,0.82) 0%, rgba(244,248,252,0.70) 100%);
    border-color: rgba(15, 23, 42, 0.08);
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.10), inset 0 1px 0 rgba(255,255,255,0.86);
}

html[data-theme="light"] .language-switch-button,
html[data-theme="light"] .theme-toggle-button {
    color: #475569;
}

html[data-theme="light"] .language-switch-button:hover,
html[data-theme="light"] .theme-toggle-button:hover {
    background: rgba(15, 23, 42, 0.05);
    color: #0f172a;
}

html[data-theme="light"] .language-switch-button.active,
html[data-theme="light"] .theme-toggle-button.active {
    color: #ffffff;
    background: linear-gradient(180deg, rgba(10, 132, 255, 0.96) 0%, rgba(10, 132, 255, 0.78) 100%);
}

@media (max-width: 980px) {
    .premium-utility-controls {
        width: 100%;
        justify-content: flex-end;
        flex-wrap: wrap;
        gap: 10px;
    }

    .utility-control-group {
        gap: 8px;
        min-height: 40px;
    }

    .utility-control-label {
        font-size: 0.68rem;
    }

    .language-switch,
    .theme-toggle {
        height: 40px;
    }

    .language-switch-button,
    .theme-toggle-button {
        height: 32px;
        min-height: 32px;
    }

    .theme-toggle-button {
        width: 32px;
        min-width: 32px;
    }
}


/* --- 2026-03-22 utility controls final cleanup --- */
.utility-bar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding-right: 8px;
    margin-bottom: 22px;
}

.utility-controls-shell {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 48px;
    padding: 6px;
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(28, 34, 48, 0.58) 0%, rgba(16, 20, 31, 0.44) 100%);
    border: 1px solid rgba(255, 255, 255, 0.10);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.20), inset 0 1px 0 rgba(255,255,255,0.10);
}

.utility-controls-shell .utility-control-label,
.utility-control-label,
.premium-utility-controls,
.utility-control-group {
    display: none !important;
}

.utility-controls-shell .language-switch,
.utility-controls-shell .theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: center;
    height: 36px;
    min-height: 36px;
    margin: 0;
    padding: 0;
    gap: 4px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    box-shadow: none;
    transform: none;
}

.utility-controls-shell .language-switch {
    padding-right: 2px;
}

.utility-controls-shell .language-switch-button,
.utility-controls-shell .theme-toggle-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: center;
    box-sizing: border-box;
    height: 36px;
    min-height: 36px;
    margin: 0;
    border: 0;
    border-radius: 999px;
    line-height: 1;
    transform: none !important;
}

.utility-controls-shell .language-switch-button {
    min-width: 42px;
    padding: 0 12px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--muted);
    background: transparent;
}

.utility-controls-shell .theme-toggle-button {
    width: 36px;
    min-width: 36px;
    padding: 0;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.04);
}

.utility-controls-shell .theme-toggle-button.active,
.utility-controls-shell .language-switch-button.active {
    color: #ffffff;
    background: linear-gradient(180deg, rgba(10, 132, 255, 0.96) 0%, rgba(10, 132, 255, 0.78) 100%);
    box-shadow: 0 10px 20px rgba(10, 132, 255, 0.26);
}

.utility-controls-shell .theme-toggle-button:not(.active):hover,
.utility-controls-shell .language-switch-button:not(.active):hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text);
}

.utility-controls-shell .theme-symbol {
    width: 100%;
    height: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    line-height: 1;
}

html[data-theme="light"] .utility-controls-shell {
    background: linear-gradient(180deg, rgba(255,255,255,0.82) 0%, rgba(244,248,252,0.70) 100%);
    border-color: rgba(15, 23, 42, 0.08);
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.10), inset 0 1px 0 rgba(255,255,255,0.86);
}

html[data-theme="light"] .utility-controls-shell .language-switch-button,
html[data-theme="light"] .utility-controls-shell .theme-toggle-button {
    color: #475569;
}

html[data-theme="light"] .utility-controls-shell .theme-toggle-button:not(.active) {
    background: rgba(15, 23, 42, 0.04);
}

html[data-theme="light"] .utility-controls-shell .theme-toggle-button:not(.active):hover,
html[data-theme="light"] .utility-controls-shell .language-switch-button:not(.active):hover {
    background: rgba(15, 23, 42, 0.05);
    color: #0f172a;
}

@media (max-width: 980px) {
    .utility-controls-shell {
        gap: 8px;
        min-height: 44px;
        padding: 5px;
    }

    .utility-controls-shell .language-switch,
    .utility-controls-shell .theme-toggle,
    .utility-controls-shell .language-switch-button,
    .utility-controls-shell .theme-toggle-button {
        height: 34px;
        min-height: 34px;
    }

    .utility-controls-shell .language-switch-button {
        min-width: 38px;
        padding: 0 10px;
        font-size: 0.74rem;
    }

    .utility-controls-shell .theme-toggle-button {
        width: 34px;
        min-width: 34px;
    }
}

/* Final topbar controls override */
.utility-bar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-bottom: 22px;
    padding-right: 0;
}

.utility-controls-shell {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    height: 50px;
    min-height: 50px;
    padding: 6px 8px;
    border-radius: 999px;
}

.utility-controls-shell .language-switch,
.utility-controls-shell .theme-toggle {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    height: 38px;
    min-height: 38px;
    margin: 0;
    padding: 0;
}

.utility-controls-shell .theme-toggle {
    margin-left: 10px;
    padding-left: 12px;
}

.utility-controls-shell .theme-toggle::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    width: 1px;
    height: 24px;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.10);
}

.utility-controls-shell .language-switch-button,
.utility-controls-shell .theme-toggle-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    min-width: 38px;
    height: 38px;
    min-height: 38px;
    padding: 0;
    margin: 0;
    border: 0;
    border-radius: 999px;
    line-height: 1;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: var(--muted);
    background: transparent;
    box-shadow: none;
}

.utility-controls-shell .theme-toggle-button {
    font-size: 0.98rem;
    letter-spacing: 0;
}

.utility-controls-shell .language-switch-button.active,
.utility-controls-shell .theme-toggle-button.active {
    color: #ffffff;
    background: linear-gradient(180deg, rgba(10, 132, 255, 0.96) 0%, rgba(10, 132, 255, 0.78) 100%);
    box-shadow: 0 10px 20px rgba(10, 132, 255, 0.24);
}

.utility-controls-shell .language-switch-button:hover,
.utility-controls-shell .theme-toggle-button:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.06);
}

.utility-controls-shell .language-switch-button.active:hover,
.utility-controls-shell .theme-toggle-button.active:hover {
    color: #ffffff;
    background: linear-gradient(180deg, rgba(10, 132, 255, 0.96) 0%, rgba(10, 132, 255, 0.78) 100%);
}

.utility-controls-shell .theme-symbol {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    line-height: 1;
    transform: translateY(-0.5px);
}

html[data-theme="light"] .utility-controls-shell .theme-toggle::before {
    background: rgba(15, 23, 42, 0.10);
}

html[data-theme="light"] .utility-controls-shell .language-switch-button,
html[data-theme="light"] .utility-controls-shell .theme-toggle-button {
    color: #475569;
    background: transparent;
}

html[data-theme="light"] .utility-controls-shell .language-switch-button:hover,
html[data-theme="light"] .utility-controls-shell .theme-toggle-button:hover {
    color: #0f172a;
    background: rgba(15, 23, 42, 0.05);
}

html[data-theme="light"] .utility-controls-shell .language-switch-button.active,
html[data-theme="light"] .utility-controls-shell .theme-toggle-button.active {
    color: #ffffff;
}

@media (max-width: 980px) {
    .utility-controls-shell {
        height: 46px;
        min-height: 46px;
        padding: 4px 6px;
    }

    .utility-controls-shell .language-switch,
    .utility-controls-shell .theme-toggle,
    .utility-controls-shell .language-switch-button,
    .utility-controls-shell .theme-toggle-button,
    .utility-controls-shell .theme-symbol {
        width: 34px;
        min-width: 34px;
        height: 34px;
        min-height: 34px;
    }

    .utility-controls-shell .theme-toggle {
        margin-left: 8px;
        padding-left: 10px;
    }
}

/* Definitive topbar control fix */
.utility-bar {
    display: flex !important;
    justify-content: flex-end !important;
    align-items: center !important;
    margin-bottom: 22px !important;
    padding-right: 0 !important;
}

.utility-controls-shell {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0 !important;
    height: 48px !important;
    min-height: 48px !important;
    padding: 5px 8px !important;
    border-radius: 999px !important;
    overflow: hidden !important;
    background: linear-gradient(180deg, rgba(24, 30, 42, 0.72) 0%, rgba(15, 19, 29, 0.60) 100%) !important;
    border: 1px solid rgba(255,255,255,0.10) !important;
    box-shadow: 0 14px 28px rgba(0,0,0,0.18), inset 0 1px 0 rgba(255,255,255,0.08) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
}

.utility-controls-shell .language-switch,
.utility-controls-shell .theme-toggle {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 4px !important;
    height: 100% !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    overflow: visible !important;
    position: relative !important;
}

.utility-controls-shell .theme-toggle {
    margin-left: 8px !important;
    padding-left: 10px !important;
}

.utility-controls-shell .theme-toggle::before {
    content: "" !important;
    position: absolute !important;
    left: 0 !important;
    top: 50% !important;
    width: 1px !important;
    height: 22px !important;
    transform: translateY(-50%) !important;
    background: rgba(255,255,255,0.12) !important;
    border-radius: 999px !important;
}

.utility-controls-shell .language-switch-button,
.utility-controls-shell .theme-toggle-button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 34px !important;
    min-width: 34px !important;
    height: 34px !important;
    min-height: 34px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 999px !important;
    background: transparent !important;
    color: var(--muted) !important;
    line-height: 1 !important;
    font-size: 0.76rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.06em !important;
    box-shadow: none !important;
    transform: none !important;
}

.utility-controls-shell .theme-toggle-button {
    font-size: 0.95rem !important;
    letter-spacing: 0 !important;
}

.utility-controls-shell .theme-symbol {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    height: 100% !important;
    line-height: 1 !important;
    transform: none !important;
}

.utility-controls-shell .language-switch-button:hover,
.utility-controls-shell .theme-toggle-button:hover {
    background: rgba(255,255,255,0.06) !important;
    color: var(--text) !important;
}

.utility-controls-shell .language-switch-button.active,
.utility-controls-shell .theme-toggle-button.active,
.utility-controls-shell .language-switch-button.active:hover,
.utility-controls-shell .theme-toggle-button.active:hover {
    background: linear-gradient(180deg, rgba(10,132,255,0.96) 0%, rgba(10,132,255,0.78) 100%) !important;
    color: #ffffff !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.12), 0 8px 18px rgba(10,132,255,0.22) !important;
}

html[data-theme="light"] .utility-controls-shell {
    background: linear-gradient(180deg, rgba(255,255,255,0.84) 0%, rgba(245,248,252,0.74) 100%) !important;
    border-color: rgba(15,23,42,0.08) !important;
    box-shadow: 0 14px 28px rgba(15,23,42,0.10), inset 0 1px 0 rgba(255,255,255,0.88) !important;
}

html[data-theme="light"] .utility-controls-shell .theme-toggle::before {
    background: rgba(15,23,42,0.10) !important;
}

html[data-theme="light"] .utility-controls-shell .language-switch-button,
html[data-theme="light"] .utility-controls-shell .theme-toggle-button {
    color: #475569 !important;
}

html[data-theme="light"] .utility-controls-shell .language-switch-button:hover,
html[data-theme="light"] .utility-controls-shell .theme-toggle-button:hover {
    background: rgba(15,23,42,0.05) !important;
    color: #0f172a !important;
}

html[data-theme="light"] .utility-controls-shell .language-switch-button.active,
html[data-theme="light"] .utility-controls-shell .theme-toggle-button.active {
    color: #ffffff !important;
}

@media (max-width: 980px) {
    .utility-controls-shell {
        height: 44px !important;
        min-height: 44px !important;
        padding: 4px 6px !important;
    }

    .utility-controls-shell .theme-toggle {
        margin-left: 6px !important;
        padding-left: 8px !important;
    }

    .utility-controls-shell .theme-toggle::before {
        height: 18px !important;
    }

    .utility-controls-shell .language-switch-button,
    .utility-controls-shell .theme-toggle-button {
        width: 32px !important;
        min-width: 32px !important;
        height: 32px !important;
        min-height: 32px !important;
        font-size: 0.72rem !important;
    }

    .utility-controls-shell .theme-toggle-button {
        font-size: 0.9rem !important;
    }
}


/* === Final flat topbar controls override === */
.utility-bar {
    display: flex !important;
    justify-content: flex-end !important;
    align-items: center !important;
    margin-bottom: 18px !important;
}

.utility-controls-flat {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 8px !important;
    height: 52px !important;
    padding: 6px 10px !important;
    border-radius: 999px !important;
    overflow: visible !important;
    white-space: nowrap !important;
}

.utility-controls-flat .utility-chip {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 40px !important;
    min-width: 40px !important;
    height: 40px !important;
    min-height: 40px !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 999px !important;
    background: transparent !important;
    color: var(--muted) !important;
    font-size: 0.92rem !important;
    font-weight: 800 !important;
    letter-spacing: 0.05em !important;
    line-height: 1 !important;
    box-shadow: none !important;
    transform: none !important;
    flex: 0 0 40px !important;
}

.utility-controls-flat .theme-toggle-button {
    font-size: 1.08rem !important;
    letter-spacing: 0 !important;
}

.utility-controls-flat .theme-symbol {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    height: 100% !important;
    line-height: 1 !important;
}

.utility-controls-flat .utility-divider {
    display: block !important;
    width: 1px !important;
    height: 24px !important;
    margin: 0 2px 0 4px !important;
    background: rgba(255,255,255,0.12) !important;
    border-radius: 999px !important;
    flex: 0 0 1px !important;
}

.utility-controls-flat .utility-chip:hover {
    background: rgba(255,255,255,0.06) !important;
    color: var(--text) !important;
}

.utility-controls-flat .utility-chip.active,
.utility-controls-flat .utility-chip.active:hover {
    background: linear-gradient(180deg, rgba(10,132,255,0.96) 0%, rgba(10,132,255,0.78) 100%) !important;
    color: #fff !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.12), 0 8px 18px rgba(10,132,255,0.22) !important;
}

html[data-theme="light"] .utility-controls-flat .utility-chip {
    color: #475569 !important;
}

html[data-theme="light"] .utility-controls-flat .utility-divider {
    background: rgba(15,23,42,0.10) !important;
}

html[data-theme="light"] .utility-controls-flat .utility-chip:hover {
    background: rgba(15,23,42,0.06) !important;
    color: #0f172a !important;
}

html[data-theme="light"] .utility-controls-flat .utility-chip.active,
html[data-theme="light"] .utility-controls-flat .utility-chip.active:hover {
    color: #ffffff !important;
}

@media (max-width: 860px) {
    .utility-controls-flat {
        width: 100% !important;
        justify-content: center !important;
    }
}


/* --- audit log disclosure (collapsed by default, textless control) --- */
.audit-section {
    display: block;
}

.audit-disclosure {
    overflow: hidden;
    padding-top: 0;
}

.audit-disclosure > summary {
    list-style: none;
}

.audit-disclosure > summary::-webkit-details-marker {
    display: none;
}

.audit-disclosure-summary {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    min-height: 52px;
    padding: 14px 18px;
    cursor: pointer;
    user-select: none;
}

.audit-disclosure-summary:focus-visible {
    outline: none;
}

.audit-disclosure-control {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    width: 42px;
    height: 28px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.10);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 8px 24px rgba(0,0,0,0.18);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    transition: transform 0.22s ease, background 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.audit-disclosure-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.70);
}

.audit-disclosure-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    margin-left: 10px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
}

.audit-disclosure[open] .audit-disclosure-control {
    transform: rotate(90deg);
    background: rgba(10, 132, 255, 0.18);
    border-color: rgba(10, 132, 255, 0.28);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.10), 0 10px 28px rgba(10,132,255,0.16);
}

.audit-disclosure-summary:hover .audit-disclosure-control,
.audit-disclosure-summary:focus-visible .audit-disclosure-control {
    background: rgba(255, 255, 255, 0.09);
    border-color: rgba(255, 255, 255, 0.14);
}

.audit-disclosure-summary:hover .audit-disclosure-count,
.audit-disclosure-summary:focus-visible .audit-disclosure-count {
    color: var(--text);
    border-color: rgba(255, 255, 255, 0.12);
}

.audit-disclosure-body {
    padding: 0 18px 18px;
}

html[data-theme="light"] .audit-disclosure-control {
    background: rgba(15, 23, 42, 0.04);
    border-color: rgba(15, 23, 42, 0.08);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.8), 0 10px 28px rgba(15,23,42,0.08);
}

html[data-theme="light"] .audit-disclosure-dot {
    background: rgba(15, 23, 42, 0.48);
}

html[data-theme="light"] .audit-disclosure-count {
    color: #64748b;
    background: rgba(15, 23, 42, 0.03);
    border-color: rgba(15, 23, 42, 0.08);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.9);
}

html[data-theme="light"] .audit-disclosure[open] .audit-disclosure-control {
    background: rgba(10, 132, 255, 0.12);
    border-color: rgba(10, 132, 255, 0.20);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.9), 0 10px 24px rgba(10,132,255,0.12);
}

@media (max-width: 820px) {
    .audit-disclosure-summary {
        min-height: 48px;
        padding: 12px 14px;
    }

    .audit-disclosure-body {
        padding: 0 14px 14px;
    }
}


/* --- apple design system unification: final pass --- */
:root {
    --radius-xs: 12px;
    --radius-sm: 16px;
    --radius-md: 20px;
    --radius-lg: 26px;
    --shadow-soft: 0 14px 36px rgba(0, 0, 0, 0.18);
    --shadow-card: 0 18px 48px rgba(0, 0, 0, 0.22);
    --shadow-strong: 0 26px 64px rgba(0, 0, 0, 0.28);
    --surface-glass: color-mix(in srgb, var(--panel-2) 88%, transparent);
    --surface-glass-soft: color-mix(in srgb, var(--panel) 90%, transparent);
    --field-height: 48px;
    --button-height: 46px;
    --toolbar-height: 42px;
}

html[data-theme="light"] {
    --shadow-soft: 0 12px 28px rgba(15, 23, 42, 0.08);
    --shadow-card: 0 16px 36px rgba(15, 23, 42, 0.10);
    --shadow-strong: 0 22px 52px rgba(15, 23, 42, 0.12);
}

html {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

body {
    line-height: 1.5;
    letter-spacing: -0.011em;
}

.sidebar {
    padding: 26px 20px;
}

.brand,
.card,
.nav-group,
.sidebar-footer,
.calendar-day,
.notes-box,
.hint-box,
.detail-list div,
.simple-list li,
.timeline-item,
.toggle-chip,
.flash,
.theme-toggle,
.language-switch,
.export-menu-panel {
    backdrop-filter: blur(22px) saturate(135%);
    -webkit-backdrop-filter: blur(22px) saturate(135%);
}

.brand {
    padding: 18px 18px 20px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
}

.brand-logo {
    justify-content: center;
    align-items: center;
}

.brand-logo-image {
    width: min(100%, 150px);
}

.brand-subtitle {
    margin-top: 12px;
    text-align: center;
    font-size: 0.9rem;
    letter-spacing: -0.01em;
}

.nav-group {
    border-radius: var(--radius-md);
    padding: 12px;
}

.nav-link {
    min-height: 46px;
    padding: 12px 14px;
    border-radius: 15px;
    font-weight: 560;
    letter-spacing: -0.012em;
}

.nav-link:hover {
    transform: translateY(-1px);
}

.sidebar-footer {
    border-radius: var(--radius-md);
}

.content {
    padding: 28px;
}

.utility-bar {
    margin-bottom: 18px;
}

.page-header {
    gap: 20px;
    margin-bottom: 24px;
}

.page-header h1 {
    font-size: clamp(1.9rem, 2.6vw, 2.35rem);
    letter-spacing: -0.04em;
}

.page-header p,
.card p,
.notes-box p,
.hint-box p,
.empty-state {
    line-height: 1.62;
}

.card {
    padding: 24px;
    border-radius: var(--radius-lg);
    background: var(--surface-glass);
    box-shadow: var(--shadow-card);
}

.card-header {
    margin-bottom: 18px;
}

.card-header h2,
.card-header h3 {
    font-size: 1.08rem;
    letter-spacing: -0.022em;
}

.stats-grid {
    gap: 18px;
}

.stat-card {
    min-height: 132px;
}

.stat-label {
    font-size: 0.9rem;
    letter-spacing: -0.012em;
}

.stat-value {
    font-size: clamp(1.8rem, 2vw, 2.1rem);
    letter-spacing: -0.045em;
}

.table-wrap,
.table-responsive {
    border-radius: var(--radius-md);
}

.table {
    border-collapse: separate;
    border-spacing: 0;
}

.table th,
.table td {
    padding: 14px 14px;
}

.table th {
    font-size: 0.74rem;
    letter-spacing: 0.11em;
}

.table tbody tr {
    transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.table tbody tr:hover {
    transform: translateY(-1px);
}

.field {
    gap: 9px;
}

.field label {
    font-size: 0.84rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}

input,
select,
textarea {
    border-radius: var(--radius-sm);
    min-height: var(--field-height);
    padding: 12px 15px;
    border-color: color-mix(in srgb, var(--line-strong) 82%, transparent);
    background: color-mix(in srgb, var(--input-bg) 96%, transparent);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.04), 0 1px 0 rgba(255,255,255,0.02);
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease, background 0.18s ease;
}

textarea {
    min-height: 128px;
}

input:hover,
select:hover,
textarea:hover {
    border-color: color-mix(in srgb, var(--accent) 22%, var(--line-strong));
}

input:focus,
select:focus,
textarea:focus {
    box-shadow: 0 0 0 4px rgba(10, 132, 255, 0.12), inset 0 1px 0 rgba(255,255,255,0.05);
    transform: translateY(-1px);
}

.button,
.view-tab,
.export-menu-toggle,
.utility-controls-shell .language-switch-button,
.utility-controls-shell .theme-toggle-button {
    min-height: var(--button-height);
    border-radius: var(--radius-sm);
    font-weight: 620;
    letter-spacing: -0.014em;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.button {
    padding: 11px 16px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.04), 0 10px 24px rgba(0,0,0,0.12);
}

.button.small {
    min-height: 38px;
    border-radius: 13px;
}

.button:hover,
.view-tab:hover,
.export-menu-toggle:hover,
.utility-controls-shell .language-switch-button:hover,
.utility-controls-shell .theme-toggle-button:hover {
    transform: translateY(-1px);
}

.button:active,
.view-tab:active,
.export-menu-toggle:active,
.utility-controls-shell .language-switch-button:active,
.utility-controls-shell .theme-toggle-button:active {
    transform: translateY(0);
}

.badge,
.stage-chip {
    min-height: 28px;
    padding: 6px 11px;
    border-radius: 999px;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.detail-list,
.two-column,
.detail-grid,
.three-column,
.form-grid {
    gap: 18px;
}

.detail-list div,
.notes-box,
.hint-box,
.simple-list li,
.timeline-item {
    border-radius: var(--radius-md);
}

.notes-box,
.hint-box {
    padding: 18px 20px;
}

.timeline-item {
    padding: 18px;
}

.toolbar,
.toolbar-group,
.header-actions,
.form-actions,
.filter-actions {
    gap: 12px;
}

.view-tab {
    border-radius: 999px;
    padding: 0.68rem 1rem;
}

.calendar-day {
    border-radius: var(--radius-md);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.04), var(--shadow-soft);
}

.calendar-event {
    border-radius: 15px;
}

.export-menu-panel {
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-strong);
}

.export-menu-item {
    min-height: 44px;
    border-radius: 14px;
}

.utility-controls-shell {
    min-height: var(--toolbar-height);
    border-radius: 999px;
    padding: 4px;
    background: color-mix(in srgb, var(--panel-2) 88%, transparent);
    border: 1px solid color-mix(in srgb, var(--line-strong) 84%, transparent);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(24px) saturate(140%);
    -webkit-backdrop-filter: blur(24px) saturate(140%);
}

.utility-controls-shell .utility-divider {
    width: 1px;
    align-self: stretch;
    margin: 4px 2px;
    background: color-mix(in srgb, var(--line-strong) 80%, transparent);
}

.utility-controls-shell .language-switch-button,
.utility-controls-shell .theme-toggle-button {
    min-width: 40px;
    min-height: 34px;
    padding: 0 12px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    box-shadow: none;
    font-size: 0.84rem;
}

.utility-controls-shell .theme-toggle-button {
    padding: 0 10px;
}

.utility-controls-shell .language-switch-button.active,
.utility-controls-shell .theme-toggle-button.active {
    background: linear-gradient(180deg, rgba(255,255,255,0.14) 0%, rgba(255,255,255,0.08) 100%);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.10), 0 8px 18px rgba(0,0,0,0.16);
}

html[data-theme="light"] .utility-controls-shell .language-switch-button.active,
html[data-theme="light"] .utility-controls-shell .theme-toggle-button.active {
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.08) 0%, rgba(15, 23, 42, 0.04) 100%);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.92), 0 8px 18px rgba(15,23,42,0.08);
}

.audit-disclosure {
    padding: 0;
    overflow: hidden;
}

.audit-disclosure-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    min-height: 54px;
    padding: 14px 18px;
}

.audit-disclosure-leading {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.audit-disclosure-label {
    color: rgba(156, 163, 175, 0.86);
    font-size: 0.76rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    white-space: nowrap;
}

html[data-theme="light"] .audit-disclosure-label {
    color: rgba(107, 114, 128, 0.9);
}

.audit-disclosure-control {
    width: 34px;
    height: 34px;
    border-radius: 999px;
}

.audit-disclosure-count {
    min-width: 34px;
    height: 28px;
    padding: 0 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-size: 0.74rem;
    font-weight: 700;
}

.audit-disclosure-body {
    padding: 0 18px 18px;
}

.flash {
    border-radius: var(--radius-sm);
}

html[data-theme="light"] .card,
html[data-theme="light"] .brand,
html[data-theme="light"] .nav-group,
html[data-theme="light"] .sidebar-footer,
html[data-theme="light"] .utility-controls-shell,
html[data-theme="light"] .export-menu-panel {
    box-shadow: var(--shadow-card);
}

@media (max-width: 1180px) {
    .content {
        padding: 22px;
    }

    .page-header {
        margin-bottom: 20px;
    }
}

@media (max-width: 760px) {
    .sidebar {
        padding: 20px 16px;
    }

    .content {
        padding: 16px;
    }

    .card {
        padding: 18px;
        border-radius: var(--radius-md);
    }

    .button,
    .view-tab,
    .export-menu-toggle {
        min-height: 42px;
    }

    .audit-disclosure-summary {
        min-height: 50px;
        padding: 12px 14px;
    }

    .audit-disclosure-label {
        font-size: 0.72rem;
    }

    .audit-disclosure-body {
        padding: 0 14px 14px;
    }
}


/* --- Unified micro-interactions for tables, forms and dashboard cards --- */
.card,
.stat-card,
.calendar-day,
.timeline-item,
.simple-list li,
.detail-list div,
.notes-box,
.hint-box,
.nav-group,
.brand,
.sidebar-footer,
.table-wrap,
.table-responsive {
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.card:hover,
.stat-card:hover,
.calendar-day:hover,
.timeline-item:hover,
.simple-list li:hover,
.detail-list div:hover,
.notes-box:hover,
.hint-box:hover {
    transform: translateY(-1px);
    box-shadow: var(--elevated-shadow);
    border-color: var(--line-strong);
}

.stat-card {
    position: relative;
    overflow: hidden;
}

.stat-card::after,
.card::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    background: linear-gradient(180deg, rgba(255,255,255,0.08) 0%, transparent 28%);
    opacity: 0;
    transition: opacity 0.22s ease;
}

.stat-card:hover::after,
.card:hover::after {
    opacity: 1;
}

.field label {
    font-size: 0.84rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}

input, select, textarea {
    min-height: 48px;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, transform 0.18s ease;
    box-shadow: var(--form-shadow);
}

textarea {
    min-height: 120px;
}

input:hover, select:hover, textarea:hover {
    border-color: var(--line-strong);
}

input:focus, select:focus, textarea:focus {
    transform: translateY(-1px);
    box-shadow: var(--form-focus-ring);
}

input::placeholder,
textarea::placeholder {
    color: color-mix(in srgb, var(--muted) 88%, transparent);
}

.button,
.view-tab,
.nav-link,
.toggle-chip,
.badge,
.stage-chip,
.export-menu-item,
.theme-toggle-button {
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, border-color 0.18s ease, color 0.18s ease, opacity 0.18s ease;
}

.button {
    min-height: 44px;
    box-shadow: var(--button-shadow);
}

.button:hover,
.view-tab:hover,
.toggle-chip:hover,
.theme-toggle-button:hover {
    transform: translateY(-1px);
}

.button:hover {
    box-shadow: var(--button-shadow-hover);
}

.button:active,
.view-tab:active,
.toggle-chip:active,
.theme-toggle-button:active,
.nav-link:active {
    transform: translateY(0);
}

.button:focus-visible,
.view-tab:focus-visible,
.toggle-chip:focus-visible,
.theme-toggle-button:focus-visible,
.nav-link:focus-visible,
.export-menu summary:focus-visible,
.export-menu-item:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: none;
    box-shadow: var(--form-focus-ring);
}

.table th {
    color: var(--table-head-text);
}

.table tbody tr {
    transform-origin: center;
}

.table tbody tr:hover {
    transform: translateY(-1px);
    box-shadow: inset 0 0 0 1px var(--table-border);
}

.table td {
    transition: background 0.18s ease, color 0.18s ease;
}

.table a {
    transition: opacity 0.18s ease, color 0.18s ease;
}

.table a:hover {
    opacity: 0.88;
}

.dashboard-controls-grid .toggle-chip,
.inline-badge-row .badge {
    backdrop-filter: blur(18px);
}

.card-header h2,
.card-header h3,
.page-header h1,
.stat-value {
    letter-spacing: -0.025em;
}

.page-header p,
.notes-box p,
.timeline-content p,
.empty-state,
.sidebar-footer,
.brand-subtitle {
    line-height: 1.65;
}

.table-wrap,
.table-responsive {
    border-radius: 18px;
}

html[data-theme="light"] .card:hover,
html[data-theme="light"] .stat-card:hover,
html[data-theme="light"] .calendar-day:hover,
html[data-theme="light"] .timeline-item:hover,
html[data-theme="light"] .simple-list li:hover,
html[data-theme="light"] .detail-list div:hover,
html[data-theme="light"] .notes-box:hover,
html[data-theme="light"] .hint-box:hover {
    box-shadow: 0 18px 34px rgba(15, 23, 42, 0.10);
}

@media (prefers-reduced-motion: reduce) {
    .card,
    .stat-card,
    .calendar-day,
    .timeline-item,
    .simple-list li,
    .detail-list div,
    .notes-box,
    .hint-box,
    .button,
    .view-tab,
    .nav-link,
    .toggle-chip,
    .badge,
    .stage-chip,
    .export-menu-item,
    .theme-toggle-button,
    input,
    select,
    textarea,
    .table tbody tr {
        transition: none !important;
        transform: none !important;
    }
}

/* === Unified list/detail headers, actions & filters system === */
.page-header {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 18px;
    margin: 0 0 18px;
    padding: 20px 22px;
    border-radius: calc(var(--radius) + 2px);
    border: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(255,255,255,0.045) 0%, rgba(255,255,255,0.02) 100%), var(--card-bg);
    box-shadow: 0 18px 46px rgba(0, 0, 0, 0.14);
    overflow: hidden;
}
html[data-theme="light"] .page-header {
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
}
.page-header::after {
    content: "";
    position: absolute;
    inset: 0 auto auto 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, rgba(255,255,255,0.18), transparent 45%);
    pointer-events: none;
}
.page-header > div:first-child {
    min-width: 0;
}
.page-header h1 {
    margin: 0 0 8px;
    font-size: clamp(1.72rem, 1.3rem + 1vw, 2.15rem);
    line-height: 1.04;
    letter-spacing: -0.032em;
    font-weight: 700;
}
.page-header p,
.page-header .muted {
    margin: 0;
    max-width: 72ch;
    color: color-mix(in srgb, var(--muted) 92%, var(--text) 8%);
    font-size: 0.95rem;
    line-height: 1.5;
}

.header-actions,
.form-actions,
.filter-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
}
.header-actions {
    padding: 6px;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: color-mix(in srgb, var(--panel) 78%, transparent);
    backdrop-filter: blur(16px);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
}
.header-actions > .button,
.header-actions > a.button,
.header-actions > button.button {
    min-height: 40px;
    padding: 0 15px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

.view-tabs {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 18px;
    padding: 6px;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: color-mix(in srgb, var(--panel) 82%, transparent);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
}
.view-tab {
    min-height: 38px;
    padding: 0 16px;
    border-radius: 13px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.filter-card {
    position: relative;
    margin: 0 0 18px;
    padding-top: 18px;
}
.filter-card::before {
    content: "";
    display: block;
    margin: -2px 0 14px;
    width: 56px;
    height: 5px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--muted) 42%, transparent);
    opacity: 0.42;
}
.filter-card form {
    width: 100%;
}
.filters-grid {
    align-items: end;
    gap: 14px;
}
.filter-actions {
    min-height: 48px;
    align-self: end;
}
.filter-actions .button,
.filter-actions a.button {
    min-height: 40px;
    padding-inline: 15px;
    border-radius: 14px;
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid color-mix(in srgb, var(--line) 85%, transparent);
}
.card-header h2,
.card-header h3 {
    margin: 0;
    letter-spacing: -0.022em;
}
.card-header > div > .muted,
.card-header > .muted {
    font-size: 0.9rem;
}

.detail-grid {
    gap: 18px;
}
.detail-list > div {
    min-height: 58px;
    border-radius: 16px;
}
.table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
}
.table tbody tr td:last-child {
    white-space: nowrap;
}

.notes-box,
.audit-disclosure,
.compliance-summary-card,
.filter-card,
.page-header {
    scroll-margin-top: 18px;
}

@media (max-width: 980px) {
    .page-header {
        grid-template-columns: 1fr;
        align-items: stretch;
    }
    .header-actions,
    .form-actions,
    .filter-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 640px) {
    .page-header {
        padding: 18px;
        border-radius: 20px;
    }
    .header-actions {
        width: 100%;
    }
    .header-actions > .button,
    .header-actions > a.button,
    .header-actions > button.button,
    .filter-actions .button,
    .filter-actions a.button,
    .view-tab {
        flex: 1 1 auto;
    }
    .view-tabs {
        width: 100%;
    }
}

/* === Final dashboard toolbar alignment fix === */
.page-header.dashboard-header-slim {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
}

.dashboard-toolbar-wrap {
    min-width: 0;
    width: auto;
    max-width: 100%;
    justify-self: end;
    align-self: center;
}

.dashboard-toolbar-shell {
    width: auto;
    min-width: 0;
    max-width: 100%;
    min-height: 62px;
    padding: 8px 10px;
    border-radius: 22px;
}

.dashboard-toolbar-mode {
    width: auto;
    flex-wrap: nowrap;
    justify-content: flex-end;
}

.dashboard-segment-control {
    flex: 0 0 auto;
}

.dashboard-toolbar-edit-trigger,
.dashboard-toolbar-primary,
.dashboard-toolbar-edit .button,
.dashboard-toolbar-status {
    flex: 0 0 auto;
    min-height: 40px;
}

@media (max-width: 1180px) {
    .page-header.dashboard-header-slim {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .dashboard-toolbar-wrap {
        width: 100%;
        justify-self: stretch;
    }

    .dashboard-toolbar-shell,
    .dashboard-toolbar-mode {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
    }
}


.app-modal[hidden],
.app-modal-backdrop[hidden],
.app-sheet[hidden],
.app-sheet-backdrop[hidden] {
    display: none !important;
}

/* === Unified dialog / modal system === */
body.modal-open {
    overflow: hidden;
}

.app-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 900;
    background: rgba(3, 8, 20, 0.48);
    backdrop-filter: blur(12px) saturate(140%);
    -webkit-backdrop-filter: blur(12px) saturate(140%);
}

.app-modal {
    position: fixed;
    inset: 0;
    z-index: 910;
    display: grid;
    place-items: center;
    padding: 24px;
}

.app-modal-surface {
    width: min(100%, 440px);
    padding: 22px;
    border-radius: 28px;
    border: 1px solid color-mix(in srgb, var(--line-strong) 90%, transparent);
    background: linear-gradient(180deg, color-mix(in srgb, var(--panel) 92%, transparent) 0%, color-mix(in srgb, var(--panel-2) 94%, transparent) 100%);
    box-shadow: 0 32px 80px rgba(0, 0, 0, 0.34), inset 0 1px 0 rgba(255,255,255,0.10);
    backdrop-filter: blur(26px) saturate(160%);
    -webkit-backdrop-filter: blur(26px) saturate(160%);
}

.app-modal-copy {
    margin-top: 12px;
}

.app-modal-copy h3 {
    margin: 0;
    font-size: 1.18rem;
    line-height: 1.15;
    letter-spacing: -0.022em;
}

.app-modal-copy p {
    margin: 10px 0 0;
    color: var(--muted);
    line-height: 1.55;
}

.app-modal-icon {
    width: 54px;
    height: 54px;
    border-radius: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(180deg, rgba(10,132,255,0.96) 0%, rgba(10,132,255,0.72) 100%);
    box-shadow: 0 16px 34px rgba(10,132,255,0.26), inset 0 1px 0 rgba(255,255,255,0.22);
}

.app-modal[data-variant="danger"] .app-modal-icon {
    background: linear-gradient(180deg, rgba(255,69,58,0.96) 0%, rgba(255,69,58,0.72) 100%);
    box-shadow: 0 16px 34px rgba(255,69,58,0.26), inset 0 1px 0 rgba(255,255,255,0.22);
}

.app-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

.app-modal-actions .button {
    min-height: 42px;
    border-radius: 14px;
    padding-inline: 16px;
}

html[data-theme="light"] .app-modal-backdrop {
    background: rgba(148, 163, 184, 0.32);
}

html[data-theme="light"] .app-modal-surface {
    background: linear-gradient(180deg, rgba(255,255,255,0.94) 0%, rgba(245,247,252,0.94) 100%);
    box-shadow: 0 26px 64px rgba(15, 23, 42, 0.16), inset 0 1px 0 rgba(255,255,255,0.82);
}

@media (max-width: 640px) {
    .app-modal {
        align-items: end;
        padding: 14px;
    }

    .app-modal-surface {
        width: 100%;
        border-radius: 24px;
        padding: 18px;
    }

    .app-modal-actions {
        flex-direction: column-reverse;
    }

    .app-modal-actions .button {
        width: 100%;
    }
}


/* === Action sheet system === */
.app-sheet-backdrop {
    position: fixed;
    inset: 0;
    z-index: 119;
    background: rgba(2, 6, 23, 0.42);
    backdrop-filter: blur(14px);
}
.app-sheet {
    position: fixed;
    inset: auto 0 0 0;
    z-index: 120;
    display: flex;
    justify-content: center;
    padding: 0 18px 20px;
}
.app-sheet-surface {
    width: min(100%, 560px);
    border-radius: 28px;
    border: 1px solid rgba(255,255,255,0.12);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.96), rgba(9, 14, 28, 0.98));
    box-shadow: 0 30px 80px rgba(2, 6, 23, 0.5), inset 0 1px 0 rgba(255,255,255,0.08);
    padding: 12px;
}
.app-sheet-handle {
    width: 56px;
    height: 5px;
    border-radius: 999px;
    background: rgba(255,255,255,0.16);
    margin: 2px auto 10px;
}
.app-sheet-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 4px 6px 10px;
}
.app-sheet-header h3 {
    margin: 0;
    font-size: 1rem;
    letter-spacing: -0.02em;
}
.app-sheet-close {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.05);
    color: var(--text);
    cursor: pointer;
}
.app-sheet-body {
    display: grid;
    gap: 8px;
}
.app-sheet-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    min-height: 56px;
    padding: 14px 16px;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.04);
    text-decoration: none;
    color: var(--text);
    transition: transform 140ms ease, background 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
}
.app-sheet-link:hover,
.app-sheet-link:focus-visible {
    background: rgba(255,255,255,0.07);
    border-color: rgba(96, 165, 250, 0.35);
    box-shadow: 0 16px 30px rgba(2, 6, 23, 0.22);
    transform: translateY(-1px);
}
.app-sheet-link-copy {
    display: grid;
    gap: 3px;
}
.app-sheet-link-title {
    font-weight: 600;
    letter-spacing: -0.01em;
}
.app-sheet-link-meta {
    font-size: 0.86rem;
    color: var(--muted);
}
.app-sheet-link-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 14px;
    background: rgba(59,130,246,0.14);
    color: #93c5fd;
    font-size: 1rem;
    flex: 0 0 auto;
}
html[data-theme="light"] .app-sheet-backdrop {
    background: rgba(148, 163, 184, 0.28);
}
html[data-theme="light"] .app-sheet-surface {
    background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(248,250,252,0.98));
    border-color: rgba(15, 23, 42, 0.08);
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.14), inset 0 1px 0 rgba(255,255,255,0.8);
}
html[data-theme="light"] .app-sheet-close,
html[data-theme="light"] .app-sheet-link {
    border-color: rgba(15,23,42,0.08);
    background: rgba(255,255,255,0.88);
}
@media (max-width: 720px) {
    .app-sheet {
        padding: 0 12px 14px;
    }
    .app-sheet-surface {
        width: 100%;
        border-radius: 24px;
    }
}

.inline-badges{display:flex;align-items:center;gap:.5rem;flex-wrap:wrap}
.compact-inline-form{display:flex;gap:.5rem;align-items:center;flex-wrap:wrap;margin-top:.4rem}
.compact-inline-form select,.compact-inline-form input[type="date"],.compact-inline-form input[type="text"]{min-height:38px;padding:.65rem .8rem;border-radius:14px;background:rgba(255,255,255,.04);border:1px solid var(--line);color:var(--text-primary)}
.compact-inline-form .button{min-height:38px}
.table td .compact-inline-form{margin-top:.55rem}


.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.utility-bar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.role-switch-shell {
  display: inline-flex;
  align-items: center;
  height: 44px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(13, 21, 38, 0.72);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), 0 18px 40px rgba(0,0,0,0.22);
  backdrop-filter: blur(18px);
}

.role-switch-select {
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  background: transparent;
  color: rgba(255,255,255,0.92);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding-right: 18px;
  outline: none;
  cursor: pointer;
}

html[data-theme="light"] .role-switch-shell {
  border-color: rgba(15,23,42,0.08);
  background: rgba(255,255,255,0.82);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.8), 0 16px 32px rgba(15,23,42,0.08);
}

html[data-theme="light"] .role-switch-select {
  color: rgba(15,23,42,0.86);
}

/* === 2026-03-23 UI refinement patch: monthly analytics, role switch, priority translations === */
.monthly-analytics-header-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(220px, 1fr));
    gap: 12px;
    align-items: stretch;
}

.monthly-analytics-header-actions > .button,
.monthly-analytics-header-actions > .export-menu,
.monthly-analytics-header-actions .export-menu-toggle {
    width: 100%;
    min-height: 54px;
}

.monthly-analytics-header-actions .button,
.monthly-analytics-header-actions .export-menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 18px;
    padding: 0 18px;
    text-align: center;
}

.month-picker-field {
    position: relative;
}

.month-picker-shell {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 58px;
    padding: 0 16px;
    border-radius: 18px;
    border: 1px solid rgba(10, 132, 255, 0.28);
    background: linear-gradient(180deg, rgba(10, 132, 255, 0.10) 0%, rgba(10, 132, 255, 0.04) 100%);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 14px 26px rgba(0,0,0,0.22);
}

.month-picker-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 12px;
    background: rgba(10, 132, 255, 0.16);
    font-size: 1rem;
}

.month-picker-input {
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    min-height: 48px;
    padding: 0 !important;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.month-picker-input::-webkit-calendar-picker-indicator {
    cursor: pointer;
    opacity: 1;
}

.form-hint {
    margin-top: 8px;
    font-size: 0.8rem;
    line-height: 1.35;
}

.form-hint.accent {
    color: color-mix(in srgb, var(--text) 82%, var(--accent) 18%);
}

.active-layers-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.active-layers-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.active-layer-pill {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 16px;
    border: 1px solid var(--line-strong);
    background: color-mix(in srgb, var(--panel-2) 84%, transparent);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
}

.active-layer-pill strong {
    font-size: 1rem;
    line-height: 1;
}

.active-layer-pill span:last-child {
    color: var(--muted);
    font-size: 0.84rem;
    font-weight: 600;
}

.active-layers-hint {
    margin-top: -2px;
}

.role-switch-shell {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-height: 50px;
    padding: 0 10px 0 14px;
    border-radius: 18px;
    border: 1px solid var(--line-strong);
    background: color-mix(in srgb, var(--panel-2) 88%, transparent);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.07), 0 16px 28px rgba(0,0,0,0.20);
    backdrop-filter: blur(24px);
}

.role-switch-label {
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.role-switch-control {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 160px;
    padding: 8px 12px;
    border-radius: 14px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.06);
}

.role-switch-select {
    flex: 1 1 auto;
    min-width: 0;
    padding-right: 0;
    font-size: 0.95rem;
    font-weight: 700;
}

.role-switch-chevron {
    color: var(--muted);
    font-size: 0.82rem;
    line-height: 1;
}

.button,
.button.primary,
.export-menu-toggle,
.utility-controls-flat .utility-chip,
.priority-chip,
.role-switch-shell,
.role-switch-control,
.badge,
.stage-chip {
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 14px 26px rgba(0,0,0,0.20) !important;
}

.button.primary,
.utility-controls-flat .utility-chip.active,
.utility-controls-flat .utility-chip.active:hover {
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.12), 0 14px 26px rgba(0,0,0,0.24) !important;
}

.priority-chip {
    background: color-mix(in srgb, var(--panel) 90%, transparent);
}

.priority-chip-value {
    min-width: 40px;
    height: 36px;
}

html[data-theme="light"] .month-picker-shell {
    border-color: rgba(10, 132, 255, 0.18);
    background: linear-gradient(180deg, rgba(10, 132, 255, 0.08) 0%, rgba(255,255,255,0.96) 100%);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.96), 0 14px 26px rgba(15,23,42,0.10);
}

html[data-theme="light"] .month-picker-icon {
    background: rgba(10, 132, 255, 0.12);
}

html[data-theme="light"] .active-layer-pill,
html[data-theme="light"] .role-switch-control {
    background: rgba(255,255,255,0.78);
    border-color: rgba(15,23,42,0.08);
}

html[data-theme="light"] .role-switch-shell,
html[data-theme="light"] .button,
html[data-theme="light"] .button.primary,
html[data-theme="light"] .export-menu-toggle,
html[data-theme="light"] .utility-controls-flat .utility-chip,
html[data-theme="light"] .priority-chip,
html[data-theme="light"] .badge,
html[data-theme="light"] .stage-chip {
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.92), 0 14px 26px rgba(15,23,42,0.10) !important;
}

@media (max-width: 920px) {
    .monthly-analytics-header-actions {
        grid-template-columns: 1fr;
    }

    .role-switch-shell {
        width: 100%;
        justify-content: space-between;
    }

    .role-switch-control {
        min-width: 0;
        flex: 1 1 auto;
    }
}


/* === 2026-03-23 UI patch 2: export dropdown, role switch parity, filter button sizing === */
.monthly-analytics-page .page-header,
.monthly-analytics-page .header-actions,
.monthly-analytics-page .monthly-analytics-header-actions {
    overflow: visible;
}

.monthly-analytics-page .page-header {
    z-index: 3;
}

.monthly-export-menu {
    position: relative;
    isolation: isolate;
}

.monthly-export-menu[open] {
    z-index: 80;
}

.monthly-export-menu .export-menu-panel {
    top: calc(100% + 10px);
    right: 0;
    min-width: 100%;
    width: max(280px, 100%);
}

.role-switch-shell {
    min-height: var(--toolbar-height);
    padding: 4px;
    gap: 0;
    border-radius: 999px;
    border: 1px solid color-mix(in srgb, var(--line-strong) 84%, transparent);
    background: color-mix(in srgb, var(--panel-2) 88%, transparent);
    box-shadow: var(--shadow-soft) !important;
    backdrop-filter: blur(24px) saturate(140%);
    -webkit-backdrop-filter: blur(24px) saturate(140%);
}

.role-switch-shell .utility-divider {
    width: 1px;
    align-self: stretch;
    margin: 4px 2px;
    background: color-mix(in srgb, var(--line-strong) 80%, transparent);
}

.role-switch-label {
    min-width: 72px;
    min-height: 34px;
    padding: 0 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    white-space: nowrap;
}

.role-switch-control {
    min-height: 34px;
    min-width: 154px;
    padding: 0 12px 0 14px;
    gap: 8px;
    border-radius: 999px;
    border: 0;
    background: transparent;
    box-shadow: none !important;
}

.role-switch-select {
    min-height: 34px;
    font-size: 0.84rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.role-switch-chevron {
    font-size: 0.78rem;
    color: var(--muted);
}

.role-switch-shell:hover .role-switch-control,
.role-switch-shell:focus-within .role-switch-control {
    background: linear-gradient(180deg, rgba(255,255,255,0.14) 0%, rgba(255,255,255,0.08) 100%);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.10), 0 8px 18px rgba(0,0,0,0.16) !important;
}

html[data-theme="light"] .role-switch-shell {
    box-shadow: var(--shadow-card) !important;
}

html[data-theme="light"] .role-switch-shell .utility-divider {
    background: color-mix(in srgb, var(--line-strong) 72%, transparent);
}

html[data-theme="light"] .role-switch-shell:hover .role-switch-control,
html[data-theme="light"] .role-switch-shell:focus-within .role-switch-control {
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.08) 0%, rgba(15, 23, 42, 0.04) 100%);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.92), 0 8px 18px rgba(15,23,42,0.08) !important;
}

.filter-actions {
    gap: 12px;
}

.filter-actions .button,
.filter-actions a.button {
    min-height: 46px;
    padding-inline: 18px;
    border-radius: 16px;
    font-weight: 620;
}

@media (max-width: 920px) {
    .role-switch-shell {
        width: auto;
    }

    .role-switch-control {
        min-width: 140px;
    }
}

@media (max-width: 640px) {
    .role-switch-shell {
        width: 100%;
        justify-content: space-between;
    }

    .role-switch-control {
        flex: 1 1 auto;
        min-width: 0;
    }
}


/* === 2026-03-23 UI patch 3: centered role pill + refined month picker === */
.role-switch-shell {
    height: 52px !important;
    min-height: 52px !important;
    padding: 6px !important;
    gap: 0 !important;
}

.role-switch-shell .utility-divider,
.role-switch-label {
    display: none !important;
}

.role-switch-shell .role-switch-control {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 138px;
    height: 40px;
    padding: 0;
    border-radius: 999px;
    background: transparent;
    box-shadow: none !important;
}

.role-switch-shell .role-switch-select {
    appearance: none;
    -webkit-appearance: none;
    width: 100%;
    height: 40px;
    margin: 0;
    padding: 0 34px;
    border: 0;
    background: transparent;
    color: var(--text);
    font-size: 0.94rem;
    font-weight: 800;
    letter-spacing: -0.01em;
    text-align: center;
    text-align-last: center;
    cursor: pointer;
}

.role-switch-shell .role-switch-chevron {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.74rem;
    pointer-events: none;
}

.role-switch-shell:hover .role-switch-control,
.role-switch-shell:focus-within .role-switch-control {
    background: linear-gradient(180deg, rgba(255,255,255,0.10) 0%, rgba(255,255,255,0.06) 100%);
}

html[data-theme="light"] .role-switch-shell:hover .role-switch-control,
html[data-theme="light"] .role-switch-shell:focus-within .role-switch-control {
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.06) 0%, rgba(15, 23, 42, 0.03) 100%);
}

.month-picker-field {
    min-width: 0;
}

.month-picker-shell {
    position: relative;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    column-gap: 14px;
    min-height: 74px;
    padding: 14px 18px;
    border-radius: 24px;
    border: 1px solid color-mix(in srgb, var(--accent) 18%, var(--line-strong));
    background:
        linear-gradient(180deg, rgba(255,255,255,0.07) 0%, rgba(255,255,255,0.03) 100%),
        color-mix(in srgb, var(--panel-2) 90%, transparent);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), var(--shadow-card);
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.month-picker-shell:hover,
.month-picker-shell:focus-within {
    transform: translateY(-1px);
    border-color: color-mix(in srgb, var(--accent) 34%, var(--line-strong));
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.10), 0 20px 40px rgba(0,0,0,0.24);
}

.month-picker-icon {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(10,132,255,0.20) 0%, rgba(10,132,255,0.12) 100%);
    border: 1px solid rgba(10,132,255,0.16);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.10);
    font-size: 1.05rem;
}

.month-picker-copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.month-picker-caption {
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.month-picker-value {
    display: block;
    min-width: 0;
    color: var(--text);
    font-size: 1.18rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.month-picker-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 84px;
    height: 34px;
    padding: 0 14px;
    border-radius: 999px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.08);
    color: var(--text);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.month-picker-input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.month-picker-input::-webkit-calendar-picker-indicator {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.form-hint.accent {
    margin-top: 10px;
}

html[data-theme="light"] .month-picker-shell {
    border-color: rgba(10,132,255,0.14);
    background:
        linear-gradient(180deg, rgba(255,255,255,0.96) 0%, rgba(246,249,253,0.94) 100%),
        rgba(255,255,255,0.92);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.96), var(--shadow-card);
}

html[data-theme="light"] .month-picker-shell:hover,
html[data-theme="light"] .month-picker-shell:focus-within {
    border-color: rgba(10,132,255,0.24);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.98), 0 18px 34px rgba(15,23,42,0.10);
}

html[data-theme="light"] .month-picker-icon {
    background: linear-gradient(180deg, rgba(10,132,255,0.12) 0%, rgba(10,132,255,0.08) 100%);
    border-color: rgba(10,132,255,0.10);
}

html[data-theme="light"] .month-picker-badge {
    background: rgba(15,23,42,0.04);
    border-color: rgba(15,23,42,0.07);
}

@media (max-width: 920px) {
    .month-picker-shell {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .month-picker-badge {
        display: none;
    }
}

.site-briefing-preview {
    border: 1px solid rgba(120, 146, 196, 0.2);
    border-radius: 24px;
    padding: 18px;
    background: linear-gradient(180deg, rgba(22, 30, 47, 0.92), rgba(8, 13, 23, 0.96));
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.05), 0 18px 38px rgba(4, 10, 20, 0.24);
}

.site-briefing-preview.is-empty {
    opacity: 0.92;
}

.briefing-check-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}

.briefing-check-card {
    border-radius: 18px;
    border: 1px solid rgba(255,255,255,0.08);
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    background: rgba(255,255,255,0.03);
}

.briefing-check-card strong {
    font-size: 0.92rem;
}

.briefing-check-card span {
    color: var(--muted);
    font-size: 0.84rem;
}

.briefing-check-card.state-ok {
    border-color: rgba(46, 160, 67, 0.36);
    background: rgba(46, 160, 67, 0.09);
}

.briefing-check-card.state-warning {
    border-color: rgba(227, 179, 65, 0.34);
    background: rgba(227, 179, 65, 0.1);
}

.briefing-check-card.state-blocked {
    border-color: rgba(218, 54, 51, 0.34);
    background: rgba(218, 54, 51, 0.1);
}

.briefing-check-card.state-muted {
    border-color: rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.03);
}

.compliance-alert-danger {
    border-color: rgba(218, 54, 51, 0.28);
    background: rgba(218, 54, 51, 0.12);
    color: #ffd7d5;
}

.compliance-alert-success {
    border-color: rgba(46, 160, 67, 0.28);
    background: rgba(46, 160, 67, 0.12);
    color: #d7f8de;
}

.mobile-briefing-card .detail-grid,
.site-briefing-preview .detail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 980px) {
    .mobile-briefing-card .detail-grid,
    .site-briefing-preview .detail-grid {
        grid-template-columns: 1fr;
    }
}

.signature-pad-shell {
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 20px;
    background: linear-gradient(180deg, rgba(15,23,42,0.96) 0%, rgba(15,23,42,0.9) 100%);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.04), 0 12px 28px rgba(2, 6, 23, 0.24);
    padding: 14px;
}
.signature-pad {
    width: 100%;
    height: 180px;
    display: block;
    border-radius: 16px;
    background: #0f172a;
    touch-action: none;
    cursor: crosshair;
}
.signature-pad-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-top: 10px;
}
.signature-preview-card {
    display: grid;
    gap: 8px;
    padding: 14px 16px;
    border-radius: 18px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.04);
}
.signature-preview-image {
    max-width: 280px;
    width: 100%;
    height: auto;
    border-radius: 12px;
    background: #ffffff;
    padding: 6px;
}
.signature-list-preview {
    display: block;
    margin-top: 8px;
    max-width: 220px;
    width: 100%;
    height: auto;
    border-radius: 12px;
    background: #ffffff;
    padding: 6px;
}
@media (max-width: 760px) {
    .signature-pad { height: 160px; }
    .signature-pad-toolbar { flex-direction: column; align-items: flex-start; }
}

/* --- Auth & user management --- */
.auth-page {
    min-height: 100vh;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px;
    background:
        radial-gradient(circle at top right, rgba(77, 120, 255, 0.18), transparent 28%),
        radial-gradient(circle at bottom left, rgba(60, 180, 120, 0.12), transparent 24%),
        var(--bg-primary, #0b1020);
}

.auth-shell {
    width: min(100%, 520px);
}

.auth-card {
    padding: 28px;
    border-radius: 28px;
}

.auth-brand {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 20px;
}

.auth-logo {
    width: 56px;
    height: 56px;
    object-fit: contain;
    filter: drop-shadow(0 8px 24px rgba(0,0,0,0.22));
}

.auth-form {
    padding: 0;
    background: transparent;
    box-shadow: none;
    border: 0;
}

.auth-actions {
    justify-content: flex-end;
}

.account-shell {
    gap: 8px;
}

.account-chip {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 42px;
    padding-inline: 14px;
}

.account-chip-name {
    font-weight: 600;
}

.account-chip-meta {
    font-size: 12px;
    opacity: 0.82;
}

.utility-button-chip {
    border: 0;
    background: transparent;
    cursor: pointer;
    font: inherit;
}

.table-actions-stack {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

.link-button {
    border: 0;
    background: transparent;
    padding: 0;
    margin: 0;
    color: inherit;
    cursor: pointer;
    font: inherit;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.danger-link {
    color: #ff7272;
}

.scope-card {
    margin-top: 18px;
    padding: 18px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.scope-header h3 {
    margin: 0 0 6px;
}

.scope-toggle-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 16px 0 18px;
}

.scope-toggle-pill {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.scope-toggle-pill input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.scope-toggle-pill span {
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    padding: 0 16px;
    border-radius: 999px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.08);
    font-weight: 600;
}

.scope-toggle-pill input:checked + span {
    background: rgba(77, 120, 255, 0.20);
    border-color: rgba(119, 149, 255, 0.36);
}

.selection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
}

.selection-grid.is-disabled {
    opacity: 0.48;
}

.selection-tile {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-height: 88px;
    padding: 14px 16px 14px 42px;
    border-radius: 18px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    cursor: pointer;
}

.selection-tile input {
    position: absolute;
    left: 14px;
    top: 16px;
}

.selection-title {
    font-weight: 600;
}

.selection-subtitle {
    font-size: 12px;
    opacity: 0.74;
}

html[data-theme="light"] .scope-card {
    background: rgba(244, 247, 252, 0.9);
    border-color: rgba(17, 24, 39, 0.08);
}

html[data-theme="light"] .scope-toggle-pill span,
html[data-theme="light"] .selection-tile {
    background: rgba(255,255,255,0.86);
    border-color: rgba(17, 24, 39, 0.08);
}

@media (max-width: 860px) {
    .account-chip-meta {
        display: none;
    }
}

.scope-notice-card {
    display: flex;
    align-items: center;
    gap: 0.95rem;
    padding: 0.95rem 1.1rem;
    border-radius: 22px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: linear-gradient(180deg, rgba(18, 30, 52, 0.92), rgba(10, 18, 32, 0.92));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

.scope-notice-copy {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    flex-wrap: wrap;
}

.dashboard-scope-card {
    margin: 0 0 1rem;
}

.monthly-scope-card {
    margin-bottom: 1rem;
}

html[data-theme="light"] .scope-notice-card {
    background: linear-gradient(180deg, rgba(246, 248, 253, 0.98), rgba(236, 241, 249, 0.98));
    border-color: rgba(140, 156, 181, 0.28);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

/* === 2026-03-24 scope hardening + utility/header refinement === */
.account-shell {
    gap: 10px !important;
    padding-inline: 8px !important;
    max-width: min(100%, 760px);
}

.account-shell .utility-chip {
    width: auto !important;
    min-width: 0 !important;
    flex: 0 1 auto !important;
    padding: 0 16px !important;
    letter-spacing: 0 !important;
}

.account-shell .account-chip {
    flex: 1 1 auto !important;
    justify-content: flex-start !important;
    min-width: 220px !important;
    max-width: 360px;
    height: 40px !important;
    padding-inline: 16px 18px !important;
    border-radius: 999px !important;
    background: color-mix(in srgb, var(--panel) 86%, transparent) !important;
    border: 1px solid color-mix(in srgb, var(--line-strong) 86%, transparent) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.08) !important;
}

.account-shell .account-chip-copy {
    display: flex;
    flex-direction: column;
    min-width: 0;
    width: 100%;
    gap: 2px;
}

.account-shell .account-chip-name,
.account-shell .account-chip-meta {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.account-shell .account-chip-name {
    font-size: 0.95rem;
    font-weight: 760;
}

.account-shell .account-chip-meta {
    font-size: 0.72rem;
    letter-spacing: 0.01em;
    opacity: 0.78;
}

.account-shell .utility-chip-link,
.account-shell .utility-button-chip {
    min-width: 96px !important;
    justify-content: center !important;
    padding-inline: 16px !important;
}

.dashboard-toolbar-primary-icon {
    width: 52px !important;
    min-width: 52px !important;
    height: 52px !important;
    padding: 0 !important;
    border-radius: 999px !important;
}

.dashboard-toolbar-plus {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-size: 1.55rem;
    font-weight: 900;
    line-height: 1;
    transform: translateY(-1px);
}

.dashboard-toolbar-primary-icon .dashboard-toolbar-plus {
    pointer-events: none;
}

@media (max-width: 1080px) {
    .utility-bar {
        justify-content: space-between !important;
        gap: 12px;
        flex-wrap: wrap;
    }

    .account-shell {
        max-width: 100%;
    }
}

@media (max-width: 760px) {
    .account-shell {
        width: 100%;
        flex-wrap: wrap;
        justify-content: flex-start !important;
    }

    .account-shell .account-chip {
        max-width: none;
        width: 100%;
    }

    .account-shell .utility-chip-link,
    .account-shell .utility-button-chip {
        min-width: 0 !important;
        flex: 1 1 calc(50% - 5px) !important;
    }
}


/* === 2026-03-24 scope drilldowns + dashboard add pill refinement === */
.list-focus-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.list-focus-card .scope-notice-copy {
    min-width: 0;
}

.dashboard-toolbar-primary-icon {
    background: linear-gradient(180deg, rgba(10,132,255,0.96) 0%, rgba(10,132,255,0.78) 100%) !important;
    color: #fff !important;
    border: 1px solid rgba(10,132,255,0.52) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.12), 0 8px 18px rgba(10,132,255,0.22) !important;
}

.dashboard-toolbar-primary-icon:hover,
.dashboard-toolbar-primary-icon:focus-visible {
    background: linear-gradient(180deg, rgba(10,132,255,1) 0%, rgba(10,132,255,0.84) 100%) !important;
    color: #fff !important;
}

.dashboard-toolbar-plus {
    align-items: center !important;
    justify-content: center !important;
    font-size: 1.68rem !important;
    font-weight: 900 !important;
    line-height: 1 !important;
    transform: none !important;
    margin: 0 !important;
}

html[data-theme="light"] .dashboard-toolbar-primary-icon {
    border-color: rgba(10,132,255,0.36) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.22), 0 10px 22px rgba(10,132,255,0.18) !important;
}

@media (max-width: 860px) {
    .list-focus-card {
        flex-direction: column;
        align-items: flex-start;
    }
}


/* === Sidebar redesign: compact glass accordion with icon-led sections === */
.sidebar-nav-shell {
    display: grid;
    gap: 12px;
    margin-top: 4px;
}

.nav-section {
    position: relative;
    padding: 8px;
    border-radius: 24px;
    border: 1px solid color-mix(in srgb, var(--line) 94%, rgba(255,255,255,0.06));
    background: linear-gradient(180deg, color-mix(in srgb, var(--panel-2) 86%, transparent) 0%, color-mix(in srgb, var(--panel) 92%, transparent) 100%);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), 0 14px 34px rgba(0, 0, 0, 0.14);
    overflow: hidden;
}

.nav-section::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255,255,255,0.07), transparent 34%);
    pointer-events: none;
    opacity: 0.9;
}

.nav-section-trigger {
    position: relative;
    z-index: 1;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 8px 10px;
    border: 0;
    border-radius: 18px;
    background: transparent;
    color: inherit;
    cursor: pointer;
}

.nav-section-trigger-main {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-section-icon {
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    border: 1px solid rgba(122, 177, 255, 0.14);
    background: linear-gradient(180deg, rgba(34, 71, 122, 0.24) 0%, rgba(17, 33, 62, 0.16) 100%);
    color: color-mix(in srgb, var(--text) 88%, #7cc6ff 12%);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
}

.nav-section-icon svg {
    width: 20px;
    height: 20px;
}

.nav-section-title {
    min-width: 0;
    font-size: 0.94rem;
    font-weight: 650;
    letter-spacing: -0.014em;
    color: var(--text);
}

.nav-section-chevron {
    flex: 0 0 30px;
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: var(--muted);
    background: color-mix(in srgb, var(--panel) 72%, transparent);
    border: 1px solid color-mix(in srgb, var(--line) 86%, transparent);
    transition: transform 0.24s ease, color 0.24s ease, background 0.24s ease;
}

.nav-section-trigger:hover {
    background: rgba(255,255,255,0.035);
}

.nav-section-trigger:focus-visible {
    outline: none;
    box-shadow: var(--form-focus-ring);
}

.nav-section-panel {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 8px;
    padding: 0 8px 0 54px;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    pointer-events: none;
    transition: max-height 0.28s ease, opacity 0.18s ease, padding-top 0.24s ease, padding-bottom 0.24s ease;
}

.nav-section.is-open .nav-section-panel {
    max-height: 320px;
    opacity: 1;
    pointer-events: auto;
    padding-top: 6px;
    padding-bottom: 8px;
}

.nav-section.is-open .nav-section-chevron {
    transform: rotate(180deg);
    color: var(--text);
    background: rgba(10, 132, 255, 0.12);
}

.nav-section .nav-link {
    min-height: 44px;
    padding: 0 14px;
    border-radius: 16px;
    align-items: center;
    font-weight: 580;
    background: rgba(255,255,255,0.02);
}

.nav-section .nav-link:hover {
    background: rgba(255,255,255,0.055);
}

.nav-section .nav-link.active {
    background: linear-gradient(180deg, rgba(10,132,255,0.30) 0%, rgba(10,132,255,0.16) 100%);
    border: 1px solid rgba(124,198,255,0.26);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.10), 0 10px 24px rgba(10,132,255,0.12);
}

html[data-theme="light"] .nav-section {
    background: linear-gradient(180deg, rgba(255,255,255,0.72) 0%, rgba(248,251,255,0.62) 100%);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.72), 0 12px 28px rgba(15, 23, 42, 0.08);
}

html[data-theme="light"] .nav-section::before {
    background: linear-gradient(180deg, rgba(255,255,255,0.88), transparent 36%);
}

html[data-theme="light"] .nav-section-trigger:hover,
html[data-theme="light"] .nav-section .nav-link:hover {
    background: rgba(15,23,42,0.04);
}

html[data-theme="light"] .nav-section-icon {
    background: linear-gradient(180deg, rgba(10,132,255,0.10) 0%, rgba(10,132,255,0.06) 100%);
    border-color: rgba(10,132,255,0.14);
    color: #0a5fc2;
}

html[data-theme="light"] .nav-section .nav-link {
    background: rgba(255,255,255,0.36);
}

html[data-theme="light"] .nav-section .nav-link.active {
    background: linear-gradient(180deg, rgba(10,132,255,0.18) 0%, rgba(10,132,255,0.10) 100%);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.75), 0 10px 22px rgba(10,132,255,0.10);
}

@media (max-width: 780px) {
    .sidebar-nav-shell {
        gap: 10px;
    }

    .nav-section {
        border-radius: 22px;
    }

    .nav-section-trigger {
        padding: 7px 8px;
    }

    .nav-section-panel {
        padding-left: 50px;
    }
}


/* === 2026-03-24 Glass system harmonization: dashboard cards, filters, table heads === */
:root {
    --glass-panel-strong: linear-gradient(180deg, rgba(28, 34, 48, 0.80) 0%, rgba(16, 20, 30, 0.74) 100%);
    --glass-panel-soft: linear-gradient(180deg, rgba(255,255,255,0.055) 0%, rgba(255,255,255,0.025) 100%);
    --glass-field-surface: linear-gradient(180deg, rgba(18, 24, 36, 0.72) 0%, rgba(12, 16, 24, 0.66) 100%);
    --glass-table-shell: linear-gradient(180deg, rgba(18, 23, 34, 0.66) 0%, rgba(12, 16, 24, 0.58) 100%);
    --glass-table-border: rgba(255,255,255,0.10);
    --glass-table-head: linear-gradient(180deg, rgba(255,255,255,0.14) 0%, rgba(255,255,255,0.06) 100%);
    --glass-table-head-shadow: inset 0 1px 0 rgba(255,255,255,0.12), 0 10px 26px rgba(0,0,0,0.16);
    --glass-row-shadow: 0 14px 28px rgba(0,0,0,0.12);
}

html[data-theme="light"] {
    --glass-panel-strong: linear-gradient(180deg, rgba(255,255,255,0.80) 0%, rgba(243,248,253,0.72) 100%);
    --glass-panel-soft: linear-gradient(180deg, rgba(255,255,255,0.54) 0%, rgba(255,255,255,0.22) 100%);
    --glass-field-surface: linear-gradient(180deg, rgba(255,255,255,0.72) 0%, rgba(246,250,255,0.64) 100%);
    --glass-table-shell: linear-gradient(180deg, rgba(255,255,255,0.78) 0%, rgba(245,249,254,0.70) 100%);
    --glass-table-border: rgba(148,163,184,0.16);
    --glass-table-head: linear-gradient(180deg, rgba(255,255,255,0.96) 0%, rgba(239,245,252,0.90) 100%);
    --glass-table-head-shadow: inset 0 1px 0 rgba(255,255,255,0.86), 0 12px 22px rgba(148,163,184,0.14);
    --glass-row-shadow: 0 12px 24px rgba(148,163,184,0.12);
}

.page-header,
.filter-card,
.scope-notice-card,
.dashboard-toolbar-shell,
.dashboard-kpi-card,
.dashboard-column-card,
.dashboard-priority-strip,
.mini-kpi-card,
.stat-card {
    background:
        linear-gradient(180deg, rgba(255,255,255,0.045) 0%, rgba(255,255,255,0.01) 100%),
        var(--glass-panel-strong);
}

.page-header,
.filter-card,
.scope-notice-card {
    border-color: color-mix(in srgb, var(--glass-table-border) 88%, transparent);
    box-shadow: 0 24px 52px rgba(0,0,0,0.16), inset 0 1px 0 rgba(255,255,255,0.12);
}

html[data-theme="light"] .page-header,
html[data-theme="light"] .filter-card,
html[data-theme="light"] .scope-notice-card {
    box-shadow: 0 18px 38px rgba(148,163,184,0.14), inset 0 1px 0 rgba(255,255,255,0.80);
}

.dashboard-kpi-card,
.dashboard-column-card,
.dashboard-priority-strip,
.mini-kpi-card,
.stat-card {
    border-color: color-mix(in srgb, var(--glass-table-border) 84%, transparent);
    box-shadow: 0 20px 42px rgba(0,0,0,0.14), inset 0 1px 0 rgba(255,255,255,0.10);
}

html[data-theme="light"] .dashboard-kpi-card,
html[data-theme="light"] .dashboard-column-card,
html[data-theme="light"] .dashboard-priority-strip,
html[data-theme="light"] .mini-kpi-card,
html[data-theme="light"] .stat-card {
    box-shadow: 0 16px 34px rgba(148,163,184,0.12), inset 0 1px 0 rgba(255,255,255,0.84);
}

.dashboard-kpi-card,
.dashboard-column-card,
.priority-chip,
.dashboard-shift-item,
.dashboard-list-item,
.mini-stat-pill {
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.dashboard-kpi-card:hover,
.dashboard-column-card:hover,
.priority-chip:hover,
.dashboard-shift-item:hover,
.dashboard-list-item:hover,
.mini-stat-pill:hover {
    text-decoration: none;
    transform: translateY(-2px);
    border-color: color-mix(in srgb, var(--accent) 34%, var(--glass-table-border));
    box-shadow: 0 22px 44px rgba(10,132,255,0.14), inset 0 1px 0 rgba(255,255,255,0.14);
}

.filter-card {
    padding-top: 20px;
}

.filter-card::before {
    width: 72px;
    height: 4px;
    margin: -2px 0 16px;
    background: linear-gradient(90deg, rgba(10,132,255,0.48) 0%, rgba(90,200,250,0.26) 100%);
    opacity: 0.78;
}

.filter-card form {
    position: relative;
    z-index: 1;
}

.filters-grid {
    align-items: stretch;
    gap: 16px;
}

.filters-grid .field {
    min-height: 100%;
    padding: 14px 14px 16px;
    border-radius: 22px;
    border: 1px solid color-mix(in srgb, var(--glass-table-border) 82%, transparent);
    background:
        linear-gradient(180deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0.015) 100%),
        var(--glass-field-surface);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
}

html[data-theme="light"] .filters-grid .field {
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.86);
}

.filters-grid .field label {
    margin: 0;
    font-size: 0.72rem;
    letter-spacing: 0.11em;
    text-transform: uppercase;
    color: color-mix(in srgb, var(--muted) 90%, var(--text) 10%);
}

.filters-grid .field .muted {
    line-height: 1.5;
}

.filters-grid .field input,
.filters-grid .field select,
.filters-grid .field textarea,
.filters-grid .field .month-picker-shell {
    margin-top: 2px;
}

.filter-actions {
    align-self: stretch;
    justify-content: stretch;
    min-height: auto;
    min-width: 180px;
    padding: 10px;
    border-radius: 22px;
    border: 1px solid color-mix(in srgb, var(--glass-table-border) 82%, transparent);
    background:
        linear-gradient(180deg, rgba(255,255,255,0.06) 0%, rgba(255,255,255,0.02) 100%),
        var(--glass-field-surface);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
}

.filter-actions .button,
.filter-actions a.button {
    flex: 1 1 0;
    width: 100%;
    min-height: 48px;
    border-radius: 16px;
    justify-content: center;
}

.card > .table,
.card > .table-wrap,
.card > .table-responsive {
    margin-top: 10px;
}

.card > .table-wrap,
.card > .table-responsive {
    padding: 10px 10px 6px;
    border-radius: 24px;
    border: 1px solid color-mix(in srgb, var(--glass-table-border) 90%, transparent);
    background:
        linear-gradient(180deg, rgba(255,255,255,0.045) 0%, rgba(255,255,255,0.015) 100%),
        var(--glass-table-shell);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
}

.card > .table {
    border-radius: 24px;
}

.card > .table thead th,
.card > .table-wrap .table thead th,
.card > .table-responsive .table thead th {
    top: 0;
    z-index: 2;
    color: var(--table-head-text);
    background: var(--glass-table-head);
    box-shadow: var(--glass-table-head-shadow);
    border-top: 1px solid color-mix(in srgb, var(--glass-table-border) 92%, transparent);
    border-bottom: 1px solid color-mix(in srgb, var(--glass-table-border) 90%, transparent);
}

.card > .table thead tr th:first-child,
.card > .table-wrap .table thead tr th:first-child,
.card > .table-responsive .table thead tr th:first-child {
    border-top-left-radius: 18px;
}

.card > .table thead tr th:last-child,
.card > .table-wrap .table thead tr th:last-child,
.card > .table-responsive .table thead tr th:last-child {
    border-top-right-radius: 18px;
}

.table {
    border-spacing: 0 10px;
}

.table th,
.table td {
    padding: 14px 15px;
}

.table tbody tr {
    background: color-mix(in srgb, var(--table-row-alt-bg) 76%, transparent);
    box-shadow: var(--glass-row-shadow);
}

.table tbody tr:nth-child(even) {
    background: color-mix(in srgb, var(--table-row-bg) 78%, transparent);
}

.table tbody tr:hover {
    background: color-mix(in srgb, var(--table-row-hover) 86%, transparent);
    box-shadow: 0 18px 34px rgba(10,132,255,0.14);
    transform: translateY(-2px);
}

.table tbody tr td {
    background: transparent;
    backdrop-filter: blur(16px);
}

.table tbody tr td:first-child,
.table tbody tr td:last-child {
    position: relative;
}

.table tbody tr td:first-child {
    border-top-left-radius: 18px;
    border-bottom-left-radius: 18px;
}

.table tbody tr td:last-child {
    border-top-right-radius: 18px;
    border-bottom-right-radius: 18px;
}

.table tbody tr td:first-child,
.table thead tr th:first-child {
    border-left-color: color-mix(in srgb, var(--glass-table-border) 88%, transparent);
}

.table tbody tr td:last-child,
.table thead tr th:last-child {
    border-right-color: color-mix(in srgb, var(--glass-table-border) 88%, transparent);
}

.table thead tr th:first-child,
.table thead tr th:last-child,
.table tbody tr td:first-child,
.table tbody tr td:last-child {
    overflow: hidden;
}

.card-header {
    padding-bottom: 14px;
    border-bottom-color: color-mix(in srgb, var(--glass-table-border) 84%, transparent);
}

.compact-header-row {
    align-items: flex-start;
}

.dashboard-kpi-card .stat-label,
.dashboard-column-card .muted,
.dashboard-priority-strip .muted,
.filter-card .muted,
.page-header .muted {
    color: color-mix(in srgb, var(--muted) 88%, var(--text) 12%);
}

.dashboard-kpi-hint {
    line-height: 1.5;
}

.mini-stat-pill,
.dashboard-shift-item,
.dashboard-list-item {
    border: 1px solid color-mix(in srgb, var(--glass-table-border) 82%, transparent);
    background:
        linear-gradient(180deg, rgba(255,255,255,0.045) 0%, rgba(255,255,255,0.012) 100%),
        color-mix(in srgb, var(--panel) 86%, transparent);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.07);
}

html[data-theme="light"] .mini-stat-pill,
html[data-theme="light"] .dashboard-shift-item,
html[data-theme="light"] .dashboard-list-item {
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.86);
}

.monthly-analytics-page .stats-grid .stat-card,
.monthly-analytics-page .two-column > .card {
    background:
        linear-gradient(180deg, rgba(255,255,255,0.04) 0%, rgba(255,255,255,0.01) 100%),
        var(--glass-panel-strong);
}

@media (max-width: 1180px) {
    .filter-actions {
        min-width: 0;
    }
}

@media (max-width: 860px) {
    .filters-grid .field,
    .filter-actions {
        border-radius: 20px;
    }

    .card > .table-wrap,
    .card > .table-responsive {
        padding: 8px 8px 4px;
        border-radius: 20px;
    }

    .table {
        border-spacing: 0 8px;
    }
}

/* === 2026-03-24 Final glass hierarchy: forms, detail boxes, mobile views === */
:root {
    --glass-section-bg: linear-gradient(180deg, rgba(255,255,255,0.055) 0%, rgba(255,255,255,0.018) 100%);
    --glass-section-border: rgba(255,255,255,0.08);
    --glass-section-shadow: inset 0 1px 0 rgba(255,255,255,0.05), 0 16px 32px rgba(0,0,0,0.16);
    --glass-field-bg: linear-gradient(180deg, rgba(255,255,255,0.045) 0%, rgba(255,255,255,0.02) 100%);
    --glass-field-border: rgba(255,255,255,0.08);
    --glass-input-bg: linear-gradient(180deg, rgba(25, 31, 43, 0.86) 0%, rgba(13, 17, 25, 0.84) 100%);
    --glass-prose-bg: linear-gradient(180deg, rgba(255,255,255,0.04) 0%, rgba(255,255,255,0.018) 100%);
}

html[data-theme="light"] {
    --glass-section-bg: linear-gradient(180deg, rgba(255,255,255,0.92) 0%, rgba(246,249,253,0.86) 100%);
    --glass-section-border: rgba(15,23,42,0.08);
    --glass-section-shadow: inset 0 1px 0 rgba(255,255,255,0.92), 0 16px 34px rgba(15,23,42,0.08);
    --glass-field-bg: linear-gradient(180deg, rgba(255,255,255,0.88) 0%, rgba(248,250,253,0.80) 100%);
    --glass-field-border: rgba(15,23,42,0.08);
    --glass-input-bg: linear-gradient(180deg, rgba(255,255,255,0.96) 0%, rgba(243,247,252,0.94) 100%);
    --glass-prose-bg: linear-gradient(180deg, rgba(255,255,255,0.86) 0%, rgba(247,250,253,0.82) 100%);
}

.form-card,
.glass-form-card,
.mobile-surface-card,
.detail-grid > .card,
.two-column > .card,
.three-column > .card,
.report-layout > .card {
    position: relative;
    overflow: hidden;
}

.form-card::before,
.glass-form-card::before,
.mobile-surface-card::before,
.detail-grid > .card::before,
.two-column > .card::before,
.three-column > .card::before,
.report-layout > .card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 82px;
    background: linear-gradient(180deg, rgba(255,255,255,0.08) 0%, rgba(255,255,255,0.018) 52%, transparent 100%);
    pointer-events: none;
    opacity: 0.9;
}

.form-card,
.glass-form-card,
.mobile-response-form.glass-form-card,
.mobile-briefing-card,
.public-card.mobile-surface-card,
.auth-card {
    border-radius: 26px;
}

.form-card > .form-grid,
.glass-form-card > .form-grid,
.glass-form-shell > .form-grid,
.mobile-response-form > .form-grid,
.auth-form {
    position: relative;
    z-index: 1;
}

.form-card > .form-grid,
.glass-form-card > .form-grid,
.glass-form-shell > .form-grid,
.mobile-response-form > .form-grid {
    gap: 18px;
}

.form-card .field,
.glass-form-card .field,
.glass-form-shell .field,
.mobile-response-form .field,
.auth-form .field {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 100%;
    padding: 14px 14px 15px;
    border-radius: 22px;
    border: 1px solid var(--glass-field-border);
    background: var(--glass-field-bg);
    box-shadow: var(--glass-section-shadow);
    backdrop-filter: blur(18px) saturate(140%);
    -webkit-backdrop-filter: blur(18px) saturate(140%);
}

.form-card .field label,
.glass-form-card .field label,
.glass-form-shell .field label,
.mobile-response-form .field label,
.auth-form .field label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    color: color-mix(in srgb, var(--text) 74%, var(--muted));
    font-size: 0.79rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.form-card .field input,
.form-card .field select,
.form-card .field textarea,
.glass-form-card .field input,
.glass-form-card .field select,
.glass-form-card .field textarea,
.glass-form-shell .field input,
.glass-form-shell .field select,
.glass-form-shell .field textarea,
.mobile-response-form .field input,
.mobile-response-form .field select,
.mobile-response-form .field textarea,
.auth-form .field input,
.auth-form .field select,
.auth-form .field textarea {
    min-height: 50px;
    border-radius: 18px;
    border: 1px solid color-mix(in srgb, var(--accent) 10%, var(--line-strong));
    background: var(--glass-input-bg);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.05), 0 10px 24px rgba(0,0,0,0.10);
}

.form-card .field textarea,
.glass-form-card .field textarea,
.glass-form-shell .field textarea,
.mobile-response-form .field textarea {
    min-height: 132px;
}

.form-card .field select[multiple],
.glass-form-card .field select[multiple],
.glass-form-shell .field select[multiple],
.mobile-response-form .field select[multiple] {
    min-height: 180px;
    padding-top: 10px;
    padding-bottom: 10px;
}

.form-card .hint,
.form-card .muted.small,
.glass-form-card .hint,
.glass-form-card .muted.small,
.glass-form-shell .hint,
.mobile-response-form .muted.small,
.mobile-response-form .hint {
    position: relative;
    z-index: 1;
}

.form-card > .form-actions,
.glass-form-card > .form-actions,
.glass-form-shell > .form-actions,
.mobile-response-form > .form-actions,
.auth-form > .form-actions {
    position: relative;
    z-index: 1;
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid color-mix(in srgb, var(--line) 88%, transparent);
}

.auth-card {
    background: linear-gradient(180deg, color-mix(in srgb, var(--panel) 94%, transparent) 0%, color-mix(in srgb, var(--panel-2) 96%, transparent) 100%);
    backdrop-filter: blur(26px) saturate(150%);
    -webkit-backdrop-filter: blur(26px) saturate(150%);
}

.auth-brand {
    padding: 6px 2px 18px;
    margin-bottom: 18px;
    border-bottom: 1px solid color-mix(in srgb, var(--line) 88%, transparent);
}

.detail-grid > .card,
.two-column > .card,
.three-column > .card {
    background: linear-gradient(180deg, color-mix(in srgb, var(--panel) 94%, transparent) 0%, color-mix(in srgb, var(--panel-2) 95%, transparent) 100%);
}

.detail-list {
    gap: 14px;
}

.detail-list > div,
.notes-box,
.hint-box,
.pre-wrap,
.signature-preview-card,
.briefing-check-card,
.simple-list li {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    border: 1px solid var(--glass-section-border);
    background: var(--glass-prose-bg);
    box-shadow: var(--glass-section-shadow);
}

.detail-list > div::before,
.notes-box::before,
.hint-box::before,
.pre-wrap::before,
.signature-preview-card::before,
.briefing-check-card::before,
.simple-list li::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 54px;
    background: linear-gradient(180deg, rgba(255,255,255,0.07) 0%, transparent 100%);
    pointer-events: none;
}

.detail-list > div {
    padding: 16px 18px;
    min-height: 76px;
}

.detail-list > div span {
    display: inline-block;
    margin-bottom: 8px;
    color: color-mix(in srgb, var(--text) 66%, var(--muted));
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.detail-list > div strong {
    display: block;
    font-size: 1rem;
    line-height: 1.48;
    letter-spacing: -0.015em;
}

.notes-box,
.hint-box,
.pre-wrap {
    padding: 18px 20px;
    line-height: 1.7;
}

.notes-box h3,
.hint-box h3 {
    margin-bottom: 12px;
    font-size: 0.95rem;
    letter-spacing: -0.018em;
}

.pre-wrap {
    white-space: pre-wrap;
    font-size: 0.97rem;
}

.nested-card,
.signature-pad-shell,
.site-briefing-preview,
.audit-disclosure,
.mobile-briefing-card .nested-card {
    border-radius: 22px;
    border: 1px solid color-mix(in srgb, var(--line-strong) 88%, transparent);
    background: linear-gradient(180deg, color-mix(in srgb, var(--panel) 90%, transparent) 0%, color-mix(in srgb, var(--panel-2) 92%, transparent) 100%);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), 0 18px 36px rgba(0,0,0,0.18);
}

.signature-pad-shell {
    padding: 16px;
}

.signature-pad {
    border-radius: 18px;
}

.signature-preview-card,
.signature-pad-shell,
.site-briefing-preview {
    backdrop-filter: blur(20px) saturate(150%);
    -webkit-backdrop-filter: blur(20px) saturate(150%);
}

.mobile-response-form.glass-form-card,
.mobile-surface-card,
.mobile-briefing-card.mobile-surface-card {
    background: linear-gradient(180deg, color-mix(in srgb, var(--panel) 96%, transparent) 0%, color-mix(in srgb, var(--panel-2) 98%, transparent) 100%);
}

.mobile-detail-list {
    gap: 12px;
}

.mobile-detail-list > div {
    min-height: 88px;
    padding: 17px 18px;
}

.mobile-detail-list strong {
    font-size: 1.02rem;
}

.mobile-response-form .form-actions .button,
.response-button-grid .button,
.auth-actions .button {
    min-height: 48px;
    border-radius: 17px;
    font-weight: 700;
}

.response-button-grid {
    gap: 14px;
}

.response-button-grid .button {
    width: 100%;
}

.check-inline {
    display: inline-flex;
    align-items: flex-start;
    gap: 12px;
    line-height: 1.55;
}

.check-inline input[type="checkbox"] {
    width: 18px;
    height: 18px;
    min-height: 18px;
    margin-top: 2px;
    flex: 0 0 auto;
}

.hint-box.top-gap,
.notes-box.top-gap,
.signature-preview-card.top-gap-sm,
.site-briefing-preview.top-gap-sm {
    margin-top: 14px;
}

@media (max-width: 920px) {
    .form-card,
    .glass-form-card,
    .mobile-surface-card,
    .auth-card {
        border-radius: 24px;
    }

    .form-card .field,
    .glass-form-card .field,
    .glass-form-shell .field,
    .mobile-response-form .field,
    .auth-form .field {
        border-radius: 20px;
        padding: 13px;
    }
}

@media (max-width: 680px) {
    .form-card,
    .glass-form-card,
    .mobile-surface-card,
    .auth-card,
    .detail-grid > .card,
    .two-column > .card,
    .three-column > .card {
        border-radius: 22px;
    }

    .form-card::before,
    .glass-form-card::before,
    .mobile-surface-card::before,
    .detail-grid > .card::before,
    .two-column > .card::before,
    .three-column > .card::before {
        height: 64px;
    }

    .form-card .field,
    .glass-form-card .field,
    .glass-form-shell .field,
    .mobile-response-form .field,
    .auth-form .field,
    .detail-list > div,
    .notes-box,
    .hint-box,
    .pre-wrap,
    .signature-preview-card,
    .briefing-check-card,
    .simple-list li {
        border-radius: 18px;
    }

    .detail-list > div {
        min-height: 72px;
        padding: 15px 16px;
    }

    .mobile-detail-list > div {
        min-height: 82px;
    }

    .mobile-response-form .form-actions,
    .auth-form .form-actions,
    .response-button-grid {
        grid-template-columns: 1fr;
    }

    .mobile-response-form .form-actions .button,
    .response-button-grid .button,
    .auth-actions .button {
        width: 100%;
    }
}

/* === 2026-03-24 Final design pass: list rows, detail tables, calendar cards === */
:root {
    --final-row-sheen: linear-gradient(135deg, rgba(255,255,255,0.14) 0%, rgba(255,255,255,0.04) 42%, rgba(255,255,255,0.015) 100%);
    --final-row-border: rgba(255,255,255,0.09);
    --final-row-hover-border: rgba(10,132,255,0.26);
    --final-soft-shadow: 0 18px 38px rgba(0,0,0,0.16);
    --final-card-shadow: 0 24px 56px rgba(0,0,0,0.18);
    --final-inset-line: inset 0 1px 0 rgba(255,255,255,0.12);
}

html[data-theme="light"] {
    --final-row-border: rgba(148,163,184,0.16);
    --final-row-hover-border: rgba(10,132,255,0.24);
    --final-soft-shadow: 0 16px 32px rgba(148,163,184,0.14);
    --final-card-shadow: 0 20px 44px rgba(148,163,184,0.16);
    --final-inset-line: inset 0 1px 0 rgba(255,255,255,0.86);
}

.toolbar,
.toolbar-group,
.view-tabs,
.dashboard-inline-pills,
.inline-badges,
.inline-badge-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.toolbar {
    margin-bottom: 22px;
    padding: 12px 14px;
    border-radius: 24px;
    border: 1px solid color-mix(in srgb, var(--final-row-border) 90%, transparent);
    background:
        linear-gradient(180deg, rgba(255,255,255,0.045) 0%, rgba(255,255,255,0.018) 100%),
        color-mix(in srgb, var(--panel) 92%, transparent);
    box-shadow: var(--final-card-shadow), var(--final-inset-line);
    backdrop-filter: blur(30px) saturate(170%);
    -webkit-backdrop-filter: blur(30px) saturate(170%);
}

.toolbar-group {
    min-height: 52px;
    padding: 8px;
    border-radius: 20px;
    border: 1px solid color-mix(in srgb, var(--final-row-border) 88%, transparent);
    background:
        linear-gradient(180deg, rgba(255,255,255,0.038) 0%, rgba(255,255,255,0.012) 100%),
        color-mix(in srgb, var(--panel-2) 88%, transparent);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
}

html[data-theme="light"] .toolbar,
html[data-theme="light"] .toolbar-group {
    box-shadow: var(--final-card-shadow), var(--final-inset-line);
}

.table-responsive,
.table-wrap {
    position: relative;
    overflow-x: auto;
    overflow-y: visible;
    scrollbar-gutter: stable both-edges;
}

.card > .table-responsive,
.card > .table-wrap {
    padding: 12px;
    border-radius: 24px;
    box-shadow: var(--final-soft-shadow), var(--final-inset-line);
}

.card > .table-responsive::after,
.card > .table-wrap::after {
    content: "";
    position: sticky;
    right: 0;
    top: 0;
    width: 24px;
    height: 100%;
    float: right;
    pointer-events: none;
    background: linear-gradient(270deg, color-mix(in srgb, var(--panel) 90%, transparent) 0%, transparent 100%);
    opacity: 0.65;
}

.table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 12px;
}

.table thead th {
    position: sticky;
    top: 0;
    z-index: 3;
    padding-top: 12px;
    padding-bottom: 12px;
    font-size: 0.73rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.table tbody tr {
    position: relative;
    isolation: isolate;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.table tbody tr::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 20px;
    border: 1px solid color-mix(in srgb, var(--final-row-border) 92%, transparent);
    background: var(--final-row-sheen);
    box-shadow: var(--final-soft-shadow), var(--final-inset-line);
    pointer-events: none;
    z-index: 0;
}

.table tbody tr td {
    position: relative;
    z-index: 1;
    vertical-align: middle;
    padding-top: 15px;
    padding-bottom: 15px;
    border-bottom-color: transparent;
}

.table tbody tr td:first-child {
    padding-left: 18px;
}

.table tbody tr td:last-child {
    padding-right: 18px;
}

.table tbody tr:hover {
    transform: translateY(-2px);
    box-shadow: none;
}

.table tbody tr:hover::before {
    border-color: color-mix(in srgb, var(--final-row-hover-border) 92%, transparent);
    box-shadow: 0 22px 40px rgba(10,132,255,0.14), var(--final-inset-line);
}

.table-actions-stack {
    gap: 10px;
}

.table-actions-stack .button,
.table-actions-stack .link-button {
    min-width: 120px;
    text-align: right;
}

.detail-list,
.mobile-detail-list {
    gap: 14px;
}

.detail-list > div,
.mobile-detail-list > div,
.simple-list li,
.timeline-item,
.dashboard-list-item,
.dashboard-shift-item,
.response-event-list li,
.bar-row {
    position: relative;
    overflow: hidden;
    border-radius: 22px;
    border: 1px solid color-mix(in srgb, var(--final-row-border) 90%, transparent);
    background:
        linear-gradient(180deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0.015) 100%),
        color-mix(in srgb, var(--panel) 88%, transparent);
    box-shadow: var(--final-soft-shadow), var(--final-inset-line);
}

.detail-list > div::before,
.mobile-detail-list > div::before,
.simple-list li::before,
.timeline-item::before,
.dashboard-list-item::before,
.dashboard-shift-item::before,
.response-event-list li::before,
.bar-row::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 56px;
    background: linear-gradient(180deg, rgba(255,255,255,0.10) 0%, rgba(255,255,255,0.02) 72%, transparent 100%);
    pointer-events: none;
}

.detail-list > div,
.mobile-detail-list > div {
    min-height: 84px;
    padding: 18px 20px;
}

.detail-list > div:hover,
.mobile-detail-list > div:hover,
.simple-list li:hover,
.timeline-item:hover,
.dashboard-list-item:hover,
.dashboard-shift-item:hover,
.response-event-list li:hover,
.bar-row:hover {
    transform: translateY(-2px);
    border-color: color-mix(in srgb, var(--final-row-hover-border) 90%, transparent);
    box-shadow: 0 22px 40px rgba(10,132,255,0.14), var(--final-inset-line);
}

.detail-list > div span,
.mobile-detail-list span,
.simple-list span,
.timeline-type,
.calendar-day-title {
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-size: 0.73rem;
    font-weight: 700;
}

.detail-list > div strong,
.mobile-detail-list strong,
.simple-list strong,
.dashboard-list-item strong,
.dashboard-shift-item strong,
.timeline-content strong,
.calendar-event-title {
    letter-spacing: -0.018em;
}

.simple-list li {
    display: grid;
    gap: 6px;
    padding: 16px 18px;
}

.dashboard-list-item,
.dashboard-shift-item {
    align-items: flex-start;
    gap: 14px;
    min-height: 78px;
    padding: 16px 18px;
}

.dashboard-list-item > div,
.dashboard-shift-main {
    min-width: 0;
}

.dashboard-inline-pills,
.inline-badges,
.inline-badge-row,
.response-event-list {
    gap: 8px;
}

.calendar-grid {
    gap: 18px;
}

.calendar-day {
    min-height: 248px;
    padding: 16px;
    border-radius: 24px;
    box-shadow: var(--final-card-shadow), var(--final-inset-line);
}

.calendar-day-head {
    margin-bottom: 16px;
    padding: 0 2px 10px;
    border-bottom: 1px solid color-mix(in srgb, var(--final-row-border) 72%, transparent);
}

.calendar-day-date {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 76px;
    min-height: 40px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid color-mix(in srgb, var(--final-row-border) 88%, transparent);
    background:
        linear-gradient(180deg, rgba(255,255,255,0.08) 0%, rgba(255,255,255,0.02) 100%),
        color-mix(in srgb, var(--panel-2) 88%, transparent);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
}

.calendar-events {
    gap: 12px;
}

.calendar-event {
    display: grid;
    gap: 8px;
    padding: 14px 15px;
    border-radius: 20px;
    border: 1px solid color-mix(in srgb, var(--final-row-border) 88%, transparent);
    background:
        linear-gradient(180deg, rgba(255,255,255,0.07) 0%, rgba(255,255,255,0.02) 100%),
        color-mix(in srgb, var(--panel) 90%, transparent);
    box-shadow: var(--final-soft-shadow), inset 0 1px 0 rgba(255,255,255,0.08);
}

.calendar-event:hover {
    transform: translateY(-1px);
    border-color: color-mix(in srgb, var(--final-row-hover-border) 88%, transparent);
    box-shadow: 0 18px 34px rgba(10,132,255,0.12), inset 0 1px 0 rgba(255,255,255,0.10);
}

.calendar-event-title {
    font-size: 0.98rem;
    font-weight: 700;
    line-height: 1.35;
}

.calendar-event-meta {
    color: color-mix(in srgb, var(--muted) 84%, var(--text) 16%);
    line-height: 1.5;
}

.calendar-event-actions {
    margin-top: 2px;
    padding-top: 8px;
    border-top: 1px solid color-mix(in srgb, var(--final-row-border) 68%, transparent);
}

.day-view-card {
    padding-bottom: 12px;
}

.day-timeline {
    gap: 16px;
}

.day-timeline-item {
    align-items: start;
    gap: 18px;
    padding: 18px;
    border-radius: 24px;
    box-shadow: var(--final-card-shadow), var(--final-inset-line);
}

.day-time-chip {
    min-height: 46px;
    padding: 10px 16px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
}

.page-header,
.scope-notice-card,
.list-focus-card,
.filter-card,
.dashboard-toolbar-shell,
.month-picker-shell {
    box-shadow: var(--final-card-shadow), var(--final-inset-line);
}

.list-focus-card,
.scope-notice-card {
    padding: 16px 18px;
    border-radius: 24px;
}

.card-header h2,
.card-header h3,
.page-header h1,
.section-heading-row h3 {
    letter-spacing: -0.03em;
}

.card-header .muted,
.page-header .muted,
.section-heading-row .muted,
.dashboard-list-item .muted,
.dashboard-shift-item .muted,
.calendar-event-meta,
.detail-list > div span,
.mobile-detail-list span {
    color: color-mix(in srgb, var(--muted) 88%, var(--text) 12%);
}

@media (max-width: 980px) {
    .toolbar {
        padding: 10px;
        border-radius: 22px;
    }

    .toolbar-group {
        width: 100%;
        justify-content: flex-start;
    }

    .calendar-day {
        min-height: 0;
    }

    .dashboard-list-item,
    .dashboard-shift-item,
    .detail-list > div,
    .mobile-detail-list > div {
        border-radius: 20px;
    }
}

@media (max-width: 680px) {
    .table {
        border-spacing: 0 8px;
    }

    .table thead th {
        font-size: 0.69rem;
        letter-spacing: 0.08em;
    }

    .table tbody tr::before {
        border-radius: 18px;
    }

    .toolbar,
    .toolbar-group,
    .calendar-day,
    .calendar-event,
    .day-timeline-item,
    .list-focus-card,
    .scope-notice-card,
    .detail-list > div,
    .mobile-detail-list > div,
    .simple-list li,
    .dashboard-list-item,
    .dashboard-shift-item {
        border-radius: 18px;
    }

    .calendar-day {
        padding: 14px;
    }

    .calendar-day-date {
        min-width: 66px;
        min-height: 36px;
        padding-inline: 12px;
    }

    .card > .table-responsive,
    .card > .table-wrap {
        padding: 8px;
    }
}

.dispatch-kpi-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 18px;
}

.dispatch-kpi-card {
    min-height: 132px;
}

.dispatch-layout-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(320px, 0.9fr);
    gap: 18px;
    align-items: start;
}

.dispatch-main-column,
.dispatch-side-column {
    min-width: 0;
}

.dispatch-card {
    overflow: hidden;
}

.dispatch-shift-stack {
    display: grid;
    gap: 14px;
}

.dispatch-shift-card {
    padding: 16px;
    border-radius: 20px;
    border: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(255,255,255,0.028) 0%, rgba(255,255,255,0.012) 100%);
}

.dispatch-shift-card-critical {
    border-color: color-mix(in srgb, var(--negative) 42%, var(--line) 58%);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--negative) 18%, transparent 82%);
}

.dispatch-shift-head,
.dispatch-meta-row,
.dispatch-actions-row,
.dispatch-inline-meta,
.dispatch-shift-title-row {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

.dispatch-shift-time {
    font-size: 0.86rem;
    color: var(--muted);
    text-align: right;
}

.dispatch-meta-row {
    margin-top: 12px;
    justify-content: flex-start;
}

.soft-pill-negative {
    border-color: color-mix(in srgb, var(--negative) 32%, var(--line) 68%);
    color: var(--negative);
}

.soft-pill-warning {
    border-color: color-mix(in srgb, var(--warning) 32%, var(--line) 68%);
    color: var(--warning);
}

.dispatch-issue-stack {
    display: grid;
    gap: 10px;
    margin-top: 14px;
}

.dispatch-issue-item {
    display: grid;
    gap: 4px;
    padding: 11px 12px;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: rgba(255,255,255,0.025);
}

.dispatch-issue-item strong {
    font-size: 0.86rem;
}

.dispatch-issue-item span {
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.45;
}

.dispatch-issue-negative {
    border-color: color-mix(in srgb, var(--negative) 30%, var(--line) 70%);
    background: color-mix(in srgb, var(--negative) 8%, transparent 92%);
}

.dispatch-issue-warning {
    border-color: color-mix(in srgb, var(--warning) 30%, var(--line) 70%);
    background: color-mix(in srgb, var(--warning) 8%, transparent 92%);
}

.dispatch-issue-muted {
    border-color: var(--line);
}

.dispatch-actions-row {
    margin-top: 14px;
    justify-content: flex-start;
}

.dispatch-table td,
.dispatch-table th {
    vertical-align: top;
}

.dispatch-inline-meta {
    justify-content: flex-end;
}

.dispatch-inline-meta a {
    font-size: 0.82rem;
}

.dispatch-timeline-table-wrap {
    overflow-x: auto;
}

@media (max-width: 1280px) {
    .dispatch-kpi-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .dispatch-layout-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .dispatch-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 520px) {
    .dispatch-kpi-grid {
        grid-template-columns: 1fr;
    }
}


/* === 2026-03-24 Mobile operations update + focus steering === */
.mobile-nav-trigger { display: none; }
.mobile-nav-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(6, 10, 16, 0.42);
    backdrop-filter: blur(10px);
    z-index: 60;
}
.mobile-page-header { gap: 14px; }
.header-actions-mobile-wrap { flex-wrap: wrap; gap: 10px; }
.dispatch-focus-card, .operations-quick-strip, .report-form-mobile .form-section-block {
    position: relative;
    overflow: hidden;
}
.dispatch-focus-header {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
}
.dispatch-focus-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}
.soft-pill-action { text-decoration: none; }
.soft-pill-action.active {
    background: rgba(59, 130, 246, 0.22);
    border-color: rgba(96, 165, 250, 0.46);
    color: var(--text-color);
}
.dispatch-mini-kpi-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
    margin-top: 16px;
}
.dispatch-mini-kpi {
    border: 1px solid var(--border-color);
    border-radius: 18px;
    padding: 12px 14px;
    background: rgba(255,255,255,0.03);
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.dispatch-mini-kpi span { font-size: 0.8rem; color: var(--muted); }
.dispatch-mini-kpi strong { font-size: 1.15rem; }
.dispatch-mobile-card-stack, .shift-mobile-card-list { display: none; }
.dispatch-mobile-card, .shift-mobile-card {
    border: 1px solid var(--border-color);
    border-radius: 22px;
    padding: 16px;
    background: rgba(255,255,255,0.04);
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.16);
}
.dispatch-mobile-card + .dispatch-mobile-card,
.shift-mobile-card + .shift-mobile-card { margin-top: 12px; }
.dispatch-mobile-card-head, .shift-mobile-card-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
}
.dispatch-mobile-meta-grid, .shift-mobile-meta-grid, .operations-quick-strip-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 14px;
    margin-top: 14px;
}
.dispatch-mobile-meta-grid div, .shift-mobile-meta-grid div, .operations-quick-strip-grid div {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.dispatch-mobile-meta-grid span, .shift-mobile-meta-grid span, .operations-quick-strip-grid span { color: var(--muted); font-size: 0.78rem; }
.dispatch-actions-row-mobile { flex-wrap: wrap; margin-top: 14px; }
.shift-mobile-warning-row { display: flex; gap: 10px; align-items: center; margin-top: 12px; flex-wrap: wrap; }
.shift-desktop-table-wrap, .dispatch-desktop-table { display: block; }
.report-form-mobile { padding-bottom: 92px; }
.report-form-mobile .form-section-block + .form-section-block { margin-top: 18px; }
.form-section-heading { margin-bottom: 14px; }
.report-form-grid { gap: 16px 18px; }
.report-form-actions-sticky {
    position: sticky;
    bottom: max(14px, env(safe-area-inset-bottom));
    z-index: 6;
    margin-top: 20px;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    backdrop-filter: blur(18px);
    background: rgba(15, 23, 42, 0.72);
}
html[data-theme="light"] .report-form-actions-sticky { background: rgba(255,255,255,0.82); }
.operations-quick-strip-grid strong { font-size: 1rem; }
@media (max-width: 980px) {
    .mobile-nav-trigger {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        min-height: 42px;
    }
    .sidebar {
        position: fixed !important;
        top: 0;
        left: 0;
        height: 100dvh;
        width: min(86vw, 360px);
        z-index: 80;
        transform: translateX(-108%);
        transition: transform 0.24s ease;
        overflow-y: auto;
        padding-top: max(16px, env(safe-area-inset-top));
        padding-bottom: max(18px, env(safe-area-inset-bottom));
    }
    body.mobile-nav-open .sidebar { transform: translateX(0); }
    .layout { grid-template-columns: 1fr !important; }
    .utility-bar {
        position: sticky;
        top: 0;
        z-index: 30;
        padding-top: max(10px, env(safe-area-inset-top));
        backdrop-filter: blur(20px);
    }
    .dispatch-focus-header { flex-direction: column; }
    .dispatch-mini-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .dispatch-mobile-card-stack, .shift-mobile-card-list { display: block; }
    .dispatch-desktop-table, .shift-desktop-table-wrap { display: none; }
    .dispatch-layout-grid, .two-column { grid-template-columns: 1fr; }
    .table-responsive, .dispatch-timeline-table-wrap { overflow: visible; }
}
@media (max-width: 760px) {
    .header-actions-mobile-wrap > * { flex: 1 1 calc(50% - 10px); min-width: 0; }
    .dispatch-mobile-meta-grid, .shift-mobile-meta-grid, .operations-quick-strip-grid { grid-template-columns: 1fr; }
    .dispatch-mini-kpi-grid { grid-template-columns: 1fr 1fr; }
    .report-form-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
    .utility-bar { gap: 10px; }
    .header-actions-mobile-wrap > * { flex-basis: 100%; }
    .dispatch-mini-kpi-grid { grid-template-columns: 1fr; }
}

.ops-site-quick-card {
    border: 1px solid var(--border-color);
    border-radius: 26px;
}
.ops-site-quick-head {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
}
.ops-site-quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}
.ops-site-quick-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-top: 16px;
}
.ops-site-alert-stack {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.ops-site-doc-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.ops-site-doc-item {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
    padding: 14px 16px;
    border: 1px solid var(--border-color);
    border-radius: 18px;
    text-decoration: none;
    color: inherit;
    background: rgba(255,255,255,0.03);
}
.ops-site-doc-item:hover {
    border-color: rgba(96, 165, 250, 0.36);
    background: rgba(96, 165, 250, 0.08);
}
.ops-site-doc-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}
.compact-simple-list li + li { margin-top: 10px; }
@media (max-width: 1100px) {
    .ops-site-quick-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
    .ops-site-quick-head, .ops-site-doc-item {
        flex-direction: column;
    }
    .ops-site-doc-meta {
        justify-content: flex-start;
    }
    .ops-site-quick-actions > * {
        flex: 1 1 calc(50% - 10px);
        min-width: 0;
    }
}
@media (max-width: 560px) {
    .ops-site-quick-actions > * { flex-basis: 100%; }
}

.execution-hero-card {
    border: 1px solid var(--border-color);
    border-radius: 28px;
}
.execution-hero-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
}
.execution-info-grid {
    margin-top: 16px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}
.execution-info-grid > div,
.execution-task-card {
    padding: 14px 16px;
    border-radius: 18px;
    border: 1px solid var(--border-color);
    background: rgba(255,255,255,0.03);
}
.execution-info-grid span,
.execution-task-card .muted.small {
    display: block;
}
.execution-actor-card {
    border-radius: 24px;
}
.execution-actor-form select {
    min-width: 260px;
}
.execution-task-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
}
.execution-task-head {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: flex-start;
    margin-bottom: 8px;
}
.execution-task-done {
    border-color: rgba(34,197,94,0.28);
    background: rgba(34,197,94,0.10);
}
.execution-task-warning {
    border-color: rgba(245,158,11,0.28);
    background: rgba(245,158,11,0.10);
}
.execution-task-muted {
    background: rgba(148,163,184,0.08);
}
.execution-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(320px, 0.9fr);
    gap: 18px;
    align-items: start;
}
.execution-main-column,
.execution-side-column {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.execution-form-card,
.execution-side-card {
    border-radius: 24px;
}
.execution-checklist-phase-stack {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.execution-checklist-phase-card {
    padding: 16px;
    border-radius: 22px;
    border: 1px solid var(--border-color);
    background: rgba(255,255,255,0.03);
}
.execution-checklist-item-stack {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.execution-checklist-item {
    padding: 14px 16px;
    border-radius: 18px;
    border: 1px solid rgba(148,163,184,0.18);
    background: rgba(255,255,255,0.03);
}
.execution-checklist-item.is-done {
    border-color: rgba(34,197,94,0.24);
    background: rgba(34,197,94,0.08);
}
.execution-checklist-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}
.execution-checklist-form .form-actions {
    justify-content: flex-start;
}
.top-gap-xs {
    margin-top: 8px;
}
@media (max-width: 1240px) {
    .execution-task-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .execution-layout { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
    .execution-info-grid,
    .execution-task-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
    .execution-hero-head { flex-direction: column; }
    .execution-info-grid,
    .execution-task-grid { grid-template-columns: 1fr; }
    .execution-actor-form select,
    .execution-actor-form .button { width: 100%; }
    .execution-checklist-head { flex-direction: column; }
}

/* === 2026-03-25 Patrol workflow chain + cleanup === */
.badge.info {
    background: rgba(59, 130, 246, 0.16);
    border-color: rgba(96, 165, 250, 0.3);
}

.badge.neutral {
    background: rgba(148, 163, 184, 0.16);
    border-color: rgba(148, 163, 184, 0.3);
}

.task-workflow-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px;
    margin-top: 12px;
}

.task-workflow-step-form {
    margin: 0;
}

.task-workflow-step {
    width: 100%;
    min-height: 56px;
    border-radius: 18px;
    border: 1px solid var(--border-color);
    background: rgba(255,255,255,0.035);
    color: var(--text-color);
    font: inherit;
    font-weight: 600;
    padding: 10px 12px;
    text-align: left;
    transition: border-color 0.16s ease, background 0.16s ease, transform 0.16s ease;
}

.task-workflow-step:hover {
    transform: translateY(-1px);
    border-color: rgba(96, 165, 250, 0.4);
}

.task-workflow-step.is-active {
    background: rgba(59, 130, 246, 0.16);
    border-color: rgba(96, 165, 250, 0.46);
}

.patrol-actions-summary-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.patrol-actions-table td {
    vertical-align: top;
}

@media (max-width: 960px) {
    .patrol-actions-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .task-workflow-strip,
    .patrol-actions-summary-grid {
        grid-template-columns: 1fr;
    }
}


/* Notification center */
.nav-link-counter { margin-left: auto; }
.notification-global-strip {
    margin-bottom: 20px;
    padding: 18px 20px;
    border: 1px solid color-mix(in srgb, var(--danger) 26%, var(--line) 74%);
    background: linear-gradient(180deg, rgba(255,69,58,0.10) 0%, rgba(255,159,10,0.08) 100%), var(--card-bg);
}
.notification-global-strip-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}
.notification-global-strip-title { font-size: 1.02rem; font-weight: 700; }
.notification-global-strip-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 14px;
}
.notification-global-chip {
    display: grid;
    gap: 8px;
    padding: 14px 16px;
    border-radius: 18px;
    border: 1px solid var(--detail-box-border);
    background: var(--detail-box-bg);
    color: var(--text);
    text-decoration: none;
}
.notification-global-chip:hover { text-decoration: none; }
.notification-global-chip.notification-negative { border-color: color-mix(in srgb, var(--negative) 34%, var(--line) 66%); }
.notification-global-chip.notification-warning { border-color: color-mix(in srgb, var(--warning) 34%, var(--line) 66%); }
.notification-global-chip.notification-muted { border-color: color-mix(in srgb, var(--accent) 22%, var(--line) 78%); }
.notification-summary-card,
.notification-dashboard-card { overflow: hidden; }
.notification-summary-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 12px;
    margin-top: 16px;
}
.notification-stat-card,
.notification-channel-card,
.notification-action-card {
    display: grid;
    gap: 8px;
    padding: 14px 16px;
    border-radius: 18px;
    border: 1px solid var(--detail-box-border);
    background: var(--detail-box-bg);
    color: var(--text);
}
.notification-stat-card:hover { text-decoration: none; }
.notification-stat-card span { color: var(--muted); font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.06em; }
.notification-stat-card strong { font-size: 1.5rem; letter-spacing: -0.03em; }
.notification-center-grid { align-items: start; }
.notification-channel-grid,
.notification-list,
.notification-action-grid {
    display: grid;
    gap: 12px;
}
.notification-channel-grid { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.notification-list-item,
.notification-action-card,
.notification-dashboard-item {
    border-radius: 18px;
    border: 1px solid var(--detail-box-border);
    background: var(--detail-box-bg);
}
.notification-list-item {
    display: grid;
    gap: 10px;
    padding: 16px 18px;
    color: var(--text);
    text-decoration: none;
}
.notification-list-item:hover,
.notification-dashboard-item:hover { text-decoration: none; }
.notification-list-head,
.notification-channel-top {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.notification-dashboard-grid {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 18px;
    margin-top: 16px;
}
.notification-dashboard-kpis {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    align-content: start;
}
.notification-dashboard-list-shell {
    padding: 16px 18px;
    border-radius: 20px;
    border: 1px solid var(--detail-box-border);
    background: var(--detail-box-bg);
}
.notification-dashboard-item { align-items: start; }
.notification-detail-grid { align-items: start; }
.notification-action-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.notification-action-card textarea { min-height: 92px; }
.notification-payload-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
    margin-top: 10px;
}
.notification-payload-grid div {
    padding: 10px 12px;
    border-radius: 14px;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--detail-box-border);
}
.notification-payload-grid span {
    display: block;
    margin-bottom: 6px;
    color: var(--muted);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.notification-timeline-item { grid-template-columns: 190px minmax(0, 1fr); }
@media (max-width: 1200px) {
    .notification-summary-grid,
    .notification-global-strip-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .notification-dashboard-grid { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
    .notification-action-grid,
    .notification-summary-grid,
    .notification-global-strip-list { grid-template-columns: 1fr; }
    .notification-global-strip-header { flex-direction: column; align-items: flex-start; }
}


.automation-inline-card { margin-bottom: 1rem; }
.automation-summary-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); gap:0.9rem; margin:1rem 0; }
.automation-summary-card { padding:1rem 1.05rem; display:flex; flex-direction:column; gap:0.45rem; }
.automation-summary-card strong { font-size:1.5rem; line-height:1; }
.automation-layout { display:grid; grid-template-columns:minmax(0, 2.1fr) minmax(280px, 0.9fr); gap:1rem; align-items:start; }
.automation-shift-stack { display:flex; flex-direction:column; gap:1rem; }
.automation-shift-card { border:1px solid var(--line-color); border-radius:20px; padding:1rem; background:var(--card-bg); box-shadow:var(--card-shadow); }
.automation-shift-head, .automation-candidate-head { display:flex; justify-content:space-between; gap:0.75rem; align-items:flex-start; }
.automation-shift-meta { display:flex; flex-wrap:wrap; gap:0.45rem; margin-top:0.75rem; }
.automation-candidate-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); gap:0.8rem; margin-top:0.9rem; }
.automation-candidate-card { text-decoration:none; }
.automation-candidate-card strong, .automation-shift-card .calendar-event-title { color:inherit; }
.automation-blocker-list { display:flex; flex-direction:column; gap:0.55rem; margin-top:0.85rem; }
.automation-toolbar { align-items:center; gap:0.8rem; flex-wrap:wrap; }
.automation-toolbar .toolbar-form { display:flex; align-items:center; flex-wrap:wrap; gap:0.75rem; }
.automation-toolbar label { display:flex; align-items:center; gap:0.35rem; font-size:0.92rem; }
.automation-toolbar input[type='date'] { min-width:145px; }
.automation-run-item { align-items:center; }
.automation-run-stats { display:flex; flex-direction:column; align-items:flex-end; gap:0.35rem; }
.automation-rule-list { display:flex; flex-direction:column; gap:0.65rem; }
@media (max-width: 980px) { .automation-layout { grid-template-columns:1fr; } }


.app-runtime-strip{margin-bottom:18px}
.app-runtime-strip-main{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap}
.app-runtime-strip-title{font-weight:700}
.app-install-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:16px}
.app-shell-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:16px}
.app-shortcut-card{display:flex;flex-direction:column;gap:10px;padding:18px;border-radius:18px;border:1px solid rgba(148,163,184,.16);background:rgba(15,23,42,.42);text-decoration:none;color:inherit;min-height:140px;box-shadow:0 18px 40px rgba(15,23,42,.18)}
.app-shortcut-card strong{font-size:1.02rem}
.app-shortcut-card span{color:var(--text-muted,#94a3b8);line-height:1.45}
.app-device-list{display:grid;gap:14px}
.app-device-card{display:grid;gap:10px;padding:16px;border-radius:16px;border:1px solid rgba(148,163,184,.16);background:rgba(15,23,42,.36)}
body.app-is-offline .app-runtime-strip{border-color:rgba(248,113,113,.3)}
body.pwa-standalone .utility-bar{position:sticky;top:0;z-index:20;padding-top:max(10px,env(safe-area-inset-top))}
@media (max-width: 980px){
  body.pwa-standalone .sidebar{display:none}
  body.pwa-standalone .layout{grid-template-columns:1fr}
  body.pwa-standalone .content{padding-top:calc(14px + env(safe-area-inset-top));padding-bottom:calc(24px + env(safe-area-inset-bottom))}
}


/* Fix block 2026-03-25 UI quality pass */
.nav-link-counter {
    margin-left: auto;
    min-width: 24px;
    height: 24px;
    padding: 0 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    line-height: 1;
}
.nav-section .nav-link {
    display: flex;
    gap: 10px;
}
.dashboard-layout-grid {
    grid-auto-flow: dense;
}
.notification-summary-grid {
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
}
.notification-center-grid-balanced {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    align-items: stretch;
}
.notification-panel-card {
    height: 100%;
}
.notification-collapsible {
    overflow: hidden;
}
.notification-collapse-summary {
    list-style: none;
    cursor: pointer;
}
.notification-collapse-summary::-webkit-details-marker { display: none; }
.notification-collapsible[open] .notification-collapse-summary {
    border-bottom: 1px solid var(--line);
}
.notification-center-grid-balanced .filters-grid,
.notification-center-grid-balanced .notification-list {
    margin-top: 16px;
}
.analytics-table-wrap {
    overflow-x: auto;
}
.analytics-table {
    border-spacing: 0;
}
.analytics-table thead th,
.analytics-table tbody td {
    text-align: left;
}
.analytics-table tbody tr::before {
    border-radius: 14px;
}
.analytics-table tbody tr td:first-child {
    padding-left: 16px;
}
.analytics-table tbody tr td:last-child {
    padding-right: 16px;
}
.monthly-analytics-page .table thead th,
.monthly-analytics-page .table tbody td {
    white-space: nowrap;
}
.monthly-analytics-page .table tbody td:first-child {
    white-space: normal;
}
.app-runtime-strip-compact {
    padding-top: 14px;
    padding-bottom: 14px;
}
.app-runtime-strip-compact .app-runtime-strip-title {
    font-size: 0.98rem;
}
.dispatch-card-grid-dense {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    align-items: start;
}
.dispatch-card-grid-dense > .dispatch-card:nth-child(-n+2) {
    grid-column: 1 / -1;
}
.dispatch-card-grid-dense > .dispatch-card {
    margin-top: 0 !important;
}
@media (max-width: 1200px) {
    .notification-center-grid-balanced,
    .dispatch-card-grid-dense {
        grid-template-columns: 1fr;
    }
    .dispatch-card-grid-dense > .dispatch-card:nth-child(-n+2) {
        grid-column: auto;
    }
}


/* === 2026-03-26 table alignment + sidebar fit polish === */
.nav-section-panel {
    padding: 0 6px 0 6px;
}
.nav-section.is-open .nav-section-panel {
    padding-top: 6px;
    padding-bottom: 8px;
}
.nav-section .nav-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-width: 0;
    width: 100%;
    padding: 0 12px;
    overflow: hidden;
}
.nav-section .nav-link > span:first-child {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}
.nav-link-counter {
    flex: 0 0 auto;
    margin-left: 10px;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    font-size: 0.72rem;
}
@media (max-width: 780px) {
    .nav-section-panel {
        padding-left: 4px;
        padding-right: 4px;
    }
}

.table-responsive.table-clean-scroll,
.analytics-table-wrap.table-clean-scroll {
    overflow-x: auto;
    overflow-y: hidden;
}
.table.table-ui-fixed {
    width: 100%;
    min-width: 100%;
    table-layout: fixed;
    border-collapse: separate;
    border-spacing: 0 12px;
}
.table.table-ui-fixed thead th,
.table.table-ui-fixed tbody td {
    box-sizing: border-box;
    white-space: normal;
    word-break: break-word;
    overflow-wrap: anywhere;
}
.table.table-ui-fixed thead th {
    vertical-align: bottom;
}
.table.table-ui-fixed tbody td {
    vertical-align: middle;
}
.table.table-ui-fixed td .button.small,
.table.table-ui-fixed td .button,
.table.table-ui-fixed td select,
.table.table-ui-fixed td .badge {
    max-width: 100%;
}
.table.table-ui-fixed td .inline-form,
.table.table-ui-fixed td .inline-form select {
    width: 100%;
}
.table.table-ui-fixed td.text-right {
    text-align: right;
}
.table.table-ui-fixed.compact-actions td:last-child,
.table.table-ui-fixed.compact-actions th:last-child {
    text-align: right;
}
.monthly-analytics-page .card > .table-responsive,
.monthly-analytics-page .card > .analytics-table-wrap,
.reports-page .card > .table-responsive,
.tasks-page .card > .table-responsive {
    padding-top: 8px;
}
.monthly-analytics-page .analytics-table tbody td:first-child,
.reports-page .table-ui-fixed tbody td:first-child,
.tasks-page .table-ui-fixed tbody td:first-child {
    padding-left: 14px;
}
.monthly-analytics-page .analytics-table tbody td:last-child,
.reports-page .table-ui-fixed tbody td:last-child,
.tasks-page .table-ui-fixed tbody td:last-child {
    padding-right: 14px;
}
.monthly-analytics-page .analytics-table tbody tr::before,
.reports-page .table-ui-fixed tbody tr::before,
.tasks-page .table-ui-fixed tbody tr::before {
    inset: 0;
}
.page-header {
    gap: 18px;
}
.page-header .header-actions {
    align-items: center;
}
@media (max-width: 1280px) {
    .monthly-analytics-page .two-column {
        grid-template-columns: 1fr;
    }
}

/* === 2026-03-26 hard fix: sidebar submenu fit + true table left alignment === */
/* Root cause table shift:
   1) scrollbar-gutter: stable both-edges reserved a left gutter inside the table shell
   2) fixed-layout tables plus asymmetric cell padding amplified the visual offset */
.table-responsive,
.table-wrap,
.analytics-table-wrap {
    scrollbar-gutter: auto !important;
}

.nav-section {
    overflow: visible;
}

.nav-section-panel {
    padding-left: 8px !important;
    padding-right: 8px !important;
}

.nav-section.is-open .nav-section-panel {
    padding-top: 8px !important;
    padding-bottom: 10px !important;
}

.nav-section .nav-link {
    min-height: 46px;
    padding: 10px 12px !important;
    gap: 10px;
    align-items: center;
    justify-content: flex-start;
    overflow: visible;
    white-space: normal;
}

.nav-section .nav-link > span:first-child {
    flex: 1 1 auto;
    min-width: 0;
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
    line-height: 1.25;
}

.nav-link-counter {
    flex: 0 0 auto;
    margin-left: auto !important;
    align-self: center;
}

.reports-page .card > .table-responsive,
.tasks-page .card > .table-responsive,
.monthly-analytics-page .card > .table-responsive,
.monthly-analytics-page .card > .analytics-table-wrap {
    padding: 10px 0 8px !important;
}

.reports-page .table-responsive.table-clean-scroll,
.tasks-page .table-responsive.table-clean-scroll,
.monthly-analytics-page .table-responsive.table-clean-scroll,
.monthly-analytics-page .analytics-table-wrap.table-clean-scroll {
    overflow-x: auto;
    overflow-y: hidden;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

.reports-page .table.table-ui-fixed,
.tasks-page .table.table-ui-fixed,
.monthly-analytics-page .table.table-ui-fixed {
    width: max(100%, 980px);
    min-width: 100%;
    table-layout: auto !important;
    border-spacing: 0 10px;
    margin-left: 0;
}

.monthly-analytics-page .table.table-ui-fixed {
    width: max(100%, 920px);
}

.reports-page .table.table-ui-fixed thead th,
.reports-page .table.table-ui-fixed tbody td,
.tasks-page .table.table-ui-fixed thead th,
.tasks-page .table.table-ui-fixed tbody td,
.monthly-analytics-page .table.table-ui-fixed thead th,
.monthly-analytics-page .table.table-ui-fixed tbody td {
    padding-left: 14px !important;
    padding-right: 14px !important;
    text-align: left;
    vertical-align: middle;
}

.reports-page .table.table-ui-fixed thead th:first-child,
.reports-page .table.table-ui-fixed tbody td:first-child,
.tasks-page .table.table-ui-fixed thead th:first-child,
.tasks-page .table.table-ui-fixed tbody td:first-child,
.monthly-analytics-page .table.table-ui-fixed thead th:first-child,
.monthly-analytics-page .table.table-ui-fixed tbody td:first-child {
    padding-left: 18px !important;
}

.reports-page .table.table-ui-fixed thead th:last-child,
.reports-page .table.table-ui-fixed tbody td:last-child,
.tasks-page .table.table-ui-fixed thead th:last-child,
.tasks-page .table.table-ui-fixed tbody td:last-child,
.monthly-analytics-page .table.table-ui-fixed thead th:last-child,
.monthly-analytics-page .table.table-ui-fixed tbody td:last-child {
    padding-right: 18px !important;
}

.reports-page .table.table-ui-fixed tbody tr::before,
.tasks-page .table.table-ui-fixed tbody tr::before,
.monthly-analytics-page .table.table-ui-fixed tbody tr::before {
    left: 0;
    right: 0;
}

.reports-page .table.table-ui-fixed td .inline-form,
.tasks-page .table.table-ui-fixed td .inline-form {
    width: auto;
    display: inline-flex;
    max-width: 100%;
}

.reports-page .table.table-ui-fixed td .inline-form select,
.tasks-page .table.table-ui-fixed td .inline-form select {
    min-width: 0;
    width: 100%;
    max-width: 190px;
}

.monthly-analytics-page .analytics-table tbody td:first-child,
.reports-page .table-ui-fixed tbody td:first-child,
.tasks-page .table-ui-fixed tbody td:first-child,
.monthly-analytics-page .analytics-table tbody td:last-child,
.reports-page .table-ui-fixed tbody td:last-child,
.tasks-page .table-ui-fixed tbody td:last-child {
    padding-left: inherit;
    padding-right: inherit;
}

@media (max-width: 1100px) {
    .reports-page .table.table-ui-fixed,
    .tasks-page .table.table-ui-fixed,
    .monthly-analytics-page .table.table-ui-fixed {
        width: max(100%, 860px);
    }
}

@media (max-width: 780px) {
    .nav-section-panel {
        padding-left: 6px !important;
        padding-right: 6px !important;
    }

    .nav-section .nav-link {
        padding: 10px 10px !important;
    }
}


/* === 2026-03-26 root-cause table alignment fix === */
/* Chrome/macOS can materialize tr::before on table rows as an anonymous table cell.
   That creates a phantom first column and shifts all real cells one column to the right.
   Fix: disable row pseudo-elements for data tables and move the glass row chrome onto td boxes. */
.reports-page .table tbody tr::before,
.tasks-page .table tbody tr::before,
.monthly-analytics-page .table tbody tr::before {
    content: none !important;
    display: none !important;
}

.reports-page .table,
.tasks-page .table,
.monthly-analytics-page .table {
    border-spacing: 0 10px !important;
}

.reports-page .table tbody tr,
.tasks-page .table tbody tr,
.monthly-analytics-page .table tbody tr {
    background: transparent !important;
    box-shadow: none !important;
    transform: none !important;
}

.reports-page .table tbody tr td,
.tasks-page .table tbody tr td,
.monthly-analytics-page .table tbody tr td {
    background: var(--final-row-sheen), color-mix(in srgb, var(--panel) 88%, transparent) !important;
    border-top: 1px solid color-mix(in srgb, var(--final-row-border) 92%, transparent) !important;
    border-bottom: 1px solid color-mix(in srgb, var(--final-row-border) 92%, transparent) !important;
    border-left: 0 !important;
    border-right: 0 !important;
    box-shadow: none !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    background-clip: padding-box;
}

.reports-page .table tbody tr td:first-child,
.tasks-page .table tbody tr td:first-child,
.monthly-analytics-page .table tbody tr td:first-child {
    border-left: 1px solid color-mix(in srgb, var(--final-row-border) 92%, transparent) !important;
    border-top-left-radius: 18px !important;
    border-bottom-left-radius: 18px !important;
    padding-left: 18px !important;
}

.reports-page .table tbody tr td:last-child,
.tasks-page .table tbody tr td:last-child,
.monthly-analytics-page .table tbody tr td:last-child {
    border-right: 1px solid color-mix(in srgb, var(--final-row-border) 92%, transparent) !important;
    border-top-right-radius: 18px !important;
    border-bottom-right-radius: 18px !important;
    padding-right: 18px !important;
}

.reports-page .table tbody tr:hover td,
.tasks-page .table tbody tr:hover td,
.monthly-analytics-page .table tbody tr:hover td {
    border-top-color: color-mix(in srgb, var(--final-row-hover-border) 92%, transparent) !important;
    border-bottom-color: color-mix(in srgb, var(--final-row-hover-border) 92%, transparent) !important;
    background: linear-gradient(135deg, rgba(255,255,255,0.16) 0%, rgba(255,255,255,0.06) 42%, rgba(255,255,255,0.02) 100%), color-mix(in srgb, var(--panel) 90%, transparent) !important;
}

.reports-page .table tbody tr:hover td:first-child,
.tasks-page .table tbody tr:hover td:first-child,
.monthly-analytics-page .table tbody tr:hover td:first-child {
    border-left-color: color-mix(in srgb, var(--final-row-hover-border) 92%, transparent) !important;
}

.reports-page .table tbody tr:hover td:last-child,
.tasks-page .table tbody tr:hover td:last-child,
.monthly-analytics-page .table tbody tr:hover td:last-child {
    border-right-color: color-mix(in srgb, var(--final-row-hover-border) 92%, transparent) !important;
}

.reports-page .table thead th,
.tasks-page .table thead th,
.monthly-analytics-page .table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
}

.nav-section-panel {
    overflow: hidden !important;
}

.nav-section .nav-link {
    box-sizing: border-box !important;
    max-width: 100% !important;
    width: 100% !important;
}

.nav-section .nav-link > span:first-child,
.nav-section-title {
    min-width: 0;
}

.nav-section .nav-link.active,
.nav-section .nav-link {
    padding-right: 12px !important;
}

.nav-link-counter {
    flex-shrink: 0;
    margin-left: 8px !important;
}


/* === 2026-03-26 final rest offset fix: force native table flow on affected pages === */
.reports-page .card > .table-responsive::after,
.tasks-page .card > .table-responsive::after,
.monthly-analytics-page .card > .table-responsive::after,
.monthly-analytics-page .card > .analytics-table-wrap::after {
    content: none !important;
    display: none !important;
}

.reports-page .card > .table-responsive,
.tasks-page .card > .table-responsive,
.monthly-analytics-page .card > .table-responsive,
.monthly-analytics-page .card > .analytics-table-wrap {
    padding: 8px 0 6px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    scrollbar-gutter: auto !important;
}

.reports-page .table,
.tasks-page .table,
.monthly-analytics-page .table {
    display: table !important;
    width: 100% !important;
    min-width: 100% !important;
    table-layout: fixed !important;
    border-collapse: separate !important;
    border-spacing: 0 10px !important;
    margin: 0 !important;
    transform: none !important;
}

.reports-page .table thead,
.tasks-page .table thead,
.monthly-analytics-page .table thead {
    display: table-header-group !important;
}

.reports-page .table tbody,
.tasks-page .table tbody,
.monthly-analytics-page .table tbody {
    display: table-row-group !important;
}

.reports-page .table tr,
.tasks-page .table tr,
.monthly-analytics-page .table tr {
    display: table-row !important;
    position: static !important;
    isolation: auto !important;
    transform: none !important;
}

.reports-page .table thead th,
.tasks-page .table thead th,
.monthly-analytics-page .table thead th,
.reports-page .table tbody td,
.tasks-page .table tbody td,
.monthly-analytics-page .table tbody td {
    display: table-cell !important;
    box-sizing: border-box !important;
    padding: 15px 14px !important;
    text-align: left !important;
    vertical-align: middle !important;
    white-space: normal !important;
    word-break: break-word !important;
    overflow-wrap: anywhere !important;
    transform: none !important;
}

.reports-page .table thead th:first-child,
.tasks-page .table thead th:first-child,
.monthly-analytics-page .table thead th:first-child,
.reports-page .table tbody td:first-child,
.tasks-page .table tbody td:first-child,
.monthly-analytics-page .table tbody td:first-child {
    padding-left: 16px !important;
}

.reports-page .table thead th:last-child,
.tasks-page .table thead th:last-child,
.monthly-analytics-page .table thead th:last-child,
.reports-page .table tbody td:last-child,
.tasks-page .table tbody td:last-child,
.monthly-analytics-page .table tbody td:last-child {
    padding-right: 16px !important;
}

.reports-page .table tbody tr::before,
.tasks-page .table tbody tr::before,
.monthly-analytics-page .table tbody tr::before,
.reports-page .table tbody tr::after,
.tasks-page .table tbody tr::after,
.monthly-analytics-page .table tbody tr::after {
    content: none !important;
    display: none !important;
}

.reports-page .table tbody td,
.tasks-page .table tbody td,
.monthly-analytics-page .table tbody td {
    position: static !important;
    z-index: auto !important;
    background: color-mix(in srgb, var(--panel) 88%, transparent) !important;
    border-top: 1px solid color-mix(in srgb, var(--final-row-border) 92%, transparent) !important;
    border-bottom: 1px solid color-mix(in srgb, var(--final-row-border) 92%, transparent) !important;
    border-left: 0 !important;
    border-right: 0 !important;
    box-shadow: none !important;
    background-clip: padding-box !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.reports-page .table tbody td:first-child,
.tasks-page .table tbody td:first-child,
.monthly-analytics-page .table tbody td:first-child {
    border-left: 1px solid color-mix(in srgb, var(--final-row-border) 92%, transparent) !important;
    border-top-left-radius: 18px !important;
    border-bottom-left-radius: 18px !important;
}

.reports-page .table tbody td:last-child,
.tasks-page .table tbody td:last-child,
.monthly-analytics-page .table tbody td:last-child {
    border-right: 1px solid color-mix(in srgb, var(--final-row-border) 92%, transparent) !important;
    border-top-right-radius: 18px !important;
    border-bottom-right-radius: 18px !important;
}

.reports-page .table tbody tr:hover,
.tasks-page .table tbody tr:hover,
.monthly-analytics-page .table tbody tr:hover {
    transform: none !important;
    box-shadow: none !important;
}

.reports-page .table tbody tr:hover td,
.tasks-page .table tbody tr:hover td,
.monthly-analytics-page .table tbody tr:hover td {
    background: color-mix(in srgb, var(--panel) 92%, transparent) !important;
    border-top-color: color-mix(in srgb, var(--final-row-hover-border) 92%, transparent) !important;
    border-bottom-color: color-mix(in srgb, var(--final-row-hover-border) 92%, transparent) !important;
}

.reports-page .table tbody tr:hover td:first-child,
.tasks-page .table tbody tr:hover td:first-child,
.monthly-analytics-page .table tbody tr:hover td:first-child {
    border-left-color: color-mix(in srgb, var(--final-row-hover-border) 92%, transparent) !important;
}

.reports-page .table tbody tr:hover td:last-child,
.tasks-page .table tbody tr:hover td:last-child,
.monthly-analytics-page .table tbody tr:hover td:last-child {
    border-right-color: color-mix(in srgb, var(--final-row-hover-border) 92%, transparent) !important;
}

.reports-page .table.compact-actions thead th:last-child,
.reports-page .table.compact-actions tbody td:last-child,
.tasks-page .table.compact-actions thead th:last-child,
.tasks-page .table.compact-actions tbody td:last-child,
.monthly-analytics-page .table.compact-actions thead th:last-child,
.monthly-analytics-page .table.compact-actions tbody td:last-child {
    text-align: right !important;
}

.reports-page .table .inline-form,
.tasks-page .table .inline-form {
    display: inline-flex !important;
    width: auto !important;
    max-width: 100% !important;
}

.reports-page .table .inline-form select,
.tasks-page .table .inline-form select {
    width: 100% !important;
    max-width: 190px !important;
    min-width: 0 !important;
}

.nav-section-panel {
    padding-left: 8px !important;
    padding-right: 8px !important;
    overflow: hidden !important;
}

.nav-section .nav-link {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    align-items: center !important;
    column-gap: 10px !important;
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 100% !important;
    min-height: 46px !important;
    padding: 10px 12px !important;
}

.nav-section .nav-link > span:first-child,
.nav-section-title {
    min-width: 0 !important;
}

.nav-link-counter {
    justify-self: end !important;
    margin-left: 0 !important;
    flex-shrink: 0 !important;
}

/* === 2026-03-26 precision rollout: remaining registry / masterdata / logs tables === */
.table-precision-shell {
    padding: 8px 0 6px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    scrollbar-gutter: auto !important;
}

.card > .table-precision-shell::after,
.table-precision-shell::after {
    content: none !important;
    display: none !important;
}

.table.table-precision-fixed {
    display: table !important;
    width: 100% !important;
    min-width: 100% !important;
    table-layout: fixed !important;
    border-collapse: separate !important;
    border-spacing: 0 10px !important;
    margin: 0 !important;
    transform: none !important;
}

.table.table-precision-fixed thead {
    display: table-header-group !important;
}

.table.table-precision-fixed tbody {
    display: table-row-group !important;
}

.table.table-precision-fixed tr {
    display: table-row !important;
    position: static !important;
    isolation: auto !important;
    transform: none !important;
}

.table.table-precision-fixed tbody tr::before,
.table.table-precision-fixed tbody tr::after {
    content: none !important;
    display: none !important;
}

.table.table-precision-fixed thead th,
.table.table-precision-fixed tbody td,
.table.table-precision-fixed tbody th {
    display: table-cell !important;
    box-sizing: border-box !important;
    padding: 15px 14px !important;
    text-align: left !important;
    vertical-align: middle !important;
    white-space: normal !important;
    word-break: break-word !important;
    overflow-wrap: anywhere !important;
    transform: none !important;
}

.table.table-precision-fixed thead th:first-child,
.table.table-precision-fixed tbody td:first-child,
.table.table-precision-fixed tbody th:first-child {
    padding-left: 16px !important;
}

.table.table-precision-fixed thead th:last-child,
.table.table-precision-fixed tbody td:last-child,
.table.table-precision-fixed tbody th:last-child {
    padding-right: 16px !important;
}

.table.table-precision-fixed tbody tr {
    background: transparent !important;
    box-shadow: none !important;
}

.table.table-precision-fixed tbody td,
.table.table-precision-fixed tbody th {
    position: static !important;
    z-index: auto !important;
    background: color-mix(in srgb, var(--panel) 88%, transparent) !important;
    border-top: 1px solid color-mix(in srgb, var(--final-row-border) 92%, transparent) !important;
    border-bottom: 1px solid color-mix(in srgb, var(--final-row-border) 92%, transparent) !important;
    border-left: 0 !important;
    border-right: 0 !important;
    box-shadow: none !important;
    background-clip: padding-box !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.table.table-precision-fixed tbody td:first-child,
.table.table-precision-fixed tbody th:first-child {
    border-left: 1px solid color-mix(in srgb, var(--final-row-border) 92%, transparent) !important;
    border-top-left-radius: 18px !important;
    border-bottom-left-radius: 18px !important;
}

.table.table-precision-fixed tbody td:last-child,
.table.table-precision-fixed tbody th:last-child {
    border-right: 1px solid color-mix(in srgb, var(--final-row-border) 92%, transparent) !important;
    border-top-right-radius: 18px !important;
    border-bottom-right-radius: 18px !important;
}

.table.table-precision-fixed tbody tr:hover {
    transform: none !important;
    box-shadow: none !important;
}

.table.table-precision-fixed tbody tr:hover td,
.table.table-precision-fixed tbody tr:hover th {
    background: color-mix(in srgb, var(--panel) 92%, transparent) !important;
    border-top-color: color-mix(in srgb, var(--final-row-hover-border) 92%, transparent) !important;
    border-bottom-color: color-mix(in srgb, var(--final-row-hover-border) 92%, transparent) !important;
}

.table.table-precision-fixed tbody tr:hover td:first-child,
.table.table-precision-fixed tbody tr:hover th:first-child {
    border-left-color: color-mix(in srgb, var(--final-row-hover-border) 92%, transparent) !important;
}

.table.table-precision-fixed tbody tr:hover td:last-child,
.table.table-precision-fixed tbody tr:hover th:last-child {
    border-right-color: color-mix(in srgb, var(--final-row-hover-border) 92%, transparent) !important;
}

.table.table-precision-fixed td.text-right,
.table.table-precision-fixed th.text-right,
.table.table-precision-fixed.compact-actions thead th:last-child,
.table.table-precision-fixed.compact-actions tbody td:last-child {
    text-align: right !important;
}

.table.table-precision-fixed .inline-form {
    display: inline-flex !important;
    width: auto !important;
    max-width: 100% !important;
}

.table.table-precision-fixed .inline-form select {
    width: 100% !important;
    max-width: 190px !important;
    min-width: 0 !important;
}

.table.table-precision-fixed .table-actions-stack {
    align-items: flex-end;
}


/* === 2026-03-26 direct card table shell rollout fix === */
.card > .table-responsive.table-precision-shell,
.card > .table-precision-shell {
    margin-top: 10px !important;
    padding: 10px 10px 6px !important;
    border-radius: 24px !important;
    border: 1px solid color-mix(in srgb, var(--glass-table-border) 90%, transparent) !important;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.045) 0%, rgba(255,255,255,0.015) 100%),
        var(--glass-table-shell) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.08) !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    scrollbar-gutter: stable !important;
}

.card > .table-responsive.table-precision-shell::after,
.card > .table-precision-shell::after {
    content: none !important;
    display: none !important;
}

.table-precision-shell > .table.table-precision-fixed,
.card > .table.table-precision-fixed {
    display: table !important;
    width: 100% !important;
    min-width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    table-layout: fixed !important;
    border-collapse: separate !important;
    border-spacing: 0 10px !important;
    transform: none !important;
    left: auto !important;
    right: auto !important;
}

.table-precision-shell > .table.table-precision-fixed thead,
.card > .table.table-precision-fixed thead {
    display: table-header-group !important;
}

.table-precision-shell > .table.table-precision-fixed tbody,
.card > .table.table-precision-fixed tbody {
    display: table-row-group !important;
}

.table-precision-shell > .table.table-precision-fixed tr,
.card > .table.table-precision-fixed tr {
    display: table-row !important;
    position: static !important;
    inset: auto !important;
    transform: none !important;
    isolation: auto !important;
}

.table-precision-shell > .table.table-precision-fixed tbody tr::before,
.table-precision-shell > .table.table-precision-fixed tbody tr::after,
.card > .table.table-precision-fixed tbody tr::before,
.card > .table.table-precision-fixed tbody tr::after {
    content: none !important;
    display: none !important;
}

.table-precision-shell > .table.table-precision-fixed thead th,
.table-precision-shell > .table.table-precision-fixed tbody td,
.table-precision-shell > .table.table-precision-fixed tbody th,
.card > .table.table-precision-fixed thead th,
.card > .table.table-precision-fixed tbody td,
.card > .table.table-precision-fixed tbody th {
    display: table-cell !important;
    box-sizing: border-box !important;
    position: static !important;
    z-index: auto !important;
    padding: 15px 14px !important;
    text-align: left !important;
    vertical-align: middle !important;
    white-space: normal !important;
    word-break: break-word !important;
    overflow-wrap: anywhere !important;
    transform: none !important;
    margin: 0 !important;
}

.table-precision-shell > .table.table-precision-fixed thead th:first-child,
.table-precision-shell > .table.table-precision-fixed tbody td:first-child,
.table-precision-shell > .table.table-precision-fixed tbody th:first-child,
.card > .table.table-precision-fixed thead th:first-child,
.card > .table.table-precision-fixed tbody td:first-child,
.card > .table.table-precision-fixed tbody th:first-child {
    padding-left: 16px !important;
    left: auto !important;
    margin-left: 0 !important;
}

.table-precision-shell > .table.table-precision-fixed thead th:last-child,
.table-precision-shell > .table.table-precision-fixed tbody td:last-child,
.table-precision-shell > .table.table-precision-fixed tbody th:last-child,
.card > .table.table-precision-fixed thead th:last-child,
.card > .table.table-precision-fixed tbody td:last-child,
.card > .table.table-precision-fixed tbody th:last-child {
    padding-right: 16px !important;
    right: auto !important;
    margin-right: 0 !important;
}

.table-precision-shell > .table.table-precision-fixed tbody tr,
.card > .table.table-precision-fixed tbody tr {
    background: transparent !important;
    box-shadow: none !important;
}

.table-precision-shell > .table.table-precision-fixed tbody td,
.table-precision-shell > .table.table-precision-fixed tbody th,
.card > .table.table-precision-fixed tbody td,
.card > .table.table-precision-fixed tbody th {
    background: color-mix(in srgb, var(--panel) 88%, transparent) !important;
    border-top: 1px solid color-mix(in srgb, var(--final-row-border) 92%, transparent) !important;
    border-bottom: 1px solid color-mix(in srgb, var(--final-row-border) 92%, transparent) !important;
    border-left: 0 !important;
    border-right: 0 !important;
    box-shadow: none !important;
    background-clip: padding-box !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.table-precision-shell > .table.table-precision-fixed tbody td:first-child,
.table-precision-shell > .table.table-precision-fixed tbody th:first-child,
.card > .table.table-precision-fixed tbody td:first-child,
.card > .table.table-precision-fixed tbody th:first-child {
    border-left: 1px solid color-mix(in srgb, var(--final-row-border) 92%, transparent) !important;
    border-top-left-radius: 18px !important;
    border-bottom-left-radius: 18px !important;
}

.table-precision-shell > .table.table-precision-fixed tbody td:last-child,
.table-precision-shell > .table.table-precision-fixed tbody th:last-child,
.card > .table.table-precision-fixed tbody td:last-child,
.card > .table.table-precision-fixed tbody th:last-child {
    border-right: 1px solid color-mix(in srgb, var(--final-row-border) 92%, transparent) !important;
    border-top-right-radius: 18px !important;
    border-bottom-right-radius: 18px !important;
}

.table-precision-shell > .table.table-precision-fixed tbody tr:hover,
.card > .table.table-precision-fixed tbody tr:hover {
    transform: none !important;
    box-shadow: none !important;
}

.table-precision-shell > .table.table-precision-fixed tbody tr:hover td,
.table-precision-shell > .table.table-precision-fixed tbody tr:hover th,
.card > .table.table-precision-fixed tbody tr:hover td,
.card > .table.table-precision-fixed tbody tr:hover th {
    background: color-mix(in srgb, var(--panel) 92%, transparent) !important;
    border-top-color: color-mix(in srgb, var(--final-row-hover-border) 92%, transparent) !important;
    border-bottom-color: color-mix(in srgb, var(--final-row-hover-border) 92%, transparent) !important;
}

.table-precision-shell > .table.table-precision-fixed tbody tr:hover td:first-child,
.table-precision-shell > .table.table-precision-fixed tbody tr:hover th:first-child,
.card > .table.table-precision-fixed tbody tr:hover td:first-child,
.card > .table.table-precision-fixed tbody tr:hover th:first-child {
    border-left-color: color-mix(in srgb, var(--final-row-hover-border) 92%, transparent) !important;
}

.table-precision-shell > .table.table-precision-fixed tbody tr:hover td:last-child,
.table-precision-shell > .table.table-precision-fixed tbody tr:hover th:last-child,
.card > .table.table-precision-fixed tbody tr:hover td:last-child,
.card > .table.table-precision-fixed tbody tr:hover th:last-child {
    border-right-color: color-mix(in srgb, var(--final-row-hover-border) 92%, transparent) !important;
}

.table-precision-shell > .table.table-precision-fixed td.text-right,
.table-precision-shell > .table.table-precision-fixed th.text-right,
.table-precision-shell > .table.table-precision-fixed.compact-actions thead th:last-child,
.table-precision-shell > .table.table-precision-fixed.compact-actions tbody td:last-child,
.card > .table.table-precision-fixed td.text-right,
.card > .table.table-precision-fixed th.text-right,
.card > .table.table-precision-fixed.compact-actions thead th:last-child,
.card > .table.table-precision-fixed.compact-actions tbody td:last-child {
    text-align: right !important;
}

/* === 2026-03-27 global search / cross-module jump-in === */
.utility-global-search {
    display: flex;
    align-items: center;
    flex: 1 1 320px;
    min-width: 260px;
    max-width: 520px;
}

.utility-global-search-box,
.global-search-searchbox {
    position: relative;
    width: 100%;
}

.utility-global-search-shell,
.global-search-input-shell {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 44px;
    padding: 0 16px 0 46px;
    border-radius: 999px;
    border: 1px solid color-mix(in srgb, var(--line-strong) 82%, transparent);
    background: color-mix(in srgb, var(--panel) 90%, transparent);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
}

.utility-global-search-shell:focus-within,
.global-search-input-shell:focus-within {
    border-color: color-mix(in srgb, var(--accent) 40%, var(--line-strong));
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 18%, transparent), inset 0 1px 0 rgba(255,255,255,0.08);
}

.utility-global-search-icon,
.global-search-input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    width: 16px;
    height: 16px;
    transform: translateY(-50%);
    color: color-mix(in srgb, var(--muted) 86%, transparent);
    pointer-events: none;
}

.utility-global-search-icon::before,
.global-search-input-icon::before {
    content: '';
    display: block;
    width: 100%;
    height: 100%;
    background: currentColor;
    opacity: 0.82;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M10.5 4a6.5 6.5 0 1 0 4.06 11.58l4.43 4.43 1.01-1.01-4.43-4.43A6.5 6.5 0 0 0 10.5 4m0 1.5a5 5 0 1 1 0 10a5 5 0 0 1 0-10'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M10.5 4a6.5 6.5 0 1 0 4.06 11.58l4.43 4.43 1.01-1.01-4.43-4.43A6.5 6.5 0 0 0 10.5 4m0 1.5a5 5 0 1 1 0 10a5 5 0 0 1 0-10'/%3E%3C/svg%3E") center / contain no-repeat;
}

.utility-global-search input,
.global-search-input-shell input {
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--text);
    font: inherit;
}

.utility-global-search input::placeholder,
.global-search-input-shell input::placeholder {
    color: var(--muted);
}

.global-search-suggestions {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    z-index: 80;
    display: grid;
    gap: 8px;
    padding: 10px;
    border-radius: 22px;
    border: 1px solid color-mix(in srgb, var(--line-strong) 76%, transparent);
    background: color-mix(in srgb, var(--panel) 78%, transparent);
    backdrop-filter: blur(18px) saturate(130%);
    -webkit-backdrop-filter: blur(18px) saturate(130%);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
}

.global-search-suggestion-item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 16px;
    border: 1px solid color-mix(in srgb, var(--line-strong) 72%, transparent);
    background: color-mix(in srgb, var(--panel-soft) 74%, transparent);
    color: inherit;
    text-decoration: none;
    transition: transform .14s ease, border-color .14s ease, background .14s ease;
}

.global-search-suggestion-item:hover,
.global-search-suggestion-item.is-active {
    transform: translateY(-1px);
    border-color: color-mix(in srgb, var(--accent) 34%, var(--line-strong));
    background: color-mix(in srgb, var(--panel-soft) 68%, var(--accent) 9%);
}

.global-search-suggestion-copy {
    min-width: 0;
    display: grid;
    gap: 4px;
}

.global-search-suggestion-title-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.global-search-suggestion-group {
    font-size: 0.74rem;
    color: var(--muted);
}

.global-search-suggestion-meta {
    font-size: 0.84rem;
    color: var(--muted);
    overflow-wrap: anywhere;
}

.global-search-suggestion-badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px;
    max-width: 42%;
}

.global-search-suggestion-empty {
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid color-mix(in srgb, var(--line-strong) 72%, transparent);
    background: color-mix(in srgb, var(--panel-soft) 74%, transparent);
    color: var(--muted);
    font-size: 0.92rem;
}

.global-search-hero {
    display: grid;
    gap: 18px;
    align-items: center;
}

.global-search-form-hero {
    display: grid;
    gap: 12px;
}

.global-search-scope-card {
    margin: 0 0 16px;
}

.global-search-summary-grid,
.global-search-shortcut-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 14px;
    margin-bottom: 16px;
}

.global-search-group-stack {
    display: grid;
    gap: 16px;
}

.global-search-group-card {
    overflow: hidden;
}

.global-search-result-list {
    display: grid;
    gap: 10px;
}

.global-search-result-row,
.global-search-shortcut {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 16px;
    border-radius: 18px;
    border: 1px solid color-mix(in srgb, var(--line-strong) 78%, transparent);
    background: color-mix(in srgb, var(--panel-soft) 88%, transparent);
    color: inherit;
    text-decoration: none;
    transition: transform .16s ease, border-color .16s ease, background .16s ease;
}

.global-search-result-row:hover,
.global-search-shortcut:hover {
    transform: translateY(-1px);
    border-color: color-mix(in srgb, var(--accent) 34%, var(--line-strong));
    background: color-mix(in srgb, var(--panel-soft) 78%, var(--accent) 8%);
}

.global-search-result-main,
.global-search-shortcut {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.global-search-result-main strong,
.global-search-shortcut strong {
    font-size: 0.98rem;
}

.global-search-result-main span,
.global-search-shortcut span {
    min-width: 0;
    overflow-wrap: anywhere;
}

.global-search-result-side {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px;
    max-width: 42%;
}
@media (max-width: 1180px) {
    .utility-global-search {
        order: 3;
        flex-basis: 100%;
        max-width: none;
    }
}

@media (max-width: 860px) {
    .global-search-result-row,
    .global-search-shortcut,
    .global-search-suggestion-item {
        flex-direction: column;
    }

    .global-search-result-side,
    .global-search-suggestion-badges {
        max-width: none;
        justify-content: flex-start;
    }
}

/* === 2026-03-27 global search floating suggest + command center === */
.utility-bar {
    overflow: visible !important;
}

.utility-global-search {
    min-width: 0 !important;
    overflow: visible !important;
    position: relative;
    z-index: 36;
}

.utility-global-search-box,
.global-search-searchbox {
    min-width: 0;
    overflow: visible;
}

.global-search-suggestions[hidden] {
    display: none !important;
}

.global-search-suggestions,
.global-search-suggestions-floating {
    position: fixed;
    top: 0;
    left: 0;
    right: auto;
    width: min(640px, calc(100vw - 32px));
    max-width: calc(100vw - 32px);
    max-height: min(62vh, 520px);
    overflow: auto;
    overscroll-behavior: contain;
}

.global-search-suggestion-item,
.global-search-result-row,
.global-search-shortcut,
.global-search-command-action,
.global-search-recent-chip {
    min-width: 0;
}

.global-search-suggestion-copy,
.global-search-result-main,
.global-search-command-head {
    min-width: 0;
}

.global-search-suggestion-title-row strong,
.global-search-command-action strong,
.global-search-recent-chip span {
    overflow-wrap: anywhere;
}

.global-search-command-center,
.global-search-recents-card {
    margin-bottom: 16px;
}

.global-search-command-groups {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 14px;
}

.global-search-command-card {
    display: grid;
    gap: 14px;
    padding: 18px;
    border-radius: 22px;
    border: 1px solid color-mix(in srgb, var(--line-strong) 78%, transparent);
    background: color-mix(in srgb, var(--panel-soft) 82%, transparent);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
}

.global-search-command-head {
    display: grid;
    gap: 6px;
}

.global-search-command-actions {
    display: grid;
    gap: 10px;
}

.global-search-command-action,
.global-search-recent-chip {
    display: grid;
    gap: 4px;
    padding: 14px 16px;
    border-radius: 18px;
    border: 1px solid color-mix(in srgb, var(--line-strong) 78%, transparent);
    background: color-mix(in srgb, var(--panel) 82%, transparent);
    color: inherit;
    text-decoration: none;
    transition: transform .16s ease, border-color .16s ease, background .16s ease;
}

.global-search-command-action:hover,
.global-search-recent-chip:hover {
    transform: translateY(-1px);
    border-color: color-mix(in srgb, var(--accent) 34%, var(--line-strong));
    background: color-mix(in srgb, var(--panel-soft) 78%, var(--accent) 8%);
}

.global-search-recent-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.global-search-recent-chip {
    display: inline-flex;
    align-items: center;
}

@media (max-width: 860px) {
    .global-search-command-groups {
        grid-template-columns: 1fr;
    }
}


/* === 2026-03-27 KI-Helfer / Anwendungsspezialist === */
.app-ai-helper {
    position: fixed;
    right: max(18px, calc(env(safe-area-inset-right) + 18px));
    bottom: max(18px, calc(env(safe-area-inset-bottom) + 18px));
    z-index: 146;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
}

.app-ai-helper-trigger {
    min-height: 54px;
    padding: 0 14px 0 12px;
    display: inline-grid;
    grid-template-columns: 40px auto;
    align-items: center;
    gap: 12px;
    border-radius: 999px;
    border: 1px solid color-mix(in srgb, var(--line-strong) 82%, transparent);
    background: color-mix(in srgb, var(--panel) 84%, rgba(8, 12, 20, 0.74));
    color: inherit;
    box-shadow: 0 18px 40px rgba(0,0,0,0.28), inset 0 1px 0 rgba(255,255,255,0.08);
    backdrop-filter: blur(18px) saturate(130%);
    cursor: pointer;
}

.app-ai-helper-trigger-icon {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    border: 1px solid color-mix(in srgb, var(--line-strong) 76%, transparent);
    background: color-mix(in srgb, var(--accent) 18%, var(--panel-soft));
    font-size: 1.05rem;
}

.app-ai-helper-trigger-copy {
    display: block;
    text-align: left;
}

.app-ai-helper-trigger-copy strong,
.app-ai-helper-trigger-copy span,
.app-ai-helper-bubble strong,
.app-ai-helper-bubble p,
.app-ai-helper-bubble li {
    overflow-wrap: anywhere;
}


.app-ai-helper-panel {
    width: min(420px, calc(100vw - 20px));
    max-width: calc(100vw - 20px);
    max-height: min(76vh, 680px);
    display: grid;
    grid-template-rows: auto minmax(220px, 1fr) auto;
    gap: 12px;
    padding: 16px;
    border-radius: 28px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: linear-gradient(180deg, rgba(22, 28, 42, 0.66) 0%, rgba(9, 13, 22, 0.54) 100%);
    box-shadow: 0 26px 70px rgba(0,0,0,0.34), inset 0 1px 0 rgba(255,255,255,0.10);
    backdrop-filter: blur(26px) saturate(145%);
    -webkit-backdrop-filter: blur(26px) saturate(145%);
}

.app-ai-helper-panel[hidden] {
    display: none !important;
}

.app-ai-helper-header {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    min-height: 42px;
}

.app-ai-helper-header h3 {
    margin: 0;
}

.app-ai-helper-header-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.app-ai-helper-reset {
    min-height: 38px;
    padding: 0 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    border: 1px solid color-mix(in srgb, var(--line-strong) 78%, transparent);
    background: color-mix(in srgb, var(--panel-soft) 84%, transparent);
    color: inherit;
    cursor: pointer;
}

.app-ai-helper-close {
    width: 42px;
    height: 42px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.14);
    background: rgba(255,255,255,0.08);
    color: inherit;
    cursor: pointer;
    backdrop-filter: blur(14px) saturate(130%);
    -webkit-backdrop-filter: blur(14px) saturate(130%);
}

.app-ai-helper-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.app-ai-helper-messages {
    min-height: 0;
    overflow: auto;
    display: grid;
    gap: 12px;
    padding-right: 4px;
}

.app-ai-helper-message {
    display: flex;
}

.app-ai-helper-message.is-user {
    justify-content: flex-end;
}

.app-ai-helper-bubble {
    max-width: min(100%, 330px);
    display: grid;
    gap: 8px;
    padding: 14px 15px;
    border-radius: 18px;
    border: 1px solid rgba(255,255,255,0.14);
    background: rgba(255,255,255,0.08);
    backdrop-filter: blur(16px) saturate(130%);
    -webkit-backdrop-filter: blur(16px) saturate(130%);
}

.app-ai-helper-message.is-user .app-ai-helper-bubble {
    background: color-mix(in srgb, var(--accent) 16%, var(--panel-soft));
}

.app-ai-helper-message.is-loading .app-ai-helper-bubble {
    opacity: 0.78;
}

.app-ai-helper-bubble p,
.app-ai-helper-bubble ul {
    margin: 0;
}

.app-ai-helper-bubble ul {
    padding-left: 18px;
    display: grid;
    gap: 6px;
}

.app-ai-helper-links,
.app-ai-helper-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.app-ai-helper-link,
.app-ai-helper-suggestion {
    min-height: 36px;
    padding: 0 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    border: 1px solid color-mix(in srgb, var(--line-strong) 76%, transparent);
    background: color-mix(in srgb, var(--panel-soft) 82%, transparent);
    color: inherit;
    text-decoration: none;
    cursor: pointer;
    transition: transform .16s ease, border-color .16s ease, background .16s ease;
}

.app-ai-helper-link:hover,
.app-ai-helper-link:focus-visible,
.app-ai-helper-suggestion:hover,
.app-ai-helper-suggestion:focus-visible,
.app-ai-helper-trigger:hover,
.app-ai-helper-trigger:focus-visible,
.app-ai-helper-close:hover,
.app-ai-helper-close:focus-visible,
.app-ai-helper-reset:hover,
.app-ai-helper-reset:focus-visible {
    transform: translateY(-1px);
    border-color: color-mix(in srgb, var(--accent) 34%, var(--line-strong));
    background: color-mix(in srgb, var(--panel-soft) 72%, var(--accent) 10%);
}

.app-ai-helper-note {
    padding: 10px 12px;
    border-radius: 14px;
    background: color-mix(in srgb, var(--panel) 82%, transparent);
    color: var(--muted);
    font-size: 0.84rem;
}

.app-ai-helper-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
}

.app-ai-helper-input {
    min-height: 48px;
    padding: 0 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-radius: 18px;
    border: 1px solid rgba(255,255,255,0.14);
    background: rgba(255,255,255,0.08);
    backdrop-filter: blur(16px) saturate(130%);
    -webkit-backdrop-filter: blur(16px) saturate(130%);
}

.app-ai-helper-input input {
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: inherit;
    font: inherit;
}

.app-ai-helper-input input::placeholder {
    color: var(--muted);
}

html[data-theme="light"] .app-ai-helper-trigger,
html[data-theme="light"] .app-ai-helper-panel {
    background: color-mix(in srgb, rgba(255,255,255,0.92) 88%, var(--panel) 12%);
}

@media (max-width: 860px) {
    .app-ai-helper {
        right: 10px;
        left: 10px;
        align-items: stretch;
    }

    .app-ai-helper-trigger {
        width: fit-content;
        margin-left: auto;
    }

    .app-ai-helper-panel {
        width: 100%;
        max-width: 100%;
        max-height: min(76vh, 680px);
        border-radius: 24px;
    }

    .app-ai-helper-header-actions {
        flex-wrap: wrap;
        justify-content: flex-end;
    }

    .app-ai-helper-form {
        grid-template-columns: 1fr;
    }
}


.app-ai-helper-context {
    display: grid;
    gap: 8px;
    padding: 12px 14px;
    border-radius: 18px;
    border: 1px solid color-mix(in srgb, var(--line-strong) 76%, transparent);
    background: color-mix(in srgb, var(--panel-soft) 74%, transparent);
}

.app-ai-helper-context ul {
    margin: 0;
    padding-left: 18px;
    display: grid;
    gap: 6px;
}
    align-items: center;
    gap: 12px;
    border-radius: 999px;
    border: 1px solid color-mix(in srgb, var(--line-strong) 82%, transparent);
    background: color-mix(in srgb, var(--panel) 84%, rgba(8, 12, 20, 0.74));
    color: inherit;
    box-shadow: 0 18px 40px rgba(0,0,0,0.28), inset 0 1px 0 rgba(255,255,255,0.08);
    backdrop-filter: blur(18px) saturate(130%);
    cursor: pointer;
}

.app-ai-helper-trigger-icon {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    border: 1px solid color-mix(in srgb, var(--line-strong) 76%, transparent);
    background: color-mix(in srgb, var(--accent) 18%, var(--panel-soft));
    font-size: 1.05rem;
}

.app-ai-helper-trigger-copy {
    display: block;
    text-align: left;
}

.app-ai-helper-trigger-copy strong,
.app-ai-helper-trigger-copy span,
.app-ai-helper-bubble strong,
.app-ai-helper-bubble p,
.app-ai-helper-bubble li {
    overflow-wrap: anywhere;
}


.app-ai-helper-panel {
    width: min(420px, calc(100vw - 20px));
    max-width: calc(100vw - 20px);
    max-height: min(76vh, 680px);
    display: grid;
    grid-template-rows: auto minmax(220px, 1fr) auto;
    gap: 12px;
    padding: 16px;
    border-radius: 28px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: linear-gradient(180deg, rgba(22, 28, 42, 0.66) 0%, rgba(9, 13, 22, 0.54) 100%);
    box-shadow: 0 26px 70px rgba(0,0,0,0.34), inset 0 1px 0 rgba(255,255,255,0.10);
    backdrop-filter: blur(26px) saturate(145%);
    -webkit-backdrop-filter: blur(26px) saturate(145%);
}

.app-ai-helper-panel[hidden] {
    display: none !important;
}

.app-ai-helper-header {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    min-height: 42px;
}

.app-ai-helper-header h3 {
    margin: 0;
}

.app-ai-helper-header-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.app-ai-helper-reset {
    min-height: 38px;
    padding: 0 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    border: 1px solid color-mix(in srgb, var(--line-strong) 78%, transparent);
    background: color-mix(in srgb, var(--panel-soft) 84%, transparent);
    color: inherit;
    cursor: pointer;
}

.app-ai-helper-close {
    width: 42px;
    height: 42px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.14);
    background: rgba(255,255,255,0.08);
    color: inherit;
    cursor: pointer;
    backdrop-filter: blur(14px) saturate(130%);
    -webkit-backdrop-filter: blur(14px) saturate(130%);
}

.app-ai-helper-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.app-ai-helper-messages {
    min-height: 0;
    overflow: auto;
    display: grid;
    gap: 12px;
    padding-right: 4px;
}

.app-ai-helper-message {
    display: flex;
}

.app-ai-helper-message.is-user {
    justify-content: flex-end;
}

.app-ai-helper-bubble {
    max-width: min(100%, 330px);
    display: grid;
    gap: 8px;
    padding: 14px 15px;
    border-radius: 18px;
    border: 1px solid rgba(255,255,255,0.14);
    background: rgba(255,255,255,0.08);
    backdrop-filter: blur(16px) saturate(130%);
    -webkit-backdrop-filter: blur(16px) saturate(130%);
}

.app-ai-helper-message.is-user .app-ai-helper-bubble {
    background: color-mix(in srgb, var(--accent) 16%, var(--panel-soft));
}

.app-ai-helper-message.is-loading .app-ai-helper-bubble {
    opacity: 0.78;
}

.app-ai-helper-bubble p,
.app-ai-helper-bubble ul {
    margin: 0;
}

.app-ai-helper-bubble ul {
    padding-left: 18px;
    display: grid;
    gap: 6px;
}

.app-ai-helper-links,
.app-ai-helper-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.app-ai-helper-link,
.app-ai-helper-suggestion {
    min-height: 36px;
    padding: 0 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    border: 1px solid color-mix(in srgb, var(--line-strong) 76%, transparent);
    background: color-mix(in srgb, var(--panel-soft) 82%, transparent);
    color: inherit;
    text-decoration: none;
    cursor: pointer;
    transition: transform .16s ease, border-color .16s ease, background .16s ease;
}

.app-ai-helper-link:hover,
.app-ai-helper-link:focus-visible,
.app-ai-helper-suggestion:hover,
.app-ai-helper-suggestion:focus-visible,
.app-ai-helper-trigger:hover,
.app-ai-helper-trigger:focus-visible,
.app-ai-helper-close:hover,
.app-ai-helper-close:focus-visible,
.app-ai-helper-reset:hover,
.app-ai-helper-reset:focus-visible {
    transform: translateY(-1px);
    border-color: color-mix(in srgb, var(--accent) 34%, var(--line-strong));
    background: color-mix(in srgb, var(--panel-soft) 72%, var(--accent) 10%);
}

.app-ai-helper-note {
    padding: 10px 12px;
    border-radius: 14px;
    background: color-mix(in srgb, var(--panel) 82%, transparent);
    color: var(--muted);
    font-size: 0.84rem;
}

.app-ai-helper-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
}

.app-ai-helper-input {
    min-height: 48px;
    padding: 0 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-radius: 18px;
    border: 1px solid rgba(255,255,255,0.14);
    background: rgba(255,255,255,0.08);
    backdrop-filter: blur(16px) saturate(130%);
    -webkit-backdrop-filter: blur(16px) saturate(130%);
}

.app-ai-helper-input input {
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: inherit;
    font: inherit;
}

.app-ai-helper-input input::placeholder {
    color: var(--muted);
}

html[data-theme="light"] .app-ai-helper-trigger,
html[data-theme="light"] .app-ai-helper-panel {
    background: color-mix(in srgb, rgba(255,255,255,0.92) 88%, var(--panel) 12%);
}

@media (max-width: 860px) {
    .app-ai-helper {
        right: 10px;
        left: 10px;
        align-items: stretch;
    }

    .app-ai-helper-trigger {
        width: fit-content;
        margin-left: auto;
    }

    .app-ai-helper-panel {
        width: 100%;
        max-width: 100%;
        max-height: min(76vh, 680px);
        border-radius: 24px;
    }

    .app-ai-helper-header-actions {
        flex-wrap: wrap;
        justify-content: flex-end;
    }

    .app-ai-helper-form {
        grid-template-columns: 1fr;
    }
}


.app-ai-helper-context {
    display: grid;
    gap: 8px;
    padding: 12px 14px;
    border-radius: 18px;
    border: 1px solid color-mix(in srgb, var(--line-strong) 76%, transparent);
    background: color-mix(in srgb, var(--panel-soft) 74%, transparent);
}

.app-ai-helper-context ul {
    margin: 0;
    padding-left: 18px;
    display: grid;
    gap: 6px;
}

/* === 2026-03-28 KI-Chat Direktaktionen === */
.app-ai-helper-actions {
    display: grid;
    gap: 8px;
}

.app-ai-helper-action {
    min-height: 46px;
    padding: 10px 12px;
    display: grid;
    gap: 3px;
    border-radius: 16px;
    border: 1px solid color-mix(in srgb, var(--line-strong) 76%, transparent);
    background: color-mix(in srgb, var(--panel-soft) 82%, transparent);
    color: inherit;
    text-decoration: none;
    transition: transform .16s ease, border-color .16s ease, background .16s ease;
}

.app-ai-helper-action.is-create {
    border-color: color-mix(in srgb, var(--accent) 38%, var(--line-strong));
    background: color-mix(in srgb, var(--accent) 14%, var(--panel-soft));
}

.app-ai-helper-action.is-open {
    border-color: color-mix(in srgb, rgba(125, 211, 252, 0.85) 28%, var(--line-strong));
}

.app-ai-helper-action:hover,
.app-ai-helper-action:focus-visible {
    transform: translateY(-1px);
    border-color: color-mix(in srgb, var(--accent) 44%, var(--line-strong));
    background: color-mix(in srgb, var(--panel-soft) 72%, var(--accent) 12%);
}

.app-ai-helper-action-label {
    font-weight: 600;
}

.app-ai-helper-action-meta {
    font-size: 0.82rem;
    color: var(--muted);
}

.app-ai-helper-suggestions[hidden] {
    display: none !important;
}

/* === 2026-03-28 AI chat layout + sidebar pill hardfix === */
.app-ai-helper-messages {
    min-height: 0;
    overflow: auto;
    display: grid;
    gap: 12px;
    overscroll-behavior: contain;
}

.app-ai-helper-message {
    display: flex;
}

.app-ai-helper-message.is-user {
    justify-content: flex-end;
}

.app-ai-helper-bubble {
    max-width: min(100%, 336px);
    display: grid;
    gap: 8px;
    padding: 14px 15px;
}

.app-ai-helper-bubble p,
.app-ai-helper-bubble ul {
    margin: 0;
}

.app-ai-helper-bubble ul {
    padding-left: 18px;
    display: grid;
    gap: 6px;
}

.app-ai-helper-actions {
    display: grid;
    gap: 8px;
}

.app-ai-helper-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: end;
}

.nav-section {
    overflow: visible;
}

.nav-section-panel {
    overflow: visible !important;
}

.nav-section.is-open .nav-section-panel {
    max-height: 420px !important;
    padding-bottom: 14px !important;
}

@media (max-width: 860px) {
    .app-ai-helper-form {
        grid-template-columns: 1fr;
    }
}


/* === 2026-03-28 KI-Helfer Pill Redesign Refresh === */
.app-ai-helper-trigger {
    min-height: 52px;
    padding: 0 16px 0 10px;
    grid-template-columns: 38px auto;
    gap: 11px;
    border: 1px solid rgba(160, 196, 255, 0.22);
    background:
        radial-gradient(circle at top left, rgba(96, 165, 250, 0.13) 0%, rgba(96, 165, 250, 0.04) 28%, rgba(255, 255, 255, 0) 52%),
        linear-gradient(180deg, rgba(17, 25, 41, 0.72) 0%, rgba(9, 15, 28, 0.62) 100%);
    box-shadow:
        0 14px 32px rgba(2, 6, 23, 0.22),
        0 6px 18px rgba(2, 6, 23, 0.14),
        inset 0 1px 0 rgba(255, 255, 255, 0.16),
        inset 0 -1px 0 rgba(15, 23, 42, 0.22);
    backdrop-filter: blur(22px) saturate(165%);
    -webkit-backdrop-filter: blur(22px) saturate(165%);
}
.app-ai-helper-trigger::before {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.18) 0%, rgba(255, 255, 255, 0.05) 44%, rgba(255, 255, 255, 0.02) 100%),
        linear-gradient(90deg, rgba(59, 130, 246, 0.12) 0%, rgba(59, 130, 246, 0) 38%);
}
.app-ai-helper-trigger::after {
    left: 14%;
    right: 14%;
    height: 40%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.22) 0%, rgba(255, 255, 255, 0) 100%);
}
.app-ai-helper-trigger:hover,
.app-ai-helper-trigger:focus-visible,
.app-ai-helper.is-open .app-ai-helper-trigger {
    border-color: rgba(191, 219, 254, 0.34);
    box-shadow:
        0 18px 40px rgba(2, 6, 23, 0.28),
        0 10px 24px rgba(37, 99, 235, 0.16),
        inset 0 1px 0 rgba(255, 255, 255, 0.22),
        inset 0 -1px 0 rgba(15, 23, 42, 0.18);
}
.app-ai-helper-trigger-icon {
    width: 38px;
    height: 38px;
    background:
        radial-gradient(circle at 30% 28%, rgba(255, 255, 255, 0.28) 0%, rgba(191, 219, 254, 0.16) 30%, rgba(59, 130, 246, 0.10) 58%, rgba(30, 41, 59, 0.14) 100%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.08) 0%, rgba(15, 23, 42, 0.10) 100%);
    border: 1px solid rgba(191, 219, 254, 0.18);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.18),
        inset 0 -1px 0 rgba(15, 23, 42, 0.12),
        0 4px 14px rgba(15, 23, 42, 0.14);
    font-size: 0.95rem;
}
.app-ai-helper-trigger-copy {
    font-size: 0.98rem;
    letter-spacing: 0.005em;
}
html[data-theme="light"] .app-ai-helper-trigger {
    background:
        radial-gradient(circle at top left, rgba(96, 165, 250, 0.12) 0%, rgba(96, 165, 250, 0.03) 30%, rgba(255, 255, 255, 0) 52%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.88) 0%, rgba(241, 245, 249, 0.76) 100%);
    box-shadow:
        0 16px 34px rgba(148, 163, 184, 0.16),
        0 6px 18px rgba(148, 163, 184, 0.10),
        inset 0 1px 0 rgba(255, 255, 255, 0.82),
        inset 0 -1px 0 rgba(148, 163, 184, 0.08);
}
