/* ═══════════════════════════════════════════════════════════════
   LOGIN PAGE
   Standalone auth page — Design System 2 (Onboarding)
   ═══════════════════════════════════════════════════════════════ */

/* ─── TOKENS ────────────────────────────────────────────────── */
:root {
    --bg:        #0a0a0a;
    --bg2:       #111111;
    --bg3:       #161616;
    --blue:      #0099ff;
    --blue-dim:  rgba(0,153,255,.12);
    --blue-glow: rgba(0,153,255,.35);
    --yellow:    #eab308;
    --white:     #ffffff;
    --muted:     #666666;
    --muted2:    #999999;
    --line:      rgba(255,255,255,.07);
    --red:       #ff3b3b;
    --mono:      'Roboto Mono', monospace;
    --display:   'Bebas Neue', sans-serif;
    --body:      'Space Grotesk', sans-serif;
}

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

html {
    background: var(--bg);
    scroll-behavior: smooth;
}

body {
    background: var(--bg);
    color: var(--white);
    font-family: var(--body);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
    display: grid;
    place-items: center;
    padding: 24px;
}

/* ─── BACKGROUND LAYERS ────────────────────────────────────── */
.page-dots {
    position: fixed; inset: 0; pointer-events: none; z-index: 0;
    background-image: radial-gradient(circle, rgba(0,153,255,.10) 1px, transparent 1px);
    background-size: 32px 32px;
}

.page-scan {
    position: fixed; inset: 0; pointer-events: none; z-index: 0;
    background: repeating-linear-gradient(
        0deg, transparent, transparent 3px,
        rgba(0,0,0,.07) 3px, rgba(0,0,0,.07) 4px
    );
}

.page-glow {
    position: fixed; top: -200px; left: 50%; transform: translateX(-50%);
    width: 800px; height: 500px; pointer-events: none; z-index: 0;
    background: radial-gradient(ellipse, rgba(0,153,255,.06) 0%, transparent 70%);
}

/* ─── MAIN CONTAINER ────────────────────────────────────────── */
.wrap {
    position: relative;
    z-index: 1;
    width: min(1100px, 100%);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 36px;
    align-items: center;
}

/* ─── BANNER / ARTWORK ──────────────────────────────────────── */
.art-card {
    position: relative;
    height: 560px;
    overflow: hidden;
    background: var(--bg2);
    border: 1px solid var(--line);
}

.art-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    filter: contrast(1.05) saturate(1.08);
}

.art-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(120% 120% at 10% 10%, rgba(255,255,255,.04), transparent 60%),
                linear-gradient(180deg, rgba(0,0,0,.15), rgba(0,0,0,.45));
}

.chip {
    position: absolute;
    top: 16px;
    left: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    padding: 0;
    background: var(--white);
    z-index: 2;
    border-radius: 4px;
}

.chip img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 6px;
}

/* ─── FORM WRAPPER ──────────────────────────────────────────── */
.form-wrapper {
    position: relative;
    z-index: 1;
}

/* ─── HEADER ────────────────────────────────────────────────── */
.login-header {
    margin-bottom: 32px;
}

.login-title {
    font-family: var(--display);
    font-size: clamp(26px, 4vw, 42px);
    line-height: 0.92;
    letter-spacing: 0.01em;
    color: var(--white);
    margin-bottom: 12px;
}

.login-subtitle {
    font-size: 0.95rem;
    color: var(--muted2);
    line-height: 1.65;
}

/* ─── CARD ──────────────────────────────────────────────────── */
.login-card {
    background: var(--bg3);
    border: 1px solid var(--line);
    padding: 40px;
    position: relative;
    overflow: hidden;
}

.login-card::before {
    content: '';
    position: absolute; top: 0; left: 0; right: 0; height: 2px;
    background: linear-gradient(90deg, var(--blue), transparent);
}

