/* Цвета и размеры — из макета «Макет: учёт кальянов DYMNO». */
:root {
  --bg: #16130F;
  --card: #221D18;
  --line: #3A322A;
  --line-soft: #2A241E;
  --line-strong: #5A4F44;
  --text: #F4EFE8;
  --text-2: #D8D0C6;
  --muted: #A39A8F;
  --faint: #8F867B;
  --accent: #F2994A;
  --accent-ink: #1A120A;
  --accent-soft: #3A2616;
  --g-standard: #C9C0B5;
  --g-premium: #F2994A;
  --g-cigar: #D9B26F;
  --ok-bg: #1F3A2B; --ok-line: #3D7A57; --ok-text: #DDF5E6;
  --bad-bg: #3A1E1A; --bad-line: #A5524A; --bad-text: #F7D4CF;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body {
  font-family: Manrope, system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
}
button, input { font-family: inherit; }
button { cursor: pointer; touch-action: manipulation; }
button:disabled { cursor: default; }
input::placeholder { color: var(--faint); }
[hidden] { display: none !important; }

.screen {
  min-height: 100dvh;
  max-width: 480px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  padding-top: env(safe-area-inset-top);
}

.top { padding: 22px 20px 10px; display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.top h1 { margin: 0; font-size: 24px; font-weight: 800; letter-spacing: -0.3px; }
.sub { font-size: 13px; color: var(--muted); margin-top: 4px; }
.section { padding: 0 20px; }
.label-row { display: flex; justify-content: space-between; align-items: baseline; }
.caps { font-size: 13px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.6px; }
.hint { font-size: 12px; color: var(--faint); }
.field-label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; }

.input {
  width: 100%; height: 46px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--card); color: var(--text); padding: 0 14px; font-size: 16px;
}
.input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }

.btn-ghost {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 14px;
  border-radius: 12px; background: var(--card); border: 1px solid var(--line); color: var(--text);
  font-size: 14px; font-weight: 600; text-decoration: none;
}
.btn-main {
  width: 100%; min-height: 56px; border-radius: 16px; border: none; background: var(--accent);
  color: var(--accent-ink); font-size: 17px; font-weight: 800;
}
.btn-main:disabled { background: var(--line-soft); color: var(--faint); }

.choice {
  min-height: 44px; border-radius: 12px; text-align: left; padding: 9px 12px; color: var(--text);
  background: var(--card); border: 1px solid var(--line);
}
.choice.on { background: var(--accent-soft); border: 2px solid var(--accent); padding: 8px 11px; }
.choice:disabled { opacity: 0.38; }
.choice .t1 { display: block; font-size: 14px; font-weight: 700; line-height: 1.2; }
.choice .t2 { display: block; font-size: 12px; margin-top: 3px; color: var(--muted); }

.pill {
  min-height: 44px; padding: 0 14px; border-radius: 22px; font-size: 14px; font-weight: 700;
  background: var(--card); color: var(--text); border: 1px solid var(--line);
}
.pill.on { background: var(--accent); color: var(--accent-ink); border: 2px solid var(--accent); }

.g-standard { color: var(--g-standard); font-weight: 600; }
.g-premium { color: var(--g-premium); font-weight: 600; }
.g-cigar { color: var(--g-cigar); font-weight: 600; }

.bottom-bar {
  position: sticky; bottom: 0; margin-top: auto; background: var(--bg); border-top: 1px solid var(--line-soft);
  padding: 14px 20px calc(18px + env(safe-area-inset-bottom));
}

