/* Exact-route opt-in. Known interface components only; authored/semantic content is protected. */
@layer crm-admin-ui {
body.crm-admin-ui {
 --ui-gold:#C9A44C !important; --ui-petrol:#176C70 !important; --ui-anthracite:#242629 !important; --ui-warm:#F7F5F0 !important;
 --ui-bg:#181b1d !important; --ui-panel:#242629 !important; --ui-text:#f7f5f0 !important; --ui-muted:#b7bab9 !important; --ui-line:#41474a !important; --ui-input-line:#849096 !important; --ui-soft:#2d3134 !important; --ui-focus:#e3c876 !important;
 --dash-sidebar:250px !important; --dash-bg:var(--ui-bg) !important; --dash-panel:var(--ui-panel) !important; --dash-text:var(--ui-text) !important; --dash-muted:var(--ui-muted) !important; --dash-line:var(--ui-line) !important; --dash-soft:var(--ui-soft) !important; --dash-focus:var(--ui-focus) !important;
 --bg:var(--ui-bg) !important; --card:var(--ui-panel) !important; --fg:var(--ui-text) !important; --text:var(--ui-text) !important; --mut:var(--ui-muted) !important; --border:var(--ui-line) !important;
 --se-page:var(--ui-bg) !important; --se-surface-2:var(--ui-soft) !important; --se-surface-3:var(--ui-panel) !important; --se-input:var(--ui-panel) !important; --se-hover:var(--ui-soft) !important; --se-text-2:var(--ui-text) !important; --se-text-disabled:var(--ui-muted) !important; --se-text-inverse:#242629 !important; --se-border-strong:var(--ui-input-line) !important; --se-primary-hover:#b99540 !important; --se-accent-hover:#12595d !important; --se-accent-contrast:#fff !important; --se-accent-soft:#176C701a !important; --se-accent-border:#176C7080 !important; --se-focus-ring:var(--ui-focus) !important; --se-selection-bg:#C9A44C !important; --se-selection-fg:#242629 !important;
 --se-bg:var(--ui-bg) !important; --se-surface:var(--ui-panel) !important; --se-text:var(--ui-text) !important; --se-text-muted:var(--ui-muted) !important; --se-border:var(--ui-line) !important; --se-primary:#C9A44C !important; --se-primary-contrast:#242629 !important; --se-accent:#176C70 !important;
 --crm-bg:var(--ui-bg) !important; --crm-panel:var(--ui-panel) !important; --crm-subtle:var(--ui-soft) !important; --crm-text:var(--ui-text) !important; --crm-muted:var(--ui-muted) !important; --crm-line:var(--ui-input-line) !important; --crm-soft-line:var(--ui-line) !important; --crm-accent:#C9A44C !important; --crm-on-accent:#242629 !important; --crm-focus:var(--ui-focus) !important;
 background:var(--ui-bg) !important; color:var(--ui-text) !important; font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif !important; color-scheme:dark !important;
}
html.theme-light body.crm-admin-ui { --ui-bg:#F7F5F0 !important; --ui-panel:#fff !important; --ui-text:#242629 !important; --ui-muted:#657076 !important; --ui-line:#e4e3df !important; --ui-input-line:#829096 !important; --ui-soft:#f8f6f1 !important; --ui-focus:#176C70 !important; color-scheme:light !important; }
body.crm-admin-shell:not(.crm-dashboard) { box-sizing:border-box !important; margin:0 !important; padding:56px 0 0 var(--dash-sidebar) !important; min-height:100dvh !important; width:100% !important; }
body.crm-admin-shell:not(.crm-dashboard)>main { box-sizing:border-box !important; width:auto !important; max-width:100% !important; min-width:0 !important; }
body.crm-admin-ui::before,body.crm-admin-ui::after { display:none !important; }
body.crm-admin-ui [data-crm-protected] { isolation:isolate; }
body.crm-admin-ui:not(.crm-dashboard) :is(.card,.panel,.workspace,.stat-card,.kpi-card,.mini-stat,.modal-content,.modal-card,.modal-dialog,.modal-panel,.email-sidebar,.email-list,.email-detail,.file-main,.sidebar,.kanban-column,.board-column):not([data-crm-protected],[data-crm-protected] *) { background:var(--ui-panel) !important; color:var(--ui-text) !important; border-color:var(--ui-line) !important; border-radius:10px !important; box-shadow:0 2px 9px #00000003 !important; backdrop-filter:none !important; }
body.crm-admin-ui:not(.crm-dashboard) :is(.page-header,.page-heading,.toolbar,.filters,.filter-bar,.filter-row,.calendar-toolbar,.file-toolbar,.page-toolbar):not([data-crm-protected],[data-crm-protected] *) { color:var(--ui-text) !important; border-color:var(--ui-line) !important; box-shadow:none !important; border-radius:6px !important; }
body.crm-admin-ui>header:not(.nav-header) { background:transparent !important; color:var(--ui-text) !important; border-color:var(--ui-line) !important; box-shadow:none !important; }
body.crm-admin-ui:not(.crm-dashboard) :is(.page-header h1,.page-heading h1,header>h1,.card>h2,.panel>h2,.workspace>h2):not([data-crm-protected],[data-crm-protected] *) { color:var(--ui-text) !important; text-shadow:none !important; -webkit-text-fill-color:currentColor !important; letter-spacing:-.025em !important; font-family:inherit !important; }
body.crm-admin-ui:not(.crm-dashboard) :is(.mut,.muted,.text-muted,.help-text,.form-hint,.empty-state,.contact-sub):not([data-crm-protected],[data-crm-protected] *) { color:var(--ui-muted) !important; }
body.crm-admin-ui:not(.crm-dashboard) :is(button,.btn,.button):not([data-crm-protected],[data-crm-protected] *,.nav-header *,.nav-mobile-drawer *,.fc-event *,.ql-toolbar *) { background:var(--ui-panel) !important; color:var(--ui-text) !important; border:1px solid var(--ui-input-line) !important; border-radius:6px !important; box-shadow:none !important; font-family:inherit !important; text-shadow:none !important; transform:none !important; }
body.crm-admin-ui:not(.crm-dashboard) :is(button.primary,.btn-primary,.btn.primary,.button.primary,.primary-btn,button[type=submit],#btnAdd,#btnSave,.crm-primary):not([data-crm-protected],[data-crm-protected] *) { background:#C9A44C !important; color:#242629 !important; border-color:#C9A44C !important; }
body.crm-admin-ui:not(.crm-dashboard) :is(button.danger,.btn-danger,.danger-btn):not([data-crm-protected],[data-crm-protected] *) { background:#892f2a !important; color:#fff !important; border-color:#892f2a !important; }
body.crm-admin-ui:not(.crm-dashboard) :is(button:disabled,.btn:disabled):not([data-crm-protected],[data-crm-protected] *) { opacity:.55 !important; cursor:not-allowed !important; }
body.crm-admin-ui:not(.crm-dashboard) :is(input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]):not([type=file]):not([type=hidden]),select,textarea):not([data-crm-protected],[data-crm-protected] *,.ql-toolbar *) { background:var(--ui-panel) !important; color:var(--ui-text) !important; border:1px solid var(--ui-input-line) !important; border-radius:6px !important; box-shadow:none !important; font-family:inherit !important; }
body.crm-admin-ui:not(.crm-dashboard) :is(input,textarea):not([data-crm-protected],[data-crm-protected] *)::placeholder { color:var(--ui-muted) !important; opacity:1 !important; }
body.crm-admin-ui:not(.crm-dashboard) :is(label,.form-label):not([data-crm-protected],[data-crm-protected] *) { color:var(--ui-text) !important; }
body.crm-admin-ui:not(.crm-dashboard) :is(input[type=checkbox],input[type=radio]):not([data-crm-protected],[data-crm-protected] *) { accent-color:#176C70 !important; }
body.crm-admin-ui:not(.crm-dashboard) :is(table,th,td):not([data-crm-protected],[data-crm-protected] *,.fc *,.status-completed,.status-cancelled) { border-color:var(--ui-line) !important; color:var(--ui-text) !important; }
body.crm-admin-ui:not(.crm-dashboard) th:not([data-crm-protected],[data-crm-protected] *,.fc *) { background:var(--ui-soft) !important; color:var(--ui-muted) !important; font-weight:600 !important; text-transform:none !important; letter-spacing:0 !important; }
body.crm-admin-ui:not(.crm-dashboard) :is(a,button,input,select,textarea,summary,[tabindex]):not([data-crm-protected],[data-crm-protected] *):focus-visible { outline:3px solid var(--ui-focus) !important; outline-offset:3px !important; }
body.crm-admin-ui:not(.crm-dashboard) :is(.table-wrap,.table-container,.table-scroll):not([data-crm-protected],[data-crm-protected] *) { overflow-x:auto !important; max-width:100% !important; }
body.crm-admin-shell :is(.modal:not(.workspace),.modal-overlay,.modal-backdrop,.compose-overlay,.attachment-preview-overlay,#pageFeedbackModal) { z-index:20000 !important; }
body.crm-admin-shell>.global-search-modal { position:fixed !important; inset:0 !important; width:100vw !important; height:100dvh !important; max-width:none !important; max-height:none !important; margin:0 !important; transform:none !important; border:0 !important; border-radius:0 !important; padding:60px 16px 24px !important; animation:none !important; z-index:30000 !important; }
body.crm-admin-shell #toast-container { z-index:100001 !important; }
body.crm-admin-shell .crm-shell-profile { display:flex !important; gap:10px !important; align-items:center !important; color:#F7F5F0 !important; font-size:12px !important; text-decoration:none !important; }
body.crm-admin-shell .dash-icon { width:18px !important; height:18px !important; flex:0 0 18px !important; fill:none !important; stroke:currentColor !important; stroke-width:1.75 !important; stroke-linecap:round !important; stroke-linejoin:round !important; }
body.crm-admin-shell .dash-button { display:inline-flex !important; align-items:center !important; justify-content:center !important; gap:8px !important; min-height:38px !important; padding:8px 13px !important; border:1px solid var(--ui-line) !important; border-radius:6px !important; background:var(--ui-panel) !important; color:var(--ui-text) !important; text-decoration:none !important; font:550 12px/1.4 inherit !important; box-shadow:none !important; }
body.crm-admin-shell .dash-gold { background:#C9A44C !important; color:#242629 !important; border-color:#C9A44C !important; }
body.crm-admin-shell .dash-icon use,body.crm-admin-shell #navMobileDrawer :is(span,svg,use,kbd),body.crm-admin-shell .nav-header :is(span,svg,use) { color:inherit !important; }
body.crm-admin-shell .nav-header .action-badge { background:#b91c1c !important; color:#fff !important; }
body.crm-admin-ui[data-crm-family=board] .board>.col { background:var(--ui-panel) !important; color:var(--ui-text) !important; border-color:var(--ui-line) !important; }
body.crm-admin-ui[data-crm-family=board] :is(.col h2,.col h3,.col .count) { color:var(--ui-text) !important; }
body.crm-admin-ui[data-crm-family=board] .col .count { background:var(--ui-soft) !important; }
body.crm-admin-ui[data-crm-family=board] :is(.toolbar a,#openChatLink) { background:var(--ui-panel) !important; color:var(--ui-text) !important; border-color:var(--ui-input-line) !important; }
body.crm-admin-ui[data-crm-route="companies.html"] .status-pill:not([data-crm-protected],[data-crm-protected] *) { color:#0b1020 !important; }
body.crm-admin-shell #navMobileDrawer .nav-mobile-section { background:transparent !important; border:0 !important; box-shadow:none !important; }
body.crm-admin-shell #navMobileDrawer .dash-nav-group,body.crm-admin-shell #navMobileDrawer .dash-nav-group-content { background:transparent !important; border:0 !important; box-shadow:none !important; }
body.crm-admin-shell #navGlobalSearchBtn { display:none !important; }
body.crm-admin-shell .nav-user-menu:not(.open) .nav-user-dropdown { display:none !important; }
body.crm-admin-shell .nav-user-menu.open .nav-user-dropdown { display:block !important; opacity:1 !important; animation:none !important; }
body.crm-admin-ui[data-crm-family=mail] .email-layout { height:calc(100dvh - 56px) !important; width:100% !important; max-width:none !important; margin:0 !important; padding:12px !important; grid-template-columns:200px minmax(250px,.85fr) minmax(0,1fr) !important; }
body.crm-admin-ui[data-crm-family=calendar] .calendar-layout { width:100% !important; min-width:0 !important; grid-template-columns:240px minmax(0,1fr) !important; }
body.crm-admin-ui[data-crm-family=calendar] .calendar-layout:is(.full-width,.list-view) { grid-template-columns:minmax(0,1fr) !important; }
body.crm-admin-ui[data-crm-family=calendar] :is(.fc,.fc-col-header-cell,.fc-scrollgrid,.fc-timegrid-slot,.fc-daygrid-day):not([data-crm-protected],[data-crm-protected] *) { background:var(--ui-panel) !important; border-color:var(--ui-line) !important; }
body.crm-admin-ui[data-crm-family=calendar] :is(.fc-col-header-cell-cushion,.fc-timegrid-slot-label-cushion,.fc-toolbar-title) { color:var(--ui-text) !important; }
body.crm-admin-ui[data-crm-family=calendar] .fc-button { background:var(--ui-panel) !important; color:var(--ui-text) !important; border-color:var(--ui-input-line) !important; }
body.crm-admin-ui[data-crm-family=calendar] .fc-button-active { background:#176C70 !important; color:#fff !important; }
body.crm-admin-ui[data-crm-family=files] .explorer-container { min-width:0 !important; max-width:100% !important; }
body.crm-admin-ui[data-crm-family=board] :is(.board,.kanban-board) { max-width:100% !important; overflow-x:auto !important; }
body.crm-admin-ui[data-crm-family=media] :is(.agent-item,.step) { background:var(--ui-panel) !important; color:var(--ui-text) !important; border-color:var(--ui-line) !important; }
body.crm-admin-ui[data-crm-family=media] :is(.agent-name,#stageStatus strong) { color:var(--ui-text) !important; }
body.crm-admin-ui[data-crm-family=media] .step.active { background:#C9A44C !important; color:#242629 !important; border-color:#C9A44C !important; box-shadow:none !important; }
body.crm-admin-ui[data-crm-family=media] :is(#inspectorEmpty,.ruler-label,.track-name,.log-entry .time) { color:#b7bab9 !important; }
body.crm-admin-ui[data-crm-family=media] .track-id { color:#9ac7ff !important; }
html.theme-light body.crm-admin-ui[data-crm-family=media] #costDisplay { color:#176C70 !important; }
body.crm-admin-ui[data-crm-family=finance] .totals { background:var(--ui-soft) !important; color:var(--ui-text) !important; }
html.theme-light body.crm-admin-ui[data-crm-family=finance] :is(.lock-banner-title,.lock-banner-text,.lock-banner-meta) { color:#762723 !important; }
body.crm-admin-ui[data-crm-route="messaging.html"] div:has(>#eventSelector) { background:var(--ui-panel) !important; color:var(--ui-text) !important; }
body.crm-admin-ui[data-crm-route="profile_settings.html"] :is(.char-counter,#bioCharCount) { color:var(--ui-muted) !important; }
body.crm-admin-ui[data-crm-family=mail] .email-list-status { color:var(--ui-muted) !important; }
body.crm-admin-ui[data-crm-route="company_detail.html"] .badge-inactive { background:#b91c1c !important; color:#fff !important; }
body.crm-admin-ui[data-crm-route="finance_invoices.html"] .payment-partial { background:#713f12 !important; color:#fef3c7 !important; }
body.crm-admin-ui[data-crm-route="tasks.html"] .tasks-layout { grid-template-columns:280px minmax(0,1fr) !important; }
body.crm-admin-ui[data-crm-route="tasks.html"] .tasks-layout>div { min-width:0 !important; }
body.crm-admin-ui[data-crm-route="tasks.html"] #kanbanBoard { max-width:100% !important; overflow-x:auto !important; }
@media(max-width:1000px) { body.crm-admin-ui[data-crm-route="tasks.html"] .tasks-layout { grid-template-columns:minmax(0,1fr) !important; } }
body.crm-admin-ui[data-crm-route="messaging.html"] div:has(>#userSelector) { background:var(--ui-panel) !important; color:var(--ui-text) !important; }
body.crm-admin-ui[data-crm-family=mail] :is(.email-item [title="Email ID"],.email-star.empty) { color:var(--ui-muted) !important; }
body.crm-admin-ui[data-crm-family=media] :is(.card>h2>span,#btnAddSceneManual+span) { color:var(--ui-muted) !important; }
body.crm-admin-shell .nav-header #navGlobalSearchBtn { display:none !important; }
body.crm-admin-ui:not(.crm-dashboard)>header:not(.nav-header) { padding:24px 24px 12px !important; margin:0 !important; border:0 !important; border-radius:0 !important; min-height:0 !important; background:none !important; }
body.crm-admin-ui:not(.crm-dashboard) :is(header>h1,.page-header h1,.page-heading h1) { display:block !important; font-size:30px !important; line-height:1.2 !important; font-weight:650 !important; margin:0 !important; padding:0 !important; min-height:0 !important; border:0 !important; border-radius:0 !important; background:none !important; box-shadow:none !important; }
body.crm-admin-ui:not(.crm-dashboard) :is(header>h1,.page-header h1,.page-heading h1)::before,body.crm-admin-ui:not(.crm-dashboard) :is(header>h1,.page-header h1,.page-heading h1)::after { content:none !important; }
body.crm-admin-ui:not(.crm-dashboard) :is(.toolbar,.filters,.filter-bar,#breadcrumbs,.breadcrumbs) { background:var(--ui-panel) !important; color:var(--ui-text) !important; box-shadow:none !important; }
/* The page title already lives in the fixed shell header. Keep the legacy
   breadcrumb node for scripts, but remove its duplicate strip and bug action. */
body.crm-admin-shell #breadcrumbs { display:none !important; }
body.crm-admin-shell[data-crm-route="communication_distribution.html"] .container > .breadcrumbs { display:none !important; }
body.crm-admin-ui:not(.crm-dashboard) :is(#breadcrumbs,.breadcrumbs) a { color:var(--ui-muted) !important; }
body.crm-admin-ui:not(.crm-dashboard) :is(#btnReload,#btnSearch,.btn-secondary) { background:var(--ui-panel) !important; color:var(--ui-text) !important; border-color:var(--ui-input-line) !important; }
body.crm-admin-ui:not(.crm-dashboard) :is(.btn,button.primary,.btn-primary,.btn-secondary,#btnSave,#btnReload,#btnSearch)>span:not([data-crm-protected],[data-crm-protected] *) { color:inherit !important; }
@media(max-width:700px) { body.crm-admin-ui:not(.crm-dashboard) :is(header>h1,.page-header h1,.page-heading h1) { font-size:24px !important; } body.crm-admin-ui:not(.crm-dashboard)>header:not(.nav-header) { padding:20px 16px 10px !important; } }

/* Audited legacy family chrome; content previews and category graphics stay untouched. */
body.crm-admin-ui:not(.crm-dashboard) h1:not([data-crm-protected],[data-crm-protected] *) { font-size:30px !important; line-height:1.2 !important; padding:0 !important; margin:0 !important; border:0 !important; border-radius:0 !important; background:none !important; box-shadow:none !important; text-shadow:none !important; color:var(--ui-text) !important; -webkit-text-fill-color:currentColor !important; }
body.crm-admin-ui:not(.crm-dashboard) h1:not([data-crm-protected],[data-crm-protected] *)::before,body.crm-admin-ui:not(.crm-dashboard) h1:not([data-crm-protected],[data-crm-protected] *)::after { content:none !important; }
body.crm-admin-ui:not(.crm-dashboard) :is(.info-item,.quick-item,.access-item,.obs-card,.obs-breakdown-row,.form-section,.sticky-actions,.login-container,.reset-card):not([data-crm-protected],[data-crm-protected] *) { background:var(--ui-panel) !important; color:var(--ui-text) !important; border-color:var(--ui-line) !important; box-shadow:none !important; }
body.crm-admin-ui[data-crm-family=access] :is(.login-header p,.login-footer,#explanation) { color:var(--ui-muted) !important; }
body.crm-admin-ui[data-crm-family=access] :is(.login-container,.reset-card) { border:1px solid var(--ui-line) !important; }
body.crm-admin-ui:not(.crm-dashboard) :is(.info-value,.access-item-name,.menu-item-href,.obs-breakdown-row strong,.obs-breakdown-row span):not([data-crm-protected],[data-crm-protected] *) { color:var(--ui-text) !important; }
body.crm-admin-ui:not(.crm-dashboard) :is(.info-label,.access-item-email,.hint):not([data-crm-protected],[data-crm-protected] *) { color:var(--ui-muted) !important; }
body.crm-admin-ui[data-crm-route="agents_office.html"] .chat,body.crm-admin-ui[data-crm-route="bugs.html"] .bug-col-collapsed-count,body.crm-admin-ui[data-crm-route="contact_edit.html"] main details,body.crm-admin-ui[data-crm-route="communication_distribution.html"] :is(.flow-section,.event-selector),body.crm-admin-ui[data-crm-route="menu_editor.html"] :is(.menu-item-header,.orphan-page) { background:var(--ui-panel) !important; color:var(--ui-text) !important; border-color:var(--ui-line) !important; }
body.crm-admin-ui[data-crm-route="contact_edit.html"] main summary,body.crm-admin-ui[data-crm-route="menu_editor.html"] .menu-item-label { color:var(--ui-text) !important; }
body.crm-admin-ui[data-crm-route="menu_editor.html"] #orphanCount { color:#fff4d0 !important; background:#713f12 !important; }
body.crm-admin-ui[data-crm-route="HestiaCP/cloudflarehestia.html"] :is(.sub,.hint,.hint code,.small,.small li,.small b,.small code,#status) { color:var(--ui-muted) !important; }
body.crm-admin-ui[data-crm-route="HestiaCP/cloudflarehestia.html"] .ok { color:#176C70 !important; background:#f7f5f0 !important; }
body.crm-admin-ui[data-crm-route="deploys.html"] :is(.sub,#domainsHint) { color:var(--ui-muted) !important; }
body.crm-admin-ui[data-crm-route="finance_booking_edit.html"] :is(.doc-type,.bank-summary,.booking-preview) { background:var(--ui-soft) !important; color:var(--ui-text) !important; }
body.crm-admin-ui[data-crm-route="finance.html"] .accounting-link-btn { color:#fff !important; background:#176C70 !important; }
body.crm-admin-ui[data-crm-route="finance_vat_report.html"] .check-step-number { color:#fff !important; background:#176C70 !important; }
body.crm-admin-ui[data-crm-route="pieter_bouwman.html"] { --pb-bg:var(--ui-bg) !important; --pb-card:var(--ui-panel) !important; --pb-blue:#176C70 !important; }
body.crm-admin-ui[data-crm-route="pieter_bouwman.html"] :is(.pb-hero,.pb-card,.pb-column,.pb-ticket,.pb-site-card,.pb-invite-note,.pb-chat-messages,.pb-callout) { background:var(--ui-panel) !important; color:var(--ui-text) !important; border-color:var(--ui-line) !important; }
body.crm-admin-ui[data-crm-route="pieter_bouwman.html"] .pb-badge.off { background:#742727 !important; color:#fff !important; }
body.crm-admin-ui[data-crm-route="whatsapp.html"] .wa-empty { background:var(--ui-panel) !important; color:var(--ui-text) !important; }
body.crm-admin-ui[data-crm-route="triggers.html"] .code { background:var(--ui-soft) !important; color:var(--ui-text) !important; }
body.crm-admin-ui[data-crm-route="messagingV2.html"] :is(.loading-overlay,.loading-text) { background:var(--ui-panel) !important; color:var(--ui-text) !important; opacity:1 !important; }
body.crm-admin-ui[data-crm-route="lightsync_editor_v2.html"] :is(.time-display,#timeDisplay,#durationDisplay,.track-label-name,.track-label-type) { color:#f7f5f0 !important; }
body.crm-admin-ui[data-crm-route^="pride"] :is(.control-group,.control-item,.event-selector,.map-legend,.region-info,.tab-buttons,.route-timeline-container,.timeline-editor,.npc-panel,.inbox,.message-panel,.message-item,.zone-event-item,.info-item) { background:var(--ui-panel) !important; color:var(--ui-text) !important; border-color:var(--ui-line) !important; }
body.crm-admin-ui[data-crm-route^="pride"] :is(.time-display,#simTime,#timeDisplay,.route-progress,.inbox-empty,.map-legend h5,.npc-panel h4,#npcNoSelection,.route-timeline-container .mut) { color:var(--ui-text) !important; }
body.crm-admin-ui[data-crm-route^="pride"] :is(#linkBeacon,#linkCaptain,#linkListener,.app-links a) { background:#176C70 !important; color:#fff !important; }
body.crm-admin-ui[data-crm-route="pridesync_broadcast.html"] #authStatus { background:#14532d !important; color:#dcfce7 !important; }
body.crm-admin-ui[data-crm-route="pridesync_broadcast.html"] #refreshTimer { background:var(--ui-soft) !important; color:var(--ui-muted) !important; }
body.crm-admin-ui[data-crm-route="pages_overview.html"] .tag.root { color:#12494c !important; background:#dcefee !important; }
body.crm-admin-ui:not(.crm-dashboard) :is(.badge-inactive,.diagnostic-bad) { background:#b91c1c !important; color:#fff !important; }
body.crm-admin-ui:not(.crm-dashboard) :is(.status-pending,.payment-partial) { background:#713f12 !important; color:#fef3c7 !important; }
body.crm-admin-ui[data-crm-route="messaging_admin.html"] .badge-group { background:#1e40af !important; color:#fff !important; }
body.crm-admin-ui[data-crm-route="event_detail.html"] .badge { color:#0b1020 !important; }
body.crm-admin-ui[data-crm-route="event_endpoint_edit.html"] .badge { background:#475569 !important; color:#fff !important; }
body.crm-admin-ui[data-crm-route="email_settings.html"] .tab.active { background:#176C70 !important; color:#fff !important; }
body.crm-admin-ui[data-crm-route="file_storage.html"] .nav-item.active { background:#176C70 !important; color:#fff !important; }
body.crm-admin-ui[data-crm-route="file_storage.html"] .nav-item.active :is(.icon,.name) { color:#fff !important; }
body.crm-admin-ui[data-crm-route="newsletter_edit.html"] button.primary .block-chip-text span { color:#242629 !important; }
body.crm-admin-ui[data-crm-route="event_rundown.html"] :is(.check-row,.settings-section,details:has(>summary)) { background:var(--ui-panel) !important; color:var(--ui-text) !important; }
body.crm-admin-ui[data-crm-route="event_rundown.html"] :is(.check-row span,summary) { color:var(--ui-text) !important; }
body.crm-admin-ui[data-crm-route="event_rundown_share.html"] :is(.summary-pill,.personal-group-filter,.recipient-table tr.is-unselected,.recipient-table tr.is-relevant,.manual-item,.history-card) { background:var(--ui-panel) !important; color:var(--ui-text) !important; }
body.crm-admin-ui[data-crm-route="event_rundown_share.html"] :is(.section-title,.name,.summary-pill strong) { color:var(--ui-text) !important; }
body.crm-admin-ui[data-crm-route="event_rundown_share.html"] :is(.sub,.screen-muted,#modeHint) { color:var(--ui-muted) !important; }
body.crm-admin-ui[data-crm-route="event_rundown_share.html"] .badge.soft { color:#1e40af !important; background:#e0e7ff !important; }
body.crm-admin-ui:not(.crm-dashboard) :is(main,.card)>a:not(.btn,.button,.primary,[data-crm-protected],[data-crm-protected] *) { color:var(--ui-focus) !important; }
body.crm-admin-ui[data-crm-route="invoice_edit.html"] :is(#invoiceEditForm,.invoice-grid,.invoice-grid>*,.form-section,.event-picker-row) { min-width:0 !important; max-width:100% !important; }
body.crm-admin-ui[data-crm-route="invoice_edit.html"] .invoice-grid { grid-template-columns:repeat(2,minmax(0,1fr)) !important; }
body.crm-admin-ui[data-crm-route="invoice_edit.html"] .sticky-actions button { white-space:normal !important; min-width:0 !important; max-width:100% !important; }
body.crm-admin-ui[data-crm-route="invoice_edit.html"] .event-picker-row { flex-wrap:wrap !important; }
body.crm-admin-ui[data-crm-route="invoice_edit.html"] .event-picker-row select { min-width:0 !important; }
@media(max-width:900px) { body.crm-admin-ui[data-crm-route="invoice_edit.html"] .invoice-grid { grid-template-columns:minmax(0,1fr) !important; } }
@media(max-width:1000px) { body.crm-admin-shell .dash-location span { max-width:130px !important; } body.crm-admin-shell .dash-top-search { flex-shrink:1 !important; min-width:32px !important; } }
@media(max-width:700px) { body.crm-admin-ui:not(.crm-dashboard) h1:not([data-crm-protected],[data-crm-protected] *) { font-size:24px !important; } }
body.crm-admin-ui[data-crm-route="event_rundown.html"] summary.dash-gold { color:#242629 !important; }
body.crm-admin-ui:is([data-crm-route="esim_upload.html"],[data-crm-route="event_checklist.html"],[data-crm-route="event_endpoint_edit.html"],[data-crm-route="fireflies.html"]) :is(main>.hero,main>.page-header) { width:auto !important; max-width:100% !important; min-width:0 !important; box-sizing:border-box !important; }
body.crm-admin-ui[data-crm-route="event_regie_dashboard.html"] :is(main.content,.hero),body.crm-admin-ui[data-crm-route="webhosting.html"] main { width:auto !important; max-width:100% !important; min-width:0 !important; box-sizing:border-box !important; }
body.crm-admin-ui[data-crm-route="hour_card_edit.html"] :is(input,select,textarea) { box-sizing:border-box !important; max-width:100% !important; }
body.crm-admin-ui[data-crm-route="event_endpoint_edit.html"] .access-level-select { min-width:0 !important; max-width:100% !important; flex-shrink:1 !important; }

/* Remaining explicit text/surface pairs found by populated route fixtures. */
body.crm-admin-ui:not(.crm-dashboard) td.mut>span { color:var(--ui-muted) !important; }
body.crm-admin-ui[data-crm-route="company_detail.html"] .contact-edit-link { background:#176C70 !important; color:#fff !important; }
body.crm-admin-ui[data-crm-route="communication_distribution.html"] .flow-section h2 { color:var(--ui-text) !important; }
body.crm-admin-ui[data-crm-route="login.html"] .login-logo p { color:var(--ui-muted) !important; }
body.crm-admin-ui[data-crm-family=access] a { color:var(--ui-focus) !important; }
body.crm-admin-ui[data-crm-route="liquidity_legacy.html"]>div:has(>a[href="liquidity.html"]) { background:#fff4d0 !important; color:#623b0d !important; border-color:#d5b75b !important; }
body.crm-admin-ui[data-crm-route="liquidity_legacy.html"]>div>a[href="liquidity.html"] { color:#623b0d !important; }
body.crm-admin-ui[data-crm-route="clients.html"] a[href="companies.html"] { background:#fff4d0 !important; color:#623b0d !important; }
body.crm-admin-ui[data-crm-route="contact_detail.html"] #contactBox a,body.crm-admin-ui[data-crm-route="org_detail.html"] main a:not(.btn,.primary),body.crm-admin-ui[data-crm-route="event_endpoint_edit.html"] .page-header a,body.crm-admin-ui[data-crm-route="hardware_edit.html"] header a { color:var(--ui-focus) !important; }
body.crm-admin-ui[data-crm-route="event_rundown_share.html"] { --muted:var(--ui-muted) !important; }
body.crm-admin-ui[data-crm-route="event_rundown_share.html"] :is(.screen-muted,.recipient-table tr.is-unselected,.recipient-table tr.is-relevant) { opacity:1 !important; }
body.crm-admin-ui[data-crm-route="finance_booking_edit.html"] .hint { background:var(--ui-soft) !important; }
body.crm-admin-ui[data-crm-route="fix_channel_members.html"] :is(.container,.log) { background:var(--ui-panel) !important; color:var(--ui-text) !important; }
body.crm-admin-ui[data-crm-route="fix_channel_members.html"] .log-info { color:var(--ui-focus) !important; }
body.crm-admin-ui[data-crm-route="fix_channel_members.html"] .log-success { background:#dcfce7 !important; color:#14532d !important; }
body.crm-admin-ui[data-crm-route="fix_channel_members.html"] .log-warning { background:#fff4d0 !important; color:#623b0d !important; }
body.crm-admin-ui:is([data-crm-route="forms.html"],[data-crm-route="identity.html"]) .loading { color:var(--ui-text) !important; opacity:1 !important; animation:none !important; }
body.crm-admin-ui[data-crm-route="file_storage.html"] .folder-item.active { background:#176C70 !important; color:#fff !important; }
body.crm-admin-ui[data-crm-route="file_storage.html"] .folder-item.active :is(.icon,.name) { color:#fff !important; }
body.crm-admin-ui[data-crm-route="newsletter_edit.html"] .contact-picker { background:var(--ui-panel) !important; color:var(--ui-text) !important; }
html.theme-light body.crm-admin-ui[data-crm-route="event_smoelenboek.html"] { --good:#166534 !important; --bad:#b91c1c !important; }
html.theme-light body.crm-admin-ui[data-crm-route="deploys.html"] { --err:#b91c1c !important; }
body.crm-admin-ui[data-crm-route="email_migration_admin.html"] #healthPill { background:#fff !important; color:#242629 !important; }
body.crm-admin-ui[data-crm-route="client_detail.html"] #statQuotes { color:var(--ui-focus) !important; }
html:not(.theme-light) body.crm-admin-ui[data-crm-route="client_detail.html"] #clientBox>div:only-child { color:#fca5a5 !important; }
body.crm-admin-ui[data-crm-route="scanner_simulator.html"] .badge-offline,body.crm-admin-ui[data-crm-route="tag_management.html"] .log-line.error { background:#b91c1c !important; color:#fff !important; }
body.crm-admin-ui[data-crm-route="event_regie_dashboard.html"] :is(.chip.mut,#selectedZoneChip) { color:#455256 !important; }
body.crm-admin-ui[data-crm-route="invoice_edit.html"] #invoiceLines { overflow-x:auto !important; max-width:100% !important; min-width:0 !important; }
body.crm-admin-ui[data-crm-route="invoice_edit.html"] .totals-row { flex-wrap:wrap !important; gap:8px !important; }
body.crm-admin-ui[data-crm-route="invoice_edit.html"] :is(input,select,textarea) { box-sizing:border-box !important; min-width:0 !important; max-width:100% !important; }
body.crm-admin-ui[data-crm-route^="pride"] :is(div:has(>#liveTimeline),div:has(>#simTimeline),div:has(>#statWaiting),div:has(>#statMoving),div:has(>#statStopped),div:has(>#statFinished),div:has(>#statAvgDist),div:has(>#estEndTime),#npcSection,#liveModeLabel,#zoneEventsLabel,#audioModeLabel,#zoneEventLog) { background:var(--ui-panel) !important; color:var(--ui-text) !important; }
body.crm-admin-ui[data-crm-route^="pride"] :is(#npcSection>h4,.message-panel>h4,div:has(>#liveTimeline)>div>span,div:has(>#simTimeline)>div>span) { color:var(--ui-text) !important; }
body.crm-admin-ui[data-crm-route^="pride"] :is(#liveTimeline,#simTimeline)+div>span { color:var(--ui-muted) !important; }
body.crm-admin-ui[data-crm-route^="pride"] .badge-sim { background:#6b21a8 !important; color:#fff !important; }
body.crm-admin-ui[data-crm-route^="pride"] :is(.badge-live,.badge-active,#liveIndicator) { background:#166534 !important; color:#fff !important; opacity:1 !important; }
body.crm-admin-ui[data-crm-route="pridesync.html"] .nav-card .badge { background:#176C70 !important; color:#fff !important; }
body.crm-admin-ui[data-crm-route="pride_dashboard.html"] #dashboardEventName { color:var(--ui-focus) !important; }
body.crm-admin-ui[data-crm-route="screenrecordings.html"] { --sr-bg:var(--ui-bg) !important; --sr-bg-soft:var(--ui-soft) !important; --sr-card:var(--ui-panel) !important; --sr-card-2:var(--ui-soft) !important; --sr-text:var(--ui-text) !important; --sr-muted:var(--ui-muted) !important; --sr-border:var(--ui-line) !important; }
body.crm-admin-ui[data-crm-route="screenrecordings.html"] :is(.sr-hero,.sr-notice,.sr-media-empty,.sr-media-rail-card) { background:var(--ui-panel) !important; color:var(--ui-text) !important; }
body.crm-admin-ui[data-crm-route="screenrecordings.html"] :is(.sr-media-empty>h3,.sr-media-empty>p) { color:var(--ui-text) !important; }
/* Playback mock/callout surfaces intentionally retain their dark presentation. */
body.crm-admin-ui[data-crm-route="screenrecordings.html"] :is(.sr-bubble,.sr-bubble strong,.sr-mock-tile strong,.sr-mock-tile span,.sr-window-header span) { color:#f7f5f0 !important; }
body.crm-admin-ui[data-crm-family=contacts] .crm-workspace { padding:24px !important; }
body.crm-admin-shell .nav-header { position:fixed !important; left:var(--dash-sidebar) !important; right:0 !important; top:0 !important; height:56px !important; margin:0 !important; padding:0 20px !important; width:auto !important; border:0 !important; border-bottom:1px solid var(--dash-line) !important; border-radius:0 !important; background:var(--dash-panel) !important; color:var(--dash-text) !important; box-shadow:none !important; backdrop-filter:none !important; display:flex !important; gap:14px !important; z-index:10000 !important; }
body.crm-admin-shell #navGlobalSearchBtn,body.crm-admin-shell #navSearchBtn,body.crm-admin-shell .nav-header>.nav-logo,body.crm-admin-shell .nav-links { display:none !important; }
body.crm-admin-shell .dash-location { display:flex !important; gap:10px !important; align-items:center !important; color:var(--dash-text) !important; font-size:12px !important; font-weight:550 !important; margin-right:auto !important; }
body.crm-admin-shell .dash-top-search { display:flex !important; align-items:center !important; gap:9px !important; width:clamp(180px,24vw,340px) !important; min-height:34px !important; padding:7px 10px !important; border:1px solid var(--dash-line) !important; border-radius:7px !important; background:var(--dash-panel) !important; color:var(--dash-muted) !important; font-size:11px !important; text-align:left !important; box-shadow:none !important; }
body.crm-admin-shell .dash-top-search kbd { margin-left:auto !important; font-size:10px !important; color:var(--dash-muted) !important; }
body.crm-admin-shell .nav-actions { display:flex !important; gap:8px !important; overflow:visible !important; max-width:none !important; }
body.crm-admin-shell :is(.nav-action-btn,.nav-user-btn,#seThemeToggle,.dash-tools>summary) { width:32px !important; height:32px !important; min-width:32px !important; display:inline-flex !important; align-items:center !important; justify-content:center !important; gap:5px !important; padding:6px !important; border:1px solid var(--dash-line) !important; border-radius:50% !important; background:var(--dash-panel) !important; color:var(--dash-text) !important; box-shadow:none !important; transform:none !important; font-size:14px !important; }
body.crm-admin-shell .nav-actions :is(.dash-header-agenda,.dash-header-credentials,.dash-header-whatsapp,#lexAdminFab) { box-sizing:border-box !important; position:static !important; inset:auto !important; flex:0 0 32px !important; width:32px !important; height:32px !important; min-width:32px !important; max-width:32px !important; min-height:32px !important; max-height:32px !important; align-items:center !important; justify-content:center !important; padding:6px !important; border:1px solid var(--dash-line) !important; border-radius:50% !important; background:var(--dash-panel) !important; color:var(--dash-text) !important; box-shadow:none !important; transform:none !important; font-size:16px !important; line-height:1 !important; text-decoration:none !important; z-index:auto !important; }
body.crm-admin-shell .nav-actions :is(.dash-header-agenda,.dash-header-credentials,.dash-header-whatsapp) { display:inline-flex !important; }
body.crm-admin-shell .nav-actions :is(.dash-header-agenda,.dash-header-credentials,.dash-header-whatsapp,#lexAdminFab):hover { background:var(--dash-soft) !important; border-color:var(--ui-focus) !important; }
body.crm-admin-shell #lexAdminPanel { left:auto !important; right:12px !important; top:62px !important; bottom:auto !important; max-height:calc(100dvh - 74px) !important; }
body.crm-admin-shell .nav-user-name,body.crm-admin-shell .nav-user-arrow { display:none !important; }
/* Neutralize broad page button rules without changing the actions in the overflow menu. */
body.crm-admin-shell .nav-header .nav-actions > :is(.nav-action-btn,#seThemeToggle),
body.crm-admin-shell .nav-header .nav-actions .nav-user-btn,
body.crm-admin-shell .nav-header .nav-actions .dash-tools > summary {
  box-sizing:border-box !important; flex:0 0 32px !important;
  width:32px !important; min-width:32px !important; max-width:32px !important;
  height:32px !important; min-height:32px !important; max-height:32px !important;
  padding:6px !important; line-height:1 !important;
}
body.crm-admin-shell .nav-user-icon { font-size:18px !important; }
body.crm-admin-shell .nav-user-dropdown { background:var(--dash-panel) !important; color:var(--dash-text) !important; border:1px solid var(--dash-line) !important; }
body.crm-admin-shell .nav-user-dropdown-item,body.crm-admin-shell .nav-user-info { color:var(--dash-text) !important; background:var(--dash-panel) !important; }
body.crm-admin-shell .nav-user-dropdown-item:hover { background:var(--dash-soft) !important; }
body.crm-admin-shell .dash-tools { position:relative !important; }
body.crm-admin-shell .dash-tools>summary::-webkit-details-marker { display:none !important; }
body.crm-admin-shell .dash-menu-panel { position:absolute !important; top:calc(100% + 8px) !important; right:0 !important; min-width:200px !important; padding:6px !important; border:1px solid var(--dash-line) !important; border-radius:8px !important; background:var(--dash-panel) !important; box-shadow:0 10px 25px #00000020 !important; z-index:50 !important; }
body.crm-admin-shell .dash-menu-panel :is(a,button) { display:flex !important; align-items:center !important; gap:8px !important; width:100% !important; min-height:36px !important; padding:8px 10px !important; border:0 !important; border-radius:4px !important; color:var(--dash-text) !important; background:transparent !important; text-decoration:none !important; font-size:12px !important; text-align:left !important; }
body.crm-admin-shell .dash-menu-panel :is(a,button):hover { background:var(--dash-soft) !important; }
body.crm-admin-shell .dash-menu-panel :is(a.dash-compact-notifications,a.dash-compact-credentials) { display:none !important; }
body.crm-admin-shell .dash-menu-panel .action-badge { position:static !important; margin-left:auto !important; }
body.crm-admin-shell .nav-mobile-drawer { position:fixed !important; inset:0 auto 0 0 !important; display:flex !important; flex-direction:column !important; width:var(--dash-sidebar) !important; max-width:none !important; height:100dvh !important; transform:none !important; background:#242629 !important; color:#f7f5f0 !important; border:0 !important; z-index:10030 !important; overflow:hidden !important; box-shadow:none !important; }
body.crm-admin-shell .nav-mobile-drawer-header { flex:0 0 auto !important; display:flex !important; align-items:center !important; justify-content:space-between !important; padding:16px 15px 10px !important; border:0 !important; background:#242629 !important; }
body.crm-admin-shell .nav-mobile-drawer .nav-logo { display:flex !important; gap:9px !important; padding:0 !important; margin:0 !important; color:#f7f5f0 !important; font-size:16px !important; background:transparent !important; }
body.crm-admin-shell .nav-mobile-drawer .logo-text { display:block !important; }
body.crm-admin-shell .dash-brand-symbol { width:31px !important; height:31px !important; object-fit:contain !important; }
body.crm-admin-shell .nav-mobile-drawer .logo-icon { display:flex !important; }
body.crm-admin-shell .dash-sidebar-search { display:flex !important; align-items:center !important; gap:8px !important; flex:0 0 auto !important; margin:12px 16px 14px !important; padding:9px 11px !important; min-height:35px !important; background:#303338 !important; color:#e5e5e0 !important; border:1px solid #4c5054 !important; border-radius:6px !important; font-size:11px !important; box-shadow:none !important; }
body.crm-admin-shell .dash-sidebar-search kbd { margin-left:auto !important; padding:1px 4px !important; border-radius:3px !important; background:#45494e !important; color:#e2e2dd !important; font-size:10px !important; }
body.crm-admin-shell .nav-mobile-menu { flex:1 !important; min-height:0 !important; padding:0 15px 18px !important; overflow:auto !important; overscroll-behavior:contain !important; }
body.crm-admin-shell .nav-mobile-section { padding:17px 8px 7px !important; margin:0 !important; color:#c4c7c7 !important; font-size:9px !important; font-weight:550 !important; letter-spacing:.13em !important; text-transform:uppercase !important; opacity:1 !important; }
body.crm-admin-shell .nav-mobile-item { display:flex !important; align-items:center !important; gap:10px !important; min-height:34px !important; padding:7px 10px !important; color:#e3e5e4 !important; background:transparent !important; border:0 !important; border-radius:6px !important; font-size:11px !important; text-decoration:none !important; }
body.crm-admin-shell .nav-mobile-item .icon { display:inline-flex !important; width:17px !important; flex:0 0 17px !important; }
body.crm-admin-shell .nav-mobile-item .dash-icon { width:16px !important; height:16px !important; flex-basis:16px !important; }
body.crm-admin-shell .nav-mobile-item:hover { background:#363a3e !important; color:#fff !important; }
body.crm-admin-shell .nav-mobile-item.active { background:#C9A44C35 !important; color:#f9ecd1 !important; border-left:2px solid #C9A44C !important; }
body.crm-admin-shell .nav-mobile-item.dummy { opacity:.55 !important; }
body.crm-admin-shell .nav-mobile-drawer-close,body.crm-admin-shell .nav-header>.nav-mobile-btn { display:none !important; }
body.crm-admin-shell .nav-mobile-overlay { display:none !important; }
body.crm-admin-shell .dash-sidebar-footer { flex:0 0 auto !important; padding:13px 16px !important; border-top:1px solid #45494b !important; background:#242629 !important; }
body.crm-admin-shell #profilePhotoLink { display:flex !important; align-items:center !important; gap:10px !important; color:#f7f5f0 !important; text-decoration:none !important; }
body.crm-admin-shell #profilePhotoContainer { width:34px !important; height:34px !important; flex:0 0 34px !important; border-radius:50% !important; overflow:hidden !important; display:flex !important; align-items:center !important; justify-content:center !important; background:#424749 !important; box-shadow:none !important; transform:none !important; }
body.crm-admin-shell #profilePhotoFallback { display:flex !important; width:100% !important; height:100% !important; align-items:center !important; justify-content:center !important; }
body.crm-admin-shell #dashboardUserName { display:block !important; font-size:11px !important; color:#f7f5f0 !important; }
body.crm-admin-shell #dashboardUserRole { display:block !important; font-size:10px !important; color:#b8bcbd !important; }
body.crm-admin-shell #navMobileDrawer :is(span,svg,use,kbd) { color:inherit !important; background:transparent !important; box-shadow:none !important; }
/* Gold menu pictograms remain distinct from white labels and the active row. */
body.crm-admin-shell #navMobileDrawer #navMobileMenu .nav-mobile-item .icon .dash-icon,
body.crm-admin-shell #navMobileDrawer #navMobileMenu .nav-mobile-item .icon .dash-icon use { color:#e1bd65 !important; }
body.crm-admin-shell #navMobileDrawer .nav-mobile-section { background:transparent !important; box-shadow:none !important; border:0 !important; }
body.crm-admin-shell #btnGlobalSearch::after { content:none !important; }
body.crm-admin-shell .nav-user-menu:not(.open) .nav-user-dropdown { display:none !important; }
body.crm-admin-shell .nav-user-menu.open .nav-user-dropdown { display:block !important; animation:none !important; opacity:1 !important; }
body.crm-admin-shell .dash-nav-group,body.crm-admin-shell .dash-nav-group-content { margin:0 !important; padding:0 !important; background:transparent !important; border:0 !important; box-shadow:none !important; }
body.crm-admin-shell .dash-nav-group { margin-bottom:4px !important; }
body.crm-admin-shell .dash-nav-group-toggle { width:100% !important; min-height:44px !important; display:flex !important; align-items:center !important; justify-content:space-between !important; gap:10px !important; padding:10px 9px !important; border:0 !important; border-radius:5px !important; background:transparent !important; color:#e8e9e6 !important; font-size:12px !important; font-weight:600 !important; text-align:left !important; box-shadow:none !important; }
body.crm-admin-shell .dash-nav-group-toggle:hover,body.crm-admin-shell .dash-nav-group-toggle[aria-expanded="true"] { background:#176C70 !important; color:#fff !important; }
body.crm-admin-shell .dash-nav-group-toggle>.dash-icon { width:15px !important; height:15px !important; flex-basis:15px !important; transform:rotate(-90deg) !important; }
body.crm-admin-shell .dash-nav-group-toggle[aria-expanded="true"]>.dash-icon { transform:none !important; }
body.crm-admin-shell .dash-nav-group-content[hidden] { display:none !important; }
body.crm-admin-shell .dash-nav-group-content .nav-mobile-section { margin-top:10px !important; padding-left:9px !important; }
@media(max-width:1250px) { body.crm-admin-shell { --dash-sidebar:230px !important; } body.crm-admin-shell .dash-top-search { width:180px !important; } }
@media(max-width:1000px) {
 body.crm-admin-shell:not(.crm-dashboard) { padding:56px 0 0 !important; }
 body.crm-admin-shell .nav-header { left:0 !important; padding:0 14px !important; gap:10px !important; }
 body.crm-admin-shell .nav-mobile-drawer { transform:translateX(-100%) !important; width:270px !important; max-width:90vw !important; transition:transform 160ms !important; }
 body.crm-admin-shell .nav-mobile-drawer.active { transform:translateX(0) !important; }
 body.crm-admin-shell .nav-mobile-drawer-close,body.crm-admin-shell .nav-header>.nav-mobile-btn { display:flex !important; align-items:center !important; justify-content:center !important; width:32px !important; height:32px !important; min-width:32px !important; border:1px solid var(--ui-input-line) !important; border-radius:5px !important; background:transparent !important; color:var(--ui-text) !important; }
 body.crm-admin-shell .nav-mobile-drawer-close { color:#fff !important; }
 body.crm-admin-shell .nav-mobile-overlay.active { display:block !important; position:fixed !important; inset:0 !important; background:#10131588 !important; z-index:10020 !important; }
 body.crm-admin-ui[data-crm-family=mail] .email-layout { grid-template-columns:190px minmax(0,1fr) !important; height:auto !important; min-height:calc(100dvh - 56px) !important; }
}
@media(max-width:700px) {
 body.crm-admin-shell .nav-header { padding:0 10px !important; gap:8px !important; }
 body.crm-admin-shell .dash-location { display:none !important; }
 body.crm-admin-shell .dash-top-search { width:32px !important; min-width:32px !important; height:32px !important; padding:6px !important; justify-content:center !important; border-radius:50% !important; }
 body.crm-admin-shell .dash-top-search span,body.crm-admin-shell .dash-top-search kbd { display:none !important; }
 body.crm-admin-shell .nav-actions { gap:5px !important; }
 /* The details toggle event is asynchronous; keep its panel in the viewport
    even before it is moved to the fixed overlay position. */
 body.crm-admin-shell .nav-header .dash-tools > .dash-menu-panel {
   position:fixed !important; top:56px !important; left:10px !important; right:auto !important;
   box-sizing:border-box !important; width:min(232px,calc(100vw - 20px)) !important;
   min-width:0 !important; max-width:calc(100vw - 20px) !important;
 }
 body.crm-admin-ui[data-crm-family=mail] .email-layout { grid-template-columns:minmax(0,1fr) !important; }
 body.crm-admin-ui[data-crm-family=calendar] .calendar-layout { grid-template-columns:minmax(0,1fr) !important; height:auto !important; }
}
@media(max-width:420px) {
 body.crm-admin-shell .nav-header { gap:6px !important; }
 body.crm-admin-shell .dash-top-search { display:none !important; }
 body.crm-admin-shell .nav-actions { gap:4px !important; }
 body.crm-admin-shell .nav-actions .dash-header-credentials { display:none !important; }
 body.crm-admin-shell .nav-header .nav-actions #navNotificationsBtn { display:inline-flex !important; }
 body.crm-admin-shell .dash-menu-panel :is(a.dash-compact-notifications,a.dash-compact-credentials) { display:flex !important; }
}
@media print {
 html body.crm-admin-ui { --ui-bg:#fff !important; --ui-panel:#fff !important; --ui-text:#242629 !important; --ui-muted:#505b60 !important; --ui-soft:#f3f3f0 !important; --ui-line:#c5c9c7 !important; --ui-input-line:#657076 !important; --ui-focus:#176C70 !important; color-scheme:light !important; color:#242629 !important; background:#fff !important; }
 body.crm-admin-shell { padding:0 !important; margin:0 !important; background:#fff !important; }
 body.crm-admin-shell :is(.nav-header,.nav-mobile-drawer,.nav-mobile-overlay) { display:none !important; }
}
@media(prefers-reduced-motion:reduce) { body.crm-admin-shell .nav-mobile-drawer { transition:none !important; } }
body.crm-admin-shell .dashboard-layer { display:none !important; position:fixed !important; inset:0 !important; padding:28px !important; align-items:center !important; justify-content:center !important; background:#10131575 !important; backdrop-filter:blur(6px) !important; z-index:20000 !important; }
body.crm-admin-shell .dashboard-layer.active { display:flex !important; }
body.crm-admin-shell .dashboard-layer-shell { display:flex !important; flex-direction:column !important; width:min(1100px,100%) !important; height:min(900px,calc(100dvh - 56px)) !important; overflow:hidden !important; border:1px solid var(--dash-line) !important; border-radius:12px !important; background:var(--dash-panel) !important; box-shadow:0 25px 90px #00000035 !important; }
body.crm-admin-shell .dashboard-layer-bar { display:flex !important; flex:0 0 auto !important; align-items:center !important; justify-content:space-between !important; gap:12px !important; padding:12px 16px !important; border-bottom:1px solid var(--dash-line) !important; background:var(--dash-panel) !important; }
body.crm-admin-shell .dashboard-layer-title { font-size:14px !important; font-weight:600 !important; color:var(--dash-text) !important; }
body.crm-admin-shell .dashboard-layer-sub { font-size:11px !important; color:var(--dash-muted) !important; }
body.crm-admin-shell .dashboard-layer-close { border:1px solid var(--dash-line) !important; border-radius:5px !important; padding:7px 12px !important; background:var(--dash-panel) !important; color:var(--dash-text) !important; }
body.crm-admin-shell .dashboard-layer-frame { width:100% !important; flex:1 !important; min-height:0 !important; border:0 !important; background:var(--dash-panel) !important; }
body.crm-admin-shell.dashboard-layer-open { overflow:hidden !important; }
body.crm-admin-shell .dash-location span { max-width:240px !important; white-space:nowrap !important; overflow:hidden !important; text-overflow:ellipsis !important; }
@media(max-width:700px) {body.crm-admin-shell .dashboard-layer { padding:0 !important; }body.crm-admin-shell .dashboard-layer-shell { width:100% !important; height:100dvh !important; border:0 !important; border-radius:0 !important; }}
body.crm-admin-shell[data-crm-mode=fullscreen] { padding-left:0 !important; }
body.crm-admin-shell[data-crm-mode=fullscreen] .nav-header { left:0 !important; }
body.crm-admin-shell[data-crm-mode=fullscreen] .nav-mobile-drawer { transform:translateX(-100%) !important; width:270px !important; max-width:90vw !important; }
body.crm-admin-shell[data-crm-mode=fullscreen] .nav-mobile-drawer.active { transform:translateX(0) !important; }
body.crm-admin-shell[data-crm-mode=fullscreen] :is(.nav-header>.nav-mobile-btn,.nav-mobile-drawer-close) { display:flex !important; align-items:center !important; justify-content:center !important; width:32px !important; height:32px !important; min-width:32px !important; border:1px solid var(--ui-input-line) !important; border-radius:5px !important; background:transparent !important; color:var(--ui-text) !important; }
body.crm-admin-shell[data-crm-mode=fullscreen] .nav-mobile-drawer-close { color:#fff !important; }
body.crm-admin-shell[data-crm-mode=fullscreen] .nav-mobile-overlay.active { display:block !important; position:fixed !important; inset:0 !important; background:#10131588 !important; z-index:10020 !important; }

/* Final route-specific contrast pairs; semantic state colors remain distinct. */
body.crm-admin-ui[data-crm-route="Video Editor/video_production_kanban.html"] { --panel:var(--ui-panel) !important; --muted:var(--ui-muted) !important; --line:var(--ui-line) !important; }
body.crm-admin-ui[data-crm-route="Video Editor/video_production_kanban.html"] :is(.agent,.kpi div,.burnup,.critical-box,.release-box,.beginner-box,.live-log,.live-item,.chat-log,.msg,.chip,.col) { background:var(--ui-panel) !important; color:var(--ui-text) !important; border-color:var(--ui-line) !important; }
body.crm-admin-ui[data-crm-route="Video Editor/video_production_kanban.html"] :is(.tiny,.agent .meta,.burnup .row,.beginner-box .line,.beginner-box .terms div,.release-box ul,.live-item .h,.msg .h) { color:var(--ui-muted) !important; }
body.crm-admin-ui[data-crm-route="Video Editor/video_production_kanban.html"] :is(.critical-box .path,.beginner-box .next,.gate,.release-box .warn) { color:var(--ui-focus) !important; }
body.crm-admin-ui[data-crm-route="clients.html"] .client-inactive { color:#ff9d98 !important; }
html.theme-light body.crm-admin-ui[data-crm-route="clients.html"] .client-inactive { color:#a72a25 !important; }
body.crm-admin-ui[data-crm-route="event_regie_dashboard.html"] :is(.chip.mut,#selectedZoneChip) { background:var(--ui-soft) !important; color:var(--ui-text) !important; }
body.crm-admin-ui[data-crm-route="fix_channel_members.html"] .subtitle,body.crm-admin-ui[data-crm-route="menu_editor.html"] #editOptions>p,body.crm-admin-ui[data-crm-route="pridesync_setup.html"] .timeline-scale span { color:var(--ui-muted) !important; }
body.crm-admin-ui[data-crm-route="hardware_edit.html"] a[href="hardware.html"],body.crm-admin-ui[data-crm-route="whatsapp_settings.html"] main a { color:var(--ui-focus) !important; }
body.crm-admin-ui[data-crm-route="openprovider_domains.html"] { --danger:#ff9d98 !important; }
html.theme-light body.crm-admin-ui[data-crm-route="openprovider_domains.html"] { --danger:#a72a25 !important; }
body.crm-admin-ui[data-crm-route="openprovider_domains.html"] #statCloudflare { color:var(--ui-focus) !important; }
body.crm-admin-ui[data-crm-route="pride_dashboard.html"] :is(#btnSaveControls,#btnRefresh) { background:#C9A44C !important; color:#242629 !important; opacity:1 !important; }
body.crm-admin-ui[data-crm-route="pride_dashboard.html"] #btnEmergSlow { background:#8a4b00 !important; color:#fff !important; }
body.crm-admin-ui[data-crm-route="pride_dashboard.html"] #btnEmergResume { background:#176438 !important; color:#fff !important; }
body.crm-admin-ui[data-crm-route="pridesync_simulation.html"] :is(div:has(>#npcInbox),#eventLog) { background:var(--ui-panel) !important; color:var(--ui-text) !important; }
body.crm-admin-ui[data-crm-route="pridesync_simulation.html"] div:has(>#npcInbox)>h4,body.crm-admin-ui[data-crm-route="project_workload.html"] .pf-label { color:var(--ui-text) !important; }
body.crm-admin-ui[data-crm-route="screenrecordings.html"] .sr-window-bar span { color:#f7f5f0 !important; }
body.crm-admin-ui[data-crm-route="tag_people_koppeling.html"] .log-line.error { background:#892f2a !important; color:#fff !important; }
body.crm-admin-ui[data-crm-route="whatsapp_settings.html"] #noPersonWarning h3 { color:#ff9d98 !important; }
html.theme-light body.crm-admin-ui[data-crm-route="whatsapp_settings.html"] #noPersonWarning h3 { color:#a72a25 !important; }
body.crm-admin-ui[data-crm-route="webhook_admin.html"] .sort-icon { color:var(--ui-muted) !important; opacity:1 !important; }
/* Reflow against the requested device viewport; wide work areas scroll locally. */
@media(max-width:700px) {
 body.crm-admin-ui:is([data-crm-route="hour_card_edit.html"],[data-crm-route="hour_card_usage.html"],[data-crm-route="hour_cards.html"],[data-crm-route="pending_invoice_lines.html"])>header:not(.nav-header) { box-sizing:border-box !important; width:auto !important; max-width:100% !important; flex-wrap:wrap !important; }
 body.crm-admin-ui:is([data-crm-route="event_rundown_share.html"],[data-crm-route="finance_consumables.html"],[data-crm-route="pridesync_setup.html"],[data-crm-route="pridesync_simulation.html"],[data-crm-route="scanner_simulator.html"]) main { grid-template-columns:minmax(0,1fr) !important; }
 body.crm-admin-ui:is([data-crm-route="event_rundown_share.html"],[data-crm-route="finance_consumables.html"],[data-crm-route="pridesync_setup.html"],[data-crm-route="pridesync_simulation.html"],[data-crm-route="scanner_simulator.html"]) main>* { min-width:0 !important; max-width:100% !important; box-sizing:border-box !important; }
 body.crm-admin-ui[data-crm-route="event_rundown_share.html"] :is(.top>div,#summaryGrid,#modeGrid) { min-width:0 !important; max-width:100% !important; overflow-wrap:anywhere !important; }
 body.crm-admin-ui[data-crm-route="event_rundown_share.html"] #modeGrid { grid-template-columns:minmax(0,1fr) !important; }
 body.crm-admin-ui[data-crm-route="finance_consumables.html"] :is(.tabs,.card>div:first-child) { flex-wrap:wrap !important; min-width:0 !important; }
 body.crm-admin-ui[data-crm-route="finance_consumables.html"] :is(.tab-content,.tab-content>.card) { min-width:0 !important; max-width:100% !important; box-sizing:border-box !important; overflow-x:auto !important; }
 body.crm-admin-ui:is([data-crm-route="po_edit.html"],[data-crm-route="quote_edit.html"]) :is(.po-grid,.invoice-grid) { grid-template-columns:minmax(0,1fr) !important; min-width:0 !important; max-width:100% !important; }
 body.crm-admin-ui:is([data-crm-route="po_edit.html"],[data-crm-route="quote_edit.html"]) :is(.po-grid,.invoice-grid)>div { min-width:0 !important; max-width:100% !important; }
 body.crm-admin-ui:is([data-crm-route="po_edit.html"],[data-crm-route="quote_edit.html"]) :is(input,select,textarea) { box-sizing:border-box !important; min-width:0 !important; max-width:100% !important; }
 body.crm-admin-ui[data-crm-route="po_edit.html"] .line-item { grid-template-columns:minmax(0,2fr) repeat(3,minmax(0,1fr)) auto !important; }
 body.crm-admin-ui[data-crm-route="quote_edit.html"] .sticky-actions { flex-wrap:wrap !important; min-width:0 !important; max-width:100% !important; box-sizing:border-box !important; }
 body.crm-admin-ui[data-crm-route="quote_edit.html"] :is(.line-item,.line-item-meta,.quick-event-dates) { grid-template-columns:minmax(0,1fr) !important; }
 body.crm-admin-ui[data-crm-route="password_reset.html"] .reset-card { box-sizing:border-box !important; width:calc(100vw - 24px) !important; max-width:440px !important; min-width:0 !important; margin:12px !important; overflow-wrap:anywhere !important; }
 body.crm-admin-ui[data-crm-route="event_planning_v3.html"] .topbar { flex-wrap:wrap !important; height:auto !important; }
 body.crm-admin-ui[data-crm-route="lightsync_editor_v2.html"] :is(header:not(.nav-header),.header-actions) { flex-wrap:wrap !important; min-width:0 !important; max-width:100% !important; box-sizing:border-box !important; }
 body.crm-admin-ui[data-crm-route="lightsync_editor_v2.html"] .editor-container { grid-template-columns:minmax(0,1fr) !important; height:auto !important; }
 body.crm-admin-ui[data-crm-route="openprovider_domains.html"] header:not(.nav-header)>div,body.crm-admin-ui[data-crm-route="openprovider_domains.html"] header:not(.nav-header)>div>div:has(>button),body.crm-admin-ui[data-crm-route="page_feedback.html"] .header-content>div:has(#btnExportSummary),body.crm-admin-ui[data-crm-route="pridesync_broadcast.html"] .header-info { flex-wrap:wrap !important; min-width:0 !important; max-width:100% !important; }
 body.crm-admin-ui[data-crm-route="pridesync_setup.html"] .tab-buttons { flex-wrap:wrap !important; }
 body.crm-admin-ui[data-crm-route="pridesync_simulation.html"] :is(main>div,main>div>.card) { min-width:0 !important; max-width:100% !important; box-sizing:border-box !important; }
 body.crm-admin-ui[data-crm-route="pridesync_simulation.html"] div:has(>#statWaiting) { grid-template-columns:repeat(2,minmax(0,1fr)) !important; }
 body.crm-admin-ui[data-crm-route="scanner_simulator.html"] .simulator-grid { grid-template-columns:minmax(0,1fr) !important; }
 body.crm-admin-ui[data-crm-route="scanner_simulator.html"] .simulator-grid>div { min-width:0 !important; }
 body.crm-admin-ui[data-crm-route="Video Editor/video_production.html"] :is(header:not(.nav-header),header:not(.nav-header)>div,.stepper,.action-bar) { flex-wrap:wrap !important; min-width:0 !important; max-width:100% !important; box-sizing:border-box !important; }
 body.crm-admin-ui[data-crm-route="Video Editor/video_production.html"] main { grid-template-columns:minmax(0,1fr) !important; }
 body.crm-admin-ui[data-crm-route="Video Editor/video_production.html"] main>div { min-width:0 !important; max-width:100% !important; }
 body.crm-admin-ui[data-crm-route="notifications.html"] #notificationPanel:not(.open) { visibility:hidden !important; right:0 !important; transform:translateX(100%) !important; display:none !important; }
 body.crm-admin-ui[data-crm-route="notifications.html"] #notificationPanel.open { right:0 !important; width:min(400px,100vw) !important; max-width:100vw !important; box-sizing:border-box !important; }
}

body.crm-admin-ui[data-crm-route="clients.html"] .client-active { color:#86efac !important; }
html.theme-light body.crm-admin-ui[data-crm-route="clients.html"] .client-active { color:#187740 !important; }
body.crm-admin-ui[data-crm-route="talk_transcript.html"] .speaker-avatar { background:var(--ui-soft) !important; color:var(--ui-text) !important; }
body.crm-admin-ui[data-crm-route="talk_transcript.html"] #timeDisplay { background:var(--ui-panel) !important; color:var(--ui-text) !important; }
body.crm-admin-ui[data-crm-route="invoice_detail.html"] :is(.main-col,.side-col) { min-width:0 !important; max-width:100% !important; }
body.crm-admin-ui[data-crm-route="invoice_detail.html"] .invoice-lines-scroll { overflow-x:auto !important; max-width:100% !important; }
@media(max-width:700px) {
 body.crm-admin-ui[data-crm-route="invoice_detail.html"] .layout { grid-template-columns:minmax(0,1fr) !important; }
 body.crm-admin-ui[data-crm-route="po_edit.html"] .line-item { grid-template-columns:repeat(2,minmax(0,1fr)) !important; }
 body.crm-admin-ui[data-crm-route="po_edit.html"] .line-item>input:first-child { grid-column:1 / -1 !important; }
}

body.crm-admin-ui[data-crm-route="event_talks.html"] .speaker-avatar { background:var(--ui-soft) !important; color:var(--ui-text) !important; }
body.crm-admin-ui[data-crm-route="client_detail.html"] :is(.document-type-badge,.document-status-badge) { color:var(--ui-text) !important; }
body.crm-admin-ui[data-crm-route="lightsync_detail.html"] :is(.time-display,.time-display span,.color-palette) { background:var(--ui-panel) !important; color:var(--ui-text) !important; }
body.crm-admin-ui[data-crm-route="lightsync_detail.html"] .color-palette-label { color:var(--ui-muted) !important; }
body.crm-admin-ui[data-crm-route="gant_chart.html"] #conflictToggle.off { opacity:1 !important; color:var(--ui-muted) !important; background:var(--ui-panel) !important; }

body.crm-admin-ui[data-crm-route="quote_detail.html"] :is(.main-col,.side-col) { min-width:0 !important; max-width:100% !important; }
body.crm-admin-ui[data-crm-route="quote_detail.html"] .quote-lines-scroll { overflow-x:auto !important; max-width:100% !important; }
@media(max-width:700px) {
 body.crm-admin-ui[data-crm-route="quote_detail.html"] .layout { grid-template-columns:minmax(0,1fr) !important; }
 body.crm-admin-ui[data-crm-route="gant_chart.html"] #focusSwitch { flex-wrap:wrap !important; min-width:0 !important; max-width:100% !important; box-sizing:border-box !important; }
}

/* The full editor stays available on phones through its own pane scrollers. */
@media(max-width:700px) {
 body.crm-admin-ui[data-crm-route="Video Editor/video_production.html"] #davinciTop { overflow:auto !important; overscroll-behavior:contain !important; }
 body.crm-admin-ui[data-crm-route="Video Editor/video_production.html"] #davinciTop>.davinci-pane { flex-shrink:0 !important; }
 body.crm-admin-ui[data-crm-route="Video Editor/video_production.html"] :is(.toolbox-tabs,.inspector-tabs,#davinciToolsBar) { overflow-x:auto !important; max-width:100% !important; box-sizing:border-box !important; flex-shrink:0 !important; }
 body.crm-admin-ui[data-crm-route="Video Editor/video_production.html"] :is(.toolbox-tabs,.inspector-tabs,#davinciToolsBar)>* { flex-shrink:0 !important; }
 body.crm-admin-ui[data-crm-route="Video Editor/video_production.html"] .davinci-timeline { overflow:auto !important; overscroll-behavior:contain !important; }
 body.crm-admin-ui[data-crm-route="Video Editor/video_production.html"] .timeline-attached-controls { flex:0 0 auto !important; display:block !important; height:auto !important; min-height:0 !important; }
 body.crm-admin-ui[data-crm-route="Video Editor/video_production.html"] .timeline-attached-controls>div { flex-wrap:wrap !important; margin-block:4px !important; }
 body.crm-admin-ui[data-crm-route="Video Editor/video_production.html"] #davinciToolsBar { width:100% !important; min-height:44px !important; }
 body.crm-admin-ui[data-crm-route="Video Editor/video_production.html"] .timeline-body { flex:0 0 180px !important; }
 body.crm-admin-ui[data-crm-route="Video Editor/video_production.html"] :is(.timeline-tabs-bar,.timeline-ruler) { flex-shrink:0 !important; }
 body.crm-admin-ui[data-crm-route="Video Editor/video_production.html"] .timeline-ruler { height:44px !important; min-height:44px !important; }
}

body.crm-admin-ui[data-crm-route="client_detail.html"] a[href^="mailto:"] { color:var(--ui-focus) !important; }
body.crm-admin-ui[data-crm-route="hardware_detail.html"] .activity-item { background:var(--ui-panel) !important; color:var(--ui-text) !important; }
body.crm-admin-ui[data-crm-route="hardware_detail.html"] .activity-time { color:var(--ui-muted) !important; }
body.crm-admin-ui[data-crm-route="event_simulator.html"] .hero-strip { width:auto !important; max-width:100% !important; min-width:0 !important; box-sizing:border-box !important; }
body.crm-admin-ui[data-crm-route="hour_card_usage.html"] :is(#hoursUsed,#description,#notes) { box-sizing:border-box !important; max-width:100% !important; }
@media print {
 body.crm-admin-ui[data-crm-route="hardware_detail.html"] :is(.stat-number,h3,.activity-type) { color:#242629 !important; }
 body.crm-admin-ui[data-crm-route="hardware_detail.html"] :is(.stat-label,.activity-desc,.activity-meta) { color:#505b60 !important; }
}
/* Mailbox workspace: a roomy browse view, then a reading view. */
body.crm-admin-ui[data-crm-route="emails.html"] { --mail-accent:#176C70 !important; }
body.crm-admin-ui[data-crm-route="emails.html"] .mail-visually-hidden { position:absolute !important; width:1px !important; height:1px !important; overflow:hidden !important; clip:rect(0,0,0,0) !important; white-space:nowrap !important; }
body.crm-admin-shell[data-crm-route="emails.html"].mail-nav-collapsed { --dash-sidebar:0px !important; padding-left:0 !important; }
body.crm-admin-shell[data-crm-route="emails.html"].mail-nav-collapsed .nav-header { left:0 !important; }
body.crm-admin-shell[data-crm-route="emails.html"].mail-nav-collapsed .nav-mobile-drawer { display:none !important; }
body.crm-admin-shell[data-crm-route="emails.html"] .nav-header { padding-left:104px !important; }
body.crm-admin-ui[data-crm-route="emails.html"] #mailAdminNavToggle { position:fixed !important; top:8px !important; left:calc(var(--dash-sidebar) + 12px) !important; z-index:10041 !important; display:inline-flex !important; align-items:center !important; gap:6px !important; width:auto !important; min-width:36px !important; height:38px !important; min-height:38px !important; padding:7px 9px !important; background:var(--ui-panel) !important; color:var(--ui-text) !important; border:1px solid var(--ui-input-line) !important; border-radius:6px !important; box-shadow:none !important; font-family:inherit !important; font-size:12px !important; font-weight:600 !important; line-height:1.2 !important; cursor:pointer !important; }
body.crm-admin-ui[data-crm-route="emails.html"] .mail-ui-icon { display:inline-block !important; width:16px !important; height:16px !important; flex:0 0 16px !important; fill:none !important; stroke:currentColor !important; stroke-width:1.8 !important; stroke-linecap:round !important; stroke-linejoin:round !important; }
body.crm-admin-ui[data-crm-route="emails.html"] .email-layout { display:grid !important; gap:12px !important; grid-template-columns:clamp(280px,23vw,320px) minmax(0,1fr) !important; height:calc(100dvh - 56px) !important; min-height:0 !important; padding:12px !important; overflow:hidden !important; }
body.crm-admin-ui[data-crm-route="emails.html"][data-mail-view="detail"] .email-layout { grid-template-columns:220px clamp(320px,25vw,380px) minmax(0,1fr) !important; }
body.crm-admin-ui[data-crm-route="emails.html"] .email-sidebar, body.crm-admin-ui[data-crm-route="emails.html"] .email-list, body.crm-admin-ui[data-crm-route="emails.html"] .email-detail { min-width:0 !important; min-height:0 !important; max-height:none !important; height:100% !important; overflow:hidden !important; background:var(--ui-panel) !important; color:var(--ui-text) !important; border:1px solid var(--ui-line) !important; border-radius:8px !important; }
body.crm-admin-ui[data-crm-route="emails.html"] .email-sidebar { overflow-y:auto !important; padding:16px !important; }
body.crm-admin-ui[data-crm-route="emails.html"] .email-detail { display:none !important; }
body.crm-admin-ui[data-crm-route="emails.html"][data-mail-view="detail"] .email-detail { display:flex !important; }
body.crm-admin-ui[data-crm-route="emails.html"] .sidebar-title { color:var(--ui-muted) !important; font-size:11px !important; letter-spacing:.09em !important; }
body.crm-admin-ui[data-crm-route="emails.html"] :is(.mailbox-item,.label-item) { display:flex !important; width:100% !important; min-height:40px !important; padding:9px 10px !important; background:transparent !important; color:var(--ui-text) !important; border:1px solid transparent !important; border-radius:5px !important; box-shadow:none !important; text-align:left !important; cursor:pointer !important; }
body.crm-admin-ui[data-crm-route="emails.html"] :is(.mailbox-item,.label-item):hover { background:var(--ui-soft) !important; }
body.crm-admin-ui[data-crm-route="emails.html"] :is(.mailbox-item,.label-item).active { background:#176C70 !important; color:#fff !important; border-color:#176C70 !important; }
body.crm-admin-ui[data-crm-route="emails.html"] :is(.mailbox-name,.label-name) { display:block !important; min-width:0 !important; overflow:visible !important; text-overflow:clip !important; overflow-wrap:anywhere !important; white-space:normal !important; -webkit-line-clamp:unset !important; font-size:13px !important; line-height:1.4 !important; color:inherit !important; }
body.crm-admin-ui[data-crm-route="emails.html"] :is(.mailbox-item,.label-item) :is(.mailbox-name,.label-name,.mailbox-icon,.label-icon) { background:none !important; background-image:none !important; box-shadow:none !important; }
body.crm-admin-ui[data-crm-route="emails.html"] :is(.mailbox-icon,.label-icon) { flex:0 0 20px !important; opacity:.9 !important; }
body.crm-admin-ui[data-crm-route="emails.html"] :is(.mailbox-count,.label-count) { margin-left:auto !important; background:#b43e3e !important; color:#fff !important; font-size:11px !important; }
body.crm-admin-ui[data-crm-route="emails.html"] .email-list-header { position:relative !important; z-index:10 !important; padding:14px !important; background:var(--ui-panel) !important; border-bottom:1px solid var(--ui-line) !important; gap:11px !important; }
body.crm-admin-ui[data-crm-route="emails.html"] .mail-workspace-bar { display:flex !important; align-items:center !important; gap:12px !important; min-height:30px !important; color:var(--ui-text) !important; font-size:14px !important; font-weight:650 !important; }
body.crm-admin-ui[data-crm-route="emails.html"] #mailShowFolders { display:none !important; }
body.crm-admin-ui[data-crm-route="emails.html"] .header-buttons { display:flex !important; flex-wrap:wrap !important; gap:6px !important; }
body.crm-admin-ui[data-crm-route="emails.html"] .mail-filter-menu { position:relative !important; }
body.crm-admin-ui[data-crm-route="emails.html"] .mail-filter-menu>summary { display:inline-flex !important; align-items:center !important; gap:6px !important; min-height:34px !important; padding:7px 10px !important; background:var(--ui-panel) !important; color:var(--ui-text) !important; border:1px solid var(--ui-input-line) !important; border-radius:5px !important; font-size:12px !important; font-weight:600 !important; cursor:pointer !important; list-style:none !important; }
body.crm-admin-ui[data-crm-route="emails.html"] .mail-filter-menu>summary::-webkit-details-marker { display:none !important; }
body.crm-admin-ui[data-crm-route="emails.html"] .mail-filter-menu[open]>summary .mail-ui-icon { transform:rotate(180deg) !important; }
body.crm-admin-ui[data-crm-route="emails.html"] #mailActiveFilterCount:not([hidden]) { display:inline-flex !important; align-items:center !important; justify-content:center !important; min-width:17px !important; height:17px !important; padding:1px 4px !important; background:#176C70 !important; color:#fff !important; border-radius:9px !important; font-size:10px !important; }
body.crm-admin-ui[data-crm-route="emails.html"] .mail-filter-options { position:absolute !important; top:calc(100% + 6px) !important; left:0 !important; z-index:30 !important; display:flex !important; flex-wrap:wrap !important; gap:6px !important; width:min(310px,calc(100vw - 35px)) !important; max-height:calc(100dvh - 160px) !important; overflow-y:auto !important; padding:10px !important; background:var(--ui-panel) !important; border:1px solid var(--ui-line) !important; border-radius:7px !important; box-shadow:0 12px 30px #0004 !important; }
body.crm-admin-ui[data-crm-route="emails.html"] .mail-filter-menu:not([open]) .mail-filter-options { display:none !important; }
body.crm-admin-ui[data-crm-route="emails.html"] :is(.email-list-header button,.bulk-actions-bar button,.email-detail-actions button,.mail-detail-back) { display:inline-flex !important; align-items:center !important; justify-content:center !important; gap:6px !important; width:auto !important; min-width:0 !important; min-height:34px !important; padding:7px 10px !important; background:var(--ui-panel) !important; color:var(--ui-text) !important; border:1px solid var(--ui-input-line) !important; border-radius:5px !important; box-shadow:none !important; font-family:inherit !important; font-size:12px !important; font-weight:600 !important; line-height:1.3 !important; white-space:normal !important; cursor:pointer !important; }
body.crm-admin-ui[data-crm-route="emails.html"] :is(.email-list-header button,.bulk-actions-bar button,.email-detail-actions button,.mail-detail-back):hover { background:var(--ui-soft) !important; border-color:var(--ui-focus) !important; }
body.crm-admin-ui[data-crm-route="emails.html"] :is(#btnCompose,.email-detail-actions button.primary) { background:#C9A44C !important; color:#242629 !important; border-color:#C9A44C !important; }
body.crm-admin-ui[data-crm-route="emails.html"] .email-list-header button[aria-pressed="true"] { background:#176C70 !important; color:#fff !important; border-color:#176C70 !important; }
body.crm-admin-ui[data-crm-route="emails.html"] #emailSearch { min-height:38px !important; font-size:14px !important; padding:9px 12px !important; }
body.crm-admin-ui[data-crm-route="emails.html"] .bulk-actions-bar { position:static !important; padding:10px 14px !important; background:var(--ui-soft) !important; border-color:var(--ui-line) !important; box-shadow:none !important; }
body.crm-admin-ui[data-crm-route="emails.html"] .bulk-actions-bar button { flex:0 1 auto !important; }
body.crm-admin-ui[data-crm-route="emails.html"] #emailListContent { flex:1 !important; min-height:0 !important; overflow-y:auto !important; overscroll-behavior:contain !important; }
body.crm-admin-ui[data-crm-route="emails.html"] .email-item { min-width:0 !important; padding:13px 14px !important; gap:10px !important; background:var(--ui-panel) !important; color:var(--ui-text) !important; border:0 !important; border-bottom:1px solid var(--ui-line) !important; border-left:3px solid transparent !important; box-shadow:none !important; opacity:1 !important; }
body.crm-admin-ui[data-crm-route="emails.html"] .email-item:hover { background:var(--ui-soft) !important; }
body.crm-admin-ui[data-crm-route="emails.html"] .email-item.unread:not(.active) { background:#1c3839 !important; border-left-color:#C9A44C !important; }
html.theme-light body.crm-admin-ui[data-crm-route="emails.html"] .email-item.unread:not(.active) { background:#e8f3f1 !important; }
body.crm-admin-ui[data-crm-route="emails.html"] .email-item.unread:hover { background:#234447 !important; }
html.theme-light body.crm-admin-ui[data-crm-route="emails.html"] .email-item.unread:hover { background:#dcece9 !important; }
body.crm-admin-ui[data-crm-route="emails.html"] .email-item.unread .email-sender { font-weight:750 !important; }
body.crm-admin-ui[data-crm-route="emails.html"] .email-item.unread .email-subject { font-weight:700 !important; }
body.crm-admin-ui[data-crm-route="emails.html"] .email-item.unread .email-time { color:var(--ui-text) !important; font-weight:650 !important; }
body.crm-admin-ui[data-crm-route="emails.html"] .email-item.unread .email-sender::before { content:""; display:inline-block; width:8px; height:8px; margin-right:7px; border-radius:50%; background:#C9A44C; vertical-align:1px; }
body.crm-admin-ui[data-crm-route="emails.html"] .email-item.high-priority { border-left-color:#C9A44C !important; }
body.crm-admin-ui[data-crm-route="emails.html"] .email-item.active { background:#176C702e !important; border-left-color:#176C70 !important; }
body.crm-admin-ui[data-crm-route="emails.html"] :is(.email-sender,.email-subject,.email-detail-subject,.email-detail-from-name) { color:var(--ui-text) !important; }
body.crm-admin-ui[data-crm-route="emails.html"] :is(.email-snippet,.email-time,.email-list-status,.email-detail-from-email,.email-detail-to,.email-detail-cc,.email-detail-date) { color:var(--ui-muted) !important; }
body.crm-admin-ui[data-crm-route="emails.html"] .email-snippet { white-space:normal !important; display:-webkit-box !important; -webkit-line-clamp:2 !important; -webkit-box-orient:vertical !important; overflow:hidden !important; }
body.crm-admin-ui[data-crm-route="emails.html"] .email-star { display:inline-flex !important; align-items:center !important; justify-content:center !important; width:28px !important; min-width:28px !important; height:28px !important; min-height:28px !important; padding:0 !important; background:transparent !important; border:0 !important; color:#C9A44C !important; box-shadow:none !important; cursor:pointer !important; }
body.crm-admin-ui[data-crm-route="emails.html"] .email-star.empty { color:var(--ui-muted) !important; }
body.crm-admin-ui[data-crm-route="emails.html"] :is(.email-badge.newsletter,.email-badge.cc-indicator,.email-badge.bcc-indicator) { background:#176C70 !important; color:#fff !important; }
body.crm-admin-ui[data-crm-route="emails.html"] :is(.email-badge.attachment,.email-badge.draft,.email-badge.mailbox-ref) { background:var(--ui-soft) !important; color:var(--ui-text) !important; }
body.crm-admin-ui[data-crm-route="emails.html"] .email-badge.promo { background:#C9A44C !important; color:#242629 !important; }
body.crm-admin-ui[data-crm-route="emails.html"] .email-badge.answered { background:#176C70 !important; color:#fff !important; }
body.crm-admin-ui[data-crm-route="emails.html"] .email-read-indicator { color:var(--ui-muted) !important; }
body.crm-admin-ui[data-crm-route="emails.html"] .email-item.unread .email-read-indicator { color:var(--ui-focus) !important; }
body.crm-admin-ui[data-crm-route="emails.html"] .mail-planned-icon { display:flex !important; align-items:center !important; justify-content:center !important; width:32px !important; height:32px !important; flex:0 0 32px !important; color:#fff !important; background:#176C70 !important; border-radius:7px !important; }
body.crm-admin-ui[data-crm-route="emails.html"] .email-detail-header { position:relative !important; z-index:2 !important; padding:18px 20px !important; background:var(--ui-panel) !important; border-bottom:1px solid var(--ui-line) !important; overflow:visible !important; flex:0 1 auto !important; }
body.crm-admin-ui[data-crm-route="emails.html"] .mail-detail-back { margin-bottom:12px !important; }
body.crm-admin-ui[data-crm-route="emails.html"] .email-detail-actions { flex-wrap:wrap !important; gap:6px !important; }
body.crm-admin-ui[data-crm-route="emails.html"] .email-detail-actions>button, body.crm-admin-ui[data-crm-route="emails.html"] .email-detail-actions .mail-more-actions>summary { padding-left:4px !important; padding-right:4px !important; }
body.crm-admin-ui[data-crm-route="emails.html"] .email-detail-actions .mail-mobile-secondary { display:none !important; }
body.crm-admin-ui[data-crm-route="emails.html"] .mail-planned-preview { margin-top:14px !important; padding:14px 16px !important; border-radius:6px !important; background:var(--ui-soft) !important; border:1px solid var(--ui-line) !important; color:var(--ui-text) !important; font-size:13px !important; line-height:1.6 !important; white-space:pre-wrap !important; }
body.crm-admin-ui[data-crm-route="emails.html"] .email-detail-actions button.calendar-glow { background:#765612 !important; color:#fff !important; border-color:#C9A44C !important; animation:none !important; }
body.crm-admin-ui[data-crm-route="emails.html"] .email-detail-actions button.calendar-glow-planned { background:#176C70 !important; color:#fff !important; border-color:#176C70 !important; animation:none !important; }
body.crm-admin-ui[data-crm-route="emails.html"] .email-detail-actions button.calendar-glow-conflict { background:#892f2a !important; color:#fff !important; border-color:#892f2a !important; animation:none !important; }
body.crm-admin-ui[data-crm-route="emails.html"] .mail-detail-back .mail-ui-icon { transform:rotate(180deg) !important; }
body.crm-admin-ui[data-crm-route="emails.html"] .mail-more-actions { position:relative !important; flex:0 0 auto !important; width:auto !important; margin:0 !important; }
body.crm-admin-ui[data-crm-route="emails.html"] .mail-more-actions>summary { display:inline-flex !important; align-items:center !important; gap:6px !important; min-height:34px !important; padding:7px 10px !important; color:var(--ui-text) !important; background:var(--ui-panel) !important; border:1px solid var(--ui-input-line) !important; border-radius:5px !important; cursor:pointer !important; font-size:12px !important; font-weight:600 !important; list-style:none !important; }
body.crm-admin-ui[data-crm-route="emails.html"] .mail-more-actions>summary::-webkit-details-marker { display:none !important; }
body.crm-admin-ui[data-crm-route="emails.html"] .mail-more-actions[open]>summary .mail-ui-icon { transform:rotate(180deg) !important; }
body.crm-admin-ui[data-crm-route="emails.html"] .mail-more-content { position:absolute !important; top:calc(100% + 6px) !important; right:0 !important; z-index:5 !important; display:flex !important; flex-direction:column !important; flex-wrap:nowrap !important; gap:4px !important; box-sizing:border-box !important; width:min(220px,calc(100vw - 32px)) !important; max-height:min(60dvh,420px) !important; overflow:auto !important; padding:7px !important; border:1px solid var(--ui-line) !important; border-radius:8px !important; background:var(--ui-panel) !important; box-shadow:0 12px 28px #00000028 !important; }
body.crm-admin-ui[data-crm-route="emails.html"] .email-detail-actions .mail-more-content :is(button,a) { justify-content:flex-start !important; width:100% !important; min-height:34px !important; text-align:left !important; white-space:normal !important; }
body.crm-admin-ui[data-crm-route="emails.html"] .mail-more-content .n8n-link { display:inline-flex !important; align-items:center !important; min-height:34px !important; padding:7px 10px !important; color:var(--ui-text) !important; background:var(--ui-panel) !important; border:1px solid var(--ui-input-line) !important; border-radius:5px !important; text-decoration:none !important; font-size:12px !important; font-weight:600 !important; }
body.crm-admin-ui[data-crm-route="emails.html"] .email-detail-actions button.danger { background:#892f2a !important; color:#fff !important; border-color:#892f2a !important; }
body.crm-admin-ui[data-crm-route="emails.html"] .email-detail-scroll { flex:1 !important; min-height:0 !important; overflow:auto !important; background:#fff !important; color:#242629 !important; }
body.crm-admin-ui[data-crm-route="emails.html"] .email-detail-scroll :is(.ai-insights-box,.email-attachments-section) { background:#f4f4f0 !important; border-color:#d7dcd8 !important; }
body.crm-admin-ui[data-crm-route="emails.html"] .email-detail-scroll :is(.ai-summary,.ai-action,.attachments-header,.attachments-label,.att-name) { color:#242629 !important; }
body.crm-admin-ui[data-crm-route="emails.html"] .email-detail-scroll :is(.att-size,.attachments-chev) { color:#505b60 !important; }
body.crm-admin-ui[data-crm-route="emails.html"] .ai-icon, body.crm-admin-ui[data-crm-route="emails.html"] .ai-label { color:#12595d !important; }
body.crm-admin-ui[data-crm-route="emails.html"] .ai-category { color:#12595d !important; background:#e5f0ee !important; border:1px solid #a3c8c5 !important; }
body.crm-admin-ui[data-crm-route="emails.html"] .ai-urgency { color:#fff !important; }
body.crm-admin-ui[data-crm-route="emails.html"] .ai-tag { color:#12595d !important; background:#e5f0ee !important; }
body.crm-admin-ui[data-crm-route="emails.html"] .ai-summary { background:#fff !important; border-left:3px solid #176C70 !important; }
body.crm-admin-ui[data-crm-route="emails.html"] .ai-action strong { color:#12595d !important; }
body.crm-admin-ui[data-crm-route="emails.html"] .ai-response-needed { color:#242629 !important; background:#f1dfb1 !important; }
body.crm-admin-ui[data-crm-route="emails.html"] .email-detail-scroll .attachment-item { background:#fff !important; color:#242629 !important; border-color:#aab4af !important; }
body.crm-admin-ui[data-crm-route="emails.html"] .email-avatar { background:#176C70 !important; color:#fff !important; }
body.crm-admin-ui[data-crm-route="emails.html"] .email-empty-shell { background:var(--ui-soft) !important; border:1px solid var(--ui-line) !important; box-shadow:none !important; }
body.crm-admin-ui[data-crm-route="emails.html"] :is(.email-empty-title,.email-empty-card-value) { color:var(--ui-text) !important; }
body.crm-admin-ui[data-crm-route="emails.html"] :is(.email-empty-subtitle,.email-empty-card-copy,.email-empty-card-label) { color:var(--ui-muted) !important; }
body.crm-admin-ui[data-crm-route="emails.html"] .email-empty-card { background:var(--ui-panel) !important; border-color:var(--ui-line) !important; }
body.crm-admin-ui[data-crm-route="emails.html"] .email-empty-action.primary { background:#C9A44C !important; color:#242629 !important; }
body.crm-admin-ui[data-crm-route="emails.html"] .compose-overlay { background:#10131580 !important; backdrop-filter:blur(6px) !important; }
/* Compose is a light writing surface in either CRM theme. Keep its palette local. */
body.crm-admin-ui[data-crm-route="emails.html"] #composeOverlay {
 --ui-panel:#fff; --ui-text:#0f172a; --ui-muted:#475569; --ui-line:#dbe3ef;
 --ui-input-line:#cbd5e1; --ui-soft:#f8fafc; --ui-focus:#2563eb;
 color-scheme:light;
}
body.crm-admin-ui[data-crm-route="emails.html"] .compose-modal { background:var(--ui-panel) !important; color:var(--ui-text) !important; border-color:var(--ui-line) !important; box-shadow:0 24px 70px #0006 !important; }
body.crm-admin-ui[data-crm-route="emails.html"] .compose-header, body.crm-admin-ui[data-crm-route="emails.html"] .compose-footer { background:var(--ui-panel) !important; color:var(--ui-text) !important; border-color:var(--ui-line) !important; }
body.crm-admin-ui[data-crm-route="emails.html"] #composeOverlay .compose-body { background:var(--ui-panel) !important; color:var(--ui-text) !important; }
body.crm-admin-ui[data-crm-route="emails.html"] #composeOverlay .compose-title { color:var(--ui-text) !important; }
body.crm-admin-ui[data-crm-route="emails.html"] #composeOverlay .ql-editor { background-color:#fff !important; }
body.crm-admin-ui[data-crm-route="emails.html"] #composeOverlay .compose-rail-card { background:var(--ui-soft) !important; color:var(--ui-text) !important; border-color:var(--ui-line) !important; box-shadow:none !important; }
body.crm-admin-ui[data-crm-route="emails.html"] #composeOverlay :is(.compose-rail-title,.compose-rail-value) { color:var(--ui-text) !important; }
body.crm-admin-ui[data-crm-route="emails.html"] #composeOverlay :is(.compose-rail-kicker,.compose-rail-copy,.compose-rail-label,.compose-rail-value.muted) { color:var(--ui-muted) !important; }
body.crm-admin-ui[data-crm-route="emails.html"] #composeOverlay .compose-rail-metric { border-color:var(--ui-line) !important; }
body.crm-admin-ui[data-crm-route="emails.html"] #composeOverlay .ql-editor.ql-blank::before { color:#64748b !important; }
body.crm-admin-ui[data-crm-route="emails.html"] :is(.compose-btn-send,.compose-btn-inline,.compose-btn-plan) { background:#C9A44C !important; color:#242629 !important; border:1px solid #C9A44C !important; box-shadow:none !important; }
body.crm-admin-ui[data-crm-route="emails.html"] :is(.compose-btn-secondary,.compose-att-btn,.attachment-preview-action) { background:var(--ui-panel) !important; color:var(--ui-text) !important; border:1px solid var(--ui-input-line) !important; box-shadow:none !important; }
body.crm-admin-ui[data-crm-route="emails.html"] :is(.email-autocomplete-dropdown,.context-submenu) { background:var(--ui-panel) !important; color:var(--ui-text) !important; border-color:var(--ui-line) !important; }
body.crm-admin-ui[data-crm-route="emails.html"] :is(.email-autocomplete-item:hover,.email-autocomplete-item.selected) { background:var(--ui-soft) !important; color:var(--ui-text) !important; }
body.crm-admin-ui[data-crm-route="emails.html"] #aiSuggestionBanner { background:var(--ui-soft) !important; border-color:var(--ui-line) !important; }
body.crm-admin-ui[data-crm-route="emails.html"] #aiBannerActions button { background:var(--ui-panel) !important; color:var(--ui-text) !important; border-color:var(--ui-input-line) !important; }
body.crm-admin-ui[data-crm-route="emails.html"] #aiBannerSubtitle { color:var(--ui-muted) !important; }
body.crm-admin-ui[data-crm-route="emails.html"] :is(#calendarAiSuggestion,#similarRulesBox,#filterPreviewBox,#additionalDateOptions,#portfolioBradleyHero) { background:var(--ui-soft) !important; background-image:none !important; color:var(--ui-text) !important; border-color:var(--ui-line) !important; box-shadow:none !important; }
body.crm-admin-ui[data-crm-route="emails.html"] :is(#aiBannerTitle,#calendarAiSuggestionText,#calendarAiSuggestion span,#calendarDateOptions>div,#filterMatchCount,#similarRulesBox>div>div,#portfolioBradleyHero>button>div:nth-child(2) div) { color:var(--ui-text) !important; }
body.crm-admin-ui[data-crm-route="emails.html"] #portfolioBradleyHero>button>div:first-child { background:#C9A44C !important; color:#242629 !important; }
body.crm-admin-ui[data-crm-route="emails.html"] :is(#filterPreviewBox,#similarRulesBox,#additionalDateOptions) button { background:var(--ui-panel) !important; color:var(--ui-text) !important; border:1px solid var(--ui-input-line) !important; border-radius:5px !important; box-shadow:none !important; }
body.crm-admin-ui[data-crm-route="emails.html"] #btnCheckFilterMatches { background:var(--ui-panel) !important; color:var(--ui-text) !important; border:1px solid var(--ui-input-line) !important; border-radius:5px !important; box-shadow:none !important; }
body.crm-admin-ui[data-crm-route="emails.html"] #filterPreviewBox #btnApplyToExisting { background:#C9A44C !important; color:#242629 !important; border-color:#C9A44C !important; }
body.crm-admin-ui[data-crm-route="emails.html"] :is(#filterPreviewBox>div:first-child span,#additionalDateOptions>div:first-child,#similarRulesBox>div:first-child>div) { color:var(--ui-muted) !important; }
body.crm-admin-ui[data-crm-route="emails.html"] #filterMatchCount { color:var(--ui-text) !important; }
body.crm-admin-ui[data-crm-route="emails.html"] #filterPreviewList>div>div:first-child { color:var(--ui-text) !important; }
body.crm-admin-ui[data-crm-route="emails.html"] #filterPreviewList>div>div:last-child,body.crm-admin-ui[data-crm-route="emails.html"] #similarRulesList [style*="color:#9aa4b2"] { color:var(--ui-muted) !important; }
body.crm-admin-ui[data-crm-route="emails.html"] #similarRulesList>div { background:var(--ui-panel) !important; color:var(--ui-text) !important; border-color:var(--ui-line) !important; }
body.crm-admin-ui[data-crm-route="emails.html"] #selectedClientInfo { background:var(--ui-soft) !important; color:var(--ui-text) !important; border-color:var(--ui-line) !important; }
body.crm-admin-ui[data-crm-route="emails.html"] #selectedClientDetails { color:var(--ui-muted) !important; }
body.crm-admin-ui[data-crm-route="emails.html"] #taskEmailReference { background:var(--ui-soft) !important; color:var(--ui-muted) !important; border-color:var(--ui-line) !important; }
body.crm-admin-ui[data-crm-route="emails.html"] #taskEmailReference strong { color:var(--ui-text) !important; }
body.crm-admin-ui[data-crm-route="emails.html"] #labelsCheckboxList label { color:var(--ui-text) !important; background:transparent !important; }
body.crm-admin-ui[data-crm-route="emails.html"] #labelsCheckboxList label:hover { background:var(--ui-soft) !important; }
body.crm-admin-ui[data-crm-route="emails.html"] #labelsCheckboxList label:has(input:checked) { background:#176C70 !important; color:#fff !important; }
body.crm-admin-ui[data-crm-route="emails.html"] .email-expense-attachment { background:var(--ui-panel) !important; color:var(--ui-text) !important; border-color:var(--ui-line) !important; }
body.crm-admin-ui[data-crm-route="emails.html"] .email-expense-attachment:has(input:checked) { background:#176C7022 !important; border-color:#176C70 !important; }
body.crm-admin-ui[data-crm-route="emails.html"] .email-expense-attachment input { accent-color:#176C70 !important; }
body.crm-admin-ui[data-crm-route="emails.html"] .email-expense-attachment-name { color:var(--ui-text) !important; }
body.crm-admin-ui[data-crm-route="emails.html"] .email-expense-attachment-meta { color:var(--ui-muted) !important; }
body.crm-admin-ui[data-crm-route="emails.html"] :is(.crm-sidebar,.crm-card) { background:var(--ui-panel) !important; color:var(--ui-text) !important; border-color:var(--ui-line) !important; }
body.crm-admin-ui[data-crm-route="emails.html"] .crm-card[style*="border-color:#3b82f6"] { border-color:#176C70 !important; }
body.crm-admin-ui[data-crm-route="emails.html"] .crm-card-title { color:var(--ui-text) !important; }
body.crm-admin-ui[data-crm-route="emails.html"] :is(.crm-card-meta,.crm-title,.crm-section-title) { color:var(--ui-muted) !important; }
body.crm-admin-ui[data-crm-route="emails.html"] .crm-link { color:var(--ui-focus) !important; }
body.crm-admin-ui[data-crm-route="emails.html"] #calendarDateOptions { border-color:var(--ui-line) !important; }
body.crm-admin-ui[data-crm-route="emails.html"] #calendarDateOptionsList .date-option-row { background:var(--ui-panel) !important; border-color:var(--ui-line) !important; color:var(--ui-text) !important; }
body.crm-admin-ui[data-crm-route="emails.html"] #calendarDateOptionsList .date-option-row :is(div,button) { color:var(--ui-text) !important; }
body.crm-admin-ui[data-crm-route="emails.html"] #calendarDateOptionsList .date-option-row button { background:var(--ui-soft) !important; border-color:var(--ui-input-line) !important; }
body.crm-admin-ui[data-crm-route="emails.html"] :is(#statusDefinitief,#statusVoorlopig,#statusOptie) { background:var(--ui-panel) !important; color:var(--ui-text) !important; border:1px solid var(--ui-input-line) !important; }
body.crm-admin-ui[data-crm-route="emails.html"] :is(#statusDefinitief,#statusVoorlopig,#statusOptie):has(input:checked) { background:#176C70 !important; color:#fff !important; border-color:#176C70 !important; }
body.crm-admin-ui[data-crm-route="emails.html"] #calendarItemDescription { background:var(--ui-panel) !important; border-color:var(--ui-input-line) !important; color:var(--ui-text) !important; }
body.crm-admin-ui[data-crm-route="emails.html"] .teams-meeting-section .mail-teams-when { background:#e5f0ee !important; border-color:#176C70 !important; }
body.crm-admin-ui[data-crm-route="emails.html"] .teams-meeting-section .mail-teams-when div { color:#505b60 !important; }
body.crm-admin-ui[data-crm-route="emails.html"] .teams-meeting-section .mail-teams-when div:last-child { color:#242629 !important; }
body.crm-admin-ui[data-crm-route="emails.html"] .teams-meeting-section .mail-teams-join { background:#C9A44C !important; color:#242629 !important; border:1px solid #C9A44C !important; border-radius:5px !important; box-shadow:none !important; }
body.crm-admin-ui[data-crm-route="emails.html"] .teams-meeting-section [style*="color:#4f46e5"] { color:#12595d !important; }
body.crm-admin-ui[data-crm-route="emails.html"] .teams-meeting-section [class^="mail-rsvp-"] { background:#fff !important; color:#242629 !important; border:1px solid #aab4af !important; border-radius:5px !important; }
body.crm-admin-ui[data-crm-route="emails.html"] .teams-meeting-section .mail-rsvp-yes.teams-rsvp-selected { background:#176C70 !important; color:#fff !important; border-color:#176C70 !important; }
body.crm-admin-ui[data-crm-route="emails.html"] .teams-meeting-section .mail-rsvp-maybe.teams-rsvp-selected { background:#C9A44C !important; color:#242629 !important; border-color:#C9A44C !important; }
body.crm-admin-ui[data-crm-route="emails.html"] .teams-meeting-section .mail-rsvp-no.teams-rsvp-selected { background:#892f2a !important; color:#fff !important; border-color:#892f2a !important; }
body.crm-admin-ui[data-crm-route="emails.html"] .mail-reply-thread .mail-reply-open { background:#f4f4f0 !important; border:1px solid #aab4af !important; color:#242629 !important; border-radius:5px !important; box-shadow:none !important; }
body.crm-admin-ui[data-crm-route="emails.html"] .mail-calendar-merge { background:#e5f0ee !important; border:1px solid #a3c8c5 !important; color:#242629 !important; }
body.crm-admin-ui[data-crm-route="emails.html"] .mail-calendar-merge :is(span[style*="color:#6b7280"],div:last-child[style*="color:#64748b"]) { color:#505b60 !important; }
body.crm-admin-ui[data-crm-route="emails.html"] .mail-calendar-merge .mail-calendar-merge-button { background:#C9A44C !important; border:1px solid #C9A44C !important; color:#242629 !important; border-radius:5px !important; box-shadow:none !important; }
body.crm-admin-ui[data-crm-route="emails.html"] #filePickerModal>div { background:var(--ui-panel) !important; color:var(--ui-text) !important; border-color:var(--ui-line) !important; }
body.crm-admin-ui[data-crm-route="emails.html"] #filePickerModal>div>div:first-child,body.crm-admin-ui[data-crm-route="emails.html"] #filePickerModal>div>div:last-child { background:var(--ui-panel) !important; border-color:var(--ui-line) !important; }
body.crm-admin-ui[data-crm-route="emails.html"] #filePickerModal>div>div:first-child>span { color:var(--ui-text) !important; }
body.crm-admin-ui[data-crm-route="emails.html"] #filePickerModal [data-code] { background:var(--ui-soft) !important; border-color:var(--ui-line) !important; }
body.crm-admin-ui[data-crm-route="emails.html"] #filePickerModal [data-code]>div:first-child { background:var(--ui-soft) !important; }
body.crm-admin-ui[data-crm-route="emails.html"] #filePickerModal [data-code] [style*="color:#e9eef7"] { color:var(--ui-text) !important; }
body.crm-admin-ui[data-crm-route="emails.html"] #filePickerModal .pick-status { color:var(--ui-text) !important; }
body.crm-admin-ui[data-crm-route="emails.html"] :is(.attachment-preview-modal,.attachment-preview-header) { background:var(--ui-panel) !important; color:var(--ui-text) !important; border-color:var(--ui-line) !important; }
body.crm-admin-ui[data-crm-route="emails.html"] :is(.compose-field input,.compose-field textarea,.form-row input,.form-row select):focus-visible { outline:2px solid var(--ui-focus) !important; outline-offset:2px !important; }
@media(max-width:1100px) {
 body.crm-admin-ui[data-crm-route="emails.html"] .email-layout, body.crm-admin-ui[data-crm-route="emails.html"][data-mail-view="detail"] .email-layout { grid-template-columns:minmax(0,1fr) !important; }
 body.crm-admin-ui[data-crm-route="emails.html"] .email-layout :is(.email-sidebar,.email-list,.email-detail) { display:none !important; }
 body.crm-admin-ui[data-crm-route="emails.html"][data-mail-view="browse"] .email-sidebar { display:flex !important; }
 body.crm-admin-ui[data-crm-route="emails.html"][data-mail-view="list"] .email-list { display:flex !important; }
 body.crm-admin-ui[data-crm-route="emails.html"][data-mail-view="detail"] .email-detail { display:flex !important; }
 body.crm-admin-ui[data-crm-route="emails.html"] #mailShowFolders { display:inline-flex !important; }
 body.crm-admin-ui[data-crm-route="emails.html"] .email-layout { min-height:calc(100dvh - 56px) !important; }
}
@media(max-width:1000px) {
 body.crm-admin-ui[data-crm-route="emails.html"] #mailAdminNavToggle { display:none !important; }
 body.crm-admin-shell[data-crm-route="emails.html"].mail-nav-collapsed .nav-mobile-drawer { display:flex !important; }
 body.crm-admin-shell[data-crm-route="emails.html"] .nav-header { padding-left:14px !important; }
}
@media(max-width:600px) {
 body.crm-admin-ui[data-crm-route="emails.html"] .email-detail-actions>button:not(.primary) { display:none !important; }
 body.crm-admin-ui[data-crm-route="emails.html"] .email-detail-actions { display:flex !important; flex-wrap:nowrap !important; align-items:center !important; }
 body.crm-admin-ui[data-crm-route="emails.html"] .email-detail-actions>button.primary { flex:0 0 auto !important; }
 body.crm-admin-ui[data-crm-route="emails.html"] .email-detail-actions>button.mail-quick-action { display:inline-flex !important; flex:0 0 44px !important; width:44px !important; min-width:44px !important; min-height:44px !important; padding:8px !important; }
 body.crm-admin-ui[data-crm-route="emails.html"] .email-detail-actions>button.mail-quick-action span { display:none !important; }
 body.crm-admin-ui[data-crm-route="emails.html"] .mail-more-actions>summary { min-height:44px !important; }
 body.crm-admin-ui[data-crm-route="emails.html"] .email-detail-actions .mail-more-actions { flex:0 0 auto !important; width:auto !important; margin:0 !important; }
 body.crm-admin-ui[data-crm-route="emails.html"] .email-detail-actions .mail-mobile-secondary { display:inline-flex !important; }
 body.crm-admin-ui[data-crm-route="emails.html"] .bulk-actions-bar.visible { flex-wrap:nowrap !important; overflow-x:auto !important; max-width:100% !important; min-height:52px !important; padding:8px !important; scrollbar-width:thin !important; overscroll-behavior-x:contain !important; }
 body.crm-admin-ui[data-crm-route="emails.html"] .bulk-actions-bar :is(button,.select-all-label,.selected-count) { flex:0 0 auto !important; white-space:nowrap !important; }
 body.crm-admin-ui[data-crm-route="emails.html"] .email-layout { padding:7px !important; gap:0 !important; }
 body.crm-admin-ui[data-crm-route="emails.html"] :is(.email-list-header,.email-detail-header) { padding:11px !important; }
 body.crm-admin-ui[data-crm-route="emails.html"] .email-detail-actions button { flex:1 1 auto !important; }
 body.crm-admin-ui[data-crm-route="emails.html"] .email-item { padding:11px 7px !important; gap:5px !important; }
 body.crm-admin-ui[data-crm-route="emails.html"] .email-item>div:first-child { margin-right:0 !important; }
 body.crm-admin-ui[data-crm-route="emails.html"] .email-item>div:first-child span { display:none !important; }
 body.crm-admin-ui[data-crm-route="emails.html"] .email-item .email-star { width:22px !important; min-width:22px !important; height:24px !important; min-height:24px !important; }
 body.crm-admin-ui[data-crm-route="emails.html"] .email-item .email-read-indicator { display:none !important; }
 body.crm-admin-ui[data-crm-route="emails.html"] .email-detail-body, body.crm-admin-ui[data-crm-route="emails.html"] .email-detail-body.text-email { padding:5px !important; }
 body.crm-admin-ui[data-crm-route="emails.html"] .mail-workspace-bar { flex-direction:column !important; align-items:flex-start !important; gap:5px !important; }
 body.crm-admin-ui[data-crm-route="emails.html"] #mailListHeading { display:block !important; min-width:0 !important; max-width:100% !important; overflow-wrap:anywhere !important; line-height:1.35 !important; }
 body.crm-admin-ui[data-crm-route="emails.html"] #emailListContent { padding-bottom:12px !important; }
}
@media(prefers-reduced-motion:reduce) { body.crm-admin-ui[data-crm-route="emails.html"] :is(.email-item,.mailbox-item,.label-item) { transition:none !important; } }

/* Menu pages share one surface palette. Keep document previews, mail bodies,
   event colors and status meaning outside this presentation layer. */
body.crm-admin-menu-page { --ui-link:#98d4d0; --ui-petrol-soft:#173f40; }
html.theme-light body.crm-admin-menu-page { --ui-link:#12595d; --ui-petrol-soft:#e5f0ee; }
body.crm-admin-menu-page :is(button,input,select,textarea,a,summary,[tabindex]):not([data-crm-protected],[data-crm-protected] *):focus { outline-color:var(--ui-focus) !important; }
body.crm-admin-menu-page.admin-wow:is(.premium-shell-page,.finance-page) :is(.hero,.head,.page-head,.page-header,.rundown-hero,.hero-strip):not([data-crm-protected],[data-crm-protected] *) {
 background:var(--ui-panel) !important; background-image:none !important; border-color:var(--ui-line) !important; color:var(--ui-text) !important; border-radius:10px !important; box-shadow:none !important; backdrop-filter:none !important;
}
body.crm-admin-menu-page.admin-wow:is(.premium-shell-page,.finance-page) :is(.card,.panel,.content-card,.table-card,.table-wrap,.stats-grid,.stats-overview,.stat-card,.mini-stat,.chart-card,.summary-card,.accounting-panel,.accounting-summary-card,.drilldown-card,.modal-content,.modal-dialog,.modal-dialog-wide):not([data-crm-protected],[data-crm-protected] *) {
 background:var(--ui-panel) !important; background-image:none !important; border-color:var(--ui-line) !important; color:var(--ui-text) !important; box-shadow:none !important; backdrop-filter:none !important;
}
body.crm-admin-menu-page.admin-wow :is(.item,.card,.mini-stat,.stat-card)::after { background:none !important; box-shadow:none !important; }
body.crm-admin-menu-page.admin-wow.finance-page :is(.stat-card,.kpi,.accounting-summary-card)::before { background:#C9A44C !important; }
body.crm-admin-menu-page.admin-wow.finance-page :is(.stat-card,.kpi):nth-child(2)::before { background:#176C70 !important; }
body.crm-admin-menu-page.admin-wow.finance-page :is(.stat-card,.kpi):nth-child(3)::before { background:#b98728 !important; }
body.crm-admin-menu-page.admin-wow.finance-page :is(.stat-card,.kpi):nth-child(4)::before { background:#a74741 !important; }
body.crm-admin-menu-page :is(.table-wrap,.table-container,.table-scroll,.billing-cycle-panel,.modal-card,.modal-header,.modal-toolbar,.modal-footer,.modal-content):not([data-crm-protected],[data-crm-protected] *) { background:var(--ui-panel) !important; background-image:none !important; border-color:var(--ui-line) !important; color:var(--ui-text) !important; box-shadow:none !important; }
body.crm-admin-menu-page table:not([data-crm-protected],[data-crm-protected] *,.fc *) :is(thead,tbody,tr,td):not([data-crm-protected],[data-crm-protected] *) { background-image:none !important; }
body.crm-admin-menu-page table:not([data-crm-protected],[data-crm-protected] *,.fc *) tbody tr:not(.selected,.active,.section,.closing,.bd-detail):not([data-crm-protected],[data-crm-protected] *) { background:var(--ui-panel) !important; }
body.crm-admin-menu-page table:not([data-crm-protected],[data-crm-protected] *,.fc *) tbody tr:hover:not([data-crm-protected],[data-crm-protected] *) { background:var(--ui-soft) !important; }
body.crm-admin-menu-page table:not([data-crm-protected],[data-crm-protected] *,.fc *) tbody tr :is(td,th):not([data-crm-protected],[data-crm-protected] *) { background-color:transparent !important; border-color:var(--ui-line) !important; }
body.crm-admin-menu-page :is(.stat-label,.stat-sub,.meta-line,.billing-cycle-switch):not([data-crm-protected],[data-crm-protected] *) { color:var(--ui-muted) !important; }
body.crm-admin-menu-page :is(.stat-value,.billable-cycle-summary strong):not([data-crm-protected],[data-crm-protected] *) { color:var(--ui-text) !important; }
body.crm-admin-menu-page :is(.link-btn,.toolbar a):not([data-crm-protected],[data-crm-protected] *) { background:var(--ui-panel) !important; background-image:none !important; color:var(--ui-text) !important; border:1px solid var(--ui-input-line) !important; box-shadow:none !important; text-shadow:none !important; }
body.crm-admin-menu-page :is(.link-btn.primary,a.primary):not([data-crm-protected],[data-crm-protected] *) { background:#C9A44C !important; color:#242629 !important; border-color:#C9A44C !important; }
body.crm-admin-menu-page :is(.status-badge.status-draft,.status-badge.status-planned):not([data-crm-protected],[data-crm-protected] *) { background:var(--ui-soft) !important; color:var(--ui-text) !important; border:1px solid var(--ui-input-line) !important; }
body.crm-admin-menu-page .status-badge.status-sent:not([data-crm-protected],[data-crm-protected] *) { background:var(--ui-petrol-soft) !important; color:var(--ui-link) !important; border:1px solid #176C70 !important; }
html.theme-light body.crm-admin-menu-page .status-badge.status-sent { color:#12595d !important; }
body.crm-admin-menu-page :is(.view-toggle button.active,.bank-btn.active):not([data-crm-protected],[data-crm-protected] *) { background:#176C70 !important; color:#fff !important; border-color:#176C70 !important; transition:none !important; }
body.crm-admin-menu-page :is(.matched-badge,.src-badge):not([data-crm-protected],[data-crm-protected] *) { background:var(--ui-petrol-soft) !important; color:var(--ui-link) !important; border-color:#176C70 !important; }
body.crm-admin-menu-page :is(.statement-list,.statement-item,.manual-item,.mt940-import-summary):not([data-crm-protected],[data-crm-protected] *) { background:var(--ui-panel) !important; color:var(--ui-text) !important; border-color:var(--ui-line) !important; }
body.crm-admin-menu-page .statement-item:hover:not([data-crm-protected],[data-crm-protected] *) { background:var(--ui-soft) !important; border-left-color:#C9A44C !important; }
body.crm-admin-menu-page .statement-item.income { border-left-color:#46a884 !important; }
body.crm-admin-menu-page .statement-item.expense { border-left-color:#c96d68 !important; }
body.crm-admin-menu-page :is(.statement-account,.reference) a:not([data-crm-protected],[data-crm-protected] *) { color:var(--ui-link) !important; }
body.crm-admin-menu-page[data-crm-route="bank.html"] :is(.inline-matches,.manual-match-row):not([data-crm-protected],[data-crm-protected] *) { background:var(--ui-soft) !important; border-color:var(--ui-line) !important; }
body.crm-admin-menu-page[data-crm-route="bank.html"] a[style*="background:#3b82f6"],body.crm-admin-menu-page[data-crm-route="bank.html"] a[style*="color:#93c5fd"] { background:#176C70 !important; color:#fff !important; border-color:#176C70 !important; }
body.crm-admin-menu-page[data-crm-route="liquidity.html"] :is(table.bd tr.section td,table.bd tr.closing td,table.bd tr.bd-detail td,table.bd td:first-child,.whatif-sec>button):not([data-crm-protected],[data-crm-protected] *) { background:var(--ui-soft) !important; color:var(--ui-text) !important; border-color:var(--ui-line) !important; }
body.crm-admin-menu-page[data-crm-route="liquidity.html"] .view-toggle { border-color:var(--ui-line) !important; }
body.crm-admin-menu-page[data-crm-route="liquidity.html"] :is(td.amt,.bd-toggle,.dd-link,.scale-active):not([data-crm-protected],[data-crm-protected] *) { color:var(--ui-link) !important; }
body.crm-admin-menu-page[data-crm-route="liquidity.html"] input[type="range"] { accent-color:#176C70 !important; }

/* Shared legacy widgets on menu destinations. The selectors are limited to
   interface chrome; image, mail and editor content keeps its own styling. */
body.crm-admin-menu-page :is(.template-link,.metric,.hero-stat,.smart-callout,.route-map-shell,.kanban-add,.kanban-count,.toggle-box,.type-bucket-card,.filter-group,.notification-panel-header,.kpi,.chart-container,.stat,.log-panel,.console-panel,.upload-zone,.upload-zone-mini,.selected-card,.response-box,.transport-card,.info-box,.table-header,.transfers-card):not([data-crm-protected],[data-crm-protected] *) { background:var(--ui-panel) !important; background-image:none !important; color:var(--ui-text) !important; border-color:var(--ui-line) !important; box-shadow:none !important; }
body.crm-admin-menu-page :is(.template-link:hover,.kanban-add:hover,.toggle-box:hover,.type-bucket-card:hover,.filter-group:hover):not([data-crm-protected],[data-crm-protected] *) { background:var(--ui-soft) !important; border-color:#176C70 !important; }
body.crm-admin-menu-page :is(.kanban-count,.filter-group.status,.filter-group.severity,.filter-group.source):not([data-crm-protected],[data-crm-protected] *) { background:var(--ui-soft) !important; color:var(--ui-text) !important; }
body.crm-admin-menu-page[data-crm-route="tasks.html"] :is(.pill,#taskSummaryPill):not([data-crm-protected],[data-crm-protected] *) { background:var(--ui-petrol-soft) !important; color:var(--ui-link) !important; border-color:#176C70 !important; }
body.crm-admin-menu-page[data-crm-route="forms.html"] .stat-value,body.crm-admin-menu-page[data-crm-route="document_management.html"] .stat-value,body.crm-admin-menu-page[data-crm-route="page_feedback.html"] .stat-value { color:var(--ui-text) !important; }
body.crm-admin-menu-page[data-crm-route="page_feedback.html"] thead:not([data-crm-protected],[data-crm-protected] *) { background:var(--ui-soft) !important; }
body.crm-admin-menu-page[data-crm-route="esim_upload.html"] :is(.badge.neutral,.pill,.selected-thumb):not([data-crm-protected],[data-crm-protected] *) { background:var(--ui-soft) !important; color:var(--ui-text) !important; border-color:var(--ui-line) !important; }
body.crm-admin-menu-page[data-crm-route="qr_codes.html"] .eyebrow { color:var(--ui-muted) !important; }
body.crm-admin-menu-page[data-crm-route="whatsapp.html"] :is(#waSidebar,.wa-side-head) { background:var(--ui-panel) !important; border-color:var(--ui-line) !important; }
body.crm-admin-menu-page[data-crm-route="finance_expenses.html"] :is(.upload-zone-mini,#uploadZone):not([data-crm-protected],[data-crm-protected] *) { background:var(--ui-panel) !important; border-color:var(--ui-input-line) !important; }
body.crm-admin-menu-page[data-crm-route="finance_expenses.html"] section.card > div[style*="background:#0e1330"] { background:var(--ui-soft) !important; border-color:var(--ui-line) !important; }
body.crm-admin-menu-page[data-crm-route="travel_expenses.html"] .status-box.compact { background:var(--ui-soft) !important; background-image:none !important; border-color:var(--ui-line) !important; color:var(--ui-text) !important; }
body.crm-admin-menu-page[data-crm-route="notifications.html"] :is(.notification-panel,.notification-panel-filters) { background:var(--ui-panel) !important; background-image:none !important; border-color:var(--ui-line) !important; }
body.crm-admin-menu-page :is(.endpoints-table,.chat-container,#saveBar):not([data-crm-protected],[data-crm-protected] *) { background:var(--ui-panel) !important; background-image:none !important; border-color:var(--ui-line) !important; }
body.crm-admin-menu-page[data-crm-route="screenrecordings.html"] .sr-notice:not([data-crm-protected],[data-crm-protected] *) { background:var(--ui-soft) !important; border-color:var(--ui-line) !important; color:var(--ui-text) !important; }
/* Legacy menu widgets missed by the shared surface rules. */
body.crm-admin-menu-page[data-crm-route="tasks.html"] :is(.filter-btn.active,button.view-toggle.active):not([data-crm-protected],[data-crm-protected] *) { background:#176C70 !important; color:#fff !important; border-color:#176C70 !important; box-shadow:inset 3px 0 #C9A44C !important; }
body.crm-admin-menu-page[data-crm-route="tasks.html"] :is(.filter-btn,.view-toggle):not(.active) { background:var(--ui-panel) !important; color:var(--ui-text) !important; border-color:var(--ui-input-line) !important; box-shadow:none !important; }
body.crm-admin-menu-page[data-crm-route="forms.html"] button.primary:not([data-crm-protected],[data-crm-protected] *) { background:#C9A44C !important; color:#242629 !important; border-color:#C9A44C !important; }
body.crm-admin-menu-page:is([data-crm-route="finance_quotes.html"],[data-crm-route="finance_invoices.html"],[data-crm-route="bank.html"]) main :is(button:not(.primary,.danger,.active),.link-btn:not(.primary)):not([data-crm-protected],[data-crm-protected] *) { background:var(--ui-panel) !important; background-image:none !important; color:var(--ui-text) !important; border-color:var(--ui-input-line) !important; box-shadow:none !important; }
body.crm-admin-menu-page:is([data-crm-route="finance_quotes.html"],[data-crm-route="finance_invoices.html"],[data-crm-route="bank.html"]) :is(.stat-value,.stat-label,.stat-sub):not([data-crm-protected],[data-crm-protected] *) { background:transparent !important; background-image:none !important; box-shadow:none !important; }
body.crm-admin-menu-page:is([data-crm-route="finance_quotes.html"],[data-crm-route="finance_invoices.html"]) .stats-grid .stat-card::before { display:none !important; }
body.crm-admin-menu-page:is([data-crm-route="finance_quotes.html"],[data-crm-route="finance_invoices.html"]) .status-legend .status-badge { box-shadow:none !important; }
body.crm-admin-menu-page[data-crm-route="qr_codes.html"] :is(.qr-panel,.empty):not([data-crm-protected],[data-crm-protected] *) { background:var(--ui-panel) !important; background-image:none !important; border-color:var(--ui-line) !important; color:var(--ui-text) !important; box-shadow:none !important; }
body.crm-admin-menu-page[data-crm-route="qr_codes.html"] .preview:not([data-crm-protected],[data-crm-protected] *) { border-color:var(--ui-line) !important; }
body.crm-admin-menu-page[data-crm-route="qr_codes.html"] :is(.field-note,.qr-subtitle):not([data-crm-protected],[data-crm-protected] *) { color:var(--ui-muted) !important; }
body.crm-admin-menu-page[data-crm-route="qr_codes.html"] .qr-link:not([data-crm-protected],[data-crm-protected] *) { color:var(--ui-link) !important; }
body.crm-admin-menu-page[data-crm-route="material_atlas.html"] .scan-card:not([data-crm-protected],[data-crm-protected] *) { background:var(--ui-panel) !important; background-image:none !important; border-color:var(--ui-line) !important; color:var(--ui-text) !important; box-shadow:none !important; }
body.crm-admin-menu-page[data-crm-route="material_atlas.html"] .scan-card::after { border-color:#176C7066 !important; box-shadow:0 0 0 24px #176C7012,0 0 0 52px #176C7008 !important; }
body.crm-admin-menu-page[data-crm-route="webhosting.html"] header:not(.nav-header) { background:var(--ui-panel) !important; background-image:none !important; border-color:var(--ui-line) !important; box-shadow:none !important; }
body.crm-admin-menu-page[data-crm-route="event_endpoints.html"] .endpoints-table thead,body.crm-admin-menu-page[data-crm-route="document_management.html"] thead { background:var(--ui-soft) !important; background-image:none !important; color:var(--ui-text) !important; border-color:var(--ui-line) !important; }
body.crm-admin-menu-page[data-crm-route="projects.html"] :is(#projectCount,.empty) { background:var(--ui-soft) !important; color:var(--ui-text) !important; border-color:var(--ui-line) !important; }
body.crm-admin-menu-page[data-crm-route="esim_upload.html"] .card-empty { background:var(--ui-soft) !important; background-image:none !important; border-color:var(--ui-line) !important; color:var(--ui-muted) !important; }
body.crm-admin-menu-page[data-crm-route="calendars.html"] .view-toggle { background:var(--ui-panel) !important; border-color:var(--ui-line) !important; }
body.crm-admin-menu-page[data-crm-route="finance_expenses.html"] section.card>div[style*="grid-template-columns"]>div[style*="background:#0e1330"] { background:var(--ui-soft) !important; border-color:var(--ui-line) !important; }
body.crm-admin-menu-page[data-crm-route="scanner_simulator.html"] :is(main>div[style*="background:#0e1330"],.console-line.info):not([data-crm-protected],[data-crm-protected] *) { background:var(--ui-petrol-soft) !important; color:var(--ui-link) !important; border-color:#176C70 !important; }
body.crm-admin-menu-page[data-crm-route="mautic_settings.html"] :is(#syncEnabled,#autoSyncCampaigns,#autoSyncContacts),body.crm-admin-menu-page[data-crm-route="domain_migration.html"] #hideCompleted { background:var(--ui-panel) !important; border-color:var(--ui-input-line) !important; accent-color:#176C70 !important; }
body.crm-admin-menu-page[data-crm-route="screenrecordings.html"] :is(.sr-button-primary,.sr-pill-muted):not([data-crm-protected],[data-crm-protected] *) { background:var(--ui-petrol-soft) !important; background-image:none !important; color:var(--ui-link) !important; border-color:#176C70 !important; }
body.crm-admin-menu-page[data-crm-route="screenrecordings.html"] :is(.sr-eyebrow,.sr-lead):not([data-crm-protected],[data-crm-protected] *) { color:var(--ui-muted) !important; }
body.crm-admin-menu-page[data-crm-route="messagingV2.html"] #chat-iframe-container { background:var(--ui-bg) !important; }
body.crm-admin-menu-page[data-crm-route="messagingV2.html"] .loading-spinner { border-color:var(--ui-line) !important; border-top-color:#C9A44C !important; }
body.crm-admin-menu-page[data-crm-route="people.html"] a:not([class])[href*="people"] { color:var(--ui-link) !important; }
body.crm-admin-menu-page[data-crm-route="people.html"] td a[onclick*="btnAdd"] { color:var(--ui-link) !important; }
body.crm-admin-menu-page[data-crm-route="scanner_simulator.html"] div:has(>#statusIndicator) { background:var(--ui-soft) !important; color:var(--ui-text) !important; }
body.crm-admin-menu-page[data-crm-route="tag_management.html"] .log-line.info { background:var(--ui-petrol-soft) !important; color:var(--ui-link) !important; }
body.crm-admin-menu-page[data-crm-route="tag_management.html"] .toggle-slider { background:var(--ui-soft) !important; }

/* The finance overview has its own legacy neon treatment beyond the shared cards. */
body.crm-admin-menu-page[data-crm-route="finance.html"] header.finance-hero,
body.crm-admin-menu-page[data-crm-route="finance.html"] :is(.accounting-toolbar,.balance-toolbar,.trend-toolbar,.doc-toolbar,.accounting-attention-card,.accounting-quick-link,.trend-canvas-wrap,.accounting-empty) {
 background:var(--ui-panel) !important; background-image:none !important; border-color:var(--ui-line) !important; color:var(--ui-text) !important; box-shadow:none !important;
}
body.crm-admin-menu-page[data-crm-route="finance.html"] .card::before { background:none !important; }
body.crm-admin-menu-page[data-crm-route="finance.html"] .finance-hero h1 .hero-accent { background:none !important; color:#C9A44C !important; -webkit-text-fill-color:#C9A44C !important; text-shadow:none !important; }
body.crm-admin-menu-page[data-crm-route="finance.html"] .finance-hero .hero-ornament { background:linear-gradient(90deg,#C9A44C,#176C70) !important; box-shadow:none !important; }
body.crm-admin-menu-page[data-crm-route="finance.html"] :is(.finance-hero-link,.tab,.accounting-pill,.trend-legend-pill) { background:var(--ui-soft) !important; background-image:none !important; border-color:var(--ui-line) !important; color:var(--ui-text) !important; box-shadow:none !important; }
body.crm-admin-menu-page[data-crm-route="finance.html"] :is(.tab.active,.finance-hero-link:hover) { background:#176C70 !important; color:#fff !important; border-color:#176C70 !important; }
body.crm-admin-menu-page[data-crm-route="finance.html"] :is(.accounting-toolbar,.balance-toolbar,.trend-toolbar,.doc-toolbar) :is(button:not(.primary),select,input) { background:var(--ui-panel) !important; background-image:none !important; color:var(--ui-text) !important; border-color:var(--ui-input-line) !important; box-shadow:none !important; }
body.crm-admin-menu-page[data-crm-route="finance.html"] :is(.accounting-toolbar,.balance-toolbar,.trend-toolbar,.doc-toolbar) button.primary { background:#C9A44C !important; background-image:none !important; color:#242629 !important; border-color:#C9A44C !important; box-shadow:none !important; }
body.crm-admin-menu-page[data-crm-route="finance.html"] :is(.accounting-empty,.accounting-mini-row,.trend-canvas-wrap,.accounting-pill,.trend-legend-pill) { border-color:var(--ui-line) !important; }
body.crm-admin-menu-page[data-crm-route="finance.html"] :is(.stats-block-title,.stat-amount-line,.accounting-pill small,.trend-legend-pill small) { color:var(--ui-muted) !important; }
body.crm-admin-menu-page[data-crm-route="finance.html"] .stat-amount-line strong { color:var(--ui-text) !important; }
body.crm-admin-menu-page[data-crm-route="finance.html"] :is(.doc-toolbar .meta,.accounting-panel-title,.accounting-card-eyebrow,.accounting-attention-label,.accounting-kpi-label,.trend-meta,.accounting-booking-detail-card .label,.accounting-summary-note,.accounting-mini-row span:first-child,.accounting-quick-link small,.accounting-section-subtitle,.balance-chart-meta,.balance-table th,.balance-table td.mut,.accounting-attention-sub,.accounting-action-meta) { color:var(--ui-muted) !important; }
body.crm-admin-menu-page[data-crm-route="finance.html"] :is(.accounting-card-eyebrow,.accounting-card-title,.accounting-summary-value,.accounting-summary-note,.accounting-mini-row,.accounting-kpi-label,.accounting-section-title,.accounting-section-subtitle) { background:transparent !important; background-image:none !important; }
body.crm-admin-menu-page[data-crm-route="finance.html"] .tab.active { border-bottom-color:#176C70 !important; }

/* Reviewed CRM form routes. Excludes mail, quotations and invoices by design. */
body.crm-admin-shell:is([data-crm-route="tasks.html"],[data-crm-route="calendars.html"],[data-crm-route="sales.html"],[data-crm-route="development.html"],[data-crm-route="agreements_register.html"],[data-crm-route="liquidity.html"]) .modal[data-modal-ux="shared-form"] {
 position:fixed !important; inset:0 !important; width:100% !important; height:100dvh !important; max-width:none !important; max-height:none !important; margin:0 !important; padding:28px !important; transform:none !important;
 align-items:center !important; justify-content:center !important; background:#10131575 !important; backdrop-filter:blur(6px) !important; -webkit-backdrop-filter:blur(6px) !important;
}
body.crm-admin-shell:is([data-crm-route="tasks.html"],[data-crm-route="calendars.html"],[data-crm-route="sales.html"],[data-crm-route="development.html"],[data-crm-route="agreements_register.html"],[data-crm-route="liquidity.html"]) .modal[data-modal-ux="shared-form"] > :is(.modal-content,.modal-card,.modal-dialog) {
 width:min(1100px,100%) !important; max-width:100% !important; max-height:calc(100dvh - 56px) !important; border:1px solid var(--ui-line) !important; border-radius:12px !important; background:var(--ui-panel) !important; color:var(--ui-text) !important; box-shadow:0 25px 90px #00000035 !important;
}
body.crm-admin-shell:is([data-crm-route="tasks.html"],[data-crm-route="calendars.html"],[data-crm-route="sales.html"],[data-crm-route="development.html"],[data-crm-route="agreements_register.html"],[data-crm-route="liquidity.html"]) .modal[data-modal-ux="shared-form"] :is(.modal-header,.modal-footer,.modal-actions,form > div:last-child,.signature-form-footer),
body.crm-admin-shell:is([data-crm-route="tasks.html"],[data-crm-route="calendars.html"],[data-crm-route="sales.html"],[data-crm-route="development.html"],[data-crm-route="agreements_register.html"],[data-crm-route="liquidity.html"]) .modal[data-modal-ux="shared-form"] > :is(.modal-content,.modal-card,.modal-dialog) > h3 {
 background:var(--ui-panel) !important; background-image:none !important; color:var(--ui-text) !important; border-color:var(--ui-line) !important;
}
@media(max-width:700px) {
 body.crm-admin-shell:is([data-crm-route="tasks.html"],[data-crm-route="calendars.html"],[data-crm-route="sales.html"],[data-crm-route="development.html"],[data-crm-route="agreements_register.html"],[data-crm-route="liquidity.html"]) .modal[data-modal-ux="shared-form"] { padding:10px !important; }
 body.crm-admin-shell:is([data-crm-route="tasks.html"],[data-crm-route="calendars.html"],[data-crm-route="sales.html"],[data-crm-route="development.html"],[data-crm-route="agreements_register.html"],[data-crm-route="liquidity.html"]) .modal[data-modal-ux="shared-form"] > :is(.modal-content,.modal-card,.modal-dialog) { max-height:calc(100dvh - 20px) !important; }
}
@media(prefers-reduced-transparency:reduce) {
 body.crm-admin-shell:is([data-crm-route="tasks.html"],[data-crm-route="calendars.html"],[data-crm-route="sales.html"],[data-crm-route="development.html"],[data-crm-route="agreements_register.html"],[data-crm-route="liquidity.html"]) .modal[data-modal-ux="shared-form"] { backdrop-filter:none !important; -webkit-backdrop-filter:none !important; background:#101315d9 !important; }
}


/* Specific legacy editors, kept separate from mail and financial documents. */
body.crm-admin-shell:is([data-crm-route="projects.html"],[data-crm-route="event_guests.html"],[data-crm-route="triggers.html"],[data-crm-route="forms.html"],[data-crm-route="document_management.html"]) :is(#projectModal,#milestoneModal,#sprintModal,#modal,#formModal,#uploadModal,#editModal).modal {
 position:fixed !important; inset:0 !important; width:100% !important; height:100dvh !important; max-width:none !important; max-height:none !important; margin:0 !important; padding:28px !important; transform:none !important; align-items:center !important; justify-content:center !important; z-index:20000 !important; background:#10131575 !important; backdrop-filter:blur(6px) !important; -webkit-backdrop-filter:blur(6px) !important;
}
body.crm-admin-shell:is([data-crm-route="projects.html"],[data-crm-route="event_guests.html"],[data-crm-route="triggers.html"],[data-crm-route="forms.html"],[data-crm-route="document_management.html"]) :is(#projectModal,#milestoneModal,#sprintModal,#modal,#formModal,#uploadModal,#editModal).modal > :is(.modal-content,.modal-card) {
 box-sizing:border-box !important; width:min(1100px,100%) !important; max-width:100% !important; max-height:calc(100dvh - 56px) !important; overflow:auto !important; overscroll-behavior:contain !important; transform:none !important; animation:none !important; padding:22px !important; border:1px solid var(--ui-line) !important; border-radius:12px !important; background:var(--ui-panel) !important; color:var(--ui-text) !important; box-shadow:0 25px 90px #00000035 !important;
}
body.crm-admin-shell:is([data-crm-route="projects.html"],[data-crm-route="event_guests.html"],[data-crm-route="triggers.html"],[data-crm-route="forms.html"],[data-crm-route="document_management.html"]) :is(#projectModal,#milestoneModal,#sprintModal,#modal,#formModal,#uploadModal,#editModal).modal :is(.modal-header,.modal-head,.modal-actions) {
 background:var(--ui-panel) !important; background-image:none !important; color:var(--ui-text) !important; border-color:var(--ui-line) !important;
}
@media(max-width:700px) {
 body.crm-admin-shell:is([data-crm-route="projects.html"],[data-crm-route="event_guests.html"],[data-crm-route="triggers.html"],[data-crm-route="forms.html"],[data-crm-route="document_management.html"]) :is(#projectModal,#milestoneModal,#sprintModal,#modal,#formModal,#uploadModal,#editModal).modal { padding:10px !important; }
 body.crm-admin-shell:is([data-crm-route="projects.html"],[data-crm-route="event_guests.html"],[data-crm-route="triggers.html"],[data-crm-route="forms.html"],[data-crm-route="document_management.html"]) :is(#projectModal,#milestoneModal,#sprintModal,#modal,#formModal,#uploadModal,#editModal).modal > :is(.modal-content,.modal-card) { max-height:calc(100dvh - 20px) !important; padding:16px !important; }
}
@media(prefers-reduced-transparency:reduce) {
 body.crm-admin-shell:is([data-crm-route="projects.html"],[data-crm-route="event_guests.html"],[data-crm-route="triggers.html"],[data-crm-route="forms.html"],[data-crm-route="document_management.html"]) :is(#projectModal,#milestoneModal,#sprintModal,#modal,#formModal,#uploadModal,#editModal).modal { backdrop-filter:none !important; -webkit-backdrop-filter:none !important; background:#101315d9 !important; }
}

/* Duplicate detection belongs above the document upload layer. */
body.crm-admin-shell[data-crm-route="document_management.html"] #duplicateModal.active { z-index:20001 !important; }

body.crm-admin-shell[data-crm-route="document_management.html"] #duplicateModal .duplicate-item.selected { background:#176C70 !important; color:#fff !important; border:2px solid #C9A44C !important; }
body.crm-admin-shell[data-crm-route="document_management.html"] #duplicateModal .duplicate-item.selected .duplicate-item-meta { color:#fff !important; }
body.crm-admin-shell[data-crm-route="document_management.html"] #duplicateModal .duplicate-item:focus-visible { outline:3px solid #C9A44C !important; outline-offset:3px !important; }


/* Reviewed planning and relationship editors, excluding messaging and financial documents. */
body.crm-admin-shell[data-crm-route="event_planning_V2.html"] :is(#itemModal,#plannerFocusModal,#eventConfigModal,#itemPickerModal).modal,
body.crm-admin-shell[data-crm-route="company_detail.html"] :is(#portalCredentialsModal,#companyRolesModal,#portalPeopleModal).modal,
body.crm-admin-shell[data-crm-route="contact_detail.html"] :is(#grantAccessModal,#addPermissionModal).modal {
 position:fixed !important; inset:0 !important; width:100% !important; height:100dvh !important; max-width:none !important; max-height:none !important; margin:0 !important; padding:28px !important; transform:none !important; background:#10131575 !important; backdrop-filter:blur(6px) !important; -webkit-backdrop-filter:blur(6px) !important; z-index:20000 !important; box-sizing:border-box !important;
}
body.crm-admin-shell[data-crm-route="event_planning_V2.html"] :is(#itemModal,#plannerFocusModal,#eventConfigModal,#itemPickerModal).modal > .modal-content,
body.crm-admin-shell[data-crm-route="company_detail.html"] :is(#portalCredentialsModal,#companyRolesModal,#portalPeopleModal).modal > .modal-panel,
body.crm-admin-shell[data-crm-route="contact_detail.html"] :is(#grantAccessModal,#addPermissionModal).modal > .modal-content {
 box-sizing:border-box !important; max-width:100% !important; max-height:calc(100dvh - 56px) !important; border:1px solid var(--ui-line) !important; border-radius:12px !important; background:var(--ui-panel) !important; color:var(--ui-text) !important; box-shadow:0 25px 90px #00000035 !important; animation:none !important; transform:none !important;
}
body.crm-admin-shell[data-crm-route="company_detail.html"] :is(#portalCredentialsModal,#companyRolesModal,#portalPeopleModal).modal > .modal-panel,
body.crm-admin-shell[data-crm-route="contact_detail.html"] :is(#grantAccessModal,#addPermissionModal).modal > .modal-content { overflow:auto !important; }
body.crm-admin-shell[data-crm-route="contact_detail.html"] :is(#grantAccessModal,#addPermissionModal).modal > .modal-content { width:min(560px,100%) !important; margin:0 auto !important; }
body.crm-admin-shell[data-crm-route="event_planning_V2.html"] :is(#itemModal,#plannerFocusModal,#eventConfigModal,#itemPickerModal) :is(.modal-header,.modal-actions,.editor-section,.group-box),
body.crm-admin-shell[data-crm-route="event_planning_V2.html"] :is(#itemModal,#plannerFocusModal,#eventConfigModal,#itemPickerModal) > .modal-content > h3,
body.crm-admin-shell[data-crm-route="company_detail.html"] :is(#portalCredentialsModal,#companyRolesModal,#portalPeopleModal) :is(.modal-head,.modal-actions),
body.crm-admin-shell[data-crm-route="contact_detail.html"] :is(#grantAccessModal,#addPermissionModal) :is(.modal-head,.modal-actions) { background:var(--ui-panel) !important; background-image:none !important; border-color:var(--ui-line) !important; color:var(--ui-text) !important; }
@media(max-width:700px) {
 body.crm-admin-shell[data-crm-route="event_planning_V2.html"] :is(#itemModal,#plannerFocusModal,#eventConfigModal,#itemPickerModal).modal,
 body.crm-admin-shell[data-crm-route="company_detail.html"] :is(#portalCredentialsModal,#companyRolesModal,#portalPeopleModal).modal,
 body.crm-admin-shell[data-crm-route="contact_detail.html"] :is(#grantAccessModal,#addPermissionModal).modal { padding:10px !important; }
 body.crm-admin-shell[data-crm-route="event_planning_V2.html"] :is(#itemModal,#plannerFocusModal,#eventConfigModal,#itemPickerModal).modal > .modal-content,
 body.crm-admin-shell[data-crm-route="company_detail.html"] :is(#portalCredentialsModal,#companyRolesModal,#portalPeopleModal).modal > .modal-panel,
 body.crm-admin-shell[data-crm-route="contact_detail.html"] :is(#grantAccessModal,#addPermissionModal).modal > .modal-content { max-height:calc(100dvh - 20px) !important; }
}

body.crm-admin-shell[data-crm-route="event_planning_V2.html"] #itemPickerModal .item-picker-option.selected { background:#176C70 !important; border-color:#C9A44C !important; color:#fff !important; }
body.crm-admin-shell[data-crm-route="event_planning_V2.html"] #itemPickerModal .item-picker-option.selected small { color:#fff !important; }

/* Tasks: retain the user's colour selection as an accent on a calm surface. */
body.crm-admin-ui[data-crm-route="tasks.html"] .tasks-layout.filters-collapsed { grid-template-columns:auto minmax(0,1fr) !important; }
body.crm-admin-ui[data-crm-route="tasks.html"] .task-filter-toggle { min-height:38px; }
body.crm-admin-ui[data-crm-route="tasks.html"] .task-item {
 --task-card-bg:var(--ui-soft) !important; --task-card-bg-hover:var(--ui-panel) !important;
 --task-card-border:var(--ui-line) !important; --task-card-border-hover:var(--ui-input-line) !important;
 --task-card-fg:var(--ui-text) !important; --task-card-muted:var(--ui-muted) !important;
 --task-card-chip-bg:var(--ui-panel) !important; --task-card-chip-border:var(--ui-line) !important;
 --task-card-chip-fg:var(--ui-text) !important; --task-card-shadow:none !important;
 border-left:3px solid var(--task-color-marker, #C9A44C) !important;
 height:auto !important; min-height:156px; box-shadow:none !important;
}
body.crm-admin-ui[data-crm-route="tasks.html"] .task-item:hover { box-shadow:none !important; }
body.crm-admin-ui[data-crm-route="tasks.html"] .task-body { flex:1; }
body.crm-admin-ui[data-crm-route="tasks.html"] .task-meta { max-height:none; overflow:visible; }
body.crm-admin-ui[data-crm-route="tasks.html"] :is(.kanban-add,.kanban-count,.board-archive,.task-color-picker,.toggle-box) { background:var(--ui-soft) !important; background-image:none !important; color:var(--ui-text) !important; border-color:var(--ui-line) !important; box-shadow:none !important; }
body.crm-admin-ui[data-crm-route="tasks.html"] :is(.task-priority,.task-badge,.task-deadline) { background:var(--ui-panel) !important; background-image:none !important; color:var(--ui-text) !important; border:1px solid var(--ui-line) !important; box-shadow:none !important; animation:none !important; }
body.crm-admin-ui[data-crm-route="tasks.html"] :is(.priority-urgent,.priority-high,.task-deadline.deadline-overdue) { border-color:#c75d5d !important; }
body.crm-admin-ui[data-crm-route="tasks.html"] .task-deadline.deadline-soon { border-color:#C9A44C !important; }
body.crm-admin-ui[data-crm-route="tasks.html"] :is(button,input,select,textarea):focus-visible { outline:3px solid var(--ui-focus) !important; outline-offset:2px; }
@media(max-width:1000px) { body.crm-admin-ui[data-crm-route="tasks.html"] .tasks-layout.filters-collapsed { grid-template-columns:minmax(0,1fr) !important; } }
}

/* Calendar day separators must remain visible through the time-slot layer. */
@layer crm-admin-ui {
body.crm-admin-ui[data-crm-family=calendar] .fc .fc-timegrid-slot { background:transparent !important; border-color:var(--ui-line) !important; }
body.crm-admin-ui[data-crm-family=calendar] .fc .fc-timegrid-col { border-color:var(--ui-line) !important; }
body.crm-admin-ui[data-crm-family=calendar] .fc .fc-event { --cal-bg:#176c70; --cal-border:#76b8b4; --cal-fg:#fff; background:var(--cal-bg) !important; border-color:var(--cal-border) !important; color:var(--cal-fg) !important; }
body.crm-admin-ui[data-crm-family=calendar] .fc .fc-event.event-task { --cal-bg:#176c70; --cal-border:#76b8b4; }
body.crm-admin-ui[data-crm-family=calendar] .fc .fc-event.event-appointment { --cal-bg:#735b2a; --cal-border:#d7bd7a; }
body.crm-admin-ui[data-crm-family=calendar] .fc .fc-event.event-project { --cal-bg:#67574a; --cal-border:#c9b6a3; }
body.crm-admin-ui[data-crm-family=calendar] .fc .fc-event.event-event_link { --cal-bg:#315d55; --cal-border:#95c3b4; }
body.crm-admin-ui[data-crm-family=calendar] .fc .fc-event.event-meeting { --cal-bg:#48575a; --cal-border:#a8babb; }
body.crm-admin-ui[data-crm-family=calendar] .fc .fc-event.event-deadline { --cal-bg:#894b31; --cal-border:#e2a17a; }
body.crm-admin-ui[data-crm-family=calendar] .fc .fc-event.event-reminder { --cal-bg:#50633e; --cal-border:#aabe8e; }
body.crm-admin-ui[data-crm-family=calendar] .fc .fc-event :is(.fc-event-main,.fc-event-main-frame,.fc-event-title-container,.fc-event-title,.fc-event-time) { background:transparent !important; color:var(--cal-fg) !important; }
}

@layer crm-admin-ui {
body.crm-admin-ui[data-crm-route="people.html"] button.people-name-toggle { border:0!important; background:transparent!important; color:var(--ui-text)!important; padding:0!important; font-weight:700!important; text-decoration:underline!important; text-decoration-color:var(--ui-input-line)!important; text-underline-offset:3px; }
}

@layer crm-admin-ui {

/* Reviewed editors on Identity, Directory, Atlas, Admin Users and Webhosting. */
body.crm-admin-shell[data-crm-route="identity.html"] :is(#brandModal,#assetModal).workspace.modal,
body.crm-admin-shell[data-crm-route="directory_admin.html"] :is(#modalGroup,#modalMembers,#modalPerson,#modalAvailability,#modalZone).dir-modal-backdrop,
body.crm-admin-shell[data-crm-route="material_atlas.html"] :is(#itemModal,#locationModal,#categoryModal).atlas-modal-backdrop,
body.crm-admin-shell[data-crm-route="admin_users.html"] :is(#linkModal,#editModal).modal-overlay,
body.crm-admin-shell[data-crm-route="webhosting.html"] :is(#editBackdrop,#serviceBackdrop).modal-backdrop {
 position:fixed !important; inset:0 !important; width:100% !important; height:100dvh !important; max-width:none !important; max-height:none !important; margin:0 !important; padding:28px !important; transform:none !important; align-items:center !important; justify-content:center !important; z-index:20000 !important; box-sizing:border-box !important; background:#10131575 !important; backdrop-filter:blur(6px) !important; -webkit-backdrop-filter:blur(6px) !important;
}
body.crm-admin-shell[data-crm-route="identity.html"] :is(#brandModal,#assetModal).workspace.modal.active { display:flex !important; }
body.crm-admin-shell[data-crm-route="identity.html"] .asset-item .asset-open { background:transparent !important; border:0 !important; padding:0 !important; }
body.crm-admin-shell[data-crm-route="identity.html"] #assetModal :is(.asset-preview-toolbar,.asset-preview-toggle,.form-actions) { background:var(--ui-panel) !important; border-color:var(--ui-line) !important; color:var(--ui-text) !important; }
body.crm-admin-shell[data-crm-route="identity.html"] #assetModal :is(.asset-btn:not(.warn),.asset-back-btn) { background:var(--ui-panel) !important; border-color:var(--ui-line) !important; color:var(--ui-text) !important; }
body.crm-admin-shell[data-crm-route="identity.html"] #assetModal :is(.asset-preview-toggle button.active,.asset-btn.teal) { background:#176c70 !important; border-color:#176c70 !important; color:#fff !important; }
body.crm-admin-shell[data-crm-route="identity.html"] #assetModal #assetFilename { background:var(--ui-panel) !important; color:var(--ui-text) !important; }
body.crm-admin-shell[data-crm-route="material_atlas.html"] :is(#locationModal,#categoryModal).atlas-modal-backdrop.open { z-index:20001 !important; }
body.crm-admin-shell[data-crm-route="identity.html"] :is(#brandModal,#assetModal) > .modal-content,
body.crm-admin-shell[data-crm-route="directory_admin.html"] :is(#modalGroup,#modalMembers,#modalPerson,#modalAvailability,#modalZone) > .dir-modal,
body.crm-admin-shell[data-crm-route="material_atlas.html"] :is(#itemModal,#locationModal,#categoryModal) > .atlas-modal,
body.crm-admin-shell[data-crm-route="admin_users.html"] :is(#linkModal,#editModal) > .au-modal,
body.crm-admin-shell[data-crm-route="webhosting.html"] :is(#editBackdrop,#serviceBackdrop) > .modal {
 box-sizing:border-box !important; width:min(1100px,100%) !important; max-width:100% !important; max-height:calc(100dvh - 56px) !important; overflow:auto !important; overscroll-behavior:contain !important; border:1px solid var(--ui-line) !important; border-radius:12px !important; background:var(--ui-panel) !important; color:var(--ui-text) !important; box-shadow:0 25px 90px #00000035 !important; animation:none !important; transform:none !important;
}
body.crm-admin-shell[data-crm-route="directory_admin.html"] #modalMembers.side-panel > .dir-modal { height:auto !important; align-self:center !important; }
body.crm-admin-shell[data-crm-route="admin_users.html"] :is(#linkModal,#editModal) :is(.modal-header,.modal-body,.modal-footer),
body.crm-admin-shell[data-crm-route="identity.html"] :is(#brandModal,#assetModal) :is(.modal-header,.modal-body,.modal-footer),
body.crm-admin-shell[data-crm-route="directory_admin.html"] :is(#modalGroup,#modalMembers,#modalPerson,#modalAvailability,#modalZone) .modal-actions,
body.crm-admin-shell[data-crm-route="material_atlas.html"] :is(#itemModal,#locationModal,#categoryModal) .modal-actions { background:var(--ui-panel) !important; background-image:none !important; color:var(--ui-text) !important; border-color:var(--ui-line) !important; }
@media(max-width:700px){
 body.crm-admin-shell[data-crm-route="identity.html"] :is(#brandModal,#assetModal).workspace.modal,
 body.crm-admin-shell[data-crm-route="directory_admin.html"] :is(#modalGroup,#modalMembers,#modalPerson,#modalAvailability,#modalZone).dir-modal-backdrop,
 body.crm-admin-shell[data-crm-route="material_atlas.html"] :is(#itemModal,#locationModal,#categoryModal).atlas-modal-backdrop,
 body.crm-admin-shell[data-crm-route="admin_users.html"] :is(#linkModal,#editModal).modal-overlay,
 body.crm-admin-shell[data-crm-route="webhosting.html"] :is(#editBackdrop,#serviceBackdrop).modal-backdrop { padding:10px !important; }
 body.crm-admin-shell[data-crm-route="identity.html"] :is(#brandModal,#assetModal) > .modal-content,
 body.crm-admin-shell[data-crm-route="directory_admin.html"] :is(#modalGroup,#modalMembers,#modalPerson,#modalAvailability,#modalZone) > .dir-modal,
 body.crm-admin-shell[data-crm-route="material_atlas.html"] :is(#itemModal,#locationModal,#categoryModal) > .atlas-modal,
 body.crm-admin-shell[data-crm-route="admin_users.html"] :is(#linkModal,#editModal) > .au-modal,
 body.crm-admin-shell[data-crm-route="webhosting.html"] :is(#editBackdrop,#serviceBackdrop) > .modal { max-height:calc(100dvh - 20px) !important; }
}

}

/* CRM contact actions and event detail: the earlier layer wins for important declarations. */
@layer crm-admin-ui {
body.crm-admin-ui[data-crm-route="contacts.html"] :is(#btnAdd,#btnReload,#btnClearFilters,#contactsMain [data-view],#contactsMain [data-edit]),
body.crm-admin-ui[data-crm-route="contact_forms.html"] :is(#btnReload,tbody button:first-child) {
 background:#C9A44C !important; background-image:none !important; color:#242629 !important; border-color:#C9A44C !important;
}
body.crm-admin-ui[data-crm-route="contacts.html"] :is(#btnAdd,#btnReload,#btnClearFilters,#contactsMain [data-view],#contactsMain [data-edit]):hover,
body.crm-admin-ui[data-crm-route="contact_forms.html"] :is(#btnReload,tbody button:first-child):hover { background:#dfbf6a !important; border-color:#dfbf6a !important; }
body.crm-admin-ui[data-crm-route="contact_forms.html"] tbody button:nth-child(2),
body.crm-admin-ui[data-crm-route="contacts.html"] #contactsMain .crm-danger { background:#892f2a !important; color:#fff !important; border-color:#892f2a !important; }
body.crm-admin-ui[data-crm-route="event_detail.html"] main :is(#planningLink,#talksLink,#smartVisitorLink,#coatCarouselLink,#cloakroomLink,#documentsLink) button { background:#176C70 !important; background-image:none !important; color:#fff !important; border-color:#176C70 !important; }
body.crm-admin-ui[data-crm-route="event_detail.html"] main #planningLink button { background:#C9A44C !important; color:#242629 !important; border-color:#C9A44C !important; }
body.crm-admin-ui[data-crm-route="event_detail.html"] main .card { border-top:3px solid #176C70 !important; }
body.crm-admin-ui[data-crm-route="event_detail.html"] :is(main a:not(:has(button)),#companyEmail,#companyWebsite) { color:var(--ui-focus) !important; }
body.crm-admin-ui[data-crm-route="event_detail.html"] :is(.contact-card,.event-product-note,#eventWifiProfilesList > .row) { background:var(--ui-soft) !important; color:var(--ui-text) !important; border-color:var(--ui-line) !important; }
body.crm-admin-ui[data-crm-route="event_detail.html"] :is(.contact-card strong,.info-value) { color:var(--ui-text) !important; }
body.crm-admin-ui[data-crm-route="event_detail.html"] .info-row { border-color:var(--ui-line) !important; }
body.crm-admin-ui[data-crm-route="event_detail.html"] .product-card { background:var(--ui-soft) !important; color:var(--ui-text) !important; border-color:var(--ui-line) !important; }
body.crm-admin-ui[data-crm-route="event_detail.html"] .product-card.is-enabled { border-color:#176C70 !important; }
body.crm-admin-ui[data-crm-route="event_detail.html"] .product-card[role="button"]:hover { border-color:#C9A44C !important; }
body.crm-admin-ui[data-crm-route="event_detail.html"] .product-card:focus-visible { outline:3px solid var(--ui-focus) !important; outline-offset:3px; }
body.crm-admin-ui[data-crm-route="event_detail.html"] #staff td.mut .small { color:var(--ui-muted) !important; }
body.crm-admin-ui[data-crm-route="event_detail.html"] .status-completed { color:var(--ui-focus) !important; }
body.crm-admin-ui[data-crm-route="event_detail.html"] #addEventContactModal { z-index:20000 !important; }
body.crm-admin-ui[data-crm-route="event_detail.html"] #addEventContactModal > div { box-sizing:border-box; background:var(--ui-panel) !important; color:var(--ui-text) !important; border-color:#C9A44C !important; max-height:calc(100dvh - 32px); overflow:auto; }
body.crm-admin-ui[data-crm-route="event_detail.html"] #addEventContactModal input[type="checkbox"] { width:auto; }
@media(max-width:700px) { body.crm-admin-ui[data-crm-route="event_detail.html"] #productsGrid { grid-template-columns:repeat(auto-fit,minmax(min(100%,200px),1fr)) !important; } }

/* The top navigation is the same SQL-configured menu, not a second menu tree. */
body.crm-admin-shell[data-crm-menu=top]:not(.crm-dashboard) { padding-left:0 !important; padding-top:104px !important; }
body.crm-admin-shell.crm-dashboard[data-crm-menu=top] .dash-main { margin-left:0 !important; padding-top:124px !important; }
body.crm-admin-shell[data-crm-menu=top] .nav-header { left:0 !important; }
body.crm-admin-shell[data-crm-menu=top] .nav-mobile-drawer { display:none !important; }
body.crm-admin-shell[data-crm-menu=top] .nav-links {
 display:flex !important; align-items:center !important; justify-content:center !important; gap:0 !important;
 position:fixed !important; top:56px !important; left:0 !important; right:0 !important;
 height:48px !important; padding:0 10px !important; box-sizing:border-box !important;
 background:var(--dash-panel) !important; border-bottom:1px solid var(--dash-line) !important;
 overflow:visible !important; z-index:10001 !important;
}
body.crm-admin-shell[data-crm-menu=top] .nav-links .nav-link { color:var(--dash-text) !important; padding:8px 9px !important; }
@media(max-width:1280px) {
 body.crm-admin-shell[data-crm-menu=top] .nav-links:has(> a[href="/file_storage.html"]) .nav-link {
  padding-inline:6px !important;
 }
}
body.crm-admin-shell[data-crm-menu=top] .nav-links .nav-link:hover,
body.crm-admin-shell[data-crm-menu=top] .nav-links .nav-link:focus-visible,
body.crm-admin-shell[data-crm-menu=top] .nav-links .nav-link.active { background:var(--dash-soft) !important; color:var(--dash-text) !important; }
body.crm-admin-shell[data-crm-menu=top] .nav-dropdown-menu { background:var(--dash-panel) !important; border-color:var(--dash-line) !important; }
body.crm-admin-shell[data-crm-menu=top] .nav-dropdown-item { color:var(--dash-text) !important; }
body.crm-admin-shell[data-crm-menu=top] .nav-dropdown-item:hover,body.crm-admin-shell[data-crm-menu=top] .nav-dropdown-item:focus-visible { background:var(--dash-soft) !important; }
body.crm-admin-shell[data-crm-menu=top] .nav-dropdown-section { color:var(--dash-muted) !important; }

}
