:root {
    --color-primary: #3ccdc7;
    --color-primary-soft: rgba(60, 205, 199, 0.16);
    --color-support: #001154;
    --color-accent: #fedc3d;
    --color-accent-strong: #fed61a;
    --color-success: #10b981;
    --color-warning: #d4a700;
    --color-danger: #ef4444;
    --color-info: #14b8a6;
    --color-bg: #ffffff;
    --color-panel: #ffffff;
    --color-panel-soft: #ffffff;
    --color-text: #0f172a;
    --color-muted: #64748b;
    --color-border: #e7e3cf;
    --color-sidebar: #103d43;
    --color-sidebar-border: rgba(254, 220, 61, 0.18);
    --color-sidebar-text: #f8fff9;
    --color-sidebar-muted: rgba(248, 255, 249, 0.62);
    --shadow-card: 0 10px 30px rgba(16, 61, 67, 0.06);
    --radius-card: 10px;
    --radius-button: 8px;
    --radius-badge: 6px;
    --space-xs: 8px;
    --space-sm: 16px;
    --space-md: 20px;
    --space-lg: 32px;
    --header-height: 64px;
    --sidebar-width: 240px;
    --content-width: 1280px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: "Inter", sans-serif;
    background: var(--color-bg);
    color: var(--color-text);
}

.nav-toggle {
    position: fixed;
    opacity: 0;
    pointer-events: none;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

[id] {
    scroll-margin-top: 96px;
}

.app-shell {
    display: flex;
    min-height: 100vh;
}

.app-overlay {
    display: none;
}

.app-sidebar {
    width: var(--sidebar-width);
    background: var(--color-sidebar);
    color: var(--color-sidebar-text);
    border-right: 1px solid var(--color-sidebar-border);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: var(--space-md);
    border-bottom: 1px solid var(--color-sidebar-border);
}

.sidebar-close,
.mobile-nav-button {
    display: none;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-button);
    border: 1px solid var(--color-border);
    background: var(--color-panel);
    color: var(--color-text);
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.sidebar-close {
    margin-left: auto;
    border-color: rgba(148, 163, 184, 0.24);
    background: rgba(15, 23, 42, 0.42);
    color: #fff;
}

.brand-mark {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-button);
    background: linear-gradient(135deg, var(--color-primary) 0%, #29b8b2 100%);
    color: var(--color-support);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.brand-name {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.1;
}

.brand-subtitle {
    margin: 4px 0 0;
    font-size: 12px;
    color: var(--color-sidebar-muted);
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: var(--space-md) 12px;
}

.nav-group + .nav-group {
    margin-top: 24px;
}

.nav-group-title {
    margin: 0 0 8px;
    padding: 0 12px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-sidebar-muted);
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--radius-button);
    color: var(--color-sidebar-text);
    transition: background-color 0.2s ease, color 0.2s ease;
}

.sidebar-link:hover {
    background: rgba(254, 220, 61, 0.12);
    color: #fff;
}

.sidebar-link.active {
    background: linear-gradient(90deg, rgba(60, 205, 199, 0.28), rgba(254, 220, 61, 0.2));
    color: #fff;
    box-shadow: inset 0 0 0 1px rgba(254, 220, 61, 0.18);
}

.sidebar-link-label {
    font-size: 14px;
    font-weight: 500;
}

.sidebar-footer {
    padding: var(--space-md);
    border-top: 1px solid var(--color-sidebar-border);
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 12px;
}

.avatar {
    width: 36px;
    height: 36px;
    border-radius: 999px;
    background: rgba(60, 205, 199, 0.18);
    color: #0b6662;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    overflow: hidden;
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sidebar-user-name {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
}

.sidebar-user-role {
    margin: 2px 0 0;
    font-size: 12px;
    color: var(--color-sidebar-muted);
}

.app-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.app-topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    height: var(--header-height);
    display: grid;
    grid-template-columns: auto minmax(260px, 1fr) auto;
    align-items: center;
    gap: 24px;
    padding: 0 24px;
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid var(--color-border);
    backdrop-filter: blur(12px);
}

.topbar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.topbar-search {
    max-width: 480px;
    width: 100%;
    margin: 0 auto;
    position: relative;
}

.topbar-search .material-symbols-outlined {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 18px;
    pointer-events: none;
    z-index: 2;
}

