/* Staff task tracker — личные задачи admin/partner */

.stt {
  --stt-fab-size: 4.25rem;
  --stt-fab-inset: 1.15rem;
  --stt-fab-right: max(var(--stt-fab-inset), env(safe-area-inset-right, 0px));
  --stt-fab-bottom: max(var(--stt-fab-inset), env(safe-area-inset-bottom, 0px));
  /* Выше filters-drawer (88) и side-drawer (90), иначе панель «открывается» под невидимым оверлеем */
  --stt-z: 110;
  --stt-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --stt-panel-ms: 280ms;
  /* Токены темы (не --lk-ink / --lk-bg — их в ЛК нет) */
  --stt-ink: var(--lk-text, var(--admin-text, #12151c));
  --stt-ink-muted: var(--lk-muted, var(--admin-muted, #5a6478));
  --stt-bg: var(--admin-bg, #f5f7fb);
  --stt-surface: var(--lk-surface, var(--admin-surface, #fff));
  --stt-surface-2: var(--lk-surface-2, var(--admin-surface-2, #f3f4f6));
  --stt-line: var(--lk-border, var(--admin-line, rgba(18, 21, 28, 0.1)));
  --stt-accent: var(--lk-accent, #2d6ef3);
  --stt-panel-bg: color-mix(in srgb, var(--stt-surface) 94%, transparent);
  --stt-card-bg: color-mix(in srgb, var(--stt-surface-2) 70%, var(--stt-surface));
}

.stt[hidden] {
  display: none !important;
}

/* Парящая круглая FAB — вне инварианта height:48 кнопок админки */
.stt-fab {
  position: fixed;
  right: var(--stt-fab-right);
  bottom: var(--stt-fab-bottom);
  z-index: var(--stt-z);
  box-sizing: border-box;
  width: var(--stt-fab-size) !important;
  height: var(--stt-fab-size) !important;
  min-width: var(--stt-fab-size) !important;
  min-height: var(--stt-fab-size) !important;
  max-width: var(--stt-fab-size) !important;
  max-height: var(--stt-fab-size) !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 1px solid transparent !important;
  border-radius: 50% !important;
  aspect-ratio: 1 / 1;
  flex-shrink: 0;
  overflow: visible;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  background: linear-gradient(160deg, #3b7cff, #2d6ef3);
  color: #fff;
  box-shadow:
    0 14px 36px rgba(45, 110, 243, 0.38),
    0 6px 14px rgba(18, 21, 28, 0.12);
  cursor: pointer;
  display: inline-grid !important;
  place-items: center;
  appearance: none;
  -webkit-appearance: none;
  line-height: 0 !important;
  font-size: 0 !important;
  transition:
    transform 0.22s var(--stt-ease),
    box-shadow 0.22s var(--stt-ease),
    background 0.22s ease,
    color 0.22s ease,
    border-color 0.22s ease,
    opacity 0.18s ease;
}

.stt-fab:hover {
  transform: translateY(-3px) scale(1.04);
  background: linear-gradient(160deg, #4d88ff, #245dd4);
  box-shadow:
    0 18px 42px rgba(45, 110, 243, 0.45),
    0 8px 18px rgba(18, 21, 28, 0.14);
}

.stt-fab:active {
  transform: translateY(-1px) scale(0.98);
}

.stt-fab.is-open {
  background: linear-gradient(160deg, #3b7cff, #2d6ef3);
  color: #fff;
  border-color: transparent !important;
  box-shadow:
    0 20px 52px rgba(45, 110, 243, 0.45),
    0 8px 18px rgba(18, 21, 28, 0.14);
  /* Панель занимает её место — кнопка не торчит снизу */
  opacity: 0;
  pointer-events: none;
  transform: scale(0.6);
}

/* Прячем FAB только по явным классам (не :has([hidden]) — ложные срабатывания) */
html.ops-filters-open .stt-fab,
html.lk-chat-context-open .stt-fab,
html.lk-menu-open .stt-fab {
  opacity: 0 !important;
  pointer-events: none !important;
  transform: scale(0.6);
}

.stt-fab.has-context:not(.is-open) {
  animation: stt-fab-glow 2.4s ease-in-out infinite;
}

@keyframes stt-fab-glow {
  0%,
  100% {
    box-shadow:
      0 0 0 0 rgba(45, 110, 243, 0),
      0 14px 36px rgba(45, 110, 243, 0.38),
      0 6px 14px rgba(18, 21, 28, 0.12);
  }
  50% {
    box-shadow:
      0 0 0 8px rgba(45, 110, 243, 0.2),
      0 16px 40px rgba(45, 110, 243, 0.48),
      0 6px 14px rgba(18, 21, 28, 0.12);
  }
}

.stt-fab__icon {
  width: 1.55rem;
  height: 1.55rem;
}

.stt-fab__badge {
  position: absolute;
  top: -0.1rem;
  right: -0.1rem;
  min-width: 1.4rem;
  height: 1.4rem;
  padding: 0 0.35rem;
  border-radius: 999px;
  background: #d64545;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.4rem;
  text-align: center;
  box-shadow:
    0 2px 8px rgba(214, 69, 69, 0.4),
    0 0 0 2px var(--stt-surface, #fff);
}

.stt-fab__badge[hidden] {
  display: none !important;
}

.stt-fab__dot {
  position: absolute;
  top: 0.4rem;
  left: 0.4rem;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 2px #2d6ef3;
}

.stt-fab.is-open .stt-fab__dot {
  background: #fff;
  box-shadow: 0 0 0 2px #2d6ef3;
}

.stt-fab__dot[hidden] {
  display: none !important;
}

.stt-backdrop {
  position: fixed;
  inset: 0;
  z-index: calc(var(--stt-z) - 1);
  background: rgba(10, 14, 22, 0.4);
  opacity: 0;
  transition: opacity var(--stt-panel-ms) var(--stt-ease);
}

.stt-backdrop.is-open {
  opacity: 1;
}

.stt-backdrop[hidden] {
  display: none !important;
}

/* База = десктопный угол (координаты всегда есть, не только в media) */
.stt-panel {
  position: fixed;
  right: var(--stt-fab-right);
  bottom: var(--stt-fab-bottom);
  left: auto;
  top: auto;
  z-index: calc(var(--stt-z) + 1);
  display: flex;
  flex-direction: column;
  width: min(34rem, calc(100vw - 2 * var(--stt-fab-inset)));
  max-height: calc(100dvh - 2 * var(--stt-fab-inset));
  min-height: 18rem;
  box-sizing: border-box;
  background: #fff;
  background: var(--stt-surface, var(--admin-surface, #fff));
  color: var(--stt-ink, #12151c);
  border: 1px solid var(--stt-line, rgba(18, 21, 28, 0.12));
  border-radius: 1.25rem;
  box-shadow: 0 18px 50px rgba(18, 21, 28, 0.22);
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(10px);
  transform-origin: 100% 100%;
  transition:
    opacity var(--stt-panel-ms) var(--stt-ease),
    transform var(--stt-panel-ms) var(--stt-ease),
    visibility 0s linear var(--stt-panel-ms);
}

.stt-panel.is-open {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
  transform: translateY(0) !important;
  display: flex !important;
  transition:
    opacity var(--stt-panel-ms) var(--stt-ease),
    transform var(--stt-panel-ms) var(--stt-ease),
    visibility 0s linear 0s;
}

/* Побеждаем body.admin-panel [hidden] { display:none !important } */
body.admin-panel .stt-panel.is-open {
  display: flex !important;
}

/* [hidden] прячет только когда панель закрыта */
.stt-panel[hidden]:not(.is-open) {
  display: none !important;
}

.stt-panel__handle {
  display: none !important;
}

.stt-panel__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem 1rem 0.65rem;
  border-bottom: 1px solid var(--stt-line);
  flex-shrink: 0;
}

.stt-panel__head-main {
  flex: 1;
  min-width: 0;
}

.stt-panel__title {
  margin: 0;
  display: flex;
  align-items: center;
  min-height: 48px; /* как .dialog-close-btn */
  font-family: var(--lk-font-display, "Unbounded", system-ui, sans-serif);
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.25;
}

.stt-panel__subtitle {
  margin: 0.25rem 0 0;
  color: var(--stt-ink-muted);
  font-size: 0.88rem;
  line-height: 1.35;
}

.stt-panel__subtitle[hidden] {
  display: none !important;
}

.stt-panel__close {
  flex-shrink: 0;
}

.stt-panel__head-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
}

.stt-panel__toolbar {
  display: flex;
  padding: 0.65rem 1rem 0;
  flex-shrink: 0;
}

.stt-panel__toolbar[hidden] {
  display: none !important;
}

.stt-panel__seg {
  width: 100%;
  max-width: 100%;
}

.stt-panel__seg .lk-seg__item {
  flex: 1 1 0;
  min-width: 0;
}

.stt-views {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.stt-view {
  flex: 1 1 auto;
  min-height: 0;
  display: none;
  flex-direction: column;
  padding: 0.75rem 0 0;
  overflow: hidden;
}

.stt-view.is-active {
  display: flex;
}

.stt-view[hidden] {
  display: none !important;
}

/* Скролл на всю ширину панели — полоса у правого края, контент с внутренним отступом */
.stt-list,
.stt-form__scroll,
.stt-detail__table {
  --stt-scroll-thumb: color-mix(in srgb, var(--stt-accent) 42%, transparent);
  --stt-scroll-thumb-hover: color-mix(in srgb, var(--stt-accent) 62%, transparent);
  --stt-scroll-track: color-mix(in srgb, var(--stt-ink) 6%, transparent);
  scrollbar-width: thin;
  scrollbar-color: var(--stt-scroll-thumb) var(--stt-scroll-track);
}

.stt-list::-webkit-scrollbar,
.stt-form__scroll::-webkit-scrollbar,
.stt-detail__table::-webkit-scrollbar {
  width: 6px;
}

.stt-list::-webkit-scrollbar-track,
.stt-form__scroll::-webkit-scrollbar-track,
.stt-detail__table::-webkit-scrollbar-track {
  background: var(--stt-scroll-track);
  border-radius: 999px;
}

.stt-list::-webkit-scrollbar-thumb,
.stt-form__scroll::-webkit-scrollbar-thumb,
.stt-detail__table::-webkit-scrollbar-thumb {
  background: var(--stt-scroll-thumb);
  border-radius: 999px;
}

.stt-list::-webkit-scrollbar-thumb:hover,
.stt-form__scroll::-webkit-scrollbar-thumb:hover,
.stt-detail__table::-webkit-scrollbar-thumb:hover {
  background: var(--stt-scroll-thumb-hover);
}

.stt-list {
  flex: 1 1 auto;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 0 1rem 0.25rem;
  box-sizing: border-box;
}

.stt-view[data-stt-view="list"] .stt-panel__footer,
.stt-view[data-stt-view="detail"] .stt-panel__footer,
.stt-panel__footer--form {
  padding-left: 1rem;
  padding-right: 1rem;
  padding-bottom: max(0.75rem, env(safe-area-inset-bottom, 0px));
}

.stt-empty {
  margin: 1.5rem 0;
  text-align: center;
  color: var(--stt-ink-muted);
  font-size: 0.95rem;
}

.stt-group__title {
  margin: 0 0 0.45rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--stt-ink-muted);
}

.stt-group__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.stt-card {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  padding: 0.7rem 0.75rem;
  border: 1px solid var(--stt-line);
  border-radius: 0.9rem;
  background: var(--stt-card-bg);
  transition: opacity 0.25s ease, background 0.2s ease;
  box-sizing: border-box;
  overflow: hidden;
  min-width: 0;
}

.stt-card.is-completing .stt-card__comment {
  text-decoration: line-through;
  opacity: 0.55;
}

.stt-card__check {
  flex-shrink: 0;
  padding-top: 0.1rem;
}

.stt-card__check .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.stt-card__check .lk-check {
  position: relative;
}

.stt-card__body {
  flex: 1 1 auto;
  min-width: 0;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 0.35rem;
  border: 0;
  background: transparent;
  padding: 0;
  margin: 0;
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
  box-sizing: border-box;
  overflow: hidden;
  /* Не наследовать глобальные button (center / fixed height) */
  height: auto !important;
  min-height: 0 !important;
  width: auto;
  max-width: 100%;
  border-radius: 0;
  box-shadow: none;
  letter-spacing: inherit;
  line-height: inherit;
  font-weight: inherit;
}

body.admin-panel .stt-card__body,
body.admin-panel button.stt-card__body {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  text-align: left;
  height: auto !important;
  min-height: 0 !important;
  padding: 0;
}

.stt-card__meta {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.35rem 0.55rem;
  min-width: 0;
}

.stt-card__time {
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--stt-accent);
  flex-shrink: 0;
}

.stt-card__countdown {
  display: none;
  margin-left: auto;
  width: 1.15rem;
  height: 1.15rem;
  flex-shrink: 0;
}

.stt-card.is-completing .stt-card__countdown {
  display: inline-grid;
  place-items: center;
}

.stt-card__countdown-svg {
  width: 100%;
  height: 100%;
  display: block;
}

.stt-card__countdown-track,
.stt-card__countdown-progress {
  fill: none;
  stroke-width: 2.4;
  stroke-linecap: round;
}

.stt-card__countdown-track {
  stroke: color-mix(in srgb, var(--stt-accent) 18%, transparent);
}

.stt-card__countdown-progress {
  stroke: var(--stt-accent);
  stroke-dasharray: 56.55; /* 2π·9 */
  stroke-dashoffset: 0;
  transform: rotate(-90deg);
  transform-origin: 12px 12px;
  animation: stt-countdown-shrink var(--stt-complete-ms, 3s) linear forwards;
}

@keyframes stt-countdown-shrink {
  to {
    stroke-dashoffset: 56.55;
  }
}

@media (prefers-reduced-motion: reduce) {
  .stt-card__countdown-progress {
    animation: none;
    opacity: 0.55;
  }
}

.stt-card__comment {
  margin: 0;
  text-align: left;
  font-size: 0.95rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
  word-break: break-word;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stt-card__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  min-width: 0;
  max-width: 100%;
}

.stt-chip {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--stt-accent) 14%, transparent);
  color: var(--stt-ink);
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stt-panel__footer {
  padding-top: 0.75rem;
  flex-shrink: 0;
}

.stt-panel__footer--form {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  border-top: 1px solid var(--stt-line);
  padding-top: 0.75rem;
  margin-top: 0;
  background: inherit;
}

.stt-card--done {
  opacity: 0.7;
}

.stt-card--done .stt-card__check {
  display: none;
}

.stt-card--done .stt-card__comment {
  text-decoration: line-through;
  text-decoration-color: var(--stt-ink-muted);
}

.stt-card--done .stt-card__time {
  color: var(--stt-ink-muted);
}

.stt-card__done-label {
  margin-left: auto;
  font-size: 0.78rem;
  color: var(--stt-ink-muted);
  white-space: nowrap;
}

.stt-panel__tabs {
  display: flex;
  padding: 0.45rem 1rem 0;
  flex-shrink: 0;
}

.stt-panel__tabs .stt-panel__seg {
  width: 100%;
}

.stt-panel__tabs[hidden] {
  display: none !important;
}

.stt-add-btn,
.stt-panel__footer .button {
  width: 100%;
  justify-content: center;
}

.stt-cancel {
  width: 100%;
}

.stt-detail {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  width: 100%;
  padding: 0 1rem;
  box-sizing: border-box;
}

.stt-detail__table {
  width: 100%;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--stt-line);
  border-radius: 1rem;
  background: var(--stt-card-bg);
}

.stt-detail__row {
  display: grid;
  grid-template-columns: 7.5rem minmax(0, 1fr);
  gap: 0.75rem 1rem;
  align-items: start;
  width: 100%;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--stt-line);
}

.stt-detail__row:last-child {
  border-bottom: 0;
}

.stt-detail__label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--stt-ink-muted);
  padding-top: 0.12rem;
}

.stt-detail__value {
  font-size: 0.98rem;
  line-height: 1.4;
  min-width: 0;
  word-break: break-word;
}

.stt-detail__value--main {
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.45;
}

.stt-detail .stt-panel__footer {
  margin-top: auto;
}

.stt-detail__footer {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.stt-detail__footer .button {
  width: 100%;
}

.stt-form {
  display: flex;
  flex-direction: column;
  gap: 0;
  overflow: hidden;
  overflow-x: visible;
  flex: 1 1 auto;
  min-height: 0;
}

.stt-form__scroll {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 0 1rem 0.5rem;
  box-sizing: border-box;
}

.stt-form__scroll:has(.lk-date.is-open) {
  overflow-x: visible;
}

.stt-field {
  display: grid;
  gap: 0.35rem;
  position: relative;
}

.stt-field[hidden] {
  display: none !important;
}

.stt-field-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.65rem;
}

.stt-field-row--datetime {
  grid-template-columns: 1.15fr 1fr;
  align-items: end;
}

.stt-time-pair {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.35rem;
}

.stt-time-sep {
  font-weight: 700;
  color: var(--stt-ink-muted);
  line-height: 1;
}

.stt-time-shell {
  min-width: 0;
}

.stt-date-shell {
  width: 100%;
  overflow: visible;
}

.stt-date-shell .lk-date {
  width: 100%;
  display: block;
  position: relative;
  overflow: visible;
}

.stt-date-shell .lk-date-trigger {
  width: 100%;
}

/* В ряду Дата+Время календарь открывается ниже и занимает нужную ширину вправо */
.stt-field-row--datetime,
.stt-field-row--datetime .stt-field {
  overflow: visible;
  position: relative;
  z-index: 1;
}

.stt-field-row--datetime:has(.lk-date.is-open),
.stt-field-row--datetime:has(.cs-select.is-open) {
  z-index: 50;
}

.stt-field-row--datetime .stt-field:has(.lk-date.is-open),
.stt-field-row--datetime .stt-field:has(.cs-select.is-open) {
  z-index: 50;
}

.stt-panel .lk-date-panel {
  width: 19.5rem;
  max-width: calc(100vw - 2rem);
  min-width: min(19.5rem, calc(100vw - 2rem));
}

.stt-combobox {
  position: relative;
  z-index: 1;
}

.stt-combobox.is-open {
  z-index: 40;
}

.stt-combobox .admin-combobox-list {
  z-index: 45;
}

.stt-panel:has(.lk-date.is-open),
.stt-panel:has(.cs-select.is-open),
.stt-panel:has(.stt-combobox.is-open) {
  overflow: visible;
}

.stt-views:has(.lk-date.is-open),
.stt-views:has(.cs-select.is-open),
.stt-views:has(.stt-combobox.is-open) {
  overflow: visible;
}

.stt-view[data-stt-view="form"]:has(.lk-date.is-open),
.stt-view[data-stt-view="form"]:has(.cs-select.is-open),
.stt-view[data-stt-view="form"]:has(.stt-combobox.is-open),
.stt-form:has(.lk-date.is-open),
.stt-form:has(.cs-select.is-open),
.stt-form:has(.stt-combobox.is-open),
.stt-form__scroll:has(.lk-date.is-open),
.stt-form__scroll:has(.cs-select.is-open),
.stt-form__scroll:has(.stt-combobox.is-open) {
  overflow: visible;
}

.stt-form .cs-select {
  width: 100%;
}

.stt-form .cs-select-trigger {
  width: 100%;
}

.stt-label {
  font-size: 0.85rem;
  font-weight: 600;
}

.stt-req {
  color: #d64545;
}

.stt-form .admin-input-shell textarea,
.stt-form .admin-input-shell select,
.stt-form .admin-input-shell input {
  width: 100%;
}

.stt-form-error {
  margin: 0;
  color: #d64545;
  font-size: 0.88rem;
}

.stt-form-error[hidden] {
  display: none !important;
}

/* Mobile: bottom sheet — выезд снизу */
@media (max-width: 899px) {
  .stt-panel {
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-height: min(92dvh, calc(100dvh - env(safe-area-inset-top, 0px) - 0.75rem));
    min-height: 16rem;
    border-radius: 1.25rem 1.25rem 0 0;
    transform: translateY(110%);
    transform-origin: 50% 100%;
  }

  .stt-panel.is-open {
    transform: translateY(0) !important;
  }

  .stt-fab {
    bottom: var(--stt-fab-bottom);
  }

  /* FAB над sticky-плашкой действий (не поверх неё) */
  body.admin-panel:has(.admin-request-actions-panel--sticky) .stt,
  body.admin-panel:has(.admin-page-footer) .stt {
    --stt-fab-bottom: calc(
      max(var(--stt-fab-inset), env(safe-area-inset-bottom, 0px))
      + min(12.5rem, var(--stt-sticky-clearance, 5.5rem))
    );
  }
}

html.lk-theme-dark .stt-panel {
  background: var(--stt-surface, var(--admin-surface, #1a1b1e));
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
}

html.lk-theme-dark .stt {
  --stt-panel-bg: color-mix(in srgb, var(--stt-surface) 96%, transparent);
  --stt-card-bg: var(--stt-surface-2);
}

html.lk-theme-dark .stt-fab {
  background: linear-gradient(160deg, #5a9aff, #4d8dff);
  border-color: transparent !important;
  color: #fff;
  box-shadow:
    0 14px 36px rgba(45, 110, 243, 0.4),
    0 6px 14px rgba(0, 0, 0, 0.35);
}

html.lk-theme-dark .stt-fab:hover {
  background: linear-gradient(160deg, #6aa0ff, #4d8dff);
}

html.lk-theme-dark .stt-fab.is-open {
  background: linear-gradient(160deg, #5a9aff, #4d8dff);
  color: #fff;
  box-shadow: 0 20px 52px rgba(77, 141, 255, 0.4);
  opacity: 0;
}

html.lk-theme-dark .stt-fab__badge {
  box-shadow:
    0 2px 8px rgba(214, 69, 69, 0.45),
    0 0 0 2px var(--stt-surface, #111112);
}

html.lk-theme-dark .stt-fab__dot {
  background: #fff;
  box-shadow: 0 0 0 2px var(--stt-accent, #4d8dff);
}

html.lk-theme-dark .stt-backdrop {
  background: rgba(0, 0, 0, 0.55);
}

html.lk-theme-dark .stt-panel {
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
}

html.lk-theme-dark .stt-chip {
  background: color-mix(in srgb, var(--stt-accent) 22%, transparent);
  color: var(--stt-ink);
}

html.lk-theme-dark .stt-form-error {
  color: var(--admin-red, #f87171);
}

@media (prefers-reduced-motion: reduce) {
  .stt-fab,
  .stt-panel,
  .stt-backdrop {
    transition: none !important;
    animation: none !important;
  }

  /* Не трогаем transform у закрытой панели — иначе ломается sheet.
     Открытая панель и так ставит translateY(0) / scale(1). */
}
