:root {
  --tg-safe-area-inset-top: env(safe-area-inset-top, 0px);
  --tg-safe-area-inset-bottom: env(safe-area-inset-bottom, 0px);
  --tg-content-safe-area-inset-top: 0px;
  --tg-content-safe-area-inset-bottom: 0px;
  --app-top-padding: max(12px, var(--tg-safe-area-inset-top));
  --app-bottom-padding: max(12px, var(--tg-safe-area-inset-bottom));
  --browser-viewport-height: 100vh;
  --viewport-height: 100vh;
  --viewport-stable-height: 100vh;

  --page-max: 1180px;
  --page-gutter: 16px;
  --admin-bar-height: 74px;

  --bg: #0b0d12;
  --bg-elev: #11141b;
  --panel: #161a23;
  --panel-soft: #1c2230;
  --panel-strong: #232a3a;
  --ink: #f4f5f8;
  --ink-soft: #e1e3eb;
  --muted: #8a92a6;
  --muted-strong: #aab1c4;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.14);

  --gold: #f6c453;
  --gold-soft: rgba(246, 196, 83, 0.14);
  --gold-strong: #ffd57a;
  --gold-ink: #1a130a;

  --red: #ff6b7a;
  --red-soft: rgba(255, 107, 122, 0.16);
  --green: #5fd6a5;
  --green-soft: rgba(95, 214, 165, 0.14);
  --blue: #79a4ff;

  --shadow-card: 0 12px 32px rgba(0, 0, 0, 0.36);
  --shadow-cta: 0 10px 24px rgba(246, 196, 83, 0.24);

  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 18px;
  --radius-xl: 24px;

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  max-width: 100%;
  height: var(--viewport-stable-height);
  margin: 0;
  overflow: hidden;
  overflow-x: hidden;
  position: fixed;
  inset: 0;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  background: var(--bg);
  color: var(--ink);
  font-family: "Inter", "SF Pro Display", ui-sans-serif, system-ui, -apple-system,
    BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: 0;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  border: 0;
  cursor: pointer;
  background: transparent;
}

a {
  color: inherit;
}

img,
video,
canvas,
svg {
  max-width: 100%;
}

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
}

/* ===== Shell ===== */

.app-shell {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: var(--viewport-stable-height);
  height: var(--viewport-stable-height);
  display: grid;
  grid-template-rows: auto 1fr auto;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 20% -10%, rgba(246, 196, 83, 0.10), transparent 42%),
    radial-gradient(circle at 110% 30%, rgba(121, 164, 255, 0.08), transparent 50%),
    linear-gradient(180deg, #0e1118 0%, #0b0d12 56%, #08090d 100%);
  padding-top: var(--app-top-padding);
  padding-left: env(safe-area-inset-left, 0px);
  padding-right: env(safe-area-inset-right, 0px);
  transition: padding-top 180ms ease, height 180ms ease;
}

.user-header {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  width: min(var(--page-max), 100%);
  max-width: 100%;
  min-width: 0;
  margin: 0 auto;
  min-height: 60px;
  padding: var(--space-2) var(--page-gutter);
}

.avatar-wrap {
  position: relative;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
}

.avatar,
.avatar-fallback {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--line-strong);
  background: linear-gradient(135deg, var(--gold), #b88330);
}

.avatar.hidden,
.avatar-fallback.hidden,
.hidden {
  display: none !important;
}

.avatar-fallback {
  display: grid;
  place-items: center;
  color: var(--gold-ink);
  font-weight: 800;
  font-size: 16px;
}

.user-meta {
  min-width: 0;
  flex: 1;
}

.user-name {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-login {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-spacer {
  flex: 1;
}

.header-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  max-width: 100%;
  height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.04);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-action:hover {
  background: rgba(255, 255, 255, 0.07);
}

.content {
  width: min(var(--page-max), 100%);
  max-width: 100%;
  min-width: 0;
  margin: 0 auto;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  padding: var(--space-2) var(--page-gutter)
    max(var(--space-5), calc(var(--app-bottom-padding) + var(--space-2)));
  scroll-behavior: smooth;
}

.content.with-summary {
  padding-bottom: 168px;
}

.screen-title {
  margin: 4px 0 var(--space-4);
  font-size: 26px;
  line-height: 1.18;
  letter-spacing: -0.02em;
  font-weight: 800;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.screen-subtitle {
  margin: -8px 0 var(--space-4);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.muted {
  color: var(--muted);
  overflow-wrap: anywhere;
}

/* ===== Loading / empty ===== */

.loading {
  min-height: 56vh;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 14px;
}

.skeleton {
  position: relative;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.04);
  border-radius: var(--radius-md);
}

.skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.06),
    transparent
  );
  animation: skeleton 1.2s linear infinite;
}

@keyframes skeleton {
  from { transform: translateX(-100%); }
  to { transform: translateX(100%); }
}

.skeleton-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
}

.skeleton-card {
  height: 140px;
}

.empty-panel {
  display: grid;
  gap: var(--space-3);
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  padding: var(--space-6);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.02);
  color: var(--muted);
  text-align: center;
  font-size: 14px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.empty-panel.compact {
  padding: var(--space-4);
  min-height: 72px;
  align-content: center;
}

/* ===== Movie list ===== */

.movies-page-header {
  display: grid;
  gap: 10px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin: 4px 0 var(--space-4);
}

.movies-page-header .screen-title {
  margin: 0;
}

.movies-page-header .date-selector {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  margin: 0;
  padding-bottom: 4px;
  justify-content: flex-start;
}

.movie-list {
  display: grid;
  gap: var(--space-3);
}

.date-selector {
  display: flex;
  gap: 8px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin: 0 0 var(--space-4);
  overflow-x: auto;
  padding-bottom: 4px;
  overscroll-behavior-x: contain;
  scroll-padding-inline: var(--page-gutter);
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.date-selector::-webkit-scrollbar {
  display: none;
}

.date-chip {
  flex: 0 0 auto;
  min-width: 116px;
  min-height: 56px;
  display: grid;
  gap: 2px;
  align-content: center;
  padding: 9px 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.04);
  text-align: left;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.date-chip span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.date-chip strong {
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
}

.date-chip.active {
  border-color: rgba(246, 196, 83, 0.42);
  background: var(--gold-soft);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 8px 20px rgba(246, 196, 83, 0.08);
}

.movie-card {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: var(--space-3);
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 142px;
  padding: var(--space-3);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.015)),
    var(--panel);
  box-shadow: var(--shadow-card);
  text-align: left;
  color: inherit;
  transition: transform 160ms ease, border-color 160ms ease;
  overflow: hidden;
}

