/* Тема «Шоколадная глазурь» — tools/gen-themes.py (18.09) + Р17-параметризация hue (23.09).
   Только переопределения токенов дизайн-системы; логика/вёрстка не трогаются.
   Скоуп html[data-theme] — тот же файл работает и в переключателе тем админки. */
html[data-theme="03-shokolad"] {
  /* Р17 (23.09): hue темы параметризован — «Цвет интерфейса» в настройках
     работает и под темой. --theme-hue переопределяется inline-атрибутом <html>
     из ui_hue пользователя (app.html/store.html) и вживую ползунком (app.js).
     Без переопределения = 22 (исходный шоколад). */
  --theme-hue: 22;
  --mint-bg: hsl(calc(var(--theme-hue) + 8),38%, 91%);
  --mint-bg-dark: hsl(calc(var(--theme-hue) + 8),28%, 84%);
  --mint-surface: hsl(calc(var(--theme-hue) + 8), 100%, 98%);
  --mint-surface-2: hsl(calc(var(--theme-hue) + 8),40%, 96%);
  --mint-primary: hsl(var(--theme-hue),42%, 38%);
  --mint-primary-dark: hsl(var(--theme-hue),48%, 28%);
  --mint-text: hsl(calc(var(--theme-hue) + 2),32%, 17%);
  --mint-muted: hsl(calc(var(--theme-hue) + 4),16%, 40%);
  --mint-border: hsl(calc(var(--theme-hue) + 8),30%, 84%);
  --success-bg: hsl(calc(var(--theme-hue) + 10),55%, 91%);
  /* Статусы в единой шоколадной гамме (21.09): вместо чуждых пастельных
     мятного/голубого/лавандового — тёплые оттенки какао, карамели, корицы. */
  --st-new-bg: hsl(calc(var(--theme-hue) + 8),40%, 89%);      --st-new-fg: hsl(calc(var(--theme-hue) + 2),38%, 32%);
  --st-confirmed-bg: hsl(calc(var(--theme-hue) + 12),45%, 86%); --st-confirmed-fg: hsl(calc(var(--theme-hue) + 4),45%, 28%);
  --st-inwork-bg: hsl(calc(var(--theme-hue) + 4),38%, 84%);   --st-inwork-fg: hsl(var(--theme-hue),40%, 27%);
  --st-ready-bg: hsl(calc(var(--theme-hue) + 14),55%, 85%);    --st-ready-fg: hsl(calc(var(--theme-hue) + 3),55%, 26%);
  --st-cancel-bg: hsl(calc(var(--theme-hue) + 6),14%, 85%);   --st-cancel-fg: hsl(calc(var(--theme-hue) + 4),14%, 36%);
  --st-new-active-bg: hsl(calc(var(--theme-hue) + 8),42%, 80%);      --st-new-active-bd: hsl(calc(var(--theme-hue) + 2),35%, 58%);      --st-new-active-fg: hsl(calc(var(--theme-hue) + 2),42%, 22%);
  --st-confirmed-active-bg: hsl(calc(var(--theme-hue) + 12),48%, 77%); --st-confirmed-active-bd: hsl(calc(var(--theme-hue) + 4),42%, 55%); --st-confirmed-active-fg: hsl(calc(var(--theme-hue) + 4),48%, 20%);
  --st-inwork-active-bg: hsl(calc(var(--theme-hue) + 4),40%, 75%);   --st-inwork-active-bd: hsl(var(--theme-hue),38%, 52%);   --st-inwork-active-fg: hsl(var(--theme-hue),44%, 19%);
  --st-ready-active-bg: hsl(calc(var(--theme-hue) + 14),58%, 76%);    --st-ready-active-bd: hsl(calc(var(--theme-hue) + 3),52%, 54%);    --st-ready-active-fg: hsl(calc(var(--theme-hue) + 3),58%, 19%);
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 6px 22px hsla(calc(var(--theme-hue) + 3), 50%, 24%, 0.18);
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'Nunito', 'DM Sans', system-ui, sans-serif;
}
html[data-theme="03-shokolad"] body {
  background-color: hsl(calc(var(--theme-hue) + 8),38%, 91%);
  /* П4 (19.09): tinted-текстура «листочки» в тоне темы (tools/gen-theme-textures.py)
     + градиентные блики поверх — фон стилизован так же, как базовая тема */
  background-image: linear-gradient(180deg, hsl(calc(var(--theme-hue) + 6),45%,93%) 0%, hsl(calc(var(--theme-hue) + 10),38%,90%) 100%), url('/static/img/bg-03-shokolad-texture.png');
  background-attachment: fixed;
  background-size: auto, cover;
  background-position: center top, center top;
}
html[data-theme="03-shokolad"] .icn { color: hsl(0, 0%, 32%); }
html[data-theme="03-shokolad"] .fab .icn { color: #fff; }
html[data-theme="03-shokolad"] .cart-btn .icn { color: #fff; }
html[data-theme="03-shokolad"] .btn-primary .icn { color: inherit; }
html[data-theme="03-shokolad"] .btn-danger .icn { color: inherit; }
html[data-theme="03-shokolad"] .stepper-btn .icn { color: inherit; }
html[data-theme="03-shokolad"] .cart-step .icn { color: inherit; }
html[data-theme="03-shokolad"] .capacity-stepper .stepper-btn .icn { color: inherit; }
html[data-theme="03-shokolad"] .admin-tab.active .icn { color: #fff; }
html[data-theme="03-shokolad"] .status-chip.active .icn { color: #fff; }
html[data-theme="03-shokolad"] .status-sheet-item.active .icn { color: #fff; }
html[data-theme="03-shokolad"] .chip-x .icn { color: #fff; }
html[data-theme="03-shokolad"] .photo-remove .icn { color: #fff; }
html[data-theme="03-shokolad"] .photo-x .icn { color: #fff; }
html[data-theme="03-shokolad"] .chip:hover .icn { color: #fff; }
html[data-theme="03-shokolad"] .filter-chip.active .icn { color: inherit; }
html[data-theme="03-shokolad"] .stock-group-chevron .icn { color: inherit; }
html[data-theme="03-shokolad"] .btn-primary { box-shadow: 0 4px 14px hsla(var(--theme-hue), 42%, 38%, 0.38); }
html[data-theme="03-shokolad"] .btn-primary.loading::after { border-color: hsla(var(--theme-hue), 42%, 38%, 0.5); border-top-color: #fff; }
html[data-theme="03-shokolad"] input:focus, html[data-theme="03-shokolad"] textarea:focus, html[data-theme="03-shokolad"] select:focus { box-shadow: 0 0 0 3px hsla(var(--theme-hue), 42%, 38%, 0.22); }
html[data-theme="03-shokolad"] .fab { box-shadow: 0 8px 22px hsla(var(--theme-hue), 42%, 38%, 0.5); }
html[data-theme="03-shokolad"] .drawer-item[data-screen="today"] .icn, .tab[data-screen="today"] .tab-icon { background: hsl(9, 55%, 86%); }
html[data-theme="03-shokolad"] .drawer-item[data-screen="orders"] .icn, .tab[data-screen="orders"] .tab-icon, .fab-menu-item[data-action="order"] .icn { background: hsl(45, 55%, 86%); }
html[data-theme="03-shokolad"] .drawer-item[data-screen="store"] .icn, .tab[data-screen="store"] .tab-icon { background: hsl(167, 55%, 86%); }
html[data-theme="03-shokolad"] .drawer-item[data-screen="calendar"] .icn, .tab[data-screen="calendar"] .tab-icon { background: hsl(278, 55%, 86%); }
html[data-theme="03-shokolad"] .drawer-item[data-screen="clients"] .icn, .fab-menu-item[data-action="client"] .icn { background: hsl(57, 55%, 86%); }
html[data-theme="03-shokolad"] .drawer-item[data-screen="calc"] .icn { background: hsl(210, 55%, 86%); }
html[data-theme="03-shokolad"] .drawer-item[data-screen="production"] .icn { background: hsl(243, 55%, 86%); }
html[data-theme="03-shokolad"] .drawer-item[data-screen="shopping"] .icn { background: hsl(74, 55%, 86%); }
html[data-theme="03-shokolad"] .drawer-item[data-screen="finance"] .icn { background: hsl(2, 55%, 86%); }
html[data-theme="03-shokolad"] .drawer-item[data-screen="past"] .icn { background: hsl(294, 55%, 86%); }
html[data-theme="03-shokolad"] .drawer-item[data-screen="help"] .icn { background: hsl(145, 55%, 86%); }
html[data-theme="03-shokolad"] .drawer-item[data-screen="settings"] .icn { background: hsl(10, 55%, 86%); }
html[data-theme="03-shokolad"] .drawer-item[data-screen="subscription"] .icn { background: hsl(66, 55%, 86%); }
html[data-theme="03-shokolad"] .drawer-item[href="/admin"] .icn { background: hsl(284, 55%, 86%); }
html[data-theme="03-shokolad"] .fab-menu-item[data-action="product"] .icn { background: hsl(9, 55%, 86%); }
html[data-theme="03-shokolad"] .drawer-item[data-screen="today"] .icn, .tab[data-screen="today"] .icn, .fab-menu-item[data-action="product"] .icn { color: hsl(9, 55%, 40%); }
html[data-theme="03-shokolad"] .drawer-item[data-screen="orders"] .icn, .tab[data-screen="orders"] .icn, .fab-menu-item[data-action="order"] .icn { color: hsl(45, 55%, 40%); }
html[data-theme="03-shokolad"] .drawer-item[data-screen="store"] .icn, .tab[data-screen="store"] .icn { color: hsl(167, 55%, 40%); }
html[data-theme="03-shokolad"] .drawer-item[data-screen="calendar"] .icn, .tab[data-screen="calendar"] .icn { color: hsl(278, 55%, 40%); }
html[data-theme="03-shokolad"] .drawer-item[data-screen="clients"] .icn, .fab-menu-item[data-action="client"] .icn { color: hsl(57, 55%, 40%); }
html[data-theme="03-shokolad"] .drawer-item[data-screen="calc"] .icn { color: hsl(210, 55%, 40%); }
html[data-theme="03-shokolad"] .drawer-item[data-screen="production"] .icn { color: hsl(243, 55%, 40%); }
html[data-theme="03-shokolad"] .drawer-item[data-screen="shopping"] .icn { color: hsl(74, 55%, 40%); }
html[data-theme="03-shokolad"] .drawer-item[data-screen="finance"] .icn { color: hsl(2, 55%, 40%); }
html[data-theme="03-shokolad"] .drawer-item[data-screen="past"] .icn { color: hsl(294, 55%, 40%); }
html[data-theme="03-shokolad"] .drawer-item[data-screen="help"] .icn { color: hsl(145, 55%, 40%); }
html[data-theme="03-shokolad"] .drawer-item[data-screen="settings"] .icn { color: hsl(10, 55%, 40%); }
html[data-theme="03-shokolad"] .drawer-item[href="/admin"] .icn { color: hsl(284, 55%, 40%); }
html[data-theme="03-shokolad"] #requests-block .card-icon { background: hsl(9, 55%, 86%); }
html[data-theme="03-shokolad"] #deliveries-block .card-icon { background: hsl(243, 55%, 86%); }
html[data-theme="03-shokolad"] #overdue-block .card-icon { background: hsl(25, 55%, 86%); }
html[data-theme="03-shokolad"] #prep-block .card-icon { background: hsl(74, 55%, 86%); }
html[data-theme="03-shokolad"] #debts-block .card-icon { background: hsl(2, 55%, 86%); }
html[data-theme="03-shokolad"] #alerts-block .card-icon { background: hsl(25, 55%, 86%); }
html[data-theme="03-shokolad"] .admin-tab[data-tab="dashboard"] .icn { color: hsl(64, 65%, 40%); }
html[data-theme="03-shokolad"] .admin-tab[data-tab="registrations"] .icn { color: hsl(8, 65%, 40%); }
html[data-theme="03-shokolad"] .admin-tab[data-tab="users"] .icn { color: hsl(55, 65%, 40%); }
html[data-theme="03-shokolad"] .admin-tab[data-tab="platform"] .icn { color: hsl(205, 65%, 40%); }
html[data-theme="03-shokolad"] .admin-tab[data-tab="payments"] .icn { color: hsl(239, 65%, 40%); }
html[data-theme="03-shokolad"] .admin-tab[data-tab="health"] .icn { color: hsl(11, 65%, 40%); }
html[data-theme="03-shokolad"] .admin-tab[data-tab="backups"] .icn { color: hsl(179, 65%, 40%); }
html[data-theme="03-shokolad"] .admin-tab[data-tab="settings"] .icn { color: hsl(308, 65%, 40%); }
html[data-theme="03-shokolad"] .tab-active:hover, html[data-theme="03-shokolad"] .tabbar .tab.tab-active:hover { background: hsl(calc(var(--theme-hue) + 8),28%, 84%); }
html[data-theme="03-shokolad"] .skeleton { background: hsl(calc(var(--theme-hue) + 8),28%, 84%); } /* Г1 (29.09): shimmer переехал в ::after (compositor) — фон сплошной */

/* C10 (22.09): heatmap загрузки дня — гамма какао/карамели/корицы */
html[data-theme="03-shokolad"] {
  --heat-mid: hsl(calc(var(--theme-hue) + 14),45%, 86%);   --heat-mid-bd: hsl(calc(var(--theme-hue) + 10),38%, 66%);
  --heat-hi: hsl(calc(var(--theme-hue) + 8),48%, 82%);    --heat-hi-bd: hsl(calc(var(--theme-hue) + 5),42%, 60%);
  --heat-full: hsl(calc(var(--theme-hue) - 2),45%, 78%);  --heat-full-bd: hsl(calc(var(--theme-hue) - 5),45%, 52%);
}
html[data-theme="03-shokolad"] .cal-load-full .cal-heat::after { background: hsl(calc(var(--theme-hue) - 10),55%, 38%); }
html[data-theme="03-shokolad"] .cal-detail-load.full { color: hsl(calc(var(--theme-hue) - 10),55%, 38%); }
/* Р17 (23.09): пользователь выбрал свой оттенок — кремовая текстура «листочки»
   не сочетается с произвольным hue, фон = чистый градиент в тон темы */
html[data-theme="03-shokolad"][data-custom-hue] body {
  background-image: linear-gradient(180deg,
    hsl(calc(var(--theme-hue) + 6), 45%, 93%) 0%,
    hsl(calc(var(--theme-hue) + 10), 38%, 90%) 100%);
}

