/* Application-wide appearance. Theme IDs are a server-side allowlist. */
:root, [data-preview-theme] {
  --positive: #185b36; --positive-bg: #e0f2e7; --positive-line: #98c6b4;
  --danger-line: #c8827c; --warning-line: #cfaf68;
  --info: #365b82; --info-bg: #f2f6fc;
  --accent-line: #a9cdbd; --section-bg: #dcece5; --section-ink: #174c3f;
  --on-accent: #fff; --hover: #edf4f0;
  --nav-ink: var(--muted); --nav-active-bg: var(--green-soft); --nav-active-ink: var(--green);
  --nav-line: var(--line); --nav-heading: var(--ink); --nav-muted: var(--muted);
  --nav-note: var(--surface-soft); --nav-hover: var(--hover);
  --table-y: 12px; --table-x: 16px; --table-font: 13px;
  --page-title: 28px; --page-gutter: 44px; --panel-gap: 20px;
  --theme-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}
html[data-theme=classic], [data-preview-theme=classic] {
  --bg:#f5f7f6; --surface:#fff; --surface-soft:#f4f7f5; --sidebar:#fcfcfa;
  --ink:#22332f; --muted:#586b63; --faint:#6d7d75; --line:#dfe7e2; --border-strong:#9cb3a7;
  --green:#146b60; --green-dark:#0d5148; --green-soft:#eaf3ed;
}
html[data-theme=analyst], [data-preview-theme=analyst] {
  --bg:#eff3f8; --surface:#fff; --surface-soft:#f0f4f9; --sidebar:#fff;
  --ink:#172d48; --muted:#4c627b; --faint:#63758a; --line:#d4dfeb; --border-strong:#9baec4;
  --green:#1856a8; --green-dark:#103f83; --green-soft:#e8f0fd; --accent-line:#a5bfe5;
  --section-bg:#e1ebfa; --section-ink:#123e78; --hover:#edf3fd;
  --info:#305c91; --info-bg:#edf3fc;
  --radius:5px; --control-radius:4px; --space-panel:20px; --control-height:36px;
  --table-y:8px; --table-x:12px; --table-font:13px; --page-gutter:28px; --panel-gap:16px;
  --theme-font:Arial, "Helvetica Neue", sans-serif;
}
html[data-theme=executive], [data-preview-theme=executive] {
  --bg:#f4f3f7; --surface:#fff; --surface-soft:#f6f4f9; --sidebar:#292338;
  --ink:#2a2634; --muted:#655c73; --faint:#73677f; --line:#e0dce9; --border-strong:#b1a4c4;
  --green:#65428e; --green-dark:#4b286f; --green-soft:#eee6f8; --accent-line:#c6afde;
  --section-bg:#eee7f5; --section-ink:#4f2e71; --hover:#f2ecf9;
  --nav-ink:#d4cddf; --nav-heading:#fff; --nav-muted:#b6abc9; --nav-line:#463b59;
  --nav-active-bg:#4c3b63; --nav-active-ink:#fff; --nav-note:#342b44; --nav-hover:#3b304d;
  --info:#574677; --info-bg:#f0edf6;
  --radius:18px; --control-radius:10px; --space-panel:28px; --control-height:44px;
  --table-y:16px; --table-x:20px; --page-title:32px; --panel-gap:28px;
}
html[data-theme=contrast], [data-preview-theme=contrast] {
  --bg:#fff; --surface:#fff; --surface-soft:#f1f1f1; --sidebar:#fff;
  --ink:#111; --muted:#333; --faint:#454545; --line:#959595; --border-strong:#555;
  --green:#003fad; --green-dark:#002a7c; --green-soft:#eaf0ff; --accent-line:#4671c4;
  --section-bg:#e6edfc; --section-ink:#112e68; --hover:#edf1fa;
  --positive:#084a25; --positive-bg:#e3f3e9; --positive-line:#28774a;
  --danger:#8b1010; --danger-bg:#ffeded; --danger-line:#a22a2a;
  --warning:#633e00; --warning-bg:#fff2cc; --warning-line:#84601a;
  --info:#183c70; --info-bg:#eaf0fc;
  --radius:2px; --control-radius:2px; --table-font:14px; --page-title:30px;
  --theme-font:Arial, "Helvetica Neue", sans-serif;
}
html[data-theme=night], [data-preview-theme=night] {
  color-scheme:dark;
  --bg:#131b25; --surface:#1c2734; --surface-soft:#243241; --sidebar:#18212d;
  --ink:#ecf2f8; --muted:#b0c1d1; --faint:#9bafc2; --line:#3b4d60; --border-strong:#6c8298;
  --green:#83c5ff; --green-dark:#b2dcff; --green-soft:#243f59; --accent-line:#547c9f;
  --section-bg:#29445d; --section-ink:#d1e9ff; --hover:#283c50; --on-accent:#102b42;
  --positive:#8bdfb0; --positive-bg:#203e32; --positive-line:#527f66;
  --danger:#ffb4b0; --danger-bg:#442d35; --danger-line:#b97475;
  --warning:#f1ce8a; --warning-bg:#403827; --warning-line:#ac915b;
  --info:#acd3fa; --info-bg:#263a51;
  --radius:10px; --control-radius:6px;
}
html:not([data-theme=night]) { color-scheme:light; }
html[data-theme] { font-family:var(--theme-font); }
[data-theme] h1, [data-theme] .pnl-heading h1 { font-size:var(--page-title); text-wrap:balance; }
[data-theme] .main-content { padding-inline:var(--page-gutter); }
[data-theme] :is(.expense-panel,.crm-panel) { margin-block:var(--panel-gap); border-radius:var(--radius); }
[data-theme] :is(.expense-table,.crm-table), [data-theme] .pnl-report .department-table { font-size:var(--table-font); }
[data-theme] :is(.expense-table,.crm-table) :is(th,td), [data-theme] #crm-workspace .crm-table :is(th,td) { padding:var(--table-y) var(--table-x); font-size:inherit; }
[data-theme] :is(.expense-table,.crm-table) thead th { font-size:12px; }
[data-theme] :is(.expense-table,.crm-table) .number { font-variant-numeric:tabular-nums; }
/* Shared surfaces: navigation, dialogs, forms and legacy reports use the same palette. */
[data-theme] .sidebar { background:var(--sidebar); border-color:var(--nav-line); }
[data-theme] .sidebar .brand { color:var(--nav-heading); }
[data-theme] .sidebar :is(.version,.nav-label,.sidebar-footer,.sidebar-note p) { color:var(--nav-muted); }
[data-theme] .sidebar-note { background:var(--nav-note); border-color:var(--nav-line); color:var(--nav-heading); }
[data-theme] .sidebar .note-icon { color:var(--nav-ink); }
[data-theme] .sidebar-note a { color:var(--nav-ink); }
[data-theme] .nav-link { color:var(--nav-ink); }
[data-theme] .nav-link:hover { background:var(--nav-hover); color:var(--nav-heading); }
[data-theme] .nav-link.is-active { background:var(--nav-active-bg); color:var(--nav-active-ink); border-color:var(--nav-line); }
[data-theme] .topbar, [data-theme] .auth-header { background:var(--surface); }
[data-theme] :is(.version,.eyebrow,.section-meta,.topbar-help,.breadcrumb .icon) { color:var(--muted); }
[data-theme] .breadcrumb-current { color:var(--ink); }
[data-theme] .brand-mark, [data-theme] .button-primary, [data-theme] .skip-link { background:var(--green); color:var(--on-accent); }
[data-theme] .button-primary:hover { background:var(--green-dark); color:var(--on-accent); }
[data-theme] :is(.button-secondary,.logout-button,.forecast-toggle) { background:var(--surface); color:var(--green-dark); border-color:var(--border-strong); }
[data-theme] :is(.button-secondary,.logout-button,.forecast-toggle):hover { background:var(--hover); color:var(--green-dark); }
[data-theme] :is(.ui-tabs,.settings-tabs,.finance-tabs,.crm-tabs)>a:is(.is-active,[aria-current=page]) { border-color:var(--accent-line); }
[data-theme] :is(.expense-link,.expense-metric a,.expense-metric.accent>strong,.expense-reconcile,.employee-rule,.employee-menu summary,.department-profile-edit,.department-new>summary,.product-extra-month>summary,.department-picker summary,.users-password>summary,.expense-number:hover) { color:var(--green); }
[data-theme] :is(.expense-metric>span,.expense-metric small,.department-category th,.department-subcategory,.product-completeness,.department-profile small,.department-profile-order,.department-profile-target,.calculation-month small,.pnl-control span,.pnl-validation>summary>span:not(.pnl-validation-icon),.pnl-method>summary,.pnl-method>div,.rest-summary dt,.rest-settings-form small,.rest-last-check small,.users-card>summary small,.archive-card p,.archive-shared-note p) { color:var(--muted); }
[data-theme] :is(.expense-filters label,.expense-upload label,.rest-summary dd,.pnl-report-toolbar h2,.salary-warning .expense-table,.finance-filter-options-list label) { color:var(--ink); }
[data-theme] :is(.expense-metric,.department-picker,.salary-warning .expense-table-scroll,.pnl-control,.pnl-validation-body,.rest-summary div,.project-dialog,.crm-dialog,.crm-dialog-heading,.crm-run-panel,.crm-counter,.auth-card,.account-card,.step-card,.compact-empty,.finance-filter-options,.finance-field-choice) { background:var(--surface); color:var(--ink); border-color:var(--line); }
[data-theme] :is(.project-dialog,#cw-dialog,.crm-dialog) { overscroll-behavior:contain; }
[data-theme] :is(.department-picker,.department-edit,.department-picker fieldset,.expense-import-rules,.product-extra-month,.department-profile,.calculation-year,.rest-delete,.users-form fieldset,.users-card[open]>summary,.users-password,.pnl-method) { border-color:var(--line); }
[data-theme] :is(.detail-filters,.department-create,.department-product,.category-subcategory,.product-grid th:first-child,.product-save-bar,.department-profile .department-edit,.calculation-month,.pnl-validation,.rest-last-check,.finance-field-catalog,.crm-run-progress) { background:var(--surface-soft); border-color:var(--line); }
[data-theme] :is(.expense-table,.crm-table) tbody tr:hover, [data-theme] .crm-table tbody tr:focus, [data-theme] .department-profile>summary:hover { background:var(--hover); }
[data-theme] .crm-table tbody tr:focus-visible { outline:2px solid var(--green); outline-offset:-2px; }
[data-theme] :is(.expense-table tfoot,.department-total,.mapping-counter,.expense-metric.accent,.department-profile[open]>summary,.product-grid .product-dirty) { background:var(--green-soft); border-color:var(--accent-line); }
[data-theme] :is(.expense-pill,.cw-pill,.soft-badge,.crm-local-badge,.finance-filter-chip,.finance-filter-selected-item) { background:var(--green-soft); color:var(--green-dark); border-color:var(--accent-line); }
[data-theme] :is(.expense-pill.off,.neutral-badge,.expense-excluded,.finance-pill,.rest-status-disabled) { background:var(--surface-soft); color:var(--muted); border-color:var(--line); }
[data-theme] :is(.expense-alert,.finance-notice,.crm-notice,.auth-message) { background:var(--green-soft); color:var(--green-dark); border-color:var(--accent-line); }
[data-theme] :is(.rest-status,.rest-status-success,.finance-pill.posted) { background:var(--positive-bg); color:var(--positive); }
[data-theme] :is(.expense-alert.error,.finance-notice.is-error,.crm-notice.is-error,.auth-error,.rest-status-error,.rest-status-storage_unavailable,.finance-pill.cancelled,.finance-pill.rejected,.mapping-counter.has-missing) { background:var(--danger-bg); color:var(--danger); border-color:var(--danger-line); }
[data-theme] :is(.finance-import-status.error,.product-save-bar .error,.rest-delete summary,.finance-danger-button) { color:var(--danger); }
[data-theme] .finance-danger-button { border-color:var(--danger-line); }
[data-theme] :is(.finance-warning,.crm-warning,.ui-warning,.salary-warning,.pnl-inline-warning,.pnl-validation.has-issues,.expense-issue-badge,.product-grid .product-missing) { background:var(--warning-bg); color:var(--warning); border-color:var(--warning-line); }
[data-theme] :is(.cw-warning,.expense-issue-reasons,.pnl-validation.has-issues .pnl-validation-icon,.expense-dialog [role=status]) { color:var(--warning); }
[data-theme] .expense-table tr.mapping-missing>:is(th,td) { background:var(--danger-bg); }
[data-theme] :is(.mapping-missing select,.mapping-missing th) { border-color:var(--danger-line); }
[data-theme] .expense-table tr.expense-data-issue>td { background:var(--warning-bg); border-left-color:var(--warning-line); }
[data-theme] .expense-table tr.expense-data-note>td { background:var(--info-bg); border-left-color:var(--accent-line); }
[data-theme] .expense-data-note :is(.expense-issue-badge,.expense-issue-reasons) { color:var(--info); }
[data-theme] .expense-data-note .expense-issue-badge { background:var(--info-bg); }
[data-theme] .pnl-report .department-total>:is(th,td) { background:var(--section-bg); color:var(--section-ink); border-bottom-color:var(--accent-line); padding-block:calc(var(--table-y) + 7px); }
[data-theme] .pnl-report .department-total>th { box-shadow:inset 4px 0 var(--green); }
[data-theme] .pnl-report .department-total :is(.expense-cell-note,.pnl-income-percent) { color:var(--section-ink); }
[data-theme] .pnl-department-group+.pnl-department-group .department-total>* { border-top-color:var(--bg); }
[data-theme] .pnl-department-group>tr:last-child>* { border-bottom-color:var(--accent-line); }
[data-theme] .pnl-report :is(.income-department-table,.pnl-profit-table) :is(.pnl-month-heading,.pnl-month-amount,.department-product td) { border-left-color:var(--accent-line); }
[data-theme] .pnl-report :is(.income-department-table,.pnl-profit-table) .pnl-income-percent { color:var(--muted); }
[data-theme] .pnl-report .department-product th { color:var(--green-dark); }
[data-theme] .department-influence { background:var(--info-bg); }
[data-theme] .department-influence th { color:var(--info); }
[data-theme] .category-subcategory th { border-color:var(--accent-line); }
[data-theme] .pnl-profit-table .pnl-profit-total :is(th,td) { background:var(--positive-bg); color:var(--positive); border-top-color:var(--positive-line); }
[data-theme] .forecast-row>:is(th,td) { background:var(--surface-soft); }
[data-theme] .pnl-report .forecast-actual>:is(th,td) { background:var(--surface); }
[data-theme] .pnl-report .forecast-row .forecast-negative { background:var(--danger-bg); color:var(--danger); }
[data-theme] .pnl-report .forecast-row .forecast-positive { background:var(--positive-bg); color:var(--positive); }
[data-theme] .pnl-department-group [data-forecast-row=profit]>:is(th,td) { border-top-color:var(--accent-line); }
[data-theme] .income-panel .expense-table tfoot { background:var(--section-bg); }
[data-theme] :is(.pnl-report .department-table,.finance-grid-scroll,.expense-dialog,.crm-import-fields-scroll) thead th { background:var(--surface-soft); }
[data-theme] :is(.auth-form input:not([type=hidden]),.date-picker-header>select,.date-picker-header>input) { background:var(--surface); color:var(--ink); border-color:var(--border-strong); }
[data-theme] .auth-body { background:var(--bg); }
[data-theme] .finance-filter-options>summary, [data-theme] .finance-filter-icon { color:var(--green-dark); }
[data-theme] .finance-field-choice:hover, [data-theme] .finance-filter-icon:hover { background:var(--hover); }
[data-theme] :is(.finance-field-choice,.rest-summary,.product-save-bar) { border-color:var(--line); }
[data-theme] .rest-summary { background:var(--line); }
[data-theme] .expense-table-scroll, [data-theme] .crm-table-scroll { scrollbar-color:var(--border-strong) var(--surface-soft); }
[data-theme] input[type=checkbox], [data-theme] input[type=radio], [data-theme] progress { accent-color:var(--green); }
[data-theme] .calculation-month:has(input:checked) { background:var(--green-soft); border-color:var(--accent-line); }
[data-theme] .expense-upload input[type=file] { background:var(--surface-soft); border-color:var(--border-strong); }
[data-theme] .expense-upload input::file-selector-button { background:var(--green-soft); color:var(--green-dark); }
[data-theme] .date-picker-popup { background:var(--surface); color:var(--ink); border-color:var(--border-strong); }
[data-theme] .date-picker-popup button:hover, [data-theme] .date-picker-trigger:hover { background:var(--hover); }
[data-theme] .date-picker-trigger, [data-theme] .date-picker-footer>button { color:var(--green); }
[data-theme] .date-picker-weekday { color:var(--muted); }
[data-theme] .date-picker-popup .date-picker-weekend { color:var(--danger); }
[data-theme] .date-picker-popup [aria-current=date] { box-shadow:inset 0 0 0 1px var(--green); }
[data-theme] .date-picker-popup [aria-pressed=true] { background:var(--green); color:var(--on-accent); }
[data-theme] .date-picker-footer { border-color:var(--line); }
[data-theme] :is(.archive-banner,.git-caption,.privacy-note) { background:var(--surface-soft); color:var(--muted); border-color:var(--line); }
[data-theme] :is(.archive-card-icon,.large-icon,.release-marker,.current-label,.empty-icon,.step-icon,.git-caption code) { background:var(--green-soft); color:var(--green-dark); border-color:var(--accent-line); }
[data-theme] .archive-card:hover { background:var(--hover); border-color:var(--accent-line); }
[data-theme] :is(.archive-banner a,.release-version,.rule-item>.icon,.check-list .icon) { color:var(--green); }
[data-theme] :is(.privacy-note p,.release-meta time,.details-chevron,.decision-list dt,.decision-list dd,.release-outcomes h4,.check-list li,.section-heading p,.empty-caption,.step-card p,.step-status,.context-note,.context-note p) { color:var(--muted); }
[data-theme] .release-title { color:var(--ink); }
[data-theme] :is(a,button,input,select,textarea,summary,[tabindex]):focus-visible { outline-color:var(--green); }
[data-theme] .pnl-report>.expense-muted { margin-top:12px; padding-inline:var(--space-panel); }
[data-theme] .pnl-report>p.ui-section-intro { padding:12px var(--space-panel) 0; }
[data-theme] :is(.eyebrow,.page-footer,.auth-footnote,.password-toggle,.auth-form small,.main-content small),
[data-theme] .pnl-report .department-total .expense-cell-note { font-size:12px; }
/* Geometry makes each variant useful for a different reading task. */
[data-theme=analyst] .main-nav { gap:2px; }
[data-theme=analyst] .nav-link { min-height:38px; padding-block:7px; border-radius:3px; }
[data-theme=analyst] .topbar { height:58px; padding-inline:28px; }
[data-theme=analyst] :is(.ui-tabs,.settings-tabs,.finance-tabs,.crm-tabs)>a { border-radius:0; border-width:0 0 3px; }
[data-theme=analyst] :is(.ui-tabs,.settings-tabs,.finance-tabs,.crm-tabs)>a:is(.is-active,[aria-current=page]) { border-bottom-color:var(--green); background:var(--surface); }
[data-theme=analyst] .pnl-report .department-total>:is(th,td) { padding-block:12px; }
[data-theme=analyst] .pnl-department-group+.pnl-department-group .department-total>* { border-top-width:10px; }
[data-theme=executive] .page-heading { padding-bottom:22px; border-bottom:1px solid var(--line); }
[data-theme=executive] .pnl-department-group+.pnl-department-group .department-total>* { border-top-width:26px; }
[data-theme=executive] .pnl-department-name { font-size:17px; }
[data-theme=executive] .expense-metric>strong { font-size:30px; }
[data-theme=contrast] :is(.expense-panel,.crm-panel,.auth-card,.account-card,.project-dialog) { border:1px solid var(--border-strong); }
[data-theme=contrast] :is(.expense-table,.crm-table) thead th { font-size:13px; color:var(--ink); border-bottom:2px solid var(--border-strong); }
[data-theme=contrast] .nav-link.is-active { border:2px solid var(--green); }
[data-theme=contrast] .expense-cell-note, [data-theme=contrast] .cw-code { color:var(--muted); }
[data-theme=contrast] :is(a,button,input,select,textarea,summary,[tabindex]):focus-visible { outline-width:3px; }
@media (max-width:900px) {
  html[data-theme] { --page-gutter:24px; }
}
@media (max-width:640px) {
  html[data-theme] { --page-gutter:16px; --space-panel:16px; --page-title:25px; --table-y:12px; --table-x:12px; --control-height:42px; }
  [data-theme] .main-nav .nav-link { min-height:42px; padding:8px 12px; }
  [data-theme] .topbar { min-height:48px; height:auto; padding-inline:16px; }
  [data-theme] .auth-card h1 { font-size:25px; }
  [data-theme=executive] .page-heading { padding-bottom:16px; }
  [data-theme=executive] .pnl-department-name { font-size:14px; }
  [data-theme=analyst] :is(.expense-table,.crm-table) :is(th,td) { padding-block:10px; }
}
@media (prefers-reduced-motion:reduce) {
  [data-theme] *, [data-theme] *::before, [data-theme] *::after { scroll-behavior:auto; transition:none; animation:none; }
}
/* A real, keyboard-operable gallery rather than screenshots or external assets. */
.appearance-panel { overflow:visible; }
.appearance-panel>.expense-alert { margin:0 var(--space-panel) 20px; }
.appearance-form { padding:0 var(--space-panel); }
.appearance-group { min-width:0; margin:0 0 28px; padding:0; border:0; }
.appearance-group legend { font-size:17px; font-weight:650; padding:0; margin-bottom:8px; }
.appearance-group-description { font-size:13px; margin:0 0 18px; line-height:1.6; }
.appearance-options { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,280px),1fr)); gap:16px; }
.appearance-option { position:relative; min-width:0; display:flex; flex-direction:column; border:1px solid var(--border-strong); border-radius:var(--radius); background:var(--surface); padding:16px; }
.appearance-option:hover { border-color:var(--green); }
.appearance-option.is-selected { border-color:var(--green); box-shadow:0 0 0 1px var(--green); }
.appearance-choice { position:absolute; top:19px; left:16px; margin:0; width:18px; height:18px; }
.appearance-option-body { display:flex; flex-direction:column; padding-left:30px; cursor:pointer; flex:1; }
.appearance-option-heading { display:flex; flex-wrap:wrap; align-items:center; gap:6px 10px; }
.appearance-option-title { font-size:15px; color:var(--ink); }
.appearance-saved { font-size:12px; font-weight:500; color:var(--green-dark); padding:2px 6px; border-radius:4px; background:var(--green-soft); }
.appearance-option-description { font-size:12px; color:var(--muted); margin:8px 0; line-height:1.6; }
.appearance-selection { font-size:12px; min-height:17px; color:var(--green); }
.appearance-preview { isolation:isolate; overflow:hidden; display:flex; min-height:170px; margin:14px 0; border:1px solid var(--line); border-radius:6px; background:var(--bg); color:var(--ink); font-family:var(--theme-font); font-size:9px; }
.appearance-preview-nav { display:flex; flex-direction:column; flex:0 0 48px; padding:12px 5px; gap:9px; background:var(--sidebar); border-right:1px solid var(--nav-line); color:var(--nav-ink); font-size:7px; }
.appearance-preview-nav strong { font-size:12px; color:var(--nav-heading); margin-bottom:8px; }
.appearance-preview-nav>span:first-of-type { background:var(--nav-active-bg); color:var(--nav-active-ink); padding:4px 2px; border-radius:3px; }
.appearance-preview-content { flex:1; min-width:0; padding:12px 9px; }
.appearance-preview-content>strong { display:block; font-size:10px; color:var(--ink); }
.appearance-preview-period { display:block; margin:4px 0 8px; color:var(--muted); }
.appearance-preview-table { width:100%; border-collapse:collapse; background:var(--surface); font-size:8px; line-height:1.5; font-variant-numeric:tabular-nums; }
.appearance-preview-caption { caption-side:bottom; font-size:8px; text-align:left; color:var(--muted); padding-top:8px; }
.appearance-preview-table :is(th,td) { padding:6px 4px; border-bottom:1px solid var(--line); text-align:left; font-weight:400; }
.appearance-preview-table thead { background:var(--section-bg); color:var(--section-ink); }
.appearance-preview-table :is(th,td):last-child { text-align:right; white-space:nowrap; }
.appearance-preview-total { background:var(--positive-bg); color:var(--positive); }
.appearance-preview-total>* { font-weight:650!important; }
.appearance-preview[data-preview-theme=analyst] :is(th,td) { padding-block:3px; }
.appearance-preview[data-preview-theme=executive] .appearance-preview-content { padding-top:16px; }
.appearance-preview[data-preview-theme=executive] :is(th,td) { padding-block:8px; }
.appearance-preview[data-preview-theme=contrast] :is(th,td) { border-color:var(--border-strong); }
.appearance-preview-button { align-self:flex-start; }
.appearance-manager { padding-top:24px; border-top:1px solid var(--line); }
.appearance-manager legend { float:left; width:100%; margin-bottom:8px; }
.appearance-manager>p { clear:both; }
.appearance-manager-controls { display:flex; align-items:flex-end; flex-wrap:wrap; gap:12px; margin:16px 0 10px; }
.appearance-manager-controls label { display:grid; gap:6px; min-width:0; width:min(100%,300px); font-size:13px; }
.appearance-personal-toggle,.appearance-inherit { display:flex; align-items:center; gap:10px; font-size:13px; min-height:44px; cursor:pointer; }
.appearance-personal-toggle { margin-top:12px; }
.appearance-inherit { margin:0 0 18px; padding:12px; background:var(--surface-soft); border:1px solid var(--line); border-radius:var(--control-radius); }
.appearance-personal-toggle input,.appearance-inherit input { width:18px; height:18px; flex:none; }
.appearance-save-bar { border-top:1px solid var(--line); padding:20px 0; display:flex; gap:16px; align-items:center; flex-wrap:wrap; }
.appearance-unsaved { font-size:13px; color:var(--warning); }
.appearance-preview-feedback { position:sticky; bottom:0; z-index:10; display:flex; gap:12px; align-items:center; justify-content:space-between; padding:14px var(--space-panel); background:var(--surface); border-block:2px solid var(--green); box-shadow:0 -6px 20px #00000012; border-radius:0 0 var(--radius) var(--radius); }
.appearance-preview-status { font-size:13px; color:var(--ink); }
.appearance-preview-feedback button { flex-shrink:0; }
@media(min-width:1600px) { .appearance-options { grid-template-columns:repeat(3,minmax(0,1fr)); } }
@media(max-width:640px) {
  .appearance-options { grid-template-columns:minmax(0,1fr); }
  .appearance-preview-feedback { flex-direction:column; align-items:stretch; gap:8px; padding:10px 16px; position:static; }
  .appearance-preview { min-height:190px; }
  .appearance-preview-content { padding:14px; }
  .appearance-preview-table { font-size:9px; }
  .appearance-save-bar>.button { width:100%; }
}
