:root {
    --auth-primary: #5A29E4;
    --auth-primary-dark: #4A1FC4;
    --auth-secondary: #7C3AED;
    --auth-accent: #10B981;
    --auth-error: #EF4444;
    --auth-bg: #F9FAFB;
    --auth-card-bg: #FFFFFF;
    --auth-border: #E5E7EB;
    --auth-text-primary: #111827;
    --auth-text-secondary: #6B7280;
    --auth-text-muted: #9CA3AF;
}

/* Auth Section */
.auth-section {
    min-height: calc(100vh - 80px);
    background: #f8fafc;
    padding: 4rem 2rem;
    position: relative;
    overflow: hidden;
}

.auth-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: none;
    pointer-events: none;
}

.auth-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    position: relative;
    z-index: 1;
}

/* Auth Card */
.auth-card {
    background: #FFFFFF;
    border-radius: 24px;
    padding: 3rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    opacity: 0;
    transform: translateX(-30px);
    transition: all 0.6s ease;
}

.auth-card.animate-in {
    opacity: 1;
    transform: translateX(0);
}

.auth-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.auth-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #5A29E4, #7C3AED);
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 10px 30px rgba(90, 41, 228, 0.3);
    color: #fff;
}

.auth-title {
    font-size: 2rem;
    font-weight: 700;
    color: #000000 !important;
    margin-bottom: 0.5rem;
}

.auth-subtitle {
    font-size: 1rem;
    color: #000000 !important;
}

/* Form Styles */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #000000 !important;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.label-icon {
    font-size: 1rem;
}

.form-input {
    padding: 0.875rem 1rem;
    border: 2px solid #E5E7EB;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #FFFFFF !important;
    color: #000000 !important;
    -webkit-text-fill-color: #000000 !important;
}

.form-input:focus {
    outline: none;
    border-color: #5A29E4;
    box-shadow: 0 0 0 4px rgba(90, 41, 228, 0.1);
    color: #000000 !important;
}

.form-input::placeholder {
    color: #9CA3AF !important;
    -webkit-text-fill-color: #9CA3AF !important;
}

/* Autocomplete fix for Chrome/Safari */
.form-input:-webkit-autofill,
.form-input:-webkit-autofill:hover,
.form-input:-webkit-autofill:focus,
.form-input:-webkit-autofill:active {
    -webkit-text-fill-color: #000000 !important;
    -webkit-box-shadow: 0 0 0 1000px #FFFFFF inset !important;
    box-shadow: 0 0 0 1000px #FFFFFF inset !important;
    transition: background-color 5000s ease-in-out 0s;
}

textarea.form-input {
    resize: vertical;
    min-height: 80px;
}

/* Password Input */
.password-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input-wrapper .form-input {
    padding-right: 3rem;
    width: 100%;
}

.password-toggle {
    position: absolute;
    right: 1rem;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    padding: 0.5rem;
    transition: transform 0.2s ease;
    color: #6B7280;
}

.password-toggle:hover {
    transform: scale(1.1);
    color: #5A29E4;
}

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

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

.checkbox-wrapper input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #5A29E4;
}

.checkbox-label {
    font-size: 0.9rem;
    color: #000000 !important;
    user-select: none;
}

.forgot-link {
    font-size: 0.9rem;
    color: #5A29E4;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.forgot-link:hover {
    color: #4A1FC4;
    text-decoration: underline;
}

