:root {
  --bg: #0b1020;
  --surface: #ffffff;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e8ecf4;
  --brand: #7c3aed;
  --brand-2: #ec4899;
  --accent: #f97316;
  --ok: #10b981;
  --err: #ef4444;
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  --radius: 16px;
}
* { box-sizing: border-box; }
/* The HTML `hidden` attribute must beat any `display` rule below
   (e.g. .modal-overlay's display:flex), or hidden elements still show. */
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: #f6f7fb;
  line-height: 1.55;
} 

/* ───────── Hero ───────── */
.hero {
  background: radial-gradient(1200px 400px at 20% -10%, rgba(236, 72, 153, 0.5), transparent),
              linear-gradient(120deg, var(--brand) 0%, var(--brand-2) 60%, var(--accent) 120%);
  color: #fff;
  padding: 3.2rem 1rem 3rem;
  text-align: center;
}
.hero h1 { margin: 0; font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 800; letter-spacing: -0.5px; }
.hero p { margin: 0.6rem 0 0; opacity: 0.95; font-size: 1.05rem; }

/* ───────── Tabs ───────── */
.tabs { display: flex; gap: 0.4rem; justify-content: center; margin-top: -1.6rem; position: relative; z-index: 2; flex-wrap: wrap; padding: 0 1rem; }
.tab {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.6rem 1.3rem;
  font-weight: 700; font-size: 0.95rem; cursor: pointer; color: var(--muted);
  box-shadow: var(--shadow);
  transition: all 0.15s ease;
}
.tab.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.tab:hover { transform: translateY(-1px); }

main { max-width: 1040px; margin: 0 auto; padding: 2.2rem 1rem 3rem; }
section { margin-bottom: 2rem; }

/* ───────── Tab panels (only the active one shows) ───────── */
.tab-panel { display: none; }
.tab-panel.active { display: block; }

.section-head { display: flex; align-items: center; gap: 0.8rem; margin-bottom: 1.2rem; }
.section-head h2 { margin: 0; font-size: 1.4rem; }
.pill { background: #ede9fe; color: var(--brand); font-weight: 700; font-size: 0.8rem; padding: 0.2rem 0.7rem; border-radius: 999px; }
.muted { color: var(--muted); }

/* ───────── Event grid ───────── */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.2rem; }
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex; flex-direction: column;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12); }
.card-banner { height: 90px; background: linear-gradient(135deg, var(--brand), var(--brand-2)); display: flex; align-items: center; justify-content: center; font-size: 2.4rem; }
.card-body { padding: 1.1rem 1.2rem 1.3rem; flex: 1; display: flex; flex-direction: column; }
.card-body h3 { margin: 0 0 0.5rem; font-size: 1.15rem; }
.meta { display: flex; align-items: center; gap: 0.4rem; font-size: 0.85rem; color: var(--muted); margin: 0.15rem 0; }
.desc { font-size: 0.9rem; color: #475569; margin: 0.7rem 0; flex: 1; }

/* ───────── Buttons ───────── */
button { font-family: inherit; cursor: pointer; border: none; }
.primary { background: linear-gradient(120deg, var(--brand), var(--brand-2)); color: #fff; font-weight: 700; padding: 0.7rem 1.2rem; border-radius: 10px; transition: transform 0.12s ease; }
.primary:hover { transform: translateY(-1px); }
.block { width: 100%; }
.small { background: var(--ink); color: #fff; font-weight: 700; padding: 0.45rem 0.9rem; border-radius: 8px; font-size: 0.85rem; }
.small.danger { background: var(--err); }
.small:hover { opacity: 0.9; }
.card-cta { margin-top: auto; }

/* ───────── Forms ───────── */
form label { display: grid; gap: 0.3rem; font-weight: 600; font-size: 0.88rem; margin-bottom: 0.9rem; }
input, select {
  width: 100%; padding: 0.7rem 0.8rem; border: 1px solid var(--line);
  border-radius: 10px; font-size: 1rem; font-family: inherit; background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15); }
.inline-form { display: flex; gap: 0.6rem; max-width: 460px; margin-bottom: 1.4rem; }
.inline-form input { flex: 1; }

/* ───────── Tickets list ───────── */
.ticket {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1rem 1.2rem; margin-bottom: 0.8rem; display: flex; align-items: center; gap: 1rem; box-shadow: var(--shadow);
}
.ticket .t-info { flex: 1; }
.ticket .t-event { font-weight: 700; }
.ticket .t-meta { font-size: 0.82rem; color: var(--muted); }
.badge { background: #d1fae5; color: #065f46; font-weight: 700; font-size: 0.72rem; padding: 0.2rem 0.6rem; border-radius: 999px; }
.badge.cancelled { background: #fee2e2; color: #991b1b; }

/* ───────── Modal ───────── */
.modal-overlay { position: fixed; inset: 0; background: rgba(15, 23, 42, 0.55); display: flex; align-items: center; justify-content: center; padding: 1rem; z-index: 50; backdrop-filter: blur(3px); }
.modal { background: #fff; border-radius: 20px; padding: 2rem; max-width: 420px; width: 100%; position: relative; box-shadow: 0 30px 60px rgba(0,0,0,0.3); animation: pop 0.18s ease; }
.modal h3 { margin: 0 0 1.2rem; font-size: 1.2rem; }
.modal h3 span { color: var(--brand); }
.modal-close { position: absolute; top: 0.6rem; right: 0.9rem; font-size: 1.8rem; background: none; color: var(--muted); line-height: 1; }
@keyframes pop { from { transform: scale(0.94); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* ───────── Toast ───────── */
.toast { position: fixed; bottom: 1.5rem; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 0.9rem 1.4rem; border-radius: 12px; font-weight: 600; box-shadow: 0 12px 30px rgba(0,0,0,0.25); z-index: 60; max-width: 90vw; }
.toast.ok { background: var(--ok); }
.toast.err { background: var(--err); }

footer { text-align: center; color: var(--muted); padding: 2rem 1rem 3rem; font-size: 0.9rem; }
footer span { color: #94a3b8; }
footer a { color: var(--brand); text-decoration: none; font-weight: 700; }

@media (max-width: 560px) { .inline-form { flex-direction: column; } }
