/*
 * Кабинет владельца для шаблона «Ресторан» (демо). Всё под .adm; бумажно-кремовый, бирюза и шафран.
 * В одной линии с кабинетами клиники, салона и кафе: шапка с бейджем «Демо», вкладки-пилюли,
 * карточки цифр, списки с цветной полосой статуса. Самодостаточный файл (ADR 0009).
 */
@font-face { font-family: "Onest"; font-style: normal; font-weight: 400 800; font-display: swap; src: url(/templates/fonts/onest-cyrillic-ext.woff2) format("woff2"); unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
@font-face { font-family: "Onest"; font-style: normal; font-weight: 400 800; font-display: swap; src: url(/templates/fonts/onest-cyrillic.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Onest"; font-style: normal; font-weight: 400 800; font-display: swap; src: url(/templates/fonts/onest-latin-ext.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Onest"; font-style: normal; font-weight: 400 800; font-display: swap; src: url(/templates/fonts/onest-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

.adm[data-tpl="restaurant"] {
  --bg: #f4efe4;
  --surface: #fbf8f0;
  --surface-2: #ebe4d3;
  --ink: #1d2a2b;
  --dim: #55615f;
  --acc: #0e5a63;
  --acc-deep: #0a444b;
  --on-acc: #ffffff;
  --acc-soft: #d6e6e4;
  --saffron: #d9962b;
  --saffron-soft: #f6e3bd;
  --hot: #a3303a;
  --hot-soft: #f3d4d6;
  --ok: #2a6a35;
  --ok-soft: #dcead6;
  --r: 18px;
  --edge: max(16px, calc((100vw - 1080px) / 2));
  font-family: "Onest", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-weight: 500;
  background: var(--bg);
  color: var(--ink);
  color-scheme: light;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: clip;
}
.adm[data-tpl="restaurant"] *, .adm[data-tpl="restaurant"] *::before, .adm[data-tpl="restaurant"] *::after { box-sizing: border-box; }
.adm[data-tpl="restaurant"] :is(p, h2, h3, ul, ol, pre, dl, dd, article) { margin: 0; }
.adm[data-tpl="restaurant"] :is(ul, ol) { padding: 0; list-style: none; }
.adm[data-tpl="restaurant"] a { color: inherit; text-decoration: none; }
.adm[data-tpl="restaurant"] button, .adm[data-tpl="restaurant"] input { font: inherit; color: inherit; }
.adm[data-tpl="restaurant"] button { cursor: pointer; }
.adm[data-tpl="restaurant"] :focus-visible { outline: 3px solid var(--acc); outline-offset: 2px; border-radius: 8px; }

/* ——— шапка ——— */
.adm-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px var(--edge); }
.adm-title { display: flex; align-items: center; gap: 12px; min-width: 0; }
.adm-badge { padding: 4px 12px; border-radius: 99px; background: var(--acc); color: var(--on-acc); font-size: 14px; font-weight: 700; }
.adm-name { font-size: 24px; font-weight: 800; letter-spacing: -0.03em; }
.adm-head-r { display: flex; align-items: center; gap: 10px; }
.adm-lang { display: flex; gap: 2px; padding: 3px; border-radius: 99px; background: var(--surface-2); }
.adm-lang a { display: grid; place-items: center; min-width: 40px; min-height: 40px; padding: 0 6px; border-radius: 99px; font-size: 14px; font-weight: 700; color: var(--dim); }
.adm-lang a[aria-current="true"] { background: var(--acc); color: var(--on-acc); }
.adm-open { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 99px; background: var(--surface-2); font-size: 15px; font-weight: 700; white-space: nowrap; transition: background-color 0.15s; }
.adm-open:hover { background: var(--saffron-soft); }

/* ——— вкладки ——— */
.adm-tabs { display: flex; gap: 6px; padding: 6px var(--edge) 10px; overflow-x: auto; scrollbar-width: none; }
.adm-tabs::-webkit-scrollbar { display: none; }
.adm-tabs button { position: relative; flex: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 20px; border: 0; border-radius: 99px; background: var(--surface-2); font-size: 16px; font-weight: 700; color: var(--dim); white-space: nowrap; transition: background-color 0.15s, color 0.15s; }
.adm-tabs button:hover { color: var(--ink); }
.adm-tabs button[aria-current="page"] { background: var(--ink); color: var(--bg); }
.adm-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--saffron); box-shadow: 0 0 0 3px var(--saffron-soft); }

/* ——— основной блок ——— */
.adm-main { padding: 18px var(--edge) 28px; }
.adm-main > section { display: flex; flex-direction: column; gap: 14px; }
.adm-h2 { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; margin-top: 8px !important; }
.adm-h3 { font-size: 16px; font-weight: 700; color: var(--dim); }
.adm-hint { font-size: 15px; color: var(--dim); max-width: 64ch; }
.adm-period { font-size: 15px; font-weight: 700; color: var(--dim); }
.adm-insight { font-size: 17px; font-weight: 600; max-width: 70ch; }
.adm-skel { min-height: 560px; border-radius: var(--r); background: var(--surface-2); opacity: 0.6; }

/* ——— цифры ——— */
.adm-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.adm-stat { display: grid; gap: 2px; align-content: start; padding: 16px 18px; border-radius: var(--r); background: var(--surface); }
.adm-stat b { font-size: 30px; font-weight: 800; line-height: 1.1; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.adm-stat > span { font-size: 15px; font-weight: 600; color: var(--dim); }
.adm-stat em { font-style: normal; font-size: 14px; font-weight: 700; color: var(--hot); }
.adm-stat em[data-up] { color: var(--ok); }
.adm-bars { display: flex; align-items: stretch; gap: 10px; height: 170px; padding: 24px 14px 12px; border-radius: var(--r); background: var(--surface); }
.adm-bar { flex: 1 1 0; min-width: 0; display: grid; grid-template-rows: minmax(0, 1fr) auto; justify-items: center; gap: 6px; }
.adm-bar b { align-self: end; position: relative; width: min(100%, 44px); border-radius: 12px 12px 4px 4px; background: var(--acc); min-height: 6px; }
.adm-bar b::after { content: attr(data-n); position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); margin-bottom: 3px; font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--dim); }
.adm-bar span { font-size: 13px; font-weight: 600; color: var(--dim); }

