:root {
    --bg-950: #07101c;
    --bg-900: #0d1d33;
    --bg-850: #122845;
    --surface: rgba(255, 255, 255, 0.96);
    --surface-strong: #ffffff;
    --surface-soft: #f4f7fb;
    --surface-muted: #ecf2f8;
    --line: rgba(17, 39, 64, 0.1);
    --line-strong: rgba(17, 39, 64, 0.16);
    --text: #112740;
    --text-soft: #5f738b;
    --text-inverse: #f6fbff;
    --primary: #123b67;
    --primary-strong: #0a2745;
    --primary-soft: #e8f0fa;
    --accent: #d0a96a;
    --accent-soft: #f8eddc;
    --teal: #20a79d;
    --teal-soft: #e2f7f4;
    --danger: #ca5252;
    --danger-soft: #fff0f0;
    --success: #157c69;
    --success-soft: #e9f7f3;
    --warning: #99662a;
    --warning-soft: #fbf1e1;
    --shadow-xl: 0 34px 80px rgba(5, 16, 30, 0.24);
    --shadow-lg: 0 22px 56px rgba(11, 28, 48, 0.14);
    --shadow-md: 0 14px 34px rgba(12, 31, 52, 0.1);
    --radius-2xl: 34px;
    --radius-xl: 26px;
    --radius-lg: 22px;
    --radius-md: 18px;
    --radius-sm: 14px;
}

* {
    box-sizing: border-box;
}

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

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: "IBM Plex Sans Arabic", "Cairo", "Segoe UI", Tahoma, sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at 12% 14%, rgba(32, 167, 157, 0.12), transparent 18%),
        radial-gradient(circle at 88% 10%, rgba(208, 169, 106, 0.18), transparent 16%),
        radial-gradient(circle at 50% 100%, rgba(18, 59, 103, 0.12), transparent 22%),
        linear-gradient(160deg, var(--bg-950) 0%, var(--bg-900) 42%, #eaf0f7 42%, #eef3f9 100%);
}

body.mobile-menu-open {
    overflow: hidden;
}

body::before,
body::after {
    content: "";
    position: fixed;
    border-radius: 999px;
    filter: blur(40px);
    pointer-events: none;
    opacity: 0.55;
}

body::before {
    width: 220px;
    height: 220px;
    top: 110px;
    right: 2%;
    background: rgba(208, 169, 106, 0.16);
}

body::after {
    width: 260px;
    height: 260px;
    left: 2%;
    bottom: 80px;
    background: rgba(32, 167, 157, 0.14);
}

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

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

img {
    display: block;
    max-width: 100%;
}

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

::-webkit-scrollbar-thumb {
    background: rgba(18, 59, 103, 0.22);
    border-radius: 999px;
}

::-webkit-scrollbar-track {
    background: rgba(18, 59, 103, 0.06);
}

.portal-shell {
    width: min(1520px, calc(100% - 34px));
    margin: 0 auto;
    padding: 18px 0 30px;
}

.auth-shell,
.app-shell {
    min-height: calc(100vh - 48px);
}

.auth-shell {
    display: grid;
    grid-template-columns: minmax(360px, 1.04fr) minmax(480px, 0.96fr);
    gap: 24px;
    align-items: stretch;
}

.auth-showcase,
.auth-panel,
.sidebar,
.workspace-topbar,
.workspace-frame,
.section-card,
.table-card,
.info-card,
.metric-card {
    border: 1px solid var(--line);
    box-shadow: var(--shadow-lg);
}

.auth-showcase,
.auth-panel,
.workspace-frame,
.workspace-topbar {
    border-radius: var(--radius-2xl);
}

