:root {
  /* Palette lifted from the Navratri 2026 poster */
  --night-1: #140828;   /* deep indigo night sky */
  --night-2: #250f4d;   /* royal purple */
  --night-3: #3a1566;   /* violet */
  --magenta: #d6156b;   /* lantern pink */
  --magenta-2: #e8478f;
  --gold: #f5c145;      /* Navratri gold */
  --gold-bright: #ffd97a;
  --gold-deep: #c9902a;
  --cream: #f8efd8;     /* ticket-stub cream */
  --cream-2: #fdf7e8;
  --maroon: #611b3a;    /* ticket ink */
  --maroon-2: #7a2350;
  --green: #2f9e57;
  --red: #d64545;
  --radius: 18px;
  --shadow: 0 12px 40px rgba(10, 4, 30, 0.55);
  --shadow-card: 0 10px 30px rgba(20, 8, 40, 0.35);
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: rgba(214,21,107,0.18); }
/* Ensure the `hidden` attribute always wins over layout display rules */
[hidden] { display: none !important; }

/* --- Mobile hardening --- */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
html, body { overflow-x: hidden; }            /* never allow sideways scroll */
img { max-width: 100%; height: auto; }
input, select, textarea, button { font-family: inherit; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--cream);
  line-height: 1.5;
  min-height: 100vh;
  /* Night-sky stage: gold bokeh up top, magenta lantern glows, deep indigo base */
  background:
    radial-gradient(circle at 12% 6%, rgba(245, 193, 69, 0.28), transparent 26%),
    radial-gradient(circle at 88% 8%, rgba(245, 193, 69, 0.22), transparent 24%),
    radial-gradient(circle at 78% 30%, rgba(214, 21, 107, 0.30), transparent 40%),
    radial-gradient(circle at 8% 55%, rgba(160, 40, 150, 0.28), transparent 42%),
    radial-gradient(ellipse at 50% 120%, rgba(214, 21, 107, 0.25), transparent 55%),
    linear-gradient(180deg, var(--night-1) 0%, var(--night-2) 55%, var(--night-3) 100%);
  background-attachment: fixed;
}

/* faint twinkle of stars over the whole stage */
body::before {
  content: "";
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background-image:
    radial-gradient(1.5px 1.5px at 20% 30%, rgba(255,255,255,0.7), transparent),
    radial-gradient(1.5px 1.5px at 70% 20%, rgba(255,255,255,0.5), transparent),
    radial-gradient(1px 1px at 40% 70%, rgba(255,255,255,0.6), transparent),
    radial-gradient(1.5px 1.5px at 85% 60%, rgba(255,255,255,0.45), transparent),
    radial-gradient(1px 1px at 55% 45%, rgba(255,255,255,0.5), transparent);
  background-repeat: repeat;
  opacity: .6;
}

.diya-band {
  position: relative; z-index: 2;
  height: 6px;
  background: linear-gradient(90deg, var(--gold-deep), var(--gold-bright), var(--magenta), var(--night-3), var(--gold-bright), var(--gold-deep));
  background-size: 250% 100%;
  animation: shimmer 9s linear infinite;
  box-shadow: 0 0 18px rgba(245, 193, 69, 0.6);
}
@keyframes shimmer { to { background-position: 250% 0; } }

.container {
  position: relative; z-index: 1;
  max-width: 660px;
  margin: 0 auto;
  padding: 22px 16px 60px;
}
.container-wide { max-width: 1140px; }

/* ---------- Hero / poster banner ---------- */
.hero { text-align: center; margin-bottom: 22px; }
.poster-frame {
  border-radius: var(--radius);
  padding: 5px;
  background: linear-gradient(135deg, var(--gold-bright), var(--gold-deep), var(--magenta));
  box-shadow: var(--shadow), 0 0 34px rgba(245, 193, 69, 0.25);
  overflow: hidden;
}
.poster-frame .poster { display: block; width: 100%; max-width: 100%; border-radius: 14px; }
.poster-frame-sm { max-width: 340px; margin: 0 auto 14px; }
.poster-frame-chip { width: 84px; min-width: 84px; padding: 3px; border-radius: 12px; }
.poster-frame-chip .poster { border-radius: 9px; }

