:root {
  --bg: var(--tg-theme-secondary-bg-color, #f2f4f7);
  --surface: var(--tg-theme-bg-color, #ffffff);
  --section-bg: var(--tg-theme-section-bg-color, var(--tg-theme-bg-color, #ffffff));
  --text: var(--tg-theme-text-color, #18222d);
  --hint: var(--tg-theme-hint-color, #6b7a8c);
  --accent: var(--tg-theme-button-color, #2481cc);
  --primary: var(--accent);
  --accent-text: var(--tg-theme-button-text-color, #ffffff);
  --link: var(--tg-theme-link-color, #2481cc);
  --destructive: var(--tg-theme-destructive-text-color, #e53935);

  --border: color-mix(in srgb, var(--text) 11%, transparent);
  --soft-bg: color-mix(in srgb, var(--accent) 11%, transparent);
  --warn-bg: rgba(245, 158, 11, 0.14);
  --warn-border: rgba(245, 158, 11, 0.45);
  --warn-text: #b45309;
  --err-bg: rgba(239, 68, 68, 0.13);
  --err-border: rgba(239, 68, 68, 0.42);
  --err-text: #c62828;
  --ok-bg: rgba(16, 185, 129, 0.14);
  --ok-text: #047857;

  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

/* Авто-коррекция контраста предупреждений в тёмной теме Telegram */
body.tg-dark {
  --border: rgba(255, 255, 255, 0.1);
  --warn-text: #fbbf24;
  --err-text: #f87171;
  --ok-text: #34d399;
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.42;
  min-height: 100vh;
  overflow-x: hidden;
}

.hidden {
  display: none !important;
}

body.tg-dark .config-note > div {
  background: rgba(59, 130, 246, 0.14) !important;
  color: #bfdbfe !important;
}

/* ===== Загрузка ===== */
.loading-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  z-index: 999;
}
.spinner {
  width: 34px;
  height: 34px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
.loading-text {
  font-size: 14px;
  color: var(--hint);
  font-weight: 500;
}

/* ===== Оболочка приложения ===== */
.app-shell {
  max-width: 680px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding-bottom: calc(88px + var(--safe-bottom));
}

/* ===== Шапка ===== */
.app-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.header-titles {
  min-width: 0;
}
.header-title {
  font-size: 16px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.header-subtitle {
  font-size: 12px;
  color: var(--hint);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: none;
  background: transparent;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 18px;
}
.icon-btn:active {
  background: var(--soft-bg);
}

.role-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--soft-bg);
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.cart-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}
.cart-pill.has-items {
  background: var(--accent);
  color: var(--accent-text);
  border-color: transparent;
}
.cart-pill:active {
  transform: scale(0.96);
}

/* ===== Индикатор шагов ===== */
.stepper {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 8px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
}
.step-item {
  border: none;
  background: transparent;
  color: var(--hint);
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 6px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.step-num {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--border);
  color: var(--hint);
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.step-item.active {
  color: var(--accent);
}
.step-item.active .step-num {
  background: var(--accent);
  color: var(--accent-text);
}
.step-item.done {
  color: var(--text);
}
.step-item.done .step-num {
  background: var(--ok-bg);
  color: var(--ok-text);
}
.step-line {
  flex: 1;
  height: 1px;
  background: var(--border);
  min-width: 8px;
}
@media (max-width: 400px) {
  .step-label { font-size: 11px; }
  .step-item { gap: 4px; padding: 4px 2px; }
}

/* ===== Баннер превью клиента ===== */
.preview-banner {
  background: #0f766e;
  color: #ffffff;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.preview-exit-btn {
  border: 1px solid rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

/* ===== Контейнер шагов ===== */
.view-container {
  padding: 14px;
  flex: 1;
}
.step-view {
  display: none;
  animation: fadeIn 0.18s ease-out;
}
.step-view.active {
  display: block;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== Поиск ===== */
.search-box {
  position: relative;
  margin-bottom: 14px;
}
.search-icon {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--hint);
  pointer-events: none;
}
.search-box input {
  width: 100%;
  padding: 12px 14px 12px 40px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--section-bg);
  color: var(--text);
  font-size: 15px;
  outline: none;
}
.search-box input:focus {
  border-color: var(--accent);
}

/* ===== Шаг 1: Сетка категорий ===== */
.category-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
@media (max-width: 340px) {
  .category-grid { grid-template-columns: 1fr; }
}

.category-card {
  background: var(--section-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  text-align: left;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: var(--shadow);
  transition: transform 0.12s ease, border-color 0.12s ease;
  color: var(--text);
}
.category-card:active {
  transform: scale(0.97);
  border-color: var(--accent);
}
.cat-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.cat-icon {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: var(--soft-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 21px;
}
.cat-count {
  font-size: 11px;
  font-weight: 700;
  color: var(--hint);
  background: var(--bg);
  padding: 3px 8px;
  border-radius: 999px;
}
.cat-name {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.25;
}
.cat-desc {
  font-size: 12px;
  color: var(--hint);
  line-height: 1.3;
}

.info-footnote {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  color: var(--hint);
  padding: 0 2px;
}
.rate-pill {
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--section-bg);
  border: 1px solid var(--border);
  font-weight: 600;
  color: var(--text);
}

/* ===== Шаг 2: Список систем ===== */
.section-heading {
  margin-bottom: 12px;
}
.section-heading h2 {
  margin: 0;
  font-size: 19px;
  font-weight: 700;
}
.muted-text {
  margin: 3px 0 0;
  font-size: 13px;
  color: var(--hint);
}
.row-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.system-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}
.system-card {
  background: var(--section-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 13px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  text-align: left;
  color: var(--text);
  box-shadow: var(--shadow);
  transition: transform 0.1s ease;
}
.system-card:active {
  transform: scale(0.985);
  border-color: var(--accent);
}
.sys-info {
  min-width: 0;
}
.sys-name {
  font-size: 15px;
  font-weight: 700;
}
.sys-sub {
  font-size: 12.5px;
  color: var(--hint);
  margin-top: 2px;
}
.sys-arrow {
  color: var(--hint);
  flex-shrink: 0;
}

/* ===== Шаг 3: Выбранная система и форма ===== */
.selected-system-bar {
  background: var(--section-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.selected-sys-cat {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.selected-sys-name {
  font-size: 15px;
  font-weight: 700;
  margin-top: 1px;
}

/* Группировка полей в мобильные карточки */
.form-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.form-section-card {
  background: var(--section-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: var(--shadow);
}

.form-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.form-section-header.collapsible {
  cursor: pointer;
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
  user-select: none;
}
.form-section-card.open .form-section-header.collapsible {
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.form-section-title {
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 7px;
}
.section-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--ok-bg);
  color: var(--ok-text);
}
.section-chevron {
  color: var(--hint);
  transition: transform 0.2s ease;
  font-size: 13px;
}
.form-section-card.open .section-chevron {
  transform: rotate(180deg);
}

.form-section-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.form-section-card.collapsed .form-section-body {
  display: none;
}
@media (max-width: 440px) {
  .form-section-body.single-col-mobile {
    grid-template-columns: 1fr;
  }
}

.field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}
.field.full {
  grid-column: 1 / -1;
}
.field label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--hint);
}
.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s;
}
.field textarea {
  min-height: 68px;
  resize: vertical;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--accent);
  background: var(--surface);
}
.hint {
  font-size: 11.5px;
  color: var(--hint);
  line-height: 1.3;
}

/* Степпер количества */
.qty-stepper {
  display: flex;
  align-items: center;
  gap: 8px;
}
.qty-stepper input {
  text-align: center;
  font-weight: 700;
}
.qty-btn {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 20px;
  font-weight: 600;
  cursor: pointer;
}
.qty-btn:active {
  background: var(--soft-bg);
  border-color: var(--accent);
}

/* Кнопка-триггер поиска ткани */
.picker-trigger {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 14.5px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
  text-align: left;
}
.picker-trigger:active {
  border-color: var(--accent);
  background: var(--surface);
}
.picker-trigger-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.picker-trigger-icon {
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

/* ===== Предупреждения и ошибки ===== */
.alert-box {
  display: none;
  padding: 11px 13px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 12px;
  line-height: 1.4;
}
.alert-warn {
  background: var(--warn-bg);
  border: 1px solid var(--warn-border);
  color: var(--warn-text);
}
.alert-err {
  background: var(--err-bg);
  border: 1px solid var(--err-border);
  color: var(--err-text);
}

/* ===== Карточка результата расчёта ===== */
.price-card {
  margin-top: 14px;
  background: var(--section-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 15px;
  box-shadow: var(--shadow);
}
.price-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.price-label {
  font-size: 12px;
  color: var(--hint);
  font-weight: 600;
}
.price-main-rub {
  font-size: 26px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.price-sub-ue {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  margin-top: 2px;
}

.price-breakdown {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}
.price-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  margin-bottom: 5px;
}
.dealer-meta-row {
  margin-top: 6px;
  font-size: 12px;
  color: var(--hint);
}

.config-note {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--border);
  font-size: 12px;
  color: var(--hint);
  word-break: break-word;
}

/* Скрываем дилерские блоки в клиентском режиме */
body.client-mode .dealer-only {
  display: none !important;
}

/* ===== Кнопки ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 44px;
  padding: 10px 16px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-size: 14.5px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.1s ease, opacity 0.15s ease;
}
.btn:active {
  transform: scale(0.98);
}
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.btn-primary {
  background: var(--accent);
  color: var(--accent-text);
}
.btn-outline {
  background: var(--section-bg);
  border-color: var(--border);
  color: var(--text);
}
.btn-soft {
  background: var(--soft-bg);
  color: var(--accent);
}
.btn-full {
  width: 100%;
}
.btn-lg {
  min-height: 50px;
  font-size: 15.5px;
}
.btn-add-inline {
  white-space: nowrap;
  padding: 10px 16px;
}

.btn-chip {
  padding: 6px 11px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}
.btn-chip-danger {
  color: var(--destructive);
  border-color: var(--err-border);
  background: var(--err-bg);
}

/* ===== Шаг 4: Корзина и контакты ===== */
.cart-head-btns {
  display: flex;
  gap: 6px;
}
.cart-cards {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.cart-empty {
  background: var(--section-bg);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 28px 16px;
  text-align: center;
  color: var(--hint);
}
.cart-empty-icon {
  font-size: 32px;
  margin-bottom: 8px;
}
.cart-item-card {
  background: var(--section-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 13px 14px;
  box-shadow: var(--shadow);
}
.cart-item-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}
.cart-item-title {
  font-size: 15px;
  font-weight: 700;
}
.cart-item-size {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--accent);
  margin-top: 2px;
}
.cart-item-desc {
  font-size: 12px;
  color: var(--hint);
  margin-top: 6px;
  line-height: 1.38;
  word-break: break-word;
}
.cart-item-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}
.cart-item-price {
  font-size: 16px;
  font-weight: 800;
}
.cart-item-ue {
  font-size: 12.5px;
  color: var(--hint);
  margin-left: 6px;
  font-weight: 600;
}
.cart-del-btn {
  border: none;
  background: var(--err-bg);
  color: var(--err-text);
  border-radius: 8px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.cart-totals-card {
  margin-top: 14px;
  background: var(--section-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
}
.totals-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.totals-row.main {
  font-size: 17px;
  font-weight: 700;
}
.totals-row.main strong {
  font-size: 22px;
  color: var(--accent);
}
.totals-row.sub {
  margin-top: 4px;
  font-size: 13px;
  color: var(--hint);
}

.checkout-card {
  margin-top: 14px;
  background: var(--section-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 15px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.checkout-card h3 {
  margin: 0;
  font-size: 16px;
}

/* ===== Успешная отправка заказа ===== */
.success-card {
  background: var(--section-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 18px;
  text-align: center;
  box-shadow: var(--shadow);
}
.success-icon {
  width: 60px;
  height: 60px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: var(--ok-bg);
  color: var(--ok-text);
  font-size: 30px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}
.success-card h2 {
  margin: 0 0 6px;
  font-size: 20px;
}
.success-summary {
  margin: 16px 0;
  padding: 12px;
  border-radius: var(--radius-sm);
  background: var(--bg);
  text-align: left;
  font-size: 13px;
  line-height: 1.45;
}
.success-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ===== Нижняя фиксированная панель (резерв MainButton) ===== */
.bottom-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 45;
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 10px 14px calc(10px + var(--safe-bottom));
}
.bottom-bar .btn {
  max-width: 652px;
  margin: 0 auto;
  display: flex;
}

/* ===== Модальные шторки (Bottom Sheet) ===== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  animation: fadeIn 0.15s ease;
}
.modal-sheet {
  width: 100%;
  max-width: 680px;
  max-height: 85vh;
  background: var(--surface);
  border-radius: 18px 18px 0 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding-bottom: var(--safe-bottom);
}
.modal-sheet-tall {
  max-height: 92vh;
}
.modal-header {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-header h3 {
  margin: 0;
  font-size: 17px;
}
.modal-search {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
}
.modal-search input {
  width: 100%;
  min-height: 42px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  outline: none;
}
.modal-search input:focus {
  border-color: var(--accent);
}
.modal-list {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 6px 10px 16px;
}
.picker-row {
  width: 100%;
  border: none;
  background: transparent;
  color: var(--text);
  padding: 11px 10px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  text-align: left;
  cursor: pointer;
  font-size: 14.5px;
}
.picker-row:active,
.picker-row.selected {
  background: var(--soft-bg);
}
.picker-row.selected {
  font-weight: 700;
  color: var(--accent);
}
.picker-row-price {
  font-size: 12.5px;
  color: var(--hint);
  white-space: nowrap;
}

.modal-body {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ===== Карточки настроек и переключатель ===== */
.settings-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 13px;
}
.settings-card h4 {
  margin: 0 0 10px;
  font-size: 14.5px;
}
.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.settings-grid .field:last-child {
  grid-column: 1 / -1;
}
.stack-btns {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.switch {
  position: relative;
  display: inline-block;
  width: 46px;
  height: 26px;
  flex-shrink: 0;
}
.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: var(--border);
  border-radius: 999px;
  transition: 0.2s;
}
.slider:before {
  content: "";
  position: absolute;
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background: #ffffff;
  border-radius: 50%;
  transition: 0.2s;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}
.switch input:checked + .slider {
  background: var(--accent);
}
.switch input:checked + .slider:before {
  transform: translateX(20px);
}

.admin-orders-list {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.admin-order-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 12.5px;
}
.admin-order-head {
  display: flex;
  justify-content: space-between;
  font-weight: 700;
  margin-bottom: 4px;
}

/* ===== Тост ===== */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(82px + var(--safe-bottom));
  transform: translateX(-50%);
  z-index: 120;
  max-width: calc(100vw - 32px);
  background: rgba(20, 28, 38, 0.92);
  color: #ffffff;
  padding: 10px 16px;
  border-radius: 12px;
  font-size: 13.5px;
  font-weight: 600;
  text-align: center;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.22);
}
