/* ============================================================
   Fest-Ticket – stiluslap
   Koncepcio: "jegyto" (ticket stub). Melyindigo alap, korall
   beleptetokod-akcent, perforalt szelu esemenykartyak.
   ============================================================ */
:root {
  --ink:        #161427;
  --ink-soft:   #2a2740;
  --paper:      #f7f6f2;
  --paper-card: #ffffff;
  --line:       #e4e1d8;
  --muted:      #6b6880;
  --brand:      #3b2fd6;   /* indigo */
  --brand-2:    #5a4ff0;
  --accent:     #ff5a4d;   /* korall / jegyto perforacio */
  --accent-ink: #c0392b;
  --ok:         #1f9d6b;
  --warn:       #d97706;
  --radius:     14px;
  --shadow:     0 8px 30px rgba(22,20,39,.10);
  --font:       'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.55;
  font-size: 16px;
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
h1,h2,h3 { line-height: 1.15; letter-spacing: -.02em; margin: 0 0 .4em; }
h1 { font-size: clamp(1.8rem, 1.2rem + 2vw, 2.6rem); font-weight: 800; }
h2 { font-size: 1.5rem; font-weight: 750; }
h3 { font-size: 1.15rem; font-weight: 700; }

.container { width: min(1080px, 92vw); margin-inline: auto; }
.stack > * + * { margin-top: 1rem; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }

/* ---------- Fejlec / navigacio ---------- */
.site-header {
  background: var(--ink);
  color: #fff;
  position: sticky; top: 0; z-index: 30;
}
.nav {
  display: flex; align-items: center; gap: 1.25rem;
  padding: .8rem 0;
}
.brand {
  font-weight: 800; font-size: 1.25rem; color: #fff; letter-spacing: -.03em;
  display: inline-flex; align-items: center; gap: .5rem;
}
.brand .dot { width: 11px; height: 11px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px rgba(255,90,77,.25); }
.nav a:not(.brand):not(.btn) { color: #cfcde0; font-weight: 500; }
.nav a:not(.brand):not(.btn):hover { color: #fff; text-decoration: none; }
.nav .spacer { margin-left: auto; }
.nav-links { display: flex; align-items: center; gap: 1.1rem; flex-wrap: wrap; }
.role-badge {
  font-size: .7rem; text-transform: uppercase; letter-spacing: .08em;
  background: rgba(255,255,255,.12); padding: .15rem .5rem; border-radius: 99px; color: #fff;
}

/* ---------- Gombok ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  font: inherit; font-weight: 650; cursor: pointer;
  padding: .6rem 1.15rem; border-radius: 10px; border: 1px solid transparent;
  background: var(--brand); color: #fff; transition: transform .06s ease, background .15s ease;
}
.btn:hover { background: var(--brand-2); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn--accent { background: var(--accent); }
.btn--accent:hover { background: #ff4133; }
.btn--ghost { background: transparent; border-color: rgba(255,255,255,.3); color: #fff; }
.btn--ghost:hover { background: rgba(255,255,255,.1); }
.btn--outline { background: #fff; color: var(--ink); border-color: var(--line); }
.btn--outline:hover { background: var(--paper); }
.btn--sm { padding: .35rem .7rem; font-size: .85rem; border-radius: 8px; }
.btn--danger { background: #fff; color: var(--accent-ink); border-color: #f0c9c4; }
.btn--danger:hover { background: #fdece9; }
.btn--block { width: 100%; }

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(900px 400px at 80% -10%, rgba(90,79,240,.45), transparent 60%),
    radial-gradient(700px 300px at 0% 0%, rgba(255,90,77,.25), transparent 55%),
    var(--ink);
  color: #fff; padding: 4.5rem 0 3.5rem;
}
.hero h1 { color: #fff; max-width: 16ch; }
.hero p { color: #d4d2e4; font-size: 1.12rem; max-width: 52ch; }
.hero .cta-row { display: flex; gap: .75rem; flex-wrap: wrap; margin-top: 1.5rem; }
.eyebrow {
  display: inline-block; text-transform: uppercase; letter-spacing: .18em;
  font-size: .72rem; font-weight: 700; color: var(--accent);
  margin-bottom: 1rem;
}

/* ---------- Esemenykartya (ticket stub signature) ---------- */
.grid { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.section { padding: 3rem 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 1.4rem; gap: 1rem; }

.ticket {
  position: relative; background: var(--paper-card); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column;
  border: 1px solid var(--line);
}
.ticket__top {
  background: linear-gradient(135deg, var(--brand) 0%, var(--ink-soft) 120%);
  color: #fff; padding: 1.1rem 1.2rem 1.4rem;
}
.ticket__type {
  font-size: .68rem; text-transform: uppercase; letter-spacing: .12em;
  color: rgba(255,255,255,.8); font-weight: 700;
}
.ticket__title { color: #fff; font-size: 1.2rem; margin: .35rem 0 0; }
/* perforalt elvalaszto, mint egy jegyen */
.ticket__perf {
  position: relative; height: 0; border-top: 2px dashed var(--line);
  margin: 0 1rem;
}
.ticket__perf::before, .ticket__perf::after {
  content: ""; position: absolute; top: -11px; width: 20px; height: 20px;
  border-radius: 50%; background: var(--paper);
}
.ticket__perf::before { left: -21px; }
.ticket__perf::after  { right: -21px; }
.ticket__body { padding: 1.1rem 1.2rem; display: flex; flex-direction: column; gap: .5rem; flex: 1; }
.ticket__meta { font-size: .9rem; color: var(--muted); display: flex; flex-direction: column; gap: .25rem; }
.ticket__meta b { color: var(--ink); font-weight: 600; }
.ticket__foot { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: .6rem; }
.ticket__price { font-weight: 800; font-size: 1.05rem; }

/* ---------- Cimkek / statusz ---------- */
.tag {
  display: inline-block; font-size: .72rem; font-weight: 700; padding: .2rem .55rem;
  border-radius: 99px; background: #eceaf9; color: var(--brand); letter-spacing: .02em;
}
.status { font-size: .72rem; font-weight: 700; padding: .2rem .55rem; border-radius: 99px; }
.status--published, .status--paid, .status--valid { background: #e3f5ee; color: var(--ok); }
.status--draft, .status--pending { background: #fdf0db; color: var(--warn); }
.status--cancelled, .status--void { background: #fdece9; color: var(--accent-ink); }

/* ---------- Lapok / panelek ---------- */
.panel {
  background: var(--paper-card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow);
}
.page { padding: 2.5rem 0 4rem; }

/* ---------- Urlapok ---------- */
.field { margin-bottom: 1rem; }
.field label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: .35rem; }
.input, .select, .textarea {
  width: 100%; font: inherit; padding: .6rem .75rem; border: 1px solid var(--line);
  border-radius: 9px; background: #fff; color: var(--ink);
}
.input:focus, .select:focus, .textarea:focus {
  outline: 3px solid rgba(59,47,214,.25); outline-offset: 1px; border-color: var(--brand);
}
.textarea { min-height: 120px; resize: vertical; }
.field .err { color: var(--accent-ink); font-size: .82rem; margin-top: .3rem; }
.input--err { border-color: var(--accent); }
.form-grid { display: grid; gap: 0 1.1rem; grid-template-columns: 1fr 1fr; }
.form-grid .full { grid-column: 1 / -1; }
.help { font-size: .82rem; color: var(--muted); }

/* ---------- Tablazat ---------- */
.table { width: 100%; border-collapse: collapse; background: #fff; }
.table th, .table td { padding: .7rem .8rem; text-align: left; border-bottom: 1px solid var(--line); }
.table th { font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.table tr:last-child td { border-bottom: none; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }

/* ---------- Flash uzenetek ---------- */
.flash { padding: .8rem 1rem; border-radius: 10px; margin-bottom: .6rem; font-weight: 500; border: 1px solid; }
.flash--success { background: #e3f5ee; border-color: #b6e6d2; color: #146c4a; }
.flash--error   { background: #fdece9; border-color: #f3c3bb; color: #a02d1f; }
.flash--info    { background: #eceaf9; border-color: #cdc8f4; color: #34299e; }

/* ---------- Stat kartyak (admin) ---------- */
.stats { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem; }
.stat .n { font-size: 1.9rem; font-weight: 800; letter-spacing: -.02em; }
.stat .l { color: var(--muted); font-size: .85rem; }

/* ---------- Footer ---------- */
.site-footer { padding: 2rem 0; color: var(--muted); border-top: 1px solid var(--line); margin-top: 2rem; }

.inline-form { display: inline; }
.row-actions { display: flex; gap: .4rem; align-items: center; flex-wrap: wrap; }

@media (max-width: 640px) {
  .form-grid { grid-template-columns: 1fr; }
  .nav { gap: .75rem; flex-wrap: wrap; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

/* ---------- Galeria (esemeny kep/video) ---------- */
.gallery { display: grid; gap: .8rem; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.gallery figure { margin: 0; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: #000; }
.gallery img { width: 100%; height: 170px; object-fit: cover; display: block; }
.gallery figcaption { padding: .4rem .6rem; font-size: .8rem; color: var(--muted); background: var(--paper-card); }
.gallery .video { position: relative; padding-top: 56.25%; height: 0; background: #000; }
.gallery .video iframe, .gallery .video video {
  position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block;
}
.media-admin { display: grid; gap: .6rem; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.media-admin .cell { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; }
.media-admin .cell img { width: 100%; height: 110px; object-fit: cover; display: block; }
.media-admin .cell .thumb-video { height: 110px; display: flex; align-items: center; justify-content: center; background: #161427; color: #fff; font-size: .8rem; }
.media-admin .cell .bar { display: flex; justify-content: space-between; align-items: center; padding: .35rem .5rem; gap: .4rem; }

/* ---------- Archiv / lezajlott ---------- */
.status--used { background: #ecebf2; color: #55526b; }
.status--past { background: #ecebf2; color: #55526b; }
.row--past td { color: var(--muted); }

/* ---------- Ülésrend ---------- */
.seatmap-wrap { margin: 1rem 0; }
.seatmap-tools { display: flex; gap: .4rem; align-items: center; margin-bottom: .5rem; }
.seatmap {
  --seat-size: 26px;
  overflow-x: auto; padding: 1rem; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); -webkit-overflow-scrolling: touch;
}
.seatmap__stage {
  margin: 0 auto 1.4rem; max-width: 420px; text-align: center; padding: .45rem;
  background: var(--ink); color: #fff; border-radius: 0 0 40px 40px; letter-spacing: .3em; font-size: .75rem; font-weight: 700;
}
.seatmap__section { margin-bottom: 1.4rem; width: max-content; min-width: 100%; }
.seatmap__section-name { text-align: center; font-weight: 700; font-size: .9rem; margin-bottom: .4rem; }
.seatmap__cat {
  display: inline-block; margin-left: .4rem; padding: .05rem .5rem; border-radius: 99px; font-size: .75rem;
  background: #f1f0f7; background: color-mix(in srgb, var(--seat-c) 15%, #fff); color: var(--seat-c); border: 1px solid var(--seat-c);
}
.seatmap__row { display: flex; justify-content: center; align-items: center; gap: 3px; margin-bottom: 3px; }
.seatmap__rowlabel { width: 1.8em; text-align: center; font-size: .7rem; color: var(--muted); font-weight: 600; flex: none; }
.seat {
  --seat-c: #9a96b5;
  width: var(--seat-size); height: var(--seat-size); flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  font: 600 calc(var(--seat-size) * .38)/1 var(--font); padding: 0; cursor: pointer;
  border-radius: 6px 6px 3px 3px; border: 1.5px solid var(--seat-c);
  background: #f1f0f7; background: color-mix(in srgb, var(--seat-c) 18%, #fff); color: var(--ink);
}
.seat:hover:not(:disabled) { background: color-mix(in srgb, var(--seat-c) 40%, #fff); }
.seat.is-selected { background: var(--accent); border-color: var(--accent-ink); color: #fff; }
.seat--gap { visibility: hidden; cursor: default; }
.seat--sold    { background: #d9d7e2; border-color: #c6c3d3; color: #9b98ad; cursor: not-allowed; }
.seat--held    { background: #fde8c8; border-color: #f0b964; color: #a46a10; cursor: not-allowed; }
.seat--blocked { background: repeating-linear-gradient(45deg,#3a3650,#3a3650 3px,#56516f 3px,#56516f 6px); border-color: #3a3650; color: #fff; cursor: not-allowed; }
.seat--na      { background: #f5f4f0; border: 1.5px dashed #c6c3d3; color: #b5b2c4; cursor: not-allowed; }
[data-seatmap="admin"] .seat--blocked, [data-seatmap="admin"] .seat--held, [data-seatmap="admin"] .seat--na { cursor: pointer; }
.seat:disabled { cursor: not-allowed; }
.seat-legend { display: flex; flex-wrap: wrap; gap: .4rem 1rem; font-size: .82rem; color: var(--muted); }
.seat-legend span { display: inline-flex; align-items: center; gap: .35rem; }
.seat-legend .seat { --seat-size: 16px; cursor: default; }
.cat-dot { display: inline-block; width: .8em; height: .8em; border-radius: 50%; background: var(--seat-c); vertical-align: middle; }
.sticky-summary { position: sticky; bottom: 0; z-index: 5; box-shadow: 0 -8px 24px rgba(22,20,39,.08); }
.sticky-summary ul { margin: .4rem 0; padding-left: 1.1rem; font-size: .88rem; max-height: 7.5em; overflow-y: auto; }
.countdown { font-weight: 800; font-variant-numeric: tabular-nums; }

/* ---------- Sütihozzájárulás ---------- */
.consent { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; background: var(--ink); color: #e9e7f5; padding: 1rem 0; box-shadow: 0 -10px 30px rgba(0,0,0,.2); }
.consent[hidden] { display: none; }
.consent__inner { display: flex; gap: 1rem; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.consent p { margin: 0; font-size: .9rem; max-width: 70ch; }
.consent .btn--outline { background: transparent; color: #fff; border-color: rgba(255,255,255,.4); }

/* ---------- Borítókép ---------- */
.event-cover { display: block; width: calc(100% + 3rem); max-width: none; margin: -1.5rem -1.5rem 1.2rem; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius) var(--radius) 0 0; }
.ticket__cover { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }

/* ---------- Statisztika ---------- */
.funnel__row { display: grid; grid-template-columns: minmax(150px, 230px) 1fr minmax(90px, auto); gap: .8rem; align-items: center; padding: .35rem 0; }
.funnel__label { font-size: .9rem; }
.funnel__bar { background: var(--paper); border-radius: 6px; height: 14px; overflow: hidden; }
.funnel__bar span { display: block; height: 100%; min-width: 2px; background: linear-gradient(90deg, var(--brand), var(--brand-2)); border-radius: 6px; }
.funnel__val { text-align: right; font-variant-numeric: tabular-nums; }
.daychart { display: flex; align-items: flex-end; gap: 3px; height: 140px; padding-top: .5rem; border-bottom: 1px solid var(--line); }
.daychart__col { flex: 1; height: 100%; display: flex; align-items: flex-end; gap: 1px; }
.daychart__v, .daychart__t { flex: 1; min-height: 1px; border-radius: 3px 3px 0 0; }
.daychart__v { background: #c9c5f2; }
.daychart__t { background: var(--accent); }
@media (max-width: 640px) { .funnel__row { grid-template-columns: 1fr auto; } .funnel__bar { grid-column: 1 / -1; order: 3; } }
