/* ===================================================
   Auth Pages — login.html & register.html
   =================================================== */

/* Reset & Base */
.auth-page {
    background: #f4f6fb;
}

/* ===== Wrapper ===== */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ===== Top Bar ===== */
.auth-topbar {
    background: #fff;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    padding: 0.85rem 0;
    z-index: 10;
    flex-shrink: 0;
}

.auth-topbar-inner {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.auth-topbar-logo img {
    height: 42px;
    width: auto;
}

.auth-back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--third-color);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: bold;
    transition: color 0.2s;
}

.auth-back-link:hover {
    color: var(--primary-color);
}

.auth-back-link i {
    font-size: 0.75rem;
    transition: transform 0.2s;
}

.auth-back-link:hover i {
    transform: translateX(3px);
}

/* ===== Auth Body (split layout) ===== */
.auth-body {
    flex: 1;
    display: flex;
    min-height: 0;
}

/* ===== Form Panel ===== */
.auth-form-panel {
    flex: 0 0 50%;
    max-width: 50%;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 2rem;
    overflow-y: auto;
}

.auth-form-panel--register {
    align-items: flex-start;
    padding-top: 2rem;
    padding-bottom: 2rem;
}

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

/* Form Header */
.auth-form-header {
    margin-bottom: 2rem;
}

.auth-form-icon {
    width: 58px;
    height: 58px;
    border-radius: 16px;
    background: rgba(219, 22, 53, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: var(--primary-color);
    margin-bottom: 1.25rem;
}

.auth-form-icon--green {
    background: rgba(25, 135, 84, 0.1);
    color: #198754;
}

.auth-form-header h2 {
    font-size: 1.7rem;
    color: var(--third-color);
    margin-bottom: 0.4rem;
}

.auth-subtitle {
    color: #777;
    font-size: 0.88rem;
    margin: 0;
}

/* ===== Login Tabs ===== */
.auth-tabs {
    display: flex;
    background: #f4f6fb;
    border-radius: 12px;
    padding: 4px;
    margin-bottom: 1.75rem;
    gap: 4px;
}

.auth-tab {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.6rem 1rem;
    border-radius: 9px;
    border: none;
    background: transparent;
    color: #777;
    font-family: var(--font-family);
    font-size: 0.82rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.22s;
}

.auth-tab.active {
    background: #fff;
    color: var(--third-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.auth-tab i {
    font-size: 0.8rem;
}

/* ===== Steps Indicator ===== */
.auth-steps {
    display: flex;
    align-items: center;
    margin-bottom: 1.75rem;
    gap: 0;
}

.auth-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    flex-shrink: 0;
}

.auth-step-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: bold;
    color: #aaa;
    transition: all 0.25s;
}

.auth-step--active .auth-step-circle {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}

.auth-step span {
    font-size: 0.7rem;
    color: #aaa;
    white-space: nowrap;
}

.auth-step--active span {
    color: var(--primary-color);
    font-weight: bold;
}

.auth-step-line {
    flex: 1;
    height: 2px;
    background: rgba(0, 0, 0, 0.1);
    margin: 0 0.5rem;
    margin-bottom: 1.2rem;
}

/* ===== Field Groups ===== */
.auth-field-group {
    margin-bottom: 1.1rem;
}

.auth-label {
    font-size: 0.8rem !important;
    font-weight: bold !important;
    color: var(--third-color) !important;
    margin-bottom: 0.45rem;
    display: block;
}

/* Input wrapper with icon */
.auth-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.auth-input-icon {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #bbb;
    font-size: 0.9rem;
    pointer-events: none;
    z-index: 1;
}

.auth-input {
    border: 1.5px solid rgba(0, 0, 0, 0.1) !important;
    border-radius: 12px !important;
    padding-right: 2.8rem !important;
    padding-left: 1rem !important;
    background: #f9fafc !important;
    font-size: 0.88rem !important;
    transition: border-color 0.2s, box-shadow 0.2s !important;
}

.auth-input:focus {
    border-color: var(--third-color) !important;
    background: #fff !important;
    box-shadow: 0 0 0 3px rgba(2, 32, 103, 0.06) !important;
    outline: none !important;
}

/* Password inputs that have a toggle button need left padding too */
.auth-input-wrap:has(.auth-toggle-pass) .auth-input {
    padding-left: 2.8rem !important;
}

.auth-input--date {
    padding-right: 2.8rem !important;
    padding-left: 1rem !important;
}

/* Password toggle button */
.auth-toggle-pass {
    position: absolute;
    left: 0.85rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #bbb;
    cursor: pointer;
    font-size: 0.9rem;
    padding: 0.25rem;
    transition: color 0.2s;
    z-index: 1;
}

.auth-toggle-pass:hover {
    color: var(--third-color);
}

/* Forgot password */
.auth-forgot-link {
    font-size: 0.78rem;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: bold;
}

.auth-forgot-link:hover {
    text-decoration: underline;
}

/* Checkbox */
.auth-check-label {
    font-size: 0.82rem !important;
    color: #555 !important;
    font-weight: normal !important;
    cursor: pointer;
    line-height: 1.5;
}

/* Terms links */
.auth-terms-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: bold;
}

.auth-terms-link:hover {
    text-decoration: underline;
}

/* ===== Gender Selector ===== */
.auth-gender-group {
    display: flex;
    gap: 0.75rem;
}

.auth-gender-option {
    flex: 1;
    cursor: pointer;
}

.auth-gender-option input {
    display: none;
}

.auth-gender-card {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem;
    border: 1.5px solid rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: bold;
    color: #666;
    background: #f9fafc;
    transition: all 0.2s;
}

.auth-gender-option input:checked+.auth-gender-card {
    border-color: var(--third-color);
    background: rgba(2, 32, 103, 0.06);
    color: var(--third-color);
}