.movie-card > * {
  min-width: 0;
}

.movie-card:active {
  transform: scale(0.99);
}

.movie-card:hover {
  border-color: var(--line-strong);
}

.poster {
  width: 100px;
  height: 134px;
  border-radius: var(--radius-md);
  object-fit: cover;
  background: linear-gradient(150deg, rgba(246, 196, 83, 0.85), rgba(255, 255, 255, 0.08));
}

.poster.empty {
  display: grid;
  place-items: center;
  color: var(--gold-ink);
  font-weight: 900;
  font-size: 28px;
  letter-spacing: 0.02em;
}

.card-body {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 6px;
}

.card-title {
  font-size: 16px;
  font-weight: 750;
  line-height: 1.22;
  letter-spacing: -0.01em;
  overflow-wrap: anywhere;
}

.card-description {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
  max-width: 100%;
}

.pill {
  flex: 0 1 auto;
  min-width: 0;
  max-width: 100%;
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  color: var(--gold-strong);
  background: var(--gold-soft);
  border: 1px solid rgba(246, 196, 83, 0.24);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pill.muted-pill {
  color: var(--muted-strong);
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--line);
}

.pill.success-pill {
  color: var(--green);
  background: var(--green-soft);
  border-color: rgba(95, 214, 165, 0.32);
}

.pill.vip-pill {
  color: #1a130a;
  background: linear-gradient(180deg, #ffe9a8, #f6c453);
  border-color: rgba(246, 196, 83, 0.45);
}

.pill.danger-pill {
  color: var(--red);
  background: var(--red-soft);
  border-color: rgba(255, 107, 122, 0.32);
}

/* ===== Buttons ===== */

.primary-button,
.pay-button {
  max-width: 100%;
  min-width: 0;
  min-height: 48px;
  border-radius: var(--radius-md);
  padding: 12px 18px;
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 0.01em;
  color: var(--gold-ink);
  background: linear-gradient(180deg, var(--gold-strong), var(--gold));
  box-shadow: var(--shadow-cta);
  transition: transform 120ms ease, box-shadow 120ms ease, opacity 120ms ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.compact-button {
  min-height: 40px;
  padding: 9px 14px;
  border-radius: 14px;
  font-size: 14px;
}

.primary-button:hover,
.pay-button:hover {
  filter: brightness(1.03);
}

.primary-button:active,
.pay-button:active {
  transform: translateY(1px);
}

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

.ghost-button {
  max-width: 100%;
  min-width: 0;
  min-height: 44px;
  border-radius: var(--radius-md);
  padding: 10px 16px;
  font-weight: 600;
  font-size: 14px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line-strong);
  transition: background 120ms ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ghost-button:hover {
  background: rgba(255, 255, 255, 0.08);
}

.ghost-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.ghost-button.danger {
  color: var(--red);
  border-color: rgba(255, 107, 122, 0.32);
  background: var(--red-soft);
}

.icon-button {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  color: var(--muted-strong);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
}

.icon-button:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.09);
}

.icon-button.danger {
  color: var(--red);
}

.back-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 6px 12px 6px 8px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line-strong);
  margin-bottom: var(--space-3);
}

.back-button:hover {
  background: rgba(255, 255, 255, 0.07);
}

/* ===== Detail / seats / combos ===== */

.detail-hero {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: var(--space-4);
  align-items: start;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  padding: var(--space-4);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.detail-hero > * {
  min-width: 0;
}

.detail-hero .poster {
  width: 120px;
  height: 168px;
}

.trailer-section {
  display: block;
  width: min(100%, 780px);
  margin-left: auto;
  margin-right: auto;
  touch-action: pan-y;
}

.trailer-section-empty {
  width: 100%;
}

.trailer-frame,
.trailer-iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.trailer-frame {
  background: #050609;
  border: 1px solid var(--line);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
  isolation: isolate;
}

.trailer-iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #050609;
  color-scheme: dark;
}

.trailer-placeholder {
  padding: 14px 16px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-lg);
  color: var(--muted-strong);
  background: var(--panel);
  font-size: 14px;
  text-align: center;
}

.section {
  margin-top: var(--space-5);
}

.section h2 {
  margin: 0 0 var(--space-3);
  font-size: 17px;
  line-height: 1.2;
  letter-spacing: -0.01em;
  font-weight: 700;
}

.seat-map {
  display: grid;
  gap: 9px;
  padding: var(--space-4);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
}

.seat-row {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 10px;
  align-items: center;
  min-width: max-content;
}

.row-label {
  color: var(--muted);
  font-size: 12px;
  text-align: right;
  font-weight: 600;
}

.seat-sections {
  display: flex;
  justify-content: center;
  gap: 14px;
}

.seat-section {
  display: flex;
  gap: 6px;
}

.seat {
  position: relative;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 8px 8px 12px 12px;
  background: #f0eadd;
  color: #170f06;
  font-size: 12px;
  font-weight: 800;
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.14);
  transition: transform 120ms ease, background 120ms ease;
}

.seat-number {
  line-height: 1;
}

