/* Консоль владельца заведения SaaS-платформы Hookah POS — те же компоненты
   (карточки/кнопки/поля), что и в веб-версии гостя (public/app/app.css), но
   своя, премиальная палитра платформы (см. :root ниже), без нижнего
   таббара и гостевых экранов: здесь только вход, создание заведения и
   личный кабинет. */
:root {
  /* Премиальная гамма самой платформы (не путать с брендингом заведений —
     тот у каждого клиента свой, см. PREMIUM_PALETTES в console.js):
     чёрный/серый/белый + тёмно-красный/бордовый — фирменный вид Hookah POS,
     уместный именно для кальянного бизнеса. */
  --bg: #0A0909;
  --surface: #161313;
  --surface-2: #201C1C;
  --border: #362F2F;
  --text: #F5F1EF;
  --muted: #A89D9A;
  --primary: #C23B4E;
  --danger: #E5484D;
  --warning: #E8A317;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 15px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  min-height: 100vh;
}
.wrap { max-width: 480px; margin: 0 auto; padding: 32px 16px 40px; }
@media (min-width: 860px) {
  .wrap { max-width: 640px; }
  .feature-grid, .quick-actions { grid-template-columns: repeat(3, 1fr); }
  .palette-grid { grid-template-columns: repeat(4, 1fr); }
}
.brand {
  color: var(--primary); letter-spacing: .14em; text-transform: uppercase;
  font-weight: 600; font-size: 13px; margin-bottom: 4px;
}
h1 { font-size: 22px; font-weight: 700; margin: 4px 0 8px; }
h2 { font-size: 15px; font-weight: 600; margin: 22px 0 10px; }
p { margin: 0 0 10px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }
code {
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 6px; padding: 1px 6px; font-size: 0.92em;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 14px;
}
.card.danger {
  border-color: var(--danger);
  background: rgba(229, 72, 77, .12);
}

button, .btn {
  font: inherit;
  border: none;
  border-radius: 12px;
  padding: 14px 16px;
  width: 100%;
  cursor: pointer;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
}
.btn-primary { background: var(--primary); color: var(--text); }
.btn-ghost {
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border);
}
button:disabled { opacity: .5; cursor: default; }
.btn-link {
  background: none; border: none; color: var(--primary);
  width: auto; padding: 4px 0; font-weight: 600;
}

input, select, textarea {
  font: inherit;
  width: 100%;
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 13px 14px;
  margin-bottom: 10px;
}
label.field { display: block; margin-bottom: 12px; }
label.field span { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }

a { color: var(--primary); }

.row { display: flex; align-items: center; gap: 10px; }
.grow { flex: 1; min-width: 0; }
.row > button, .row > .btn { width: auto; flex: 0 0 auto; }
.row > input, .row > select { margin-bottom: 0; }

.spinner {
  width: 26px; height: 26px; margin: 60px auto;
  border: 3px solid var(--border); border-top-color: var(--primary);
  border-radius: 50%; animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.toast {
  position: fixed; left: 16px; right: 16px; bottom: 24px;
  max-width: 480px; margin: 0 auto;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 14px; padding: 14px 16px; z-index: 20;
  box-shadow: 0 10px 30px rgba(0,0,0,.5);
  opacity: 0; transform: translateY(12px); transition: .22s; pointer-events: none;
}
.toast.show { opacity: 1; transform: none; }

.palette-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}
.palette-swatch {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  padding: 10px;
  border-radius: 14px;
  border: 2px solid var(--border);
  background: var(--surface-2);
  cursor: pointer;
  text-align: left;
  width: 100%;
  font-weight: 400;
}
.palette-swatch.selected { border-color: var(--primary); }
.palette-swatch-colors {
  display: flex;
  width: 100%;
  height: 28px;
  border-radius: 8px;
  overflow: hidden;
}
.palette-swatch-colors span { flex: 1; }
.palette-swatch-name { font-size: 12.5px; font-weight: 600; color: var(--text); }

/* Навигация личного кабинета владельца — на телефоне выдвижное меню по
   кнопке ☰ (drawer поверх контента, с тёмной подложкой), на широком экране
   тот же список превращается в постоянную боковую панель — один и тот же
   HTML, разное поведение только через media query ниже. */
.hamburger-btn {
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text);
  width: 42px; height: 42px; padding: 0; border-radius: 12px; font-size: 19px;
  flex: none; margin-bottom: 18px;
}
.nav-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 25;
  opacity: 0; pointer-events: none; transition: opacity .2s ease;
}
.nav-backdrop.open { opacity: 1; pointer-events: auto; }
.nav-drawer {
  position: fixed; top: 0; left: 0; bottom: 0; width: 260px; max-width: 82vw;
  background: var(--surface); border-right: 1px solid var(--border);
  padding: 20px 14px; z-index: 30; overflow-y: auto;
  transform: translateX(-100%); transition: transform .22s ease;
}
.nav-drawer.open { transform: translateX(0); }
.nav-drawer-brand { color: var(--primary); letter-spacing: .12em; text-transform: uppercase; font-weight: 700; font-size: 13px; margin-bottom: 18px; padding: 0 8px; }
.nav-item {
  display: flex; align-items: center; gap: 11px; width: 100%;
  background: none; border: none; color: var(--muted); text-align: left;
  font: inherit; font-size: 14px; font-weight: 600; padding: 11px 10px;
  border-radius: 10px; cursor: pointer; position: relative;
}
.nav-item.active { color: var(--text); background: var(--surface-2); }
.nav-item .nav-icon { font-size: 17px; width: 22px; text-align: center; flex: none; }
.nav-item .nav-dot { position: absolute; right: 10px; width: 8px; height: 8px; border-radius: 50%; background: var(--danger); }
.nav-divider { height: 1px; background: var(--border); margin: 10px 4px; }

