/* Вейп Лото: продавец и админка */
:root {
  --ink: #111113;
  --paper: #ffffff;
  --tint: #f4f4f5;
  --line: #e4e4e7;
  --muted: #66666e;
  --ok: #15803d;
  --ok-tint: #e8f6ed;
  --warn: #8f5100;
  --warn-tint: #fbf1de;
  --err: #bb2329;
  --err-tint: #fbeaea;
  --font: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ink: #f5f5f7;
    --paper: #0d0d0f;
    --tint: #1b1b1e;
    --line: #2d2d31;
    --muted: #a3a3ab;
    --ok: #63d48d;
    --ok-tint: #13291c;
    --warn: #f5b354;
    --warn-tint: #2e2210;
    --err: #ff9090;
    --err-tint: #331819;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 500 16px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
[hidden] { display: none !important; }
a { color: inherit; text-underline-offset: 3px; }
h1, h2, h3 { font-weight: 700; line-height: 1.2; margin: 0; letter-spacing: -.02em; }
h1 { font-size: 28px; } h2 { font-size: 18px; } h3 { font-size: 16px; }
b { font-weight: 700; }
.muted { color: var(--muted); } .ok { color: var(--ok); } .err { color: var(--err); } .warn { color: var(--warn); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; border-radius: 4px; }
::placeholder { color: var(--muted); opacity: .6; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
.mark { font-size: 17px; font-weight: 800; letter-spacing: -.025em; text-decoration: none; line-height: 1.2; }
.mark.big { font-size: 34px; letter-spacing: -.035em; }

/* ---------- формы и кнопки ---------- */
label { display: block; font-size: 14px; color: var(--muted); margin-bottom: 8px; }
input, select, textarea {
  width: 100%; min-height: 48px; padding: 11px 14px; font: inherit; color: var(--ink);
  background: var(--paper); border: 1px solid var(--line); border-radius: 10px; transition: border-color .15s;
}
textarea { line-height: 1.5; }
input:hover, select:hover, textarea:hover { border-color: var(--muted); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.btn, button {
  font: inherit; font-weight: 700; min-height: 48px; padding: 0 20px; border: 0; border-radius: 10px;
  background: var(--ink); color: var(--paper); cursor: pointer; text-decoration: none;
  white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; gap: 8px; transition: opacity .15s, background-color .15s, color .15s;
}
.btn:hover, button:hover { opacity: .86; }
button:disabled { background: var(--tint); color: var(--muted); opacity: 1; cursor: default; }
.btn.ghost, button.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); font-weight: 600; }
.btn.ghost:hover, button.ghost:hover { opacity: 1; background: var(--tint); }
button.quiet { background: transparent; color: var(--muted); font-weight: 600; }
button.quiet:hover { opacity: 1; color: var(--ink); }
.btn.small, button.small { min-height: 36px; padding: 0 12px; font-size: 14px; border-radius: 8px; }
.btn.block, button.block { width: 100%; }
.stack > * + * { margin-top: 16px; }
.chip { display: inline-flex; align-items: center; padding: 2px 9px; border-radius: 6px; font-size: 13px; font-weight: 600; background: var(--tint); white-space: nowrap; }
.chip.ok { background: var(--ok-tint); color: var(--ok); }
.chip.err { background: var(--err-tint); color: var(--err); }
.chip.warn { background: var(--warn-tint); color: var(--warn); }
.notice { padding: 12px 14px; border-radius: 10px; font-size: 15px; }
.notice.warn { background: var(--warn-tint); color: var(--warn); }
.notice.err { background: var(--err-tint); color: var(--err); }
.notice.ok { background: var(--ok-tint); color: var(--ok); }
.empty { padding: 36px 12px; text-align: center; color: var(--muted); }
hr.rule { border: 0; border-top: 1px solid var(--line); margin: 24px 0; }

/* ---------- вход ---------- */
.auth { max-width: 380px; margin: 0 auto; padding: clamp(48px, 16vh, 150px) 20px 40px; }
.auth .sub { margin: 4px 0 32px; }

/* ---------- продавец ---------- */
.s-page { max-width: 460px; min-height: 100svh; margin: 0 auto; padding: 0 20px; display: flex; flex-direction: column; }
.s-page > main { flex: 1; padding: 28px 0 32px; }
.s-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.s-id { min-width: 0; }
.who { font-size: 13px; color: var(--muted); line-height: 1.35; overflow-wrap: anywhere; }
.s-top nav { display: flex; align-items: center; gap: 2px; flex: none; margin-right: -10px; }
.s-top nav form { margin: 0; }
.s-top nav a, .s-top nav button { background: none; color: var(--muted); min-height: 44px; padding: 0 10px; display: inline-flex; align-items: center; font-size: 14px; font-weight: 600; text-decoration: none; border-radius: 8px; }
.s-top nav a:hover, .s-top nav button:hover { color: var(--ink); opacity: 1; }
.s-h { margin-bottom: 8px; }

.today { display: flex; gap: 28px; padding: 16px 0 20px; border-top: 1px solid var(--line); }
.today span { display: block; font-size: 13px; color: var(--muted); }
.today b { display: block; font-size: 20px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; white-space: nowrap; }

.field-phone { display: flex; align-items: center; gap: 10px; padding: 0 16px; border: 1px solid var(--line); border-radius: 12px; transition: border-color .15s; }
.field-phone:hover { border-color: var(--muted); }
.field-phone:focus-within { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.field-phone span, .field-phone input { font-size: clamp(24px, 7.2vw, 28px); font-weight: 600; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.field-phone span { color: var(--muted); }
.field-phone input { border: 0; background: transparent; padding: 0; min-height: 68px; min-width: 0; box-shadow: none !important; }
.hint { font-size: 14px; color: var(--muted); margin: 12px 0 0; }

.client-name { font-size: 28px; font-weight: 700; line-height: 1.15; letter-spacing: -.025em; overflow-wrap: anywhere; }
.client-meta { margin-top: 8px; font-size: 15px; color: var(--muted); }
.amounts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.amount { min-height: 72px; padding: 0; background: var(--paper); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); border-radius: 12px; font-size: 24px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.amount:hover { opacity: 1; box-shadow: inset 0 0 0 1px var(--muted); }
.amount[aria-pressed='true'], .amount[aria-pressed='true']:hover { background: var(--ink); color: var(--paper); box-shadow: none; }
.amount:disabled { background: var(--paper); color: var(--muted); }
.amount[aria-pressed='true']:disabled { background: var(--ink); color: var(--paper); }
.confirm { margin-top: 12px; min-height: 58px; border-radius: 12px; font-size: 17px; }

.stamp { padding: 12px 0 20px; }
.stamp .big { font-size: clamp(72px, 24vw, 96px); font-weight: 800; line-height: 1; letter-spacing: -.05em; font-variant-numeric: tabular-nums; animation: rise .22s ease-out; overflow-wrap: anywhere; }
.stamp .hint { margin-top: 6px; }
@keyframes rise { from { transform: translateY(6px); opacity: 0; } to { transform: none; opacity: 1; } }
.stamp + .client-name + .hint { margin: 8px 0 24px; }

.item { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.item:last-child { border-bottom: 0; }
.item b { font-weight: 700; }
.item .a { font-size: 18px; font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.item .muted { font-size: 14px; }
.item .st { text-align: right; }

/* ---------- админка ---------- */
.a-top { border-bottom: 1px solid var(--line); }
.a-top-in { max-width: 1200px; margin: 0 auto; padding: 0 clamp(16px, 3vw, 32px); display: flex; align-items: center; gap: 32px; min-height: 60px; }
.a-top-in > .mark { flex: none; }
.a-nav { flex: 1; display: flex; align-self: stretch; gap: 22px; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.a-nav a { display: flex; align-items: center; min-height: 44px; color: var(--muted); text-decoration: none; font-size: 15px; font-weight: 600; white-space: nowrap; box-shadow: inset 0 -2px 0 transparent; transition: color .15s; }
.a-nav a:hover { color: var(--ink); }
.a-nav a[aria-current='page'] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--ink); }
.a-nav a:focus-visible { outline-offset: -2px; }
.a-top form { margin: 0; flex: none; }
.a-top button { min-height: 40px; padding: 0 4px; font-size: 14px; }

.a-main { max-width: 1200px; margin: 0 auto; padding: 32px clamp(16px, 3vw, 32px) 64px; }
.a-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.page-title { margin-bottom: 2px; }
.sub { color: var(--muted); margin: 0; font-size: 15px; }
.panel { padding-top: 22px; margin-bottom: 36px; border-top: 1px solid var(--line); min-width: 0; }
.panel > h2 { margin-bottom: 14px; }
.a-head + .panel { border-top: 0; padding-top: 0; }
.panel.filters, .filter-panel { margin-bottom: 36px; }
.filter-panel { display: grid; gap: 16px; }
.filters { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.filters > div { flex: 1 1 150px; min-width: 130px; }
.filters > .fit { flex: 0 0 auto; min-width: 0; }

.seg { display: inline-flex; background: var(--tint); border-radius: 10px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg.wide { width: fit-content; max-width: 100%; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.seg a { padding: 7px 13px; min-height: 36px; display: inline-flex; align-items: center; border-radius: 8px; color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 600; white-space: nowrap; transition: color .15s; }
.seg a:hover { color: var(--ink); }
.seg a[aria-current='true'] { background: var(--ink); color: var(--paper); }

.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; margin-bottom: 40px; }
.kpi { min-width: 0; }
.kpi .v { font-size: clamp(32px, 4vw, 44px); font-weight: 700; line-height: 1.1; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.kpi .l { font-size: 14px; color: var(--muted); margin-top: 4px; }
.delta { font-size: 13px; margin-top: 6px; color: var(--muted); }
.delta.up { color: var(--ok); } .delta.down { color: var(--err); }

.chart { width: 100%; height: auto; display: block; }
.chart .bar { fill: var(--ink); transition: fill .15s; } .chart .bar.off { fill: var(--line); } .chart .bar:hover { fill: var(--muted); }
.chart text { fill: var(--muted); font: 500 11px var(--font); } .chart .val { fill: var(--ink); font-weight: 700; }
.chart .grid { stroke: var(--line); stroke-width: 1; }

.scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
th, td { padding: 10px 12px; text-align: left; vertical-align: middle; border-bottom: 1px solid var(--line); }
th:first-child, td:first-child { padding-left: 0; }
th:last-child, td:last-child { padding-right: 0; }
th { color: var(--muted); font-weight: 600; font-size: 13px; white-space: nowrap; position: sticky; top: 0; background: var(--paper); }
td.r, th.r { text-align: right; font-variant-numeric: tabular-nums; }
tbody tr:last-child td { border-bottom: 0; }
.minibar { display: block; height: 4px; border-radius: 2px; background: var(--ink); min-width: 2px; }
code { font: 500 13.5px ui-monospace, Menlo, monospace; background: var(--tint); padding: 2px 6px; border-radius: 5px; }

.two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 48px; }
.bubble { background: var(--tint); border-radius: 14px 14px 14px 4px; padding: 13px 15px; white-space: pre-wrap; max-width: 440px; font-size: 15px; line-height: 1.5; }
.field-hint { font-size: 13px; color: var(--muted); margin-top: 6px; }
.inline { display: flex; gap: 8px; align-items: center; }
.inline input { min-height: 36px; padding: 6px 10px; width: 150px; border-radius: 8px; }
.inline input[name='region'] { width: 200px; }
.credentials { white-space: pre-wrap; font: 500 14px ui-monospace, Menlo, monospace; background: var(--tint); border-radius: 10px; padding: 14px; }

@media (max-width: 900px) {
  .a-top-in { flex-wrap: wrap; gap: 0 12px; padding-top: 6px; }
  .a-top form { margin-left: auto; }
  .a-nav { order: 3; flex: 1 0 100%; height: 44px; gap: 18px; }
  .a-main { padding-top: 24px; }
  .kpis { grid-template-columns: 1fr 1fr; gap: 24px 16px; }
  .two { grid-template-columns: 1fr; }
  .filters > div { flex: 1 1 40%; min-width: 0; }
  .filters > .fit { flex: 1 1 100%; }
  .filters > .fit button { width: 100%; }
}

/* ---------- Волгоград: касса, смена, камера ---------- */
.s-top nav button[aria-current='page'] { color: var(--ink); }
.shift-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; background: var(--tint); border-radius: 12px; }
.shift-bar b { display: block; line-height: 1.3; }
.shift-bar .muted { font-size: 13px; }
.shift-bar.late { background: var(--warn-tint); }
.shift-bar.late .muted { color: var(--warn); }
.shift-bar + .notice { margin-top: 12px; }
input.money { font-size: clamp(28px, 9vw, 36px); font-weight: 700; min-height: 68px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; border-radius: 12px; }
.money-row { margin-top: 14px; }
.money-row .quiet { margin-top: 4px; padding: 0 4px; }
.money-row + button, input.money + button.ghost { margin-top: 10px; }
.calc { margin-top: 16px; min-height: 58px; }
.calc-total { font-size: 22px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.calc-total span { color: var(--muted); font-weight: 600; }
.calc-next { font-size: 15px; color: var(--ok); margin-top: 2px; }
.calc-next.warn { color: var(--warn); }
.tiles { display: grid; gap: 8px; }
.tile { min-height: 60px; justify-content: flex-start; text-align: left; white-space: normal; background: var(--paper); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); border-radius: 12px; font-size: 17px; }
.tile:hover { opacity: 1; box-shadow: inset 0 0 0 1px var(--muted); }
.tile[aria-pressed='true'], .tile[aria-pressed='true']:hover { background: var(--ink); color: var(--paper); box-shadow: none; }
.coupon { padding: 14px 0; border-top: 1px solid var(--line); }
.coupon-h { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 10px; }
.coupon-pick { font-weight: 700; text-align: right; overflow-wrap: anywhere; }
.amounts.four { grid-template-columns: repeat(4, 1fr); }
.amounts.four .amount { min-height: 56px; font-size: 19px; }
.amount.prize { font-size: 16px !important; }
.prize-row { width: 100%; display: flex; justify-content: space-between; gap: 12px; min-height: 56px; padding: 0 4px; background: none; color: var(--ink); border-bottom: 1px solid var(--line); border-radius: 0; font-weight: 600; text-align: left; white-space: normal; }
.prize-row:hover { opacity: 1; background: var(--tint); }
.cam { width: 100%; border-radius: 12px; background: #000; margin: 12px 0; aspect-ratio: 3 / 4; object-fit: cover; display: block; }
.summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 4px 0 12px; }
.summary span { display: block; font-size: 12px; color: var(--muted); }
.summary b { font-size: 20px; font-variant-numeric: tabular-nums; }
.summary + .notice { margin-bottom: 4px; }
.stamp.small .big { font-size: clamp(40px, 13vw, 56px); }
.item.off { opacity: .55; }
.item-body { grid-column: 1 / -1; font-size: 15px; }
.item-body .inline { flex-wrap: wrap; }
tr.strong td { font-weight: 700; }
.list .item:first-child { padding-top: 6px; }
.scroll td:first-child { min-width: 170px; }
