/* Screen-reader only utility — used in alerts table headers */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/**
 * Alerts / Notifications Pages Styles
 * LinkGuard - Dark Cyberpunk Dashboard
 *
 * Covers:
 *  - /dashboard/alerts        (index — digest list)
 *  - /dashboard/alerts/:id    (detail — affected links table)
 *  - #notification-bell-dropdown (header bell panel)
 *
 * All selectors prefixed with .alerts-* or .bell-* to avoid conflicts.
 * Status badge classes (.status-badge.*) are shared with monitoring.css.
 */

/* ============================================================
   PAGE HEADER
   ============================================================ */

.alerts-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 28px;
    flex-wrap: wrap;
}

.alerts-title-block {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.alerts-title {
    font-family: var(--font-display);
    font-size: var(--text-2xl);
    font-weight: 800;
    color: var(--text-primary);
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.alerts-subtitle {
    font-family: var(--font-body);
    font-size: var(--text-sm);
    color: var(--text-muted);
    margin: 0;
}

.alerts-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

/* ============================================================
   FILTER BAR (index page)
   ============================================================ */

.alerts-filter-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.alerts-kind-tabs {
    display: flex;
    gap: 6px;
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.06);
    padding: 4px;
    clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px));
}

.alerts-tab {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    background: transparent;
    border: none;
    padding: 6px 14px;
    cursor: pointer;
    transition: color 0.2s ease, background 0.2s ease;
    clip-path: polygon(0 0, calc(100% - 6px) 0, 100% 6px, 100% 100%, 6px 100%, 0 calc(100% - 6px));
}

.alerts-tab:hover {
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.04);
}

.alerts-tab.active {
    background: rgba(0, 245, 212, 0.12);
    color: var(--neon-cyan);
    border: 1px solid rgba(0, 245, 212, 0.25);
}

.alerts-filter-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.alerts-unread-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-body);
    font-size: var(--text-sm);
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.2s ease;
}

.alerts-unread-toggle:hover {
    color: var(--text-secondary);
}

.alerts-unread-toggle input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--neon-cyan);
    cursor: pointer;
}

/* ============================================================
   ACTION BUTTONS
   ============================================================ */

.alerts-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 16px;
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.25s ease;
    text-decoration: none;
    border: none;
}

.alerts-btn svg {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
}

.alerts-btn--primary {
    background: linear-gradient(135deg, var(--neon-cyan), var(--neon-blue));
    color: var(--bg-deep);
    clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px));
}

.alerts-btn--primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--glow-cyan);
}

.alerts-btn--ghost {
    background: transparent;
    border: 1px solid rgba(0, 245, 212, 0.25);
    color: var(--neon-cyan);
    clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px));
}

.alerts-btn--ghost:hover {
    background: rgba(0, 245, 212, 0.08);
    border-color: rgba(0, 245, 212, 0.5);
    transform: translateY(-2px);
}

.alerts-btn--danger-ghost {
    background: transparent;
    border: 1px solid rgba(247, 37, 133, 0.25);
    color: var(--neon-magenta);
    clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px));
}

.alerts-btn--danger-ghost:hover {
    background: rgba(247, 37, 133, 0.08);
    border-color: rgba(247, 37, 133, 0.5);
}

.alerts-btn--back {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--text-muted);
    clip-path: polygon(0 0, calc(100% - 6px) 0, 100% 6px, 100% 100%, 6px 100%, 0 calc(100% - 6px));
    padding: 7px 14px;
    font-size: 11px;
}

.alerts-btn--back:hover {
    color: var(--text-primary);
    border-color: rgba(255, 255, 255, 0.25);
}

/* ============================================================
   DIGEST CARD (index list item)
   ============================================================ */

.alerts-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 28px;
}

.alerts-digest-card {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.07);
    clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px));
    padding: 18px 22px;
    cursor: pointer;
    transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.2s ease;
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    overflow: hidden;
    text-decoration: none;
}

/* animated top-border gradient */
.alerts-digest-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(0, 245, 212, 0.3), transparent);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.alerts-digest-card:hover {
    border-color: rgba(0, 245, 212, 0.3);
    box-shadow: 0 0 24px rgba(0, 245, 212, 0.08);
    transform: translateY(-2px);
}

