/* Authentication Page Specific Styles */
:root {
    /* Add this missing variable */
    --gradient-hero: linear-gradient(135deg, #1e1b4b 0%, #3730a3 25%, #7c3aed 50%, #a855f7 75%, #c084fc 100%);
}
/* Body and Background */
.auth-body {
    min-height: 100vh;
    background: var(--gradient-hero);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    position: relative;
    overflow: hidden;
}

.auth-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.bg-shape {
    position: absolute;
    border-radius: 50%;
    background: rgba(109, 94, 250, 0.1);
    animation: float 6s ease-in-out infinite;
}

.shape-1 {
    width: 300px;
    height: 300px;
    top: 10%;
    left: 10%;
    animation-delay: -2s;
}

.shape-2 {
    width: 200px;
    height: 200px;
    top: 60%;
    right: 15%;
    animation-delay: -4s;
}

.shape-3 {
    width: 150px;
    height: 150px;
    bottom: 20%;
    left: 20%;
    animation-delay: -1s;
}

.bg-particles {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(2px 2px at 20px 30px, rgba(255,255,255,0.1), transparent),
        radial-gradient(2px 2px at 40px 70px, rgba(255,255,255,0.05), transparent),
        radial-gradient(1px 1px at 90px 40px, rgba(255,255,255,0.1), transparent),
        radial-gradient(1px 1px at 130px 80px, rgba(255,255,255,0.05), transparent);
    background-repeat: repeat;
    background-size: 200px 100px;
    animation: particles 20s linear infinite;
}

@keyframes particles {
    0% { transform: translateY(0); }
    100% { transform: translateY(-100px); }
}

/* Back to Home Link */
.back-home {
    position: fixed;
    top: 2rem;
    left: 2rem;
    z-index: 10;
}

.back-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.back-link:hover {
    color: white;
    transform: translateX(-3px);
    background: rgba(255, 255, 255, 0.15);
}

/* Main Auth Container */
.auth-container {
    display: grid;
    grid-template-columns: 1fr 35%;
    gap: 0;
    max-width: 1000px;
    width: 100%;
    min-height: 600px;
    background: rgba(23, 28, 38, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 1rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
    animation: slideUp 0.8s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Auth Card */
.auth-card {
    padding: 3rem;
    background: var(--bg-secondary);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-header .logo {
    margin-bottom: 1rem;
    font-size: 1.8rem;
}

.auth-subtitle {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin: 0;
}

/* Auth Tabs */
.auth-tabs {
    display: flex;
    background: var(--bg-tertiary);
    border-radius: 0.5rem;
    padding: 0.25rem;
    margin-bottom: 2rem;
}

.auth-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-weight: 500;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.auth-tab.active {
    background: var(--gradient);
    color: white;
    box-shadow: 0 2px 8px rgba(109, 94, 250, 0.3);
}

.auth-tab:not(.active):hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

/* Auth Forms */
.auth-form {
    display: none;
}

.auth-form.active {
    display: block;
    animation: fadeIn 0.3s ease-out;
}

/* Limit form width for better readability */
.auth-form form {
    max-width: 500px;
    width: 100%;
    margin: 0 auto;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Form Elements */
.form-group {
    margin-bottom: 1.5rem;
    position: relative;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.form-input {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    background: var(--bg-tertiary);
    border: 2px solid transparent;
    border-radius: 0.5rem;
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.3s ease;
    position: relative;
}

.form-input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(109, 94, 250, 0.1);
    background: rgba(31, 37, 49, 0.8);
}

.form-input::placeholder {
    color: var(--text-tertiary);
}

.input-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-tertiary);
    transition: color 0.3s ease;
    pointer-events: none;
}

.form-input:focus + .input-icon {
    color: var(--accent-primary);
}

/* Password Input */
.password-input-container {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-tertiary);
    cursor: pointer;
    font-size: 0.9rem;
    transition: color 0.3s ease;
    z-index: 2;
}

.password-toggle:hover {
    color: var(--text-primary);
}

/* Password Strength Meter */
.password-strength {
    margin-top: 0.5rem;
}

.strength-meter {
    width: 100%;
    height: 4px;
    background: var(--bg-tertiary);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 0.25rem;
}

.strength-fill {
    height: 100%;
    width: 0%;
    background: var(--danger);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.strength-fill.weak { 
    width: 25%; 
    background: var(--danger); 
}

.strength-fill.fair { 
    width: 50%; 
    background: var(--warning); 
}

.strength-fill.good { 
    width: 75%; 
    background: var(--success); 
}

.strength-fill.strong { 
    width: 100%; 
    background: var(--success); 
}

.strength-text {
    font-size: 0.8rem;
    color: var(--text-tertiary);
}

/* Form Options */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

/* Custom Checkbox */
.checkbox-container {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.checkbox-container input {
    display: none;
}

.checkmark {
    width: 18px;
    height: 18px;
    background: var(--bg-tertiary);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    margin-right: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    position: relative;
}

.checkbox-container:hover .checkmark {
    border-color: var(--accent-primary);
}

.checkbox-container input:checked ~ .checkmark {
    background: var(--gradient);
    border-color: var(--accent-primary);
}

.checkbox-container input:checked ~ .checkmark::after {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    color: white;
    font-size: 0.7rem;
}

.checkbox-label a {
    color: var(--accent-primary);
    text-decoration: none;
}

.checkbox-label a:hover {
    text-decoration: underline;
}

.forgot-password {
    color: var(--accent-primary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.forgot-password:hover {
    color: var(--accent-tertiary);
    text-decoration: underline;
}

/* Button Styles */
.btn-full {
    width: 100%;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.btn-loader {
    position: absolute;
    right: 1rem;
}

.btn-loader.hidden {
    display: none;
}

/* Social Login */
.social-login {
    margin-top: 2rem;
}

.divider {
    text-align: center;
    margin: 2rem 0 1.5rem;
    position: relative;
    color: var(--text-tertiary);
    font-size: 0.9rem;
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    z-index: -1;
}

.divider span {
    background: var(--bg-secondary);
    padding: 0 1rem;
}

.social-buttons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
}

.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.5rem;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.social-btn:hover {
    border-color: var(--accent-primary);
    background: rgba(109, 94, 250, 0.1);
    transform: translateY(-2px);
}

.social-icon {
    font-size: 1.1rem;
}

.google-btn:hover { border-color: #db4437; }
.microsoft-btn:hover { border-color: #00a1f1; }
.linkedin-btn:hover { border-color: #0077b5; }

/* Auth Footer */
.auth-footer {
    margin-top: 2rem;
    text-align: center;
}

.security-notice {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-tertiary);
}

.security-notice i {
    color: var(--success);
}

/* Side Panel */
.auth-side-panel {
    background: var(--gradient);
    padding: 3rem 2.5rem;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.auth-side-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg width="60" height="60" viewBox="0 0 60 60" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd"><g fill="%23ffffff" fill-opacity="0.05"><circle cx="7" cy="7" r="1"/><circle cx="27" cy="7" r="1"/><circle cx="47" cy="7" r="1"/><circle cx="7" cy="27" r="1"/><circle cx="27" cy="27" r="1"/><circle cx="47" cy="27" r="1"/><circle cx="7" cy="47" r="1"/><circle cx="27" cy="47" r="1"/><circle cx="47" cy="47" r="1"/></g></g></svg>') repeat;
    opacity: 0.3;
}

.panel-content {
    position: relative;
    z-index: 1;
}

.panel-content h3 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    color: white;
}

.panel-content > p {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2rem;
    font-size: 1rem;
}

.benefit-list {
    margin-bottom: 2rem;
}

.benefit-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.benefit-icon {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
}

.benefit-content h4 {
    color: white;
    margin-bottom: 0.25rem;
    font-size: 1rem;
}

.benefit-content p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    margin: 0;
    line-height: 1.4;
}

.testimonial {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 0.75rem;
    padding: 1.5rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.testimonial-content {
    margin-bottom: 1rem;
}

.testimonial-content i {
    color: rgba(255, 255, 255, 0.6);
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.testimonial-content p {
    color: white;
    font-style: italic;
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.5;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.testimonial-author img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.author-name {
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.1rem;
}

.author-title {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.8rem;
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.modal.hidden {
    display: none;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

.modal-content {
    background: var(--bg-secondary);
    border-radius: 1rem;
    width: 100%;
    max-width: 400px;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 1.5rem 0;
    margin-bottom: 1rem;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.3rem;
    color: var(--text-primary);
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-tertiary);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 0.25rem;
    transition: all 0.3s ease;
}

.modal-close:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.1);
}

.modal-body {
    padding: 0 1.5rem 1.5rem;
}

.modal-body p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.modal-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
}

/* Toast Notification */
.toast {
    position: fixed;
    top: 2rem;
    right: 2rem;
    background: var(--bg-secondary);
    border-radius: 0.75rem;
    padding: 1rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 1001;
    min-width: 300px;
    animation: toastSlideIn 0.3s ease-out;
}

.toast.hidden {
    display: none;
}

@keyframes toastSlideIn {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.toast-content {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.toast-icon {
    color: var(--success);
    font-size: 1.2rem;
    margin-top: 0.1rem;
}

.toast-icon.error {
    color: var(--danger);
}

.toast-title {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.2rem;
}

.toast-description {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.4;
}

.toast-close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: none;
    border: none;
    color: var(--text-tertiary);
    font-size: 0.9rem;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 0.25rem;
    transition: all 0.3s ease;
}

.toast-close:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.1);
}

/* Form Validation States */
.form-input.error {
    border-color: var(--danger);
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.form-input.success {
    border-color: var(--success);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.error-message {
    color: var(--danger);
    font-size: 0.8rem;
    margin-top: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.success-message {
    color: var(--success);
    font-size: 0.8rem;
    margin-top: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* Loading States */
.btn.loading {
    pointer-events: none;
    opacity: 0.7;
}

.btn.loading .btn-loader {
    display: block;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .auth-container {
        grid-template-columns: 1fr;
        max-width: 500px;
    }
    
    .auth-side-panel {
        display: none;
    }
}

@media (max-width: 768px) {
    .auth-body {
        padding: 1rem;
    }
    
    .auth-card {
        padding: 2rem 1.5rem;
    }
    
    .back-home {
        top: 1rem;
        left: 1rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }
    
    .social-buttons {
        grid-template-columns: 1fr;
    }
    
    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .toast {
        top: 1rem;
        right: 1rem;
        left: 1rem;
        min-width: auto;
    }
}

@media (max-width: 480px) {
    .auth-header .logo {
        font-size: 1.5rem;
    }
    
    .auth-card {
        padding: 1.5rem;
    }
    
    .modal-content {
        margin: 1rem;
    }
    
    .modal-actions {
        flex-direction: column-reverse;
    }
    
    .modal-actions .btn {
        width: 100%;
    }
}

/* Focus Trap for Accessibility */
.modal-content:focus {
    outline: none;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .form-input {
        border-color: rgba(255, 255, 255, 0.3);
    }
    
    .form-input:focus {
        border-color: var(--accent-primary);
        box-shadow: 0 0 0 2px var(--accent-primary);
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .bg-particles {
        animation: none;
    }
    
    .bg-shape {
        animation: none;
    }
}