.auth-showcase {
    position: relative;
    overflow: hidden;
    padding: 30px;
    background:
        radial-gradient(circle at top right, rgba(208, 169, 106, 0.18), transparent 26%),
        radial-gradient(circle at bottom left, rgba(32, 167, 157, 0.16), transparent 22%),
        linear-gradient(165deg, #0c1c32 0%, #112845 48%, #17385b 100%);
    color: var(--text-inverse);
    border-color: rgba(255, 255, 255, 0.08);
}

.auth-showcase::after {
    content: "";
    position: absolute;
    inset: auto auto -70px -40px;
    width: 200px;
    height: 200px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    filter: blur(12px);
}

.auth-showcase-top,
.auth-panel-head,
.workspace-topbar,
.section-head,
.card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.auth-brand,
.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.auth-brand img,
.sidebar-brand img {
    width: 62px;
    height: 62px;
    border-radius: 20px;
    box-shadow: 0 16px 30px rgba(0, 0, 0, 0.16);
}

.auth-brand strong,
.sidebar-brand strong,
.sidebar-user strong {
    display: block;
    font-weight: 900;
}

.auth-brand strong,
.sidebar-brand strong {
    font-size: 18px;
}

.auth-brand span,
.sidebar-brand span,
.sidebar-user span {
    display: block;
    margin-top: 4px;
}

.auth-brand span {
    color: rgba(246, 251, 255, 0.72);
}

.surface-link,
.mini-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 16px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 800;
    white-space: nowrap;
    transition: transform 180ms ease, background 180ms ease, border-color 180ms ease;
}

.surface-link {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--text-inverse);
}

.mini-link {
    background: var(--surface-soft);
    border: 1px solid var(--line);
    color: var(--primary);
}

.surface-link:hover,
.mini-link:hover {
    transform: translateY(-1px);
}

.eyebrow,
.panel-kicker {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 0 12px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.08em;
}

.eyebrow {
    background: rgba(208, 169, 106, 0.14);
    color: var(--accent);
}

.panel-kicker {
    margin-bottom: 10px;
    background: var(--primary-soft);
    color: var(--primary);
}

.auth-copy {
    position: relative;
    z-index: 1;
    margin-top: 34px;
}

.auth-copy h1 {
    margin: 16px 0 12px;
    font-size: clamp(34px, 4vw, 58px);
    line-height: 1.1;
    max-width: 10ch;
}

.auth-copy p {
    max-width: 58ch;
    margin: 0;
    color: rgba(246, 251, 255, 0.78);
    line-height: 1.95;
    font-size: 16px;
}

.auth-preview-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-top: 28px;
}

.preview-card {
    display: grid;
    align-content: center;
    gap: 8px;
    min-height: 122px;
    padding: 18px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(14px);
}

.preview-card--primary {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.08));
}

.preview-card span,
.track-item span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    min-height: 30px;
    padding: 0 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: var(--text-inverse);
    font-size: 12px;
    font-weight: 900;
}

.preview-card strong,
.track-head strong,
.track-item strong,
.section-head h3,
.card-head h4 {
    display: block;
    margin: 12px 0 8px;
}

.preview-card strong {
    margin: 0;
    font-size: 19px;
    line-height: 1.4;
}

.preview-card p,
.track-item p,
.section-note,
.info-list li,
.empty-state,
th,
td,
.field span,
.field input::placeholder,
.field textarea::placeholder,
.sidebar-summary p {
    line-height: 1.8;
}

.preview-card p,
.track-head,
.track-item p {
    margin: 0;
    color: rgba(246, 251, 255, 0.74);
}

.auth-track {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 16px;
    margin-top: 24px;
    padding: 22px;
    border-radius: 26px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.track-list {
    display: grid;
    gap: 12px;
}

.track-item {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 14px;
    padding: 14px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.track-item:first-child {
    border-top: 0;
    padding-top: 0;
}

.auth-panel {
    padding: 28px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 250, 253, 0.98));
    display: grid;
    align-content: start;
    gap: 18px;
}

.auth-panel-head h2,
.workspace-copy h2,
.section-head h3,
.card-head h4 {
    margin: 10px 0 0;
    color: var(--primary-strong);
}

.auth-panel-head h2,
.workspace-copy h2 {
    font-size: clamp(28px, 3.2vw, 42px);
}

.auth-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.auth-tab,
.nav-link,
.primary-btn,
.ghost-btn,
.row-action-btn {
    min-height: 50px;
    border: 1px solid var(--line);
    border-radius: 16px;
    font-weight: 800;
    cursor: pointer;
    transition: transform 180ms ease, background 180ms ease, border-color 180ms ease, color 180ms ease, box-shadow 180ms ease;
}

.auth-tab,
.ghost-btn {
    background: var(--surface-soft);
    color: var(--text);
}