/* ——— заявки ——— */
.adm-leads { display: grid; gap: 10px; }
.adm-lead { --pill: var(--acc-deep); --pill-bg: var(--acc-soft); display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: start; gap: 8px 16px; padding: 14px 16px; border-radius: var(--r); background: var(--surface); border-left: 8px solid var(--pill); }
.adm-lead[data-status="confirmed"] { --pill: var(--ok); --pill-bg: var(--ok-soft); }
.adm-lead[data-status="done"] { --pill: #5c5f54; --pill-bg: #e6e3d6; }
.adm-lead[data-status="cancelled"] { --pill: var(--hot); --pill-bg: var(--hot-soft); }
.adm-lead[data-status="cancelled"] .adm-lead-main > b { text-decoration: line-through; text-decoration-color: var(--hot); text-decoration-thickness: 2px; }
.adm-time { display: grid; justify-items: center; min-width: 62px; line-height: 1.1; }
.adm-time b { font-size: 24px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.adm-time small { font-size: 13px; font-weight: 600; color: var(--dim); text-align: center; }
.adm-lead-main { display: grid; gap: 3px; min-width: 0; font-size: 15px; }
.adm-lead-main > b { font-size: 17px; font-weight: 800; }
.adm-lead-main > span { color: var(--dim); font-weight: 500; overflow-wrap: anywhere; }
.adm-phone { font-variant-numeric: tabular-nums; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; display: inline-flex; align-items: center; min-height: 44px; }
.adm-site { margin-left: 8px; padding: 2px 10px; border-radius: 99px; background: var(--acc-soft); color: var(--acc-deep); font-size: 13px; font-weight: 700; font-style: normal; }
.adm-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.adm-tags em { padding: 2px 11px; border-radius: 99px; background: var(--saffron-soft); color: #5a3d06; font-size: 14px; font-weight: 700; font-style: normal; }
.adm-tags em[data-zone] { background: var(--acc-soft); color: var(--acc-deep); }
.adm-wish { padding: 6px 12px; border-radius: 12px; background: var(--surface-2); color: var(--ink) !important; font-weight: 600 !important; }
.adm-wish small { font-weight: 700; color: var(--dim); }
.adm-lead-side { display: grid; justify-items: end; gap: 6px; }
.adm-pill { padding: 3px 12px; border-radius: 99px; background: var(--pill-bg); color: var(--pill); font-size: 14px; font-weight: 700; white-space: nowrap; }
.adm-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.adm-link { min-height: 44px; padding: 0 6px; border: 0; background: none; font-size: 14px; font-weight: 700; color: var(--acc-deep); text-decoration: underline; text-underline-offset: 4px; }

/* ——— меню и цены ——— */
.adm-cat { display: grid; gap: 8px; }
.adm-items { overflow: hidden; border-radius: var(--r); background: var(--surface); }
.adm-item { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto auto auto; align-items: center; gap: 6px 14px; padding: 10px 16px; min-height: 68px; }
.adm-item:nth-child(even) { background: color-mix(in srgb, var(--surface-2) 40%, transparent); }
.adm-thumb { display: grid; place-items: center; width: 48px; height: 48px; overflow: hidden; border-radius: 14px; background: var(--acc-soft); }
.adm-thumb.big { width: 64px; height: 64px; border-radius: 16px; }
.adm-thumb img { width: 100%; height: 100%; object-fit: cover; }
.adm-item-name { display: grid; font-weight: 700; font-size: 16px; line-height: 1.2; }
.adm-item-name small { font-size: 13px; font-weight: 700; color: var(--hot); }
.adm-item-name small.muted { color: var(--dim); font-weight: 500; font-size: 14px; }
.adm-item[data-hidden] .adm-thumb { opacity: 0.45; }
.adm-item[data-hidden] .adm-item-name, .adm-item[data-out] .adm-item-name { color: var(--dim); }
.adm-price, .adm-price-input { min-width: 112px; min-height: 44px; text-align: right; font-size: 16px; font-weight: 700; font-variant-numeric: tabular-nums; }
.adm-price { padding: 0 6px; background: none; border: 0; text-decoration: underline dotted var(--dim); text-decoration-thickness: 2px; text-underline-offset: 6px; white-space: nowrap; }
.adm-price:hover { color: var(--acc); text-decoration-color: var(--acc); }
.adm-price small { margin-left: 6px; font-size: 13px; font-weight: 700; color: var(--ok); text-decoration: none; }
.adm-price-input { padding: 0 12px; border: 2px solid var(--acc); border-radius: 14px; background: var(--surface); }
.adm-price-input:focus { outline: none; }
.adm-toggle { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 14px 0 8px; border: 0; border-radius: 99px; background: var(--surface-2); font-size: 14px; font-weight: 700; white-space: nowrap; }
.adm-toggle i { position: relative; width: 38px; height: 22px; border-radius: 99px; background: #b6b0a0; transition: background-color 0.2s; }
.adm-toggle i::after { content: ""; position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform 0.2s; }
.adm-toggle[aria-checked="true"] i { background: var(--acc); }
.adm-toggle[aria-checked="true"] i::after { transform: translateX(16px); }

/* наборы на компанию */
.adm-sets { display: grid; gap: 12px; }
.adm-set { display: grid; gap: 10px; padding: 16px; border-radius: var(--r); background: var(--surface); border-left: 8px solid var(--acc); }
.adm-set[data-off] { border-left-color: var(--surface-2); }
.adm-set[data-off] > header .adm-thumb { opacity: 0.45; }
.adm-set > header { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; align-items: center; gap: 12px; }
.adm-pct { display: inline-flex; align-items: center; gap: 12px; font-size: 15px; font-weight: 700; }
.adm-pct input { width: 92px; min-height: 48px; padding: 0 12px; border: 2px solid transparent; border-radius: 14px; background: var(--surface-2); font-size: 17px; font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.adm-pct input:focus { outline: none; border-color: var(--acc); background: var(--surface); }
.adm-set-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 4px 16px; }
.adm-set-items label { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; min-height: 44px; font-weight: 600; cursor: pointer; }
.adm-set-items input { width: 22px; height: 22px; margin: 0; accent-color: var(--acc); }
.adm-set-items small { font-size: 14px; color: var(--dim); font-weight: 500; }
.adm-set-items em { padding: 1px 10px; border-radius: 99px; background: var(--hot-soft); color: var(--hot); font-size: 13px; font-weight: 700; font-style: normal; }
.adm-set-items li[data-out] > label > span { color: var(--dim); }

/* акция и поля */
.adm-row { display: flex; flex-wrap: wrap; gap: 16px; }
.adm-row label { display: grid; gap: 6px; font-weight: 700; font-size: 15px; }
.adm-row input, .adm-field input { min-height: 52px; padding: 0 16px; border: 2px solid transparent; border-radius: 16px; background: var(--surface); font-size: 17px; font-weight: 600; }
.adm-row input:focus, .adm-field input:focus { outline: none; border-color: var(--acc); }
.adm-check { display: inline-flex; align-items: center; align-self: flex-start; gap: 12px; min-height: 48px; font-size: 16px; font-weight: 700; cursor: pointer; }
.adm-check input { width: 24px; height: 24px; margin: 0; accent-color: var(--acc); }
.adm-field { display: grid; gap: 6px; max-width: 560px; font-weight: 700; font-size: 15px; }

/* сводка */
.adm-digest { display: grid; gap: 8px; margin-top: 8px; padding: 18px; border-radius: var(--r); background: var(--surface); }
.adm-digest .adm-h2 { margin: 0 !important; }
.adm-digest pre { margin: 0; padding: 14px 16px; border-radius: 14px; background: var(--surface-2); font-family: inherit; font-size: 15px; font-weight: 500; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }

/* ——— подвал ——— */
.adm-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px; padding: 18px var(--edge) calc(28px + env(safe-area-inset-bottom, 0px)); font-size: 15px; color: var(--dim); }
.adm-foot > p { flex: 1 1 320px; max-width: 62ch; }
.adm-foot > div { display: flex; gap: 14px; }

/* ——— планшет и телефон ——— */
@media (min-width: 761px) {
  .adm-stats { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 760px) {
  .adm-stat b { font-size: 26px; }
  .adm-name { font-size: 22px; }
  .adm-item { grid-template-columns: 48px minmax(0, 1fr) auto; padding: 10px 14px; }
  .adm-item .adm-toggle { grid-column: 2 / 4; justify-self: start; }
  .adm-item .adm-link { grid-column: 2 / 4; justify-self: start; min-height: 40px; }
  .adm-item .adm-price, .adm-item .adm-price-input { grid-column: 3; grid-row: 1; }
  .adm-set > header { grid-template-columns: 56px minmax(0, 1fr); }
  .adm-set > header .adm-thumb.big { width: 56px; height: 56px; }
  .adm-set > header .adm-toggle { grid-column: 1 / -1; justify-self: start; }
  .adm-lead { grid-template-columns: auto minmax(0, 1fr); }
  .adm-lead-side { grid-column: 1 / -1; grid-template-columns: auto 1fr; align-items: center; justify-items: start; }
  .adm-actions { justify-content: flex-start; }
}
@media (max-width: 480px) {
  .adm-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding-inline: 12px; overflow: visible; }
  .adm-tabs button { padding: 0 8px; min-height: 48px; font-size: 15px; white-space: normal; text-align: center; line-height: 1.1; }
  .adm-bars { gap: 6px; padding-inline: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .adm *, .adm *::before, .adm *::after { transition: none !important; animation: none !important; }
}

/* ——— кнопка «Получить в Telegram» под превью сводки ——— */
.adm .adm-btn.adm-tg { color: var(--on-acc); gap: 8px; min-height: 48px; text-decoration: none; justify-self: start; align-self: start; width: fit-content; max-width: 100%; white-space: normal; text-align: center; }
.adm .adm-btn.adm-tg:hover { color: var(--on-acc); text-decoration: none; }
.adm-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 20px; border: 0; border-radius: 99px; background: var(--acc); color: var(--on-acc); font-size: 15px; font-weight: 800; white-space: nowrap; transition: background-color 0.15s, transform 0.12s; }
.adm-btn:hover { background: var(--acc-deep); }
.adm-btn:active { transform: scale(0.96); }
