/* TERRUAR COFFEE — насыщенная тема по мотивам логотипа и иллюстрации кофейной ветки */
:root {
  --blue: #2490cf;
  --blue-d: #176da3;
  --green: #3daa47;
  --green-d: #2b8735;
  --forest: #0e2a1c;
  --night: #0b3346;
  --berry: #e2483d;
  --amber: #f2a65a;
  --bg: #f5ede1;
  --bg-2: #efe3d2;
  --card: #ffffff;
  --text: #22180f;
  --muted: #7b6a5b;
  --line: #eadccb;
  --danger: #d0443a;
  --radius: 22px;
  --shadow: 0 6px 22px rgba(70, 40, 15, 0.09);
  --shadow-lg: 0 14px 40px rgba(70, 40, 15, 0.16);
  --grad-brand: linear-gradient(135deg, var(--green) 0%, #23a07a 50%, var(--blue) 100%);
  --grad-dark: linear-gradient(135deg, var(--forest) 0%, #0d3a33 45%, var(--night) 100%);
  --font-head: "Unbounded", "Manrope", system-ui, sans-serif;
  --font: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --tabbar-h: 0px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 140px; }
body {
  margin: 0;
  font: 16px/1.5 var(--font);
  color: var(--text);
  background: var(--forest);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
/* Иллюстрация кофейной ветки с птицей — фон всей страницы.
   Отдельный fixed-слой вместо background-attachment: fixed, чтобы работало и на iPhone */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(ellipse 60% 45% at 50% 28%, rgba(10, 32, 22, 0.88) 0%, rgba(10, 32, 22, 0.55) 60%, rgba(10, 32, 22, 0.25) 100%),
    linear-gradient(90deg, rgba(14, 42, 28, 0.7) 0%, rgba(13, 50, 45, 0.35) 50%, rgba(11, 51, 70, 0.3) 100%),
    url("/img/hero.webp") right -2vw bottom -2px / auto min(92vh, 900px) no-repeat,
    var(--grad-dark);
}
/* Панель персонала остаётся светлой — так удобнее работать */
body.admin-page { background: var(--bg); }
body.admin-page::before { display: none; }

a { color: var(--blue-d); }
img { max-width: 100%; display: block; }
h1, h2, h3 { font-family: var(--font-head); line-height: 1.15; margin: 0 0 12px; letter-spacing: -0.01em; }
h1 { font-size: clamp(24px, 4vw, 34px); font-weight: 700; }
h2 { font-size: clamp(19px, 2.6vw, 24px); font-weight: 700; }
h3 { font-size: 16px; font-weight: 600; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.hidden { display: none !important; }

/* ---------- Шапка ---------- */
.topbar {
  position: sticky; top: 0; z-index: 40;
  background: var(--grad-dark);
  box-shadow: 0 4px 20px rgba(5, 25, 20, 0.25);
}
.topbar .inner {
  max-width: 1320px; margin: 0 auto; padding: 10px 24px;
  display: flex; align-items: center; gap: 16px;
}
.topbar .logo { display: block; }
/* Логотип без подложки: прозрачный PNG прямо на тёмной шапке, лёгкое свечение для контраста */
.topbar .logo img { height: 56px; width: auto; filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.25)) drop-shadow(0 2px 6px rgba(0, 0, 0, 0.4)); }
.topbar nav { margin-left: auto; display: flex; gap: 4px; align-items: center; }
.navlink {
  text-decoration: none; color: #d8ece6; font-weight: 700; font-size: 15px;
  padding: 9px 14px; border-radius: 999px; position: relative; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 8px; transition: background 0.15s, color 0.15s;
}
.navlink svg { width: 20px; height: 20px; }
.navlink:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }
.navlink.active { background: #fff; color: var(--forest); }
.navlink.cta { background: var(--green); color: #fff; }
button.navlink { border: 0; background: transparent; font-family: inherit; cursor: pointer; }
.navlink.out { color: #ffb4ad; }
.navlink.out:hover { background: rgba(226, 72, 61, 0.15); color: #fff; }

/* Продавец пользуется меню как кассой — корзина доступна */
.navlink.cta:hover { background: var(--green-d); }
.badge {
  display: inline-block; min-width: 21px; padding: 0 6px;
  background: var(--berry); color: #fff; border-radius: 999px; font-size: 12px; font-weight: 800; line-height: 21px; text-align: center;
}

main { max-width: 1320px; margin: 0 auto; padding: 22px 24px 60px; }

/* ---------- Нижняя панель (телефон) ---------- */
.tabbar { display: none; }

/* ---------- Главный баннер: текст прямо на общем фоне страницы ---------- */
.hero { position: relative; color: #fff; min-height: 250px; display: flex; align-items: center; justify-content: center; text-align: center; margin-bottom: 18px; }
.hero .text { position: relative; padding: clamp(20px, 3vw, 40px) 0; max-width: 720px; margin: 0 auto; text-shadow: 0 2px 18px rgba(0, 0, 0, 0.35); }
.hero .eyebrow {
  display: inline-block; font-weight: 800; font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--amber); margin-bottom: 12px;
}
.hero h1 { font-size: clamp(28px, 4.6vw, 52px); margin-bottom: 14px; }
.hero h1 span { background: linear-gradient(90deg, #7fe08a, #6cc7ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { margin: 0 auto; color: #d3e7e0; font-size: clamp(15px, 1.6vw, 18px); max-width: 520px; }
.hero .actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }

/* ---------- Раскладка меню ---------- */
.menu-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 28px; align-items: start; }
.side-cart { position: sticky; top: 96px; }
/* Колонки сетки не должны растягиваться под прокручиваемую полосу категорий */
.menu-layout > *, .cart-layout > *, .account-layout > * { min-width: 0; }
html, body { overflow-x: clip; }

/* ---------- Категории ---------- */
.cats {
  position: sticky; top: 76px; z-index: 20; overscroll-behavior-x: contain;
  display: flex; gap: 8px; overflow-x: auto; padding: 12px 2px; margin: 0 -2px 6px;
  background: linear-gradient(rgba(14, 42, 28, 0.96) 75%, rgba(14, 42, 28, 0)); scrollbar-width: none;
}
.cats::-webkit-scrollbar { display: none; }
.chip {
  border: 2px solid transparent; background: var(--card); color: var(--text);
  padding: 9px 16px; border-radius: 999px; font: 700 15px var(--font); white-space: nowrap; cursor: pointer;
  box-shadow: 0 2px 8px rgba(70, 40, 15, 0.08); display: inline-flex; align-items: center; gap: 7px; transition: transform 0.1s;
}
.chip:hover { transform: translateY(-1px); }
.chip .emo { font-size: 18px; line-height: 1; }
.chip.active { background: var(--grad-brand); color: #fff; box-shadow: 0 6px 16px rgba(35, 160, 122, 0.35); }

.cat-section { margin: 14px 0 34px; }
.cat-title { display: flex; align-items: baseline; gap: 12px; margin-bottom: 16px; }
.cat-title h2 { margin: 0; font-size: clamp(22px, 3vw, 30px); color: #fff; }
.cat-title .count { color: #7fe08a; font-weight: 800; font-size: 14px; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 18px; }

/* ---------- Карточка товара ---------- */
.card {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  overflow: hidden; display: flex; flex-direction: column;
}
.product { transition: transform 0.18s, box-shadow 0.18s; box-shadow: 0 8px 26px rgba(0, 0, 0, 0.25); }
.product:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.product .pic { aspect-ratio: 4 / 3; background: var(--bg-2); display: grid; place-items: center; overflow: hidden; position: relative; }
.product .pic img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s; }
.product:hover .pic img { transform: scale(1.05); }
.product .pic .ph { font-size: 54px; }
.product .in-cart {
  position: absolute; top: 10px; left: 10px; background: var(--berry); color: #fff; font-weight: 800; font-size: 12px;
  padding: 4px 9px; border-radius: 999px; box-shadow: 0 4px 10px rgba(226, 72, 61, 0.35);
}
.product .body { padding: 16px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.product h3 { margin: 0; font-size: 17px; }
.product .desc { color: var(--muted); font-size: 14px; flex: 1; margin: 0; line-height: 1.45; }
.variants { display: flex; flex-wrap: wrap; gap: 6px; }
.variant {
  border: 2px solid var(--line); background: #fff; border-radius: 12px; padding: 5px 11px; font: 700 13px var(--font); cursor: pointer; color: var(--muted);
}
.variant.active { border-color: var(--green); background: #ecf8ed; color: var(--green-d); }
.variant-one { font-size: 13px; font-weight: 700; color: var(--muted); }
.buy { display: flex; align-items: center; justify-content: space-between; gap: 8px 10px; margin-top: 2px; flex-wrap: wrap; }
.buy > div:last-child { margin-left: auto; }
.price { font: 700 19px var(--font-head); color: var(--forest); white-space: nowrap; }

.add-btn {
  width: 46px; height: 46px; border-radius: 16px; border: 0; cursor: pointer; flex: none;
  background: var(--grad-brand); color: #fff; display: grid; place-items: center;
  box-shadow: 0 6px 16px rgba(35, 160, 122, 0.35); transition: transform 0.1s;
}
.add-btn:hover { transform: scale(1.06); }
.add-btn:active { transform: scale(0.95); }
.add-btn svg { width: 22px; height: 22px; }

.stepper {
  display: inline-flex; align-items: center; background: var(--forest); border-radius: 16px; padding: 4px; gap: 2px; color: #fff;
}
.stepper button {
  width: 34px; height: 34px; border: 0; border-radius: 12px; background: transparent; color: #fff; font-size: 20px; font-weight: 700; cursor: pointer;
}
.stepper button:hover { background: rgba(255, 255, 255, 0.12); }
.stepper span { min-width: 22px; text-align: center; font-weight: 800; }
.stepper.light { background: var(--bg-2); color: var(--text); }
.stepper.light button { color: var(--text); width: 32px; height: 32px; }
.stepper.light button:hover { background: rgba(0, 0, 0, 0.06); }

/* ---------- Кнопки и формы ---------- */
.btn {
  appearance: none; border: 0; border-radius: 16px; padding: 13px 22px; font: 800 15px var(--font);
  cursor: pointer; background: var(--grad-brand); color: #fff; text-decoration: none; display: inline-flex;
  align-items: center; justify-content: center; gap: 8px; transition: filter 0.15s, transform 0.1s;
  box-shadow: 0 6px 18px rgba(35, 160, 122, 0.3);
}
.btn:hover { filter: brightness(1.06); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.55; cursor: default; }
.btn svg { width: 19px; height: 19px; }
.btn.blue { background: linear-gradient(135deg, var(--blue), #1a5f9e); box-shadow: 0 6px 18px rgba(36, 144, 207, 0.3); }
.btn.dark { background: var(--forest); box-shadow: none; }
.btn.light { background: #fff; color: var(--forest); box-shadow: none; }
.btn.ghost { background: transparent; color: var(--text); border: 2px solid var(--line); box-shadow: none; }
.btn.ghost:hover { background: rgba(0, 0, 0, 0.03); }
.btn.outline-light { background: transparent; border: 2px solid rgba(255, 255, 255, 0.35); color: #fff; box-shadow: none; }
.btn.danger { background: transparent; color: var(--danger); border: 2px solid #f3cdc9; box-shadow: none; }
.btn.small { padding: 8px 13px; font-size: 13px; border-radius: 12px; }
.btn.block { width: 100%; }

.form { display: grid; gap: 14px; }
label { display: grid; gap: 6px; font-weight: 700; font-size: 14px; }
input, select, textarea {
  font: 500 16px var(--font); padding: 12px 14px; border: 2px solid var(--line); border-radius: 14px;
  background: #fff; color: var(--text); width: 100%;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 4px rgba(61, 170, 71, 0.15); }
textarea { min-height: 76px; resize: vertical; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.seg { display: flex; background: var(--bg-2); border-radius: 14px; padding: 4px; gap: 4px; }
.seg button {
  flex: 1; border: 0; background: transparent; padding: 10px; border-radius: 11px; font: 800 14px var(--font); cursor: pointer; color: var(--muted);
}
.seg button.active { background: var(--forest); color: #fff; }

.panel { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; }
.panel.dark { background: var(--grad-dark); color: #fff; }
.narrow { max-width: 460px; margin: 24px auto; }
.error { color: var(--danger); font-size: 14px; font-weight: 600; min-height: 1em; }

/* Экран входа: брендовая полоса сверху */
.panel.auth { overflow: hidden; padding: 0; }
.auth .auth-top { background: var(--grad-dark); color: #fff; padding: 26px 26px 22px; position: relative; }
.auth .auth-top::after {
  content: ""; position: absolute; right: -40px; top: -40px; width: 160px; height: 160px;
  background: radial-gradient(circle, rgba(61, 170, 71, 0.5), transparent 65%);
}
.auth .auth-top h1 { margin: 0; }
.auth .auth-top p { margin: 6px 0 0; color: #bcd6cf; font-size: 14px; }
.auth form { padding: 22px 26px 26px; }

/* ---------- Корзина ---------- */
.cart-layout { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 22px; align-items: start; }
.cart-line { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.cart-line:last-child { border-bottom: 0; }
.cart-line .thumb { width: 64px; height: 48px; border-radius: 12px; object-fit: cover; flex: none; background: var(--bg-2); }
.cart-line .info { flex: 1; min-width: 0; }
.cart-line .info b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cart-line .line-sum { min-width: 76px; text-align: right; font-weight: 800; }
.sum-row { display: flex; justify-content: space-between; align-items: baseline; font: 700 22px var(--font-head); margin: 14px 0; }

/* Боковая корзина (ПК) */
.side-cart .panel { padding: 0; overflow: hidden; }
.side-cart .head { background: var(--grad-dark); color: #fff; padding: 18px 20px; display: flex; justify-content: space-between; align-items: center; }
.side-cart .head h2 { margin: 0; font-size: 19px; }
.side-cart .lines { padding: 6px 20px; max-height: calc(100vh - 330px); overflow: auto; }
.side-cart .lines .cart-line { gap: 10px; }
.side-cart .lines .thumb { width: 48px; height: 40px; }
.side-cart .foot { padding: 14px 20px 20px; border-top: 1px solid var(--line); }
.side-cart .empty { padding: 28px 20px; text-align: center; color: var(--muted); }
.side-cart .empty .big { font-size: 44px; }

.floating-cart {
  position: fixed; left: 16px; right: 16px; bottom: calc(16px + var(--tabbar-h)); z-index: 30; max-width: 520px; margin: 0 auto;
  padding: 15px 20px; border-radius: 20px; justify-content: space-between; box-shadow: 0 14px 34px rgba(20, 90, 60, 0.4);
}
.floating-cart .cnt { background: rgba(255, 255, 255, 0.22); border-radius: 10px; padding: 2px 9px; margin-right: 6px; }

/* ---------- Личный кабинет ---------- */
.account-head {
  background: var(--grad-dark); color: #fff; border-radius: var(--radius); padding: 24px 26px; margin-bottom: 20px;
  display: flex; align-items: center; gap: 18px; box-shadow: var(--shadow-lg);
}
.account-head .avatar {
  width: 60px; height: 60px; border-radius: 20px; background: var(--grad-brand); display: grid; place-items: center;
  font: 700 26px var(--font-head); flex: none;
}
.account-head h1 { margin: 0; }
.account-head p { margin: 2px 0 0; color: #bcd6cf; }
.account-layout { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 22px; align-items: start; }
.order { padding: 18px; display: grid; gap: 8px; }
.order-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.order-head b { font-family: var(--font-head); font-weight: 600; }
.order ul { margin: 0; padding-left: 18px; color: var(--muted); font-size: 14px; }
.order .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.status { padding: 5px 11px; border-radius: 999px; font-size: 12px; font-weight: 800; letter-spacing: 0.02em; }
.st-new { background: #fff0c9; color: #8a5a00; }
.st-accepted, .st-preparing { background: #dceffb; color: var(--blue-d); }
.st-ready { background: #d9f3dc; color: var(--green-d); animation: pulse 1.6s infinite; }
.st-completed { background: #ece4da; color: var(--muted); }
.st-cancelled { background: #fbe1de; color: var(--danger); }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px rgba(61, 170, 71, 0.15); } }
.stack { display: grid; gap: 14px; }
/* Заголовки и подписи прямо на тёмном фоне страницы */
body:not(.admin-page) main > h1,
body:not(.admin-page) main > p.muted,
body:not(.admin-page) .account-layout > div > h2 { color: #fff; }
.account-head { border: 1px solid rgba(255, 255, 255, 0.12); }
.side-cart .panel { box-shadow: 0 14px 40px rgba(0, 0, 0, 0.35); }

/* ---------- Уведомления ---------- */
.toast {
  position: fixed; left: 50%; top: 80px; transform: translateX(-50%); z-index: 60;
  background: var(--forest); color: #fff; padding: 12px 18px; border-radius: 14px; font-weight: 700; font-size: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25); max-width: calc(100% - 32px); animation: drop 0.25s ease-out;
}
@keyframes drop { from { opacity: 0; transform: translate(-50%, -10px); } }

/* Крупное уведомление «Заказ готов» */
.toast.big {
  font-size: 17px; padding: 16px 22px; background: var(--grad-brand); border-radius: 18px;
  box-shadow: 0 14px 40px rgba(35, 160, 122, 0.5); animation: drop 0.25s ease-out, pulse 1.4s 0.3s 3;
}

/* Шкала статуса заказа: Оформлен → Готовится → Готов */
.track { display: flex; align-items: flex-start; margin: 14px 0 6px; }
.track .step { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; position: relative; font-size: 12px; font-weight: 800; color: var(--muted); }
.track .step:not(:last-child)::after {
  content: ""; position: absolute; top: 19px; left: calc(50% + 22px); right: calc(-50% + 22px); height: 4px; border-radius: 2px; background: var(--line);
}
.track .step.done:not(:last-child)::after { background: var(--green); }
.track .dot {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-size: 18px;
  background: var(--bg-2); filter: grayscale(1); opacity: 0.6;
}
.track .step.done .dot { background: #d9f3dc; filter: none; opacity: 1; }
.track .step.done { color: var(--green-d); }
.track .step.now .dot { background: var(--grad-brand); filter: none; opacity: 1; box-shadow: 0 0 0 5px rgba(61, 170, 71, 0.2); animation: pulse 1.6s infinite; }
.track .step.now { color: var(--forest); }

/* ---------- Подвал ---------- */
footer.site {
  background: rgba(8, 26, 18, 0.85); border-top: 1px solid rgba(255, 255, 255, 0.08); color: #bcd6cf; margin-top: 30px; padding: 34px 24px calc(34px + var(--tabbar-h));
}
footer.site .inner { max-width: 1320px; margin: 0 auto; display: flex; gap: 24px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
footer.site img { height: 40px; filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.25)); }
footer.site .contacts { display: flex; gap: 18px; flex-wrap: wrap; font-weight: 600; font-size: 14px; }

/* ---------- Панель персонала ---------- */
.board { display: grid; grid-template-columns: repeat(3, minmax(260px, 1fr)); gap: 14px; align-items: start; overflow-x: auto; padding-bottom: 8px; scroll-snap-type: x mandatory; }
.board .col { background: var(--bg-2); border-radius: var(--radius); padding: 10px; display: grid; gap: 10px; min-height: 140px; scroll-snap-align: start; }
.board .col > h3 { margin: 4px 6px; display: flex; justify-content: space-between; align-items: center; }
.order.fresh { outline: 3px solid var(--amber); animation: pulse 1.2s infinite; }
.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.tabs .chip { text-decoration: none; }
table.list { width: 100%; border-collapse: collapse; font-size: 14px; }
table.list th, table.list td { text-align: left; padding: 11px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.list th { color: var(--muted); font-weight: 700; }
.table-wrap { overflow-x: auto; }
.admin-prod { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.admin-prod img, .admin-prod .ph { width: 64px; height: 48px; border-radius: 12px; object-fit: cover; background: var(--bg-2); display: grid; place-items: center; flex: none; }
.admin-prod .info { flex: 1; min-width: 0; }
.variant-row { display: grid; grid-template-columns: 1fr 120px 44px; gap: 8px; }
.bars { display: flex; align-items: flex-end; gap: 6px; height: 160px; padding-top: 10px; }
.bars .bar { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 11px; color: var(--muted); }
.bars .bar i { display: block; width: 100%; background: var(--grad-brand); border-radius: 6px 6px 0 0; min-height: 2px; }
dialog { border: 0; border-radius: var(--radius); padding: 0; width: min(580px, calc(100% - 24px)); box-shadow: 0 20px 60px rgba(0,0,0,.3); }
dialog::backdrop { background: rgba(14, 42, 28, 0.55); backdrop-filter: blur(2px); }
dialog .panel { box-shadow: none; max-height: 88vh; overflow: auto; }

/* ================= Адаптив ================= */

/* Планшет и небольшие ноутбуки: корзина справа скрывается, появляется плавающая кнопка */
@media (max-width: 1099px) {
  .menu-layout { grid-template-columns: minmax(0, 1fr); }
  .side-cart { display: none; }
  main { padding: 18px 20px 110px; }
}
@media (min-width: 1100px) {
  .floating-cart { display: none !important; }
}

/* Планшет */
@media (max-width: 900px) {
  .hero { min-height: 220px; }
  .cart-layout, .account-layout { grid-template-columns: 1fr; }
  .account-layout > :last-child { order: -1; } /* сначала заказы, потом профиль */
  .grid { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
}

/* Телефон: нижняя панель как в приложении, горизонтальные карточки */
@media (max-width: 699px) {
  :root { --tabbar-h: 68px; }
  html { scroll-padding-top: 120px; }
  body { font-size: 15px; }
  .topbar .inner { padding: 8px 14px; justify-content: center; }
  .topbar .logo img { height: 48px; }
  .topbar nav { display: none; }
  main { padding: 14px 14px calc(100px + var(--tabbar-h)); }

  .tabbar {
    display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 45;
    height: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
    background: var(--forest); box-shadow: 0 -6px 24px rgba(0, 0, 0, 0.25);
  }
  .tabbar a {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    color: #9fbcb3; text-decoration: none; font-size: 11px; font-weight: 800; position: relative;
  }
  .tabbar a svg { width: 24px; height: 24px; }
  .tabbar a.active { color: #fff; }
  .tabbar a.active::before {
    content: ""; position: absolute; top: 0; width: 34px; height: 4px; border-radius: 0 0 4px 4px; background: var(--grad-brand);
  }
  .tabbar .badge { position: absolute; top: 8px; left: 50%; margin-left: 6px; font-size: 11px; min-width: 19px; line-height: 19px; }

  .hero { min-height: 0; margin-bottom: 6px; }
  body::before {
    background:
      linear-gradient(180deg, rgba(10, 32, 22, 0.55) 0%, rgba(10, 32, 22, 0.78) 30%, rgba(13, 50, 45, 0.6) 100%),
      url("/img/hero.webp") left 35% top 30px / auto 470px no-repeat,
      var(--grad-dark);
  }
  .hero .text { padding: 14px 2px 10px; }
  .hero .eyebrow { font-size: 10px; margin-bottom: 8px; }
  .hero h1 { font-size: 24px; margin-bottom: 8px; }
  .hero p { font-size: 14px; margin-bottom: 4px; }
  .hero .btn { padding: 11px 14px; font-size: 14px; }
  .hero .actions .btn { flex: 1; }

  .cats { top: 64px; padding: 10px 0; }
  .chip { padding: 8px 13px; font-size: 14px; }
  .cat-section { margin: 8px 0 24px; }

  /* Карточка горизонтальная: картинка слева */
  .grid { grid-template-columns: 1fr; gap: 12px; }
  .product { flex-direction: row; border-radius: 20px; }
  .product:hover { transform: none; }
  .product .pic { width: 118px; aspect-ratio: auto; flex: none; }
  .product .body { padding: 12px 12px 12px 14px; gap: 7px; min-width: 0; }
  .product h3 { font-size: 15px; }
  .product .desc { font-size: 13px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .variant { padding: 4px 9px; font-size: 12px; }
  .price { font-size: 17px; }
  .add-btn { width: 40px; height: 40px; border-radius: 13px; }
  .stepper button { width: 32px; height: 32px; }
  .product .in-cart { top: 8px; left: 8px; font-size: 11px; }

  .panel { padding: 18px; }
  .panel.auth { padding: 0; }
  .auth .auth-top, .auth form { padding-left: 20px; padding-right: 20px; }
  .row { grid-template-columns: 1fr; }
  .cart-line { gap: 10px; }
  .cart-line .thumb { width: 44px; height: 38px; }
  .cart-line .line-sum { min-width: 0; }
  .account-head { padding: 18px; gap: 14px; }
  .account-head .avatar { width: 48px; height: 48px; font-size: 20px; border-radius: 16px; }
  .narrow { margin: 8px auto; }
  .toast { top: auto; bottom: calc(var(--tabbar-h) + 84px); }
  .board { grid-template-columns: repeat(3, 86%); }
  .variant-row { grid-template-columns: 1fr 96px 40px; }
  footer.site .inner { justify-content: center; text-align: center; }
}

/* Большие экраны */
@media (min-width: 1500px) {
  .grid { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
}

/* Панель персонала на телефоне: своя навигация в шапке вместо нижней панели */
@media (max-width: 699px) {
  .admin-page .topbar .inner { justify-content: space-between; }
  .admin-page .topbar nav { display: flex; }
  .admin-page .topbar nav .navlink.who { display: none; }
  .admin-page .topbar nav .navlink { padding: 8px 11px; }
  .admin-page main { padding-bottom: 40px; }
}

/* ---------- Оповещения о новых заказах (рабочая панель) ---------- */
.order-alert {
  position: sticky; top: 76px; z-index: 35; margin: 0 auto; max-width: 1320px;
  padding: 16px 24px; text-align: center; cursor: pointer;
  font: 700 clamp(17px, 2.2vw, 22px) var(--font-head); color: #fff;
  background: linear-gradient(90deg, var(--berry), #f07c2a, var(--berry)); background-size: 200% 100%;
  animation: alert-flash 1s ease-in-out infinite, alert-move 2s linear infinite;
  box-shadow: 0 10px 30px rgba(226, 72, 61, 0.45);
}
@keyframes alert-flash { 50% { filter: brightness(1.25); } }
@keyframes alert-move { to { background-position: 200% 0; } }
.sound-unlock {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 70;
  border: 0; border-radius: 18px; padding: 18px 26px; cursor: pointer; max-width: calc(100% - 32px);
  font: 800 17px var(--font); color: #fff; background: var(--forest);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.35); animation: pulse 1.4s infinite;
}
.col-new .order.fresh { outline: 3px solid var(--berry); animation: pulse 1s infinite; }
@media (max-width: 699px) {
  .order-alert { top: 64px; padding: 12px 16px; }
}

/* ================= Анимации ================= */

/* Полёт товара в корзину и «подпрыгивание» счётчика */
.fly-ghost {
  position: fixed; z-index: 80; pointer-events: none; object-fit: cover; border-radius: 18px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}
.bump { animation: bump 0.45s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes bump { 0% { transform: scale(1); } 40% { transform: scale(1.5); } 100% { transform: scale(1); } }

/* Конфетти */
.confetti { position: fixed; top: 0; z-index: 90; pointer-events: none; display: block; }

/* Появление карточек при прокрутке */
.reveal { opacity: 0; transform: translateY(18px) scale(0.98); }
.reveal.in { opacity: 1; transform: none; transition: opacity 0.5s ease, transform 0.5s cubic-bezier(.2, .8, .3, 1), box-shadow 0.18s; }
.reveal.in:hover { transition-delay: 0s !important; }
@media (hover: hover) and (min-width: 700px) { .product.reveal.in:hover { transform: translateY(-4px); } }

/* Скелетон, пока грузится меню */
.skeleton { min-height: 280px; background: linear-gradient(100deg, rgba(255,255,255,.08) 30%, rgba(255,255,255,.18) 50%, rgba(255,255,255,.08) 70%); background-size: 300% 100%; animation: shimmer 1.3s linear infinite; box-shadow: none; }
@keyframes shimmer { to { background-position: -150% 0; } }
@media (max-width: 699px) { .skeleton { min-height: 120px; } }

/* Плавное появление экрана и заголовка */
#app > * { animation: screen-in 0.35s ease-out both; }
@keyframes screen-in { from { opacity: 0; transform: translateY(8px); } }
.hero .eyebrow, .hero h1, .hero p { animation: hero-in 0.7s cubic-bezier(.2, .8, .3, 1) both; }
.hero h1 { animation-delay: 0.08s; }
.hero p { animation-delay: 0.18s; }
@keyframes hero-in { from { opacity: 0; transform: translateY(16px); } }
/* Переливающийся градиент в «без очереди» */
.hero h1 span { background-size: 200% 100%; animation: shine 6s ease-in-out infinite; }
@keyframes shine { 50% { background-position: 100% 0; } }

/* Нажатие на кнопки — лёгкое «вдавливание» */
.chip:active, .variant:active, .add-btn:active, .stepper button:active { transform: scale(0.94); }

/* Корзина «дышит», когда в ней есть товары */
.floating-cart { animation: cart-in 0.4s cubic-bezier(.3, 1.4, .5, 1); }
@keyframes cart-in { from { transform: translateY(30px); opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- Плашка точки: адрес, режим работы, открыто/закрыто ---------- */
.loc-bar {
  margin: 4px 0 18px; padding: 18px 22px; border-radius: var(--radius); color: #fff;
  background: rgba(8, 30, 20, 0.55); border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25); animation: hero-in 0.5s ease-out both;
}
.loc-main { display: flex; align-items: center; gap: 14px; }
.loc-ic { width: 48px; height: 48px; border-radius: 16px; background: var(--grad-brand); display: grid; place-items: center; font-size: 22px; flex: none; }
.loc-text { flex: 1; min-width: 0; }
.loc-name { font: 700 clamp(17px, 2.2vw, 22px) var(--font-head); }
.loc-addr { color: #cfe3dd; font-size: 14px; }
.loc-status { text-align: right; display: grid; gap: 4px; justify-items: end; }
.loc-hours { color: #cfe3dd; font-size: 13px; font-weight: 600; }
.loc-switch { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 14px; padding-top: 14px; border-top: 1px solid rgba(255, 255, 255, 0.12); }
.loc-switch .muted { color: #cfe3dd; }

.open-pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 16px;
  font-weight: 800; font-size: 13px; line-height: 1.3; text-align: left; max-width: 100%;
}
.open-pill i, .chip .dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex: none; }
.open-pill.is-open { background: rgba(61, 170, 71, 0.18); color: #7fe08a; border: 1px solid rgba(127, 224, 138, 0.35); }
.open-pill.is-open i, .dot.is-open { background: #4cd964; box-shadow: 0 0 0 0 rgba(76, 217, 100, 0.6); animation: live 1.8s infinite; }
.open-pill.is-closed { background: rgba(226, 72, 61, 0.16); color: #ff9c94; border: 1px solid rgba(255, 156, 148, 0.35); }
.open-pill.is-closed i, .dot.is-closed { background: var(--berry); }
@keyframes live { 70% { box-shadow: 0 0 0 7px rgba(76, 217, 100, 0); } 100% { box-shadow: 0 0 0 0 rgba(76, 217, 100, 0); } }

/* В белых карточках (оформление, панель) — тёмные цвета статуса */
.panel .open-pill.is-open { background: #e3f6e5; color: var(--green-d); border-color: #bfe6c4; }
.panel .open-pill.is-closed { background: #fde6e3; color: var(--danger); border-color: #f6c7c2; }
.checkout-loc { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 12px 14px; border-radius: 14px; background: var(--bg-2); }
.checkout-loc select { width: auto; flex: 1; min-width: 160px; }
.closed-note { padding: 12px 14px; border-radius: 14px; background: #fde6e3; color: var(--danger); font-weight: 700; font-size: 14px; }

@media (max-width: 699px) {
  .loc-bar { padding: 14px; margin-bottom: 12px; }
  .loc-main { flex-wrap: wrap; gap: 10px; }
  .loc-ic { width: 40px; height: 40px; border-radius: 13px; font-size: 18px; }
  .loc-status { width: 100%; justify-items: start; text-align: left; }
}

/* ---------- Рабочая панель: точка и «Открыто / Закрыто» ---------- */
.point-bar {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 16px;
  padding: 14px 18px; border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow);
}
.point-select { width: auto; min-width: 200px; font-weight: 700; }
.point-name { font: 700 18px var(--font-head); }
.point-state { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 220px; }
.point-state i { width: 16px; height: 16px; border-radius: 50%; flex: none; }
.point-state div { display: grid; }
.point-state b { font: 700 20px var(--font-head); }
.point-state span { color: var(--muted); font-size: 13px; font-weight: 600; }
.point-state.is-open i { background: #4cd964; animation: live 1.8s infinite; }
.point-state.is-open b { color: var(--green-d); }
.point-state.is-closed i { background: var(--berry); }
.point-state.is-closed b { color: var(--danger); }
.point-actions { display: flex; gap: 8px; flex-wrap: wrap; }
@media (max-width: 699px) {
  .point-bar { padding: 12px; gap: 10px; }
  .point-select { width: 100%; }
  .point-actions { width: 100%; }
  .point-actions .btn:first-child { flex: 1; }
}
.reason-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.reason-chips .chip { font-size: 13px; padding: 7px 12px; box-shadow: none; border: 2px solid var(--line); }
.reason-chips .chip.active { border-color: transparent; }

/* ---------- Соцсети ---------- */
.social {
  display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: 999px;
  font-weight: 800; font-size: 14px; text-decoration: none; color: #fff; transition: transform 0.15s, filter 0.15s;
}
.social:hover { transform: translateY(-2px); filter: brightness(1.08); }
.social svg { width: 18px; height: 18px; }
.social.wa { background: #25d366; }
.social.ig { background: linear-gradient(45deg, #f9a825, #e1306c 45%, #833ab4); }
.social.fb { background: rgba(255, 255, 255, 0.12); border: 1px solid rgba(255, 255, 255, 0.2); }
.loc-social { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.loc-social:empty { display: none; }
.footer-links { display: flex; gap: 8px; flex-wrap: wrap; width: 100%; margin-top: 6px; }
footer.site .contacts { align-items: center; }

/* ---------- Бонусы в кабинете ---------- */
.loyalty-top { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.points-card, .gift-card {
  border-radius: var(--radius); padding: 18px 20px; color: #fff; display: grid; gap: 2px; position: relative; overflow: hidden;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
}
.points-card { background: linear-gradient(135deg, #f2a65a, #e2483d); }
.gift-card { background: var(--grad-brand); animation: pulse 2s infinite; }
.points-card::after, .gift-card::after {
  content: ""; position: absolute; right: -30px; top: -30px; width: 120px; height: 120px; border-radius: 50%; background: rgba(255, 255, 255, 0.15);
}
.points-card .lbl, .gift-card .lbl { font-weight: 800; font-size: 13px; opacity: 0.9; }
.points-card .num { font: 700 40px var(--font-head); line-height: 1.1; }
.gift-card b { font: 700 18px var(--font-head); }
.points-card .sub, .gift-card .sub { font-size: 12px; opacity: 0.92; font-weight: 600; }

.streak .days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin: 14px 0 10px; }
.streak .day { display: grid; justify-items: center; gap: 4px; }
.streak .mark {
  width: 100%; max-width: 46px; aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center;
  font: 700 15px var(--font-head); color: var(--muted); background: var(--bg-2); border: 2px dashed var(--line);
}
.streak .day small { font-size: 10px; font-weight: 700; color: var(--muted); white-space: nowrap; }
.streak .day.done .mark { background: var(--grad-brand); color: #fff; border: 0; animation: bump 0.5s cubic-bezier(.3, 1.6, .5, 1) both; }
.streak .day.gift .mark { border-color: var(--amber); font-size: 18px; }
.streak .day.gift.done .mark { background: linear-gradient(135deg, #f2a65a, #e2483d); }

/* ---------- Подарок при оформлении ---------- */
.gift-use { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; background: #fff4e5; border: 2px solid #f6cf9a; font-weight: 700; cursor: pointer; }
.gift-use b { color: var(--berry); }
.gift-hint { padding: 12px 14px; border-radius: 14px; background: #fff4e5; color: #8a5a00; font-size: 14px; font-weight: 600; }

/* ---------- Отзывы в админке ---------- */
.fb-item { display: grid; gap: 6px; }
.fb-item.done { opacity: 0.6; }
.fb-kind { font-weight: 800; font-size: 13px; padding: 3px 10px; border-radius: 999px; }
.fb-kind.complaint { background: #fde6e3; color: var(--danger); }
.fb-kind.suggestion { background: #dceffb; color: var(--blue-d); }
.fb-kind.thanks { background: #e3f6e5; color: var(--green-d); }
.fb-msg { white-space: pre-wrap; }
@media (max-width: 699px) {
  .streak .days { gap: 4px; }
  .streak .mark { font-size: 13px; }
  .points-card .num { font-size: 34px; }
}

/* ---------- Выбор точки ---------- */
.loc-change {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 12px; padding: 9px 14px; border-radius: 999px; cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.3); background: rgba(255, 255, 255, 0.1); color: #fff; font: 800 14px var(--font);
}
.loc-change:hover { background: rgba(255, 255, 255, 0.18); }
.loc-change span { background: rgba(255, 255, 255, 0.2); border-radius: 999px; padding: 1px 8px; font-size: 12px; }
.loc-bar .loc-social + .loc-change, .loc-bar .loc-change { margin-left: 0; }
.loc-picker .loc-card {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; text-align: left; cursor: pointer;
  padding: 14px 16px; border-radius: 16px; border: 2px solid var(--line); background: #fff; font: inherit; color: var(--text);
  transition: border-color 0.15s, transform 0.1s;
}
.loc-picker .loc-card:hover { border-color: var(--green); }
.loc-picker .loc-card:active { transform: scale(0.98); }
.loc-picker .loc-card.active { border-color: var(--green); background: #f1faf2; }
.loc-card-main { display: grid; gap: 2px; min-width: 0; }
.loc-card-main b { font: 700 16px var(--font-head); }
.loc-card-main .addr { font-weight: 700; font-size: 15px; }
@media (max-width: 520px) { .loc-picker .loc-card { flex-direction: column; align-items: flex-start; } }

/* ---------- Админ: баллы ---------- */
.loyalty-admin { display: grid; grid-template-columns: 1.2fr 1fr; gap: 16px; }
.loyalty-admin .stat-grid { grid-column: 1 / -1; }
.pct-panel { display: grid; gap: 10px; }
.pct-row { display: flex; align-items: center; gap: 10px; }
.pct-input { width: 120px; font: 700 28px var(--font-head); text-align: center; padding: 8px; }
.pct-sign { font: 700 28px var(--font-head); }
.quick-pct { display: flex; gap: 6px; flex-wrap: wrap; }
.quick-pct .chip { box-shadow: none; border: 2px solid var(--line); padding: 6px 12px; font-size: 13px; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.stat { background: var(--card); border-radius: 18px; padding: 14px 16px; box-shadow: var(--shadow); display: grid; }
.stat b { font: 700 26px var(--font-head); color: var(--forest); }
.stat span { color: var(--muted); font-size: 13px; font-weight: 700; }
@media (max-width: 820px) { .loyalty-admin { grid-template-columns: 1fr; } }
/* Соцсети и «Сменить точку» — в одну строку */
.loc-bar { display: flex; flex-wrap: wrap; align-items: center; column-gap: 8px; }
.loc-bar .loc-main { width: 100%; }
.loc-bar .loc-change { margin-left: auto; }
@media (max-width: 699px) { .loc-bar .loc-change { margin-left: 0; } }

/* Формы никогда не шире экрана: длинные тексты в списках (адреса точек) не растягивают страницу */
.form { grid-template-columns: minmax(0, 1fr); }
.form > *, .panel, .cart-layout > *, label { min-width: 0; }
select { max-width: 100%; text-overflow: ellipsis; }
.checkout-loc > div { min-width: 0; flex: 1 1 160px; }
.checkout-loc select { flex: 1 1 100%; width: 100%; min-width: 0; }

/* ---------- Добавки к напиткам ---------- */
.cart-item { border-bottom: 1px solid var(--line); padding-bottom: 10px; }
.cart-item:last-child { border-bottom: 0; }
.cart-item .cart-line { border-bottom: 0; padding-bottom: 6px; }
.addons { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding-left: 76px; }
.addons-lbl { font-size: 12px; font-weight: 800; color: var(--muted); width: 100%; }
.addon {
  border: 2px solid var(--line); background: #fff; color: var(--text); border-radius: 999px; padding: 5px 11px;
  font: 700 13px var(--font); cursor: pointer; transition: background 0.15s, border-color 0.15s;
}
.addon .ap { color: var(--muted); font-weight: 600; }
.addon.on { background: #ecf8ed; border-color: var(--green); color: var(--green-d); }
.addon.on .ap { color: var(--green-d); }
.addon:active { transform: scale(0.95); }
.addon-line { color: var(--green-d); font-size: 12px; font-weight: 700; }
@media (max-width: 699px) { .addons { padding-left: 0; } }

/* ---------- Карусель «Новинки» ---------- */
.news-carousel { margin: 0 0 18px; }
.nc-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.nc-head h2 { margin: 0; color: #fff; font-size: clamp(22px, 3vw, 28px); }
.nc-arrows { display: flex; gap: 6px; }
.nc-arrow {
  width: 40px; height: 40px; border-radius: 50%; border: 1px solid rgba(255,255,255,.25); background: rgba(255,255,255,.1);
  color: #fff; font-size: 24px; line-height: 1; cursor: pointer;
}
.nc-arrow:hover { background: rgba(255,255,255,.2); }
.nc-track {
  display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; border-radius: var(--radius);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.3);
}
.nc-track::-webkit-scrollbar { display: none; }
.nc-slide {
  flex: 0 0 100%; scroll-snap-align: start; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  background: linear-gradient(120deg, #fff 0%, #fff8ee 100%); min-height: 240px;
}
.nc-pic { background: var(--bg-2); overflow: hidden; display: grid; place-items: center; }
.nc-pic img { width: 100%; height: 100%; object-fit: cover; }
.nc-pic .ph { font-size: 64px; }
.nc-body { padding: 22px 24px; display: flex; flex-direction: column; gap: 8px; justify-content: center; }
.nc-badge {
  align-self: flex-start; background: linear-gradient(90deg, var(--amber), var(--berry)); color: #fff; font-weight: 800; font-size: 12px;
  padding: 5px 11px; border-radius: 999px; letter-spacing: 0.04em; animation: pulse 2s infinite;
}
.nc-body h3 { font-size: clamp(20px, 2.6vw, 26px); margin: 0; }
.nc-body p { margin: 0; color: var(--muted); font-size: 14px; }
.nc-buy { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 6px; flex-wrap: wrap; }
.nc-dots { display: flex; justify-content: center; gap: 6px; margin-top: 10px; }
.nc-dot { width: 8px; height: 8px; border-radius: 999px; border: 0; padding: 0; background: rgba(255,255,255,.35); cursor: pointer; transition: width 0.25s, background 0.25s; }
.nc-dot.on { width: 24px; background: #fff; }
@media (max-width: 699px) {
  .nc-slide { grid-template-columns: 1fr; min-height: 0; }
  .nc-pic { aspect-ratio: 16 / 9; }
  .nc-body { padding: 16px; }
  .nc-arrows { display: none; }
}

/* Админ: звёздочка «Новинка» и выбор категорий */
.star-btn { border: 0; background: transparent; font-size: 24px; line-height: 1; cursor: pointer; color: #c9b9a6; padding: 4px 6px; }
.star-btn.on { color: #f2a65a; }
.star-btn:hover { transform: scale(1.15); }
.cat-check { display: inline-flex !important; align-items: center; gap: 6px; padding: 6px 10px; border: 2px solid var(--line); border-radius: 999px; font-size: 13px; }

/* ---------- Чашки в корзине: свои добавки у каждой ---------- */
.cart-item.cup .cart-line { align-items: center; }
.cup-no { color: var(--green-d); font-family: var(--font); font-weight: 800; font-size: 13px; }
.cup-actions { display: flex; gap: 6px; }
.icon-btn {
  min-width: 36px; height: 36px; border-radius: 12px; border: 2px solid var(--line); background: #fff;
  font: 800 14px var(--font); cursor: pointer; color: var(--text); padding: 0 8px;
}
.icon-btn:hover { border-color: var(--green); }
.icon-btn.del:hover { border-color: var(--danger); color: var(--danger); }
.syrup-select {
  width: auto; min-width: 190px; padding: 6px 12px; border-radius: 999px; font: 700 13px var(--font);
  border: 2px solid var(--line); background: #fff;
}
.syrup-select.on { border-color: var(--amber); background: #fff4e5; color: #8a5a00; }
@media (max-width: 699px) { .syrup-select { flex: 1 1 100%; } }

/* ---------- Касса ---------- */
.pos { display: grid; gap: 12px; }
.pos h2 { margin: 0; }
.pos-results { display: grid; gap: 6px; }
.pos-result {
  display: flex; gap: 10px; align-items: center; text-align: left; padding: 10px 12px; border-radius: 12px;
  border: 2px solid var(--line); background: #fff; cursor: pointer; font: inherit; color: var(--text);
}
.pos-result:hover { border-color: var(--green); }
.pos-result span { color: var(--muted); font-size: 13px; }
.pos-result .pts { margin-left: auto; color: #b36b00; font-weight: 800; }
.pos-guest { padding: 12px 14px; border-radius: 14px; background: var(--bg-2); color: var(--muted); font-size: 14px; font-weight: 600; }
.pos-customer { display: grid; gap: 10px; padding: 14px; border-radius: 16px; border: 2px solid var(--green); background: #f4fbf5; }
.pos-badges { display: flex; gap: 6px; flex-wrap: wrap; }
.pb { padding: 5px 10px; border-radius: 999px; font-size: 13px; font-weight: 800; background: #fff; border: 1px solid var(--line); }
.pb.points { background: #fff4e5; color: #b36b00; border-color: #f6cf9a; }
.pb.ok { background: #e3f6e5; color: var(--green-d); border-color: #bfe6c4; }
.pb.gift { background: var(--grad-brand); color: #fff; border: 0; }
.row-inline { display: flex; gap: 8px; align-items: center; }
.pos-points { width: 120px; }
.pos-sums { display: grid; gap: 4px; padding: 12px 14px; border-radius: 14px; background: var(--bg-2); }
.pos-sums > div { display: flex; justify-content: space-between; font-weight: 700; }
.pos-sums .minus { color: var(--danger); }
.pos-sums .pay { font: 700 22px var(--font-head); margin-top: 4px; }
.big-btn { padding: 16px; font-size: 17px; }

/* ---------- Итоги дня ---------- */
.day-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin-bottom: 16px; }
.day-stats .stat.hl { background: var(--grad-brand); }
.day-stats .stat.hl b, .day-stats .stat.hl span { color: #fff; }
.cart-item.cup .info b { white-space: normal; }
.cart-item.cup .cup-no { display: block; }

/* Оповещение продавцу на страницах сайта (касса, меню) */
.order-alert.site { position: fixed; left: 0; right: 0; top: 76px; z-index: 39; display: block; text-decoration: none; max-width: none; }
@media (max-width: 699px) { .order-alert.site { top: 64px; font-size: 15px; } }

/* Касса: точка продавца */
.pos-point {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; border-radius: 14px;
  background: #eef6fb; color: var(--blue-d); font-weight: 800; font-size: 14px;
}
.pos-pts-row { gap: 8px; }
/* Онлайн: оплата баллами */
.points-use { display: grid; gap: 8px; padding: 12px 14px; border-radius: 14px; background: #fff4e5; border: 2px solid #f6cf9a; font-weight: 700; font-size: 14px; color: #8a5a00; }
/* Панель продавца: адрес и «Сменить точку» */
.point-who { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pts-quick { display: flex; gap: 6px; flex-wrap: wrap; }
.pts-quick .chip { padding: 6px 11px; font-size: 13px; box-shadow: none; border: 2px solid #f6cf9a; background: #fff; }
.points-use .row-inline { flex-wrap: wrap; }
.field { display: grid; gap: 6px; }
.field-lbl { font-weight: 700; font-size: 14px; }

/* ================= Рабочее место: меню + чек + заказы ================= */
main:has(.work) { max-width: 1800px; }
.work { display: grid; gap: 12px; }
.work-top {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 16px; border-radius: 18px;
  background: var(--card); box-shadow: var(--shadow);
}
.wt-point { display: flex; align-items: center; gap: 8px; font-size: 15px; }
.wt-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-left: auto; }
.work-tabs { display: none; }
.work-cols { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.work-col { display: grid; gap: 10px; min-width: 0; }
.col-check, .col-orders { position: sticky; top: 90px; max-height: calc(100vh - 110px); overflow-y: auto; padding-bottom: 10px; scrollbar-width: thin; }
.work-empty { padding: 18px; text-align: center; color: var(--muted); font-weight: 700; background: var(--bg-2); border-radius: 14px; }
.work-done { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 16px; border-radius: 16px; background: #e3f6e5; color: var(--green-d); box-shadow: var(--shadow); }

/* Меню-плитки */
.wm-cats { display: flex; gap: 6px; flex-wrap: wrap; }
.wm-cats .chip { padding: 8px 12px; font-size: 14px; }
.wm-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.wm-tile { background: var(--card); border-radius: 16px; padding: 10px; box-shadow: var(--shadow); display: grid; gap: 8px; }
.wm-head { display: flex; align-items: center; gap: 8px; }
.wm-head img, .wm-head .ph { width: 44px; height: 34px; border-radius: 10px; object-fit: cover; background: var(--bg-2); flex: none; display: grid; place-items: center; }
.wm-head b { flex: 1; font-size: 15px; line-height: 1.2; }
.wm-vars { display: flex; flex-wrap: wrap; gap: 6px; }
.wm-var {
  flex: 1 1 auto; display: grid; justify-items: center; gap: 0; padding: 8px 10px; border-radius: 12px; cursor: pointer;
  border: 2px solid var(--line); background: #fff; font: 600 12px var(--font); color: var(--muted);
}
.wm-var b { font: 800 14px var(--font); color: var(--forest); }
.wm-var:hover { border-color: var(--green); }
.wm-var:active { transform: scale(0.95); }
.wm-var.pop { animation: var-pop 0.35s ease-out; }
@keyframes var-pop { 0% { background: #d9f3dc; border-color: var(--green); } 100% { background: #fff; } }

/* Заказы */
.work-board { display: grid; gap: 12px; }
.wb-group { background: var(--bg-2); border-radius: 18px; padding: 10px; display: grid; gap: 8px; }
.wb-group h3 { margin: 2px 4px; display: flex; justify-content: space-between; align-items: center; }
.wb-group.wb-new.alert { background: #fde6e3; outline: 3px solid var(--berry); animation: pulse 1.2s infinite; }
.wb-empty { padding: 6px 4px; }
.wb-card { background: #fff; border-radius: 14px; padding: 10px 12px; display: grid; gap: 5px; box-shadow: var(--shadow); }
.wb-card.fresh { outline: 3px solid var(--amber); }
.wb-card ul { margin: 0; padding-left: 18px; font-size: 14px; }
.wb-head { display: flex; align-items: center; gap: 8px; }
.wb-head b { font: 700 16px var(--font-head); }
.wb-src { margin-left: auto; font-size: 12px; font-weight: 800; color: var(--muted); }
.wb-comment { background: #fff3d6; padding: 5px 8px; border-radius: 8px; font-size: 13px; }
.wb-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.wb-actions { display: flex; gap: 6px; margin-left: auto; }

/* Рабочее место в колонках светлое (как касса), фон с птицей не мешает */
.work .col-check .panel, .work .col-check .pos { box-shadow: var(--shadow); }

/* Планшет: меню + чек, заказы ниже */
@media (max-width: 1279px) {
  .work-cols { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .col-orders { grid-column: 1 / -1; position: static; max-height: none; }
  .work-board { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
/* Телефон: вкладки Меню · Чек · Заказы */
@media (max-width: 899px) {
  .work-tabs { display: flex; position: sticky; top: 64px; z-index: 15; }
  .work-cols { grid-template-columns: minmax(0, 1fr); }
  .work-col { display: none; }
  .tab-menu .col-menu, .tab-check .col-check, .tab-orders .col-orders { display: grid; }
  .col-check, .col-orders { position: static; max-height: none; }
  .work-board { grid-template-columns: minmax(0, 1fr); }
  .wm-tiles { grid-template-columns: minmax(0, 1fr); }
  .wt-actions { margin-left: 0; }
}
.work .pos-point { display: none; }

/* Поле времени («Забрать к»): на iPhone/Android у системного поля своя ширина — держим строго по колонке */
input[type="time"], input[type="date"] {
  display: block; width: 100%; max-width: 100%; min-width: 0; box-sizing: border-box;
  -webkit-appearance: none; appearance: none; min-height: 48px; line-height: 1.2; text-align: left;
}
input[type="time"]::-webkit-date-and-time-value, input[type="date"]::-webkit-date-and-time-value { text-align: left; margin: 0; }
input[type="time"]::-webkit-calendar-picker-indicator { margin-left: auto; }
label > input[type="time"] { justify-self: stretch; }

/* ---------- Рабочее место: компактно, без картинок, «Пробить» всегда на виду ---------- */
.work .wm-head img, .work .wm-head .ph, .work .cart-line .thumb { display: none; }
.work .wm-tile { padding: 8px; gap: 6px; }
.work .wm-tiles { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; }
.work .wm-var { padding: 6px 8px; }
.work .col-check { gap: 8px; }
.work .col-check .panel { padding: 12px 14px; }
.work .cart-item { padding-bottom: 6px; }
.work .cart-line { padding: 6px 0; gap: 8px; }
.work .cart-line .info b { font-size: 14px; }
.work .addons { gap: 4px; padding-left: 0; }
.work .addon { padding: 3px 9px; font-size: 12px; }
.work .syrup-select { min-width: 140px; padding: 4px 10px; font-size: 12px; }
.work .icon-btn { min-width: 30px; height: 30px; border-radius: 10px; }
.work .pos { gap: 8px; padding: 12px 14px; }
.work .pos > h2 { display: none; }
.work .pos .seg button { padding: 7px; font-size: 13px; }
.work .pos input { padding: 9px 12px; }
.work .pos-customer { padding: 10px; gap: 6px; }
.work .work-empty { padding: 12px; }
/* Итог и кнопка «Пробить заказ» прилипают к низу колонки чека */
.work .col-check > .pos-footer {
  position: sticky; bottom: 0; z-index: 3; display: grid; gap: 8px;
  background: var(--card); border-radius: 18px; padding: 12px 14px; box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.25);
}
.work .pos-sums { padding: 8px 12px; }
.work .pos-sums .pay { font-size: 20px; margin-top: 0; }
.work .big-btn { padding: 13px; }
@media (max-width: 899px) {
  .work .col-check > .pos-footer { bottom: calc(var(--tabbar-h) + 6px); }
}
.kiosk-box { display: grid; gap: 6px; padding: 12px 14px; border-radius: 14px; background: #eef6fb; }
.kiosk-box .btn { justify-self: start; }

/* Рабочее место на ПК — ровно по высоте экрана, каждая колонка прокручивается сама,
   а «К оплате + Пробить» всегда внизу колонки чека */
@media (min-width: 1280px) {
  main:has(.work) { padding-bottom: 12px; }
  .work { display: flex; flex-direction: column; height: calc(100vh - 76px - 34px); }
  .work-cols { flex: 1; min-height: 0; }
  .work-col { height: 100%; overflow-y: auto; position: static; max-height: none; align-content: start; scrollbar-width: thin; }
  .work .col-check { display: flex; flex-direction: column; }
  .work .col-check > .pos-footer { margin-top: auto; }
  body:has(.work) footer.site { display: none; }
}
/* Планшет и телефон: колонка не прокручивается сама — блок прилипает к низу экрана */
@media (max-width: 1279px) {
  .work .col-check { position: static; max-height: none; overflow: visible; }
}
.pos-segs { display: grid; gap: 8px; }
.pos-guest .muted { font-weight: 500; }
/* Рабочее место: компактная касса и строка «К оплате | Пробить» */
.work .pos-segs { grid-template-columns: 1fr 1fr; }
.work .pos .seg { padding: 3px; }
.work .pos .seg button { padding: 6px 4px; font-size: 12px; }
.work .pos-guest { padding: 8px 12px; font-size: 13px; }
.work .pos > label { gap: 4px; font-size: 12px; }
.work .col-check > .pos-footer { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); align-items: center; padding: 10px 12px; }
.work .col-check > .pos-footer .pos-sums { padding: 6px 10px; background: transparent; }
.work .col-check > .pos-footer .pos-sums > div:not(.pay) { font-size: 12px; }
.work .col-check > .pos-footer .error:empty { display: none; }
.work .col-check > .pos-footer .error { grid-column: 1 / -1; }
.work .col-check > .pos-footer .big-btn { padding: 14px 10px; }
/* Ещё компактнее для мониторов 1366×768 */
@media (min-width: 1280px) {
  .work-cols { grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr) minmax(0, 0.85fr); }
}
.work .pos-guest { display: none; }
.work .pos > label { font-size: 0; gap: 0; }
.work .pos > label > * { font-size: 15px; }
.work .pos input[type="search"] { padding: 8px 12px; }
.work .pos > input { padding: 7px 12px; font-size: 14px; }
.work .pos-sums .pay { white-space: nowrap; font-size: 19px; gap: 10px; }
.work .pos-sums .pay span { font-size: 14px; }
.temp-pass { font-size: 12px; font-weight: 800; color: #b36b00; margin-bottom: 4px; white-space: nowrap; }

/* ---------- День рождения ---------- */
.bday-card {
  display: flex; gap: 14px; align-items: center; padding: 16px 18px; border-radius: var(--radius); color: #fff;
  background: linear-gradient(120deg, #e1306c, #f2a65a); box-shadow: 0 12px 30px rgba(225, 48, 108, 0.35);
}
.bday-card .big { font-size: 42px; animation: bump 1.2s ease-in-out infinite; }
.bday-card div { display: grid; gap: 2px; }
.bday-card b { font: 700 18px var(--font-head); }
.bday-line { padding: 10px 14px; border-radius: 14px; background: #fde7f0; color: #b0174f; font-weight: 800; font-size: 14px; }
.bday-use { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 14px; background: #fde7f0; border: 2px solid #f7a8c6; color: #b0174f; font-weight: 800; cursor: pointer; }
.pb.bday { background: #fde7f0; color: #b0174f; border-color: #f7a8c6; }
.bday-strip {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 10px 14px; border-radius: 16px;
  background: linear-gradient(120deg, #fff0f6, #fff4e5); border: 2px solid #f7a8c6; color: #b0174f; margin-bottom: 12px;
}
.bday-chip { background: #fff; border-radius: 999px; padding: 4px 10px; font-weight: 700; font-size: 13px; }
.bday-chip.used { opacity: 0.6; }
