/* Additional palettes inherit the original light/dark compatibility styles.
   No navigation relocation, no zoom, no changes to stored table sizes. */
.settings-interface-row .settings-segment{flex-wrap:wrap}

/* Sheets-inspired working surface: Arial, neutral grid and restrained green. */
html[data-appearance=sheets],html[data-appearance=sheets] body{
 --bg:#f8fafd;--sidebar:#fff;--panel:#fff;--panel2:#f1f3f4;--line:#dadce0;
 --text:#202124;--muted:#5f6368;--soft:#3c4043;--purple:#137333;--coral:#137333;--coral-dark:#0d652d;
 --primary:#188038;--primary-text:#fff;--accent-bg:#e6f4ea;--accent-text:#137333;--input:#fff;--hover:#f1f3f4;
 --table-head:#f1f3f4;--row-alt:#fff;--detail:#f8f9fa;--today-head:#137333;--today-cell:#e6f4ea;
 --green:#137333;--red:#b3261e;--positive-bg:#e6f4ea;--negative-bg:#fce8e6;
 --warning-bg:#fef7e0;--warning-line:#e5c36f;--warning-text:#714b00;--danger-bg:#fce8e6;--danger-text:#b3261e;
 --shadow:0 2px 8px #3c404326;--focus:#188038;--placeholder:#687076;
}
html[data-appearance=sheets] body,html[data-appearance=sheets] :is(button,input,select,textarea){font-family:Arial,Helvetica,sans-serif}
html[data-appearance=sheets] body{font-size:13px}
html[data-appearance=sheets] .app-topbar{box-shadow:none;border-bottom:1px solid #dadce0}
html[data-appearance=sheets] .brand-mark{background:#188038;border-radius:5px;box-shadow:none}
html[data-appearance=sheets] .brand small{background:#e6f4ea;color:#137333}
html[data-appearance=sheets] .nav-btn{font-size:13px;border-radius:4px;letter-spacing:normal}
html[data-appearance=sheets] .nav-btn.active{background:#e6f4ea;color:#137333;box-shadow:inset 0 -2px #188038}
html[data-appearance=sheets] .content{padding:18px 20px}
html[data-appearance=sheets][data-density=compact] .content{padding:12px 14px}
html[data-appearance=sheets] :is(.heading-row h1,.forecast-heading h1,.db-heading h1,.rnp-topline h1,.fact-controls h1){font-size:22px;font-weight:400;letter-spacing:normal}
html[data-appearance=sheets] :is(.btn,.field input,.field select){font-size:13px;border-radius:4px;box-shadow:none}
html[data-appearance=sheets] :is(.table-panel,.rnp-panel,.forecast-scroll,.common-panel,.fact-info){border-radius:3px;box-shadow:none}
html[data-appearance=sheets] :is(.section-card,.kpi,.rnp-kpi,.db-card,.forecast-cards,.forecast-season){border-radius:6px;box-shadow:none}
html[data-appearance=sheets] .db-dashboard .db-card{background:#fff;border-color:#dadce0;box-shadow:none}
html[data-appearance=sheets] .db-dashboard .db-card.db-highlight{background:#e6f4ea;border-color:#b7d8c0}
html[data-appearance=sheets] .db-dashboard .db-card strong{font-family:Arial,Helvetica,sans-serif;font-weight:400;letter-spacing:normal}
html[data-appearance=sheets] .rnp-dashboard .rnp-kpi{background:#fff;border-color:#dadce0;--accent:#188038;box-shadow:none}
html[data-appearance=sheets] .rnp-kpi-qty .rnp-plot-bar{fill:#188038}
html[data-appearance=sheets] :is(.table-toolbar,.rnp-toolbar){background:#f8f9fa}
html[data-appearance=sheets] :is(.unit-table,.fact-table,.rnp-table,.forecast-table){font-family:Arial,Helvetica,sans-serif;font-size:13px}
html[data-appearance=sheets] :is(.unit-table,.fact-table,.rnp-table,.forecast-table) :is(th,td){border-right:1px solid #dadce0;border-bottom:1px solid #dadce0;letter-spacing:normal}
html[data-appearance=sheets] :is(.unit-table,.fact-table,.rnp-table,.forecast-table) thead th{font-size:12px;font-weight:500;text-transform:none;background:#f1f3f4;color:#3c4043}
html[data-appearance=sheets] .unit-table.unit-adjustable .product-row>td{font-size:13px;line-height:18px}
html[data-appearance=sheets] .fact-table tbody td{font-size:13px}
html[data-appearance=sheets] .rnp-panel .rnp-table tbody :is(th,td){font-size:13px}
html[data-appearance=sheets] .forecast-page .forecast-table :is(th,td){font-size:13px}
html[data-appearance=sheets] .forecast-page .forecast-table thead th{font-size:12px}
html[data-appearance=sheets] .forecast-page .forecast-table input{border-radius:2px;font-size:13px}
html[data-appearance=sheets] :is(.unit-table,.fact-table,.rnp-table,.forecast-table) :is(input,button):focus-visible{outline:2px solid #188038;outline-offset:-2px}
html[data-appearance=sheets] :is(.rnp-dynamics-check,.fact-comparison-label input){border-color:#7d8580;background:#fff}
html[data-appearance=sheets] :is(.rnp-dynamics-check,.fact-comparison-label input):checked{border-color:#188038;background:#e6f4ea}
html[data-appearance=sheets] :is(.rnp-dynamics-check,.fact-comparison-label input):checked::after{border-color:#137333}
html[data-appearance=sheets] .dialog{border-radius:8px;box-shadow:0 8px 24px #3c404340}
html[data-appearance=sheets] .unit-table.unit-adjustable .column-tools .expense-detail-toggle{background:#188038;border-color:#188038;box-shadow:none;border-radius:3px}
html[data-appearance=sheets] :is(.table-scroll,.unit-scroll-row,.fact-scroll,.rnp-scroll,.forecast-scroll){scrollbar-color:#9aa0a6 #f1f3f4}
html[data-appearance=sheets] .unit-header-scroll{scrollbar-color:#9aa0a6 #f1f3f4}
html[data-appearance=sheets] .rnp-panel{--rnp-day-band:#f8f9fa;--accent:#188038}
html[data-appearance=sheets] .rnp-panel .rnp-table thead .rnp-day.rnp-today{background:#137333;color:#fff;box-shadow:none}
html[data-appearance=sheets] .rnp-panel .rnp-table .rnp-day.rnp-today .rnp-day-summary small{color:#fff}
html[data-appearance=sheets] .rnp-panel .rnp-table .rnp-today-cell,
html[data-appearance=sheets] .rnp-panel .rnp-table thead .rnp-metric-header.rnp-today-cell{background:#e6f4ea}
html[data-appearance=sheets] .rnp-panel .rnp-table tbody tr:hover .rnp-today-cell{background:#d7eddf}
html[data-appearance=sheets] .rnp-panel .rnp-total .rnp-today-cell{background:#d7eddf!important}
html[data-appearance=sheets] .rnp-orders-controls{background:#0d652d}
html[data-appearance=sheets] .rnp-panel .rnp-dynamics-check{background:#fff;border-color:#7d8580}
html[data-appearance=sheets] .rnp-panel .rnp-dynamics-check:checked{background:#e6f4ea;border-color:#188038}
html[data-appearance=sheets] .rnp-kpi-rub .rnp-plot-bar{fill:#34a853}
html[data-appearance=sheets] body:has(.rnp-topline) .btn.primary{background:#188038;border-color:#188038}
/* Unit Fact: visible expansion depth affects headers only; parents keep their level. */
html[data-appearance=sheets] .fact-table thead{--fact-header-bg:#244c3c;--fact-header-ink:#fff;--fact-header-line:#527562;--fact-header-hover:#3b6655}
html[data-appearance=sheets] .fact-table thead th,
html[data-appearance=sheets] .fact-table thead th.fact-detail,
html[data-appearance=sheets] .fact-table thead th.fact-day{--soft:var(--fact-header-ink);--muted:var(--fact-header-ink);--coral:var(--fact-header-ink);--line:var(--fact-header-line);--accent-bg:var(--fact-header-hover);--accent-text:var(--fact-header-ink);--hover:var(--fact-header-hover);--focus:var(--fact-header-ink);background:var(--fact-header-bg);color:var(--fact-header-ink);border-color:var(--fact-header-line)}
html[data-appearance=sheets] .fact-table thead th[data-fact-depth="1"]{--fact-header-bg:#52745f;--fact-header-line:#81998b;--fact-header-hover:#456650}
html[data-appearance=sheets] .fact-table thead th[data-fact-depth="2"]{--fact-header-bg:#d5e5db;--fact-header-ink:#173d2b;--fact-header-line:#8fa99a;--fact-header-hover:#c4d9cc}
html[data-appearance=sheets] .fact-table thead th[data-fact-depth="3"]{--fact-header-bg:#edf5f0;--fact-header-ink:#173d2b;--fact-header-line:#9cb4a6;--fact-header-hover:#d8e9de}
html[data-appearance=sheets] .fact-table thead .column-close{color:var(--fact-header-ink);opacity:1}
html[data-appearance=sheets] .fact-table thead .column-close:hover{background:var(--fact-header-hover)}
html[data-appearance=sheets] .fact-table thead .column-close:disabled{opacity:.35}
html[data-appearance=sheets] .fact-table thead .fact-column-tools button:hover,
html[data-appearance=sheets] .fact-table thead .fact-column-tools button.active{background:var(--fact-header-hover);border-radius:3px}
html[data-appearance=sheets] .fact-table thead .fact-column-tools button.active{box-shadow:inset 0 0 0 1px var(--fact-header-ink)}
html[data-appearance=sheets] .fact-table thead .fact-comparison-label input{background:transparent;border-color:var(--fact-header-ink)}
html[data-appearance=sheets] .fact-table thead .fact-comparison-label input:checked{background:var(--fact-header-ink);border-color:var(--fact-header-ink)}
html[data-appearance=sheets] .fact-table thead .fact-comparison-label input:checked::after{border-color:var(--fact-header-bg)}
html[data-appearance=sheets] .fact-table thead :is(button,input):focus-visible{outline-color:var(--fact-header-ink)}
@media(max-width:650px){
 html[data-appearance=sheets] .content{padding:12px 10px}
 .settings-interface-row .settings-segment{max-width:100%}
 .settings-interface-row:has(.theme-choice){grid-template-columns:1fr;gap:8px}
 .settings-interface-row .settings-segment:has(.theme-choice){display:grid;grid-template-columns:repeat(2,minmax(0,1fr));width:100%}
 .settings-interface-row .settings-segment .theme-choice{width:100%;min-width:0;min-height:40px;white-space:nowrap;border:1px solid var(--line)}
}
