/**
 * Authentication Pages Styles - Premium Black & Gold Theme
 */

.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-lg);
    position: relative;
    overflow: hidden;
    background: #0a0a0a;
}

/* Premium Gold Animated Background */
.auth-bg {
    position: absolute;
    inset: 0;
    z-index: -1;
}

.auth-bg::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: 
        radial-gradient(circle at 20% 80%, rgba(212, 168, 83, 0.12) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(169, 124, 47, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(240, 216, 144, 0.08) 0%, transparent 40%);
    animation: bgPulse 15s ease infinite;
}

@keyframes bgPulse {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(-2%, 2%) scale(1.02); }
    50% { transform: translate(2%, -2%) scale(1); }
    75% { transform: translate(-1%, -1%) scale(1.01); }
}

/* Subtle Grid Pattern */
.auth-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(rgba(212, 168, 83, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(212, 168, 83, 0.02) 1px, transparent 1px);
    background-size: 60px 60px;
}

/* Floating Gold Orbs */
.auth-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.4;
    animation: float 20s ease-in-out infinite;
}

.auth-orb-1 {
    width: 400px;
    height: 400px;
    background: linear-gradient(135deg, #d4a853, #a07c2f);
    top: -100px;
    right: -100px;
    animation-delay: 0s;
}

.auth-orb-2 {
    width: 300px;
    height: 300px;
    background: linear-gradient(135deg, #c9963c, #d4a853);
    bottom: -50px;
    left: -50px;
    animation-delay: -5s;
}

.auth-orb-3 {
    width: 200px;
    height: 200px;
    background: #f0d890;
    top: 50%;
    left: 30%;
    animation-delay: -10s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(10px, -20px) rotate(5deg); }
    50% { transform: translate(-10px, 10px) rotate(-5deg); }
    75% { transform: translate(20px, 10px) rotate(3deg); }
}

/* Auth Card - Premium Glass */
.auth-card {
    width: 100%;
    max-width: 440px;
    background: rgba(20, 20, 22, 0.85);
    backdrop-filter: blur(24px);
    border: 1px solid rgba(212, 168, 83, 0.15);
    border-radius: var(--radius-2xl);
    padding: var(--spacing-2xl);
    box-shadow: 
        0 25px 50px -12px rgba(0, 0, 0, 0.6),
        0 0 80px rgba(212, 168, 83, 0.05);
    position: relative;
    animation: slideUp 0.5s ease;
}

.auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 3px;
    background: linear-gradient(90deg, transparent, #d4a853, #f0d890, #d4a853, transparent);
    border-radius: 0 0 var(--radius-full) var(--radius-full);
}

/* Logo Section */
.auth-logo {
    text-align: center;
    margin-bottom: var(--spacing-xl);
}

.auth-logo-img {
    width: 72px;
    height: 72px;
    margin: 0 auto var(--spacing-md);
    border-radius: var(--radius-xl);
    filter: drop-shadow(0 4px 20px rgba(212, 168, 83, 0.3));
    animation: logoGlow 3s ease infinite;
}

@keyframes logoGlow {
    0%, 100% { filter: drop-shadow(0 4px 20px rgba(212, 168, 83, 0.3)); }
    50% { filter: drop-shadow(0 4px 30px rgba(212, 168, 83, 0.5)); }
}

.auth-logo-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, #d4a853 0%, #a07c2f 100%);
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #0a0a0a;
    margin: 0 auto var(--spacing-md);
    box-shadow: 0 8px 32px rgba(212, 168, 83, 0.3);
    animation: glow 3s ease infinite;
}

@keyframes glow {
    0%, 100% { box-shadow: 0 8px 32px rgba(212, 168, 83, 0.3); }
    50% { box-shadow: 0 8px 48px rgba(212, 168, 83, 0.5); }
}

.auth-logo-text {
    font-size: 1.75rem;
    font-weight: 700;
    background: linear-gradient(135deg, #d4a853 0%, #f0d890 50%, #c9963c 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-logo-subtitle {
    font-size: 0.8rem;
    color: #7a7a75;
    margin-top: var(--spacing-xs);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

/* Auth Header */
.auth-header {
    text-align: center;
    margin-bottom: var(--spacing-xl);
}

.auth-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: var(--spacing-sm);
    color: #fafaf9;
}

.auth-subtitle {
    font-size: 0.9375rem;
    color: #b5b5b0;
}

/* Form Enhancements */
.auth-form .form-group {
    margin-bottom: var(--spacing-lg);
}

.auth-form .form-label {
    color: #b5b5b0;
    font-size: 0.875rem;
    margin-bottom: var(--spacing-sm);
}

.auth-form .form-input {
    padding: var(--spacing-md) var(--spacing-lg);
    background: rgba(212, 168, 83, 0.03);
    border: 1px solid rgba(212, 168, 83, 0.15);
    border-radius: var(--radius-lg);
    color: #fafaf9;
    transition: all 0.2s ease;
}

.auth-form .form-input:focus {
    background: rgba(212, 168, 83, 0.05);
    border-color: #d4a853;
    box-shadow: 0 0 0 3px rgba(212, 168, 83, 0.15);
    outline: none;
}

.auth-form .form-input::placeholder {
    color: #5a5a55;
}

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

.input-icon-wrapper .form-input {
    padding-left: 48px;
}

.input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #5a5a55;
    width: 20px;
    height: 20px;
    transition: color 0.2s ease;
}

.input-icon-wrapper:focus-within .input-icon {
    color: #d4a853;
}

