/* =====================================================
   MONEY DIPLOMATIC - AUTHENTICATION STYLES
   Login, Register, Password Recovery
   ===================================================== */

/* ==================== AUTH LAYOUT ==================== */
.auth-page {
    min-height: 100vh;
    display: flex;
    background: var(--bg-primary);
}

.auth-container {
    display: flex;
    width: 100%;
    min-height: 100vh;
}

/* ==================== AUTH SIDEBAR ==================== */
.auth-sidebar {
    width: 45%;
    background: var(--bg-secondary);
    padding: 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.auth-sidebar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        linear-gradient(135deg, rgba(212, 175, 55, 0.05) 0%, transparent 50%),
        linear-gradient(225deg, rgba(10, 132, 255, 0.03) 0%, transparent 50%);
    z-index: 0;
}

.auth-sidebar-content {
    position: relative;
    z-index: 1;
}

.auth-sidebar .logo {
    margin-bottom: 60px;
}

.auth-sidebar h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--gold) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-sidebar p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 40px;
}

.auth-features {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.auth-feature {
    display: flex;
    align-items: center;
    gap: 16px;
}

.auth-feature-icon {
    width: 48px;
    height: 48px;
    background: rgba(212, 175, 55, 0.1);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.auth-feature-icon i {
    color: var(--gold);
    font-size: 1.2rem;
}

.auth-feature-text h4 {
    font-size: 1rem;
    margin-bottom: 4px;
}

.auth-feature-text p {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin: 0;
}

/* Grid Background */
.auth-grid-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        linear-gradient(rgba(212, 175, 55, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(212, 175, 55, 0.02) 1px, transparent 1px);
    background-size: 40px 40px;
    z-index: 0;
}

/* ==================== AUTH MAIN ==================== */
.auth-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.auth-form-container {
    width: 100%;
    max-width: 440px;
}

.auth-form-header {
    text-align: center;
    margin-bottom: 40px;
}

.auth-form-header h1 {
    font-size: 2rem;
    margin-bottom: 12px;
}

.auth-form-header p {
    color: var(--text-secondary);
}

/* ==================== FORM STYLES ==================== */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
}

.form-input-wrapper {
    position: relative;
}

.form-input {
    width: 100%;
    padding: 16px 20px;
    padding-left: 48px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: var(--font-primary);
    font-size: 1rem;
    transition: all var(--transition-fast);
}

.form-input:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px var(--glow-gold);
}

.form-input::placeholder {
    color: var(--text-muted);
}

.form-input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1rem;
}

.form-input:focus + .form-input-icon,
.form-input:not(:placeholder-shown) + .form-input-icon {
    color: var(--gold);
}

.password-toggle {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    transition: color var(--transition-fast);
}

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

/* Form Options Row */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.checkbox-input {
    display: none;
}

.checkbox-custom {
    width: 20px;
    height: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.checkbox-input:checked + .checkbox-custom {
    background: var(--gold);
    border-color: var(--gold);
}

.checkbox-custom i {
    color: var(--bg-primary);
    font-size: 0.7rem;
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.checkbox-input:checked + .checkbox-custom i {
    opacity: 1;
}

.checkbox-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.forgot-password {
    font-size: 0.9rem;
    color: var(--gold);
}

/* Submit Button */
.auth-submit {
    margin-top: 8px;
}

.auth-submit .btn {
    width: 100%;
    padding: 18px;
    font-size: 1rem;
}

/* Divider */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 20px;
    margin: 8px 0;
}

.auth-divider span {
    font-size: 0.85rem;
    color: var(--text-muted);
    white-space: nowrap;
}

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

/* Social Login */
.social-login {
    display: flex;
    gap: 12px;
}

.social-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-secondary);
    font-family: var(--font-primary);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.social-btn:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-light);
    color: var(--text-primary);
}

.social-btn i {
    font-size: 1.2rem;
}

/* Auth Footer */
.auth-footer {
    text-align: center;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
}