.seat-badge {
  position: absolute;
  left: 50%;
  bottom: -7px;
  min-width: 21px;
  padding: 1px 4px;
  border-radius: 999px;
  color: #1a130a;
  background: linear-gradient(180deg, #fff1bb, #f6c453);
  border: 1px solid rgba(26, 19, 10, 0.12);
  font-size: 7px;
  font-weight: 900;
  line-height: 1.1;
  transform: translateX(-50%);
  pointer-events: none;
}

.seat:hover:not(:disabled) {
  transform: translateY(-1px);
}

.seat.selected {
  background: linear-gradient(180deg, #7ee7b2, var(--green));
  color: #06130d;
  box-shadow: inset 0 -3px 0 rgba(0, 74, 39, 0.28), 0 0 0 1px rgba(95, 214, 165, 0.22);
}

.seat.vip-seat {
  color: #1a130a;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.32), rgba(255, 255, 255, 0)),
    linear-gradient(145deg, #ffe9a8, #f6c453 58%, #c9952d);
  border: 1px solid rgba(255, 226, 142, 0.64);
  box-shadow: inset 0 -3px 0 rgba(120, 78, 14, 0.22), 0 0 0 1px rgba(246, 196, 83, 0.18);
}

.seat.vip-seat.selected {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0)),
    linear-gradient(180deg, #7ee7b2, var(--green));
  color: #06130d;
  border: 2px solid var(--gold-strong);
  box-shadow: inset 0 -3px 0 rgba(0, 74, 39, 0.28), 0 0 0 1px rgba(246, 196, 83, 0.36);
}

.seat.SOLD,
.seat.ADMIN_BLOCKED {
  color: rgba(255, 255, 255, 0.7);
  background: rgba(255, 107, 122, 0.36);
  box-shadow: none;
}

.seat.TEMP_RESERVED,
.seat.PROTECTED_REAR,
.seat.SYSTEM_RESERVED {
  color: rgba(255, 255, 255, 0.55);
  background: rgba(120, 120, 138, 0.36);
  box-shadow: none;
}

.seat.TEMP_RESERVED .seat-badge,
.seat.PROTECTED_REAR .seat-badge,
.seat.SYSTEM_RESERVED .seat-badge,
.seat.SOLD .seat-badge,
.seat.ADMIN_BLOCKED .seat-badge {
  opacity: 0.5;
}

.seat:disabled {
  cursor: not-allowed;
}

.screen-bar {
  width: 76%;
  min-width: 240px;
  height: 28px;
  margin: 0 auto var(--space-3);
  display: grid;
  place-items: center;
  color: #1a130a;
  background: linear-gradient(90deg, transparent, var(--gold-strong) 50%, transparent);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.18em;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-3);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}

.legend-dot {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  background: #f0eadd;
}

.legend-dot.selected {
  background: linear-gradient(180deg, #7ee7b2, var(--green));
}

.legend-dot.sold {
  background: rgba(255, 107, 122, 0.6);
}

.legend-dot.reserved {
  background: rgba(120, 120, 138, 0.6);
}

.legend-dot.vip {
  background: linear-gradient(145deg, #ffe9a8, #f6c453 58%, #c9952d);
  border: 1px solid rgba(246, 196, 83, 0.5);
}

.combo-grid {
  display: grid;
  gap: var(--space-3);
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.combo-card {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr) auto;
  gap: var(--space-3);
  align-items: center;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  padding: var(--space-3);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel);
  box-shadow: var(--shadow-card);
}

.combo-img {
  width: 84px;
  height: 70px;
  border-radius: var(--radius-md);
  object-fit: cover;
  background: linear-gradient(135deg, rgba(246, 196, 83, 0.6), rgba(121, 164, 255, 0.4));
}

.combo-title {
  min-width: 0;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.005em;
  overflow-wrap: anywhere;
}

.combo-desc {
  min-width: 0;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.combo-meta {
  margin-top: 6px;
}

.combo-price {
  display: inline-flex;
  margin-top: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--gold-soft);
  color: var(--gold-strong);
  font-size: 12px;
  font-weight: 700;
}

.stepper {
  display: grid;
  grid-template-columns: 32px 28px 32px;
  gap: 4px;
  align-items: center;
  min-width: 0;
}

.stepper button {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.07);
  font-weight: 800;
  font-size: 16px;
}

.stepper button:hover {
  background: rgba(255, 255, 255, 0.12);
}

.stepper span {
  text-align: center;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

/* ===== Summary bar ===== */

.summary {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--space-3);
  align-items: center;
  max-width: 100%;
  overflow-x: hidden;
  padding: var(--space-3) var(--space-4)
    max(var(--space-3), calc(var(--app-bottom-padding) + var(--space-2)));
  border-top: 1px solid var(--line);
  background: rgba(11, 13, 18, 0.94);
  backdrop-filter: blur(18px);
}

.summary.hidden {
  display: none;
}

.summary-lines {
  display: grid;
  gap: 3px;
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
}

.summary-lines strong {
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

/* ===== Status panels ===== */

.payment-panel,
.status-panel {
  display: grid;
  gap: var(--space-3);
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  padding: var(--space-5);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel);
  box-shadow: var(--shadow-card);
}

.warning {
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  border: 1px solid rgba(246, 196, 83, 0.24);
  background: rgba(246, 196, 83, 0.08);
  color: var(--gold-strong);
  line-height: 1.5;
  font-size: 13px;
}

.danger-warning {
  border-color: rgba(255, 107, 122, 0.28);
  background: rgba(255, 107, 122, 0.08);
  color: #ff9aa5;
}

.two-actions {
  display: grid;
  gap: 10px;
}

/* ===== Admin entry on movies screen ===== */

.admin-entry {
  margin: -2px 0 var(--space-4);
}

/* ===== Admin dashboard ===== */

.content.admin-content {
  display: grid;
  align-content: start;
  gap: var(--space-4);
  max-width: 100%;
  overflow-x: hidden;
  padding-bottom: max(112px, calc(var(--app-bottom-padding) + var(--admin-bar-height) + 24px));
}

.admin-tabs {
  position: fixed;
  left: 50%;
  right: auto;
  bottom: max(10px, calc(var(--app-bottom-padding) + 8px));
  z-index: 50;
  display: flex;
  gap: 5px;
  width: min(720px, calc(100% - 16px));
  max-width: calc(100% - 16px);
  min-width: 0;
  min-height: var(--admin-bar-height);
  padding: 7px;
  margin: 0;
  border-radius: 24px;
  border: 1px solid var(--line-strong);
  background: rgba(17, 20, 27, 0.92);
  backdrop-filter: blur(18px);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.44);
  overflow-x: auto;
  overscroll-behavior-x: none;
  scrollbar-width: none;
  transform: translateX(-50%);
}

.admin-tabs::-webkit-scrollbar {
  display: none;
}

.admin-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 3px;
  flex: 0 0 86px;
  width: 86px;
  min-width: 0;
  min-height: 52px;
  padding: 7px 3px;
  border-radius: 16px;
  border: 0;
  font-size: 10px;
  line-height: 1.05;
  font-weight: 750;
  color: var(--muted-strong);
  background: rgba(255, 255, 255, 0.04);
  transition: color 140ms ease, background 140ms ease, transform 120ms ease;
  white-space: normal;
  overflow: hidden;
  scroll-snap-align: center;
}

.date-group-title {
  margin: var(--space-2) 0 0;
  color: var(--muted-strong);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.admin-tab-icon {
  flex: 0 0 auto;
  font-size: 16px;
  line-height: 1;
}

.admin-tab-label {
  display: block;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.admin-tab:active {
  transform: translateY(1px);
}

.admin-tab.active {
  color: var(--gold-ink);
  background: linear-gradient(180deg, var(--gold-strong), var(--gold));
  box-shadow: 0 10px 20px rgba(246, 196, 83, 0.18);
}

#adminPanel {
  display: grid;
  gap: var(--space-4);
  min-width: 0;
}

.admin-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  flex-wrap: wrap;
  min-width: 0;
  max-width: 100%;
}

