:root {
    color-scheme: dark;
    --bg: #0b0f17;
    --panel: #141a24;
    --panel-soft: #101620;
    --border: #283140;
    --text: #f4f7fb;
    --muted: #8f9aad;
    --accent: #6e88ff;
    --accent-strong: #5874f2;
    --danger: #ff7272;
    --danger-bg: #2a171b;
    --danger-border: #5a2b31;
    --ok: #4fd18b;
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background: var(--bg);
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background:
        radial-gradient(circle at 18% 16%, rgba(78, 105, 214, 0.18), transparent 32rem),
        radial-gradient(circle at 82% 78%, rgba(32, 136, 170, 0.12), transparent 30rem),
        var(--bg);
    color: var(--text);
}

a {
    color: inherit;
}

.site-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.site-header,
.site-footer {
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
}

.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 24px 0;
}

.brand-link {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.brand-mark {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 11px;
    background: #fff;
    color: #111722;
    font-weight: 800;
    letter-spacing: -0.04em;
}

.brand-name {
    font-size: 18px;
    font-weight: 760;
    letter-spacing: -0.025em;
}

.brand-domain {
    color: var(--accent);
}

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

.nav a {
    color: var(--muted);
    text-decoration: none;
    font-size: 14px;
}

.nav a:hover,
.nav a:focus-visible {
    color: var(--text);
}

.main {
    width: min(1120px, calc(100% - 32px));
    margin: auto;
    padding: 40px 0 72px;
}

.login-layout {
    display: grid;
    place-items: center;
    min-height: 66vh;
}

.card {
    width: min(100%, 430px);
    padding: 32px;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: rgba(20, 26, 36, 0.92);
    box-shadow: var(--shadow);
}

.eyebrow {
    margin: 0 0 10px;
    color: var(--accent);
    font-size: 12px;
    font-weight: 750;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

h1,
h2 {
    margin: 0;
    letter-spacing: -0.035em;
}

h1 {
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.04;
}

h2 {
    font-size: 22px;
}

.lead,
.copy {
    color: var(--muted);
    line-height: 1.65;
}

.lead {
    margin: 10px 0 28px;
    font-size: 15px;
}

.copy {
    margin: 14px 0 0;
    font-size: 15px;
}

.field {
    margin-top: 18px;
}

.field label {
    display: block;
    margin-bottom: 8px;
    color: #cbd2dd;
    font-size: 13px;
    font-weight: 650;
}

.field input {
    width: 100%;
    height: 48px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--panel-soft);
    color: var(--text);
    padding: 0 14px;
    font: inherit;
    outline: none;
}

.field input::placeholder {
    color: #5e6979;
}

.field input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(110, 136, 255, 0.14);
}

.action {
    display: inline-flex;
    width: 100%;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    margin-top: 22px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--accent-strong), var(--accent));
    color: #fff;
    text-decoration: none;
    font-weight: 720;
    font-size: 14px;
    box-shadow: 0 10px 28px rgba(88, 116, 242, 0.22);
}

.action:hover,
.action:focus-visible {
    filter: brightness(1.08);
}

.inline-link {
    color: #90a5ff;
    text-decoration: none;
}

.inline-link:hover,
.inline-link:focus-visible {
    text-decoration: underline;
}

.notice {
    margin-top: 22px;
    padding: 14px 15px;
    border: 1px solid var(--border);
    border-radius: 11px;
    background: var(--panel-soft);
    color: var(--muted);
    font-size: 13px;
    line-height: 1.55;
}

.notice.error {
    border-color: var(--danger-border);
    background: var(--danger-bg);
    color: var(--danger);
}

.status {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.status::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: var(--ok);
    box-shadow: 0 0 9px rgba(79, 209, 139, 0.55);
}

.page-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(260px, 0.8fr);
    gap: 28px;
    align-items: start;
}

.content-card {
    padding: 30px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: rgba(20, 26, 36, 0.9);
    box-shadow: var(--shadow);
}

.list {
    margin: 18px 0 0;
    padding-left: 20px;
    color: var(--muted);
    line-height: 1.7;
}

.meta {
    display: grid;
    gap: 14px;
    margin-top: 18px;
}

.meta-row {
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border);
}

.meta-row:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.meta-title {
    margin: 0 0 4px;
    color: #cbd2dd;
    font-size: 13px;
    font-weight: 700;
}

.meta-value {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.5;
}

.site-footer {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 22px 0 28px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    color: #667181;
    font-size: 12px;
}

.centered-error {
    max-width: 680px;
    margin: 10vh auto 0;
    text-align: center;
}

.error-code {
    margin: 0;
    color: var(--accent);
    font-size: clamp(64px, 18vw, 150px);
    line-height: 0.86;
    font-weight: 850;
    letter-spacing: -0.08em;
}

.error-title {
    margin-top: 22px;
    font-size: clamp(26px, 4vw, 38px);
}

.error-actions {
    max-width: 300px;
    margin: 0 auto;
}

@media (max-width: 760px) {
    .site-header {
        align-items: flex-start;
        flex-direction: column;
    }

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

    .site-footer {
        flex-direction: column;
    }

    .main {
        padding-top: 24px;
    }

    .card,
    .content-card {
        padding: 24px;
    }
}