/* Panel del dueño: reservas, eventos y opiniones.


   La misma hoja sirve a las dos versiones (restaurante la carga con ../), así
   que los colores de marca van con tokens. Quedan tres familias de #hex a
   propósito, y son las mismas que usa styles.css:
     - el texto sobre fondo oscuro (#F3EFE8, #fff, #CFC8BE), que es la
       convención de .on-dark;
     - los colores de estado de una reserva (verde confirmada, gris cancelada,
       rojo no vino): significan algo y no cambian con la marca;
     - el verde de WhatsApp, que es de WhatsApp.
   El amarillo de "Ejemplo" lo define styles.css, no esta hoja. */

.panel-page { background: var(--fondo-2); min-height: 70vh; padding-bottom: 72px; }

/* Aviso del panel. No repite el amarillo de la cinta de arriba: son dos
   mensajes distintos y dos barras chillonas seguidas se leen como una sola. */
.panel-aviso {
  background: var(--fondo); color: var(--ink-2); font-size: 14px;
  padding: 12px 24px; border-bottom: 1px solid var(--line);
  text-align: center;
}
/* Un párrafo de verdad, no un flex: con flex, en el celular cada trozo de
   texto y cada link caían en su propia línea centrada y el aviso se comía
   media pantalla. */
.panel-aviso-txt { max-width: 78ch; margin: 0 auto; line-height: 1.5; }
/* Sin bajar el mínimo de 44 px que fija styles.css: este botón lo toca el
   dueño con el pulgar igual que los de la lista. */
.panel-aviso .btn { margin-top: 10px; padding: 4px 16px; font-size: 13.5px; }