.primary-btn {
    background: linear-gradient(135deg, var(--primary), #1b4d81);
    color: #fff;
    border-color: rgba(18, 59, 103, 0.34);
    box-shadow: 0 18px 28px rgba(18, 59, 103, 0.2);
}

.auth-tab:hover,
.nav-link:hover,
.primary-btn:hover,
.ghost-btn:hover,
.row-action-btn:hover,
.surface-link:hover,
.mini-link:hover {
    transform: translateY(-1px);
}

.auth-tab.is-active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.auth-view {
    display: none;
}

.auth-view.is-active {
    display: block;
}

.is-hidden {
    display: none !important;
}

.status-banner {
    padding: 15px 18px;
    border-radius: 16px;
    font-weight: 800;
}

.status-banner.info {
    background: var(--primary-soft);
    border: 1px solid rgba(18, 59, 103, 0.14);
    color: var(--primary);
}

.status-banner.success {
    background: var(--success-soft);
    border: 1px solid rgba(21, 124, 105, 0.16);
    color: var(--success);
}

.status-banner.error {
    background: var(--danger-soft);
    border: 1px solid rgba(202, 82, 82, 0.16);
    color: var(--danger);
}

.status-banner.warning {
    background: var(--warning-soft);
    border: 1px solid rgba(153, 102, 42, 0.16);
    color: var(--warning);
}

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

.field {
    display: grid;
    gap: 8px;
}

.field-full,
.field-span-2 {
    grid-column: 1 / -1;
}

.field span {
    color: var(--text-soft);
    font-size: 13px;
    font-weight: 800;
}

.field input,
.field select,
.field textarea {
    width: 100%;
    min-height: 54px;
    padding: 13px 15px;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: var(--surface-strong);
    color: var(--text);
    outline: none;
    transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.field textarea {
    min-height: 128px;
    resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
    border-color: rgba(18, 59, 103, 0.32);
    box-shadow: 0 0 0 4px rgba(18, 59, 103, 0.08);
}

.date-select-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.primary-btn,
.ghost-btn,
.row-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 18px;
}

.ghost-btn {
    border-color: var(--line);
}

.ghost-btn.wide {
    width: 100%;
}

.section-route-btn {
    min-height: 48px;
}

.app-shell {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 22px;
    align-items: start;
}

.sidebar {
    position: sticky;
    top: 16px;
    display: grid;
    align-content: start;
    gap: 18px;
    padding: 22px;
    border-radius: 30px;
    background:
        radial-gradient(circle at top right, rgba(208, 169, 106, 0.16), transparent 28%),
        linear-gradient(180deg, #0c1e34, #102746 48%, #153556 100%);
    color: var(--text-inverse);
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: var(--shadow-xl);
}

.sidebar-brand span,
.sidebar-user span,
.sidebar-summary p {
    color: rgba(246, 251, 255, 0.72);
}

.sidebar-user,
.sidebar-summary {
    padding: 16px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-top {
    display: grid;
    gap: 16px;
}

.sidebar-summary {
    display: grid;
    gap: 12px;
}

.sidebar-summary p {
    margin: 0;
}

.sidebar-pills,
.workspace-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.sidebar-pills span,
.workspace-pills span {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 0 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}

.sidebar-pills span {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-inverse);
}

.workspace-pills span {
    background: var(--surface-muted);
    color: var(--primary);
}

.sidebar-nav {
    display: grid;
    gap: 10px;
}

.nav-link {
    width: 100%;
    padding: 0 16px;
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.08);
    color: var(--text-inverse);
    justify-content: space-between;
}

.nav-link.is-active {
    background: linear-gradient(135deg, rgba(208, 169, 106, 0.22), rgba(32, 167, 157, 0.18));
    border-color: rgba(255, 255, 255, 0.18);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.nav-link__label {
    text-align: right;
}

.nav-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    min-height: 30px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
}

.nav-badge.neutral {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-inverse);
}

.nav-badge.danger {
    background: rgba(202, 82, 82, 0.18);
    color: #ffd9d9;
}

.sidebar-foot {
    margin-top: 4px;
}

.sidebar-foot .ghost-btn {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-inverse);
    border-color: rgba(255, 255, 255, 0.12);
}

.workspace {
    display: grid;
    gap: 18px;
}

.workspace-topbar {
    padding: 24px 28px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(245, 248, 252, 0.98));
}

