/* NEXIS — UI-kit. Темы: html по умолчанию тёмная область; html[data-theme="light"] = светлая.
   Сайдбар использует --su-sidebar-* (тёмные по умолчанию, светлые в html[data-theme="light"]). Дополняет tailwind.min.css.
   Шрифты: system stack, без внешнего @import — парсинг CSS не ждёт Google Fonts (важно при блокировках CDN). */

/* Единый носитель переменных — html (без дублирования с :root), светлая тема повышает специфичность */
html {
  transition: background-color 0.3s ease, color 0.3s ease;
  --su-border-color: var(--su-border);
  /* Тёмная тема: явный фиолетовый «свечение» (без сильного отрицат. spread — он убивает glow) */
  --su-card-shadow:
    0 1px 0 0 rgba(255, 255, 255, 0.1),
    0 0 0 1px rgba(167, 139, 250, 0.42),
    0 4px 14px rgba(0, 0, 0, 0.52),
    0 20px 44px rgba(0, 0, 0, 0.74),
    0 0 44px rgba(167, 139, 250, 0.48),
    0 0 72px rgba(124, 58, 237, 0.28);
  --su-card-shadow-lg:
    0 1px 0 0 rgba(255, 255, 255, 0.11),
    0 0 0 1px rgba(167, 139, 250, 0.48),
    0 8px 22px rgba(0, 0, 0, 0.58),
    0 32px 58px rgba(0, 0, 0, 0.8),
    0 0 52px rgba(167, 139, 250, 0.55),
    0 0 90px rgba(139, 92, 246, 0.32);
  --su-card-shadow-xl:
    0 1px 0 0 rgba(255, 255, 255, 0.12),
    0 0 0 2px rgba(167, 139, 250, 0.58),
    0 12px 30px rgba(0, 0, 0, 0.64),
    0 42px 84px rgba(0, 0, 0, 0.82),
    0 0 56px rgba(167, 139, 250, 0.62),
    0 0 110px rgba(167, 139, 250, 0.38);
  --su-sidebar-bg: #1e293b;
  --su-sidebar-border: #334155;
  --su-sidebar-text: #f1f5f9;
  --su-sidebar-text-muted: #94a3b8;
  --su-sidebar-hover-bg: rgba(167, 139, 250, 0.12);
  --su-sidebar-active-bg: rgba(167, 139, 250, 0.15);

  --su-accent: #a78bfa;
  --su-success: #34d399;
  --su-error: #f87171;
  --su-warning: #fbbf24;

  --su-radius: 8px;
  --su-tap-min: 44px;

  /* Основная область — тёмная по умолчанию */
  --su-bg-app: #0f172a;
  --su-bg-card: #243044;
  --su-text: #f1f5f9;
  --su-text-muted: #94a3b8;
  --su-border: #334155;
  --su-input-bg: rgba(15, 23, 42, 0.6);
  --su-nested-bg: rgba(15, 23, 42, 0.4);
  --su-shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.35), 0 4px 6px -4px rgb(0 0 0 / 0.35);
  --su-icon-btn-bg: rgba(30, 41, 59, 0.8);
  --su-btn-secondary-hover: rgba(51, 65, 85, 0.4);
  --su-table-head-bg: rgba(51, 65, 85, 0.5);
  --su-table-row-hover: rgba(167, 139, 250, 0.08);

  background-color: var(--su-bg-app);
  min-height: 100vh;
}

html[data-theme="light"] {
  /* Премиальная светлая тема: воздух, фиолетовый подтон (Linear / Notion / Stripe) */
  --su-card-shadow:
    0 1px 2px rgba(139, 92, 246, 0.05),
    0 0 0 1px rgba(139, 92, 246, 0.1),
    0 2px 10px rgba(124, 58, 237, 0.06),
    0 10px 36px rgba(139, 92, 246, 0.09);
  --su-card-shadow-lg:
    0 1px 3px rgba(139, 92, 246, 0.06),
    0 0 0 1px rgba(139, 92, 246, 0.12),
    0 4px 18px rgba(124, 58, 237, 0.07),
    0 18px 52px rgba(139, 92, 246, 0.11);
  --su-card-shadow-xl:
    0 2px 8px rgba(124, 58, 237, 0.09),
    0 0 0 1px rgba(124, 58, 237, 0.2),
    0 8px 32px rgba(124, 58, 237, 0.13),
    0 26px 60px rgba(139, 92, 246, 0.14),
    0 0 96px rgba(167, 139, 250, 0.12);
  --su-sidebar-bg: rgba(255, 255, 255, 0.72);
  --su-sidebar-border: rgba(139, 92, 246, 0.12);
  --su-sidebar-text: #172033;
  --su-sidebar-text-muted: #6b6a80;
  --su-sidebar-hover-bg: rgba(139, 92, 246, 0.07);
  --su-sidebar-active-bg: rgba(124, 58, 237, 0.11);

  --su-bg-app: #f5f7fb;
  --su-bg-card: #ffffff;
  --su-text: #172033;
  --su-text-muted: #6b6a80;
  --su-border: rgba(139, 92, 246, 0.14);
  --su-input-bg: #ffffff;
  --su-nested-bg: rgba(139, 92, 246, 0.042);
  --su-accent: #7c3aed;
  --su-shadow-lg:
    0 4px 7px rgba(124, 58, 237, 0.05),
    0 18px 48px rgba(139, 92, 246, 0.1),
    0 0 0 1px rgba(139, 92, 246, 0.08);
  --su-icon-btn-bg: rgba(255, 255, 255, 0.92);
  --su-btn-secondary-hover: rgba(139, 92, 246, 0.07);
  --su-table-head-bg: rgba(245, 247, 251, 0.92);
  --su-table-row-hover: rgba(139, 92, 246, 0.085);
}

.su-app {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Helvetica Neue", Arial, sans-serif;
  background-color: var(--su-bg-app);
  color: var(--su-text);
  font-size: 15px;
  line-height: 1.5;
  transition: background-color 0.3s ease, color 0.3s ease;
}

body.su-app {
  transition: background-color 0.3s ease, color 0.3s ease;
}

@keyframes su-fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes su-skeleton-pulse {
  0%,
  100% {
    opacity: 0.5;
  }
  50% {
    opacity: 0.85;
  }
}

@keyframes su-skeleton-shimmer {
  0% {
    background-position: 120% 0;
  }
  100% {
    background-position: -120% 0;
  }
}

.su-content-fade {
  animation: su-fade-in 300ms ease-out forwards;
}

.su-skeleton {
  border-radius: var(--su-radius);
  background: var(--su-nested-bg);
  opacity: 0.72;
}

.su-skeleton-line {
  height: 14px;
  margin-bottom: 10px;
}

.su-skeleton-line:last-child {
  margin-bottom: 0;
  width: 72%;
}

.su-skeleton-metric {
  height: 88px;
  width: 100%;
}

.su-skeleton-table-row td {
  padding: 12px 16px;
}

.su-skeleton-cell {
  height: 16px;
  border-radius: 4px;
}

/* Фон body: класс выставляет theme.js (в выражениях Alpine window.SalonTheme недоступен без window.)
   Токены сайдбара дублируем здесь: часть прокси/клиентов отдаёт старый salon-ui.css без блока html[data-theme]. */
body.su-app.su-theme-light {
  --su-sidebar-bg: rgba(255, 255, 255, 0.72);
  --su-sidebar-border: rgba(139, 92, 246, 0.12);
  --su-sidebar-text: #172033;
  --su-sidebar-text-muted: #6b6a80;
  --su-sidebar-hover-bg: rgba(139, 92, 246, 0.07);
  --su-sidebar-active-bg: rgba(124, 58, 237, 0.11);

  background-color: #f5f7fb;
  color: #172033;
}

/* Премиальная светлая тема: стекло, таблицы, кнопки, пустые состояния, скелетоны */
html[data-theme="light"] .su-sidebar-inner,
body.su-app.su-theme-light .su-sidebar-inner {
  background: rgba(255, 255, 255, 0.96);
  border-right: 1px solid rgba(139, 92, 246, 0.12);
}

html[data-theme="light"] .su-topbar,
body.su-app.su-theme-light .su-topbar {
  background: rgba(255, 255, 255, 0.98);
  border-bottom: 1px solid rgba(139, 92, 246, 0.12);
}

html[data-theme="light"] .su-sidebar-link-active,
body.su-app.su-theme-light .su-sidebar-link-active {
  font-weight: 600;
  color: #7c3aed;
  background: rgba(124, 58, 237, 0.12);
  box-shadow: inset 0 0 0 1px rgba(124, 58, 237, 0.12);
}

html[data-theme="light"] .su-table thead th,
body.su-app.su-theme-light .su-table thead th {
  font-weight: 500;
  font-size: 0.75rem;
  color: #8b879c;
}

html[data-theme="light"] .su-btn,
body.su-app.su-theme-light .su-btn {
  transition:
    color 0.2s ease,
    background-color 0.2s ease,
    border-color 0.2s ease,
    filter 0.2s ease,
    opacity 0.2s ease,
    box-shadow 0.2s ease;
}

html[data-theme="light"] .su-btn-primary,
body.su-app.su-theme-light .su-btn-primary {
  box-shadow:
    0 1px 2px rgba(124, 58, 237, 0.14),
    0 4px 16px rgba(124, 58, 237, 0.24);
}

html[data-theme="light"] .su-btn-primary:hover:not(:disabled),
body.su-app.su-theme-light .su-btn-primary:hover:not(:disabled) {
  filter: brightness(1.05);
  box-shadow:
    0 2px 6px rgba(124, 58, 237, 0.16),
    0 10px 32px rgba(124, 58, 237, 0.32);
}

