/* =========================================================
   ICE Surat — Sur Sanidhya prototype
   Modern civic. Trustworthy navy + warm cream.
   ========================================================= */

:root {
  /* Palette */
  --ink: #0a1f3d;
  --ink-2: #1a3661;
  --ink-3: #4a5d7e;
  --ink-4: #8a98ad;
  --line: #d8d3c7;
  --line-2: #e8e3d6;
  --bg: #f5f1e8;
  --bg-2: #ebe5d3;
  --paper: #fbf8f1;
  --accent: #0b4ea2;
  --accent-2: #c45a2e;
  --gold: #b08542;
  --ok: #2e7d4f;
  --warn: #b5651d;
  --danger: #a8362a;

  /* Type */
  --font-sans: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --font-serif: "Source Serif 4", "Source Serif Pro", Georgia, serif;

  /* Spacing scale */
  --density: 1;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--ink);
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-size: 15px;
  line-height: 1.5;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

button { font-family: inherit; cursor: pointer; }
input, textarea, select { font-family: inherit; }

/* ---------- Layout primitives ---------- */
.app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
}

.container-wide {
  max-width: 1480px;
  margin: 0 auto;
  padding: 0 32px;
  width: 100%;
}

/* ---------- Top nav ---------- */
.topnav {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(245, 241, 232, 0.92);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.topnav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
}
.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--paper);
  border: 1.5px solid var(--ink);
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}
.brand-mark img {
  width: 86%;
  height: 86%;
  object-fit: contain;
  display: block;
}
.brand-mark.on-dark {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.45);
}
.brand-mark.on-dark img {
  filter: invert(1);
}
.brand-mark.lg {
  width: 72px;
  height: 72px;
}
.brand-mark.xl {
  width: 96px;
  height: 96px;
  border-width: 2px;
}
.brand-name {
  line-height: 1.15;
  white-space: nowrap;
}
.brand-name .t1 {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.brand-name .t2 {
  font-size: 10px;
  color: var(--ink-3);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-top: 2px;
}

.nav-links {
  display: flex;
  gap: 8px;
  align-items: center;
}
.nav-link {
  font-size: 14px;
  color: var(--ink-2);
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s;
}
.nav-link:hover { background: var(--bg-2); text-decoration: none; }
.nav-link.active { background: var(--ink); color: var(--paper); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.005em;
  background: var(--bg-2);
  color: var(--ink);
  transition: transform 0.04s, background 0.15s, border-color 0.15s;
  white-space: nowrap;
}
.btn:hover { background: var(--line); }
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--ink);
  color: var(--paper);
}
.btn-primary:hover { background: var(--ink-2); }
.btn-accent {
  background: var(--accent);
  color: white;
}
.btn-accent:hover { background: #0a4290; }
.btn-ghost {
  background: transparent;
  border-color: var(--line);
}
.btn-ghost:hover { background: var(--bg-2); }
.btn-danger {
  background: transparent;
  color: var(--danger);
  border-color: rgba(168, 54, 42, 0.3);
}
.btn-danger:hover { background: rgba(168, 54, 42, 0.06); }
.btn-sm { padding: 7px 12px; font-size: 13px; }
.btn-lg { padding: 14px 24px; font-size: 15px; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }

/* ---------- Hero (landing) ---------- */
.hero {
  padding: 80px 0 96px;
  position: relative;
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 72px;
  align-items: center;
}
.hero-eyebrow {
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-2);
  font-weight: 600;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.hero-eyebrow .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent-2);
}
.hero-title {
  font-size: clamp(44px, 5.5vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.025em;
  font-weight: 700;
  margin: 0 0 24px;
  color: var(--ink);
}
.hero-title em {
  font-style: normal;
  color: var(--accent);
  font-family: var(--font-serif);
  font-weight: 500;
}
.hero-sub {
  font-size: 18px;
  line-height: 1.55;
  color: var(--ink-3);
  max-width: 540px;
  margin: 0 0 36px;
}
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }

