/* ── Auth Modal & Profile ── */

.auth-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: authFadeIn 0.2s ease;
}

@keyframes authFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.auth-modal {
    background: #1e1e2e;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 16px;
    width: 90%;
    max-width: 380px;
    padding: 32px 28px;
    position: relative;
    animation: authSlideUp 0.25s ease;
    box-shadow: 0 24px 64px rgba(0,0,0,0.5);
}

@keyframes authSlideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.auth-modal-close {
    position: absolute;
    top: 12px;
    right: 14px;
    background: none;
    border: none;
    color: rgba(255,255,255,0.5);
    font-size: 22px;
    cursor: pointer;
    padding: 4px 8px;
    line-height: 1;
    border-radius: 6px;
    transition: all 0.15s;
}

.auth-modal-close:hover {
    background: rgba(255,255,255,0.1);
    color: #fff;
}

.auth-modal-header {
    text-align: center;
    margin-bottom: 24px;
}

.auth-modal-logo {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 800;
    color: #fff;
    margin-bottom: 14px;
    font-family: 'Inter', sans-serif;
}

.auth-modal-title {
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 4px;
}

.auth-modal-subtitle {
    font-size: 13px;
    color: rgba(255,255,255,0.5);
    margin: 0;
}

/* Form */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.auth-field label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: rgba(255,255,255,0.6);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.auth-field input {
    width: 100%;
    padding: 11px 14px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 10px;
    color: #fff;
    font-size: 14px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.auth-field input:focus {
    border-color: #6366f1;
    background: rgba(99, 102, 241, 0.06);
}

.auth-field input::placeholder {
    color: rgba(255,255,255,0.3);
}

.auth-error {
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fca5a5;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
}

.auth-submit-btn {
    padding: 12px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.auth-submit-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

.auth-submit-btn:disabled {
    opacity: 0.6;
    cursor: wait;
}

.auth-switch {
    text-align: center;
    margin-top: 18px;
    font-size: 13px;
    color: rgba(255,255,255,0.5);
}

.auth-switch a {
    color: #818cf8;
    text-decoration: none;
    font-weight: 600;
}

.auth-switch a:hover {
    color: #a5b4fc;
    text-decoration: underline;
}

/* ── Sidebar Profile Area ── */

.auth-profile-area {
    padding: 8px 12px;
    border-top: 1px solid var(--border-light, #f0f0f0);
    margin-top: auto;
}

.auth-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.03);
}

.auth-avatar {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: linear-gradient(145deg, #3d7ec4, var(--primary-accent, #4a90d9));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 800;
    color: #fff;
    flex-shrink: 0;
}

.auth-info {
    flex: 1;
    min-width: 0;
}

.auth-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.auth-email {
    font-size: 11px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.auth-logout-btn {
    background: none;
    border: none;
    color: var(--text-tertiary);
    cursor: pointer;
    padding: 6px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
    flex-shrink: 0;
}

.auth-logout-btn:hover {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
}

/* Login trigger — light sidebar; uses global accent, not indigo */
.auth-login-trigger {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-light, #fff);
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: var(--radius-sm, 8px);
    color: var(--text-primary, #1a1a1a);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, color 0.2s, box-shadow 0.2s;
    font-family: inherit;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.auth-login-trigger:hover {
    background: rgba(74, 144, 217, 0.08);
    border-color: rgba(74, 144, 217, 0.45);
    color: var(--text-primary, #1a1a1a);
    box-shadow: 0 1px 3px rgba(74, 144, 217, 0.12);
}

.auth-login-trigger:active {
    transform: scale(0.99);
}
