﻿/* wwwroot/css/auth.css */
/* ============================================
   Design Tokens
   ============================================ */
:root {
    --auth-navy-900: #0B1B36;
    --auth-navy-800: #122A4F;
    --auth-navy-700: #1B3A66;
    --auth-navy-600: #24497D;
    --auth-navy-100: #E9EEF6;
    --auth-white: #FFFFFF;
    --auth-off-white: #FAF3EA;
    --auth-text: #16213A;
    --auth-text-muted: #6B7688;
    --auth-border: #ECE3D6;
    --auth-danger: #C23B3B;
    --auth-success: #22C55E;
    --auth-font-display: 'Tajawal', sans-serif;
    --auth-font-body: 'Cairo', sans-serif;
}

* {
    box-sizing: border-box;
}

.auth-body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--auth-font-body);
    color: var(--auth-text);
    background: #F3F6FB;
}

/* ============================================
   Navbar
============================================ */
.auth-navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .9rem 3rem;
    background: linear-gradient( 135deg, var(--auth-navy-900) 0%, var(--auth-navy-800) 100% );
    border-bottom: 1px solid rgba(255,255,255,.08);
    box-shadow: 0 8px 24px rgba(11,27,54,.18);
    position: sticky;
    top: 0;
    z-index: 50;
}

.auth-navbar__brand {
    display: flex;
    align-items: center;
    gap: .8rem;
}

.auth-navbar__brand-icon {
    background: var(--auth-navy-700);
    box-shadow: 0 4px 12px rgba(11,27,54,.35);
}

.auth-navbar__brand-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.auth-navbar__brand-title {
    font-family: var(--auth-font-display);
    font-size: 1.18rem;
    font-weight: 900;
    letter-spacing: -0.4px;
    color: var(--auth-white);
    line-height: 1.1;
}

.auth-navbar__brand-subtitle {
    font-family: var(--auth-font-body);
    font-size: .78rem;
    font-weight: 500;
    color: rgba(255,255,255,.68);
    line-height: 1.4;
}

.auth-navbar__actions {
    display: flex;
    align-items: center;
    gap: .7rem;
}

.auth-navbar__lang-switch {
    display: flex;
    align-items: center;
    gap: .4rem;
    padding: .65rem 1rem;
    border-radius: 14px;
    background: transparent;
    border: 1px solid rgba(255,255,255,.22);
    color: rgba(255,255,255,.85);
    font-family: var(--auth-font-body);
    font-weight: 700;
    font-size: .85rem;
    cursor: pointer;
    transition: .25s ease;
    white-space: nowrap;
}

    .auth-navbar__lang-switch:hover {
        color: var(--auth-white);
        background: rgba(255,255,255,.08);
        border-color: rgba(255,255,255,.35);
    }

    .auth-navbar__lang-switch:focus-visible {
        outline: 2px solid rgba(255,255,255,.5);
        outline-offset: 2px;
    }

.auth-navbar__back {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .7rem 1.1rem;
    border-radius: 14px;
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.12);
    color: rgba(255,255,255,.88);
    font-weight: 700;
    transition: .25s ease;
    text-decoration: none;
}

    .auth-navbar__back:hover {
        color: var(--auth-white);
        background: var(--auth-navy-700);
    }

.auth-navbar__logo {
    width: 43px;
    height: 43px;
    object-fit: contain;
    display: block;
}

/* ============================================
   Content Layouts
   ============================================ */
.auth-content--split {
    display: flex;
    min-height: calc(100vh - 73px);
}

.auth-content--centered {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 73px);
    padding: 3rem 1.5rem;
}

.auth-form-wrap {
    width: 100%;
    max-width: 420px;
    background: #fff;
    border-radius: 20px;
    padding: 32px;
    box-shadow: 0 20px 50px rgba(11,27,54,.08), 0 5px 15px rgba(11,27,54,.05);
}

/* --- Split: Form side --- */
.auth-panel--split {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 2rem;
}

/* --- Split: Illustration side --- */
.auth-illustration {
    flex: 0 0 46%;
    position: relative;
    background: linear-gradient(155deg, rgba(11,27,54,0.88) 0%, rgba(27,58,102,0.82) 100%), url('/images/auth-hero.png') center/cover no-repeat;
    color: var(--auth-white);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 3rem;
    overflow: hidden;
}

    .auth-illustration::before {
        content: "";
        position: absolute;
        inset: 0;
        background-image: radial-gradient(circle, rgba(255,255,255,0.06) 1px, transparent 1px);
        background-size: 22px 22px;
        opacity: 0.6;
    }

.auth-illustration__play {
    position: relative;
    z-index: 2;
    width: 84px;
    height: 84px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.75rem;
}

