/* Reference-inspired palettes. Original business values and geometry are never animated. */
body[data-theme=ruby]{--bg:#0c0d14;--surface:#17121c;--surface2:#29151d;--control:#35141d;--ink:#fff1f3;--subtle:#d3aab5;--line:#663041;--edge:#743145;--purple:#ff4b64;--accent2:#a41438;--button-ink:#220610;--series-current:#ff516a;--series-base:#ffc374;--series-month-current:#ff9c63;--series-month-base:#bda6ff;--halo:#c7223c30}
body[data-theme=hyper]{--bg:#090c0e;--surface:#0f171a;--surface2:#162326;--control:#15302d;--ink:#edfff9;--subtle:#a2c7bc;--line:#28514c;--edge:#345e57;--purple:#66f5a3;--accent2:#00b8c0;--button-ink:#042017;--series-current:#41e7d2;--series-base:#b7ff62;--series-month-current:#ffdb62;--series-month-base:#c195ff;--halo:#15d9a625}
body[data-theme=forest]{--bg:#03140c;--surface:#092a1b;--surface2:#113d27;--control:#174c2f;--ink:#f0fff1;--subtle:#afcdb0;--line:#366e45;--edge:#427950;--purple:#a9e574;--accent2:#248a54;--button-ink:#102311;--series-current:#b2ee80;--series-base:#ffb274;--series-month-current:#5ce0c5;--series-month-base:#f0cc78;--halo:#4eac2429}
body[data-theme=plum]{--bg:#170c23;--surface:#25112e;--surface2:#421b3d;--control:#592047;--ink:#fff1fb;--subtle:#d2b0d0;--line:#76466f;--edge:#8b4f7a;--purple:#ffa3cf;--accent2:#ab3f7a;--button-ink:#32102b;--series-current:#ff8dc5;--series-base:#87c6ff;--series-month-current:#c6a1ff;--series-month-base:#ffce8a;--halo:#d551922e}
body[data-theme=volt]{--bg:#10110a;--surface:#1a1c10;--surface2:#292d14;--control:#383e16;--ink:#fcffe8;--subtle:#c7cc9e;--line:#626d2c;--edge:#7a8237;--purple:#effa40;--accent2:#8b9f00;--button-ink:#242900;--series-current:#effa40;--series-base:#70d9b1;--series-month-current:#fdb75a;--series-month-base:#b7a7ff;--halo:#dbe90024}
body:is([data-theme=ruby],[data-theme=hyper],[data-theme=forest],[data-theme=plum],[data-theme=volt]){--panel:var(--surface);--panel2:var(--surface2);--text:var(--ink);--muted:var(--subtle);--soft-head:var(--surface2);--orange:var(--purple);--gold:var(--purple);--positive:#82e2b8;--negative:#ff9eaa;color-scheme:dark;color:var(--ink);background:radial-gradient(ellipse at 92% 0,var(--halo),transparent 60%),var(--bg)}
body{--series-month-current:#ffad4d;--series-month-base:#b396ff;--store-0:#22c9ef;--store-1:#37d3a5;--store-2:#bb92ff;--store-3:#e5c469;--store-4:#fb7cb3;--store-5:#85c6ff;--store-6:#74aaa1}
body[data-theme=ruby]{--store-0:#ff7289;--store-1:#ffc279;--store-2:#c5a1ff;--store-3:#e8d98b;--store-4:#fa9fc9;--store-5:#8edce5}
body[data-theme=hyper]{--store-0:#4de4e6;--store-1:#7af79c;--store-2:#c5a0ff;--store-3:#f5dc6c;--store-4:#ff91c6;--store-5:#86c8ff}
body[data-theme=forest]{--store-0:#a9e57c;--store-1:#57d7ae;--store-2:#f4be6d;--store-3:#cdb4fb;--store-4:#f99fac;--store-5:#9bd8ee}
body[data-theme=plum]{--store-0:#ff9cce;--store-1:#8fceff;--store-2:#c9a9ff;--store-3:#f7c97c;--store-4:#ffb6aa;--store-5:#92e1d5}
body[data-theme=volt]{--store-0:#eefa55;--store-1:#76dcb8;--store-2:#f5c969;--store-3:#b4b4ff;--store-4:#f99ec4;--store-5:#9ed8ff}
body:is([data-theme=ruby],[data-theme=hyper],[data-theme=forest],[data-theme=plum],[data-theme=volt]) :is(.panel,.kpi,.friday-kpi,.supplier-kpis article,.matrix-table-panel,.orders-main .panel){background:linear-gradient(135deg,var(--surface2),var(--surface));border-color:var(--edge);color:var(--ink);box-shadow:0 6px 22px #0003,inset 0 1px #ffffff07}
body:is([data-theme=ruby],[data-theme=hyper],[data-theme=forest],[data-theme=plum],[data-theme=volt]) :is(.sidebar,.page-head,.order-sub-popup,.order-receiver-menu,.dropdown,dialog,.order-document-dialog,#supplierDetail,.charttip,#toast,#orderToast){background:var(--surface);color:var(--ink);border-color:var(--edge)}
body:is([data-theme=ruby],[data-theme=hyper],[data-theme=forest],[data-theme=plum],[data-theme=volt]) :is(button,.quiet,.tabs button,.order-tabs button,summary,select,input,textarea){background:var(--control);color:var(--ink);border-color:var(--edge);text-shadow:none}
body:is([data-theme=ruby],[data-theme=hyper],[data-theme=forest],[data-theme=plum],[data-theme=volt]) :is(.primary,button.active,.tabs button.active,.order-tabs button.active,.friday-calendar button.active){background:linear-gradient(120deg,var(--purple),color-mix(in srgb,var(--purple) 80%,white));color:var(--button-ink);border-color:var(--purple);box-shadow:0 3px 15px var(--halo);font-weight:750}
body:is([data-theme=ruby],[data-theme=hyper],[data-theme=forest],[data-theme=plum],[data-theme=volt]) button:not(:disabled):hover{background:color-mix(in srgb,var(--purple) 24%,var(--surface));color:var(--ink);border-color:var(--purple)}
body:is([data-theme=ruby],[data-theme=hyper],[data-theme=forest],[data-theme=plum],[data-theme=volt]) nav a.active{background:linear-gradient(110deg,var(--control),var(--surface));border-color:var(--purple);box-shadow:inset 3px 0 var(--purple);color:var(--ink)}
body:is([data-theme=ruby],[data-theme=hyper],[data-theme=forest],[data-theme=plum],[data-theme=volt]) nav a:hover{background:var(--surface2);color:var(--ink)}
body:is([data-theme=ruby],[data-theme=hyper],[data-theme=forest],[data-theme=plum],[data-theme=volt]) :is(.kpi-label,.kpi small,.metric-sub,.field label,.context,.source-notes,.source-status,.legend,.table-foot,.margin-note,.side-foot,.hint,.friday-hero p){color:var(--subtle)}
body:is([data-theme=ruby],[data-theme=hyper],[data-theme=forest],[data-theme=plum],[data-theme=volt]) :is(h1,h2,h3,.kpi strong,td){color:var(--ink)}
body:is([data-theme=ruby],[data-theme=hyper],[data-theme=forest],[data-theme=plum],[data-theme=volt]) :is(thead th,th:first-child,td:first-child){background:var(--surface);color:var(--ink);border-color:var(--line)}
body:is([data-theme=ruby],[data-theme=hyper],[data-theme=forest],[data-theme=plum],[data-theme=volt]) tfoot td{background:var(--surface2)!important;color:var(--ink)!important}
body:is([data-theme=ruby],[data-theme=hyper],[data-theme=forest],[data-theme=plum],[data-theme=volt]) tbody tr:hover td{background:var(--surface2)}
body:is([data-theme=ruby],[data-theme=hyper],[data-theme=forest],[data-theme=plum],[data-theme=volt]) :is(.alert-item,.alert-item:nth-child(2),.alert-item:nth-child(3),.pill,.tag,.chip,.avatar,.source-chip,.margin-flow-panel,.people-hero){background:var(--surface2);color:var(--ink);border-color:var(--edge)}
body:is([data-theme=ruby],[data-theme=hyper],[data-theme=forest],[data-theme=plum],[data-theme=volt]) :is(.hero,.friday-hero){background:radial-gradient(ellipse at 85% 30%,var(--halo),transparent 50%),linear-gradient(120deg,var(--surface2),var(--bg));border-color:var(--edge);color:var(--ink)}
body[data-theme=hyper] .panel{background:linear-gradient(150deg,#152022,#080d0f);box-shadow:0 8px 25px #0008}
body[data-theme=forest] .hero{background:repeating-linear-gradient(160deg,transparent 0 22px,#83ca5e09 23px 24px),linear-gradient(120deg,#16492b,#051c10)}
body[data-theme=ruby] .hero{background:linear-gradient(#ff143c08 1px,transparent 1px),linear-gradient(90deg,#ff143c08 1px,transparent 1px),linear-gradient(120deg,#32121e,#10101a);background-size:18px 18px,18px 18px,auto}
body[data-theme=plum] .hero{background:radial-gradient(ellipse at right,#9f275d5c,transparent 65%),linear-gradient(110deg,#28113d,#261024)}
body[data-theme=volt] .hero{background:linear-gradient(120deg,#323711,#10130b);border-top:3px solid #effa40}
/* Tables retain donor/store distinction in all new palettes. */
body:is([data-theme=ruby],[data-theme=hyper],[data-theme=forest],[data-theme=plum],[data-theme=volt]) .matrix-source-head,body:is([data-theme=ruby],[data-theme=hyper],[data-theme=forest],[data-theme=plum],[data-theme=volt]) .matrix-source-cell{background:color-mix(in srgb,#eaa34f 16%,var(--surface));color:#f3c584;border-color:#ad7b42}
body:is([data-theme=ruby],[data-theme=hyper],[data-theme=forest],[data-theme=plum],[data-theme=volt]) .matrix-summary-label{background:var(--surface2)!important;color:var(--ink)!important}
/* Chart colors are live theme tokens, not baked-in pictures. */
.friday-bar-pair i{background:var(--series-current)}.friday-bar-pair i.base{background:var(--series-base)}.friday-hero h1 span,.friday-bag{color:var(--purple)}
.chart svg :is(path[stroke],polyline[stroke]),.margin-compare-svg path[stroke]{filter:drop-shadow(0 0 2px color-mix(in srgb,var(--series-current) 24%,transparent))}
.chart svg circle,.margin-compare-svg circle{filter:drop-shadow(0 0 3px var(--purple))}
.kpi-icon,.nav-people-icon svg,.margin-title-icon{filter:drop-shadow(0 0 3px var(--halo,transparent))}
/* Noticeable GIF-like brand animation preserves the exact UYDA artwork. */
.brand .brand-art{overflow:visible}.brand .brand-mark{animation:uyda-symbol-move 3.2s ease-in-out infinite;transform-origin:18% 65%;will-change:transform}.brand .brand-word{animation:uyda-word-move 3.2s ease-in-out infinite;will-change:transform}.brand .brand-art img{filter:drop-shadow(0 0 5px #ff500036)}
@keyframes uyda-symbol-move{0%,100%{transform:translateY(0) rotate(-3deg)}50%{transform:translateY(-5px) rotate(4deg)}}
@keyframes uyda-word-move{0%,100%{transform:translate(0,0) scale(1)}50%{transform:translate(2px,-4px) scale(1.025)}}
body::before{opacity:.045;animation:uyda-watermark-visible 18s ease-in-out infinite}
body[data-theme=peach]::before{opacity:.032}
@keyframes uyda-watermark-visible{0%,100%{transform:translate(-12px,8px) scale(.97)}50%{transform:translate(12px,-8px) scale(1.025)}}
.margin-hub img{animation:uyda-hub-breathe 4s ease-in-out infinite;will-change:transform}@keyframes uyda-hub-breathe{50%{transform:translateY(-4px) scale(1.06)}}
.margin-flow-lines path:nth-of-type(even){stroke-dasharray:12 3;animation:uyda-flow-dash 6s linear infinite}@keyframes uyda-flow-dash{to{stroke-dashoffset:-60}}
@media(prefers-reduced-motion:reduce){.brand .brand-mark,.brand .brand-word,.margin-hub img,.margin-flow-lines path,body::before{animation:none!important;will-change:auto}}
@media(max-width:720px){[data-uyda-theme]{max-width:126px!important;min-height:32px}.head-right{max-width:200px}.brand .brand-art{width:125px}}
/* Small highlights communicate motion without changing chart values. */
.progress i,.margin-bar i,.friday-bar-pair i{position:relative;overflow:hidden}
.progress i::after,.margin-bar i::after{content:'';position:absolute;inset:0;background:linear-gradient(105deg,transparent 20%,#ffffff38 45%,transparent 65%);transform:translateX(-100%);animation:uyda-bar-shine 6s ease-in-out infinite;pointer-events:none}
@keyframes uyda-bar-shine{0%,30%{transform:translateX(-100%)}70%,100%{transform:translateX(100%)}}
@media(prefers-reduced-motion:reduce){.progress i::after,.margin-bar i::after{animation:none}}
/* Preserve Ocean while making its bright action buttons readable. */
body[data-theme=ocean]{--button-ink:#032331}
body[data-theme=ocean] :is(button.primary,.tabs button.active,.order-tabs button.active){background:#13c8ee;color:#032331;border-color:#48d7f4}
.margin-validation{padding:14px 18px}.margin-validation p{font-size:12px;line-height:1.7;color:var(--muted)}

.sidebar a .zakaz-badge{display:inline-block;min-width:18px;padding:2px 4px;border-radius:5px;background:var(--negative);color:#fff;font-size:10px;margin-left:5px;line-height:1.4;font-style:normal}.sidebar a .zakaz-badge[hidden]{display:none}
