:root {
  --bg: #0b0d10;
  --panel: rgba(255, 255, 255, 0.84);
  --ink: #111315;
  --muted: #69727d;
  --line: rgba(17, 19, 21, 0.11);
  --free-a: #f7f8f4;
  --free-b: #d8f36f;
  --pending: #f2b84b;
  --live: #20b8a7;
  --selected: #ff4f7a;
  --danger: #d94747;
  --glass: rgba(255, 255, 255, 0.76);
  --glass-dark: rgba(12, 14, 17, 0.7);
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
  --soft-shadow: 0 12px 34px rgba(0, 0, 0, 0.16);
}

* {
  box-sizing: border-box;
}

html,
body,
.app {
  width: 100%;
  height: 100%;
  min-height: 100dvh;
  margin: 0;
}

body {
  overflow: hidden;
  background:
    radial-gradient(circle at 12% 8%, rgba(255, 79, 122, 0.14), transparent 32%),
    radial-gradient(circle at 88% 78%, rgba(32, 184, 167, 0.13), transparent 34%),
    var(--bg);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

body.legal-page {
  overflow: auto;
  min-height: 100dvh;
  background:
    radial-gradient(circle at 14% 8%, rgba(255, 79, 122, 0.12), transparent 30%),
    radial-gradient(circle at 88% 74%, rgba(32, 184, 167, 0.12), transparent 32%),
    #f4f6f7;
  color: var(--ink);
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.legal-document {
  width: min(820px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 42px 0 56px;
}

.legal-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  margin-bottom: 28px;
  padding: 0 11px;
  border: 1px solid rgba(17, 19, 21, 0.1);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.84);
  color: var(--ink);
  box-shadow: var(--soft-shadow);
  text-decoration: none;
  font-weight: 900;
}

.legal-document h1 {
  margin: 0 0 18px;
  font-size: clamp(28px, 5vw, 46px);
  line-height: 1.02;
}

.legal-document h2 {
  margin: 30px 0 10px;
  font-size: 22px;
}

.legal-document p {
  margin: 0 0 14px;
  color: #31363b;
  font-size: 16px;
  line-height: 1.62;
}

.legal-document a {
  color: var(--ink);
  font-weight: 850;
  text-decoration-color: rgba(255, 79, 122, 0.55);
}

button,
input,
select,
textarea {
  outline: none;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  box-shadow: 0 0 0 3px rgba(255, 79, 122, 0.22);
  border-color: rgba(255, 79, 122, 0.52);
}

.app {
  position: relative;
}

.boot-screen {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 22px;
  background:
    radial-gradient(circle at 20% 16%, rgba(255, 79, 122, 0.14), transparent 30%),
    radial-gradient(circle at 80% 76%, rgba(32, 184, 167, 0.14), transparent 34%),
    linear-gradient(180deg, #ffffff, #f3f6f7);
  opacity: 1;
  transition: opacity 520ms ease, visibility 520ms ease;
}

.boot-screen.hidden {
  visibility: hidden;
  opacity: 0;
}

.boot-card {
  display: grid;
  justify-items: center;
  gap: 18px;
  width: min(460px, calc(100vw - 36px));
}

.boot-logo {
  width: min(260px, 72vw);
  height: auto;
  display: block;
  border-radius: 10px;
}

.boot-pixels {
  display: grid;
  grid-template-columns: repeat(14, 12px);
  gap: 5px;
  justify-content: center;
}

.boot-pixels span {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.14);
  animation: bootPixel 1800ms ease-in-out infinite;
  animation-delay: calc(var(--i) * 28ms);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.boot-copy {
  display: grid;
  gap: 5px;
  color: var(--ink);
  text-align: center;
}

.boot-copy strong {
  font-size: 17px;
  font-weight: 950;
}

.boot-copy span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.board-shell {
  --booking-drawer: min(416px, 42vw);
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}

.topbar {
  position: absolute;
  z-index: 20;
  top: 18px;
  left: 18px;
  right: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  color: #f7f8f4;
  pointer-events: none;
}

.counter-actions {
  position: absolute;
  z-index: 20;
  top: 51px;
  left: 18px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}

.visit-counter {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(16, 18, 20, 0.74), rgba(16, 18, 20, 0.56));
  color: #fff;
  backdrop-filter: blur(18px) saturate(1.2);
  box-shadow: var(--soft-shadow);
  pointer-events: none;
}

body[data-mode="admin"] .counter-actions {
  left: auto;
  right: 18px;
  top: 72px;
}

.visit-counter span,
.visit-counter em {
  color: rgba(255, 255, 255, 0.72);
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.visit-counter strong {
  font-size: 15px;
  font-weight: 950;
}

.brand,
.brand-actions,
.counter-actions,
.metrics,
.admin-nav,
.icon-button,
.favorite-button {
  pointer-events: auto;
}

.brand-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.brand {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  width: auto;
  min-height: 0;
  max-width: none;
  padding: 0;
  border: 0;
  background: #fff;
  backdrop-filter: none;
  border-radius: 12px;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.16);
  color: var(--ink);
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 0;
  overflow: hidden;
}

.brand-logo {
  display: block;
  width: auto;
  height: 28px;
  max-width: none;
  object-fit: contain;
  border-radius: 12px;
}

.brand-mark {
  flex: 0 0 auto;
  width: 13px;
  height: 13px;
  border-radius: 3px;
  background: var(--selected);
  box-shadow: inset 0 0 0 1px rgba(17, 19, 21, 0.08), 0 0 18px rgba(255, 79, 122, 0.36);
}

.favorite-button {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.58);
  color: #fff;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.18);
  font-size: 15px;
  font-weight: 950;
  line-height: 1;
  transition: transform 140ms ease, background 140ms ease, box-shadow 140ms ease;
}

