:root {
  --ink: #13221c;
  --muted: #5c6b63;
  --line: rgba(19, 34, 28, 0.12);
  --panel: rgba(255, 252, 247, 0.92);
  --panel-strong: #fffdf9;
  --accent: #1f6b4a;
  --accent-deep: #0f3d2c;
  --danger: #9b2c2c;
  --ok: #1f6b4a;
  --shadow: 0 18px 40px rgba(19, 34, 28, 0.08);
  --radius: 18px;
  --font: "Manrope", sans-serif;
  --display: "Newsreader", Georgia, serif;
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  min-height: 100%;
  color: var(--ink);
  font-family: var(--font);
  background: #e8efe8;
}
body {
  min-height: 100vh;
}
.bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(900px 500px at 8% -10%, rgba(176, 138, 60, 0.18), transparent 60%),
    radial-gradient(700px 480px at 100% 0%, rgba(31, 107, 74, 0.16), transparent 55%),
    linear-gradient(160deg, #edf3ec 0%, #e4ece5 45%, #f4efe6 100%);
}
.top {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  padding: 24px 20px 8px;
  max-width: 1200px;
  margin: 0 auto;
  flex-wrap: wrap;
}
body.staff-page:has(.layout.admin) .top,
body.staff-page:has(.layout.admin-lk) .top,
body.staff-page:has(.layout.admin-lk-hub) .top,
body.staff-page:has(.layout.admin-tablet) .top,
body.staff-page:has(.layout.revision-section) .top {
  max-width: 1320px;
}
/* Только страницы с кнопкой «Назад» под заголовком — навбар сверху, не уезжает вниз к «Назад» */
body.staff-page:has(.layout.admin-lk) .top,
body.staff-page:has(.layout.admin-tablet) .top,
body.staff-page:has(.visit-panel) .top {
  align-items: flex-start;
}
/* Хабы (ЛК / планшеты / ревизия / CRM) и разделы ревизии — как Касса и Администратор */
body.staff-page:has(.layout.admin-lk-hub) .top,
body.staff-page:has(.layout.tablets-hub) .top,
body.staff-page:has(.layout.crm-hub) .top,
body.staff-page:has(.layout.revision-section) .top {
  align-items: flex-start;
  flex-wrap: nowrap;
}
body.staff-page:has(.layout.admin-lk-hub) .top > div:last-child,
body.staff-page:has(.layout.revision-section) .top > div:last-child {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  justify-content: flex-end;
}
body.staff-page:has(.layout.admin-lk-hub) .nav,
body.staff-page:has(.layout.admin-lk) .nav,
body.staff-page:has(.layout.revision-section) .nav,
body.staff-page:has(.layout.tablets-hub) .nav {
  justify-content: flex-end;
  flex-wrap: nowrap;
}
body.staff-page:has(.layout.revision-section) .brand {
  text-align: left;
}
.brand-name {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 11px;
  color: var(--muted);
  font-weight: 600;
}
.brand h1 {
  margin: 2px 0 0;
  font-family: var(--display);
  font-size: clamp(26px, 4vw, 36px);
  font-weight: 600;
}
.brand .btn {
  margin-top: 12px;
}
.nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.nav a, .btn {
  border: 0;
  border-radius: 12px;
  padding: 10px 14px;
  font: inherit;
  font-weight: 650;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}
.nav a {
  background: rgba(255,253,249,0.75);
  border: 1px solid var(--line);
  color: var(--ink);
}
.nav a.active {
  background: var(--accent);
  color: #f7fff9;
  border-color: transparent;
}
.btn.primary { background: var(--accent); color: #f7fff9; }
.btn.secondary { background: #dfe9e2; color: var(--accent-deep); }
.btn.danger { background: rgba(155,44,44,0.12); color: var(--danger); }
.btn.ghost {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink);
}
.btn.wide { width: 100%; }
.btn.small { padding: 7px 10px; font-size: 12px; border-radius: 9px; }
.layout {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 20px 40px;
  display: grid;
  gap: 14px;
}
.layout.two { grid-template-columns: 1.1fr 1fr; }
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
}
.panel h2 {
  margin: 0 0 6px;
  font-family: var(--display);
  font-size: 24px;
}
.hint, .field-note { color: var(--muted); font-size: 14px; margin: 0 0 12px; }
.stack { display: grid; gap: 10px; }
.row { display: flex; gap: 10px; align-items: end; }
.grow { flex: 1; }
.field { display: grid; gap: 6px; }
.field span {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.field input, .field textarea, .field select {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--panel-strong);
  border-radius: 12px;
  padding: 12px 14px;
  font: inherit;
  font-size: 16px;
}
.phone-input {
  display: flex;
  align-items: center;
  gap: 0;
  width: 100%;
  border: 1px solid var(--line);
  background: var(--panel-strong);
  border-radius: 12px;
  overflow: hidden;
}
.phone-input-prefix {
  flex: 0 0 auto;
  padding: 12px 0 12px 14px;
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.02em;
  user-select: none;
}
.phone-input input {
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  padding-left: 8px;
  outline: none !important;
  box-shadow: none !important;
}
.phone-input input:focus {
  outline: none !important;
  box-shadow: none !important;
  border-color: transparent !important;
}
.phone-input:focus-within {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
  border-color: transparent;
}
.field textarea { min-height: 80px; resize: vertical; }
.msg {
  margin: 10px 0 0;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 14px;
}
.msg.error { background: rgba(155,44,44,0.08); color: var(--danger); }
.msg.ok { background: rgba(31,107,74,0.1); color: var(--ok); }
.hidden { display: none !important; }
.stats {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.stats div {
  min-width: 100px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255,253,249,0.7);
  border: 1px solid var(--line);
}
.stats span { display: block; font-weight: 700; font-size: 18px; }
.stats small { color: var(--muted); font-size: 12px; }
.balance {
  text-align: right;
  padding: 10px 12px;
  border-radius: 14px;
  background: linear-gradient(160deg, rgba(31,107,74,0.12), rgba(176,138,60,0.12));
}
.balance span { display: block; font-size: 28px; font-weight: 700; }
.client-head { display: flex; justify-content: space-between; gap: 12px; }
.meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 14px;
}
.meta div {
  padding: 10px;
  border-radius: 12px;
  background: rgba(255,255,255,0.55);
  border: 1px solid var(--line);
}
.meta dt { margin: 0; font-size: 11px; text-transform: uppercase; color: var(--muted); }
.meta dd { margin: 4px 0 0; font-weight: 650; }
.receipt {
  margin-top: 12px;
  padding: 12px;
  border-radius: 12px;
  background: #f3f8f4;
  border: 1px solid rgba(31,107,74,0.18);
}
.history { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; max-height: 480px; overflow: auto; }
.history li {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255,255,255,0.55);
  border: 1px solid var(--line);
  display: grid;
  gap: 4px;
}
.history .delta.plus { color: var(--ok); font-weight: 700; }
.history .delta.minus { color: var(--danger); font-weight: 700; }
.history .when, .history .note { color: var(--muted); font-size: 12px; }
.history .receipt-mini {
  padding: 10px;
  border-radius: 10px;
  background: #f3f8f4;
  border: 1px solid rgba(31,107,74,0.18);
  font-size: 13px;
}
.history li.cancelled { opacity: 0.55; }
.sheet-wrap {
  overflow: auto;
  max-height: 320px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fffdf9;
}
.sheet { border-collapse: collapse; min-width: max-content; }
.sheet th, .sheet td {
  border: 1px solid var(--line);
  min-width: 88px;
  height: 28px;
  padding: 0;
}
.sheet thead th {
  position: sticky;
  top: 0;
  background: #eef3ef;
  font-size: 10px;
  padding: 6px 4px;
  white-space: normal;
  line-height: 1.15;
  z-index: 2;
}
.sheet .row-head, .sheet .corner {
  position: sticky;
  left: 0;
  background: #eef3ef;
  min-width: 34px;
  max-width: 34px;
  text-align: center;
  font-size: 10px;
  z-index: 3;
}
.sheet td.cell {
  padding: 2px 6px;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  outline: none;
}
.sheet td.cell:focus {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
  background: #f3f8f4;
}
.table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 12px; }
table.cards { width: 100%; border-collapse: collapse; font-size: 14px; }
table.cards th, table.cards td {
  padding: 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}
