/* ============================================================
   Loft CRM — стиль из основного сайта komnata-loft.ru
   ============================================================ */
:root {
  --bg:           #102a23;   /* основной — глубокий бутылочно-зелёный */
  --bg-elev:     #143229;   /* приподнятый блок */
  --bg-card:     #173a30;   /* карточки */
  --bg-soft:     #1b4438;   /* hover, soft surface */
  --line:         #2a4f43;
  --line-soft:   #1f4238;
  --text:         #f3ecd9;   /* тёплая слоновая кость */
  --text-dim:    #b4a98e;
  --text-muted: #76705c;
  --gold:         #c9a96e;
  --gold-bright: #e6c98a;
  --gold-dark:   #8a7340;
  --accent-glow: rgba(201, 169, 110, 0.22);
  --green:       #1d6f3a;
  --danger:       #d96b6b;
  --radius:       14px;
  --radius-sm:    8px;
  --radius-pill:  999px;
  --shadow-card: 0 1px 0 rgba(255,255,255,0.04) inset, 0 30px 60px -30px rgba(0,0,0,0.55);
  --shadow-gold: 0 10px 30px -10px rgba(201, 169, 110, 0.40);
  --font-display: 'Cormorant Garamond', 'Playfair Display', Georgia, serif;
  --font-body:   'Inter', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
  min-height: 100%;
}

a { color: var(--gold); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--gold-bright); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  color: var(--gold);
  margin: 0 0 8px;
}
h2 { font-size: 28px; letter-spacing: .5px; }
h3 { font-size: 22px; letter-spacing: .3px; }

.container { max-width: 1100px; margin: 0 auto; padding: 28px 24px; }

/* ============== Header ============== */
.header {
  background: rgba(13, 37, 32, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-soft);
  padding: 16px 28px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 18px;
}
.brand {
  font-family: var(--font-display);
  font-size: 24px; font-weight: 500;
  color: var(--gold);
  letter-spacing: .5px;
}
.nav { display: flex; gap: 4px; }
.nav a {
  color: var(--text-dim);
  font-weight: 500; font-size: 14px;
  padding: 8px 16px; border-radius: var(--radius-pill);
  transition: all .2s ease;
}
.nav a:hover { color: var(--text); background: var(--bg-soft); }
.nav a.active {
  color: var(--gold);
  background: var(--accent-glow);
}
.user-chip {
  color: var(--text-dim); font-size: 13px;
  display: flex; align-items: center; gap: 10px;
}
.user-chip b { color: var(--text); font-weight: 500; }
.user-chip button {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text-dim);
  padding: 8px 14px; border-radius: var(--radius-pill);
  font-size: 13px; cursor: pointer; transition: all .2s ease;
}
.user-chip button:hover {
  color: var(--gold); border-color: var(--gold);
}

/* ============== Buttons ============== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-body); font-size: 14px; font-weight: 500;
  letter-spacing: .3px;
  padding: 12px 22px; min-height: 44px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  background: linear-gradient(135deg, var(--gold-bright) 0%, var(--gold) 60%, var(--gold-dark) 100%);
  color: #1a1408;
  box-shadow: var(--shadow-gold);
  cursor: pointer;
  transition: all .2s ease;
  text-decoration: none;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 14px 36px -10px rgba(201,169,110,0.5); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }
.btn--block { width: 100%; }
.btn--ghost {
  background: transparent; color: var(--text);
  border-color: var(--line); box-shadow: none;
}
.btn--ghost:hover { border-color: var(--gold); color: var(--gold); }
.btn--green {
  background: linear-gradient(135deg, #2d8e54 0%, var(--green) 100%);
  color: #fff; box-shadow: 0 6px 18px -8px rgba(29,111,58,.6);
}
.btn--green:hover { box-shadow: 0 10px 24px -8px rgba(29,111,58,.7); }
.btn--danger {
  background: transparent; color: var(--danger);
  border-color: rgba(217,107,107,.45); box-shadow: none;
}
.btn--danger:hover { background: rgba(217,107,107,.12); border-color: var(--danger); }

/* ============== Forms ============== */
.field { margin-bottom: 14px; }
.field label, .field__label {
  display: block; color: var(--text-dim);
  margin-bottom: 8px; font-size: 12px;
  text-transform: uppercase; letter-spacing: .08em;
}
.field__input, .field__select {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--line);
  color: var(--text);
  padding: 13px 16px; min-height: 46px;
  border-radius: var(--radius-sm);
  font-family: var(--font-body); font-size: 15px;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.field__input:focus, .field__select:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.field__input::placeholder { color: var(--text-muted); }