.favorite-button:hover {
  transform: translateY(-1px);
  background: rgba(0, 0, 0, 0.78);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.18);
}

.metrics {
  display: flex;
  gap: 10px;
  align-items: center;
  min-width: 0;
  overflow: auto;
  scrollbar-width: none;
}

.admin-nav {
  display: inline-flex;
  gap: 8px;
}

.nav-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 13px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(16, 18, 20, 0.76), rgba(16, 18, 20, 0.58));
  color: #fff;
  backdrop-filter: blur(18px);
  text-decoration: none;
  font-weight: 800;
  transition: transform 140ms ease, background 140ms ease, border-color 140ms ease;
}

.nav-button:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.36);
  background: linear-gradient(180deg, rgba(16, 18, 20, 0.86), rgba(16, 18, 20, 0.68));
}

.metric-pill {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 8px;
  background: rgba(16, 18, 20, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(18px);
  font-size: 13px;
  white-space: nowrap;
}

.metric-pill strong {
  font-size: 14px;
}

.icon-button {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: linear-gradient(180deg, rgba(16, 18, 20, 0.76), rgba(16, 18, 20, 0.58));
  color: #fff;
  border-radius: 10px;
  backdrop-filter: blur(18px) saturate(1.2);
  font-size: 22px;
  line-height: 1;
}

.icon-button.ghost {
  background: rgba(255, 255, 255, 0.66);
  border-color: var(--line);
  color: var(--ink);
}

.stage {
  --cell-size: 10px;
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(5, 6, 7, 0.04), rgba(5, 6, 7, 0.08)),
    #050607;
  cursor: crosshair;
  user-select: none;
  touch-action: none;
  overflow: auto;
  transition: right 180ms ease;
}

.pixel-grid {
  --cols: 60;
  --rows: 36;
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(var(--cols), 1fr);
  grid-template-rows: repeat(var(--rows), 1fr);
  width: max(100%, calc(var(--cols) * var(--cell-size)));
  height: max(100%, calc(var(--rows) * var(--cell-size)));
  min-height: max(100%, calc(var(--rows) * var(--cell-size)));
}