.note { margin: 0 20px; padding: 12px 14px; border-radius: 14px; font-size: 14px; font-weight: 600; }
.note.ok { background: var(--ok-bg); border: 1px solid var(--ok-line); color: var(--ok-text); }
.note.bad { background: var(--bad-bg); border: 1px solid var(--bad-line); color: var(--bad-text); }
.note.wait { background: var(--accent-soft); border: 1px solid #7A5230; color: #F7C9A0; }

.toast {
  position: fixed; left: 50%; transform: translateX(-50%); top: calc(92px + env(safe-area-inset-top));
  width: calc(100% - 40px); max-width: 440px; padding: 14px 16px; border-radius: 14px;
  font-size: 15px; font-weight: 700; z-index: 10;
}

/* Нижнее меню админа и окно «Ещё» (js/admin-nav.js) */
.nav { position: sticky; bottom: 0; margin-top: auto; background: var(--bg); border-top: 1px solid var(--line-soft);
       padding: 6px 12px calc(14px + env(safe-area-inset-bottom)); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; }
.nav button, .nav a { min-height: 44px; display: flex; align-items: center; justify-content: center; font-size: 13px;
                      font-weight: 600; color: var(--g-standard); text-decoration: none; background: none; border: none; }
.nav .on { color: var(--accent); font-weight: 800; }
.nav .later { color: var(--faint); }
.sheet-back { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.55); z-index: 20; display: flex; align-items: flex-end; justify-content: center; }
.sheet { width: 100%; max-width: 480px; background: var(--card); border-radius: 20px 20px 0 0; border: 1px solid var(--line);
         padding: 16px 20px calc(20px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 8px; }
.sheet a, .sheet button, .sheet .soon { min-height: 52px; border-radius: 14px; display: flex; align-items: center; padding: 0 16px; font-size: 16px;
                          font-weight: 700; color: var(--text); background: var(--bg); border: 1px solid var(--line); text-decoration: none; }
.sheet .soon { color: var(--faint); font-weight: 600; justify-content: space-between; border-style: dashed; }
.sheet .soon span { font-size: 13px; }
.sheet .exit { color: var(--bad-text); }

/* Отказ гостя (js/common.js → Dymno.refusalForm) */
.refusal { margin-top: 8px; display: flex; flex-direction: column; gap: 8px; }
.refusal .reasons { display: flex; gap: 6px; flex-wrap: wrap; }
.refusal .reasons button { min-height: 40px; padding: 0 12px; border-radius: 20px; font-size: 13px; font-weight: 700;
                           background: var(--bg); color: var(--text-2); border: 1px solid var(--line); }
.refusal .reasons button.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.refusal .pay { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.refusal .pay button { min-height: 44px; border-radius: 12px; font-size: 14px; font-weight: 800; border: 1px solid var(--line-strong);
                       background: var(--card); color: var(--text); }
.refusal .pay .unpaid { color: var(--bad-text); border-color: var(--bad-line); }
.refusal input[type=text] { height: 44px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--text);
                            padding: 0 10px; font-size: 16px; font-family: inherit; }
.refusal-mark { color: #F0C38F; font-weight: 700; }

/* Новые экраны админа (пачка 01): карточки, строки «название · число · поле», бейджи разницы */
.cards { padding: 0 20px 14px; display: flex; flex-direction: column; gap: 8px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px;
        display: flex; flex-direction: column; gap: 8px; }
.card .head { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.card .name { font-size: 15px; font-weight: 700; }
.card .meta { font-size: 13px; color: var(--muted); }
.badge { font-size: 12px; font-weight: 700; padding: 3px 8px; border-radius: 8px; white-space: nowrap;
         background: #2E2721; color: var(--text-2); }
.badge.ok { background: var(--ok-bg); color: var(--ok-text); }
.badge.bad { background: #5A2620; color: #FBD9D3; font-weight: 800; }
.badge.wait { background: #4A3A1A; color: #F5DDA0; }
.trow { display: grid; grid-template-columns: minmax(0, 1fr) 70px auto 66px; gap: 8px; align-items: center; min-height: 48px;
        padding: 4px 0; border-top: 1px solid var(--line-soft); font-size: 14px; }
.trow:first-child { border-top: none; }
.trow .n { color: var(--muted); font-size: 13px; white-space: nowrap; text-align: right; }
.trow > :last-child { justify-self: end; }
.trow .t { min-width: 0; }
.trow .t small { display: block; color: var(--faint); font-size: 12px; }
.num { width: 76px; height: 42px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--text);
       padding: 0 10px; font-size: 16px; font-weight: 700; text-align: right; font-family: inherit; }
.num.wide { width: 120px; }
.num:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.weeknav { padding: 0 20px 12px; display: flex; align-items: center; gap: 8px; }
.weeknav button { width: 44px; height: 44px; border-radius: 12px; background: var(--card); border: 1px solid var(--line);
                  color: var(--text); font-size: 18px; font-weight: 800; flex-shrink: 0; }
.weeknav .label { flex: 1; text-align: center; font-size: 15px; font-weight: 800; }
.chips { padding: 0 20px 14px; display: flex; gap: 6px; flex-wrap: wrap; }
.chips button { min-height: 40px; padding: 0 12px; border-radius: 20px; font-size: 13px; font-weight: 700;
                background: var(--card); color: var(--text-2); border: 1px solid var(--line); }
.chips button.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.scroll-x { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: 12px; }
.tbl { border-collapse: collapse; font-size: 13px; min-width: 100%; }
.tbl th, .tbl td { padding: 8px 10px; text-align: right; white-space: nowrap; border-bottom: 1px solid var(--line-soft); }
.tbl th:first-child, .tbl td:first-child { text-align: left; position: sticky; left: 0; background: var(--card); }
.tbl th { color: var(--muted); font-weight: 700; background: var(--card); }
.small-acts { display: flex; gap: 8px; flex-wrap: wrap; }
.small-acts button, .small-acts a { min-height: 40px; padding: 0 12px; border-radius: 10px; font-size: 13px; font-weight: 700;
                                   background: transparent; border: 1px solid var(--line-strong); color: var(--text-2);
                                   text-decoration: none; display: inline-flex; align-items: center; }
.small-acts .danger { color: var(--bad-text); border-color: var(--bad-line); }
.form { display: flex; flex-direction: column; gap: 10px; }
.form label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); }
.form input, .form select, .form textarea { height: 44px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg);
                 color: var(--text); padding: 0 10px; font-size: 16px; font-family: inherit; min-width: 0; }
.form textarea { height: 72px; padding: 8px 10px; resize: vertical; }
.form .two { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
