/* notifications.html */
.notif-list {
        display: flex;
        flex-direction: column;
        gap: 8px;
    }
    .notif-item {
        display: flex;
        align-items: flex-start;
        gap: 14px;
        padding: 16px 20px;
        border-radius: 10px;
        background: var(--bg-card);
        border: 1px solid var(--border-color);
        transition: background 0.15s, border-color 0.15s;
    }
    .notif-item.unread {
        background: var(--bg-elevated);
        border-color: var(--accent);
        border-left: 3px solid var(--accent);
    }
    .notif-item.read {
        opacity: 0.65;
    }
    .notif-dot {
        width: 10px;
        height: 10px;
        border-radius: 50%;
        margin-top: 6px;
        flex-shrink: 0;
    }
    .notif-dot.unread { background: var(--accent); }
    .notif-dot.read { background: var(--border-color); }
    .notif-body {
        flex: 1;
        min-width: 0;
    }
    .notif-message {
        font-size: 0.9rem;
        color: var(--text-primary);
        line-height: 1.45;
        margin-bottom: 4px;
    }
    .notif-meta {
        font-size: 0.75rem;
        color: var(--text-muted);
    }
    .notif-actions {
        flex-shrink: 0;
        display: flex;
        align-items: center;
        gap: 6px;
    }
    .notif-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-bottom: 20px;
        flex-wrap: wrap;
        gap: 12px;
    }
    .notif-empty {
        text-align: center;
        padding: 60px 20px;
        color: var(--text-muted);
    }
    .notif-empty svg {
        margin-bottom: 16px;
        opacity: 0.4;
    }
