*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --bg: #0a0a0f;
    --surface: #13131f;
    --surface2: #1a1a2e;
    --border: rgba(255,255,255,0.07);
    --text: #e2e8f0;
    --muted: #64748b;
    --primary: #7c3aed;
    --primary-light: #a78bfa;
    --gradient: linear-gradient(135deg, #7c3aed, #0ea5e9);
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-x: hidden;
}

/* BG */
.auth-bg { position: fixed; inset: 0; pointer-events: none; z-index: 0; }
.orb {
    position: absolute; border-radius: 50%;
    filter: blur(80px); opacity: .3;
}
.orb-1 { width: 500px; height: 500px; background: #7c3aed; top: -150px; left: -150px; }
.orb-2 { width: 400px; height: 400px; background: #0ea5e9; bottom: -100px; right: -100px; }
.grid-overlay {
    position: absolute; inset: 0;
    background-image: linear-gradient(var(--border) 1px, transparent 1px),
                      linear-gradient(90deg, var(--border) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse at center, black 20%, transparent 75%);
}

/* BACK */
.back-home {
    position: fixed; top: 1.5rem; left: 1.5rem; z-index: 10;
    display: flex; align-items: center; gap: .4rem;
    color: var(--muted); text-decoration: none; font-size: .85rem;
    padding: .5rem .9rem; border-radius: 8px;
    border: 1px solid var(--border);
    background: rgba(255,255,255,.03);
    transition: color .2s, border-color .2s;
}
.back-home:hover { color: var(--text); border-color: rgba(124,58,237,.4); }

/* WRAPPER */
.auth-wrapper {
    position: relative; z-index: 1;
    width: 100%; max-width: 440px;
    padding: 1.5rem;
}

/* CARD */
.auth-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 30px 80px rgba(0,0,0,.5);
}

.auth-logo {
    font-size: 1.1rem; font-weight: 800;
    background: var(--gradient);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
    margin-bottom: 1.5rem;
}

.auth-card h1 {
    font-size: 1.6rem; font-weight: 800; margin-bottom: .4rem;
}

.auth-sub {
    color: var(--muted); font-size: .9rem; margin-bottom: 1.75rem;
}

/* ALERTS */
.alert {
    padding: .75rem 1rem; border-radius: 10px;
    font-size: .85rem; margin-bottom: 1.25rem;
}
.alert-success { background: rgba(16,185,129,.1); border: 1px solid rgba(16,185,129,.3); color: #10b981; }
.alert-error   { background: rgba(239,68,68,.1);  border: 1px solid rgba(239,68,68,.3);  color: #ef4444; }

/* FORM */
.auth-form { display: flex; flex-direction: column; gap: 1.1rem; }

.form-group { display: flex; flex-direction: column; gap: .4rem; }

.form-group label {
    font-size: .8rem; font-weight: 600; color: var(--text);
    display: flex; justify-content: space-between; align-items: center;
}
.label-link { color: var(--primary-light); text-decoration: none; font-weight: 400; font-size: .8rem; }
.label-link:hover { text-decoration: underline; }

.input-wrap {
    position: relative; display: flex; align-items: center;
}
.input-wrap svg {
    position: absolute; left: .9rem;
    stroke: var(--muted); pointer-events: none; flex-shrink: 0;
}
.input-wrap input {
    width: 100%;
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: .75rem .9rem .75rem 2.5rem;
    color: var(--text);
    font-size: .9rem;
    font-family: inherit;
    outline: none;
    transition: border-color .2s, box-shadow .2s;
}
.input-wrap input::placeholder { color: var(--muted); }
.input-wrap input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(124,58,237,.15);
}

/* PASSWORD STRENGTH */
.password-strength {
    height: 3px; background: var(--surface2);
    border-radius: 999px; overflow: hidden; margin-top: .4rem;
}
.strength-fill {
    height: 100%; width: 0;
    border-radius: 999px;
    transition: width .3s, background .3s;
}
.strength-label {
    font-size: .75rem; margin-top: .25rem;
    display: block; min-height: 1rem;
}

/* CHECKBOX */
.form-check {
    display: flex; align-items: flex-start; gap: .6rem;
    font-size: .82rem; color: var(--muted);
}
.form-check input[type="checkbox"] {
    width: 15px; height: 15px; margin-top: 2px;
    accent-color: var(--primary); flex-shrink: 0; cursor: pointer;
}
.form-check a { color: var(--primary-light); text-decoration: none; }
.form-check a:hover { text-decoration: underline; }

/* SUBMIT */
.btn-submit {
    width: 100%;
    background: var(--gradient);
    color: #fff; border: none; border-radius: 10px;
    padding: .85rem; font-size: .95rem; font-weight: 700;
    cursor: pointer; font-family: inherit;
    transition: opacity .2s, transform .15s;
    margin-top: .25rem;
}
.btn-submit:hover { opacity: .85; transform: translateY(-1px); }
.btn-submit:active { transform: translateY(0); }

/* DIVIDER */
.auth-divider {
    display: flex; align-items: center; gap: .75rem;
    margin: 1.5rem 0 1rem; color: var(--muted); font-size: .8rem;
}
.auth-divider::before, .auth-divider::after {
    content: ''; flex: 1; height: 1px; background: var(--border);
}

/* SWITCH */
.auth-switch {
    text-align: center; font-size: .85rem; color: var(--muted);
}
.auth-switch a {
    color: var(--primary-light); text-decoration: none; font-weight: 600;
}
.auth-switch a:hover { text-decoration: underline; }

/* RESPONSIVE */
@media (max-width: 480px) {
    .auth-card { padding: 1.75rem 1.25rem; }
}
