﻿/* ═══════════════════════════════════════════════════════════════
   Login.css
   Styles for SVCDispatch\Account\Login.aspx
   ═══════════════════════════════════════════════════════════════ */

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --white: #FFFFFF;
    --off: #F7F8FC;
    --off2: #EEF0F7;
    --ink: #0A0E1A;
    --body: #4A5270;
    --muted: #8892AA;
    --border: #E2E6F0;
    --border2: #CDD3E5;
    --blue: #2563EB;
    --blue2: #1D4ED8;
    --blue-lt: #EEF3FD;
    --green: #059669;
    --green-lt: #D1FAE5;
    --green2: #10B981;
    --red: #DC2626;
    --red-lt: #FEE2E2;
    --amber: #F59E0B;
    --amber-lt: #FEF3C7;
    --shadow-sm: 0 1px 3px rgba(10,14,26,0.06), 0 1px 2px rgba(10,14,26,0.04);
    --shadow: 0 4px 16px rgba(10,14,26,0.08), 0 2px 4px rgba(10,14,26,0.04);
    --shadow-lg: 0 12px 40px rgba(10,14,26,0.1);
    --shadow-xl: 0 24px 64px rgba(10,14,26,0.14);
    --blue-glow: 0 8px 28px rgba(37,99,235,0.28);
    --green-glow: 0 8px 28px rgba(5,150,105,0.28);
    --font-h: 'Fraunces', serif;
    --font-b: 'Plus Jakarta Sans', sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-b);
    background: var(--ink);
    color: var(--ink);
    min-height: 100vh;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}

/* ── BACK LINK ────────────────────────────────────────────────── */
.back-link {
    position: fixed;
    top: 1.25rem;
    left: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: rgba(255,255,255,0.5);
    text-decoration: none;
    z-index: 10;
    transition: color 0.2s;
}

    .back-link:hover {
        color: var(--white);
    }

/* ── SPLIT LAYOUT ─────────────────────────────────────────────── */
.auth-wrap {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 100vh;
}

