.feed-operation-toolbar { margin: 16px 0 0; padding: 12px; border: 1px solid #e5eaf0; border-radius: 16px; background: #fff; box-shadow: 0 3px 12px rgb(15 23 42 / 3%); }
.feed-operation-filter-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.feed-operation-filter-row button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 40px; padding: 8px 12px; border: 1px solid #dce3eb; border-radius: 10px; font-size: 13px; line-height: 18px; font-weight: 600; cursor: pointer; transition: background .15s, border-color .15s; }
.feed-operation-filter-row .feed-all-filters { background: #f1f5f9; color: #334155; }
.feed-operation-filter-row .feed-flag-filter { background: #fff; color: #475569; }
.feed-operation-filter-row .feed-flag-filter[aria-pressed='true'] { background: #e6f6ef; border-color: #7ac9aa; color: #065f46; }
.feed-operation-filter-row button:hover { border-color: #52ad8d; }
.feed-operation-filter-row button:focus-visible { outline: 2px solid #059669; outline-offset: 3px; }
.feed-flag-check { display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; border: 1px solid #a8b6c5; border-radius: 5px; font-size: 12px; }
[aria-pressed='true'] > .feed-flag-check { background: #07835f; border-color: #07835f; color: #fff; }
.feed-filter-count { min-width: 19px; padding: 0 5px; border-radius: 6px; background: #dce8e4; color: #065f46; font-size: 11px; }
.feed-operation-filter-row .feed-filter-reset { margin-left: auto; padding-inline: 5px; background: transparent; border-color: transparent; color: #64748b; font-weight: 500; }
.feed-flags-hint { margin: 8px 0 0; font-size: 12px; line-height: 18px; color: #64748b; }
@media (max-width: 1023px) { .feed-operation-toolbar { margin: 12px 12px 0; } }
@media (max-width: 767px) { .feed-operation-filter-row button { min-height: 44px; padding-inline: 10px; } }
html.dark .feed-operation-toolbar { background: #172330; border-color: #2a394a; box-shadow: none; }
html.dark .feed-operation-filter-row .feed-all-filters, html.dark .feed-operation-filter-row .feed-flag-filter { background: #213142; border-color: #3a4d61; color: #d6e1eb; }
html.dark .feed-operation-filter-row .feed-flag-filter[aria-pressed='true'] { background: #133e35; border-color: #35755f; color: #a7f3d0; }
html.dark .feed-flags-hint, html.dark .feed-operation-filter-row .feed-filter-reset { color: #afc0d1; }
html.dark .feed-filter-count { background: #133e35; color: #a7f3d0; }

/* Appearance is independent of light/dark mode. These shared tokens cover
   glass and violet, including the sidebar and the portalled filter sheet. */
html.crm-glass:root body .feed-operation-toolbar {
  background: var(--slate-card); color: var(--slate-ink); border-color: var(--slate-edge);
  box-shadow: 0 6px 20px -15px var(--crm-glass-shadow), inset 0 1px rgb(226 242 250 / 5%);
}
html.crm-glass:root body .feed-operation-filters .feed-operation-filter-row :is(.feed-all-filters, .feed-flag-filter) {
  background: var(--crm-glass-control); color: var(--slate-ink); border-color: var(--slate-edge);
}
html.crm-glass:root body .feed-operation-filters .feed-operation-filter-row button:hover {
  background: var(--crm-glass-hover); border-color: var(--crm-glass-active-edge);
}
html.crm-glass:root body .feed-operation-filters .feed-operation-filter-row .feed-flag-filter[aria-pressed='true'] {
  background: var(--crm-glass-active); color: var(--crm-glass-accent); border-color: var(--crm-glass-active-edge);
}
html.crm-glass:root body .feed-operation-filters .feed-operation-filter-row button:focus-visible { outline-color: var(--crm-glass-accent); }
html.crm-glass:root body .feed-operation-filters .feed-flag-check {
  background: var(--slate-field); border-color: var(--slate-muted); color: inherit; flex-shrink: 0;
}
html.crm-glass:root body .feed-operation-filters [aria-pressed='true'] > .feed-flag-check {
  background: var(--crm-glass-accent); border-color: var(--crm-glass-accent); color: var(--slate-card-solid);
}
html.crm-glass:root body .feed-operation-filters .feed-filter-count { background: var(--crm-glass-active); color: var(--crm-glass-accent); }
html.crm-glass:root body .feed-operation-filters .feed-flags-hint,
html.crm-glass:root body .feed-operation-filters .feed-operation-filter-row .feed-filter-reset { color: var(--slate-muted); }
@media (prefers-reduced-transparency: reduce) {
  html.crm-glass:root body .feed-operation-toolbar { background: var(--slate-card-solid); }
}
@media (forced-colors: active) {
  html:root body .feed-operation-toolbar { background: Canvas; color: CanvasText; border-color: CanvasText; box-shadow: none; }
  html:root body .feed-operation-filters .feed-operation-filter-row button,
  html:root body .feed-operation-filters .feed-flag-check { background: ButtonFace !important; color: ButtonText !important; border-color: ButtonText !important; }
  html:root body .feed-operation-filters .feed-operation-filter-row .feed-flag-filter[aria-pressed='true'] { outline: 2px solid Highlight; outline-offset: -3px; }
  html:root body .feed-operation-filters .feed-flags-hint,
  html:root body .feed-operation-filters .feed-filter-count { background: Canvas; color: CanvasText; }
}