.auth-illustration__copy {
    position: relative;
    z-index: 2;
}

    .auth-illustration__copy h2 {
        font-family: var(--auth-font-display);
        font-weight: 800;
        font-size: 1.6rem;
        line-height: 1.5;
        margin-bottom: 0.6rem;
    }

    .auth-illustration__copy p {
        color: rgba(255,255,255,0.68);
        font-size: 0.92rem;
        line-height: 1.85;
        max-width: 32ch;
        margin: 0 auto;
    }

.auth-features {
    position: relative;
    z-index: 2;
    display: flex;
    gap: 1.75rem;
    margin-top: 2.5rem;
}

.auth-feature {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.55rem;
    font-size: 0.76rem;
    color: rgba(255,255,255,0.78);
    max-width: 90px;
}

.auth-feature__icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ============================================
   Shared Form Header
   ============================================ */
.auth-icon-badge {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--auth-navy-100);
    color: var(--auth-navy-700);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.25rem;
}

.auth-eyebrow {
    font-family: var(--auth-font-display);
    font-weight: 700;
    font-size: 0.8rem;
    letter-spacing: 0.02em;
    color: var(--auth-navy-600);
    text-transform: uppercase;
    margin-bottom: 0.75rem;
}

.auth-title {
    font-family: var(--auth-font-display);
    font-weight: 800;
    font-size: 1.7rem;
    color: var(--auth-text);
    margin-bottom: 0.4rem;
}

.auth-subtitle {
    color: var(--auth-text-muted);
    font-size: 0.92rem;
    line-height: 1.8;
    margin-bottom: 1.75rem;
}

.auth-title--center,
.auth-subtitle--center {
    text-align: center;
}

/* ============================================
   Form Elements
   ============================================ */
.auth-form .form-label {
    font-family: var(--auth-font-body);
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--auth-text);
    margin-bottom: 0.4rem;
}

.auth-form .form-control {
    font-family: var(--auth-font-body);
    border: 1.5px solid var(--auth-border);
    border-radius: 10px;
    padding: 0.65rem 2.5rem 0.65rem 0.9rem;
    font-size: 0.92rem;
    width: 100%;
    color: var(--auth-text);
    background: var(--auth-off-white);
    transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}

    .auth-form .form-control::placeholder {
        color: #A6AFC0;
    }

    .auth-form .form-control:hover {
        border-color: var(--auth-navy-600);
    }

    .auth-form .form-control:focus {
        border-color: var(--auth-navy-700);
        background: var(--auth-white);
        box-shadow: 0 0 0 3px rgba(27, 58, 102, 0.12);
        outline: none;
    }

.auth-form .text-danger {
    display: block;
    font-size: 0.8rem;
    margin-top: 0.3rem;
    color: var(--auth-danger);
}

.auth-input-wrap {
    position: relative;
}

    .auth-input-wrap.has-toggle .form-control {
        padding-left: 2.5rem;
    }

.auth-input-icon {
    position: absolute;
    top: 50%;
    right: 14px;
    transform: translateY(-50%);
    color: var(--auth-text-muted);
    display: flex;
    pointer-events: none;
}

.auth-input-toggle {
    position: absolute;
    top: 50%;
    left: 10px;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 4px;
    color: var(--auth-text-muted);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    transition: color 0.15s ease;
}

    .auth-input-toggle:hover {
        color: var(--auth-navy-700);
    }

    .auth-input-toggle .icon-eye-off {
        display: none;
    }

    .auth-input-toggle.is-visible .icon-eye {
        display: none;
    }

    .auth-input-toggle.is-visible .icon-eye-off {
        display: inline-flex;
    }

.auth-row {
    display: flex;
    gap: 0.9rem;
}

    .auth-row > div {
        flex: 1;
    }

/* ============================================
   Password Checklist
   ============================================ */
.auth-checklist {
    list-style: none;
    padding: 0;
    margin: 0.35rem 0 1.15rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

    .auth-checklist li {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        font-size: 0.8rem;
        color: var(--auth-text-muted);
        transition: color 0.15s ease;
    }

        .auth-checklist li .check-dot {
            width: 16px;
            height: 16px;
            border-radius: 50%;
            background: var(--auth-border);
            color: transparent;
            display: flex;
            align-items: center;
            justify-content: center;
            flex: 0 0 auto;
            transition: background-color 0.15s ease, color 0.15s ease;
        }

        .auth-checklist li.is-valid {
            color: var(--auth-text);
        }

            .auth-checklist li.is-valid .check-dot {
                background: var(--auth-success);
                color: var(--auth-white);
            }

/* ============================================
   Terms / Inline Row
   ============================================ */
.auth-terms {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    margin-bottom: 1.15rem;
    font-size: 0.83rem;
    color: var(--auth-text-muted);
    line-height: 1.7;
}

    .auth-terms input[type="checkbox"] {
        margin-top: 0.3rem;
        accent-color: var(--auth-navy-700);
        width: 15px;
        height: 15px;
        flex: 0 0 auto;
    }

    .auth-terms a {
        color: var(--auth-navy-700);
        font-weight: 600;
        text-decoration: none;
    }

        .auth-terms a:hover {
            text-decoration: underline;
        }

.auth-inline-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
    font-size: 0.85rem;
}