.pixel {
  position: relative;
  min-width: 0;
  min-height: 0;
  border-right: 1px solid rgba(16, 18, 20, 0.26);
  border-bottom: 1px solid rgba(16, 18, 20, 0.26);
  background: var(--free-a);
  overflow: hidden;
}

.pixel.free {
  background: #f5f6f1;
}

.pixel.selected {
  outline: 2px solid rgba(255, 255, 255, 0.98);
  outline-offset: -2px;
  background: var(--selected);
  z-index: 3;
  box-shadow: inset 0 0 0 1px rgba(17, 19, 21, 0.16);
}

.pixel.pending {
  background: var(--pending);
  box-shadow: inset 0 0 0 1px rgba(17, 19, 21, 0.22);
}

.pixel.live {
  background: var(--live);
}

.ad-overlays {
  position: absolute;
  inset: 0 auto 0 0;
  width: max(100%, calc(var(--cols) * var(--cell-size)));
  height: max(100%, calc(var(--rows) * var(--cell-size)));
  z-index: 4;
  pointer-events: none;
}

.ad-overlay {
  position: absolute;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.82);
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.24);
  pointer-events: auto;
  text-decoration: none;
}

.ad-overlay img,
.ad-overlay video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ad-disclosure {
  position: absolute;
  left: 8px;
  bottom: 8px;
  display: grid;
  gap: 2px;
  max-width: min(260px, calc(100% - 16px));
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(14px) saturate(1.2);
  color: var(--ink);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.2);
  font-size: 11px;
  line-height: 1.25;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 120ms ease, transform 120ms ease;
  pointer-events: none;
}

.ad-disclosure strong {
  font-size: 12px;
}

.ad-overlay:hover .ad-disclosure,
.ad-overlay:focus .ad-disclosure,
.ad-overlay:focus-visible .ad-disclosure {
  opacity: 1;
  transform: translateY(0);
}

.selection-box {
  position: absolute;
  display: none;
  border: 2px solid #fff;
  background: rgba(255, 79, 122, 0.18);
  box-shadow: 0 0 0 1px rgba(16, 18, 20, 0.28), 0 12px 30px rgba(255, 79, 122, 0.12);
  pointer-events: none;
  z-index: 12;
}

.booking-panel,
.admin {
  position: absolute;
  z-index: 30;
  right: 18px;
  top: 76px;
  width: min(380px, calc(100vw - 36px));
  max-height: calc(100vh - 94px);
  overflow: auto;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(255, 255, 255, 0.72)),
    var(--panel);
  backdrop-filter: blur(22px) saturate(1.25);
  box-shadow: var(--shadow);
  transform: translateX(calc(100% + 28px));
  transition: transform 180ms ease;
}

.booking-panel.active,
.admin.active {
  transform: translateX(0);
}

@media (min-width: 761px) {
  .booking-panel {
    top: 0;
    right: 0;
    bottom: 0;
    width: var(--booking-drawer);
    max-height: none;
    padding: 86px 18px 18px;
    border-top: 0;
    border-right: 0;
    border-bottom: 0;
    border-radius: 0;
    transform: translateX(100%);
  }

  body.booking-open .stage {
    right: var(--booking-drawer);
  }

  body[data-mode="admin"].booking-open.admin-board-mode .stage {
    right: var(--booking-drawer);
  }
}

.admin {
  left: 18px;
  right: auto;
  width: min(720px, calc(100vw - 36px));
  transform: translateX(calc(-100% - 28px));
}

.admin.active {
  transform: translateX(0);
}

.panel-head,
.admin-head,
.section-title,
.module-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}

.admin-head {
  align-items: center;
  margin-bottom: 14px;
}

.admin-tabs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  padding: 5px;
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 14px;
  background: rgba(17, 19, 21, 0.06);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.68);
}