table.cards th {
  background: #f4f7f4;
  font-size: 11px;
  text-transform: uppercase;
  color: var(--muted);
}
.actions { display: flex; gap: 6px; flex-wrap: wrap; }
.mono { font-family: ui-monospace, Consolas, monospace; font-weight: 700; }
.full { grid-column: 1 / -1; }
.cabinet {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  padding: 24px 16px 40px;
}
.cabinet .hero {
  text-align: center;
  margin-bottom: 18px;
}
.cabinet .hero h1 {
  font-family: var(--display);
  font-size: 32px;
  margin: 6px 0;
}
.points-card {
  text-align: center;
  padding: 22px;
  border-radius: 18px;
  background: linear-gradient(160deg, rgba(31,107,74,0.16), rgba(176,138,60,0.14));
  border: 1px solid var(--line);
  margin-bottom: 14px;
}
.points-card .big {
  font-size: 42px;
  font-weight: 700;
  line-height: 1;
}
.points-card.is-negative .big,
.balance .is-negative,
td.is-negative,
#client-points.is-negative {
  color: var(--danger);
}
.check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 14px;
  color: var(--muted);
}
.check input { margin-top: 3px; }
.items-table-wrap { overflow: auto; border: 1px dashed var(--line); border-radius: 8px; }
.items-table { border-collapse: collapse; font-size: 12px; width: max-content; min-width: 100%; }
.items-table th, .items-table td { border: 1px solid var(--line); padding: 4px 8px; }
.items-table th { background: #eef3ef; font-size: 10px; }
.purchase-lines { margin-top: 8px; }
.purchase-lines-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 6px;
}
.cabinet-items { width: 100%; min-width: 0; }
.cabinet-items th, .cabinet-items td {
  font-size: 12px;
  vertical-align: top;
  white-space: normal;
  word-break: break-word;
}
.cabinet-items td:first-child {
  white-space: nowrap;
  word-break: normal;
}
.cabinet-items td:last-child {
  white-space: nowrap;
  text-align: right;
  width: 1%;
}
.cabinet-actions {
  margin: 0 0 14px;
  display: grid;
  gap: 8px;
}
.cabinet-logout { margin: 0; }
.panel.accordion {
  padding: 0;
  overflow: hidden;
}
.accordion-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border: 0;
  background: transparent;
  cursor: pointer;
  font: inherit;
  color: inherit;
  text-align: left;
}
.accordion-title {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--display);
  font-size: 22px;
  font-weight: 600;
}
.accordion-chevron {
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
  transition: transform 0.15s ease;
  flex: 0 0 auto;
}
.accordion.is-open .accordion-chevron {
  transform: rotate(225deg);
  margin-top: 4px;
}
.accordion-body {
  padding: 0 18px 18px;
  border-top: 1px solid var(--line);
}
.accordion-toolbar {
  display: flex;
  justify-content: flex-end;
  margin: 12px 0 0;
}
.home-guide-modal h2 {
  margin: 0 0 6px;
  font-family: var(--display);
  font-size: 22px;
}
.home-guide-block {
  margin: 12px 0;
  padding: 12px;
  border-radius: 12px;
  background: #f3f8f4;
  border: 1px solid rgba(31, 107, 74, 0.16);
}
.home-guide-block ol {
  margin: 8px 0 0;
  padding-left: 1.2em;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.45;
}
.home-guide-block li { margin: 4px 0; }
.home-guide-note { margin: 8px 0 14px; }
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(19,34,28,0.35);
  display: flex; align-items: center; justify-content: center; padding: 16px; z-index: 40;
}
.modal-backdrop.hidden { display: none; }
.modal {
  width: min(640px, 100%);
  max-height: 86vh;
  overflow: auto;
  background: var(--panel-strong);
  border-radius: 18px;
  padding: 18px;
  border: 1px solid var(--line);
}
.qr-box {
  text-align: center;
  padding: 8px 0 4px;
}
.qr-box img {
  width: min(280px, 70vw);
  height: auto;
  background: #fff;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
}
.qr-url {
  word-break: break-all;
  font-size: 13px;
  color: var(--muted);
  margin: 10px 0;
}
.layout.admin {
  align-items: start;
  max-width: 1280px;
  width: 100%;
  min-width: 0;
  grid-template-columns: minmax(0, 1fr);
}
.layout.admin.has-staff {
  max-width: 1320px;
}
.layout.admin-lk {
  max-width: 720px;
  grid-template-columns: 1fr;
  align-items: start;
}
.layout.revision-section {
  max-width: 1320px;
  grid-template-columns: minmax(240px, 340px);
  justify-content: start;
  align-items: start;
  padding-top: 8px;
}
.layout.revision-section:has(.revision-stock-panel:not(.hidden)) {
  grid-template-columns: minmax(240px, 340px) minmax(0, 1fr);
}
@media (max-width: 1100px) {
  .layout.revision-section,
  .layout.revision-section:has(.revision-stock-panel:not(.hidden)) {
    grid-template-columns: 1fr;
  }
}
.revision-excel-panel {
  width: 100%;
  padding: 14px 14px 12px;
}
.revision-excel-panel h2 {
  margin: 0 0 6px;
  font-size: 16px;
}
.revision-excel-panel .hint {
  margin: 0 0 10px;
  font-size: 13px;
}
.revision-file-state {
  margin: 0 0 12px;
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 650;
  background: #fff8e1;
  border: 1px solid var(--line);
}
.revision-file-state.is-loading {
  color: var(--muted);
}
.revision-file-state.is-empty {
  background: #f4f4f4;
  color: var(--muted);
}
.revision-file-state.is-ready {
  background: rgba(31, 107, 74, 0.1);
  color: var(--ok);
  border-color: rgba(31, 107, 74, 0.25);
}
.revision-file-state.is-warn {
  background: rgba(155, 44, 44, 0.08);
  color: var(--danger);
  border-color: rgba(155, 44, 44, 0.2);
}
.revision-stock-panel.is-loading .revision-stock-wrap {
  opacity: 0.55;
}
.revision-stock-loading {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}
.revision-excel-panel .revision-file-meta {
  margin-bottom: 10px;
}
.revision-excel-panel .revision-file-name {
  margin: 0 0 4px;
  font-size: 14px;
  word-break: break-word;
}
.revision-excel-panel .revision-file-actions {
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.revision-excel-panel .field span {
  font-size: 12px;
}
.revision-excel-panel .msg {
  margin-top: 8px;
  margin-bottom: 0;
}
.revision-password-form {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.revision-password-hint {
  margin: 0;
  min-height: 1.2em;
}
.revision-password-hint.is-error {
  color: var(--danger);
}
.revision-password-hint.is-ok {
  color: var(--ok);
}
.revision-stock-status {
  margin: 10px 0 0;
}
.revision-stock-panel {
  min-width: 0;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.revision-stock-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
}
.revision-stock-head h2 {
  margin: 0;
  font-size: 16px;
}
.revision-stock-head .hint {
  margin: 0;
  flex: 1 1 220px;
}
.revision-stock-wrap {
  overflow: auto;
  max-height: min(70vh, 820px);
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}
.revision-stock-table {
  width: max-content;
  min-width: 100%;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
}
.revision-stock-table th,
.revision-stock-table td {
  border-bottom: 1px solid var(--line);
  border-right: 1px solid #eee7d8;
  padding: 6px 8px;
  text-align: left;
  vertical-align: top;
  white-space: nowrap;
  overflow: hidden;
  position: relative;
}
.revision-stock-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #fff8e1;
  font-weight: 700;
}
.revision-cell {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.revision-stock-table tbody tr.revision-data-row {
  cursor: pointer;
}
.revision-stock-table tbody tr.revision-data-row:hover td {
  background: #fff6d1;
}
.revision-stock-table tbody tr.revision-data-row.is-selected td {
  background: #ffe082;
}
.revision-stock-table tbody tr.revision-data-row.is-selected:hover td {
  background: #ffd54f;
}
.revision-stock-table tfoot td {
  position: sticky;
  bottom: 0;
  background: #fff3c4;
  font-weight: 650;
}
.revision-stock-table td.num {
  text-align: right;
}
.revision-stock-table th:nth-child(4) .revision-th-title {
  text-align: right;
}
.revision-th {
  min-width: 0;
}
.revision-th.is-active {
  background: #ffe8a3;
}
.revision-th-row {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  padding-right: 6px;
}
.revision-col-resizer {
  position: absolute;
  top: 0;
  right: -3px;
  width: 8px;
  height: 100%;
  cursor: col-resize;
  z-index: 3;
  user-select: none;
  touch-action: none;
}
.revision-col-resizer:hover,
body.revision-col-resizing .revision-col-resizer {
  background: rgba(0, 0, 0, 0.08);
}
body.revision-col-resizing {
  cursor: col-resize !important;
  user-select: none !important;
}
body.revision-col-resizing iframe,
body.revision-col-resizing * {
  cursor: col-resize !important;
}
.revision-th-title {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 700;
}
.revision-filter-btn {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  line-height: 1;
  padding: 0;
  font-size: 12px;
}
.revision-filter-btn:hover,
.revision-filter-btn.is-filtered {
  background: var(--accent);
  border-color: transparent;
}
.revision-filter-pop {
  position: fixed;
  z-index: 80;
  width: 280px;
  max-height: min(420px, calc(100vh - 16px));
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.14);
}
.revision-filter-sort {
  border: 0;
  background: transparent;
  text-align: left;
  padding: 8px 10px;
  border-radius: 8px;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  color: var(--ink);
}
.revision-filter-sort:hover {
  background: #fff3c4;
}
.revision-filter-sep {
  height: 1px;
  background: var(--line);
  margin: 2px 0;
}
.revision-filter-search {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 9px;
  font: inherit;
  font-size: 13px;
}
.revision-filter-all {
  padding: 2px 4px;
}
.revision-filter-list {
  overflow: auto;
  min-height: 120px;
  max-height: 220px;
  border: 1px solid #eee7d8;
  border-radius: 8px;
  padding: 4px;
  background: #fffdf7;
}
.revision-filter-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 6px;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
  min-width: 0;
}
.revision-filter-item:hover {
  background: #fff3c4;
}
.revision-filter-item span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.revision-filter-item input {
  flex: 0 0 auto;
}
.revision-filter-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 2px;
}
.layout.admin-lk-hub {
  max-width: 720px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
}
.layout.tablets-hub {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.layout.crm-hub {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 720px;
}
.layout.crm-hub-solo {
  grid-template-columns: 1fr;
}
.layout.admin-tablet {
  max-width: 960px;
  grid-template-columns: 1fr;
  align-items: start;
}
.lk-hub-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: 100%;
  padding: 28px 16px;
  font-size: 18px;
  border-radius: 16px;
}
.promo-slot {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  max-height: 33vh;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.promo-preview {
  flex: 0 0 auto;
  min-height: 120px;
  max-height: 18vh;
  background: #17140c;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 10px 0 14px;
}
.promo-preview img {
  display: block;
  width: 100%;
  height: 100%;
  max-height: 18vh;
  object-fit: contain;
}
.promo-empty {
  margin: 0;
  padding: 24px 16px;
  color: rgba(255, 253, 249, 0.55);
  text-align: center;
}
.promo-form .actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.promo-slot.is-catalog {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
  min-height: 0;
  max-height: none;
  overflow: visible;
  background: none;
  border: 0;
  padding: 0;
  box-shadow: none;
  border-radius: 0;
}
.promo-compose {
  flex: none;
  min-height: 0;
  max-height: 33vh;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.promo-published {
  flex: none;
  max-height: none;
  overflow: visible;
}
.promo-prices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.promo-stores .promo-store-opts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
}
.promo-store-opts label {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  font-weight: 650;
  cursor: pointer;
  user-select: none;
}
.promo-store-opts input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 0;
  padding: 0;
  border-radius: 4px;
  flex: none;
  accent-color: var(--accent);
  cursor: pointer;
}
.promo-catalog {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 4px;
}
.promo-item {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px;
  background: var(--surface);
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  align-items: start;
  min-width: 0;
}
.promo-item.is-editing {
  grid-column: 1 / -1;
  grid-template-columns: 88px minmax(0, 1fr);
}
.promo-item.is-editing .promo-item-view { display: none; }
.promo-item-view {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.promo-item-view .promo-item-title {
  margin: 0;
  font-size: 13px;
  font-weight: 800;
  overflow-wrap: anywhere;
}
.promo-item-line {
  margin: 0;
  font-size: 11px;
  color: var(--ink);
  overflow-wrap: anywhere;
}
.promo-item-line span {
  color: var(--muted);
  font-weight: 650;
}
.promo-item-view .promo-prices {
  margin-top: 4px;
}
.promo-item-view .actions {
  margin-top: 6px;
}
.promo-item-view .actions .btn {
  padding: 6px 8px;
  font-size: 12px;
}
.promo-item .old {
  color: var(--muted);
  font-size: 11px;
  text-decoration: line-through;
}
.promo-item .new {
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
}
.promo-item-form[hidden] { display: none !important; }
.promo-item-photo {
  position: relative;
  width: 100%;
  max-width: 96px;
  aspect-ratio: 3 / 4;
  border-radius: 8px;
  overflow: hidden;
  background: #17140c;
  justify-self: start;
}
.promo-item.is-editing .promo-item-photo {
  max-width: 88px;
}
.promo-item-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.promo-slot[data-kind="banner"] .promo-catalog {
  grid-template-columns: 1fr;
  gap: 12px;
}
.promo-slot[data-kind="banner"] .promo-item-photo {
  max-width: none;
  width: 100%;
  aspect-ratio: 3 / 1;
  background: #111;
  border-radius: 12px;
  justify-self: stretch;
}
.promo-slot[data-kind="banner"] .promo-item-photo img {
  object-fit: contain;
}
.admin-create {
  min-width: 0;
  max-width: 100%;
}
.admin-create-form {
  display: flex;
  gap: 10px;
  align-items: end;
  flex-wrap: wrap;
}
.admin-create-form .field {
  flex: 1 1 240px;
  min-width: 0;
}
.admin-create-form .btn {
  flex: 0 0 auto;
  white-space: nowrap;
  min-height: 46px;
}
.admin-messages {
  min-width: 0;
  max-width: 100%;
}
.admin-messages:not(.is-collapsed) .chat-layout {
  min-height: min(52vh, 480px);
  max-height: min(70vh, 640px);
  margin-top: 0;
  overflow: hidden;
  grid-template-rows: minmax(0, 1fr);
}
.admin-messages:not(.is-collapsed) .chat-threads,
.admin-messages:not(.is-collapsed) .chat-main {
  min-height: 0;
  max-height: none;
  height: 100%;
  overflow: hidden;
}
.admin-messages:not(.is-collapsed) .chat-threads {
  overflow: auto;
}
.admin-messages:not(.is-collapsed) .chat-main {
  grid-template-rows: auto minmax(0, 1fr) auto;
}
.admin-messages:not(.is-collapsed) .chat-messages {
  min-height: 0;
  overflow: auto;
}
.admin-messages.is-collapsed.has-unread .badge-unread {
  min-width: 1.55em;
  height: 1.55em;
}
.admin-cards-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.admin-cards-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.admin-cards:not(.is-collapsed) .admin-cards-head {
  margin-bottom: 12px;
}
.admin-cards.is-collapsed .admin-cards-body {
  display: none;
}
.admin-cards-search {
  max-width: 280px;
  margin: 0 0 10px;
}
.admin-cards:not(.is-collapsed) .table-wrap {
  max-height: min(70vh, 640px);
}
.admin-sales {
  min-width: 0;
  max-width: 100%;
}
.admin-sales .admin-cards-body {
  min-width: 0;
  max-width: 100%;
}
.admin-sales .table-wrap,
.admin-sales:not(.is-collapsed) .table-wrap {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  overflow-y: auto;
  max-height: min(70vh, 720px);
}
.visit-panel .admin-cards-head {
  margin-bottom: 12px;
}
.visit-filters {
  align-items: end;
}
.visit-group.is-on {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--ink);
  font-weight: 700;
}
.visit-year-wrap {
  min-width: 110px;
  margin: 0;
}
.visit-year-wrap select {
  padding: 7px 10px;
  font-size: 14px;
}
.visit-card-sort {
  min-width: 220px;
  margin: 0;
}
.visit-card-sort select {
  padding: 7px 10px;
  font-size: 14px;
}
.visit-cards-only {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  font-size: 13px;
  font-weight: 650;
  white-space: nowrap;
}
.visit-cards-only input {
  width: 16px;
  height: 16px;
}
.visit-chat-modal {
  width: min(560px, 100%);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.visit-chat-modal .chat-main {
  min-height: min(52vh, 480px);
  max-height: min(64vh, 560px);
  height: min(64vh, 560px);
  grid-template-rows: auto minmax(0, 1fr) auto;
}
.visit-chat-modal .chat-messages {
  min-height: 0;
  overflow: auto;
}
.visit-coupon-count-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.visit-active-coupons {
  min-width: 1.25em;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.visit-active-coupons.is-zero {
  color: var(--muted);
  font-weight: 650;
}
.visit-coupons-list {
  display: grid;
  gap: 8px;
  max-height: min(60vh, 480px);
  overflow: auto;
  margin-top: 8px;
}
.visit-coupon-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}
.visit-coupon-main {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.visit-coupon-main strong {
  font-size: 15px;
}
.visit-coupon-main .hint {
  margin: 0;
}
.visit-summary {
  margin: 0 0 12px;
  font-weight: 650;
}
.visit-chart-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}
.visit-chart {
  display: block;
  width: 100%;
  min-width: 560px;
  height: 280px;
}
.visit-chart .visit-grid line {
  stroke: var(--line);
  stroke-width: 1;
}
.visit-chart .visit-axis {
  stroke: var(--line);
  stroke-width: 1;
}
.visit-chart .visit-y,
.visit-chart .visit-x {
  fill: var(--muted);
  font-size: 11px;
}
.visit-chart .visit-y {
  text-anchor: end;
}
.visit-chart .visit-x {
  text-anchor: middle;
}
.visit-chart .visit-bar {
  fill: var(--accent);
  stroke: #17140c;
  stroke-width: 1;
}
.staff-page .visit-chart-wrap {
  background: #fff;
  border-color: var(--line);
}
table.sales-table {
  width: max-content;
  min-width: 100%;
  font-size: 13px;
}
table.sales-table th,
table.sales-table td {
  padding: 8px 10px;
  white-space: nowrap;
  vertical-align: top;
}
table.sales-table th {
  position: sticky;
  top: 0;
  z-index: 3;
  text-transform: none;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0;
  background: var(--paper);
  box-shadow: 0 1px 0 var(--line);
}
table.sales-table td.sales-wrap {
  white-space: normal;
  min-width: 160px;
  max-width: 280px;
}
table.sales-table tr.is-cancelled td {
  opacity: 0.55;
}
.sales-th {
  display: flex;
  align-items: center;
  gap: 4px;
}
.sales-filter-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  flex: 0 0 auto;
}
.sales-filter-btn:hover,
.sales-filter-btn.is-open {
  background: #fff;
  border-color: var(--line);
  color: var(--ink);
}
.sales-filter-btn.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--ink);
}
.sales-filter-btn svg {
  display: block;
}
.sales-filter-pop {
  position: fixed;
  z-index: 80;
  width: min(260px, calc(100vw - 24px));
  max-height: min(360px, 70vh);
  display: flex;
  flex-direction: column;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(17, 17, 17, 0.16);
}
.sales-filter-pop.hidden { display: none; }
.sales-filter-pop input[type="search"] {
  width: 100%;
  margin: 0 0 8px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  font-size: 13px;
}
.sales-filter-all {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 650;
}
.sales-filter-list {
  overflow: auto;
  min-height: 80px;
  max-height: 220px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  padding: 4px 0;
}
.sales-filter-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 4px 8px;
  font-size: 13px;
  line-height: 1.3;
}
.sales-filter-item input {
  margin-top: 2px;
  flex: 0 0 auto;
}
.sales-filter-item span {
  word-break: break-word;
}
.sales-filter-empty {
  padding: 10px 8px;
  color: var(--muted);
  font-size: 12px;
}
.sales-filter-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 8px;
}
.badge-unread {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.4em;
  height: 1.4em;
  padding: 0 6px;
  margin-left: 6px;
  border-radius: 999px;
  background: var(--danger);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  vertical-align: middle;
}
.badge-unread.hidden { display: none !important; }
.chat-layout {
  display: grid;
  grid-template-columns: minmax(180px, 240px) 1fr;
  gap: 12px;
  margin-top: 12px;
  min-height: 320px;
}
.chat-threads {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fffdf9;
  overflow: auto;
  max-height: 420px;
}
.chat-thread {
  width: 100%;
  text-align: left;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  padding: 10px 12px;
  cursor: pointer;
  font: inherit;
}
.chat-thread:hover { background: #f3f8f4; }
.chat-thread.active { background: rgba(31, 107, 74, 0.12); }
.chat-thread .t-name { font-weight: 650; display: block; }
.chat-thread .t-preview {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}
.chat-main {
  display: grid;
  grid-template-rows: auto 1fr auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fffdf9;
  min-height: 320px;
  max-height: 420px;
}
.chat-head {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  font-weight: 650;
  font-size: 14px;
  cursor: pointer;
}
.chat-messages {
  overflow: auto;
  padding: 12px;
  display: grid;
  gap: 8px;
  align-content: start;
}
.chat-bubble {
  max-width: 85%;
  padding: 8px 10px 6px 12px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.35;
  white-space: pre-wrap;
  word-break: break-word;
  display: grid;
  gap: 4px;
}
.chat-bubble.admin {
  justify-self: start;
  background: #eef3ef;
  border: 1px solid var(--line);
}
.chat-bubble.customer {
  justify-self: end;
  background: rgba(31, 107, 74, 0.14);
  border: 1px solid rgba(31, 107, 74, 0.22);
}
.chat-date {
  justify-self: center;
  margin: 4px 0;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 650;
  color: var(--muted);
  background: var(--panel-strong);
  border: 1px solid var(--line);
  border-radius: 999px;
  line-height: 1.3;
}
.chat-bubble-text {
  min-width: 0;
}
.chat-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  color: var(--muted);
  line-height: 1;
}
.chat-meta-end {
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 4px;
}
.chat-meta.has-actions {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  column-gap: 4px;
  min-width: 8.75rem;
}
.chat-meta.has-actions [data-msg-edit],
.chat-meta.has-actions .chat-own-spacer {
  justify-self: start;
}
.chat-meta.has-actions [data-msg-del] {
  justify-self: center;
}
.chat-meta.has-actions .chat-meta-end {
  justify-self: end;
}
.chat-meta time {
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}
.chat-ticks {
  display: inline-flex;
  color: var(--muted);
}
.chat-ticks svg {
  width: 16px;
  height: 10px;
  display: block;
}
.chat-ticks .tick-2 {
  opacity: 0.28;
}
.chat-ticks.is-read {
  color: var(--ink);
}
.chat-own-btn {
  margin: 0;
  padding: 2px;
  border: 0;
  background: none;
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  cursor: pointer;
}
.chat-own-btn svg {
  width: 15px;
  height: 15px;
  display: block;
}
.chat-own-btn:hover {
  color: var(--ink);
}
.chat-own-spacer {
  width: 22px;
  height: 22px;
  display: inline-block;
}
.chat-edited {
  font-size: 11px;
  color: var(--muted);
}
.chat-bubble.is-deleted .chat-bubble-text {
  color: var(--muted);
  font-style: italic;
}
.chat-ticks.is-read .tick-2 {
  opacity: 1;
}
.chat-compose {
  display: flex;
  gap: 8px;
  padding: 10px;
  border-top: 1px solid var(--line);
  min-width: 0;
  box-sizing: border-box;
}
.chat-compose input {
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  font: inherit;
  font-size: 16px;
  background: var(--panel-strong);
  box-sizing: border-box;
}
.chat-compose .btn {
  flex: 0 0 auto;
  white-space: nowrap;
}
.cabinet-compose {
  padding: 0;
  border-top: 0;
  flex-direction: column;
  align-items: stretch;
}
.cabinet-compose .btn {
  width: 100%;
}
.cabinet-chat-messages {
  min-height: 180px;
  max-height: 280px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fffdf9;
  margin-bottom: 10px;
}
@media (max-width: 1100px) {
  .layout.admin-lk { grid-template-columns: 1fr; }
  .promo-slot,
  .promo-compose {
    max-height: none;
    overflow: visible;
    overscroll-behavior: auto;
  }
}
@media (max-width: 900px) {
  .layout.two, .layout.admin, .layout.admin-lk, .layout.admin-lk-hub, .layout.admin-tablet { grid-template-columns: 1fr; }
  .admin-create-form .btn { width: 100%; }
  .chat-layout { grid-template-columns: 1fr; }
  .meta { grid-template-columns: 1fr; }
  .row { flex-direction: column; align-items: stretch; }
  .chat-compose:not(.cabinet-compose) {
    flex-wrap: wrap;
  }
  .chat-compose:not(.cabinet-compose) input {
    flex: 1 1 100%;
  }
  .chat-compose:not(.cabinet-compose) .btn {
    width: 100%;
  }
}