.admin-section-header h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.admin-section-header .actions {
  display: flex;
  gap: var(--space-2);
  min-width: 0;
  max-width: 100%;
}

.admin-card {
  display: grid;
  gap: var(--space-3);
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  padding: var(--space-5);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel);
  box-shadow: var(--shadow-card);
}

.admin-card h3 {
  margin: 0 0 var(--space-2);
  font-size: 16px;
  font-weight: 700;
}

.admin-card .card-help {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  margin: -4px 0 0;
}

/* ===== Forms ===== */

.field-grid {
  display: grid;
  gap: var(--space-3);
  min-width: 0;
}

.field {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.field label,
.field-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted-strong);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.field input,
.field textarea,
.field select,
.input,
.textarea,
.select {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  outline: none;
  resize: vertical;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.04);
  font-size: 14px;
  transition: border-color 140ms ease, background 140ms ease;
  -webkit-appearance: none;
  appearance: none;
}

.field textarea,
.textarea {
  min-height: 92px;
  line-height: 1.45;
}

.field select,
.select {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path fill='%238a92a6' d='M6 8 0 0h12z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

.field input::placeholder,
.field textarea::placeholder,
.input::placeholder,
.textarea::placeholder {
  color: rgba(255, 255, 255, 0.34);
}

.field input:focus,
.field textarea:focus,
.field select:focus,
.input:focus,
.textarea:focus,
.select:focus {
  border-color: var(--gold);
  background: rgba(255, 255, 255, 0.07);
}

.field input.invalid,
.field textarea.invalid,
.input.invalid,
.textarea.invalid {
  border-color: var(--red);
  background: rgba(255, 107, 122, 0.08);
}

.field-error {
  font-size: 12px;
  color: var(--red);
}

.phone-dialog {
  gap: var(--space-3);
}

.complaint-dialog {
  gap: var(--space-4);
}

.field-control-stack {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.complaint-textarea {
  min-height: 118px;
}

.modal-phone {
  width: min(100%, 460px);
}

.modal-complaint {
  width: min(100%, 500px);
}

.field-help {
  min-width: 0;
  max-width: 100%;
  font-size: 12px;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.trailer-admin-preview {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 58px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.035);
}

.trailer-admin-preview img {
  width: 96px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 10px;
}

.trailer-admin-preview span {
  font-size: 13px;
  font-weight: 800;
}

/* Date and time picker for admin sessions */

.datetime-picker {
  display: grid;
  gap: var(--space-2);
  min-width: 0;
}

.datetime-picker.native {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2);
}

.datetime-field-card {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  min-height: 84px;
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.04);
  text-align: left;
  transition: border-color 140ms ease, background 140ms ease, transform 120ms ease;
}

.datetime-field-card:focus-within,
.datetime-field-card:hover {
  border-color: rgba(246, 196, 83, 0.52);
  background: rgba(246, 196, 83, 0.08);
}

.datetime-field-card:active {
  transform: translateY(1px);
}

.datetime-trigger-icon {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.07);
  font-size: 17px;
}

.datetime-trigger-main {
  display: grid;
  gap: 5px;
  min-width: 0;
  flex: 1;
}

.datetime-trigger-label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.02em;
  line-height: 1.15;
  text-transform: uppercase;
}

.datetime-value {
  overflow: hidden;
  color: var(--ink);
  font-size: 15px;
  font-weight: 800;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.datetime-value.placeholder {
  color: var(--muted-strong);
}

.datetime-native-input {
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.045);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  outline: none;
  color-scheme: dark;
  -webkit-appearance: auto;
  appearance: auto;
}

.datetime-native-input.invalid {
  border-color: rgba(255, 107, 122, 0.7);
  background: rgba(255, 107, 122, 0.08);
}

/* Movie picker used by admin session editor */

.session-editor-grid {
  display: grid;
  gap: var(--space-4);
  min-width: 0;
}

.session-fields {
  align-content: start;
}

.movie-picker-shell {
  display: grid;
  gap: var(--space-2);
  min-width: 0;
}

.movie-search {
  min-height: 40px;
}

.movie-picker {
  display: grid;
  gap: var(--space-2);
  max-height: min(330px, 38vh);
  overflow: auto;
  padding: 2px;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.movie-choice {
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: var(--space-3);
  align-items: center;
  min-height: 74px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.035);
  text-align: left;
  transition: border-color 140ms ease, background 140ms ease, transform 120ms ease;
}

.movie-choice:hover {
  border-color: rgba(246, 196, 83, 0.32);
  background: rgba(255, 255, 255, 0.055);
}

.movie-choice:active {
  transform: translateY(1px);
}

.movie-choice.active {
  border-color: rgba(246, 196, 83, 0.62);
  background: linear-gradient(180deg, rgba(246, 196, 83, 0.16), rgba(246, 196, 83, 0.06));
  box-shadow: inset 0 0 0 1px rgba(246, 196, 83, 0.18);
}

.movie-choice .thumb {
  width: 54px;
  height: 54px;
  border-radius: 10px;
  object-fit: cover;
  background: linear-gradient(135deg, rgba(246, 196, 83, 0.65), rgba(255, 255, 255, 0.05));
}

.movie-choice .thumb.empty {
  display: grid;
  place-items: center;
  color: var(--gold-ink);
  font-weight: 800;
}

