/* Boletera — panel de control */
:root {
  --ink: #0E0F12; --ink-2: #2A2D35; --bg: #F4F5F7; --card: #FFFFFF; --line: #E6E8EC; --line-2: #D3D6DC;
  --muted: #6B7080; --accent: #FFD400; --ok: #0F9D58; --ok-bg: #E7F6EE; --warn: #B45309; --warn-bg: #FEF3C7;
  --danger: #D93025; --danger-bg: #FDECEA; --info-bg: #EEF2FF;
  --r-lg: 18px; --r-md: 12px; --r-sm: 9px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 6px 20px rgba(16, 24, 40, .05);
  --side: 264px;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 14px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
button { font-family: inherit; color: inherit; }
a { color: inherit; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
svg.i { width: 18px; height: 18px; flex: 0 0 18px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ===== Estructura ===== */
.pn-side { position: fixed; inset: 0 auto 0 0; width: var(--side); background: var(--card); border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 18px 14px; z-index: 40; }
.pn-brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 18px; }
.pn-brand img { height: 28px; width: auto; }
.wordmark { font-weight: 800; font-size: 16px; letter-spacing: -.01em; color: var(--ink); white-space: nowrap; line-height: 1; }
.wordmark.light { color: #fff; }
.login .wordmark { display: block; font-size: 24px; margin: 0 auto 18px; }
.pn-brand span:not(.wordmark) { font-weight: 600; color: var(--muted); border-left: 1px solid var(--line-2); padding-left: 10px; }
.pn-nav { display: grid; gap: 2px; margin-top: 14px; }
.pn-nav button, .pn-side-foot button { display: flex; align-items: center; gap: 12px; width: 100%; border: 0; background: none; padding: 10px 12px; border-radius: 10px; font-size: 14px; font-weight: 600; color: var(--ink-2); cursor: pointer; text-align: left; position: relative; }
.pn-nav button:hover, .pn-side-foot button:hover { background: var(--bg); }
.pn-nav button.on { background: var(--ink); color: #fff; }
.badge-n { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--danger); color: #fff; font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.badge-n:empty { display: none; }
.pn-side-foot { margin-top: auto; display: grid; gap: 2px; border-top: 1px solid var(--line); padding-top: 12px; }
.pn-main { margin-left: var(--side); padding: 28px 32px 60px; max-width: calc(var(--side) + 1180px); }
.pn-top, .pn-bottom { display: none; }

/* Selector de evento */
.ev-switch { position: relative; }
.ev-switch-btn { display: flex; align-items: center; gap: 10px; width: 100%; border: 1px solid var(--line); background: var(--card); border-radius: 14px; padding: 8px 10px; cursor: pointer; text-align: left; }
.ev-switch-btn:hover { border-color: var(--line-2); }
.ev-switch-btn img, .ev-thumb { width: 44px; height: 30px; border-radius: 6px; object-fit: cover; background: var(--bg); flex-shrink: 0; }
.ev-switch-btn b { display: block; font-size: 13px; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ev-switch-btn small { color: var(--muted); font-size: 12px; }
.ev-switch-btn .txt { flex: 1; min-width: 0; }
.ev-menu { position: absolute; left: 0; right: 0; top: calc(100% + 6px); background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 16px 40px rgba(16, 24, 40, .14); padding: 6px; z-index: 60; max-height: 60vh; overflow: auto; min-width: 260px; }
.ev-menu button { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: none; padding: 8px; border-radius: 10px; cursor: pointer; text-align: left; }
.ev-menu button:hover, .ev-menu button.on { background: var(--bg); }
.ev-menu .txt { flex: 1; min-width: 0; }
.ev-menu b { display: block; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev-menu small { color: var(--muted); font-size: 12px; }
.ev-menu .new { border-top: 1px solid var(--line); margin-top: 4px; padding-top: 10px; font-weight: 700; border-radius: 0 0 10px 10px; }

/* ===== Encabezados de vista ===== */
.vh { display: flex; align-items: flex-end; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.vh h1 { font-size: 26px; letter-spacing: -.025em; margin: 0; line-height: 1.15; }
.vh p { margin: 4px 0 0; color: var(--muted); }
.vh .grow { flex: 1; min-width: 200px; }
.vh-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ===== Botones ===== */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; border-radius: 10px; padding: 9px 14px; font-size: 14px; font-weight: 600; cursor: pointer; text-decoration: none; white-space: nowrap; transition: background .15s, border-color .15s, box-shadow .15s, opacity .15s; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover:not(:disabled) { background: #000; }
.btn-accent { background: var(--accent); color: var(--accent-ink, var(--ink)); }
.btn-accent:hover:not(:disabled) { filter: brightness(1.06); }
.btn-ghost { background: var(--card); border-color: var(--line-2); color: var(--ink); }
.btn-ghost:hover:not(:disabled) { border-color: var(--ink); }
.btn-soft { background: var(--bg); color: var(--ink); }
.btn-soft:hover:not(:disabled) { background: var(--line); }
.btn-danger { background: var(--card); border-color: #F3C5C1; color: var(--danger); }
.btn-danger:hover:not(:disabled) { background: var(--danger-bg); }
.btn-wa { background: #25D366; color: #fff; }
.btn-wa:hover { background: #1EBE5A; }
.btn-sm { padding: 6px 11px; font-size: 13px; border-radius: 9px; }
.btn-block { width: 100%; }
.icon-btn { width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--card); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.icon-btn:hover { border-color: var(--ink); }

/* ===== Tarjetas y KPIs ===== */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); }
.card-pad { padding: 20px; }
.card-h { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; }
.card-h h2, .card-h h3 { font-size: 16px; margin: 0; letter-spacing: -.01em; flex: 1; }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 22px; }
.kpi { padding: 18px; }
.kpi-label { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; font-weight: 600; }
.kpi-value { font-size: 28px; font-weight: 800; letter-spacing: -.025em; margin: 8px 0 2px; }
.kpi-sub { color: var(--muted); font-size: 12px; }
.bar { height: 6px; background: var(--bg); border-radius: 6px; overflow: hidden; margin-top: 10px; }
.bar i { display: block; height: 100%; background: var(--ink); border-radius: 6px; transition: width .3s; }
.grid-2 { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.zone-rows { display: grid; gap: 14px; }
.zone-row { display: grid; grid-template-columns: 12px 1fr auto; gap: 10px; align-items: center; }
.zone-row i { width: 12px; height: 12px; border-radius: 50%; }
.zone-row b { font-size: 14px; }
.zone-row small { color: var(--muted); display: block; font-size: 12px; }
.zone-row .num { text-align: right; font-weight: 700; }
.zone-row .bar { grid-column: 2 / 4; margin-top: 0; }

/* ===== Listas ===== */
.list { display: grid; gap: 0; }
.row { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-top: 1px solid var(--line); }
.row:first-child { border-top: 0; }
.row.click { cursor: pointer; }
.row.click:hover { background: #FAFAFB; }
.row-main { flex: 1; min-width: 0; }
.row-title { font-weight: 700; font-size: 14px; }
.row-sub { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.row-side { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.empty { padding: 34px 18px; text-align: center; color: var(--muted); }
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: var(--bg); color: var(--ink-2); white-space: nowrap; }
.pill.ok { background: var(--ok-bg); color: var(--ok); }
.pill.warn { background: var(--warn-bg); color: var(--warn); }
.pill.bad { background: var(--danger-bg); color: var(--danger); }
.pill.dark { background: var(--ink); color: #fff; }
.pill i { width: 8px; height: 8px; border-radius: 50%; }
.st-draft { background: var(--bg); color: var(--muted); }
.st-on_sale { background: var(--ok-bg); color: var(--ok); }
.st-closed { background: var(--danger-bg); color: var(--danger); }
.money { font-weight: 800; }

/* Filtros y busqueda */
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.search { flex: 1; min-width: 220px; display: flex; align-items: center; gap: 8px; background: var(--card); border: 1px solid var(--line-2); border-radius: 10px; padding: 0 12px; }
.search input { flex: 1; border: 0; outline: none; padding: 10px 0; font-size: 14px; font-family: inherit; background: transparent; }
.chips { display: flex; gap: 6px; }
.chip { border: 1px solid var(--line-2); background: var(--card); border-radius: 999px; padding: 7px 12px; font-size: 13px; font-weight: 600; cursor: pointer; }
.chip.on { background: var(--ink); border-color: var(--ink); color: #fff; }

/* ===== Croquis ===== */
.map-wrap { padding: 12px; max-width: 760px; }
.seatmap { width: 100%; height: auto; display: block; user-select: none; }
.legend { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.legend span { display: inline-flex; align-items: center; gap: 7px; background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 5px 11px; font-size: 12px; font-weight: 600; }
.legend i { width: 13px; height: 11px; border-radius: 3px; }
.selbar { position: fixed; left: calc(var(--side) + 32px); right: 32px; bottom: 20px; z-index: 50; background: var(--ink); color: #fff; border-radius: 16px; padding: 12px 14px 12px 18px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; box-shadow: 0 16px 40px rgba(0, 0, 0, .25); max-width: 900px; }
.selbar .txt { flex: 1; min-width: 160px; font-size: 13px; }
.selbar .txt b { color: var(--accent); font-size: 15px; }
.selbar .btn-ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .25); }
.selbar .btn-ghost:hover { border-color: #fff; }

/* ===== Eventos ===== */
.ev-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.ev-card { overflow: hidden; display: flex; flex-direction: column; }
.ev-card-img { position: relative; aspect-ratio: 2 / 1; background: var(--bg); }
.ev-card-img img { width: 100%; height: 100%; object-fit: cover; }
.ev-card-img .pill { position: absolute; top: 12px; left: 12px; box-shadow: 0 2px 8px rgba(0, 0, 0, .12); }
.ev-card-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.ev-card-body h3 { margin: 0; font-size: 16px; letter-spacing: -.01em; }
.ev-card-body .meta { color: var(--muted); font-size: 13px; }
.ev-card-stats { display: flex; justify-content: space-between; font-size: 13px; margin-top: 10px; }
.ev-card-actions { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }

/* ===== Editor de evento ===== */
.ed-head { position: sticky; top: 0; z-index: 30; background: rgba(244, 245, 247, .92); backdrop-filter: blur(10px); margin: -28px -32px 20px; padding: 16px 32px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.ed-head h1 { font-size: 20px; margin: 0; letter-spacing: -.02em; flex: 1; min-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dirty-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px rgba(16, 24, 40, .12); }
.ed-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.ed-grid .span { grid-column: 1 / -1; }
.fgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 14px; }
.fgrid .full { grid-column: 1 / -1; }
.fld { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--ink-2); min-width: 0; }
.fld input, .fld textarea, .fld select, .inp { width: 100%; min-width: 0; border: 1px solid var(--line-2); border-radius: 10px; padding: 10px 12px; font-size: 14px; font-family: inherit; color: var(--ink); background: #fff; transition: border-color .15s, box-shadow .15s; }
.fld textarea { resize: vertical; min-height: 84px; }
.fld input:focus, .fld textarea:focus, .fld select:focus, .inp:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(14, 15, 18, .08); }
.fld .hint { font-weight: 500; color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.seg { display: inline-flex; background: var(--bg); border-radius: 11px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: none; padding: 7px 14px; border-radius: 9px; font-weight: 600; font-size: 13px; cursor: pointer; color: var(--muted); }
.seg button.on { background: var(--card); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .1); }
.toggle-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.toggle-row:first-of-type { border-top: 0; }
.toggle-row .txt { flex: 1; }
.toggle-row b { display: block; font-size: 14px; }
.toggle-row small { color: var(--muted); font-size: 12px; }
.switch { position: relative; width: 42px; height: 24px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: var(--line-2); border-radius: 999px; transition: background .2s; cursor: pointer; }
.switch span::after { content: ''; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); transition: transform .2s; }
.switch input:checked + span { background: var(--ink); }
.switch input:checked + span::after { transform: translateX(18px); }
.switch input:disabled + span { opacity: .5; cursor: not-allowed; }
.imgs { display: grid; grid-template-columns: 2fr 1fr; gap: 14px; }
.img-slot { border: 1.5px dashed var(--line-2); border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; background: #FAFAFB; }
.img-slot .ph { flex: 1; display: flex; align-items: center; justify-content: center; min-height: 120px; color: var(--muted); font-size: 13px; }
.img-slot img { width: 100%; height: 100%; object-fit: cover; }
.img-slot.banner .ph, .img-slot.banner img { aspect-ratio: 2 / 1; }
.img-slot.poster .ph, .img-slot.poster img { aspect-ratio: 3 / 4; }
.img-slot label { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 10px; border-top: 1px solid var(--line); font-weight: 600; font-size: 13px; cursor: pointer; background: #fff; }
.img-slot label:hover { background: var(--bg); }
.img-slot input { display: none; }

/* Secciones y precios */
.sec-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 18px; align-items: start; }
.sec-list { display: grid; gap: 8px; }
.sec { display: grid; grid-template-columns: auto minmax(0, 1fr) 110px auto; gap: 10px; align-items: center; border: 1.5px solid var(--line); border-radius: 12px; padding: 8px 10px; cursor: pointer; transition: border-color .15s, background .15s; }
.sec.on { border-color: var(--ink); background: #FAFAFB; box-shadow: inset 3px 0 0 var(--ink); }
.sec .sw { width: 28px; height: 28px; border-radius: 8px; border: 0; padding: 0; cursor: pointer; position: relative; overflow: hidden; }
.sec .sw input { position: absolute; inset: -6px; width: 40px; height: 40px; border: 0; padding: 0; cursor: pointer; opacity: 0; }
.sec .inp { padding: 7px 10px; }
.sec .price { display: flex; align-items: center; gap: 4px; }
.sec .price span { color: var(--muted); font-weight: 600; }
.sec .meta { grid-column: 2 / 4; display: flex; gap: 8px; font-size: 12px; color: var(--muted); margin-top: -2px; }
.sec .del { width: 30px; height: 30px; border-radius: 8px; border: 0; background: none; color: var(--muted); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.sec .del:hover:not(:disabled) { background: var(--danger-bg); color: var(--danger); }
.sec .del:disabled { opacity: .3; cursor: not-allowed; }
.paint-hint { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); margin: 0 0 10px; }
.paint-hint i { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }
.paint-map { border: 1px solid var(--line); border-radius: 14px; padding: 8px; background: #fff; }
.paint-map .sm-table { cursor: pointer; }
.paint-map .is-locked { cursor: not-allowed; }

/* ===== Modales ===== */
.modal-bg { position: fixed; inset: 0; background: rgba(14, 15, 18, .45); display: flex; align-items: flex-start; justify-content: center; padding: 6vh 16px; z-index: 100; overflow: auto; animation: fade .15s; }
@keyframes fade { from { opacity: 0; } }
.modal { background: var(--card); border-radius: 20px; width: 100%; max-width: 480px; padding: 22px; box-shadow: 0 24px 60px rgba(0, 0, 0, .2); animation: rise .2s cubic-bezier(.2, .8, .2, 1); }
@keyframes rise { from { transform: translateY(12px); opacity: 0; } }
.modal-h { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.modal-h h2 { margin: 0; font-size: 18px; letter-spacing: -.015em; flex: 1; }
.modal .sub { color: var(--muted); margin: -6px 0 14px; font-size: 13px; }
.msg-err { background: var(--danger-bg); color: #A52714; padding: 10px 12px; border-radius: 10px; font-weight: 600; font-size: 13px; }
.msg-ok { background: var(--ok-bg); color: var(--ok); padding: 10px 12px; border-radius: 10px; font-weight: 600; font-size: 13px; }
.dl { display: grid; gap: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; margin: 12px 0; }
.dl div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 12px; border-top: 1px solid var(--line); font-size: 13px; }
.dl div:first-child { border-top: 0; }
.dl span { color: var(--muted); }
.dl strong { text-align: right; overflow-wrap: anywhere; }
.links { display: grid; gap: 8px; margin: 12px 0; }
.links a { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; border-radius: 10px; background: var(--bg); text-decoration: none; font-weight: 600; font-size: 13px; }
.links a:hover { background: var(--line); }
.stack { display: grid; gap: 10px; }
.total-line { display: flex; justify-content: space-between; align-items: baseline; padding: 12px 0 4px; font-weight: 600; }
.total-line strong { font-size: 22px; letter-spacing: -.02em; }

/* Aviso flotante */
.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 11px 18px; border-radius: 12px; font-weight: 600; font-size: 14px; z-index: 200; box-shadow: 0 12px 30px rgba(0, 0, 0, .25); animation: rise .2s; }
.toast.bad { background: var(--danger); }

/* ===== Login ===== */
.login { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px 16px; }
.login .card { width: 100%; max-width: 380px; padding: 30px 26px; }
.login img { height: 40px; width: auto; margin: 0 auto 18px; }
.login h1 { text-align: center; font-size: 20px; margin: 0 0 4px; letter-spacing: -.02em; }
.login p { text-align: center; color: var(--muted); margin: 0 0 22px; }

/* ===== Celular ===== */
@media (max-width: 1023px) {
  .pn-side { display: none; }
  .pn-main { margin-left: 0; padding: 16px 16px 96px; }
  .pn-top { display: flex; position: sticky; top: 0; z-index: 40; background: rgba(255, 255, 255, .94); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); padding: 10px 14px; gap: 10px; align-items: center; }
  .pn-top > img { height: 24px; width: auto; }
  .pn-top .ev-switch { flex: 1; min-width: 0; }
  .pn-top .ev-switch-btn { padding: 6px 8px; border-radius: 12px; }
  .pn-top .ev-switch-btn img { width: 36px; height: 24px; }
  .pn-bottom { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: rgba(255, 255, 255, .96); backdrop-filter: blur(10px); border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
  .pn-bottom button { flex: 1; border: 0; background: none; display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 11px; font-weight: 600; color: var(--muted); padding: 6px 2px; border-radius: 10px; cursor: pointer; position: relative; }
  .pn-bottom button.on { color: var(--ink); }
  .pn-bottom button.on svg { stroke-width: 2.4; }
  .pn-bottom .badge-n { position: absolute; top: 0; left: 55%; margin: 0; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kpi { padding: 14px; }
  .kpi-value { font-size: 22px; }
  .grid-2, .ed-grid, .sec-layout { grid-template-columns: minmax(0, 1fr); }
  .selbar { left: 12px; right: 12px; bottom: 76px; }
  .ed-head { margin: -16px -16px 16px; padding: 12px 16px; top: 49px; }
  .vh h1 { font-size: 22px; }
  .row { padding: 12px 14px; flex-wrap: wrap; }
  .row-side { width: 100%; justify-content: flex-start; }
}
@media (max-width: 560px) {
  .fgrid { grid-template-columns: minmax(0, 1fr); }
  .imgs { grid-template-columns: 1fr; }
  .sec { grid-template-columns: auto minmax(0, 1fr) 96px auto; }
  .ev-grid { grid-template-columns: 1fr; }
}
.img-warn { background: var(--warn-bg); color: var(--warn); padding: 9px 12px; border-radius: 10px; font-size: 13px; font-weight: 600; margin: 0; }
.img-note { color: var(--muted); font-size: 12px; margin: 10px 0 0; }
@media (max-width: 1023px) {
  .ed-head { flex-wrap: nowrap; gap: 8px; }
  .ed-head h1 { font-size: 17px; }
  .hide-sm { display: none; }
}

/* Seccion con precio de preventa y en puerta */
.sec { grid-template-columns: auto minmax(0, 1fr) 96px 132px auto; }
.sec .price.door span { font-size: 12px; white-space: nowrap; }
.sec .meta { grid-column: 2 / 5; }
@media (max-width: 560px) { .sec { grid-template-columns: auto minmax(0, 1fr) auto; } .sec .price { grid-column: 2 / 3; } .sec .del { grid-row: 1; grid-column: 3; } .sec .meta { grid-column: 2 / 4; } }

/* ===== App en el celular (PWA, pensado para iPhone) ===== */
html { -webkit-text-size-adjust: 100%; }
body { -webkit-tap-highlight-color: transparent; }
/* iPhone hace zoom si un campo tiene letra menor a 16px */
@media (pointer: coarse) { .fld input, .fld textarea, .fld select, .inp, select, input, textarea { font-size: 16px; } }
/* Respetar la barra de inicio del iPhone */
.modal-bg { padding-bottom: calc(6vh + env(safe-area-inset-bottom)); }
@media (max-width: 1023px) {
  .selbar { bottom: calc(76px + env(safe-area-inset-bottom)); }
  .toast { bottom: calc(84px + env(safe-area-inset-bottom)); }
}
.is-app .pn-top { padding-top: calc(10px + env(safe-area-inset-top)); }
.is-app .pn-bottom, .is-app .pn-side nav { -webkit-user-select: none; user-select: none; }
/* Vendido en el croquis: gris con ✕ */
.legend i.lg-taken { background: #E5E7EB; border: 1px solid #9CA3AF; position: relative; }
.legend i.lg-taken::after { content: '✕'; position: absolute; inset: 0; display: grid; place-items: center; font-size: 8px; line-height: 1; color: #6B7280; font-weight: 700; }
/* Filas de listas: si no caben, los botones bajan de renglon (no se salen de la tarjeta) */
.row { flex-wrap: wrap; }
.row-main { flex: 1 1 240px; }
.row-side { max-width: 100%; }
/* Seccion: que incluye (bebida, etc.) */
.sec .inc { grid-column: 2 / 5; font-size: 13px; }
@media (max-width: 560px) { .sec .inc { grid-column: 2 / 4; } }
/* Listas: la columna se ajusta a la tarjeta (antes crecia al texto mas largo y desbordaba la pagina en celular) */
.list { grid-template-columns: minmax(0, 1fr); }
/* Ver la informacion completa: el texto baja de renglon en lugar de cortarse */
.row-sub { white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: anywhere; }
.row-title { overflow-wrap: anywhere; }

/* Configuracion > Marca */
.color-row { display: flex; gap: 8px; align-items: stretch; }
.color-row input[type=color] { width: 46px; min-width: 46px; height: auto; padding: 3px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--card); cursor: pointer; }
.color-row input:not([type=color]) { flex: 1; min-width: 0; text-transform: uppercase; }
.logo-slots { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.logo-slot { display: flex; gap: 12px; align-items: center; border: 1px solid var(--line); border-radius: 12px; padding: 10px; }
.logo-prev { width: 96px; height: 56px; flex: 0 0 auto; border-radius: 8px; background: #F3F4F6; display: flex; align-items: center; justify-content: center; padding: 6px; overflow: hidden; }
.logo-prev.dark { background: #0E0F12; }
.logo-prev img { max-width: 100%; max-height: 100%; object-fit: contain; }
.logo-prev .wordmark { font-size: 12px; white-space: normal; text-align: center; }
.logo-txt { display: grid; gap: 2px; min-width: 0; }
.logo-txt small { color: var(--muted); font-size: 12px; }
.logo-act { display: flex; gap: 6px; margin-top: 6px; }
.logo-act label.btn { cursor: pointer; }

/* Biblioteca de croquis (Eventos) */
.cq-head { margin-top: 34px; }
.cq-head h2 { margin: 0; font-size: 20px; letter-spacing: -.015em; }
.cq-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.cq-card { overflow: hidden; display: flex; flex-direction: column; }
.cq-prev { height: 150px; background: #F7F8FA; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: center; padding: 10px; }
.cq-prev svg { max-width: 100%; max-height: 100%; width: auto; height: 100%; }
.cq-body { padding: 12px 14px 14px; display: grid; gap: 8px; }
.cq-body h3 { margin: 0; font-size: 15px; }
.cq-body .meta { color: var(--muted); font-size: 12.5px; }
.cq-act { display: flex; gap: 6px; flex-wrap: wrap; }
.cq-bases { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.cq-base { border: 1.5px solid var(--line-2); border-radius: 12px; padding: 8px; cursor: pointer; display: grid; gap: 6px; font-weight: 600; font-size: 12.5px; color: var(--ink-2); background: #fff; text-align: left; }
.cq-base .cq-mini { height: 70px; display: flex; align-items: center; justify-content: center; background: #F7F8FA; border-radius: 8px; overflow: hidden; }
.cq-base .cq-mini svg { height: 100%; width: auto; max-width: 100%; }
.cq-base small { color: var(--muted); font-weight: 500; }
.cq-base.on { border-color: var(--ink); box-shadow: 0 0 0 3px rgba(14, 15, 18, .08); }

/* Taquilla (cortes de caja) */
.kpis-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 1023px) { .kpis-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.kpi-sub a { color: var(--ink); font-weight: 600; }
.row.off .row-title { color: var(--muted); }
.dl div.strong strong { font-size: 15px; }
