/* ============================================================
   Edu Jordan – Auth Pages Design System
   Consistent with the public landing site design language:
   Rubik + Montserrat fonts, #E8BA00 gold, #345830 green,
   #F8F8F8 background, blur-ellipse effects, rounded cards.
   ============================================================ */

/* ---- Reset / Override admin layout defaults ---- */
body {
    font-family: 'Rubik', sans-serif !important;
    background: #F8F8F8 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow-x: hidden;
}

/* ---- CSS Variables ---- */
:root {
    --au-gold: #E8BA00;
    --au-green: #345830;
    --au-dark: #111827;
    --au-gray: #4B5563;
    --au-light-gray: #6B7280;
    --au-bg: #F8F8F8;
    --au-white: #ffffff;
    --au-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    --au-shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.1);
    --au-radius-sm: 10px;
    --au-radius: 16px;
    --au-radius-lg: 24px;
    --au-border: rgba(0, 0, 0, 0.08);
    --au-gold-soft: rgba(232, 186, 0, 0.12);
    --au-gold-glow: rgba(232, 186, 0, 0.35);
    --au-input-h: 52px;
}

/* ============================================================
   Outer Wrapper
   ============================================================ */
.auth-wrap {
    min-height: 100vh;
    display: flex;
    background: var(--au-bg);
    position: relative;
    overflow: hidden;
}

/* ============================================================
   Brand Panel (left in LTR / right in RTL)
   ============================================================ */
.auth-brand {
    flex: 0 0 50%;
    max-width: 50%;
    position: relative;
    overflow: hidden;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 60px 52px;
    box-shadow: 8px 0 32px -4px rgba(0, 0, 0, 0.10), 1px 0 0 0 rgba(0, 0, 0, 0.06);
}

/* Background blobs — mirrors the landing hero section */
.auth-brand-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    background: linear-gradient(155deg, #fffef5 0%, #ffffff 55%);
}

/* Large watermark logo — same treatment as gallery page */
html[dir="rtl"] .auth-brand-bg::after {
    content: '';
    position: absolute;
    width: 480px;
    height: 480px;
    top: 60px;
    left: -4px;
    background-image: url(/new_design/images/Logo.png);
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0.07;
    transform: rotate(-17deg);
    pointer-events: none;
}

html[dir="ltr"] .auth-brand-bg::after {
    content: '';
    position: absolute;
    width: 480px;
    height: 480px;
    top: 35px;
    right: -39px;
    background-image: url(/new_design/images/Logo.png);
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0.07;
    transform: rotate(-17deg);
    pointer-events: none;
}

.auth-blob-1 {
    position: absolute;
    width: 520px;
    height: 320px;
    bottom: -60px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(232, 186, 0, 0.18);
    filter: blur(110px);
    border-radius: 50%;
}

.auth-blob-2 {
    position: absolute;
    width: 220px;
    height: 220px;
    top: -60px;
    right: -60px;
    background: rgba(52, 88, 48, 0.12);
    filter: blur(90px);
    border-radius: 50%;
}

.auth-blob-3 {
    position: absolute;
    width: 180px;
    height: 180px;
    top: 38%;
    left: -50px;
    background: rgba(232, 186, 0, 0.28);
    filter: blur(70px);
    border-radius: 50%;
}

.auth-brand-content {
    position: relative;
    z-index: 1;
}

/* Logo — identical proportions to landing navbar logo */
.auth-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 56px;
    text-decoration: none;
}

.auth-logo-icon {
    position: relative;
    width: 48px;
    height: 56px;
    flex-shrink: 0;
}

.auth-logo-ellipse {
    position: absolute;
    width: 14px;
    height: 14px;
    left: 12px;
    top: 22px;
    background: rgba(94, 114, 26, 0.4);
    border-radius: 50%;
}

.auth-logo-img {
    position: absolute;
    width: 48px;
    height: 48px;
    left: 0;
    top: 6px;
    background-image: url('/new_design/images/logo3.png');
    background-size: contain;
    background-repeat: no-repeat;
}

.auth-logo-text {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 17px;
    line-height: 1.2;
    color: var(--au-dark);
    letter-spacing: 0.4px;
}

/* Headline */
.auth-headline {
    font-family: 'Rubik', sans-serif;
    font-weight: 700;
    font-size: 36px;
    line-height: 1.22;
    color: var(--au-dark);
    margin: 0 0 18px;
}