.search-input {
    display: block;
    width: 100%;
    height: 40px;
    padding: 0 14px 0 40px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-button);
    background: var(--color-panel-soft);
    color: var(--color-text);
    font-size: 14px;
    line-height: 1.4;
    outline: 0;
    position: relative;
    z-index: 1;
    appearance: none;
    -webkit-appearance: none;
}

.topbar-search .field.search-input {
    border: 1px solid var(--color-border);
    border-radius: 12px;
    background: #fffdf8;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.search-input::placeholder {
    color: var(--color-muted);
    opacity: 1;
}

.search-input:focus {
    border-color: var(--color-support);
    box-shadow: 0 0 0 3px rgba(60, 205, 199, 0.14);
}

.topbar-search .field.search-input:focus {
    border-color: var(--color-support);
    box-shadow: 0 0 0 3px rgba(60, 205, 199, 0.14);
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.icon-button {
    width: 40px;
    height: 40px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-button);
    background: var(--color-panel);
    color: var(--color-muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease;
    position: relative;
}

.icon-button:hover {
    color: var(--color-support);
    border-color: rgba(60, 205, 199, 0.22);
    background: rgba(60, 205, 199, 0.08);
}

.notification-dot {
    position: absolute;
    top: 9px;
    right: 9px;
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: var(--color-danger);
}

.topbar-user {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-left: 12px;
    border-left: 1px solid var(--color-border);
}

.topbar-user-name {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
}

.topbar-user-role {
    margin: 2px 0 0;
    font-size: 12px;
    color: var(--color-muted);
}

.page-wrap {
    width: 100%;
    max-width: var(--content-width);
    margin: 0 auto;
    padding: var(--space-lg) 24px 40px;
}

.page-stack > * + * {
    margin-top: var(--space-lg);
}

.page-header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: var(--space-sm);
}

.page-title {
    margin: 0;
    font-size: 32px;
    line-height: 1.05;
    font-weight: 600;
    letter-spacing: -0.03em;
}

.page-description {
    margin: 8px 0 0;
    max-width: 780px;
    font-size: 14px;
    line-height: 1.5;
    color: var(--color-muted);
}

.meta-line,
.breadcrumb {
    margin: 0;
    font-size: 12px;
    color: var(--color-muted);
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
}

.page-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs);
}

.btn {
    height: 40px;
    padding: 0 16px;
    border-radius: var(--radius-button);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    border: 1px solid transparent;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
    white-space: nowrap;
}

.btn-primary {
    background: #fedc3d;
    color: var(--color-support);
    box-shadow: 0 10px 24px rgba(254, 220, 61, 0.24);
}

.btn-primary:hover {
    background: #f2cf23;
}

.btn-secondary {
    background: #fff;
    color: var(--color-text);
    border-color: var(--color-border);
}

.btn-secondary:hover {
    border-color: rgba(60, 205, 199, 0.2);
    background: rgba(60, 205, 199, 0.05);
}

.btn-tertiary {
    background: transparent;
    color: var(--color-support);
}

.btn-tertiary:hover {
    background: rgba(60, 205, 199, 0.06);
}

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

.chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    border: 1px solid var(--color-border);
    background: #fffef8;
    color: #4b5563;
    font-size: 12px;
    font-weight: 600;
}

.panel {
    background: var(--color-panel);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-card);
    padding: var(--space-md);
    box-shadow: var(--shadow-card);
}

.panel-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
}

.section-title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.section-caption {
    margin: 4px 0 0;
    font-size: 12px;
    color: var(--color-muted);
}

.metric-card {
    min-height: 148px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.metric-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.metric-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-button);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(60, 205, 199, 0.12);
    color: var(--color-support);
}

.metric-label {
    margin: 0;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-muted);
}

.metric-value {
    margin: 8px 0 0;
    font-size: 32px;
    line-height: 1;
    font-weight: 700;
    letter-spacing: -0.03em;
}

.metric-meta {
    margin: 8px 0 0;
    font-size: 12px;
    color: var(--color-muted);
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 28px;
    padding: 0 10px;
    border-radius: var(--radius-badge);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-success {
    background: rgba(16, 185, 129, 0.12);
    color: #047857;
}

.badge-info {
    background: rgba(60, 205, 199, 0.16);
    color: var(--color-support);
}

.badge-warning {
    background: rgba(254, 220, 61, 0.22);
    color: #a16207;
}

.badge-danger {
    background: rgba(239, 68, 68, 0.12);
    color: #b91c1c;
}

.badge-neutral {
    background: #f1f5f9;
    color: var(--color-muted);
}

.legend-row {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 12px;
    color: var(--color-muted);
}

.legend-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
}

