﻿/* =====================================================================
   admin/styles.css вЂ” СЃС‚РёР»Рё Р°РґРјРёРЅ-РїР°РЅРµР»Рё.
   РЎРѕРІСЂРµРјРµРЅРЅС‹Р№ РґРёР·Р°Р№РЅ СЃ capped content width, sticky-С…РµРґРµСЂРѕРј,
   СЂРµС„Р°Р№РЅС‘РЅРЅРѕР№ С‚РёРїРѕРіСЂР°С„РёРєРѕР№ Рё РїР»РѕС‚РЅРѕСЃС‚СЊСЋ РґР°РЅРЅС‹С… РїРѕРґ РґРµСЃРєС‚РѕРї.
   ===================================================================== */

:root {
  /* === Р¦РІРµС‚Р° вЂ” Linear/Vercel-style С‚С‘РјРЅС‹Р№ РјРёРЅРёРјР°Р»РёР·Рј === */
  --bg:           #07080a;             /* РіР»СѓР±РѕРєРёР№ С‡С‘СЂРЅС‹Р№ С„РѕРЅ СЃС‚СЂР°РЅРёС†С‹ */
  --surface:      #0f1115;             /* sidebar, РєР°СЂС‚РѕС‡РєРё */
  --surface-2:    #16181d;             /* hover, Р°РєС‚РёРІРЅС‹Рµ СЌР»РµРјРµРЅС‚С‹ */
  --surface-3:    #1d2027;             /* РїСЂРёРїРѕРґРЅСЏС‚С‹Рµ (РјРѕРґР°Р»РєРё, РїРѕРїРѕРІРµСЂС‹) */
  --text:         #ededee;
  --text-soft:    #9aa0ac;
  --text-muted:   #5a5f6a;
  --accent:       #F4B83A;             /* Р±СЂРµРЅРґРѕРІС‹Р№ honey */
  --accent-hover: #ffc94a;
  --accent-soft:  rgba(244, 184, 58, 0.10);
  --accent-on:    #1A140E;
  --info:         #4d8bff;
  --success:      #4dd97a;
  --warn:         #ffcc00;
  --danger:       #ff5a52;
  --border:       rgba(255,255,255,0.06);
  --border-strong:rgba(255,255,255,0.10);
  --focus-ring:   0 0 0 2px rgba(244, 184, 58, 0.35);
  /* === РўРµРЅРё вЂ” РїСЂРёРіР»СѓС€С‘РЅРЅС‹Рµ, РЅРµ В«Р°РєСЂРёР»РѕРІС‹РµВ» === */
  --shadow-sm:    0 1px 0 rgba(0,0,0,0.4);
  --shadow-md:    0 2px 8px rgba(0,0,0,0.35);
  --shadow-lg:    0 8px 28px rgba(0,0,0,0.5);
  /* === Р Р°РґРёСѓСЃС‹ вЂ” РєРѕРјРїР°РєС‚РЅС‹Рµ === */
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;
  --r-pill: 999px;
  /* === Layout === */
  --sidebar-w:    228px;
  --content-max:  1100px;
  --topbar-h:     56px;
  --bg-soft:      var(--surface);
  --bg-soft-2:    var(--surface-2);
}

* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 14px;
  line-height: 1.45;
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  /* touch-action: manipulation — отключает double-tap-zoom (iOS Safari);
     pinch-zoom при этом продолжает работать на эту настройку, мы его глушим
     отдельно через gesturestart preventDefault в admin.html. */
  touch-action: manipulation;
  -webkit-text-size-adjust: 100%;
}
::selection { background: var(--accent-soft); color: var(--accent); }
button, input, textarea, select { font-family: inherit; color: inherit; font-size: inherit; }
/* РљР°СЃС‚РѕРјРЅС‹Р№ СЃРєСЂРѕР»Р»Р±Р°СЂ (С‚РѕР»СЊРєРѕ webkit/blink) */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #2f333d; }
::-webkit-scrollbar-track { background: transparent; }

/* ===== РЎРєРµР»РµС‚ ===== */
.ap-app {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  grid-template-rows: 1fr;
  min-height: 100vh;
}
.ap-sidebar          { grid-column: 1; grid-row: 1; }
.ap-sidebar-backdrop { grid-column: 1 / -1; grid-row: 1; }
.ap-main             { grid-column: 2; grid-row: 1; }

/* ===== Sidebar ===== */
.ap-sidebar {
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 16px 10px;
  padding-top: max(16px, env(safe-area-inset-top));
  position: sticky; top: 0;
  align-self: start;
  height: 100vh; height: 100dvh;
  overflow-y: auto;
  display: flex; flex-direction: column;
}
.ap-brand {
  font-size: 16px; font-weight: 800;
  letter-spacing: -0.02em;
  padding: 6px 12px 16px;
  display: flex; align-items: center; gap: 8px;
}
.ap-nav {
  display: flex; flex-direction: column; gap: 1px;
  flex: 1 1 auto;
}
.ap-nav-section {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  padding: 16px 12px 6px;
  margin-top: 4px;
}
.ap-nav-section:first-child { margin-top: 0; padding-top: 4px; }
.ap-nav-item {
  background: transparent; border: 0;
  color: var(--text-soft);
  padding: 8px 12px;
  border-radius: var(--r-sm);
  text-align: left;
  font-size: 13px; font-weight: 600;
  cursor: pointer;
  display: flex; align-items: center; gap: 10px;
  transition: background 0.15s, color 0.15s;
  position: relative;
}
/* РќР°С‚РёРІРЅС‹Р№ hidden РќР• СЂР°Р±РѕС‚Р°РµС‚ РЅР° СЌР»РµРјРµРЅС‚Р°С… СЃ display:flex Р±РµР· !important вЂ”
   СЃРїСЂСЏС‚Р°РЅРЅС‹Рµ РєРЅРѕРїРєРё/СЃРµРєС†РёРё СЃР°Р№РґР±Р°СЂР° (Р·Р°РіР»СѓС€РєРё) СѓР±РёСЂР°РµРј С‡РµСЂРµР· СЌС‚Сѓ РїРµСЂРµР±РёРІРєСѓ. */
.ap-nav-item[hidden], .ap-nav-section[hidden] { display: none !important; }

/* ===== РЎРІРѕСЂР°С‡РёРІР°РµРјС‹Рµ РіСЂСѓРїРїС‹ РІ СЃР°Р№РґР±Р°СЂРµ (Р—Р°РєР°Р·С‹ / РњРµРЅСЋ / РљР°С‚РµРіРѕСЂРёРё) ===== */
.ap-nav-group { display: contents; }
.ap-nav-group .ap-nav-chev {
  margin-left: auto;
  font-size: 11px;
  color: var(--text-muted);
  transition: transform 0.18s ease;
}
.ap-nav-group.expanded .ap-nav-chev { transform: rotate(180deg); color: var(--accent); }

.ap-nav-children {
  display: none;
  flex-direction: column;
  gap: 2px;
  margin: 2px 0 6px 8px;
  padding-left: 10px;
  border-left: 1px solid var(--border);
}
.ap-nav-group.expanded .ap-nav-children { display: flex; }

.ap-nav-child {
  font-size: 12.5px;
  padding: 6px 10px;
  font-weight: 600;
}
.ap-nav-child.active { background: var(--accent-soft); color: var(--accent); }
.ap-nav-item:hover { background: var(--surface-2); color: var(--text); }
.ap-nav-item.active {
  background: var(--accent-soft);
  color: var(--accent);
}
.ap-nav-item.active::before {
  content: '';
  position: absolute; left: 0; top: 50%;
  transform: translateY(-50%);
  width: 3px; height: 16px;
  background: var(--accent);
  border-radius: 0 3px 3px 0;
}
.ap-nav-icon {
  width: 18px; height: 18px; flex: 0 0 18px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 14px;
}
.ap-nav-badge {
  margin-left: auto;
  background: var(--danger);
  color: #fff;
  font-size: 10px; font-weight: 800;
  padding: 1px 6px;
  border-radius: var(--r-pill);
  min-width: 16px; text-align: center;
}
.ap-nav-logout {
  margin-top: auto;
  margin-bottom: 4px;
  color: var(--text-soft);
  border-top: 1px solid var(--border);
  border-radius: 0;
  padding-top: 12px;
}
.ap-nav-logout:hover { color: var(--danger); background: transparent; }
.ap-nav-logout.active { background: transparent; color: var(--danger); }
.ap-nav-logout.active::before { display: none; }