.movie-choice-main {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.movie-choice-title {
  overflow: hidden;
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.movie-choice-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  color: var(--muted-strong);
  font-size: 12px;
  font-weight: 650;
}

.char-count {
  text-align: right;
  font-size: 11px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

/* Two-column layout for editor (form + preview) */

.editor-grid {
  display: grid;
  gap: var(--space-4);
  grid-template-columns: 1fr;
  min-width: 0;
}

.editor-aside {
  display: grid;
  gap: var(--space-3);
  min-width: 0;
}

.movie-editor-grid {
  display: grid;
  gap: var(--space-4);
  min-width: 0;
  max-width: 100%;
}

.movie-main-fields,
.movie-side-fields {
  min-width: 0;
  max-width: 100%;
}

.modal-movie .uploader,
.modal-movie .preview-card {
  min-width: 0;
  max-width: 100%;
}

.modal-movie .preview-frame {
  max-height: min(46vh, 440px);
}

.combo-editor-grid {
  display: grid;
  gap: var(--space-4);
  min-width: 0;
  max-width: 100%;
}

.combo-main-fields,
.combo-side-fields {
  min-width: 0;
}

.combo-availability-picker {
  display: grid;
  gap: var(--space-3);
  min-width: 0;
  max-width: 100%;
}

.combo-availability-summary {
  margin-top: -2px;
}

.combo-session-controls {
  min-width: 0;
}

.combo-session-list {
  display: grid;
  gap: var(--space-2);
  min-width: 0;
  max-width: 100%;
  max-height: min(320px, 38vh);
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 2px;
}

.combo-session-option {
  position: relative;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: var(--space-2);
  align-items: center;
  min-width: 0;
  max-width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.035);
  cursor: pointer;
  transition: border-color 140ms ease, background 140ms ease;
}

.combo-session-option:hover {
  background: rgba(255, 255, 255, 0.055);
  border-color: rgba(246, 196, 83, 0.28);
}

.combo-session-option.selected {
  border-color: rgba(246, 196, 83, 0.58);
  background: rgba(246, 196, 83, 0.10);
}

.combo-session-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.combo-session-check {
  width: 20px;
  height: 20px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
}

.combo-session-option.selected .combo-session-check {
  border-color: transparent;
  background: var(--gold-strong);
}

.combo-session-option.selected .combo-session-check::after {
  content: "";
  display: block;
  width: 10px;
  height: 6px;
  margin: 5px auto 0;
  border-left: 2px solid var(--gold-ink);
  border-bottom: 2px solid var(--gold-ink);
  transform: rotate(-45deg);
}

.combo-session-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.combo-session-title {
  min-width: 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.combo-session-meta {
  min-width: 0;
  color: var(--muted-strong);
  font-size: 12px;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.combo-session-empty {
  padding: var(--space-3);
}

.combo-target-summary {
  margin-top: 6px;
  color: var(--muted-strong);
  font-size: 12px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

/* Chips */

.chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.chip {
  flex: 0 1 auto;
  min-width: 0;
  max-width: 100%;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.03);
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  transition: background 120ms ease, color 120ms ease, border-color 120ms ease;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chip:hover {
  background: rgba(255, 255, 255, 0.06);
}

.chip.active {
  color: var(--gold-ink);
  background: var(--gold-strong);
  border-color: transparent;
}

/* Language tabs inside editor */

.lang-tabs {
  display: flex;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  padding: 3px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.03);
}

.lang-tab {
  flex: 1 1 0;
  min-width: 0;
  height: 30px;
  padding: 0 14px;
  border-radius: 999px;
  border: 0;
  background: transparent;
  color: var(--muted-strong);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.lang-tab.active {
  background: var(--gold-strong);
  color: var(--gold-ink);
}

.lang-pane[hidden] {
  display: none;
}

/* File upload + preview */

.uploader {
  display: grid;
  gap: var(--space-2);
  min-width: 0;
}

.dropzone {
  display: grid;
  gap: 4px;
  place-items: center;
  padding: var(--space-5);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.03);
  text-align: center;
  color: var(--muted-strong);
  font-size: 13px;
  cursor: pointer;
  transition: background 140ms ease, border-color 140ms ease;
}

.dropzone:hover,
.dropzone.dragover {
  background: rgba(246, 196, 83, 0.06);
  border-color: var(--gold);
  color: var(--gold-strong);
}

.dropzone strong {
  color: var(--ink);
}

.preview-card {
  display: grid;
  gap: var(--space-2);
  padding: var(--space-3);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel-soft);
  min-width: 0;
  overflow: hidden;
}

.preview-frame {
  position: relative;
  aspect-ratio: 3 / 4;
  max-height: min(52vh, 460px);
  overflow: hidden;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background:
    repeating-linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.025),
      rgba(255, 255, 255, 0.025) 6px,
      transparent 6px,
      transparent 12px
    ),
    rgba(255, 255, 255, 0.04);
}

.preview-frame.combo {
  aspect-ratio: 4 / 3;
}

.preview-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.preview-frame .placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 12px;
}

.preview-meta {
  font-size: 12px;
  color: var(--muted);
  word-break: break-all;
  max-height: 44px;
  overflow: auto;
}

/* Submit / form footer */

.form-footer {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
  padding-top: var(--space-2);
}

.form-footer.compact {
  padding-top: 0;
}

.form-footer .form-action {
  margin-left: auto;
}

/* Admin list rows */

.list-stack {
  display: grid;
  gap: var(--space-2);
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.list-row {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  gap: var(--space-3);
  align-items: center;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  padding: var(--space-3);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--panel-soft);
}

.list-row > * {
  min-width: 0;
}

.list-row .thumb {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  object-fit: cover;
  background: linear-gradient(135deg, rgba(246, 196, 83, 0.65), rgba(255, 255, 255, 0.05));
}

.list-row .thumb.empty {
  display: grid;
  place-items: center;
  color: var(--gold-ink);
  font-weight: 800;
}

.list-row-title {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.005em;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.list-row-meta {
  margin-top: 4px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.list-actions {
  display: flex;
  gap: 6px;
  min-width: 0;
  max-width: 100%;
}

/* Stats grid */

.stats-grid {
  display: grid;
  gap: var(--space-3);
  grid-template-columns: 1fr 1fr;
}

.stat-card {
  display: grid;
  gap: 6px;
  padding: var(--space-4);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel);
  box-shadow: var(--shadow-card);
}

.stat-card .label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.stat-card .value {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.stat-card.gold .value {
  color: var(--gold-strong);
}

.stat-card.green .value {
  color: var(--green);
}

.stat-card.red .value {
  color: var(--red);
}

/* Telegram preview */

.tg-preview {
  display: grid;
  gap: var(--space-2);
  padding: var(--space-3);
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #1c2233, #161b27);
}

.broadcast-grid {
  display: grid;
  gap: var(--space-3);
  min-width: 0;
}

.broadcast-media-fields {
  display: grid;
  gap: var(--space-3);
  min-width: 0;
  padding: var(--space-3);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.025);
}

.broadcast-media-preview,
.tg-preview-media {
  display: grid;
  place-items: center;
  min-height: 150px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.035);
}

.broadcast-media-preview.empty {
  color: var(--muted);
  font-size: 13px;
}