.auth-headline em {
    font-style: normal;
    color: var(--au-gold);
}

/* Sub-heading */
.auth-sub {
    font-family: 'Rubik', sans-serif;
    font-size: 15px;
    line-height: 1.65;
    color: var(--au-light-gray);
    margin: 0 0 44px;
    max-width: 340px;
}

/* Feature list */
.auth-features {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 44px;
}

.auth-feature {
    display: flex;
    align-items: center;
    gap: 14px;
}

.auth-feature-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--au-gold-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.auth-feature-icon svg {
    width: 18px;
    height: 18px;
    stroke: var(--au-gold);
}

.auth-feature-text {
    font-family: 'Rubik', sans-serif;
    font-size: 14px;
    color: var(--au-gray);
}

/* Decorative stats card */
.auth-stats-card {
    background: rgba(232, 186, 0, 0.06);
    border: 1px solid rgba(232, 186, 0, 0.22);
    border-radius: var(--au-radius);
    padding: 22px 24px;
}

.auth-stats-card-label {
    font-family: 'Rubik', sans-serif;
    font-size: 11px;
    font-weight: 600;
    color: var(--au-light-gray);
    text-transform: uppercase;
    letter-spacing: 0.9px;
    margin-bottom: 14px;
}

.auth-stats-row {
    display: flex;
    gap: 0;
    justify-content: space-around;
}

.auth-stat {
    text-align: center;
    flex: 1;
}

.auth-stat+.auth-stat {
    border-inline-start: 1px solid rgba(232, 186, 0, 0.2);
}

.auth-stat-value {
    display: block;
    font-family: 'Rubik', sans-serif;
    font-size: 22px;
    font-weight: 700;
    color: var(--au-dark);
    line-height: 1;
    margin-bottom: 5px;
}

.auth-stat-label {
    display: block;
    font-family: 'Rubik', sans-serif;
    font-size: 11px;
    color: var(--au-light-gray);
}

/* ============================================================
   Form Panel (right in LTR / left in RTL)
   ============================================================ */
.auth-form-side {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 60px 48px;
    position: relative;
    background: var(--au-bg);
}

/* Subtle background blob for form side */
.auth-form-side::before {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: rgba(232, 186, 0, 0.06);
    filter: blur(80px);
    top: -80px;
    right: -80px;
    pointer-events: none;
}

.auth-form-inner {
    width: 100%;
    max-width: 400px;
    position: relative;
    z-index: 1;
}

/* Back link */
.auth-back {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--au-light-gray);
    text-decoration: none;
    font-family: 'Rubik', sans-serif;
    font-size: 13px;
    margin-bottom: 36px;
    transition: color 0.2s;
}

.auth-back:hover {
    color: var(--au-gold);
}

.auth-back svg {
    width: 15px;
    height: 15px;
    transition: transform 0.2s;
}

.auth-back:hover svg {
    transform: translateX(-2px);
}

/* Form header */
.auth-form-title {
    font-family: 'Rubik', sans-serif;
    font-weight: 700;
    font-size: 28px;
    line-height: 1.22;
    color: var(--au-dark);
    margin: 0 0 8px;
}

.auth-form-sub {
    font-family: 'Rubik', sans-serif;
    font-size: 14px;
    color: var(--au-light-gray);
    margin: 0 0 30px;
}

/* ============================================================
   Alerts
   ============================================================ */
.auth-alert {
    padding: 12px 16px;
    border-radius: var(--au-radius-sm);
    font-family: 'Rubik', sans-serif;
    font-size: 14px;
    margin-bottom: 18px;
    line-height: 1.5;
    border: 1px solid transparent;
}

.auth-alert-danger {
    background: rgba(220, 38, 38, 0.06);
    color: #b91c1c;
    border-color: rgba(220, 38, 38, 0.14);
}

.auth-alert-success {
    background: rgba(52, 88, 48, 0.06);
    color: var(--au-green);
    border-color: rgba(52, 88, 48, 0.15);
}

.auth-alert-warning {
    background: rgba(232, 186, 0, 0.08);
    color: #927200;
    border-color: rgba(232, 186, 0, 0.22);
}

/* ============================================================
   Form Fields
   ============================================================ */
.auth-field {
    margin-bottom: 18px;
}

.auth-label {
    display: block;
    font-family: 'Rubik', sans-serif;
    font-size: 13px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 7px;
}

