/* Authentication Pages Styles */

/* Base Auth Layout */
.auth-body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    font-family: 'Inter', sans-serif;
}

.auth-navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    z-index: 1000;
}

.auth-navbar .nav-container {
    padding: 1rem 2rem;
}

.auth-navbar .nav-logo a {
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 700;
}

.auth-navbar .nav-link {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    transition: color 0.2s ease;
}

.auth-navbar .nav-link:hover {
    color: white;
}

/* Main Content */
.auth-main {
    padding-top: 80px;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    background: white;
    border-radius: 2rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    min-height: 600px;
}

/* Branding Section */
.auth-branding {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    color: white;
    padding: 3rem;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.auth-branding::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><defs><pattern id="grid" width="50" height="50" patternUnits="userSpaceOnUse"><path d="M 50 0 L 0 0 0 50" fill="none" stroke="rgba(255,255,255,0.05)" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(%23grid)"/></svg>');
    opacity: 0.5;
}

.branding-content {
    position: relative;
    z-index: 1;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.brand-logo i {
    font-size: 2.5rem;
    color: var(--secondary-color);
}

.brand-logo h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0;
}

.branding-content h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: white;
}

.branding-content > p {
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2rem;
    line-height: 1.6;
}

/* Features List */
.features-list {
    margin-bottom: 2rem;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    color: rgba(255, 255, 255, 0.9);
}

.feature-item i {
    width: 2rem;
    height: 2rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--secondary-color);
    font-size: 0.875rem;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 2rem;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.8);
}

/* Testimonial */
.testimonial {
    margin-top: 2rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
    backdrop-filter: blur(10px);
}

