/* ESEP: светлая тема — прежние цвета (решение Жанны 24.11.2026: старая светлая тема нравится больше). Включается автоматически (по системе) или кнопкой 🌓 в шапке. */
:root[data-theme="light"]{--bg:#ffffff;--bg-2:#f7f5fb;--bg-3:#f0ecf7;--line:#e2dcec;--line-strong:#b9afcc;--fg:#1f1b2c;--muted:#5f5872;--violet:#6a48b3;--green:#13906a;--accent:#8360c3;--on-accent:#ffffff;--accent-text:#13906a;--warn:#e8590c;--bad:#c23b4a;color-scheme:light}
@media (prefers-color-scheme: light){
  :root:not([data-theme="dark"]){--bg:#ffffff;--bg-2:#f7f5fb;--bg-3:#f0ecf7;--line:#e2dcec;--line-strong:#b9afcc;--fg:#1f1b2c;--muted:#5f5872;--violet:#6a48b3;--green:#13906a;--accent:#8360c3;--on-accent:#ffffff;--accent-text:#13906a;--warn:#e8590c;--bad:#c23b4a;color-scheme:light}
  :root:not([data-theme="dark"]) .trep .b4{color:#b71c1c}:root:not([data-theme="dark"]) .trep .b3{color:#d35400}:root:not([data-theme="dark"]) .trep .b2{color:#9a7300}:root:not([data-theme="dark"]) .trep .b1{color:#1565c0}:root:not([data-theme="dark"]) .trep .b0{color:#757575}
  :root:not([data-theme="dark"]) body .flatpickr-calendar{box-shadow:0 12px 32px rgba(40,20,80,.15)}
}
:root[data-theme="light"] .trep .b4{color:#b71c1c}:root[data-theme="light"] .trep .b3{color:#d35400}:root[data-theme="light"] .trep .b2{color:#9a7300}:root[data-theme="light"] .trep .b1{color:#1565c0}:root[data-theme="light"] .trep .b0{color:#757575}
:root[data-theme="light"] body .flatpickr-calendar{box-shadow:0 12px 32px rgba(40,20,80,.15)}
.theme-btn{display:inline-grid;place-items:center;width:38px;height:38px;padding:0;border-radius:999px;border:0;background:transparent;color:var(--fg);cursor:pointer;flex:none}
.theme-btn:hover,.theme-btn[aria-expanded="true"]{background:color-mix(in srgb,var(--fg) 10%,transparent)}
.theme-btn svg,.theme-menu svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.theme-menu{position:fixed;z-index:1000;min-width:230px;padding:8px 0;background:var(--bg-2);color:var(--fg);border:1px solid var(--line);border-radius:12px;box-shadow:0 8px 28px rgba(0,0,0,.28);font:14px/1.3 var(--body,system-ui,sans-serif)}
.theme-menu .tm-title{padding:6px 16px 8px;font-size:12px;font-weight:600;color:var(--muted);text-transform:uppercase;letter-spacing:.06em}
.theme-menu button{display:flex;align-items:center;gap:12px;width:100%;padding:10px 16px;border:0;background:transparent;color:inherit;font:inherit;text-align:left;cursor:pointer}
.theme-menu button:hover,.theme-menu button:focus-visible{background:color-mix(in srgb,var(--fg) 8%,transparent);outline:none}
.theme-menu .tm-ic{display:inline-grid;color:var(--muted)}
.theme-menu .tm-ok{margin-left:auto;color:var(--green);font-weight:700;visibility:hidden}
.theme-menu [aria-checked="true"] .tm-ok{visibility:visible}
.theme-menu [aria-checked="true"] .tm-ic{color:var(--green)}

/* кнопка «Наверх» */
.to-top{position:fixed;right:calc(18px + env(safe-area-inset-right,0px));bottom:calc(22px + env(safe-area-inset-bottom,0px));z-index:900;width:44px;height:44px;border-radius:999px;border:1px solid var(--line);background:var(--bg-2);color:var(--fg);display:grid;place-items:center;cursor:pointer;box-shadow:0 6px 18px rgba(0,0,0,.28);opacity:0;transform:translateY(10px);pointer-events:none;transition:opacity .2s,transform .2s}
.to-top.show{opacity:1;transform:none;pointer-events:auto}.to-top:hover{border-color:var(--fg)}
.to-top svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}
body:has(.wa-float) .to-top{bottom:96px;right:28px}
@media print{.to-top{display:none}}

/* светлая тема кабинета: главная кнопка и выбранные отметки с фирменным градиентом, как было до 24.11.2026 */
html:root[data-theme="light"] .btn:not(.ghost):not(.btn-ghost),html:root[data-theme="light"] .fg-chip[aria-pressed="true"],html:root[data-theme="light"] .nbadge,html:root[data-theme="light"] .early,html:root[data-theme="light"] body .flatpickr-day.selected{background:linear-gradient(90deg,#8360c3,#2ebf91);color:#fff;border-color:transparent}
@media (prefers-color-scheme: light){html:root:not([data-theme="dark"]) .btn:not(.ghost):not(.btn-ghost),html:root:not([data-theme="dark"]) .fg-chip[aria-pressed="true"],html:root:not([data-theme="dark"]) .nbadge,html:root:not([data-theme="dark"]) .early,html:root:not([data-theme="dark"]) body .flatpickr-day.selected{background:linear-gradient(90deg,#8360c3,#2ebf91);color:#fff;border-color:transparent}}
html:root[data-theme="light"] .btn:not(.ghost):not(.btn-ghost):not(:disabled):hover{filter:brightness(1.06)}
@media (prefers-color-scheme: light){html:root:not([data-theme="dark"]) .btn:not(.ghost):not(.btn-ghost):not(:disabled):hover{filter:brightness(1.06)}}