html[data-theme="light"] .su-btn-secondary:hover:not(:disabled),
body.su-app.su-theme-light .su-btn-secondary:hover:not(:disabled) {
  background-color: rgba(139, 92, 246, 0.07);
  border-color: rgba(124, 58, 237, 0.28);
}

html[data-theme="light"] .su-icon-btn:hover,
body.su-app.su-theme-light .su-icon-btn:hover {
  background: rgba(139, 92, 246, 0.06);
  border-color: rgba(124, 58, 237, 0.22);
}

html[data-theme="light"] .su-page-btn:hover:not(:disabled),
body.su-app.su-theme-light .su-page-btn:hover:not(:disabled) {
  background: rgba(139, 92, 246, 0.06);
  border-color: rgba(124, 58, 237, 0.18);
}

html[data-theme="light"] .su-page-btn--active,
body.su-app.su-theme-light .su-page-btn--active {
  background: rgba(124, 58, 237, 0.1);
  box-shadow: 0 0 0 1px rgba(124, 58, 237, 0.15);
}

html[data-theme="light"] .su-page-btn,
body.su-app.su-theme-light .su-page-btn {
  transition:
    color 0.15s ease,
    background-color 0.15s ease,
    border-color 0.15s ease;
}

html[data-theme="light"] .su-skeleton,
body.su-app.su-theme-light .su-skeleton {
  background: rgba(139, 92, 246, 0.08);
  opacity: 1;
}

html[data-theme="light"] .su-table-wrap > .su-empty-block,
body.su-app.su-theme-light .su-table-wrap > .su-empty-block {
  background: rgba(139, 92, 246, 0.04);
}

html[data-theme="light"] .su-empty-block svg,
body.su-app.su-theme-light .su-empty-block svg {
  color: #7c3aed;
  opacity: 0.32;
}

html[data-theme="light"] .su-ai-placeholder,
body.su-app.su-theme-light .su-ai-placeholder {
  border-color: rgba(139, 92, 246, 0.22);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(249, 247, 255, 0.92) 100%);
  box-shadow:
    0 1px 2px rgba(139, 92, 246, 0.05),
    0 0 0 1px rgba(139, 92, 246, 0.1),
    0 2px 10px rgba(124, 58, 237, 0.06),
    0 10px 36px rgba(139, 92, 246, 0.09);
  box-shadow: var(--su-card-shadow);
}

.su-text-muted {
  color: var(--su-text-muted);
}

.su-text-small {
  font-size: 12px;
  color: var(--su-text-muted);
}

.su-heading-page {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--su-text);
}

@media (min-width: 768px) {
  .su-heading-page {
    font-size: 1.25rem;
  }
}

.su-card {
  /* Тени снаружи блока: не вешайте overflow-x-auto на <main> — обрезает box-shadow.
     Две декларации box-shadow: литеральная «страховка», затем var(...). Если var по какой-то причине
     невалиден, браузер игнорирует вторую строку и остаётся заметная глубина (см. скриншоты «плоский» UI). */
  background-color: var(--su-bg-card);
  border-radius: var(--su-radius);
  padding: 24px;
  border: 1px solid var(--su-border);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
  box-shadow:
    0 1px 0 0 rgb(255 255 255 / 0.1),
    0 0 0 1px rgb(167 139 250 / 0.42),
    0 4px 14px rgb(0 0 0 / 0.52),
    0 20px 44px rgb(0 0 0 / 0.74),
    0 0 44px rgb(167 139 250 / 0.48),
    0 0 72px rgb(124 58 237 / 0.28);
  box-shadow: var(--su-card-shadow);
}

html[data-theme="light"] .su-card,
body.su-app.su-theme-light .su-card {
  box-shadow:
    0 1px 2px rgba(139, 92, 246, 0.05),
    0 0 0 1px rgba(139, 92, 246, 0.1),
    0 2px 10px rgba(124, 58, 237, 0.06),
    0 10px 36px rgba(139, 92, 246, 0.09);
  box-shadow: var(--su-card-shadow);
}

@media (min-width: 768px) {
  .su-card {
    box-shadow:
      0 1px 0 0 rgb(255 255 255 / 0.11),
      0 0 0 1px rgb(167 139 250 / 0.48),
      0 8px 22px rgb(0 0 0 / 0.58),
      0 32px 58px rgb(0 0 0 / 0.8),
      0 0 52px rgb(167 139 250 / 0.55),
      0 0 90px rgb(139 92 246 / 0.32);
    box-shadow: var(--su-card-shadow-lg);
  }

  html[data-theme="light"] .su-card,
  body.su-app.su-theme-light .su-card {
    box-shadow:
      0 1px 3px rgba(139, 92, 246, 0.06),
      0 0 0 1px rgba(139, 92, 246, 0.12),
      0 4px 18px rgba(124, 58, 237, 0.07),
      0 18px 52px rgba(139, 92, 246, 0.11);
    box-shadow: var(--su-card-shadow-lg);
  }

  .su-card--hover:hover {
    box-shadow:
      0 1px 0 0 rgb(255 255 255 / 0.12),
      0 0 0 2px rgb(167 139 250 / 0.58),
      0 12px 30px rgb(0 0 0 / 0.64),
      0 42px 84px rgb(0 0 0 / 0.82),
      0 0 56px rgb(167 139 250 / 0.62),
      0 0 110px rgb(167 139 250 / 0.38);
    box-shadow: var(--su-card-shadow-xl);
    transform: translateY(-2px);
  }

  html[data-theme="light"] .su-card--hover:hover,
  body.su-app.su-theme-light .su-card--hover:hover {
    box-shadow:
      0 2px 8px rgba(124, 58, 237, 0.09),
      0 0 0 1px rgba(124, 58, 237, 0.2),
      0 8px 32px rgba(124, 58, 237, 0.13),
      0 26px 60px rgba(139, 92, 246, 0.14),
      0 0 96px rgba(167, 139, 250, 0.12);
    box-shadow: var(--su-card-shadow-xl);
    transform: translateY(-2px);
  }
}

@media (max-width: 767px) {
  /* Страховка для блоков таблицы на узкой ширине */
  .su-card:not(.su-modal-panel) {
    box-shadow:
      0 1px 0 0 rgb(255 255 255 / 0.1),
      0 0 0 1px rgb(167 139 250 / 0.42),
      0 4px 14px rgb(0 0 0 / 0.52),
      0 20px 44px rgb(0 0 0 / 0.74),
      0 0 44px rgb(167 139 250 / 0.48),
      0 0 72px rgb(124 58 237 / 0.28);
    box-shadow: var(--su-card-shadow);
  }

  html[data-theme="light"] .su-card:not(.su-modal-panel),
  body.su-app.su-theme-light .su-card:not(.su-modal-panel) {
    box-shadow:
      0 1px 2px rgba(139, 92, 246, 0.05),
      0 0 0 1px rgba(139, 92, 246, 0.1),
      0 2px 10px rgba(124, 58, 237, 0.06),
      0 10px 36px rgba(139, 92, 246, 0.09);
    box-shadow: var(--su-card-shadow);
  }
}

.su-card-metric {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: start;
}

.su-card-metric .su-count-pill {
  min-width: 1.85rem;
  height: 1.85rem;
  font-size: 0.78rem;
  font-weight: 700;
}

.su-metric-trend-slot {
  min-width: 3rem;
  min-height: 1.25rem;
}

/* Внешняя оболочка таблицы: тень здесь, а не на .su-table-wrap — у overflow-x:auto тень обрезается. */
.su-table-elevated {
  border-radius: var(--su-radius);
  box-shadow:
    0 1px 0 0 rgb(255 255 255 / 0.1),
    0 0 0 1px rgb(167 139 250 / 0.42),
    0 4px 14px rgb(0 0 0 / 0.52),
    0 20px 44px rgb(0 0 0 / 0.74),
    0 0 44px rgb(167 139 250 / 0.48),
    0 0 72px rgb(124 58 237 / 0.28);
  box-shadow: var(--su-card-shadow);
}

html[data-theme="light"] .su-table-elevated,
body.su-app.su-theme-light .su-table-elevated {
  box-shadow:
    0 1px 2px rgba(139, 92, 246, 0.05),
    0 0 0 1px rgba(139, 92, 246, 0.1),
    0 2px 10px rgba(124, 58, 237, 0.06),
    0 10px 36px rgba(139, 92, 246, 0.09);
  box-shadow: var(--su-card-shadow);
}

@media (min-width: 768px) {
  .su-table-elevated {
    box-shadow:
      0 1px 0 0 rgb(255 255 255 / 0.11),
      0 0 0 1px rgb(167 139 250 / 0.48),
      0 8px 22px rgb(0 0 0 / 0.58),
      0 32px 58px rgb(0 0 0 / 0.8),
      0 0 52px rgb(167 139 250 / 0.55),
      0 0 90px rgb(139 92 246 / 0.32);
    box-shadow: var(--su-card-shadow-lg);
  }

  html[data-theme="light"] .su-table-elevated,
  body.su-app.su-theme-light .su-table-elevated {
    box-shadow:
      0 1px 3px rgba(139, 92, 246, 0.06),
      0 0 0 1px rgba(139, 92, 246, 0.12),
      0 4px 18px rgba(124, 58, 237, 0.07),
      0 18px 52px rgba(139, 92, 246, 0.11);
    box-shadow: var(--su-card-shadow-lg);
  }

}

