/* ── AUTH.CSS ── Registration & Login Forms ── */

/* ── AUTH PAGE LAYOUT ── */
.auth-page {
    background: var(--ivory);
    display: flex;
    justify-content: center;
    padding: 40px 0 60px;
}

.auth-page-header {
    text-align: center;
    padding: 32px 0 28px;
    border-bottom: 1px solid var(--beige);
    background: var(--white);
    box-shadow: var(--shadow-sm);
}

.auth-page-header .eyebrow {
    margin-bottom: 10px;
}

.auth-page-header .heading {
    margin-bottom: 6px;
}

.auth-page-header p {
    font-size: 13.5px;
    color: var(--text-muted);
}

/* ── AUTH CARD ── */
.auth-card {
    background: var(--white);
    border-radius: var(--r-md);
    border: 1px solid var(--beige);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    position: relative;
}

.auth-card.register {
    width: 800px;
}

.auth-card.login {
    width: 500px;
}

.auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--maroon), var(--gold), var(--maroon-light));
}

/* ── AUTH BODY ── */
.auth-body {
    padding: 36px 40px 40px;
}

@media (max-width: 575px) {
    .auth-body {
        padding: 24px 20px 28px;
    }
}

/* ── FORM SECTION HEADER ── */
.form-section-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    margin-top: 32px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--beige);
}

.form-section-header:first-of-type {
    margin-top: 0;
}

.form-section-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--maroon-faint), var(--gold-faint));
    border: 1.5px solid rgba(201, 168, 76, 0.22);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    color: var(--maroon);
    flex-shrink: 0;
}

.form-section-title {
    font-size: 12px;
    font-weight: 700;
    color: var(--maroon);
    letter-spacing: 1.2px;
    text-transform: uppercase;
    margin: 0;
}

/* ── FORM LABEL ── */
.form-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-mid);
    margin-bottom: 6px;
    letter-spacing: 0.2px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.form-label .req {
    color: var(--maroon);
    font-size: 13px;
    line-height: 1;
}

/* ── FORM CONTROL ── */
.form-control,
.form-select {
    font-family: 'Poppins', sans-serif;
    font-size: 13px;
    color: var(--text-dark);
    background: var(--ivory);
    border: 1px solid var(--beige);
    border-radius: var(--r);
    padding: 10px 13px;
    height: auto;
    transition: border-color var(--t) var(--ease), box-shadow var(--t) var(--ease), background var(--t) var(--ease);
}

.form-control:focus,
.form-select:focus {
    background: var(--white);
    border-color: var(--maroon);
    box-shadow: 0 0 0 3px rgba(109, 26, 42, 0.09);
    color: var(--text-dark);
    outline: none;
}

.form-control::placeholder {
    color: var(--text-muted);
    font-size: 12.5px;
}

.form-control.is-invalid,
.form-select.is-invalid {
    border-color: #c0392b;
    background-image: none;
    box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.08);
}

.form-control.is-valid,
.form-select.is-valid {
    border-color: #27ae60;
    background-image: none;
    box-shadow: 0 0 0 3px rgba(39, 174, 96, 0.08);
}

.invalid-feedback {
    font-size: 11px;
    color: #c0392b;
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ── INPUT GROUP (tel code + number) ── */
.input-group .form-control{
    border-radius: 0;
}

.input-group .form-control:first-child {
    border-radius: var(--r) 0 0 var(--r);
    border-right: none;
    max-width: 110px;
    background-color: var(--cream);
    color: var(--text-mid);
    font-size: 12.5px;
}

.input-group .form-control:last-child {
    border-radius: 0 var(--r) var(--r) 0;
}

.input-group:focus-within .form-control:first-child,
.input-group:focus-within .form-control:last-child {
    border-color: var(--maroon);
}

.input-group-text {
    background: var(--cream);
    border: 1px solid var(--beige);
    border-right: none;
    color: var(--text-muted);
    font-size: 13px;
    padding: 10px 12px;
    border-radius: var(--r) 0 0 var(--r);
}

/* ── GENDER RADIO GROUP ── */
.gender-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.gender-option {
    flex: 1;
    min-width: 90px;
}

.gender-option input[type="radio"] {
    display: none;
}

.gender-option label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 9px 12px;
    border: 1.5px solid var(--beige);
    border-radius: var(--r);
    font-size: 12.5px;
    font-weight: 500;
    color: var(--text-muted);
    background: var(--ivory);
    cursor: pointer;
    transition: border-color var(--t) var(--ease), color var(--t) var(--ease),
        background var(--t) var(--ease), box-shadow var(--t) var(--ease);
    user-select: none;
    text-align: center;
}

.gender-option label i {
    font-size: 13px;
}

.gender-option input[type="radio"]:checked+label {
    border-color: var(--maroon);
    color: var(--maroon);
    background: var(--maroon-faint);
    box-shadow: 0 0 0 3px rgba(109, 26, 42, 0.08);
    font-weight: 700;
}

.gender-option label:hover {
    border-color: rgba(109, 26, 42, 0.30);
    color: var(--maroon);
    background: var(--cream);
}

/* ── TITLE SELECT ── */
.title-select-wrap {
    position: relative;
}

/* ── PASSWORD FIELD ── */
.password-wrap {
    position: relative;
}

.password-wrap .form-control {
    padding-right: 42px;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 13px;
    padding: 0;
    line-height: 1;
    transition: color var(--t) var(--ease);
}

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

/* ── PASSWORD STRENGTH ── */
.password-strength {
    margin-top: 8px;
}

.strength-bar {
    height: 3px;
    background: var(--beige);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 5px;
}

.strength-fill {
    height: 100%;
    border-radius: 2px;
    width: 0%;
    transition: width 0.4s var(--ease), background 0.4s var(--ease);
}