.auth-checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    color: var(--auth-text-muted);
    cursor: pointer;
}

    .auth-checkbox-label input[type="checkbox"] {
        accent-color: var(--auth-navy-700);
        width: 15px;
        height: 15px;
    }

.auth-link {
    color: var(--auth-navy-700);
    font-weight: 600;
    text-decoration: none;
    font-size: 0.85rem;
}

    .auth-link:hover {
        text-decoration: underline;
    }



/* ============================================
   Forgot Password Link
   ============================================ */
.auth-forgot-link {
    display: flex;
    justify-content: center;
    margin: -0.4rem 0 1.15rem;
}

    .auth-forgot-link a {
        position: relative;
        display: inline-block;
        color: var(--auth-navy-700);
        font-size: 0.85rem;
        font-weight: 600;
        text-decoration: none;
        padding-bottom: 2px;
    }

        .auth-forgot-link a::after {
            content: "";
            position: absolute;
            right: 0;
            bottom: 0;
            width: 0;
            height: 1.5px;
            background: var(--auth-navy-700);
            transition: width 0.25s ease;
        }

        .auth-forgot-link a:hover {
            color: var(--auth-navy-600);
        }

            .auth-forgot-link a:hover::after {
                width: 100%;
            }



/* ============================================
   Footer Note (تسجيل / إنشاء حساب)
   ============================================ */
.auth-footer-note {
    margin-top: 1.75rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--auth-border);
    text-align: center;
    font-size: 0.875rem;
    color: var(--auth-text-muted);
}

    .auth-footer-note a {
        position: relative;
        display: inline-block;
        color: var(--auth-navy-700);
        font-weight: 700;
        text-decoration: none;
        padding-bottom: 2px;
    }

        .auth-footer-note a::after {
            content: "";
            position: absolute;
            right: 0;
            bottom: 0;
            width: 0;
            height: 1.5px;
            background: var(--auth-navy-700);
            transition: width 0.25s ease;
        }

        .auth-footer-note a:hover {
            color: var(--auth-navy-600);
        }

            .auth-footer-note a:hover::after {
                width: 100%;
            }
/* ============================================
   Button
   ============================================ */
.auth-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    font-family: var(--auth-font-body);
    font-weight: 700;
    font-size: 0.96rem;
    color: var(--auth-white);
    background: var(--auth-navy-800);
    border: none;
    border-radius: 10px;
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.15s ease, box-shadow 0.25s ease;
}

    .auth-btn:hover {
        background: var(--auth-navy-600);
        box-shadow: 0 10px 22px rgba(27, 58, 102, 0.32);
        transform: translateY(-1px);
    }

    .auth-btn:active {
        transform: translateY(0);
    }

/* ============================================
   Divider + Social Buttons
   ============================================ */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    margin: 1.4rem 0;
    color: var(--auth-text-muted);
    font-size: 0.8rem;
}

    .auth-divider::before,
    .auth-divider::after {
        content: "";
        flex: 1;
        height: 1px;
        background: var(--auth-border);
    }

.auth-social {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.auth-social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    width: 100%;
    padding: 0.62rem 1rem;
    border: 1.5px solid var(--auth-border);
    border-radius: 10px;
    background: var(--auth-white);
    font-family: var(--auth-font-body);
    font-weight: 600;
    font-size: 0.88rem;
    color: var(--auth-text);
    cursor: pointer;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}

    .auth-social-btn:hover {
        border-color: var(--auth-navy-600);
        background: var(--auth-off-white);
    }


/* ============================================
   Responsive
   ============================================ */
@media (max-width: 900px) {
    .auth-navbar {
        padding: 0.85rem 1.25rem;
    }

    .auth-navbar__actions {
        gap: .5rem;
    }

    .auth-navbar__lang-switch {
        padding: .55rem .8rem;
        font-size: .78rem;
    }

    .auth-content--split {
        flex-direction: column;
    }

    .auth-illustration {
        padding: 1.75rem;
        min-height: 220px;
    }

    .auth-features {
        gap: 1rem;
    }

    .auth-content--centered {
        padding: 2rem 1.25rem;
    }
}

/* ============================================
   Accessibility
   ============================================ */
.auth-form .form-control:focus-visible,
.auth-btn:focus-visible,
.auth-social-btn:focus-visible {
    outline: 2px solid var(--auth-navy-600);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    .auth-btn, .auth-form .form-control, .auth-checklist li, .check-dot {
        transition: none;
    }
}