/* Жёлтая корпоративная тема: ЛК, админка и касса. */
html:has(body.staff-page),
body.staff-page {
  background: #f3edd8;
}
html:has(body.cabinet-page:not(.staff-page)),
body.cabinet-page:not(.staff-page) {
  background: #fff;
}
body.cabinet-page,
body.staff-page {
  --ink: #17140c;
  --muted: #6e6758;
  --line: #e4dcc4;
  --paper: #f3edd8;
  --surface: #fffcf4;
  --accent: #fdd706;
  --accent-deep: #17140c;
  --ok: #2f6a28;
  --shadow: none;
  color: var(--ink);
}
body.cabinet-page:not(.staff-page) {
  --ink: #1a1a1c;
  --muted: #8a8a93;
  --line: #ececef;
  --paper: #f6f6f8;
  --surface: #ffffff;
}
.staff-page .bg {
  background: #f3edd8;
}
.cabinet-page:not(.staff-page) .bg {
  background: #fff;
}
.cabinet-page .cabinet {
  width: 100%;
  max-width: 430px;
  padding: calc(14px + env(safe-area-inset-top, 0px)) 16px 12px;
}
.cabinet-page:has(.cab-tabs) .cabinet {
  padding-bottom: 8px;
}
.cabinet-page:has(.cab-tabs) .site-footer {
  padding-bottom: calc(88px + env(safe-area-inset-bottom, 0px));
}
body.cab-screen-open,
body.cab-banner-zoom-open {
  overflow: hidden;
}
.cabinet-page .cab-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}
.cabinet-page .cab-mark {
  display: inline-block;
  background: var(--accent);
  color: var(--ink);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 6px 10px;
  border-radius: 8px;
}
.cabinet-page .cab-logout { margin: 0; }
.cabinet-page .cab-text-btn {
  border: 0;
  background: none;
  padding: 6px 0;
  font: inherit;
  font-size: 14px;
  color: var(--muted);
  cursor: pointer;
}
.cabinet-page .cab-who { margin: 0 0 16px; }
.cabinet-page .cab-who h1,
.cabinet-page .cab-who-title {
  margin: 0;
  font-family: var(--font);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
}
.cabinet-page .cab-who p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}
.cabinet-page .cab-card {
  background: var(--accent);
  color: var(--ink);
  border-radius: 20px;
  padding: 18px 18px 16px;
  margin-bottom: 4px;
}
.cabinet-page .cab-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(23, 20, 12, 0.62);
}
.cabinet-page .cab-card-brand {
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--ink);
}
.cabinet-page .cab-card .big {
  font-size: 52px;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  margin: 8px 0 2px;
}
.cabinet-page .cab-card .unit {
  font-size: 14px;
  font-weight: 650;
}
.cabinet-page .cab-card.is-negative .big { color: var(--danger); }
.cabinet-page .cab-month-frame {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  background: #111;
  margin-top: 14px;
  margin-bottom: 4px;
  cursor: zoom-in;
}
.cabinet-page .cab-month-track {
  display: flex;
  height: 100%;
  width: 100%;
  transition: transform 0.35s ease;
}
.cabinet-page .cab-month-track.is-jumping {
  transition: none;
}
.cabinet-page .cab-month-frame img,
.cabinet-page .cab-month-track img {
  display: block;
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #111;
  pointer-events: none;
}
.cabinet-page .cab-month-nav {
  position: absolute;
  top: 50%;
  z-index: 2;
  width: 36px;
  height: 36px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--accent);
  color: var(--ink);
  font-size: 22px;
  font-weight: 800;
  line-height: 1;
  transform: translateY(-50%);
  cursor: pointer;
}
.cabinet-page .cab-month-nav.prev { left: 8px; }
.cabinet-page .cab-month-nav.next { right: 8px; }
.cabinet-page .cab-banner-zoom {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  background: #000;
}
.cabinet-page .cab-banner-zoom[hidden] {
  display: none !important;
}
.cabinet-page .cab-banner-zoom-stage {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: none;
}
.cabinet-page .cab-banner-zoom-stage img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  transform-origin: 0 0;
  user-select: none;
  -webkit-user-select: none;
  pointer-events: none;
}
.cabinet-page .cab-month-frame .cab-empty-screen {
  margin: 0;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--paper);
}
.cabinet-page .cab-month-frame .cab-empty-screen[hidden] {
  display: none !important;
}
.cabinet-page .cab-promo-body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 8px 12px 12px;
}
.cabinet-page .cab-catalog {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  align-items: start;
}
.cabinet-page .cab-catalog .cab-empty-screen {
  grid-column: 1 / -1;
}
.cabinet-page .cab-product {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.cabinet-page .cab-product-photo {
  position: relative;
  aspect-ratio: 3 / 4;
  background: #f3f3f5;
  overflow: hidden;
}
.cabinet-page .cab-product-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.cab-reserved-banner {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  z-index: 1;
  margin: 0;
  padding: 7px 8px;
  background: #c62828;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-align: center;
  line-height: 1.2;
}
.cab-product-photo.is-reserved .cab-reserved-banner,
.promo-item-photo.is-reserved .cab-reserved-banner {
  display: block;
}
.cabinet-page .cab-product-name {
  margin: 8px 8px 2px;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.25;
  color: var(--ink);
  overflow-wrap: anywhere;
}
.cabinet-page .cab-product-line {
  margin: 0 8px 2px;
  font-size: 11px;
  font-weight: 650;
  line-height: 1.3;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.cabinet-page .cab-product-desc {
  margin: 8px 8px 4px;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.3;
  color: var(--ink);
  overflow-wrap: anywhere;
}
.cabinet-page .cab-reserve-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: stretch;
  margin: 0 8px 10px;
}
.cabinet-page .cab-reserve-row .cab-reserve-btn {
  margin: 0;
  width: 100%;
  flex: none;
  box-sizing: border-box;
  white-space: nowrap;
  text-align: center;
}
.cabinet-page .cab-reserve-qty {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}
.cabinet-page .cab-reserve-qty[hidden] {
  display: none !important;
}
.cabinet-page .cab-reserve-qty button {
  width: 28px;
  height: 32px;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink);
  font-size: 16px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
}
.cabinet-page .cab-reserve-qty input {
  width: 2.1rem;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  text-align: center;
  font-size: 13px;
  font-weight: 800;
  color: var(--ink);
  -moz-appearance: textfield;
}
.cabinet-page .cab-reserve-qty input::-webkit-outer-spin-button,
.cabinet-page .cab-reserve-qty input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.cabinet-page .cab-reserve-btn {
  margin: 0 8px 10px;
  width: calc(100% - 16px);
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 800;
}
.cabinet-page .cab-reserve-btn:disabled {
  opacity: 0.7;
  cursor: default;
}
.cabinet-page .cab-product-prices {
  margin: auto 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.cabinet-page .cab-product-prices .old {
  color: #5c5c64;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: line-through;
  text-decoration-thickness: 1px;
  text-decoration-color: rgba(26, 26, 28, 0.38);
}
.cabinet-page .cab-product-prices .new {
  color: var(--ink);
  font-size: 16px;
  font-weight: 800;
}
.cabinet-page .cab-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(23, 20, 12, 0.12);
}
.cabinet-page .cab-stats small {
  display: block;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(23, 20, 12, 0.55);
  margin-bottom: 2px;
}
.cabinet-page .cab-stats b {
  font-size: 16px;
  font-weight: 700;
}
.cabinet-page .cab-install {
  display: block;
  width: 100%;
  border: 0;
  background: none;
  padding: 10px 0 16px;
  font: inherit;
  font-size: 13px;
  color: var(--muted);
  text-align: center;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.cabinet-page .cab-install[hidden] { display: none !important; }
.cabinet-page .cab-section {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  margin-bottom: 10px;
  overflow: hidden;
  box-shadow: none;
}
.cabinet-page .cab-form { padding: 16px; }
.cabinet-page .cab-form-note { margin: 14px 0 0; }
.cabinet-page .cab-section-h {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 14px 16px 8px;
  font-family: var(--font);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.cabinet-page .cab-tabs {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 100%;
  max-width: 430px;
  z-index: 25;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0;
  background: #fff;
  border-top: 1px solid var(--line);
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0px));
}
.cabinet-page .cab-tab {
  appearance: none;
  border: 0;
  background: none;
  color: var(--muted);
  font: inherit;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 4px 1px 2px;
  min-width: 0;
  text-decoration: none;
}
.cabinet-page a.cab-tab:visited {
  color: var(--muted);
}
.cabinet-page a.cab-tab > * {
  pointer-events: none;
}
.cabinet-page .cab-tab-ico {
  position: relative;
  width: 36px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
}
.cabinet-page .cab-tab-ico svg {
  width: 24px;
  height: 24px;
  display: block;
}
.cabinet-page .cab-tab-label {
  font-size: 10px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: 0.01em;
  text-align: center;
  max-width: 100%;
}
.cabinet-page .cab-tab.is-active {
  color: var(--ink);
}
.cabinet-page .cab-tab.is-active .cab-tab-ico {
  background: var(--accent);
}
.cabinet-page .cab-tab-coupons {
  color: var(--danger);
}
.cabinet-page .cab-tab-coupons .cab-tab-ico {
  color: var(--danger);
}
.cabinet-page .cab-tab-coupons.is-active {
  color: var(--danger);
}
.cabinet-page .cab-tab-coupons.is-active .cab-tab-ico {
  background: rgba(155, 44, 44, 0.16);
  color: var(--danger);
}
.cabinet-page .cab-coupons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  align-items: stretch;
  padding: 4px 0 8px;
}
.cabinet-page .cab-coupon {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: min(42vh, 280px);
  padding: 12px 10px 10px;
  border-radius: 16px;
  background: var(--accent);
  border: 2px solid #1a1a1a;
  color: #1a1a1a;
  overflow: hidden;
  box-shadow: none;
}
.cabinet-page .cab-coupon::before,
.cabinet-page .cab-coupon::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 14px;
  height: 14px;
  margin-top: -7px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid #1a1a1a;
  z-index: 1;
}
.cabinet-page .cab-coupon::before {
  left: -8px;
}
.cabinet-page .cab-coupon::after {
  right: -8px;
}
.cabinet-page .cab-coupon-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}
.cabinet-page .cab-coupon-brand {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.cabinet-page .cab-coupon-no {
  font-size: 11px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  background: #1a1a1a;
  color: #FDD706;
  padding: 3px 7px;
  border-radius: 999px;
  white-space: nowrap;
}
.cabinet-page .cab-coupon-value {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 6px 0 4px;
  min-height: 0;
}
.cabinet-page .cab-coupon-num {
  display: block;
  font-size: clamp(40px, 14vw, 64px);
  font-weight: 900;
  line-height: 0.9;
  letter-spacing: -0.04em;
  color: #9b2c2c;
}
.cabinet-page .cab-coupon-unit {
  display: block;
  margin-top: 4px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #1a1a1a;
}
.cabinet-page .cab-coupon-meta {
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px dashed rgba(26, 26, 26, 0.35);
}
.cabinet-page .cab-coupon-meta p {
  margin: 0 0 3px;
  font-size: 11px;
  line-height: 1.3;
  font-weight: 650;
}
.cabinet-page .cab-coupon-meta strong {
  font-weight: 900;
}
.cabinet-page .cab-coupon-hint {
  margin-top: 4px !important;
  color: rgba(26, 26, 26, 0.72);
  font-size: 10px !important;
  font-weight: 600 !important;
}
.cabinet-page .cab-coupon[data-value="1000"] .cab-coupon-num {
  font-size: clamp(34px, 12vw, 52px);
}
.cabinet-page .cab-tab-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  margin: 0;
  border-radius: 8px;
  background: var(--danger);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  line-height: 16px;
  text-align: center;
}
.cabinet-page .cab-sheet {
  position: fixed;
  left: 50%;
  top: 0;
  bottom: 0;
  transform: translateX(-50%);
  width: 100%;
  max-width: 430px;
  background: #fff;
  z-index: 20;
  display: flex;
  flex-direction: column;
  padding-bottom: calc(88px + env(safe-area-inset-bottom, 0px));
}
.cabinet-page .cab-sheet[hidden],
.cabinet-page .cab-chat-screen[hidden] {
  display: none !important;
}
.cabinet-page .cab-sheet-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: calc(8px + env(safe-area-inset-top, 0px)) 12px 8px;
  flex: 0 0 auto;
}
.cabinet-page .cab-sheet-bar h2 {
  margin: 0;
  flex: 1;
  font-family: var(--font);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.03em;
}
.cabinet-page .cab-sheet-close,
.cabinet-page .cab-sheet-back {
  border: 0;
  background: none;
  padding: 8px 4px;
  font: inherit;
  font-size: 14px;
  font-weight: 650;
  color: var(--muted);
  cursor: pointer;
}
.cabinet-page .cab-sheet-back { order: -1; }
.cabinet-page .cab-sheet-spacer { width: 48px; flex: 0 0 auto; }
.cabinet-page .cab-empty-screen {
  margin: 24px 16px;
  padding: 28px 16px;
  text-align: center;
  color: var(--muted);
  font-size: 15px;
  background: var(--paper);
  border: 0;
  border-radius: 16px;
}
.cabinet-page .cab-sheet .cab-history {
  flex: 1;
  min-height: 0;
  max-height: none;
  overflow: auto;
  gap: 8px;
  margin: 0 12px 12px;
  background: transparent;
  border: 0;
  border-radius: 0;
}
.cabinet-page .cab-history {
  max-height: 52vh;
  overflow: auto;
  gap: 0;
}
.cabinet-page .cab-history li.cab-tx {
  border: 0;
  border-radius: 14px;
  padding: 0;
  min-width: 0;
}
.cabinet-page .cab-tx-tone-0 {
  background: #fff;
  box-shadow: 0 1px 2px rgba(32, 28, 20, 0.05), 0 4px 10px rgba(32, 28, 20, 0.07);
}
.cabinet-page .cab-tx-tone-1 {
  background: #fff9e6;
  box-shadow: 0 1px 2px rgba(200, 170, 0, 0.10), 0 4px 10px rgba(200, 160, 0, 0.14);
}
.cabinet-page .cab-history li.cab-empty {
  border: 0;
  border-radius: 16px;
  background: var(--paper);
  box-shadow: none;
  padding: 6px 16px 16px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.cabinet-page .cab-sheet .cab-history li:first-child {
  border-top: 0;
}
.cabinet-page .cab-tx summary {
  list-style: none;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 16px;
  cursor: pointer;
}
.cabinet-page .cab-tx summary::-webkit-details-marker { display: none; }
.cabinet-page .cab-tx-main {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 2px;
}
.cabinet-page .cab-tx-main strong {
  font-size: 15px;
  font-weight: 650;
}
.cabinet-page .cab-tx-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1px;
  flex: 0 0 auto;
  text-align: right;
  line-height: 1.2;
}
.cabinet-page .cab-tx-side .earn {
  color: var(--ok);
  font-size: 13px;
  font-weight: 650;
}
.cabinet-page .cab-tx-side .burn {
  color: var(--danger);
  font-size: 13px;
  font-weight: 650;
}
.cabinet-page .cab-tx-side .bal {
  font-size: 18px;
  font-weight: 750;
  margin-top: 3px;
}
.cabinet-page .cab-tx-side .bal.plus { color: var(--ok); }
.cabinet-page .cab-tx-side .bal.minus { color: var(--danger); }
.cabinet-page .cab-tx .when { margin: 0; }
.cabinet-page .cab-tx-detail { padding: 0 16px 14px; }
.cabinet-page .cab-receipt {
  margin: 0 0 10px;
  display: grid;
  gap: 6px;
}
.cabinet-page .cab-receipt div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
}
.cabinet-page .cab-receipt dt {
  margin: 0;
  color: var(--muted);
}
.cabinet-page .cab-receipt dd {
  margin: 0;
  font-weight: 650;
}
.cabinet-page .cab-lines {
  display: grid;
  gap: 8px;
  margin: 0 0 10px;
}
.cabinet-page .cab-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  line-height: 1.35;
}
.cabinet-page .cab-line small {
  display: block;
  color: var(--muted);
  font-size: 11px;
}
.cabinet-page .btn.primary {
  background: var(--accent);
  color: var(--ink);
  box-shadow: none;
}
.cabinet-page .btn.primary:hover,
.cabinet-page .btn.primary:focus-visible {
  background: #f0c500;
}
.cabinet-page .btn.secondary,
.cabinet-page .btn.ghost {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
}
.cabinet-page .field input,
.cabinet-page .field textarea,
.cabinet-page .chat-compose input,
.cabinet-page .phone-input {
  background: #fff;
  border-color: var(--line);
}
.cabinet-page .field input:focus,
.cabinet-page .chat-compose input:focus {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
  border-color: transparent;
}
.cabinet-page .phone-input input:focus {
  outline: none !important;
  box-shadow: none !important;
  border-color: transparent !important;
}
.cabinet-page .phone-input:focus-within {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
  border-color: transparent;
}
.cabinet-page .cabinet-compose {
  flex-direction: row;
  align-items: stretch;
  gap: 8px;
  padding: 10px 12px 12px;
  background: var(--surface);
  border-top: 1px solid var(--line);
  flex: 0 0 auto;
  box-sizing: border-box;
}
.cabinet-page .cabinet-compose .btn {
  width: auto;
  padding-left: 16px;
  padding-right: 16px;
}
.cabinet-page .cabinet-chat-messages {
  background: #fff;
  border: 0;
  border-radius: 0;
  min-height: 0;
  max-height: none;
  flex: 1;
  margin: 0;
}
.cabinet-page .chat-date {
  background: var(--paper);
  border-color: transparent;
}
.cabinet-page .chat-bubble.admin {
  background: var(--paper);
  border-color: transparent;
}
.cabinet-page .chat-bubble.customer {
  background: var(--accent);
  border-color: transparent;
  color: var(--ink);
}
.cabinet-page .chat-bubble.customer .chat-own-btn {
  color: var(--ink);
  opacity: 0.7;
}
.cabinet-page .cab-msg-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 0 12px 8px;
  flex: 0 0 auto;
}
.cabinet-page .cab-msg-tools .hint {
  margin: 0;
  font-size: 12px;
}
.cabinet-page .accordion-body { padding: 0 16px 16px; }
.cabinet-page .home-guide-block,
.cabinet-page .modal {
  background: var(--surface);
  border-color: var(--line);
  box-shadow: none;
}
.cabinet-page .modal-backdrop {
  background: rgba(23, 20, 12, 0.35);
}
.cabinet-page .msg.ok {
  background: #fff3b0;
  color: var(--ink);
}
.cabinet-page .check { color: var(--muted); }
.cabinet-page .home-guide-modal h2 {
  font-family: var(--font);
}