@media (min-width: 860px) {
  .hamburger-btn, .nav-backdrop { display: none; }
  .nav-drawer { transform: none; box-shadow: none; }
  .wrap.has-tabbar { max-width: none; margin: 0; padding: 32px 40px 40px 300px; }
  .wrap.has-tabbar > *:not(.nav-drawer):not(.nav-backdrop) { max-width: 640px; }
}

.quick-actions {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
}
.quick-actions .btn { flex-direction: row; justify-content: flex-start; padding: 14px; }

/* Лендинг: сетка карточек возможностей вместо плоского списка строк —
   ощущается как продукт, а не как техническая справка. */
.feature-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.feature-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  padding: 14px; display: flex; flex-direction: column; gap: 8px;
}
.feature-icon {
  width: 36px; height: 36px; border-radius: 10px;
  background: var(--surface-2); display: flex; align-items: center; justify-content: center;
  font-size: 18px; flex: none;
}
.feature-title { font-weight: 700; font-size: 13.5px; }
.feature-desc { font-size: 12.5px; color: var(--muted); line-height: 1.4; }

.plan-badge {
  display: inline-block; background: var(--primary); color: var(--text);
  font-size: 10.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  padding: 3px 9px; border-radius: 999px; margin-bottom: 8px;
}

.hero-badge {
  display: inline-block; color: var(--primary); border: 1px solid var(--primary);
  font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 999px; margin-bottom: 10px;
}

/* Лендинг: «Как это работает» — нумерованные шаги */
.step-item { display: flex; gap: 14px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--border); }
.step-item:last-child { border-bottom: none; }
.step-num {
  width: 28px; height: 28px; border-radius: 50%; background: var(--primary); color: var(--text);
  font-weight: 700; font-size: 13px; display: flex; align-items: center; justify-content: center; flex: none;
}

/* Лендинг: «Почему не тетрадь и Excel» — было/стало в две колонки на
   широком экране, одной колонкой на телефоне (тексты длиннее, чем в
   feature-grid, в две колонки на узком экране не помещаются красиво). */
.compare-grid { display: grid; grid-template-columns: 1fr; gap: 10px; margin-bottom: 14px; }
.compare-card.bad { border-color: var(--danger); }
.compare-card.good { border-color: var(--primary); }
@media (min-width: 640px) {
  .compare-grid { grid-template-columns: 1fr 1fr; }
}

/* Лендинг: липкая кнопка снизу — включается через JS (см. console.js),
   как только форма email вверху уходит за пределы экрана. */
.sticky-cta {
  position: fixed; left: 16px; right: 16px; bottom: 16px; max-width: 480px; margin: 0 auto;
  z-index: 15; opacity: 0; transform: translateY(14px); pointer-events: none; transition: .25s ease;
  box-shadow: 0 12px 30px rgba(0,0,0,.55);
}
.sticky-cta.show { opacity: 1; transform: none; pointer-events: auto; }

/* Калькулятор окупаемости на лендинге */
.calc-result { font-size: 28px; font-weight: 800; color: var(--primary); margin: 8px 0 2px; }

/* FAQ — простой аккордеон, без библиотек */
.faq-item { border-bottom: 1px solid var(--border); padding: 13px 0; }
.faq-item:last-child { border-bottom: none; }
.faq-question {
  display: flex; justify-content: space-between; align-items: center;
  cursor: pointer; font-weight: 600; font-size: 14px; gap: 10px;
}
.faq-toggle { font-size: 20px; color: var(--muted); transition: transform .15s ease; flex: none; }
.faq-item.open .faq-toggle { transform: rotate(45deg); }
.faq-answer { color: var(--muted); font-size: 13px; margin-top: 10px; line-height: 1.55; display: none; }
.faq-item.open .faq-answer { display: block; }

/* Чек-лист онбординга на "Обзоре" */
.checklist-item { display: flex; align-items: center; gap: 11px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.checklist-item:last-child { border-bottom: none; }
.checklist-check {
  width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--border);
  flex: none; display: flex; align-items: center; justify-content: center; font-size: 12px; color: transparent;
}
.checklist-item.done .checklist-check { background: var(--primary); border-color: var(--primary); color: var(--text); }
.checklist-label { flex: 1; font-size: 13.5px; }
.checklist-item.done .checklist-label { color: var(--muted); text-decoration: line-through; }
