/* ==========================================================================
   Auth Pages — Shared styles for login, register, forgot-password,
   reset-password, email-sent, email-verified pages.
   ========================================================================== */

/* ======================================================================
   AUTH CONTAINER — Full-screen centered layout
   ====================================================================== */
.auth-container {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--red-50) 0%, var(--gray-100) 50%, var(--red-100) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-4);
}

/* ======================================================================
   SPLIT-SCREEN LAYOUT (desktop)
   ====================================================================== */
.auth-split {
    display: flex;
    width: 100%;
    max-width: 900px;
    min-height: 540px;
    border-radius: var(--radius-2xl);
    overflow: hidden;
    box-shadow: var(--shadow-xl);
}

/* Brand panel (left side on desktop) */
.auth-split__brand {
    display: none;
    flex: 0 0 380px;
    background: #8B0000;
    color: #fff;
    padding: var(--space-10);
    position: relative;
    overflow: hidden;
}

.auth-split__brand-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
}

.auth-split__logo {
    width: 72px;
    height: 72px;
    margin-bottom: var(--space-6);
    filter: drop-shadow(0 4px 12px rgba(0,0,0,0.3));
}

.auth-split__title {
    font-size: var(--text-3xl);
    font-weight: var(--font-bold);
    margin: 0 0 var(--space-3);
    letter-spacing: var(--tracking-tight);
    line-height: var(--leading-tight);
}

.auth-split__subtitle {
    font-size: var(--text-base);
    opacity: 0.8;
    line-height: var(--leading-relaxed);
    margin: 0;
}

/* Form panel (right side on desktop) */
.auth-split__form {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    padding: var(--space-0);
}

.auth-split__form .auth-card {
    box-shadow: none;
    border-radius: 0;
    max-width: 100%;
    width: 100%;
}

/* ======================================================================
   AUTH CARD — Card with header + body
   ====================================================================== */
.auth-card {
    background: #fff;
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-xl);
    overflow: hidden;
    width: 100%;
    max-width: 420px;
}

.auth-card--wide {
    max-width: 520px;
}

/* Header (colored band — mobile only when inside split) */
.auth-card__header {
    background: linear-gradient(160deg, #8B0000 0%, #6b0000 100%);
    color: white;
    padding: var(--space-8);
    text-align: center;
}

.auth-card__header img {
    height: 56px;
    margin-bottom: var(--space-3);
    filter: drop-shadow(0 2px 8px rgba(0,0,0,0.3));
}

.auth-card__header h3 {
    margin: 0;
    font-weight: var(--font-bold);
    font-size: var(--text-xl);
    letter-spacing: var(--tracking-tight);
}

.auth-card__header p {
    margin: var(--space-2) 0 0;
    opacity: 0.75;
    font-size: var(--text-sm);
}

/* Body */
.auth-card__body {
    padding: var(--space-8);
}

/* ======================================================================
   AUTH FORM ELEMENTS
   ====================================================================== */
.auth-card .form-control,
.auth-card .form-select {
    border-radius: var(--radius-lg);
    padding: var(--space-3) var(--space-4);
    border: 1.5px solid var(--gray-200);
    transition: border-color var(--duration-fast) ease-in-out,
                box-shadow var(--duration-fast) ease-in-out;
    font-family: var(--font-family-base);
    font-size: var(--text-sm);
    background-color: var(--gray-50);
}

.auth-card .form-control:hover,
.auth-card .form-select:hover {
    border-color: var(--gray-400);
}

.auth-card .form-control:focus,
.auth-card .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: var(--focus-ring-shadow, 0 0 0 3px rgba(139, 0, 0, 0.1));
    background-color: #fff;
}

.auth-card .form-label {
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    color: var(--gray-700);
    margin-bottom: var(--space-1-5);
}

/* Submit button */
.btn-auth {
    background-color: var(--primary-color);
    border: none;
    border-radius: var(--radius-lg);
    padding: var(--space-3) var(--space-5);
    font-family: var(--font-family-base);
    font-weight: var(--font-semibold);
    font-size: var(--text-sm);
    transition: var(--transition-base);
    color: white;
    width: 100%;
    letter-spacing: var(--tracking-wide);
}