.staff-page .brand-name {
  display: inline-block;
  background: var(--accent);
  color: var(--ink);
  letter-spacing: 0.12em;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 800;
}
.staff-page .brand h1 {
  font-family: var(--font);
  font-weight: 700;
  letter-spacing: -0.03em;
}
.staff-page .nav {
  align-items: center;
  flex-wrap: nowrap;
}
.staff-page .nav a,
.staff-page .nav .cab-text-btn {
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink);
  border-radius: 12px;
  padding: 10px 14px;
  font: inherit;
  font-weight: 650;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  line-height: 1.25;
  white-space: nowrap;
}
.staff-page .nav a.active {
  background: var(--accent);
  color: var(--ink);
  border-color: transparent;
}
.staff-page .nav-user {
  margin: 0;
  padding: 0 2px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.25;
  display: inline-flex;
  align-items: center;
}
.staff-page .cab-logout {
  margin: 0;
  display: flex;
  align-items: center;
}
.staff-page .btn.primary {
  background: var(--accent);
  color: var(--ink);
  box-shadow: none;
}
.staff-page .btn.primary:hover,
.staff-page .btn.primary:focus-visible {
  background: #f0c500;
}
.staff-page .lk-hub-btn {
  min-height: 88px;
  font-weight: 800;
}
.staff-page .btn.danger {
  background: #c0392b;
  color: #fff;
  border: 1px solid #c0392b;
  box-shadow: none;
}
.staff-page .btn.danger:hover,
.staff-page .btn.danger:focus-visible {
  background: #a93226;
  border-color: #a93226;
  color: #fff;
}
.staff-page .btn.secondary,
.staff-page .btn.ghost {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
}
.staff-page .panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: none;
}
.staff-page .panel h2 {
  font-family: var(--font);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.03em;
}
.staff-page .field input,
.staff-page .field textarea,
.staff-page .field select,
.staff-page .chat-compose input {
  background: #fff;
  border-color: var(--line);
}
.staff-page .field input:focus,
.staff-page .field textarea:focus,
.staff-page .chat-compose input:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: transparent;
}
.staff-page .promo-store-opts input[type="checkbox"] {
  width: 18px;
  height: 18px;
  padding: 0;
  background: #fff;
}
.staff-page .stats div {
  background: var(--surface);
  border: 1px solid var(--line);
}
.staff-page table.cards th {
  background: var(--paper);
  color: var(--muted);
}
.staff-page .table-wrap,
.staff-page .chat-threads,
.staff-page .chat-main {
  background: #fff;
  border-color: var(--line);
}
.staff-page .chat-thread:hover {
  background: var(--paper);
}
.staff-page .chat-thread.active {
  background: var(--accent);
}
.staff-page .chat-date {
  background: var(--surface);
}
.staff-page .chat-bubble.admin {
  background: var(--paper);
  border-color: var(--line);
}
.staff-page .chat-bubble.customer {
  background: var(--accent);
  border-color: transparent;
  color: var(--ink);
}
.staff-page .chat-bubble.customer .chat-own-btn {
  color: var(--ink);
  opacity: 0.7;
}
.staff-page .modal {
  background: var(--surface);
  border-color: var(--line);
  box-shadow: none;
}
.staff-page .modal h2 {
  font-family: var(--font);
  font-weight: 700;
  letter-spacing: -0.03em;
}
.staff-page .modal-backdrop {
  background: rgba(23, 20, 12, 0.35);
}
.staff-page .history li {
  background: var(--surface);
  border-color: var(--line);
}
.staff-page .tx-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1px;
  flex: 0 0 auto;
  text-align: right;
  line-height: 1.2;
}
.staff-page .tx-side .earn {
  color: var(--ok);
  font-size: 13px;
  font-weight: 650;
}
.staff-page .tx-side .burn {
  color: var(--danger);
  font-size: 13px;
  font-weight: 650;
}
.staff-page .tx-side .bal {
  font-size: 18px;
  font-weight: 750;
  margin-top: 3px;
}
.staff-page .tx-side .bal.plus { color: var(--ok); }
.staff-page .tx-side .bal.minus { color: var(--danger); }
.staff-page .history .receipt-mini,
.staff-page .receipt {
  background: var(--paper);
  border-color: var(--line);
}
.staff-page .msg.ok {
  background: #fff3b0;
  color: var(--ink);
}
.staff-page .sheet-wrap,
.staff-page .sheet thead th,
.staff-page .sheet .row-head,
.staff-page .sheet .corner {
  background: var(--paper);
}
.staff-page .sheet td.cell:focus {
  outline-color: var(--accent);
  background: #fff8dc;
}
.staff-page .balance {
  background: var(--accent);
  color: var(--ink);
  border-radius: 16px;
}
.staff-page .balance span {
  font-weight: 800;
}
.staff-page .meta div {
  background: var(--surface);
  border-color: var(--line);
}
.staff-page .items-table th {
  background: var(--paper);
}