.su-table-wrap {
  overflow-x: auto;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  background-color: var(--su-bg-card);
  border: 1px solid var(--su-border);
  border-radius: var(--su-radius);
  box-shadow: none;
}

/* Мультивыбор в форме (чекбоксы в раскрывающемся блоке) */
.su-spec-multiselect summary {
  list-style: none;
}
.su-spec-multiselect summary::-webkit-details-marker {
  display: none;
}
.su-spec-multiselect[open] .su-spec-multiselect-summary .opacity-80 {
  transform: rotate(180deg);
}
.su-spec-multiselect-summary .opacity-80 {
  display: inline-block;
  transition: transform 0.15s ease;
}

/* Employees table: today schedule pill */
.su-emp-schedule-th {
  width: 7.5rem;
  max-width: 7.5rem;
}
.su-emp-schedule-cell {
  max-width: 7.5rem;
  width: 7.5rem;
  vertical-align: middle;
  padding-top: 0.35rem;
  padding-bottom: 0.35rem;
}
.su-emp-schedule-cell--clickable {
  cursor: pointer;
}
.su-emp-schedule-cell--clickable:hover .su-emp-schedule-pill {
  filter: brightness(1.08);
}
.su-emp-schedule-muted {
  color: var(--su-text-muted);
  font-size: 0.8125rem;
}
.su-emp-schedule-pill {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.1rem;
  max-width: 100%;
  padding: 0.2rem 0.45rem;
  border-radius: 0.4rem;
  font-size: 0.75rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  line-height: 1.25;
  border: 1px solid transparent;
  white-space: nowrap;
}
.su-emp-schedule-pill__hint {
  font-size: 0.5625rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  opacity: 0.9;
}
.su-emp-schedule-pill--work {
  color: #047857;
  background: color-mix(in srgb, #34d399 22%, var(--su-bg-card));
  border-color: color-mix(in srgb, #34d399 45%, var(--su-border));
}
html[data-theme="light"] .su-emp-schedule-pill--work {
  color: #065f46;
  background: #d1fae5;
  border-color: #6ee7b7;
}
.su-emp-schedule-pill--salon {
  color: #047857;
  background: color-mix(in srgb, #34d399 18%, var(--su-bg-card));
  border-color: color-mix(in srgb, #34d399 40%, var(--su-border));
}
html[data-theme="light"] .su-emp-schedule-pill--salon {
  color: #065f46;
  background: #ecfdf5;
  border-color: #a7f3d0;
}
.su-emp-schedule-pill--off {
  color: #b91c1c;
  background: color-mix(in srgb, #f87171 20%, var(--su-bg-card));
  border-color: color-mix(in srgb, #f87171 45%, var(--su-border));
}
html[data-theme="light"] .su-emp-schedule-pill--off {
  color: #991b1b;
  background: #fee2e2;
  border-color: #fca5a5;
}
.su-emp-schedule-pill--custom {
  color: #a16207;
  background: color-mix(in srgb, #fbbf24 24%, var(--su-bg-card));
  border-color: color-mix(in srgb, #fbbf24 50%, var(--su-border));
}
html[data-theme="light"] .su-emp-schedule-pill--custom {
  color: #92400e;
  background: #fef3c7;
  border-color: #fcd34d;
}
.su-emp-row-clickable {
  cursor: pointer;
}
.su-emp-row-clickable:hover td {
  background: color-mix(in srgb, var(--su-accent) 6%, transparent);
}

.su-schedule-panel {
  border-radius: 0.75rem;
  border: 1px solid var(--su-border);
  background: var(--su-bg-card);
  padding: 0.75rem;
}
.su-schedule-panel label.flex {
  touch-action: manipulation;
}
.su-schedule-day-row {
  min-height: 2.75rem;
}
.su-schedule-day-row input[type="time"],
.su-time-input[type="time"] {
  max-width: 7.5rem;
}
html[data-theme="dark"] .su-time-input[type="time"],
html[data-theme="dark"] .su-schedule-panel input[type="time"],
html:not([data-theme="light"]) .su-time-input[type="time"],
html:not([data-theme="light"]) .su-schedule-panel input[type="time"] {
  color-scheme: dark;
}
html[data-theme="light"] .su-time-input[type="time"],
html[data-theme="light"] .su-schedule-panel input[type="time"] {
  color-scheme: light;
}
.su-apt-slot--break {
  background: repeating-linear-gradient(
    -45deg,
    transparent,
    transparent 4px,
    rgba(148, 163, 184, 0.12) 4px,
    rgba(148, 163, 184, 0.12) 8px
  );
  pointer-events: none;
  cursor: not-allowed;
}

.su-table {
  width: 100%;
  min-width: 640px;
  font-size: 14px;
  border-collapse: collapse;
}

.su-table thead {
  background-color: var(--su-table-head-bg);
  color: var(--su-text-muted);
  text-align: left;
}

.su-table th,
.su-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--su-border);
}

.su-table tbody tr:hover {
  background-color: var(--su-table-row-hover);
}

.su-pagination {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid var(--su-border);
  font-size: 12px;
  color: var(--su-text-muted);
}

.su-pagination--bar {
  justify-content: space-between;
}

.su-pagination-nums {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.su-page-btn {
  min-width: 2.25rem;
  min-height: 44px;
  padding: 0 10px;
  border-radius: var(--su-radius);
  border: 1px solid var(--su-border);
  background: var(--su-bg-app);
  color: var(--su-text);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition:
    color 0.15s ease,
    background-color 0.15s ease;
}

.su-page-btn:hover:not(:disabled) {
  background: var(--su-btn-secondary-hover);
}

.su-page-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.su-page-btn--active {
  border-color: var(--su-accent);
  background: rgba(167, 139, 250, 0.15);
  color: var(--su-accent);
}

.su-label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--su-text-muted);
  margin-bottom: 6px;
}

.su-input,
.su-select,
.su-textarea {
  width: 100%;
  background-color: var(--su-input-bg);
  border: 1px solid var(--su-border);
  border-radius: var(--su-radius);
  color: var(--su-text);
  padding: 10px 12px;
  font-size: 14px;
  min-height: var(--su-tap-min);
}

.su-input:focus,
.su-select:focus,
.su-textarea:focus {
  outline: 2px solid var(--su-accent);
  outline-offset: 1px;
}

.su-field-error {
  font-size: 12px;
  color: var(--su-error);
  margin-top: 4px;
}

.su-required-mark {
  color: var(--su-error);
  margin-left: 2px;
}

.su-input--invalid,
.su-select--invalid,
.su-textarea--invalid {
  border-color: var(--su-error) !important;
  outline-color: var(--su-error);
}

.su-btn {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 500;
  border-radius: var(--su-radius);
  cursor: pointer;
  border: none;
  border-color: transparent;
  min-height: var(--su-tap-min);
  padding: 0 16px;
  font-size: 14px;
  transition:
    color 0.15s ease,
    background-color 0.15s ease,
    border-color 0.15s ease,
    filter 0.15s ease,
    opacity 0.15s ease;
}

.su-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* Tooltip ::after уходит вверх — иначе overflow:hidden на .su-btn обрезает подсказку */
.su-btn.su-has-hint {
  overflow: visible;
}

.su-btn-primary {
  background-color: var(--su-accent);
  color: #fff;
}

.su-btn-primary:hover:not(:disabled) {
  filter: brightness(1.08);
}

.su-btn-secondary {
  background: transparent;
  color: var(--su-text);
  border: 1px solid var(--su-border);
}

.su-btn-secondary:hover:not(:disabled) {
  background-color: var(--su-btn-secondary-hover);
  border-color: color-mix(in srgb, var(--su-accent) 35%, var(--su-border));
}

html[data-theme="dark"] .su-btn-secondary:hover:not(:disabled),
html:not([data-theme="light"]) .su-btn-secondary:hover:not(:disabled) {
  background-color: rgba(167, 139, 250, 0.12);
  border-color: color-mix(in srgb, var(--su-accent) 48%, var(--su-border));
}

html[data-theme="dark"] .su-icon-btn:hover:not(:disabled),
html:not([data-theme="light"]) .su-icon-btn:hover:not(:disabled) {
  background: rgba(167, 139, 250, 0.1);
  border-color: color-mix(in srgb, var(--su-accent) 42%, var(--su-border));
}

.su-btn-ghost {
  background: transparent;
  color: var(--su-text-muted);
  border: none;
  min-height: var(--su-tap-min);
  padding: 0 12px;
}

.su-btn-ghost:hover {
  color: var(--su-error);
}

.su-icon-btn {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--su-radius);
  border: 1px solid var(--su-border);
  background: var(--su-icon-btn-bg);
  color: var(--su-text);
  cursor: pointer;
  transition:
    color 0.15s ease,
    background-color 0.15s ease,
    border-color 0.15s ease;
}

/* Пока Alpine не поднял x-show, модалки не должны всплывать при сбое guard */
html:not([data-alpine-ready]) .su-modal-backdrop {
  display: none !important;
}

html:not([data-alpine-ready]) .su-apt-main-panel {
  visibility: hidden;
  pointer-events: none;
  min-height: 8rem;
}
html[data-alpine-ready] .su-apt-main-panel {
  visibility: visible;
  pointer-events: auto;
}

.su-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  /* Без backdrop-filter — немного плотнее, чтобы фон читался */
  background: rgba(0, 0, 0, 0.52);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 16px;
}

@supports (-webkit-backdrop-filter: blur(4px)) or (backdrop-filter: blur(4px)) {
  .su-modal-backdrop {
    background: rgba(0, 0, 0, 0.4);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
  }
}

@media (min-width: 640px) {
  .su-modal-backdrop {
    align-items: center;
  }
}

.su-modal-panel {
  background: var(--su-bg-card);
  border: 1px solid var(--su-border);
  border-radius: var(--su-radius);
  box-shadow: var(--su-shadow-lg);
  width: 100%;
  max-width: 32rem;
  padding: 24px;
  max-height: 90vh;
  overflow-y: auto;
}

.su-modal-panel--wide {
  max-width: min(56rem, 96vw);
}

@media (max-width: 767px) {
  .su-modal-backdrop {
    padding: 0;
    align-items: stretch;
  }

  .su-modal-panel {
    max-width: none;
    width: 100%;
    min-height: 100%;
    max-height: none;
    border-radius: 0;
    padding: 16px;
    margin: 0;
    align-self: stretch;
  }
}

.su-toast {
  pointer-events: none;
  position: fixed;
  top: 1.25rem;
  left: 50%;
  bottom: auto;
  max-width: min(90vw, 22rem);
  padding: 0.65rem 1rem;
  border-radius: var(--su-radius);
  border: 1px solid var(--su-border);
  background: rgba(15, 15, 24, 0.88);
  color: rgba(255, 255, 255, 0.95);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
  font-size: 0.8125rem;
  line-height: 1.35;
  z-index: 9999;
  opacity: 0;
  transform: translateX(-50%) translateY(-20px);
  transition:
    transform 0.25s ease,
    opacity 0.25s ease;
}

.su-toast--visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.su-toast--leaving {
  transform: translateX(-50%) translateY(-12px);
  opacity: 0;
}

.su-toast--error {
  border-color: rgba(248, 113, 113, 0.35);
  color: #fecaca;
}

@media (prefers-reduced-motion: reduce) {
  .su-toast {
    transition: none;
    transform: translateX(-50%) translateY(0);
    opacity: 1;
  }

  .su-toast--leaving {
    transition: none;
    opacity: 0;
  }
}

.su-search-wrap {
  position: relative;
}

.su-search-wrap .su-search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--su-text-muted);
  pointer-events: none;
}

.su-search-wrap .su-input {
  padding-left: 40px;
}

.su-combo-wrap {
  position: relative;
}

/* Подсказки в модалке не обрезаются overflow-y у .su-modal-panel */
.su-modal-panel .su-combo-wrap {
  z-index: 2;
}

.su-modal-panel .su-combo-list {
  z-index: 120;
}

.su-combo-list {
  position: absolute;
  z-index: 90;
  left: 0;
  right: 0;
  top: 100%;
  margin-top: 4px;
  max-height: 240px;
  overflow-y: auto;
  border: 1px solid var(--su-border);
  border-radius: var(--su-radius);
  background: var(--su-bg-card);
  box-shadow: var(--su-card-shadow-lg);
  -webkit-overflow-scrolling: touch;
}

.su-combo-item {
  padding: 10px 12px;
  cursor: pointer;
  font-size: 14px;
  min-height: 44px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--su-border);
}