.alerts-digest-card:hover::before {
    opacity: 1;
}

.alerts-digest-card.is-unread {
    border-color: rgba(0, 245, 212, 0.2);
}

/* Unread dot indicator */
.alerts-unread-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--neon-cyan);
    box-shadow: 0 0 8px var(--neon-cyan);
    flex-shrink: 0;
    margin-top: 6px;
    animation: alerts-pulse 2s ease-in-out infinite;
}

@keyframes alerts-pulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 8px var(--neon-cyan); }
    50% { opacity: 0.5; box-shadow: 0 0 4px var(--neon-cyan); }
}

.alerts-digest-card.is-read .alerts-unread-dot {
    background: rgba(255, 255, 255, 0.12);
    box-shadow: none;
    animation: none;
}

.alerts-digest-card-body {
    flex: 1;
    min-width: 0;
}

.alerts-digest-card-top {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.alerts-kind-badge {
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    padding: 2px 8px;
    clip-path: polygon(0 0, calc(100% - 4px) 0, 100% 4px, 100% 100%, 4px 100%, 0 calc(100% - 4px));
}

.alerts-kind-badge--digest {
    background: rgba(0, 245, 212, 0.1);
    border: 1px solid rgba(0, 245, 212, 0.3);
    color: var(--neon-cyan);
}

.alerts-kind-badge--transactional {
    background: rgba(76, 201, 240, 0.1);
    border: 1px solid rgba(76, 201, 240, 0.3);
    color: var(--neon-blue);
}

.alerts-digest-time {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-muted);
    margin-left: auto;
    white-space: nowrap;
}

.alerts-digest-summary {
    font-family: var(--font-body);
    font-size: var(--text-base);
    color: var(--text-secondary);
    line-height: 1.5;
}

.alerts-digest-summary-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-right: 14px;
    white-space: nowrap;
}

.alerts-digest-summary-item .count {
    font-family: var(--font-mono);
    font-weight: 600;
}

.alerts-digest-summary-item.event-removed .count { color: var(--neon-magenta); }
.alerts-digest-summary-item.event-deindexed .count { color: var(--neon-yellow); }
.alerts-digest-summary-item.event-nofollow .count { color: var(--neon-yellow); }
.alerts-digest-summary-item.event-restored .count { color: var(--neon-cyan); }

.alerts-digest-card-arrow {
    display: flex;
    align-items: center;
    color: var(--text-muted);
    flex-shrink: 0;
    transition: color 0.2s ease, transform 0.2s ease;
    margin-top: 4px;
}

.alerts-digest-card-arrow svg {
    width: 16px;
    height: 16px;
}

.alerts-digest-card:hover .alerts-digest-card-arrow {
    color: var(--neon-cyan);
    transform: translateX(3px);
}

/* ============================================================
   SKELETON LOADING
   ============================================================ */

.alerts-skeleton-card {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.05);
    clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px));
    padding: 18px 22px;
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.alerts-skeleton-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
    margin-top: 6px;
}

.alerts-skeleton-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.alerts-skeleton-line {
    height: 12px;
    border-radius: 4px;
    background: linear-gradient(90deg,
        rgba(255,255,255,0.05) 0%,
        rgba(255,255,255,0.1) 50%,
        rgba(255,255,255,0.05) 100%);
    background-size: 200% 100%;
    animation: alerts-shimmer 1.5s ease-in-out infinite;
}

.alerts-skeleton-line--wide { width: 70%; }
.alerts-skeleton-line--medium { width: 50%; }
.alerts-skeleton-line--narrow { width: 35%; }

@keyframes alerts-shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* ============================================================
   EMPTY STATE
   ============================================================ */

.alerts-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 64px 24px;
    gap: 16px;
}

.alerts-empty-icon {
    width: 64px;
    height: 64px;
    color: var(--text-muted);
    opacity: 0.35;
}

.alerts-empty-title {
    font-family: var(--font-display);
    font-size: var(--text-lg);
    font-weight: 700;
    color: var(--text-secondary);
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.alerts-empty-text {
    font-family: var(--font-body);
    font-size: var(--text-sm);
    color: var(--text-muted);
    margin: 0;
    max-width: 360px;
    line-height: 1.6;
}

/* All-clear positive state */
.alerts-all-clear {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 48px 24px;
    gap: 14px;
    background: rgba(0, 245, 212, 0.04);
    border: 1px solid rgba(0, 245, 212, 0.15);
    clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 16px 100%, 0 calc(100% - 16px));
}