.field__select {
  appearance: none; -webkit-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--gold) 50%),
                    linear-gradient(135deg, var(--gold) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 12px) 50%;
  background-size: 6px 6px;
  background-repeat: no-repeat;
  padding-right: 36px;
}

/* ============== Login ============== */
.login-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(circle at 80% 20%, rgba(201,169,110,0.10) 0%, transparent 55%),
    radial-gradient(circle at 10% 85%, rgba(201,169,110,0.05) 0%, transparent 55%),
    var(--bg);
  padding: 20px;
}
.login-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  padding: 36px 32px;
  border-radius: var(--radius);
  width: 360px;
  box-shadow: var(--shadow-card);
}
.login-card h1 {
  font-family: var(--font-display);
  font-size: 28px; color: var(--gold);
  margin: 0 0 22px; text-align: center;
  font-weight: 500; letter-spacing: .5px;
}
.err { color: var(--danger); font-size: 13px; margin-top: 8px; min-height: 18px; }

/* ============== Tiles ============== */
.tiles {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px; margin-top: 18px;
}
.tile {
  background: var(--bg-card);
  border: 1px solid var(--line);
  padding: 20px 22px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}
.tile__label {
  color: var(--text-muted); font-size: 11px;
  text-transform: uppercase; letter-spacing: .08em;
}
.tile__value {
  font-family: var(--font-display);
  font-size: 36px; color: var(--gold);
  margin-top: 8px; font-weight: 500;
}

/* ============== Tables ============== */
.toolbar {
  display: flex; gap: 8px; margin: 16px 0 14px;
  align-items: center; flex-wrap: wrap;
}
.toolbar .filter {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--bg-card); border: 1px solid var(--line);
  padding: 8px 14px; border-radius: var(--radius-pill);
  cursor: pointer; color: var(--text-dim);
  font-size: 13px; min-height: 36px;
  transition: all .2s ease;
}
.toolbar .filter:hover { color: var(--text); border-color: var(--text-dim); }
.toolbar .filter.active {
  color: var(--gold); border-color: var(--gold);
  background: var(--accent-glow);
}

.table-wrap {
  overflow-x: auto;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}
table.crm { width: 100%; border-collapse: collapse; font-size: 14px; }
table.crm th, table.crm td {
  padding: 14px 16px; text-align: left;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: top;
}
table.crm th {
  font-weight: 500; color: var(--text-dim);
  text-transform: uppercase; font-size: 11px; letter-spacing: .08em;
  background: rgba(0,0,0,.12);
}
table.crm tr:hover td { background: var(--bg-soft); }
table.crm tr:last-child td { border-bottom: none; }
table.crm td a { color: var(--gold); font-weight: 500; }

.badge {
  display: inline-block; padding: 4px 10px; border-radius: var(--radius-pill);
  font-size: 11px; font-weight: 600; letter-spacing: .04em;
  text-transform: uppercase;
}
.badge--new      { background: var(--accent-glow); color: var(--gold); }
.badge--accepted { background: rgba(45,142,84,.22);  color: #7ed8a0; }
.badge--rejected { background: rgba(217,107,107,.16); color: var(--danger); }

.muted { color: var(--text-muted); }
.row-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.row-actions .btn { padding: 8px 14px; font-size: 12px; min-height: 36px; }

.empty {
  padding: 60px 20px; text-align: center; color: var(--text-muted);
  font-style: italic;
}

/* ============== Booking detail cards ============== */
.booking-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px; margin-top: 18px;
}
.card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  padding: 18px 20px; border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}
.card__label {
  color: var(--text-muted); font-size: 11px;
  text-transform: uppercase; letter-spacing: .08em;
}
.card__value { color: var(--text); font-size: 15px; margin-top: 8px; }

/* ============== Add-form (одной строкой) ============== */
.add-form {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
  margin: 18px 0 8px;
}
.add-form .field__input { width: auto; min-width: 140px; }