.password-toggle {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #5a5a55;
    cursor: pointer;
    padding: 4px;
    transition: color 0.2s ease;
}

.password-toggle:hover {
    color: #d4a853;
}

/* Remember & Forgot */
.auth-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--spacing-lg);
    font-size: 0.875rem;
}

.auth-options a {
    color: #d4a853;
    transition: color 0.2s ease;
}

.auth-options a:hover {
    color: #f0d890;
    text-decoration: underline;
}

.auth-options .form-check-label {
    color: #b5b5b0;
}

.auth-options .form-check-input {
    accent-color: #d4a853;
}

/* ========================================
   CHECKBOX ALIGNMENT FIXES
   ======================================== */

/* Fix for all checkbox/label alignments */
.form-check {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    padding-left: 0 !important;
    margin: 1.5rem 0 !important;
    cursor: pointer;
    text-align: left !important;
    justify-content: flex-start !important;
}

.form-check-input {
    margin: 0 !important;
    position: static !important;
    width: 18px !important;
    height: 18px !important;
    flex-shrink: 0 !important;
    cursor: pointer;
    accent-color: #d4a853;
}

.form-check span,
.form-check label {
    margin: 0 !important;
    display: inline !important;
    line-height: 1.5 !important;
    color: #b5b5b0 !important;
    font-size: 0.875rem !important;
    cursor: pointer;
}

.form-check a {
    color: #d4a853 !important;
    text-decoration: none;
}

.form-check a:hover {
    color: #f0d890 !important;
    text-decoration: underline;
}

/* Specific fix for auth-options checkboxes (Remember me) */
.auth-options .form-check {
    margin: 0 !important;
    gap: 8px !important;
}

.auth-options .form-check-input {
    width: 16px !important;
    height: 16px !important;
}


/* Submit Button - Gold */
.auth-submit {
    width: 100%;
    padding: var(--spacing-md);
    font-size: 1rem;
    font-weight: 600;
    background: linear-gradient(135deg, #d4a853 0%, #c9963c 100%);
    color: #0a0a0a;
    border: none;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 15px rgba(212, 168, 83, 0.25);
}

.auth-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(212, 168, 83, 0.35);
}

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

/* Divider */
.auth-divider {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    margin: var(--spacing-xl) 0;
    color: #5a5a55;
    font-size: 0.8125rem;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(212, 168, 83, 0.2), transparent);
}

/* Social Login */
.social-buttons {
    display: flex;
    gap: var(--spacing-md);
}

.social-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-md);
    background: rgba(212, 168, 83, 0.05);
    border: 1px solid rgba(212, 168, 83, 0.15);
    border-radius: var(--radius-lg);
    color: #fafaf9;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.social-btn:hover {
    background: rgba(212, 168, 83, 0.1);
    border-color: rgba(212, 168, 83, 0.25);
}

.social-btn svg {
    width: 20px;
    height: 20px;
}

/* Footer Link */
.auth-footer {
    text-align: center;
    margin-top: var(--spacing-xl);
    font-size: 0.9375rem;
    color: #b5b5b0;
}

.auth-footer a {
    color: #d4a853;
    font-weight: 500;
    transition: color 0.2s ease;
}

.auth-footer a:hover {
    color: #f0d890;
    text-decoration: underline;
}

/* Alert Styles */
.alert {
    padding: var(--spacing-md) var(--spacing-lg);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}

.alert-error {
    background: rgba(248, 113, 113, 0.1);
    border: 1px solid rgba(248, 113, 113, 0.3);
    color: #f87171;
}

.alert-success {
    background: rgba(74, 222, 128, 0.1);
    border: 1px solid rgba(74, 222, 128, 0.3);
    color: #4ade80;
}

/* Success Animation */
.auth-success {
    text-align: center;
    padding: var(--spacing-xl);
}

.success-icon {
    width: 80px;
    height: 80px;
    background: rgba(74, 222, 128, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--spacing-lg);
    color: #4ade80;
    font-size: 2.5rem;
    animation: successPop 0.4s ease;
}

@keyframes successPop {
    0% { transform: scale(0); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* Error Shake Animation */
.shake {
    animation: shake 0.4s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

/* Loading State */
.auth-loading {
    position: relative;
    pointer-events: none;
}

.auth-loading .btn-text {
    opacity: 0;
}

.auth-loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 2px solid transparent;
    border-top-color: #0a0a0a;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Two Column Layout for larger screens */
@media (min-width: 1024px) {
    .auth-wrapper.split {
        padding: 0;
    }
    
    .auth-split-left {
        flex: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: var(--spacing-2xl);
        background: #0f0f10;
        position: relative;
        overflow: hidden;
    }
    
    .auth-split-right {
        flex: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: var(--spacing-2xl);
    }
    
    .auth-split-left .auth-card {
        max-width: 100%;
        background: transparent;
        border: none;
        box-shadow: none;
    }
    
    .auth-illustration {
        max-width: 500px;
    }
    
    .auth-illustration img {
        width: 100%;
        height: auto;
    }
}

/* Responsive */
@media (max-width: 480px) {
    .auth-card {
        padding: var(--spacing-lg);
    }
    
    .auth-logo-img {
        width: 60px;
        height: 60px;
    }
    
    .auth-logo-icon {
        width: 56px;
        height: 56px;
        font-size: 1.5rem;
    }
    
    .auth-logo-text {
        font-size: 1.5rem;
    }
    
    .social-buttons {
        flex-direction: column;
    }
}
