:root {
    color-scheme: light;
    --canvas: #f4f6fb;
    --surface: #ffffff;
    --surface-subtle: #f8f9fc;
    --surface-strong: #eef1f7;
    --text: #111827;
    --text-soft: #384152;
    --muted: #6d7588;
    --muted-strong: #50596d;
    --border: #dfe4ed;
    --border-strong: #cbd2df;
    --primary: #2f5cff;
    --primary-strong: #1747e8;
    --primary-soft: #edf1ff;
    --primary-contrast: #ffffff;
    --accent: #ff3d8f;
    --success: #138a5b;
    --success-soft: #e9f8f1;
    --warning: #b76d00;
    --warning-soft: #fff4df;
    --danger: #d63855;
    --danger-soft: #fff0f3;
    --violet: #7554e8;
    --violet-soft: #f1edff;
    --sidebar: #f8f9fc;
    --sidebar-text: #333b4c;
    --sidebar-muted: #778095;
    --sidebar-active: #2f5cff;
    --sidebar-active-text: #ffffff;
    --topbar: rgba(255, 255, 255, 0.88);
    --shadow-sm: 0 1px 2px rgba(27, 37, 55, 0.04);
    --shadow-md: 0 12px 36px rgba(27, 37, 55, 0.08);
    --shadow-lg: 0 28px 90px rgba(27, 37, 55, 0.15);
    --focus: rgba(47, 92, 255, 0.32);
    --gradient-cta: linear-gradient(135deg, #ff4c44 0%, #ff3d9a 100%);
    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --sidebar-width: 276px;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

html[data-theme="dark"] {
    color-scheme: dark;
    --canvas: #0b0e14;
    --surface: #151922;
    --surface-subtle: #1a1e27;
    --surface-strong: #222733;
    --text: #f5f7fb;
    --text-soft: #d4d9e4;
    --muted: #959db0;
    --muted-strong: #b2b9c8;
    --border: #2a303c;
    --border-strong: #3a4251;
    --primary: #5d7cff;
    --primary-strong: #7891ff;
    --primary-soft: rgba(93, 124, 255, 0.14);
    --primary-contrast: #ffffff;
    --accent: #ff4b98;
    --success: #4ad59a;
    --success-soft: rgba(50, 189, 132, 0.13);
    --warning: #f3b451;
    --warning-soft: rgba(243, 180, 81, 0.12);
    --danger: #ff7087;
    --danger-soft: rgba(255, 88, 116, 0.13);
    --violet: #a58bff;
    --violet-soft: rgba(142, 111, 255, 0.13);
    --sidebar: #0d1016;
    --sidebar-text: #dce1eb;
    --sidebar-muted: #7f889c;
    --sidebar-active: #2f5cff;
    --sidebar-active-text: #ffffff;
    --topbar: rgba(11, 14, 20, 0.88);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.16);
    --shadow-md: 0 12px 36px rgba(0, 0, 0, 0.22);
    --shadow-lg: 0 28px 90px rgba(0, 0, 0, 0.38);
    --focus: rgba(93, 124, 255, 0.42);
}

@media (prefers-color-scheme: dark) {
    html[data-theme="system"] {
        color-scheme: dark;
        --canvas: #0b0e14;
        --surface: #151922;
        --surface-subtle: #1a1e27;
        --surface-strong: #222733;
        --text: #f5f7fb;
        --text-soft: #d4d9e4;
        --muted: #959db0;
        --muted-strong: #b2b9c8;
        --border: #2a303c;
        --border-strong: #3a4251;
        --primary: #5d7cff;
        --primary-strong: #7891ff;
        --primary-soft: rgba(93, 124, 255, 0.14);
        --success: #4ad59a;
        --success-soft: rgba(50, 189, 132, 0.13);
        --warning: #f3b451;
        --warning-soft: rgba(243, 180, 81, 0.12);
        --danger: #ff7087;
        --danger-soft: rgba(255, 88, 116, 0.13);
        --violet: #a58bff;
        --violet-soft: rgba(142, 111, 255, 0.13);
        --sidebar: #0d1016;
        --sidebar-text: #dce1eb;
        --sidebar-muted: #7f889c;
        --topbar: rgba(11, 14, 20, 0.88);
        --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.16);
        --shadow-md: 0 12px 36px rgba(0, 0, 0, 0.22);
        --shadow-lg: 0 28px 90px rgba(0, 0, 0, 0.38);
    }
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    min-width: 320px;
    background: var(--canvas);
    scroll-behavior: smooth;
}

