/* ==========================================================
   Cuarteto Brontë: ticketera
   ========================================================== */
:root {
  /* Monocromo, como el logo del cuarteto: el color lo ponen los afiches */
  --bg: #0b0b0d;
  --bg-2: #121215;
  --surface: #16161a;
  --surface-2: #222227;
  --line: #2d2d33;
  --text: #f7f7f7;
  --muted: #9d9da6;
  --accent: #ffffff;
  --accent-2: #e6e6e6;
  --on-accent: #0b0b0d;
  --gold: #ffffff;
  --ok: #4fe0b6;
  --warn: #ffb547;
  --danger: #ff6b81;
  --radius: 18px;
  --radius-sm: 10px;
  --shadow: 0 20px 50px -20px rgba(0, 0, 0, .6);
  --font-display: "Cormorant Garamond", Georgia, serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-pixel: "Silkscreen", ui-monospace, monospace;
  --max: 1160px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: var(--bg); color: var(--text); font: 16px/1.6 var(--font-body);
  background-image:
    radial-gradient(1200px 600px at 85% -10%, rgba(255, 255, 255, .07), transparent 60%),
    radial-gradient(900px 500px at -10% 10%, rgba(255, 255, 255, .04), transparent 60%);
  background-attachment: fixed;
}
main { flex: 1; }
img { max-width: 100%; display: block; }
a { color: var(--accent-2); }
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.1; margin: 0 0 .5em; letter-spacing: .01em; }
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h3 { font-size: 1.4rem; }
p { margin: 0 0 1em; }
.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.pixel { font-family: var(--font-pixel); text-transform: uppercase; letter-spacing: .08em; font-size: .75rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- Header / footer ---------- */
.site-header { position: sticky; top: 0; z-index: 30; backdrop-filter: blur(14px); background: rgba(11, 11, 13, .8); border-bottom: 1px solid rgba(255, 255, 255, .08); }
.brand-logo { height: 54px; width: auto; }
.site-header .container { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; }
.brand-mark { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: #000; box-shadow: 0 0 0 1px rgba(255,255,255,.5) inset; }
.brand-mark svg { width: 20px; height: 20px; }
.brand-name { font-family: var(--font-display); font-size: 1.35rem; font-weight: 700; letter-spacing: .02em; }
.nav { display: flex; gap: 20px; }
.nav a { color: #cfcfd6; text-decoration: none; font-weight: 500; font-size: .95rem; }
.nav a:hover, .nav a.active { color: var(--text); }
.site-footer { border-top: 1px solid var(--line); margin-top: 64px; padding: 32px 0; color: var(--muted); font-size: .875rem; }
.site-footer .container { display: flex; flex-wrap: wrap; gap: 12px 32px; justify-content: space-between; align-items: center; }
.site-footer a { color: var(--muted); }
.pay-logos { display: flex; gap: 8px; flex-wrap: wrap; }
.pay-logos span { border: 1px solid var(--line); border-radius: 6px; padding: 2px 8px; font-size: .75rem; }

/* ---------- Botones / formularios ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 24px; border-radius: 999px; border: 0; cursor: pointer;
  font: 600 1rem var(--font-body); text-decoration: none; color: var(--on-accent);
  background: var(--accent); box-shadow: 0 10px 30px -14px rgba(255,255,255,.45);
  transition: transform .15s ease, filter .15s ease, background .15s ease;
}
.btn:hover { filter: brightness(.88); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }
.btn-block { width: 100%; }
.btn-gold { background: var(--accent); color: var(--on-accent); }
.btn-ghost { background: transparent; border: 1px solid rgba(255,255,255,.35); box-shadow: none; color: var(--text); }
.btn-ghost:hover { background: rgba(255,255,255,.08); filter: none; }
.btn-danger { background: var(--danger); box-shadow: none; color: #fff; }
.btn-sm { min-height: 36px; padding: 0 14px; font-size: .875rem; }

label { display: block; font-weight: 500; font-size: .9rem; margin-bottom: 6px; }
.field { margin-bottom: 14px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
input[type=text], input[type=email], input[type=tel], input[type=password], input[type=number], input[type=datetime-local], input[type=search], select, textarea {
  width: 100%; min-height: 46px; padding: 10px 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--line); background: var(--bg-2); color: var(--text); font: inherit;
}
textarea { min-height: 120px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.hint { font-size: .8rem; color: var(--muted); margin-top: 4px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; font-size: .9rem; }
.check input { margin-top: 4px; width: 18px; height: 18px; accent-color: var(--accent); }

.alert { border-radius: var(--radius-sm); padding: 12px 16px; margin-bottom: 16px; font-size: .95rem; }
.alert-error { background: rgba(255, 107, 129, .12); border: 1px solid rgba(255, 107, 129, .4); }
.alert-ok { background: rgba(79, 224, 182, .1); border: 1px solid rgba(79, 224, 182, .4); }
.alert-info { background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .25); }
.alert ul { margin: 0; padding-left: 18px; }

.badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: .75rem; font-weight: 600; background: var(--surface-2); color: var(--muted); }
.badge-ok { background: rgba(79,224,182,.15); color: var(--ok); }
.badge-warn { background: rgba(255,181,71,.15); color: var(--warn); }
.badge-danger { background: rgba(255,107,129,.15); color: var(--danger); }
.badge-accent { background: rgba(255,255,255,.14); color: var(--text); }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }

/* ---------- Home ---------- */
.hero { padding: 72px 0 40px; }
.hero.has-photo {
  padding: 120px 0 88px; margin-bottom: 24px;
  background: linear-gradient(90deg, rgba(11,11,13,.95) 0%, rgba(11,11,13,.8) 45%, rgba(11,11,13,.2) 100%), var(--hero) center / cover no-repeat;
  border-bottom: 1px solid var(--line);
}
@media (max-width: 640px) { .hero.has-photo { padding: 72px 0 56px; background: linear-gradient(rgba(11,11,13,.45), rgba(11,11,13,.92) 75%), var(--hero-m) 70% center / cover no-repeat; } }
.hero .eyebrow { color: var(--gold); margin-bottom: 16px; }
.hero h1 { max-width: 14ch; }
.hero h1 em { font-style: italic; color: var(--accent-2); }
.hero p { max-width: 56ch; color: var(--muted); font-size: 1.1rem; }
/* Sobre la foto de portada: texto casi blanco con sombra para que se lea en cualquier zona de la imagen */
.hero.has-photo p { color: rgba(255,255,255,.92); text-shadow: 0 1px 3px rgba(0,0,0,.85), 0 0 18px rgba(0,0,0,.6); }
.hero.has-photo h1, .hero.has-photo .eyebrow { text-shadow: 0 2px 12px rgba(0,0,0,.7); }
.notes { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.section-title { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin: 24px 0 20px; }

.events-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 24px; }
.event-card { position: relative; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; text-decoration: none; color: var(--text); transition: transform .2s ease, border-color .2s ease; }
.event-card:hover { transform: translateY(-4px); border-color: var(--accent); }
.event-card .poster { aspect-ratio: 4 / 3; }
.event-card .body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.event-card h3 { margin: 0; font-size: 1.5rem; }
.event-card .meta { color: var(--muted); font-size: .9rem; }
.event-card .foot { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 12px; }
.event-card .price { font-weight: 700; }
.date-chip { position: absolute; top: 14px; left: 14px; background: rgba(0,0,0,.8); backdrop-filter: blur(6px); border: 1px solid var(--line); border-radius: 12px; padding: 6px 12px; text-align: center; line-height: 1.1; }
.date-chip .d { font-family: var(--font-display); font-size: 1.6rem; font-weight: 700; display: block; }
.date-chip .m { font-family: var(--font-pixel); font-size: .65rem; color: var(--gold); text-transform: uppercase; }
.status-chip { position: absolute; top: 14px; right: 14px; }

/* Póster generado cuando no hay imagen */
.poster { position: relative; width: 100%; background-size: cover; background-position: center; overflow: hidden; }
.poster.has-image { background: #000; }
.poster.has-image::before { content: ""; position: absolute; inset: -24px; background: var(--img) center / cover no-repeat; filter: blur(22px) brightness(.45) saturate(1.1); }
.poster.has-image img { position: relative; width: 100%; height: 100%; object-fit: contain; }
.poster.generated { background: radial-gradient(circle at 30% 20%, #3a3a42 0, transparent 50%), radial-gradient(circle at 80% 90%, #26262c 0, transparent 45%), linear-gradient(160deg, #18181c, #050506); display: grid; place-items: center; }
.poster.generated::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(255,255,255,.7) 1px, transparent 1px); background-size: 46px 46px; opacity: .18; }
.poster.generated span { position: relative; font-family: var(--font-display); font-size: 1.7rem; font-style: italic; text-align: center; padding: 0 24px; text-shadow: 0 4px 30px rgba(0,0,0,.6); }

.empty { text-align: center; padding: 64px 16px; }
.external-section { margin-top: 72px; }
.external-section .eyebrow { color: var(--muted); margin-bottom: 8px; }
.event-card.external { border-style: dashed; }
.event-card.external .foot { flex-wrap: wrap; gap: 10px; }
.event-card.external .foot .price, .event-card.external .foot .btn { white-space: nowrap; }

/* Nosotros + galería */
.about { margin-top: 96px; }
.about-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 48px; align-items: center; }
.about-figure { margin: 0; position: relative; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.about-photo { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; display: block; }
/* Crédito del fotógrafo como marca de agua */
.photo-credit { position: absolute; right: 10px; bottom: 10px; max-width: calc(100% - 20px); padding: 5px 10px; border-radius: 10px; background: rgba(0,0,0,.55); backdrop-filter: blur(6px); color: rgba(255,255,255,.85); font-size: .72rem; line-height: 1.35; }
.photo-credit a { color: #fff; text-decoration: none; font-weight: 600; }
.photo-credit a:hover { text-decoration: underline; }
.photo-credit .place { display: block; color: rgba(255,255,255,.65); font-size: .68rem; }
.hero.has-photo { position: relative; }
.hero .photo-credit { right: 16px; bottom: 14px; }
.about h2 em { font-style: italic; }
.about .eyebrow { color: var(--muted); margin-bottom: 12px; }
.members { list-style: none; padding: 0; margin: 24px 0 8px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.members li { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 16px; background: var(--surface); }
.members .pixel { display: block; color: var(--muted); font-size: .65rem; margin-bottom: 2px; }
.members strong { font-family: var(--font-display); font-size: 1.35rem; font-weight: 600; letter-spacing: .01em; display: block; }
.members .favs { display: block; margin-top: 6px; font-size: .8rem; line-height: 1.4; color: var(--muted); font-style: italic; }
.members .favs [aria-hidden] { font-style: normal; margin-right: 2px; }
.social { display: flex; gap: 10px; margin-top: 20px; }
.social a { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; color: var(--text); border: 1px solid rgba(255,255,255,.3); transition: background .15s, color .15s; }
.social a:hover { background: var(--accent); color: var(--on-accent); }
.social svg { width: 20px; height: 20px; }
.gallery { display: grid; grid-template-columns: 2fr 1fr 1fr; grid-template-rows: 220px 220px; gap: 12px; margin-top: 40px; }
.gallery .photo { margin: 0; position: relative; border-radius: var(--radius-sm); overflow: hidden; }
.gallery img { width: 100%; height: 100%; object-fit: cover; display: block; filter: grayscale(.15); transition: filter .3s; }
.gallery img:hover { filter: none; }
.gallery .photo:first-child { grid-row: span 2; }
.gallery .photo:nth-child(3) { grid-row: span 2; }
@media (max-width: 760px) {
  .about { margin-top: 64px; }
  .about-grid { grid-template-columns: 1fr; gap: 24px; }
  .members { gap: 8px; grid-template-columns: 1fr; }
  .members li { padding: 10px 12px; }
  .members strong { font-size: 1.12rem; }
  .about-photo { aspect-ratio: 4 / 3; object-position: center 72%; }
  .gallery { grid-template-columns: 1fr 1fr; grid-template-rows: 160px 160px 160px; }
  .gallery .photo:first-child { grid-column: span 2; grid-row: auto; }
  .gallery .photo:nth-child(3) { grid-row: span 2; }
}

/* ---------- Página de evento ---------- */
.event-hero { position: relative; padding: 40px 0 24px; }
.event-layout { display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: 40px; align-items: start; }
.event-poster { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow); }
.event-poster .poster { aspect-ratio: 16 / 10; }
.event-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin: 24px 0; }
.fact { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px 16px; }
.fact .label { color: var(--muted); font-size: .8rem; }
.fact .value { font-weight: 600; }
.description { color: #ddd8f7; }
.description p { margin-bottom: 1em; }

.buy-box { position: sticky; top: 84px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.buy-box > header { padding: 18px 22px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; }
.buy-box > header h2 { font-size: 1.5rem; margin: 0; }
.buy-step { padding: 18px 22px; border-bottom: 1px solid var(--line); }
.buy-step:last-child { border-bottom: 0; }
.step-title { display: flex; align-items: center; gap: 10px; font-weight: 600; margin-bottom: 14px; }
.step-num { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--on-accent); font-size: .8rem; font-weight: 700; }
.buy-step.locked { opacity: .45; pointer-events: none; }

.ticket-type { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 0; border-bottom: 1px dashed var(--line); }
.ticket-type:last-child { border-bottom: 0; }
.ticket-type .name { font-weight: 600; }
.ticket-type .desc { color: var(--muted); font-size: .85rem; }
.ticket-type .price { font-weight: 700; color: var(--gold); }
.ticket-type.unavailable .price { color: var(--muted); text-decoration: line-through; }
.stepper { display: flex; align-items: center; gap: 4px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 999px; padding: 4px; }
.stepper button { width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--surface-2); color: var(--text); font-size: 1.2rem; cursor: pointer; }
.stepper button:hover:not(:disabled) { background: var(--accent); color: var(--on-accent); }
.stepper button:disabled { opacity: .35; cursor: not-allowed; }
.stepper input { width: 34px; text-align: center; border: 0; background: transparent; color: var(--text); font-weight: 700; font-size: 1rem; padding: 0; min-height: 0; -moz-appearance: textfield; }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; }
.stepper input:focus { outline: none; }

.providers { display: grid; gap: 10px; }
.provider { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); cursor: pointer; background: var(--bg-2); font-weight: 400; margin: 0; }
.provider:has(input:checked) { border-color: var(--accent); background: rgba(255,255,255,.07); }
.provider input { accent-color: var(--accent); width: 18px; height: 18px; }
.provider .p-name { font-weight: 600; }
.provider .p-hint { font-size: .8rem; color: var(--muted); }
.provider .p-logo { margin-left: auto; font-family: var(--font-pixel); font-size: .65rem; color: var(--muted); }

.summary-line { display: flex; justify-content: space-between; font-size: .95rem; padding: 2px 0; }
.summary-total { display: flex; justify-content: space-between; align-items: baseline; font-size: 1.1rem; font-weight: 700; margin: 10px 0 14px; padding-top: 10px; border-top: 1px solid var(--line); }
.summary-total .amount { font-size: 1.6rem; color: var(--gold); font-family: var(--font-display); }
.secure-note { display: flex; gap: 8px; align-items: center; justify-content: center; color: var(--muted); font-size: .8rem; margin-top: 12px; }

.mobile-bar { display: none; }

/* ---------- Orden y entradas ---------- */
.order-head { text-align: center; padding: 48px 0 24px; }
.order-head .icon { width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 16px; font-size: 2rem; }
.icon-ok { background: rgba(79,224,182,.15); color: var(--ok); }
.icon-wait { background: rgba(255,181,71,.15); color: var(--warn); }
.icon-fail { background: rgba(255,107,129,.15); color: var(--danger); }
.tickets { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; margin: 24px 0; }
.ticket {
  position: relative; background: #fff; color: #0b0b0d; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
}
.ticket-body a { color: #3a3a42; }
.ticket-top {background: linear-gradient(135deg, #26262c, #000); color: #fff; padding: 18px 20px; }
.ticket-top .pixel { color: var(--gold); }
.ticket-top h3 { margin: 6px 0 4px; font-size: 1.5rem; }
.ticket-tear { position: relative; height: 0; border-top: 2px dashed #cfcfd4; margin: 0 18px; }
.ticket-tear::before, .ticket-tear::after { content: ""; position: absolute; top: -13px; width: 24px; height: 24px; border-radius: 50%; background: var(--bg); }
.ticket-tear::before { left: -31px; }
.ticket-tear::after { right: -31px; }
.ticket-body { padding: 18px 20px 20px; display: grid; gap: 4px; justify-items: center; text-align: center; }
.ticket-body img { width: 210px; height: 210px; image-rendering: pixelated; }
.ticket-code { font-family: ui-monospace, monospace; font-size: 1.05rem; letter-spacing: .08em; font-weight: 700; }
.ticket-type-name { font-weight: 700; font-size: 1.1rem; }
.ticket-used { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(255,255,255,.75); }
.ticket-used span { transform: rotate(-14deg); border: 4px solid var(--danger); color: var(--danger); font-family: var(--font-pixel); font-size: 1.4rem; padding: 8px 16px; border-radius: 8px; }
.order-summary { max-width: 560px; margin: 0 auto; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin: 16px 0; }

/* ---------- Admin ---------- */
.admin-body { background: #08080a; }
.admin-nav { display: flex; gap: 4px; overflow-x: auto; }
.admin-nav a { padding: 8px 14px; border-radius: 999px; color: var(--muted); text-decoration: none; white-space: nowrap; font-size: .9rem; }
.admin-nav a.active, .admin-nav a:hover { background: var(--surface-2); color: var(--text); }
.admin-main { padding: 28px 0 48px; }
.page-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 24px; }
.page-head h1 { font-size: 2.2rem; margin: 0; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 24px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 16px 18px; }
.kpi .label { color: var(--muted); font-size: .8rem; }
.kpi .value { font-size: 1.7rem; font-weight: 700; font-family: var(--font-display); }
.kpi .sub { font-size: .8rem; color: var(--muted); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
table.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th, .table td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table th { color: var(--muted); font-weight: 500; font-size: .8rem; background: var(--bg-2); position: sticky; top: 0; }
.table tr:last-child td { border-bottom: 0; }
.table td.num, .table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.table a { color: var(--text); }
.progress { height: 8px; border-radius: 999px; background: var(--bg-2); overflow: hidden; min-width: 80px; }
.progress > span { display: block; height: 100%; background: linear-gradient(90deg, #6b6b73, #fff); }
.chart { display: flex; align-items: flex-end; gap: 3px; height: 160px; padding-top: 10px; }
.chart .bar { flex: 1; background: linear-gradient(180deg, #fff, #9d9da6); border-radius: 4px 4px 0 0; min-height: 2px; position: relative; }
.chart .bar.zero { background: var(--line); }
.chart .bar:hover::after { content: attr(data-tip); position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); background: var(--surface-2); border: 1px solid var(--line); padding: 4px 8px; border-radius: 6px; font-size: .75rem; white-space: nowrap; z-index: 2; }
.chart-axis { display: flex; justify-content: space-between; font-size: .75rem; color: var(--muted); margin-top: 6px; }
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }
.filters > * { flex: 1 1 180px; }
.status-list { display: grid; gap: 8px; }
.status-list div { display: flex; justify-content: space-between; gap: 12px; font-size: .9rem; }
.tt-row { display: grid; grid-template-columns: 1.4fr 1fr .7fr .6fr; gap: 10px; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); margin-bottom: 12px; background: var(--bg-2); }
.tt-row .full { grid-column: 1 / -1; }
.tt-row .tt-actions { display: flex; justify-content: space-between; align-items: center; }

/* Escáner */
.scanner { max-width: 520px; margin: 0 auto; }
#reader { border-radius: var(--radius); overflow: hidden; background: #000; border: 1px solid var(--line); }
#reader video { border-radius: var(--radius); }
.scan-result { margin-top: 16px; border-radius: var(--radius); padding: 22px; text-align: center; display: none; }
.scan-result.show { display: block; }
.scan-result .big { font-size: 1.6rem; font-weight: 800; }
.scan-result.ok { background: rgba(79,224,182,.18); border: 2px solid var(--ok); }
.scan-result.used, .scan-result.cancelled { background: rgba(255,107,129,.18); border: 2px solid var(--danger); }
.scan-result.invalid, .scan-result.wrong_event { background: rgba(255,181,71,.18); border: 2px solid var(--warn); }
.scan-counter { text-align: center; font-size: 1.1rem; margin: 12px 0; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .event-layout { grid-template-columns: 1fr; }
  .buy-box { position: static; }
  .grid-2 { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .nav { gap: 14px; }
  .nav a { font-size: .875rem; }
  .nav .hide-sm { display: none; }
  .brand-name { font-size: 1.15rem; white-space: nowrap; }
  .brand-mark { width: 32px; height: 32px; }
  .hero { padding: 40px 0 24px; }
  .field-row { grid-template-columns: 1fr; }
  .tt-row { grid-template-columns: 1fr 1fr; }
  .mobile-bar {
    display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 40; gap: 12px; align-items: center; justify-content: space-between;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: rgba(11,11,13,.96); backdrop-filter: blur(10px); border-top: 1px solid var(--line);
  }
  .mobile-bar .amount { font-weight: 700; font-size: 1.15rem; color: var(--gold); }
  body.has-mobile-bar { padding-bottom: 84px; }
  .ticket-body img { width: 240px; height: 240px; }
}

@media print {
  .site-header, .site-footer, .actions, .no-print { display: none !important; }
  body { background: #fff; }
  .ticket { box-shadow: none; break-inside: avoid; border: 1px solid #ccc; }
}
