/* Auth Modal Styles */
.auth-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.6);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}
.auth-overlay.active { display: flex; }

.auth-modal {
    background: #fff;
    border-radius: 16px;
    width: 90%;
    max-width: 400px;
    padding: 32px;
    position: relative;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    animation: authSlideIn 0.3s ease;
}

@keyframes authSlideIn {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.auth-close {
    position: absolute;
    top: 16px; right: 16px;
    background: none; border: none;
    font-size: 1.5rem; color: #64748b;
    cursor: pointer;
}

.auth-title {
    font-size: 1.4rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 8px;
}

.auth-subtitle {
    font-size: 0.9rem;
    color: #64748b;
    margin-bottom: 24px;
}

.auth-input {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    font-size: 0.95rem;
    margin-bottom: 12px;
    outline: none;
    transition: border-color 0.2s;
}
.auth-input:focus { border-color: #2563eb; }

.auth-btn {
    width: 100%;
    padding: 13px;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 10px;
}

.auth-btn-primary {
    background: #2563eb;
    color: #fff;
}
.auth-btn-primary:hover { background: #1d4ed8; }

.auth-btn-google {
    background: #fff;
    border: 1.5px solid #e2e8f0;
    color: #334155;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}
.auth-btn-google:hover { background: #f8fafc; border-color: #cbd5e1; }
.auth-btn-google img { width: 20px; height: 20px; }

.auth-divider {
    text-align: center;
    color: #94a3b8;
    font-size: 0.8rem;
    margin: 16px 0;
    position: relative;
}
.auth-divider::before, .auth-divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 40%;
    height: 1px;
    background: #e2e8f0;
}
.auth-divider::before { left: 0; }
.auth-divider::after { right: 0; }

.auth-switch {
    text-align: center;
    font-size: 0.85rem;
    color: #64748b;
    margin-top: 16px;
}
.auth-switch a {
    color: #2563eb;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
}

.auth-msg {
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 0.85rem;
    margin-bottom: 12px;
    display: none;
}
.auth-msg.error { display: block; background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; }
.auth-msg.success { display: block; background: #f0fdf4; color: #16a34a; border: 1px solid #bbf7d0; }

/* User badge in header */
.user-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 12px 4px 4px;
    border-radius: 20px;
    background: #f1f5f9;
    cursor: pointer;
    transition: background 0.2s;
}
.user-badge:hover { background: #e2e8f0; }
.user-badge-avatar {
    width: 28px; height: 28px;
    border-radius: 50%;
    background: #2563eb;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
}
.user-badge-avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.user-badge-name {
    font-size: 0.8rem;
    font-weight: 600;
    color: #334155;
    max-width: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Dark mode */
body.dark-mode .auth-modal { background: #1e293b; }
body.dark-mode .auth-title { color: #f1f5f9; }
body.dark-mode .auth-subtitle { color: #94a3b8; }
body.dark-mode .auth-input { background: #0f172a; border-color: #334155; color: #f1f5f9; }
body.dark-mode .auth-btn-google { background: #0f172a; border-color: #334155; color: #e2e8f0; }
body.dark-mode .user-badge { background: #334155; }
body.dark-mode .user-badge-name { color: #e2e8f0; }
