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

html, body { height: 100%; }

body {
    font-family: 'Inter', sans-serif;
    background: #09090b;
    color: #e4e4e7;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed; inset: 0;
    background:
        radial-gradient(ellipse 80% 60% at 50% -10%, rgba(139,92,246,0.18) 0%, transparent 70%),
        radial-gradient(ellipse 50% 40% at 80% 80%, rgba(139,92,246,0.08) 0%, transparent 60%);
    pointer-events: none;
}
body::after {
    content: '';
    position: fixed; inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
    background-size: 48px 48px;
    pointer-events: none;
}

.page-main {
    flex: 1;
    display: flex; align-items: center; justify-content: center;
    padding: 2rem 1rem;
    position: relative; z-index: 1;
}

.auth-wrapper {
    width: 100%;
    max-width: 420px;
    animation: fadeUp 0.45s ease both;
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Brand */
.brand {
    display: flex; align-items: center; justify-content: center;
    gap: 0.6rem; margin-bottom: 2rem; text-decoration: none;
}
.brand svg { width: 28px; height: 28px; stroke: #8b5cf6; }
.brand-text { font-size: 1.2rem; font-weight: 700; color: #e4e4e7; letter-spacing: -0.02em; }

/* Card */
.auth-card {
    background: #111113; border: 1px solid #27272a;
    border-radius: 16px; padding: 2rem;
    box-shadow: 0 24px 64px rgba(0,0,0,0.5);
}
.auth-card h1 { font-size: 1.5rem; font-weight: 700; color: #f4f4f5; letter-spacing: -0.02em; margin-bottom: 0.4rem; }
.auth-card .subtitle { font-size: 0.875rem; color: #71717a; margin-bottom: 1.75rem; }

/* Fields */
.field { margin-bottom: 1.1rem; }
.field label {
    display: block; font-size: 0.8rem; font-weight: 500; color: #a1a1aa;
    margin-bottom: 0.45rem; letter-spacing: 0.02em; text-transform: uppercase;
}
.field input {
    width: 100%; padding: 0.75rem 1rem;
    background: #18181b; border: 1px solid #27272a; border-radius: 8px;
    color: #e4e4e7; font-size: 0.95rem; font-family: inherit;
    outline: none; transition: border-color 0.2s, box-shadow 0.2s;
    -webkit-appearance: none; min-height: 44px;
}
.field input:focus { border-color: #8b5cf6; box-shadow: 0 0 0 3px rgba(139,92,246,0.15); }
.field input::placeholder { color: #52525b; }

.field-row {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 0.45rem; flex-wrap: wrap; gap: 0.25rem;
}
.field-row label { margin-bottom: 0; }
.forgot-link {
    font-size: 0.78rem; color: #8b5cf6; text-decoration: none;
    font-weight: 500; transition: color 0.2s; min-height: 32px;
    display: inline-flex; align-items: center;
}
.forgot-link:hover { color: #a78bfa; text-decoration: underline; }

/* Error / Timeout banners */
.error-msg {
    display: none; padding: 0.7rem 1rem;
    background: rgba(239,68,68,0.1); border: 1px solid rgba(239,68,68,0.35);
    border-radius: 8px; color: #f87171; font-size: 0.875rem; margin-bottom: 1.1rem;
}
.timeout-banner {
    display: none; padding: 0.7rem 1rem;
    background: rgba(245,158,11,0.1); border: 1px solid rgba(245,158,11,0.35);
    border-radius: 8px; color: #fbbf24; font-size: 0.875rem; margin-bottom: 1.1rem;
}

/* Submit button */
.btn-submit-l {
    width: 100%; padding: 0.8rem;
    background: #8b5cf6; color: #fff;
    display: flex; align-items: center; justify-content: center; gap: 0.5rem;
    border-radius: 8px; font-size: 0.95rem; font-weight: 600;
    font-family: inherit; cursor: pointer; border: none;
    transition: background 0.2s, transform 0.1s, box-shadow 0.2s;
    margin-top: 1.5rem; min-height: 46px;
}
.btn-submit-l:hover  { background: #7c3aed; box-shadow: 0 4px 20px rgba(139,92,246,0.35); }
.btn-submit-l:active { transform: scale(0.98); }
.btn-submit-l:disabled { opacity: 0.6; cursor: not-allowed; }
.btn-submit-l .spinner {
    display: none; width: 16px; height: 16px;
    border: 2px solid rgba(255,255,255,0.3); border-top-color: #fff;
    border-radius: 50%; animation: spin 0.7s linear infinite; flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Divider */
.divider {
    display: flex; align-items: center; gap: 0.75rem;
    margin: 1.5rem 0; color: #3f3f46; font-size: 0.8rem;
}
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: #27272a; }

/* Footer row */
.auth-footer { text-align: center; font-size: 0.875rem; color: #71717a; }
.auth-footer a { color: #8b5cf6; text-decoration: none; font-weight: 500; transition: color 0.2s; }
.auth-footer a:hover { color: #a78bfa; text-decoration: underline; }

.back-home {
    display: flex; align-items: center; justify-content: center; gap: 0.4rem;
    margin-top: 1.5rem; font-size: 0.8rem; color: #52525b;
    text-decoration: none; transition: color 0.2s; min-height: 36px;
}
.back-home:hover { color: #a1a1aa; }
.back-home svg { width: 14px; height: 14px; }

/* Footer nav */
.footer-container { display: flex; justify-content: center; }
.footer-nav-links {
    list-style: none; display: flex; flex-wrap: wrap;
    gap: 0.4rem 1rem; padding: 0; margin: 0; justify-content: center;
}
.footer-nav-links li { display: inline; }
.footer-nav-links a {
    text-decoration: none; color: #71717a; font-size: 0.82rem;
    font-weight: 500; min-height: 32px; display: inline-flex; align-items: center;
    transition: color 0.2s;
}
.footer-nav-links a:hover { text-decoration: underline; color: #a1a1aa; }

/* ============================================
   RESPONSIVE — Mobile (max-width: 480px)
   ============================================ */
@media (max-width: 480px) {
    .page-main { padding: 1.5rem 0.75rem; align-items: flex-start; padding-top: 2rem; }
    .auth-card { padding: 1.5rem; }
    .auth-card h1 { font-size: 1.35rem; }
    .footer-nav-links { gap: 0.35rem 0.75rem; font-size: 0.78rem; }
}

/* Appended from inline styles */

:root{--bg:#080910;--bg2:#0d0e18;--bg3:#111220;--border:#1c1e30;--border2:#252840;--text:#e6e8f2;--muted:#6b7091;--muted2:#9296b5;--purple:#8b5cf6;--purple-d:#7c3aed;--green:#10b981;--red:#ef4444;--gold:#f0b429;--sora:'Sora',sans-serif;}
*{margin:0;padding:0;box-sizing:border-box;}
html,body{height:100%;}
body{font-family:var(--sora);background:var(--bg);color:var(--text);display:flex;flex-direction:column;min-height:100vh;}
@keyframes fadeUp{from{opacity:0;transform:translateY(12px)}to{opacity:1;transform:translateY(0)}}

/* bg */
.auth-bg{position:fixed;inset:0;pointer-events:none;z-index:0;background:radial-gradient(ellipse 800px 500px at 50% -10%,rgba(139,92,246,.1) 0%,transparent 60%);}

/* main */
.auth-main{flex:1;display:flex;align-items:center;justify-content:center;padding:32px 16px;position:relative;z-index:1;animation:fadeUp .45s ease both;}

/* card */
.auth-card{width:100%;max-width:400px;}

/* brand */
.auth-brand{display:flex;align-items:center;gap:8px;margin-bottom:32px;text-decoration:none;}
.auth-brand-icon{width:32px;height:32px;background:linear-gradient(135deg,#7c3aed,#8b5cf6);border-radius:9px;display:flex;align-items:center;justify-content:center;}
.auth-brand-icon svg{stroke:#fff;width:18px;height:18px;}
.auth-brand-name{font-size:16px;font-weight:800;color:var(--text);}
.auth-brand-tag{font-size:9px;font-weight:800;background:linear-gradient(135deg,#8b5cf6,#06b6d4);color:#fff;padding:1px 6px;border-radius:4px;}

/* box */
.auth-box{background:var(--bg2);border:1px solid var(--border);border-radius:16px;padding:32px;}

h1{font-size:1.5rem;font-weight:800;color:var(--text);margin-bottom:6px;}
.auth-sub{font-size:13px;color:var(--muted);margin-bottom:24px;}

/* banners */
.banner{padding:12px 14px;border-radius:8px;font-size:12px;line-height:1.6;margin-bottom:16px;display:none;}
.banner-warn{background:rgba(245,158,11,.08);border:1px solid rgba(245,158,11,.3);color:var(--gold);}
.banner-ok{background:rgba(16,185,129,.08);border:1px solid rgba(16,185,129,.3);color:var(--green);}
.banner-err{background:rgba(239,68,68,.08);border:1px solid rgba(239,68,68,.3);color:var(--red);}
.banner-visible{display:block;}

/* fields */
.field{margin-bottom:16px;}
.field-row{display:flex;justify-content:space-between;align-items:center;margin-bottom:7px;}
.field label{display:block;font-size:12px;font-weight:700;color:var(--muted2);letter-spacing:.04em;}
.field input{width:100%;background:var(--bg3);border:1px solid var(--border2);border-radius:8px;padding:11px 14px;font-family:var(--sora);font-size:14px;color:var(--text);outline:none;transition:border-color .2s;}
.field input:focus{border-color:var(--purple);}
.field input::placeholder{color:var(--muted);}
.forgot{font-size:11px;color:var(--muted);text-decoration:none;transition:color .15s;}
.forgot:hover{color:var(--purple);}

/* submit */
.btn-submit{width:100%;padding:13px;background:linear-gradient(135deg,var(--purple-d),var(--purple));color:#fff;border:none;border-radius:8px;font-family:var(--sora);font-size:14px;font-weight:700;cursor:pointer;transition:transform .2s,box-shadow .2s;display:flex;align-items:center;justify-content:center;gap:8px;box-shadow:0 4px 16px rgba(139,92,246,.3);}
.btn-submit:hover:not(:disabled){transform:translateY(-1px);box-shadow:0 6px 24px rgba(139,92,246,.45);}
.btn-submit:disabled{opacity:.6;cursor:not-allowed;}
.spinner{width:16px;height:16px;border:2px solid rgba(255,255,255,.3);border-top-color:#fff;border-radius:50%;animation:spin .7s linear infinite;display:none;}
@keyframes spin{to{transform:rotate(360deg)}}

/* divider */
.divider{display:flex;align-items:center;gap:12px;margin:20px 0;color:var(--muted);font-size:11px;font-weight:600;letter-spacing:.06em;text-transform:uppercase;}
.divider::before,.divider::after{content:'';flex:1;height:1px;background:var(--border);}

/* social */
.btn-social{display:flex;align-items:center;justify-content:center;gap:10px;width:100%;padding:11px;background:var(--bg3);border:1px solid var(--border2);border-radius:8px;color:var(--text);font-family:var(--sora);font-size:13px;font-weight:600;text-decoration:none;transition:border-color .2s,background .2s;}
.btn-social:hover{background:#161827;border-color:#3b4063;}

/* footer */
.auth-footer-link{text-align:center;margin-top:20px;font-size:13px;color:var(--muted);}
.auth-footer-link a{color:var(--purple);font-weight:600;text-decoration:none;}
.auth-footer-link a:hover{color:#a78bfa;}
.back-home{display:flex;align-items:center;justify-content:center;gap:5px;margin-top:16px;font-size:12px;color:var(--muted);text-decoration:none;transition:color .15s;}
.back-home:hover{color:var(--text);}