.workspace-copy p {
    margin: 12px 0 0;
    color: var(--text-soft);
    font-size: 15px;
}

.app-shell .workspace-copy p,
.app-shell .section-note {
    display: none;
}

.app-shell .panel-kicker {
    display: none;
}

.workspace-tools {
    display: grid;
    justify-items: end;
    gap: 12px;
}

.workspace-topbar .surface-link {
    background: var(--surface-soft);
    border-color: var(--line);
    color: var(--primary);
}

.mobile-menu-button,
.mobile-menu-close,
.mobile-menu-overlay {
    display: none;
}

.mobile-menu-button {
    width: 48px;
    height: 48px;
    padding: 0;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: var(--surface);
    align-items: center;
    justify-content: center;
    gap: 4px;
    cursor: pointer;
    box-shadow: var(--shadow-md);
}

.mobile-menu-button span {
    display: block;
    width: 18px;
    height: 2px;
    border-radius: 999px;
    background: var(--primary);
}

.mobile-menu-close {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-inverse);
    font-size: 26px;
    line-height: 1;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.mobile-menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(6, 17, 31, 0.48);
    border: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 180ms ease;
    z-index: 44;
}

.workspace-frame {
    padding: 24px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.97), rgba(247, 250, 253, 0.98));
    display: grid;
    gap: 20px;
}

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

.metric-card {
    position: relative;
    overflow: hidden;
    padding: 18px;
    border-radius: 22px;
    background: linear-gradient(180deg, #ffffff, #f5f8fc);
}

.metric-card::before {
    content: "";
    position: absolute;
    inset: 0 auto auto 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--accent), var(--teal));
}

.metric-card span {
    display: block;
    color: var(--text-soft);
    font-size: 13px;
    font-weight: 700;
}

.metric-card strong {
    display: block;
    margin-top: 10px;
    font-size: 34px;
    color: var(--primary-strong);
}

.page-content {
    display: grid;
    gap: 20px;
}

.content-grid {
    display: grid;
    grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
    gap: 20px;
}

.section-card,
.table-card,
.info-card {
    padding: 22px;
    border-radius: 24px;
    background: var(--surface);
}

.section-body {
    display: grid;
    gap: 16px;
}

.section-note {
    margin: 10px 0 0;
    color: var(--text-soft);
}

.card-meta {
    display: flex;
    justify-content: flex-end;
}

.table-count {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 14px;
    border-radius: 999px;
    background: var(--surface-muted);
    color: var(--primary);
    font-size: 12px;
    font-weight: 900;
}

.info-list {
    margin: 14px 0 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 10px;
}

.info-list li {
    padding: 14px 16px;
    border-radius: 16px;
    background: var(--surface-soft);
    border: 1px solid var(--line);
    color: var(--text-soft);
}

.timeline {
    display: grid;
    gap: 12px;
}

