:root {
    --page-bg: #000000;
    --shell-bg: #000000;
    --shell-bg-soft: #070707;
    --shell-line: rgba(255, 255, 255, 0.06);
    --content-bg: #191d25;
    --content-bg-2: #202530;
    --content-bg-3: #252b37;
    --content-line: rgba(255, 255, 255, 0.06);
    --text: #f5f7fb;
    --text-soft: #c7cfde;
    --text-muted: #8b96aa;
    --text-faint: #5f697b;
    --accent: #1fb9ff;
    --accent-soft: rgba(31, 185, 255, 0.16);
    --positive: #53d57b;
    --positive-soft: rgba(83, 213, 123, 0.14);
    --warning: #f1c160;
    --warning-soft: rgba(241, 193, 96, 0.15);
    --danger: #ff6a6a;
    --danger-soft: rgba(255, 106, 106, 0.15);
    --shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    --radius-xl: 24px;
    --radius-lg: 18px;
    --radius-md: 14px;
    --radius-sm: 11px;
}

body[data-theme="light"] {
    --page-bg: #ffffff;
    --shell-bg: #ffffff;
    --shell-bg-soft: #f5f7fa;
    --shell-line: rgba(16, 24, 40, 0.08);
    --content-bg: #ffffff;
    --content-bg-2: #f7f9fc;
    --content-bg-3: #eef3f8;
    --content-line: rgba(16, 24, 40, 0.08);
    --text: #0c1220;
    --text-soft: #2d3748;
    --text-muted: #5e6b80;
    --text-faint: #7d8899;
    --shadow: 0 20px 40px rgba(15, 23, 42, 0.08);
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
}

body {
    font-family: Manrope, Inter, "Segoe UI", sans-serif;
    background: var(--page-bg);
    color: var(--text);
}

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

button,
input,
select,
textarea {
    font: inherit;
}

.app-body {
    min-height: 100vh;
    background: var(--page-bg);
}

.shell-frame {
    display: flex;
    min-height: 100vh;
    width: 100%;
    background: var(--page-bg);
}

.sidenav {
    position: sticky;
    top: 0;
    align-self: flex-start;
    width: 244px;
    flex-shrink: 0;
    min-height: 100vh;
    max-height: 100vh;
    background: var(--shell-bg);
    border-right: 1px solid var(--shell-line);
    padding: 18px 12px 24px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.brand-area.logo-only {
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    padding: 0 6px;
}

.brand-logo,
.login-logo {
    display: block;
    width: auto;
    height: 22px;
}

.menu-list {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    overflow-y: auto;
    scrollbar-width: none;
}

.menu-list::-webkit-scrollbar,
.tabs::-webkit-scrollbar,
.table-scroll::-webkit-scrollbar {
    width: 0;
    height: 0;
}

.menu-item {
    min-height: 40px;
    padding: 0 12px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-muted);
    transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.menu-item:hover {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-soft);
}

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

body[data-theme="light"] .sidenav {
    border-right-color: transparent;
}

.menu-item.active {
    color: var(--accent);
    background: transparent;
    box-shadow: none;
}

.menu-item.active:hover,
body[data-theme="light"] .menu-item.active,
body[data-theme="light"] .menu-item.active:hover {
    background: transparent;
}

.menu-item.active .menu-label,
.menu-item.active .menu-icon,
.menu-item.active .menu-badge {
    color: var(--accent);
}

.menu-icon,
.menu-icon svg,
.circle-button svg,
.switch-dot svg,
.action-button i svg,
.save-button i svg,
.crumb-sep svg,
.filter-chip i svg {
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.menu-label {
    flex: 1;
    font-size: 0.82rem;
    font-weight: 500;
}

.menu-badge {
    min-width: 20px;
    padding: 2px 7px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--accent);
    font-size: 0.66rem;
    font-weight: 700;
    text-align: center;
}