.admin-tab {
  min-height: 40px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font-weight: 900;
  transition: background 140ms ease, color 140ms ease, transform 140ms ease, box-shadow 140ms ease;
}

.admin-tab:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.46);
}

.admin-tab.active {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 8px 20px rgba(17, 19, 21, 0.12);
}

.payment-subtabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 12px;
  padding: 5px;
  border: 1px solid rgba(17, 19, 21, 0.08);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.5);
}

.payment-subtab {
  min-height: 38px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font-weight: 900;
  transition: background 140ms ease, color 140ms ease, box-shadow 140ms ease;
}

.payment-subtab.active {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 8px 20px rgba(17, 19, 21, 0.1);
}

.payment-provider {
  display: none;
}

.payment-provider.active {
  display: block;
}

.provider-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.68);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.62);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

.admin-view {
  display: none;
  gap: 14px;
  margin-top: 14px;
}

.admin-view.active {
  display: grid;
}

.module-card {
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.64);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0.54)),
    rgba(255, 255, 255, 0.56);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.76), 0 10px 28px rgba(0, 0, 0, 0.08);
}

.module-head {
  align-items: center;
  margin-bottom: 12px;
}

.date-filter {
  display: none;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.date-filter.active {
  display: grid;
}

.date-filter label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-weight: 800;
}

h2,
h3 {
  margin: 0;
  line-height: 1.08;
}

h2 {
  font-size: 25px;
}

h3 {
  font-size: 17px;
}

.selection-size {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.25;
}

.field {
  display: grid;
  gap: 8px;
  margin-top: 17px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.field small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.35;
}

.field input,
.field select,
.field textarea,
.seo-editor input,
.seo-editor textarea,
.request-editor input,
.date-filter input,
.section-title select {
  width: 100%;
  min-height: 42px;
  border: 1px solid rgba(17, 19, 21, 0.1);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--ink);
  padding: 0 12px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
  transition: border-color 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

.field input:hover,
.field select:hover,
.field textarea:hover,
.seo-editor input:hover,
.seo-editor textarea:hover,
.request-editor input:hover,
.date-filter input:hover,
.section-title select:hover {
  background: rgba(255, 255, 255, 0.96);
  border-color: rgba(17, 19, 21, 0.18);
}

.field input:disabled {
  background: rgba(17, 19, 21, 0.06);
  color: rgba(17, 19, 21, 0.38);
  cursor: not-allowed;
}

.inline-check {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  margin-top: 9px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 850;
}

.inline-check input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--selected);
}

.erid-create-check {
  padding: 10px 12px;
  border: 1px solid rgba(255, 79, 122, 0.18);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.58);
}

.seo-editor textarea,
.field textarea {
  min-height: 72px;
  padding-top: 10px;
  resize: vertical;
}

.file-field input {
  padding-top: 9px;
}

.periods {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.period-button {
  min-height: 40px;
  border: 1px solid rgba(17, 19, 21, 0.1);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--ink);
  font-weight: 800;
  transition: transform 120ms ease, background 120ms ease, border-color 120ms ease;
}

.period-button:hover {
  transform: translateY(-1px);
  background: #fff;
}

.period-button.active {
  background: linear-gradient(180deg, #16191d, #101214);
  color: #fff;
  border-color: var(--ink);
  box-shadow: 0 10px 22px rgba(17, 19, 21, 0.18);
}

.checkout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.checkout span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.checkout strong {
  display: block;
  margin-top: 3px;
  font-size: 25px;
  white-space: nowrap;
}

#priceBox.has-discount::after {
  content: "без скидки " attr(data-original-price);
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-decoration: line-through;
}

.info-note {
  margin-top: 16px;
  padding: 12px 13px;
  border: 1px solid rgba(255, 79, 122, 0.18);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.66), rgba(255, 255, 255, 0.48)),
    rgba(255, 79, 122, 0.1);
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.4;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78);
}

.promo-field small.valid {
  color: #138a7d;
}

.promo-field small.invalid {
  color: var(--danger);
}

