/* ====== Base Theme (Light/Dark) ====== */
:root{
    --bg: #0f172a;          /* page background */
    --card-bg: #111827;     /* card background */
    --text: #e5e7eb;        /* main text */
    --muted: #9ca3af;       /* secondary text */
    --primary: #60a5fa;     /* primary accent */
    --primary-hover: #3b82f6;
    --error: #ef4444;
    --ring: 0 0 0 3px rgba(99,102,241,0.35);
    --radius: 14px;
    --shadow: 0 20px 40px rgba(0,0,0,.45);
}

/* Prefer light if system prefers */
@media (prefers-color-scheme: light) {
    :root{
        --bg: #f7f7fb;
        --card-bg: #ffffff;
        --text: #0b1220;
        --muted: #6b7280;
        --primary: #2563eb;
        --primary-hover: #1d4ed8;
        --shadow: 0 12px 28px rgba(2,6,23,.08);
    }
}

*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
    margin:0;
    font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, "Apple Color Emoji","Segoe UI Emoji";
    background: radial-gradient(1200px 800px at 80% -20%, rgba(59,130,246,.18), transparent),
    radial-gradient(900px 600px at -10% 120%, rgba(99,102,241,.18), transparent),
    var(--bg);
    color: var(--text);
}

/* ====== Layout ====== */
.auth-shell{
    min-height:100%;
    display:flex;
    align-items:center;
    justify-content:center;
    padding: 48px 20px;
}

.card{
    width: 100%;
    max-width: 440px;
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 32px;
    border: 1px solid rgba(148,163,184,.12);
    backdrop-filter: blur(6px);
}

.brand{
    display:flex;
    align-items:center;
    gap:10px;
    margin-bottom: 18px;
}
.brand .logo{
    width:36px;height:36px;border-radius:8px;
    background: linear-gradient(135deg,#60a5fa,#a78bfa);
    display:flex;align-items:center;justify-content:center;
    font-weight:700;color:#fff;
}
.brand h1{
    font-size: 20px; margin:0; letter-spacing:.5px;
}

/* ====== Form ====== */
.form{
    display:flex; flex-direction:column; gap:14px;
}

.label{ font-size:13px; color: var(--muted); margin-bottom:4px; }

.input{
    width:100%;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid rgba(148,163,184,.25);
    background: transparent;
    color: var(--text);
    outline: none;
    transition: box-shadow .2s, border-color .2s, background .2s;
}
.input:focus{
    border-color: var(--primary);
    box-shadow: var(--ring);
    background: rgba(148,163,184,.06);
}

.row{
    display:flex; gap:10px;
}
.row .input{ flex:1; }

.btn{
    appearance:none; border:0; cursor:pointer;
    height:44px; border-radius:12px; padding:0 16px;
    background: var(--primary); color:#fff; font-weight:600;
    transition: transform .06s ease, background .2s ease, box-shadow .2s ease;
}
.btn:hover{ background: var(--primary-hover); }
.btn:active{ transform: translateY(1px); }

.btn-ghost{
    background: transparent; color: var(--primary);
}
.btn-ghost:hover{
    background: rgba(148,163,184,.12);
}

.helper{
    display:flex; justify-content:space-between; align-items:center;
    margin-top:6px; margin-bottom:2px; font-size:13px; color: var(--muted);
}

.link{
    color: var(--primary); text-decoration:none; font-weight:600;
}
.link:hover{ text-decoration:underline; }

.hr{
    height:1px; background: rgba(148,163,184,.18);
    margin: 18px 0 10px;
}

/* Error message */
.error{
    color: var(--error);
    font-size: 13px;
    margin-top: 4px;
}

/* Small footer */
.footer{
    text-align:center; margin-top:16px; color: var(--muted); font-size:13px;
}
