:root {
  --bg: #12100c;
  --bg-2: #1b1712;
  --ink: #f4efe3;
  --muted: #a89b86;
  --line: #3a3228;
  --ticket: #e7f04a;
  --ticket-ink: #16140f;
  --stamp: #e24b32;
  --ok: #7ee0a3;
  --warn: #f0c36a;
  --card: #221d17;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(1200px 500px at 10% -10%, rgba(231, 240, 74, 0.08), transparent 50%),
    repeating-linear-gradient(-12deg, transparent 0 18px, rgba(255,255,255,0.015) 18px 19px),
    var(--bg);
  color: var(--ink);
  font-family: "IBM Plex Sans", "Segoe UI", sans-serif;
}

body { min-height: 100vh; }

a { color: var(--ticket); text-decoration: none; }

h1, h2, h3 { font-family: "Oswald", "Arial Narrow", sans-serif; letter-spacing: 0.04em; margin: 0 0 0.4em; text-transform: uppercase; }

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 22px;
  border-bottom: 1px solid var(--line);
  background: rgba(18, 16, 12, 0.92);
  position: sticky;
  top: 0;
  z-index: 5;
}

.brand {
  font-family: "Oswald", sans-serif;
  letter-spacing: 0.18em;
  font-size: 20px;
  color: var(--ink);
  text-decoration: none;
}
.brand:hover { color: var(--ink); }
.brand span { color: var(--ticket); }
.event-public .brand,
.event-public .brand:hover { color: var(--ink); }
.event-public .brand span { color: var(--ticket); }

nav { display: flex; flex-wrap: wrap; gap: 8px; }
nav a, .ghost, button, .btn {
  border: 1px solid var(--line);
  background: var(--bg-2);
  color: var(--ink);
  padding: 8px 12px;
  border-radius: 999px;
  cursor: pointer;
  font: inherit;
}

nav a.active, .btn.primary {
  background: var(--ticket);
  color: var(--ticket-ink);
  border-color: var(--ticket);
  font-weight: 600;
}

.btn.danger { background: var(--stamp); border-color: var(--stamp); color: white; }
.btn.ok { background: var(--ok); border-color: var(--ok); color: #102016; font-weight: 700; }
button:disabled { opacity: 0.45; cursor: not-allowed; }

.wrap { max-width: 1100px; margin: 0 auto; padding: 24px 18px 64px; }
.grid { display: grid; gap: 16px; }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
  box-shadow: var(--shadow);
}

.stub {
  background:
    radial-gradient(circle at 0 18px, transparent 10px, var(--ticket) 11px) left,
    var(--ticket);
  color: var(--ticket-ink);
  border-radius: 16px;
  padding: 18px 18px 18px 28px;
}

label { display: block; font-size: 12px; color: var(--muted); margin: 10px 0 6px; text-transform: uppercase; letter-spacing: 0.08em; }
input, select, textarea {
  width: 100%;
  background: #140f0c;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  font: inherit;
  color-scheme: dark;
}
input[type="datetime-local"],
input[type="date"],
input[type="time"] {
  min-height: 44px;
}
input[type="datetime-local"]::-webkit-calendar-picker-indicator,
input[type="date"]::-webkit-calendar-picker-indicator,
input[type="time"]::-webkit-calendar-picker-indicator {
  cursor: pointer;
  opacity: 0.85;
  filter: invert(0.9);
}
textarea { min-height: 72px; resize: vertical; }

.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; }
.row > * { flex: 1; min-width: 140px; }
.row .btn, .row button { flex: 0 0 auto; }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 500; font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; }

