/* app/static/css/pages/auth.css */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--background) 0%, var(--primary-blue-light) 100%);
    padding: var(--space-xl) var(--space-md);
}

[data-theme="dark"] .auth-page {
    background: linear-gradient(135deg, var(--background-dark) 0%, #1a1f2e 100%);
}

.auth-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    max-width: 1000px;
    width: 100%;
    background: var(--surface);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    min-height: 600px;
}

.auth-card {
    padding: var(--space-2xl);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.auth-header {
    text-align: center;
    margin-bottom: var(--space-2xl);
}

.auth-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: var(--space-lg);
    color: var(--text-dark);
}

.auth-logo i {
    color: var(--primary-blue);
}

.auth-header h1 {
    font-size: 2rem;
    margin-bottom: var(--space-sm);
    color: var(--text-dark);
}

.auth-header p {
    color: var(--text-soft);
    font-size: 1.125rem;
}

/* Form Styles */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.form-label {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-weight: 500;
    color: var(--text-dark);
    font-size: 0.875rem;
}

.form-label i {
    color: var(--text-soft);
    width: 16px;
}

.form-input {
    padding: var(--space-md) var(--space-lg);
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-family: 'Space Grotesk', sans-serif;
    transition: all var(--transition-normal);
    background: var(--surface);
    color: var(--text-dark);
    width: 100%;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(42, 104, 255, 0.1);
}

.form-input::placeholder {
    color: var(--text-soft);
    opacity: 0.7;
}

.form-error {
    color: var(--error);
    font-size: 0.875rem;
    min-height: 1.25rem;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.form-error::before {
    content: '⚠';
    font-size: 0.75rem;
}

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

.password-wrapper .form-input {
    padding-right: 50px;
}

.password-toggle {
    position: absolute;
    right: var(--space-md);
    background: none;
    border: none;
    color: var(--text-soft);
    cursor: pointer;
    padding: var(--space-sm);
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
}

.password-toggle:hover {
    color: var(--primary-blue);
    background: var(--primary-blue-light);
}

.password-toggle:focus {
    outline: 2px solid var(--primary-blue);
    outline-offset: 2px;
}

/* Password Strength */
.password-strength {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-top: var(--space-sm);
}

.strength-bar {
    flex: 1;
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    overflow: hidden;
}

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

.strength-text {
    font-size: 0.75rem;
    font-weight: 500;
    min-width: 40px;
}

/* Checkbox Styles */
.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: var(--space-sm);
    cursor: pointer;
    font-size: 0.875rem;
    color: var(--text-soft);
    line-height: 1.4;
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-normal);
    flex-shrink: 0;
    margin-top: 2px;
}

.checkmark::after {
    content: '✓';
    color: white;
    font-size: 0.75rem;
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.checkbox-label input[type="checkbox"]:checked + .checkmark {
    background: var(--primary-blue);
    border-color: var(--primary-blue);
}

.checkbox-label input[type="checkbox"]:checked + .checkmark::after {
    opacity: 1;
}

/* Form Options */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: var(--space-sm);
}

.forgot-link {
    color: var(--primary-blue);
    font-size: 0.875rem;
    text-decoration: none;
    white-space: nowrap;
}

.forgot-link:hover {
    text-decoration: underline;
}

.inline-link {
    color: var(--primary-blue);
    text-decoration: none;
}

.inline-link:hover {
    text-decoration: underline;
}

/* Auth Buttons */
.auth-submit {
    margin-top: var(--space-sm);
    transition: all var(--transition-normal);
}

.auth-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.auth-submit:disabled:hover {
    background: var(--primary-blue);
    transform: none;
    box-shadow: none;
}

.auth-submit.loading {
    pointer-events: none;
    opacity: 0.8;
}

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

.auth-link {
    color: var(--primary-blue);
    font-weight: 500;
    text-decoration: none;
}

.auth-link:hover {
    text-decoration: underline;
}

/* Auth Hero */
.auth-hero {
    background: linear-gradient(135deg, var(--primary-blue), var(--accent-purple));
    color: white;
    padding: var(--space-2xl);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.auth-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.1'%3E%3Ccircle cx='30' cy='30' r='2'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 400px;
}

.hero-icon {
    font-size: 4rem;
    margin-bottom: var(--space-lg);
    opacity: 0.9;
}

.hero-content h2 {
    color: white;
    margin-bottom: var(--space-md);
    font-size: 1.75rem;
}

.hero-content p {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: var(--space-xl);
    line-height: 1.6;
}

/* Features & Benefits */
.hero-features,
.hero-benefits {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.feature,
.benefit {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    color: rgba(255, 255, 255, 0.9);
    text-align: left;
}

.feature i,
.benefit i {
    width: 20px;
    text-align: center;
    opacity: 0.8;
    flex-shrink: 0;
}

.benefit i {
    color: #4ade80;
}

/* Toast Notifications */
.toast {
    position: fixed;
    top: 100px;
    right: var(--space-md);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    box-shadow: var(--shadow-lg);
    max-width: 400px;
    z-index: 10000;
    transform: translateX(400px);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.toast.show {
    transform: translateX(0);
}

.toast-content {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    flex: 1;
}

.toast-error {
    border-left: 4px solid var(--error);
}

.toast-success {
    border-left: 4px solid var(--success);
}

.toast-warning {
    border-left: 4px solid var(--warning);
}

.toast-close {
    background: none;
    border: none;
    color: var(--text-soft);
    cursor: pointer;
    padding: var(--space-sm);
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.toast-close:hover {
    color: var(--text-dark);
    background: var(--background);
}

/* Responsive Design */
@media (max-width: 768px) {
    .auth-container {
        grid-template-columns: 1fr;
        max-width: 400px;
    }
    
    .auth-hero {
        display: none;
    }
    
    .auth-card {
        padding: var(--space-xl);
    }
    
    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-md);
    }
    
    .forgot-link {
        align-self: flex-end;
    }
}

/* Animations */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-card {
    animation: slideUp 0.6s ease;
}

.form-group {
    animation: slideUp 0.6s ease;
    animation-fill-mode: both;
}

.form-group:nth-child(1) { animation-delay: 0.1s; }
.form-group:nth-child(2) { animation-delay: 0.2s; }
.form-group:nth-child(3) { animation-delay: 0.3s; }
.form-group:nth-child(4) { animation-delay: 0.4s; }
/* Enhanced password toggle visibility */
.password-toggle {
    z-index: 2;
}

/* Better focus states for accessibility */
.password-toggle:focus-visible {
    outline: 2px solid var(--primary-blue);
    outline-offset: 2px;
}

/* Theme toggle button styles */
.theme-toggle {
    transition: all 0.3s ease;
}

.theme-toggle:hover {
    transform: scale(1.1);
}

.theme-toggle:active {
    transform: scale(0.95);
}

/* Loading state improvements */
.auth-submit.loading {
    position: relative;
}

.auth-submit.loading::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    border-radius: inherit;
}