/* ============== Inline-input в таблицах ============== */
.inline-input {
  width: 100%; background: transparent; border: 1px solid transparent;
  color: var(--text); padding: 6px 8px; border-radius: var(--radius-sm);
  font: inherit;
}
.inline-input:focus, .inline-input:hover {
  background: var(--bg); border-color: var(--line); outline: none;
}

.cat-title {
  margin: 24px 0 10px; color: var(--gold);
  font-family: var(--font-display); font-size: 22px; font-weight: 500;
}

/* ============== Visit card (фиксация прихода) ============== */
.visit-card {
  margin-top: 18px;
  display: flex; justify-content: space-between; align-items: center;
  gap: 14px; flex-wrap: wrap;
  padding: 18px 22px; border-radius: var(--radius);
  background: var(--bg-card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
}
.visit-card--idle {
  border-color: var(--gold);
  background:
    linear-gradient(90deg, var(--accent-glow), transparent 70%),
    var(--bg-card);
}
.visit-card--active {
  border-color: #4ea36e;
  background:
    linear-gradient(90deg, rgba(45,142,84,.18), transparent 70%),
    var(--bg-card);
}
.visit-card--done { opacity: .85; }
.visit-card__text { font-size: 14px; }
.visit-card__elapsed {
  margin-top: 6px; color: var(--gold);
  font-family: var(--font-display); font-size: 22px; font-weight: 500;
  font-variant-numeric: tabular-nums;
}

/* ============== Активные сессии «Сейчас в лофте» ============== */
.active-list { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.active-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 20px; border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-card);
  text-decoration: none; color: inherit;
  box-shadow: var(--shadow-card);
  transition: all .2s ease;
}
.active-row:hover {
  border-color: var(--gold); transform: translateY(-1px);
  box-shadow: 0 14px 36px -10px rgba(201,169,110,.3);
}
.active-row__name { font-weight: 500; font-size: 15px; }
.active-row__rooms {
  color: var(--text-muted); font-size: 12px; margin-top: 4px;
  text-transform: uppercase; letter-spacing: .04em;
}
.active-row__timer {
  color: var(--gold);
  font-family: var(--font-display);
  font-weight: 500; font-size: 22px;
  font-variant-numeric: tabular-nums;
}

/* ============== Section head (заголовок + кнопка справа) ============== */
.section-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin: 24px 0 12px;
}
.section-title {
  margin: 24px 0 12px;
  color: var(--gold);
  font-family: var(--font-display);
  font-size: 26px; font-weight: 500;
  letter-spacing: .3px;
}

/* ============== Date range (на /reports) ============== */
.date-range {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  margin: 12px 0 18px;
}
.date-range .field__input { width: auto; min-height: 40px; padding: 8px 12px; }
.date-range #dl-xlsx { margin-left: auto; }

/* ============== Форма ручного создания брони ============== */
.manual-form {
  max-width: 620px;
  display: flex; flex-direction: column; gap: 16px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  padding: 28px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}
.manual-form__row { display: flex; flex-direction: column; gap: 8px; }
.manual-form label {
  color: var(--text-dim); font-size: 12px;
  text-transform: uppercase; letter-spacing: .08em;
  font-weight: 500;
}
.manual-form .checkbox-line {
  display: flex; align-items: center; gap: 12px;
  text-transform: none; letter-spacing: 0;
  color: var(--text); font-size: 14px;
  padding: 14px 16px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all .2s ease;
}
.manual-form .checkbox-line:hover { border-color: var(--gold); }
.manual-form .checkbox-line input { transform: scale(1.3); accent-color: var(--gold); }

.rooms-pick {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px;
}
.rooms-pick label {
  display: flex; align-items: center; gap: 10px;
  color: var(--text); font-size: 14px;
  text-transform: none; letter-spacing: 0;
  padding: 14px 16px; border: 1px solid var(--line);
  background: var(--bg);
  border-radius: var(--radius-sm); cursor: pointer;
  transition: all .2s ease;
}
.rooms-pick label:hover { border-color: var(--gold); }
.rooms-pick input {
  transform: scale(1.2); accent-color: var(--gold);
}
.rooms-pick label:has(input:checked) {
  border-color: var(--gold);
  background: var(--accent-glow);
  box-shadow: 0 0 0 1px var(--gold) inset;
}

.price-display {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  display: flex; justify-content: space-between; align-items: center;
  gap: 12px;
}
.price-display__amount {
  font-family: var(--font-display);
  font-size: 28px; color: var(--gold); font-weight: 500;
}