.alerts-all-clear-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--neon-cyan);
    opacity: 0.7;
}

.alerts-all-clear-title {
    font-family: var(--font-display);
    font-size: var(--text-xl);
    font-weight: 800;
    color: var(--neon-cyan);
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-shadow: 0 0 20px var(--glow-cyan-subtle);
}

.alerts-all-clear-text {
    font-family: var(--font-body);
    font-size: var(--text-sm);
    color: var(--text-secondary);
    margin: 0;
    max-width: 400px;
    line-height: 1.6;
}

/* ============================================================
   PAGINATION
   ============================================================ */

.alerts-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 0 4px;
}

.alerts-page-btn {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 600;
    padding: 6px 12px;
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
    clip-path: polygon(0 0, calc(100% - 5px) 0, 100% 5px, 100% 100%, 5px 100%, 0 calc(100% - 5px));
}

.alerts-page-btn:hover:not(:disabled) {
    border-color: rgba(0, 245, 212, 0.35);
    color: var(--neon-cyan);
}

.alerts-page-btn.active {
    background: rgba(0, 245, 212, 0.12);
    border-color: rgba(0, 245, 212, 0.4);
    color: var(--neon-cyan);
}

.alerts-page-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* ============================================================
   DETAIL PAGE — PERIOD CARD
   ============================================================ */

.alerts-period-card {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 16px 22px;
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.08);
    clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.alerts-period-label {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.alerts-period-value {
    font-family: var(--font-body);
    font-size: var(--text-base);
    color: var(--text-primary);
    font-weight: 500;
}

.alerts-period-divider {
    width: 1px;
    height: 28px;
    background: rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
}

.alerts-period-total {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 8px;
}

.alerts-period-total-num {
    font-family: var(--font-display);
    font-size: var(--text-2xl);
    font-weight: 800;
    color: var(--neon-cyan);
    line-height: 1;
}

.alerts-period-total-label {
    font-family: var(--font-body);
    font-size: var(--text-xs);
    color: var(--text-muted);
}

/* ============================================================
   DETAIL PAGE — COUNT TILES
   ============================================================ */

.alerts-tiles-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-bottom: 24px;
}

.alerts-tile {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.07);
    clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px));
    padding: 20px;
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    position: relative;
    overflow: hidden;
    user-select: none;
}

.alerts-tile::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: currentColor;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.alerts-tile:hover {
    transform: translateY(-3px);
}

.alerts-tile:hover::before,
.alerts-tile.active::before {
    opacity: 0.6;
}

.alerts-tile.active {
    transform: translateY(-2px);
}

/* Tile "All" */
.alerts-tile--all {
    color: var(--text-muted);
}
.alerts-tile--all:hover,
.alerts-tile--all.active {
    border-color: rgba(255, 255, 255, 0.25);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.04);
    color: var(--text-primary);
}

/* Tile Removed — magenta */
.alerts-tile--removed {
    color: var(--neon-magenta);
}
.alerts-tile--removed:hover,
.alerts-tile--removed.active {
    border-color: rgba(247, 37, 133, 0.4);
    box-shadow: 0 0 24px rgba(247, 37, 133, 0.12);
    background: rgba(247, 37, 133, 0.06);
}

/* Tile De-indexed — yellow */
.alerts-tile--deindexed {
    color: var(--neon-yellow);
}
.alerts-tile--deindexed:hover,
.alerts-tile--deindexed.active {
    border-color: rgba(254, 228, 64, 0.4);
    box-shadow: 0 0 24px rgba(254, 228, 64, 0.1);
    background: rgba(254, 228, 64, 0.05);
}

/* Tile Nofollow — yellow (design system warning color) */
.alerts-tile--nofollow {
    color: var(--neon-yellow);
}
.alerts-tile--nofollow:hover,
.alerts-tile--nofollow.active {
    border-color: rgba(254, 228, 64, 0.4);
    box-shadow: 0 0 24px var(--glow-yellow);
    background: rgba(254, 228, 64, 0.05);
}

