/* ==========================================
   AUTH PAGES — Login, Forgot Password, Reset
   Split-screen layout with brand panel
   ========================================== */

.au-page {
    --au-font: 'Plus Jakarta Sans', 'Inter', -apple-system, sans-serif;
    --au-primary: var(--tw-primary, #3B79B1);
    --au-primary-dark: var(--tw-primary-dark, #2C5AA0);
    --au-secondary: var(--tw-secondary, #D4A03B);
    --au-text: rgba(0, 0, 0, 0.92);
    --au-text-muted: rgba(0, 0, 0, 0.45);
    --au-border: rgba(0, 0, 0, 0.1);
    --au-bg: #F8F9FB;
    --au-radius: 14px;
}


/* ---- Reset Stisla defaults for auth ---- */
.au-page .section {
    padding: 0 !important;
    margin: 0 !important;
}

.au-page .container {
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
}


/* ---- Split Screen Container ---- */
.au-split {
    display: flex;
    min-height: 100vh;
    width: 100%;
}


/* ---- Brand Panel (Left) ---- */
.au-brand {
    flex: 0 0 44%;
    max-width: 44%;
    background: linear-gradient(160deg, #0F2D44 0%, #1A4468 25%, #3B79B1 65%, #4A8BC4 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 48px;
    position: relative;
    overflow: hidden;
}

/* Subtle radial gold glow */
.au-brand::before {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    bottom: -100px;
    right: -100px;
    background: radial-gradient(ellipse, rgba(212, 160, 59, 0.12) 0%, transparent 70%);
    pointer-events: none;
}

/* Geometric decoration */
.au-brand::after {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    top: -80px;
    left: -80px;
    border: 2px solid rgba(255, 255, 255, 0.06);
    border-radius: 50%;
    pointer-events: none;
}

.au-brand-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 380px;
    animation: au-fadeIn 0.6s ease both;
}

.au-brand-logo {
    width: 220px;
    margin-bottom: 40px;
    filter: brightness(0) invert(1);
}

.au-brand-tagline {
    font-family: var(--au-font);
    font-size: 26px;
    font-weight: 800;
    color: #fff;
    line-height: 1.3;
    margin-bottom: 16px;
    letter-spacing: -0.3px;
}

.au-brand-tagline span {
    color: var(--au-secondary);
}

.au-brand-desc {
    font-family: var(--au-font);
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.6;
    margin-bottom: 40px;
}

/* Decorative dots */
.au-brand-dots {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.au-brand-dots span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
}

.au-brand-dots span:nth-child(2) {
    background: var(--au-secondary);
}


/* ---- Form Panel (Right) ---- */
.au-form-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px;
    background: var(--au-bg);
    position: relative;
}

.au-form-wrapper {
    width: 100%;
    max-width: 420px;
    animation: au-slideUp 0.5s ease both;
    animation-delay: 0.1s;
}


/* ---- Mobile Logo (hidden on desktop) ---- */
.au-mobile-logo {
    display: none;
    margin-bottom: 32px;
    text-align: center;
}

.au-mobile-logo img {
    height: 40px;
}


/* ---- Form Header ---- */
.au-form-header {
    margin-bottom: 32px;
}

.au-form-title {
    font-family: var(--au-font);
    font-size: 26px !important;
    font-weight: 800 !important;
    color: var(--au-text) !important;
    letter-spacing: -0.3px;
    margin: 0 0 8px !important;
}

.au-form-subtitle {
    font-family: var(--au-font);
    font-size: 14px;
    color: var(--au-text-muted);
    margin: 0;
}


/* ---- Form Card ---- */
.au-card {
    background: #FFFFFF;
    border: 1px solid var(--au-border);
    border-radius: var(--au-radius);
    padding: 32px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.04);
    margin-bottom: 24px;
}


/* ---- Form Fields ---- */
.au-field {
    margin-bottom: 20px;
}

.au-field:last-child {
    margin-bottom: 0;
}

.au-label {
    font-family: var(--au-font);
    font-size: 13px !important;
    font-weight: 600 !important;
    color: var(--au-text) !important;
    margin-bottom: 8px !important;
    display: block;
}

.au-input {
    font-family: var(--au-font);
    width: 100%;
    height: 48px !important;
    padding: 12px 16px !important;
    font-size: 14px !important;
    color: var(--au-text) !important;
    background: var(--au-bg) !important;
    border: 1.5px solid var(--au-border) !important;
    border-radius: 10px !important;
    transition: all 0.2s ease !important;
    outline: none;
}

.au-input:focus {
    border-color: var(--au-primary) !important;
    background: #FFFFFF !important;
    box-shadow: 0 0 0 3px rgba(59, 121, 177, 0.12) !important;
}

.au-input::placeholder {
    color: rgba(0, 0, 0, 0.3) !important;
}


/* ---- Password field with toggle ---- */
.au-password-wrap {
    position: relative;
}

.au-password-wrap .au-input {
    padding-right: 48px !important;
}

.au-password-toggle {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--au-text-muted);
    cursor: pointer;
    padding: 4px;
    font-size: 15px;
    transition: color 0.2s ease;
    line-height: 1;
}