.su-combo-item:last-child {
  border-bottom: none;
}

.su-combo-item:hover,
.su-combo-item:focus {
  background: var(--su-table-row-hover);
}

.su-status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 9999px;
}

.su-status-ok {
  background-color: var(--su-success);
}

.su-status-neutral {
  background-color: var(--su-text-muted);
}

.su-status-bad {
  background-color: var(--su-error);
}

/* Навигация сайдбара — только токены сайдбара */
.su-sidebar-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--su-radius);
  color: var(--su-sidebar-text-muted);
  text-decoration: none;
  font-size: 14px;
  min-height: var(--su-tap-min);
  transition:
    color 0.15s ease,
    background-color 0.15s ease;
}

.su-sidebar-link:hover {
  color: var(--su-sidebar-text);
  background: var(--su-sidebar-hover-bg);
}

.su-sidebar-link-active {
  color: var(--su-accent);
  background: var(--su-sidebar-active-bg);
}

.su-sidebar-link-active::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 10px;
  bottom: 10px;
  width: 3px;
  border-radius: 2px;
  background: linear-gradient(180deg, #a78bfa 0%, #3b82f6 100%);
  animation: su-sidebar-accent-glow 2s ease-in-out infinite alternate;
}

.su-sidebar-logo {
  font-weight: 700;
  font-size: 18px;
  color: var(--su-sidebar-text);
  padding: 16px 12px 12px;
  letter-spacing: -0.02em;
}

.su-sidebar-sep {
  height: 1px;
  background: var(--su-sidebar-border);
  margin: 8px 12px;
}

.su-sidebar-future {
  opacity: 0.45;
  pointer-events: none;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--su-sidebar-text-muted);
  font-size: 13px;
}

.su-topbar {
  background: var(--su-bg-card);
  border-bottom: 1px solid var(--su-border);
}

.su-avatar {
  position: relative;
  width: 40px;
  height: 40px;
  min-width: 40px;
  border-radius: 9999px;
  background: rgba(167, 139, 250, 0.25);
  color: var(--su-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 15px;
  border: 2px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.28);
  transition: transform 0.2s ease;
}

button.su-avatar {
  appearance: none;
  -webkit-appearance: none;
  font: inherit;
  margin: 0;
  padding: 0;
  cursor: pointer;
  color: inherit;
  text-align: center;
}

button.su-avatar.su-avatar-interactive:hover:not(:disabled) {
  transform: scale(1.05);
}

.su-avatar-skel {
  position: absolute;
  inset: 0;
  border-radius: 9999px;
  background: var(--su-nested-bg);
  border: none;
  animation: su-avatar-skel-pulse 1.2s ease-in-out infinite;
}

html[data-theme="light"] .su-avatar,
body.su-app.su-theme-light .su-avatar {
  background: rgba(124, 58, 237, 0.12);
  color: #7c3aed;
  border-color: rgba(255, 255, 255, 0.95);
  box-shadow: 0 2px 10px rgba(124, 58, 237, 0.18);
}

@keyframes su-sidebar-accent-glow {
  from {
    opacity: 0.78;
  }

  to {
    opacity: 1;
  }
}

@keyframes su-avatar-skel-pulse {
  0%,
  100% {
    opacity: 0.5;
  }

  50% {
    opacity: 0.95;
  }
}

.su-burger {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
}

.su-page-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--su-accent);
  opacity: 0.8;
}

.su-page-icon svg {
  display: block;
  width: 1.25rem;
  height: 1.25rem;
}

.su-page-icon-btn {
  color: var(--su-accent);
}

.su-settings-row {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  min-height: 56px;
  font-size: 1rem;
  font-weight: 500;
  font-family: inherit;
  line-height: 1.35;
  text-align: left;
  color: var(--su-text);
  background: transparent;
  border: 0;
  border-radius: var(--su-radius);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.su-settings-row:hover {
  color: var(--su-sidebar-text, var(--su-text));
  background: var(--su-sidebar-hover-bg, var(--su-table-row-hover));
}

.su-settings-row + .su-settings-row {
  margin-top: 2px;
}

.su-burger-line {
  display: block;
  width: 18px;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
  transition:
    transform 0.25s ease,
    opacity 0.2s ease;
  transform-origin: center;
}

@media (max-width: 767px) {
  .su-burger.su-burger--open .su-burger-line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .su-burger.su-burger--open .su-burger-line:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
  }

  .su-burger.su-burger--open .su-burger-line:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }
}

.su-has-hint {
  position: relative;
  z-index: 0;
}

.su-has-hint::after {
  content: attr(data-su-hint);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  transform: translateX(-50%);
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.02em;
  white-space: nowrap;
  color: rgba(255, 255, 255, 0.92);
  background: rgba(18, 18, 28, 0.82);
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 0.18s ease,
    visibility 0.18s ease;
  transition-delay: 0s, 0s;
  z-index: 20;
}

.su-has-hint:hover::after {
  opacity: 1;
  visibility: visible;
  transition-delay: 0.5s, 0.5s;
}

.su-ripple {
  position: absolute;
  width: 12px;
  height: 12px;
  margin-left: -6px;
  margin-top: -6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  pointer-events: none;
  transform: scale(0);
  opacity: 0.9;
}

.su-ripple--on {
  animation: su-ripple-fade 0.4s ease-out forwards;
}

@keyframes su-ripple-fade {
  to {
    transform: scale(18);
    opacity: 0;
  }
}

.su-brand-spinner {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  color: currentColor;
  border-radius: 6px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  animation: su-brand-spin 1s linear infinite;
}

.su-brand-spinner--sm {
  width: 1.125rem;
  height: 1.125rem;
  font-size: 11px;
  border-radius: 5px;
}

@keyframes su-brand-spin {
  to {
    transform: rotate(360deg);
  }
}

.su-metric-no-data {
  color: var(--su-text-muted);
  font-size: 14px;
}

.su-ai-placeholder {
  background-color: var(--su-bg-card);
  border: 1px dashed var(--su-border);
  border-radius: var(--su-radius);
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--su-text-muted);
  font-size: 14px;
  box-shadow:
    0 1px 0 0 rgb(255 255 255 / 0.1),
    0 0 0 1px rgb(167 139 250 / 0.42),
    0 4px 14px rgb(0 0 0 / 0.52),
    0 20px 44px rgb(0 0 0 / 0.74),
    0 0 44px rgb(167 139 250 / 0.48),
    0 0 72px rgb(124 58 237 / 0.28);
  box-shadow: var(--su-card-shadow);
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

