.activity-bell {
    --activity-surface: #202438;
    --activity-text: #f6f8ff;
    --activity-border: #465675;
    --activity-hover: #30466b;
    --activity-link: #8acbff;
    position: relative;
    flex: 0 0 auto;
    margin-right: 16px;
    color: var(--activity-text);
}
.light-mode .activity-bell {
    --activity-surface: #fff;
    --activity-text: #18263b;
    --activity-border: #aebcd0;
    --activity-hover: #e0edfc;
    --activity-link: #075b96;
}
.activity-bell > .activity-bell__toggle,
.activity-bell > .activity-bell__toggle:hover {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 36px;
    min-width: 48px;
    padding: 0 12px;
    border: 1px solid var(--activity-border);
    border-radius: 8px;
    background: var(--activity-surface);
    color: var(--activity-text);
    cursor: pointer;
    list-style: none;
    transform: none;
    font-size: 14px;
    line-height: 1;
}
.activity-bell > .activity-bell__toggle:hover,
.activity-bell[open] > .activity-bell__toggle { background: var(--activity-hover); }
.activity-bell__toggle::-webkit-details-marker { display: none; }
.activity-bell__toggle { position: relative; }
.activity-bell__dot { position: absolute; top: -3px; right: -3px; width: 10px; height: 10px; border-radius: 50%; background: #ff384f; border: 2px solid var(--activity-surface); }
.activity-bell__dot[hidden], .activity-toast[hidden] { display: none !important; }
.activity-toast { position: fixed; top: 18px; left: 50%; transform: translateX(-50%); z-index: 10000; width: max-content; max-width: calc(100vw - 32px); padding: 16px 22px; border: 1px solid #64c8ff; border-radius: 10px; background: #202438; color: #f6f8ff; box-shadow: 0 8px 30px #0005; overflow-wrap: anywhere; pointer-events: none; }
.light-mode .activity-toast { background: #fff; color: #18263b; }
.activity-bell .activity-bell__toggle i { position: static; color: inherit; margin: 0; transform: none; }
.activity-bell :is(summary, button, a):focus-visible { outline: 2px solid #2491f5; outline-offset: 3px; }
.activity-bell__menu {
    position: absolute;
    right: 0;
    top: calc(100% + 10px);
    width: min(340px, 85vw);
    max-height: 60vh;
    overflow: auto;
    z-index: 1100;
    padding: 16px;
    border: 1px solid var(--activity-border);
    border-radius: 8px;
    background: var(--activity-surface);
    color: var(--activity-text);
    box-shadow: 0 12px 30px #0003;
}
.activity-bell__menu form { padding: 8px 0; border-bottom: 1px solid var(--activity-border); }
.activity-bell .activity-bell__menu button,
.activity-bell .activity-bell__menu button:hover {
    display: block; width: 100%; padding: 8px; border: 0; border-radius: 4px;
    background: transparent; color: var(--activity-text); text-align: left;
    font: inherit; line-height: 1.5; white-space: normal; overflow-wrap: anywhere; transform: none;
}
.activity-bell .activity-bell__menu button:hover { background: var(--activity-hover); }
.activity-bell .activity-bell__menu a { display: block; margin-top: 12px; color: var(--activity-link); }
.activity-page .activity-filters { grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: end; margin-bottom: 20px; }
.activity-page .activity-filters .sd-field { font-size: 13px; font-weight: 600; }
.activity-page .activity-filters :is(input, select) { color-scheme: dark; color: var(--sd-text); background: #191d30; }
.activity-page .activity-filters select option { color: var(--sd-text); background: #191d30; }
.activity-page.light-mode .activity-filters :is(input, select, option) { color-scheme: light; color: var(--sd-text); background: #fff; }
.activity-page .activity-unread { display: flex; gap: 8px; align-items: center; min-height: 42px; margin: 0; }
.activity-page .activity-unread input { width: 18px; height: 18px; accent-color: #137dc4; }
.activity-page .activity-filter-actions { display: flex; justify-content: flex-end; grid-column: 1 / -1; }
.activity-page .activity-filter-actions button { min-width: 140px; }
.activity-audit-heading h2 { font-size: 18px; line-height: 1.5; margin: 0 0 6px; }
.activity-audit-heading p { margin: 0 0 14px; }
.activity-changes > .activity-changes__toggle { list-style: none; cursor: pointer; gap: 12px; }
.activity-changes__toggle::-webkit-details-marker { display: none; }
.activity-changes:not([open]) .activity-changes__open,
.activity-changes[open] .activity-changes__closed { display: none; }
.activity-changes[open] .activity-changes__arrow { transform: rotate(180deg); }
.activity-changes__toggle:focus-visible { outline: 2px solid var(--sd-blue); outline-offset: 3px; }
.activity-audit-table-wrap { margin-top: 16px; overflow-x: auto; border: 1px solid var(--sd-border); border-radius: 8px; }
.activity-audit-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.activity-audit-table th, .activity-audit-table td { padding: 12px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--sd-border-soft); white-space: pre-wrap; overflow-wrap: anywhere; min-width: 100px; }
.activity-audit-table thead, .activity-audit-table tbody th { background: var(--sd-surface-raised); color: var(--sd-text); }
.activity-audit-table tr:last-child :is(th, td) { border-bottom: 0; }
.activity-job-chip { display: inline-block; padding: 7px 10px; border-radius: 6px; min-width: 140px; font-weight: 600; }
.activity-archive-toolbar, .activity-archive-toolbar nav { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.activity-archive-toolbar { justify-content: space-between; margin-bottom: 12px; }
.activity-item-archive { display: flex; justify-content: flex-end; margin-top: 12px; }
.activity-archive-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 12px; margin-left: auto; }
.activity-archive-actions--item { margin-top: 12px; }
.activity-archive-actions form { margin: 0; }
.home-dashboard__briefing-stack { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.home-dashboard__briefing-stack .home-panel { flex: 0 0 auto; }
.home-notifications { flex: 1 1 auto !important; }
.home-notifications .home-panel__heading { flex-wrap: wrap; gap: 12px; }
.home-notifications .home-status-pill { margin-left: 8px; font-size: 11px; vertical-align: middle; }
.home-notification-list { display: grid; gap: 8px; }
.home-notification-list form { margin: 0; min-width: 0; }
.home-notifications .home-notification-item,
.home-notifications .home-notification-item:hover { display: flex; flex-direction: column; gap: 5px; width: 100%; padding: 12px; text-align: left; border: 1px solid #465675; border-radius: 8px; background: #ffffff08; color: #eef4ff; font: inherit; white-space: normal; overflow-wrap: anywhere; transform: none; }
.home-notifications .home-notification-item:hover { background: #2491f51a; }
.home-notification-item span { font-size: 12px; opacity: .8; }
.home-notifications .is-unread { border-left: 3px solid #64c8ff; }
.home-notification-item:focus-visible { outline: 2px solid #2491f5; outline-offset: 2px; }
.light-mode .home-notifications .home-notification-item { color: #18263b; border-color: #aebcd0; background: #f4f6fa; }
@media (max-width: 1000px) { .activity-page .activity-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) {
    .activity-page .activity-filters { grid-template-columns: 1fr; }
    .activity-page .activity-filter-actions button { width: 100%; }
    .activity-bell { margin-right: 8px; }
}