.event-meta { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin: 16px 0 6px; }
.chip {
  font-size: 0.9rem; font-weight: 700; color: var(--gold-bright);
  border: 1.5px solid rgba(245, 193, 69, 0.5);
  background: rgba(20, 8, 40, 0.55);
  padding: 7px 14px; border-radius: 999px;
  backdrop-filter: blur(4px);
}
.hero h1 {
  font-size: 1.9rem; margin-top: 6px;
  color: var(--gold-bright);
  text-shadow: 0 2px 14px rgba(245, 193, 69, 0.4);
}
.subtitle { color: var(--gold-bright); font-weight: 600; opacity: .9; }

/* ---------- Cards = cream ticket stubs ---------- */
.card {
  position: relative;
  background: linear-gradient(180deg, var(--cream-2), var(--cream));
  color: var(--maroon);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 24px;
  margin-bottom: 18px;
  border: 1px solid rgba(97, 27, 58, 0.15);
}
/* gold rule across the top like the poster's ticket */
.card::before {
  content: ""; position: absolute; left: 22px; right: 22px; top: 0; height: 4px;
  border-radius: 0 0 6px 6px;
  background: linear-gradient(90deg, transparent, var(--gold), var(--magenta), var(--gold), transparent);
}
.card-narrow { max-width: 420px; margin: 0 auto; }

/* Ticket blocks — perforated stub look */
.ticket-block {
  border: 2px dashed rgba(97, 27, 58, 0.35);
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 14px;
  position: relative;
  background:
    radial-gradient(circle at left center, transparent 8px, transparent 9px),
    linear-gradient(180deg, rgba(245, 193, 69, 0.08), transparent);
}
.ticket-block .tk-head {
  display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px;
}
.ticket-block .tk-num { font-weight: 800; color: var(--maroon-2); letter-spacing: .01em; }
.remove-tk {
  border: none; background: rgba(214, 69, 69, 0.12); color: var(--red);
  border-radius: 8px; padding: 5px 11px; cursor: pointer; font-size: 0.85rem; font-weight: 700;
}

.field { display: block; margin-bottom: 12px; }
.field > span { display: block; font-size: 0.85rem; font-weight: 700; margin-bottom: 5px; color: var(--maroon); }
.field input, .field select {
  width: 100%; padding: 12px; font-size: 1rem; color: var(--maroon);
  border: 1.5px solid rgba(97, 27, 58, 0.25); border-radius: 10px; background: #fffdf8;
}
.field input:focus, .field select:focus {
  outline: none; border-color: var(--gold-deep);
  box-shadow: 0 0 0 3px rgba(245, 193, 69, 0.3);
}
.tk-price { font-size: 0.85rem; color: var(--green); font-weight: 800; }

.btn {
  display: inline-block; width: 100%; padding: 14px 16px;
  font-size: 1.02rem; font-weight: 800; border: none; border-radius: 12px;
  cursor: pointer; transition: transform .05s, box-shadow .2s, filter .2s;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: linear-gradient(90deg, var(--gold-deep), var(--gold), var(--magenta));
  color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.25);
  box-shadow: 0 6px 18px rgba(214, 21, 107, 0.4);
}
.btn-primary:hover { filter: brightness(1.05); }
.btn-add { background: rgba(97, 27, 58, 0.08); color: var(--maroon-2); margin-bottom: 16px; border: 1.5px dashed rgba(97,27,58,.3); }
.btn-ghost {
  background: rgba(20, 8, 40, 0.4); color: var(--gold-bright);
  border: 1.5px solid rgba(245, 193, 69, 0.5); width: auto; padding: 10px 16px;
  text-decoration: none; border-radius: 12px;
}