.hero-art {
  aspect-ratio: 5/6;
  position: relative;
  border-radius: 4px;
  background: var(--paper);
  border: 1px solid var(--line);
  overflow: hidden;
  box-shadow: 0 30px 60px -30px rgba(10, 31, 61, 0.25);
}
.hero-art .ticket {
  position: absolute;
  inset: 28px;
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  background:
    repeating-linear-gradient(
      0deg,
      transparent 0 22px,
      rgba(10, 31, 61, 0.04) 22px 23px
    );
}
.ticket-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 1px dashed var(--line);
  padding-bottom: 16px;
  margin-bottom: 16px;
}
.ticket-head .label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--ink-3);
  text-transform: uppercase;
}
.ticket-head .val {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--ink);
  margin-top: 2px;
}
.ticket-title {
  font-family: var(--font-serif);
  font-size: 32px;
  font-weight: 500;
  line-height: 1.05;
  color: var(--ink);
  margin: auto 0;
}
.ticket-title small {
  display: block;
  font-family: var(--font-sans);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin-bottom: 8px;
  font-weight: 600;
}
.ticket-foot {
  border-top: 1px dashed var(--line);
  padding-top: 16px;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
}
.ticket-foot div { font-family: var(--font-mono); font-size: 10px; color: var(--ink-3); letter-spacing: 0.08em; text-transform: uppercase; }
.ticket-foot div b { display: block; color: var(--ink); font-size: 13px; margin-top: 4px; letter-spacing: 0; text-transform: none; font-weight: 600; }
.ticket-perf {
  position: absolute;
  left: 0; right: 0;
  top: 50%;
  border-top: 1px dashed var(--line);
}
.ticket-perf::before, .ticket-perf::after {
  content: "";
  position: absolute;
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--bg);
  top: -12px;
}
.ticket-perf::before { left: -12px; }
.ticket-perf::after { right: -12px; }

/* ---------- Section ---------- */
.section {
  padding: 80px 0;
  border-top: 1px solid var(--line);
}
.section-dark {
  background: var(--ink);
  color: var(--paper);
  border-top-color: var(--ink-2);
}
.section-dark .section-eyebrow { color: rgba(255,255,255,0.6); }
.section-dark .section-title { color: var(--paper); }
.section-dark .section-lead { color: rgba(255,255,255,0.7); }

.section-eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.section-eyebrow::before {
  content: ""; width: 24px; height: 1px; background: currentColor;
}
.section-title {
  font-size: clamp(32px, 3.5vw, 48px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin: 0 0 24px;
  text-wrap: balance;
}
.section-title em {
  font-style: normal;
  font-family: var(--font-serif);
  font-weight: 500;
  color: var(--accent);
}
.section-lead {
  font-size: 18px;
  line-height: 1.55;
  color: var(--ink-3);
  max-width: 680px;
  text-wrap: pretty;
}

/* ---------- Tier cards ---------- */
.tier-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 48px;
}
.tier-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 24px;
  position: relative;
  overflow: hidden;
  transition: border-color 0.15s, transform 0.15s;
}
.tier-card:hover { border-color: var(--ink-3); }
.tier-card.selected { border-color: var(--accent); border-width: 2px; padding: 23px; }
.tier-card.selected::before {
  content: "Selected"; position: absolute; top: 14px; right: 14px;
  font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase;
  background: var(--accent); color: white; padding: 3px 8px; border-radius: 3px; font-weight: 600;
}
.tier-card .tier-swatch {
  width: 28px; height: 28px;
  border-radius: 4px;
  margin-bottom: 16px;
}
.tier-card .tier-code {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-4);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.tier-card .tier-name {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.015em;
  margin: 0 0 4px;
}
.tier-card .tier-rows {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--ink-3);
  margin-bottom: 14px;
}
.tier-card .tier-fee {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.tier-card .tier-fee small {
  font-size: 12px; font-weight: 500; color: var(--ink-3); margin-left: 4px;
}
.tier-card .tier-rule {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
  font-size: 12px;
  color: var(--ink-3);
  letter-spacing: -0.005em;
}
.tier-card .tier-rule b { color: var(--ink); font-weight: 600; display: block; margin-bottom: 2px; }

/* ---------- Steps ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0;
  margin-top: 48px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.step {
  padding: 28px 24px;
  border-right: 1px solid var(--line);
  position: relative;
}
.step:last-child { border-right: none; }
.step-num {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-4);
  letter-spacing: 0.08em;
  margin-bottom: 12px;
}
.step-title {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 6px;
}
.step-desc { font-size: 13px; color: var(--ink-3); line-height: 1.45; }

/* ---------- Footer ---------- */
.footer {
  background: var(--ink);
  color: var(--paper);
  padding: 56px 0 32px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 40px;
}
.footer h5 {
  font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  margin: 0 0 16px; font-weight: 600;
}
.footer a { color: rgba(255,255,255,0.85); display: block; padding: 4px 0; font-size: 14px; }
.footer a:hover { color: white; text-decoration: none; }
.footer-foot {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: rgba(255,255,255,0.55);
}

/* ---------- Forms ---------- */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}
.field { display: flex; flex-direction: column; gap: 6px; }
.field label {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-3);
  letter-spacing: 0.02em;
}
.field input, .field textarea, .field select {
  border: 1px solid var(--line);
  background: var(--paper);
  padding: 11px 14px;
  border-radius: 6px;
  font-size: 14px;
  color: var(--ink);
  outline: none;
  transition: border-color 0.15s;
}
.field input:focus, .field textarea:focus, .field select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(11, 78, 162, 0.12);
}
.field .hint { font-size: 12px; color: var(--ink-4); }
.field .err { font-size: 12px; color: var(--danger); }

