/* everywhere.css — identidad EVERYWHERE (portada, Dueño, /tres y /recorrido). Fondo #050506, texto #f2f1ec, lima #d4f76a (máx. 3 sitios por pantalla),
   Inter Tight 400–800 e Instrument Serif cursiva (Google Fonts, por <link> en cada página). Texto sobre lima siempre #050506. */
:root {
  --e-fondo: #050506; --e-texto: #f2f1ec; --e-lima: #d4f76a; --e-gris: #a6a59e; --e-gris-2: #8d8c86; --e-linea: #1e1e22; --e-panel: #0d0d10; --e-panel-2: #141418;
  --ease-out: cubic-bezier(.22, 1, .36, 1); --ease-in-out: cubic-bezier(.65, 0, .35, 1); --t-fast: 160ms; --t-med: 240ms; --t-slow: 420ms; --demo-h: 44px;
}
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font-family: "Inter Tight", -apple-system, "Segoe UI", sans-serif; background: var(--e-fondo); color: var(--e-texto); display: flex; flex-direction: column;
       font-size: 16px; line-height: 1.45; font-variant-numeric: tabular-nums; -webkit-font-smoothing: antialiased; }
body > .app { flex: 1; min-height: 0; display: flex; position: relative; }
[hidden] { display: none !important; }
button { font: inherit; }
.meta { font-size: 13px; }
.cursiva { font-family: "Instrument Serif", Georgia, serif; font-style: italic; font-weight: 400; }
.sr-only { position: absolute !important; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; padding: 0; }
:focus-visible { outline: 2px solid var(--e-lima); outline-offset: 2px; }
.revela { opacity: 0; transform: translateY(16px); transition: opacity var(--t-slow) var(--ease-out), transform var(--t-slow) var(--ease-out); }
.revela.visto { opacity: 1; transform: none; }
.revela.sin-anim { transition: none; }
@media (prefers-reduced-motion: reduce) { .revela { opacity: 1; transform: none; } *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; } }

/* =====================================================================================================================
   Dueño (D1–D8). Prefijo d-. Maquetas: docs/maquetas/dueno. Lima en máx. 3 sitios por pantalla: navegación activa, botón primario y UNA cifra/línea.
   ===================================================================================================================== */
:root { --t-sec: 15px; }
@media (max-width: 640px) { :root { --t-sec: 16px; } }
.d-app { background: var(--e-fondo); }
body > .app.d-app { flex-direction: row; }
.d-nav { flex: 0 0 248px; width: 248px; box-sizing: border-box; padding: 28px 18px; border-right: 1px solid var(--e-linea); display: flex; flex-direction: column; gap: 4px; overflow-y: auto; }
.d-marca { display: flex; flex-direction: column; gap: 2px; padding: 0 10px 22px; }
.d-marca b { font-size: 20px; font-weight: 800; letter-spacing: -.01em; }
.d-marca .cursiva { font-size: 17px; color: var(--e-gris); }
.d-nav a { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 44px; padding: 0 12px; border-radius: 12px; color: var(--e-texto); font-size: 16px; text-decoration: none; transition: background var(--t-fast) var(--ease-out); }
.d-nav a:hover { background: var(--e-panel-2); }
.d-nav a[aria-current="page"] { background: var(--e-lima); color: #050506; font-weight: 700; }
.insignia { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--e-texto); color: #050506; font-size: 13px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.d-main { flex: 1 1 auto; min-width: 0; overflow-y: auto; box-sizing: border-box; padding: 32px clamp(16px, 3vw, 44px) 40px; display: flex; flex-direction: column; gap: 28px; }
.d-bottom { display: none; }
@media (max-width: 1023px) {
  body > .app.d-app { flex-direction: column; }
  .d-nav { display: none; }
  .d-main { padding: 24px 20px 24px; gap: 22px; }
  .d-bottom { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border-top: 1px solid var(--e-linea); padding: 6px 4px 8px; background: var(--e-fondo); flex: none; }
  .d-bottom a, .d-bottom button { display: flex; flex-direction: column; align-items: center; gap: 4px; min-height: 52px; justify-content: center; color: var(--e-gris); font-size: 13px; text-decoration: none; background: none; border: 0; cursor: pointer; font-family: inherit; }
  .d-bottom [aria-current="page"] { color: var(--e-lima); font-weight: 700; }
  .d-bottom svg { width: 22px; height: 22px; }
}
.d-sheet-fondo { position: fixed; inset: 0; background: rgba(0, 0, 0, .4); z-index: 260; opacity: 0; transition: opacity var(--t-med) var(--ease-out); }
.d-sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 261; background: var(--e-panel); border-radius: 20px 20px 0 0; padding: 14px 16px 22px; display: flex; flex-direction: column; gap: 4px; transform: translateY(100%); transition: transform var(--t-med) var(--ease-out); }
.d-sheet.abierta { transform: none; } .d-sheet-fondo.abierta { opacity: 1; }
.d-sheet a { display: flex; align-items: center; justify-content: space-between; min-height: 48px; padding: 0 12px; border-radius: 12px; color: var(--e-texto); font-size: 16px; text-decoration: none; }
.d-sheet a:hover, .d-sheet a[aria-current="page"] { background: var(--e-panel-2); }
.d-sheet h2 { margin: 0 0 6px; padding: 0 12px; font-size: 16px; color: var(--e-gris); font-weight: 600; }

