/* La Birria Chapina — páginas de opinión, panel y legales.
   Mismos tokens que styles.css. */
:root {
  --ink: #0D0B09; --ink-2: #16130F; --ink-3: #221E19; --ink-line: rgba(245, 239, 227, .12);
  --cream: #F5EFE3; --cream-2: #EAE1CF; --cream-3: #DDD1BA; --cream-line: rgba(13, 11, 9, .14);
  --gold: #F6CF1C; --blue: #3B8EEA; --blue-ink: #1C64B8;
  --muted-d: #B3A993; --muted-l: #5E5549;
  --ok: #2E7D4F; --bad: #B3261E;
  --f-display: "Bricolage Grotesque", "Helvetica Neue", Arial, sans-serif;
  --f-serif: "Fraunces", Georgia, serif;
  --ease: cubic-bezier(.19, 1, .22, 1);
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; font-family: var(--f-display); font-size: 16px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }
em { font-family: var(--f-serif); font-style: italic; font-weight: 400; }
img { display: block; max-width: 100%; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 4px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  height: 50px; padding: 0 26px; border: 0; border-radius: 999px; cursor: pointer;
  font: 680 16px/1 var(--f-display); letter-spacing: -.01em; text-decoration: none; white-space: nowrap;
  transition: background-color .3s, color .3s, box-shadow .3s, transform .3s var(--ease);
}
.btn:active { transform: scale(.97); }
.btn--gold { background: var(--gold); color: var(--ink); }
.btn--gold:hover { background: var(--cream); }
.btn--ink { background: var(--ink); color: var(--cream); }
.btn--ink:hover { background: var(--gold); color: var(--ink); }
.btn--line { background: transparent; color: inherit; box-shadow: inset 0 0 0 1.5px currentColor; }
.btn--line:hover { background: var(--ink); color: var(--cream); box-shadow: none; }
.btn--sm { height: 38px; padding: 0 16px; font-size: 14px; }
.btn--ok { background: var(--ok); color: #fff; }
.btn--bad { background: transparent; color: var(--bad); box-shadow: inset 0 0 0 1.5px var(--bad); }
.btn--bad:hover { background: var(--bad); color: #fff; }

.field { display: grid; gap: 8px; }
.field > span { font-size: 13px; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; }
.field small { color: var(--muted-l); font-size: 13.5px; }
.input, .textarea, .select {
  width: 100%; font: 500 17px/1.4 var(--f-display); color: var(--ink);
  background: #fff; border: 1.5px solid var(--cream-3); border-radius: 12px; padding: 13px 15px;
  transition: border-color .2s, box-shadow .2s;
}
.input:focus, .textarea:focus, .select:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 4px rgba(246, 207, 28, .45); }
.textarea { min-height: 130px; resize: vertical; }
.alert { padding: 14px 16px; border-radius: 12px; font-weight: 550; }
.alert--bad { background: #FBE9E7; color: var(--bad); }
.alert--ok { background: #E6F2EA; color: var(--ok); }
.alert--info { background: #E8F1FC; color: var(--blue-ink); }

/* ==================== Página pública (opinar / legales) ==================== */
.pub { background: var(--cream); color: var(--ink); min-height: 100vh; }
.pub__top { background: var(--ink); color: var(--cream); padding: 18px 20px; display: flex; align-items: center; justify-content: space-between; }
.pub__top img { width: 48px; height: 48px; border-radius: 50%; }
.pub__top a { font-size: 14px; font-weight: 600; text-decoration: none; opacity: .8; }
.pub__top a:hover { opacity: 1; }
.pub__main { max-width: 640px; margin: 0 auto; padding: 48px 20px 90px; }
.pub__main--wide { max-width: 760px; }
.pub h1 { font-size: clamp(2.4rem, 8vw, 3.6rem); line-height: .95; font-weight: 790; letter-spacing: -.045em; }
.pub h1 em { font-weight: 360; }
.pub__lede { margin: 18px 0 36px; font-size: 1.1rem; color: var(--muted-l); }
.form { display: grid; gap: 26px; }
.form .btn { width: 100%; height: 58px; font-size: 18px; }
.codebox { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-radius: 12px; background: var(--ink); color: var(--cream); }
.codebox strong { font-size: 20px; letter-spacing: .12em; }
.codebox span { font-size: 13px; color: var(--muted-d); }

.rating { border: 0; margin: 0; padding: 0; }
.rating legend { font-size: 13px; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 8px; padding: 0; }
.rating__stars { display: inline-flex; flex-direction: row-reverse; gap: 4px; }
.rating__stars input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.rating__stars label { font-size: 44px; line-height: 1; cursor: pointer; color: var(--cream-3); transition: color .15s, transform .3s var(--ease); }
.rating__stars label:hover, .rating__stars label:hover ~ label,
.rating__stars input:checked ~ label { color: var(--gold); -webkit-text-stroke: 1px var(--ink); }
.rating__stars label:hover { transform: scale(1.12); }
.rating__stars input:focus-visible + label { outline: 2px solid var(--blue); border-radius: 6px; }

/* Etiquetas rápidas */
.tags { border: 0; margin: 0; padding: 0; min-width: 0; }
.tags legend { font-size: 13px; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 12px; padding: 0; }
.tags legend small { display: block; margin-top: 2px; font-size: 13.5px; font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--muted-l); }
.tags__list { display: flex; flex-wrap: wrap; gap: 8px; }
.tag { position: relative; cursor: pointer; }
.tag input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.tag span {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 10px 16px; border-radius: 999px;
  background: #fff; border: 1.5px solid var(--cream-3); font-size: 15px; font-weight: 600; letter-spacing: -.01em;
  transition: background-color .2s, border-color .2s, color .2s, transform .25s var(--ease);
  user-select: none;
}
.tag span::before { content: "+"; font-weight: 500; opacity: .5; }
.tag:hover span { border-color: var(--ink); }
.tag input:checked + span { background: var(--ink); border-color: var(--ink); color: var(--gold); }
.tag input:checked + span::before { content: "✓"; opacity: 1; }
.tag input:active + span { transform: scale(.96); }
.tag input:focus-visible + span { outline: 2px solid var(--blue); outline-offset: 2px; }
.tags__preview { margin-top: 16px; padding: 16px 18px; border-radius: 14px; background: #fff; border-left: 4px solid var(--gold); }
.tags__preview b { display: block; font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted-l); margin-bottom: 4px; }
.tags__preview p { font-family: var(--f-serif); font-style: italic; font-size: 1.2rem; line-height: 1.35; }
[hidden] { display: none !important; }

/* Foto con miniatura */
.photo { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.photo__thumb { width: 84px; height: 84px; object-fit: cover; border-radius: 12px; border: 1.5px solid var(--cream-3); }
.photo__pick { position: relative; overflow: hidden; }
.form .photo__pick { width: auto; height: 46px; font-size: 15px; padding: 0 22px; }
.photo__pick input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.photo__remove { background: none; border: 0; color: var(--bad); font: 600 14px var(--f-display); text-decoration: underline; cursor: pointer; }

.check { display: grid; grid-template-columns: 24px 1fr; gap: 12px; align-items: start; font-size: 15px; }
.check input { width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--ink); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.done { text-align: center; padding-top: 30px; }
.done__icon { width: 96px; height: 96px; margin: 0 auto 26px; border-radius: 50%; background: var(--gold); display: grid; place-items: center; font-size: 44px; }
.done p { margin: 18px auto 30px; max-width: 42ch; color: var(--muted-l); }
.legal h2 { font-size: 1.35rem; font-weight: 740; letter-spacing: -.02em; margin: 34px 0 10px; }
.legal p, .legal li { color: #2b2620; }
.legal ul { padding-left: 20px; }
.draft { margin-bottom: 30px; }

/* ==================== Panel ==================== */
.panel { background: #F3EDE1; color: var(--ink); min-height: 100vh; }
/* Estructura: menú lateral + contenido */
.pn-shell { display: grid; grid-template-columns: minmax(0, 1fr); min-height: 100vh; }
.pn-content { min-width: 0; display: flex; flex-direction: column; }

/* Barra superior: solo usuario/rol y Salir */
.pn-top { position: sticky; top: 0; z-index: 10; background: var(--ink); color: var(--cream); border-bottom: 1px solid var(--ink-line); }
.pn-top__user { display: flex; align-items: center; justify-content: flex-end; gap: 14px; padding: 14px 24px; font-size: 14px; color: var(--muted-d); }
.pn-top__who strong { color: var(--cream); font-weight: 650; }
.pn-top__user form { margin: 0; }
.pn-top__user button {
  background: none; border: 1.5px solid rgba(245, 239, 227, .35); border-radius: 999px; padding: 7px 16px;
  color: var(--cream); font: 600 13.5px var(--f-display); cursor: pointer; transition: background-color .2s, color .2s, border-color .2s;
}
.pn-top__user button:hover { background: var(--cream); color: var(--ink); border-color: var(--cream); }

/* Menú lateral */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.pn-side { background: var(--ink); color: var(--cream); }
.pn-side__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pn-side__brand { display: flex; align-items: center; gap: 12px; text-decoration: none; min-width: 0; }
.pn-side__brand img { flex: none; width: 44px; height: 44px; border-radius: 50%; }
.pn-side__brand span { font-size: 12px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--muted-d); white-space: nowrap; }
.pn-side__me { display: none; }
.pn-collapse {
  flex: none; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; cursor: pointer;
  background: rgba(245, 239, 227, .06); border: 1px solid var(--ink-line); color: var(--cream);
  transition: background-color .2s, transform .35s var(--ease);
}
.pn-collapse:hover { background: rgba(245, 239, 227, .14); }
.pn-collapse svg { transition: transform .35s var(--ease); }
.pn-group__label { font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted-d); opacity: .75; margin: 0 0 6px 12px; white-space: nowrap; }
.pn-link {
  position: relative; display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 9px 12px; border-radius: 12px;
  text-decoration: none; font-size: 15px; font-weight: 600; color: var(--cream); opacity: .78;
  transition: background-color .2s, color .2s, opacity .2s;
}
.pn-link__icon { flex: none; display: grid; place-items: center; width: 24px; height: 24px; }
.pn-link__label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pn-link:hover { opacity: 1; background: rgba(245, 239, 227, .08); }
.pn-link.is-on { opacity: 1; background: var(--gold); color: var(--ink); font-weight: 700; }
.pn-link.is-on .pn-link__label::after { content: ""; display: inline-block; width: 6px; height: 6px; margin-left: 8px; border-radius: 50%; background: var(--ink); vertical-align: middle; }

/* Botón de menú en la barra superior (solo móvil) */
.pn-menu-btn {
  display: none; align-items: center; gap: 10px; min-width: 0; padding: 6px 12px 6px 8px; border-radius: 12px; cursor: pointer;
  background: rgba(245, 239, 227, .06); border: 1px solid var(--ink-line); color: var(--cream); font: 650 14.5px/1.1 var(--f-display); text-align: left;
}
.pn-menu-btn__txt { display: grid; min-width: 0; }
.pn-menu-btn__txt small { font-size: 10px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); }
.pn-menu-btn[aria-expanded="true"] { background: var(--gold); color: var(--ink); border-color: var(--gold); }
.pn-menu-btn[aria-expanded="true"] small { color: var(--ink); }

/* ---------- Móvil: menú desplegable desde la barra superior ---------- */
@media (max-width: 899px) {
  .pn-top { display: flex; align-items: center; gap: 10px; height: 60px; padding: 0 12px 0 16px; }
  .pn-menu-btn { display: inline-flex; }
  .pn-top__user { flex: 1; min-width: 0; padding: 0; gap: 10px; }
  .pn-top__who { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; text-align: right; flex: 1; }
  .pn-side__head, .pn-collapse { display: none; }
  .pn-side {
    position: fixed; z-index: 30; top: 60px; left: 0; right: 0; max-height: calc(100vh - 60px); overflow-y: auto;
    padding: 18px 16px 22px; border-top: 1px solid var(--ink-line); border-radius: 0 0 20px 20px;
    box-shadow: 0 0 0 100vmax rgba(13, 11, 9, .45);
  }
  .pn-side__me { display: block; font-size: 13.5px; color: var(--muted-d); padding: 0 12px 14px; margin: 0 0 14px; border-bottom: 1px solid var(--ink-line); }
  .pn-side__me strong { color: var(--cream); }
  .pn-side__nav { display: grid; gap: 18px; }
  .pn-group { display: grid; gap: 4px; }
  /* Con JS el menú arranca contraído y se abre con el botón */
  .js .pn-side { visibility: hidden; opacity: 0; transform: translateY(-8px); pointer-events: none; transition: opacity .2s, transform .3s var(--ease), visibility 0s .3s; }
  .js.menu-open .pn-side { visibility: visible; opacity: 1; transform: none; pointer-events: auto; transition: opacity .2s, transform .3s var(--ease); }
}
@media (max-width: 520px) { .pn-top__who { display: none; } .pn-top__user { justify-content: flex-end; } }

/* ---------- Escritorio: menú lateral fijo, expandible y contraíble ---------- */
@media (min-width: 900px) {
  .pn-shell { grid-template-columns: 250px minmax(0, 1fr); transition: grid-template-columns .35s var(--ease); }
  .pn-side { position: sticky; top: 0; height: 100vh; overflow-y: auto; overflow-x: hidden; display: flex; flex-direction: column; gap: 30px; padding: 20px 14px; border-right: 1px solid var(--ink-line); }
  .pn-side__brand { padding: 0 6px; }
  .pn-side__nav { display: grid; gap: 24px; }
  .pn-group { display: grid; gap: 4px; }
  .pn-link.is-on::before { content: ""; position: absolute; left: -14px; top: 8px; bottom: 8px; width: 4px; border-radius: 0 4px 4px 0; background: var(--gold); }

  /* Contraído: solo iconos; la opción activa conserva fondo amarillo y barra */
  .menu-collapsed .pn-shell { grid-template-columns: 76px minmax(0, 1fr); }
  .menu-collapsed .pn-side { padding: 20px 12px; overflow: visible; }
  .menu-collapsed .pn-side__head { flex-direction: column; gap: 14px; }
  .menu-collapsed .pn-side__brand { padding: 0; }
  .menu-collapsed .pn-side__brand span,
  .menu-collapsed .pn-link__label { display: none; }
  .menu-collapsed .pn-collapse svg { transform: rotate(180deg); }
  .menu-collapsed .pn-group__label { font-size: 0; height: 1px; margin: 0 8px 8px; background: var(--ink-line); opacity: 1; }
  .menu-collapsed .pn-link { justify-content: center; padding: 10px 0; }
  .menu-collapsed .pn-link.is-on::before { left: -12px; }
  /* Etiqueta flotante al pasar el ratón o con el teclado */
  .menu-collapsed .pn-link::after {
    content: attr(data-label); position: absolute; left: calc(100% + 14px); top: 50%; z-index: 40;
    padding: 7px 12px; border-radius: 8px; background: var(--cream); color: var(--ink); font-size: 13.5px; font-weight: 650; white-space: nowrap;
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, .5); opacity: 0; pointer-events: none; transform: translate(-4px, -50%); transition: opacity .15s, transform .2s var(--ease);
  }
  .menu-collapsed .pn-link:hover::after, .menu-collapsed .pn-link:focus-visible::after { opacity: 1; transform: translate(0, -50%); }
}

.pn-main { width: 100%; max-width: 1200px; margin: 0 auto; padding: 36px 24px 80px; }
.pn-main.pn-flash { padding-bottom: 0; }
.pn-h1 { font-size: clamp(2rem, 4vw, 2.8rem); font-weight: 790; letter-spacing: -.04em; line-height: 1; margin-bottom: 26px; }
.pn-h1 em { font-weight: 360; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 28px; }
.stat { background: #fff; border-radius: 16px; padding: 18px 20px; text-decoration: none; border: 1.5px solid transparent; transition: border-color .2s; }
.stat:hover { border-color: var(--ink); }
.stat.is-on { border-color: var(--ink); box-shadow: inset 0 -4px 0 var(--gold); }
.stat b { display: block; font-size: 2.2rem; font-weight: 780; letter-spacing: -.04em; line-height: 1; }
.stat span { font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted-l); }

.rv-list { display: grid; gap: 14px; }
.rv { background: #fff; border-radius: 18px; padding: 22px; display: grid; gap: 16px; }
.rv__head { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; }
.rv__name { font-size: 1.15rem; font-weight: 720; letter-spacing: -.02em; }
.rv__stars { color: #C79A00; letter-spacing: 2px; font-size: 18px; }
.rv__meta { font-size: 13px; color: var(--muted-l); display: flex; flex-wrap: wrap; gap: 4px 14px; }
.rv__body { display: grid; gap: 16px; }
.rv__comment { font-size: 1.05rem; white-space: pre-wrap; }
.rv__photo { width: 140px; height: 140px; object-fit: cover; border-radius: 12px; cursor: zoom-in; }
.rv__reply { background: var(--cream); border-left: 3px solid var(--gold); border-radius: 0 12px 12px 0; padding: 12px 14px; font-size: 15px; }
.rv__reply b { display: block; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 4px; }
.rv__actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.rv__actions form { margin: 0; }
.rv details summary { cursor: pointer; font-weight: 650; font-size: 14.5px; }
.rv details form { display: grid; gap: 10px; margin-top: 10px; }
.badge { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; padding: 4px 9px; border-radius: 999px; }
.badge--pending { background: #FFF3C4; color: #6B5200; }
.badge--approved { background: #E6F2EA; color: var(--ok); }
.badge--rejected { background: #FBE9E7; color: var(--bad); }
.card { background: #fff; border-radius: 18px; padding: 24px; }
.grid2 { display: grid; gap: 18px; }
.table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.table th { text-align: left; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted-l); padding: 10px 8px; border-bottom: 1.5px solid var(--ink); }
.table td { padding: 12px 8px; border-bottom: 1px solid var(--cream-line); vertical-align: middle; }
.table form { display: inline; margin: 0; }
.table-wrap { overflow-x: auto; max-width: 100%; }
.linkbox { display: flex; gap: 8px; margin-top: 10px; min-width: 0; }
.linkbox input { flex: 1; min-width: 0; font: 500 13px ui-monospace, Consolas, monospace; padding: 10px; border-radius: 10px; border: 1.5px solid var(--cream-3); background: var(--cream); }

/* ---------- Anti-desbordes: ningún bloque puede ser más ancho que la pantalla ---------- */
.form, .rv__body, .grid2, .rows, .row, .detail, .side, .op, .rf__common, .more__in, .help { grid-template-columns: minmax(0, 1fr); }
.form > *, .grid2 > *, .detail > *, .side > *, .rows > *, .op > *, .card, .field, .block, .stack { min-width: 0; }
.input, .textarea, .select { max-width: 100%; }
.pn-main { overflow-wrap: anywhere; }
.pn-main img { max-width: 100%; height: auto; }
@media (min-width: 760px) { .rv__body { grid-template-columns: minmax(0, 1fr) auto; align-items: start; } }
@media (min-width: 900px) { .grid2 { grid-template-columns: 380px minmax(0, 1fr); align-items: start; } }

/* ---------- Móvil: las tablas se convierten en tarjetas apiladas ---------- */
@media (max-width: 700px) {
  .table--stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .table--stack, .table--stack tbody, .table--stack tr, .table--stack td { display: block; width: 100%; }
  .table--stack tr { padding: 14px 0; border-bottom: 1px solid var(--cream-line); }
  .table--stack tr:first-child { padding-top: 4px; }
  .table--stack td { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 10px; align-items: center; padding: 5px 0; border: 0; }
  .table--stack td::before { content: attr(data-label); font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted-l); }
  .table--stack td[data-label=""] { display: block; padding-bottom: 8px; font-size: 16px; line-height: 1.35; }
  .table--stack td[data-label=""]::before { display: none; }
  .table--stack td[data-label=""] small { color: var(--muted-l); font-size: 13.5px; }
  .table--stack td.td-actions { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 10px; }
  .table--stack td.td-actions::before { display: none; }
  .table--stack .select { width: 100%; }
  .card { padding: 20px; }
  .pn-main { padding: 24px 16px 64px; }
  .pn-h1 { font-size: 2rem; margin-bottom: 20px; }
}
.empty { text-align: center; padding: 60px 20px; color: var(--muted-l); background: #fff; border-radius: 18px; }

/* Login */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: var(--ink); }
.auth__card { width: 100%; max-width: 420px; background: var(--cream); color: var(--ink); border-radius: 22px; padding: 34px 28px; display: grid; gap: 22px; }
.auth__card img { width: 72px; height: 72px; border-radius: 50%; }
.auth__card h1 { font-size: 2rem; font-weight: 790; letter-spacing: -.04em; line-height: 1; }
.auth__card .btn { width: 100%; }

/* Hoja de QR para imprimir */
.qr-sheet { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.qr-card { background: #fff; border: 1px dashed #bbb; border-radius: 14px; padding: 16px; text-align: center; break-inside: avoid; }
.qr-card__qr { width: 150px; height: 150px; margin: 8px auto 10px; }
.qr-card__qr img, .qr-card__qr canvas { width: 150px !important; height: 150px !important; }
.qr-card h3 { font-size: 15px; font-weight: 740; letter-spacing: -.01em; }
.qr-card p { font-size: 11.5px; color: #555; }
.qr-card strong { display: block; font-size: 19px; letter-spacing: .14em; margin-top: 6px; }
.qr-card--used { opacity: .35; }
/* ==================== Formulario adaptable (opinar) ==================== */
.rating--big legend { font-size: 14px; }
.rating--big .rating__stars label { font-size: clamp(48px, 13vw, 60px); padding: 0 2px; }
.rating__word { min-height: 1.4em; margin-top: 6px; font-family: var(--f-serif); font-style: italic; font-size: 1.25rem; color: var(--muted-l); }
.legend-note { display: block; font-size: 13.5px; font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--muted-l); }

/* Con JS: se muestra solo el camino que corresponde a las estrellas */
.rf--js[data-mode=""] .rf__step,
.rf--js[data-mode="good"] [data-flow="bad"],
.rf--js[data-mode="bad"] [data-flow="good"],
.rf--js [data-help][data-hide] { display: none; }
.rf--js .rf__step, .rf--js [data-help] { animation: rfIn .55s var(--ease); }
@keyframes rfIn { from { opacity: 0; transform: translateY(12px); } }
.rf__common { display: grid; gap: 22px; }

.tags--issue .tag input:checked + span { background: var(--blue-ink); border-color: var(--blue-ink); color: #fff; }
.help { margin-top: 18px; padding: 18px; border-radius: 16px; background: #fff; display: grid; gap: 14px; border-left: 4px solid var(--blue-ink); }
.help__lead { font-family: var(--f-serif); font-style: italic; font-size: 1.2rem; line-height: 1.3; }
.textarea--short { min-height: 92px; }
.phone-group { display: flex; align-items: stretch; border: 1.5px solid var(--cream-3); border-radius: 12px; background: #fff; overflow: hidden; transition: border-color .2s, box-shadow .2s; }
.phone-group:focus-within { border-color: var(--ink); box-shadow: 0 0 0 4px rgba(246, 207, 28, .45); }
.phone-group__cc { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 0 14px; background: var(--cream); border-right: 1.5px solid var(--cream-3); font: 700 17px/1 var(--f-display); letter-spacing: .01em; color: var(--ink); white-space: nowrap; }
.phone-group .input { border: 0; border-radius: 0; box-shadow: none; min-width: 0; font-size: 18px; letter-spacing: .06em; }
.phone-group .input:focus { box-shadow: none; }

.more { border-top: 1px solid var(--cream-line); border-bottom: 1px solid var(--cream-line); }
.more summary { cursor: pointer; list-style: none; padding: 16px 0; font-weight: 650; display: flex; justify-content: space-between; align-items: center; }
.more summary::-webkit-details-marker { display: none; }
.more summary::after { content: "+"; font-size: 22px; font-weight: 400; transition: transform .3s var(--ease); }
.more[open] summary::after { transform: rotate(45deg); }
.more summary small { color: var(--muted-l); font-weight: 500; margin-left: 6px; margin-right: auto; }
.more__in { display: grid; gap: 20px; padding-bottom: 20px; }
.done__icon--help { background: var(--blue-ink); color: #fff; }

/* ==================== Panel: Opiniones e incidencias ==================== */
.filters { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 22px; scrollbar-width: thin; }
.filter { flex: none; display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 999px; background: #fff; text-decoration: none; font-weight: 620; font-size: 14.5px; border: 1.5px solid transparent; }
.filter b { font-weight: 750; font-size: 12.5px; min-width: 24px; height: 22px; padding: 0 7px; border-radius: 999px; display: inline-grid; place-items: center; background: var(--cream-2); }
.filter:hover { border-color: var(--ink); }
.filter.is-on { background: var(--ink); color: var(--cream); }
.filter.is-on b { background: var(--gold); color: var(--ink); }
.filter--alert b { background: var(--bad); color: #fff; }

.rows { display: grid; gap: 10px; }
.row { background: #fff; border-radius: 16px; display: grid; border: 1.5px solid transparent; transition: border-color .2s; }
.row:hover { border-color: var(--cream-3); }
.row--alert { border-left: 5px solid var(--bad); }
.row__main { display: grid; gap: 12px; padding: 18px 20px 10px; text-decoration: none; }
.row__who { display: grid; gap: 2px; }
.row__who strong { font-size: 1.08rem; font-weight: 720; letter-spacing: -.02em; }
.row__who small { color: var(--muted-l); font-size: 13px; }
.row__stars, .op__stars { color: #C79A00; letter-spacing: 2px; font-size: 17px; }
.row__stars.is-low, .op__stars.is-low { color: var(--bad); }
.op__stars.is-small { font-size: 14px; letter-spacing: 1px; }
.row__comment { color: #2b2620; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.row__body { display: grid; gap: 8px; min-width: 0; }
.row__status { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; font-size: 13px; }
.row__issue { display: inline-flex; gap: 6px; align-items: center; color: var(--muted-l); }
.row__status small { color: var(--muted-l); }
.row__flags { display: inline-flex; gap: 6px; }
.row__actions { display: flex; gap: 8px; flex-wrap: wrap; padding: 0 20px 16px; }
.row__actions form { margin: 0; }
@media (min-width: 980px) {
  .row { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
  .row__main { grid-template-columns: 200px minmax(0, 1fr) 220px; align-items: start; padding: 18px 20px; gap: 22px; }
  .row__status { flex-direction: column; align-items: flex-start; }
  .row__actions { padding: 18px 20px 18px 0; flex-direction: column; align-items: stretch; }
}

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font-size: 12.5px; font-weight: 620; padding: 4px 10px; border-radius: 999px; background: var(--cream); border: 1px solid var(--cream-3); }
.chip--issue { background: #E8F1FC; border-color: #C9DDF5; color: var(--blue-ink); }

.badge--review-pending { background: #FFF3C4; color: #6B5200; }
.badge--review-attention, .badge--issue-attention { background: #FBE9E7; color: var(--bad); }
.badge--review-approved, .badge--issue-resolved { background: #E6F2EA; color: var(--ok); }
.badge--review-hidden { background: var(--cream-2); color: var(--muted-l); }
.badge--issue-followup { background: #E8F1FC; color: var(--blue-ink); }

/* Detalle */
.back { display: inline-block; margin-bottom: 18px; font-weight: 620; text-decoration: none; color: var(--muted-l); }
.back:hover { color: var(--ink); }
.detail { display: grid; gap: 16px; }
@media (min-width: 1000px) { .detail { grid-template-columns: minmax(0, 1fr) 400px; align-items: start; } .side { position: sticky; top: 90px; } }
.side { display: grid; gap: 16px; }
.op { display: grid; gap: 18px; }
.op__head { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.op__kicker { font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted-l); }
.op__name { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 790; letter-spacing: -.04em; line-height: 1.05; margin: 4px 0; }
.op__badges { display: grid; gap: 6px; justify-items: end; align-content: start; }
.op__badges small { color: var(--muted-l); }
.op__comment { font-size: 1.12rem; line-height: 1.5; }
.op__photo { width: 220px; max-width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 14px; cursor: zoom-in; }
.meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px 20px; margin: 0; padding: 16px 0; border-top: 1px solid var(--cream-line); border-bottom: 1px solid var(--cream-line); }
.meta div { display: grid; gap: 2px; }
.meta dt { font-size: 11.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted-l); }
.meta dd { margin: 0; font-weight: 560; }
.history { background: var(--cream); border-radius: 14px; padding: 14px 16px; display: grid; gap: 4px; font-size: 14.5px; }
.block { display: grid; gap: 12px; padding-top: 6px; }
.block h2 { font-size: 1.1rem; font-weight: 740; letter-spacing: -.02em; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.actions form { margin: 0; }
.stack { display: grid; gap: 10px; margin: 0; }
.hint { font-size: 13.5px; color: var(--muted-l); }
.sub summary { cursor: pointer; font-weight: 650; font-size: 14.5px; padding: 6px 0; }
.sub .stack { margin-top: 10px; }
.danger summary { color: var(--muted-l); }
.side__h { font-size: 1.1rem; font-weight: 740; letter-spacing: -.02em; margin-bottom: 4px; }
.side__h3 { font-size: 1rem; font-weight: 720; }
.card > .stack, .card > form { margin-top: 12px; }
.btn--wa { background: #1F9D55; color: #fff; }
.btn--wa:hover { background: #17834A; }

.issue { display: grid; gap: 14px; border-top: 5px solid var(--bad); }
.issue--followup { border-top-color: var(--blue-ink); }
.issue--resolved { border-top-color: var(--ok); }
.issue__type { font-size: 1.4rem; font-weight: 780; letter-spacing: -.03em; }
.issue__desc { font-family: var(--f-serif); font-style: italic; font-size: 1.1rem; }
.issue .meta { grid-template-columns: 1fr 1fr; }
.steps3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 0; }
.steps3__b {
  display: grid; justify-items: center; gap: 4px; padding: 10px 6px; border-radius: 12px; cursor: pointer;
  background: var(--cream); border: 1.5px solid var(--cream-3); font: 620 12.5px/1.2 var(--f-display); color: var(--muted-l); text-align: center;
}
.steps3__b span { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: #fff; font-weight: 750; }
.steps3__b:hover { border-color: var(--ink); color: var(--ink); }
.steps3__b.is-past { color: var(--ink); }
.steps3__b.is-past span { background: var(--ink); color: var(--gold); }
.steps3__b.is-on { background: var(--ink); border-color: var(--ink); color: var(--cream); }
.steps3__b.is-on span { background: var(--gold); color: var(--ink); }

.timeline { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 0; }
.timeline li { position: relative; padding: 0 0 14px 18px; border-left: 2px solid var(--cream-3); }
.timeline li::before { content: ""; position: absolute; left: -6px; top: 5px; width: 10px; height: 10px; border-radius: 50%; background: var(--ink); }
.timeline li.is-sys::before { background: var(--cream-3); }
.timeline li.is-sys p { color: var(--muted-l); font-size: 14px; }
.timeline small { color: var(--muted-l); font-size: 12px; }

/* ==================== Panel: Fotos del sitio ==================== */
.media-intro { color: var(--muted-l); margin: -8px 0 28px; max-width: 70ch; }
.media-intro strong { color: var(--ink); }
.media-sec { margin-bottom: 34px; }
.media-sec__h { font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted-l); margin-bottom: 12px; }
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 14px; }
.mcard .badge { white-space: nowrap; flex: none; }
.mcard { background: #fff; border-radius: 18px; overflow: hidden; display: grid; grid-template-rows: auto 1fr; min-width: 0; scroll-margin-top: 90px; transition: box-shadow .2s; }
.mcard:target { box-shadow: 0 0 0 3px var(--gold); }
.mcard__thumb { display: block; aspect-ratio: var(--r, 1); max-height: 200px; width: 100%; background: #2A2119; position: relative; overflow: hidden; }
.mcard__thumb::before { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(135deg, rgba(246, 207, 28, .08) 0 1px, transparent 1px 12px); }
.mcard__thumb img { position: relative; width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.mcard__thumb:hover img { transform: scale(1.04); }
.mcard__thumb--logo { background: var(--ink); }
.mcard__thumb--logo img { object-fit: contain; padding: 18%; }
.mcard__empty { position: absolute; inset: 0; display: grid; place-items: center; color: var(--cream); font-size: 13px; font-weight: 650; letter-spacing: .1em; text-transform: uppercase; opacity: .7; }
.mcard__body { padding: 16px 18px 18px; display: grid; gap: 8px; align-content: start; }
.mcard__top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.mcard__top h3 { font-size: 1.02rem; font-weight: 720; letter-spacing: -.02em; line-height: 1.2; }
.mcard__spec { font-size: 13px; color: var(--muted-l); }
.mcard__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }

.media-edit { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
@media (min-width: 1000px) { .media-edit { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); align-items: start; } }
.spec { display: grid; gap: 14px; }
.spec__list { display: grid; gap: 10px; margin: 0; }
.spec__list div { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 10px; padding-bottom: 10px; border-bottom: 1px solid var(--cream-line); }
.spec__list dt { font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted-l); padding-top: 2px; }
.spec__list dd { margin: 0; }
@media (max-width: 520px) { .spec__list div { grid-template-columns: minmax(0, 1fr); gap: 2px; } }
.spec__desc { font-family: var(--f-serif); font-style: italic; font-size: 1.08rem; line-height: 1.45; }
.current { display: grid; gap: 10px; padding-top: 8px; border-top: 1px solid var(--cream-line); }
.current__img { width: 100%; max-width: 260px; border-radius: 12px; background: #2A2119; }
.current__img--logo { max-width: 120px; background: var(--ink); padding: 10px; border-radius: 50%; }
.current form { margin: 0; }

.upload { display: grid; gap: 16px; }
.drop { position: relative; display: grid; justify-items: center; gap: 6px; padding: 26px 18px; border: 2px dashed var(--cream-3); border-radius: 16px; background: var(--cream); text-align: center; cursor: pointer; transition: border-color .2s, background-color .2s; }
.drop:hover, .drop.is-over { border-color: var(--ink); background: #FFF8DC; }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.drop__icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--ink); color: var(--gold); }
.drop strong { font-size: 1rem; overflow-wrap: anywhere; }
.drop small { color: var(--muted-l); font-size: 13px; }

.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.checks__i { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 8px; padding: 10px 12px; border-radius: 10px; font-size: 14px; line-height: 1.4; }
.checks__i::before { font-weight: 800; }
.checks__i--ok { background: #E6F2EA; color: var(--ok); }
.checks__i--ok::before { content: "✓"; }
.checks__i--warn { background: #FFF3C4; color: #6B5200; }
.checks__i--warn::before { content: "!"; }
.checks__i--bad { background: #FBE9E7; color: var(--bad); }
.checks__i--bad::before { content: "✕"; }

.previews__row { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-end; margin-top: 8px; }
.frame { margin: 0; flex: 1 1 160px; max-width: 100%; display: grid; gap: 6px; justify-items: center; }
.frame__box { position: relative; width: var(--fw, 100%); max-width: 100%; aspect-ratio: var(--r); background: #2A2119; border-radius: 10px; overflow: hidden; box-shadow: 0 10px 30px -18px rgba(13, 11, 9, .6); }
.frame__box img { width: 100%; height: 100%; object-fit: cover; display: block; }
.frame--circle .frame__box { border-radius: 50%; max-width: 180px; }
.frame--logo .frame__box { background: var(--ink); }
.frame--logo .frame__box img { object-fit: contain; }
.frame__empty { position: absolute; inset: 0; display: grid; place-items: center; color: var(--cream); font-size: 12px; font-weight: 650; letter-spacing: .1em; text-transform: uppercase; opacity: .6; }
.frame figcaption { font-size: 12px; font-weight: 650; color: var(--muted-l); }
.upload .btn[disabled] { opacity: .4; cursor: not-allowed; }

/* ==================== Pedido en línea (/pedir) ==================== */
.btn--xl { height: 60px; padding: 0 30px; font-size: 18px; }
.ord { max-width: 1060px; margin: 0 auto; padding: 32px 16px 80px; }
.ord-head { margin-bottom: 26px; }
.ord-head h1 { font-size: clamp(2.1rem, 7vw, 3.4rem); line-height: .98; font-weight: 790; letter-spacing: -.045em; }
.ord-head h1 em { font-weight: 360; }
.ord-kicker { font-size: 12px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--muted-l); margin-bottom: 10px; }
.ord-cols { display: grid; gap: 18px; grid-template-columns: minmax(0, 1fr); }
.ord-fields { display: grid; gap: 14px; min-width: 0; }
.ord-step { background: #fff; border-radius: 18px; padding: 20px 18px; display: grid; gap: 12px; min-width: 0; }
.ord-step h2 { font-size: 1.15rem; font-weight: 740; letter-spacing: -.02em; }
.ord-err { color: var(--bad); font-size: 14px; font-weight: 600; }
.ord-note { font-size: 15px; color: #2b2620; }

.ord-qty { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.ord-qty__price { text-align: right; font-size: 15px; color: var(--muted-l); line-height: 1.35; }
.ord-qty__price strong { color: var(--ink); font-size: 1.15rem; }
.stepper { display: inline-flex; align-items: center; border: 1.5px solid var(--cream-3); border-radius: 999px; background: var(--cream); padding: 4px; }
.stepper__b { width: 48px; height: 48px; border-radius: 50%; border: 0; background: var(--ink); color: var(--cream); font: 500 26px/1 var(--f-display); cursor: pointer; display: grid; place-items: center; transition: background-color .2s, transform .2s var(--ease); }
.stepper__b:hover { background: var(--gold); color: var(--ink); }
.stepper__b:active { transform: scale(.92); }
.stepper__n { width: 64px; text-align: center; border: 0; background: transparent; font: 760 26px/1 var(--f-display); color: var(--ink); -moz-appearance: textfield; }
.stepper__n::-webkit-outer-spin-button, .stepper__n::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.stepper__n:focus { outline: none; }

.datechips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 8px; margin: 0 -2px; scrollbar-width: thin; scroll-snap-type: x proximity; }
.datechip { flex: none; position: relative; scroll-snap-align: start; cursor: pointer; }
.datechip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.datechip span { display: grid; justify-items: center; gap: 2px; width: 64px; padding: 10px 4px; border-radius: 14px; border: 1.5px solid var(--cream-3); background: #fff; transition: background-color .2s, border-color .2s, color .2s, transform .25s var(--ease); }
.datechip small { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted-l); }
.datechip b { font-size: 1.5rem; font-weight: 780; letter-spacing: -.03em; line-height: 1; }
.datechip:hover span { border-color: var(--ink); }
.datechip input:checked + span { background: var(--ink); border-color: var(--ink); color: var(--cream); }
.datechip input:checked + span small { color: var(--gold); }
.datechip input:focus-visible + span { outline: 2px solid var(--blue); outline-offset: 2px; }
.datechip input:active + span { transform: scale(.95); }

.segmented { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 5px; border-radius: 16px; background: var(--cream); border: 1.5px solid var(--cream-3); }
.segmented label { position: relative; cursor: pointer; }
.segmented input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.segmented span { display: grid; place-items: center; min-height: 48px; border-radius: 12px; font-weight: 680; transition: background-color .2s, color .2s; }
.segmented input:checked + span { background: var(--ink); color: var(--gold); }
.segmented input:focus-visible + span { outline: 2px solid var(--blue); outline-offset: 2px; }
.ord-zone { display: grid; gap: 8px; }
.ord-pair { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }

.ord-sum { background: var(--ink); color: var(--cream); border-radius: 20px; padding: 22px 20px; display: grid; gap: 14px; }
.ord-sum h2 { font-size: 12px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); }
.ord-sum ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.ord-sum li { font-size: 1.05rem; font-weight: 600; }
.ord-sum li:first-child { font-family: var(--f-serif); font-style: italic; font-weight: 400; font-size: 1.35rem; }
.ord-sum li.is-empty { color: var(--muted-d); font-weight: 500; }
.ord-sum__lines { margin: 0; display: grid; gap: 6px; padding-top: 12px; border-top: 1px solid var(--ink-line); }
.ord-sum__lines div { display: flex; justify-content: space-between; gap: 12px; font-size: 15px; color: var(--muted-d); }
.ord-sum__lines dd { margin: 0; color: var(--cream); font-weight: 600; }
.ord-sum__total { font-size: 1.15rem; padding-top: 12px; border-top: 1px solid var(--ink-line); }
.ord-sum__total strong { font-size: 1.7rem; font-weight: 790; letter-spacing: -.03em; color: var(--gold); }
.ord-sum__total small { color: var(--muted-d); font-size: 13px; }
.ord-sum .hint { color: var(--muted-d); }
.ord-cta { width: 100%; white-space: normal; text-align: center; line-height: 1.15; height: auto; min-height: 60px; padding: 12px 18px; }
.ord-aside, .ord-sum, .ord-sum__lines div { min-width: 0; }
.ord-sum__lines dd { text-align: right; }
@media (max-width: 400px) { .ord-qty__price { text-align: left; } .ord-sum { padding: 20px 16px; } .ord-cta { font-size: 16.5px; } }
.ord-cta[disabled] { opacity: .65; cursor: progress; }

.ord-done { display: grid; gap: 18px; justify-items: start; max-width: 620px; margin: 0 auto; padding-top: 10px; }
.ord-done .done__icon { margin: 0; background: var(--ok); color: #fff; width: 72px; height: 72px; font-size: 34px; }
.ord-done h1 { font-size: clamp(2.2rem, 8vw, 3.4rem); line-height: .98; font-weight: 790; letter-spacing: -.045em; }
.ord-done h1 em { font-weight: 360; }
.ord-done__lede { font-size: 1.1rem; color: var(--muted-l); max-width: 44ch; }
.ord-wa { width: 100%; max-width: 420px; white-space: normal; height: auto; min-height: 60px; padding: 12px 18px; }
.ord-done .ord-sum { width: 100%; }
.ord-done__hint { margin-top: -8px; }
.ord-back { color: var(--muted-l); font-weight: 600; text-decoration: none; }
.ord-back:hover { color: var(--ink); }

@media (min-width: 640px) { .ord-pair { grid-template-columns: repeat(2, minmax(0, 1fr)); } .ord-step { padding: 24px; } }
@media (min-width: 900px) {
  .ord { padding-top: 48px; }
  .ord-cols { grid-template-columns: minmax(0, 1fr) 360px; align-items: start; gap: 22px; }
  .ord-aside { position: sticky; top: 20px; }
  .datechips { flex-wrap: wrap; overflow: visible; }
}

/* Interruptor (Información del negocio) */
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 600; position: relative; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch__track { width: 46px; height: 26px; border-radius: 999px; background: var(--cream-3); position: relative; transition: background-color .2s; flex: none; }
.switch__track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .25s var(--ease); }
.switch input:checked + .switch__track { background: var(--ok); }
.switch input:checked + .switch__track::after { transform: translateX(20px); }
.switch input:focus-visible + .switch__track { outline: 2px solid var(--blue); outline-offset: 2px; }

/* ==================== Panel: Pedidos ==================== */
.pn-headrow { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.pn-headrow .pn-h1 { margin-bottom: 6px; }
.pn-sub { color: var(--muted-l); display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.pn-badge { margin-left: auto; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px; display: inline-grid; place-items: center; background: var(--bad); color: #fff; font-size: 12px; font-weight: 800; line-height: 1; }
.pn-link.is-on .pn-badge { background: var(--ink); color: var(--gold); }
@media (min-width: 900px) { .menu-collapsed .pn-badge { position: absolute; top: 3px; right: 6px; min-width: 18px; height: 18px; font-size: 10.5px; padding: 0 5px; } }

.search { display: flex; gap: 8px; align-items: center; margin: -8px 0 18px; flex-wrap: wrap; }
.search .input { flex: 1 1 240px; min-width: 0; padding: 10px 14px; font-size: 15px; }
.search__clear { font-size: 14px; color: var(--muted-l); }
.ord-list { padding: 8px 20px; }
.ord-num { font-weight: 780; font-size: 1.05rem; text-decoration: none; }
.ord-num:hover { text-decoration: underline; }
.ord-list tr.is-new td:first-child { box-shadow: inset 4px 0 0 var(--bad); padding-left: 12px; }
.ocards { display: none; }
.ocard { display: grid; gap: 4px; justify-items: start; padding: 14px 16px; border-radius: 16px; background: #fff; text-decoration: none; border: 1.5px solid transparent; transition: border-color .2s; }
.ocard:hover, .ocard:focus-visible { border-color: var(--ink); }
.ocard.is-new { box-shadow: inset 4px 0 0 var(--bad); }
.ocard__top { display: flex; justify-content: space-between; align-items: center; gap: 10px; width: 100%; }
.ocard__top strong { font-size: 1.05rem; font-weight: 790; }
.ocard__name { font-size: 1.05rem; font-weight: 700; letter-spacing: -.01em; }
.ocard__line { font-size: 14.5px; color: #2b2620; }
.ocard__line b { font-weight: 750; }
.ocard .badge { margin-top: 4px; }
@media (max-width: 700px) { .ord-list { display: none; } .ocards { display: grid; gap: 10px; } }

.badge--order-new { background: #FBE9E7; color: var(--bad); }
.badge--order-confirmed { background: #E8F1FC; color: var(--blue-ink); }
.badge--order-preparing { background: #FFF3C4; color: #6B5200; }
.badge--order-ready { background: #F3E8FF; color: #6B3FA0; }
.badge--order-delivered { background: #E6F2EA; color: var(--ok); }
.badge--order-cancelled { background: var(--cream-2); color: var(--muted-l); text-decoration: line-through; }
.badge--pay-pending { background: #fff; color: var(--muted-l); box-shadow: inset 0 0 0 1px var(--cream-3); }
.badge--pay-paid { background: #E6F2EA; color: var(--ok); }

.confirm-card { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; padding: 18px 20px; border-radius: 18px; background: #E6F2EA; border: 1.5px solid #BFDCC9; }
.confirm-card strong { font-size: 1.1rem; }
.confirm-card .btn { flex: 0 0 auto; }
@media (max-width: 520px) { .confirm-card .btn { width: 100%; } }

.statusbar { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.statusbar__b, .statusbar__cancel {
  display: inline-flex; align-items: center; gap: 7px; min-height: 42px; padding: 8px 14px; border-radius: 999px; cursor: pointer;
  background: #fff; border: 1.5px solid var(--cream-3); font: 650 14px var(--f-display); color: var(--muted-l);
}
.statusbar__b span { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--cream); font-size: 12px; font-weight: 800; }
.statusbar__b:hover, .statusbar__cancel:hover { border-color: var(--ink); color: var(--ink); }
.statusbar__b.is-past { color: var(--ink); }
.statusbar__b.is-past span { background: var(--ink); color: var(--gold); }
.statusbar__b.is-on { background: var(--ink); border-color: var(--ink); color: var(--cream); }
.statusbar__b.is-on span { background: var(--gold); color: var(--ink); }
.statusbar__cancel { margin-left: auto; color: var(--bad); border-color: #F0C9C4; background: transparent; }
.statusbar__cancel.is-on { background: var(--cream-2); color: var(--muted-l); border-color: var(--cream-3); cursor: default; }
@media (max-width: 700px) { .statusbar__b { flex: 1 1 calc(50% - 6px); justify-content: center; } .statusbar__cancel { flex: 1 1 100%; justify-content: center; margin-left: 0; } }

.ord-detail { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); margin-top: 16px; }
.ord-detail__main { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); align-content: start; }
.ord-detail__side { display: grid; gap: 14px; align-content: start; min-width: 0; }
@media (min-width: 760px) { .ord-detail__main { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .ord-detail { grid-template-columns: minmax(0, 1fr) 380px; align-items: start; } }
.ord-card { display: grid; gap: 8px; align-content: start; min-width: 0; }
.ord-card h2 { font-size: 11.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted-l); }
.ord-card__big { font-size: 1.3rem; font-weight: 750; letter-spacing: -.02em; line-height: 1.2; }
.ord-card .btn { justify-self: start; }
.ord-card form { margin: 0; }
.ord-lines { margin: 0; display: grid; gap: 6px; }
.ord-lines div { display: flex; justify-content: space-between; gap: 12px; font-size: 15px; }
.ord-lines dt { color: var(--muted-l); }
.ord-lines dd { margin: 0; font-weight: 650; }
.ord-lines__total { padding-top: 8px; margin-top: 4px; border-top: 1px solid var(--cream-line); }
.ord-lines__total dt { color: var(--ink); font-weight: 700; }
.ord-lines__total dd { font-size: 1.35rem; font-weight: 790; }
.ord-edit__sum { cursor: pointer; font-weight: 700; }

/* Dirección de entrega */
.ord-card--wide { grid-column: 1 / -1; }
.addr { gap: 12px; }
.addr__head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.addr__empty { padding: 12px 14px; border-radius: 12px; background: #FFF3C4; color: #6B5200; font-size: 14.5px; }
.addr__grid { display: grid; gap: 10px 20px; grid-template-columns: minmax(0, 1fr); margin: 0; }
.addr__grid > div { display: grid; gap: 2px; min-width: 0; }
.addr__grid dt { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted-l); }
.addr__grid dd { margin: 0; overflow-wrap: anywhere; }
@media (min-width: 640px) { .addr__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .addr__main { grid-column: 1 / -1; } }
.addr__code { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font: 700 1.1rem/1.2 ui-monospace, Consolas, monospace; letter-spacing: .08em; }
.addr__maps { justify-self: start; }
.addr__edit summary { cursor: pointer; font-weight: 700; padding: 4px 0; }
.addr__edit form { margin-top: 12px; }
.addr__clear { margin-top: 6px; font-size: 14px; }
.addr-flag { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #6B5200; background: #FFF3C4; border-radius: 999px; padding: 2px 8px; }
.ord-calc { font-size: 1.05rem; padding: 12px 0 4px; }
.ord-calc strong { font-size: 1.3rem; }

/* ==================== Panel: Información del negocio ==================== */
.badge--review-followup { background: #E8F1FC; color: var(--blue-ink); }
.info-intro { display: grid; gap: 8px; margin: -8px 0 24px; max-width: 760px; }
.info-intro > p:first-child { color: var(--muted-l); }
.info-intro strong { color: var(--ink); }
.info-progress { height: 8px; border-radius: 99px; background: var(--cream-2); overflow: hidden; }
.info-progress span { display: block; height: 100%; border-radius: inherit; background: var(--gold); transition: width .6s var(--ease); }
.info-form { display: grid; gap: 16px; padding-bottom: 90px; }
.info-group { display: grid; gap: 18px; scroll-margin-top: 90px; }
.info-group__head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; }
.info-group__head h2 { font-size: 1.25rem; font-weight: 750; letter-spacing: -.02em; margin-bottom: 2px; }
.info-group__count { flex: none; font-size: 13px; font-weight: 750; padding: 5px 11px; border-radius: 999px; background: #FFF3C4; color: #6B5200; }
.info-group__count.is-done { background: #E6F2EA; color: var(--ok); }
.info-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px 20px; }
@media (min-width: 820px) { .info-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .info-field--wide { grid-column: 1 / -1; } }
.info-field { display: grid; gap: 7px; align-content: start; min-width: 0; }
.info-field__top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.info-field__top label { font-size: 14.5px; font-weight: 680; }
.info-field__top .badge { flex: none; white-space: nowrap; font-size: 10px; }
.info-field.has-error .input, .info-field.has-error .textarea, .info-field.has-error .phone-group { border-color: var(--bad); }
.info-error { color: var(--bad); font-size: 13.5px; font-weight: 600; }
.info-where { font-size: 12.5px; color: var(--muted-l); }
.info-where a { color: var(--blue-ink); }
.info-link { font-size: 12.5px; color: var(--blue-ink); overflow-wrap: anywhere; min-height: 0; }
.info-link:empty { display: none; }
.info-link.is-bad { color: var(--bad); }
.info-row { display: flex; gap: 8px; align-items: center; min-width: 0; }
.info-row > .input, .info-row > .phone-group { flex: 1; min-width: 0; }
.info-row .btn { flex: none; height: 46px; }
.prefix-group { display: flex; align-items: stretch; border: 1.5px solid var(--cream-3); border-radius: 12px; background: #fff; overflow: hidden; }
.prefix-group:focus-within { border-color: var(--ink); box-shadow: 0 0 0 4px rgba(246, 207, 28, .45); }
.prefix-group > span { display: grid; place-items: center; padding: 0 14px; background: var(--cream); border-right: 1.5px solid var(--cream-3); font-weight: 700; }
.prefix-group .input { border: 0; border-radius: 0; box-shadow: none; min-width: 0; }
.savebar {
  position: sticky; bottom: 0; z-index: 8; display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap;
  margin: 0 -4px; padding: 14px 18px; border-radius: 16px 16px 0 0; background: rgba(243, 237, 225, .94);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); box-shadow: 0 -10px 30px -18px rgba(13, 11, 9, .35);
}
.savebar .hint.is-dirty { color: #6B5200; font-weight: 650; }
@media (max-width: 520px) { .savebar .btn { width: 100%; } }

@media print {
  .pn-top, .pn-side, .no-print { display: none !important; }
  .pn-shell { display: block; }
  .panel { background: #fff; }
  .pn-main { padding: 0; max-width: none; }
  .qr-sheet { grid-template-columns: repeat(3, 1fr); gap: 8mm; }
}