.broadcast-media-preview img,
.broadcast-media-preview video,
.tg-preview-media img,
.tg-preview-media video {
  display: block;
  width: 100%;
  max-height: 260px;
  object-fit: contain;
  background: rgba(0, 0, 0, 0.16);
}

.tg-preview-media {
  min-height: 120px;
  align-self: start;
}

.document-preview {
  width: 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: var(--space-2);
  align-items: center;
  padding: var(--space-3);
  color: var(--ink);
}

.document-preview span {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  color: var(--gold-ink);
  background: var(--gold-strong);
  font-size: 11px;
  font-weight: 900;
}

.document-preview strong {
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.switch-field {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 44px;
  padding: 9px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.035);
}

.switch-field input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.switch-track {
  position: relative;
  flex: 0 0 auto;
  width: 42px;
  height: 24px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid var(--line-strong);
  transition: background 140ms ease, border-color 140ms ease;
}

.switch-track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--ink-soft);
  transition: transform 140ms ease, background 140ms ease;
}

.switch-field input:checked + .switch-track {
  border-color: rgba(246, 196, 83, 0.52);
  background: rgba(246, 196, 83, 0.28);
}

.switch-field input:checked + .switch-track::after {
  transform: translateX(18px);
  background: var(--gold-strong);
}

.switch-label {
  min-width: 0;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 700;
}

.tg-preview .bubble {
  align-self: flex-start;
  max-width: 100%;
  padding: 10px 12px;
  border-radius: 14px 14px 14px 4px;
  background: #2a3247;
  color: #f4f5f8;
  font-size: 13px;
  line-height: 1.42;
  white-space: pre-wrap;
  word-wrap: break-word;
}

.tg-preview .bubble.empty {
  color: rgba(255, 255, 255, 0.45);
  font-style: italic;
}

/* ===== Toasts ===== */

.toast-stack {
  position: fixed;
  top: max(16px, calc(var(--app-top-padding) + 8px));
  left: 50%;
  transform: translateX(-50%);
  display: grid;
  gap: 8px;
  z-index: 60;
  width: min(440px, calc(100% - 32px));
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line-strong);
  background: rgba(22, 26, 35, 0.96);
  color: var(--ink);
  box-shadow: var(--shadow-card);
  font-size: 13px;
  line-height: 1.4;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  animation: toast-in 220ms ease;
}

.toast.success {
  border-color: rgba(95, 214, 165, 0.4);
  background: rgba(20, 36, 31, 0.96);
}

.toast.error {
  border-color: rgba(255, 107, 122, 0.4);
  background: rgba(40, 22, 26, 0.96);
}

.toast .toast-icon {
  font-size: 16px;
  line-height: 1;
}