.btn-auth:hover {
    background-color: #a00000;
    transform: translateY(-1px);
    box-shadow: var(--shadow-red);
    color: white;
}

.btn-auth:active {
    transform: translateY(0);
    box-shadow: none;
}

/* Links */
.auth-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: var(--font-medium);
    transition: color var(--duration-fast);
}

.auth-link:hover {
    color: #a00000;
    text-decoration: underline;
}

/* Info box */
.auth-info-box {
    background-color: var(--gray-50);
    border-left: 4px solid var(--primary-color);
    padding: var(--space-4);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-6);
    font-size: var(--text-sm);
    color: var(--gray-700);
}

/* Password requirements panel */
.auth-password-requirements {
    background-color: var(--gray-50);
    border-radius: var(--radius-lg);
    padding: var(--space-4);
    margin-top: var(--space-2);
}

.auth-password-requirement {
    display: flex;
    align-items: center;
    margin-bottom: var(--space-2);
    font-size: var(--text-sm);
    color: var(--gray-400);
    transition: color var(--duration-base);
}

.auth-password-requirement:last-child {
    margin-bottom: 0;
}

.auth-password-requirement i {
    margin-right: var(--space-2);
    width: 20px;
    text-align: center;
    transition: var(--transition-base);
}

.auth-password-requirement.valid {
    color: var(--success-600);
}

.auth-password-requirement.valid i {
    transform: scale(1.2);
}

/* Password toggle */
.auth-password-toggle {
    position: relative;
}

.auth-password-toggle .toggle-password {
    position: absolute;
    right: var(--space-4);
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: var(--gray-400);
    background: none;
    border: none;
    padding: var(--space-1);
    transition: color var(--duration-fast);
}

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

/* ======================================================================
   STEP INDICATOR (register pages)
   ====================================================================== */
.auth-step-dot {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    background-color: var(--gray-200);
    color: var(--gray-500);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--text-xs);
    font-weight: var(--font-bold);
    transition: var(--transition-base);
    flex-shrink: 0;
}

.auth-step-dot.active {
    background-color: var(--primary-color);
    color: #fff;
    box-shadow: 0 2px 8px rgba(139, 0, 0, 0.3);
}

.auth-step-line {
    flex: 0 0 40px;
    height: 2px;
    background-color: var(--gray-200);
    border-radius: 1px;
}

/* ======================================================================
   SUCCESS / CONFIRMATION PAGES (email-sent, email-verified)
   ====================================================================== */
.auth-success-icon {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-6);
    font-size: var(--text-3xl);
}

.auth-success-icon--success {
    background-color: var(--success-100);
    color: var(--success-600);
}

.auth-success-icon--email {
    background-color: var(--info-100);
    color: var(--info-600);
}

/* Animated checkmark */
@keyframes auth-checkmark {
    0% { transform: scale(0) rotate(-45deg); opacity: 0; }
    50% { transform: scale(1.2) rotate(0deg); opacity: 1; }
    100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

.auth-success-icon i {
    animation: auth-checkmark 0.5s var(--ease-bounce) 0.2s both;
}

/* ======================================================================
   RESPONSIVE — Desktop split layout
   ====================================================================== */
@media (min-width: 992px) {
    .auth-split__brand {
        display: flex;
    }

    .auth-split__form .auth-card {
        max-width: 100%;
    }

    .auth-card__body {
        padding: var(--space-10) var(--space-8);
    }
}

/* Mobile adjustments */
@media (max-width: 991px) {
    .auth-split {
        max-width: 420px;
        border-radius: var(--radius-2xl);
    }

    .auth-split__form .auth-card {
        border-radius: var(--radius-2xl);
    }
}

@media (max-width: 576px) {
    .auth-container {
        padding: var(--space-3);
    }

    .auth-card__body {
        padding: var(--space-5);
    }

    .auth-card__header {
        padding: var(--space-5);
    }

    .auth-card__header img {
        height: 44px;
    }
}