.strength-fill.weak {
    width: 33%;
    background: #e74c3c;
}

.strength-fill.fair {
    width: 66%;
    background: #e67e22;
}

.strength-fill.strong {
    width: 100%;
    background: #27ae60;
}

.strength-label {
    font-size: 11px;
    color: var(--text-muted);
}

/* ── FORM DIVIDER ── */
.form-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 28px 0;
}

.form-divider::before,
.form-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--beige);
}

.form-divider span {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    white-space: nowrap;
}

/* ── SUBMIT BUTTON ── */
.btn-auth-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    width: 100%;
    background: var(--maroon);
    color: var(--cream);
    font-family: 'Poppins', sans-serif;
    font-size: 13.5px;
    font-weight: 700;
    padding: 13px 28px;
    border-radius: var(--r);
    border: none;
    cursor: pointer;
    letter-spacing: 0.3px;
    box-shadow: 0 4px 18px rgba(109, 26, 42, 0.22);
    transition: background var(--t) var(--ease), transform var(--t) var(--ease), box-shadow var(--t) var(--ease);
    margin-top: 8px;
}

.btn-auth-submit i {
    transition: transform var(--t) var(--ease);
}

.btn-auth-submit:hover {
    background: var(--maroon-light);
    transform: translateY(-2px);
    box-shadow: 0 8px 26px rgba(109, 26, 42, 0.28);
}

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

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

/* ── AUTH FOOTER LINK ── */
.auth-footer-text {
    text-align: center;
    font-size: 12.5px;
    color: var(--text-muted);
    margin-top: 20px;
}

.auth-footer-text a {
    color: var(--maroon);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color var(--t) var(--ease);
}

.auth-footer-text a:hover {
    color: var(--maroon-light);
}

/* ── REQUIRED NOTE ── */
.required-note {
    font-size: 11.5px;
    color: var(--text-muted);
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.required-note span {
    color: var(--maroon);
    font-weight: 700;
}

/* ── ALERT / INFO BOX ── */
.auth-alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: var(--gold-faint);
    border: 1px solid rgba(201, 168, 76, 0.28);
    border-radius: var(--r);
    padding: 12px 15px;
    font-size: 12.5px;
    color: var(--text-mid);
    line-height: 1.6;
    margin-bottom: 22px;
}

.auth-alert i {
    color: var(--gold-dark);
    font-size: 14px;
    margin-top: 1px;
    flex-shrink: 0;
}

/* ── CHECKBOX ── */
.form-check-input:checked {
    background-color: var(--maroon);
    border-color: var(--maroon);
}

.form-check-input:focus {
    box-shadow: 0 0 0 3px rgba(109, 26, 42, 0.12);
    border-color: var(--maroon);
}

.form-check-label {
    font-size: 12.5px;
    color: var(--text-mid);
}

.form-check-label a {
    color: var(--maroon);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* ── FORGOT PASSWORD ── */
.forgot-link {
    font-size: 12px;
    color: var(--maroon);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color var(--t) var(--ease);
}

.forgot-link:hover {
    color: var(--maroon-light);
}

/* ── STEP INDICATOR (optional multi-step) ── */
.auth-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin-bottom: 32px;
    padding: 0 20px;
}

.auth-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    position: relative;
    flex: 1;
}

.auth-step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 14px;
    left: 50%;
    width: 100%;
    height: 2px;
    background: var(--beige);
    z-index: 0;
}

.auth-step.done:not(:last-child)::after,
.auth-step.active:not(:last-child)::after {
    background: var(--gold);
}

.step-circle {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid var(--beige);
    background: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    position: relative;
    z-index: 1;
    transition: all var(--t) var(--ease);
}

.auth-step.active .step-circle {
    border-color: var(--maroon);
    background: var(--maroon);
    color: var(--cream);
    box-shadow: 0 0 0 4px rgba(109, 26, 42, 0.12);
}

.auth-step.done .step-circle {
    border-color: var(--gold-dark);
    background: var(--gold);
    color: var(--maroon-dark);
}

.step-label {
    font-size: 10px;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.3px;
    text-align: center;
    white-space: nowrap;
}

.auth-step.active .step-label {
    color: var(--maroon);
}

/* ── SIDE PANEL (two-column layout) ── */
.auth-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 100vh;
}

.auth-split-panel {
    background: var(--maroon-dark);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 40px;
    text-align: center;
}

.auth-split-panel::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 60% 40%, rgba(201, 168, 76, 0.08) 0%, transparent 65%);
    pointer-events: none;
}

.auth-split-panel-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(22px, 2.5vw, 32px);
    font-weight: 800;
    color: var(--cream);
    margin-bottom: 14px;
    line-height: 1.2;
    position: relative;
    z-index: 1;
}

.auth-split-panel-title em {
    color: var(--gold);
    font-style: italic;
}

.auth-split-panel-text {
    font-size: 13px;
    color: rgba(249, 243, 232, 0.58);
    line-height: 1.8;
    max-width: 300px;
    position: relative;
    z-index: 1;
}

.auth-split-rule {
    width: 40px;
    height: 2px;
    background: linear-gradient(90deg, var(--gold), var(--gold-light));
    border-radius: 2px;
    margin: 16px auto;
    position: relative;
    z-index: 1;
}

.auth-split-form {
    background: var(--ivory);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 48px 44px;
}

@media (max-width: 991px) {
    .auth-split {
        grid-template-columns: 1fr;
    }

    .auth-split-panel {
        padding: 36px 28px;
        min-height: unset;
    }
}

@media (max-width: 575px) {
    .auth-split-form {
        padding: 28px 20px;
    }
}