@media (min-width: 768px) {
  .su-ai-placeholder {
    padding: 24px;
    box-shadow:
      0 1px 0 0 rgb(255 255 255 / 0.11),
      0 0 0 1px rgb(167 139 250 / 0.48),
      0 8px 22px rgb(0 0 0 / 0.58),
      0 32px 58px rgb(0 0 0 / 0.8),
      0 0 52px rgb(167 139 250 / 0.55),
      0 0 90px rgb(139 92 246 / 0.32);
    box-shadow: var(--su-card-shadow-lg);
  }

  html[data-theme="light"] .su-ai-placeholder,
  body.su-app.su-theme-light .su-ai-placeholder {
    box-shadow:
      0 1px 3px rgba(139, 92, 246, 0.06),
      0 0 0 1px rgba(139, 92, 246, 0.12),
      0 4px 18px rgba(124, 58, 237, 0.07),
      0 18px 52px rgba(139, 92, 246, 0.11);
    box-shadow: var(--su-card-shadow-lg);
  }
}

.su-badge {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.125rem 0.5rem;
  border-radius: 9999px;
  display: inline-block;
}

.su-badge-confirmed {
  background: rgba(52, 211, 153, 0.22);
  color: #6ee7b7;
}

html[data-theme="light"] .su-badge-confirmed {
  color: #047857;
}

.su-badge-cancelled {
  background: rgba(248, 113, 113, 0.22);
  color: #fca5a5;
}

html[data-theme="light"] .su-badge-cancelled {
  color: #b91c1c;
}

.su-badge-completed {
  background: rgba(96, 165, 250, 0.22);
  color: #93c5fd;
}

html[data-theme="light"] .su-badge-completed {
  color: #1d4ed8;
}

.su-badge-scheduled {
  background: rgba(148, 163, 184, 0.22);
  color: #cbd5e1;
}

html[data-theme="light"] .su-badge-scheduled {
  color: #475569;
}

.su-badge-default {
  background: rgba(148, 163, 184, 0.22);
  color: #cbd5e1;
}

html[data-theme="light"] .su-badge-default {
  color: #475569;
}

.su-section-title {
  font-size: 1rem;
  font-weight: 600;
  padding-bottom: 12px;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--su-border-color);
  color: var(--su-text);
}

.su-header-with-count {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.su-header-with-count .su-count-pill {
  min-width: 1.65rem;
  height: 1.65rem;
  font-size: 0.72rem;
  font-weight: 700;
}

.su-count-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.5rem;
  height: 1.5rem;
  padding: 0 6px;
  border-radius: 9999px;
  font-size: 0.7rem;
  font-weight: 600;
  background: rgba(148, 163, 184, 0.25);
  color: var(--su-text-muted);
}

html:not([data-theme="light"]) .su-count-pill {
  background: rgba(167, 139, 250, 0.2);
  color: #ede9fe;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 0 0 1px rgba(167, 139, 250, 0.35);
}

html[data-theme="light"] .su-count-pill {
  background: rgba(124, 58, 237, 0.08);
  color: #7c3aed;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.95), 0 0 0 1px rgba(139, 92, 246, 0.22);
}

.su-table-wrap > .su-empty-block {
  min-height: 11rem;
  margin: 0.25rem;
  border-radius: calc(var(--su-radius) - 2px);
  background: var(--su-nested-bg);
}

.su-empty-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem 1.25rem;
  gap: 0.5rem;
  color: var(--su-text-muted);
}

.su-empty-block svg {
  width: 2.5rem;
  height: 2.5rem;
  opacity: 0.55;
}

.su-empty-title {
  font-weight: 600;
  color: var(--su-text);
  font-size: 0.95rem;
}

.su-empty-hint {
  font-size: 0.8125rem;
  max-width: 20rem;
  line-height: 1.45;
}

.su-empty-block--compact {
  padding: 1.25rem 0.5rem;
  gap: 0.25rem;
}

/* Главная страница: топ загрузки мастеров */
.su-master-util-stack {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.5rem;
  width: 100%;
}

.su-master-util-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(88px, 34%) auto;
  gap: 0.35rem 0.5rem;
  align-items: center;
  font-size: 0.75rem;
  line-height: 1.25;
}

.su-master-util-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--su-text);
}

.su-master-util-track {
  height: 6px;
  border-radius: 9999px;
  background: var(--su-nested-bg);
  overflow: hidden;
}

.su-master-util-pct {
  font-variant-numeric: tabular-nums;
  color: var(--su-text-muted);
  justify-self: end;
}

.su-master-util-bar {
  height: 100%;
  min-width: 0;
  border-radius: 9999px;
  transition: width 0.65s cubic-bezier(0.33, 1, 0.68, 1);
}

.su-master-util-bar--high {
  background-color: #34d399;
}

.su-master-util-bar--mid {
  background-color: #fbbf24;
}

.su-master-util-bar--low {
  background-color: #f87171;
}

@media (max-width: 639px) {
  .su-master-util-row {
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
  }

  .su-master-util-name {
    grid-column: 1;
    grid-row: 1;
    min-width: 0;
  }

  .su-master-util-pct {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
  }

  .su-master-util-track {
    grid-column: 1 / -1;
    grid-row: 2;
  }
}

/* Успешное сохранение: галочка на кнопке */
.su-save-flash-inner {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  animation: su-save-flash-pop 0.9s cubic-bezier(0.33, 1, 0.68, 1) forwards;
}

@keyframes su-save-flash-pop {
  0% {
    opacity: 0;
    transform: scale(0.82);
  }
  20% {
    opacity: 1;
    transform: scale(1);
  }
  70% {
    opacity: 1;
    transform: scale(1);
  }
  100% {
    opacity: 0;
    transform: scale(0.96);
  }
}

.su-save-flash-icon {
  width: 1.25rem;
  height: 1.25rem;
  color: #34d399;
  filter: drop-shadow(0 0 6px rgba(52, 211, 153, 0.35));
}

/* Пустое состояние: мягкий пульс иконки и CTA */
.su-empty-block.su-empty-block--inviting svg {
  color: var(--su-accent);
  opacity: 0.88;
  animation: su-empty-invite-pulse 3.2s ease-in-out infinite;
}

.su-empty-block.su-empty-block--inviting .su-empty-cta {
  animation: su-empty-invite-pulse 3.2s ease-in-out 0.25s infinite;
}

@keyframes su-empty-invite-pulse {
  0%,
  100% {
    opacity: 0.72;
    filter: brightness(1);
  }

  50% {
    opacity: 1;
    filter: brightness(1.06);
  }
}

@media (prefers-reduced-motion: reduce) {
  html,
  body.su-app,
  .su-app {
    transition: none;
  }

  .su-content-fade {
    animation: none;
    opacity: 1;
  }

  .su-skeleton {
    animation: none;
    opacity: 0.55;
    background: var(--su-nested-bg);
    background-size: auto;
  }

  html[data-theme="light"] .su-skeleton,
  body.su-app.su-theme-light .su-skeleton {
    background: rgba(139, 92, 246, 0.08);
  }

  .su-master-util-bar {
    transition: none;
  }

  .su-save-flash-inner {
    animation: none;
    opacity: 1;
  }

  .su-empty-block.su-empty-block--inviting svg,
  .su-empty-block.su-empty-block--inviting .su-empty-cta {
    animation: none;
    opacity: 0.88;
    filter: none;
  }

  .su-card--hover:hover {
    transform: none;
    box-shadow: var(--su-card-shadow-xl);
  }

  .su-sidebar-link-active::before {
    animation: none;
    opacity: 1;
  }

  .su-burger-line {
    transition: none;
  }

  .su-brand-spinner {
    animation: none;
  }

  .su-avatar-skel {
    animation: none;
    opacity: 0.72;
  }

  button.su-avatar.su-avatar-interactive:hover:not(:disabled) {
    transform: none;
  }

  .su-has-hint::after {
    display: none;
  }

  .su-ripple--on {
    animation: none;
    opacity: 0;
  }
}

/* Ограничение высоты и прокрутка сайдбара на мобилках (кнопка «Выйти» под системной панелью Safari) */
@media (max-width: 767px) {
  .su-sidebar-mount {
    display: flex;
    flex-direction: column;
    min-height: 0;
    max-height: 100vh;
    max-height: 100dvh;
    overflow: hidden;
    box-sizing: border-box;
  }

  .su-sidebar-mount .su-sidebar-inner {
    flex: 1 1 auto;
    min-height: 0;
    height: auto;
    max-height: none;
    -webkit-overflow-scrolling: touch;
  }
}

.su-sidebar-inner {
  background: var(--su-sidebar-bg);
  border-right: 1px solid var(--su-sidebar-border);
  height: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  width: 220px;
  overflow-y: auto;
  box-sizing: border-box;
}

.su-sidebar-footer {
  margin-top: auto;
  padding-bottom: max(16px, calc(12px + env(safe-area-inset-bottom, 0px)));
}

@keyframes gradientBG {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

@keyframes gradientText {
  0% {
    background-position: 0% 50%;
  }
  100% {
    background-position: 200% 50%;
  }
}

.su-login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: var(--su-bg-app);
}