.site-footer {
  width: 100%;
  padding: 18px 16px calc(14px + env(safe-area-inset-bottom, 0px));
  text-align: center;
}
.site-footer p {
  margin: 0;
  font-size: 11px;
  line-height: 1.4;
  letter-spacing: 0.02em;
  color: var(--muted);
}

/* —— Тест подбора добавок (квиз на главной) —— */
.cabinet-page .cab-quiz-entry {
  margin: 10px 0 0;
  padding: 10px 12px;
  border-radius: 14px;
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--line);
}
.cabinet-page .cab-quiz-entry-title {
  margin: 0;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
  max-width: 100%;
}
.cabinet-page .cab-quiz-entry-text {
  margin: 2px 0 6px;
  font-size: 12px;
  line-height: 1.25;
  font-weight: 600;
  color: var(--muted);
  white-space: normal;
  overflow: visible;
  overflow-wrap: break-word;
  max-width: 100%;
}
.cabinet-page .cab-quiz-entry-actions {
  display: flex;
  gap: 6px;
}
.cabinet-page .cab-quiz-entry-actions .btn {
  flex: 1;
  padding: 8px 10px;
  font-size: 13px;
}
.cabinet-page .cab-quiz-entry .btn.primary {
  background: var(--accent);
  color: var(--ink);
}
.cabinet-page .cab-quiz-entry .btn.primary:hover,
.cabinet-page .cab-quiz-entry .btn.primary:focus-visible {
  background: #f0c500;
  color: var(--ink);
}
.cabinet-page .cab-quiz-entry .btn.ghost {
  background: #fff;
  border-color: var(--line);
  color: var(--ink);
}