.au-password-toggle:hover {
    color: var(--au-primary);
}


/* ---- Row: Remember Me + Forgot Password ---- */
.au-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.au-remember {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.au-remember input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--au-primary);
    cursor: pointer;
}

.au-remember-label {
    font-family: var(--au-font);
    font-size: 13px !important;
    font-weight: 500 !important;
    color: var(--au-text-muted) !important;
    margin: 0 !important;
    cursor: pointer;
}

.au-forgot {
    font-family: var(--au-font);
    font-size: 13px;
    font-weight: 600;
    color: var(--au-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.au-forgot:hover {
    color: var(--au-primary-dark);
    text-decoration: none;
}


/* ---- Submit Button ---- */
.au-submit {
    font-family: var(--au-font);
    width: 100%;
    height: 48px;
    font-size: 15px !important;
    font-weight: 700 !important;
    border: none !important;
    border-radius: 10px !important;
    background: linear-gradient(135deg, var(--au-primary), var(--au-primary-dark)) !important;
    color: #fff !important;
    cursor: pointer;
    transition: all 0.25s ease !important;
    box-shadow: 0 4px 14px rgba(59, 121, 177, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.au-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(59, 121, 177, 0.35) !important;
}

.au-submit:active {
    transform: translateY(0);
}

.au-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none !important;
}

/* Spinner inside button */
.au-spinner {
    display: none;
    width: 18px;
    height: 18px;
    border: 2.5px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: au-spin 0.6s linear infinite;
}

.au-submit.is-loading .au-spinner {
    display: inline-block;
}

.au-submit.is-loading .au-submit-text {
    display: none;
}


/* ---- Alert / Error ---- */
.au-alert {
    font-family: var(--au-font);
    font-size: 13px;
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 20px;
    display: none;
    animation: au-shake 0.4s ease;
}

.au-alert.is-visible {
    display: block;
}

.au-alert--error {
    background: rgba(239, 68, 68, 0.08);
    color: #DC2626;
    border: 1px solid rgba(239, 68, 68, 0.15);
}

.au-alert--success {
    background: rgba(52, 211, 153, 0.08);
    color: #059669;
    border: 1px solid rgba(52, 211, 153, 0.15);
}


/* ---- Trust Signal ---- */
.au-trust {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-family: var(--au-font);
    font-size: 12px;
    color: var(--au-text-muted);
}

.au-trust i {
    font-size: 11px;
    color: #059669;
}


/* ---- Footer ---- */
.au-footer {
    font-family: var(--au-font);
    font-size: 12px;
    color: var(--au-text-muted);
    text-align: center;
    margin-top: 24px;
}

.au-footer a {
    color: var(--au-primary);
    font-weight: 600;
    text-decoration: none;
}

.au-footer a:hover {
    text-decoration: underline;
}

/* ---- Back link ---- */
.au-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--au-font);
    font-size: 13px;
    font-weight: 600;
    color: var(--au-text-muted);
    text-decoration: none;
    margin-bottom: 24px;
    transition: color 0.2s ease;
}

.au-back:hover {
    color: var(--au-primary);
    text-decoration: none;
}

.au-back i {
    font-size: 11px;
}


/* ---- Demo Buttons (ALLOW_MODIFICATION) ---- */
.au-demo-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--au-border);
}

.au-demo-label {
    font-family: var(--au-font);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--au-text-muted);
    text-align: center;
    margin-bottom: 4px;
}

.au-demo-group .btn {
    border-radius: 10px !important;
    font-family: var(--au-font);
    font-size: 13px !important;
    font-weight: 600 !important;
    height: 42px;
}


/* ---- Animations ---- */
@keyframes au-fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes au-slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes au-spin {
    to { transform: rotate(360deg); }
}

@keyframes au-shake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-6px); }
    40% { transform: translateX(6px); }
    60% { transform: translateX(-4px); }
    80% { transform: translateX(4px); }
}


/* ---- Responsive ---- */
@media (max-width: 1024px) {
    .au-brand {
        flex: 0 0 38%;
        max-width: 38%;
        padding: 40px 32px;
    }

    .au-brand-tagline {
        font-size: 22px;
    }

    .au-brand-logo {
        width: 180px;
    }
}

@media (max-width: 768px) {
    .au-split {
        flex-direction: column;
    }

    .au-brand {
        display: none;
    }

    .au-mobile-logo {
        display: block;
    }

    .au-form-panel {
        padding: 32px 24px;
        min-height: 100vh;
        justify-content: flex-start;
        padding-top: 60px;
    }

    .au-form-wrapper {
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .au-form-panel {
        padding: 24px 16px;
        padding-top: 48px;
    }

    .au-card {
        padding: 24px 20px;
    }

    .au-form-title {
        font-size: 22px !important;
    }

    .au-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
}