.d-cab { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 12px; }
.d-cab > div { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.d-main h1 { margin: 0; font-size: clamp(34px, 4vw, 52px); line-height: 1; font-weight: 800; letter-spacing: -.03em; }
.d-main h2 { margin: 0; font-size: 20px; font-weight: 700; }
.tono2 { color: var(--e-gris-2); }
.d-sub { font-size: 22px; color: #c9c8c1; }
.d-sec { font-size: var(--t-sec); color: var(--e-gris); }
.d-estado { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.d-vivo { display: inline-flex; align-items: center; gap: 8px; font-size: var(--t-sec); color: #c9c8c1; }
.d-vivo i { width: 10px; height: 10px; border-radius: 50%; background: var(--e-lima); display: inline-block; }
.d-pill { font-size: 14px; color: #050506; background: var(--e-texto); padding: 6px 10px; border-radius: 999px; font-weight: 600; }
.d-conmuta { display: inline-flex; border: 1px solid #3a3a40; border-radius: 999px; overflow: hidden; }
.d-conmuta button { min-height: 44px; padding: 0 16px; background: transparent; border: 0; color: var(--e-texto); font-size: 16px; cursor: pointer; font-family: inherit; }
.d-conmuta button[aria-pressed="true"] { background: var(--e-texto); color: #050506; font-weight: 700; }
.d-conmuta button + button { border-left: 1px solid #3a3a40; }

.d-tira { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); border-top: 1px solid #2a2a2f; border-bottom: 1px solid #2a2a2f; }
.d-tira > div { padding: 20px 18px; border-left: 1px solid #2a2a2f; display: flex; flex-direction: column; gap: 4px; }
.d-tira > div:first-child { padding-left: 0; border-left: 0; }
.d-tira .cifra { font-size: 44px; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.d-tira .cifra small { font-size: 22px; color: var(--e-gris); font-weight: 600; }
.d-tira .rot, .d-tira .pie { font-size: var(--t-sec); color: var(--e-gris); }
@media (max-width: 640px) { .d-tira { grid-template-columns: repeat(2, minmax(0, 1fr)); } .d-tira > div:nth-child(odd) { padding-left: 0; border-left: 0; } .d-tira > div { border-top: 1px solid #2a2a2f; } .d-tira > div:nth-child(-n+2) { border-top: 0; } }

.d-envivo { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 22px; padding: 10px 0; border-bottom: 1px solid var(--e-linea); font-size: var(--t-sec); color: var(--e-gris); }
.d-envivo b { color: var(--e-texto); font-weight: 700; font-size: 18px; display: inline-flex; align-items: center; }
.d-envivo .etq { font-weight: 600; color: var(--e-texto); }
.od { display: inline-flex; font-variant-numeric: tabular-nums; }
.od .dg { position: relative; display: inline-block; height: 1.2em; line-height: 1.2em; overflow: hidden; min-width: .6em; text-align: center; }
.od .dg .n { display: block; }
.od .dg .n.sale, .od .dg .n.entra { position: absolute; left: 0; right: 0; top: 0; }

.d-dos { display: flex; flex-wrap: wrap; gap: 28px; }
.d-dos > section { min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.d-ventas { flex: 3 1 420px; } .d-ahora { flex: 2 1 300px; gap: 4px !important; }
.d-ventas .total { font-size: 56px; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; line-height: 1.05; }
@media (max-width: 640px) { .d-ventas .total { font-size: 40px; } }
.d-grafica { width: 100%; }
.d-grafica svg { width: 100%; height: auto; display: block; }
.d-ahora .fila { display: flex; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--e-linea); font-size: 16px; }
.d-ahora .fila:last-child { border-bottom: 0; }
.d-ahora .fila .h { width: 52px; flex-shrink: 0; font-size: var(--t-sec); color: var(--e-gris); font-variant-numeric: tabular-nums; }
.d-ahora .fila.nueva { animation: d-nueva 600ms var(--ease-out) 1; }
@keyframes d-nueva { from { background: rgba(212, 247, 106, .16); } to { background: transparent; } }
.d-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.d-chip, .d-btn-sec { font: inherit; font-size: 16px; min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid #3a3a40; background: transparent; color: var(--e-texto); cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; }
.d-chip:hover, .d-btn-sec:hover { background: var(--e-panel-2); }
.d-btn { font: inherit; font-size: 18px; font-weight: 800; min-height: 56px; padding: 0 22px; border-radius: 16px; border: 0; background: var(--e-lima); color: #050506; cursor: pointer; }
.d-btn:disabled { opacity: .5; cursor: default; }
.d-bloques { display: flex; gap: 24px; flex-wrap: wrap; }
.d-bloques > section { flex: 1 1 260px; border: 1px solid #2a2a2f; border-radius: 16px; padding: 16px 18px; display: flex; flex-direction: column; gap: 8px; }
.d-bloques a { color: var(--e-texto); }

/* tablas (Digits): cifras a la derecha, tabulares, filas de 48 px, total con borde de 2 px */
.d-tabla { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; font-size: 16px; }
.d-tabla th { text-align: left; font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--e-gris); padding: 10px 12px; border-bottom: 1px solid var(--e-linea); white-space: nowrap; }
.d-tabla td { padding: 0 12px; height: 48px; border-bottom: 1px solid var(--e-linea); }
.d-tabla .num { text-align: right; }
.d-tabla tr.total td { border-top: 2px solid var(--e-linea); font-weight: 700; }
.d-scroll { overflow-x: auto; }
.d-buscar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.d-campo, .d-main input[type=text], .d-main input[type=search], .d-main input[type=number], .d-main select, .d-main textarea { font: inherit; font-size: 16px; color: var(--e-texto); background: #121214; border: 1px solid #3a3a40; border-radius: 14px; padding: 0 14px; min-height: 44px; }
.d-main textarea { padding: 14px; font-size: 20px; font-weight: 700; resize: none; }
.d-main label { font-size: var(--t-sec); color: #c9c8c1; display: flex; flex-direction: column; gap: 8px; }
.d-linea { display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 1px solid #2a2a2f; border-radius: 14px; padding: 12px 14px; font-size: var(--t-sec); line-height: 1.35; }
.d-linea .ap { color: var(--e-gris); display: block; }
.d-switch { width: 51px; min-height: 44px; flex-shrink: 0; border: 0; background: transparent; padding: 0; cursor: pointer; display: flex; align-items: center; }
.d-switch .carril { width: 51px; height: 31px; border-radius: 999px; background: #3a3a40; display: flex; align-items: center; justify-content: flex-start; padding: 2px; box-sizing: border-box; transition: background var(--t-fast); }
.d-switch .perilla { width: 27px; height: 27px; border-radius: 50%; background: #050506; background: var(--e-texto); transition: transform var(--t-fast) var(--ease-out); }
.d-switch[aria-checked="true"] .carril { background: var(--e-lima); }
.d-switch[aria-checked="true"] .perilla { background: #050506; transform: translateX(20px); }
.d-switch:disabled { cursor: default; }
.d-preview { border-radius: 26px; background: #1d2a3a; padding: 22px 14px 16px; display: flex; flex-direction: column; align-items: center; gap: 14px; max-width: 420px; }
.d-preview .t { font-size: var(--t-sec); color: #dfe6ee; }
.d-preview .hora { font-size: 54px; line-height: 1; font-weight: 300; color: #fff; letter-spacing: -.02em; }
.d-preview .notif { width: 100%; box-sizing: border-box; border-radius: 18px; background: rgba(255, 255, 255, .82); color: #0b0b0c; padding: 12px 14px; display: flex; gap: 12px; align-items: flex-start; }
.d-preview .notif .cr { width: 38px; height: 38px; flex-shrink: 0; border-radius: 10px; background: #b5432a; color: #fffdf9; display: flex; align-items: center; justify-content: center; font: 700 15px Georgia, serif; }
.d-preview .notif .c { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.d-preview .notif .c div { display: flex; justify-content: space-between; font-size: 16px; }
.d-preview .notif .c span { font-size: 16px; overflow-wrap: anywhere; }
.d-error { color: #ffb4a8; font-size: 16px; min-height: 1.4em; }
.d-lista { display: flex; flex-direction: column; }
.d-lista .it { display: flex; gap: 12px; justify-content: space-between; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--e-linea); font-size: 16px; }
.d-lista .it .quien { color: var(--e-gris); font-size: var(--t-sec); }
.d-radios { display: flex; gap: 10px; flex-wrap: wrap; }
.d-radios label { flex-direction: row; align-items: center; min-height: 44px; border: 1px solid #3a3a40; border-radius: 999px; padding: 0 16px; font-size: 16px; cursor: pointer; color: var(--e-texto); }
.d-radios label { position: relative; }
.d-radios input { position: absolute; inset: 0; width: 100%; height: 100%; min-height: 44px; margin: 0; opacity: 0; cursor: pointer; }
.d-radios label::before { content: ""; width: 18px; height: 18px; border-radius: 50%; border: 2px solid #a6a59e; margin-right: 10px; flex: none; }
.d-radios label:has(input:checked) { border-color: var(--e-lima); }
.d-radios label:has(input:checked)::before { background: var(--e-lima); border-color: var(--e-lima); box-shadow: inset 0 0 0 3px #050506; }
.d-radios label:has(input:focus-visible) { outline: 2px solid var(--e-lima); outline-offset: 2px; }
.d-mesas { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.d-mesas .m { border: 1px solid #2a2a2f; border-radius: 14px; padding: 12px; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; font-size: var(--t-sec); }
.d-mesas img { width: 96px; height: 96px; background: #f2f1ec; padding: 4px; border-radius: 8px; }
.d-aviso-vacio { padding: 20px 0; }
.d-paginas { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; font-size: var(--t-sec); color: var(--e-gris); }
.d-toast { position: fixed; left: 50%; bottom: calc(var(--demo-h, 44px) + 70px); transform: translateX(-50%); background: var(--e-texto); color: #050506; padding: 12px 18px; border-radius: 14px; font-size: 16px; z-index: 300; max-width: 90vw; }

/* Asistente */
.d-chat { max-width: 780px; width: 100%; display: flex; flex-direction: column; gap: 18px; }
.d-hilo { display: flex; flex-direction: column; gap: 16px; }
.d-msg-t { align-self: flex-end; max-width: 80%; background: var(--e-panel-2); border-radius: 16px; padding: 10px 14px; font-size: 16px; }
.d-msg-a { border-left: 2px solid var(--e-lima); padding: 2px 0 2px 16px; max-width: 62ch; }
.d-msg-a p { margin: 0 0 8px; font-size: 16px; line-height: 1.5; }
.d-msg-a a { color: var(--e-lima); }
.d-msg-a .consulto { display: block; font-size: var(--t-sec); color: var(--e-gris); }
.d-accion { border: 1px solid #3a3a40; border-radius: 16px; background: var(--e-panel); padding: 14px 16px; max-width: 62ch; display: flex; flex-direction: column; gap: 10px; }
.d-accion .d-accion-t { font-size: var(--t-sec); color: var(--e-gris); }
.d-accion .d-accion-r { margin: 0; font-size: 16px; line-height: 1.5; overflow-wrap: anywhere; }
.d-accion .d-accion-cifra { margin: 0; font-size: 18px; font-weight: 700; overflow-wrap: anywhere; }
.d-accion .d-accion-b { display: flex; gap: 10px; flex-wrap: wrap; }
.d-accion .d-btn { min-height: 44px; font-size: 16px; padding: 0 20px; border-radius: 14px; }
.d-accion .d-btn-sec { min-height: 44px; }
.d-accion .d-accion-err { margin: 0; font-size: var(--t-sec); color: var(--e-texto); }
.d-accion.hecha { border-color: var(--e-lima); }
.d-accion.cancelada { opacity: .75; }
.d-accion a { color: var(--e-lima); }
.d-entrada { display: flex; gap: 10px; position: sticky; bottom: 0; padding: 12px 0 4px; background: var(--e-fondo); }
.d-entrada input { flex: 1; min-width: 0; }
.escribiendo { display: inline-flex; gap: 4px; padding: 10px 12px; } .escribiendo i { width: 7px; height: 7px; border-radius: 50%; background: var(--e-gris); display: block; animation: puntos 900ms ease-in-out infinite; } .escribiendo i:nth-child(2) { animation-delay: 140ms; } .escribiendo i:nth-child(3) { animation-delay: 280ms; }
@keyframes puntos { 0%, 60%, 100% { opacity: .35; } 30% { opacity: 1; transform: translateY(-3px); } }

/* Páginas heredadas de restaurante-ia (proyección, insumos): mismos nombres de token, valores oscuros de Everywhere. */
.legado { --crema: #050506; --crema-2: #141418; --papel: #0d0d10; --tinta: #f2f1ec; --tinta-2: #c9c8c1; --tinta-suave: #a6a59e; --borde: #1e1e22; --borde-2: #3a3a40; --gris: #3a3a40;
  --acento: #d4f76a; --acento-2: #d4f76a; --acento-suave: #1d2410; --acento-tinte: #10130a; --miel: #d4f76a; --miel-tinta: #d4f76a; --miel-suave: #1d2410;
  --oliva: #d4f76a; --oliva-suave: #1d2410; --rojo: #ffb4a8; --rojo-suave: #2a1612; --sombra-1: none; --sombra-2: none; --sombra-3: 0 24px 48px rgba(0,0,0,.6);
  --sans: "Inter Tight", system-ui, sans-serif; color-scheme: dark; }
.legado body { font-family: "Inter Tight", system-ui, sans-serif; }
.legado button.primario, .legado .boton.primario { color: #050506; }
.legado .d-main.contenido { padding: 32px clamp(16px, 3vw, 44px) 40px; max-width: none; margin: 0; }
@media (max-width: 1023px) { .legado .d-main.contenido { padding: 24px 20px; } }
.legado .tarjeta { background: var(--papel); border: 1px solid var(--borde); border-radius: 16px; }
.legado button { border-radius: 12px; min-height: 44px; }
.legado button.compacto { min-height: 44px; }
.legado .segmentado { border-radius: 12px; }
.legado .segmentado button { min-height: 44px; }
.legado dialog.hoja-pedido { border: 1px solid var(--borde-2); background: var(--papel); }
.legado input, .legado textarea, .legado select { background: #121214; color: var(--tinta); border-radius: 12px; min-height: 44px; }
.legado .cabeza h1 { font-size: clamp(34px, 4vw, 52px); font-weight: 800; letter-spacing: -.03em; }
.legado body.vista-insumos .solo-proy { display: none !important; }
.legado .skeleton { animation: none; }
@media (max-width: 640px) { .legado .cifras b { font-size: 24px; } .legado .tarjeta h2, .legado .suave, .legado .leyenda, .legado td, .legado th, .legado label { font-size: 16px; } }

@media (max-width: 640px) { .legado { --t-1: 16px; --t-2: 16px; --t-3: 16px; } }

.legado .grafica text { font-size: 13px; }
@media (max-width: 640px) { .d-pill { font-size: 16px; } .d-tabla th { font-size: 16px; letter-spacing: .02em; } .d-preview .notif .cr { font-size: 16px; } }
@media (max-width: 499px) { .barra-demo .bd-reloj, .barra-demo .bd-demo { font-size: 16px !important; } }

/* Avisos (D6): formulario y vista previa lado a lado; en celular la vista previa va antes del botón «Enviar a todos» (F-02, como la maqueta). */
.a-grid { display: grid; grid-template-columns: minmax(0, 560px) minmax(300px, 1fr); gap: 14px 28px; align-items: start; }
.a-form { grid-column: 1; grid-row: 1; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.a-envio { grid-column: 1; grid-row: 2; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.a-vista { grid-column: 2; grid-row: 1 / span 2; min-width: 0; }
@media (max-width: 760px) {
  .a-grid { grid-template-columns: minmax(0, 1fr); }
  .a-vista { grid-column: 1; grid-row: 2; }
  .a-envio { grid-row: 3; }
}

/* Bar real (MODO=produccion): las cifras son de verdad, sin letreros «de ejemplo». */
html.produccion .pill-demo, html.produccion .pill-ejemplo, html.produccion .d-pill { display: none !important; }
