/* Админка. Вид взят у панели VPN: боковое меню с иконками, верхняя полоса,
 * карточки. Токены и размеры кнопок общие с витриной — владелец не должен
 * переучиваться, переходя из магазина в управление им.
 */

.адм{ background:var(--фон-2); }

.панель{ display:flex; min-height:100vh; min-height:100dvh; }

/* ── Боковое меню ─────────────────────────────────────────────────── */

.боковое{
  width:212px; flex:0 0 auto; display:flex; flex-direction:column; gap:1px;
  padding:14px 10px; background:var(--фон);
  border-right:1px solid var(--граница);
  position:sticky; top:0; height:100vh; height:100dvh; overflow-y:auto;
}
.боковое__имя{
  padding:6px 10px 14px; font-weight:700; font-size:17px;
  color:var(--accent); letter-spacing:-.02em;
}
.боковое__группа{
  padding:16px 10px 6px; font-size:11px; font-weight:700;
  text-transform:uppercase; letter-spacing:.11em; color:var(--приглушённый);
}
.боковое__низ{ margin-top:auto; padding-top:14px; }
.боковое__низ form{ margin:0; }

.пункт{
  display:flex; align-items:center; gap:10px; width:100%;
  padding:9px 10px; border-radius:var(--радиус-мелкий);
  font-size:15px; color:var(--текст-2); text-align:left;
  min-height:40px; border:0; background:none; font-family:inherit; cursor:pointer;
}
.пункт:hover{ background:var(--фон-2); color:var(--текст); text-decoration:none; }
.пункт svg{
  width:17px; height:17px; flex:0 0 auto;
  stroke:currentColor; fill:none; stroke-width:1.8;
  stroke-linecap:round; stroke-linejoin:round; opacity:.75;
}
.пункт_текущий{ background:var(--accent); color:var(--accent-текст); font-weight:600; }
.пункт_текущий:hover{ background:var(--accent); color:var(--accent-текст); }
.пункт_текущий svg{ opacity:1; }
.пункт__счёт{
  margin-left:auto; padding:1px 8px; border-radius:999px;
  background:var(--accent); color:var(--accent-текст);
  font-size:12px; font-weight:700;
}
.пункт_текущий .пункт__счёт{ background:var(--accent-текст); color:var(--accent); }

/* ── Рабочая часть ────────────────────────────────────────────────── */

.рабочее{ flex:1 1 auto; min-width:0; display:flex; flex-direction:column; }

.верх{
  display:flex; align-items:center; gap:12px;
  height:56px; flex:0 0 auto; padding:0 20px;
  background:var(--фон); border-bottom:1px solid var(--граница);
  position:sticky; top:0; z-index:10;
}
.верх__место{ font-weight:600; }
.верх__меню{
  display:none; width:44px; height:44px; margin-left:-10px;
  border:0; background:none; cursor:pointer; border-radius:var(--радиус-мелкий);
}
.верх__меню svg{ width:22px; height:22px; stroke:currentColor; fill:none; stroke-width:1.8; stroke-linecap:round; }
.верх__право{ margin-left:auto; display:flex; gap:8px; align-items:center; flex-wrap:wrap; }

.рабочее__тело{ padding:20px; max-width:1180px; width:100%; }
.рабочее__тело h1{ margin-bottom:4px; }
/* Ссылка в подзаголовке страницы (адрес раздела, адрес документа) и в списке
   подсказок сводки — тоже цель для пальца: без отступов её высота 21 точка,
   а норма 24. */
.рабочее__тело p a,
.сводка__список a,
.дела a,
.ссылка_вбок{ display:inline-block; padding:2px 0; }

@media (max-width:860px){
  .боковое{
    position:fixed; z-index:40; left:0; top:0; bottom:0;
    transform:translateX(-100%); transition:transform .18s ease;
    box-shadow:var(--тень-крупная);
  }
  .боковое[data-открыто]{ transform:none; }
  .верх__меню{ display:flex; align-items:center; justify-content:center; }
  .рабочее__тело{ padding:16px; }
}

/* ── Карточки и плашки ────────────────────────────────────────────── */