/* ---------- Card ---------- */
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 24px;
}
.card-pad-lg { padding: 32px; }
.card-title {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 0 0 16px;
}
.card-h {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 18px; gap: 12px;
}
.card-h h3 {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0;
}

/* ---------- Stat tiles ---------- */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
}
.stat {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 18px 20px;
}
.stat-label {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 600;
}
.stat-value {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-top: 6px;
  font-variant-numeric: tabular-nums;
}
.stat-foot {
  font-size: 12px;
  color: var(--ink-4);
  margin-top: 6px;
  font-variant-numeric: tabular-nums;
}
.stat-foot.up { color: var(--ok); }
.stat-foot.warn { color: var(--warn); }

/* ---------- Tables ---------- */
table.tbl {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.tbl th {
  text-align: left;
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}
.tbl td {
  padding: 14px;
  border-bottom: 1px solid var(--line-2);
  vertical-align: middle;
}
.tbl tr:hover td { background: rgba(11, 78, 162, 0.03); }
.tbl .num, .tbl .mono { font-family: var(--font-mono); font-size: 13px; }

/* ---------- Badges ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  background: var(--bg-2);
  color: var(--ink);
}
.badge-ok { background: rgba(46, 125, 79, 0.12); color: var(--ok); }
.badge-warn { background: rgba(181, 101, 29, 0.14); color: var(--warn); }
.badge-danger { background: rgba(168, 54, 42, 0.12); color: var(--danger); }
.badge-ink { background: var(--ink); color: var(--paper); }
.badge-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* ---------- Seat Map ---------- */
.seatmap-wrap {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 28px 24px 24px;
  overflow: auto;
}
.stage-bar {
  margin: 0 auto 32px;
  max-width: 60%;
  text-align: center;
  border-bottom: 2px solid var(--ink);
  padding-bottom: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.3em;
  color: var(--ink-3);
  text-transform: uppercase;
  position: relative;
}
.stage-bar::before, .stage-bar::after {
  content: ""; position: absolute; bottom: -2px;
  width: 60px; height: 2px; background: var(--ink);
}
.stage-bar::before { left: -60px; }
.stage-bar::after { right: -60px; }

.seatmap {
  display: flex;
  flex-direction: column;
  gap: 3px;
  align-items: center;
  user-select: none;
}
.seat-row {
  display: flex;
  gap: 12px;
  align-items: center;
}
.row-label {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  color: var(--ink-3);
  width: 18px;
  text-align: center;
  letter-spacing: 0.04em;
}
.seg {
  display: flex;
  gap: 2px;
}
.seg-gap { width: 14px; flex-shrink: 0; }

.seat {
  width: 14px;
  height: 14px;
  border-radius: 2px;
  background: var(--line);
  border: 1px solid transparent;
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
  transition: transform 0.08s, box-shadow 0.08s;
}
.seat:hover {
  transform: scale(1.4);
  z-index: 5;
  box-shadow: 0 4px 12px rgba(10, 31, 61, 0.2);
}
.seat.reserved { background: var(--ink); cursor: default; }
.seat.reserved:hover { transform: none; box-shadow: none; }
.seat.blocked {
  background: var(--ink-4);
  background-image: repeating-linear-gradient(45deg, transparent, transparent 2px, rgba(0,0,0,0.4) 2px, rgba(0,0,0,0.4) 3px);
}
.seat.allocated { background: var(--accent); }
.seat.selected {
  outline: 2px solid var(--accent-2);
  outline-offset: 1px;
  z-index: 4;
}
.seat.t-freeflow { background: #2d8859; }
.seat.t-freeflow.allocated { background: #1a5d3a; }
.seat.t-m50 { background: #2563b5; }
.seat.t-m50.allocated { background: #163f7a; }
.seat.t-m45 { background: #d978c2; }
.seat.t-m45.allocated { background: #a44c8c; }
.seat.t-m35 { background: #14a098; }
.seat.t-m35.allocated { background: #0a635e; }
.seat.t-m30 { background: #d97334; }
.seat.t-m30.allocated { background: #a4521d; }
.seat.t-m25 { background: #b53455; }
.seat.t-m25.allocated { background: #7c1f3a; }
.seat.t-m20 { background: #4f9a3b; }
.seat.t-m20.allocated { background: #2f6822; }
.seat.t-m15 { background: #d35438; }
.seat.t-m15.allocated { background: #8e3220; }
.seat.empty { background: transparent; border: 1px dashed var(--line); cursor: default; }
.seat.empty:hover { transform: none; box-shadow: none; }

.seat-tip {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  color: white;
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-family: var(--font-mono);
  white-space: nowrap;
  pointer-events: none;
  z-index: 100;
  box-shadow: 0 10px 24px rgba(0,0,0,0.25);
}
.seat-tip::after {
  content: ""; position: absolute; top: 100%; left: 50%; transform: translateX(-50%);
  border: 4px solid transparent; border-top-color: var(--ink);
}

/* Compact size variant */
.seatmap.density-tight .seat { width: 11px; height: 11px; }
.seatmap.density-tight .seg-gap { width: 10px; }
.seatmap.density-tight .seat-row { gap: 8px; }

.seatmap.density-comfortable .seat { width: 16px; height: 16px; }
.seatmap.density-comfortable .seg-gap { width: 18px; }

/* Legend */
.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  padding: 14px 18px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-bottom: 18px;
  font-size: 12px;
}
.legend-item { display: flex; align-items: center; gap: 8px; color: var(--ink-2); }
.legend-swatch {
  width: 12px; height: 12px; border-radius: 2px;
}

/* ---------- Modal ---------- */
.modal-bg {
  position: fixed; inset: 0;
  background: rgba(10, 31, 61, 0.4);
  backdrop-filter: blur(4px);
  z-index: 100;
  display: grid; place-items: center;
  padding: 24px;
  animation: fadeIn 0.15s;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal {
  background: var(--paper);
  border-radius: 12px;
  width: 100%;
  max-width: 480px;
  padding: 32px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.3);
  animation: pop 0.18s cubic-bezier(0.2, 0.8, 0.3, 1.1);
}
@keyframes pop { from { transform: scale(0.96); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* ---------- Page wrappers ---------- */
.page {
  flex: 1;
  padding: 40px 0 80px;
}
.page-header {
  margin-bottom: 32px;
}
.page-title {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 6px;
}
.page-sub { color: var(--ink-3); font-size: 15px; }

.crumb {
  display: flex; gap: 8px; align-items: center;
  font-size: 12px; color: var(--ink-3);
  margin-bottom: 16px; letter-spacing: 0.02em;
}
.crumb a { color: var(--ink-3); }

/* ---------- Two-col layout ---------- */
.two-col {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 32px;
  align-items: flex-start;
}
.two-col.right-wide {
  grid-template-columns: 320px 1fr;
}

/* ---------- Misc ---------- */
.hr-soft { border: none; border-top: 1px solid var(--line); margin: 24px 0; }
.kbd {
  font-family: var(--font-mono);
  font-size: 11px;
  background: var(--bg-2);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid var(--line);
}

.empty-state {
  padding: 48px 24px;
  text-align: center;
  color: var(--ink-3);
}
.empty-state h4 { font-size: 16px; color: var(--ink); margin: 12px 0 6px; }

.pill-tabs {
  display: inline-flex;
  background: var(--bg-2);
  padding: 4px;
  border-radius: 10px;
  gap: 2px;
}
.pill-tab {
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 7px;
  color: var(--ink-3);
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}
.pill-tab.active { background: var(--paper); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,0.06); }

.success-icon {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: var(--ok);
  display: grid; place-items: center;
  color: white;
  margin: 0 auto 20px;
}

/* Numeric */
.num { font-variant-numeric: tabular-nums; font-family: var(--font-mono); }

/* Toast */
.toast-stack {
  position: fixed; bottom: 24px; right: 24px;
  z-index: 200; display: flex; flex-direction: column; gap: 8px;
}
.toast {
  background: var(--ink);
  color: var(--paper);
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 13px;
  box-shadow: 0 16px 40px rgba(0,0,0,0.25);
  animation: slideIn 0.2s;
  max-width: 340px;
}
@keyframes slideIn { from { transform: translateY(10px); opacity: 0; } to { transform: none; opacity: 1; } }
.toast.ok { background: var(--ok); }
.toast.warn { background: var(--warn); }
.toast.err { background: var(--danger); }

/* responsive */
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; gap: 32px; }
  .tier-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .stat-grid { grid-template-columns: repeat(3, 1fr); }
  .two-col { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

/* ===== Mobile (≤640px) ===== */
@media (max-width: 640px) {
  body { font-size: 14px; }
  .container, .container-wide { padding: 0 16px; }

  /* Topnav: keep brand visible, collapse nav into hamburger */
  .topnav-inner { height: 60px; }
  .brand { gap: 10px; min-width: 0; }
  .brand-mark { width: 40px; height: 40px; }
  .brand-name { min-width: 0; }
  .brand-name .t1 { font-size: 13px; }
  .brand-name .t2 { font-size: 9px; letter-spacing: 0.08em; }

  .nav-links { display: none; }
  .nav-toggle { display: grid !important; }
  .nav-mobile-open .nav-links {
    display: flex;
    position: fixed;
    top: 60px;
    left: 0; right: 0;
    background: var(--paper);
    flex-direction: column;
    gap: 4px;
    padding: 12px 16px 16px;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 12px 24px rgba(10,31,61,0.08);
    z-index: 30;
  }
  .nav-mobile-open .nav-link {
    padding: 12px 14px;
    border-radius: 8px;
    font-size: 15px;
  }

  /* Hero */
  .hero { padding: 40px 0 56px; }
  .hero-title { font-size: 38px; }
  .hero-sub { font-size: 16px; }
  .hero-art { aspect-ratio: 4/5; }
  .ticket { padding: 20px !important; }
  .ticket-title { font-size: 22px; }

  /* Sections */
  .section { padding: 48px 0; }
  .section-title { font-size: 28px; }
  .section-lead { font-size: 15px; }

  /* Tiers — 1 col but compact */
  .tier-grid { grid-template-columns: 1fr; gap: 10px; }
  .tier-card { padding: 18px; display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; }
  .tier-card .tier-swatch { margin: 0; width: 36px; height: 36px; }
  .tier-card .tier-code { margin: 0; }
  .tier-card .tier-name { font-size: 18px; margin: 0; grid-column: 2 / 3; grid-row: 1 / 2; }
  .tier-card .tier-rows { grid-column: 2 / 3; grid-row: 2 / 3; margin: 0; font-size: 12px; }
  .tier-card .tier-fee { grid-column: 3 / 4; grid-row: 1 / 3; font-size: 20px; text-align: right; }
  .tier-card .tier-fee small { display: none; }
  .tier-card .tier-rule { grid-column: 1 / 4; grid-row: 3 / 4; margin-top: 12px; padding-top: 12px; }
  .tier-card.selected::before { top: 8px; right: 8px; }

  /* Steps */
  .steps { grid-template-columns: 1fr; }
  .step { border-right: none; border-bottom: 1px solid var(--line); padding: 20px 16px; }
  .step:last-child { border-bottom: none; }

  /* About */
  .section [style*="grid-template-columns: 1fr 1.6fr"],
  .section [style*="grid-template-columns: 1fr 1fr"],
  .section [style*="grid-template-columns: 1.15fr 1fr"] {
    grid-template-columns: 1fr !important;
    gap: 32px !important;
  }
  .section [style*="grid-template-columns: repeat(4, 1fr)"] {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  .section [style*="grid-template-columns: repeat(3, 1fr)"] {
    grid-template-columns: 1fr !important;
  }

  /* Admin / page inline grids — collapse */
  [style*="grid-template-columns: 1.4fr 1fr"],
  [style*="grid-template-columns: repeat(2, 1fr)"] {
    grid-template-columns: 1fr !important;
  }

  /* Footer */
  .footer { padding: 40px 0 24px; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; margin-bottom: 24px; }
  .footer-foot { flex-direction: column; gap: 10px; align-items: flex-start; text-align: left; }

  /* Stats */
  .stat-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .stat { padding: 14px 16px; }
  .stat-value { font-size: 24px; }

  /* Cards */
  .card { padding: 18px; }
  .card-pad-lg { padding: 20px; }

  /* Page */
  .page { padding: 24px 0 56px; }
  .page-title { font-size: 24px; }
  .page-sub { font-size: 14px; }

  /* Forms */
  .form-row { grid-template-columns: 1fr; gap: 12px; }

  /* Admin pill tabs — wrap below page title on mobile */
  .pill-tabs { flex-wrap: wrap; }
  .pill-tab { padding: 7px 12px; font-size: 12px; }

  /* Tables — let them scroll horizontally inside cards */
  .card .tbl { font-size: 13px; }
  .tbl th, .tbl td { padding: 10px 10px; }
  .card[style*="padding: 0"] { overflow-x: auto; }

  /* Stepper — vertical/condensed on mobile */
  .stepper-wrap { flex-direction: column !important; align-items: stretch !important; }

  /* Seat map: shrink to fit phone width by default; admin keeps scroll */
  .seatmap-wrap { padding: 16px 8px; overflow: hidden; }
  .seatmap-wrap.admin-scroll { overflow-x: auto; }
  .stage-bar { max-width: 80%; margin-bottom: 18px; font-size: 10px; letter-spacing: 0.2em; }
  .stage-bar::before, .stage-bar::after { width: 30px; }
  .stage-bar::before { left: -30px; }
  .stage-bar::after { right: -30px; }
  .legend { gap: 8px 12px; padding: 10px 10px; font-size: 10px; }
  .legend-swatch { width: 10px; height: 10px; }

  .seatmap { gap: 2px; }
  .seatmap .seat { width: 5px; height: 5px; border-radius: 1px; }
  .seatmap .seat:hover { transform: none; box-shadow: none; }
  .seatmap .seg { gap: 1px; }
  .seatmap .seg-gap { width: 6px; }
  .seatmap .seat-row { gap: 5px; }
  .seatmap .row-label { width: 12px; font-size: 8px; }

  .seatmap.density-tight .seat { width: 4px; height: 4px; }
  .seatmap.density-tight .seg-gap { width: 5px; }
  .seatmap.density-tight .seat-row { gap: 4px; }
  .seatmap.density-comfortable .seat { width: 6px; height: 6px; }
  .seatmap.density-comfortable .seg-gap { width: 7px; }

  /* Toasts */
  .toast-stack { left: 12px; right: 12px; bottom: 12px; }
  .toast { max-width: none; }

  /* Modal — full-screen on mobile */
  .modal { padding: 20px; }
}

/* ===== Very small (≤380px) ===== */
@media (max-width: 380px) {
  .hero-title { font-size: 32px; }
  .section-title { font-size: 24px; }
  .brand { gap: 8px; }
  .brand-mark { width: 36px; height: 36px; }
  .brand-name .t1 { font-size: 12px; }
  .brand-name .t2 { font-size: 8.5px; }
}

/* Hamburger control — desktop hides it via the rule above */
.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 8px;
  width: 40px; height: 40px;
  place-items: center;
  cursor: pointer;
}
.nav-toggle:hover { background: var(--bg-2); }
.nav-toggle svg { width: 18px; height: 18px; stroke: var(--ink); }