body {
    min-width: 320px;
    min-height: 100vh;
    margin: 0;
    color: var(--text);
    background: var(--canvas);
    font-size: 15px;
    line-height: 1.5;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

body,
button,
input {
    font: inherit;
}

button,
input {
    color: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

a {
    color: var(--primary);
}

button {
    border: 0;
}

svg {
    display: block;
    width: 1.25rem;
    height: 1.25rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

::selection {
    color: #ffffff;
    background: var(--primary);
}

:focus-visible {
    outline: 3px solid var(--focus);
    outline-offset: 2px;
}

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

.skip-link {
    position: fixed;
    z-index: 1000;
    top: 12px;
    left: 12px;
    padding: 10px 16px;
    color: var(--primary-contrast);
    background: var(--primary);
    border-radius: var(--radius-sm);
    font-weight: 750;
    transform: translateY(-150%);
    transition: transform 160ms ease;
}

.skip-link:focus {
    transform: translateY(0);
}

.button {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 14px;
    font-weight: 750;
    line-height: 1.2;
    text-decoration: none;
    transition:
        border-color 160ms ease,
        box-shadow 160ms ease,
        transform 160ms ease,
        background-color 160ms ease;
}

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

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

.button--primary {
    color: #ffffff;
    background: var(--gradient-cta);
    box-shadow: 0 10px 24px rgba(255, 61, 143, 0.2);
}

.button--primary:hover {
    box-shadow: 0 14px 32px rgba(255, 61, 143, 0.3);
}

.button--secondary {
    color: var(--text);
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.button--secondary:hover {
    border-color: var(--primary);
}

.button--wide {
    width: 100%;
}

.button--wide svg {
    width: 18px;
    height: 18px;
    margin-left: auto;
}

.brand {
    display: inline-flex;
    min-width: 0;
    align-items: center;
    gap: 11px;
    color: inherit;
    text-decoration: none;
}

.brand-mark {
    display: grid;
    width: 34px;
    height: 34px;
    flex: 0 0 auto;
    grid-template-columns: repeat(2, 1fr);
    gap: 3px;
    padding: 7px;
    color: #ffffff;
    background: var(--primary);
    border-radius: 10px;
    box-shadow: 0 8px 18px rgba(47, 92, 255, 0.22);
}

.brand-mark span {
    background: currentColor;
    border-radius: 2px;
}

.brand-mark span:nth-child(2) {
    opacity: 0.58;
}

.brand-mark span:nth-child(3) {
    opacity: 0.72;
}

.brand-mark--small {
    width: 28px;
    height: 28px;
    padding: 6px;
    border-radius: 8px;
}

.brand-copy {
    display: grid;
    min-width: 0;
    line-height: 1.2;
}

.brand-copy strong {
    font-size: 14px;
    letter-spacing: -0.01em;
}

.brand-copy small {
    margin-top: 3px;
    color: var(--sidebar-muted);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.theme-toggle,
.icon-button {
    display: inline-grid;
    width: 40px;
    height: 40px;
    flex: 0 0 auto;
    place-items: center;
    color: var(--muted-strong);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition:
        color 160ms ease,
        border-color 160ms ease,
        background-color 160ms ease,
        transform 160ms ease;
}

.theme-toggle:hover,
.icon-button:hover {
    color: var(--primary);
    border-color: var(--primary);
    transform: translateY(-1px);
}

.theme-toggle__icon {
    width: 18px;
    height: 18px;
}

.theme-toggle__icon--moon {
    display: none;
}

html[data-theme="dark"] .theme-toggle__icon--sun {
    display: none;
}

html[data-theme="dark"] .theme-toggle__icon--moon {
    display: block;
}

@media (prefers-color-scheme: dark) {
    html[data-theme="system"] .theme-toggle__icon--sun {
        display: none;
    }

    html[data-theme="system"] .theme-toggle__icon--moon {
        display: block;
    }
}

.status-badge {
    display: inline-flex;
    min-height: 26px;
    align-items: center;
    gap: 7px;
    padding: 5px 10px;
    color: var(--muted-strong);
    background: var(--surface-strong);
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.02em;
}

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

.status-badge--inverse {
    color: #dce8ff;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.13);
}

.status-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    flex: 0 0 auto;
    background: var(--success);
    border-radius: 50%;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--success) 15%, transparent);
}

/* Public foundation status */
.shell {
    width: min(1080px, calc(100% - 40px));
    margin: 0 auto;
    padding: 72px 0 40px;
}

.hero {
    position: relative;
    min-height: 440px;
    padding: 56px;
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 28px;
    box-shadow: var(--shadow-md);
}

.hero::after {
    position: absolute;
    right: -120px;
    bottom: -190px;
    width: 420px;
    height: 420px;
    content: "";
    background: radial-gradient(circle, rgba(47, 92, 255, 0.2), transparent 68%);
    border-radius: 50%;
}

.eyebrow,
.section-number,
.panel-kicker {
    margin: 0;
    color: var(--primary);
    font-size: 11px;
    font-weight: 850;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.hero .eyebrow,
.section-number {
    margin-bottom: 24px;
}

.hero h1 {
    max-width: 760px;
    margin: 30px 0 20px;
    font-size: clamp(42px, 6vw, 72px);
    line-height: 0.98;
    letter-spacing: -0.055em;
}

.lead {
    max-width: 670px;
    margin: 0;
    color: var(--muted);
    font-size: clamp(18px, 2.4vw, 23px);
    line-height: 1.55;
}

.capabilities {
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    gap: 48px;
    padding: 64px 24px;
}

.capabilities h2 {
    margin: 0;
    font-size: 30px;
    letter-spacing: -0.025em;
}

.capabilities ul {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding: 0;
    margin: 0;
    list-style: none;
}

.capabilities li {
    min-height: 116px;
    padding: 22px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 18px;
    font-weight: 650;
    line-height: 1.4;
}

.shell > footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 22px 24px 0;
    color: var(--muted);
    border-top: 1px solid var(--border);
    font-size: 14px;
}

/* Authentication */
.auth-page {
    overflow-x: hidden;
}

.auth-shell {
    position: relative;
    min-height: 100vh;
    padding: clamp(18px, 3vw, 42px);
    background:
        radial-gradient(circle at 10% 15%, rgba(47, 92, 255, 0.13), transparent 27%),
        radial-gradient(circle at 92% 86%, rgba(255, 61, 143, 0.09), transparent 30%),
        var(--canvas);
}

.auth-theme-toggle {
    position: fixed;
    z-index: 20;
    top: 20px;
    right: 20px;
    box-shadow: var(--shadow-sm);
}

.auth-layout {
    display: grid;
    width: min(1160px, 100%);
    min-height: min(760px, calc(100vh - clamp(36px, 6vw, 84px)));
    grid-template-columns: minmax(360px, 0.9fr) minmax(480px, 1.1fr);
    margin: 0 auto;
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 28px;
    box-shadow: var(--shadow-lg);
}

.auth-showcase {
    position: relative;
    display: flex;
    overflow: hidden;
    flex-direction: column;
    padding: clamp(34px, 5vw, 64px);
    color: #f7f9ff;
    background:
        linear-gradient(155deg, rgba(47, 92, 255, 0.16), transparent 42%),
        linear-gradient(335deg, rgba(255, 61, 143, 0.13), transparent 38%),
        #0c1018;
}

.auth-showcase::before {
    position: absolute;
    top: -120px;
    right: -160px;
    width: 420px;
    height: 420px;
    content: "";
    background:
        linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 28px 28px;
    border-radius: 50%;
    opacity: 0.65;
    transform: rotate(16deg);
}

.brand--auth {
    position: relative;
    z-index: 1;
}

.brand--auth .brand-copy small {
    color: #8993a8;
}

.auth-showcase__content {
    position: relative;
    z-index: 1;
    display: grid;
    align-content: center;
    flex: 1;
    padding-block: 50px;
}

.auth-showcase__content h2 {
    max-width: 460px;
    margin: 26px 0 18px;
    font-size: clamp(34px, 4vw, 52px);
    line-height: 1.04;
    letter-spacing: -0.045em;
}

.auth-showcase__content > p {
    max-width: 450px;
    margin: 0;
    color: #aab3c5;
    font-size: 16px;
    line-height: 1.7;
}

.auth-benefits {
    display: grid;
    gap: 16px;
    padding: 0;
    margin: 42px 0 0;
    list-style: none;
}

.auth-benefits li {
    display: flex;
    align-items: center;
    gap: 13px;
    color: #d9deea;
    font-size: 13px;
    font-weight: 650;
}

.auth-benefits__icon {
    display: inline-grid;
    width: 32px;
    height: 32px;
    flex: 0 0 auto;
    place-items: center;
    color: #9fb0ff;
    background: rgba(93, 124, 255, 0.12);
    border: 1px solid rgba(127, 150, 255, 0.22);
    border-radius: 9px;
    font-size: 9px;
    font-weight: 850;
    letter-spacing: 0.08em;
}

.auth-showcase__footer {
    position: relative;
    z-index: 1;
    margin: 0;
    color: #667086;
    font-size: 10px;
    font-weight: 750;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.auth-panel {
    display: flex;
    min-width: 0;
    flex-direction: column;
    justify-content: center;
    padding: clamp(34px, 6vw, 80px);
}

.auth-panel__brand {
    display: none;
    align-items: center;
    gap: 10px;
    margin-bottom: 46px;
}

.auth-card {
    width: min(100%, 470px);
    margin: auto;
}

.auth-kicker {
    margin: 0 0 12px;
    color: var(--primary);
    font-size: 11px;
    font-weight: 850;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.auth-card h1 {
    margin: 0;
    font-size: clamp(32px, 4vw, 44px);
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.auth-hint {
    margin: 16px 0 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.65;
}

.auth-message {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    padding: 13px 14px;
    margin: 22px 0 0;
    border: 1px solid;
    border-radius: 12px;
    font-size: 13px;
    line-height: 1.5;
}

.auth-message::before {
    display: inline-grid;
    width: 20px;
    height: 20px;
    flex: 0 0 auto;
    content: "!";
    place-items: center;
    color: currentColor;
    border: 1px solid currentColor;
    border-radius: 50%;
    font-size: 11px;
    font-weight: 900;
}

.auth-error {
    color: var(--danger);
    background: var(--danger-soft);
    border-color: color-mix(in srgb, var(--danger) 25%, transparent);
}

.auth-success {
    color: var(--success);
    background: var(--success-soft);
    border-color: color-mix(in srgb, var(--success) 25%, transparent);
}

.auth-success::before {
    content: "✓";
}

.auth-form {
    display: grid;
    gap: 18px;
    margin-top: 28px;
}

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

.form-field label {
    color: var(--text-soft);
    font-size: 13px;
    font-weight: 750;
}

.form-field__heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.form-field__heading a {
    font-size: 12px;
    font-weight: 700;
    text-underline-offset: 3px;
}

.input-wrap {
    position: relative;
}

.input-wrap > svg {
    position: absolute;
    z-index: 1;
    top: 50%;
    left: 14px;
    width: 18px;
    height: 18px;
    color: var(--muted);
    pointer-events: none;
    transform: translateY(-50%);
}

.input-wrap input {
    width: 100%;
    min-height: 48px;
    padding: 11px 14px 11px 43px;
    color: var(--text);
    background: var(--surface-subtle);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    outline: 0;
    transition:
        border-color 160ms ease,
        box-shadow 160ms ease,
        background-color 160ms ease;
}

.input-wrap input:hover {
    border-color: var(--border-strong);
}

.input-wrap input:focus {
    background: var(--surface);
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--focus);
}

.input-wrap--code input {
    padding-inline: 18px;
    font-size: 24px;
    font-weight: 800;
    letter-spacing: 0.38em;
    text-align: center;
}

.form-help {
    margin: 0;
    color: var(--muted);
    font-size: 11px;
}

.auth-security-note {
    display: flex;
    align-items: center;
    gap: 9px;
    padding-top: 22px;
    margin-top: 24px;
    color: var(--muted);
    border-top: 1px solid var(--border);
    font-size: 11px;
}

.auth-security-note svg {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
    color: var(--success);
}

.auth-cancel {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 24px;
    color: var(--muted-strong);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
}

.auth-cancel:hover {
    color: var(--primary);
}

.auth-cancel svg {
    width: 16px;
    height: 16px;
}

.auth-step {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 26px;
    color: var(--muted);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.auth-step__dot {
    width: 8px;
    height: 8px;
    background: var(--border-strong);
    border-radius: 50%;
}

.auth-step__dot--complete,
.auth-step__dot--current {
    background: var(--primary);
}

.auth-step__dot--current {
    box-shadow: 0 0 0 4px var(--primary-soft);
}

.auth-step__line {
    width: 32px;
    height: 1px;
    background: var(--primary);
}

.auth-next-step {
    padding: 15px;
    margin-top: 18px;
    background: var(--surface-subtle);
    border: 1px solid var(--border);
    border-radius: 12px;
}

.auth-next-step span {
    color: var(--text-soft);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.auth-next-step p {
    margin: 7px 0 0;
    color: var(--muted);
    font-size: 12px;
}

.auth-panel__footer {
    width: min(100%, 470px);
    margin: 36px auto 0;
    color: var(--muted);
    font-size: 10px;
    line-height: 1.5;
    text-align: center;
}

/* Administration shell */
.admin-page {
    overflow-x: hidden;
}

.admin-app {
    min-height: 100vh;
}

.admin-sidebar {
    position: fixed;
    z-index: 60;
    inset: 0 auto 0 0;
    display: flex;
    width: var(--sidebar-width);
    flex-direction: column;
    color: var(--sidebar-text);
    background: var(--sidebar);
    border-right: 1px solid var(--border);
    transition: transform 200ms ease;
}

.sidebar-heading {
    display: flex;
    min-height: 77px;
    align-items: center;
    justify-content: space-between;
    padding: 18px 22px;
    border-bottom: 1px solid var(--border);
}

.sidebar-close {
    display: none;
    width: 36px;
    height: 36px;
    place-items: center;
    color: var(--sidebar-muted);
    background: transparent;
    border-radius: 9px;
    cursor: pointer;
}

.sidebar-close:hover {
    color: var(--sidebar-text);
    background: var(--surface-strong);
}

.admin-nav {
    flex: 1;
    padding: 18px 13px 28px;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
}

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

.nav-label {
    padding: 0 11px;
    margin: 0 0 7px;
    color: var(--sidebar-muted);
    font-size: 9px;
    font-weight: 850;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.nav-item {
    display: flex;
    min-height: 41px;
    align-items: center;
    gap: 11px;
    padding: 9px 11px;
    color: var(--sidebar-text);
    border-radius: 9px;
    font-size: 12px;
    font-weight: 680;
    text-decoration: none;
}

.nav-item + .nav-item {
    margin-top: 3px;
}

a.nav-item:hover {
    color: var(--primary);
    background: var(--primary-soft);
}

.nav-item--active,
a.nav-item--active:hover {
    color: var(--sidebar-active-text);
    background: var(--sidebar-active);
    box-shadow: 0 8px 18px rgba(47, 92, 255, 0.2);
}

.nav-item svg {
    width: 17px;
    height: 17px;
    flex: 0 0 auto;
}

.nav-item > span {
    min-width: 0;
    flex: 1;
}

.nav-item > small {
    color: var(--sidebar-muted);
    font-size: 8px;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.nav-item--active > small {
    color: rgba(255, 255, 255, 0.7);
}

.nav-item[aria-disabled="true"] {
    cursor: default;
    opacity: 0.7;
}

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

.sidebar-progress {
    padding: 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
}

.sidebar-progress > div:first-child {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--sidebar-text);
    font-size: 10px;
    font-weight: 750;
}

.sidebar-progress strong {
    color: var(--primary);
}

.progress-track {
    height: 5px;
    margin-top: 10px;
    overflow: hidden;
    background: var(--surface-strong);
    border-radius: 99px;
}

.progress-track span {
    display: block;
    width: 28%;
    height: 100%;
    background: var(--gradient-cta);
    border-radius: inherit;
}

.sidebar-progress p {
    margin: 9px 0 0;
    color: var(--sidebar-muted);
    font-size: 9px;
    line-height: 1.45;
}

.admin-workspace {
    min-height: 100vh;
    margin-left: var(--sidebar-width);
}

.admin-topbar {
    position: sticky;
    z-index: 40;
    top: 0;
    display: grid;
    min-height: 77px;
    grid-template-columns: minmax(210px, auto) minmax(220px, 440px) minmax(210px, auto);
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 13px clamp(20px, 3vw, 40px);
    background: var(--topbar);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(18px);
}

.topbar-start,
.topbar-actions {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 10px;
}

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

.nav-toggle {
    display: none;
}

.site-chip {
    display: inline-flex;
    min-width: 0;
    align-items: center;
    gap: 9px;
}

.site-chip__mark {
    display: inline-grid;
    width: 34px;
    height: 34px;
    flex: 0 0 auto;
    place-items: center;
    color: #ffffff;
    background: linear-gradient(135deg, #2f5cff, #8a5cff);
    border-radius: 9px;
    font-size: 12px;
    font-weight: 850;
}

.site-chip > span:nth-child(2) {
    display: grid;
    min-width: 0;
    line-height: 1.2;
}

.site-chip small {
    color: var(--muted);
    font-size: 8px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.site-chip strong {
    max-width: 160px;
    margin-top: 3px;
    overflow: hidden;
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.site-chip__status {
    width: 7px;
    height: 7px;
    flex: 0 0 auto;
    margin-left: 2px;
    background: var(--success);
    border-radius: 50%;
}

.global-search {
    display: flex;
    min-width: 0;
    min-height: 40px;
    align-items: center;
    gap: 9px;
    padding: 8px 11px;
    color: var(--muted);
    background: var(--surface-subtle);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    text-align: left;
}

.global-search svg {
    width: 17px;
    height: 17px;
    flex: 0 0 auto;
}

.global-search span {
    min-width: 0;
    flex: 1;
    overflow: hidden;
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.global-search kbd {
    padding: 3px 6px;
    color: var(--muted);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 5px;
    font-family: inherit;
    font-size: 8px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.user-chip {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 9px;
    padding-left: 6px;
}

.user-avatar {
    display: inline-grid;
    width: 36px;
    height: 36px;
    flex: 0 0 auto;
    place-items: center;
    color: #ffffff;
    background: linear-gradient(135deg, var(--primary), var(--violet));
    border-radius: 50%;
    font-size: 12px;
    font-weight: 850;
}

.user-chip__copy {
    display: grid;
    min-width: 0;
    line-height: 1.2;
}

.user-chip__copy strong {
    font-size: 11px;
}

.user-chip__copy small {
    max-width: 150px;
    margin-top: 3px;
    overflow: hidden;
    color: var(--muted);
    font-size: 9px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.logout-button:hover {
    color: var(--danger);
    border-color: var(--danger);
}

.sidebar-backdrop {
    position: fixed;
    z-index: 50;
    inset: 0;
    display: none;
    background: rgba(5, 8, 14, 0.55);
    cursor: pointer;
    opacity: 0;
    backdrop-filter: blur(3px);
    transition: opacity 180ms ease;
}

.dashboard {
    width: min(1460px, 100%);
    margin: 0 auto;
    padding: clamp(28px, 4vw, 52px);
}

.dashboard-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 28px;
    margin-bottom: 30px;
}

.dashboard-heading__meta {
    display: flex;
    align-items: center;
    gap: 11px;
    margin-bottom: 13px;
    color: var(--muted);
    font-size: 10px;
    font-weight: 750;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.dashboard-title {
    margin: 0;
    font-size: clamp(32px, 4vw, 48px);
    line-height: 1.06;
    letter-spacing: -0.045em;
}

.dashboard-heading > div > p:last-child {
    max-width: 650px;
    margin: 10px 0 0;
    color: var(--muted);
    font-size: 14px;
}

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

.metric-card {
    min-width: 0;
    padding: 18px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    transition:
        border-color 160ms ease,
        box-shadow 160ms ease,
        transform 160ms ease;
}

.metric-card:hover {
    border-color: var(--border-strong);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.metric-card__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 17px;
}

.metric-icon,
.module-card__icon,
.system-row__icon {
    display: inline-grid;
    place-items: center;
    border-radius: 10px;
}

.metric-icon {
    width: 36px;
    height: 36px;
}

.metric-icon svg {
    width: 18px;
    height: 18px;
}

.metric-icon--blue,
.module-card__icon--blue {
    color: var(--primary);
    background: var(--primary-soft);
}

.metric-icon--violet,
.module-card__icon--violet {
    color: var(--violet);
    background: var(--violet-soft);
}

.metric-icon--pink,
.module-card__icon--pink {
    color: var(--accent);
    background: color-mix(in srgb, var(--accent) 11%, transparent);
}

.metric-icon--amber {
    color: var(--warning);
    background: var(--warning-soft);
}

.metric-state {
    padding: 4px 7px;
    color: var(--muted-strong);
    background: var(--surface-strong);
    border-radius: 999px;
    font-size: 8px;
    font-weight: 850;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

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

.metric-card > p {
    margin: 0 0 4px;
    color: var(--muted);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.metric-card > strong {
    display: block;
    overflow: hidden;
    font-size: clamp(19px, 2vw, 25px);
    line-height: 1.2;
    letter-spacing: -0.035em;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.metric-card > small {
    display: block;
    min-height: 34px;
    margin-top: 8px;
    color: var(--muted);
    font-size: 10px;
    line-height: 1.5;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.65fr) minmax(280px, 0.65fr);
    gap: 16px;
    margin-top: 16px;
}

.panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.panel-heading,
.section-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
}

.panel-heading {
    padding: 20px 22px;
    border-bottom: 1px solid var(--border);
}

.panel-heading h2,
.security-summary h2,
.section-heading h2 {
    margin: 6px 0 0;
    font-size: 20px;
    line-height: 1.25;
    letter-spacing: -0.025em;
}

.system-list {
    display: grid;
}

.system-row {
    display: grid;
    min-width: 0;
    grid-template-columns: 40px minmax(0, 1fr) auto;
    align-items: center;
    gap: 13px;
    padding: 15px 22px;
}

.system-row + .system-row {
    border-top: 1px solid var(--border);
}

.system-row__icon {
    width: 36px;
    height: 36px;
    color: var(--primary);
    background: var(--primary-soft);
}

.system-row__icon svg {
    width: 18px;
    height: 18px;
}

.system-row > span:nth-child(2) {
    display: grid;
    min-width: 0;
}

.system-row strong {
    font-size: 12px;
}

.system-row small {
    margin-top: 3px;
    overflow: hidden;
    color: var(--muted);
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.system-row__result {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--success);
    font-size: 10px;
    font-weight: 800;
}

.system-row__result .status-dot {
    width: 6px;
    height: 6px;
}

.security-summary {
    position: relative;
    min-width: 0;
    padding: 24px;
    overflow: hidden;
    color: #f4f7ff;
    background: #0d1119;
    border: 1px solid #222a38;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
}

.security-summary__glow {
    position: absolute;
    top: -100px;
    right: -80px;
    width: 240px;
    height: 240px;
    background: radial-gradient(circle, rgba(47, 92, 255, 0.34), transparent 68%);
    border-radius: 50%;
}

.security-summary__icon {
    position: relative;
    display: inline-grid;
    width: 42px;
    height: 42px;
    margin-bottom: 20px;
    place-items: center;
    color: #8ba0ff;
    background: rgba(93, 124, 255, 0.13);
    border: 1px solid rgba(127, 150, 255, 0.2);
    border-radius: 12px;
}

.security-summary .panel-kicker {
    position: relative;
    color: #8ba0ff;
}

.security-summary h2 {
    position: relative;
    max-width: 290px;
    margin-top: 8px;
    font-size: 22px;
}

.security-summary > p:not(.panel-kicker) {
    position: relative;
    margin: 12px 0 20px;
    color: #8f99ac;
    font-size: 11px;
    line-height: 1.6;
}

.security-summary ul {
    position: relative;
    display: grid;
    gap: 10px;
    padding: 16px 0 0;
    margin: 0;
    border-top: 1px solid #252c39;
    list-style: none;
}

.security-summary li {
    display: flex;
    align-items: center;
    gap: 9px;
    color: #c7cedc;
    font-size: 10px;
    font-weight: 650;
}

.security-summary li span {
    color: #4ad59a;
    font-weight: 900;
}

.roadmap-section {
    margin-top: 42px;
}

.section-heading {
    align-items: flex-end;
    margin-bottom: 17px;
}

.section-heading > div > p:last-child {
    max-width: 680px;
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 12px;
}

.roadmap-count {
    flex: 0 0 auto;
    padding: 6px 10px;
    color: var(--primary);
    background: var(--primary-soft);
    border-radius: 999px;
    font-size: 9px;
    font-weight: 850;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

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

.module-card {
    position: relative;
    display: grid;
    min-width: 0;
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 14px;
    padding: 19px;
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.module-card__number {
    position: absolute;
    top: -8px;
    right: 8px;
    color: var(--surface-strong);
    font-size: 52px;
    font-weight: 900;
    line-height: 1;
}

.module-card__icon {
    position: relative;
    z-index: 1;
    width: 42px;
    height: 42px;
}

.module-card__icon svg {
    width: 20px;
    height: 20px;
}

.module-card > div {
    position: relative;
    z-index: 1;
    min-width: 0;
}

.module-card h3 {
    margin: 1px 0 6px;
    font-size: 14px;
    letter-spacing: -0.015em;
}

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

.module-status {
    grid-column: 2;
    justify-self: start;
    padding: 4px 7px;
    color: var(--muted-strong);
    background: var(--surface-strong);
    border-radius: 999px;
    font-size: 8px;
    font-weight: 850;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.dashboard-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding-top: 26px;
    margin-top: 38px;
    color: var(--muted);
    border-top: 1px solid var(--border);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.button--small {
    min-height: 36px;
    padding: 8px 12px;
    font-size: 10px;
}

.content-notice {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 13px 15px;
    margin-bottom: 18px;
    border: 1px solid;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 650;
}

.content-notice > span {
    display: inline-grid;
    width: 20px;
    height: 20px;
    flex: 0 0 auto;
    place-items: center;
    border: 1px solid currentColor;
    border-radius: 50%;
    font-size: 11px;
    font-weight: 900;
}

.content-notice--success {
    color: var(--success);
    background: var(--success-soft);
    border-color: color-mix(in srgb, var(--success) 25%, transparent);
}

.content-notice--error {
    color: var(--danger);
    background: var(--danger-soft);
    border-color: color-mix(in srgb, var(--danger) 25%, transparent);
}

.content-empty {
    display: grid;
    min-height: 390px;
    padding: 54px 28px;
    place-items: center;
    align-content: center;
    text-align: center;
}

.content-empty__icon {
    display: grid;
    width: 72px;
    height: 72px;
    margin-bottom: 20px;
    place-items: center;
    color: var(--primary);
    background: var(--primary-soft);
    border: 1px solid color-mix(in srgb, var(--primary) 18%, transparent);
    border-radius: 22px;
}

.content-empty__icon svg {
    width: 31px;
    height: 31px;
}

.content-empty h2 {
    margin: 7px 0 0;
    font-size: 25px;
    letter-spacing: -0.035em;
}

.content-empty > p:not(.panel-kicker) {
    max-width: 430px;
    margin: 9px 0 22px;
    color: var(--muted);
    font-size: 12px;
}

.content-count {
    display: inline-grid;
    min-width: 34px;
    height: 34px;
    padding-inline: 9px;
    place-items: center;
    color: var(--primary);
    background: var(--primary-soft);
    border-radius: 999px;
    font-size: 11px;
    font-weight: 850;
}

.page-list {
    display: grid;
}

.page-row {
    display: grid;
    min-width: 0;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    align-items: center;
    gap: 15px;
    padding: 18px 22px;
}

.page-row + .page-row {
    border-top: 1px solid var(--border);
}

.page-row__icon {
    display: grid;
    width: 40px;
    height: 40px;
    place-items: center;
    color: var(--primary);
    background: var(--primary-soft);
    border-radius: 11px;
}

.page-row__icon svg {
    width: 19px;
    height: 19px;
}

.page-row__copy {
    min-width: 0;
}

.page-row__title-line {
    display: flex;
    align-items: center;
    gap: 10px;
}

.page-row h3 {
    margin: 0;
    overflow: hidden;
    font-size: 14px;
    letter-spacing: -0.015em;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.page-row__path {
    margin: 3px 0 0;
    color: var(--primary);
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: 10px;
}

.page-row__lead {
    max-width: 650px;
    margin: 5px 0 0;
    overflow: hidden;
    color: var(--muted);
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.content-status {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 5px;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 8px;
    font-weight: 850;
    letter-spacing: 0.055em;
    text-transform: uppercase;
}

.content-status::before {
    width: 5px;
    height: 5px;
    background: currentColor;
    border-radius: 50%;
    content: "";
}

.content-status--draft {
    color: var(--muted-strong);
    background: var(--surface-strong);
}

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

.content-status--published {
    color: var(--success);
    background: var(--success-soft);
}

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

.page-row__actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.page-row__actions form {
    margin: 0;
}

.content-back-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 13px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 750;
    text-decoration: none;
}

.content-back-link:hover {
    color: var(--primary);
}

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

.editor-panel {
    overflow: hidden;
}

.editor-form {
    display: grid;
    gap: 22px;
    padding: 24px;
}

.cms-input,
.slug-input {
    width: 100%;
    color: var(--text);
    background: var(--surface-subtle);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    outline: 0;
    transition:
        border-color 160ms ease,
        box-shadow 160ms ease,
        background-color 160ms ease;
}

.cms-input {
    min-height: 48px;
    padding: 11px 14px;
}

textarea.cms-input {
    min-height: 150px;
    resize: vertical;
    font: inherit;
    line-height: 1.6;
}

.rich-text-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 8px;
    background: var(--surface-strong);
    border: 1px solid var(--border);
    border-bottom: 0;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}

.rich-text-toolbar button {
    min-height: 34px;
    padding: 6px 10px;
    color: var(--text-soft);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 7px;
    font: inherit;
    font-size: 11px;
    font-weight: 750;
    cursor: pointer;
}

.rich-text-toolbar button:hover {
    color: var(--primary);
    border-color: var(--primary);
}

.rich-text-editor {
    min-height: 260px;
    padding: 18px;
    overflow-wrap: anywhere;
    color: var(--text);
    background: var(--surface-subtle);
    border: 1px solid var(--border);
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
    outline: 0;
    line-height: 1.7;
}

.rich-text-editor:focus {
    background: var(--surface);
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--focus);
}

.rich-text-editor > :first-child {
    margin-top: 0;
}

.rich-text-editor > :last-child {
    margin-bottom: 0;
}

.editor-section {
    display: grid;
    gap: 20px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.editor-section__heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.editor-section__heading h3,
.editor-section__heading p {
    margin: 0;
}

.editor-section__heading > span {
    padding: 5px 9px;
    color: var(--muted);
    background: var(--surface-strong);
    border-radius: 999px;
    font-size: 10px;
    font-weight: 750;
}

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

.check-card {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 14px;
    color: var(--text);
    background: var(--surface-subtle);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
}

.check-card:has(input:checked) {
    background: var(--primary-soft);
    border-color: var(--primary);
}

.check-card input {
    width: 17px;
    height: 17px;
    margin: 2px 0 0;
    accent-color: var(--primary);
}

.check-card span {
    display: grid;
    gap: 3px;
}

.check-card strong {
    font-size: 12px;
}

.check-card small {
    color: var(--muted);
    font-size: 10px;
    line-height: 1.45;
}

.media-upload-panel {
    margin-bottom: 22px;
    overflow: hidden;
}

.media-upload-form {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) minmax(280px, 1.4fr) auto;
    align-items: end;
    gap: 16px;
    padding: 22px 24px 24px;
}

.media-upload-form .content-notice {
    grid-column: 1 / -1;
}

.media-file-field input[type="file"] {
    padding: 8px;
    font-size: 12px;
}

.media-file-field input[type="file"]::file-selector-button {
    padding: 8px 11px;
    margin-right: 10px;
    color: var(--text);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 7px;
    font: inherit;
    font-weight: 750;
    cursor: pointer;
}

.media-library {
    display: grid;
    gap: 16px;
}

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

.media-card {
    min-width: 0;
    overflow: hidden;
}

.media-card__preview {
    display: grid;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    place-items: center;
    background:
        linear-gradient(45deg, var(--surface-strong) 25%, transparent 25%),
        linear-gradient(-45deg, var(--surface-strong) 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, var(--surface-strong) 75%),
        linear-gradient(-45deg, transparent 75%, var(--surface-strong) 75%);
    background-position: 0 0, 0 8px, 8px -8px, -8px 0;
    background-size: 16px 16px;
    border-bottom: 1px solid var(--border);
}

.media-card__preview img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.media-card__body {
    display: grid;
    gap: 18px;
    padding: 18px;
}

.media-card__body h3,
.media-card__body p {
    margin: 0;
}

.media-card__body .media-card__usage {
    color: var(--success);
    font-weight: 750;
}

.media-card__body .media-card__usage--unused {
    color: var(--muted);
}

.page-image-picker {
    display: grid;
    gap: 16px;
}

.page-image-preview {
    display: grid;
    min-height: 180px;
    overflow: hidden;
    place-items: center;
    background: var(--surface-strong);
    border: 1px solid var(--border);
    border-radius: 10px;
}

.page-image-preview[hidden] {
    display: none;
}

.page-image-preview img {
    width: 100%;
    max-height: 360px;
    object-fit: contain;
}

.media-card__body h3 {
    overflow: hidden;
    font-size: 14px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.media-card__body p {
    margin-top: 5px;
    color: var(--muted);
    font-size: 10px;
}

.media-card__body form {
    display: grid;
    gap: 10px;
}

@media (max-width: 1120px) {
    .media-upload-form {
        grid-template-columns: 1fr 1fr;
    }

    .media-upload-form .button {
        grid-column: 1 / -1;
        justify-self: end;
    }

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

.cms-input:hover,
.slug-input:hover {
    border-color: var(--border-strong);
}

.cms-input:focus,
.slug-input:focus-within {
    background: var(--surface);
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--focus);
}

.slug-input {
    display: flex;
    align-items: stretch;
    overflow: hidden;
}

.slug-input > span {
    display: flex;
    align-items: center;
    padding: 0 0 0 14px;
    color: var(--muted);
    background: var(--surface-strong);
    border-right: 1px solid var(--border);
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: 11px;
    white-space: nowrap;
}

.slug-input input {
    width: 100%;
    min-width: 0;
    min-height: 46px;
    padding: 10px 13px;
    color: var(--text);
    background: transparent;
    border: 0;
    outline: 0;
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: 12px;
}

.editor-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding: 17px 24px;
    background: var(--surface-subtle);
    border-top: 1px solid var(--border);
}

.editor-aside {
    position: sticky;
    top: 100px;
    padding: 22px;
}

.editor-aside__icon {
    display: grid;
    width: 42px;
    height: 42px;
    margin-bottom: 20px;
    place-items: center;
    color: var(--primary);
    background: var(--primary-soft);
    border-radius: 12px;
}

.editor-aside__icon svg {
    width: 20px;
    height: 20px;
}

.editor-aside h2 {
    margin: 7px 0 12px;
    font-size: 19px;
    letter-spacing: -0.025em;
}

.editor-aside ul {
    display: grid;
    gap: 11px;
    padding: 16px 0 0;
    margin: 0;
    color: var(--muted);
    border-top: 1px solid var(--border);
    font-size: 10px;
    line-height: 1.55;
    list-style: none;
}

.editor-aside li {
    position: relative;
    padding-left: 18px;
}

.editor-aside li::before {
    position: absolute;
    top: 1px;
    left: 0;
    color: var(--success);
    content: "✓";
    font-weight: 900;
}

@media (max-width: 1180px) {
    .admin-topbar {
        grid-template-columns: minmax(200px, auto) minmax(210px, auto);
    }

    .global-search {
        display: none;
    }

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

    .dashboard-grid {
        grid-template-columns: minmax(0, 1.45fr) minmax(260px, 0.7fr);
    }
}

@media (max-width: 960px) {
    .auth-shell {
        display: grid;
        place-items: center;
    }

    .auth-layout {
        width: min(620px, 100%);
        min-height: auto;
        grid-template-columns: 1fr;
    }

    .auth-showcase {
        display: none;
    }

    .auth-panel {
        min-height: min(760px, calc(100vh - 48px));
        padding: clamp(34px, 8vw, 70px);
    }

    .auth-panel__brand {
        display: flex;
    }

    .admin-sidebar {
        box-shadow: 18px 0 50px rgba(0, 0, 0, 0.2);
        transform: translateX(-105%);
    }

    .admin-app[data-nav-open="true"] .admin-sidebar {
        transform: translateX(0);
    }

    .admin-app[data-nav-open="true"] .sidebar-backdrop {
        display: block;
        opacity: 1;
    }

    .sidebar-close,
    .nav-toggle {
        display: grid;
    }

    .admin-workspace {
        margin-left: 0;
    }

    .admin-topbar {
        grid-template-columns: minmax(0, 1fr) auto;
    }

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

    .security-summary {
        min-height: 330px;
    }

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

    .module-card {
        grid-template-columns: 44px minmax(0, 1fr) auto;
        align-items: center;
    }

    .module-status {
        grid-column: 3;
        grid-row: 1;
    }

    .editor-layout {
        grid-template-columns: 1fr;
    }

    .editor-aside {
        position: static;
    }
}

@media (max-width: 720px) {
    .shell {
        width: min(100% - 24px, 1080px);
        padding-top: 12px;
    }

    .hero {
        min-height: auto;
        padding: 34px 24px 48px;
        border-radius: 20px;
    }

    .hero h1 {
        font-size: clamp(39px, 13vw, 58px);
    }

    .capabilities {
        grid-template-columns: 1fr;
        gap: 30px;
        padding: 48px 4px;
    }

    .capabilities ul {
        grid-template-columns: 1fr;
    }

    .shell > footer {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
        padding-inline: 4px;
    }

    .admin-topbar {
        min-height: 68px;
        padding: 10px 16px;
    }

    .site-chip small,
    .user-chip__copy {
        display: none;
    }

    .site-chip strong {
        max-width: 100px;
    }

    .dashboard {
        padding: 26px 18px 32px;
    }

    .dashboard-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 18px;
    }

    .dashboard-heading .button {
        width: 100%;
    }

    .system-row {
        grid-template-columns: 38px minmax(0, 1fr);
        padding-inline: 16px;
    }

    .system-row__result {
        grid-column: 2;
    }

    .panel-heading {
        padding-inline: 16px;
    }

    .module-card {
        grid-template-columns: 44px minmax(0, 1fr);
    }

    .module-status {
        grid-column: 2;
        grid-row: auto;
    }

    .dashboard-footer {
        align-items: flex-start;
        flex-direction: column;
        gap: 7px;
    }

    .page-row {
        grid-template-columns: 40px minmax(0, 1fr);
        padding-inline: 16px;
    }

    .page-row__actions {
        grid-column: 2;
        justify-content: flex-start;
    }

    .editor-form {
        padding: 20px 16px;
    }

    .editor-actions {
        padding-inline: 16px;
    }

    .seo-directives {
        grid-template-columns: 1fr;
    }

    .media-upload-form,
    .media-grid {
        grid-template-columns: 1fr;
    }

    .media-upload-form .button {
        grid-column: auto;
        width: 100%;
    }
}

@media (max-width: 520px) {
    .auth-shell {
        padding: 0;
        background: var(--surface);
    }

    .auth-layout {
        min-height: 100vh;
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .auth-panel {
        min-height: 100vh;
        justify-content: flex-start;
        padding: 32px 22px;
    }

    .auth-theme-toggle {
        top: 18px;
        right: 18px;
    }

    .auth-panel__brand {
        padding-right: 52px;
        margin-bottom: 58px;
    }

    .auth-card {
        margin: 0 auto;
    }

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

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

    .topbar-actions {
        gap: 6px;
    }

    .topbar-actions .theme-toggle {
        display: none;
    }

    .site-chip__mark,
    .user-avatar {
        width: 32px;
        height: 32px;
    }

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

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

    .page-row__title-line {
        align-items: flex-start;
        flex-direction: column;
        gap: 6px;
    }

    .page-row__actions {
        align-items: stretch;
        flex-direction: column;
    }

    .page-row__actions .button,
    .page-row__actions form {
        width: 100%;
    }

    .page-row__actions form .button {
        justify-content: center;
    }

    .slug-input > span {
        display: none;
    }

    .editor-actions {
        align-items: stretch;
        flex-direction: column-reverse;
    }

    .editor-actions .button {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}

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

.global-block-option {
    min-width: 0;
}

.global-block-option small {
    display: block;
    margin-top: 3px;
}

@media (max-width: 720px) {
    .global-block-picker {
        grid-template-columns: 1fr;
    }
}

.navigation-items {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

.navigation-items > legend {
    margin-bottom: 8px;
    color: var(--text);
    font-size: 15px;
    font-weight: 750;
}

.navigation-item-list {
    display: grid;
    gap: 14px;
    margin-top: 18px;
}

.navigation-item-row {
    position: relative;
    display: grid;
    grid-template-columns: minmax(10rem, 0.8fr) minmax(14rem, 1fr) minmax(14rem, 1fr);
    gap: 12px;
    padding: 18px 18px 14px 44px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface-subtle);
}

.navigation-item-row__number {
    position: absolute;
    inset: 18px auto auto 16px;
    display: grid;
    width: 20px;
    height: 20px;
    color: var(--text-soft);
    border: 1px solid var(--border);
    border-radius: 50%;
    place-items: center;
    font-size: 11px;
    font-weight: 800;
}

.navigation-item-row .form-field {
    margin: 0;
}

.navigation-new-tab {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-soft);
    font-size: 13px;
}

.navigation-add-item {
    margin-top: 14px;
}

@media (max-width: 980px) {
    .navigation-item-row {
        grid-template-columns: 1fr;
    }
}

.redirect-simulator {
    display: grid;
    gap: 18px;
    margin-bottom: 22px;
    padding-bottom: 22px;
}

.redirect-simulator__form {
    display: grid;
    grid-template-columns: minmax(12rem, 1fr) minmax(12rem, 0.8fr) auto;
    align-items: end;
    gap: 14px;
    padding: 0 24px;
}

.redirect-simulator__form .form-field {
    margin: 0;
}

.redirect-simulation-result {
    display: grid;
    gap: 5px;
    margin: 0 24px;
    padding: 16px 18px;
    color: var(--success);
    background: color-mix(in srgb, var(--success) 9%, var(--surface));
    border: 1px solid color-mix(in srgb, var(--success) 28%, var(--border));
    border-radius: 12px;
}

.redirect-simulation-result strong {
    overflow-wrap: anywhere;
}

.redirect-simulation-result span {
    color: var(--muted);
    font-size: 12px;
}

.redirect-delete-form {
    display: flex;
    align-items: center;
    gap: 8px;
}

.redirect-delete-form label {
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--muted);
    font-size: 10px;
}

@media (max-width: 900px) {
    .redirect-simulator__form {
        grid-template-columns: 1fr;
    }

    .redirect-simulator__form .button {
        width: 100%;
    }
}