.progress {
    width: 72px;
    height: 8px;
    border-radius: 999px;
    background: #e2e8f0;
    overflow: hidden;
}

.progress > span {
    display: block;
    height: 100%;
    border-radius: 999px;
}

.summary-strip {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-sm);
    padding: 16px 20px;
    border-radius: var(--radius-card);
    border: 1px solid rgba(60, 205, 199, 0.22);
    background: linear-gradient(90deg, rgba(60, 205, 199, 0.12) 0%, rgba(254, 220, 61, 0.14) 100%);
}

.summary-strip strong,
.summary-strip .material-symbols-outlined {
    color: var(--color-support);
}

.summary-points {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 14px;
    color: var(--color-muted);
}

.stack-bar {
    display: flex;
    width: 100%;
    height: 48px;
    overflow: hidden;
    border-radius: var(--radius-button);
    border: 1px solid var(--color-border);
    background: #eef2f7;
}

.stack-bar > div {
    height: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
}

.alert-list,
.activity-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.alert-item,
.activity-item {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-button);
    padding: 14px 16px;
    background: var(--color-panel-soft);
}

.alert-item.critical {
    border-left: 4px solid var(--color-danger);
}

.alert-item.warning {
    border-left: 4px solid var(--color-warning);
}

.alert-item.info {
    border-left: 4px solid var(--color-primary);
}

.activity-time {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: var(--color-muted);
}

.toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
}

.toolbar-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.field,
.select {
    height: 40px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-button);
    background: var(--color-panel-soft);
    color: var(--color-text);
    font-size: 14px;
    padding: 0 14px;
    outline: 0;
}

.field:focus,
.select:focus {
    border-color: var(--color-support);
    box-shadow: 0 0 0 3px rgba(60, 205, 199, 0.14);
}

.field-wrap {
    position: relative;
}

.field-wrap .material-symbols-outlined {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 18px;
}

.field-wrap .field {
    padding-left: 40px;
}

.table-panel {
    background: var(--color-panel);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-card);
    overflow: hidden;
    box-shadow: var(--shadow-card);
}

.table-toolbar {
    padding: var(--space-md);
    border-bottom: 1px solid var(--color-border);
}

.table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.data-table thead th {
    padding: 16px 20px;
    background: var(--color-panel-soft);
    color: var(--color-muted);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    text-align: left;
    white-space: nowrap;
}

.data-table tbody tr {
    height: 56px;
}

.data-table tbody tr:hover {
    background: rgba(248, 250, 252, 0.9);
}

.data-table tbody td {
    padding: 16px 20px;
    border-top: 1px solid #eef2f7;
    font-size: 14px;
    vertical-align: middle;
}

.table-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 20px;
    background: var(--color-panel-soft);
    border-top: 1px solid var(--color-border);
}

.pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.mini-note {
    font-size: 12px;
    color: var(--color-muted);
}

.timeline {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.timeline-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.timeline-icon {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    flex-shrink: 0;
}

.chart-columns {
    height: 260px;
    display: flex;
    align-items: flex-end;
    gap: 16px;
}

.chart-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
}

.chart-bars {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: flex-end;
    gap: 6px;
}

.chart-bars > div {
    flex: 1;
    border-radius: 8px 8px 0 0;
}

.donut {
    width: 164px;
    height: 164px;
    margin: 0 auto;
    border-radius: 999px;
    background: conic-gradient(var(--color-success) 0 63%, var(--color-primary) 63% 88%, var(--color-warning) 88% 100%);
    display: grid;
    place-items: center;
}

.donut::after {
    content: "";
    width: 120px;
    height: 120px;
    border-radius: 999px;
    background: var(--color-panel);
    display: block;
}

.donut-center {
    position: relative;
    margin-top: -118px;
    text-align: center;
}

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

.subgrid-stats > div {
    text-align: center;
}

.empty-outline {
    border: 1px dashed var(--color-border);
    border-radius: var(--radius-card);
    padding: var(--space-md);
    color: var(--color-muted);
    font-size: 14px;
}

.local-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.local-nav-link {
    min-height: 36px;
    padding: 0 14px;
    border-radius: var(--radius-button);
    border: 1px solid var(--color-border);
    background: var(--color-panel);
    color: var(--color-muted);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
}

.local-nav-link:hover {
    border-color: rgba(17, 82, 212, 0.18);
    color: var(--color-primary);
    background: rgba(17, 82, 212, 0.04);
}