.cabinet-page .cab-quiz-sheet .cab-quiz {
  padding: 0 16px 24px;
  display: grid;
  gap: 12px;
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}
.cabinet-page .cab-quiz-screen {
  display: grid;
  gap: 12px;
}
.cabinet-page .cab-quiz-who h3 {
  margin: 0;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.03em;
}
.cabinet-page .cab-quiz-who p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}
.cabinet-page .cab-quiz-panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 16px;
}
.cabinet-page .cab-quiz-lead {
  margin: 0 0 12px;
  font-size: 15px;
  line-height: 1.5;
  font-weight: 600;
}
.cabinet-page .cab-quiz-disclaimer {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}
.cabinet-page .cab-quiz-result-actions {
  display: grid;
  gap: 8px;
}
.cabinet-page .cab-quiz-result-actions .btn.ghost {
  background: #fff;
  border-color: var(--line);
  color: var(--ink);
}
.cabinet-page .cab-quiz-stage {
  background: var(--accent);
  color: var(--ink);
  border-radius: 20px;
  padding: 16px 16px 14px;
}
.cabinet-page .cab-quiz-stage-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(23, 20, 12, 0.62);
}
.cabinet-page .cab-quiz-stage-brand {
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--ink);
}
.cabinet-page .cab-quiz-stage-name {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.1;
  margin: 8px 0 4px;
}
.cabinet-page .cab-quiz-stage-meta {
  font-size: 13px;
  font-weight: 650;
  color: rgba(23, 20, 12, 0.72);
}
.cabinet-page .cab-quiz-progress {
  height: 10px;
  border-radius: 999px;
  background: rgba(23, 20, 12, 0.12);
  overflow: hidden;
  margin-top: 12px;
}
.cabinet-page .cab-quiz-progress > i {
  display: block;
  height: 100%;
  width: 0%;
  background: var(--ink);
  border-radius: inherit;
  transition: width 0.45s ease;
}
.cabinet-page .cab-quiz-panel-steps {
  display: grid;
  gap: 12px;
}
.cabinet-page .cab-quiz-question {
  margin: 0;
  font-size: 18px;
  line-height: 1.35;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.cabinet-page .cab-quiz-options {
  display: grid;
  gap: 8px;
}
.cabinet-page .cab-quiz-option {
  appearance: none;
  width: 100%;
  text-align: left;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: inherit;
  padding: 12px 14px;
  cursor: pointer;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
}
.cabinet-page .cab-quiz-option:hover,
.cabinet-page .cab-quiz-option:focus-visible,
.cabinet-page .cab-quiz-option.selected {
  border-color: #e6c900;
  background: #fffceb;
  outline: none;
}
.cabinet-page .cab-quiz-field {
  display: grid;
  gap: 8px;
}
.cabinet-page .cab-quiz-field-label {
  font-size: 13px;
  font-weight: 650;
  color: var(--muted);
}
.cabinet-page .cab-quiz-field input {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: 12px;
  padding: 12px 14px;
  font: inherit;
  font-size: 18px;
  font-weight: 700;
}
.cabinet-page .cab-quiz-field input:focus {
  outline: none;
  border-color: #e6c900;
  background: #fffceb;
}
.cabinet-page .cab-quiz-error {
  margin: 0;
  color: var(--danger);
  font-size: 13px;
  font-weight: 650;
}
.cabinet-page .cab-quiz-nav {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}
.cabinet-page .cab-quiz-nav .btn.primary {
  flex: 1;
}
.cabinet-page .cab-quiz-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}
.cabinet-page .cab-quiz-chip {
  background: rgba(23, 20, 12, 0.1);
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 999px;
}
.cabinet-page .cab-quiz-hints {
  display: grid;
  gap: 8px;
}
.cabinet-page .cab-quiz-hint {
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: 16px;
  padding: 12px 14px;
  font-size: 13px;
  line-height: 1.45;
  font-weight: 600;
  margin: 0;
}
.cabinet-page .cab-quiz-cards {
  display: grid;
  gap: 10px;
}
.cabinet-page .cab-quiz-rec {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 20px;
  padding: 16px;
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 12px;
  align-items: start;
}
.cabinet-page .cab-quiz-rank {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--paper);
  color: var(--ink);
  font-size: 15px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
  padding: 0;
  box-sizing: border-box;
  text-align: center;
}
.cabinet-page .cab-quiz-rank span {
  display: block;
  line-height: 1;
  transform: translateY(-1px);
}
.cabinet-page .cab-quiz-rank.top {
  background: var(--accent);
}
.cabinet-page .cab-quiz-rec-body {
  display: grid;
  gap: 8px;
  min-width: 0;
}
.cabinet-page .cab-quiz-kicker {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.cabinet-page .cab-quiz-rec.core .cab-quiz-kicker {
  color: var(--ink);
}
.cabinet-page .cab-quiz-rec-body h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.03em;
}
.cabinet-page .cab-quiz-label {
  margin: 6px 0 0;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.cabinet-page .cab-quiz-problem {
  padding: 12px 12px 10px;
  border-radius: 12px;
  background: #fffceb;
  border: 1px solid rgba(230, 201, 0, 0.45);
}
.cabinet-page .cab-quiz-problem-text,
.cabinet-page .cab-quiz-about,
.cabinet-page .cab-quiz-why,
.cabinet-page .cab-quiz-note {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
}
.cabinet-page .cab-quiz-problem-text {
  font-weight: 650;
}
.cabinet-page .cab-quiz-examples {
  margin: 0;
  padding-left: 18px;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.45;
}
.cabinet-page .cab-quiz-caution {
  margin: 0;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(155, 44, 44, 0.22);
  background: rgba(155, 44, 44, 0.06);
  color: var(--danger);
  font-size: 13px;
  line-height: 1.45;
  font-weight: 650;
}
.cabinet-page .cab-quiz-lifestyle {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 20px;
  padding: 16px;
  display: grid;
  gap: 8px;
}
.cabinet-page .cab-quiz-lifestyle:empty {
  display: none;
}
.cabinet-page .cab-quiz-lifestyle h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.03em;
}
.cabinet-page .cab-quiz-lifestyle-lead,
.cabinet-page .cab-quiz-lifestyle-text {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
}
.cabinet-page .cab-quiz-lifestyle-lead {
  color: var(--muted);
  font-weight: 650;
}
.cabinet-page .cab-quiz-toast {
  position: fixed;
  left: 50%;
  bottom: calc(88px + env(safe-area-inset-bottom, 0px));
  transform: translate(-50%, calc(100% + 32px));
  background: var(--ink);
  color: #fff;
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  transition: transform 0.25s ease, opacity 0.2s ease, visibility 0.2s ease;
  z-index: 40;
  max-width: calc(100% - 32px);
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
}
.cabinet-page .cab-quiz-toast.show {
  transform: translate(-50%, 0);
  opacity: 1;
  visibility: visible;
}