.panel-wrap { padding-top: 36px; }
.panel-top { display: flex; justify-content: space-between; align-items: end; gap: 20px; flex-wrap: wrap; margin-bottom: 26px; }
.panel-top h1 { font-size: clamp(32px, 4vw, 46px); margin-top: 10px; }
.tabs { display: inline-flex; max-width: 100%; overflow-x: auto; background: var(--surface); border-radius: var(--pill); padding: 5px; box-shadow: var(--shadow-sm); }
.tabs button { flex: none; border: 0; background: transparent; border-radius: var(--pill); padding: 10px 20px; font-weight: 700; display: inline-flex; gap: 8px; align-items: center; }
.tabs button[aria-selected="true"] { background: var(--oscuro); color: #fff; }
.tab-n { background: var(--acento); color: var(--acento-ink); border-radius: var(--pill); font-size: 12px; min-width: 22px; padding: 1px 7px; }

/* Tira de días */
.dias { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 12px; scrollbar-width: thin; }
.dia { flex: none; width: 76px; border: 1.5px solid transparent; background: var(--surface); border-radius: 14px; padding: 10px 6px; display: grid; justify-items: center; gap: 2px; position: relative; box-shadow: var(--shadow-sm); }
.dia small { font-size: 12px; text-transform: capitalize; color: var(--muted); font-weight: 600; }
.dia b { font-family: var(--font-display); font-size: 24px; line-height: 1.1; }
.dia-cub { font-size: 12px; color: var(--muted); }
.dia.on { background: var(--oscuro); color: #fff; }
.dia.on small, .dia.on .dia-cub { color: var(--acento); }
/* Un día que el local cierra: se ve apagado, pero se puede abrir igual. */
.dia.cerrado { background: var(--fondo); box-shadow: none; }
.dia.cerrado b, .dia.cerrado small { opacity: .5; }
.dia.cerrado .dia-cub { font-weight: 700; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; }
.dia.cerrado.on { background: var(--oscuro); }
.dia.cerrado.on b, .dia.cerrado.on small { opacity: .75; }
.dot-ev, .dot-pend { position: absolute; top: 7px; width: 8px; height: 8px; border-radius: 50%; }
.dot-ev { right: 8px; background: var(--acento); }
.dot-pend { left: 8px; background: var(--rojo); }

/* Cabecera del día elegido */
.dia-panel { display: grid; grid-template-columns: 1.3fr 1fr; gap: 24px; background: var(--oscuro); color: #F3EFE8; border-radius: var(--r-lg); padding: 24px 26px; margin: 14px 0 18px; align-items: center; }
.dia-panel h2 { color: #fff; font-size: 26px; text-transform: none; }
.dia-panel h2::first-letter { text-transform: uppercase; }
.dia-panel-ev { margin-top: 10px; color: #CFC8BE; line-height: 2; }
.ocu-num { font-size: 15px; color: #CFC8BE; }
.ocu-num strong { font-family: var(--font-display); font-size: 34px; color: #fff; }
.ocu-bar { height: 10px; border-radius: 6px; background: var(--oscuro-3); overflow: hidden; margin-top: 8px; }
.ocu-bar span { display: block; height: 100%; background: var(--verde); border-radius: 6px; transition: width 400ms ease; }
.ocu-bar.alto span { background: var(--acento); }
.ocu-bar.lleno span { background: var(--rojo); }
.ocu-alerta { margin-top: 8px; font-weight: 700; color: var(--acento); font-size: 14px; }
.ocu-nota { margin-top: 6px; font-size: 12.5px; color: color-mix(in srgb, #CFC8BE 65%, var(--oscuro)); }

.filtros { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.filtro { border: 1.5px solid var(--line); background: var(--surface); border-radius: var(--pill); padding: 7px 14px; font-weight: 600; font-size: 14px; }
.filtro[aria-pressed="true"] { background: var(--acento); border-color: var(--acento); color: var(--acento-ink); }

/* Lista de reservas */
.res-lista { display: grid; gap: 10px; }
.res-item { display: grid; grid-template-columns: 72px 1fr auto; gap: 18px; align-items: center; background: var(--surface); border-radius: var(--r); padding: 16px 18px; box-shadow: var(--shadow-sm); border-left: 5px solid var(--acento); }
.res-item.est-confirmada { border-left-color: var(--verde); }
.res-item.est-llego { border-left-color: var(--oscuro); opacity: .75; }
.res-item.est-cancelada, .res-item.est-noshow { border-left-color: #BDB6AD; opacity: .6; }
.ri-hora { font-family: var(--font-display); font-weight: var(--h-weight); font-size: 24px; }
.ri-top strong { font-size: 16.5px; }
.ri-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13.5px; color: var(--muted); margin-top: 4px; align-items: center; }
.ri-pers { font-weight: 800; color: var(--ink); }
.estado { font-weight: 700; font-size: 12px; padding: 2px 9px; border-radius: var(--pill); background: #FBEFC9; color: #7A5200; }
.estado.est-confirmada { background: #E1F2E7; color: #1E5A36; }
.estado.est-llego { background: #E7E7E7; color: #222; }
.estado.est-cancelada, .estado.est-noshow { background: #F3E3DF; color: #8A2A14; }
.ri-nota { font-size: 14px; color: var(--ink-2); margin-top: 6px; font-style: italic; }
.ri-alerta { font-size: 13px; font-weight: 700; color: var(--rojo); margin-top: 4px; }
.ri-acc { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.btn-wa { background: #25D366; color: #073B1E; }
.btn-wa:hover { background: #3BE07A; }
.btn-link { background: transparent; color: var(--muted); padding-inline: 10px; }
.btn-link:hover { color: var(--ink); background: rgba(0, 0, 0, .05); }
.res-vacio { background: var(--surface); border-radius: var(--r); padding: 28px; text-align: center; color: var(--muted); }

.carga-manual { margin-top: 18px; background: var(--surface); border-radius: var(--r); padding: 4px 18px; box-shadow: var(--shadow-sm); }
.carga-manual summary { cursor: pointer; font-weight: 700; padding: 14px 0; }
.manual-form { display: grid; grid-template-columns: 2fr 1.5fr 1fr .8fr 1.2fr auto; gap: 12px; align-items: end; padding-bottom: 18px; }

/* Eventos */
.ag-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 24px; align-items: start; }
.ag-form, .ag-lista-wrap { background: var(--surface); border-radius: var(--r-lg); padding: 26px; box-shadow: var(--shadow-sm); }
.ag-form { display: grid; gap: 16px; }
.ag-form h2, .ag-lista-wrap h2 { font-size: 24px; }
.ag-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.opt { font-weight: 400; color: var(--muted); }
.hint { font-size: 14px; color: var(--muted); margin-top: -8px; }
.ag-lista { margin-top: 14px; max-height: 620px; overflow-y: auto; }
.ag-item { display: grid; grid-template-columns: 52px 1fr auto; gap: 14px; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--line); }
.ag-item.pasado { opacity: .5; }
.ag-fecha { background: var(--oscuro); color: #fff; border-radius: 10px; text-align: center; padding: 6px 0; line-height: 1; }
.ag-fecha b { display: block; font-family: var(--font-display); font-size: 20px; }
.ag-fecha small { font-size: 11px; color: var(--acento); text-transform: uppercase; }
.ag-meta { font-size: 13px; color: var(--muted); margin-top: 3px; }

@media (max-width: 980px) {
  .manual-form { grid-template-columns: 1fr 1fr; }
  .ag-grid { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  /* Que las tres pestañas entren sin scroll lateral: si no, el globito de
     "Opiniones" queda cortado contra el borde y parece un error. */
  .tabs { display: flex; width: 100%; }
  .tabs button { flex: 1 1 auto; justify-content: center; padding: 10px 8px; font-size: 14.5px; }
  .dia-panel { grid-template-columns: 1fr; }
  .res-item { grid-template-columns: 56px 1fr; }
  .ri-acc { grid-column: 1 / -1; justify-content: flex-start; }
  .panel-top { align-items: start; }
}

/* ---------- Opiniones ---------- */
.tab-n-alerta { background: var(--rojo); color: #fff; }
.op-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 24px; }
.kpi { background: var(--surface); border-radius: var(--r); padding: 16px 18px; box-shadow: var(--shadow-sm); display: grid; gap: 2px; }
.kpi small { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.kpi b { font-family: var(--font-display); font-size: 32px; line-height: 1.1; }
.kpi.alerta { background: var(--rojo); color: #fff; }
.kpi.alerta small { color: #FFE0D8; }
.op-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 24px; align-items: start; }
.op-h { font-size: 22px; margin: 6px 0 8px; }
.op-grid .hint { margin: 0 0 14px; }
.op-lista { display: grid; gap: 10px; margin-bottom: 28px; }
.op-item { background: var(--surface); border-radius: var(--r); padding: 16px 18px; box-shadow: var(--shadow-sm); border-left: 5px solid var(--verde); display: grid; gap: 8px; }
.op-item.mala { border-left-color: var(--rojo); }
.op-item.resuelta { opacity: .65; border-left-color: #BDB6AD; }
.op-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.op-fecha { margin-left: auto; font-size: 13px; color: var(--muted); }
.op-notas { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13.5px; color: var(--ink-2); align-items: center; }
.op-com { font-style: italic; color: var(--ink-2); }
.op-platos-lista { display: grid; gap: 4px; font-size: 14px; color: var(--ink-2); }
.op-acc { justify-content: flex-start; }
.op-sintel { font-size: 13px; color: var(--muted); align-self: center; }
/* Cuando alguien puntuó un producto y no contestó atención ni experiencia. */
.op-sindato { font-size: 13px; color: var(--muted); font-style: italic; }
.op-platos { background: var(--surface); border-radius: var(--r-lg); padding: 22px; box-shadow: var(--shadow-sm); position: sticky; top: calc(var(--header-h) + 16px); }
.op-platos ol { display: grid; gap: 2px; margin: 8px 0 12px; }
.op-platos li { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.op-platos li a { font-weight: 600; text-decoration: none; }
.op-platos li a:hover { text-decoration: underline; }
.op-platos li span { white-space: nowrap; color: var(--muted); font-size: 13px; }
.op-platos li.bajo a { color: var(--rojo); }
@media (max-width: 900px) { .op-grid { grid-template-columns: 1fr; } .op-platos { position: static; } .op-kpis { grid-template-columns: 1fr 1fr; } }

/* ---------- Solapas: cinco ----------
   En el celular entran las cinco en una fila: texto más chico y el globito
   arriba a la derecha, como en una app. */
.tabs button { position: relative; transition: background var(--t), color var(--t); }
.tabs button:hover:not([aria-selected="true"]) { background: var(--fondo); }
@media (max-width: 700px) {
  .tabs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); width: 100%; padding: 4px; gap: 2px; overflow: visible; }
  .tabs button { padding: 11px 2px; font-size: 13px; justify-content: center; min-width: 0; }
  .tabs .tab-n { position: absolute; top: -6px; right: -2px; font-size: 11px; min-width: 20px; padding: 1px 6px; line-height: 1.5; box-shadow: 0 0 0 2px var(--fondo-2); }
  .tabs .tab-n[hidden] { display: none; }
}
@media (max-width: 370px) { .tabs button { font-size: 12px; } }

/* ---------- Hoy ---------- */
.hoy-head { margin-bottom: 16px; }
.hoy-head h2 { font-size: clamp(24px, 3vw, 32px); }
.hoy-head h2::first-letter { text-transform: uppercase; }
.hoy-bajada { color: var(--muted); margin-top: 6px; font-size: 15px; }
.hoy-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 20px; }
.hoy-kpi {
  display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto auto; column-gap: 12px; align-items: center; text-align: left;
  border: 0; background: var(--surface); border-radius: var(--r); padding: 16px 18px; box-shadow: var(--shadow-sm);
  transition: transform var(--t), box-shadow var(--t);
}
.hoy-kpi:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.hoy-kpi:active { transform: translateY(0); }
.hk-ico { grid-row: 1 / 3; width: 42px; height: 42px; border-radius: 12px; background: var(--acento-50); color: var(--oscuro); display: grid; place-items: center; }
.hk-ico svg { width: 22px; height: 22px; }
.hoy-kpi b { font-family: var(--font-display); font-weight: var(--h-weight); font-size: 34px; line-height: 1; }
.hk-t { font-weight: 700; font-size: 14.5px; line-height: 1.25; }
.hoy-kpi small { grid-column: 1 / -1; margin-top: 8px; font-size: 13px; color: var(--muted); }
.hoy-kpi.aviso .hk-ico { background: #FBEFC9; color: #7A5200; }
.hoy-kpi.alerta { background: var(--rojo); color: #fff; }
.hoy-kpi.alerta .hk-ico { background: rgba(255, 255, 255, .16); color: #fff; }
.hoy-kpi.alerta small { color: #FFE0D8; }
.hoy-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 18px; align-items: start; }
.hoy-col { display: grid; gap: 18px; }
.hoy-card { background: var(--surface); border-radius: var(--r-lg); padding: 20px 22px; box-shadow: var(--shadow-sm); }
.hoy-card h3 { font-size: 19px; margin-bottom: 10px; }
.hoy-hint { font-size: 13.5px; color: var(--muted); margin: -4px 0 10px; }
.hoy-tareas, .hoy-agenda, .hoy-feed { display: grid; gap: 2px; }
.hoy-tarea, .hoy-ag, .hoy-fd {
  width: 100%; display: grid; align-items: center; gap: 12px; text-align: left; border: 0; background: transparent;
  padding: 10px 8px; border-radius: 12px; transition: background var(--t);
}
.hoy-tarea:hover, .hoy-ag:hover, .hoy-fd:hover { background: var(--fondo); }
.hoy-tarea { grid-template-columns: 38px 1fr auto; }
.hoy-tarea b, .hoy-ag b, .hoy-fd b { display: block; font-size: 15px; line-height: 1.3; }
.hoy-tarea small, .hoy-ag small, .hoy-fd small { display: block; font-size: 13px; color: var(--muted); line-height: 1.35; margin-top: 1px; }
.ht-ico, .ha-ico, .fd-ico { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--fondo-2); color: var(--oscuro); }
.ht-ico svg, .ha-ico svg, .fd-ico svg { width: 19px; height: 19px; }
.hoy-tarea.alerta .ht-ico, .hoy-fd.mala .fd-ico { background: #F3E3DF; color: var(--rojo); }
.ht-flecha { color: var(--muted); font-weight: 700; transition: transform var(--t); }
.hoy-tarea:hover .ht-flecha { transform: translateX(3px); color: var(--ink); }
.hoy-ag { grid-template-columns: 46px 38px 1fr auto; }
.ha-h { font-family: var(--font-display); font-weight: var(--h-weight); font-size: 16px; }
.ha-enc { background: var(--acento-50); }
.ha-op { background: var(--oscuro); color: var(--acento); }
.hoy-ag .estado { white-space: nowrap; }
.hoy-fd { grid-template-columns: 38px 1fr auto; }
.fd-res { background: var(--acento-50); }
.fd-cuando { font-size: 12.5px; color: var(--muted); text-align: right; display: grid; justify-items: end; gap: 3px; white-space: nowrap; }
.hoy-vacio { display: flex; align-items: center; gap: 10px; padding: 14px 8px; color: var(--muted); }
.hoy-vacio svg { width: 20px; height: 20px; color: var(--verde); }
.hoy-como { background: var(--oscuro); color: var(--on-dark-2); }
.hoy-como h3 { color: #fff; }
.hoy-como ol { counter-reset: paso; display: grid; gap: 12px; }
.hoy-como li { counter-increment: paso; position: relative; padding-left: 40px; font-size: 14.5px; line-height: 1.45; color: var(--on-dark-3); }
.hoy-como li b { color: #fff; }
.hoy-como li::before { content: counter(paso); position: absolute; left: 0; top: 0; width: 28px; height: 28px; border-radius: 50%; background: var(--acento); color: var(--acento-ink); display: grid; place-items: center; font-weight: 800; font-size: 14px; }
.estado.est-listo { background: var(--acento-50); color: var(--ink); box-shadow: inset 0 0 0 1px var(--acento); }
.estado.est-evento { background: var(--oscuro); color: var(--acento); }
.res-item.est-listo { border-left-color: var(--oscuro); }
.ri-items { font-size: 14.5px; margin-top: 6px; font-weight: 600; }
@media (max-width: 980px) {
  .hoy-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hoy-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .hoy-kpi { padding: 14px; column-gap: 10px; }
  .hk-ico { width: 34px; height: 34px; border-radius: 10px; }
  .hk-ico svg { width: 18px; height: 18px; }
  .hoy-kpi b { font-size: 28px; }
  .hk-t { font-size: 13px; }
  .hoy-kpi small { font-size: 12px; }
  .hoy-card { padding: 16px 12px; }
  .hoy-card h3 { padding-inline: 8px; }
  .hoy-hint { padding-inline: 8px; }
  .hoy-ag { grid-template-columns: 42px 1fr auto; gap: 10px; }
  .hoy-ag .ha-ico { display: none; }
  .hoy-ag .estado { font-size: 11px; padding: 2px 7px; }
}

/* ---------- Encargues ---------- */
.enc-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: 24px; align-items: start; margin-top: 14px; }
.hoja { background: var(--surface); border-radius: var(--r-lg); padding: 22px 24px; box-shadow: var(--shadow-sm); border-top: 6px solid var(--acento); position: sticky; top: calc(var(--header-h) + 16px); }
.hoja-head { display: flex; justify-content: space-between; align-items: start; gap: 12px; }
.hoja-eyebrow { font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.hoja h2 { font-size: 22px; margin-top: 4px; }
.hoja h2::first-letter { text-transform: uppercase; }
.hoja-hint { font-size: 13.5px; color: var(--muted); margin: 8px 0 12px; }
.hoja-lista li { display: grid; grid-template-columns: 72px 1fr; gap: 12px; align-items: baseline; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.hoja-lista b { font-family: var(--font-display); font-weight: var(--h-weight); font-size: 26px; text-align: right; line-height: 1; }
.hoja-lista b small { font-family: var(--font-body); font-size: 12px; font-weight: 600; color: var(--muted); }
.hoja-lista span { font-weight: 600; font-size: 16px; }
.hoja-lista .hoja-vacia { display: block; color: var(--muted); border: 0; padding: 18px 0; }
.hoja-total { margin-top: 12px; font-weight: 700; font-size: 14.5px; }
@media (max-width: 980px) {
  .enc-grid { grid-template-columns: 1fr; }
  .hoja { position: static; }
}

/* Imprimir solo la hoja de producción. */
@media print {
  body.imprime-hoja * { visibility: hidden; }
  body.imprime-hoja .hoja, body.imprime-hoja .hoja * { visibility: visible; }
  body.imprime-hoja .hoja { position: absolute; left: 0; top: 0; width: 100%; box-shadow: none; border: 0; }
  body.imprime-hoja #imprimirHoja { display: none; }
}
.hoy-mas { font-size: 13.5px; color: var(--muted); padding: 8px 8px 0 58px; }