@keyframes toast-in {
  from { transform: translateY(-12px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* ===== Modal / drawer ===== */

.modal-backdrop {
  position: fixed;
  top: 0;
  right: 0;
  bottom: auto;
  left: 0;
  z-index: 70;
  display: grid;
  place-items: end center;
  width: 100%;
  max-width: 100vw;
  height: min(100dvh, var(--browser-viewport-height));
  padding: 0;
  overflow: hidden;
  background: rgba(5, 6, 9, 0.7);
  backdrop-filter: blur(6px);
  animation: backdrop-in 160ms ease;
}

.modal-open .content {
  overflow: hidden;
}

@keyframes backdrop-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal {
  width: min(100%, 520px);
  max-width: 100%;
  min-width: 0;
  max-height: min(100dvh, calc(var(--browser-viewport-height) - var(--app-top-padding) - 12px));
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
  overscroll-behavior: contain;
  border-top-left-radius: var(--radius-xl);
  border-top-right-radius: var(--radius-xl);
  border: 1px solid var(--line-strong);
  border-bottom: 0;
  background: var(--panel);
  box-shadow: 0 -20px 60px rgba(0, 0, 0, 0.5);
  animation: modal-in 240ms cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-wide {
  width: min(100%, 820px);
}

.modal-combo {
  width: min(100%, 1040px);
}

.modal-movie {
  width: min(100%, 1040px);
}

@keyframes modal-in {
  from { transform: translateY(40px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  min-height: 38px;
  max-width: 100%;
  min-width: 0;
  padding: var(--space-5) var(--space-5) var(--space-3);
  background: rgba(22, 26, 35, 0.98);
  border-bottom: 1px solid var(--line);
}

.modal-title {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.25;
  min-width: 0;
  overflow-wrap: anywhere;
}

.modal-close {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--muted-strong);
  background: rgba(255, 255, 255, 0.05);
}

.modal-body {
  display: grid;
  gap: var(--space-3);
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  padding: var(--space-4) var(--space-5);
  -webkit-overflow-scrolling: touch;
}

.modal-body > * {
  min-width: 0;
  max-width: 100%;
}

.modal-footer {
  position: relative;
  bottom: auto;
  display: flex;
  justify-content: flex-end;
  gap: var(--space-2);
  flex-wrap: wrap;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  padding: var(--space-3) var(--space-5)
    max(var(--space-4), calc(var(--app-bottom-padding) + var(--space-2)));
  border-top: 1px solid var(--line);
  background: rgba(22, 26, 35, 0.98);
}

/* Inline two-column rows */

.row-2 {
  display: grid;
  gap: var(--space-3);
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  min-width: 0;
  max-width: 100%;
}

@media (max-width: 519px) {
  .row-2 {
    grid-template-columns: 1fr;
  }

  .datetime-picker.native {
    grid-template-columns: 1fr;
  }
}

/* ===== Responsive scaling ===== */

@media (min-width: 560px) {
  .stats-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 720px) {
  :root {
    --page-max: 720px;
    --page-gutter: 24px;
  }

  .user-header {
    min-height: 64px;
    padding-top: 12px;
    padding-bottom: 12px;
  }

  .content {
    padding-top: var(--space-3);
    padding-bottom: max(28px, calc(var(--app-bottom-padding) + 12px));
  }

  .screen-title {
    font-size: 30px;
  }

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

  .editor-grid {
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    align-items: start;
  }

  .summary {
    left: 50%;
    right: auto;
    width: min(720px, calc(100% - 48px));
    transform: translateX(-50%);
    border: 1px solid var(--line);
    border-bottom: 0;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  }

  .stats-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .modal-backdrop {
    place-items: center;
    padding:
      max(24px, calc(var(--app-top-padding) + 12px))
      24px
      max(24px, calc(var(--app-bottom-padding) + 12px));
  }

  .modal {
    max-width: min(820px, calc(100vw - 48px));
    max-height: min(
      90dvh,
      calc(var(--browser-viewport-height) - var(--app-top-padding) - var(--app-bottom-padding) - 48px)
    );
    border-radius: var(--radius-xl);
    border-bottom: 1px solid var(--line-strong);
  }

  .modal-combo {
    width: min(1040px, calc(100vw - 48px));
    max-width: min(1040px, calc(100vw - 48px));
  }

  .modal-movie {
    width: min(1040px, calc(100vw - 48px));
    max-width: min(1040px, calc(100vw - 48px));
  }

  .admin-tab {
    flex-direction: row;
    gap: 5px;
    padding: 8px 10px;
    font-size: 13px;
  }

  .admin-tab-icon {
    font-size: 15px;
  }
}

@media (min-width: 960px) {
  :root {
    --page-max: 1160px;
    --page-gutter: 32px;
  }

  .movie-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--space-4);
  }

  .movie-card {
    grid-template-columns: 1fr;
    gap: 0;
    min-height: 0;
    padding: 0;
    overflow: hidden;
  }

  .movie-card > .poster {
    width: 100%;
    height: auto;
    aspect-ratio: 2 / 3;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  }

  .movie-card .card-body {
    padding: var(--space-4);
    min-height: 142px;
  }

  .detail-hero {
    grid-template-columns: 180px 1fr;
    gap: var(--space-6);
    padding: var(--space-5);
  }

  .detail-hero .poster {
    width: 180px;
    height: 252px;
  }

  .content.admin-content {
    width: min(1100px, 100%);
  }

  .admin-card {
    padding: var(--space-6);
  }

  .movie-picker {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-height: min(460px, 52vh);
  }

  .session-editor-grid {
    grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
    align-items: start;
  }

  .movie-editor-grid {
    grid-template-columns: minmax(0, 1.25fr) minmax(300px, 0.75fr);
    align-items: start;
    gap: var(--space-5);
  }

  .combo-editor-grid {
    grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr);
    align-items: start;
    gap: var(--space-5);
  }

  .modal-wide {
    max-width: min(1160px, calc(100vw - 48px));
  }

  .admin-tabs {
    width: min(720px, calc(100% - 48px));
    max-width: calc(100% - 48px);
  }

  .stats-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .field-grid.cols-2 {
    grid-template-columns: 1fr 1fr;
  }

  .broadcast-grid {
    grid-template-columns: minmax(0, 1fr) minmax(300px, 0.8fr);
    align-items: start;
  }
}

@media (min-width: 1180px) {
  .movie-list {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .editor-grid {
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  }
}

/* ===== Tiny screens ===== */

@media (max-width: 370px) {
  .movie-card,
  .detail-hero {
    grid-template-columns: 86px 1fr;
  }

  .detail-hero .poster,
  .poster {
    width: 86px;
    height: 116px;
  }

  .seat {
    width: 28px;
    height: 28px;
    font-size: 11px;
  }

  .seat-section {
    gap: 4px;
  }

  .seat-sections {
    gap: 10px;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .admin-tab {
    min-height: 48px;
    padding-inline: 2px;
    font-size: 9px;
  }

  .admin-tab-icon {
    font-size: 15px;
  }
}

@media (max-width: 519px) {
  :root {
    --page-gutter: 12px;
  }

  .content {
    padding-left: var(--page-gutter);
    padding-right: var(--page-gutter);
  }

  .screen-title {
    font-size: 24px;
  }

  .admin-section-header {
    align-items: flex-start;
  }

  .admin-section-header h2 {
    flex: 1 1 140px;
    min-width: 0;
  }

  .admin-section-header .actions {
    flex: 0 1 auto;
    justify-content: flex-end;
  }

  .admin-section-header .primary-button {
    min-height: 44px;
    padding-inline: 14px;
  }

  .admin-card {
    padding: var(--space-3);
    border-radius: 16px;
  }

  .combo-card {
    grid-template-columns: 64px minmax(0, 1fr);
    align-items: start;
  }

  .combo-img {
    width: 64px;
    height: 56px;
  }

  .stepper {
    grid-column: 2;
    justify-self: start;
    margin-top: 4px;
  }

  .summary {
    gap: var(--space-2);
    padding-left: 12px;
    padding-right: 12px;
  }

  .summary .primary-button {
    max-width: 42vw;
    padding-inline: 12px;
    white-space: normal;
    line-height: 1.15;
  }

  .list-row {
    grid-template-columns: 48px minmax(0, 1fr);
    align-items: start;
    gap: 10px;
  }

  .list-row .thumb {
    width: 48px;
    height: 48px;
  }

  .list-actions {
    grid-column: 2;
    justify-content: flex-start;
  }

  .modal {
    padding-left: 0;
    padding-right: 0;
  }

  .modal-header,
  .modal-body {
    padding-left: var(--space-4);
    padding-right: var(--space-4);
  }

  .modal-footer {
    display: grid;
    grid-template-columns: minmax(52px, 0.36fr) minmax(0, 1fr);
    align-items: stretch;
    padding-left: var(--space-4);
    padding-right: var(--space-4);
  }

  .modal-footer button {
    display: inline-flex;
    align-items: center;
    width: 100%;
    justify-content: center;
  }
}

/* ===== Browser admin ===== */

html.browser-admin-mode,
body.browser-admin-mode {
  position: static;
  inset: auto;
  height: auto;
  min-height: 100%;
  overflow: auto;
  overscroll-behavior: auto;
}

body.browser-admin-mode .app-shell {
  min-height: 100vh;
  height: auto;
  display: block;
  overflow: visible;
  padding: 0;
  background:
    radial-gradient(circle at 12% -10%, rgba(246, 196, 83, 0.12), transparent 34%),
    radial-gradient(circle at 92% 8%, rgba(121, 164, 255, 0.10), transparent 36%),
    linear-gradient(180deg, #0e1118 0%, #08090d 100%);
}

body.browser-admin-mode .user-header,
body.browser-admin-mode .summary {
  display: none !important;
}

body.browser-admin-mode .content {
  width: 100%;
  max-width: none;
  min-height: 100vh;
  height: auto;
  overflow: visible;
  padding: 0;
}

.browser-login-content {
  display: grid;
  place-items: center;
  padding: 32px 16px !important;
}

.browser-login-card {
  width: min(100%, 420px);
  display: grid;
  gap: 16px;
  padding: 28px;
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  background: rgba(17, 20, 27, 0.92);
  box-shadow: var(--shadow-card);
}

.browser-login-card h1 {
  margin: 0;
  font-size: 26px;
}

.login-mark,
.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: var(--gold-ink);
  background: linear-gradient(145deg, #ffe7a0, var(--gold));
  font-weight: 900;
}

.login-error {
  padding: 10px 12px;
  border-radius: 10px;
  color: #ffdce1;
  background: var(--red-soft);
  border: 1px solid rgba(255, 107, 122, 0.34);
  font-size: 13px;
}

.browser-admin-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
}

.browser-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 16px;
  padding: 18px;
  border-right: 1px solid var(--line);
  background: rgba(11, 13, 18, 0.86);
  backdrop-filter: blur(16px);
}

.browser-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.browser-brand strong,
.browser-brand span {
  display: block;
}

.browser-brand span {
  color: var(--muted);
  font-size: 12px;
}

.browser-admin-nav {
  display: grid;
  align-content: start;
  gap: 6px;
  overflow: auto;
}

.browser-nav-button {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 0 12px;
  border-radius: 10px;
  color: var(--muted-strong);
  border: 1px solid transparent;
  font-size: 14px;
  font-weight: 700;
}

.browser-nav-button:hover,
.browser-nav-button.active {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--line);
}

.browser-main {
  min-width: 0;
  padding: 24px;
}

.browser-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.browser-topbar h1 {
  margin: 2px 0 0;
  font-size: 28px;
}

.browser-eyebrow {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.browser-user-actions,
.browser-toolbar,
.browser-filter-bar {
  display: flex;
  align-items: end;
  gap: 12px;
  flex-wrap: wrap;
}

.browser-panel {
  display: grid;
  gap: 16px;
}

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

.browser-stat-card {
  display: grid;
  gap: 8px;
}

.browser-stat-card span {
  color: var(--muted);
  font-size: 13px;
}

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

.browser-section-card {
  display: grid;
  gap: 14px;
}

.browser-seat-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  flex-wrap: wrap;
}

.section-title-row,
.browser-seat-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.seat-refresh-state {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.browser-seat-heading h3,
.browser-section-card h3 {
  margin: 0;
}

.browser-seat-map {
  display: grid;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 8px;
}

.admin-seat {
  width: 38px;
  height: 36px;
}

.seat-timer {
  position: absolute;
  top: -9px;
  right: -8px;
  padding: 1px 4px;
  border-radius: 999px;
  color: var(--ink);
  background: rgba(11, 13, 18, 0.9);
  border: 1px solid var(--line-strong);
  font-size: 8px;
}

.offline-combos,
.offline-phone-field,
.browser-sale-footer {
  display: grid;
  gap: 12px;
}

.browser-sale-footer {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.browser-combo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}

.browser-combo-card {
  pointer-events: auto;
}

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

.browser-order-row {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.035);
  text-align: left;
}

.browser-order-row strong,
.browser-order-row span {
  display: block;
}

.receipt-modal-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(320px, 1.1fr);
  gap: 16px;
}

.receipt-modal-stack {
  display: grid;
  gap: var(--space-3);
  align-content: start;
}

.receipt-panel {
  display: grid;
  gap: 10px;
  min-height: 420px;
}

.receipt-panel h3 {
  margin: 0;
}

.receipt-panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.receipt-frame {
  width: 100%;
  min-height: 420px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #111;
}

.receipt-payment-details {
  display: grid;
  gap: var(--space-3);
  min-width: 0;
  padding: var(--space-4);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.03);
}

