:root {
  --ink: #17212b;
  --muted: #65717a;
  --paper: #f5f7f8;
  --card: #ffffff;
  --line: #dce4e8;
  --brand: #071f3f;
  --brand-dark: #04142b;
  --accent: #f0c918;
  --ok: #166534;
  --ok-bg: #dcfce7;
  --danger: #b42318;
  --danger-bg: #fee4e2;
  --warn: #92400e;
  --warn-bg: #fef3c7;
  --shadow: 0 16px 42px rgba(23, 33, 43, .08);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); }
a { color: inherit; }
button, input, select, textarea { font: inherit; }
button, .btn { -webkit-tap-highlight-color: transparent; }
.site-header { min-height: 72px; background: var(--brand); color: #fff; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 12px max(20px, calc((100vw - 1180px) / 2)); position: sticky; top: 0; z-index: 20; box-shadow: 0 5px 20px rgba(0,0,0,.1); }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-logo-shell { display: grid; place-items: center; width: 54px; height: 48px; border-radius: 10px; background: #fff; padding: 4px 7px; overflow: hidden; flex: 0 0 auto; }
.brand-logo { width: 100%; height: 100%; object-fit: contain; display: block; }
.brand span:last-child { display: flex; flex-direction: column; }
.brand small { opacity: .76; font-size: .78rem; }
.top-nav { display: flex; gap: 16px; align-items: center; }
.top-nav a, .link-button { color: #fff; text-decoration: none; opacity: .92; }
.link-button { border: 0; background: none; cursor: pointer; padding: 8px; }
.inline-form { display: inline; margin: 0; }
.page-shell { max-width: 1180px; margin: 0 auto; padding: 38px 20px 70px; min-height: calc(100vh - 140px); }
.site-footer { border-top: 1px solid var(--line); color: var(--muted); display: flex; justify-content: space-between; gap: 20px; padding: 22px max(20px, calc((100vw - 1180px) / 2)); font-size: .9rem; }
.hero { border-radius: 26px; padding: 54px; color: #fff; background: linear-gradient(135deg, var(--brand-dark), var(--brand)); box-shadow: var(--shadow); margin-bottom: 36px; position: relative; overflow: hidden; }
.hero::after { content: ''; position: absolute; width: 280px; height: 280px; border: 1px solid rgba(255,255,255,.12); border-radius: 50%; right: -70px; top: -110px; box-shadow: 0 0 0 40px rgba(255,255,255,.035), 0 0 0 80px rgba(255,255,255,.025); }
.hero h1 { margin: 5px 0 10px; max-width: 700px; font-size: clamp(2rem, 5vw, 4rem); line-height: 1; letter-spacing: -.04em; }
.hero p { max-width: 720px; font-size: 1.08rem; line-height: 1.65; opacity: .88; margin-bottom: 0; }

.hero-with-logo { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 34px; align-items: center; }
.hero-copy { position: relative; z-index: 2; }
.hero-logo-wrap { position: relative; z-index: 2; background: #fff; border-radius: 20px; padding: 18px 20px; box-shadow: 0 14px 35px rgba(0,0,0,.16); }
.hero-logo-wrap img { width: 100%; display: block; }
.login-logo-wrap { width: 220px; max-width: 72%; margin: -4px auto 24px; }
.login-logo-wrap img { width: 100%; display: block; }
.admin-heading-brand { display: flex; align-items: center; gap: 16px; }
.admin-heading-brand > img { width: 76px; height: 62px; object-fit: contain; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 5px 8px; }
.ticket-brand-block { display: flex; align-items: center; gap: 16px; }
.ticket-logo-wrap { width: 88px; height: 72px; background: #fff; border-radius: 12px; padding: 6px 9px; flex: 0 0 auto; }
.ticket-logo-wrap img { width: 100%; height: 100%; object-fit: contain; display: block; }
.eyebrow { text-transform: uppercase; letter-spacing: .13em; font-size: .74rem; font-weight: 800; color: var(--accent); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin: 34px 0 18px; }
.section-head.compact { margin-top: 0; }
.section-head h2, .admin-title-row h1 { margin: 0 0 4px; }
.section-head p, .admin-title-row p { margin: 0; color: var(--muted); }
.event-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.event-card, .panel, .stat-card, .admin-event { background: var(--card); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 5px 20px rgba(23,33,43,.04); }
.event-card { display: flex; flex-direction: column; min-height: 320px; }
.event-card-main { padding: 24px; flex: 1; }
.event-card h3 { font-size: 1.4rem; margin: 16px 0 14px; }
.event-card p { line-height: 1.5; }
.event-card-footer { border-top: 1px solid var(--line); padding: 18px 24px; display: flex; justify-content: space-between; align-items: center; gap: 14px; }
.price { font-size: 1.28rem; }
.muted { color: var(--muted); }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 9px 16px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); text-decoration: none; cursor: pointer; font-weight: 700; transition: transform .12s ease, box-shadow .12s ease, background .12s ease; }
.btn:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 7px 18px rgba(23,33,43,.08); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-accent { background: var(--accent); border-color: var(--accent); color: #231c09; }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-small { min-height: 34px; padding: 6px 10px; font-size: .86rem; }
.btn-large { min-height: 50px; padding: 12px 20px; }
.status-pill { display: inline-flex; width: max-content; padding: 6px 9px; border-radius: 999px; font-size: .77rem; font-weight: 800; }
.status-pill.ok { color: var(--ok); background: var(--ok-bg); }
.status-pill.danger { color: var(--danger); background: var(--danger-bg); }
.status-pill.warn { color: var(--warn); background: var(--warn-bg); }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.panel { padding: 28px; }
.purchase-layout h1 { font-size: clamp(2rem, 4vw, 3.2rem); margin: 8px 0 24px; line-height: 1.02; }
.detail-list { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; margin: 20px 0; }
.detail-list > div { display: flex; justify-content: space-between; gap: 24px; padding: 14px 16px; background: #fff; }
.detail-list span { color: var(--muted); }
.detail-list.left > div { text-align: left; }
.form-grid { display: grid; gap: 16px; }
.form-grid label, .filter-row label, .manual-code label { display: grid; gap: 7px; font-size: .88rem; font-weight: 800; color: #3d4850; }
input, select, textarea { width: 100%; border: 1px solid #cbd5da; background: #fff; color: var(--ink); border-radius: 10px; padding: 11px 12px; outline: none; }
input:focus, select:focus, textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(7,31,63,.1); }
textarea { resize: vertical; }
.form-note { color: var(--muted); font-size: .84rem; padding: 10px 12px; border-radius: 10px; background: #f0f4f5; }
.split-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.check-label { grid-template-columns: 20px 1fr !important; align-items: center; gap: 8px !important; }
.check-label input { width: 18px; height: 18px; }
.alert { border: 1px solid; border-radius: 12px; padding: 13px 15px; margin: 0 0 18px; }
.alert-danger { color: var(--danger); border-color: #f7b9b5; background: var(--danger-bg); }
.alert-success { color: var(--ok); border-color: #a8e5ba; background: var(--ok-bg); }
.alert-warning { color: var(--warn); border-color: #f0d084; background: var(--warn-bg); }
.alert-info { color: #075985; border-color: #bae6fd; background: #e0f2fe; }
.narrow { max-width: 620px; margin: 26px auto; }
.centered { text-align: center; }
.button-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.button-row.centered { justify-content: center; }
.ticket-wrap { max-width: 820px; margin: 0 auto; }
.ticket-card { background: #fff; border-radius: 24px; overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow); }
.ticket-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; background: var(--brand); color: white; padding: 28px 30px; }
.ticket-top h1 { margin: 5px 0 0; font-size: 1.8rem; }
.ticket-number { background: rgba(255,255,255,.13); border: 1px solid rgba(255,255,255,.2); border-radius: 14px; padding: 12px 15px; font-size: 1.3rem; font-weight: 900; }
.ticket-body { display: grid; grid-template-columns: 1fr 320px; gap: 28px; align-items: center; padding: 30px; }
.ticket-data { display: grid; gap: 18px; }
.ticket-data div { display: grid; gap: 3px; }
.ticket-data span { color: var(--muted); font-size: .82rem; text-transform: uppercase; letter-spacing: .06em; }
.ticket-data strong { font-size: 1.08rem; }
.qr-box { text-align: center; border-left: 1px dashed #cbd5da; padding-left: 26px; }
.qr-box img { width: 100%; max-width: 290px; display: block; margin: auto; }
.qr-box small { color: var(--muted); }
.ticket-foot { padding: 16px 30px; background: #f6f8f9; color: var(--muted); text-align: center; font-size: .85rem; border-top: 1px solid var(--line); }
.ticket-used { filter: saturate(.6); }
.text-ok { color: var(--ok); }
.text-danger { color: var(--danger); }
.text-warn { color: var(--warn); }
.print-actions { margin-top: 18px; }
.admin-title-row { display: flex; justify-content: space-between; align-items: center; gap: 18px; margin-bottom: 24px; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 20px 0 28px; }
.stat-card { padding: 20px; }
.stat-card span { display: block; color: var(--muted); font-size: .84rem; }
.stat-card strong { display: block; margin-top: 4px; font-size: 2rem; letter-spacing: -.04em; }
.admin-grid { display: grid; grid-template-columns: 390px 1fr; gap: 24px; align-items: start; }
.admin-event-list { display: grid; gap: 12px; }
.admin-event { overflow: hidden; }
.admin-event summary { list-style: none; cursor: pointer; padding: 18px 20px; display: flex; justify-content: space-between; align-items: center; gap: 18px; }
.admin-event summary::-webkit-details-marker { display: none; }
.admin-event summary strong, .admin-event summary small { display: block; }
.admin-event summary small { color: var(--muted); margin-top: 4px; }
.event-numbers { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.event-numbers span { font-size: .78rem; border: 1px solid var(--line); border-radius: 999px; padding: 5px 8px; background: #f8fafb; }
.admin-event-form { border-top: 1px solid var(--line); padding: 20px; }
.filter-panel { padding: 18px; margin-bottom: 18px; }
.filter-row { display: grid; grid-template-columns: 220px 1fr auto auto; gap: 12px; align-items: end; }
.table-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 5px 18px rgba(23,33,43,.04); }
table { width: 100%; border-collapse: collapse; min-width: 860px; }
th, td { padding: 13px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
th { background: #f5f8f9; color: #49565e; font-size: .79rem; text-transform: uppercase; letter-spacing: .04em; }
tbody tr:last-child td { border-bottom: 0; }
.row-actions { display: flex; gap: 6px; }
.scanner-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(320px, .8fr); gap: 20px; }
#reader { width: 100%; min-height: 320px; overflow: hidden; border-radius: 14px; background: #101416; }
.scanner-controls, .manual-code { display: flex; gap: 10px; margin-top: 14px; align-items: end; }
.manual-code label { flex: 1; }
.scan-result { min-height: 430px; border-radius: 20px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 28px; text-align: center; border: 2px solid var(--line); background: #fff; }
.scan-result.idle { color: var(--muted); }
.scan-result.accepted { border-color: #66c481; background: var(--ok-bg); color: var(--ok); }
.scan-result.used, .scan-result.invalid { border-color: #ee8b84; background: var(--danger-bg); color: var(--danger); }
.result-icon { width: 86px; height: 86px; display: grid; place-items: center; border-radius: 50%; border: 3px solid currentColor; font-size: 2.5rem; font-weight: 900; }
.scan-result h2 { margin: 18px 0 8px; }
.scan-result p { margin: 4px 0; }
.big-ticket-number { font-size: 2.4rem; font-weight: 900; margin: 8px 0; }
.empty-state { background: #fff; border: 1px dashed #cbd5da; border-radius: 16px; padding: 34px; color: var(--muted); grid-column: 1 / -1; text-align: center; }
.login-card { margin-top: 60px; }

@media (max-width: 900px) {
  .hero-with-logo { grid-template-columns: 1fr; }
  .hero-logo-wrap { width: min(320px, 100%); }
  .event-grid { grid-template-columns: repeat(2, 1fr); }
  .two-col, .admin-grid, .scanner-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .ticket-body { grid-template-columns: 1fr; }
  .qr-box { border-left: 0; border-top: 1px dashed #cbd5da; padding: 24px 0 0; }
  .filter-row { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .site-header { position: static; align-items: flex-start; flex-direction: column; gap: 10px; }
  .top-nav { width: 100%; overflow-x: auto; gap: 12px; padding-bottom: 2px; }
  .page-shell { padding: 22px 14px 48px; }
  .hero { padding: 34px 24px; border-radius: 20px; }
  .event-grid { grid-template-columns: 1fr; }
  .panel { padding: 20px; }
  .split-fields { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat-card { padding: 15px; }
  .stat-card strong { font-size: 1.55rem; }
  .admin-title-row { align-items: flex-start; flex-direction: column; }
  .ticket-top { padding: 22px; flex-direction: column; }
  .ticket-brand-block { align-items: flex-start; flex-direction: column; }
  .admin-heading-brand { align-items: flex-start; }
  .admin-heading-brand > img { width: 64px; height: 54px; }
  .ticket-body { padding: 22px; }
  .ticket-number { font-size: 1.1rem; }
  .filter-row { grid-template-columns: 1fr; }
  .scanner-controls, .manual-code { flex-direction: column; align-items: stretch; }
  .site-footer { flex-direction: column; }
}

@media print {
  body { background: #fff; }
  .site-header, .site-footer, .print-actions, .alert { display: none !important; }
  .page-shell { padding: 0; max-width: none; }
  .ticket-wrap { max-width: 100%; }
  .ticket-card { box-shadow: none; border: 1px solid #bbb; }
}

/* v1.0.3 - Resultado de validación QR a pantalla completa */
body.scan-overlay-open { overflow: hidden; }
.scan-overlay[hidden] { display: none !important; }
.scan-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100dvh;
  padding: max(24px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
  color: #fff;
  text-align: center;
  opacity: 0;
  transform: scale(1.015);
  transition: opacity .12s ease, transform .12s ease;
}
.scan-overlay.visible { opacity: 1; transform: scale(1); }
.scan-overlay.accepted { background: #13823b; }
.scan-overlay.used { background: #b42318; }
.scan-overlay.invalid { background: #7a271a; }
.scan-overlay-content {
  width: min(720px, 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.scan-overlay-icon {
  width: 132px;
  height: 132px;
  display: grid;
  place-items: center;
  border: 7px solid currentColor;
  border-radius: 50%;
  font-size: 5.4rem;
  line-height: 1;
  font-weight: 900;
  margin-bottom: 28px;
}
.scan-overlay-title {
  font-size: clamp(2.1rem, 8vw, 4.8rem);
  line-height: .96;
  font-weight: 1000;
  letter-spacing: -.045em;
  text-transform: uppercase;
}
.scan-overlay-number {
  margin-top: 20px;
  font-size: clamp(2.2rem, 9vw, 5rem);
  line-height: 1;
  font-weight: 1000;
}
.scan-overlay-person {
  margin-top: 20px;
  font-size: clamp(1.45rem, 5vw, 2.5rem);
  font-weight: 800;
}
.scan-overlay-detail {
  margin-top: 7px;
  font-size: clamp(1.05rem, 3.5vw, 1.55rem);
  font-weight: 650;
  opacity: .96;
}
.scan-overlay-button {
  margin-top: 34px;
  min-width: min(340px, 100%);
  border: 0;
  border-radius: 999px;
  padding: 16px 26px;
  background: #fff;
  color: #17212b;
  font: inherit;
  font-size: 1.08rem;
  font-weight: 850;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(0,0,0,.16);
}
.scan-overlay-hint {
  margin-top: 12px;
  font-size: .9rem;
  opacity: .76;
}
@media (max-width: 640px) {
  .scan-overlay-icon { width: 108px; height: 108px; font-size: 4.4rem; margin-bottom: 22px; }
  .scan-overlay-button { margin-top: 26px; }
}

/* Mercado Pago admin */
.mp-status-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 18px; }
.mp-status-card p { color: var(--muted); }
.mp-status-line { display: flex; align-items: center; gap: 10px; margin: 10px 0 8px; font-size: 1.08rem; }
.status-dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; box-shadow: 0 0 0 5px rgba(0,0,0,.04); }
.mp-status-line.ok .status-dot { background: var(--ok); }
.mp-status-line.warn .status-dot { background: var(--warn); }
.mp-status-line.danger .status-dot { background: var(--danger); }
.mp-account-box { display: grid; gap: 3px; padding: 14px; margin: 16px 0; background: #f7f9fc; border: 1px solid var(--line); border-radius: 12px; }
.mp-account-box span { color: var(--muted); font-size: .9rem; }
.copy-field { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; }
.copy-field input { min-width: 0; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .87rem; }
.help-text { color: var(--muted); font-size: .9rem; }
.mp-connect-panel { margin-bottom: 18px; }
.mp-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 18px 0 24px; }
.mp-steps > div { border: 1px solid var(--line); border-radius: 14px; padding: 14px; background: #fbfcfe; }
.mp-steps span { display: inline-flex; width: 28px; height: 28px; border-radius: 50%; align-items: center; justify-content: center; background: var(--brand); color: #fff; font-weight: 800; margin-bottom: 8px; }
.mp-steps p { margin: 0; font-size: .92rem; line-height: 1.42; }
.mp-credential-form small { display: block; color: var(--muted); margin-top: 5px; font-size: .83rem; }
.danger-zone { border-color: #f1b2ae; margin-bottom: 22px; }
.danger-zone h2 { color: var(--danger); }
@media (max-width: 900px) {
  .mp-status-grid { grid-template-columns: 1fr; }
  .mp-steps { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .mp-steps { grid-template-columns: 1fr; }
  .copy-field { grid-template-columns: 1fr; }
}

/* v1.0.5 - compactación general + configuración + firma TBE */
.page-shell { padding: 24px 18px 44px; }
.site-header { min-height: 64px; padding-top: 10px; padding-bottom: 10px; }
.top-nav { gap: 12px; font-size: .95rem; }
.hero.compact-hero { padding: 34px 36px; margin-bottom: 22px; border-radius: 22px; }
.hero.compact-hero h1 { font-size: clamp(1.7rem, 4vw, 3rem); margin-bottom: 8px; }
.hero.compact-hero p { font-size: .98rem; line-height: 1.45; max-width: 620px; }
.section-head.compact-head { margin: 22px 0 14px; }
.event-card.compact-card { min-height: 0; }
.event-card.compact-card .event-card-main { padding: 18px; }
.event-card.compact-card h3 { font-size: 1.2rem; margin: 12px 0 10px; }
.event-card.compact-card p { margin: 8px 0; font-size: .95rem; }
.event-card.compact-card .event-card-footer { padding: 14px 18px; }
.compact-panel { padding: 20px; }
.compact-form-grid { gap: 12px; }
.compact-form-grid label { gap: 5px; font-size: .84rem; }
input, select, textarea { padding: 9px 11px; border-radius: 9px; }
.btn { min-height: 38px; padding: 8px 14px; }
.btn-large { min-height: 44px; padding: 10px 18px; }
.filter-panel { padding: 14px; }
.stat-card { padding: 16px; }
.stat-card strong { font-size: 1.7rem; }
.compact-admin-grid { gap: 18px; }
.compact-stats-grid { margin: 16px 0 20px; }
.admin-title-row { margin-bottom: 16px; }
.table-wrap th, .table-wrap td { padding-top: 10px; padding-bottom: 10px; }
.compact-login-card { max-width: 460px; margin-top: 18px; }
.compact-login-card h1 { margin: 8px 0 10px; }
.login-logo-wrap { width: 180px; margin-bottom: 18px; }
.compact-ticket-wrap { max-width: 760px; }
.compact-ticket-top { padding: 22px 24px; }
.compact-ticket-top h1 { font-size: 1.5rem; }
.compact-ticket-body { padding: 22px 24px; grid-template-columns: 1fr 260px; gap: 20px; }
.compact-ticket-data { gap: 12px; }
.compact-ticket-data strong { font-size: 1rem; }
.compact-qr-box { padding-left: 20px; }
.compact-qr-box img { max-width: 230px; }
.split-actions { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }
.ticket-foot { font-size: .82rem; }
.site-footer { justify-content: center; padding: 18px; font-size: .86rem; }
.tbe-signature { margin-top: 22px; display: flex; align-items: center; gap: 14px; padding: 14px 16px; background: #0e6a35; color: #fff; border-radius: 16px; box-shadow: 0 8px 22px rgba(0,0,0,.08); }
.tbe-signature-logo { flex: 0 0 auto; max-width: 255px; }
.tbe-signature-logo img { width: 100%; display: block; border-radius: 8px; }
.tbe-signature-copy { display: grid; gap: 3px; }
.tbe-signature-copy strong { font-size: 1rem; }
.tbe-signature-copy div, .tbe-signature-copy small { opacity: .96; }
@media (max-width: 900px) {
  .compact-ticket-body { grid-template-columns: 1fr; }
  .compact-qr-box { border-left: 0; border-top: 1px dashed #cbd5da; padding-left: 0; padding-top: 18px; }
}
@media (max-width: 640px) {
  .page-shell { padding: 18px 12px 36px; }
  .hero.compact-hero { padding: 26px 18px; }
  .hero-logo-wrap { width: min(260px, 100%); }
  .tbe-signature { flex-direction: column; text-align: center; }
}

/* v1.0.6 - portada todavía más compacta */
.hero-with-logo { grid-template-columns: minmax(0, 1fr) 215px; gap: 24px; }
.hero.compact-hero { padding: 22px 30px; margin-bottom: 16px; border-radius: 20px; }
.hero.compact-hero h1 { font-size: clamp(1.65rem, 3.4vw, 2.55rem); line-height: 1.02; margin: 4px 0 7px; }
.hero.compact-hero p { font-size: .93rem; line-height: 1.38; max-width: 650px; }
.hero-logo-wrap { padding: 12px 14px; border-radius: 16px; }
.section-head.compact-head { margin: 16px 0 10px; }
@media (max-width: 900px) {
  .hero-with-logo { grid-template-columns: 1fr; }
  .hero-logo-wrap { width: min(220px, 100%); }
}

/* v1.0.7 */
.event-delete-form { border-top: 1px solid var(--line); padding: 12px 20px 16px; display: flex; justify-content: flex-end; background: #fffafa; }
.purchase-submit-busy { opacity: .72; pointer-events: none; }

/* v1.0.8 - venta por asientos numerados */
.seating-config { display: grid; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: #f8fafb; }
.seat-row-prices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.seat-row-price-field { min-width: 0; }
.admin-event-actions { margin-top: 2px; }
.admin-event-actions .btn-danger { margin-left: auto; }

.purchase-layout-seated { grid-template-columns: minmax(0, 1.35fr) minmax(330px, .65fr); align-items: start; }
.purchase-form-panel { position: sticky; top: 84px; }
.seat-selection-panel { margin-top: 20px; border-top: 1px solid var(--line); padding-top: 18px; }
.seat-selection-title { display: flex; justify-content: space-between; gap: 12px; align-items: end; margin-bottom: 12px; }
.seat-selection-title h2 { margin: 0; font-size: 1.18rem; }
.seat-selection-title p { margin: 0; color: var(--muted); font-size: .86rem; }
.stage-marker { width: min(440px, 82%); margin: 0 auto 20px; padding: 8px 14px; text-align: center; border-radius: 8px 8px 22px 22px; background: var(--brand); color: #fff; font-size: .78rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.seat-map { display: grid; gap: 11px; overflow-x: auto; padding: 4px 2px 10px; }
.seat-map-row { display: grid; grid-template-columns: 88px minmax(max-content, 1fr); gap: 10px; align-items: center; }
.seat-row-heading { display: grid; gap: 2px; }
.seat-row-heading small { color: var(--muted); font-size: .75rem; }
.seat-row-buttons { display: flex; gap: 6px; min-width: max-content; }
.seat-button { width: 38px; height: 36px; border: 1px solid #aebdc5; border-radius: 10px 10px 6px 6px; background: #fff; color: var(--ink); font-size: .78rem; font-weight: 800; cursor: pointer; box-shadow: inset 0 -3px 0 rgba(0,0,0,.04); }
.seat-button:hover:not(:disabled) { border-color: var(--brand); transform: translateY(-1px); }
.seat-button.state-reserved { background: var(--warn-bg); color: var(--warn); border-color: #e8c96b; cursor: not-allowed; }
.seat-button.state-sold { background: #e9eef1; color: #8a969e; border-color: #d3dce1; cursor: not-allowed; }
.seat-button.selected { background: var(--brand); color: #fff; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(7,31,63,.12); }
.seat-legend { display: flex; flex-wrap: wrap; gap: 10px 16px; margin-top: 14px; color: var(--muted); font-size: .78rem; }
.seat-legend span { display: inline-flex; align-items: center; gap: 5px; }
.seat-dot { width: 12px; height: 12px; border: 1px solid #aebdc5; border-radius: 4px; display: inline-block; background: #fff; }
.seat-dot.selected { background: var(--brand); border-color: var(--brand); }
.seat-dot.reserved { background: var(--warn-bg); border-color: #e8c96b; }
.seat-dot.sold { background: #e9eef1; border-color: #d3dce1; }
.selected-seat-card { display: grid; gap: 4px; border: 1px solid var(--line); background: #f7f9fa; border-radius: 12px; padding: 12px 14px; }
.selected-seat-card > span { color: var(--muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; }
.selected-seat-card strong { font-size: 1rem; }
.seat-price { color: var(--brand); font-weight: 850; }

.tbe-signature-logo { flex: 0 0 auto; width: 120px; max-width: 120px; }
.tbe-signature-logo img { width: 100%; height: auto; object-fit: contain; background: #fff; border-radius: 8px; padding: 3px; }

@media (max-width: 900px) {
  .purchase-layout-seated { grid-template-columns: 1fr; }
  .purchase-form-panel { position: static; }
}
@media (max-width: 640px) {
  .seat-row-prices { grid-template-columns: 1fr; }
  .seat-map-row { grid-template-columns: 66px minmax(max-content, 1fr); gap: 8px; }
  .seat-button { width: 34px; height: 33px; }
  .seat-selection-title { align-items: start; flex-direction: column; }
  .admin-event-actions .btn-danger { margin-left: 0; }
}

/* v1.1.0 - compra múltiple + ajustes responsive */
.purchase-layout { align-items: start; gap: 18px; }
.event-summary h1 { margin-bottom: 18px; }
.purchase-form { gap: 14px; }
.quantity-card,
.multi-seat-card,
.attendee-card,
.purchase-items-preview,
.related-tickets-panel { border: 1px solid var(--line); background: #f8fafb; border-radius: 14px; }
.quantity-card,
.multi-seat-card,
.purchase-items-preview,
.related-tickets-panel { padding: 14px; }
.quantity-card label { display: grid; gap: 6px; font-size: .9rem; }
.quantity-card small { color: var(--muted); }
.attendee-list { display: grid; gap: 12px; }
.attendee-card { padding: 14px; display: grid; gap: 10px; }
.attendee-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.attendee-card-head small { color: var(--brand); font-weight: 800; }
.attendee-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.form-note { color: var(--muted); font-size: .9rem; line-height: 1.45; }
.selected-seat-chips,
.related-tickets-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.seat-chip,
.related-ticket-chip,
.purchase-item-mini { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; }
.seat-chip { background: #eaf0f6; color: var(--brand); padding: 7px 12px; font-size: .86rem; font-weight: 700; }
.related-ticket-chip { text-decoration: none; padding: 10px 12px; background: #fff; border: 1px solid var(--line); color: var(--ink); font-size: .9rem; }
.related-ticket-chip.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.purchase-items-preview { display: grid; gap: 8px; margin: 16px 0; text-align: left; }
.purchase-item-mini { padding: 9px 12px; background: #fff; border: 1px solid var(--line); font-size: .92rem; }
.seat-map-frame { overflow-x: auto; padding-bottom: 2px; }
.seat-map { min-width: max-content; padding-right: 6px; }
.seat-map-row { grid-template-columns: 78px minmax(max-content, 1fr); }
.seat-row-buttons { gap: 5px; }
.seat-button { width: 34px; height: 32px; font-size: .75rem; border-radius: 9px 9px 5px 5px; }
.top-nav { flex-wrap: wrap; justify-content: flex-end; }
.hero.compact-hero { padding: 18px 24px; }
.hero.compact-hero h1 { font-size: clamp(1.5rem, 3vw, 2.2rem); }
.hero.compact-hero p { font-size: .9rem; }
.event-grid.compact-grid { gap: 14px; }
.event-card.compact-card .event-card-main { padding: 16px; }
.event-card.compact-card .event-card-footer { padding: 12px 16px; }
.site-header { gap: 18px; }
.button-row { gap: 10px; }
.related-tickets-panel h2 { margin-top: 0; }

@media (max-width: 980px) {
  .attendee-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  .hero.compact-hero { padding: 18px 16px; }
  .purchase-layout,
  .purchase-layout-seated { grid-template-columns: 1fr; }
  .attendee-grid { grid-template-columns: 1fr; }
  .seat-map-row { grid-template-columns: 64px minmax(max-content, 1fr); }
  .seat-button { width: 32px; height: 31px; font-size: .72rem; }
  .top-nav { justify-content: flex-start; }
}

/* v1.2.0 - devoluciones Mercado Pago */
.refund-actions { align-items: stretch; min-width: 170px; }
.refund-actions form { margin: 0; }
.refund-actions .btn { width: 100%; white-space: nowrap; }
.btn-danger-outline { color: var(--danger); background: #fff; border-color: #efb5b0; }
.btn-danger-outline:hover { background: var(--danger-bg); }
.refund-note { display: block; margin-top: 4px; color: var(--muted); font-size: .75rem; line-height: 1.25; }
.refund-row { background: #fafafa; }
.refund-row td { opacity: .86; }
@media (max-width: 760px) {
  .refund-actions { min-width: 150px; }
  .refund-actions .btn { white-space: normal; }
}

/* v1.2.1 - plano de asientos responsive sin zoom ni desplazamiento lateral */
.mobile-row-selector { display: none; }
.purchase-layout-seated {
  grid-template-columns: 1fr;
  width: min(1600px, calc(100vw - 32px));
  max-width: none;
  margin-left: 50%;
  transform: translateX(-50%);
}
.purchase-layout-seated .purchase-form-panel { position: static; }
.seat-map-frame { overflow-x: visible; }
.seat-map { min-width: 0; width: 100%; }
.seat-map-row { grid-template-columns: 76px minmax(0, 1fr); gap: 8px; }
.seat-row-buttons {
  display: grid;
  grid-template-columns: repeat(var(--seat-count), minmax(0, 1fr));
  gap: 4px;
  min-width: 0;
  width: 100%;
}
.seat-button {
  width: 100%;
  min-width: 0;
  height: 32px;
  padding: 0;
  font-size: clamp(.66rem, .72vw, .78rem);
}

@media (max-width: 720px) {
  .purchase-layout-seated {
    width: 100%;
    margin-left: 0;
    transform: none;
  }
  .mobile-row-selector {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 7px;
    margin: 4px 0 14px;
  }
  .mobile-row-button {
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
    color: var(--ink);
    padding: 8px 5px;
    display: grid;
    gap: 2px;
    text-align: center;
    cursor: pointer;
  }
  .mobile-row-button strong { font-size: .82rem; }
  .mobile-row-button small { color: var(--muted); font-size: .68rem; }
  .mobile-row-button.mobile-active {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
  }
  .mobile-row-button.mobile-active small { color: rgba(255,255,255,.82); }
  .mobile-row-button.has-selection:not(.mobile-active) {
    border-color: var(--brand);
    box-shadow: inset 0 0 0 1px var(--brand);
  }
  .stage-marker { width: 88%; margin-bottom: 14px; }
  .seat-map-frame { overflow-x: visible; }
  .seat-map { min-width: 0; width: 100%; gap: 0; }
  .seat-map-row { display: none; grid-template-columns: 1fr; gap: 8px; }
  .seat-map-row.mobile-active { display: grid; }
  .seat-row-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 2px 1px;
  }
  .seat-row-buttons {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 2px 2px 10px;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
  }
  .seat-button {
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    min-height: 44px;
    aspect-ratio: auto;
    font-size: .9rem;
    border-radius: 10px 10px 6px 6px;
    scroll-snap-align: start;
  }
}

@media (max-width: 390px) {
  .mobile-row-selector { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* v1.2.2 - en celular cada fila mantiene todos sus asientos en una sola línea horizontal */


/* v1.2.3 - señal visual y flechas para desplazar asientos en celular */
.mobile-seat-scroll-guide,
.seat-scroll-arrow { display: none; }
.seat-row-scroll-shell { display: contents; }

@media (max-width: 720px) {
  .mobile-seat-scroll-guide {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin: 0 0 2px;
    color: var(--brand);
    font-size: .78rem;
    font-weight: 800;
  }
  .mobile-seat-scroll-guide span {
    font-size: 1.08rem;
    line-height: 1;
    animation: seat-scroll-nudge 1.1s ease-in-out infinite alternate;
  }
  .seat-row-scroll-shell {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) 38px;
    gap: 6px;
    align-items: center;
    min-width: 0;
  }
  .seat-scroll-arrow {
    display: grid;
    place-items: center;
    width: 38px;
    height: 48px;
    padding: 0;
    border: 0;
    border-radius: 12px;
    background: var(--brand);
    color: #fff;
    font-size: 2rem;
    font-weight: 800;
    line-height: 1;
    box-shadow: 0 5px 14px rgba(7,31,63,.18);
    cursor: pointer;
    z-index: 2;
  }
  .seat-scroll-arrow:disabled {
    opacity: .2;
    cursor: default;
  }
  .seat-row-scroll-shell .seat-row-buttons {
    min-width: 0;
    padding-bottom: 8px;
    scrollbar-width: thin;
  }
}

@keyframes seat-scroll-nudge {
  from { transform: translateX(0); }
  to { transform: translateX(5px); }
}