/* ============== Меню — быстрый ввод (страница /menu) ============== */
.cat-tabs {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 8px; margin-bottom: 18px;
}
.cat-tab {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  color: var(--text-dim);
  padding: 14px 8px;
  border-radius: var(--radius);
  cursor: pointer; font-family: inherit;
  transition: all .15s ease;
}
.cat-tab:hover { border-color: var(--gold); color: var(--text); }
.cat-tab.active {
  border-color: var(--gold);
  background: var(--accent-glow);
  color: var(--gold);
  box-shadow: 0 0 0 1px var(--gold) inset;
}
.cat-tab__icon { font-size: 26px; line-height: 1; }
.cat-tab__label {
  font-size: 12px; font-weight: 500;
  text-transform: uppercase; letter-spacing: .04em;
}

.quick-add {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 22px;
  display: flex; flex-direction: column; gap: 12px;
  box-shadow: var(--shadow-card);
}
.quick-add__name {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--line);
  color: var(--text);
  padding: 16px 18px; min-height: 52px;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 17px;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.quick-add__name:focus {
  outline: none; border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.price-box {
  display: flex; align-items: baseline; justify-content: center; gap: 6px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 18px;
}
.price-box__amount {
  width: 200px; max-width: 60vw;
  background: transparent; border: none; outline: none;
  color: var(--gold);
  font-family: var(--font-display);
  font-size: 42px; font-weight: 500;
  text-align: right;
}
.price-box__amount::-webkit-outer-spin-button,
.price-box__amount::-webkit-inner-spin-button {
  -webkit-appearance: none; margin: 0;
}
.price-box__amount[type=number] { -moz-appearance: textfield; }
.price-box__rub {
  color: var(--gold);
  font-family: var(--font-display); font-size: 28px;
}

.price-quick {
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px;
}
.price-quick button {
  background: var(--bg);
  border: 1px solid var(--line);
  color: var(--text-dim);
  padding: 12px 4px;
  font-size: 14px; font-weight: 500;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all .15s ease;
}
.price-quick button:hover {
  border-color: var(--gold);
  color: var(--gold);
  background: var(--accent-glow);
}

.cat-list-head {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 12px; margin: 22px 0 10px;
}
.cat-list-head .section-title { font-size: 22px; }
.cat-list-head .muted { font-size: 13px; }

.m-list {
  display: flex; flex-direction: column; gap: 8px;
}
.m-row {
  display: grid;
  grid-template-columns: 1fr 130px 90px 40px;
  gap: 10px; align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 14px;
  transition: border-color .2s ease;
}
.m-row--off { opacity: .55; }
.m-row--saved { border-color: #6ec48a; }
.m-row__name, .m-row__price {
  background: transparent; border: 1px solid transparent;
  color: var(--text);
  padding: 8px 10px; border-radius: var(--radius-sm);
  font: inherit;
}
.m-row__name:focus, .m-row__price:focus {
  outline: none; border-color: var(--gold);
  background: var(--bg);
}
.m-row__name:hover, .m-row__price:hover {
  border-color: var(--line);
}
.m-row__pricewrap {
  display: flex; align-items: center; gap: 4px;
}
.m-row__price { text-align: right; width: 100%; color: var(--gold); }
.m-row__toggle {
  display: flex; align-items: center; gap: 6px;
  cursor: pointer; user-select: none;
  font-size: 12px; color: var(--text-dim);
}
.m-row__toggle input { accent-color: var(--gold); }
.m-row__del {
  background: transparent; border: 1px solid var(--line);
  color: var(--text-muted);
  width: 36px; height: 36px;
  border-radius: 50%; font-size: 20px;
  cursor: pointer;
  transition: all .15s ease;
}
.m-row__del:hover { color: var(--danger); border-color: var(--danger); }

@media (max-width: 720px) {
  .cat-tabs { gap: 6px; }
  .cat-tab { padding: 12px 4px; }
  .cat-tab__icon { font-size: 22px; }
  .cat-tab__label { font-size: 11px; }
  .price-quick { grid-template-columns: repeat(3, 1fr); }
  .price-quick button { padding: 14px 4px; font-size: 14px; min-height: 44px; }
  .price-box__amount { font-size: 36px; width: 50vw; }
  .m-row {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "name name"
      "price toggle"
      "del del";
    gap: 8px;
  }
  .m-row__name { grid-area: name; font-weight: 500; }
  .m-row__pricewrap { grid-area: price; }
  .m-row__toggle { grid-area: toggle; justify-content: flex-end; }
  .m-row__del {
    grid-area: del; width: 100%; height: 40px;
    border-radius: var(--radius-pill);
    font-size: 14px;
  }
  .m-row__del::before { content: 'Удалить'; }
  .m-row__del { font-size: 0; }
  .m-row__del::before { font-size: 13px; }
}

/* ============== Меню-плитки на карточке брони ============== */
.menu-block { margin-bottom: 18px; }
.menu-block__label {
  color: var(--text-muted); font-size: 11px;
  text-transform: uppercase; letter-spacing: .08em;
  margin: 0 0 10px;
}
.menu-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
}
.menu-tile {
  display: flex; flex-direction: column; gap: 6px;
  align-items: flex-start; text-align: left;
  background: var(--bg-card);
  border: 1px solid var(--line);
  color: var(--text);
  padding: 14px 16px;
  border-radius: var(--radius);
  cursor: pointer;
  font-family: inherit;
  transition: all .15s ease;
  min-height: 72px;
}
.menu-tile:hover, .menu-tile:active {
  border-color: var(--gold);
  background: var(--accent-glow);
  transform: translateY(-1px);
}
.menu-tile__name { font-size: 14px; font-weight: 500; line-height: 1.3; }
.menu-tile__price {
  color: var(--gold);
  font-family: var(--font-display); font-size: 18px; font-weight: 500;
}

/* ============== Cart-bar (корзина внизу) ============== */
.cart-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  background: rgba(13, 37, 32, 0.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--gold);
  box-shadow: 0 -20px 60px -20px rgba(0,0,0,.7);
  padding: 14px 20px env(safe-area-inset-bottom);
  transform: translateY(110%);
  transition: transform .25s ease;
}
.cart-bar.show { transform: translateY(0); }
.cart-bar__list {
  max-height: 35vh; overflow-y: auto;
  margin-bottom: 12px;
  display: flex; flex-direction: column; gap: 6px;
}
.cart-bar__row {
  display: grid;
  grid-template-columns: 36px 40px 1fr auto 36px;
  align-items: center; gap: 10px;
  padding: 6px 0;
  border-bottom: 1px solid var(--line-soft);
}
.cart-bar__row:last-child { border-bottom: none; }
.cart-bar__qty { color: var(--gold); font-weight: 600; }
.cart-bar__name { color: var(--text); font-size: 14px; }
.cart-bar__sum { color: var(--text-dim); white-space: nowrap; }
.cart-bar__minus {
  background: transparent; border: 1px solid var(--line);
  color: var(--text-dim); border-radius: 50%;
  width: 32px; height: 32px;
  font-size: 18px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: all .15s ease;
}
.cart-bar__minus:hover { color: var(--danger); border-color: var(--danger); }
.cart-bar__foot {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding-top: 8px;
  border-top: 1px solid var(--line);
}
.cart-bar__total {
  display: flex; flex-direction: column; gap: 2px;
}
.cart-bar__total b {
  font-family: var(--font-display); font-size: 22px;
  color: var(--gold); font-weight: 500;
}