/* ===== Main + Page Header ===== */
.ap-main {
  min-width: 0;
  /* РљР°РїРїРµСЂ: РЅР° С€РёСЂРѕРєРёС… СЌРєСЂР°РЅР°С… РєРѕРЅС‚РµРЅС‚ С†РµРЅС‚СЂРёСЂСѓРµС‚СЃСЏ РІ РєРѕР»РѕРЅРєРµ 1320px,
     РЅРµ СЂР°СЃС‚СЏРіРёРІР°РµС‚СЃСЏ С‚СѓРїРѕ РІРѕ РІСЃСЋ С€РёСЂРёРЅСѓ. РќР° СѓР·РєРёС… вЂ” РѕР±С‹С‡РЅС‹Рµ 24px РѕС‚СЃС‚СѓРїС‹. */
  padding: 0 max(24px, calc((100% - var(--content-max)) / 2));
  padding-bottom: 80px;
}
.ap-page-head {
  display: flex; align-items: center; gap: 14px;
  height: var(--topbar-h);
  margin-bottom: 22px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 10;
}
.ap-page-title {
  font-size: 17px; font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.ap-page-sub {
  color: var(--text-soft);
  font-size: 12px;
  margin-top: 2px;
  letter-spacing: -0.005em;
}
.ap-burger {
  display: none;
  background: var(--surface); border: 1px solid var(--border);
  width: 34px; height: 34px;
  border-radius: var(--r-sm);
  cursor: pointer;
  color: var(--text);
  align-items: center; justify-content: center;
  font-size: 18px;
}

/* ===== РђРґР°РїС‚РёРІ ===== */
@media (min-width: 1280px) and (max-width: 1599px) {
  :root { --sidebar-w: 220px; --content-max: 1040px; }
}
@media (min-width: 900px) and (max-width: 1279px) {
  :root { --sidebar-w: 210px; --content-max: 960px; }
  .ap-nav-item { font-size: 12.5px; padding: 7px 10px; gap: 8px; }
  .ap-nav-section { padding: 14px 10px 4px; }
}
@media (min-width: 720px) and (max-width: 899px) {
  :root { --sidebar-w: 200px; --content-max: 100%; }
  .ap-nav-item { font-size: 12px; padding: 7px 10px; gap: 6px; }
}
@media (max-width: 720px) {
  .ap-app { grid-template-columns: 1fr; }
  .ap-main {
    grid-column: 1;
    padding: 0 16px 80px;
  }
  .ap-page-head { padding: 14px 0 12px; gap: 10px; }
  .ap-page-title { font-size: 17px; }
  .ap-sidebar {
    position: fixed; left: -100%; top: 0;
    width: 82%; max-width: 300px;
    height: 100vh; height: 100dvh;
    transition: left 0.28s cubic-bezier(.22,.61,.36,1);
    z-index: 100;
    box-shadow: var(--shadow-lg);
  }
  .ap-sidebar.open { left: 0; }
  .ap-sidebar-backdrop {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.55);
    backdrop-filter: blur(4px);
    z-index: 99;
    display: none;
  }
  .ap-sidebar.open ~ .ap-sidebar-backdrop { display: block; }
  .ap-burger { display: inline-flex; }
}

/* ===== РљРЅРѕРїРєРё ===== */
.ap-btn {
  border: 1px solid transparent;
  background: var(--accent);
  color: var(--accent-on);
  padding: 8px 14px;
  height: 34px;
  border-radius: var(--r-sm);
  font-size: 13px; font-weight: 700;
  letter-spacing: -0.005em;
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  gap: 6px;
  white-space: nowrap;
  transition: background 0.15s ease, transform 0.08s ease, opacity 0.15s ease;
  user-select: none;
}
.ap-btn:hover { background: var(--accent-hover); }
.ap-btn:active { transform: translateY(0.5px); }
.ap-btn:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}
.ap-btn--ghost {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border-strong);
}
.ap-btn--ghost:hover { background: var(--surface-2); border-color: var(--border-strong); }
.ap-btn--danger {
  background: var(--danger); color: #fff;
}
.ap-btn--danger:hover { background: #ff706a; }
.ap-btn--success {
  background: var(--success); color: #001a05;
}
.ap-btn--success:hover { background: #5fdf8c; }
.ap-btn:disabled {
  opacity: 0.5; cursor: not-allowed;
  background: var(--surface); color: var(--text-muted);
}
.ap-btn:disabled:hover { background: var(--surface); }

.ap-toolbar {
  display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap;
  align-items: center;
}
/* РЎРµР»РµРєС‚С‹ Рё РёРЅРїСѓС‚С‹-РєР°Рє-РєРЅРѕРїРєРё РІРЅСѓС‚СЂРё toolbar */
.ap-toolbar select,
.ap-toolbar input[type="text"],
.ap-toolbar input:not([type]) {
  height: 34px;
  padding: 0 12px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-sm);
  color: var(--text);
  font-size: 13px; font-weight: 600;
  outline: none;
  cursor: pointer;
  transition: border-color 0.15s;
}
.ap-toolbar select:focus,
.ap-toolbar input:focus { border-color: var(--accent); }

/* ===== РљР°СЂС‚РѕС‡РєРё СЃРїРёСЃРєР° (С‚РѕРІР°СЂ / Р±Р°РЅРЅРµСЂ / РєР»РёРµРЅС‚) ===== */
.ap-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 14px;
  margin-bottom: 10px;
  display: flex; gap: 14px; align-items: flex-start;
  transition: border-color 0.15s, background 0.15s;
}
.ap-card:hover { border-color: var(--border-strong); }
.ap-card-img {
  width: 64px; height: 64px;
  border-radius: var(--r-sm);
  background: var(--surface-2); flex: 0 0 64px;
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; overflow: hidden; cursor: pointer;
  position: relative;
}
.ap-card-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ap-card-img-edit {
  position: absolute; right: 3px; bottom: 3px;
  background: rgba(0,0,0,0.7); border-radius: 50%;
  width: 20px; height: 20px;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px;
}
.ap-card-body { flex: 1; min-width: 0; cursor: pointer; }
.ap-card-name {
  font-weight: 700; font-size: 14px;
  margin-bottom: 3px;
  letter-spacing: -0.01em;
}
.ap-card-desc {
  color: var(--text-soft); font-size: 12.5px; line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.ap-card-meta { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.ap-chip {
  font-size: 11px; font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--r-pill);
  background: var(--surface-2);
  color: var(--text-soft);
  border: 1px solid var(--border);
}
.ap-chip.price { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.ap-chip.new   { background: rgba(77,217,122,0.12); color: var(--success); border-color: transparent; }
.ap-chip.stop  { background: rgba(255,90,82,0.12); color: var(--danger); border-color: transparent; }
.ap-card-actions { display: flex; flex-direction: column; gap: 4px; }
.ap-icon-btn {
  width: 30px; height: 30px;
  border-radius: var(--r-sm);
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-soft);
  cursor: pointer; font-size: 13px;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.ap-icon-btn:hover { background: var(--surface-2); color: var(--text); border-color: var(--border-strong); }
.ap-icon-btn.danger { color: var(--danger); }
.ap-icon-btn.danger:hover { background: rgba(255,90,82,0.1); border-color: rgba(255,90,82,0.3); }

/* ===== Р‘Р°Р·РѕРІР°СЏ С‚Р°Р±Р»РёС†Р° (СЃС‚Р°РЅРґР°СЂС‚РЅС‹Рµ <table> РІРЅСѓС‚СЂРё РјРѕРґСѓР»РµР№) ===== */
.ap-main table {
  border-collapse: collapse;
  width: 100%;
}
.ap-main table th {
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  padding: 10px 8px;
  border-bottom: 1px solid var(--border);
  background: transparent;
}
.ap-main table td {
  padding: 10px 8px;
  font-size: 13px;
  border-bottom: 1px solid var(--border);
}
.ap-main table tbody tr { transition: background 0.12s; }
.ap-main table tbody tr:hover { background: var(--surface-2); }
.ap-main table tbody tr:last-child td { border-bottom: 0; }
/* ap-table вЂ” РґР»СЏ РјРѕРґСѓР»РµР№ РєРѕС‚РѕСЂС‹Рµ СЂРµРЅРґРµСЂСЏС‚ С‚Р°Р±Р»РёС†Сѓ СЃ РѕС‚СЃС‚СѓРїР°РјРё РєР°Рє Сѓ dash-section */
.ap-main .ap-table th { padding-left: 18px; padding-right: 18px; }
.ap-main .ap-table th:first-child { padding-left: 18px; }
.ap-main .ap-table td { padding-left: 18px; padding-right: 18px; }
.ap-main .ap-table td:first-child { padding-left: 18px; }
.ap-main .ap-table td:last-child { padding-right: 18px; }

/* РЈС‚РёР»РёС‚Р°СЂРЅС‹Рµ СЌР»РµРјРµРЅС‚С‹ */
.ap-status-dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--text-muted);
  flex-shrink: 0;
}

/* РЎРµС‚РєР° РєР°СЂС‚РѕС‡РµРє РґР»СЏ РјРѕРґСѓР»РµР№ (С‚РѕРІР°СЂС‹/Р±Р°РЅРЅРµСЂС‹/РёСЃС‚РѕСЂРёРё/РєСѓСЂСЊРµСЂС‹/РїСЂ.) вЂ” РЅРµ
   single-column-stretch, Р° Р°РґР°РїС‚РёРІРЅС‹Рµ РїР»РёС‚РєРё. РќР° С€РёСЂРѕРєРёС… вЂ” 2-3 РІ СЂСЏРґ. */
.ap-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 10px;
  align-items: start;
}
.ap-card-grid > .ap-card { margin-bottom: 0; }
@media (max-width: 720px) {
  .ap-card-grid { grid-template-columns: 1fr; }
}

/* ===== РџРѕР»СЏ С„РѕСЂРј / РјРѕРґР°Р»РѕРє ===== */
.ap-field { margin-bottom: 12px; }
.ap-field label {
  display: block; font-size: 11px; font-weight: 800;
  color: var(--text-muted); margin-bottom: 6px;
  text-transform: uppercase; letter-spacing: 0.08em;
}
.ap-field input, .ap-field textarea, .ap-field select {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-sm);
  padding: 9px 12px;
  font-size: 13px;
  color: var(--text);
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s, background 0.15s;
}
.ap-field input:hover, .ap-field textarea:hover, .ap-field select:hover {
  border-color: rgba(255,255,255,0.15);
}
.ap-field input:focus, .ap-field textarea:focus, .ap-field select:focus {
  border-color: var(--accent);
  background: var(--surface);
}
.ap-field textarea { min-height: 70px; resize: vertical; }
.ap-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ap-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
@media (max-width: 720px) {
  .ap-row, .ap-row-3 { grid-template-columns: 1fr; }
}