.карта{
  background:var(--фон); border:1px solid var(--граница);
  border-radius:var(--радиус); margin-bottom:16px; overflow:hidden;
}
.карта__шапка{
  display:flex; align-items:center; justify-content:space-between; gap:12px;
  padding:14px 16px; border-bottom:1px solid var(--граница); flex-wrap:wrap;
}
.карта__шапка h2{ margin:0; font-size:17px; }
.карта__тело{ padding:16px; }

.плашки{
  display:grid; gap:12px; margin-bottom:20px;
  grid-template-columns:repeat(auto-fit,minmax(170px,1fr));
}
.плашка{
  padding:14px 16px; background:var(--фон);
  border:1px solid var(--граница); border-radius:var(--радиус);
}
.плашка__число{ font-size:26px; font-weight:700; line-height:1.15; }
.плашка__подпись{ color:var(--приглушённый); font-size:13px; margin-top:2px; }

/* ── Таблицы ──────────────────────────────────────────────────────── */

.таблица{
  width:100%; border-collapse:collapse; background:var(--фон);
  border:1px solid var(--граница); border-radius:var(--радиус); overflow:hidden;
}
.таблица th,.таблица td{
  padding:10px 14px; text-align:left; border-bottom:1px solid var(--граница);
  vertical-align:middle; font-size:15px;
}
.таблица th{
  background:var(--фон-2); font-size:12px; font-weight:700;
  text-transform:uppercase; letter-spacing:.06em; color:var(--приглушённый);
}
.таблица tr:last-child td{ border-bottom:none; }
.таблица tbody tr:hover{ background:var(--фон-2); }
.таблица a{ font-weight:600; display:inline-block; padding:3px 0; }

/* На узком экране таблица прокручивается внутри себя, а не тянет страницу. */
.таблица_обёртка{ overflow-x:auto; border-radius:var(--радиус); }
@media (max-width:760px){
  .таблица{ min-width:640px; }
}

.мини{
  width:48px; height:48px; object-fit:cover;
  border-radius:var(--радиус-xs,8px); background:var(--фон-3);
}
.мини_пусто{ display:block; }
/* Обложка, взятая из первого товара, а не загруженная владельцем. */
.мини_чужая{ outline:1px dashed var(--линия-поля); outline-offset:2px; }