.legal-consents {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  padding: 12px;
  border: 1px solid rgba(17, 19, 21, 0.1);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.64);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78);
}

.legal-consents label {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 9px;
  align-items: start;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.35;
}

.legal-consents input {
  width: 16px;
  height: 16px;
  margin: 1px 0 0;
  accent-color: var(--selected);
}

.legal-consents a {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 0 8px;
  border: 1px solid rgba(255, 79, 122, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.74);
  color: var(--ink);
  font-weight: 900;
  text-decoration: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78);
  transition: background 140ms ease, border-color 140ms ease, transform 140ms ease;
}

.legal-consents a:hover {
  background: rgba(255, 79, 122, 0.1);
  border-color: rgba(255, 79, 122, 0.34);
  transform: translateY(-1px);
}

.legal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.primary-button,
.text-button {
  border: 0;
  border-radius: 10px;
  font-weight: 850;
}

.primary-button {
  min-height: 46px;
  padding: 0 14px;
  background: linear-gradient(180deg, #ff6389, var(--selected));
  color: #fff;
  box-shadow: 0 14px 28px rgba(255, 79, 122, 0.24);
  transition: transform 140ms ease, box-shadow 140ms ease, opacity 140ms ease;
}

.primary-button:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 18px 34px rgba(255, 79, 122, 0.3);
}

.primary-button:disabled {
  opacity: 0.42;
  cursor: not-allowed;
  box-shadow: none;
}

.text-button {
  min-height: 34px;
  padding: 0 10px;
  background: rgba(17, 19, 21, 0.07);
  color: var(--ink);
  transition: background 140ms ease, transform 140ms ease;
}

.text-button:hover {
  background: rgba(17, 19, 21, 0.12);
  transform: translateY(-1px);
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 0;
}

.user-analytics {
  margin-top: 0;
}

.analytics-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.mini-stat {
  min-height: 88px;
  padding: 13px;
  border: 1px solid rgba(255, 255, 255, 0.68);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.74), rgba(255, 255, 255, 0.56)),
    rgba(255, 255, 255, 0.62);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

.mini-stat span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.mini-stat strong {
  display: block;
  margin-top: 10px;
  color: var(--ink);
  font-size: 24px;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.manual-views {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  margin-top: 12px;
}

.manual-views input {
  width: 100%;
  min-height: 38px;
  border: 1px solid rgba(17, 19, 21, 0.1);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--ink);
  padding: 0 12px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.section-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.connection-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(17, 19, 21, 0.1);
  background: rgba(255, 255, 255, 0.7);
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

.connection-status::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: currentColor;
  box-shadow: 0 0 0 4px rgba(105, 114, 125, 0.12);
}

.connection-status.connected {
  color: #138a7d;
  background: rgba(32, 184, 167, 0.12);
}

.connection-status.disconnected {
  color: var(--danger);
  background: rgba(217, 71, 71, 0.1);
}

.settings-grid .field {
  margin-top: 0;
}

.wide-field {
  grid-column: 1 / -1;
}

.webhook-card {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.68);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.7);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

.webhook-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.webhook-card strong {
  overflow-wrap: anywhere;
  font-size: 13px;
}

.payment-history {
  display: grid;
  gap: 10px;
}

.promo-list {
  display: grid;
  gap: 10px;
}

.promo-periods {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.promo-periods label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid rgba(17, 19, 21, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  font-size: 12px;
  font-weight: 850;
}

.promo-periods input {
  width: 14px;
  height: 14px;
  margin: 0;
  accent-color: var(--selected);
}

.payment-row,
.promo-row,
.history-empty {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.68);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.68);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

.payment-row div,
.promo-row div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.promo-row.muted-row {
  opacity: 0.58;
}

.payment-row div:last-child {
  text-align: right;
}

.payment-row strong,
.promo-row strong,
.history-empty strong {
  color: var(--ink);
  font-size: 14px;
}

