:root {
    --bg-top: #0a1120;
    --bg-bottom: #08101b;
    --panel: rgba(12, 21, 40, 0.82);
    --panel-strong: rgba(14, 24, 44, 0.94);
    --line: rgba(148, 163, 184, 0.16);
    --text: #e7eefc;
    --muted: #97a7c2;
    --soft: #c4d1e8;
    --primary: #7c88ff;
    --primary-strong: #5c67f2;
    --primary-soft: rgba(124, 136, 255, 0.16);
    --success: #31c48d;
    --danger: #ff7b93;
    --warning: #f5b84d;
    --shadow: 0 24px 90px rgba(0, 0, 0, 0.35);
    --radius-xl: 30px;
    --radius-lg: 22px;
    --radius-md: 16px;
    --radius-sm: 12px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

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

body {
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    line-height: 1.55;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(124, 136, 255, 0.18), transparent 34%),
        radial-gradient(circle at top right, rgba(49, 196, 141, 0.12), transparent 28%),
        linear-gradient(180deg, var(--bg-top), var(--bg-bottom));
}

body::before,
body::after {
    content: "";
    position: fixed;
    z-index: 0;
    border-radius: 999px;
    filter: blur(80px);
    pointer-events: none;
}

body::before {
    top: 8vh;
    left: -8vw;
    width: 28vw;
    height: 28vw;
    background: rgba(124, 136, 255, 0.22);
}

body::after {
    bottom: 6vh;
    right: -6vw;
    width: 26vw;
    height: 26vw;
    background: rgba(49, 196, 141, 0.12);
}

a {
    color: #c0caff;
    text-decoration: none;
}

a:hover {
    color: #e6ebff;
}

button,
input,
textarea {
    font: inherit;
}

.page {
    position: relative;
    z-index: 1;
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
    padding: 32px 0 56px;
}

.page-narrow {
    width: min(980px, calc(100% - 32px));
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--soft);
}

.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--primary), #8d67ff 70%);
    color: white;
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: 0;
    box-shadow: 0 12px 30px rgba(92, 103, 242, 0.35);
}

.panel {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.hero {
    padding: 38px;
}

.hero-grid,
.auth-shell,
.dashboard-grid {
    display: grid;
    gap: 22px;
}

.hero-grid {
    grid-template-columns: 1.4fr 0.95fr;
    align-items: stretch;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    border-radius: 999px;
    background: var(--primary-soft);
    border: 1px solid rgba(124, 136, 255, 0.22);
    color: #ccd4ff;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero h1,
.hero-copy h1,
.page h1 {
    margin-top: 18px;
    font-size: clamp(2.3rem, 5vw, 4.2rem);
    line-height: 0.95;
    letter-spacing: -0.04em;
    color: white;
}

.page h1 {
    font-size: clamp(2rem, 4vw, 3.1rem);
}

.lead {
    margin-top: 18px;
    max-width: 48rem;
    color: var(--muted);
    font-size: 1.05rem;
}

.hero-card,
.auth-card,
.info-card,
.dashboard-card,
.screen-card,
.stat-card {
    background: var(--panel-strong);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 24px;
}

.hero-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 18px;
}

.card-title,
.auth-card h2,
.dashboard-card h2,
.screen-card h2,
.stat-card h2 {
    font-size: 1.2rem;
    color: white;
    margin-bottom: 10px;
}

.subtle,
.muted {
    color: var(--muted);
}

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

.chip {
    padding: 14px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(148, 163, 184, 0.12);
}

.chip strong {
    display: block;
    margin-bottom: 4px;
    color: white;
    font-size: 0.95rem;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 24px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    padding: 0 18px;
    border: none;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--primary), var(--primary-strong));
    color: white;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
    box-shadow: 0 14px 30px rgba(92, 103, 242, 0.28);
}

.btn:hover {
    transform: translateY(-1px);
    opacity: 0.98;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    border: 1px solid rgba(148, 163, 184, 0.18);
    box-shadow: none;
}

