/* =========================================================
   ABFverify — Forgot Password
   Split brand/content layout, dark default + light theme
   Uses the same CSS variable system as the dashboard
========================================================= */

/* =========================
   THEME VARIABLES
========================= */

:root {
    --brand:        #3b82f6;
    --brand-soft:   rgba(59, 130, 246, .12);
    --brand-border: rgba(59, 130, 246, .35);
    --radius:       14px;
    --shadow-sm:    0 4px 14px rgba(2, 6, 17, .28);
    --shadow:       0 14px 34px rgba(2, 6, 17, .4);
}

/* DARK (default — matches body.dark) */
body,
:root {
    --bg:          #0a0f1e;
    --card:        #101828;
    --card-2:      #16213a;
    --border:      rgba(148, 163, 184, .14);
    --border-soft: rgba(148, 163, 184, .09);
    --text:        #e5e7eb;
    --muted:       #94a3b8;
}

/* LIGHT (body.light) + pre-paint class */
body.light,
html.pre-light {
    --bg:          #f1f5f9;
    --card:        #ffffff;
    --card-2:      #f8fafc;
    --border:      #e2e8f0;
    --border-soft: #eef2f7;
    --text:        #0f172a;
    --muted:       #64748b;
    --shadow-sm:   0 4px 14px rgba(15, 23, 42, .07);
    --shadow:      0 14px 34px rgba(15, 23, 42, .1);
}

/* =========================
   BASE
========================= */

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

html {
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    transition: background .3s ease, color .3s ease;
}

button {
    font-family: inherit;
}

a {
    font-family: inherit;
}

/* =========================
   LAYOUT
========================= */

.forgot-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
    max-width: 980px;
    min-height: 620px;
    border-radius: 22px;
    overflow: hidden;
    background: var(--card);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    animation: fpFadeUp .5s ease both;
}

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

/* =========================
   BRAND SIDE
========================= */

.forgot-brand {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 40px;
    color: #ffffff;
    background: linear-gradient(150deg, #1d4ed8 0%, #2563eb 45%, #7c3aed 100%);
}

.forgot-brand::before,
.forgot-brand::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.forgot-brand::before {
    width: 280px;
    height: 280px;
    right: -90px;
    top: -90px;
    background: radial-gradient(circle, rgba(255, 255, 255, .18), transparent 70%);
}

.forgot-brand::after {
    width: 220px;
    height: 220px;
    left: -70px;
    bottom: -70px;
    background: radial-gradient(circle, rgba(255, 255, 255, .12), transparent 70%);
}

.brand-content {
    position: relative;
    z-index: 1;
    text-align: center;
}

.forgot-logo img {
    width: 84px;
    height: 84px;
    object-fit: contain;
    margin-bottom: 18px;
    filter: drop-shadow(0 10px 20px rgba(2, 6, 17, .3));
}

.forgot-brand h1 {
    font-size: 30px;
    font-weight: 800;
    letter-spacing: -.6px;
    margin-bottom: 12px;
}

.forgot-brand p {
    font-size: 14.5px;
    line-height: 1.7;
    color: rgba(255, 255, 255, .82);
    max-width: 320px;
    margin: 0 auto;
}

/* =========================
   CONTENT SIDE
========================= */

.forgot-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 44px 44px 30px;
    background: var(--card);
}

.page-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    color: var(--brand);
    margin-bottom: 10px;
}

.forgot-card h2 {
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -.4px;
    margin-bottom: 10px;
}

.forgot-subtext {
    font-size: 13.5px;
    line-height: 1.65;
    color: var(--muted);
    margin-bottom: 22px;
}

/* =========================
   ALERTS
========================= */

.alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.5;
    margin-bottom: 18px;
}

.alert i {
    margin-top: 1px;
    font-size: 14px;
}

.alert-error {
    color: #ef4444;
    background: rgba(239, 68, 68, .1);
    border: 1px solid rgba(239, 68, 68, .28);
}

.alert-success {
    color: #22c55e;
    background: rgba(34, 197, 94, .1);
    border: 1px solid rgba(34, 197, 94, .28);
}