/* ── LEFT BRAND PANEL ─────────────────────────────────────────── */
.auth-brand {
    background: linear-gradient(160deg, #0D1728 0%, #0A1D15 55%, #0D1A2E 100%);
    padding: 3rem;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.ab-grid {
    position: absolute;
    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: 44px 44px;
}

.ab-glow-a {
    position: absolute;
    width: 500px;
    height: 400px;
    background: radial-gradient(ellipse, rgba(37,99,235,0.18) 0%, transparent 70%);
    top: -100px;
    left: -100px;
    pointer-events: none;
}

.ab-glow-b {
    position: absolute;
    width: 400px;
    height: 300px;
    background: radial-gradient(ellipse, rgba(5,150,105,0.15) 0%, transparent 70%);
    bottom: -80px;
    right: -60px;
    pointer-events: none;
}

.ab-inner {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Brand logo */
.ab-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    margin-bottom: auto;
}

.ab-logo-icon {
    width: 36px;
    height: 36px;
    background: var(--blue);
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.ab-logo-text {
    font-family: var(--font-b);
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--white);
    letter-spacing: -0.5px;
}

    .ab-logo-text span {
        color: var(--green2);
    }

/* Center brand content */
.ab-center {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 2rem 0;
}

.ab-eyebrow {
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: rgba(255,255,255,0.35);
    margin-bottom: 0.85rem;
}

.ab-headline {
    font-family: var(--font-h);
    font-size: clamp(1.9rem, 3.5vw, 2.8rem);
    font-weight: 700;
    color: var(--white);
    letter-spacing: -1px;
    line-height: 1.1;
    margin-bottom: 1rem;
}

    .ab-headline em {
        font-style: italic;
        color: var(--green2);
    }

.ab-sub {
    font-size: 0.92rem;
    color: rgba(255,255,255,0.5);
    line-height: 1.75;
    max-width: 380px;
    margin-bottom: 2.5rem;
}

/* Trust bullets */
.ab-bullets {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.ab-bullet {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.ab-bullet-icon {
    width: 32px;
    height: 32px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.abi-b {
    background: rgba(37,99,235,0.2);
    border: 1px solid rgba(37,99,235,0.3);
}

.abi-g {
    background: rgba(5,150,105,0.2);
    border: 1px solid rgba(5,150,105,0.3);
}

.abi-a {
    background: rgba(245,158,11,0.15);
    border: 1px solid rgba(245,158,11,0.25);
}

.ab-bullet-text {
    font-size: 0.83rem;
    color: rgba(255,255,255,0.6);
    font-weight: 500;
}

    .ab-bullet-text strong {
        color: rgba(255,255,255,0.85);
        font-weight: 700;
    }

/* Testimonial */
.ab-testimonial {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 16px;
    padding: 1.1rem;
    margin-top: auto;
}

.ab-t-text {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.55);
    font-style: italic;
    line-height: 1.7;
    margin-bottom: 0.65rem;
}

.ab-t-author {
    display: flex;
    align-items: center;
    gap: 0.55rem;
}

.ab-t-ava {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255,255,255,0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
}

.ab-t-name {
    font-size: 0.75rem;
    font-weight: 700;
    color: rgba(255,255,255,0.55);
}

.ab-t-role {
    font-size: 0.68rem;
    color: rgba(255,255,255,0.3);
}

/* ── RIGHT FORM PANEL ─────────────────────────────────────────── */
.auth-form-panel {
    background: var(--off);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2.5rem;
}

.auth-box {
    background: var(--white);
    border: 1.5px solid var(--border);
    border-radius: 24px;
    padding: 2.5rem;
    width: 100%;
    max-width: 440px;
    box-shadow: var(--shadow-xl);
    animation: slideIn 0.4s cubic-bezier(0.34,1.2,0.64,1) both;
}

/* ── AUTH HEADER ──────────────────────────────────────────────── */
.auth-header {
    margin-bottom: 2rem;
    text-align: center;
}

.auth-icon {
    width: 60px;
    height: 60px;
    border-radius: 17px;
    margin: 0 auto 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
}

.ai-login {
    background: var(--blue-lt);
    border: 1.5px solid rgba(37,99,235,0.2);
}

.ai-register {
    background: var(--green-lt);
    border: 1.5px solid rgba(5,150,105,0.2);
}

.ai-forgot {
    background: var(--amber-lt);
    border: 1.5px solid rgba(245,158,11,0.25);
}

.auth-title {
    font-family: var(--font-h);
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--ink);
    letter-spacing: -0.5px;
    margin-bottom: 0.3rem;
}

.auth-sub {
    font-size: 0.84rem;
    color: var(--muted);
}

    .auth-sub a {
        color: var(--blue);
        font-weight: 700;
        text-decoration: none;
    }

        .auth-sub a:hover {
            color: var(--blue2);
        }

/* ── SCREEN SWITCHER ──────────────────────────────────────────── */
.screen {
    display: none;
}

    .screen.active {
        display: block;
        animation: fadeIn 0.3s ease;
    }

/* ── FORM FIELDS ──────────────────────────────────────────────── */
.fg {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-bottom: 0.9rem;
}

.fl {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--ink);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.fl-link {
    font-size: 0.73rem;
    font-weight: 600;
    color: var(--blue);
    text-decoration: none;
    transition: color 0.2s;
}

    .fl-link:hover {
        color: var(--blue2);
    }

.fi {
    font-family: var(--font-b);
    font-size: 0.9rem;
    color: var(--ink);
    background: var(--white);
    border: 1.5px solid var(--border2);
    border-radius: 11px;
    padding: 0.68rem 1rem;
    outline: none;
    transition: all 0.2s;
    width: 100%;
}

    .fi:focus {
        border-color: var(--blue);
        box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
    }

    .fi::placeholder {
        color: var(--muted);
    }

    .fi.error {
        border-color: var(--red);
        box-shadow: 0 0 0 3px rgba(220,38,38,0.08);
    }

/* Input with icon */
.fi-wrap {
    position: relative;
}

    .fi-wrap .fi {
        padding-right: 2.75rem;
    }

.fi-eye {
    position: absolute;
    right: 0.85rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    color: var(--muted);
    padding: 0;
    line-height: 1;
    transition: color 0.2s;
}

    .fi-eye:hover {
        color: var(--ink);
    }

.fi-icon-left {
    position: absolute;
    left: 0.9rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.9rem;
    pointer-events: none;
}

.fi-wrap .fi.with-icon {
    padding-left: 2.5rem;
}

.fr2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

/* ── ROLE SELECTOR ────────────────────────────────────────────── */
.role-selector {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.6rem;
    margin-bottom: 1rem;
}

.rs-opt {
    border: 1.5px solid var(--border);
    border-radius: 13px;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

    .rs-opt:hover {
        border-color: var(--border2);
    }

    .rs-opt.selected {
        border-color: var(--blue);
        background: var(--blue-lt);
    }

        .rs-opt.selected.green {
            border-color: var(--green);
            background: var(--green-lt);
        }

.rs-icon {
    font-size: 1.75rem;
    margin-bottom: 0.35rem;
    display: block;
}

.rs-title {
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--ink);
}

.rs-sub {
    font-size: 0.7rem;
    color: var(--muted);
    margin-top: 0.15rem;
    line-height: 1.4;
}

.rs-opt.selected .rs-sub {
    color: var(--blue2);
}

.rs-opt.selected.green .rs-sub {
    color: var(--green);
}

/* ── PASSWORD STRENGTH ────────────────────────────────────────── */
.pwd-strength {
    margin-top: 0.35rem;
}

.ps-bar {
    display: flex;
    gap: 3px;
    margin-bottom: 0.3rem;
}

.ps-seg {
    flex: 1;
    height: 3px;
    border-radius: 2px;
    background: var(--border);
    transition: background 0.3s;
}

.ps-label {
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--muted);
}

/* ── PRO NOTE ─────────────────────────────────────────────────── */
.pro-note {
    background: var(--green-lt);
    border: 1.5px solid rgba(5,150,105,0.2);
    border-radius: 10px;
    padding: 0.65rem 0.85rem;
    font-size: 0.78rem;
    color: #065F46;
    margin-bottom: 0.85rem;
    line-height: 1.6;
    display: none;
}

    .pro-note.show {
        display: block;
    }

/* ── AGREE ROW (checkbox) ─────────────────────────────────────── */
.agree-row {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    cursor: pointer;
    margin-bottom: 0.9rem;
}

.agree-box {
    width: 18px;
    height: 18px;
    border-radius: 5px;
    border: 1.5px solid var(--border2);
    background: var(--white);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    margin-top: 0.1rem;
    transition: all 0.15s;
    cursor: pointer;
}

.agree-row.checked .agree-box {
    background: var(--blue);
    border-color: var(--blue);
    color: var(--white);
}

.agree-text {
    font-size: 0.78rem;
    color: var(--body);
    line-height: 1.55;
}

    .agree-text a {
        color: var(--blue);
        font-weight: 700;
        text-decoration: none;
    }

/* ── SUBMIT BUTTON ────────────────────────────────────────────── */
.submit-btn {
    width: 100%;
    padding: 0.9rem;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-family: var(--font-b);
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--white);
    background: var(--blue);
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    position: relative;
    overflow: hidden;
    margin-top: 0.25rem;
    text-decoration: none;
}

    .submit-btn::before {
        content: '';
        position: absolute;
        inset: 0;
        background: linear-gradient(135deg, transparent, rgba(255,255,255,0.1));
    }

    .submit-btn:hover {
        background: var(--blue2);
        box-shadow: var(--blue-glow);
        transform: translateY(-1px);
    }

    .submit-btn:disabled {
        background: var(--muted);
        box-shadow: none;
        cursor: not-allowed;
        transform: none;
    }

    .submit-btn.green-btn {
        background: var(--green);
    }

        .submit-btn.green-btn:hover {
            background: #047857;
            box-shadow: var(--green-glow);
        }

/* ── DIVIDER ──────────────────────────────────────────────────── */
.divider {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 1.1rem 0;
    color: var(--muted);
    font-size: 0.75rem;
    font-weight: 600;
}

    .divider::before,
    .divider::after {
        content: '';
        flex: 1;
        height: 1px;
        background: var(--border);
    }

/* ── SOCIAL BUTTONS ───────────────────────────────────────────── */
.social-row {
    display: flex;
    gap: 0.6rem;
}

.social-btn {
    flex: 1;
    padding: 0.65rem;
    border: 1.5px solid var(--border2);
    border-radius: 10px;
    background: var(--white);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    font-family: var(--font-b);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--body);
    transition: all 0.2s;
}

    .social-btn:hover {
        border-color: var(--border);
        background: var(--off);
        color: var(--ink);
    }

