/* ════════════════════════════════════════════════════════════════
   Auth Pages — Modern (Login/Register/Forgot/Reset)
   Uses design-system tokens; preserves all class names + JS hooks
   ════════════════════════════════════════════════════════════════ */

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Inter', 'Cairo', sans-serif; }
body { min-height: 100vh; background: #f8fafc; display: flex; }

/* ── SIDE PANEL ─────────────────────────────────────────────────── */
.auth-side {
    width: 45%;
    min-height: 100vh;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px;
}
.auth-side::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(800px 400px at 90% 10%, rgba(255,255,255,.18), transparent 60%),
        radial-gradient(600px 300px at 0% 90%, rgba(255,255,255,.10), transparent 60%);
    pointer-events: none;
}
.auth-side::after {
    content: '';
    position: absolute;
    bottom: -40%;
    left: -30%;
    width: 80%;
    height: 80%;
    border-radius: 50%;
    background: rgba(255,255,255,.04);
}

.auth-side-content {
    position: relative;
    z-index: 1;
    color: #fff;
    max-width: 460px;
}
.auth-side-content h1 {
    font-size: clamp(24px, 3vw, 36px);
    font-weight: 800;
    margin-bottom: 14px;
    line-height: 1.3;
    letter-spacing: -.5px;
}
.auth-side-content p {
    font-size: 15px;
    opacity: .92;
    line-height: 1.85;
}

/* Login side — navy-dominant + dental image (matches site heroes) */
.auth-side--login {
    background:
        linear-gradient(104deg, rgba(0,30,50,.95) 0%, rgba(0,30,50,.82) 44%, rgba(88,32,54,.6) 100%),
        url('../images/hero-bg.jpg') center/cover no-repeat,
        #00263e;
}

/* Register side — navy-dominant + dental image */
.auth-side--register {
    background:
        linear-gradient(104deg, rgba(0,30,50,.95) 0%, rgba(0,30,50,.82) 44%, rgba(88,32,54,.6) 100%),
        url('../images/hero-bg-2.jpg') center/cover no-repeat,
        #00263e;
}

/* Feature list */
.auth-side-content .features { margin-top: 36px; list-style: none; padding: 0; }
.auth-side-content .features li {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
    font-size: 14.5px;
    font-weight: 500;
    color: rgba(255,255,255,.95);
}
.auth-side-content .features li i {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: rgba(255,255,255,.18);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,.25);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
    color: #fff;
}

/* Stats */
.auth-side-content .stats {
    display: flex;
    gap: 28px;
    margin-top: 40px;
    padding-top: 28px;
    border-top: 1px solid rgba(255,255,255,.20);
}
.auth-side-content .stats .stat-item { text-align: center; }
.auth-side-content .stats .stat-num {
    font-size: clamp(24px, 2.5vw, 32px);
    font-weight: 900;
    display: block;
    line-height: 1;
    color: #fff;
}
.auth-side-content .stats .stat-label {
    font-size: 12px;
    opacity: .80;
    margin-top: 6px;
    font-weight: 600;
}

/* ── MAIN CONTENT AREA ──────────────────────────────────────────── */
.auth-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}
.auth-box { width: 100%; max-width: 460px; }
.auth-box h2 {
    font-size: 26px;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 6px;
    letter-spacing: -.3px;
}
.auth-box .subtitle {
    font-size: 14px;
    color: #64748b;
    line-height: 1.6;
}