.payment-row span,
.promo-row span,
.history-empty span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.history-empty {
  grid-template-columns: 1fr;
}

.stat-card {
  min-height: 96px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.68);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.68);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

.stat-card span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.stat-card strong {
  display: block;
  margin-top: 10px;
  font-size: 28px;
  letter-spacing: 0;
}

.admin-section {
  margin-top: 22px;
}

.bars {
  display: grid;
  align-items: end;
  grid-template-columns: repeat(10, minmax(13px, 1fr));
  gap: 7px;
  height: 150px;
  padding: 18px 4px 4px;
}

.bar {
  position: relative;
  min-height: 8px;
  border-radius: 6px 6px 0 0;
  background: linear-gradient(180deg, #42dacb, var(--live));
  box-shadow: 0 8px 18px rgba(32, 184, 167, 0.18);
}

.bar::after {
  content: attr(data-label);
  position: absolute;
  left: 50%;
  bottom: -18px;
  transform: translateX(-50%);
  color: var(--muted);
  font-size: 10px;
  white-space: nowrap;
}

.requests {
  display: grid;
  gap: 12px;
  margin-top: 0;
}

.request-card {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 14px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.68);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.7);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

.request-card img,
.request-card video,
.media-fallback {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 9px;
  background: #ecefeb;
}

.media-fallback {
  display: grid;
  place-items: center;
  font-size: 21px;
}

.request-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  font-weight: 850;
}