/* Tile Restored — cyan */
.alerts-tile--restored {
    color: var(--neon-cyan);
}
.alerts-tile--restored:hover,
.alerts-tile--restored.active {
    border-color: rgba(0, 245, 212, 0.4);
    box-shadow: 0 0 24px rgba(0, 245, 212, 0.1);
    background: rgba(0, 245, 212, 0.05);
}

.alerts-tile-count {
    font-family: var(--font-display);
    font-size: var(--text-5xl);
    font-weight: 800;
    line-height: 1;
    color: inherit;
}

.alerts-tile-label {
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: inherit;
    opacity: 0.7;
}

/* ============================================================
   DETAIL PAGE — LINKS TABLE
   ============================================================ */

.alerts-table-wrap {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.07);
    clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 16px 100%, 0 calc(100% - 16px));
    overflow: hidden;
    margin-bottom: 20px;
}

.alerts-table {
    width: 100%;
    border-collapse: collapse;
}

.alerts-table th {
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-muted);
    padding: 12px 16px;
    text-align: left;
    background: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    white-space: nowrap;
}

.alerts-table td {
    font-family: var(--font-body);
    font-size: var(--text-sm);
    color: var(--text-secondary);
    padding: 13px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    vertical-align: middle;
}

.alerts-table tbody tr {
    transition: background 0.15s ease;
}

.alerts-table tbody tr:hover {
    background: rgba(0, 245, 212, 0.03);
}

.alerts-table tbody tr:last-child td {
    border-bottom: none;
}

/* URL cell */
.alerts-cell-url {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-secondary);
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: block;
}

.alerts-cell-url:hover {
    color: var(--neon-cyan);
}

/* Project/group cell */
.alerts-cell-project {
    font-size: var(--text-xs);
}

.alerts-cell-project-name {
    color: var(--text-primary);
    font-weight: 500;
    display: block;
}

.alerts-cell-group-name {
    color: var(--text-muted);
    font-size: var(--text-xs);
    display: block;
    margin-top: 2px;
}

/* Transition cell */
.alerts-transition {
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.alerts-transition-arrow {
    color: var(--text-muted);
    font-size: var(--text-xs);
}

/* Time cell */
.alerts-cell-time {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-muted);
    white-space: nowrap;
}

/* Action link */
.alerts-row-action {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--neon-cyan);
    text-decoration: none;
    opacity: 0.7;
    transition: opacity 0.2s ease;
    white-space: nowrap;
}

.alerts-row-action:hover {
    opacity: 1;
}

.alerts-row-action svg {
    width: 13px;
    height: 13px;
}

/* ============================================================
   NOTIFICATION BELL DROPDOWN
   ============================================================ */

.bell-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 360px;
    max-height: 480px;
    background: var(--bg-card);
    border: 1px solid rgba(0, 245, 212, 0.2);
    clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 14px 100%, 0 calc(100% - 14px));
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.5), 0 0 30px rgba(0, 245, 212, 0.06);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    opacity: 0;
    transform: translateY(-8px);
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.bell-dropdown.is-open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.bell-dropdown-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    flex-shrink: 0;
}

.bell-dropdown-title {
    font-family: var(--font-display);
    font-size: var(--text-xs);
    font-weight: 700;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0;
}

.bell-mark-all-btn {
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--neon-cyan);
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 4px 0;
    transition: opacity 0.2s ease;
    opacity: 0.8;
}

.bell-mark-all-btn:hover {
    opacity: 1;
}

.bell-dropdown-list {
    flex: 1;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 245, 212, 0.2) transparent;
}

.bell-dropdown-list::-webkit-scrollbar {
    width: 4px;
}

.bell-dropdown-list::-webkit-scrollbar-thumb {
    background: rgba(0, 245, 212, 0.2);
    border-radius: 2px;
}

.bell-digest-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    cursor: pointer;
    transition: background 0.15s ease;
    text-decoration: none;
}

.bell-digest-item:last-child {
    border-bottom: none;
}

.bell-digest-item:hover {
    background: rgba(0, 245, 212, 0.04);
}

.bell-digest-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 5px;
}

.bell-digest-dot--unread {
    background: var(--neon-cyan);
    box-shadow: 0 0 6px var(--neon-cyan);
}