/* Login variant */
.auth-box--login .subtitle { margin-bottom: 28px; }
.auth-box--login .auth-logo { margin-bottom: 32px; }
.auth-box--login .auth-logo a {
    font-size: 22px;
    font-weight: 800;
    text-decoration: none;
    background: linear-gradient(135deg, #e94445 0%, #00263e 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* Register variant */
.auth-box--register .subtitle { margin-bottom: 24px; }
.auth-box--register .auth-logo { margin-bottom: 28px; }
.auth-box--register .auth-logo a {
    font-size: 22px;
    font-weight: 800;
    text-decoration: none;
    background: linear-gradient(135deg, #e94445 0%, #c62f30 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* ── FORM FIELDS ────────────────────────────────────────────────── */
.form-field { margin-bottom: 18px; }
.form-field label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: #334155;
    margin-bottom: 7px;
}
.form-field input {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    font-size: 14px;
    color: #0f172a;
    background: #fff;
    transition: all .2s cubic-bezier(.2,.7,.2,1);
    outline: none;
    font-family: inherit;
}
.form-field input::placeholder { color: #94a3b8; }
.form-field input:hover { border-color: #cbd5e1; }

.auth-box--register .form-field { margin-bottom: 16px; }

/* Login focus — indigo */
.auth-box--login .form-field input:focus,
body.auth-centered .box .field input:focus,
.auth-box .form-field input:focus {
    border-color: #e94445;
    box-shadow: 0 0 0 4px rgba(62, 100, 222,.12);
}

/* Register focus — emerald */
.auth-box--register .form-field input:focus {
    border-color: #e94445;
    box-shadow: 0 0 0 4px rgba(5,150,105,.12);
}

.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* Login remember-me / forgot row */
.form-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 10px;
}
.form-check {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #475569;
    cursor: pointer;
    font-weight: 500;
}
.form-check input[type=checkbox] {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    accent-color: #e94445;
    cursor: pointer;
}

/* Password toggle */
.password-wrapper { position: relative; }
.password-wrapper input { padding-inline-start: 44px; }
.toggle-pw {
    position: absolute;
    inset-inline-start: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 4px;
    font-size: 16px;
    transition: color .15s;
}
.toggle-pw:hover { color: #e94445; }
.auth-box--register .toggle-pw:hover { color: #e94445; }

/* ── SUBMIT BUTTON ──────────────────────────────────────────────── */
.btn-submit {
    width: 100%;
    padding: 13px;
    border: none;
    border-radius: 12px;
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all .25s cubic-bezier(.2,.7,.2,1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: inherit;
    letter-spacing: .2px;
}

.auth-box--login .btn-submit {
    background: linear-gradient(135deg, #e94445 0%, #00263e 100%);
    box-shadow: 0 4px 14px rgba(62, 100, 222,.25);
}
.auth-box--login .btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(62, 100, 222,.40);
}

.auth-box--register .btn-submit {
    background: linear-gradient(135deg, #e94445 0%, #c62f30 100%);
    margin-top: 6px;
    box-shadow: 0 4px 14px rgba(5,150,105,.25);
}
.auth-box--register .btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(5,150,105,.40);
}

/* ── DIVIDER ────────────────────────────────────────────────────── */
.auth-divider {
    text-align: center;
    margin: 24px 0;
    position: relative;
    font-size: 12px;
    color: #94a3b8;
    font-weight: 600;
}
.auth-divider::before, .auth-divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 40%;
    height: 1px;
    background: #e2e8f0;
}
.auth-divider::before { inset-inline-end: 0; }
.auth-divider::after { inset-inline-start: 0; }

/* ── AUTH SWITCH ────────────────────────────────────────────────── */
.auth-switch {
    text-align: center;
    font-size: 14px;
    color: #64748b;
    margin-top: 22px;
}
.auth-box--login .auth-switch a { color: #e94445; font-weight: 700; text-decoration: none; }
.auth-box--register .auth-switch a { color: #e94445; font-weight: 700; text-decoration: none; }
.auth-switch a:hover { text-decoration: underline; }

/* ── ALERTS ─────────────────────────────────────────────────────── */
.alert {
    padding: 12px 16px;
    border-radius: 12px;
    margin-bottom: 18px;
    font-size: 13.5px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}
.alert-danger {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}
.alert-success {
    background: #f0fdf4;
    color: #e94445;
    border: 1px solid #bbf7d0;
}
.alert-warning {
    background: #fffbeb;
    color: #b45309;
    border: 1px solid #fde68a;
}
.alert-info {
    background: #eff6ff;
    color: #2563eb;
    border: 1px solid #bfdbfe;
}

/* Terms */
.terms {
    font-size: 12px;
    color: #94a3b8;
    text-align: center;
    margin-top: 18px;
    line-height: 1.7;
}
.terms a { color: #e94445; text-decoration: none; font-weight: 600; }
.terms a:hover { text-decoration: underline; }

/* ── RESPONSIVE ─────────────────────────────────────────────────── */
@media (max-width: 991px) {
    .auth-side { display: none; }
    .auth-main { padding: 24px 20px; }
}
@media (max-width: 575px) {
    .auth-main { padding: 20px 16px; }
    .auth-box h2 { font-size: 22px; }
}

/* ════════════════════════════════════════════════════════════════
   Forgot Password & Reset Password (centered-box pages)
   ════════════════════════════════════════════════════════════════ */

body.auth-centered {
    align-items: center;
    justify-content: center;
    padding: 24px;
    background:
        radial-gradient(800px 400px at 90% 10%, rgba(124,58,237,.10), transparent 60%),
        radial-gradient(600px 300px at 0% 90%, rgba(62, 100, 222,.08), transparent 60%),
        linear-gradient(135deg, #f8fafc 0%, #fdecec 100%);
}

.box {
    width: 100%;
    max-width: 460px;
    background: #fff;
    border-radius: 20px;
    padding: 40px;
    box-shadow:
        0 1px 2px rgba(15,23,42,.04),
        0 12px 32px rgba(15,23,42,.08);
    border: 1px solid rgba(15,23,42,.06);
    position: relative;
    overflow: hidden;
}
.box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #e94445 0%, #00263e 100%);
}
.box .logo {
    text-align: center;
    margin-bottom: 28px;
}
.box .logo a {
    font-size: 22px;
    font-weight: 800;
    text-decoration: none;
    background: linear-gradient(135deg, #e94445 0%, #00263e 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.box .logo img { max-height: 44px; display: inline-block; }

.box h2 {
    font-size: 22px;
    font-weight: 800;
    color: #0f172a;
    text-align: center;
    letter-spacing: -.2px;
}
.box h2.mb-sm { margin-bottom: 6px; }
.box h2.mb-md { margin-bottom: 22px; }

.box .sub {
    font-size: 14px;
    color: #64748b;
    text-align: center;
    margin-bottom: 26px;
    line-height: 1.7;
}

.box .field { margin-bottom: 18px; }
.box .field label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: #334155;
    margin-bottom: 7px;
}
.box .field input {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    font-size: 14px;
    outline: none;
    transition: all .2s;
    font-family: inherit;
    color: #0f172a;
    background: #fff;
}
.box .field input:hover { border-color: #cbd5e1; }
.box .field input::placeholder { color: #94a3b8; }

.btn-main {
    width: 100%;
    padding: 13px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #e94445 0%, #00263e 100%);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all .25s cubic-bezier(.2,.7,.2,1);
    box-shadow: 0 4px 14px rgba(62, 100, 222,.25);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: inherit;
}
.btn-main:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(62, 100, 222,.40);
}

.box .back {
    text-align: center;
    margin-top: 22px;
    font-size: 13px;
    color: #64748b;
}
.box .back a {
    color: #e94445;
    text-decoration: none;
    font-weight: 700;
}
.box .back a:hover { text-decoration: underline; }

@media (max-width: 575px) {
    .box { padding: 30px 22px; }
}