.banner {
  padding: 22px;
  border-radius: 18px;
  font-size: 28px;
  line-height: 1.15;
  font-family: "Oswald", sans-serif;
  text-transform: uppercase;
}
.banner.ok { background: var(--ok); color: #102016; }
.banner.bad { background: var(--stamp); color: #fff; font-weight: 700; }
.banner.warn { background: #f5c84a; color: #1a1204; font-weight: 700; }
.banner.idle { background: var(--bg-2); color: var(--muted); border: 1px dashed var(--line); }

.muted { color: var(--muted); }
.small { font-size: 13px; }
.qr { background: #f6f1d7; padding: 10px; display: inline-block; border-radius: 8px; }
.qr img { display: block; width: 180px; height: 180px; }
.tabs { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.tab { padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); cursor: pointer; }
.tab.on { background: var(--ticket); color: var(--ticket-ink); }
.hidden { display: none !important; }
.who { color: var(--muted); font-size: 13px; }

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-card { width: min(420px, 100%); }

.stub-mb { margin-bottom: 18px; }
.btn-block { width: 100%; margin-top: 8px; }
.link-center { display: block; margin-top: 14px; text-align: center; }
.venue-switch { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.venue-switch > .muted,
.venue-switch > span { color: var(--ink); font-weight: 600; opacity: 0.92; }
.venue-switch select {
  min-width: 160px;
  outline: none;
  box-shadow: none;
}
.venue-switch select:focus {
  border-color: var(--ticket);
  outline: 2px solid rgba(231, 240, 74, 0.35);
  outline-offset: 1px;
}
.amount {
  font-family: "Oswald", sans-serif;
  font-size: 56px;
  letter-spacing: 0.04em;
}

.pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.pad button { padding: 16px 0; border-radius: 12px; font-size: 22px; font-family: "Oswald", sans-serif; }

.error { color: var(--stamp); min-height: 1.2em; }

.event-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.event-links .muted { flex-basis: 100%; margin: 0; }
.event-designer-page { max-width: 1320px; }
.back-link { display: inline-block; margin-bottom: 14px; }
.designer-hero { margin-bottom: 18px; }
.designer-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(340px, .85fr); gap: 18px; align-items: start; }
.designer-controls { display: grid; gap: 14px; }
.designer-section { padding: 20px; }
.section-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.section-heading h2 { font-size: 22px; }
.section-heading .eyebrow { margin: 0 0 5px; }
.step-pill { color: var(--ticket); font-family: "Oswald", sans-serif; font-size: 18px; }
.designer-color-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 14px; }
.designer-color-grid input[type="color"] { display: block; width: 100%; height: 46px; padding: 4px; cursor: pointer; }
.image-source-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 14px 0; }
.image-source-grid .row { align-items: stretch; }
.image-source-grid .row input { min-width: 0; }
.design-image-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; margin-top: 14px; }
.design-image-none { grid-column: 1 / -1; padding: 10px 12px; border: 1px dashed var(--line); border-radius: 10px; }
.design-image-card { overflow: hidden; min-width: 0; border: 1px solid var(--line); border-radius: 12px; background: rgba(0,0,0,.14); }
.design-image-card > img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--bg-2); }
.design-image-controls { display: grid; gap: 7px; padding: 10px; }
.image-choice { display: flex; align-items: center; gap: 7px; margin: 0; text-transform: none; letter-spacing: normal; }
.image-choice input { width: auto; margin: 0; accent-color: var(--ticket); }
.image-remove { width: 100%; }
.designer-actions { position: sticky; bottom: 10px; z-index: 2; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: rgba(27,23,18,.96); box-shadow: var(--shadow); }
.designer-actions .btn { display: inline-flex; align-items: center; justify-content: center; }
.designer-actions .error, .designer-actions .success-message { margin: 7px 0 0; }
.designer-preview-wrap { position: sticky; top: 92px; }
.designer-preview-label { display: flex; justify-content: space-between; gap: 8px; margin: 0 2px 8px; }
.event-preview { overflow: hidden; border: 2px var(--event-border-style, solid) var(--event-border-color, #3a3228); border-radius: 20px; background-color: var(--event-bg, #12100c); background-image: var(--event-background-image, none); background-size: var(--event-background-size, cover); background-repeat: var(--event-background-repeat, no-repeat); background-position: center; box-shadow: var(--shadow); }
.event-preview-carousel { position: relative; display: flex; min-height: 250px; align-items: end; padding: 22px; isolation: isolate; }
.event-preview-carousel::after { position: absolute; z-index: -1; inset: 0; background: linear-gradient(180deg, rgba(12,10,8,.05), rgba(12,10,8,.88)); content: ""; }
.event-preview-carousel > img { position: absolute; z-index: -2; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.event-preview-title h2 { margin-bottom: 5px; font-size: clamp(24px, 3vw, 36px); }
.event-preview-title .eyebrow { color: var(--event-accent, var(--ticket)); }
.event-preview-content { padding: 18px; border-top: 2px var(--event-border-style, solid) var(--event-border-color, #3a3228); background: rgba(16,14,12,.88); }
.event-preview-content h3 { margin-top: 18px; }
.preview-description { white-space: pre-wrap; }
.preview-tariffs { display: grid; gap: 8px; }
.preview-tariff { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border: 1px var(--event-border-style, solid) var(--event-border-color, #3a3228); border-radius: 10px; }
.preview-tariff span { padding: 4px 8px; border-radius: 999px; color: var(--event-accent-ink, #16140f); background: var(--event-accent, var(--ticket)); font-weight: 700; }
.preview-carousel-controls { position: absolute; top: 12px; right: 12px; display: flex; align-items: center; gap: 8px; border-radius: 999px; padding: 4px 6px; background: rgba(0,0,0,.65); }
.preview-carousel-controls button { width: 30px; height: 30px; padding: 0; border-radius: 50%; }
.event-public { background-color: var(--event-bg, var(--bg)); background-image: var(--event-background-image, none); background-size: var(--event-background-size, cover); background-repeat: var(--event-background-repeat, no-repeat); background-position: center; background-attachment: fixed; }
.event-public .top { border-bottom: 2px var(--event-border-style, solid) var(--event-border-color, var(--line)); }
.event-public .event-public-card { overflow: hidden; padding: 0; border: 2px var(--event-border-style, solid) var(--event-border-color, var(--line)); background: rgba(25,22,18,.9); }
.event-public .btn.primary { color: var(--event-accent-ink, #17140f); background: var(--event-accent, var(--ticket)); border-color: var(--event-accent, var(--ticket)); }
.event-public-hero { position: relative; display: flex; min-height: 280px; align-items: end; padding: clamp(20px, 5vw, 42px); isolation: isolate; }
.event-public-hero::after { position: absolute; z-index: -1; inset: 0; background: linear-gradient(180deg, rgba(10,9,7,.06), rgba(10,9,7,.9)); content: ""; }
.event-public-hero > img { position: absolute; z-index: -2; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.event-public-hero h1 { margin-bottom: 8px; font-size: clamp(30px, 6vw, 52px); }
.event-public-hero .muted { color: #e3dbcc; }
.event-public-content { padding: clamp(18px, 4vw, 30px); }
.event-public-content > p { white-space: pre-wrap; }
.event-public .event-tariffs { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px; margin-top: 18px; }
.event-public .event-tariffs button { display: grid; gap: 6px; min-height: 74px; text-align: left; border-radius: 12px; }
.event-public .event-tariffs button span { font-weight: 700; }
.public-carousel-controls { position: absolute; top: 14px; right: 14px; display: flex; align-items: center; gap: 8px; padding: 5px; border: 1px solid rgba(255,255,255,.2); border-radius: 999px; background: rgba(0,0,0,.65); }
.public-carousel-controls button { width: 34px; height: 34px; padding: 0; border-radius: 50%; }

@media (max-width: 900px) {
  .designer-layout { grid-template-columns: 1fr; }
  .designer-preview-wrap { position: static; grid-row: 1; }
}
@media (max-width: 600px) {
  .designer-color-grid, .image-source-grid { grid-template-columns: 1fr; }
  .designer-preview-label { flex-direction: column; gap: 2px; }
  .event-preview-carousel { min-height: 210px; }
  .event-public-hero { min-height: 230px; }
}

.top nav #revoke-access-btn {
  border-color: rgba(255, 116, 94, .2);
  color: #ffad9d;
}
.top nav #revoke-access-btn:hover {
  background: rgba(255, 116, 94, .1);
  border-color: rgba(255, 116, 94, .45);
}
#venue-dialog {
  border: none;
  padding: 0;
  background: transparent;
  max-width: min(560px, 94vw);
}
#venue-dialog::backdrop { background: rgba(0, 0, 0, .72); }
#venue-dialog > .card {
  margin: 0;
  outline: none;
  box-shadow: 0 24px 80px rgba(0, 0, 0, .55);
}

.access-dialog {
  width: min(520px, calc(100% - 28px));
  max-width: none;
  max-height: min(90vh, 760px);
  padding: 0;
  overflow: auto;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 18px;
  background: transparent;
}
.access-dialog::backdrop { background: rgba(0, 0, 0, .72); backdrop-filter: blur(4px); }
.access-dialog-card { box-shadow: 0 24px 80px rgba(0,0,0,.55); }
.dialog-heading, .section-heading, .page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.dialog-heading h2 { margin: 4px 0 0; }
.icon-button { min-width: 40px; padding-inline: 10px; font-size: 22px; line-height: 1; }
.access-options {
  display: grid;
  gap: 8px;
  margin: 18px 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.access-options legend { padding: 0 6px; color: var(--muted); font-size: 12px; }
.check-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0;
  color: var(--ink);
  text-transform: none;
  letter-spacing: 0;
  font-size: 14px;
}
.check-option input, .auto-refresh-option input {
  width: 18px;
  min-width: 18px;
  height: 18px;
  min-height: 18px;
  margin: 2px 0 0;
  accent-color: var(--ticket);
}
.dialog-actions { justify-content: flex-end; margin-top: 16px; }
.dialog-actions > * { flex: 0 1 auto; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.bar-page, .payeer-page { max-width: 1320px; }
.page-heading { align-items: flex-end; margin-bottom: 22px; }
.page-heading h1 { margin: 4px 0 6px; font-size: clamp(32px, 5vw, 46px); line-height: 1.05; }
.page-heading p { margin: 0; }
.bar-layout { display: grid; grid-template-columns: minmax(0, 1.02fr) minmax(0, .98fr); align-items: start; gap: 18px; }
.pos-card, .sales-card { min-width: 0; }
.amount-entry { margin: 10px 0 0; }
.amount-entry input {
  min-height: 76px;
  padding: 8px 16px;
  border-color: rgba(231, 240, 74, .32);
  background: rgba(231, 240, 74, .055);
  color: var(--ticket);
  font: 600 clamp(36px, 6vw, 52px)/1 "Oswald", sans-serif;
  text-align: right;
  letter-spacing: .03em;
}
.amount-help { margin: 7px 0 12px; }
.quick-amounts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; margin-bottom: 10px; }
.quick-amounts button { min-width: 0; padding: 8px 5px; color: var(--ticket); border-color: rgba(231,240,74,.18); background: rgba(231,240,74,.045); font-size: 13px; }
.quick-amount-settings { margin: 8px 0 10px; color: var(--muted); font-size: 13px; }
.quick-amount-settings summary { width: fit-content; cursor: pointer; }
.quick-amount-settings .row { margin-top: 8px; }
.quick-amount-settings .row input { flex: 1 1 100%; }
.quick-amount-settings .row button { flex: 0 1 auto; }
.quick-amount-settings p { margin: 6px 0; }
.pad { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pad button { min-height: 48px; padding: 8px; }
.keypad-bottom { justify-content: space-between; margin-top: 8px; }
.keypad-bottom > * { flex: 0 1 auto; }
.member-lookup { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.member-lookup > p { margin: 0 0 8px; }
.scan-controls { align-items: stretch; }
.scan-controls input { flex: 1 1 100%; }
.scan-controls button { flex: 1 1 auto; }
.guest-panel { margin-top: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.025); }
.guest-status { margin: 0; font-weight: 600; }
.guest-panel .small { margin: 3px 0 0; }
.points-box { margin-top: 10px; padding: 11px 13px; border: 1px solid var(--line); border-radius: 12px; }
.points-box summary { cursor: pointer; font-weight: 600; }
.points-box p { margin: 8px 0; }
.points-box .row > * { flex: 1 1 auto; }
.points-box .row button { flex: 0 1 auto; }
.charge-button { width: 100%; min-height: 54px; margin-top: 16px; font-size: 18px; font-weight: 700; }
.sales-card .section-heading { align-items: flex-start; }
.sales-card .section-heading h2 { margin: 4px 0; }
.sales-card .section-heading p { margin: 0; }
.sales-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 16px 0; }
.sales-stat, .summary-card { display: grid; gap: 5px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.025); }
.sales-stat strong, .summary-card strong { font: 600 21px/1.2 "Oswald", sans-serif; }
.table-scroll { max-width: 100%; margin-top: 12px; overflow-x: auto; }
.table-scroll table { min-width: 440px; }
.table-subtitle { display: block; margin-top: 3px; color: var(--muted); font-size: 12px; }
.live-indicator { display: inline-flex; align-items: center; gap: 8px; flex: 0 0 auto; color: var(--muted); font-size: 12px; }
.live-indicator > span { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 12px rgba(131,223,171,.5); }
.queue-actions { display: flex; align-items: center; gap: 10px; }
.auto-refresh-option { display: inline-flex; align-items: center; gap: 8px; margin: 0; color: var(--muted); text-transform: none; letter-spacing: 0; white-space: nowrap; }
.payment-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.summary-card { min-height: 86px; padding: 16px 18px; }
.warning-summary strong { color: var(--warn); }
.payment-queue { min-width: 0; }
.payment-queue h2 { margin: 4px 0; }
.queue-filters { display: grid; grid-template-columns: minmax(0, 1fr) minmax(180px, 240px); gap: 10px; margin: 14px 0; }
.payment-list { display: grid; gap: 10px; }
.payment-item { display: grid; grid-template-columns: minmax(0, 1fr) minmax(180px, 230px); gap: 20px; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.022); }
.payment-item.is-late { border-color: rgba(240,195,106,.38); background: rgba(240,195,106,.035); }
.payment-item-title { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.payment-code { font: 600 18px/1.2 "Oswald", sans-serif; letter-spacing: .08em; }
.status-pill { padding: 4px 9px; border: 1px solid rgba(131,223,171,.26); border-radius: 999px; color: var(--ok); background: rgba(131,223,171,.08); font-size: 11px; }
.status-pill.late { border-color: rgba(240,195,106,.28); color: var(--warn); background: rgba(240,195,106,.08); }
.payment-item h3 { margin: 9px 0 12px; font: 600 18px/1.3 "IBM Plex Sans", sans-serif; letter-spacing: 0; text-transform: none; }
.payment-details { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px 18px; }
.payment-details > span { display: grid; gap: 3px; min-width: 0; font-size: 13px; overflow-wrap: anywhere; }
.payment-details strong { font-weight: 500; }
.payment-details a { color: var(--ticket); }
.payment-item-actions { display: flex; flex-direction: column; align-items: stretch; justify-content: center; gap: 8px; }
.payment-item-actions .small { margin: 0; }
.payment-item-actions .btn, .payment-item-actions button { width: 100%; }
.empty-state { padding: 30px 16px; border: 1px dashed var(--line); border-radius: 12px; text-align: center; }
.empty-state p { margin-bottom: 0; }
@media (max-width: 900px) {
  .bar-layout { grid-template-columns: minmax(0, 1fr); }
  .sales-card { grid-row: 2; }
}
@media (max-width: 700px) {
  .page-heading { align-items: flex-start; flex-direction: column; }
  .queue-actions { width: 100%; justify-content: space-between; }
  .payment-item { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .payment-item-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .payment-item-actions .small { grid-column: 1 / -1; }
}
@media (max-width: 520px) {
  .payment-summary { gap: 7px; }
  .summary-card { min-height: 76px; padding: 11px 9px; }
  .summary-card .small { font-size: 11px; }
  .queue-filters { grid-template-columns: minmax(0, 1fr); }
  .payment-details { gap: 10px; }
  .payment-item-actions { grid-template-columns: minmax(0, 1fr); }
  .quick-amounts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .live-indicator { display: none; }
}

:root {
  --bg: #100f0c;
  --bg-2: #1b1914;
  --ink: #f4f1e8;
  --muted: #a39c8b;
  --line: #39362d;
  --ticket: #e7f04a;
  --ticket-ink: #16140f;
  --stamp: #ff745e;
  --ok: #83dfab;
  --warn: #f0c36a;
  --card: #1d1b16;
  --shadow: 0 16px 42px rgba(0, 0, 0, .24);
}

html, body {
  background:
    radial-gradient(900px 500px at 12% -18%, rgba(231, 240, 74, .075), transparent 66%),
    radial-gradient(700px 420px at 100% 8%, rgba(231, 240, 74, .025), transparent 72%),
    var(--bg);
}

body { line-height: 1.5; }
button, input, select, textarea { font-family: inherit; }
button, .btn, nav a, .tab { transition: background-color .16s ease, border-color .16s ease, color .16s ease, transform .16s ease; }
button:hover:not(:disabled), .btn:hover:not(:disabled), nav a:hover, .tab:hover { border-color: rgba(231, 240, 74, .48); }
button:active:not(:disabled), .btn:active:not(:disabled) { transform: translateY(1px); }
button:focus-visible, a:focus-visible, summary:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid rgba(231, 240, 74, .55);
  outline-offset: 2px;
}

.top {
  min-height: 74px;
  padding: 12px clamp(16px, 3vw, 34px);
  gap: 18px;
  background: rgba(16, 15, 12, .92);
  backdrop-filter: blur(16px);
}
.brand { flex: 0 0 auto; }
.brand-row { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.help-link {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg-2);
  color: var(--ink);
  font-family: "Oswald", sans-serif;
  font-size: 18px;
  line-height: 1;
  text-decoration: none;
}
.help-link:hover { border-color: var(--ticket); color: var(--ink); }
.help-link[aria-current="page"] {
  background: var(--ticket);
  border-color: var(--ticket);
  color: var(--ticket-ink);
}
.top nav {
  flex: 1 1 auto;
  align-items: center;
  gap: 5px;
  min-width: 0;
}
.top nav a, .top nav .ghost {
  padding: 8px 11px;
  border-color: transparent;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}
.top nav a:hover, .top nav .ghost:hover {
  background: rgba(255,255,255,.055);
  color: var(--ink);
}
.top nav a.active {
  border-color: rgba(231, 240, 74, .22);
  background: rgba(231, 240, 74, .11);
  color: var(--ticket);
}
.top nav #logout-btn {
  margin-left: auto;
  border-color: var(--line);
  color: var(--muted);
}
.who {
  flex: 0 1 auto;
  max-width: 190px;
  overflow: hidden;
  color: var(--ink);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.nav-toggle { display: none; }

.wrap { max-width: 1200px; padding-top: 28px; }
.card {
  border-color: rgba(255,255,255,.085);
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(255,255,255,.025), transparent 55%), var(--card);
  box-shadow: var(--shadow);
}
.card h2 { font-size: 21px; }
.grid { gap: 18px; }
input, select, textarea {
  min-height: 44px;
  border-color: #403c32;
  border-radius: 10px;
  background-color: #14130f;
  transition: border-color .16s ease, box-shadow .16s ease;
}
input:hover, select:hover, textarea:hover { border-color: #615b49; }
input:focus, select:focus, textarea:focus {
  border-color: var(--ticket);
  box-shadow: 0 0 0 3px rgba(231, 240, 74, .1);
  outline: 0;
}
select { accent-color: var(--ticket); }
textarea { line-height: 1.5; }
label { margin-top: 14px; }
.btn, button {
  min-height: 40px;
  border-radius: 10px;
  font-weight: 500;
}
.btn.primary, nav a.active {
  box-shadow: 0 4px 16px rgba(231, 240, 74, .12);
}
.btn.primary:hover:not(:disabled) { background: #f0f66a; }
.btn.ok { color: #102016; }
.btn.danger { background: #59291f; border-color: #7d3c30; color: #ffd8d0; }
.btn.danger:hover:not(:disabled) { background: #713326; }

.tabs { gap: 7px; padding: 4px; border-radius: 13px; background: rgba(255,255,255,.025); }
.tab { border-color: transparent; color: var(--muted); }
.tab.on { border-color: rgba(231, 240, 74, .18); background: rgba(231, 240, 74, .12); color: var(--ticket); }
th { padding: 11px 10px; }
td { padding: 11px 10px; }
tbody tr:hover { background: rgba(255,255,255,.025); }
.error { color: #ff9886; }
.banner { border-radius: 14px; }
.login-shell { background: radial-gradient(ellipse at 50% 38%, rgba(231,240,74,.07), transparent 55%); }
.login-card { border-color: rgba(255,255,255,.1); }
.stub { border-radius: 14px; }
.amount { line-height: 1.05; }
.home-actions a { border-radius: 12px; }
.venue-switch { flex: 0 0 auto; }
.venue-switch select { width: auto; min-width: 150px; }
.tickets-frame { margin-top: 12px; }
.tickets-frame > .tickets-pager { margin-bottom: 8px; }
.tickets-scroll {
  max-height: 481px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.tickets-scroll table { display: table; width: 100%; white-space: normal; }
.tickets-scroll .tickets-pager { margin: 8px 10px 12px; }
.tickets-pager {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-top: 12px;
}
.tickets-pager button {
  min-width: 36px;
  padding: 6px 10px;
}
.tickets-pager button[aria-current="page"] {
  background: var(--ticket);
  color: var(--ticket-ink);
  border-color: var(--ticket);
  font-weight: 700;
}
.admin-tickets-table tbody tr.row-inventory td { color: var(--muted); }
.admin-tickets-table tbody tr.row-reserved td:first-child { box-shadow: inset 3px 0 0 #f5c84a; }
.admin-tickets-table tbody tr.row-entered td { opacity: 0.85; }
@media (max-width: 1080px) {
  .top { gap: 10px; padding-inline: 16px; }
  .top nav { gap: 2px; }
  .top nav a, .top nav .ghost { padding: 8px; font-size: 12px; }
  .who { max-width: 140px; }
}

@media (max-width: 820px) {
  .top { min-height: 66px; flex-wrap: wrap; padding: 10px 14px; }
  .brand, .brand-row { order: 1; }
  .nav-toggle {
    display: inline-flex;
    order: 2;
    align-items: center;
    gap: 8px;
    min-height: 38px;
    margin-left: auto;
    padding: 7px 11px;
    border-radius: 10px;
    background: rgba(255,255,255,.045);
    color: var(--ink);
    font-size: 13px;
  }
  .nav-toggle-icon, .nav-toggle-icon::before, .nav-toggle-icon::after {
    display: block;
    width: 15px;
    height: 1px;
    background: currentColor;
  }
  .nav-toggle-icon { position: relative; }
  .nav-toggle-icon::before, .nav-toggle-icon::after { position: absolute; content: ""; }
  .nav-toggle-icon::before { top: -5px; }
  .nav-toggle-icon::after { top: 5px; }
  .top > .who { order: 3; flex-basis: 100%; max-width: 100%; }
  .top nav {
    display: none;
    order: 5;
    flex: 1 0 100%;
    flex-wrap: wrap;
    padding-top: 6px;
    border-top: 1px solid var(--line);
  }
  .top nav.open { display: flex; }
  .top nav a, .top nav .ghost { font-size: 13px; }
  .top nav #logout-btn { margin-left: 0; }
  .top .venue-switch { order: 6; flex-basis: 100%; }
  .wrap { padding-top: 20px; }
}

@media (max-width: 520px) {
  .wrap { padding: 15px 12px 56px; }
  .card { padding: 15px; border-radius: 14px; }
  .grid.two { grid-template-columns: minmax(0, 1fr); }
  .row { align-items: stretch; }
  .row > * { min-width: 0; }
  .row .btn, .row button { flex: 1 1 100%; }
  table { display: block; max-width: 100%; overflow-x: auto; white-space: nowrap; }
  .tabs { overflow-x: auto; flex-wrap: nowrap; }
  .tab { flex: 0 0 auto; }
  .top > .who { font-size: 11px; }
}

.scan-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.86);
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 18px;
}

.scan-frame {
  width: min(420px, 100%);
  background: var(--card);
  border-radius: 18px;
  padding: 16px;
  text-align: center;
}
.scan-frame-wide { width: min(560px, 100%); }

#camera-box { width: 100%; min-height: 280px; border-radius: 12px; overflow: hidden; }

.zxing-stage {
  position: relative;
  width: 100%;
  min-height: 280px;
  border-radius: 12px;
  overflow: hidden;
  background: #000;
}
.zxing-stage video {
  display: block;
  width: 100%;
  height: auto;
  max-height: 60vh;
  object-fit: cover;
  background: #000;
}
.zxing-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  pointer-events: none;
}

.scan-color-flash {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  z-index: 45;
  transition: opacity 0.05s linear;
}
.scan-color-flash.show { opacity: 1; transition: none; }
.scan-flash-ok { background: rgba(46, 204, 90, 0.55); }
.scan-flash-dup { background: rgba(241, 196, 15, 0.6); }
.scan-flash-err { background: rgba(231, 76, 60, 0.55); }

.scan-toolbar {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
  position: relative;
}
.scan-tool {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 56px;
  padding: 8px 6px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.28);
  color: var(--text, #eee);
  cursor: pointer;
  font: inherit;
  font-size: 11px;
  line-height: 1.1;
  width: 100%;
}
.scan-tool svg { width: 22px; height: 22px; }
.scan-tool.on {
  border-color: var(--ticket, #7dd3fc);
  background: rgba(125, 211, 252, 0.18);
  color: var(--ticket, #7dd3fc);
}
.scan-tool.disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.scan-menu {
  position: relative;
  min-width: 0;
}
.scan-menu-toggle .scan-burger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  width: 18px;
  height: 14px;
}
.scan-menu-toggle .scan-burger span {
  display: block;
  height: 2px;
  border-radius: 1px;
  background: currentColor;
}
.scan-menu-panel {
  position: absolute;
  right: 0;
  bottom: calc(100% + 8px);
  z-index: 5;
  min-width: 200px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card, #1a1714);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
  text-align: left;
}
.scan-menu-panel .scan-logs-toggle {
  margin: 0;
  color: var(--text, #eee);
}

.app-footer {
  max-width: 1100px;
  margin: 0 auto;
  padding: 8px 18px 28px;
}
.app-footer .scanner-settings-footer {
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
}
.app-footer .scanner-settings-footer > summary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: auto;
  padding: 4px 8px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  list-style: none;
}
.app-footer .scanner-settings-footer > summary::-webkit-details-marker { display: none; }
.app-footer .scanner-settings-footer > summary:hover {
  color: var(--ticket);
  background: rgba(255, 255, 255, 0.04);
}
.app-footer .scanner-settings-footer[open] {
  margin-top: 4px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.18);
}
.app-footer .scanner-settings-footer[open] > summary {
  margin-bottom: 4px;
  color: var(--ticket);
  font-weight: 600;
}

.scanner-settings {
  margin: 14px 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.18);
}
.scanner-settings > summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--ticket);
}
.scanner-settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px 10px;
  margin-top: 12px;
}
.scanner-settings-grid label {
  display: grid;
  gap: 4px;
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}
.scanner-settings-grid label.check {
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 8px;
}
.scanner-settings-grid input,
.scanner-settings-grid select {
  width: 100%;
  min-width: 0;
  padding: 6px 8px;
  font-size: 13px;
}
.scanner-settings-grid input[type="checkbox"] {
  width: auto;
  margin: 0;
}
.scanner-settings-actions { margin-top: 10px; }
.scanner-debug,
.scanner-debug-live {
  display: none;
  margin: 10px 0 0;
  max-height: 140px;
  overflow: auto;
  padding: 8px 10px;
  border-radius: 10px;
  background: #0d0b09;
  color: #9dcf8a;
  font: 11px/1.35 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  text-align: left;
  white-space: pre-wrap;
  word-break: break-word;
}
html.scan-logs-on .scanner-debug,
html.scan-logs-on .scanner-debug-live {
  display: block;
}

.scan-logs-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
}
.scan-logs-toggle input { width: auto; margin: 0; }
.scan-frame .scan-logs-toggle {
  justify-content: center;
  color: var(--text, #ccc);
}

.home-actions { display: grid; gap: 12px; margin-top: 18px; }
.home-actions a { display: block; text-align: center; padding: 16px; border-radius: 14px; }

.catalog-page { background: radial-gradient(900px 460px at 82% -10%, rgba(226,75,50,.14), transparent 60%), var(--bg); }
.catalog-top { min-height: 68px; }
.catalog-top .btn { margin-left: auto; }
.catalog-wrap { max-width: 1240px; padding-top: 30px; }
.catalog-hero { display: flex; align-items: center; justify-content: space-between; gap: 18px; min-height: 280px; padding: 24px 4px 30px; }
.catalog-hero .eyebrow, .catalog-section-heading .eyebrow { margin: 0 0 12px; color: var(--ticket); }
.catalog-hero h1 { margin: 0 0 16px; font-size: clamp(40px, 7vw, 76px); line-height: 1.12; }
.catalog-hero .muted { max-width: 520px; margin: 0; font-size: 17px; line-height: 1.5; }
.catalog-hero .hero-mark { width: 110px; height: 110px; font-size: 28px; }
.catalog-section { margin-top: 36px; }
.catalog-section-heading { display: flex; justify-content: space-between; align-items: end; margin: 0 0 18px; }
.catalog-section-heading h2 { margin: 0; font-size: 30px; line-height: 1.15; }
.event-catalog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr)); gap: 16px; }
.event-catalog-card { overflow: hidden; display: flex; flex-direction: column; min-width: 0; color: var(--ink); border: 1px solid var(--line); border-radius: 17px; background: linear-gradient(145deg, rgba(255,255,255,.035), transparent 60%), var(--card); box-shadow: var(--shadow); transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease; }
.event-catalog-card:hover { transform: translateY(-3px); border-color: rgba(231,240,74,.45); box-shadow: 0 22px 55px rgba(0,0,0,.42); }
.event-catalog-card:focus-visible { outline: 3px solid var(--ticket); outline-offset: 3px; }
.event-catalog-image { position: relative; overflow: hidden; display: grid; place-items: center; aspect-ratio: 16 / 9; background: radial-gradient(circle at 70% 20%, rgba(231,240,74,.18), transparent 45%), #191610; }
.event-catalog-image::after { position: absolute; inset: 35% 0 0; background: linear-gradient(180deg, transparent, rgba(15,13,10,.58)); content: ""; pointer-events: none; }
.event-catalog-image img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.event-catalog-card:hover .event-catalog-image img { transform: scale(1.04); }
.event-catalog-mark { color: rgba(231,240,74,.78); font: 600 44px/1 "Oswald", sans-serif; letter-spacing: .2em; }
.event-past-badge { position: absolute; top: 12px; left: 12px; z-index: 1; padding: 5px 10px; border: 1px solid rgba(255,255,255,.18); border-radius: 999px; background: rgba(20,16,13,.82); color: #e5dccb; font-size: 12px; }
.event-catalog-content { display: flex; flex: 1; flex-direction: column; padding: 17px; }
.event-catalog-content .eyebrow { min-height: 18px; margin: 0 0 7px; color: var(--ticket); font-size: 11px; }
.event-catalog-content h3 { margin: 0 0 8px; font-size: 22px; line-height: 1.15; }
.event-catalog-description { display: -webkit-box; overflow: hidden; min-height: 3lh; margin: 0; color: var(--muted); line-height: 1.5; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.event-catalog-footer { display: flex; justify-content: space-between; align-items: end; gap: 8px; margin-top: auto; padding-top: 18px; }
.event-catalog-price { font-size: 16px; }
.event-catalog-action { color: var(--ticket); font-size: 13px; font-weight: 600; white-space: nowrap; }
.event-catalog-card.is-past { background: rgba(34,29,23,.72); }
.event-catalog-card.is-past .event-catalog-image img { filter: saturate(.65); }
.catalog-error { color: #ff9886; }
.login-destinations { display: grid; gap: 8px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.login-destinations .btn { width: 100%; text-align: center; }
.event-visibility-options { display: grid; gap: 8px; margin: 14px 0; }
.check-row { display: flex; align-items: flex-start; gap: 10px; margin: 0; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.02); text-transform: none; letter-spacing: normal; cursor: pointer; }
.check-row > input { flex: 0 0 auto; width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--ticket); }
.check-row span { display: grid; gap: 4px; color: var(--ink); }
.check-row small { color: var(--muted); line-height: 1.4; }
.event-public .event-public-content > p { white-space: pre-wrap; }
.date-time-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.date-time-control { display: grid; grid-template-columns: minmax(0, 1fr); gap: 5px; min-width: 0; }
.date-time-control input { min-width: 0; min-height: 44px; padding-inline: 9px; }
.date-time-control input::-webkit-calendar-picker-indicator { display: none; }
.picker-trigger {
  width: 100%;
  min-height: 36px;
  padding: 8px 10px;
  color: var(--ticket);
  font-size: 12px;
  white-space: nowrap;
}
.date-time-field { min-width: 0; }
.editor-guidance { margin: 16px 0; padding: 14px; border-left: 3px solid var(--ticket); border-radius: 0 10px 10px 0; background: rgba(231,240,74,.06); }
.editor-guidance p { margin: 5px 0 0; color: var(--muted); line-height: 1.5; }
.publish-status { min-height: 48px; margin: 10px 0; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: rgba(255,255,255,.025); }
.event-publish-card .check-row { margin-top: 8px; }
.event-publish-card .btn-block { margin-top: 12px; }
.event-publish-card #publish-event { min-height: 58px; border-radius: 14px; font-size: 18px; font-weight: 700; }
.event-publish-card .btn.subtle { opacity: .78; }
@media (max-width: 520px) {
  .date-time-pair { grid-template-columns: 1fr; }
}

/* Air Datepicker — тёмная тема под Ticketman, грузится с /vendor/ */
.air-datepicker {
  --adp-font-family: "IBM Plex Sans", sans-serif;
  --adp-font-size: 14px;
  --adp-width: 278px;
  /* overlay = 100; календарь должен быть выше, иначе на телефоне его нельзя нажать */
  --adp-z-index: 110;
  --adp-background-color: #221d17;
  --adp-background-color-hover: rgba(231, 240, 74, .1);
  --adp-background-color-active: rgba(231, 240, 74, .18);
  --adp-background-color-in-range: rgba(231, 240, 74, .08);
  --adp-background-color-in-range-focused: rgba(231, 240, 74, .14);
  --adp-background-color-selected-other-month-focused: rgba(231, 240, 74, .18);
  --adp-background-color-selected-other-month: rgba(231, 240, 74, .12);
  --adp-color: #f3efe6;
  --adp-color-secondary: #a39b8c;
  --adp-accent-color: #e7f04a;
  --adp-color-current-date: #e7f04a;
  --adp-color-other-month: #6f675c;
  --adp-color-disabled: #564f45;
  --adp-color-disabled-in-range: #6f675c;
  --adp-color-other-month-hover: #f3efe6;
  --adp-border-color: rgba(255, 255, 255, .1);
  --adp-border-color-inline: rgba(255, 255, 255, .1);
  --adp-border-radius: 14px;
  --adp-border-color-cutoff: #221d17;
  --adp-day-name-color: #a39b8c;
  --adp-day-name-color-hover: #e7f04a;
  --adp-day-cell-width: 2.2em;
  --adp-day-cell-height: 2.2em;
  --adp-month-cell-height: 2.8em;
  --adp-year-cell-height: 2.8em;
  --adp-pointer-size: 10px;
  --adp-poiner-border-radius: 2px;
  --adp-pointer-offset: 14px;
  --adp-nav-height: 36px;
  --adp-nav-arrow-color: #a39b8c;
  --adp-nav-arrow-color-hover: #e7f04a;
  --adp-nav-action-size: 28px;
  --adp-nav-color-secondary: #a39b8c;
  --adp-btn-height: 34px;
  --adp-btn-color: #e7f04a;
  --adp-btn-color-hover: #f3efe6;
  --adp-btn-border-radius: 10px;
  --adp-btn-background-color-hover: rgba(231, 240, 74, .12);
  --adp-btn-background-color-active: rgba(231, 240, 74, .2);
  --adp-time-track-height: 2px;
  --adp-time-track-color: rgba(255, 255, 255, .14);
  --adp-time-track-color-hover: rgba(231, 240, 74, .45);
  --adp-time-thumb-size: 14px;
  --adp-time-color: #f3efe6;
  --adp-time-color-hover: #e7f04a;
  --adp-time-thumb-shadow: 0 1px 4px rgba(0, 0, 0, .45);
  --adp-cell-border-radius: 10px;
  --adp-cell-background-color-hover: rgba(231, 240, 74, .12);
  --adp-cell-background-color-selected: #e7f04a;
  --adp-cell-background-color-selected-hover: #f0f76a;
  --adp-cell-background-color-in-range: rgba(231, 240, 74, .1);
  --adp-cell-background-color-in-range-hover: rgba(231, 240, 74, .18);
  --adp-cell-border-color-in-range: transparent;
  --adp-cell-color-selected: #1a1712;
  --adp-cell-color-selected-hover: #1a1712;
  box-shadow: 0 18px 48px rgba(0, 0, 0, .55);
}
.air-datepicker-overlay {
  --adp-overlay-background-color: rgba(10, 8, 6, .62);
  --adp-overlay-z-index: 100;
}
#air-datepicker-global-container {
  z-index: 110;
}

/* iOS-style wheel time picker */
.tm-time-wheel {
  position: absolute;
  z-index: 120;
  padding: 10px 10px 8px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 16px;
  background: linear-gradient(160deg, rgba(255,255,255,.04), transparent 50%), #221d17;
  box-shadow: 0 18px 48px rgba(0, 0, 0, .55);
  color: var(--ink, #f3efe6);
  font-family: "IBM Plex Sans", sans-serif;
}
.tm-time-wheel-frame {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: stretch;
  height: 200px;
  overflow: hidden;
  border-radius: 12px;
  background: rgba(0, 0, 0, .18);
}
.tm-time-wheel-frame::before,
.tm-time-wheel-frame::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  z-index: 2;
  height: 80px;
  pointer-events: none;
}
.tm-time-wheel-frame::before {
  top: 0;
  background: linear-gradient(to bottom, rgba(34, 29, 23, .96), rgba(34, 29, 23, 0));
}
.tm-time-wheel-frame::after {
  bottom: 0;
  background: linear-gradient(to top, rgba(34, 29, 23, .96), rgba(34, 29, 23, 0));
}
.tm-time-wheel-highlight {
  position: absolute;
  left: 8px;
  right: 8px;
  top: 50%;
  z-index: 1;
  height: 40px;
  margin-top: -20px;
  border-radius: 10px;
  background: rgba(231, 240, 74, .14);
  border: 1px solid rgba(231, 240, 74, .28);
  pointer-events: none;
}
.tm-time-wheel-colon {
  position: relative;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 18px;
  color: var(--ticket, #e7f04a);
  font: 600 22px/1 "Oswald", sans-serif;
  pointer-events: none;
}
.tm-time-wheel-col {
  position: relative;
  z-index: 3;
  height: 200px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scroll-snap-type: y mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  outline: none;
}
.tm-time-wheel-col::-webkit-scrollbar { display: none; }
.tm-time-wheel-item {
  display: grid;
  place-items: center;
  height: 40px;
  scroll-snap-align: center;
  color: #6f675c;
  font: 500 22px/1 "Oswald", sans-serif;
  letter-spacing: .04em;
  transition: color .12s ease, transform .12s ease;
  cursor: default;
  user-select: none;
}
.tm-time-wheel-item.is-spacer { visibility: hidden; pointer-events: none; }
.tm-time-wheel-item.is-active {
  color: #f3efe6;
  transform: scale(1.08);
}
.tm-time-wheel-actions {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
}
.tm-time-wheel-btn {
  flex: 1;
  min-height: 36px;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 10px;
  background: rgba(255, 255, 255, .04);
  color: #a39b8c;
  font: 500 13px/1 "IBM Plex Sans", sans-serif;
  cursor: pointer;
}
.tm-time-wheel-btn.is-primary {
  border-color: rgba(231, 240, 74, .35);
  color: var(--ticket, #e7f04a);
  background: rgba(231, 240, 74, .1);
}
.tm-time-wheel-btn:hover { color: #f3efe6; }
@media (max-width: 820px) {
  .catalog-top .btn { order: 2; }
}
@media (max-width: 600px) {
  .catalog-top .btn { order: 2; margin-left: auto; }
  .catalog-wrap { padding-top: 14px; }
  .catalog-hero { min-height: 225px; padding-inline: 0; }
  .catalog-hero .hero-mark { width: 68px; height: 68px; font-size: 20px; }
  .event-catalog-grid { grid-template-columns: 1fr; }
  .catalog-section-heading h2 { font-size: 25px; }
}

.wallet-qr {
  position: relative;
  background: rgba(25, 22, 18, 0.9);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 18px;
  text-align: center;
}
.wallet-qr img {
  display: block;
  width: min(280px, 70vw);
  height: auto;
  margin: 0 auto;
}

/* Pass page — тёмная карточка как у публичного event */
.pass-body .wrap.pass-page { max-width: 920px; }
.pass-layout {
  display: grid;
  gap: 22px 48px;
  align-items: center;
  grid-template-columns: minmax(240px, 300px) minmax(0, 1fr);
  grid-template-areas:
    "code title"
    "code when"
    "code rules"
    "hint hint"
    "actions actions";
  border: 2px solid var(--line);
  border-radius: 24px;
  padding: 28px 32px;
  background: rgba(25, 22, 18, 0.9);
  color: var(--ink);
  box-shadow: var(--shadow);
}
.pass-layout > .pass-title { grid-area: title; align-self: end; }
.pass-layout > .pass-code { grid-area: code; }
.pass-layout > .pass-when { grid-area: when; align-self: start; }
.pass-layout > .pass-rules { grid-area: rules; align-self: start; }
.pass-layout > .pass-hint { grid-area: hint; }
.pass-layout > .pass-actions { grid-area: actions; }

.pass-title {
  margin: 0;
  color: var(--ink);
  font-family: "Oswald", "Arial Narrow", sans-serif;
  font-size: clamp(42px, 6vw, 72px);
  font-weight: 600;
  line-height: 1.12;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  text-wrap: balance;
}
.pass-when {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.45;
}
.pass-when:empty { display: none; }
.pass-hint {
  margin: 4px 0 0;
  color: #e3dbcc;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
}
.pass-hint.is-used { color: var(--stamp); }
.pass-rules {
  margin: 4px 0 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.22);
}
.pass-rules h2 {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 15px;
  letter-spacing: 0.04em;
}
.pass-rules ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 6px;
}
.pass-rules li {
  color: #d8cfbf;
  font-size: 13px;
  line-height: 1.35;
}
.pass-rules li::before {
  content: "· ";
  color: var(--ticket);
  font-weight: 700;
}
.pass-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 4px;
}
.pass-actions .btn {
  background: #16140f;
  color: #f4efe3;
  border-color: var(--line);
}
.pass-actions .btn.primary {
  background: var(--ticket);
  color: var(--ticket-ink);
  border-color: var(--ticket);
}

.pass-code {
  position: relative;
  width: min(280px, 72vw);
  aspect-ratio: 1;
  margin: 0;
  justify-self: center;
  isolation: isolate;
  container-type: size;
}
.pass-code-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 12px;
  background: #fff;
}

/* Штамп «ИСПОЛЬЗОВАН» — всегда по центру квадрата кода */
.pass-stamp {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 2;
  box-sizing: border-box;
  margin: 0;
  padding: 0.28em 0.45em;
  max-width: 92%;
  border: 3px solid var(--stamp);
  color: var(--stamp);
  background: rgba(18, 16, 12, 0.55);
  font-family: "Oswald", sans-serif;
  font-size: clamp(20px, 7.2cqi, 32px);
  font-weight: 700;
  letter-spacing: 0.12em;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
  pointer-events: none;
  transform: translate(-50%, -50%) rotate(-12deg);
  transform-origin: center center;
}

@media (max-width: 720px) {
  .pass-layout {
    grid-template-columns: 1fr;
    grid-template-areas:
      "title"
      "code"
      "when"
      "hint"
      "rules"
      "actions";
    gap: 18px;
    text-align: center;
    padding: 22px 16px 26px;
    justify-items: center;
  }
  .pass-layout > .pass-title,
  .pass-layout > .pass-when,
  .pass-layout > .pass-rules { align-self: center; }
  .pass-title {
    font-size: clamp(30px, 10vw, 44px);
    max-width: 14ch;
    line-height: 1.14;
  }
  .pass-when { font-size: 14px; }
  .pass-hint { font-size: 15px; max-width: 28ch; }
  .pass-rules { text-align: left; width: 100%; max-width: 360px; }
  .pass-actions {
    width: 100%;
    flex-direction: column;
  }
  .pass-actions .btn { width: 100%; text-align: center; }
}

.ticket-list { display: grid; gap: 10px; }
.ticket-item {
  width: 100%;
  text-align: left;
  border-radius: 14px;
  padding: 14px;
}
.ticket-item.on { outline: 2px solid var(--ticket); }

.organizer-page { display: flex; flex-direction: column; max-width: 1180px; }
.organizer-page > .organizer-hero { order: 0; }
.organizer-page > .event-context { order: 1; }
.organizer-page > .event-management-grid { order: 2; }
.organizer-page > .action-grid { order: 3; }
.organizer-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 4px 28px;
}
.organizer-hero h1 { max-width: 760px; margin: 0 0 8px; font-size: clamp(32px, 5vw, 54px); line-height: 1.05; }
.organizer-hero p { margin: 0; }
.eyebrow { color: var(--ticket); font-size: 11px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.hero-mark {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 96px;
  height: 96px;
  border: 1px solid rgba(231, 240, 74, .4);
  border-radius: 28px;
  color: var(--ticket);
  font: 600 24px "Oswald", sans-serif;
  transform: rotate(4deg);
}
.hero-mark span { color: var(--ink); }
.event-context {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 390px);
  align-items: center;
  gap: 24px;
  margin-bottom: 20px;
  border-color: rgba(231, 240, 74, .32);
  background: linear-gradient(115deg, rgba(231, 240, 74, .09), transparent 60%), var(--card);
}
.event-context h2 { margin-bottom: 4px; font-size: 24px; }
.event-context p { margin: 0; }
.context-picker label { margin-top: 0; }
.action-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: start; }
.action-card {
  min-width: 0;
  overflow: visible;
  background: linear-gradient(145deg, rgba(255,255,255,.025), transparent 60%), var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
}
.action-card[open] { border-color: rgba(231, 240, 74, .38); }
.action-card > summary {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 16px;
  align-items: center;
  gap: 12px;
  min-height: 86px;
  padding: 15px 17px;
  cursor: pointer;
  list-style: none;
}
.action-card > summary::-webkit-details-marker { display: none; }
.action-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(231, 240, 74, .1);
  color: var(--ticket);
  font: 600 17px "Oswald", sans-serif;
}
.action-summary { display: grid; gap: 3px; min-width: 0; }
.action-summary strong { font-size: 16px; }
.action-summary small { color: var(--muted); font-size: 12px; }
.action-chevron {
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg) translateY(-2px);
  transition: transform .18s ease;
}
.action-card[open] .action-chevron { transform: rotate(225deg) translate(-2px, -1px); }
.action-content { padding: 2px 18px 20px; }
.action-content > :first-child { margin-top: 8px; }
.action-content > .btn { margin-top: 12px; }
.action-content .row { align-items: end; }
.action-content .row > div { flex: 1 1 160px; }
.action-content .row > .btn { align-self: end; }
.action-content .muted { line-height: 1.5; }
.action-content .tg-actions { margin-top: 16px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 12px; }
.success-message { color: var(--ok); min-height: 1.25em; overflow-wrap: anywhere; }
.subtle { background: rgba(255,255,255,.045); }
.steps-heading { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; margin: 18px 0 8px; font-size: 13px; font-weight: 600; }
.steps-heading .small { font-weight: 400; text-align: right; }
.tariff-steps { display: grid; gap: 8px; }
.tariff-step {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) 34px;
  gap: 8px;
  align-items: end;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(0,0,0,.12);
}
.step-field { min-width: 0; margin: 0; text-transform: none; letter-spacing: 0; }
.step-control { position: relative; display: flex; align-items: center; }
.step-control input { padding-right: 34px; }
.step-control > span { position: absolute; right: 10px; color: var(--muted); font-size: 12px; pointer-events: none; }
.step-remove {
  min-width: 34px;
  width: 34px;
  height: 42px;
  padding: 0;
  border-color: transparent;
  background: transparent;
  color: var(--muted);
  font-size: 24px;
}
.step-remove:hover { color: var(--stamp); }
.batch-list-wrap { margin: 22px 0 8px; }
.batch-list-wrap h3 { margin-bottom: 10px; font-size: 17px; }
.batch-list { display: grid; gap: 8px; }
.batch-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.batch-item > div { display: grid; gap: 3px; }
.batch-item .btn, .batch-item a.btn { white-space: nowrap; text-align: center; }
.batch-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.stat-row { display: flex; flex-wrap: wrap; gap: 8px; }
.stat-chip {
  display: grid;
  gap: 2px;
  min-width: 88px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(0,0,0,.14);
}
.stat-chip strong { font: 600 22px "Oswald", sans-serif; }
.stat-chip span { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
tr.row-entered td { color: var(--ok); }
.links-box {
  margin-top: 12px;
  min-height: 120px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
}
.venue-checks {
  display: grid;
  gap: 8px;
  margin-top: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(0,0,0,.12);
  outline: none;
  box-shadow: none;
}
.venue-checks label.chk {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 6px 4px;
  text-transform: none;
  letter-spacing: 0;
  font-size: 14px;
  color: var(--ink);
  cursor: pointer;
  border: none;
  outline: none;
  box-shadow: none;
}
.venue-checks input { width: auto; min-height: 0; outline: none; }
.staff-venues { color: var(--ink); font-size: 13px; font-weight: 500; }
.staff-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}
.btn.danger.subtle {
  background: transparent;
  border-color: rgba(226, 75, 50, 0.55);
  color: #ff9b8a;
}
.btn.danger.subtle:hover {
  background: rgba(226, 75, 50, 0.16);
}
.empty-state { padding: 12px; border: 1px dashed var(--line); border-radius: 12px; }
.quote-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.quote-card { display: grid; gap: 5px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; }
.quote-card.featured { border-color: rgba(231, 240, 74, .55); background: rgba(231, 240, 74, .07); }
.quote-card > span, .quote-card > small { color: var(--muted); font-size: 11px; line-height: 1.35; }
.quote-card > strong { font: 600 20px "Oswald", sans-serif; }
.search-source { display: none; }
.search-picker { position: relative; width: 100%; }
.search-picker > input {
  min-height: 44px;
  padding-right: 38px;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 18px) 19px, calc(100% - 13px) 19px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}