/* Отступ снизу страницы когда корзина открыта */
body { padding-bottom: 0; }

@media (max-width: 720px) {
  .menu-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .menu-tile { padding: 12px 14px; min-height: 70px; }
  .menu-tile__name { font-size: 13px; }
  .menu-tile__price { font-size: 16px; }
  .cart-bar { padding: 12px 14px env(safe-area-inset-bottom); }
  .cart-bar__list { max-height: 40vh; }
  .cart-bar__row { grid-template-columns: 32px 36px 1fr auto 32px; gap: 8px; }
  .cart-bar__name { font-size: 13px; }
  .cart-bar__foot .btn { padding: 12px 18px; min-height: 44px; }
}

/* ============== Duration picker (± кнопки) ============== */
.duration-pick {
  display: flex; align-items: stretch; gap: 8px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 4px;
}
.duration-pick .dur-btn {
  flex: 0 0 56px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  color: var(--gold);
  font-size: 24px; font-weight: 500;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all .15s ease;
}
.duration-pick .dur-btn:hover {
  background: var(--accent-glow);
  border-color: var(--gold);
}
.duration-pick .field__input {
  flex: 1;
  border: none; background: transparent;
  min-height: auto; padding: 8px;
}
.duration-pick .field__input:focus { box-shadow: none; }