.su-login-wrap.login-page {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

html:not([data-theme="light"]) .su-login-wrap.login-page {
  background: linear-gradient(-45deg, #0f172a, #1e1b4b, #064e3b, #10b981, #2e1065, #0f172a);
  background-size: 400% 400%;
  animation: gradientBG 18s ease infinite;
}

html[data-theme="light"] .su-login-wrap.login-page {
  background: linear-gradient(-45deg, #e2e8f0, #cbd5e1, #e2e8f0, #cbd5e1, #e2e8f0);
  background-size: 300% 300%;
  animation: gradientBG 15s ease infinite;
}

html:not([data-theme="light"]) .su-login-wrap.login-page .nexis-gradient {
  background: linear-gradient(90deg, #a78bfa, #10b981, #3b82f6, #a78bfa);
  background-size: 300% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: gradientText 4s linear infinite;
}

html[data-theme="light"] .su-login-wrap.login-page .nexis-gradient {
  background: linear-gradient(90deg, #6b21a5, #0891b2, #6b21a5);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: gradientText 4s linear infinite;
}

html:not([data-theme="light"]) .su-login-wrap.login-page .login-form.su-card {
  background: rgba(15, 23, 42, 0.6);
  background-color: rgba(15, 23, 42, 0.6);
}

html:not([data-theme="light"]) .login-form {
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 24px;
  border: 1px solid rgba(16, 185, 129, 0.3);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.2),
    0 0 0 1px rgba(16, 185, 129, 0.1);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

html:not([data-theme="light"]) .login-form:hover {
  border-color: rgba(16, 185, 129, 0.6);
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.3),
    0 0 0 1px rgba(16, 185, 129, 0.2);
}

html[data-theme="light"] .su-login-wrap.login-page .login-form.su-card,
html[data-theme="light"] .login-form {
  background: rgba(255, 255, 255, 0.8);
  background-color: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(100, 116, 139, 0.2);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

html[data-theme="light"] .login-form:hover {
  border-color: rgba(100, 116, 139, 0.35);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
}

html:not([data-theme="light"]) .su-login-wrap.login-page .su-text-small {
  color: rgba(226, 232, 240, 0.85);
}

html:not([data-theme="light"]) .su-login-wrap.login-page .su-label {
  color: rgba(226, 232, 240, 0.9);
}

html:not([data-theme="light"]) .su-login-wrap.login-page .su-input {
  background: rgba(15, 23, 42, 0.5);
  border-color: rgba(16, 185, 129, 0.25);
}

html:not([data-theme="light"]) .su-login-wrap.login-page .su-input:focus {
  border-color: rgba(16, 185, 129, 0.55);
}

html[data-theme="light"] .su-login-wrap.login-page .su-text-small {
  color: rgba(51, 65, 85, 0.85);
}

html[data-theme="light"] .su-login-wrap.login-page .su-label {
  color: rgba(30, 41, 59, 0.9);
}

html[data-theme="light"] .su-login-wrap.login-page .su-input {
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(100, 116, 139, 0.3);
  color: var(--su-text);
}

html[data-theme="light"] .su-login-wrap.login-page .su-input:focus {
  border-color: rgba(8, 145, 178, 0.45);
}

@media (prefers-reduced-motion: reduce) {
  html:not([data-theme="light"]) .su-login-wrap.login-page,
  html[data-theme="light"] .su-login-wrap.login-page {
    animation: none;
    background-position: 50% 50%;
  }

  html:not([data-theme="light"]) .su-login-wrap.login-page .nexis-gradient,
  html[data-theme="light"] .su-login-wrap.login-page .nexis-gradient {
    animation: none;
    background-position: 0% 50%;
  }
}

.su-login-card {
  position: relative;
  width: 100%;
  max-width: 28rem;
}

.su-login-theme-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  width: var(--su-tap-min);
  height: var(--su-tap-min);
  padding: 0;
}

.su-auth-link {
  font-size: 0.875rem;
  color: var(--su-accent);
  text-decoration: none;
  transition: color 0.18s ease, opacity 0.18s ease;
}

.su-auth-link:hover {
  text-decoration: underline;
  opacity: 0.85;
}

.su-auth-link--inline {
  font-size: 0.8125rem;
}

html:not([data-theme="light"]) .su-login-wrap .su-auth-link {
  color: var(--su-accent, #a78bfa);
}

html[data-theme="light"] .su-login-wrap .su-auth-link {
  color: var(--su-accent, #6d28d9);
}

.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;
}

/* Row delete (trash): smooth hover without layout thrash */
.su-row-delete {
  transition: color 0.18s ease, border-color 0.18s ease, opacity 0.18s ease, background-color 0.18s ease;
}

/* Appointments calendar: drag / drop */
.su-apt-day-root {
  display: flex;
  align-items: flex-start;
  gap: 0;
}
.su-apt-compact-wrap {
  width: 100%;
  min-height: 6rem;
}
.su-apt-day-compact-root {
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
  align-items: flex-start;
  gap: 0.5rem;
}
.su-apt-compact-col {
  flex: 1 1 140px;
  min-width: 140px;
  max-width: 220px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.su-apt-compact-header {
  min-height: 2.5rem;
}
.su-apt-compact-stack {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  background-color: var(--su-bg-card);
  border: 1px solid var(--su-border);
  min-height: 4rem;
  width: 100%;
  min-width: 0;
  overflow: hidden;
  box-sizing: border-box;
}
.su-apt-compact-card {
  position: relative;
  width: 100%;
  min-height: 3.25rem;
  cursor: pointer;
}
.su-apt-compact-card .su-apt-day-card-actions {
  position: static;
  margin-top: 0.35rem;
}
.su-apt-mobile-overview {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
  width: 100%;
  min-width: 0;
}
.su-apt-mobile-master-block {
  border: 1px solid var(--su-border);
  border-radius: var(--su-radius);
  background: var(--su-bg-card);
  padding: 0.75rem;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
.su-apt-mobile-master-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}
.su-apt-mobile-card-stack {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.625rem;
  width: 100%;
  min-width: 0;
}
.su-apt-mobile-card-stack .su-apt-card {
  position: relative;
  top: auto;
  left: auto;
  right: auto;
  height: auto;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  box-sizing: border-box;
}
.su-apt-day-timeline {
  position: relative;
  height: 0.5rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--su-border) 65%, transparent);
  overflow: hidden;
  width: 100%;
}
.su-apt-day-timeline-seg {
  position: absolute;
  top: 0;
  bottom: 0;
  min-width: 2px;
  border-radius: 2px;
}
.su-apt-timeline-seg--confirmed {
  background: color-mix(in srgb, var(--su-success) 75%, var(--su-bg-card));
}
.su-apt-timeline-seg--created {
  background: color-mix(in srgb, #eab308 80%, var(--su-bg-card));
}
.su-apt-timeline-seg--completed {
  background: color-mix(in srgb, #3b82f6 70%, var(--su-bg-card));
}
.su-apt-timeline-seg--busy {
  background: var(--su-accent);
}
.su-apt-masters-row {
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
  align-items: flex-start;
}
.su-apt-time-gutter {
  flex: 0 0 52px;
  width: 52px;
  display: flex;
  flex-direction: column;
  position: sticky;
  left: 0;
  z-index: 12;
  background: var(--su-bg);
}
.su-apt-time-labels {
  position: relative;
  width: 100%;
}
.su-apt-time-label {
  position: absolute;
  left: 0;
  right: 0;
  padding-right: 4px;
  text-align: right;
  color: var(--su-text-muted);
  font-size: 0.6875rem;
  line-height: 1;
  pointer-events: none;
  white-space: nowrap;
}
.su-apt-col-header-spacer--day {
  height: 2.5rem;
  min-height: 2.5rem;
  flex-shrink: 0;
}
.su-apt-master-col {
  position: relative;
  flex: 1 1 0;
  min-width: 140px;
  max-width: 220px;
}
.su-apt-grid-layer,
.su-apt-week-col {
  position: relative;
}
.su-apt-grid-layer {
  background-color: var(--su-bg-card);
  background-image: linear-gradient(
    to bottom,
    color-mix(in srgb, var(--su-border) 65%, transparent) 1px,
    transparent 1px
  );
  background-size: 100% 96px;
}
html[data-theme="dark"] .su-apt-grid-layer,
html:not([data-theme="light"]) .su-apt-grid-layer {
  background-image: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.1) 1px,
    transparent 1px
  );
}
.su-apt-slot-line,
.su-apt-slot,
.su-apt-card {
  position: absolute;
}
.su-apt-compact-stack .su-apt-card,
.su-apt-compact-card.su-apt-card {
  position: relative;
  top: auto;
  left: auto;
  right: auto;
  height: auto;
  min-height: 3.25rem;
  max-width: 100%;
  overflow: hidden;
  box-sizing: border-box;
}
.su-apt-slot-line,
.su-apt-slot {
  left: 0;
  right: 0;
}
.su-apt-slot--drop {
  background: rgba(167, 139, 250, 0.14);
}
.su-apt-list-card {
  border: 1px solid var(--su-border);
  border-radius: 0.75rem;
  background: var(--su-nested-bg);
  padding: 0.625rem;
  font-size: 0.75rem;
  line-height: 1.25;
  position: relative;
}
.su-apt-list-card--completed,
.su-card.su-apt-list-card--completed {
  opacity: 0.72;
  border-color: color-mix(in srgb, var(--su-border) 70%, var(--su-text-muted));
  background: color-mix(in srgb, var(--su-nested-bg) 85%, var(--su-text-muted));
}
.su-apt-list-card--completed .su-apt-list-client,
.su-apt-list-card--completed .su-apt-list-time,
.su-apt-list-card--completed .su-apt-list-service,
.su-card.su-apt-list-card--completed .font-medium,
.su-card.su-apt-list-card--completed .su-text-small {
  color: var(--su-text-muted);
  text-decoration: line-through;
  text-decoration-color: color-mix(in srgb, var(--su-text-muted) 65%, transparent);
}
.su-apt-list-card--cancelled,
.su-card.su-apt-list-card--cancelled {
  opacity: 0.55;
  border-style: dashed;
}
.su-apt-list-card--cancelled .su-apt-list-client,
.su-card.su-apt-list-card--cancelled .font-medium {
  color: var(--su-text-muted);
}
.su-apt-list-main {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
}
.su-apt-list-client {
  min-width: 0;
  color: var(--su-text);
  font-weight: 650;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.su-apt-list-status {
  flex: 0 0 auto;
  font-size: 0.625rem;
  line-height: 1;
  padding: 0.25rem 0.4rem;
}
.su-apt-list-time {
  margin-top: 0.25rem;
  color: var(--su-text-muted);
  font-size: 0.6875rem;
}
.su-apt-list-service {
  margin-top: 0.125rem;
  color: var(--su-text-muted);
  font-size: 0.6875rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.su-apt-list-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 0.375rem;
  margin-top: 0.625rem;
  max-width: 100%;
}
.su-apt-week-toolbar {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.5rem;
  max-width: 100%;
}
.su-apt-week-toolbar .su-apt-week-btn {
  min-height: 2.25rem;
  min-width: 2.25rem;
  width: 2.25rem;
  max-width: 2.25rem;
  padding: 0;
  font-size: 0.875rem;
  line-height: 1;
  flex: 0 0 auto;
}
.su-apt-week-toolbar .su-apt-week-btn svg {
  width: 1rem;
  height: 1rem;
  display: block;
  flex-shrink: 0;
}
.su-apt-action {
  min-height: 1.75rem;
  border-radius: 0.5rem;
  padding: 0 0.55rem;
  border: 1px solid var(--su-border);
  background: transparent;
  font-size: 0.6875rem;
  font-weight: 600;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}
.su-apt-action-primary {
  color: var(--su-accent);
}
.su-apt-action-primary:hover {
  border-color: var(--su-accent);
  background: rgba(167, 139, 250, 0.1);
}
.su-apt-action-danger {
  color: var(--su-text-muted);
}
.su-apt-action-danger:hover {
  border-color: var(--su-error);
  color: var(--su-error);
}
.su-apt-action-success {
  color: var(--su-success);
}
.su-apt-action-success:hover {
  border-color: var(--su-success);
  background: rgba(52, 211, 153, 0.12);
}
.su-apt-action-success:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
html[data-theme="dark"] .su-calendar-icon,
html:not([data-theme="light"]) .su-calendar-icon {
  color: #c084fc;
}
html[data-theme="dark"] .su-date-input,
html:not([data-theme="light"]) .su-date-input {
  color-scheme: dark;
}
html[data-theme="dark"] .su-date-input::-webkit-calendar-picker-indicator,
html:not([data-theme="light"]) .su-date-input::-webkit-calendar-picker-indicator {
  cursor: pointer;
  opacity: 1;
  filter: invert(72%) sepia(47%) saturate(1140%) hue-rotate(211deg) brightness(102%) contrast(98%);
}
html[data-theme="dark"] .su-apt-board,
html:not([data-theme="light"]) .su-apt-board {
  padding: 0.25rem;
  border-radius: 1rem;
  background:
    linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    rgba(167, 139, 250, 0.06);
  background-size: 100% 44px;
}
html[data-theme="dark"] .su-apt-master-card,
html:not([data-theme="light"]) .su-apt-master-card {
  border-color: rgba(255, 255, 255, 0.22) !important;
  background: rgba(30, 41, 59, 0.82);
}
html[data-theme="dark"] .su-apt-master-card > p:first-child,
html:not([data-theme="light"]) .su-apt-master-card > p:first-child {
  border-color: rgba(255, 255, 255, 0.2) !important;
  color: rgba(241, 245, 249, 0.9);
}
html[data-theme="dark"] .su-apt-list-card,
html:not([data-theme="light"]) .su-apt-list-card {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(15, 23, 42, 0.52);
}
html[data-theme="dark"] .su-apt-list-card:hover,
html:not([data-theme="light"]) .su-apt-list-card:hover {
  border-color: rgba(167, 139, 250, 0.36);
  background: rgba(167, 139, 250, 0.12);
}
html[data-theme="dark"] .su-apt-list-time,
html[data-theme="dark"] .su-apt-list-service,
html:not([data-theme="light"]) .su-apt-list-time,
html:not([data-theme="light"]) .su-apt-list-service {
  color: rgba(226, 232, 240, 0.78);
}
.su-apt-card--drag {
  opacity: 0.5;
  cursor: grabbing !important;
}
.su-apt-card--conflict {
  animation: su-apt-shake 0.35s ease;
  border-color: var(--su-error) !important;
}
@keyframes su-apt-shake {
  0%,
  100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-3px);
  }
  75% {
    transform: translateX(3px);
  }
}
.su-apt-week-col {
  min-height: 12rem;
}
.su-apt-timeline-wrap {
  margin-bottom: 1rem;
}
.su-apt-col-header-spacer {
  flex-shrink: 0;
}
.su-apt-col-header {
  flex-shrink: 0;
}
.su-apt-slot--clickable {
  pointer-events: auto;
  z-index: 1;
}
.su-apt-slot--clickable:hover {
  background: rgba(167, 139, 250, 0.08);
}
.su-apt-slot--off {
  background: color-mix(in srgb, var(--su-nested-bg) 88%, var(--su-text-muted));
  pointer-events: none;
  z-index: 0;
}
.su-apt-master-col--off .su-apt-grid-layer {
  background: color-mix(in srgb, var(--su-nested-bg) 75%, var(--su-text-muted));
  opacity: 0.65;
}
.su-apt-now-line {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--su-error);
  z-index: 5;
  pointer-events: none;
}
.su-apt-now-line::before {
  content: "";
  position: absolute;
  left: 0;
  top: -3px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--su-error);
}
.su-apt-card {
  border: 1px solid var(--su-border);
  color: var(--su-text);
  z-index: 4;
  pointer-events: auto;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 2px;
  box-sizing: border-box;
}
.su-apt-card-body {
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
}
.su-apt-day-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  flex-shrink: 0;
  pointer-events: auto;
  margin-top: auto;
  padding-top: 2px;
}
.su-apt-day-card-actions .su-icon-btn {
  min-height: 28px;
  min-width: 28px;
  padding: 0;
  font-size: 0.75rem;
}
.su-apt-day-card-actions .su-icon-btn svg,
.su-apt-week-toolbar .su-icon-btn svg {
  width: 1rem;
  height: 1rem;
  display: block;
  flex-shrink: 0;
}
.su-apt-card--confirmed {
  background: color-mix(in srgb, var(--su-success) 22%, var(--su-bg-card));
  border-color: color-mix(in srgb, var(--su-success) 55%, var(--su-border));
}
.su-apt-card--created {
  background: color-mix(in srgb, #eab308 24%, var(--su-bg-card));
  border-color: color-mix(in srgb, #eab308 50%, var(--su-border));
}
.su-apt-card--cancelled {
  background: color-mix(in srgb, var(--su-error) 18%, var(--su-bg-card));
  border-color: color-mix(in srgb, var(--su-error) 45%, var(--su-border));
  opacity: 0.75;
  text-decoration: line-through;
}
.su-apt-card--completed {
  background: color-mix(in srgb, #3b82f6 18%, var(--su-bg-card));
  border-color: color-mix(in srgb, #3b82f6 40%, var(--su-border));
  opacity: 0.82;
}

/* Period overview: compact day cards */
.su-period-nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.su-period-nav-label {
  font-size: 0.875rem;
  font-weight: 600;
  min-width: 10rem;
  text-align: center;
}
.su-period-cards {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 100%;
}
.su-period-cards--grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 0.75rem;
}
.su-period-cards--scroll {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  overflow-x: auto;
  gap: 0.75rem;
  padding-bottom: 0.35rem;
  -webkit-overflow-scrolling: touch;
}
.su-period-day-card {
  border: 1px solid var(--su-border);
  border-radius: var(--su-radius);
  background: var(--su-bg-card);
  padding: 0.75rem;
  cursor: pointer;
  text-align: left;
  width: 100%;
  min-height: 7.5rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.su-period-cards--scroll .su-period-day-card,
.su-period-cards--grid .su-period-day-card {
  width: auto;
  min-width: 148px;
  max-width: 180px;
  flex: 0 0 auto;
}
.su-period-day-card:hover {
  border-color: color-mix(in srgb, var(--su-accent) 45%, var(--su-border));
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}
.su-period-day-card--today {
  border-color: color-mix(in srgb, var(--su-accent) 55%, var(--su-border));
}
.su-period-day-card__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.35rem;
}
.su-period-day-card__num {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1;
  color: var(--su-text);
}
.su-period-day-card__wd {
  font-size: 0.6875rem;
  text-transform: capitalize;
  color: var(--su-text-muted);
}
.su-period-day-card__stats {
  font-size: 0.6875rem;
  color: var(--su-text-muted);
  line-height: 1.35;
}
.su-period-day-card__bar {
  height: 4px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--su-nested-bg) 80%, var(--su-text-muted));
  overflow: hidden;
  margin-top: 0.15rem;
}
.su-period-day-card__bar > span {
  display: block;
  height: 100%;
  background: var(--su-accent);
  border-radius: 999px;
}
.su-period-day-detail-list {
  max-height: min(70vh, 28rem);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.su-day-detail-modal {
  position: relative;
}
.su-day-detail-modal__head {
  position: relative;
  padding-right: 3rem;
}
.su-day-detail-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}
.su-day-detail-time {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--su-text);
}
.su-day-detail-client {
  margin: 0;
}
.su-day-detail-meta {
  margin: 0.15rem 0 0.5rem;
}
.su-day-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.35rem;
}