.timeline-item {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 14px;
    padding: 16px;
    border-radius: 18px;
    background: linear-gradient(180deg, #ffffff, #f7f9fc);
    border: 1px solid var(--line);
}

.timeline-item span {
    width: 40px;
    height: 40px;
    border-radius: 999px;
    background: var(--primary-soft);
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
}

.timeline-item strong {
    margin-bottom: 6px;
    font-size: 16px;
}

.timeline-item p {
    margin: 0;
    color: var(--text-soft);
}

.table-wrap {
    overflow: auto;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: var(--surface-strong);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

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

.data-table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: linear-gradient(180deg, #f8fafc, #edf3f8);
}

th,
td {
    padding: 15px 16px;
    text-align: right;
    border-bottom: 1px solid var(--line);
    font-size: 14px;
    vertical-align: top;
}

th {
    color: var(--text-soft);
    font-weight: 900;
}

.data-table tbody tr:nth-child(even) td {
    background: rgba(244, 247, 251, 0.55);
}

.data-table tbody tr:hover td {
    background: rgba(232, 240, 250, 0.75);
}

.data-table tr:last-child td {
    border-bottom: 0;
}

.empty-state {
    padding: 24px;
    border-radius: 18px;
    background: var(--surface-soft);
    border: 1px dashed var(--line-strong);
    color: var(--text-soft);
}

.inline-grid {
    display: grid;
    gap: 12px;
}

.badge {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 10px;
    border-radius: 999px;
    background: var(--surface-muted);
    color: var(--primary);
    font-size: 12px;
    font-weight: 900;
}

.badge.success {
    background: var(--success-soft);
    color: var(--success);
}

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

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

.row-action-btn {
    min-height: 40px;
    padding: 0 14px;
    background: var(--primary-soft);
    border-color: rgba(18, 59, 103, 0.14);
    color: var(--primary);
    font-size: 13px;
    font-weight: 900;
    white-space: nowrap;
    line-height: 1;
}

.row-action-btn:hover {
    background: #dfeaf7;
}

@media (max-width: 1320px) {
    .auth-preview-grid,
    .content-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1180px) {
    .auth-shell,
    .app-shell {
        grid-template-columns: 1fr;
    }

    .auth-panel {
        order: 1;
    }

    .auth-showcase {
        order: 2;
    }

    .auth-preview-grid {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
        padding: 18px;
        gap: 14px;
    }

    .sidebar-nav {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        gap: 10px;
        padding-bottom: 4px;
        margin: 0 -2px;
        padding-inline: 2px;
        scrollbar-width: none;
    }

    .sidebar-nav::-webkit-scrollbar {
        display: none;
    }

    .nav-link {
        width: auto;
        min-width: 160px;
        flex: 0 0 auto;
    }

    .sidebar-foot {
        display: flex;
        justify-content: flex-start;
    }

    .sidebar-foot .ghost-btn {
        width: auto;
        min-width: 160px;
    }
}

@media (max-width: 860px) {
    body {
        background: #eef3f9;
    }

    .portal-shell {
        width: 100%;
        padding: 10px;
    }

    .auth-shell,
    .app-shell {
        min-height: auto;
        gap: 14px;
    }

    .auth-showcase {
        display: none;
    }

    .auth-showcase,
    .auth-panel,
    .sidebar,
    .workspace-topbar,
    .workspace-frame,
    .section-card,
    .table-card,
    .info-card {
        padding: 20px;
    }

    .auth-panel,
    .sidebar,
    .workspace-topbar,
    .workspace-frame,
    .section-card,
    .table-card,
    .info-card,
    .metric-card {
        border-radius: 22px;
    }

    .form-grid,
    .date-select-row {
        grid-template-columns: 1fr;
    }

    .auth-tabs {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        gap: 8px;
        padding-bottom: 4px;
        scrollbar-width: none;
    }

    .auth-tabs::-webkit-scrollbar {
        display: none;
    }

    .auth-tab {
        flex: 0 0 auto;
        min-width: 148px;
        padding: 0 16px;
    }

    .auth-showcase-top,
    .auth-panel-head,
    .workspace-topbar,
    .section-head,
    .card-head {
        flex-direction: column;
        align-items: stretch;
    }

    .workspace-tools {
        justify-items: stretch;
    }

    .workspace-topbar .surface-link {
        display: none;
    }

    .mobile-menu-button,
    .mobile-menu-close,
    .mobile-menu-overlay {
        display: inline-flex;
    }

    .app-shell .sidebar {
        position: fixed;
        top: 0;
        right: 0;
        z-index: 45;
        width: min(84vw, 320px);
        height: 100dvh;
        padding: 18px;
        gap: 14px;
        overflow-y: auto;
        background:
            radial-gradient(circle at top right, rgba(208, 169, 106, 0.16), transparent 30%),
            linear-gradient(180deg, #0d223b, #143659 100%);
        border: 0;
        border-radius: 0;
        box-shadow: var(--shadow-xl);
        transform: translateX(100%);
        transition: transform 200ms ease;
    }

    .app-shell.is-menu-open .sidebar {
        transform: translateX(0);
    }

    .app-shell.is-menu-open .mobile-menu-overlay {
        opacity: 1;
        pointer-events: auto;
    }

    .app-shell .sidebar-top {
        padding: 0;
        border-radius: 0;
        background: transparent;
        border: 0;
        box-shadow: none;
    }

    .app-shell .sidebar-nav {
        display: grid;
        overflow: visible;
        gap: 10px;
        padding: 0;
        margin: 0;
        background: transparent;
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .app-shell .nav-link {
        width: 100%;
        min-width: 0;
        min-height: 48px;
        background: rgba(255, 255, 255, 0.06);
        border-color: rgba(255, 255, 255, 0.1);
        color: var(--text-inverse);
    }

    .app-shell .nav-link.is-active {
        background: linear-gradient(135deg, rgba(208, 169, 106, 0.22), rgba(32, 167, 157, 0.18));
        border-color: rgba(255, 255, 255, 0.18);
        color: #fff;
        box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
    }

    .app-shell .nav-badge.neutral {
        background: rgba(255, 255, 255, 0.1);
        color: var(--text-inverse);
    }

    .app-shell .nav-link.is-active .nav-badge.neutral,
    .app-shell .nav-link.is-active .nav-badge.danger {
        background: rgba(255, 255, 255, 0.18);
        color: #fff;
    }

    .app-shell .sidebar-foot {
        display: block;
        margin-top: auto;
    }

    .app-shell .sidebar-foot .ghost-btn {
        width: 100%;
        min-width: 0;
        background: rgba(255, 255, 255, 0.08);
        color: var(--text-inverse);
        border-color: rgba(255, 255, 255, 0.12);
        box-shadow: none;
    }

    .app-shell .workspace-topbar {
        display: grid;
        grid-template-columns: auto 1fr;
        align-items: center;
        background: transparent;
        border: 0;
        box-shadow: none;
        padding: 0 2px;
        border-radius: 0;
    }

    .app-shell .workspace-frame {
        background: transparent;
        border: 0;
        box-shadow: none;
        padding: 0;
    }

    .sidebar-top {
        gap: 12px;
    }

    .sidebar-user {
        padding: 14px;
    }

    .sidebar-brand img {
        width: 52px;
        height: 52px;
        border-radius: 16px;
    }

    .nav-badge {
        min-width: 34px;
        min-height: 28px;
        font-size: 11px;
    }

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

    .page-content,
    .workspace,
    .content-grid {
        gap: 14px;
    }

    .table-card .section-head,
    .section-card .section-head,
    .info-card .card-head {
        margin-bottom: 10px;
    }

    .auth-panel-head h2,
    .workspace-copy h2 {
        font-size: 26px;
    }

    .section-head h3,
    .card-head h4 {
        font-size: 22px;
        margin-top: 0;
    }

    .metric-card strong {
        font-size: 28px;
    }

    .table-wrap {
        margin-inline: 0;
        border-inline: 1px solid var(--line);
        border-radius: 16px;
    }

    .data-table {
        min-width: 100%;
        table-layout: fixed;
    }

    .data-table.has-actions {
        min-width: 620px;
        table-layout: auto;
    }

    .data-table.has-actions th:last-child,
    .data-table.has-actions td:last-child {
        min-width: 150px;
        width: 150px;
        white-space: nowrap;
    }

    th,
    td {
        font-size: 12px;
        padding: 11px 12px;
        white-space: normal;
        overflow-wrap: anywhere;
    }

    .row-action-btn {
        min-height: 36px;
        padding: 0 10px;
        font-size: 12px;
    }

    .badge {
        min-height: 26px;
        padding: 0 8px;
        font-size: 11px;
    }

    .auth-copy h1,
    .workspace-copy h2 {
        max-width: none;
    }
}

@media (max-width: 640px) {
    .portal-shell {
        width: 100%;
        padding: 0;
    }

    .auth-panel,
    .sidebar,
    .workspace-topbar,
    .workspace-frame,
    .section-card,
    .table-card,
    .info-card {
        padding: 16px;
        border-radius: 18px;
    }

    .auth-panel,
    .sidebar,
    .workspace-topbar,
    .workspace-frame {
        box-shadow: none;
    }

    .app-shell .sidebar {
        width: min(88vw, 300px);
        padding: 16px;
    }

    .auth-tabs {
        gap: 8px;
    }

    .auth-tab,
    .sidebar-foot .ghost-btn {
        min-width: 132px;
    }

    .workspace-copy .eyebrow {
        display: none;
    }

    .metric-grid {
        grid-template-columns: 1fr;
    }

    .workspace-copy h2 {
        font-size: 24px;
    }

    .auth-brand,
    .sidebar-brand {
        align-items: flex-start;
    }

    th,
    td {
        padding: 10px 11px;
    }

    .data-table {
        min-width: 100%;
    }

    .data-table.has-actions {
        min-width: 560px;
    }
}