/* ============================================================
   МОБИЛЬНАЯ АДАПТАЦИЯ
   ============================================================ */
@media (max-width: 720px) {
  body { font-size: 14px; }
  .container { padding: 16px 14px; }

  .header {
    flex-wrap: wrap; padding: 12px 16px; gap: 10px;
    position: sticky; top: 0; z-index: 20;
  }
  .brand { font-size: 18px; flex: 1; letter-spacing: .3px; }
  .user-chip { font-size: 12px; order: 2; }
  .user-chip button { padding: 8px 14px; font-size: 12px; min-height: 40px; }
  .nav {
    order: 3; width: 100%;
    overflow-x: auto; -webkit-overflow-scrolling: touch;
    padding-top: 8px; border-top: 1px solid var(--line-soft);
    gap: 6px;
  }
  .nav a { padding: 10px 16px; white-space: nowrap; font-size: 14px; }

  /* Кнопки крупнее под палец */
  .btn { padding: 14px 22px; font-size: 14px; min-height: 48px; }
  .row-actions .btn { padding: 10px 14px; font-size: 12px; min-height: 40px; }

  /* Формы */
  .field__input, .field__select {
    padding: 14px 16px; font-size: 16px;  /* 16+ чтобы iOS не зумил */
    min-height: 48px;
  }
  .add-form .field__input { width: 100%; min-width: 0; }
  .add-form .btn { width: 100%; }

  .toolbar {
    flex-wrap: nowrap; overflow-x: auto;
    -webkit-overflow-scrolling: touch; padding-bottom: 6px;
  }
  .toolbar .filter {
    flex: 0 0 auto; padding: 10px 16px; font-size: 13px; min-height: 40px;
  }

  /* Таблицы → карточки на мобиле */
  table.crm thead { display: none; }
  table.crm, table.crm tbody, table.crm tr, table.crm td {
    display: block; width: 100%;
  }
  table.crm tr {
    border-bottom: 1px solid var(--line-soft);
    padding: 14px 16px;
  }
  table.crm tr:last-child { border-bottom: none; }
  table.crm tr:hover td { background: transparent; }
  table.crm td {
    padding: 5px 0; border: none; text-align: left;
    display: flex; justify-content: space-between; gap: 14px;
    align-items: flex-start;
  }
  table.crm td::before {
    content: attr(data-label);
    color: var(--text-muted);
    font-size: 11px; text-transform: uppercase; letter-spacing: .08em;
    font-weight: 500; flex: 0 0 auto; padding-top: 2px;
  }
  table.crm td:not([data-label]) { display: block; padding-top: 10px; }
  table.crm td .row-actions { flex-wrap: wrap; gap: 8px; }
  table.crm td .row-actions .btn { flex: 1; min-width: 120px; }

  /* Visit card */
  .visit-card {
    flex-direction: column; align-items: stretch;
    padding: 16px;
  }
  .visit-card .btn, .visit-card .row-actions { width: 100%; }
  .visit-card .row-actions { display: flex; }
  .visit-card .row-actions .btn { flex: 1; }
  .visit-card__elapsed { font-size: 26px; }

  .booking-grid { grid-template-columns: 1fr; gap: 10px; }
  .card { padding: 14px 16px; }

  .active-row { padding: 16px; }
  .active-row__name { font-size: 15px; }
  .active-row__timer { font-size: 24px; }

  .tiles { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .tile { padding: 14px 16px; }
  .tile__value { font-size: 24px; }

  .login-card { width: 100%; max-width: 380px; padding: 28px 22px; }

  .manual-form { padding: 18px; }
  .rooms-pick { grid-template-columns: 1fr; }

  .section-head { flex-direction: column; align-items: stretch; gap: 10px; }
  .section-head .btn { width: 100%; }
  .section-title { font-size: 22px; }

  .price-display__amount { font-size: 24px; }
}

@media (max-width: 380px) {
  .brand { font-size: 16px; }
  .nav a { padding: 8px 12px; font-size: 13px; }
  .tile__value { font-size: 22px; }
  .section-title { font-size: 20px; }
}
