/* styles/auth.css */
.auth-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.auth-modal-overlay.open {
    display: flex;
    opacity: 1;
}

.auth-modal {
    background: var(--bg-light, #ffffff);
    border: 1px solid var(--primary, #7c3aed);
    box-shadow: 0 0 40px rgba(124, 58, 237, 0.15);
    border-radius: 12px;
    width: 400px;
    max-width: 90%;
    padding: 2rem;
    position: relative;
    transform: translateY(10px);
    transition: transform 0.2s ease;
}

body.dark-mode .auth-modal {
    background: #1e1e2e;
}

.auth-modal-overlay.open .auth-modal {
    transform: translateY(0);
}

.auth-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    color: var(--text-secondary, #64748b);
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
}

.auth-close:hover { color: var(--text-primary, #1e293b); }
body.dark-mode .auth-close:hover { color: #fff; }

.auth-header { text-align: center; margin-bottom: 2rem; }
.auth-header h2 { margin: 0 0 0.5rem 0; color: var(--text-primary, #1e293b); }
.auth-header p { margin: 0; color: var(--text-secondary, #64748b); font-size: 0.9rem; }

body.dark-mode .auth-header h2 { color: #fff; }
body.dark-mode .auth-header p { color: #a1a1aa; }

/* Tabs */
.auth-tabs {
    display: flex;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--border-color, #e2e8f0);
}

body.dark-mode .auth-tabs {
    border-bottom-color: #3f3f46;
}

.auth-tab {
    flex: 1;
    padding: 12px;
    background: none;
    border: none;
    color: var(--text-secondary, #64748b);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.auth-tab:hover { color: var(--text-primary, #1e293b); }
body.dark-mode .auth-tab:hover { color: #fff; }

.auth-tab.active {
    color: var(--primary, #7c3aed);
    border-bottom: 2px solid var(--primary, #7c3aed);
    margin-bottom: -2px;
}

body.dark-mode .auth-tab.active {
    color: #c4b5fd;
}

/* Form */
.auth-group { margin-bottom: 1.2rem; }
.auth-label { display: block; color: var(--text-primary, #1e293b); margin-bottom: 0.5rem; font-size: 0.9rem; }

body.dark-mode .auth-label { color: #e4e4e7; }

.auth-input {
    width: 100%;
    padding: 10px 12px;
    background: var(--bg-secondary, #f8fafc);
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 6px;
    color: var(--text-primary, #1e293b);
    font-size: 1rem;
}

body.dark-mode .auth-input {
    background: #27272a;
    border-color: #3f3f46;
    color: #fff;
}

.auth-input:focus {
    outline: none;
    border-color: var(--primary, #7c3aed);
    box-shadow: 0 0 0 2px rgba(124, 58, 237, 0.2);
}

.auth-btn {
    width: 100%;
    padding: 12px;
    background: #7c3aed;
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: bold;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s;
    margin-top: 0.5rem;
}

.auth-btn:hover { background: #6d28d9; }
.auth-btn:disabled { opacity: 0.7; cursor: wait; }

.auth-error {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626; /* Red for light mode */
    padding: 10px;
    border-radius: 6px;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    display: none; /* Hidden by default */
}

body.dark-mode .auth-error {
    color: #fca5a5; /* Lighter red for dark mode */
}

/* Forgot Password link */
.forgot-password-link {
    display: inline-block;
    margin-top: 6px;
    font-size: 0.8rem;
    color: #94a3b8;
    text-decoration: none;
    cursor: pointer;
}

.forgot-password-link:hover {
    color: var(--primary, #7c3aed);
    text-decoration: underline;
}

body.dark-mode .forgot-password-link {
    color: #71717a;
}

body.dark-mode .forgot-password-link:hover {
    color: #c4b5fd;
}