.testimonial-content p {
    font-style: italic;
    margin-bottom: 1rem;
    color: rgba(255, 255, 255, 0.9);
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.author-avatar {
    width: 2.5rem;
    height: 2.5rem;
    background: var(--secondary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: white;
    font-size: 0.875rem;
}

.author-name {
    font-weight: 600;
    color: white;
    font-size: 0.875rem;
}

.author-title {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.7);
}

/* Form Container */
.auth-form-container {
    padding: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-form-wrapper {
    width: 100%;
    max-width: 400px;
}

/* Form Header */
.form-header {
    text-align: center;
    margin-bottom: 2rem;
}

.form-header h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.form-header p {
    color: var(--text-secondary);
    font-size: 1rem;
}

/* Form Styles */
.auth-form {
    margin-bottom: 2rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    border: 2px solid var(--border-color);
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: all 0.2s ease;
    background: white;
}

.input-wrapper input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.input-icon {
    position: absolute;
    left: 0.75rem;
    color: var(--text-light);
    z-index: 1;
}

.password-toggle {
    position: absolute;
    right: 0.75rem;
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 0.25rem;
    transition: color 0.2s ease;
}

.password-toggle:hover {
    color: var(--text-secondary);
}

.username-check {
    position: absolute;
    right: 0.75rem;
    color: var(--accent-color);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.username-check.visible {
    opacity: 1;
}

/* Input Hints */
.input-hint {
    font-size: 0.75rem;
    color: var(--text-light);
    margin-top: 0.25rem;
}

/* Password Strength */
.password-strength {
    margin-top: 0.5rem;
}

.strength-bar {
    width: 100%;
    height: 4px;
    background: var(--bg-tertiary);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 0.25rem;
}

.strength-fill {
    height: 100%;
    background: var(--border-color);
    transition: all 0.3s ease;
    width: 0%;
}

.strength-fill.weak {
    background: #ef4444;
    width: 25%;
}

.strength-fill.fair {
    background: #f59e0b;
    width: 50%;
}

.strength-fill.good {
    background: #3b82f6;
    width: 75%;
}

.strength-fill.strong {
    background: #10b981;
    width: 100%;
}

.strength-text {
    font-size: 0.75rem;
    color: var(--text-light);
}

/* Form Options */
.form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.forgot-link {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
}

.forgot-link:hover {
    text-decoration: underline;
}

/* Checkboxes */
.form-checkboxes {
    margin-bottom: 1.5rem;
}

.checkbox-container {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 1rem;
    cursor: pointer;
    font-size: 0.875rem;
    line-height: 1.4;
}

.checkbox-container input {
    display: none;
}

.checkmark {
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid var(--border-color);
    border-radius: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
    margin-top: 0.125rem;
}

.checkbox-container input:checked + .checkmark {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.checkbox-container input:checked + .checkmark::after {
    content: '\2713';
    color: white;
    font-size: 0.875rem;
    font-weight: bold;
}

.checkbox-container a {
    color: var(--primary-color);
    text-decoration: none;
}

.checkbox-container a:hover {
    text-decoration: underline;
}

/* Buttons */
.btn-full {
    width: 100%;
    justify-content: center;
    position: relative;
    margin-bottom: 1.5rem;
}

.btn-text {
    transition: opacity 0.2s ease;
}

.btn-loader {
    position: absolute;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.btn.loading .btn-text {
    opacity: 0;
}

.btn.loading .btn-loader {
    opacity: 1;
}

/* Divider */
.divider {
    text-align: center;
    margin: 1.5rem 0;
    position: relative;
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--border-color);
}

.divider span {
    background: white;
    padding: 0 1rem;
    color: var(--text-light);
    font-size: 0.875rem;
    position: relative;
    z-index: 1;
}

/* Social Login */
.social-login {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.btn-social {
    width: 100%;
    justify-content: center;
    background: white;
    color: var(--text-primary);
    border: 2px solid var(--border-color);
    font-weight: 500;
}

.btn-social:hover {
    background: var(--bg-secondary);
    border-color: var(--text-light);
}

.btn-google:hover {
    border-color: #db4437;
    color: #db4437;
}

.btn-apple:hover {
    border-color: #000;
    color: #000;
}

/* Admin Toggle */
.admin-toggle {
    text-align: center;
    margin-top: 1rem;
}

.admin-toggle-btn {
    background: none;
    border: none;
    color: var(--text-light);
    font-size: 0.875rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0 auto;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
}

.admin-toggle-btn:hover {
    background: var(--bg-secondary);
    color: var(--primary-color);
}

/* Form Footer */
.form-footer {
    text-align: center;
}

.form-footer p {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.signup-link,
.login-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.signup-link:hover,
.login-link:hover {
    text-decoration: underline;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.loading-overlay.active {
    opacity: 1;
    visibility: visible;
}

.loading-content {
    background: white;
    padding: 2rem;
    border-radius: 1rem;
    text-align: center;
    box-shadow: var(--shadow-xl);
}

.loading-spinner {
    width: 2rem;
    height: 2rem;
    border: 3px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: white;
    border-radius: 1rem;
    max-width: 400px;
    width: 90%;
    box-shadow: var(--shadow-xl);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.modal.active .modal-content {
    transform: scale(1);
}

.modal-header {
    padding: 1.5rem 1.5rem 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 0.25rem;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: var(--bg-secondary);
    color: var(--text-secondary);
}

.modal-body {
    padding: 1.5rem;
    text-align: center;
}

.success-icon,
.error-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.success-icon {
    color: var(--accent-color);
}

.error-icon {
    color: #ef4444;
}

.modal-body p {
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0;
}

.modal-footer {
    padding: 0 1.5rem 1.5rem;
    display: flex;
    justify-content: center;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .auth-container {
        grid-template-columns: 1fr;
        margin: 1rem;
        max-width: 500px;
    }
    
    .auth-branding {
        display: none;
    }
    
    .auth-form-container {
        padding: 2rem;
    }
}

@media (max-width: 768px) {
    .auth-main {
        padding: 1rem;
    }
    
    .auth-container {
        margin: 0;
        border-radius: 1rem;
    }
    
    .auth-form-container {
        padding: 1.5rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .social-login {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .auth-navbar .nav-container {
        padding: 1rem;
    }
    
    .auth-navbar .nav-logo a {
        font-size: 1.25rem;
    }
    
    .form-header h2 {
        font-size: 1.5rem;
    }
    
    .modal-content {
        width: 95%;
        margin: 1rem;
    }
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.3s ease;
}

.slide-up {
    animation: slideUp 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Form Validation States */
.input-wrapper.success input {
    border-color: var(--accent-color);
}

.input-wrapper.error input {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.error-message {
    color: #ef4444;
    font-size: 0.75rem;
    margin-top: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.success-message {
    color: var(--accent-color);
    font-size: 0.75rem;
    margin-top: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}