/* Enhanced validation states */
.form-input.valid {
    border-color: var(--success);
}

.form-input.invalid {
    border-color: var(--error);
}

/* Smooth transitions for theme changes */
body, .navbar, .auth-container, .auth-card {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}
/* Add to auth.css - More specific password toggle styles */
.password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.password-wrapper .form-input {
    padding-right: 50px !important;
    width: 100% !important;
}

.password-toggle {
    position: absolute !important;
    right: 12px !important;
    background: none !important;
    border: none !important;
    color: var(--text-soft) !important;
    cursor: pointer !important;
    padding: 8px !important;
    border-radius: var(--radius-sm) !important;
    transition: all var(--transition-fast) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 10 !important;
}

.password-toggle:hover {
    color: var(--primary-blue) !important;
    background: var(--primary-blue-light) !important;
}

.password-toggle:focus {
    outline: 2px solid var(--primary-blue) !important;
    outline-offset: 2px !important;
}
/* Add to auth.css - Better password strength styles */
.password-strength {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-top: var(--space-sm);
    min-height: 20px; /* Ensure space even when empty */
}

.strength-bar {
    flex: 1;
    height: 6px; /* Slightly taller for better visibility */
    background: var(--border);
    border-radius: 3px;
    overflow: hidden;
    position: relative;
}

.strength-fill {
    height: 100%;
    border-radius: 3px;
    transition: all var(--transition-normal) ease-in-out;
    width: 0%;
    opacity: 1 !important; /* Force visibility */
    transform: translateZ(0); /* Hardware acceleration */
}

.strength-text {
    font-size: 0.75rem;
    font-weight: 600;
    min-width: 60px;
    text-align: right;
}

/* Specific colors for each strength level */
.strength-fill[style*="width: 0%"],
.strength-fill[style*="width: 20%"] {
    background: #FF5A5F !important;
}

.strength-fill[style*="width: 40%"] {
    background: #FFC947 !important;
}

.strength-fill[style*="width: 60%"] {
    background: #FFC947 !important;
}

.strength-fill[style*="width: 80%"],
.strength-fill[style*="width: 100%"] {
    background: #2BCB77 !important;
}
/* Add to auth.css */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-md) var(--space-lg);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: var(--space-md);
    z-index: 10000;
    transform: translateX(400px);
    transition: transform 0.3s ease;
    max-width: 400px;
}

.toast.show {
    transform: translateX(0);
}

.toast-success {
    border-left: 4px solid var(--success);
}

.toast-error {
    border-left: 4px solid var(--error);
}

.toast-warning {
    border-left: 4px solid var(--warning);
}

.toast-info {
    border-left: 4px solid var(--primary-blue);
}

.toast-content {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    flex: 1;
}

.toast-close {
    background: none;
    border: none;
    color: var(--text-soft);
    cursor: pointer;
    padding: var(--space-xs);
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.toast-close:hover {
    background: var(--background);
    color: var(--text-dark);
}
.newsletter-option {
    margin: var(--space-md) 0;
    padding: var(--space-md);
    background: linear-gradient(135deg, rgba(42, 104, 255, 0.1) 0%, rgba(124, 97, 255, 0.1) 100%);
    border-radius: var(--radius-md);
    border: 1px solid var(--primary-blue);
    transition: all var(--transition-normal);
}

.newsletter-option:hover {
    background: linear-gradient(135deg, rgba(42, 104, 255, 0.15) 0%, rgba(124, 97, 255, 0.15) 100%);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.newsletter-description {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-top: var(--space-xs);
    font-size: 0.9rem;
    color: var(--text-soft);
}

.newsletter-description i {
    color: var(--primary-blue);
    font-size: 0.8rem;
}

.newsletter-benefits {
    display: flex;
    gap: var(--space-lg);
    margin-top: var(--space-sm);
    flex-wrap: wrap;
}

.newsletter-benefits small {
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--text-soft);
    font-size: 0.85rem;
}

.newsletter-benefits i {
    color: var(--success);
    font-size: 0.8rem;
}

.auth-note {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    color: var(--text-soft);
    font-size: 0.85rem;
    margin-top: var(--space-sm);
    justify-content: center;
}

.auth-note i {
    color: var(--primary-blue);
}

.hero-stats {
    display: flex;
    justify-content: space-around;
    margin-top: var(--space-2xl);
    padding-top: var(--space-xl);
    border-top: 1px solid var(--border);
}

.stat {
    text-align: center;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-blue);
    margin-bottom: var(--space-xs);
}

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