/* Модалка дня: подсветка кнопок, не всей карточки */
.su-day-detail-modal .su-apt-list-card:hover,
.su-day-detail-modal .su-card.su-apt-list-card:hover {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(15, 23, 42, 0.52);
}

html[data-theme="light"] .su-day-detail-modal .su-apt-list-card:hover,
body.su-app.su-theme-light .su-day-detail-modal .su-apt-list-card:hover {
  border-color: var(--su-border);
  background: var(--su-nested-bg);
  box-shadow: none;
  transform: none;
}

.su-day-detail-actions .su-btn-secondary:hover:not(:disabled) {
  background-color: rgba(167, 139, 250, 0.14);
  border-color: color-mix(in srgb, var(--su-accent) 55%, var(--su-border));
}

html[data-theme="light"] .su-day-detail-actions .su-btn-secondary:hover:not(:disabled),
body.su-app.su-theme-light .su-day-detail-actions .su-btn-secondary:hover:not(:disabled) {
  background-color: rgba(139, 92, 246, 0.1);
  border-color: rgba(124, 58, 237, 0.32);
}

.su-day-detail-actions .su-day-detail-btn--primary:hover:not(:disabled) {
  border-color: var(--su-success);
  color: var(--su-success);
  background-color: rgba(52, 211, 153, 0.12);
}