.tablet-page .site-footer {
  display: none;
}
.tablet-page .tablet-kiosk {
  position: relative;
  width: 100%;
  max-width: none;
  height: 100vh;
  height: 100dvh;
  min-height: 100vh;
  min-height: 100dvh;
  display: block;
  padding: 0;
  gap: 0;
  overflow: hidden;
  background: #000;
}
.tablet-page .tablet-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 5;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
  padding: calc(12px + env(safe-area-inset-top, 0px)) 16px 12px;
  background: linear-gradient(to bottom, rgba(0,0,0,0.45), rgba(0,0,0,0));
  color: #fff;
}
.tablet-page .tablet-bar .cab-mark,
.tablet-page .tablet-bar .tablet-store {
  color: #fff;
}
.tablet-page .tablet-bar-who {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.tablet-page .tablet-lk-open {
  flex: 0 0 auto;
  padding: 18px 22px;
  font-size: 22px;
  font-weight: 800;
  min-height: 64px;
  border-radius: 14px;
}
.tablet-page .tablet-store {
  font-weight: 800;
  font-size: 16px;
}
.tablet-page .tablet-month-frame {
  position: absolute;
  inset: 0;
  z-index: 1;
  flex: none;
  min-height: 0;
  height: 100%;
  width: 100%;
  margin: 0;
  border-radius: 0;
  background: #000;
}
.tablet-page .tablet-month-frame .cab-month-track {
  height: 100%;
  width: 100%;
}
.tablet-page .tablet-month-frame .cab-month-track img,
.tablet-page .tablet-month-frame img {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  object-fit: cover !important;
  object-position: center center;
  background: #000;
}
/* Планшет: баннер на весь экран без чёрных полей */
.tablet-page .cab-banner-zoom-stage {
  position: absolute;
  inset: 0;
  display: block;
}
.tablet-page .cab-banner-zoom-stage > img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  object-fit: cover !important;
  object-position: center center;
  transform-origin: center center;
  opacity: 1;
  user-select: none;
  -webkit-user-select: none;
  pointer-events: none;
}
.tablet-page .tablet-quiz-entry {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  z-index: 5;
  flex: 0 0 auto;
  margin: 0;
  padding: 16px 18px 18px;
  background: rgba(255, 255, 255, 0.92);
  border-radius: 16px;
}
.tablet-page .tablet-quiz-entry .cab-quiz-entry-title {
  font-size: 22px;
}
.tablet-page .tablet-quiz-entry .cab-quiz-entry-text {
  margin: 4px 0 14px;
  font-size: 15px;
}
.tablet-page .tablet-quiz-entry .cab-quiz-entry-actions .btn {
  padding: 18px 22px;
  font-size: 22px;
  font-weight: 800;
  min-height: 64px;
  border-radius: 14px;
}
.tablet-page .cab-quiz-sheet .cab-quiz:has(#cab-quiz-steps.is-number:not(.hidden)) {
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.tablet-page #cab-quiz-steps.is-number {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 1fr);
  grid-template-rows: auto minmax(0, 1fr);
  grid-template-areas:
    "stage pad"
    "panel pad";
  gap: 16px;
  align-items: stretch;
}
.tablet-page #cab-quiz-steps.is-number .cab-quiz-stage {
  grid-area: stage;
  margin: 0;
}
.tablet-page #cab-quiz-steps.is-number .cab-quiz-panel-steps {
  grid-area: panel;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.tablet-page #cab-quiz-steps.is-number .cab-quiz-question {
  font-size: 22px;
}
.tablet-page #cab-quiz-steps.is-number .cab-quiz-nav {
  margin-top: auto;
}
.tablet-page .cab-quiz-field input {
  pointer-events: none;
  caret-color: transparent;
  max-width: none;
  min-height: 72px;
  font-size: 42px;
  text-align: center;
}
.tablet-page .cab-quiz-numpad {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: repeat(4, minmax(0, 1fr));
  gap: 12px;
  width: auto;
  height: auto;
  min-height: 0;
  margin: 0;
}
.tablet-page #cab-quiz-steps.is-number .cab-quiz-numpad {
  grid-area: pad;
  align-self: stretch;
}
.tablet-page .cab-quiz-numpad[hidden] {
  display: none !important;
}
.tablet-page .cab-quiz-numpad button {
  width: auto;
  height: auto;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 16px;
  background: var(--accent);
  color: var(--ink);
  font: inherit;
  font-size: clamp(28px, 4.6vh, 44px);
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
}
.tablet-page .cab-quiz-numpad button[data-num="back"] {
  background: var(--paper);
  font-size: clamp(24px, 3.6vh, 34px);
}
.tablet-page .cab-quiz-numpad:not(.has-decimal) .cab-quiz-numpad-dot {
  visibility: hidden;
  pointer-events: none;
}
@media (max-width: 900px) and (orientation: portrait) {
  .tablet-page #cab-quiz-steps.is-number {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto minmax(220px, 1fr);
    grid-template-areas:
      "stage"
      "panel"
      "pad";
  }
}
.tablet-page .cab-sheet {
  max-width: none;
  z-index: 55;
  padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
}
.tablet-page .tablet-zoom-quiz {
  position: absolute;
  top: calc(10px + env(safe-area-inset-top, 0px));
  left: 12px;
  z-index: 3;
  margin: 0;
  border: 0;
  border-radius: 14px;
  padding: 14px 20px;
  background: var(--accent);
  color: var(--ink);
  font: inherit;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.2;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}