/* HUD corner brackets */
.hud-c {
    position: absolute; width: 12px; height: 12px; pointer-events: none;
}
.hud-c.tl { top: 8px; left: 8px; border-top: 1px solid var(--blue); border-left: 1px solid var(--blue); }
.hud-c.tr { top: 8px; right: 8px; border-top: 1px solid var(--blue); border-right: 1px solid var(--blue); }
.hud-c.bl { bottom: 8px; left: 8px; border-bottom: 1px solid var(--blue); border-left: 1px solid var(--blue); }
.hud-c.br { bottom: 8px; right: 8px; border-bottom: 1px solid var(--blue); border-right: 1px solid var(--blue); }

/* ─── ALERTS ────────────────────────────────────────────────── */
.alert {
    padding: 14px 18px;
    margin-bottom: 24px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 0.9rem;
    border: 1px solid;
    position: relative;
}

.alert::before {
    content: '';
    position: absolute; top: 0; left: 0; bottom: 0; width: 3px;
}

.alert-danger {
    background: rgba(255,59,59,.08);
    border-color: rgba(255,59,59,.25);
    color: #ff7070;
}

.alert-danger::before {
    background: var(--red);
}

.alert-success {
    background: rgba(0,153,255,.08);
    border-color: rgba(0,153,255,.25);
    color: var(--blue);
}

.alert-success::before {
    background: var(--blue);
}

.alert i {
    font-size: 1rem;
    margin-top: 2px;
    flex-shrink: 0;
}

/* ─── FORM ELEMENTS ─────────────────────────────────────────── */
.form-group {
    margin-bottom: 22px;
}

.form-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--muted2);
    margin-bottom: 8px;
    letter-spacing: 0.02em;
}

.form-control {
    width: 100%;
    padding: 13px 16px;
    background: var(--bg2);
    border: 1px solid var(--line);
    color: var(--white);
    font-family: var(--body);
    font-size: 0.95rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--blue);
    box-shadow: 0 0 0 3px var(--blue-dim);
}

.form-control::placeholder {
    color: var(--muted);
}

/* ─── BUTTONS ───────────────────────────────────────────────── */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    background: var(--blue);
    color: #000;
    font-family: var(--mono);
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 14px 40px;
    border: none;
    cursor: pointer;
    transition: all 0.25s;
    box-shadow: 0 0 20px var(--blue-glow);
    text-decoration: none;
}

.btn-primary:hover {
    box-shadow: 0 0 32px var(--blue-glow);
    transform: translateY(-2px);
}

.btn-primary:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none;
}

.btn-primary .icon {
    font-size: 1.2rem;
}

/* ─── DIVIDER ───────────────────────────────────────────────── */
.divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 28px 0;
}

.divider-line {
    flex: 1;
    height: 1px;
    background: var(--line);
}

.divider-text {
    font-family: var(--mono);
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--muted);
}

/* ─── LINKS ─────────────────────────────────────────────────── */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--muted2);
    text-decoration: none;
    font-size: 0.9rem;
    margin-bottom: 32px;
    transition: color 0.2s;
}

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

.legal {
    margin-top: 24px;
    font-size: 0.78rem;
    color: var(--muted);
    line-height: 1.6;
}

.legal a {
    color: var(--blue);
    text-decoration: none;
}

.legal a:hover {
    text-decoration: underline;
}

/* ─── RESPONSIVE ────────────────────────────────────────────── */
@media (max-width: 980px) {
    body {
        background-image: url('/images/background.jpg');
        background-size: cover;
        background-position: center;
        background-attachment: fixed;
    }

    body::before {
        content: '';
        position: fixed;
        inset: 0;
        background: linear-gradient(180deg, rgba(0,0,0,0.7), rgba(0,0,0,0.85));
        z-index: 0;
    }

    .wrap {
        grid-template-columns: 1fr;
        max-width: 560px;
        gap: 24px;
    }

    .art-card {
        display: none;
    }

    .login-card {
        padding: 24px 18px;
    }

    .login-title {
        font-size: clamp(20px, 5vw, 32px);
    }
}

@media (max-width: 640px) {
    body {
        padding: 16px;
    }

    .wrap {
        gap: 16px;
    }

    .login-card {
        padding: 20px 16px;
    }
}