/* ── ERROR / SUCCESS MESSAGES ─────────────────────────────────── */
.error-msg {
    background: var(--red-lt);
    border: 1px solid rgba(220,38,38,0.25);
    border-radius: 9px;
    padding: 0.65rem 0.85rem;
    font-size: 0.8rem;
    color: var(--red);
    font-weight: 600;
    margin-bottom: 0.85rem;
    display: none;
    align-items: center;
    gap: 0.5rem;
}

    .error-msg.show {
        display: flex;
    }

.success-msg {
    background: var(--green-lt);
    border: 1px solid rgba(5,150,105,0.25);
    border-radius: 9px;
    padding: 0.65rem 0.85rem;
    font-size: 0.8rem;
    color: var(--green);
    font-weight: 600;
    margin-bottom: 0.85rem;
    display: none;
    align-items: center;
    gap: 0.5rem;
}

    .success-msg.show {
        display: flex;
    }

/* Server-side error panel */
.server-error {
    background: var(--red-lt);
    border: 1px solid rgba(220,38,38,0.25);
    border-radius: 9px;
    padding: 0.65rem 0.85rem;
    font-size: 0.8rem;
    color: var(--red);
    font-weight: 600;
    margin-bottom: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* ── AUTH FOOTER ──────────────────────────────────────────────── */
.auth-footer {
    margin-top: 1.25rem;
    text-align: center;
    font-size: 0.8rem;
    color: var(--muted);
}

    .auth-footer a {
        color: var(--blue);
        font-weight: 700;
        text-decoration: none;
    }

        .auth-footer a:hover {
            color: var(--blue2);
        }

/* ── CONFIRMED SCREEN ─────────────────────────────────────────── */
.confirmed {
    text-align: center;
    padding: 1rem 0;
}

.confirmed-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    margin: 0 auto 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    background: var(--green-lt);
    border: 2.5px solid rgba(5,150,105,0.3);
    animation: pop 0.4s cubic-bezier(0.34,1.56,0.64,1) both;
}

.confirmed-title {
    font-family: var(--font-h);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--ink);
    margin-bottom: 0.4rem;
}

.confirmed-sub {
    font-size: 0.86rem;
    color: var(--body);
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

/* ── ANIMATIONS ───────────────────────────────────────────────── */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pop {
    from {
        transform: scale(0);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ── RESPONSIVE ───────────────────────────────────────────────── */
@media (max-width: 768px) {
    .auth-wrap {
        grid-template-columns: 1fr;
    }

    .auth-brand {
        display: none;
    }

    .auth-form-panel {
        background: linear-gradient(160deg, #0D1728, #0A1D15);
        min-height: 100vh;
        align-items: flex-start;
        padding: 1.5rem 1rem;
        padding-top: 5rem;
    }

    .auth-box {
        border-radius: 20px;
        padding: 2rem 1.5rem;
    }

    .back-link {
        color: rgba(255,255,255,0.6);
    }
}

@media (max-width: 420px) {
    .fr2 {
        grid-template-columns: 1fr;
    }

    .role-selector {
        grid-template-columns: 1fr;
    }

    .social-row {
        flex-direction: column;
    }
}
