        @import url('https://fonts.googleapis.com/css2?family=PT+Mono&family=Russo+One&display=swap');

        /* Порядок загрузки: 1. main.css, 2. cabinet.css, 3. admin.css */

        .skip-link {
            position: absolute;
            top: -100%;
            left: 16px;
            z-index: var(--z-skip-link);
            padding: 8px 16px;
            background: var(--accent-primary);
            color: #fff;
            font-weight: 600;
            border-radius: var(--radius-sm);
            text-decoration: none;
        }
        .skip-link:focus {
            top: 8px;
        }

        * {
            box-sizing: border-box;
        }

        html {
            scroll-behavior: smooth;
        }

        body {
            margin: 0;
            min-height: 100vh;
            background:
                radial-gradient(circle at top center, rgba(0, 180, 255, 0.1), transparent 30%),
                linear-gradient(180deg, var(--bg-deep) 0%, var(--bg-void) 100%);
            color: var(--text-primary);
            font-family: "PT Mono", monospace;
            font-size: 15px;
            line-height: 1.6;
            overflow-x: hidden;
        }

        body::before {
            content: "";
            position: fixed;
            inset: 0;
            background-image:
                linear-gradient(rgba(0, 140, 255, 0.035) 1px, transparent 1px),
                linear-gradient(90deg, rgba(0, 140, 255, 0.035) 1px, transparent 1px);
            background-size: 40px 40px;
            pointer-events: none;
            z-index: 0;
        }

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

        .topbar:not([hidden]) {
            position: sticky;
            top: 0;
            z-index: var(--z-sticky);
            min-height: 72px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 24px;
            padding: 12px 28px;
            background: rgba(4, 8, 16, 0.9);
            backdrop-filter: blur(16px);
            border-bottom: 1px solid var(--border-mid);
        }

/* TASK-056 phone guard: no body-level horizontal scroll in cabinet pages. */
/* ===== TASK-086: Custom 404 Page ===== */
.page-404 {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 40px 20px;
}

.page-404-main {
    position: relative;
    z-index: 1;
    max-width: 560px;
    width: 100%;
    text-align: center;
}

.page-404-illustration {
    margin-bottom: 24px;
}

.page-404-svg {
    width: 100%;
    max-width: 320px;
    height: auto;
    display: inline-block;
}

.page-404-title {
    font-family: var(--font-display);
    font-size: 29px;
    font-weight: 400;
    line-height: 1.25;
    color: var(--accent-bright);
    margin: 0 0 16px;
    letter-spacing: 0.04em;
}

.page-404-description {
    font-family: var(--font-mono);
    font-size: 17px;
    line-height: 1.7;
    color: var(--text-secondary);
    margin: 0 0 32px;
}

.page-404-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

/* Phone */
@media (max-width: 767px) {
    .page-404 {
        padding: 32px 16px;
    }

    .page-404-main {
        max-width: 100%;
    }

    .page-404-title {
        font-size: 24px;
    }

    .page-404-description {
        font-size: 15px;
    }

    .page-404-svg {
        max-width: 260px;
    }

    .page-404-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .page-404-actions .btn {
        min-height: 44px;
        width: 100%;
        justify-content: center;
    }
}

/* TASK-056 phone guard: no body-level horizontal scroll in cabinet pages. */
@media (max-width: 767px) {
    .cabinet-body,
    .cabinet-body .app-shell,
    .cabinet-body .app-main,
    .cabinet-body .workspace-section,
    .cabinet-body .panel,
    .cabinet-body .card,
    .cabinet-body .summary-card,
    .cabinet-body .state-card,
    .cabinet-body .result-card,
    .cabinet-body .empty-state,
    .cabinet-body .responsive-card {
        max-width: 100%;
    }
}