body.light .alert-error {
    color: #b91c1c;
    background: #fef2f2;
    border-color: #fecaca;
}

body.light .alert-success {
    color: #15803d;
    background: #f0fdf4;
    border-color: #bbf7d0;
}

/* =========================
   FORM
========================= */

.input-group {
    margin-bottom: 18px;
}

.input-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 7px;
}

.input-box {
    position: relative;
    display: flex;
    align-items: center;
}

.input-box i {
    position: absolute;
    left: 15px;
    font-size: 14px;
    color: var(--muted);
    pointer-events: none;
    transition: color .2s ease;
}

.input-box input {
    width: 100%;
    padding: 13px 14px 13px 42px;
    font-size: 14px;
    font-family: inherit;
    color: var(--text);
    background: var(--card-2);
    border: 1px solid var(--border);
    border-radius: 12px;
    outline: none;
    transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

.input-box input::placeholder {
    color: var(--muted);
    opacity: .7;
}

.input-box input:focus {
    border-color: var(--brand-border);
    box-shadow: 0 0 0 4px var(--brand-soft);
    background: var(--card);
}

.input-box input:focus + i,
.input-box:focus-within i {
    color: var(--brand);
}

/* =========================
   SUBMIT BUTTON
========================= */

.login-btn {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 14px 18px;
    border: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 700;
    color: #ffffff;
    cursor: pointer;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    box-shadow: 0 8px 18px rgba(37, 99, 235, .32);
    transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
}

.login-btn i {
    font-size: 13px;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(37, 99, 235, .42);
    filter: brightness(1.06);
}

.login-btn:active {
    transform: translateY(0);
}

/* =========================
   NOTICE
========================= */

.notice {
    display: flex;
    gap: 12px;
    padding: 14px 16px;
    margin-top: 20px;
    border-radius: 12px;
    background: var(--card-2);
    border: 1px solid var(--border);
}

.notice-icon {
    width: 34px;
    height: 34px;
    min-width: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    font-size: 14px;
    color: var(--brand);
    background: var(--brand-soft);
}

.notice-content {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.notice-content strong {
    font-size: 13px;
    font-weight: 600;
}

.notice-content span {
    font-size: 12.5px;
    line-height: 1.6;
    color: var(--muted);
}

/* =========================
   BACK LINK + FOOTER
========================= */

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 20px;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--brand);
    text-decoration: none;
    transition: gap .2s ease;
}

.back-link:hover {
    gap: 11px;
    text-decoration: underline;
}

.security-footer {
    margin-top: auto;
    padding-top: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    font-size: 12px;
    color: var(--muted);
}

.security-footer i {
    font-size: 11px;
}

/* =========================
   THEME TOGGLE
========================= */

.fp-theme-toggle {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 50;
    width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    border-radius: 50%;
    font-size: 16px;
    color: var(--text);
    background: var(--card);
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: transform .2s ease, color .2s ease, border-color .2s ease,
                box-shadow .2s ease, background .3s ease;
}

.fp-theme-toggle:hover {
    transform: translateY(-3px);
    color: var(--brand);
    border-color: var(--brand-border);
    box-shadow: var(--shadow);
}

/* =========================
   RESPONSIVE
========================= */

@media (max-width: 860px) {

    .forgot-wrapper {
        grid-template-columns: 1fr;
        max-width: 480px;
        min-height: auto;
    }

    .forgot-brand {
        padding: 34px 28px;
    }

    .forgot-logo img {
        width: 64px;
        height: 64px;
        margin-bottom: 12px;
    }

    .forgot-brand h1 {
        font-size: 24px;
    }

    .forgot-brand p {
        font-size: 13.5px;
    }

    .forgot-card {
        padding: 32px 26px 24px;
    }
}

@media (max-width: 480px) {

    body {
        padding: 14px;
    }

    .forgot-card h2 {
        font-size: 22px;
    }

    .forgot-card {
        padding: 26px 20px 20px;
    }

    .fp-theme-toggle {
        right: 16px;
        bottom: 16px;
        width: 42px;
        height: 42px;
    }
}