/* ==========================================================================
   AUTHENTICATION & USER ACCOUNT STYLES (Login, Register, Password Recovery)
   ========================================================================== */

/* Outer Auth Section Background */
.auth-page-section {
    padding: 60px 0 90px;
    background: radial-gradient(circle at top center, rgba(247, 151, 30, 0.06) 0%, rgba(9, 66, 90, 0.03) 60%, transparent 100%);
    min-height: calc(100vh - 350px);
    display: flex;
    align-items: center;
}

/* Card Container */
.auth-card-wrapper {
    max-width: 480px;
    margin: 0 auto;
    width: 100%;
}

.auth-card-wrapper.wide-card {
    max-width: 600px;
}

.auth-card {
    background: #ffffff;
    border-radius: 24px;
    border: 1px solid rgba(226, 232, 240, 0.9);
    box-shadow: 0 20px 45px -10px rgba(9, 66, 90, 0.12), 0 10px 20px -5px rgba(0, 0, 0, 0.04);
    padding: 42px 38px;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, var(--theme-primary, #f7971e), #ffd200, var(--theme-primary, #f7971e));
    background-size: 200% 100%;
    animation: authGradientShift 4s ease infinite;
}

@keyframes authGradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Card Header Icon & Avatar Badge */
.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.auth-icon-badge {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(247, 151, 30, 0.12), rgba(9, 66, 90, 0.08));
    color: var(--theme-primary, #f7971e);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin-bottom: 16px;
    box-shadow: inset 0 0 0 1px rgba(247, 151, 30, 0.2);
    transition: transform 0.3s ease;
}

.auth-card:hover .auth-icon-badge {
    transform: scale(1.06) rotate(-3deg);
}

.auth-title {
    font-size: 26px;
    font-weight: 800;
    color: #0f172a !important;
    margin: 0 0 8px 0;
    letter-spacing: -0.5px;
}

.auth-subtitle {
    font-size: 14px;
    color: #64748b !important;
    margin: 0;
    font-weight: 400;
}

/* Form Controls */
.auth-form-group {
    margin-bottom: 20px;
    position: relative;
}

.auth-form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #334155 !important;
    margin-bottom: 7px;
}

.auth-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.auth-field-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8 !important;
    font-size: 16px;
    transition: color 0.2s ease;
    pointer-events: none;
    z-index: 2;
}

.auth-input-control {
    width: 100%;
    height: 50px;
    padding: 12px 18px 12px 48px !important;
    font-size: 15px;
    color: #1e293b !important;
    background-color: #f8fafc !important;
    border: 2px solid #e2e8f0 !important;
    border-radius: 12px !important;
    outline: none;
    transition: all 0.25s ease;
    box-sizing: border-box;
}

.auth-input-control.has-toggle {
    padding-right: 48px !important;
}

.auth-input-control:focus {
    background-color: #ffffff !important;
    border-color: var(--theme-primary, #f7971e) !important;
    box-shadow: 0 0 0 4px rgba(247, 151, 30, 0.15) !important;
}

.auth-input-wrapper:focus-within .auth-field-icon {
    color: var(--theme-primary, #f7971e) !important;
}

/* Password Visibility Eye */
.auth-password-toggle {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8 !important;
    cursor: pointer;
    font-size: 16px;
    padding: 6px;
    border-radius: 6px;
    transition: color 0.2s ease, background-color 0.2s ease;
    z-index: 2;
}

.auth-password-toggle:hover {
    color: var(--theme-primary, #f7971e) !important;
    background-color: rgba(247, 151, 30, 0.08);
}

/* Validation Errors */
.auth-error-msg {
    display: block;
    color: #ef4444 !important;
    font-size: 12.5px;
    font-weight: 500;
    margin-top: 5px;
}

/* Remember Me & Link Row */
.auth-meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 4px;
    margin-bottom: 24px;
}

.auth-remember-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #475569 !important;
    font-weight: 500;
    cursor: pointer;
    user-select: none;
    margin: 0;
}

.auth-remember-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--theme-primary, #f7971e);
    cursor: pointer;
    border-radius: 4px;
    margin: 0;
}

.auth-forgot-link {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--theme-primary, #f7971e) !important;
    text-decoration: none;
    transition: color 0.2s ease, opacity 0.2s ease;
}

.auth-forgot-link:hover {
    color: var(--theme-primary, #f7971e) !important;
    opacity: 0.85;
    text-decoration: underline;
}

/* Primary CTA Submit Button */
.auth-submit-btn {
    width: 100%;
    height: 52px;
    background: linear-gradient(135deg, var(--theme-primary, #f7971e) 0%, #ffad33 100%) !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 12px !important;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.3px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(247, 151, 30, 0.32);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.auth-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(247, 151, 30, 0.45) !important;
    filter: brightness(1.05);
}

.auth-submit-btn:active {
    transform: translateY(0);
}

.auth-submit-btn i {
    transition: transform 0.2s ease;
}

.auth-submit-btn:hover i {
    transform: translateX(4px);
}

/* Card Footer / Switch Mode Divider */
.auth-card-divider {
    position: relative;
    text-align: center;
    margin: 28px 0 20px;
}

.auth-card-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background-color: #e2e8f0;
}

.auth-card-divider span {
    position: relative;
    background-color: #ffffff;
    padding: 0 14px;
    font-size: 13px;
    font-weight: 600;
    color: #94a3b8 !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.auth-footer-prompt {
    text-align: center;
    font-size: 14.5px;
    color: #475569 !important;
    margin: 0;
}

.auth-switch-link {
    font-weight: 700;
    color: var(--theme-primary, #f7971e) !important;
    text-decoration: none;
    margin-left: 6px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s ease;
}

.auth-switch-link:hover {
    color: var(--theme-primary, #f7971e) !important;
    text-decoration: underline;
}

@media (max-width: 576px) {
    .auth-card {
        padding: 30px 20px;
        border-radius: 18px;
    }
    .auth-title {
        font-size: 22px;
    }
    .auth-meta-row {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}