.request-meta {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.request-actions {
  display: flex;
  gap: 8px;
  margin-top: 9px;
}

.seo-editor,
.request-editor {
  display: none;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.request-editor {
  display: grid;
  padding: 10px;
  border: 1px solid rgba(17, 19, 21, 0.08);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.54);
}

.seo-editor.active {
  display: grid;
}

.seo-editor label,
.request-editor label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.seo-editor label:nth-child(2) {
  grid-column: 1 / -1;
}

.editor-check {
  grid-template-columns: 16px minmax(0, 1fr);
  align-items: center;
  align-self: end;
  min-height: 34px;
  color: var(--ink);
}

.editor-check input {
  width: 16px;
  height: 16px;
  min-height: 16px;
  margin: 0;
  accent-color: var(--selected);
}

.editor-file {
  grid-column: 1 / -1;
}

.seo-save,
.request-save {
  grid-column: 1 / -1;
  min-height: 38px;
}

.seo-editor input,
.seo-editor textarea,
.request-editor input {
  min-height: 34px;
  padding-left: 9px;
  padding-right: 9px;
  font-size: 12px;
}

.request-actions button {
  min-height: 32px;
  padding: 0 10px;
  border: 0;
  border-radius: 9px;
  font-weight: 850;
}

.approve {
  background: linear-gradient(180deg, #3ed8c9, var(--live));
  color: #fff;
}

.reject {
  background: rgba(217, 71, 71, 0.12);
  color: var(--danger);
}

.delete {
  background: linear-gradient(180deg, #ee6363, var(--danger));
  color: #fff;
}

.status {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  color: #fff;
  font-size: 11px;
  font-weight: 850;
}

.status.pending {
  background: var(--pending);
  color: #2f2210;
}

.status.live {
  background: var(--live);
}

.status.rejected {
  background: var(--danger);
}

.toast {
  position: absolute;
  z-index: 50;
  left: 50%;
  bottom: 24px;
  max-width: min(520px, calc(100vw - 36px));
  padding: 12px 15px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  background: rgba(16, 18, 20, 0.82);
  backdrop-filter: blur(16px) saturate(1.2);
  color: #fff;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translate(-50%, 18px);
  transition: opacity 160ms ease, transform 160ms ease;
  pointer-events: none;
  text-align: center;
}

.toast.active {
  opacity: 1;
  transform: translate(-50%, 0);
}

.login-screen {
  position: absolute;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 18px;
  background:
    linear-gradient(rgba(10, 12, 15, 0.78), rgba(10, 12, 15, 0.84)),
    radial-gradient(circle at 22% 18%, rgba(32, 184, 167, 0.2), transparent 28%),
    radial-gradient(circle at 78% 76%, rgba(255, 79, 122, 0.2), transparent 30%);
}

.login-screen.hidden {
  display: none;
}

.login-card {
  width: min(420px, 100%);
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.76)),
    var(--panel);
  backdrop-filter: blur(22px) saturate(1.25);
  box-shadow: var(--shadow);
}

.login-brand {
  width: fit-content;
  margin-bottom: 18px;
  min-height: 38px;
}

.login-card h1 {
  margin: 0;
  font-size: 30px;
  line-height: 1.1;
}

.login-button {
  width: 100%;
  margin-top: 18px;
}

.login-error {
  min-height: 20px;
  margin: 10px 0 0;
  color: var(--danger);
  font-size: 13px;
  font-weight: 800;
}

.locked .stage {
  cursor: default;
}

.free-placement strong {
  color: var(--live);
}

@keyframes bootPixel {
  0%,
  100% {
    background: rgba(255, 255, 255, 0.14);
    transform: scale(0.92);
  }

  38% {
    background: #ff4f7a;
    transform: scale(1);
  }

  70% {
    background: #20b8a7;
    transform: scale(0.98);
  }
}

@media (max-width: 760px) {
  .stage {
    --cell-size: 12px;
    touch-action: pinch-zoom;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }

  .pixel-grid {
    grid-template-columns: repeat(var(--cols), var(--cell-size));
    grid-template-rows: repeat(var(--rows), var(--cell-size));
    width: calc(var(--cols) * var(--cell-size));
    height: calc(var(--rows) * var(--cell-size));
    min-width: calc(var(--cols) * var(--cell-size));
    min-height: calc(var(--rows) * var(--cell-size));
  }

  .ad-overlays {
    width: calc(var(--cols) * var(--cell-size));
    height: calc(var(--rows) * var(--cell-size));
    min-width: calc(var(--cols) * var(--cell-size));
    min-height: calc(var(--rows) * var(--cell-size));
  }

  body {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100dvh;
  }

  body[data-mode="public"] {
    position: static;
    height: auto;
    min-height: 100dvh;
    overflow: auto;
  }

  body[data-mode="public"] .app,
  body[data-mode="public"] .board-shell {
    height: auto;
    min-height: 100dvh;
    overflow: visible;
  }

  body[data-mode="public"] .stage {
    position: relative;
    inset: auto;
    width: 100%;
    height: 100dvh;
    min-height: 560px;
  }

  .topbar {
    top: 10px;
    left: 10px;
    right: 10px;
    gap: 8px;
    align-items: flex-start;
  }

  .counter-actions {
    top: 41px;
    left: 10px;
    right: auto;
  }

  .visit-counter {
    min-height: 32px;
    padding: 0 9px;
    border-radius: 10px;
  }

  body[data-mode="public"] .counter-actions {
    top: 39px;
  }

  body[data-mode="admin"] .counter-actions {
    top: 45px;
    right: 10px;
    left: auto;
  }

  .brand {
    min-height: 0;
    width: auto;
    padding: 0;
    border-radius: 9px;
    font-size: 14px;
  }

  .brand-logo {
    height: 26px;
    max-width: none;
  }

  .favorite-button {
    width: 36px;
    height: 36px;
    border-radius: 9px;
  }

  .metrics {
    display: none;
  }

  .admin-nav {
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px;
    max-width: 52vw;
  }

  .nav-button {
    min-height: 38px;
    padding: 0 9px;
    font-size: 12px;
    white-space: nowrap;
  }

  .icon-button {
    width: 38px;
    height: 38px;
  }

  .booking-panel,
  .admin {
    left: 10px;
    right: 10px;
    top: auto;
    bottom: max(10px, env(safe-area-inset-bottom));
    width: auto;
    max-height: min(68dvh, 620px);
    padding: 14px;
    transform: translateY(calc(100% + 20px));
  }

  body[data-mode="public"] .booking-panel {
    position: static;
    display: none;
    width: auto;
    max-height: none;
    margin: 10px;
    transform: none;
    scroll-margin-top: 10px;
  }

  .booking-panel.active,
  .admin.active {
    transform: translateY(0);
  }

  body[data-mode="public"] .booking-panel.active {
    display: block;
    transform: none;
  }

  body[data-mode="admin"] .admin {
    top: 62px;
    bottom: max(10px, env(safe-area-inset-bottom));
    max-height: none;
  }

  .admin-head,
  .module-head,
  .provider-head {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-tabs {
    grid-template-columns: 1fr;
  }

  .payment-subtabs {
    grid-template-columns: 1fr;
  }

  body[data-mode="admin"] .booking-panel.active {
    max-height: min(58dvh, 520px);
    z-index: 42;
  }

  .periods,
  .stat-grid,
  .analytics-grid,
  .settings-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .stat-card {
    min-height: 76px;
    padding: 11px;
  }

  .stat-card strong {
    font-size: 21px;
  }

  .section-title {
    align-items: stretch;
    flex-direction: column;
  }

  .section-title select {
    min-height: 38px;
  }

  .date-filter {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .bars {
    min-width: 100%;
    height: 96px;
    gap: 5px;
    overflow: hidden;
  }

  .checkout {
    align-items: stretch;
    flex-direction: column;
  }

  .primary-button {
    width: 100%;
  }

  .request-card {
    grid-template-columns: 52px minmax(0, 1fr);
    gap: 9px;
    padding: 9px;
  }

  .payment-row,
  .promo-row {
    grid-template-columns: 1fr;
  }

  .manual-views {
    grid-template-columns: 1fr;
  }

  .payment-row div:last-child,
  .promo-row div:last-child {
    text-align: left;
  }

  .request-card img,
  .request-card video,
  .media-fallback {
    width: 52px;
    height: 52px;
  }

  .ad-disclosure {
    left: 5px;
    right: 5px;
    bottom: 5px;
    max-width: none;
    padding: 6px 7px;
    font-size: 10px;
  }

  .request-title {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .request-actions {
    flex-wrap: wrap;
  }

  .request-actions button {
    flex: 1 1 120px;
  }

  .seo-editor,
  .request-editor {
    grid-template-columns: 1fr;
  }

  .seo-editor label:nth-child(2),
  .editor-file,
  .seo-save,
  .request-save {
    grid-column: auto;
  }

  .login-screen {
    padding: 12px;
  }

  .login-card {
    padding: 16px;
  }

  .login-brand {
    min-height: 36px;
  }

  .login-card h1 {
    font-size: 24px;
  }

  .toast {
    bottom: max(14px, env(safe-area-inset-bottom));
    width: calc(100vw - 20px);
    padding: 10px 12px;
    font-size: 13px;
  }
}

@media (max-width: 430px) {
  .topbar {
    align-items: stretch;
    flex-direction: column;
    right: auto;
  }

  .brand {
    width: fit-content;
  }

  body[data-mode="admin"] .topbar {
    right: 10px;
  }

  .admin-nav {
    max-width: none;
    justify-content: flex-start;
  }

  .nav-button {
    flex: 1 1 auto;
  }

  body[data-mode="admin"] .admin {
    top: 104px;
  }

  .booking-panel,
  .admin {
    left: 8px;
    right: 8px;
    padding: 12px;
  }

  h2 {
    font-size: 21px;
  }

  .periods,
  .stat-grid,
  .analytics-grid,
  .settings-grid,
  .date-filter {
    grid-template-columns: 1fr;
  }

  .checkout strong {
    font-size: 22px;
  }

  .request-card {
    grid-template-columns: 1fr;
  }

  .request-card img,
  .request-card video,
  .media-fallback {
    width: 100%;
    height: 110px;
  }
}