.search-picker > input:focus { border-color: var(--ticket); outline: 3px solid rgba(231, 240, 74, .12); }
.search-picker-list {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 20;
  max-height: 260px;
  overflow: auto;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #211b15;
  box-shadow: 0 14px 34px rgba(0,0,0,.55);
}
.search-picker-list[hidden] {
  display: none !important;
}
.search-picker-option {
  display: block;
  width: 100%;
  min-height: 40px;
  padding: 9px 11px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  text-align: left;
  cursor: pointer;
}
.search-picker-option:hover, .search-picker-option.active, .search-picker-option[aria-selected="true"] {
  background: rgba(231, 240, 74, .12);
  color: var(--ticket);
}
.search-picker-empty { padding: 12px; color: var(--muted); font-size: 13px; }

@media (max-width: 720px) {
  .top { flex-wrap: wrap; padding: 12px; }
  .banner { font-size: 22px; padding: 16px; }
  .amount { font-size: 42px; }
  input, select, textarea, button, .btn { font-size: 16px; min-height: 44px; }
  .wrap { padding: 16px 12px 80px; }
  .organizer-hero { padding: 16px 2px 20px; }
  .hero-mark { width: 60px; height: 60px; border-radius: 18px; font-size: 18px; }
  .event-context { grid-template-columns: 1fr; gap: 12px; }
  .action-grid { grid-template-columns: 1fr; gap: 10px; }
  .form-grid { grid-template-columns: 1fr; }
  .tariff-step { grid-template-columns: repeat(2, minmax(0, 1fr)) 34px; }
  .step-field:nth-child(3) { grid-column: 1 / 3; }
  .step-remove { grid-column: 3; grid-row: 1 / 3; align-self: center; }
  .quote-grid { grid-template-columns: 1fr; }
  .quote-card { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
  .quote-card > small { grid-column: 1 / -1; }
  .steps-heading { align-items: flex-start; flex-direction: column; }
  .steps-heading .small { text-align: left; }
  .batch-item { align-items: flex-start; flex-direction: column; }
  .action-content { padding: 2px 14px 18px; }
}

.amount {
  font-family: "Oswald", sans-serif;
  font-size: 56px;
  letter-spacing: 0.04em;
}

.pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.pad button { padding: 16px 0; border-radius: 12px; font-size: 22px; font-family: "Oswald", sans-serif; }

.error { color: var(--stamp); min-height: 1.2em; }

.help-layout {
  display: grid;
  grid-template-columns: minmax(190px, 240px) minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}
.help-toc {
  position: sticky;
  top: 92px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
}
.help-toc a { color: var(--ink); font-size: 14px; padding: 5px 0; }
.help-toc a:hover { color: var(--ticket); }
.help-article section { scroll-margin-top: 96px; margin-bottom: 8px; }
.help-article h2 { margin-top: 0.2em; }
.help-article ul, .help-article ol { margin: 0.4em 0 0.8em; padding-left: 1.2em; }
.help-article li { margin: 0.25em 0; }
@media (max-width: 820px) {
  .help-layout { grid-template-columns: 1fr; }
  .help-toc { position: static; }
}
