/* ── Auth Header Bar ─────────────────────────────────────── */
.auth-header-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 16px;
    background: #1E293B;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 14px;
    color: #CBD5E1;
    z-index: 100;
    min-height: 44px;
}

.auth-header-brand {
    margin-right: auto;
}

.auth-header-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: #F1F5F9;
}

.auth-header-icon {
    height: 38px;
    width: 38px;
    border-radius: 8px;
}

.auth-header-brand-name {
    font-size: 20px;
    font-weight: 800;
    color: #F1F5F9;
    line-height: 32px;
    letter-spacing: 0.15em;
}

.auth-header-bar.hidden {
    display: none !important;
}

.auth-header-user {
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 240px;
}

.auth-header-name {
    font-weight: 500;
    color: #F1F5F9;
}

.auth-header-btn {
    background: none;
    border: 1px solid #475569;
    color: #CBD5E1;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
    font-family: inherit;
    white-space: nowrap;
}

.auth-header-btn:hover {
    background: #334155;
    border-color: #64748B;
}

.auth-header-btn.primary {
    background: #3B82F6;
    border-color: #3B82F6;
    color: #FFFFFF;
}

.auth-header-btn.primary:hover {
    background: #2563EB;
    border-color: #2563EB;
}

/* ── Verify Email Banner ────────────────────────────────── */
.auth-verify-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 16px;
    background: #78350F;
    color: #FDE68A;
    font-size: 13px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    text-align: center;
}

.auth-verify-banner a {
    color: #FDE68A;
    text-decoration: underline;
    cursor: pointer;
    font-weight: 500;
}

.auth-verify-banner a:hover {
    color: #FEF3C7;
}

/* ── Auth Modal Overlay ─────────────────────────────────── */
.auth-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10001;
    padding: 16px;
}

.auth-modal-overlay.hidden {
    display: none !important;
}

/* ── Auth Modal ─────────────────────────────────────────── */
.auth-modal {
    background: #1E293B;
    border-radius: 16px;
    width: 100%;
    max-width: 400px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #F1F5F9;
}

.auth-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px 0;
}

.auth-modal-title {
    font-size: 20px;
    font-weight: 600;
    color: #F1F5F9;
}

.auth-modal-close {
    background: none;
    border: none;
    color: #94A3B8;
    cursor: pointer;
    padding: 4px;
    font-size: 24px;
    line-height: 1;
    transition: color 0.15s;
}

.auth-modal-close:hover {
    color: #F1F5F9;
}

/* ── Tabs ────────────────────────────────────────────────── */
.auth-tabs {
    display: flex;
    margin: 16px 24px 0;
    border-bottom: 1px solid #334155;
}

.auth-tab {
    flex: 1;
    background: none;
    border: none;
    color: #94A3B8;
    padding: 10px 0;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: color 0.15s, border-color 0.15s;
    font-family: inherit;
}

.auth-tab:hover {
    color: #CBD5E1;
}

.auth-tab.active {
    color: #3B82F6;
    border-bottom-color: #3B82F6;
}

/* ── Form ────────────────────────────────────────────────── */
.auth-form {
    padding: 20px 24px 24px;
}

.auth-field {
    margin-bottom: 16px;
}

.auth-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #94A3B8;
    margin-bottom: 6px;
}

.auth-input {
    width: 100%;
    padding: 10px 12px;
    background: #0F172A;
    border: 1px solid #334155;
    border-radius: 8px;
    color: #F1F5F9;
    font-size: 15px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.15s;
    box-sizing: border-box;
}

.auth-input:focus {
    border-color: #3B82F6;
}

.auth-input::placeholder {
    color: #475569;
}

.auth-submit {
    width: 100%;
    padding: 12px;
    background: #3B82F6;
    border: none;
    border-radius: 8px;
    color: #FFFFFF;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.auth-submit:hover:not(:disabled) {
    background: #2563EB;
}

.auth-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.auth-submit .loading-spinner-small {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #FFFFFF;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* ── Messages ────────────────────────────────────────────── */
.auth-error {
    color: #F87171;
    font-size: 13px;
    margin-top: 4px;
}

.auth-success-msg {
    background: #064E3B;
    color: #6EE7B7;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 16px;
    text-align: center;
}

/* ── Links ───────────────────────────────────────────────── */
.auth-links {
    margin-top: 16px;
    text-align: center;
    font-size: 13px;
    color: #94A3B8;
}

.auth-link {
    color: #60A5FA;
    cursor: pointer;
    text-decoration: none;
    font-weight: 500;
}

.auth-link:hover {
    text-decoration: underline;
    color: #93C5FD;
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 480px) {
    .auth-modal {
        max-width: 100%;
        border-radius: 12px;
    }

    .auth-form {
        padding: 16px 20px 20px;
    }

    .auth-modal-header {
        padding: 16px 20px 0;
    }

    .auth-tabs {
        margin: 12px 20px 0;
    }
}
