html { --accent: #137d5c; --on-accent: #fff; --sidebar-bg: #102a24; --sidebar-ink: #eaf5f0; --focus-ring: #137d5c; --success-ink: #116045; }
html[data-theme] { --radius-sm: 6px; --radius: 8px; --radius-lg: 8px; }
html[data-theme] * { letter-spacing: 0; }
html[data-theme] :focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 3px; }
html[data-theme] .sidebar { background: var(--sidebar-bg); color: var(--sidebar-ink); }
html[data-theme] .sidebar :is(.brand small, .nav-label, .nav-item, .nav-glyph, .nav-count, .session-summary small, .system-pulse small) { color: var(--sidebar-ink); }
html[data-theme] .nav-item.is-active { color: var(--sidebar-ink); background: color-mix(in srgb, var(--accent) 18%, var(--sidebar-bg)); }
html[data-theme] :is(.topbar, .sticky-save, .toast) { background: var(--surface); border-color: var(--line); }
html[data-theme] :is(.connection-pill, .workspace-section, .filter-chip, .intelligence-strip article, .provider-row.is-managed, .skeleton-list) { background: var(--surface-2); color: var(--ink); border-color: var(--line); }
html[data-theme] :is(input, select, textarea):focus { background: var(--surface); }
html[data-theme] :is(.account-pulse-row, td) { border-color: var(--line); }
html[data-theme] :is(tbody tr:hover, .prompt-list-item:hover, .prompt-list-item.is-active) { background: var(--surface-2); }
html[data-theme] :is(.button-primary, .button-primary:hover:not(:disabled)) { background: var(--accent); color: var(--on-accent); box-shadow: none; }
html[data-theme] :is(.button-danger, .button-danger:hover:not(:disabled)) { background: var(--danger-soft); color: var(--danger); border-color: var(--danger); }
html[data-theme] :is(.account-avatar, .provider-endpoint-preview code) { color: var(--ink); }
html[data-theme] :is(.account-card-head .account-avatar, .provider-mark, .avatar-button) { background: var(--sidebar-bg); color: var(--sidebar-ink); }
html[data-theme] :is(.form-note, .bulk-toolbar, .state-badge.running, .table-badge.granted, .table-badge.active, .table-badge.completed) { background: var(--mint-soft); color: var(--success-ink); border-color: var(--line); }
html[data-theme] :is(.policy-note, .offline-banner, .state-badge.manual-control, .table-badge.contacted, .table-badge.needs-follow-up) { background: var(--amber-soft); color: var(--amber); }
html[data-theme] :is(.state-badge.error, .state-badge.security-blocked, .table-badge.revoked, .table-badge.do-not-contact) { color: var(--danger); }
html[data-theme] :is(.state-badge.queued, .table-badge.new, .metric-icon.blue) { color: var(--blue); }
html[data-theme] :is(.state-badge.starting, .metric-icon.violet) { color: var(--violet); }
html[data-theme] :is(.metric-icon.amber) { color: var(--amber); }
html[data-theme] :is(.state-badge.stopped, .table-badge.unknown, .table-badge.inactive, .secret-status, .run-state, .collection-badges span, .activity-dot, .settings-card code) { background: var(--surface-2); color: var(--muted); }
html[data-theme] :is(.modal, .mobile-nav, .inbox-pane-toolbar, .inbox-thread-pane, .inbox-composer, .message-bubble, .context-block, .brain-shortcut, .brain-source-add-grid > section, .followup-item, .composio-bridge-row, .inbox-folder-strip, .inbox-search-toolbar, .comment-review-row) { background: var(--surface); color: var(--ink); border-color: var(--line); }
html[data-theme] :is(.brain-knowledge-panel, .channel-provider-fields .inline-setting, .conversation-row:hover, .conversation-row.is-active, .conversation-menu-button:hover, .inbox-folder-tab-group:hover, .folder-choice:hover, .outreach-channel-card:hover, .folder-choice-icon.none, .engagement-pill, .provider-row.is-managed .connection-sharing-badge) { background: var(--surface-2); color: var(--ink); border-color: var(--line); }
html[data-theme] .mobile-nav a { color: var(--muted); }
html[data-theme] :is(.mobile-nav a.is-active, .filter-chip.is-active, .unread-badge) { background: var(--accent); color: var(--on-accent); }
html[data-theme] :is(.status-chip, .overview-hero .button-secondary, .brain-count small, .security-card .eyebrow) { color: var(--sidebar-ink); }
html[data-theme] :is(.table-badge.high, .table-badge.approved, .table-badge.comment, .table-badge.sent, .table-badge.replied, .run-state.completed, .activity-dot.success, .secret-status.is-configured, .collection-badges span.is-on, .candidate-explanation, .inbox-safety-note, .campaign-safety-rail span, .explicit-approval, .message-row.outbound .message-bubble) { background: var(--mint-soft); color: var(--success-ink); border-color: var(--line); }
html[data-theme] :is(.inbox-safety-note small, .live-indicator, .draft-preview p) { color: var(--success-ink); }
html[data-theme] :is(.live-indicator, .inbox-safety-note > span:first-child) { background: var(--mint-soft); }
html[data-theme] :is(.table-badge.review, .table-badge.pending, .table-badge.ready, .table-badge.pending-send, .table-badge.uncertain, .run-state.partial, .run-state.partial_success, .activity-dot.warning, .bot-job-summary .warning, .eligibility-reason, .outreach-warning) { background: var(--amber-soft); color: var(--amber); }
html[data-theme] .outreach-warning > span { background: var(--amber-soft); }
html[data-theme] :is(.table-badge.exclude, .table-badge.rejected, .table-badge.ineligible, .table-badge.dismissed, .table-badge.opted_out, .table-badge.failed, .run-state.failed, .run-state.stopped, .activity-dot.error, .outreach-auth-warning, .pipeline-run-error, .browser-runtime-box.security-blocked, .browser-runtime-box.error) { background: var(--danger-soft); color: var(--danger); border-color: var(--line); }
html[data-theme] :is(.table-badge.like, .table-badge.draft, .table-badge.paused, .table-badge.drafted, .table-badge.commenter, .table-badge.both, .engagement-pill.is-on, .run-state.running, .boundary-card > span) { background: var(--blue-soft); color: var(--blue); }
html[data-theme] :is(.table-badge.highlight, .table-badge.liker) { background: var(--violet-soft); color: var(--violet); }
html[data-theme] :is(.table-badge.expired, .table-badge.skipped, .table-badge.not-contacted) { background: var(--surface-2); color: var(--muted); }
html[data-theme] ::placeholder { color: var(--muted); opacity: 1; }
html[data-theme] .switch input:focus-visible + span { outline: 2px solid var(--focus-ring); outline-offset: 3px; }
html[data-theme] .login-screen { background: var(--canvas); }
html[data-theme] :is(.security-card, .overview-hero) { background: var(--sidebar-bg); color: var(--sidebar-ink); }
html[data-theme] :is(.security-card p, .overview-hero .eyebrow, .hero-copy > p) { color: var(--sidebar-ink); }
html[data-theme] :is(.overview-hero::before, .pace-orbit) { display: none; }
html[data-theme] .overview-hero { min-height: auto; display: block; padding: 24px; border-radius: 8px; box-shadow: none; }
html[data-theme] .hero-copy h2 { font-size: 26px; line-height: 1.25; }
html[data-theme] .hero-copy > p { font-size: 13px; }
html[data-theme] .section-intro h2 { font-size: 24px; line-height: 1.3; }
html[data-theme] .section-intro p { max-width: 75ch; }
html[data-theme] :is(.card, .modal, .workspace-section, .settings-bot-card, .icon-button, .button, input, select, textarea) { border-radius: 6px; }
html[data-theme] label { font-size: 12px; }
html[data-theme] :is(.settings-card header p, .modal small, .form-note, .inline-setting small) { font-size: 12px; line-height: 1.5; }
html[data-theme] :is(.settings-layout, .settings-bot-grid) { display: block; }
html[data-theme] .settings-layout > .settings-card { border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; box-shadow: none; padding: 24px 0; }
html[data-theme] .workflow-grid > .settings-card { border: 0; border-top: 1px solid var(--line); border-radius: 0; background: transparent; box-shadow: none; padding: 20px 0; }
.settings-navigation { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 18px; border-bottom: 1px solid var(--line); }
.settings-navigation button { border: 0; border-bottom: 3px solid transparent; border-radius: 0; background: transparent; padding: 12px 15px; color: var(--muted); cursor: pointer; }
.settings-navigation button[aria-pressed="true"] { color: var(--ink); border-bottom-color: var(--accent); font-weight: 750; }
.settings-search { max-width: 420px; margin-bottom: 12px; }
.settings-layout > [data-settings-section][hidden] { display: none !important; }
.settings-empty { padding: 20px 0; color: var(--muted); }
.theme-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.theme-option { min-height: 104px; display: flex; flex-direction: column; align-items: flex-start; gap: 9px; border: 1px solid var(--line); border-radius: 6px; padding: 14px; color: var(--ink); background: var(--surface); cursor: pointer; }
.theme-option[aria-checked="true"] { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.theme-option small { color: var(--muted); }
.theme-swatches { display: flex; gap: 4px; }
.theme-swatches i { width: 21px; height: 16px; border: 1px solid var(--line); border-radius: 3px; }
.appearance-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 18px; }
.appearance-actions label { min-width: 160px; }
.appearance-actions output { color: var(--muted); font-size: 12px; }
.story-settings-summary { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 14px; color: var(--muted); font-size: 13px; }
.story-setup-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0; }
#story-settings-dialog .story-queue-settings { display: grid; grid-template-columns: minmax(0, 1fr); }
#story-settings-dialog .story-queue-settings > * { min-width: 0; }
.settings-bot-card { margin-bottom: 14px; }
.settings-bot-search { max-width: 420px; margin-bottom: 16px; }
#view-story-queue .story-queue-list { grid-template-columns: minmax(0, 1fr); gap: 8px; }
#view-story-queue .story-queue-row { display: grid; grid-template-columns: minmax(160px, .7fr) minmax(220px, 1.6fr) minmax(220px, 1fr); align-items: center; gap: 16px; padding: 12px 14px; }
#view-story-queue .story-queue-head { min-width: 0; align-content: center; }
#view-story-queue .recipient-actions { margin: 0; gap: 6px; justify-content: flex-end; }
.story-queue-copy { min-width: 0; }
#view-story-queue .story-context { min-height: 0; margin: 6px 0 0; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.story-draft-preview summary { font-size: 13px; line-height: 1.5; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.story-draft-preview[open] summary { color: var(--muted); }
.story-draft-preview .story-draft-text { margin-bottom: 0; }
.queue-pagination { display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding: 16px 0; }
.queue-pagination label { display: flex; align-items: center; gap: 10px; margin-inline-end: auto; }
.queue-pagination label > span { margin: 0; }
.queue-pagination select { width: 80px; }
.queue-pagination output { font-size: 12px; color: var(--muted); }
html[dir="rtl"] .queue-pagination .icon-button { transform: scaleX(-1); }
@media (max-width: 1100px) {
  #view-story-queue .story-queue-row { grid-template-columns: minmax(140px, .6fr) minmax(0, 1.4fr); }
  #view-story-queue .recipient-actions { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  #view-story-queue .story-queue-row { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  #view-story-queue .recipient-actions { justify-content: flex-start; }
  .queue-pagination { flex-wrap: wrap; }
}
html[data-density="compact"] main { padding: 20px; }
html[data-density="compact"] :is(.account-card, .pipeline-card, .panel-card, .settings-bot-card) { padding: 14px; }
html[data-density="compact"] :is(td, th) { padding: 8px 10px; }
html[data-density="compact"] :is(input, select, .button) { min-height: 34px; height: 34px; }
@media (max-width: 640px) {
  .settings-navigation { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .settings-navigation button { padding: 10px 5px; font-size: 12px; overflow-wrap: anywhere; }
  .theme-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .theme-option { min-width: 0; padding: 10px; overflow-wrap: anywhere; }
  html[data-theme] .settings-card > header { flex-wrap: wrap; }
  html[data-theme] .settings-card > header > div { min-width: 150px; }
}
.main-page-toolbar, .main-comment-filters { display: flex; align-items: end; gap: 10px; flex-wrap: wrap; margin-block: 12px; }
.main-page-toolbar label { display: grid; gap: 6px; min-width: 200px; }
.main-page-toolbar select, .main-comment-filters select, .main-comment-filters input { max-width: 100%; min-height: 38px; }
.main-comment-filters > * { min-width: 0; flex: 1 1 130px; }
.main-content-section { border-block: 1px solid var(--line); padding-block: 16px; margin-block: 20px; }
.main-media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); gap: 12px; margin-block: 12px; }
.main-media-item { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 12px; border: 1px solid var(--line); border-radius: 6px; padding: 10px; background: var(--surface); }
.main-media-item img, .main-media-placeholder { width: 84px; height: 104px; object-fit: cover; border-radius: 4px; background: var(--canvas); }
.main-media-placeholder { display: grid; place-items: center; color: var(--muted); font-size: 11px; }
.main-media-item strong { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; font-size: 13px; }
.main-media-item small { display: block; color: var(--muted); font-size: 11px; margin-block: 5px; }
.main-media-actions { display: flex; justify-content: space-between; gap: 10px; }
#view-main-page .card-header { flex-wrap: wrap; align-items: center; }
#view-main-page .inbox-intro-actions { flex-wrap: wrap; min-width: 0; max-width: 100%; }
#view-main-page .inbox-intro-actions select { width: auto; max-width: 100%; min-width: 0; }
#view-main-page .operation-panel, #view-main-page .operation-side-stack { min-width: 0; }
#view-main-page .operation-account-row { grid-template-columns: auto minmax(0, 1fr) auto; }
#view-main-page .target-row { grid-template-columns: minmax(0, 1fr) auto; }
#view-main-page :is(.operation-account-row, .target-row, .comment-review-row) { overflow-wrap: anywhere; }
#view-main-page .operation-panel { border: 0; box-shadow: none; border-radius: 0; background: transparent; padding: 0; min-height: 0; }
#view-main-page .operation-stat-grid { margin-block: 14px; }
#view-main-page .operation-side-stack { border-inline-start: 1px solid var(--line); padding-inline-start: 20px; }
#view-main-page .comment-review-row { padding: 14px 0; border-width: 0 0 1px; border-radius: 0; }
#view-main-page .empty-copy { min-height: 110px; padding: 20px; }
#view-main-page .operations-intro h2 { font-size: 24px; }
#main-page-health, #main-media-status, #main-comment-load-status { font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
@media (max-width: 760px) { #view-main-page .operations-layout { grid-template-columns: minmax(0, 1fr); } #view-main-page .operation-side-stack { border-inline-start: 0; padding-inline-start: 0; } .main-page-toolbar > * { max-width: 100%; } }
@media (prefers-reduced-motion: reduce) { html[data-theme] *, html[data-theme] *::before, html[data-theme] *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }