:root {
    color-scheme: dark;
    --bg-start: #111827;
    --bg-end: #030712;
    --panel: rgba(17, 24, 39, 0.84);
    --panel-border: rgba(148, 163, 184, 0.18);
    --text: #e5eefb;
    --muted: #94a3b8;
    --primary: #f97316;
    --primary-strong: #fb923c;
    --success-bg: rgba(34, 197, 94, 0.14);
    --success-border: rgba(74, 222, 128, 0.28);
    --error-bg: rgba(239, 68, 68, 0.14);
    --error-border: rgba(248, 113, 113, 0.28);
    --input: rgba(15, 23, 42, 0.75);
    --shadow: 0 30px 80px rgba(2, 6, 23, 0.45);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Segoe UI", Arial, sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top, rgba(249, 115, 22, 0.18), transparent 30%),
        linear-gradient(145deg, var(--bg-start), var(--bg-end));
    min-height: 100vh;
}

code,
pre {
    font-family: "Cascadia Code", Consolas, monospace;
}

.auth-body {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 16px;
}

.auth-shell {
    width: 100%;
    max-width: 1040px;
}

.auth-panel {
    width: 100%;
    max-width: 520px;
    margin: 0 auto;
    padding: 32px;
    border: 1px solid var(--panel-border);
    border-radius: 28px;
    background: var(--panel);
    backdrop-filter: blur(18px);
    box-shadow: var(--shadow);
}

.auth-panel--wide {
    max-width: 920px;
}

.eyebrow {
    display: inline-flex;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #fed7aa;
    background: rgba(249, 115, 22, 0.14);
}

h1 {
    margin: 16px 0 10px;
    font-size: clamp(32px, 5vw, 48px);
    line-height: 1;
}

.lead {
    margin: 0 0 24px;
    color: var(--muted);
    line-height: 1.6;
}

.auth-form {
    display: grid;
    gap: 16px;
}

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

.field span {
    font-size: 14px;
    color: #cbd5e1;
}

.field input {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 16px;
    background: var(--input);
    color: var(--text);
    font-size: 15px;
}

.field input:focus {
    outline: none;
    border-color: rgba(251, 146, 60, 0.65);
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.14);
}

.primary-button {
    margin-top: 8px;
    border: 0;
    border-radius: 16px;
    padding: 15px 18px;
    font-size: 15px;
    font-weight: 700;
    color: #fff7ed;
    cursor: pointer;
    background: linear-gradient(135deg, var(--primary), var(--primary-strong));
}

.primary-button:disabled {
    cursor: progress;
    opacity: 0.8;
}

.message {
    min-height: 24px;
    margin-top: 18px;
    font-size: 14px;
    line-height: 1.5;
}

.message.is-success {
    padding: 12px 14px;
    border: 1px solid var(--success-border);
    border-radius: 14px;
    background: var(--success-bg);
}

.message.is-error {
    padding: 12px 14px;
    border: 1px solid var(--error-border);
    border-radius: 14px;
    background: var(--error-bg);
}

.debug-card,
.profile-card {
    margin-top: 18px;
    padding: 18px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.6);
}

.debug-card__title {
    font-weight: 700;
    margin-bottom: 8px;
}

.debug-card code {
    display: inline-block;
    padding: 10px 12px;
    border-radius: 12px;
    font-size: 22px;
    letter-spacing: 0.24em;
    background: rgba(249, 115, 22, 0.12);
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 24px;
}

.footer-links a,
.nav-card {
    color: #fdba74;
    text-decoration: none;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
    margin-top: 28px;
}

.nav-card {
    display: grid;
    gap: 10px;
    padding: 22px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.55);
    transition: transform 140ms ease, border-color 140ms ease;
}

.nav-card:hover {
    transform: translateY(-2px);
    border-color: rgba(251, 146, 60, 0.55);
}

.nav-card__label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
}

#profile-json {
    margin: 0;
    white-space: pre-wrap;
    word-break: break-word;
    color: #dbeafe;
}

.is-hidden {
    display: none;
}

@media (max-width: 640px) {
    .auth-panel,
    .auth-panel--wide {
        padding: 24px 18px;
        border-radius: 22px;
    }

    h1 {
        font-size: 32px;
    }
}