/* Auth Button */
.btn-auth {
    padding: 1rem 1.5rem;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.btn-auth.btn-primary {
    background: linear-gradient(135deg, #5A29E4, #7C3AED);
    color: white;
    box-shadow: 0 4px 15px rgba(90, 41, 228, 0.3);
}

.btn-auth.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(90, 41, 228, 0.4);
}

.btn-auth.btn-primary:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-auth.btn-secondary {
    background: #F3F4F6;
    border: 1px solid #E5E7EB;
    color: #374151;
}

.btn-auth.btn-secondary:hover {
    background: #E5E7EB;
    border-color: #D1D5DB;
}

.btn-arrow {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.btn-auth:hover .btn-arrow {
    transform: translateX(5px);
}

/* Auth Divider */
.auth-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 1rem 0;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #E5E7EB;
}

.auth-divider span {
    padding: 0 1rem;
    color: #9CA3AF;
    font-size: 0.875rem;
}

/* Auth Links */
.auth-links {
    text-align: center;
    font-size: 0.9rem;
}

.auth-links p {
    color: #000000 !important;
    margin-bottom: 0.5rem;
}

.link-primary {
    color: #5A29E4;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.link-primary:hover {
    color: #4A1FC4;
    text-decoration: underline;
}

.link-secondary {
    color: #7C3AED;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.link-secondary:hover {
    color: #4A1FC4;
    text-decoration: underline;
}

/* Validation */
.validation-summary {
    background: #FEF2F2;
    border: 1px solid #FCA5A5;
    color: #EF4444;
    padding: 1rem;
    border-radius: 12px;
    font-size: 0.9rem;
}

.validation-summary ul {
    margin: 0;
    padding-left: 1.5rem;
}

.validation-error {
    color: #EF4444;
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

/* Info Panel */
.auth-info-panel {
    background: linear-gradient(135deg, #7c3aed, #6366f1);
    border-radius: 24px;
    padding: 3rem;
    border: none;
    opacity: 0;
    transform: translateX(30px);
    transition: all 0.6s ease 0.2s;
    box-shadow: 0 20px 60px rgba(124, 58, 237, 0.2);
}

.auth-info-panel.animate-in {
    opacity: 1;
    transform: translateX(0);
}

.info-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    color: white;
}

.info-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    width: fit-content;
}

.badge-pulse {
    width: 8px;
    height: 8px;
    background: #10B981;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(1.2);
    }
}

.info-title {
    font-size: 2rem;
    font-weight: 700;
    margin: 0;
}

.info-description {
    font-size: 1.1rem;
    line-height: 1.6;
    opacity: 0.9;
}

/* Info Features */
.info-features {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.feature-icon {
    font-size: 1.25rem;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    flex-shrink: 0;
    color: #fff;
}

.feature-text h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 0.25rem 0;
}

.feature-text p {
    font-size: 0.95rem;
    opacity: 0.8;
    margin: 0;
}

/* Info Stats */
.info-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 1rem;
}

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

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: white;
    border-radius: 24px;
    padding: 2.5rem;
    max-width: 480px;
    width: 90%;
    position: relative;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.modal-overlay.show .modal-content {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #9CA3AF;
    transition: color 0.3s ease;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    color: #111827;
}

.modal-header {
    text-align: center;
    margin-bottom: 2rem;
}

.modal-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.modal-header h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #111827;
    margin: 0 0 0.5rem 0;
}

.modal-header p {
    color: #6B7280;
    font-size: 0.95rem;
}

.modal-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* States */
.alert {
    padding: 0.875rem 1rem;
    border-radius: 12px;
    margin-bottom: 0;
    font-size: 0.9rem;
}

.alert-danger {
    background: #FEF2F2;
    border: 1px solid #FCA5A5;
    color: #EF4444;
}

.required {
    color: #EF4444;
    font-weight: 400;
}

.form-input.error {
    border-color: #EF4444;
}

.field-error {
    display: block;
    margin-top: 0.15rem;
    font-size: 0.8rem;
    color: #EF4444;
    min-height: 0;
}

.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: auth-spin 0.8s linear infinite;
}

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

/* Responsive */
@media (max-width: 968px) {
    .auth-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .auth-info-panel {
        order: -1;
        padding: 2rem;
    }

    .info-title {
        font-size: 1.5rem;
    }

    .info-stats {
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
    }

    .stat-number {
        font-size: 1.5rem;
    }

    .stat-label {
        font-size: 0.8rem;
    }
}

@media (max-width: 640px) {
    .auth-section {
        padding: 2rem 1rem;
    }

    .auth-card {
        padding: 2rem 1.5rem;
    }

    .auth-title {
        font-size: 1.5rem;
    }

    .auth-icon {
        width: 60px;
        height: 60px;
        font-size: 2rem;
    }

    .info-features {
        gap: 1rem;
    }

    .feature-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .feature-text h4 {
        font-size: 1rem;
    }

    .feature-text p {
        font-size: 0.875rem;
    }

    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
}