.contact-box { background: rgba(106, 27, 154, 0.06); border: 1px solid rgba(97,27,58,.15); border-radius: 12px; padding: 14px 16px; margin-bottom: 16px; }
.section-title { color: var(--maroon-2); font-size: 1rem; margin-bottom: 2px; }
.contact-hint { font-size: 0.82rem; color: #9b8a76; margin-bottom: 12px; }
.field small { font-weight: 500; color: #9b8a76; }
.email-note { text-align: center; font-weight: 700; color: var(--green); background: rgba(47,158,87,.1); padding: 10px; border-radius: 10px; margin-bottom: 16px; }

.parking-box { background: rgba(214, 21, 107, 0.08); border: 1px solid rgba(214,21,107,.2); border-radius: 12px; padding: 14px; margin-bottom: 16px; }
.parking-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.parking-label-text { font-weight: 700; color: var(--maroon); }
.stepper { display: flex; align-items: center; gap: 0; border: 1.5px solid rgba(97,27,58,.3); border-radius: 10px; overflow: hidden; background: #fffdf8; }
.step-btn {
  border: none; background: rgba(97, 27, 58, 0.08); color: var(--maroon-2);
  width: 40px; height: 42px; font-size: 1.3rem; font-weight: 800; cursor: pointer; line-height: 1;
}
.step-btn:hover { background: rgba(214, 21, 107, 0.15); }
.stepper input {
  width: 56px; height: 42px; text-align: center; border: none; border-left: 1.5px solid rgba(97,27,58,.15);
  border-right: 1.5px solid rgba(97,27,58,.15); font-size: 1.05rem; font-weight: 800; color: var(--maroon);
  background: transparent; -moz-appearance: textfield;
}
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.stepper input:focus { outline: none; }
.notice { font-size: 0.83rem; color: #9c2b18; margin-top: 8px; background: rgba(214, 69, 69, 0.1); padding: 9px 11px; border-radius: 8px; font-weight: 600; }

.summary-bar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 4px; font-size: 1.05rem; font-weight: 700; border-top: 2px dashed rgba(97, 27, 58, 0.25);
}
.summary-bar strong { font-size: 1.5rem; color: var(--magenta); }

.error { color: var(--red); background: rgba(214, 69, 69, 0.1); padding: 10px; border-radius: 8px; margin-bottom: 12px; font-weight: 700; }

/* ---------- Confirmation ---------- */
.confirm-head { text-align: center; margin-bottom: 18px; }
.check {
  width: 56px; height: 56px; border-radius: 50%; background: var(--green); color: #fff;
  font-size: 1.9rem; line-height: 56px; margin: 0 auto 8px; box-shadow: 0 6px 18px rgba(47,158,87,.4);
}
.muted { color: #9b8a76; }
.confirm-head h2 { color: var(--maroon-2); }
.conf-ticket {
  display: flex; justify-content: space-between; align-items: center;
  border: 2px dashed rgba(97, 27, 58, 0.3); border-radius: 12px; padding: 13px 15px; margin-bottom: 10px;
  background: linear-gradient(90deg, rgba(245, 193, 69, 0.12), transparent);
}
.conf-ticket .ct-serial {
  font-family: ui-monospace, "SF Mono", monospace; font-weight: 800; color: #fff;
  background: linear-gradient(90deg, var(--maroon), var(--magenta));
  padding: 4px 10px; border-radius: 7px; font-size: 0.92rem; letter-spacing: .03em;
}
.conf-ticket .ct-name { font-weight: 800; color: var(--maroon); }
.conf-ticket .ct-type { font-size: 0.82rem; color: #9b8a76; }
.conf-line { display: flex; justify-content: space-between; padding: 11px 15px; border: 2px dashed rgba(97, 27, 58, 0.3); border-radius: 10px; margin-bottom: 10px; font-weight: 700; color: var(--maroon); }
.conf-total {
  display: flex; justify-content: space-between; align-items: center;
  padding: 15px; margin: 14px 0; border-radius: 12px; color: #fff;
  background: linear-gradient(90deg, var(--maroon), var(--magenta));
}
.conf-total strong { font-size: 1.6rem; color: var(--gold-bright); }
.pay-box { background: rgba(47, 158, 87, 0.1); border: 1px solid rgba(47,158,87,.25); border-radius: 12px; padding: 16px; margin-bottom: 16px; }
.pay-box h3 { margin-bottom: 8px; color: var(--green); }
.pay-box p { color: var(--maroon); }
.pay-detail { font-weight: 800; margin: 4px 0; color: var(--maroon-2); }

.foot { text-align: center; margin-top: 12px; }
.foot a { color: var(--gold-bright); font-weight: 700; text-decoration: none; }
.foot a:hover { text-decoration: underline; }

/* ---------- Review step & self-service cancellation ---------- */
.fineprint { text-align: center; font-size: 0.8rem; color: #9b8a76; margin-top: 10px; line-height: 1.5; }
.fineprint a { color: var(--magenta); font-weight: 700; }

.check-review { background: var(--gold-deep); box-shadow: 0 6px 18px rgba(214,150,21,.35); font-size: 1.6rem; }
.check-warn   { background: var(--red);       box-shadow: 0 6px 18px rgba(214,69,69,.35); font-weight: 800; }

.conf-ticket .ct-amount { font-weight: 800; color: var(--maroon); }

.review-contact {
  background: rgba(106, 27, 154, 0.06); border: 1px solid rgba(97,27,58,.15);
  border-radius: 12px; padding: 14px 16px; margin: 14px 0 4px;
}
.rc-line { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; }
.rc-line span { color: #9b8a76; font-size: .88rem; }
.rc-line strong { color: var(--maroon); word-break: break-all; text-align: right; }

.cancel-lead { color: #6b5a48; font-size: .92rem; line-height: 1.6; margin-bottom: 14px; }

.cancel-row {
  display: flex; align-items: center; gap: 12px;
  border: 2px dashed rgba(97, 27, 58, 0.3); border-radius: 12px;
  padding: 13px 15px; margin-bottom: 10px; cursor: pointer;
  background: linear-gradient(90deg, rgba(245, 193, 69, 0.12), transparent);
  transition: border-color .15s, background .15s;
}
.cancel-row:hover { border-color: var(--magenta); }
.cancel-row input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--magenta); flex: none; cursor: pointer; }
.cr-main  { display: flex; flex-direction: column; gap: 2px; flex: 1 1 auto; min-width: 0; }
.cr-right { display: flex; flex-direction: column; gap: 3px; align-items: flex-end; text-align: right; flex: none; }
.cancel-row .ct-name  { font-weight: 800; color: var(--maroon); }
.cancel-row .ct-type  { font-size: 0.82rem; color: #9b8a76; }
.cancel-row .ct-serial {
  font-family: ui-monospace, "SF Mono", monospace; font-weight: 800; color: #fff;
  background: linear-gradient(90deg, var(--maroon), var(--magenta));
  padding: 4px 10px; border-radius: 7px; font-size: 0.9rem; letter-spacing: .03em;
}
.paid-flag {
  font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em;
  color: var(--green); background: rgba(47,158,87,.14); padding: 2px 8px; border-radius: 20px;
}
.cancel-row.is-paid { opacity: .72; cursor: not-allowed; border-style: solid; border-color: rgba(47,158,87,.35); }
.cancel-row.is-paid:hover { border-color: rgba(47,158,87,.35); }
.cancel-row.is-cancelled {
  opacity: .55; cursor: default; background: rgba(0,0,0,.03);
  border-style: solid; border-color: rgba(97,27,58,.15);
}
.cancel-row.is-cancelled .ct-name { text-decoration: line-through; }
.cancel-row.is-cancelled .ct-serial { background: #b9a992; }

.btn-danger {
  background: linear-gradient(90deg, #a3123f, var(--red));
  color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.25);
  box-shadow: 0 6px 18px rgba(214, 69, 69, 0.35);
}
.btn-danger:hover { filter: brightness(1.06); }
.btn:disabled { opacity: .6; cursor: not-allowed; filter: grayscale(.3); }

/* ---------- Admin ---------- */
.admin-head {
  display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; gap: 12px; flex-wrap: wrap;
}
.admin-title { display: flex; align-items: center; gap: 14px; }
.admin-head h1 { font-size: 1.55rem; color: var(--gold-bright); text-shadow: 0 2px 12px rgba(245,193,69,.35); }
.admin-head .subtitle { text-align: left; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 18px; }
.stat {
  background: linear-gradient(180deg, var(--cream-2), var(--cream)); color: var(--maroon);
  border-radius: 14px; padding: 15px 16px; box-shadow: var(--shadow-card);
  border-top: 4px solid var(--gold);
}
.stat .num { font-size: 1.75rem; font-weight: 900; color: var(--maroon-2); }
.stat .lbl { font-size: 0.8rem; color: #9b8a76; font-weight: 700; }
.stat.rev { border-top-color: var(--green); }
.stat.rev .num { color: var(--green); }
.stat.coll { border-top-color: var(--magenta); }
.stat.coll .num { color: var(--magenta); }

.filters { display: flex; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
/* 16px keeps iOS from auto-zooming when a field is focused */
.filters input, .filters select { padding: 11px 12px; border: 1.5px solid rgba(97, 27, 58, 0.25); border-radius: 10px; font-size: 16px; color: var(--maroon); background: #fffdf8; }
.filters input { flex: 1; min-width: 160px; }

.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: 0.92rem; color: var(--maroon); }
th, td { text-align: left; padding: 11px 12px; border-bottom: 1px solid rgba(97, 27, 58, 0.12); white-space: nowrap; }
th { background: rgba(97, 27, 58, 0.08); color: var(--maroon-2); font-size: 0.76rem; text-transform: uppercase; letter-spacing: .05em; }
td .serial { font-family: ui-monospace, "SF Mono", monospace; font-weight: 800; color: var(--maroon-2); }
.badge { padding: 3px 10px; border-radius: 20px; font-size: 0.78rem; font-weight: 800; }
.badge.paid { background: rgba(47, 158, 87, 0.16); color: var(--green); }
.badge.unpaid { background: rgba(214, 69, 69, 0.13); color: var(--red); }
.badge.yes { background: rgba(214, 21, 107, 0.15); color: var(--magenta); }
.badge.no { background: #efe6d4; color: #9b8a76; }
.btn-mini { padding: 7px 12px; border-radius: 8px; border: none; cursor: pointer; font-weight: 800; font-size: 0.82rem; }
.btn-mini.pay { background: var(--green); color: #fff; }
.btn-mini.unpay { background: rgba(214, 69, 69, 0.13); color: var(--red); }
.park-btn { margin-left: 8px; }

/* Booking group header band */
.booking-head td { padding: 0; border-bottom: none; }
.booking-head { cursor: pointer; }
.bk-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 11px 14px; margin-top: 8px;
  background: linear-gradient(90deg, rgba(97, 27, 58, 0.14), rgba(214, 21, 107, 0.10));
  border-left: 5px solid var(--magenta);
  border-radius: 10px;
  transition: background .15s;
}
.booking-head.open .bk-bar { border-radius: 10px 10px 0 0; }
.booking-head:hover .bk-bar { background: linear-gradient(90deg, rgba(97, 27, 58, 0.20), rgba(214, 21, 107, 0.15)); }
.bk-left { display: flex; align-items: center; gap: 10px; }
.bk-caret { font-size: 0.9rem; color: var(--magenta); width: 14px; flex: none; }
.bk-titleline { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.bk-title { font-weight: 900; font-size: 1.02rem; color: var(--maroon-2); }
.bk-date { font-size: 0.8rem; color: #9b8a76; font-weight: 600; }
.bk-count { font-size: 0.78rem; font-weight: 700; color: var(--maroon); background: rgba(97,27,58,.1); padding: 2px 9px; border-radius: 999px; }
.bk-contact { font-size: 0.8rem; color: var(--maroon); margin-top: 3px; opacity: .85; overflow-wrap: anywhere; }
.bk-right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.bk-money { font-weight: 800; font-size: 0.9rem; padding: 5px 12px; border-radius: 999px; white-space: nowrap; }
.bk-money.due { background: linear-gradient(90deg, var(--maroon), var(--magenta)); color: var(--gold-bright); }
.bk-money.paid { background: rgba(47, 158, 87, 0.16); color: var(--green); }

/* Ticket rows nested under a booking */
.ticket-row.collapsed { display: none; }
.ticket-row td:first-child { padding-left: 24px; position: relative; }
.ticket-row td:first-child::before {
  content: ""; position: absolute; left: 9px; top: 0; bottom: 0; width: 3px;
  background: rgba(214, 21, 107, 0.22);
}
.ticket-row:last-child td:first-child::before { border-radius: 0 0 3px 3px; }
.ticket-row td { background: rgba(255, 253, 248, 0.5); }

@media (max-width: 480px) {
  .hero h1 { font-size: 1.5rem; }
  .card { padding: 17px; }
  .poster-frame-chip { display: none; }
}