.auth-footer p {
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.auth-footer a {
    color: var(--gold);
    font-weight: 500;
}

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

.strength-bar {
    height: 4px;
    background: var(--border-color);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 8px;
}

.strength-fill {
    height: 100%;
    width: 0;
    border-radius: 2px;
    transition: all var(--transition-medium);
}

.strength-fill.weak { width: 25%; background: var(--danger); }
.strength-fill.fair { width: 50%; background: var(--warning); }
.strength-fill.good { width: 75%; background: var(--info); }
.strength-fill.strong { width: 100%; background: var(--success); }

.strength-text {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ==================== FORM MESSAGES ==================== */
.form-error {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: rgba(255, 82, 82, 0.1);
    border: 1px solid rgba(255, 82, 82, 0.3);
    border-radius: 8px;
    color: var(--danger);
    font-size: 0.9rem;
}

.form-success {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: rgba(0, 200, 83, 0.1);
    border: 1px solid rgba(0, 200, 83, 0.3);
    border-radius: 8px;
    color: var(--success);
    font-size: 0.9rem;
}

.input-error {
    border-color: var(--danger) !important;
}

.input-error:focus {
    box-shadow: 0 0 0 3px rgba(255, 82, 82, 0.15) !important;
}

.error-message {
    font-size: 0.8rem;
    color: var(--danger);
    margin-top: 4px;
}

/* ==================== PACK SELECTION ==================== */
.pack-selection {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.pack-option {
    position: relative;
}

.pack-option input {
    display: none;
}

.pack-option-label {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.pack-option input:checked + .pack-option-label {
    border-color: var(--gold);
    background: rgba(212, 175, 55, 0.05);
}

.pack-radio {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all var(--transition-fast);
}

.pack-option input:checked + .pack-option-label .pack-radio {
    border-color: var(--gold);
}

.pack-radio::after {
    content: '';
    width: 10px;
    height: 10px;
    background: var(--gold);
    border-radius: 50%;
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.pack-option input:checked + .pack-option-label .pack-radio::after {
    opacity: 1;
}

.pack-info {
    flex: 1;
}

.pack-info h4 {
    font-size: 1rem;
    margin-bottom: 4px;
}

.pack-info p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 0;
}

.pack-price {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--gold);
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 1024px) {
    .auth-sidebar {
        width: 40%;
        padding: 40px;
    }
    
    .auth-sidebar h2 {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .auth-container {
        flex-direction: column;
    }
    
    .auth-sidebar {
        width: 100%;
        padding: 40px 24px;
        min-height: auto;
    }
    
    .auth-sidebar .logo {
        margin-bottom: 30px;
    }
    
    .auth-sidebar h2 {
        font-size: 1.75rem;
    }
    
    .auth-features {
        display: none;
    }
    
    .auth-main {
        padding: 40px 24px;
    }
    
    .social-login {
        flex-direction: column;
    }
}

/* ==================== LOADING STATE ==================== */
.btn-loading {
    position: relative;
    pointer-events: none;
}

.btn-loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.btn-loading span {
    opacity: 0;
}

/* ==================== VERIFICATION CODE ==================== */
.verification-code {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.verification-input {
    width: 56px;
    height: 64px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    text-align: center;
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    transition: all var(--transition-fast);
}

.verification-input:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px var(--glow-gold);
}

.verification-input.filled {
    border-color: var(--gold);
    background: rgba(212, 175, 55, 0.05);
}

/* Resend Code */
.resend-code {
    text-align: center;
    margin-top: 24px;
}

.resend-code p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.resend-code button {
    background: none;
    border: none;
    color: var(--gold);
    font-family: var(--font-primary);
    font-size: 0.9rem;
    cursor: pointer;
    transition: color var(--transition-fast);
}

.resend-code button:hover {
    color: var(--gold-light);
}

.resend-code button:disabled {
    color: var(--text-muted);
    cursor: not-allowed;
}