.btn-danger {
    background: linear-gradient(135deg, #e34d67, #c83451);
    box-shadow: 0 14px 30px rgba(200, 52, 81, 0.22);
}

.btn-block {
    width: 100%;
}

.auth-shell {
    grid-template-columns: 1.05fr 0.95fr;
    align-items: start;
}

.auth-side,
.auth-card,
.screen-card {
    min-height: 100%;
}

.auth-side {
    padding: 30px;
}

.auth-card {
    padding: 28px;
}

.auth-card p,
.auth-side p,
.dashboard-card p,
.screen-card p {
    color: var(--muted);
}

.form-stack {
    margin-top: 18px;
}

.field {
    margin-bottom: 14px;
}

.field label {
    display: block;
    margin-bottom: 8px;
    color: #dbe5f6;
    font-size: 0.94rem;
    font-weight: 600;
}

.field input,
.field textarea {
    width: 100%;
    padding: 14px 15px;
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    background: rgba(255, 255, 255, 0.04);
    color: white;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.field input::placeholder,
.field textarea::placeholder {
    color: #70809b;
}

.field input:focus,
.field textarea:focus {
    outline: none;
    border-color: rgba(124, 136, 255, 0.46);
    box-shadow: 0 0 0 4px rgba(124, 136, 255, 0.12);
    background: rgba(255, 255, 255, 0.055);
}

.error,
.notice,
.form-note {
    margin-top: 12px;
    font-size: 0.93rem;
}

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

.notice {
    color: var(--success);
}

.form-links {
    margin-top: 16px;
    color: var(--muted);
    font-size: 0.95rem;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.topbar .brand {
    margin-bottom: 0;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    background: rgba(255, 255, 255, 0.04);
    color: var(--soft);
    font-size: 0.85rem;
    font-weight: 600;
}

.status-pill.success {
    color: #d7fff0;
    border-color: rgba(49, 196, 141, 0.25);
    background: rgba(49, 196, 141, 0.12);
}

.status-pill.warning {
    color: #fff1c5;
    border-color: rgba(245, 184, 77, 0.25);
    background: rgba(245, 184, 77, 0.12);
}

.dashboard-grid {
    grid-template-columns: 1.15fr 0.85fr;
    margin-top: 22px;
}

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

.stat-card strong {
    display: block;
    color: white;
    font-size: 1.1rem;
    margin-bottom: 6px;
}

.kv {
    display: grid;
    grid-template-columns: 136px 1fr;
    gap: 12px 18px;
    margin-top: 16px;
}

.kv div:nth-child(odd) {
    color: var(--soft);
    font-weight: 600;
}

.code-block,
pre {
    margin-top: 16px;
    padding: 16px;
    border-radius: var(--radius-md);
    background: rgba(4, 9, 19, 0.7);
    border: 1px solid rgba(148, 163, 184, 0.14);
    color: #d9e5fb;
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-word;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.92rem;
}

.screen-shell {
    max-width: 640px;
    margin: 0 auto;
}

.screen-card {
    padding: 30px;
    text-align: center;
}

.code-display {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 220px;
    margin-top: 18px;
    padding: 16px 20px;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(124, 136, 255, 0.14), rgba(49, 196, 141, 0.08));
    border: 1px solid rgba(124, 136, 255, 0.2);
    color: white;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.divider {
    height: 1px;
    margin: 18px 0;
    background: linear-gradient(90deg, transparent, rgba(148, 163, 184, 0.18), transparent);
}

.stack > * + * {
    margin-top: 14px;
}

@media (max-width: 920px) {
    .hero-grid,
    .auth-shell,
    .dashboard-grid,
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .hero,
    .auth-side,
    .auth-card,
    .dashboard-card,
    .screen-card {
        padding: 24px;
    }
}

@media (max-width: 640px) {
    .page,
    .page-narrow {
        width: min(100% - 24px, 100%);
        padding: 22px 0 42px;
    }

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

    .kv {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .code-display {
        min-width: 100%;
        font-size: 1.45rem;
    }
}