.su-day-detail-actions .su-day-detail-btn--cancel:hover:not(:disabled) {
  border-color: var(--su-error);
  color: var(--su-error);
  background-color: rgba(248, 113, 113, 0.12);
}

/* --- Mobile: без горизонтальной прокрутки страницы --- */
@media (max-width: 767px) {
  html,
  body.su-app {
    overflow-x: hidden;
    max-width: 100%;
  }

  .su-app > .flex.min-h-screen {
    min-width: 0;
    max-width: 100%;
  }

  .su-app main,
  .su-content-fade {
    min-width: 0;
    max-width: 100%;
    overflow-x: hidden;
  }

  .su-topbar {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .su-card-metric {
    grid-template-columns: auto 1fr;
  }

  .su-period-cards--scroll {
    flex-wrap: wrap;
    overflow-x: visible;
  }

  .su-period-cards--scroll .su-period-day-card {
    min-width: calc(50% - 0.375rem);
    max-width: none;
    flex: 1 1 calc(50% - 0.375rem);
  }

  .su-table-wrap {
    overflow-x: visible;
  }

  .su-table-wrap > .su-table thead {
    display: none;
  }

  .su-table-wrap > .su-table tbody tr {
    display: block;
    margin-bottom: 0.65rem;
    padding: 0.65rem 0.75rem;
    border: 1px solid var(--su-border);
    border-radius: var(--su-radius);
    background: var(--su-bg-card);
  }

  .su-table-wrap > .su-table tbody td {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.3rem 0;
    border: none;
    text-align: right;
    white-space: normal;
  }

  .su-table-wrap > .su-table tbody td::before {
    content: attr(data-label);
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--su-text-muted);
    text-align: left;
    flex: 1 1 40%;
  }

  .su-table-wrap > .su-table tbody td:last-child {
    justify-content: flex-end;
  }

  .su-pagination--bar {
    flex-wrap: wrap;
    justify-content: center;
  }

  /* Типографика и отступы */
  .su-app main,
  .su-app main.su-content-fade {
    padding: 16px !important;
    font-size: 16px;
  }

  .su-text-small {
    font-size: 14px;
  }

  .su-topbar {
    padding-left: 12px;
    padding-right: 12px;
  }

  /* Кнопки и поля */
  .su-btn {
    min-height: 44px;
    padding-left: 12px;
    padding-right: 12px;
    font-size: 16px;
  }

  .su-btn-secondary.rounded-full,
  .su-page-btn {
    min-height: 44px;
  }

  .su-input,
  .su-select,
  .su-date-input {
    min-height: 48px;
    font-size: 16px;
  }

  .su-icon-btn {
    min-height: 44px;
    min-width: 44px;
  }

  /* Сайдбар на весь экран */
  #shell-root {
    width: 100% !important;
    max-width: 100% !important;
  }

  #shell-root .su-sidebar-inner {
    min-height: 100vh;
    padding-top: 0.5rem;
  }

  #shell-root .su-sidebar-link {
    min-height: 48px;
    font-size: 16px;
  }

  /* Карточки записей / списков */
  .su-mobile-card-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .su-record-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 14px 16px;
    border: 1px solid var(--su-border);
    border-radius: var(--su-radius);
    background: var(--su-bg-card);
    text-align: left;
    width: 100%;
    cursor: pointer;
    transition: background 0.15s ease;
  }

  .su-record-card:active {
    background: var(--su-table-row-hover);
  }

  .su-record-card__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
  }

  .su-record-card__title {
    font-size: 16px;
    font-weight: 600;
    color: var(--su-text);
    line-height: 1.3;
  }

  .su-record-card__meta {
    font-size: 14px;
    color: var(--su-text-muted);
    line-height: 1.4;
  }

  .su-record-card__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 4px;
  }

  .su-record-card__actions .su-btn {
    flex: 1 1 auto;
    min-width: calc(50% - 4px);
  }

  /* Фильтры — выезжающая панель */
  .su-mobile-filters-backdrop {
    position: fixed;
    inset: 0;
    z-index: 55;
    background: rgba(0, 0, 0, 0.5);
  }

  .su-mobile-filters-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 60;
    width: min(100%, 22rem);
    max-width: 100%;
    background: var(--su-bg-card);
    border-left: 1px solid var(--su-border);
    padding: 16px;
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform 0.2s ease;
    box-shadow: var(--su-shadow-lg);
  }

  .su-mobile-filters-drawer--open {
    transform: translateX(0);
  }

  .su-mobile-filters-drawer__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 16px;
  }

  .su-mobile-toolbar {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
  }

  .su-mobile-toolbar .su-btn {
    flex: 1;
  }

  /* Таблицы → карточки (fallback для страниц без su-mobile-card-list) */
  .su-table-wrap > .su-table tbody td {
    font-size: 16px;
  }

  .su-table-wrap > .su-table tbody td::before {
    font-size: 14px;
  }

  .su-table-elevated--desktop-only .su-table-wrap {
    display: none;
  }

  /* Финансы: блоки */
  .su-finance-mobile-stack {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .su-finance-shift-card {
    padding: 16px;
    border: 1px solid var(--su-border);
    border-radius: var(--su-radius);
    background: var(--su-bg-card);
  }

  /* Метрики дашборда */
  .su-card-metric {
    gap: 12px;
  }

  .su-card-metric .text-2xl {
    font-size: 1.5rem;
  }

  /* Скрыть десктоп-only */
  .su-desktop-only {
    display: none !important;
  }
}

@media (min-width: 768px) {
  .su-mobile-only {
    display: none !important;
  }
}

.su-mobile-master-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* Подписки — сетка тарифов */
.su-subscriptions-trial-banner {
  border: 1px solid color-mix(in srgb, var(--su-accent) 42%, var(--su-border));
  background: color-mix(in srgb, var(--su-accent) 8%, var(--su-nested-bg));
}

.su-subscriptions-grid-scroll {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 1rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.su-subscriptions-grid-scroll > .su-subscription-card {
  flex: 0 0 auto;
  min-width: 280px;
  max-width: min(320px, 88vw);
  scroll-snap-align: start;
}

.su-subscription-card-featured {
  box-shadow: var(--su-card-shadow-lg);
  border-color: color-mix(in srgb, var(--su-accent) 55%, var(--su-border));
}

.su-subscription-feature-group + .su-subscription-feature-group {
  margin-top: 0.875rem;
  padding-top: 0.875rem;
  border-top: 1px solid color-mix(in srgb, var(--su-border) 65%, transparent);
}

.su-subscription-badge {
  font-size: 0.6875rem;
  font-weight: 600;
  line-height: 1.2;
  padding: 0.2rem 0.5rem;
  border-radius: 9999px;
  white-space: nowrap;
}

.su-subscription-badge--popular {
  background: color-mix(in srgb, var(--su-accent) 18%, transparent);
  color: var(--su-accent);
  border: 1px solid color-mix(in srgb, var(--su-accent) 35%, var(--su-border));
}

.su-subscription-badge--current {
  background: color-mix(in srgb, var(--su-success) 18%, transparent);
  color: var(--su-success);
  border: 1px solid color-mix(in srgb, var(--su-success) 35%, var(--su-border));
}

@media (min-width: 768px) {
  .su-subscriptions-grid-scroll {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow-x: visible;
    scroll-snap-type: none;
    align-items: stretch;
  }

  .su-subscriptions-grid-scroll > .su-subscription-card {
    min-width: 0;
    max-width: none;
    flex: initial;
  }

  .su-subscription-card-featured {
    transform: scale(1.02);
    z-index: 1;
  }
}

@media (min-width: 1280px) {
  .su-subscriptions-grid-scroll {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* Тарифы в модалке «Настройки» — без горизонтального скролла и scale */
.su-settings-plans-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.75rem;
  max-height: min(52vh, 540px);
  overflow-y: auto;
  padding-right: 0.125rem;
}

@media (min-width: 640px) {
  .su-settings-plans-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.su-settings-plans-grid > .su-subscription-card {
  min-width: 0;
  max-width: none;
  flex: initial;
}

.su-settings-plans-grid .su-subscription-card-featured {
  transform: none;
  z-index: auto;
}

.su-settings-plan-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.su-settings-plan-price {
  margin-top: 0.5rem;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.25;
  white-space: nowrap;
}