.auth-gender-card i {
    font-size: 1rem;
}

/* ===== Password Strength ===== */
.auth-password-strength {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.auth-strength-bars {
    display: flex;
    gap: 4px;
}

.auth-strength-bar {
    width: 28px;
    height: 4px;
    border-radius: 2px;
    background: rgba(0, 0, 0, 0.1);
    transition: background 0.3s;
    display: block;
}

.auth-strength-bar--active {
    background: #198754;
}

.auth-strength-label {
    font-size: 0.72rem;
    color: #aaa;
    transition: color 0.3s;
}

/* ===== Password Rules ===== */
.auth-password-rules {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
    margin-top: -0.5rem;
}

.auth-rule {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.72rem;
    color: #ccc;
    transition: color 0.2s;
}

.auth-rule i {
    font-size: 0.7rem;
}

.auth-rule--met {
    color: #198754;
}

/* ===== Submit Button ===== */
.auth-submit-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 12px;
    padding: 0.9rem 1.5rem;
    font-family: var(--font-family);
    font-size: 0.95rem;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.22s, transform 0.18s;
    margin-top: 0.5rem;
}

.auth-submit-btn:hover {
    background: #b8102a;
    transform: translateY(-2px);
}

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

.auth-submit-btn i {
    font-size: 0.8rem;
    transition: transform 0.2s;
}

.auth-submit-btn:hover i {
    transform: translateX(-3px);
}

/* ===== Divider ===== */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.25rem 0;
    color: #ccc;
    font-size: 0.8rem;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(0, 0, 0, 0.1);
}

.auth-divider span {
    flex-shrink: 0;
}

/* ===== Alt Login Button ===== */
.auth-alt-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.85rem;
    background: #fff;
    border: 1.5px solid rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    padding: 0.75rem 1.25rem;
    font-family: var(--font-family);
    font-size: 0.85rem;
    font-weight: bold;
    color: var(--third-color);
    cursor: pointer;
    transition: all 0.22s;
    text-align: start;
}

.auth-alt-btn:hover {
    border-color: var(--third-color);
    background: rgba(2, 32, 103, 0.03);
}

.auth-alt-btn-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.auth-alt-btn-icon--absher {
    background: rgba(2, 32, 103, 0.1);
    color: var(--third-color);
}

/* ===== Bottom Link ===== */
.auth-bottom-link {
    text-align: center;
    margin-top: 1.5rem;
    margin-bottom: 0;
    font-size: 0.85rem;
    color: #777;
}

.auth-bottom-link a {
    color: var(--primary-color);
    font-weight: bold;
    text-decoration: none;
}

.auth-bottom-link a:hover {
    text-decoration: underline;
}

/* ===================================================
   Decorative Panel
   =================================================== */
.auth-deco-panel {
    flex: 0 0 50%;
    max-width: 50%;
    background: linear-gradient(160deg, var(--secondary-color) 0%, var(--third-color) 100%);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
}

.auth-deco-overlay {
    position: absolute;
    inset: 0;
    background:
        url('../assets/images/about-banner.png') center / cover no-repeat,
        radial-gradient(circle at 15% 85%, rgba(219, 22, 53, 0.25) 0%, transparent 55%),
        radial-gradient(circle at 85% 15%, rgba(255, 255, 255, 0.03) 0%, transparent 50%);
    opacity: 0.12;
    mix-blend-mode: overlay;
}

/* Decorative circles */
.auth-deco-panel::before {
    content: '';
    position: absolute;
    top: -80px;
    left: -80px;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    border: 60px solid rgba(255, 255, 255, 0.04);
}

.auth-deco-panel::after {
    content: '';
    position: absolute;
    bottom: -100px;
    right: -60px;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    background: rgba(219, 22, 53, 0.12);
}

.auth-deco-content {
    position: relative;
    z-index: 1;
    max-width: 400px;
}

.auth-deco-logo img {
    height: 52px;
    width: auto;
    filter: brightness(0) invert(1);
}

.auth-deco-title {
    font-size: 2rem;
    color: #fff;
    font-weight: bold;
    line-height: 1.35;
    margin-bottom: 0.75rem;
}

.auth-deco-sub {
    color: rgba(255, 255, 255, 0.65);
    font-size: 0.9rem;
    margin-bottom: 2rem;
}

/* Benefits list */
.auth-benefits {
    list-style: none;
    padding: 0;
    margin: 0 0 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.auth-benefits li {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.auth-benefit-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.9);
    flex-shrink: 0;
}

.auth-benefits li span {
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.88rem;
    font-weight: bold;
}

/* Stats strip */
.auth-deco-stats {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-around;
}

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

.auth-stat h4 {
    color: #fff;
    font-size: 1.4rem;
    margin: 0;
    line-height: 1.2;
}

.auth-stat small {
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.72rem;
}

.auth-stat-divider {
    width: 1px;
    height: 36px;
    background: rgba(255, 255, 255, 0.15);
}

/* ===================================================
   Responsive
   =================================================== */
@media (max-width: 991.98px) {
    .auth-deco-panel {
        display: none;
    }

    .auth-form-panel,
    .auth-form-panel--register {
        flex: 0 0 100%;
        max-width: 100%;
        padding: 2rem 1.5rem;
    }

    .auth-form-inner {
        max-width: 480px;
        margin: 0 auto;
    }
}

@media (max-width: 575.98px) {
    .auth-form-panel {
        padding: 1.5rem 1rem;
    }

    .auth-form-header h2 {
        font-size: 1.4rem;
    }

    .auth-deco-title {
        font-size: 1.6rem;
    }

    .auth-steps {
        gap: 0;
    }

    .auth-step span {
        font-size: 0.62rem;
    }
}