/* ===== РњРѕРґР°Р»РєР° ===== */
.ap-modal {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: none; align-items: center; justify-content: center;
  z-index: 200; padding: 16px;
}
.ap-modal.show { display: flex; }
.ap-modal-panel {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-lg);
  width: 100%; max-width: 560px; max-height: 90vh; overflow-y: auto;
  padding: 20px;
  box-shadow: var(--shadow-lg);
}
.ap-modal-title { font-size: 17px; font-weight: 800; margin: 0 0 16px; letter-spacing: -0.01em; }
.ap-modal-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 16px; }
.ap-modal-panel--wide { max-width: 880px; }

/* ===== РњРµРЅСЋ (РѕС„С„Р»Р°Р№РЅ) вЂ” РєРѕРјРїР°РєС‚РЅС‹Р№ СЃРїРёСЃРѕРє СЃ inline-РёРЅРїСѓС‚РѕРј С†РµРЅС‹ ===== */
.mo-section { margin-bottom: 12px; }
.mo-row {
  display: grid;
  grid-template-columns: 1fr 110px 36px 32px;
  align-items: center; gap: 10px;
  padding: 6px 4px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}
.mo-row:last-child { border-bottom: 0; }
.mo-name { color: var(--text); font-weight: 600; display: flex; align-items: center; gap: 8px; min-width: 0; }
.mo-name-input {
  flex: 1;
  min-width: 0;
  padding: 5px 8px;
  font: 600 14px/1.3 inherit;
  color: var(--text);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  transition: border-color 0.12s, background 0.12s;
}
.mo-name-input:hover { border-color: var(--border); }
.mo-name-input:focus { outline: none; border-color: var(--accent); background: var(--surface-2); }
.mo-addons-btn {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  color: var(--text-soft);
  padding: 2px 8px;
  font: 700 11px/1.4 inherit;
  cursor: pointer;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
}
.mo-addons-btn:hover { background: var(--accent); color: #1A140E; border-color: var(--accent); }

/* РЎС‚СЂРѕРєРё РІ РјРѕРґР°Р»РєРµ Р°РґРґРѕРЅРѕРІ */
.mo-addon-row {
  display: grid;
  grid-template-columns: 1fr 90px 36px 100px 36px;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px dashed var(--border);
}
.mo-addon-row:last-child { border-bottom: 0; }
.mo-addon-name, .mo-addon-price, .mo-addon-weight {
  padding: 7px 10px;
  font-size: 13px;
  font-family: inherit;
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-sm);
  color: var(--text);
  width: 100%;
  box-sizing: border-box;
  transition: border-color 0.15s;
}
.mo-addon-name:focus, .mo-addon-price:focus, .mo-addon-weight:focus {
  outline: none;
  border-color: var(--accent);
}
.mo-addon-name::placeholder, .mo-addon-price::placeholder, .mo-addon-weight::placeholder {
  color: var(--text-muted);
}
.mo-addon-price { text-align: right; font-variant-numeric: tabular-nums; }
@media (max-width: 600px) {
  .mo-addon-row { grid-template-columns: 1fr 80px 32px; gap: 6px; }
  .mo-addon-row .mo-addon-weight { display: none; }
}
.mo-offline-input {
  padding: 6px 8px;
  width: 100%;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.mo-offline-input::placeholder { color: var(--text-muted); font-weight: 400; }
.mo-currency { color: var(--text-soft); font-size: 12px; }
@media (max-width: 720px) {
  .mo-row { grid-template-columns: 1fr 80px 32px; gap: 6px; padding: 8px 4px; }
  .mo-row .mo-currency { display: none; }
}

/* ===== РњРѕРґР°Р»РєР° РЅРѕРІРѕРіРѕ РѕС„С„Р»Р°Р№РЅ-Р·Р°РєР°Р·Р° ===== */
.off-modal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
@media (max-width: 760px) {
  .off-modal-grid { grid-template-columns: 1fr; }
}
.off-modal-col { min-width: 0; }
.off-product-list {
  max-height: 50vh; overflow-y: auto;
  display: flex; flex-direction: column; gap: 4px;
  padding-right: 4px;
}
.off-product-cat {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-soft);
  padding: 10px 4px 4px;
}
.off-product-cat:first-child { padding-top: 4px; }
.off-product-row {
  display: grid; grid-template-columns: 1fr auto auto;
  align-items: center; gap: 10px;
  padding: 8px 10px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
}
.off-product-row:hover { border-color: var(--border-strong); }
.off-product-name { font-size: 13px; font-weight: 700; }
.off-product-price { font-size: 12px; color: var(--text-soft); font-variant-numeric: tabular-nums; }
.off-product-price--offline { color: var(--accent); font-weight: 700; }
.off-product-addons-mark {
  display: inline-block;
  font-size: 10px; font-weight: 800;
  color: var(--accent);
  background: rgba(244,184,58,0.14);
  border-radius: 4px;
  padding: 1px 5px;
  margin-left: 4px;
  vertical-align: middle;
}

/* РљРѕРЅС„РёРіСѓСЂР°С‚РѕСЂ Р°РґРґРѕРЅРѕРІ РІРЅСѓС‚СЂРё РјРѕРґР°Р»РєРё РЅРѕРІРѕРіРѕ РѕС„С„Р»Р°Р№РЅ-Р·Р°РєР°Р·Р° */
.off-configurator {
  display: flex; flex-direction: column;
  gap: 8px;
  max-height: 60vh; overflow-y: auto;
  padding-right: 4px;
}
.off-config-title {
  font-size: 16px; font-weight: 800;
  margin-top: 6px;
}
.off-config-base {
  font-size: 12px; color: var(--text-soft);
  margin-bottom: 4px;
}
.off-config-section-title {
  font-size: 11px; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-top: 4px;
}
.off-addons-list {
  display: flex; flex-direction: column;
  gap: 4px;
}
.off-addon-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 10px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  gap: 10px;
}
.off-addon-name { flex: 1; min-width: 0; }
.off-addon-name > div:first-child { font-size: 13px; font-weight: 600; }
.off-addon-meta { font-size: 11px; color: var(--text-soft); font-variant-numeric: tabular-nums; margin-top: 2px; }
.off-addon-qty {
  display: flex; align-items: center; gap: 6px;
  font-variant-numeric: tabular-nums;
}
.off-addon-qty span {
  min-width: 18px; text-align: center;
  font-weight: 800; font-size: 14px;
}
.off-addon-qty .ap-icon-btn[disabled] { opacity: 0.4; cursor: not-allowed; }
.off-config-total {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-top: 12px;
  padding: 10px 4px 0;
  border-top: 1px solid var(--border);
  font-variant-numeric: tabular-nums;
}
.off-config-total b { font-size: 16px; font-weight: 800; }
.off-config-total span { font-size: 12px; color: var(--text-soft); }

.off-cart-extras {
  font-size: 12px; color: var(--text-soft);
  padding: 2px 0 4px 8px;
  display: flex; flex-direction: column; gap: 2px;
}