/* ── GS-395 notification bell (topbar) + dropdown + toasts ── */
.notif-bell { position: relative; }
.notif-bell-btn { position: relative; }
.notif-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 999px;
    background: #E5484D; /* semantic danger token (rebrand R1) */
    color: #fff;
    font-size: 0.62rem;
    font-weight: 700;
    line-height: 16px;
    text-align: center;
    pointer-events: none;
}
.notif-dropdown {
    /* GS-408: fixed so .shell-topbar { overflow:hidden } cannot clip the menu.
       Top/left/width set by notifications.js from the bell button rect. */
    position: fixed;
    top: 0;
    left: 0;
    width: 340px;
    max-width: calc(100vw - 24px);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
    z-index: 5000;
    overflow: hidden;
}
.notif-dropdown[hidden] {
    display: none !important;
}
/* Ensure utility cluster can host the trigger even if ancestors clip */
.shell-utilities .notif-bell,
.nav-links-desktop .notif-bell {
    overflow: visible;
    z-index: 40;
}
.notif-dropdown-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-color);
}
.notif-dropdown-all {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent);
    text-decoration: none;
}
.notif-dropdown-all:hover { text-decoration: underline; }
.notif-dropdown-list {
    max-height: 380px;
    overflow-y: auto;
}
.notif-dropdown-item {
    display: flex;
    gap: 10px;
    padding: 11px 14px;
    text-decoration: none;
    border-bottom: 1px solid var(--border-color);
    transition: background 0.12s;
}
.notif-dropdown-item:last-child { border-bottom: none; }
.notif-dropdown-item:hover { background: var(--bg-elevated); }
.notif-dropdown-item.unread { background: rgba(63, 182, 203, 0.06); }
.notif-dropdown-item.unread:hover { background: rgba(63, 182, 203, 0.12); }
.notif-sev {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-top: 5px;
    flex-shrink: 0;
    background: var(--accent);
}
.notif-sev--warning { background: #E0A63C; }
.notif-sev--critical { background: #E5484D; }
.notif-item-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.notif-item-title {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.notif-item-msg {
    font-size: 0.76rem;
    color: var(--text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.notif-item-meta { font-size: 0.68rem; color: var(--text-muted); opacity: 0.75; }
.notif-dropdown-empty {
    padding: 26px 14px;
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* GS-407: running background jobs in the bell dropdown */
.notif-dropdown-section {
    padding: 8px 14px 4px;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-muted);
    background: var(--bg-elevated, rgba(255,255,255,0.02));
    border-bottom: 1px solid var(--border-color);
}
.notif-dropdown-item--running {
    cursor: pointer;
    background: rgba(63, 182, 203, 0.05);
}
.notif-dropdown-item--running:hover { background: rgba(63, 182, 203, 0.12); }
.notif-sev--running {
    background: var(--accent);
    box-shadow: 0 0 0 0 rgba(63, 182, 203, 0.55);
    animation: notif-pulse 1.6s ease-out infinite;
}
.notif-bell.has-running .notif-bell-btn svg {
    color: var(--accent);
}
.notif-bell.has-running .notif-bell-btn::after {
    content: '';
    position: absolute;
    top: 2px;
    right: 2px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 0 rgba(63, 182, 203, 0.55);
    animation: notif-pulse 1.6s ease-out infinite;
    pointer-events: none;
}
/* When an unread badge is visible, hide the running pin so they don't stack */
.notif-bell.has-running .notif-badge:not([style*="display: none"]) ~ *,
.notif-bell.has-running:has(.notif-badge:not([style*="display: none"])) .notif-bell-btn::after {
    display: none;
}
@keyframes notif-pulse {
    0% { box-shadow: 0 0 0 0 rgba(63, 182, 203, 0.55); }
    70% { box-shadow: 0 0 0 8px rgba(63, 182, 203, 0); }
    100% { box-shadow: 0 0 0 0 rgba(63, 182, 203, 0); }
}

/* Toasts (GS-455) — bottom-up seat, status edge key, mono action */
.gs-toast-host {
    position: fixed;
    bottom: 24px;
    right: 16px;
    top: auto;
    display: flex;
    flex-direction: column-reverse;
    gap: 10px;
    z-index: 3000;
    max-width: min(420px, calc(100vw - 32px));
    pointer-events: none;
}
.gs-toast {
    --tk: var(--text-muted, #8A97A3);
    pointer-events: auto;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 10px;
    background: var(--bg-elevated, #212A36);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-size: 0.84rem;
    text-decoration: none;
    box-shadow: 0 2px 0 0 var(--tk), 0 14px 30px rgba(0, 0, 0, 0.45);
    animation: gs-toast-seat 0.32s cubic-bezier(.3,.7,0,1) both;
    transition: opacity 0.28s cubic-bezier(.3,.7,0,1), transform 0.28s cubic-bezier(.3,.7,0,1);
}
.gs-toast::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--tk);
}
.gs-toast:hover { text-decoration: none; color: var(--text-primary); }
.gs-toast--success { --tk: var(--green, #34C08F); }
.gs-toast--warning { --tk: #E8B04A; }
.gs-toast--critical,
.gs-toast--danger,
.gs-toast--error { --tk: #F16A6E; }
.gs-toast--info { --tk: var(--text-muted, #8A97A3); }
.gs-toast-body { flex: 1; min-width: 0; }
.gs-toast-title {
    display: block;
    font-size: 0.86rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.3;
}
.gs-toast-detail {
    display: block;
    font-size: 0.78rem;
    color: var(--text-muted, #8A97A3);
    margin-top: 2px;
    line-height: 1.35;
}
.gs-toast.is-out {
    opacity: 0;
    transform: translateY(14px);
}
.gs-toast-cta {
    margin-left: auto;
    flex-shrink: 0;
    font-family: 'JetBrains Mono', var(--font-mono, monospace);
    font-size: 0.64rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--tk);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    text-decoration: none;
}
.gs-toast-close {
    flex-shrink: 0;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
    padding: 0 2px;
}
.gs-toast-close:hover { color: var(--text-primary); }
@keyframes gs-toast-seat {
    from { transform: translateY(18px); }
    to { transform: translateY(0); }
}

/* .progress-actions lives in base_components.css (lint pairs progress-* there) */.btn-outline-accent {
    background: transparent;
    border: 1px solid var(--accent);
    color: var(--accent);
}
.btn-outline-accent:hover {
    background: var(--accent-soft, rgba(63, 182, 203, 0.12));
    color: var(--accent);
}

@media (prefers-reduced-motion: reduce) {
    .gs-toast { animation: none; transition: none; }
}

/* Inbox page: title row for url-bearing notifications (GS-395) */
.notif-title {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 2px;
}