.local-nav-link.active {
    background: var(--color-primary-soft);
    color: var(--color-primary);
    border-color: rgba(17, 82, 212, 0.18);
}

.local-nav-link.disabled {
    color: #94a3b8;
    background: #f8fafc;
}

.local-nav-link.disabled:hover {
    color: #94a3b8;
    border-color: var(--color-border);
    background: #f8fafc;
}

.report-hero {
    display: grid;
    grid-template-columns: minmax(240px, 0.95fr) minmax(0, 1.35fr);
    overflow: hidden;
    padding: 0;
}

.report-hero-art {
    position: relative;
    min-height: 320px;
    padding: 32px;
    background: linear-gradient(160deg, rgba(17, 82, 212, 0.10), rgba(17, 82, 212, 0.02));
    border-right: 1px solid var(--color-border);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

.report-hero-art::before {
    content: "";
    position: absolute;
    inset: 18px;
    border-radius: 22px;
    border: 1px dashed rgba(17, 82, 212, 0.18);
}

.report-hero-mark {
    width: 96px;
    height: 96px;
    border-radius: 24px;
    background: var(--color-panel);
    border: 1px solid rgba(17, 82, 212, 0.12);
    box-shadow: 0 20px 50px rgba(17, 82, 212, 0.12);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--color-primary);
    position: relative;
    z-index: 1;
}

.report-hero-body {
    padding: 32px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.report-title-xl {
    margin: 0;
    font-size: 44px;
    line-height: 0.98;
    font-weight: 800;
    letter-spacing: -0.04em;
}

.report-meta-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.report-meta-card {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    background: var(--color-panel-soft);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-card);
    min-width: 0;
}

.report-meta-card > div:last-child {
    min-width: 0;
    flex: 1 1 auto;
}

.report-meta-card p {
    overflow-wrap: anywhere;
    word-break: break-word;
}

.report-callout {
    padding: 16px 18px;
    background: rgba(17, 82, 212, 0.06);
    border-left: 4px solid var(--color-primary);
    border-radius: 0 var(--radius-button) var(--radius-button) 0;
    font-size: 14px;
    color: #475569;
}

.report-status-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 20px;
    border-bottom: 1px solid var(--color-border);
    background: var(--color-panel-soft);
}

.report-cluster-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.report-cluster-card {
    padding: 20px;
    border-radius: var(--radius-card);
    border: 1px solid var(--color-border);
    background: var(--color-panel);
}

.report-footer-note {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding-top: 24px;
    border-top: 1px solid var(--color-border);
}

.status-panel {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 20px;
    align-items: flex-start;
}