.auth-input-wrap {
    position: relative;
}

.auth-input {
    display: block;
    width: 100%;
    height: var(--au-input-h);
    padding: 0 16px;
    background: var(--au-white);
    border: 1.5px solid rgba(0, 0, 0, 0.1);
    border-radius: var(--au-radius-sm);
    font-family: 'Rubik', sans-serif;
    font-size: 15px;
    color: var(--au-dark);
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.auth-input::placeholder {
    color: #9CA3AF;
}

.auth-input:focus {
    border-color: var(--au-gold);
    box-shadow: 0 0 0 3px rgba(232, 186, 0, 0.12);
}

.auth-input.is-invalid {
    border-color: #dc2626;
}

.auth-input.is-invalid:focus {
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.auth-input-has-icon {
    padding-inline-end: 48px;
}

/* Password toggle button */
.auth-eye-btn {
    position: absolute;
    inset-inline-end: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--au-light-gray);
    padding: 0;
    line-height: 0;
    transition: color 0.2s;
}

.auth-eye-btn:hover {
    color: var(--au-gold);
}

/* Select field */
.auth-select {
    display: block;
    width: 100%;
    height: var(--au-input-h);
    padding: 0 16px;
    background: var(--au-white);
    border: 1.5px solid rgba(0, 0, 0, 0.1);
    border-radius: var(--au-radius-sm);
    font-family: 'Rubik', sans-serif;
    font-size: 15px;
    color: var(--au-dark);
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    cursor: pointer;
}

[dir="rtl"] .auth-select {
    background-position: left 14px center;
}

.auth-select:focus {
    border-color: var(--au-gold);
    box-shadow: 0 0 0 3px rgba(232, 186, 0, 0.12);
}

.auth-select.is-invalid {
    border-color: #dc2626;
}

/* Error message */
.auth-error {
    display: block;
    font-family: 'Rubik', sans-serif;
    font-size: 12px;
    color: #dc2626;
    margin-top: 5px;
}

/* ============================================================
   Form Row (remember + forgot)
   ============================================================ */
.auth-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    gap: 12px;
}

.auth-check-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.auth-checkbox {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    accent-color: var(--au-gold);
    cursor: pointer;
    flex-shrink: 0;
}

.auth-check-label {
    font-family: 'Rubik', sans-serif;
    font-size: 13px;
    color: var(--au-gray);
    cursor: pointer;
    user-select: none;
}

.auth-link {
    font-family: 'Rubik', sans-serif;
    font-size: 13px;
    color: var(--au-light-gray);
    text-decoration: none;
    white-space: nowrap;
    transition: color 0.2s;
}

.auth-link:hover {
    color: var(--au-gold);
    text-decoration: underline;
}

/* ============================================================
   Terms Checkbox
   ============================================================ */
.auth-terms {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 24px;
}

.auth-terms .auth-checkbox {
    margin-top: 2px;
}

.auth-terms-label {
    font-family: 'Rubik', sans-serif;
    font-size: 13px;
    color: var(--au-gray);
    line-height: 1.5;
}

.auth-terms-label a {
    color: var(--au-dark);
    font-weight: 500;
    text-decoration: underline;
    transition: color 0.2s;
}

.auth-terms-label a:hover {
    color: var(--au-gold);
}

/* ============================================================
   Submit Button — matches landing .btn-login gradient
   ============================================================ */
.auth-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 54px;
    background: linear-gradient(180deg, #ffffff -38.46%, #E8BA00 80.77%);
    border: none;
    border-radius: var(--au-radius);
    font-family: 'Rubik', sans-serif;
    font-weight: 600;
    font-size: 16px;
    color: #3D3200;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.15s, box-shadow 0.2s;
    box-shadow: 0 4px 18px rgba(232, 186, 0, 0.28);
    margin-bottom: 22px;
    letter-spacing: 0.2px;
}

.auth-btn:hover {
    opacity: 0.92;
    transform: translateY(-1px);
    box-shadow: 0 8px 28px rgba(232, 186, 0, 0.38);
}

.auth-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(232, 186, 0, 0.2);
}

/* ============================================================
   Footer Link
   ============================================================ */
.auth-footer {
    text-align: center;
    font-family: 'Rubik', sans-serif;
    font-size: 14px;
    color: var(--au-light-gray);
}

.auth-footer a {
    color: var(--au-dark);
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s;
}

.auth-footer a:hover {
    color: var(--au-gold);
}