.bell-digest-dot--read {
    background: rgba(255, 255, 255, 0.15);
}

.bell-digest-body {
    flex: 1;
    min-width: 0;
}

.bell-digest-summary {
    font-family: var(--font-body);
    font-size: var(--text-xs);
    color: var(--text-secondary);
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bell-digest-time {
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--text-muted);
    margin-top: 3px;
    display: block;
}

.bell-dropdown-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px;
    gap: 10px;
    color: var(--text-muted);
    font-family: var(--font-body);
    font-size: var(--text-sm);
}

.bell-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(0, 245, 212, 0.2);
    border-top-color: var(--neon-cyan);
    border-radius: 50%;
    animation: bell-spin 0.7s linear infinite;
    flex-shrink: 0;
}

@keyframes bell-spin {
    to { transform: rotate(360deg); }
}

.bell-dropdown-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 28px 16px;
    gap: 8px;
    color: var(--text-muted);
    font-family: var(--font-body);
    font-size: var(--text-sm);
    text-align: center;
}

.bell-dropdown-empty svg {
    width: 32px;
    height: 32px;
    opacity: 0.3;
}

.bell-dropdown-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding: 10px 16px;
    flex-shrink: 0;
    text-align: center;
}

.bell-view-all-link {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--neon-cyan);
    text-decoration: none;
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

.bell-view-all-link:hover {
    opacity: 1;
}

/* Bell button position anchor */
.header-bell-wrap {
    position: relative;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 1024px) {
    .alerts-tiles-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .alerts-table th:nth-child(5),
    .alerts-table td:nth-child(5) {
        display: none;
    }
}

@media (max-width: 768px) {
    .alerts-header {
        flex-direction: column;
        gap: 12px;
    }

    .alerts-filter-bar {
        flex-direction: column;
        align-items: flex-start;
    }

    .alerts-tiles-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .alerts-tile-count {
        font-size: var(--text-4xl);
    }

    .alerts-table-wrap {
        overflow-x: auto;
    }

    .alerts-table {
        min-width: 600px;
    }

    .alerts-period-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .alerts-period-total {
        margin-left: 0;
    }

    .alerts-period-divider {
        display: none;
    }

    .bell-dropdown {
        width: 300px;
        right: -8px;
    }
}

@media (max-width: 480px) {
    .alerts-tiles-grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .alerts-tile {
        padding: 14px;
    }

    .alerts-tile-count {
        font-size: var(--text-3xl);
    }

    .alerts-digest-card {
        flex-direction: column;
        gap: 10px;
    }

    .alerts-digest-card-top {
        flex-wrap: wrap;
        gap: 6px;
    }

    .alerts-digest-time {
        margin-left: 0;
    }
}

/* ============================================================
   BELL — TEAM INVITE CARD
   ============================================================ */

.bell-invite-card {
    cursor: default;
}

.bell-invite-summary {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    white-space: normal;
    line-height: 1.4;
    overflow: visible;
    text-overflow: unset;
}

.bell-invite-actions {
    display: flex;
    gap: 6px;
    margin-top: 8px;
    flex-wrap: wrap;
}

.bell-invite-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 12px;
    font-family: var(--font-mono, 'JetBrains Mono', monospace);
    font-size: 0.68rem;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    clip-path: polygon(0 0, calc(100% - 5px) 0, 100% 5px, 100% 100%, 5px 100%, 0 calc(100% - 5px));
}

.bell-invite-btn--accept {
    background: linear-gradient(135deg, var(--neon-cyan, #00f5d4), var(--neon-blue, #4cc9f0));
    color: var(--bg-deep, #0a0a0f);
}

.bell-invite-btn--accept:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 245, 212, 0.3);
}

.bell-invite-btn--decline {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--text-muted, rgba(255, 255, 255, 0.4));
}

.bell-invite-btn--decline:hover {
    border-color: rgba(255, 255, 255, 0.2);
    color: var(--text-secondary, rgba(255, 255, 255, 0.7));
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .alerts-digest-card,
    .alerts-tile,
    .alerts-btn,
    .bell-dropdown,
    .bell-invite-btn {
        transition: none;
    }

    .alerts-unread-dot,
    .alerts-skeleton-line,
    .bell-spinner {
        animation: none;
    }
}
