/* Палитра кабинета не меняет оформление публичного сайта. */
html[data-theme="light"] {
  --black: #eeeae3;
  --near-black: #f8f5ef;
  --white: #292724;
  --muted: #68635b;
  --orange: #ce370e;
  --line: rgba(55, 47, 36, 0.2);
  --line-soft: rgba(55, 47, 36, 0.14);
  --line-dark: rgba(55, 47, 36, 0.2);
  --surface-1: linear-gradient(180deg, #faf7f1, #f4f0e9);
  --surface-2: linear-gradient(180deg, #f8f5ef, #ede8e0);
  --edge-light: inset 0 1px 0 rgba(255, 255, 255, 0.65);
  --shadow-sm: 0 1px 2px rgba(55, 47, 36, 0.08), 0 4px 10px rgba(55, 47, 36, 0.04);
  --shadow-md: 0 2px 4px rgba(55, 47, 36, 0.08), 0 12px 30px rgba(55, 47, 36, 0.08);
  --shadow-lg: 0 6px 12px rgba(55, 47, 36, 0.1), 0 28px 64px rgba(55, 47, 36, 0.12);
  --inset-well: inset 0 1px 3px rgba(55, 47, 36, 0.06);
  --glow-orange: 0 4px 14px rgba(206, 55, 14, 0.12);
  --thumb: rgba(55, 47, 36, 0.25);
  --thumb-hover: rgba(55, 47, 36, 0.4);
}

.lk-theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 44px;
  min-height: 44px;
  padding: 0 12px;
  flex-shrink: 0;
  color: var(--white);
  background: var(--surface-2);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  box-shadow: var(--edge-light), var(--shadow-sm);
  font: inherit;
  font-size: 0.75rem;
  cursor: pointer;
}
.lk-theme-toggle svg { width: 20px; height: 20px; }
.lk-theme-sun { display: none; }
html[data-theme="light"] .lk-theme-sun { display: block; }
html[data-theme="light"] .lk-theme-moon { display: none; }
.lk-theme-toggle:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; }

html[data-theme="light"] .lk-body { color: var(--white); }
html[data-theme="light"] .lk-top { background: var(--near-black); }
html[data-theme="light"] .lk-top .wordmark {
  padding: 5px 10px;
  background: #17151e;
  border-radius: 10px;
}
html[data-theme="light"] :is(.field input:not([type="checkbox"]), .field textarea, .field select, .field .dropdown__toggle, .lk-hours input[type="time"], .lk-owner-content select, .lk-owner-content input, .lk-panel-tools input, .lk-panel-tools select, .lk-main input[type="file"]:not(.sr-only)) {
  background-color: #fcf9f3;
  color: var(--white);
  color-scheme: light;
}
html[data-theme="light"] input::placeholder,
html[data-theme="light"] textarea::placeholder { color: #79736a; }
html[data-theme="light"] .button {
  color: var(--white);
  background: var(--surface-2);
  border-color: var(--line-soft);
  box-shadow: var(--shadow-sm);
}
html[data-theme="light"] .button--accent {
  color: #fff8f0;
  background: linear-gradient(180deg, #db4219, #c7320e);
  border-color: #bd300e;
}
html[data-theme="light"] :is(.lk-tabs button.is-active, .lk-drawer .lk-nav-primary button.is-active, .lk-select-list li[aria-selected="true"]) {
  color: #fff8f0;
  background: var(--orange);
}
html[data-theme="light"] .lk-badge { color: #fff8f0; }
html[data-theme="light"] :is(.form-status.is-ok, .lk-result.is-ok, .lk-toast.is-ok, .pass-status.is-ok) {
  color: #215335;
  background: #dcebdc;
}
html[data-theme="light"] .form-status:not(.is-ok) { color: #912a13; background: #f4dfd5; }
html[data-theme="light"] :is(.pass-status.is-off, .lk-result.is-deny, .lk-toast.is-deny) { color: #fff8f0; background: var(--orange); }
html[data-theme="light"] .lk-pill--ok { color: #28603c; border-color: #6a9d77; }
html[data-theme="light"] .lk-avatar { color: #4e4942; background: #e3ddd3; }
/* QR остаётся чёрным на белом, независимо от палитры интерфейса. */
html[data-theme="light"] .lk-qr { background: #fff; }
html[data-theme="light"] .lk-scan { background: #171717; }
html[data-theme="light"] .lk-select-list { box-shadow: var(--shadow-lg); }
html[data-theme="light"] :is(.lk-select-list li:hover, .lk-select-list li:focus):not([aria-selected="true"]) { background: #e8e1d7; }

@media (max-width: 640px) {
  .lk-top { padding-inline: 16px; gap: 6px; }
  .lk-top .wordmark img { height: 22px; }
  .lk-theme-toggle { width: 44px; padding: 0; }
  .lk-theme-toggle [data-theme-label] { display: none; }
  .lk-top [data-refresh] { width: 44px; padding: 0; font-size: 0; }
  .lk-top [data-refresh]::before { content: "↻"; font-size: 24px; }
  .lk-top [data-logout] { padding-inline: 10px; }
}