/* ============================================================
   Divider
   ============================================================ */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 4px 0 20px;
}

.auth-divider-line {
    flex: 1;
    height: 1px;
    background: rgba(0, 0, 0, 0.07);
}

.auth-divider-text {
    font-family: 'Rubik', sans-serif;
    font-size: 12px;
    color: #9CA3AF;
}

/* ============================================================
   Step indicator (for multi-step signup)
   ============================================================ */
.auth-steps {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 28px;
}

.auth-step-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.12);
    transition: background 0.2s;
}

.auth-step-dot.active {
    width: 24px;
    border-radius: 4px;
    background: var(--au-gold);
}

/* ============================================================
   Responsive — Tablet (≤ 960px)
   ============================================================ */
@media (max-width: 960px) {
    .auth-wrap {
        flex-direction: column;
    }

    .auth-brand {
        flex: 0 0 auto;
        max-width: 100%;
        padding: 28px 24px;
    }

    /* On mobile, only show the logo — hide the rest of brand content */
    .auth-headline,
    .auth-sub,
    .auth-features,
    .auth-stats-card {
        display: none;
    }

    .auth-logo {
        margin-bottom: 0;
    }

    .auth-form-side {
        padding: 32px 20px 48px;
    }

    .auth-form-inner {
        max-width: 100%;
    }

    .auth-back {
        margin-bottom: 24px;
    }

    .auth-form-title {
        font-size: 24px;
    }
}

/* ============================================================
   Responsive — Small mobile (≤ 480px)
   ============================================================ */
@media (max-width: 480px) {
    .auth-brand {
        padding: 20px 20px;
    }

    .auth-form-side {
        padding: 24px 20px 40px;
    }

    .auth-btn {
        height: 50px;
        font-size: 15px;
    }

    .auth-form-title {
        font-size: 22px;
    }

    .auth-input,
    .auth-select {
        font-size: 14px;
    }
}

/* ============================================================
   RTL Support
   ============================================================ */

/* Logo: force LTR direction so "EDU / JORDAN" reads left-to-right,
   and push it to the end (right) of the brand panel in Arabic */
[dir="rtl"] .auth-logo {
    direction: ltr;
    justify-content: end;
}

[dir="rtl"] .auth-back svg {
    transform: scaleX(-1);
}

[dir="rtl"] .auth-back:hover svg {
    transform: scaleX(-1) translateX(-2px);
}

[dir="rtl"] .auth-headline,
[dir="rtl"] .auth-sub,
[dir="rtl"] .auth-feature-text,
[dir="rtl"] .auth-stats-card-label {
    text-align: right;
}

[dir="rtl"] .auth-form-title,
[dir="rtl"] .auth-form-sub,
[dir="rtl"] .auth-label,
[dir="rtl"] .auth-footer,
[dir="rtl"] .auth-check-label,
[dir="rtl"] .auth-terms-label {
    text-align: right;
}

[dir="rtl"] .auth-check-wrap {
    flex-direction: row-reverse;
}

/* ============================================================
   Override any admin/corporate-ui leftover styles
   ============================================================ */
.auth-wrap *,
.auth-wrap *::before,
.auth-wrap *::after {
    box-sizing: border-box;
}

/* Suppress admin's sidenav-guest navbar when present */
nav.navbar.navbar-expand-lg.blur {
    display: none !important;
}

.main-content {
    margin-top: 0 !important;
    background: transparent !important;
    padding: 0 !important;
}

.page-header.min-vh-100 {
    padding: 0 !important;
    min-height: unset !important;
}

/* ============================================================
   Language Switcher
   ============================================================ */
.auth-lang {
    position: absolute;
    top: 20px;
    inset-inline-end: 24px;
    display: flex;
    align-items: center;
    gap: 4px;
    z-index: 10;
}

.auth-lang-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 32px;
    border-radius: 8px;
    font-family: 'Rubik', sans-serif;
    font-size: 13px;
    font-weight: 500;
    color: var(--au-light-gray);
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
    background: transparent;
}

.auth-lang-btn:hover {
    background: rgba(232, 186, 0, 0.1);
    color: var(--au-gold);
}

.auth-lang-btn.is-active {
    background: var(--au-gold);
    color: #3D3200;
    font-weight: 600;
}

@media (max-width: 480px) {
    .auth-lang {
        top: 14px;
        inset-inline-end: 16px;
    }
}