.tablet-page .tablet-zoom-lk {
  position: absolute;
  top: calc(10px + env(safe-area-inset-top, 0px));
  right: 12px;
  left: auto;
  z-index: 3;
  margin: 0;
  border: 0;
  border-radius: 14px;
  padding: 14px 20px;
  background: var(--accent);
  color: var(--ink);
  font: inherit;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.2;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}
.tablet-page .tablet-lk-sheet {
  z-index: 57;
}
.tablet-page .tablet-lk-body {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 1fr);
  gap: 16px;
  align-items: stretch;
  padding: 0 16px 16px;
}
.tablet-page .tablet-lk-form {
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.tablet-page .tablet-lk-phone {
  margin: 0;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 42px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-align: center;
  background: var(--paper);
  border-radius: 16px;
}
.tablet-page .tablet-lk-actions {
  margin-top: auto;
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-bottom: 4px;
}
.tablet-page .tablet-lk-form .btn,
.tablet-page .tablet-lk-actions .btn {
  padding: 18px 22px;
  font-size: 22px;
  font-weight: 800;
  min-height: 64px;
  border-radius: 14px;
  width: 100%;
  flex: 0 0 auto;
}
.tablet-page .tablet-lk-sheet .cab-quiz-numpad-dot {
  visibility: hidden;
  pointer-events: none;
}
.tablet-page .tablet-cabinet {
  position: fixed;
  inset: 0;
  z-index: 58;
  background: #fff;
}
.tablet-page .tablet-cabinet[hidden] {
  display: none !important;
}
.tablet-page .tablet-cabinet iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #fff;
}
@media (max-width: 720px) {
  .tablet-page .tablet-lk-body {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(220px, 1fr);
  }
}
.tablet-page .tablet-qr {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 24px 16px;
  background: #fff;
  text-align: center;
}
.tablet-page .tablet-qr[hidden] {
  display: none !important;
}
.tablet-page .tablet-qr-store {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 12px;
  font-weight: 800;
}
.tablet-page .tablet-qr-name {
  margin: 0;
  font-size: 28px;
  font-weight: 800;
}
.tablet-page .tablet-qr-card,
.tablet-page .tablet-qr-hint {
  margin: 0;
  color: var(--muted);
}
.tablet-page .tablet-qr .qr-box img {
  width: min(420px, 70vw);
}
.staff-page .tablet-online {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--muted);
}
.staff-page .tablet-online.is-online {
  color: var(--ok);
}
.staff-page .tablet-mirror {
  min-height: 280px;
  margin-top: 12px;
  padding: 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
}
.staff-page .tablet-mirror-kicker {
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 11px;
  font-weight: 800;
  color: var(--muted);
}
.staff-page .tablet-mirror-banner img {
  display: block;
  width: 100%;
  min-height: 180px;
  max-height: 420px;
  object-fit: contain;
  background: #f3f3f3;
  border-radius: 12px;
}
.staff-page .tablet-mirror-opts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.staff-page .tablet-mirror-opt {
  display: inline-block;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}
.staff-page .tablet-mirror-opt.is-selected {
  background: var(--accent);
  border-color: transparent;
  font-weight: 700;
}
.staff-page .tablet-find-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}
.staff-page .tablet-find-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
}

/* Kiosk: пока iframe ЛК поднимается */
.tablet-page .tablet-cabinet.is-loading {
  background: #FDD706;
}
.tablet-page .tablet-cabinet iframe {
  transition: opacity 0.15s ease;
}

/* === tablet-cabinet-embed landscape === */
/* ЛК на рабочем планшете: без баннера, жёлтая карта на один экран */
html:has(body.tablet-cabinet-embed),
body.tablet-cabinet-embed.cabinet-page {
  height: 100%;
  background: #fff;
  overflow: hidden;
}
body.tablet-cabinet-embed .bg {
  display: none !important;
}
body.tablet-cabinet-embed .site-footer,
body.tablet-cabinet-embed #cab-month-frame,
body.tablet-cabinet-embed #cab-quiz-entry,
body.tablet-cabinet-embed #cab-banner-zoom,
body.tablet-cabinet-embed #add-home-btn {
  display: none !important;
}
body.tablet-cabinet-embed.cabinet-page .cabinet {
  width: 100%;
  max-width: none;
  margin: 0;
  box-sizing: border-box;
  height: calc(100dvh - 96px);
  max-height: calc(100dvh - 96px);
  padding: 28px 40px 18px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
body.tablet-cabinet-embed.cabinet-page:has(.cab-tabs) .cabinet {
  padding-bottom: 18px;
}
body.tablet-cabinet-embed .cabinet-app {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  gap: 14px;
  overflow: hidden;
}
body.tablet-cabinet-embed .cab-bar {
  flex: 0 0 auto;
  margin: 0;
}
body.tablet-cabinet-embed .cab-who {
  flex: 0 0 auto;
  margin: 0;
}
body.tablet-cabinet-embed .cab-who h1,
body.tablet-cabinet-embed .cab-who-title {
  font-size: clamp(22px, 3.2vh, 32px);
}
body.tablet-cabinet-embed .cab-who p {
  margin-top: 4px;
  font-size: clamp(13px, 1.8vh, 16px);
}
body.tablet-cabinet-embed #cab-balance {
  flex: 1 1 auto;
  min-height: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(8px, 1.5vh, 18px);
  padding: clamp(22px, 4vh, 48px) clamp(28px, 5vw, 64px);
  border-radius: clamp(20px, 2.5vw, 32px);
  box-sizing: border-box;
  overflow: hidden;
}
body.tablet-cabinet-embed #cab-balance .cab-card-top {
  font-size: clamp(12px, 1.6vh, 15px);
}
body.tablet-cabinet-embed #cab-balance .big {
  margin: clamp(4px, 1vh, 12px) 0 0;
  font-size: clamp(64px, 14vh, 132px);
  line-height: 0.95;
}
body.tablet-cabinet-embed #cab-balance .unit {
  font-size: clamp(16px, 2.4vh, 24px);
}
body.tablet-cabinet-embed #cab-balance .cab-stats {
  margin-top: clamp(12px, 2.5vh, 28px);
  padding-top: clamp(12px, 2.2vh, 22px);
  gap: clamp(12px, 2vw, 24px);
}
body.tablet-cabinet-embed #cab-balance .cab-stats small {
  font-size: clamp(12px, 1.6vh, 15px);
  margin-bottom: 4px;
}
body.tablet-cabinet-embed #cab-balance .cab-stats b {
  font-size: clamp(20px, 3.2vh, 32px);
}

/* Нижние вкладки на всю ширину */
body.tablet-cabinet-embed .cab-tabs {
  left: 0;
  right: 0;
  transform: none;
  max-width: none;
  width: 100%;
  height: 96px;
  box-sizing: border-box;
  /* чуть выше от нижнего края планшета */
  padding: 10px 16px calc(22px + env(safe-area-inset-bottom, 0px));
}
body.tablet-cabinet-embed .cab-tab-label {
  font-size: 12px;
}
body.tablet-cabinet-embed .cab-tab-ico {
  width: 44px;
  height: 44px;
}
body.tablet-cabinet-embed .cab-tab-ico svg {
  width: 26px;
  height: 26px;
}

/* Разделы (история/акции…) — на весь экран; прокрутка только внутри sheet */
body.tablet-cabinet-embed .cab-sheet {
  left: 0;
  right: 0;
  transform: none;
  max-width: none;
  width: 100%;
  padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px));
}
body.tablet-cabinet-embed .cab-sheet-bar {
  padding-left: 24px;
  padding-right: 24px;
  min-height: 56px;
}
body.tablet-cabinet-embed .cab-sheet-bar h2 {
  font-size: 22px;
}
body.tablet-cabinet-embed .cab-promo-body {
  padding: 10px 24px 16px;
}
body.tablet-cabinet-embed .cab-catalog {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
body.tablet-cabinet-embed .cab-product-name {
  font-size: 14px;
}
body.tablet-cabinet-embed .cab-product-prices .new {
  font-size: 18px;
}
body.tablet-cabinet-embed .cab-sheet .cab-history {
  margin: 0 24px 16px;
}
body.tablet-cabinet-embed .cab-chat-compose,
body.tablet-cabinet-embed .cab-messages {
  padding-left: 24px;
  padding-right: 24px;
}
@media (max-width: 900px) {
  body.tablet-cabinet-embed.cabinet-page .cabinet {
    padding: 20px 22px 14px;
  }
  body.tablet-cabinet-embed .cab-catalog {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 700px) {
  body.tablet-cabinet-embed .cab-catalog {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
/* === /tablet-cabinet-embed landscape === */