.off-cart {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 8px;
  min-height: 80px;
  max-height: 40vh; overflow-y: auto;
}
.off-cart-row {
  padding: 8px 10px;
  border-bottom: 1px dashed var(--border);
}
.off-cart-row:last-child { border-bottom: 0; }
.off-cart-name { font-size: 13px; font-weight: 700; margin-bottom: 6px; }
.off-cart-controls {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.off-cart-controls label {
  display: flex; align-items: center; gap: 6px;
  font-size: 11px; color: var(--text-soft);
  text-transform: uppercase; letter-spacing: 0.08em;
}
.off-cart-controls input {
  width: 80px; padding: 6px 8px;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.off-total {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-top: 12px;
  padding: 10px 4px 0;
  border-top: 1px solid var(--border);
  font-variant-numeric: tabular-nums;
}
.off-total b { font-size: 18px; font-weight: 800; }
.off-total span { font-size: 13px; color: var(--text-soft); }

/* ===== Р¤РѕС‚Рѕ-РїСЂРµРІСЊСЋ Р·Р°РіСЂСѓР·РєРё ===== */
.ap-photo-preview {
  width: 100%; height: 160px; border-radius: 14px;
  background: var(--bg-soft-2); background-size: cover; background-position: center;
  display: flex; align-items: center; justify-content: center;
  font-size: 48px; cursor: pointer;
  margin-bottom: 12px; position: relative;
}
.ap-photo-overlay {
  position: absolute; bottom: 8px; right: 8px;
  background: rgba(0,0,0,0.6); padding: 6px 10px;
  border-radius: 8px; font-size: 12px; font-weight: 700;
}

/* ===== РђРґРґРѕРЅС‹ СЂРµРґР°РєС‚РѕСЂ ===== */
.ap-addons-section { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border); }
.ap-addons-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.ap-addon-row {
  display: flex; gap: 8px; align-items: center;
  padding: 10px; border-radius: 10px;
  background: var(--bg-soft-2); margin-bottom: 8px;
}
.ap-addon-photo {
  width: 48px; height: 48px; flex: 0 0 48px;
  border-radius: 10px; border: 0;
  background: var(--bg); background-size: cover; background-position: center;
  font-size: 18px; cursor: pointer;
}
.ap-addon-fields { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.ap-addon-fields input { width: 100%; background: var(--bg); border: 1px solid var(--border); border-radius: 8px; padding: 6px 8px; font-size: 13px; }
.ap-addon-row-numbers { display: grid; grid-template-columns: 1fr 80px; gap: 6px; }
.ap-addon-del { background: transparent; border: 0; color: var(--danger); font-size: 16px; cursor: pointer; padding: 6px; }
.ap-addon-add { background: var(--bg-soft-2); border: 0; color: var(--accent); padding: 10px; border-radius: 10px; cursor: pointer; font-size: 14px; font-weight: 700; width: 100%; }

/* ===== Toast ===== */
.ap-toast {
  position: fixed; left: 50%; bottom: 24px;
  transform: translate(-50%, 16px);
  background: rgba(0,0,0,0.9); color: #fff;
  padding: 12px 22px; border-radius: 14px;
  font-size: 14px; font-weight: 700;
  opacity: 0; transition: opacity 0.2s, transform 0.2s;
  pointer-events: none; z-index: 300;
  max-width: min(92vw, 420px);
  text-align: center;
}
.ap-toast.show { opacity: 1; transform: translate(-50%, 0); }
.ap-toast--success { background: rgba(52, 199, 89, 0.95); color: #001a05; }
.ap-toast--error   { background: rgba(255, 59, 48, 0.95); }
.ap-toast--warn    { background: rgba(255, 204, 0, 0.95); color: #1a140e; }

/* ===== Stub-Р±Р°РЅРЅРµСЂ РґР»СЏ СЂР°Р·РґРµР»РѕРІ РІ СЂР°Р·СЂР°Р±РѕС‚РєРµ ===== */
.ap-stub-banner {
  background: linear-gradient(135deg, rgba(244, 184, 58, 0.10), rgba(244, 184, 58, 0.02));
  border: 1px dashed rgba(244, 184, 58, 0.35);
  color: var(--accent);
  border-radius: var(--r-md);
  padding: 12px 16px;
  font-size: 12.5px;
  font-weight: 500;
  margin-bottom: 16px;
  display: flex; align-items: flex-start; gap: 10px;
  line-height: 1.45;
}
.ap-stub-banner b { color: var(--text); font-weight: 800; }
.ap-stub-mock {
  opacity: 0.65;
  pointer-events: none;
  filter: saturate(0.7);
}

/* ===== Empty / auth-error ===== */
.ap-empty {
  text-align: center; color: var(--text-soft);
  padding: 40px 20px; background: var(--bg-soft);
  border-radius: 14px; font-size: 14px;
}
.ap-auth-error {
  text-align: center; color: var(--danger);
  padding: 40px 20px; background: rgba(255,59,48,0.08);
  border-radius: 14px; font-size: 14px;
  border: 1px solid rgba(255,59,48,0.3);
}

/* ===== Р—Р°РєР°Р·С‹ (СЃРїРёСЃРѕРє) ===== */
.ap-order {
  background: var(--bg-soft); border-radius: 14px;
  padding: 14px; margin-bottom: 10px;
}
.ap-order-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 10px; padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.ap-order-id { font-weight: 800; font-size: 16px; }
.ap-order-date { color: var(--text-soft); font-size: 12px; }
.ap-order-row {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 13px; padding: 3px 0;
  gap: 12px;
}
.ap-order-row span { color: var(--text-soft); }
.ap-order-row b { color: var(--text); font-weight: 700; text-align: right; }
.ap-order-items {
  margin-top: 8px; padding-top: 8px;
  border-top: 1px solid var(--border);
  font-size: 13px; color: var(--text-soft);
}
.ap-order-status-pill {
  font-size: 11px; font-weight: 800;
  padding: 4px 10px; border-radius: 999px;
  text-transform: uppercase; letter-spacing: 0.04em;
}
.ap-order-status-pill--new { background: rgba(47,125,240,0.18); color: #76aef7; }
.ap-order-status-pill--cooking { background: rgba(255,204,0,0.18); color: #ffd84d; }
.ap-order-status-pill--ready { background: rgba(52,199,89,0.18); color: #6dd989; }
.ap-order-status-pill--done { background: rgba(141,142,145,0.18); color: var(--text-soft); }
.ap-order-status-pill--cancelled { background: rgba(255,59,48,0.18); color: #ff7a72; }

/* ===== KPI-РєР°СЂС‚РѕС‡РєРё (Dashboard Рё РїРѕРґРѕР±РЅС‹Рµ) ===== */
/* Р”РІСѓС…РєРѕР»РѕРЅРѕС‡РЅС‹Р№ layout: СЃР»РµРІР° В«РћР±С‰Р°СЏ РІС‹СЂСѓС‡РєР°В» РєР°Рє РІС‹С‚СЏРЅСѓС‚С‹Р№ Р°РєС†РµРЅС‚РЅС‹Р№ Р±Р»РѕРє,
   СЃРїСЂР°РІР° СЃРµС‚РєР° РѕСЃС‚Р°Р»СЊРЅС‹С… KPI. РќР° РјРѕР±РёР»Рµ вЂ” СЃС‚РµРє. */
.ap-dash-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 16px;
  align-items: start;
  margin-bottom: 16px;
}
.ap-dash-layout .ap-dash-card--total {
  /* РўСЏРЅРµС‚СЃСЏ РЅР° РІСЃСЋ РІС‹СЃРѕС‚Сѓ РїСЂР°РІРѕР№ РєРѕР»РѕРЅРєРё Р±Р»Р°РіРѕРґР°СЂСЏ align-items:start Сѓ
     СЃРµС‚РєРё Рё position:sticky-РѕРј РЅРµ РїРѕР»СЊР·СѓРµРјСЃСЏ вЂ” РїСЂРѕСЃС‚Рѕ РІС‹СЃРѕРєР°СЏ РєР°СЂС‚РѕС‡РєР°. */
  align-self: stretch;
  border-color: var(--border-strong);
  background: linear-gradient(180deg, rgba(244,184,58,0.06), transparent 60%), var(--surface);
}
.ap-dash-layout .ap-dash-others {
  margin-bottom: 0;
  /* Р’РёР·СѓР°Р»СЊРЅР°СЏ РїРµСЂРµРіРѕСЂРѕРґРєР° РјРµР¶РґСѓ total Рё РѕСЃС‚Р°Р»СЊРЅС‹РјРё РєР°СЂС‚РѕС‡РєР°РјРё. */
  border-left: 1px solid var(--border);
  padding-left: 16px;
}
@media (max-width: 900px) {
  .ap-dash-layout { grid-template-columns: 1fr; gap: 12px; }
  .ap-dash-layout .ap-dash-others {
    border-left: 0; padding-left: 0;
    border-top: 1px solid var(--border); padding-top: 12px;
  }
}

.ap-dash {
  display: grid;
  /* auto-fill (РќР• auto-fit) + РѕРіСЂР°РЅРёС‡РµРЅРёРµ minmax(200px, 240px) вЂ” РєР°СЂС‚РѕС‡РєРё РЅРµ
     СЂР°Р·РґСѓРІР°СЋС‚СЃСЏ РЅР° РІСЃСЋ СЃС‚СЂРѕРєСѓ; РЅР° РїСѓСЃС‚РѕР№ С‡Р°СЃС‚Рё СЃРїСЂР°РІР° РѕСЃС‚Р°С‘С‚СЃСЏ РїСѓСЃС‚РѕС‚Р°, РєР°Рє
     Сѓ Linear/Stripe/Vercel-РґР°С€Р±РѕСЂРґРѕРІ. РџР»РѕС‚РЅРµРµ Рё РЅРµ В«СЂР°СЃС‚СЏРЅСѓС‚Р°СЏ РјРѕР±РёР»Р°В». */
  grid-template-columns: repeat(auto-fill, minmax(200px, 240px));
  gap: 12px;
  margin-bottom: 16px;
}
/* Р‘РѕР»СЊС€РѕРµ С‡РёСЃР»Рѕ РґР»СЏ В«РћР±С‰Р°СЏ РІС‹СЂСѓС‡РєР°В» вЂ” Р°РєС†РµРЅС‚. */
.ap-dash-value--xl {
  font-size: 32px !important;
  line-height: 1.05;
  letter-spacing: -0.03em;
}
.ap-dash-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 16px 18px;
  transition: border-color 0.15s;
}
.ap-dash-card:hover { border-color: var(--border-strong); }
.ap-dash-label {
  font-size: 10px; font-weight: 800;
  color: var(--text-muted); text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 10px;
}
.ap-dash-value {
  font-size: 22px; font-weight: 800;
  letter-spacing: -0.02em; line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.ap-dash-hint {
  font-size: 12px; color: var(--text-soft); margin-top: 6px;
  line-height: 1.4;
}

/* Р Р°Р·Р±РёРІРєР° РІ РєР°СЂС‚РѕС‡РєРµ (Р’С‹СЂСѓС‡РєР°: РќР°Р»РёС‡РЅС‹Рµ/РљР°СЂС‚Р° РїРѕСЃС‚СЂРѕС‡РЅРѕ) вЂ” РґРІРµ СЃС‚СЂРѕРєРё
   СЃ РІС‹СЂР°РІРЅРёРІР°РЅРёРµРј СЃСѓРјРјС‹ РІРїСЂР°РІРѕ. РќРµ Р»РѕРјР°РµС‚СЃСЏ РЅР° СѓР·РєРёС… РєР°СЂС‚РѕС‡РєР°С…. */
.ap-dash-breakdown {
  display: flex; flex-direction: column;
  gap: 4px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}
.ap-dash-breakdown-row {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 8px;
  font-size: 13px; color: var(--text-soft);
  font-variant-numeric: tabular-nums;
}
.ap-dash-breakdown-row b {
  color: var(--text);
  font-weight: 700;
  white-space: nowrap;
}
.ap-dash-statuses {
  display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px;
}
.ap-dash-status {
  font-size: 11px; font-weight: 700;
  padding: 3px 8px; border-radius: var(--r-pill);
  background: var(--surface-2); color: var(--text-soft);
  border: 1px solid var(--border);
}
.ap-dash-status b { color: var(--text); }

/* РљР°СЂС‚РѕС‡РєР° В«Р‘Р°Р»Р»С‹ РєР»РёРµРЅС‚РѕРІВ» вЂ” РєРѕРјРїР°РєС‚РЅС‹Рµ СЃС‚СЂРѕРєРё. */
.ap-dash-points {
  display: flex; flex-direction: column;
  gap: 6px;
  margin-bottom: 4px;
}
.ap-dash-points-row {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 8px;
  font-variant-numeric: tabular-nums;
}
.ap-dash-points-cap {
  font-size: 13px;
  color: var(--text-soft);
}
.ap-dash-points-row b {
  font-size: 16px; font-weight: 800;
  letter-spacing: -0.01em;
  white-space: nowrap;            /* В«в€’3.34 СЂСѓР±.В» РЅРµ РґРѕР»Р¶РЅРѕ Р»РѕРјР°С‚СЊСЃСЏ РїРѕ СЃС‚СЂРѕРєР°Рј */
}
.ap-dash-points-down { color: #ff7a72; }   /* СЃРїРёСЃР°Р»Рё вЂ” РєСЂР°СЃРЅС‹Р№  */
.ap-dash-points-up   { color: #6dd989; }   /* РЅР°С‡РёСЃР»РёР»Рё вЂ” Р·РµР»С‘РЅС‹Р№ */
/* РњРµР»РєРёР№ suffix В«СЂСѓР±.В» вЂ” Р·Р°РЅРёРјР°РµС‚ РјР°Р»Рѕ РјРµСЃС‚Р°, РЅРµ Р»РѕРјР°РµС‚ СЃС‚СЂРѕРєСѓ. */
.ap-dash-unit {
  font-size: 11px; font-weight: 600;
  opacity: 0.55;
  margin-left: 3px;
  letter-spacing: 0;
}

.ap-dash-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 18px;
  margin-bottom: 14px;
}
.ap-dash-section-title {
  font-size: 11px; font-weight: 800;
  color: var(--text-muted); text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 14px;
}
.ap-dash-list { display: flex; flex-direction: column; gap: 8px; }
.ap-dash-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}
.ap-dash-row:last-child { border-bottom: 0; }
.ap-dash-row b { font-weight: 800; }
/* РљР»РёРєР°Р±РµР»СЊРЅР°СЏ СЃС‚СЂРѕРєР° вЂ” РїРµСЂРµС…РѕРґ РІ Р—Р°РєР°Р·С‹/РњРµРЅСЋ. Р›С‘РіРєРёР№ hover, РєСѓСЂСЃРѕСЂ. */
.ap-dash-row--clickable {
  cursor: pointer;
  padding-left: 4px; padding-right: 4px;
  margin: 0 -4px;
  border-radius: 8px;
  transition: background 0.12s;
}
.ap-dash-row--clickable:hover {
  background: var(--surface-2);
}

/* РљР»РёРєР°Р±РµР»СЊРЅР°СЏ РїР»Р°С€РєР° СЃС‚Р°С‚СѓСЃР° (active-orders pill в†’ РїРµСЂРµС…РѕРґ РІ Р—Р°РєР°Р·С‹). */
.ap-dash-status--clickable {
  cursor: pointer;
  border: 1px solid var(--border);
  font: inherit;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
}
.ap-dash-status--clickable:hover {
  background: var(--accent);
  color: #1A140E;
  border-color: var(--accent);
}
.ap-dash-status--clickable:hover b { color: #1A140E; }

.ap-stub {
  text-align: center; color: var(--text-soft);
  padding: 60px 20px; background: var(--bg-soft);
  border-radius: 14px; font-size: 14px;
}
.ap-stub-emoji { font-size: 48px; margin-bottom: 12px; }
.ap-stub-title { font-size: 18px; font-weight: 800; color: var(--text); margin-bottom: 6px; }

/* ===== РљРѕР»РµСЃРѕ СЂСѓР»РµС‚РєРё (admin module: roulette) ===== */
.ap-card-block {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 14px;
}
.ap-section-title {
  font-size: 14px; font-weight: 800; text-transform: uppercase;
  letter-spacing: 0.04em; color: var(--text-soft);
  margin: 4px 0 10px;
}
.ap-grid-2 {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.ap-grid-3 {
  display: grid; grid-template-columns: 80px 1fr 110px;
  gap: 12px;
}
@media (max-width: 520px) {
  .ap-grid-2, .ap-grid-3 { grid-template-columns: 1fr; }
}
.ap-summary-row {
  display: flex; gap: 16px; flex-wrap: wrap;
  font-size: 14px;
  margin-bottom: 8px;
}
.ap-summary-row b { color: var(--text); }
.ap-prizes-list {
  display: flex; flex-direction: column; gap: 10px;
}
.ap-prize-card {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
}
.ap-prize-head {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px;
  background: var(--bg-soft-2);
  border-bottom: 1px solid var(--border);
}
.ap-prize-pos {
  font-size: 12px; font-weight: 800;
  color: var(--text-soft);
  min-width: 28px;
}
.ap-prize-emoji { font-size: 22px; }
.ap-prize-name {
  flex: 1 1 auto; min-width: 0;
  font-size: 15px; font-weight: 800;
  color: var(--text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ap-prize-chance {
  font-size: 13px; font-weight: 800;
  color: var(--success);
  padding: 4px 10px;
  background: rgba(52, 199, 89, 0.12);
  border-radius: 999px;
  min-width: 50px; text-align: center;
}
.ap-prize-head .ap-icon-btn {
  width: 30px; height: 30px;
  border-radius: 8px;
  background: rgba(255,255,255,0.06);
  color: var(--text);
  font-size: 14px;
}
.ap-prize-head .ap-icon-btn:hover { background: rgba(255,255,255,0.10); }
.ap-prize-head .ap-icon-btn.danger {
  color: var(--danger);
  background: rgba(255, 59, 48, 0.10);
}
.ap-prize-body {
  padding: 12px 14px;
  display: flex; flex-direction: column; gap: 12px;
}

/* ===== Р›РµРЅС‚Р° Р·Р°РєР°Р·РѕРІ (mobile-first, admin/modules/orders.js) ===== */

/* Р’РєР»Р°РґРєРё В«РЎРµР№С‡Р°СЃ / Р—Р°РІРµСЂС€РµРЅС‹В» вЂ” sticky СЃРІРµСЂС…Сѓ, Р±РѕР»СЊС€РёРµ С‚Р°Рї-С†РµР»Рё */
.ap-feed-tabs {
  display: inline-flex; gap: 4px;
  margin: 0 0 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 4px;
}
.ap-feed-tab {
  padding: 7px 14px;
  background: transparent;
  border: 0;
  border-radius: var(--r-sm);
  color: var(--text-soft);
  font: 700 13px/1 inherit;
  letter-spacing: -0.005em;
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  transition: background 0.15s, color 0.15s;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.ap-feed-tab:hover {
  background: var(--surface-2);
  color: var(--text);
}
.ap-feed-tab.active {
  background: var(--accent);
  color: var(--accent-on);
}
.ap-feed-tab-badge {
  display: inline-block;
  min-width: 20px;
  padding: 2px 6px;
  background: rgba(0,0,0,0.18);
  border-radius: var(--r-pill);
  font-size: 11px; font-weight: 800;
  text-align: center;
}
.ap-feed-tab:not(.active) .ap-feed-tab-badge {
  background: var(--surface-3);
  color: var(--text-soft);
}

/* РўСѓР»Р±Р°СЂ СЃ С„РёР»СЊС‚СЂРѕРј СЂРµР¶РёРјР° + sound */
.ap-feed-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.ap-feed-filters { display: flex; gap: 6px; flex-wrap: wrap; }
/* Р”Р°С‚Р°-С„РёР»СЊС‚СЂ РЅР° В«Р—Р°РІРµСЂС€РµРЅС‹В»: РЅР°С‚РёРІРЅС‹Р№ input[type=date] + РєРЅРѕРїРєР° В«Р’СЃРµ РґР°С‚С‹В».
   РћС‚РѕРґРІРёРЅСѓС‚ РѕС‚ mode-С‡РёРїРѕРІ РІРµСЂС‚РёРєР°Р»СЊРЅРѕР№ С‡РµСЂС‚РѕР№. */
.ap-feed-date-filter {
  display: flex; align-items: center; gap: 8px;
  padding-left: 10px;
  margin-left: 4px;
  border-left: 1px solid var(--border);
}
@media (max-width: 720px) {
  .ap-feed-date-filter { padding-left: 0; margin-left: 0; border-left: 0; }
}
.ap-date-input {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text);
  padding: 7px 12px;
  font: 700 13px/1 inherit;
  font-family: inherit;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  color-scheme: dark;            /* РЅР°С‚РёРІРЅС‹Р№ РєР°Р»РµРЅРґР°СЂСЊ РІ С‚С‘РјРЅРѕР№ С‚РµРјРµ */
}
.ap-date-input:hover { border-color: var(--border-strong); }
.ap-date-input:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--surface-2);
}
.ap-chip {
  padding: 8px 14px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-soft);
  font-family: inherit; font-size: 13px; font-weight: 700;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.ap-chip.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.ap-feed-sound {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; color: var(--text-soft);
  cursor: pointer;
  padding: 6px 10px;
  background: var(--bg-soft);
  border-radius: 999px;
  user-select: none;
}
.ap-feed-sound input { width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; }

/* Дашборд: верхняя панель (звук + календарь-chip с × для сброса). Кнопки
   «Сегодня» отдельно нет — chip-label сам показывает «Сегодня» когда дата
   не выбрана, и «21 мая» когда выбрана. × сбрасывает на сегодня. */
.ap-dash-toolbar { gap: 10px; margin-bottom: 14px; }
.ap-dash-sound {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 600;
  color: var(--text);
  cursor: pointer;
  background: var(--bg-soft);
  padding: 9px 14px;
  border-radius: 10px;
  user-select: none;
}
.ap-dash-sound input { width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; }

.ap-dash-datepicker {
  display: inline-flex; align-items: center; gap: 6px;
  margin-left: auto;
}
.ap-chip-icon { display: inline-flex; align-items: center; gap: 8px; }
/* Chip-label оборачивает скрытый input[type=date]. На iOS клик по label
   автоматически открывает нативный пикер — это самый надёжный путь. Размер
   повышенный (читаемый на мобайле + крупная цель тапа). */
.ap-chip-date {
  position: relative;
  cursor: pointer;
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  padding: 12px 20px;
  font-size: 15px;
  font-weight: 700;
  border-radius: 14px;
}
.ap-chip-date:hover { background: var(--accent-hover); }
.ap-chip-date > span[aria-hidden] { font-size: 18px; line-height: 1; }
.ap-date-input-hidden {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  opacity: 0;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  border: 0;
}
.ap-dash-date-clear {
  width: 44px; height: 44px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-soft);
  color: var(--text-soft);
  font-size: 22px; font-weight: 700; line-height: 1;
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0;
}
.ap-dash-date-clear:hover { color: var(--text); border-color: var(--border-strong); }
.ap-dash-date-clear[hidden] { display: none; }

@media (max-width: 720px) {
  /* На мобайле — ещё крупнее, чтобы было удобно тыкать пальцем. */
  .ap-chip-date {
    padding: 14px 22px;
    font-size: 16px;
    border-radius: 16px;
  }
  .ap-chip-date > span[aria-hidden] { font-size: 20px; }
  .ap-dash-date-clear { width: 48px; height: 48px; font-size: 24px; }
}

@media (max-width: 720px) {
  /* Карточки full-width edge-to-edge, разделены 10px вертикальным воздухом
     (фон страницы var(--bg) показывается между surface-блоками — даёт
     iOS-Settings-подобный вид). .ap-main теряет горизонтальный padding;
     заголовок и toolbar получают свой 14px по бокам. */
  .ap-main { padding: 0 0 80px; }
  .ap-page-head { padding: 14px 14px 12px; }
  .ap-dash-toolbar { gap: 8px; margin: 0 0 14px; padding: 0 14px; }
  .ap-dash-sound { padding: 8px 12px; font-size: 12.5px; }
  .ap-dash-datepicker { margin-left: 0; }

  /* Сетка карточек — одна колонка с 10px воздухом между ними. */
  .ap-dash { grid-template-columns: 1fr; gap: 10px; margin-bottom: 10px; }

  /* Карточки = плоские полноширинные блоки без рамок и скруглений. */
  .ap-dash-card,
  .ap-dash-section {
    border: 0;
    border-radius: 0;
    padding: 16px 14px;
    margin: 0;
    background: var(--surface);
  }
  .ap-dash-section { margin-bottom: 10px; }
  /* Карточка «Общая выручка» — тёплый янтарный градиент. */
  .ap-dash-card--total {
    background: linear-gradient(180deg, rgba(244,184,58,0.08), transparent 60%), var(--surface);
  }

  .ap-dash-value { font-size: 22px; }
  .ap-dash-value--xl { font-size: 28px !important; }
  .ap-dash-section-title { margin-bottom: 10px; }
}

/* Р›РµРЅС‚Р° РєР°СЂС‚РѕС‡РµРє вЂ” РІРµСЂС‚РёРєР°Р»СЊРЅС‹Р№ РїРѕС‚РѕРє, РЅРµ РєРѕР»РѕРЅРѕС‡РЅС‹Р№ */
.ap-feed {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 12px;
  /* align-items:start вЂ” РёРЅР°С‡Рµ grid СЂР°СЃС‚СЏРіРёРІР°РµС‚ РІСЃРµ РєР°СЂС‚РѕС‡РєРё РґРѕ СЃР°РјРѕР№ РІС‹СЃРѕРєРѕР№
     РІ СЂСЏРґСѓ. РљР°Р¶РґР°СЏ РєР°СЂС‚РѕС‡РєР° С‚РµРїРµСЂСЊ Р·Р°РЅРёРјР°РµС‚ СЂРѕРІРЅРѕ СЃС‚РѕР»СЊРєРѕ РјРµСЃС‚Р°, СЃРєРѕР»СЊРєРѕ
     РµС‘ СЃРѕРґРµСЂР¶РёРјРѕРµ. */
  align-items: start;
}
@media (min-width: 1280px) {
  .ap-feed { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); }
}
.ap-feed-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 80px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  color: var(--text-soft);
}
.ap-feed-empty-emoji { font-size: 48px; margin-bottom: 12px; opacity: 0.6; }
.ap-feed-empty-text { font-size: 14px; font-weight: 600; }

/* РљР°СЂС‚РѕС‡РєР° вЂ” РѕСЃРЅРѕРІРЅРѕР№ РєРёСЂРїРёС‡ Р»РµРЅС‚С‹ */
.ap-feed-card {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-left: 4px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  display: flex; flex-direction: column;
  box-shadow: 0 1px 3px rgba(0,0,0,0.18);
  transition: opacity 0.2s, transform 0.15s;
}
.ap-feed-card.is-done      { opacity: 0.65; }
.ap-feed-card.is-cancelled { opacity: 0.55; }
/* Flash РїСЂРё РїРµСЂРµС…РѕРґРµ СЃ РґР°С€Р±РѕСЂРґР° (?focus=ID) вЂ” РјРµРґРѕРІС‹Р№ РѕР±РѕРґРѕРє 2.4СЃ. */
.ap-feed-card--flash,
.ap-card--flash {
  animation: ap-card-flash 2.4s ease-out;
}
@keyframes ap-card-flash {
  0%   { box-shadow: 0 0 0 3px var(--accent), 0 1px 3px rgba(0,0,0,0.18); }
  60%  { box-shadow: 0 0 0 3px var(--accent), 0 1px 3px rgba(0,0,0,0.18); }
  100% { box-shadow: 0 0 0 0 transparent, 0 1px 3px rgba(0,0,0,0.18); }
}

/* Р¦РІРµС‚РЅС‹Рµ В«РјР°СЂРєРµСЂС‹ СЃС‚Р°РґРёРёВ» СЃР»РµРІР° */
.ap-feed-card.side-new       { border-left-color: #ff8c00; }
.ap-feed-card.side-cooking   { border-left-color: #2f7df0; }
.ap-feed-card.side-delivery  { border-left-color: #b794e0; }
.ap-feed-card.side-done      { border-left-color: #34c759; }
.ap-feed-card.side-cancelled { border-left-color: #ff3b30; }

/* Header РєР°СЂС‚РѕС‡РєРё: РЅРѕРјРµСЂ + СЂРµР¶РёРј + СЃС‚Р°С‚СѓСЃ + С‚Р°Р№РјРµСЂ */
.ap-feed-card-head {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px;
  background: var(--bg-soft-2);
  border-bottom: 1px solid var(--border);
}
.ap-feed-card-num {
  font-size: 14px; font-weight: 900;
  color: var(--text);
  letter-spacing: -0.01em;
}
.ap-feed-card-mode { font-size: 18px; }
.ap-feed-card-status {
  flex: 1 1 auto; min-width: 0;
  font-size: 12px; font-weight: 700;
  color: var(--text-soft);
  letter-spacing: -0.01em;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ap-feed-card-timer {
  font-size: 12px; font-weight: 800;
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
}
.ap-feed-card-timer.age-green  { background: rgba(52,199,89,0.18);  color: #6fda93; }
.ap-feed-card-timer.age-yellow { background: rgba(255,204,0,0.22);  color: #ffd966; }
.ap-feed-card-timer.age-red    { background: rgba(255,59,48,0.25);  color: #ff8275; animation: ap-feed-timer-pulse 1.4s ease-in-out infinite; }
.ap-feed-card-timer.age-grey   { background: rgba(255,255,255,0.06); color: var(--text-soft); }
@keyframes ap-feed-timer-pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.55; }
}

/* Body РєР°СЂС‚РѕС‡РєРё */
.ap-feed-card-body {
  padding: 12px 14px;
  display: flex; flex-direction: column; gap: 6px;
  font-size: 14px;
  color: var(--text);
}
.ap-feed-card-name {
  font-size: 16px; font-weight: 800;
  letter-spacing: -0.01em;
}
.ap-feed-card-phone {
  display: inline-flex; align-items: center; gap: 4px;
  color: var(--accent);
  text-decoration: none;
  font-size: 14px; font-weight: 700;
  width: fit-content;
  padding: 4px 0;
}
.ap-feed-card-phone:active { opacity: 0.65; }
.ap-feed-card-addr {
  font-size: 13px;
  color: var(--text-soft);
  word-break: break-word;
}
.ap-feed-card-items {
  margin-top: 4px;
  padding-top: 8px;
  border-top: 1px dashed var(--border);
  display: flex; flex-direction: column; gap: 3px;
}
.ap-feed-card-item {
  display: flex; flex-direction: column; gap: 2px;
  font-size: 13px;
}
.ap-feed-card-item-main {
  display: flex; gap: 8px; align-items: baseline;
}
.ap-feed-card-item-qty {
  flex: 0 0 32px;
  font-weight: 800;
  color: var(--text-soft);
  font-size: 12px;
}
.ap-feed-card-item-name { flex: 1 1 auto; line-height: 1.35; }
/* Р”РѕРї. РёРЅРіСЂРµРґРёРµРЅС‚С‹ РїРѕРґ РѕСЃРЅРѕРІРЅС‹Рј Р±Р»СЋРґРѕРј вЂ” РЅРµР±РѕР»СЊС€РѕР№ РѕС‚СЃС‚СѓРї СЃР»РµРІР°, РјРµР»РєРёР№ С€СЂРёС„С‚ */
.ap-feed-card-item-extras {
  margin: 2px 0 4px 38px;
  display: flex; flex-direction: column; gap: 1px;
}
.ap-feed-card-item-extra {
  font-size: 12px;
  color: var(--brand-honey, #ffc266);
  line-height: 1.3;
  letter-spacing: -0.01em;
}
.ap-feed-card-comment {
  padding: 8px 10px;
  background: rgba(255,255,255,0.04);
  border-radius: 10px;
  font-size: 13px; font-style: italic;
  color: var(--text-soft);
}

/* Footer РєР°СЂС‚РѕС‡РєРё: РѕР±С‰Р°СЏ СЃСѓРјРјР° + Р‘РћР›Р¬РЁРђРЇ РєРЅРѕРїРєР° РґРµР№СЃС‚РІРёСЏ + вЂ¦ */
.ap-feed-card-foot {
  padding: 10px 14px;
  display: flex; flex-direction: column; gap: 8px;
  border-top: 1px solid var(--border);
  background: var(--surface);
}
.ap-feed-card-total {
  font-size: 16px; font-weight: 800;
  color: var(--text);
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}
.ap-feed-card-foot-actions {
  display: flex; align-items: stretch; gap: 8px;
}
.ap-feed-card-primary {
  flex: 1 1 auto;
  min-height: 44px;
  padding: 10px 16px;
  background: var(--accent);
  border: 0;
  border-radius: var(--r-sm);
  color: var(--accent-on);
  font: 800 14px/1 inherit;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: transform 0.1s, opacity 0.15s, filter 0.15s;
}
.ap-feed-card-primary:hover  { filter: brightness(1.06); }
.ap-feed-card-primary:active { transform: scale(0.97); }
.ap-feed-card-primary[disabled] { opacity: 0.55; cursor: not-allowed; }
/* РљСЂРµСЃС‚РёРє-РѕС‚РјРµРЅР° Р·Р°РєР°Р·Р° вЂ” Р·Р°РјРµРЅРёР» РїРѕРґРјРµРЅСЋ В«в‹®В». РљСЂР°СЃРЅС‹Р№ outline-СЃС‚РёР»СЊ,
   Р¶РјС‘С‚СЃСЏ С‚РѕР»СЊРєРѕ СЃ РїРѕРґС‚РІРµСЂР¶РґРµРЅРёРµРј (СЃРј. orders.js _onFeedClick). */
.ap-feed-card-cancel {
  flex: 0 0 44px;
  min-height: 44px;
  background: transparent;
  border: 1px solid rgba(255,59,48,0.35);
  border-radius: var(--r-sm);
  color: #ff7a72;
  font: 700 18px/1 inherit;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
}
.ap-feed-card-cancel:hover  { background: rgba(255,59,48,0.12); border-color: rgba(255,59,48,0.65); }
.ap-feed-card-cancel:active { transform: scale(0.95); }
.ap-feed-card-cancel[disabled] { opacity: 0.5; cursor: not-allowed; }

/* Bottom-sheet В«Р•С‰С‘ РґРµР№СЃС‚РІРёСЏВ» СѓРґР°Р»С‘РЅ вЂ” РѕС‚РјРµРЅР° С‚РµРїРµСЂСЊ РїСЂСЏРјРѕ РЅР° РєР°СЂС‚РѕС‡РєРµ
   (СЃРј. .ap-feed-card-cancel РІС‹С€Рµ). */

/* ========== Р“Р»РѕР±Р°Р»СЊРЅС‹Р№ РїРµСЂРµРєР»СЋС‡Р°С‚РµР»СЊ В«РїСЂРёРЅРёРјР°РµРј Р·Р°РєР°Р·С‹В» ========== */
.ap-accept-section {
  border: 1.5px solid transparent;
  transition: border-color 0.18s, background 0.18s;
}
.ap-accept-section.is-open {
  border-color: rgba(48,209,88,0.35);
  background: linear-gradient(180deg, rgba(48,209,88,0.06), transparent 60%);
}
.ap-accept-section.is-closed {
  border-color: rgba(255,59,48,0.45);
  background: linear-gradient(180deg, rgba(255,59,48,0.10), transparent 60%);
  animation: ap-accept-pulse 2s ease-in-out infinite;
}
@keyframes ap-accept-pulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(255,59,48,0.30); }
  50%     { box-shadow: 0 0 0 6px rgba(255,59,48,0); }
}
.ap-accept-row {
  display: flex; align-items: center; gap: 14px;
  justify-content: space-between;
}
.ap-accept-info { flex: 1; min-width: 0; }
.ap-accept-title {
  font: 800 17px/1.25 inherit;
  color: var(--text);
  margin-bottom: 4px;
}
.ap-accept-sub {
  font: 500 13px/1.4 inherit;
  color: var(--text-soft);
}

/* iOS-style switch */
.ap-switch {
  position: relative; flex-shrink: 0;
  width: 58px; height: 34px;
  display: inline-block;
  cursor: pointer;
}
.ap-switch input { display: none; }
.ap-switch-track {
  position: absolute; inset: 0;
  background: rgba(120,120,128,0.32);
  border-radius: 999px;
  transition: background 0.22s;
}
.ap-switch-thumb {
  position: absolute; top: 2px; left: 2px;
  width: 30px; height: 30px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(0,0,0,0.30);
  transition: left 0.22s cubic-bezier(.4,0,.2,1);
}
.ap-switch input:checked + .ap-switch-track {
  background: #30d158;
}
.ap-switch input:checked + .ap-switch-track .ap-switch-thumb {
  left: 26px;
}



/* =====================================================================
   MODERN OVERRIDES — поверх легаси-стилей: Linear/Vercel-style тёмный
   минимализм. Пересобирает ключевые компоненты на новых токенах. Когда
   будем готовы — секции выше можно постепенно удалять.
   ===================================================================== */

/* === Sidebar: тоньше indicator, мягче hover === */
.ap-nav-item {
  font-size: 12.5px;
  padding: 7px 11px;
  gap: 9px;
  border-radius: 5px;
  transition: background 0.12s ease, color 0.12s ease;
}
.ap-nav-item:hover { background: var(--surface-2); color: var(--text); }
.ap-nav-item.active {
  background: var(--surface-2);
  color: var(--text);
}
.ap-nav-item.active::before {
  width: 2px;
  height: 14px;
  border-radius: 0 2px 2px 0;
  background: var(--accent);
}
.ap-nav-child.active { background: var(--surface-2); color: var(--text); }
.ap-nav-section {
  font-size: 10px;
  letter-spacing: 0.12em;
  padding: 18px 11px 6px;
}
.ap-brand {
  font-size: 14px;
  letter-spacing: -0.01em;
  color: var(--text);
  padding: 4px 12px 18px;
  opacity: 0.95;
}

/* === Кнопки: плоские, плотная типографика === */
.ap-btn {
  height: 32px;
  padding: 0 12px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: -0.005em;
}
.ap-btn--ghost {
  background: transparent;
  border-color: var(--border-strong);
  color: var(--text);
}
.ap-btn--ghost:hover {
  background: var(--surface-2);
  border-color: rgba(255,255,255,0.16);
}

/* === Toolbar инпуты === */
.ap-toolbar select,
.ap-toolbar input[type="text"],
.ap-toolbar input:not([type]) {
  height: 32px;
  font-size: 12.5px;
  font-weight: 500;
  background: var(--surface);
  border-color: var(--border);
  transition: border-color 0.12s, box-shadow 0.12s;
}
.ap-toolbar select:focus,
.ap-toolbar input:focus {
  border-color: var(--accent);
  box-shadow: var(--focus-ring);
}

/* === Поля формы === */
.ap-field input,
.ap-field textarea,
.ap-field select {
  background: var(--surface);
  border-color: var(--border);
  font-weight: 500;
  transition: border-color 0.12s, box-shadow 0.12s;
}
.ap-field input:focus,
.ap-field textarea:focus,
.ap-field select:focus {
  border-color: var(--accent);
  box-shadow: var(--focus-ring);
  outline: none;
}
.ap-field label {
  color: var(--text-soft);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: none;
}

/* === Карточки: меньше теней, чище === */
.ap-card { box-shadow: none; }
.ap-card:hover {
  border-color: var(--border-strong);
  background: var(--surface);
}

/* === Чипы: плотнее === */
.ap-chip {
  font-size: 10.5px;
  font-weight: 600;
  padding: 3px 8px;
  letter-spacing: -0.005em;
}

/* === Модалки: тоньше тень, чище фон === */
.ap-modal-panel {
  background: var(--surface-3);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-lg);
}
.ap-modal-title {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.015em;
}

/* === Таблицы: hairline-разделители === */
.ap-main table th {
  font-size: 10.5px;
  letter-spacing: 0.08em;
  padding: 9px 8px;
}
.ap-main table td {
  font-size: 12.5px;
  padding: 11px 8px;
}

/* === Skeleton (показывается во время lazy-load модуля) === */
.ap-skeleton {
  display: flex; flex-direction: column; gap: 12px;
  padding: 20px 0;
}
.ap-skeleton-line {
  height: 14px;
  border-radius: 4px;
  background: linear-gradient(
    90deg,
    var(--surface) 0%,
    var(--surface-2) 50%,
    var(--surface) 100%
  );
  background-size: 200% 100%;
  animation: ap-skeleton-shimmer 1.4s ease-in-out infinite;
}
.ap-skeleton-line.short { width: 40%; }
@keyframes ap-skeleton-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* === Toast: компактнее, без громоздкой тени === */
.ap-toast {
  background: var(--surface-3);
  border: 1px solid var(--border-strong);
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  padding: 10px 14px;
  border-radius: 8px;
  box-shadow: var(--shadow-md);
}

/* === Прокрутка тоньше === */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.16); }

/* === Уменьшаем плотность теней везде где они задавались легаси === */
.ap-card, .ap-feed-card, .ap-dash-card, .ap-dash-section {
  box-shadow: none;
}

/* =====================================================================
   ===== Dashboard 2.0 — modern fintech-style KPI cards =====
   Принципы: hero-цифры с tabular-nums, semantic-цвета статусов, gold-
   gradient на «Общей выручке», generous spacing, floating cards с
   закруглением. Этот блок дописан в конце и переопределяет легаси-стили
   секции Dashboard. Применять только к админскому модулю dashboard.js.
   ===================================================================== */

/* Базовая сетка карточек: на десктопе auto-fit + minmax(280px, 1fr) →
   карточки растягиваются равномерно без пустых хвостов. */
.ap-dash {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}

.ap-dash-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 24px 22px;
  position: relative;
  overflow: hidden;
  transition: border-color 0.15s, transform 0.15s;
}
.ap-dash-card:hover { border-color: var(--border-strong); }

/* «Общая выручка» — hero-карточка с тёплым gold-glow в углу. */
.ap-dash-card--total {
  border-color: rgba(244, 184, 58, 0.25);
  background:
    radial-gradient(120% 80% at 0% 0%, rgba(244, 184, 58, 0.14), transparent 65%),
    var(--surface);
}

.ap-dash-label {
  font-size: 11px; font-weight: 800;
  color: var(--text-muted); text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 14px;
}
.ap-dash-value {
  font-size: 32px; font-weight: 800;
  letter-spacing: -0.025em; line-height: 1;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}
/* Главное число «Общая выручка» — золотой градиентный текст. */
.ap-dash-value--xl {
  font-size: 40px !important;
  background: linear-gradient(135deg, #f4b83a 0%, #ffd56e 60%, #f4b83a 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.ap-dash-hint {
  font-size: 12.5px; color: var(--text-soft);
  margin-top: 14px; padding-top: 12px;
  border-top: 1px solid var(--border);
  line-height: 1.4;
}

/* Разбивка под главным числом: Наличные / Картой / онлайн. */
.ap-dash-breakdown {
  display: flex; flex-direction: column;
  gap: 10px;
  margin-top: 16px; padding-top: 14px;
  border-top: 1px solid var(--border);
}
.ap-dash-breakdown-row {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 10px;
  font-size: 13.5px; color: var(--text-soft);
  font-variant-numeric: tabular-nums;
}
.ap-dash-breakdown-row b {
  color: var(--text);
  font-weight: 700;
  font-size: 14px;
  white-space: nowrap;
}

/* Статус-пилюли в «Активные заказы». Каждый статус — свой semantic-цвет. */
.ap-dash-statuses {
  display: flex; gap: 8px; flex-wrap: wrap; margin-top: 18px;
}
.ap-dash-status {
  font-size: 12.5px; font-weight: 700;
  padding: 8px 13px; border-radius: 999px;
  background: var(--surface-2); color: var(--text-soft);
  border: 1px solid var(--border);
  font-variant-numeric: tabular-nums;
}
.ap-dash-status b {
  color: var(--text);
  font-weight: 800;
  margin-left: 4px;
}

/* Semantic-окраска через data-status. */
.ap-dash-status[data-status="new"] {
  background: rgba(77, 157, 255, 0.10);
  color: #8cbcff;
  border-color: rgba(77, 157, 255, 0.22);
}
.ap-dash-status[data-status="new"] b { color: #d2e3ff; }

.ap-dash-status[data-status="cooking"] {
  background: rgba(244, 184, 58, 0.10);
  color: #f5c454;
  border-color: rgba(244, 184, 58, 0.22);
}
.ap-dash-status[data-status="cooking"] b { color: #ffd86e; }

.ap-dash-status[data-status="ready"] {
  background: rgba(77, 217, 122, 0.10);
  color: #7ce399;
  border-color: rgba(77, 217, 122, 0.22);
}
.ap-dash-status[data-status="ready"] b { color: #b6f0c4; }

.ap-dash-status[data-status="delivering"] {
  background: rgba(178, 132, 255, 0.10);
  color: #c5a4ff;
  border-color: rgba(178, 132, 255, 0.22);
}
.ap-dash-status[data-status="delivering"] b { color: #e0cfff; }

/* Hover для кликабельных пилюль — лёгкое осветление. */
.ap-dash-status--clickable {
  cursor: pointer; font: inherit;
  transition: filter 0.12s, transform 0.08s;
}
.ap-dash-status--clickable:hover { filter: brightness(1.18); }
.ap-dash-status--clickable:active { transform: translateY(0.5px); }

/* «Баллы клиентов» — крупные значения с semantic-color. */
.ap-dash-points {
  display: flex; flex-direction: column;
  gap: 12px;
  margin-bottom: 4px;
}
.ap-dash-points-row {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 8px;
  font-variant-numeric: tabular-nums;
}
.ap-dash-points-cap {
  font-size: 14px;
  color: var(--text-soft);
}
.ap-dash-points-row b {
  font-size: 20px; font-weight: 800;
  letter-spacing: -0.015em;
  white-space: nowrap;
}

/* Секции «Топ позиции» / «Последние заказы» / «Стоп-лист» — те же floating cards. */
.ap-dash-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 22px;
  margin-bottom: 14px;
}
.ap-dash-section-title {
  font-size: 11px; font-weight: 800;
  color: var(--text-muted); text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 14px;
}
.ap-dash-row { padding: 12px 0; font-size: 14px; }
.ap-dash-row--clickable {
  padding-left: 8px; padding-right: 8px;
  margin: 0 -8px;
  border-radius: 12px;
}

/* === Mobile @media — переопределяет любые ранее заданные мобильные стили
       для dashboard. Floating cards с боковым отступом 12px, крупные числа. === */
@media (max-width: 720px) {
  .ap-main { padding: 0 0 80px; }
  .ap-page-head { padding: 16px 16px 12px; }
  .ap-dash-toolbar { gap: 10px; margin: 0 0 16px; padding: 0 16px; }
  .ap-dash-sound { padding: 10px 14px; font-size: 13px; border-radius: 12px; }
  .ap-dash-datepicker { margin-left: 0; }

  /* Один столбец, floating cards с 12px боковым отступом. */
  .ap-dash {
    grid-template-columns: 1fr;
    gap: 12px;
    margin: 0 12px 14px;
  }
  .ap-dash-card {
    padding: 24px 20px;
    border-radius: 20px;
    border: 1px solid var(--border);
    background: var(--surface);
  }
  .ap-dash-card--total {
    padding: 28px 22px;
    background:
      radial-gradient(140% 90% at 0% 0%, rgba(244, 184, 58, 0.16), transparent 65%),
      var(--surface);
  }
  .ap-dash-section {
    margin: 0 12px 12px;
    padding: 22px 20px;
    border-radius: 20px;
  }

  .ap-dash-label { font-size: 11px; margin-bottom: 16px; }
  .ap-dash-value { font-size: 36px; }
  .ap-dash-value--xl { font-size: 44px !important; }

  .ap-dash-statuses { gap: 8px; margin-top: 20px; }
  .ap-dash-status { padding: 9px 14px; font-size: 13px; }

  .ap-dash-breakdown { margin-top: 20px; padding-top: 16px; gap: 12px; }
  .ap-dash-breakdown-row { font-size: 14px; }
  .ap-dash-breakdown-row b { font-size: 15px; }

  .ap-dash-points { gap: 14px; }
  .ap-dash-points-row b { font-size: 22px; }
  .ap-dash-points-cap { font-size: 14.5px; }

  .ap-dash-hint { font-size: 13px; margin-top: 16px; padding-top: 12px; }

  .ap-dash-section-title { font-size: 11.5px; margin-bottom: 14px; }
  .ap-dash-row { padding: 14px 0; font-size: 14px; }
}