.main-shell {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    background: var(--page-bg);
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    min-height: 68px;
    padding: 14px 20px;
    background: var(--shell-bg);
    border-bottom: 1px solid var(--shell-line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

body[data-theme="light"] .topbar {
    border-bottom-color: transparent;
}

.breadcrumbs,
.topbar-right,
.user-box,
.panel-actions,
.stat-topline,
.bar-head,
.filter-row {
    display: flex;
    align-items: center;
}

.breadcrumbs {
    gap: 8px;
    flex-wrap: wrap;
}

.crumb {
    color: var(--text-faint);
    font-size: 0.78rem;
    font-weight: 600;
}

.crumb.current {
    color: var(--text-soft);
}

.crumb-sep {
    color: var(--text-faint);
    display: inline-flex;
}

.topbar-right {
    gap: 12px;
    flex-wrap: wrap;
}

.theme-switch {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--shell-line);
}

body[data-theme="light"] .theme-switch {
    background: rgba(15, 23, 42, 0.04);
}

.switch-dot,
.circle-button {
    width: 30px;
    height: 30px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.switch-dot.active,
.switch-dot:hover,
.circle-button:hover {
    background: rgba(255, 255, 255, 0.09);
    color: var(--text);
}

body[data-theme="light"] .switch-dot.active,
body[data-theme="light"] .switch-dot:hover,
body[data-theme="light"] .circle-button:hover {
    background: rgba(15, 23, 42, 0.08);
}

.user-box {
    gap: 10px;
    min-height: 40px;
    padding: 5px 7px 5px 14px;
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--shell-line);
}

body[data-theme="light"] .user-box {
    background: rgba(15, 23, 42, 0.04);
}

.user-meta {
    text-align: right;
}

.user-meta strong {
    display: block;
    font-size: 0.8rem;
    font-weight: 700;
}

.user-meta span {
    display: block;
    margin-top: 1px;
    color: var(--text-muted);
    font-size: 0.68rem;
    font-weight: 600;
}

.avatar {
    width: 30px;
    height: 30px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    font-weight: 800;
}

body[data-theme="light"] .avatar {
    background: rgba(15, 23, 42, 0.08);
}

.page-section {
    flex: 1;
    padding: 18px 20px 32px;
}

body[data-theme="light"] .main-shell,
body[data-theme="light"] .page-section {
    background: #ffffff;
}

.panel-surface {
    min-height: 100%;
    border-radius: var(--radius-xl);
    background: linear-gradient(180deg, #1c2029 0%, #171b23 100%);
    border: 1px solid var(--content-line);
    padding: 14px 16px 18px;
    box-shadow: var(--shadow);
}

body[data-theme="light"] .panel-surface {
    background: linear-gradient(180deg, #ffffff 0%, #f7f9fc 100%);
}

.panel-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 14px;
    padding: 4px 2px 14px;
}

.panel-head-main h2 {
    margin: 0;
    font-size: clamp(1.9rem, 2vw, 2.4rem);
    font-weight: 800;
    letter-spacing: -0.04em;
}

.panel-head-main p {
    margin: 6px 0 0;
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.55;
}

.panel-actions {
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.action-button,
.save-button,
.filter-chip,
.tab-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.action-button,
.save-button,
.filter-chip {
    min-height: 36px;
    padding: 0 14px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-soft);
    gap: 8px;
    font-size: 0.82rem;
    font-weight: 700;
}

.action-button:hover,
.filter-chip:hover {
    background: rgba(255, 255, 255, 0.07);
}

body[data-theme="light"] .action-button,
body[data-theme="light"] .save-button,
body[data-theme="light"] .filter-chip {
    border-color: rgba(15, 23, 42, 0.08);
    background: rgba(255, 255, 255, 0.88);
    color: var(--text-soft);
}

body[data-theme="light"] .action-button:hover,
body[data-theme="light"] .filter-chip:hover {
    background: rgba(15, 23, 42, 0.04);
}

.action-button.primary,
.filter-chip.accent,
.action-button.full-width,
.save-button {
    color: var(--accent);
    border-color: rgba(31, 185, 255, 0.18);
    background: rgba(31, 185, 255, 0.08);
}

.action-button.full-width {
    width: 100%;
}

.panel-state {
    text-align: right;
    font-size: 0.88rem;
    font-weight: 700;
    white-space: nowrap;
}

.panel-state span {
    color: var(--text-muted);
    margin-right: 8px;
}

.tone-positive {
    color: var(--positive);
}

.tone-danger {
    color: var(--danger);
}

.tone-warning {
    color: var(--warning);
}

.tone-accent {
    color: var(--accent);
}

.tone-muted {
    color: var(--text-muted);
}

.tabs {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow-x: auto;
    padding: 10px 2px 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    margin-bottom: 14px;
}

body[data-theme="light"] .tabs {
    border-top-color: rgba(15, 23, 42, 0.06);
    border-bottom-color: rgba(15, 23, 42, 0.06);
}

.tab-button {
    min-height: 34px;
    padding: 0 14px;
    border-radius: 12px;
    color: var(--text-faint);
    font-size: 0.76rem;
    font-weight: 700;
    white-space: nowrap;
}

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

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

.flash-banner {
    margin: 0 0 14px;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid rgba(83, 213, 123, 0.18);
    background: rgba(83, 213, 123, 0.1);
    color: var(--positive);
    font-size: 0.85rem;
    font-weight: 700;
}

.filter-row {
    gap: 10px;
    flex-wrap: wrap;
    margin: 2px 0 16px;
}

.filter-chip {
    color: var(--text-faint);
}

.filter-chip.active {
    color: var(--text);
    background: rgba(255, 255, 255, 0.08);
}

body[data-theme="light"] .filter-chip.active {
    background: rgba(15, 23, 42, 0.08);
}

.filter-chip.select i {
    transform: rotate(90deg);
    color: var(--text-muted);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 14px;
}

.stat-card,
.content-card,
.login-card,
.showcase-card {
    background: linear-gradient(180deg, var(--content-bg-2) 0%, var(--content-bg) 100%);
    border: 1px solid var(--content-line);
    border-radius: var(--radius-lg);
}

.stat-card {
    padding: 16px 18px;
}

.stat-topline {
    justify-content: space-between;
    gap: 10px;
}

.stat-topline span {
    color: var(--text-faint);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.stat-topline em {
    font-style: normal;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.stat-card strong {
    display: block;
    margin-top: 10px;
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: -0.04em;
}

.stat-card p {
    margin: 10px 0 0;
    color: var(--text-muted);
    font-size: 0.8rem;
    line-height: 1.55;
}

.metric-positive {
    box-shadow: inset 0 0 0 1px rgba(83, 213, 123, 0.08);
}

.metric-warning {
    box-shadow: inset 0 0 0 1px rgba(241, 193, 96, 0.08);
}

.metric-danger {
    box-shadow: inset 0 0 0 1px rgba(255, 106, 106, 0.08);
}

.metric-accent {
    box-shadow: inset 0 0 0 1px rgba(31, 185, 255, 0.08);
}

.content-grid {
    display: grid;
    gap: 14px;
    margin-bottom: 14px;
}

.dashboard-layout {
    grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
}

.content-card {
    padding: 16px;
}

.content-card.wide {
    grid-row: span 2;
}

.card-head {
    margin-bottom: 14px;
}

.card-head h3 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 800;
}

.card-head p {
    margin: 6px 0 0;
    color: var(--text-muted);
    font-size: 0.82rem;
    line-height: 1.55;
}

.chart-frame {
    min-height: 248px;
}

.chart-svg {
    width: 100%;
    height: auto;
}

.chart-surface {
    fill: rgba(255, 255, 255, 0.02);
    stroke: rgba(255, 255, 255, 0.04);
}

body[data-theme="light"] .chart-surface {
    fill: rgba(15, 23, 42, 0.025);
    stroke: rgba(15, 23, 42, 0.06);
}

.chart-axis {
    stroke: rgba(255, 255, 255, 0.12);
    stroke-width: 1;
}

body[data-theme="light"] .chart-axis {
    stroke: rgba(15, 23, 42, 0.12);
}

.chart-grid {
    stroke: rgba(255, 255, 255, 0.06);
    stroke-width: 1;
}

body[data-theme="light"] .chart-grid {
    stroke: rgba(15, 23, 42, 0.06);
}

.chart-svg circle {
    fill: #35a8ff;
    stroke: rgba(8, 14, 22, 0.9);
    stroke-width: 2;
}

.chart-svg text {
    fill: #70809a;
    font-family: Manrope, Inter, sans-serif;
    font-size: 11px;
    font-weight: 700;
}

body[data-theme="light"] .chart-svg circle {
    stroke: #f8fafc;
}

body[data-theme="light"] .chart-svg text {
    fill: #6b778c;
}

.bar-list,
.focus-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.bar-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.bar-head {
    justify-content: space-between;
    gap: 10px;
    font-size: 0.82rem;
}

.bar-head span {
    color: var(--text-soft);
}

.bar-track {
    height: 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    overflow: hidden;
}

body[data-theme="light"] .bar-track {
    background: rgba(15, 23, 42, 0.08);
}

.bar-fill {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #29b5ff 0%, #2f7dff 100%);
}

.bar-fill.alt {
    background: linear-gradient(90deg, #53d57b 0%, #29b5ff 100%);
}

.focus-item {
    padding: 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

body[data-theme="light"] .focus-item {
    background: rgba(15, 23, 42, 0.03);
    border-color: rgba(15, 23, 42, 0.06);
}

.focus-item span {
    display: block;
    color: var(--text-faint);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.focus-item strong {
    display: block;
    margin-top: 8px;
    font-size: 1rem;
}

.focus-item p {
    margin: 8px 0 0;
    color: var(--text-muted);
    font-size: 0.78rem;
    line-height: 1.55;
}

.table-card {
    padding: 16px;
}

.table-scroll {
    overflow: auto;
}

.data-table {
    width: 100%;
    min-width: 960px;
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.04);
}

body[data-theme="light"] .data-table {
    border-color: rgba(15, 23, 42, 0.08);
}

.data-table thead th {
    background: rgba(255, 255, 255, 0.025);
    color: var(--text-faint);
    text-align: left;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 13px 12px;
    letter-spacing: 0.04em;
}

body[data-theme="light"] .data-table thead th {
    background: rgba(15, 23, 42, 0.04);
}

.data-table tbody td {
    padding: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    color: var(--text-soft);
    font-size: 0.79rem;
    line-height: 1.45;
    vertical-align: top;
    background: rgba(255, 255, 255, 0.018);
}

body[data-theme="light"] .data-table tbody td {
    border-top-color: rgba(15, 23, 42, 0.06);
    background: rgba(255, 255, 255, 0.96);
    color: var(--text-soft);
}

.data-table tbody tr:hover td {
    background: rgba(255, 255, 255, 0.035);
}

body[data-theme="light"] .data-table tbody tr:hover td {
    background: rgba(15, 23, 42, 0.035);
}

.row-warning-soft td {
    background: rgba(101, 76, 26, 0.22);
}

body[data-theme="light"] .row-warning-soft td {
    background: rgba(241, 193, 96, 0.12);
}

.row-danger-soft td {
    background: rgba(93, 37, 42, 0.28);
}

body[data-theme="light"] .row-danger-soft td {
    background: rgba(255, 106, 106, 0.1);
}

.row-accent-soft td {
    background: rgba(18, 75, 99, 0.24);
}

body[data-theme="light"] .row-accent-soft td {
    background: rgba(31, 185, 255, 0.08);
}

.row-total td {
    background: rgba(44, 54, 74, 0.5);
    font-weight: 700;
}

body[data-theme="light"] .row-total td {
    background: rgba(15, 23, 42, 0.06);
}

.cell-strong {
    color: var(--text);
    font-weight: 800;
}

.cell-muted {
    color: var(--text-muted);
}

.cell-positive {
    color: var(--positive);
}

.cell-warning {
    color: var(--warning);
}

.cell-danger {
    color: var(--danger);
}

.cell-accent {
    color: var(--accent);
}

.data-table td.badge,
.data-table td.cell-positive.badge,
.data-table td.cell-warning.badge,
.data-table td.cell-danger.badge,
.data-table td.cell-accent.badge,
.data-table td.cell-muted.badge {
    font-weight: 700;
    white-space: nowrap;
}

.data-table td.cell-positive.badge {
    background: rgba(83, 213, 123, 0.12);
}

.data-table td.cell-warning.badge {
    background: rgba(241, 193, 96, 0.18);
    color: #fff0c0;
}

.data-table td.cell-danger.badge {
    background: rgba(255, 106, 106, 0.14);
}

.data-table td.cell-accent.badge {
    background: rgba(31, 185, 255, 0.14);
}

.data-table td.cell-muted.badge {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-soft);
}

body[data-theme="light"] .data-table td.cell-muted.badge {
    background: rgba(15, 23, 42, 0.05);
}

.table-select,
.table-textarea,
.login-form input {
    width: 100%;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(11, 16, 25, 0.82);
    color: var(--text);
    padding: 10px 12px;
    outline: none;
}

body[data-theme="light"] .table-select,
body[data-theme="light"] .table-textarea,
body[data-theme="light"] .login-form input {
    border-color: rgba(15, 23, 42, 0.1);
    background: #ffffff;
    color: var(--text);
}

.table-select:focus,
.table-textarea:focus,
.login-form input:focus {
    border-color: rgba(31, 185, 255, 0.24);
    box-shadow: 0 0 0 3px rgba(31, 185, 255, 0.08);
}

.table-select {
    min-width: 156px;
}

.table-textarea {
    min-width: 230px;
    resize: vertical;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 0 12px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    white-space: nowrap;
}

.status-positive {
    color: var(--positive);
    background: var(--positive-soft);
}

.status-warning {
    color: var(--warning);
    background: var(--warning-soft);
}

.status-info,
.status-muted {
    color: var(--accent);
    background: var(--accent-soft);
}

.status-danger {
    color: var(--danger);
    background: var(--danger-soft);
}

.placeholder-card {
    margin-top: 14px;
}

.login-body {
    min-height: 100vh;
    background: #000000;
}

.login-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(360px, 0.85fr);
}

.login-showcase,
.login-panel {
    padding: 44px;
}

.login-showcase {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: #000000;
}

.login-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #060606;
    border-left: 1px solid rgba(255, 255, 255, 0.05);
}

.login-brand {
    display: inline-flex;
    align-items: center;
}

.login-copy h2 {
    max-width: 16ch;
    margin: 0;
    font-size: clamp(2.4rem, 4vw, 3.4rem);
    line-height: 1.02;
    font-weight: 800;
    letter-spacing: -0.05em;
}

.login-copy p {
    max-width: 56ch;
    margin: 16px 0 0;
    color: var(--text-soft);
    font-size: 0.96rem;
    line-height: 1.75;
}

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

.showcase-card {
    padding: 18px;
}

.showcase-card strong {
    display: block;
    font-size: 0.92rem;
}

.showcase-card p {
    margin: 10px 0 0;
    color: var(--text-muted);
    font-size: 0.8rem;
    line-height: 1.6;
}

.login-card {
    width: min(420px, 100%);
    padding: 24px;
}

.login-alert {
    margin: 16px 0;
    padding: 12px 14px;
    border-radius: 14px;
    color: var(--danger);
    background: rgba(255, 106, 106, 0.12);
    border: 1px solid rgba(255, 106, 106, 0.18);
    font-size: 0.84rem;
    font-weight: 700;
}

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

.login-form label {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.login-form label span {
    color: var(--text-soft);
    font-size: 0.8rem;
    font-weight: 700;
}

.login-form input {
    min-height: 48px;
}

@media (max-width: 1180px) {
    .panel-head {
        grid-template-columns: 1fr;
        align-items: start;
    }

    .panel-actions {
        justify-content: flex-start;
    }

    .panel-state {
        text-align: left;
    }

    .stats-grid,
    .showcase-grid,
    .dashboard-layout {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .content-card.wide {
        grid-row: span 1;
    }

    .login-shell {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 920px) {
    .shell-frame {
        flex-direction: column;
    }

    .sidenav {
        position: static;
        width: 100%;
        min-height: auto;
        max-height: none;
        border-right: 0;
        border-bottom: 1px solid var(--shell-line);
    }

    .menu-list {
        max-height: 240px;
    }

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

    .topbar-right,
    .breadcrumbs {
        width: 100%;
    }

    .stats-grid,
    .showcase-grid,
    .dashboard-layout {
        grid-template-columns: 1fr;
    }

    .login-showcase,
    .login-panel {
        padding: 28px;
    }
}

@media (max-width: 640px) {
    .page-section {
        padding: 14px;
    }

    .panel-surface,
    .login-card {
        padding: 14px;
    }

    .theme-switch,
    .user-box {
        width: 100%;
        justify-content: space-between;
    }

    .topbar-right {
        width: 100%;
    }
}