.состояние{
  display:inline-block; padding:3px 10px; border-radius:999px;
  font-size:12px; font-weight:600; background:var(--фон-3); color:var(--текст-2);
  white-space:nowrap;
}
.состояние_new{ background:#e9f2fb; color:#1c6cae; }
.состояние_confirmed{ background:#eeeafb; color:#5a45b8; }
.состояние_assembling{ background:#fcf3dc; color:#8a5d00; }
.состояние_delivering{ background:#e9f2fb; color:#1c6cae; }
.состояние_done{ background:#e6f6ec; color:#157a46; }
.состояние_canceled{ background:var(--плохо-фон); color:var(--плохо); }

.листалка{
  display:flex; gap:12px; align-items:center; justify-content:center;
  margin-top:20px;
}

/* ── Формы ────────────────────────────────────────────────────────── */

.форма{
  padding:16px; background:var(--фон);
  border:1px solid var(--граница); border-radius:var(--радиус);
}
.поле__пара{ display:grid; gap:12px; grid-template-columns:1fr 1fr; }
@media (max-width:600px){ .поле__пара{ grid-template-columns:1fr; } }
.поле_цвет{ height:44px; padding:4px; }
select.поле{ appearance:auto; }

.набор{
  border:1px solid var(--граница); border-radius:var(--радиус);
  padding:16px; margin:0 0 16px;
}
.набор legend{ padding:0 8px; font-weight:700; }

.галочки{
  display:grid; gap:2px; grid-template-columns:repeat(auto-fill,minmax(180px,1fr));
  max-height:260px; overflow-y:auto;
  padding:8px; border:1px solid var(--граница); border-radius:var(--радиус-мелкий);
}
.галочка{
  display:flex; align-items:center; gap:8px;
  min-height:40px; padding:0 6px; cursor:pointer; font-size:15px;
  border-radius:var(--радиус-мелкий);
}
.галочка:hover{ background:var(--фон-2); }
/* Сам квадратик небольшой, но нажимается вся строка: подпись обёрнута
   вокруг поля, и цель касания получается во всю её высоту. */
.галочка input{ width:24px; height:24px; flex:0 0 auto; accent-color:var(--accent); }

.свёртка{
  margin:16px 0; padding:14px 16px;
  background:var(--фон-2); border-radius:var(--радиус-мелкий);
}
.свёртка summary{ cursor:pointer; font-weight:600; min-height:24px; }

.подсказка_хорошо{ background:#e6f6ec; color:#157a46; }
.проверка_бота{ margin-top:-6px; }

/* ── Фотографии товара ────────────────────────────────────────────── */

.снимки{
  display:grid; gap:12px; margin-bottom:16px;
  grid-template-columns:repeat(auto-fill,minmax(120px,1fr));
}
.снимок{
  padding:8px; background:var(--фон);
  border:1px solid var(--граница); border-radius:var(--радиус);
}
.снимок img{
  width:100%; aspect-ratio:1; object-fit:cover;
  border-radius:var(--радиус-мелкий); margin-bottom:8px;
}
.снимок .кнопка{ width:100%; }

/* ── Заказы ───────────────────────────────────────────────────────── */

.отбор{ display:flex; gap:8px; flex-wrap:wrap; margin-bottom:16px; }

.заказы{
  display:grid; gap:16px;
  grid-template-columns:repeat(auto-fill,minmax(320px,1fr));
}
.заказ{
  padding:16px; background:var(--фон);
  border:1px solid var(--граница); border-radius:var(--радиус);
}
.заказ__верх{
  display:flex; justify-content:space-between; gap:12px; align-items:flex-start;
  margin-bottom:12px;
}
.заказ__номер{ font-weight:700; font-size:16px; }
.заказ__сумма{ font-weight:700; font-size:18px; white-space:nowrap; }
.заказ__данные{
  display:grid; grid-template-columns:auto 1fr; gap:4px 12px;
  margin:12px 0; font-size:14px;
}
.заказ__данные dt{ color:var(--приглушённый); }
.заказ__данные dd{ margin:0; }
.заказ__низ{ display:flex; gap:8px; margin-top:12px; }
.заказ__низ .поле{ flex:1 1 auto; }

/* ── Вход ─────────────────────────────────────────────────────────── */

.вход{
  max-width:420px; margin:64px auto; padding:28px;
  background:var(--фон); border:1px solid var(--граница);
  border-radius:var(--радиус); box-shadow:var(--тень);
}
.вход h1{ font-size:24px; }


/* ── Вкладки настроек ─────────────────────────────────────────────── */

.вкладки{
  display:flex; gap:6px; flex-wrap:wrap; margin-bottom:20px;
  border-bottom:1px solid var(--граница); padding-bottom:10px;
}
.вкладка{
  display:inline-flex; align-items:center; padding:0 16px;
  height:var(--высота-кнопки); min-width:116px; justify-content:center;
  border-radius:var(--радиус-мелкий); font-size:15px; font-weight:500;
  color:var(--текст-2);
}
.вкладка:hover{ background:var(--фон-2); text-decoration:none; }
.вкладка_текущая{ background:var(--accent); color:var(--accent-текст); font-weight:600; }
.вкладка_текущая:hover{ background:var(--accent); color:var(--accent-текст); }

/* ── Логотип и значок ─────────────────────────────────────────────── */

.знаки{ display:grid; gap:20px; grid-template-columns:1fr 1fr; }
@media (max-width:760px){ .знаки{ grid-template-columns:1fr; } }
.знак form{ margin:0 0 10px; }
.знак__место{
  display:flex; align-items:center; justify-content:center;
  min-height:110px; margin-bottom:14px; padding:16px;
  border:1px dashed var(--линия-поля); border-radius:var(--радиус);
  background:var(--фон-2); text-align:center;
}
.знак__место img{ max-height:72px; width:auto; }
.знак__место_мелко img{ max-height:48px; }
/* Баннер широкий: в ячейке под знак от него осталась бы полоска. */
.знак__место_широко{ min-height:180px; padding:0; overflow:hidden; }
.знак__место_широко img{ max-height:260px; width:100%; object-fit:cover; }

/* ── Разделы каталога ─────────────────────────────────────────────── */

.строка_формы{
  display:grid; gap:12px; align-items:end;
  grid-template-columns:1fr 1fr auto;
}
@media (max-width:760px){ .строка_формы{ grid-template-columns:1fr; } }
.строка_формы .поле__ряд{ margin-bottom:0; }

.разделы_список{ display:grid; gap:12px; }
.раздел_карта{
  display:grid; gap:16px; align-items:start;
  grid-template-columns:170px minmax(0,1fr) auto;
  padding:16px; background:var(--фон);
  border:1px solid var(--граница); border-radius:var(--радиус);
}
@media (max-width:900px){
  .раздел_карта{ grid-template-columns:1fr; }
}
.раздел_карта__обложка img,
.раздел_карта__обложка .карточка__пусто{
  width:100%; aspect-ratio:4/3; object-fit:cover;
  border-radius:var(--радиус-мелкий); display:block;
}
.раздел_карта__поля .поле__ряд{ margin-bottom:10px; }
.раздел_карта__низ{
  display:flex; align-items:center; gap:16px; flex-wrap:wrap;
  font-size:14px;
}
.раздел_карта__кнопки{ display:flex; flex-direction:column; gap:8px; }
@media (max-width:900px){
  .раздел_карта__кнопки{ flex-direction:row; }
}

/* ── Дела и полоски в сводке ──────────────────────────────────────── */

.дела{ margin:0; padding-left:20px; }
.дела li{ margin-bottom:8px; }
.дела a{ font-weight:600; text-decoration:underline; }

/* Заказы по дням. Полоски рисуем сами: тянуть библиотеку графиков ради
   четырнадцати столбиков — лишний вес на каждой странице админки. */
.полоски{
  display:flex; align-items:flex-end; gap:6px; height:120px;
}
.полоска{
  flex:1 1 0; display:flex; flex-direction:column; align-items:center;
  justify-content:flex-end; height:100%; min-width:0;
}
.полоска__столб{
  width:100%; min-height:4px; border-radius:4px 4px 0 0;
  background:var(--accent); opacity:.85;
}
.полоска__день{
  margin-top:6px; font-size:11px; color:var(--приглушённый);
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:100%;
}


/* ── Блоки главной страницы ───────────────────────────────────────── */

.блоки_список{ display:grid; gap:12px; }
.блок_карта{
  padding:16px; background:var(--фон);
  border:1px solid var(--граница); border-radius:var(--радиус);
}
.блок_карта_выключен{ opacity:.65; background:var(--фон-2); }
.блок_карта__шапка{
  display:flex; justify-content:space-between; gap:16px; align-items:flex-start;
  margin-bottom:12px; flex-wrap:wrap;
}
.блок_карта__имя{
  display:flex; align-items:center; gap:8px; flex-wrap:wrap;
  font-weight:700; font-size:16px;
}
.блок_карта__стрелки{ display:flex; gap:6px; }
.блок_карта__стрелки .кнопка{ width:44px; min-width:44px; padding:0; font-size:18px; }
.блок_карта__стрелки .кнопка[disabled]{ opacity:.4; cursor:default; }
.блок_карта__низ{ display:flex; gap:8px; flex-wrap:wrap; margin-top:4px; }


/* ── Промокоды, зоны, варианты ────────────────────────────────────── */

.в_строку{ display:flex; gap:6px; flex-wrap:wrap; }
.раздел_карта_узкая{ grid-template-columns:minmax(0,1fr) auto; }
@media (max-width:900px){ .раздел_карта_узкая{ grid-template-columns:1fr; } }

.строки_узкие{ margin-bottom:16px; }
.строка_вариант{
  display:flex; align-items:center; justify-content:space-between; gap:12px;
  padding:10px 0; border-bottom:1px solid var(--граница);
}
.строка_вариант form{ margin:0; }


/* ── Массовые действия ────────────────────────────────────────────── */

.массовое{
  display:grid; gap:12px; align-items:end;
  grid-template-columns:minmax(0,1fr) 180px auto;
}
@media (max-width:900px){ .массовое{ grid-template-columns:1fr; } }
.массовое .поле__ряд{ margin-bottom:0; }
.массовое__кнопки{ display:flex; gap:8px; flex-wrap:wrap; }