.status-panel-icon {
    width: 56px;
    height: 56px;
    border-radius: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 960px) {
    .report-hero {
        grid-template-columns: 1fr;
    }

    .report-hero-art {
        min-height: 220px;
        border-right: 0;
        border-bottom: 1px solid var(--color-border);
    }

    .report-meta-list,
    .report-cluster-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 640px) {
    .local-nav {
        flex-direction: column;
    }

    .local-nav-link {
        width: 100%;
        justify-content: flex-start;
    }

    .report-title-xl {
        font-size: 34px;
    }

    .report-hero-art,
    .report-hero-body {
        padding: 20px;
    }

    .report-meta-list,
    .report-cluster-grid {
        grid-template-columns: 1fr;
    }

    .status-panel {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1200px) {
    .app-topbar {
        grid-template-columns: 1fr;
        height: auto;
        padding: 12px 16px;
        gap: 12px;
    }

    .topbar-search {
        max-width: none;
        margin: 0;
    }

    .topbar-actions {
        justify-content: space-between;
        flex-wrap: wrap;
    }

    .page-header {
        align-items: flex-start;
    }

    .page-actions {
        width: 100%;
    }

    .page-wrap {
        padding: 24px 16px 32px;
    }
}

@media (max-width: 960px) {
    .app-shell {
        flex-direction: column;
        position: relative;
    }

    .app-sidebar {
        width: min(320px, calc(100vw - 32px));
        max-width: 100%;
        border-right: 1px solid var(--color-sidebar-border);
        border-bottom: 0;
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        z-index: 40;
        transform: translateX(-100%);
        transition: transform 0.24s ease;
        box-shadow: 0 20px 44px rgba(2, 6, 23, 0.42);
        overflow-y: auto;
    }

    .nav-toggle:checked ~ .app-shell .app-sidebar {
        transform: translateX(0);
    }

    .nav-toggle:checked ~ .app-shell .app-overlay {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 35;
        background: rgba(15, 23, 42, 0.48);
    }

    .sidebar-brand {
        padding: 14px 16px;
    }

    .sidebar-close,
    .mobile-nav-button {
        display: inline-flex;
    }

    .sidebar-nav {
        display: flex;
        flex-direction: column;
        gap: 14px;
        overflow: visible;
        padding: 12px 16px 16px;
    }

    .nav-group {
        background: rgba(15, 23, 42, 0.38);
        border: 1px solid rgba(30, 41, 59, 0.9);
        border-radius: var(--radius-card);
        padding: 12px;
    }

    .nav-group + .nav-group {
        margin-top: 0;
    }

    .nav-group-title {
        padding: 0;
        margin-bottom: 10px;
        font-size: 11px;
    }

    .sidebar-link {
        padding: 9px 10px;
    }

    .sidebar-link .material-symbols-outlined {
        font-size: 20px;
    }

    .sidebar-link-label {
        font-size: 13px;
    }

    .sidebar-footer {
        display: none;
    }

    .topbar-brand {
        gap: 10px;
    }

    .summary-strip {
        align-items: flex-start;
    }

    .summary-points {
        flex-direction: column;
        gap: 8px;
    }

    .toolbar {
        align-items: stretch;
    }

    .toolbar-group {
        width: 100%;
    }

    .field-wrap,
    .field,
    .select {
        width: 100%;
    }

    .toolbar-group > .select,
    .toolbar-group > .btn,
    .toolbar-group > .field-wrap {
        flex: 1 1 220px;
    }

    .table-footer {
        flex-direction: column;
        align-items: flex-start;
    }

    .pagination {
        width: 100%;
    }

    .chart-columns {
        height: 220px;
        gap: 10px;
    }

    .chart-bars {
        gap: 4px;
    }

    .stack-bar > div {
        padding: 0 6px;
        font-size: 10px;
        line-height: 1.15;
        text-align: center;
    }

    .donut {
        width: 148px;
        height: 148px;
    }

    .donut::after {
        width: 108px;
        height: 108px;
    }

    .donut-center {
        margin-top: -108px;
    }

    .subgrid-stats {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .sidebar-brand {
        padding: 12px;
    }

    .brand-mark {
        width: 38px;
        height: 38px;
    }

    .brand-name {
        font-size: 14px;
    }

    .app-topbar {
        padding: 12px;
    }

    .app-sidebar {
        width: min(300px, calc(100vw - 24px));
    }

    .sidebar-nav {
        gap: 10px;
        padding: 10px 12px 12px;
    }

    .nav-group {
        padding: 10px;
    }

    .sidebar-link {
        padding: 8px 10px;
    }

    .topbar-search .material-symbols-outlined {
        left: 12px;
    }

    .search-input {
        padding-left: 40px;
    }

    .topbar-brand .brand-subtitle,
    .topbar-user-role {
        display: none;
    }

    .topbar-user {
        padding-left: 0;
        border-left: 0;
    }

    .topbar-user-name {
        display: none;
    }

    .page-wrap {
        padding: 20px 12px 28px;
    }

    .page-title {
        font-size: 28px;
        line-height: 1.1;
    }

    .breadcrumb {
        flex-wrap: wrap;
        row-gap: 4px;
    }

    .page-actions,
    .page-actions .btn,
    .page-actions a.btn,
    .summary-strip .btn,
    .table-footer .btn,
    .pagination .btn {
        width: 100%;
    }

    .chip-row {
        flex-direction: column;
        align-items: stretch;
    }

    .chip {
        width: 100%;
        justify-content: flex-start;
    }

    .panel,
    .table-toolbar,
    .table-footer {
        padding-left: 16px;
        padding-right: 16px;
    }

    .metric-card {
        min-height: auto;
    }

    .metric-value {
        font-size: 28px;
    }

    .legend-row {
        gap: 10px;
    }

    .legend-item {
        font-size: 11px;
    }

    .stack-bar {
        height: 44px;
    }

    .stack-bar > div {
        font-size: 9px;
        padding: 0 4px;
    }

    .timeline-item {
        gap: 10px;
    }

    .timeline-icon {
        width: 28px;
        height: 28px;
    }

    .chart-columns {
        height: 180px;
        gap: 8px;
    }

    .data-table thead th,
    .data-table tbody td {
        padding: 14px 16px;
    }

    .data-table {
        min-width: 760px;
    }
}