.receipt-payment-details h3 {
  margin: 0;
}

.payment-detail-list {
  display: grid;
  gap: 8px;
}

.payment-detail-row {
  display: flex;
  justify-content: space-between;
  gap: var(--space-3);
  color: var(--muted);
  font-size: 13px;
}

.payment-detail-row strong {
  color: var(--ink);
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.payment-detail-row.success strong {
  color: var(--green);
}

.payment-detail-row.danger strong {
  color: var(--red);
}

body.browser-admin-mode .modal-backdrop {
  place-items: center;
  height: 100vh;
  padding: 20px;
}

body.browser-admin-mode .modal {
  border-radius: 18px;
  border-bottom: 1px solid var(--line-strong);
  max-height: calc(100vh - 40px);
}

body.browser-admin-mode .modal-wide {
  width: min(1040px, 100%);
}

.report-download-action {
  display: flex;
  align-items: end;
  min-height: 44px;
}

@media (max-width: 980px) {
  body.browser-admin-mode .content {
    min-height: 0;
  }

  .browser-admin-shell {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    align-content: start;
    min-height: 0;
  }

  .browser-sidebar {
    position: static;
    height: auto;
    min-height: 0;
    grid-template-rows: auto auto;
    align-content: start;
    padding: 16px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .browser-admin-nav {
    display: flex;
    align-content: normal;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 2px;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    scroll-snap-type: x proximity;
  }

  .browser-admin-nav::-webkit-scrollbar {
    display: none;
  }

  .browser-nav-button {
    flex: 0 0 auto;
    min-height: 40px;
    white-space: nowrap;
    scroll-snap-align: start;
  }

  .browser-main {
    padding: 18px;
  }

  .browser-stat-grid,
  .receipt-modal-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .browser-login-card {
    padding: 20px;
  }

  .browser-sidebar {
    gap: 12px;
    padding: 14px;
  }

  .browser-admin-nav {
    margin-inline: -14px;
    padding-inline: 14px;
  }

  .browser-nav-button {
    min-height: 38px;
    padding-inline: 12px;
    border-radius: 12px;
  }

  .browser-main {
    padding: 14px;
  }

  .browser-topbar,
  .browser-order-row,
  .browser-sale-footer {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .browser-topbar {
    display: grid;
    gap: 12px;
    margin-bottom: 14px;
  }

  body.browser-admin-mode .admin-section-header {
    display: grid;
    grid-template-columns: 1fr;
    align-items: stretch;
    gap: 10px;
  }

  body.browser-admin-mode .admin-section-header .actions {
    width: 100%;
    justify-content: stretch;
  }

  body.browser-admin-mode .admin-section-header .actions > button {
    width: 100%;
  }

  .browser-filter-bar .field,
  .browser-toolbar .field,
  .report-download-action {
    width: 100%;
  }

  .report-download-action > button {
    width: 100%;
  }

  .admin-seat {
    width: 32px;
    height: 32px;
  }
}
