/* Huevos Anona · sistema de diseño compartido por los 4 sistemas.
   Marca: rojo Anona, crema y kraft (la caja de 360), tipografía redondeada como el logo.
   El logo (gallo y palabra «anona») es el ORIGINAL vectorizado: includes/marca.php y assets/img/anona-*.svg.
   --rojo es el rojo medido en el logo oficial (#D0132C): blanco encima da 5.5:1.
   Sin color-mix(): Safari 15 no lo entiende (lección de la agenda de americanprana). */

:root {
  --rojo: #D0132C; --rojo-700: #A80F24; --rojo-800: #860C1D; --rojo-50: #FCECEE; --rojo-100: #F8D2D7;
  --crema: #FFF8EF; --kraft: #D3AE7E; --kraft-50: #F7EEE2;
  --tinta: #25140F; --tinta-2: #4A3832; --gris: #7A6A64; --gris-2: #A99C96;
  --borde: #EEE3DA; --borde-2: #E2D4C8; --fondo: #FAF6F2; --blanco: #fff;
  --ok: #138A4B; --ok-50: #E5F5EC; --aviso: #B7700E; --aviso-50: #FDF2DF; --peligro: #D0281F; --peligro-50: #FDE9E7;
  --info: #1B6FB5; --info-50: #E6F0FA; --yema: #F2A516; --yema-50: #FEF4DE; --campo: #2F7D32; --campo-50: #E7F3E7;
  --acc: var(--rojo); --acc-700: var(--rojo-700); --acc-50: var(--rojo-50);
  --side-bg: #2A130E; --side-bg-2: #3A1C15; --side-ink: #E9D9D2; --side-mute: #A88F86; --side-act: var(--rojo);
  --r-sm: 8px; --r: 12px; --r-lg: 18px; --r-xl: 24px;
  --sombra: 0 1px 2px rgba(37,20,15,.05), 0 4px 16px rgba(37,20,15,.06);
  --sombra-2: 0 10px 40px rgba(37,20,15,.14);
  --f-ui: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --f-marca: "Fredoka", "Baloo 2", "Nunito", var(--f-ui);
}
body.sis-alimentos { --acc: var(--campo); --acc-700: #215A24; --acc-50: var(--campo-50); --side-bg: #10281A; --side-bg-2: #183A26; --side-ink: #D8E9DC; --side-mute: #8DAF96; --side-act: #3FA247; }
body.sis-granja    { --acc: #C9800A; --acc-700: #9A6206; --acc-50: var(--yema-50); --side-bg: #2B1D0C; --side-bg-2: #3C2A12; --side-ink: #F1E3C8; --side-mute: #BBA27A; --side-act: var(--yema); }
body.sis-master    { --acc: var(--rojo); --side-bg: #15171C; --side-bg-2: #20232B; --side-ink: #E7E3DF; --side-mute: #8F8A86; --side-act: var(--rojo); }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--f-ui); font-size: 14.5px; line-height: 1.5; color: var(--tinta); background: var(--fondo); -webkit-font-smoothing: antialiased; }
a { color: var(--acc-700); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0 0 .4em; line-height: 1.2; letter-spacing: -.01em; }
h1 { font-size: 26px; font-weight: 750; } h2 { font-size: 19px; font-weight: 700; } h3 { font-size: 16px; font-weight: 700; } h4 { font-size: 14px; font-weight: 700; }
p { margin: 0 0 .8em; }
small, .muted { color: var(--gris); }
.marca-txt { font-family: var(--f-marca); font-weight: 600; letter-spacing: -.01em; }
.num { font-variant-numeric: tabular-nums; }
hr { border: 0; border-top: 1px solid var(--borde); margin: 16px 0; }
img { max-width: 100%; }

/* ── botones */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid transparent; border-radius: 10px; padding: 9px 15px; font: 600 14px/1.2 var(--f-ui);
  cursor: pointer; background: var(--blanco); color: var(--tinta); border-color: var(--borde-2); transition: background .15s, box-shadow .15s, transform .05s; white-space: nowrap; text-decoration: none !important; }
.btn:hover { background: var(--kraft-50); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--acc); border-color: var(--acc); color: #fff; }
.btn-primary:hover { background: var(--acc-700); }
.btn-rojo { background: var(--rojo); border-color: var(--rojo); color: #fff; } .btn-rojo:hover { background: var(--rojo-700); }
.btn-ok { background: var(--ok); border-color: var(--ok); color: #fff; } .btn-ok:hover { filter: brightness(.94); }
.btn-danger { background: var(--blanco); color: var(--peligro); border-color: #F2C3BF; } .btn-danger:hover { background: var(--peligro-50); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--tinta-2); } .btn-ghost:hover { background: rgba(0,0,0,.05); }
.btn-sm { padding: 6px 11px; font-size: 13px; border-radius: 8px; }
.btn-lg { padding: 13px 22px; font-size: 16px; border-radius: 12px; }
.btn-block { width: 100%; }
.btn[disabled], .btn.disabled { opacity: .5; pointer-events: none; }
.btn svg { width: 16px; height: 16px; }

/* ── tarjetas y rejillas */
.card { background: var(--blanco); border: 1px solid var(--borde); border-radius: var(--r-lg); box-shadow: var(--sombra); }
.card-h { padding: 14px 18px; border-bottom: 1px solid var(--borde); display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.card-h h2, .card-h h3 { margin: 0; font-size: 15.5px; }
.card-b { padding: 16px 18px; }
.card-b.p0 { padding: 0; }
.card + .card { margin-top: 16px; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-2-1 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); } .g-1-2 { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); } .g-3-2 { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); }
.stack > * + * { margin-top: 16px; }
.flex { display: flex; align-items: center; gap: 10px; } .flex-w { flex-wrap: wrap; } .between { justify-content: space-between; } .grow { flex: 1; min-width: 0; }
.mt0 { margin-top: 0 !important; } .mt8 { margin-top: 8px; } .mt16 { margin-top: 16px; } .mt24 { margin-top: 24px; } .mb0 { margin-bottom: 0 !important; } .mb8 { margin-bottom: 8px; } .mb16 { margin-bottom: 16px; }
.right { text-align: right; } .center { text-align: center; } .nowrap { white-space: nowrap; }

/* ── KPIs */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; }
.kpi { background: var(--blanco); border: 1px solid var(--borde); border-radius: var(--r-lg); padding: 14px 16px; box-shadow: var(--sombra); position: relative; overflow: hidden; }
.kpi .k-l { font-size: 12.5px; color: var(--gris); font-weight: 600; display: flex; align-items: center; gap: 6px; }
.kpi .k-v { font-size: 25px; font-weight: 750; letter-spacing: -.02em; margin-top: 4px; font-variant-numeric: tabular-nums; }
.kpi .k-h { font-size: 12.5px; color: var(--gris); margin-top: 2px; }
.kpi .k-d { font-size: 12px; font-weight: 700; padding: 1px 7px; border-radius: 999px; }
.kpi.t-ok .k-v { color: var(--ok); } .kpi.t-aviso .k-v { color: var(--aviso); } .kpi.t-peligro .k-v { color: var(--peligro); } .kpi.t-acc .k-v { color: var(--acc-700); }
.kpi::after { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--acc); opacity: .0; }
.kpi.bar::after { opacity: 1; }
a.kpi { color: inherit; text-decoration: none !important; } a.kpi:hover { border-color: var(--borde-2); box-shadow: var(--sombra-2); }
.d-up { background: var(--ok-50); color: var(--ok); } .d-down { background: var(--peligro-50); color: var(--peligro); } .d-flat { background: #F1ECE8; color: var(--gris); }

/* ── etiquetas */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 650; background: #F1ECE8; color: var(--tinta-2); white-space: nowrap; line-height: 1.6; }
.badge.t-success, .badge.t-ok { background: var(--ok-50); color: var(--ok); }
.badge.t-warning, .badge.t-aviso { background: var(--aviso-50); color: var(--aviso); }
.badge.t-danger, .badge.t-peligro { background: var(--peligro-50); color: var(--peligro); }
.badge.t-info { background: var(--info-50); color: var(--info); }
.badge.t-accent, .badge.t-acc { background: var(--acc-50); color: var(--acc-700); }
.badge.t-neutral { background: #F1ECE8; color: var(--tinta-2); }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; background: var(--gris-2); }
.dot.verde { background: #1FA35B; box-shadow: 0 0 0 3px #D9F2E3; } .dot.ambar { background: #E8A10F; box-shadow: 0 0 0 3px #FCEFD2; } .dot.rojo { background: var(--peligro); box-shadow: 0 0 0 3px #FBD9D6; } .dot.gris { background: #B9AFA9; }
.vivo { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--ok); }
.vivo::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #1FA35B; animation: latido 1.6s infinite; }
@keyframes latido { 0% { box-shadow: 0 0 0 0 rgba(31,163,91,.55); } 70% { box-shadow: 0 0 0 9px rgba(31,163,91,0); } 100% { box-shadow: 0 0 0 0 rgba(31,163,91,0); } }

/* ── tablas */
.tbl-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13.8px; }
.tbl th { text-align: left; font-size: 12px; font-weight: 700; color: var(--gris); text-transform: uppercase; letter-spacing: .04em; padding: 10px 14px; border-bottom: 1px solid var(--borde); background: #FCFAF8; white-space: nowrap; }
.tbl td { padding: 10px 14px; border-bottom: 1px solid #F4ECE5; vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover td { background: #FFFBF7; }
.tbl .r, .tbl th.r { text-align: right; font-variant-numeric: tabular-nums; }
.tbl tr.click { cursor: pointer; }
.tbl tfoot td { font-weight: 700; border-top: 2px solid var(--borde); background: #FCFAF8; }
.tbl.compact td, .tbl.compact th { padding: 7px 10px; }

/* ── formularios */
.field { margin-bottom: 14px; }
.field label, .lbl { display: block; font-size: 13px; font-weight: 650; color: var(--tinta-2); margin-bottom: 5px; }
.field .ayuda { font-size: 12.5px; color: var(--gris); margin-top: 4px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=tel], input[type=date], input[type=datetime-local], input[type=search], select, textarea {
  width: 100%; font: 14.5px/1.4 var(--f-ui); color: var(--tinta); background: var(--blanco); border: 1px solid var(--borde-2); border-radius: 10px; padding: 9px 12px; outline: none; transition: border .15s, box-shadow .15s; }
input:focus, select:focus, textarea:focus { border-color: var(--acc); box-shadow: 0 0 0 3px var(--acc-50); }
textarea { min-height: 84px; resize: vertical; }
.field.error input, .field.error select, .field.error textarea { border-color: var(--peligro); background: #FFF8F7; }
.field.error .ayuda { color: var(--peligro); font-weight: 600; }
.row { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.check { display: flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; }
.seg { display: inline-flex; background: #F2EBE5; border-radius: 10px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg a, .seg button { border: 0; background: transparent; padding: 6px 12px; border-radius: 8px; font: 600 13px var(--f-ui); color: var(--tinta-2); cursor: pointer; text-decoration: none !important; }
.seg a.on, .seg button.on { background: var(--blanco); color: var(--tinta); box-shadow: 0 1px 3px rgba(0,0,0,.08); }

/* ── avisos (el error se pinta DENTRO de la tarjeta del formulario) */
.alerta { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; font-size: 14px; margin-bottom: 14px; border: 1px solid transparent; }
.alerta b { font-weight: 700; }
.alerta.success, .alerta.ok { background: var(--ok-50); color: #0D5E33; border-color: #C3E8D2; }
.alerta.danger, .alerta.error { background: var(--peligro-50); color: #8E1A13; border-color: #F5C8C3; }
.alerta.warning, .alerta.aviso { background: var(--aviso-50); color: #7A4A06; border-color: #F5DDB0; }
.alerta.info { background: var(--info-50); color: #124B7A; border-color: #C9DDF2; }
.alerta .x { margin-left: auto; cursor: pointer; opacity: .6; }

/* ── listas, línea de tiempo, pasos */
.lista { list-style: none; margin: 0; padding: 0; }
.lista li { padding: 11px 16px; border-bottom: 1px solid #F4ECE5; display: flex; gap: 12px; align-items: center; }
.lista li:last-child { border-bottom: 0; }
.lista .t { font-weight: 650; } .lista .s { font-size: 13px; color: var(--gris); }
.timeline { list-style: none; margin: 0; padding: 0 0 0 4px; }
.timeline li { position: relative; padding: 0 0 16px 24px; }
.timeline li::before { content: ""; position: absolute; left: 4px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--acc); box-shadow: 0 0 0 3px var(--acc-50); }
.timeline li::after { content: ""; position: absolute; left: 8.5px; top: 18px; bottom: 0; width: 1px; background: var(--borde-2); }
.timeline li:last-child::after { display: none; }
.timeline .tt { font-weight: 650; font-size: 14px; } .timeline .ts { font-size: 12.5px; color: var(--gris); }
.pasos { display: flex; gap: 0; counter-reset: p; }
.paso { flex: 1; text-align: center; position: relative; font-size: 12.5px; font-weight: 650; color: var(--gris-2); padding-top: 34px; }
.paso::before { counter-increment: p; content: ""; position: absolute; top: 6px; left: 50%; transform: translateX(-50%); width: 22px; height: 22px; border-radius: 50%; background: #EFE6DF; border: 3px solid var(--blanco); box-shadow: 0 0 0 1px var(--borde-2); z-index: 1; }
.paso::after { content: ""; position: absolute; top: 16px; left: -50%; width: 100%; height: 3px; background: #EFE6DF; }
.paso:first-child::after { display: none; }
.paso.hecho, .paso.actual { color: var(--tinta); }
.paso.hecho::before { background: var(--ok); box-shadow: 0 0 0 1px var(--ok); }
.paso.hecho::after, .paso.actual::after { background: var(--ok); }
.paso.actual::before { background: var(--acc); box-shadow: 0 0 0 1px var(--acc), 0 0 0 6px var(--acc-50); }
.progreso { height: 8px; border-radius: 99px; background: #F0E7E0; overflow: hidden; }
.progreso > i { display: block; height: 100%; background: var(--acc); border-radius: 99px; }
.vacio { text-align: center; padding: 34px 16px; color: var(--gris); }
.vacio svg { width: 44px; height: 44px; color: var(--gris-2); margin-bottom: 8px; }
.av { width: 36px; height: 36px; border-radius: 50%; background: var(--acc-50); color: var(--acc-700); display: inline-flex; align-items: center; justify-content: center; font-weight: 750; font-size: 13px; flex-shrink: 0; }

/* ── PANEL (back-office): barra lateral + contenido */
.app { display: grid; grid-template-columns: 252px minmax(0, 1fr); min-height: 100vh; }
.side { background: var(--side-bg); color: var(--side-ink); position: sticky; top: 0; height: 100vh; overflow-y: auto; padding: 16px 12px 24px; display: flex; flex-direction: column; }
.side .marca { display: flex; align-items: center; gap: 10px; padding: 6px 8px 16px; color: #fff; text-decoration: none !important; }
.side .marca > svg { flex-shrink: 0; }
.side .marca .w { display: block; line-height: 0; }
.side .marca .w svg { display: block; }
.side .marca .s { display: block; font-size: 10.5px; letter-spacing: .14em; font-weight: 750; color: var(--side-act); text-transform: uppercase; margin-top: 5px; font-family: var(--f-ui); }
.side .sec { font-size: 10.5px; letter-spacing: .12em; font-weight: 750; color: var(--side-mute); text-transform: uppercase; padding: 14px 10px 6px; }
.side a.it { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 9px; color: var(--side-ink); font-size: 14px; font-weight: 550; text-decoration: none !important; }
.side a.it svg { width: 18px; height: 18px; opacity: .85; flex-shrink: 0; }
.side a.it:hover { background: var(--side-bg-2); }
.side a.it.on { background: var(--side-act); color: #fff; }
.side a.it.on svg { opacity: 1; }
.side a.it .n { margin-left: auto; background: rgba(255,255,255,.14); color: #fff; font-size: 11px; font-weight: 750; padding: 1px 7px; border-radius: 99px; }
.side a.it .n.r { background: var(--rojo); }
.side .pie { margin-top: auto; padding: 14px 8px 0; border-top: 1px solid rgba(255,255,255,.08); font-size: 12.5px; color: var(--side-mute); }
.side .otros { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 10px; }
.side .otros a { font-size: 11.5px; font-weight: 650; color: var(--side-ink); background: var(--side-bg-2); padding: 6px 8px; border-radius: 8px; text-align: center; text-decoration: none !important; }
.side .otros a:hover { filter: brightness(1.2); }
.main { min-width: 0; display: flex; flex-direction: column; }
.top { height: 60px; display: flex; align-items: center; gap: 14px; padding: 0 24px; background: rgba(250,246,242,.88); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--borde); position: sticky; top: 0; z-index: 40; }
.top .menu-btn { display: none; }
.top .buscar { flex: 1; max-width: 460px; position: relative; }
.top .buscar input { padding-left: 36px; background: var(--blanco); border-radius: 999px; height: 38px; }
.top .buscar svg { position: absolute; left: 12px; top: 10px; width: 17px; height: 17px; color: var(--gris); }
.top .buscar .res { position: absolute; top: 44px; left: 0; right: 0; background: var(--blanco); border: 1px solid var(--borde); border-radius: 14px; box-shadow: var(--sombra-2); max-height: 420px; overflow: auto; display: none; z-index: 60; }
.top .buscar .res a { display: block; padding: 9px 14px; border-bottom: 1px solid #F4ECE5; color: var(--tinta); text-decoration: none; }
.top .buscar .res a:hover, .top .buscar .res a.sel { background: var(--kraft-50); }
.top .buscar .res small { display: block; }
.top .yo { margin-left: auto; display: flex; align-items: center; gap: 10px; font-size: 13px; }
.top .yo .n { font-weight: 700; } .top .yo small { display: block; line-height: 1.2; }
.content { padding: 22px 24px 60px; max-width: 1480px; width: 100%; }
.page-h { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; margin-bottom: 18px; flex-wrap: wrap; }
.page-h h1 { margin: 0; }
.page-h .sub { color: var(--gris); margin-top: 3px; }
.page-h .acc { display: flex; gap: 8px; flex-wrap: wrap; }
.velo { display: none; }

/* ── TIENDA pública */
.st-nav { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.94); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--borde); }
.st-nav .in { max-width: 1200px; margin: 0 auto; display: flex; align-items: center; gap: 18px; padding: 10px 20px; }
.st-nav .marca { display: flex; align-items: center; gap: 8px; text-decoration: none !important; }
.st-nav .marca > svg { flex-shrink: 0; }
.st-nav .marca .w { display: block; line-height: 0; }
.st-nav .marca .w svg { display: block; }
.st-nav .marca .s { font-family: var(--f-marca); font-size: 13px; font-weight: 600; color: #fff; background: var(--rojo); padding: 1px 8px 2px; border-radius: 6px; transform: rotate(-4deg); margin-left: 2px; }
.st-nav nav { display: flex; gap: 4px; margin-left: 10px; }
.st-nav nav a { color: var(--tinta-2); font-weight: 600; padding: 8px 12px; border-radius: 9px; font-size: 14.5px; }
.st-nav nav a:hover { background: var(--kraft-50); text-decoration: none; }
.st-nav .der { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.carrito-btn { position: relative; }
.carrito-btn .n { position: absolute; top: -6px; right: -6px; background: var(--rojo); color: #fff; font-size: 11px; font-weight: 800; min-width: 20px; height: 20px; border-radius: 10px; display: flex; align-items: center; justify-content: center; padding: 0 5px; border: 2px solid #fff; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.hero { background: var(--rojo); color: #fff; position: relative; overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: 0; background:
  radial-gradient(circle at 85% 20%, rgba(255,255,255,.12) 0 140px, transparent 141px),
  repeating-linear-gradient(-8deg, rgba(0,0,0,.05) 0 2px, transparent 2px 26px); }
.hero .in { position: relative; display: grid; grid-template-columns: 1.15fr .85fr; gap: 30px; align-items: center; padding: 56px 20px 64px; max-width: 1200px; margin: 0 auto; }
.hero h1 { font-family: var(--f-marca); font-size: 54px; font-weight: 600; line-height: 1.02; letter-spacing: -.02em; margin-bottom: 14px; }
.hero p { font-size: 18px; opacity: .93; max-width: 520px; }
.hero .cta { display: flex; gap: 10px; margin-top: 22px; flex-wrap: wrap; }
.hero .btn-blanco { background: #fff; color: var(--rojo-700); border-color: #fff; }
.hero .btn-borde { background: transparent; color: #fff; border-color: rgba(255,255,255,.6); }
.hero .btn-borde:hover { background: rgba(255,255,255,.1); }
.hero .placa { background: #fff; color: var(--tinta); border-radius: 26px; padding: 22px; box-shadow: 0 30px 60px rgba(80,10,5,.35); transform: rotate(1.5deg); }
/* la placa «anona LLEVA» (original vectorizado, an_placa()) */
.sello-placa svg { display: block; margin: 0 auto; max-width: 100%; height: auto; }
.franja { background: var(--crema); border-bottom: 1px solid var(--borde); }
.franja .in { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; padding: 18px 20px; max-width: 1200px; margin: 0 auto; }
.franja .it { display: flex; gap: 10px; align-items: center; font-size: 14px; }
.franja .it svg { width: 30px; height: 30px; color: var(--rojo); flex-shrink: 0; }
.sec-t { display: flex; align-items: flex-end; justify-content: space-between; margin: 40px 0 16px; }
.sec-t h2 { font-family: var(--f-marca); font-size: 32px; font-weight: 600; margin: 0; }
.prods { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; }
.prod { background: #fff; border: 1px solid var(--borde); border-radius: 22px; overflow: hidden; display: flex; flex-direction: column; transition: box-shadow .2s, transform .2s; }
.prod:hover { box-shadow: var(--sombra-2); transform: translateY(-2px); }
.prod .img { aspect-ratio: 4/3; background: var(--kraft-50); display: flex; align-items: center; justify-content: center; position: relative; }
.prod .img svg { width: 78%; height: 78%; }
.prod .img .tag { position: absolute; top: 12px; left: 12px; }
.prod .b { padding: 14px 16px 16px; display: flex; flex-direction: column; flex: 1; }
.prod .nom { font-weight: 700; font-size: 15.5px; line-height: 1.3; }
.prod .des { font-size: 13px; color: var(--gris); margin: 4px 0 10px; flex: 1; }
.prod .pr { display: flex; align-items: baseline; gap: 8px; margin-bottom: 12px; }
.prod .pr b { font-size: 22px; font-weight: 800; color: var(--rojo-700); font-variant-numeric: tabular-nums; }
.prod .pr small { font-size: 12.5px; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--borde-2); border-radius: 10px; overflow: hidden; background: #fff; }
.qty button { border: 0; background: transparent; width: 34px; height: 36px; font-size: 18px; font-weight: 700; color: var(--rojo-700); cursor: pointer; }
.qty button:hover { background: var(--rojo-50); }
.qty span, .qty input { width: 38px; text-align: center; font-weight: 750; border: 0; font-size: 15px; padding: 0; }
.pie-st { background: var(--side-bg); color: #D9C7BF; margin-top: 60px; }
.pie-st .in { max-width: 1200px; margin: 0 auto; padding: 36px 20px; display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 24px; font-size: 14px; }
.pie-st h4 { color: #fff; } .pie-st a { color: #F0DED6; }
.app-badges { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.app-badge { display: inline-flex; align-items: center; gap: 8px; background: #000; color: #fff; border-radius: 10px; padding: 7px 13px; font-size: 12px; line-height: 1.15; }
.app-badge b { display: block; font-size: 15px; }

/* ── mapas (Leaflet) */
.mapa { width: 100%; height: 420px; border-radius: var(--r-lg); overflow: hidden; background: #EDE5DE; border: 1px solid var(--borde); z-index: 1; }
.mapa.alto { height: 560px; } .mapa.bajo { height: 300px; }
.an-truck { width: 46px; height: 46px; }
.an-truck .c { width: 46px; height: 46px; border-radius: 50%; background: var(--c, var(--rojo)); border: 3px solid #fff; box-shadow: 0 4px 14px rgba(120,10,5,.45); display: flex; align-items: center; justify-content: center; position: relative; }
.an-truck .c svg { width: 26px; height: 26px; }
.an-truck .cono { position: absolute; left: 50%; top: 50%; width: 0; height: 0; transform-origin: 0 0; }
.an-truck .cono::before { content: ""; position: absolute; left: -7px; top: -36px; border-left: 7px solid transparent; border-right: 7px solid transparent; border-bottom: 11px solid var(--c, var(--rojo)); }
.an-truck.pulso .c::after { content: ""; position: absolute; inset: -3px; border-radius: 50%; animation: pulsoMapa 2s infinite; }
@keyframes pulsoMapa { 0% { box-shadow: 0 0 0 0 rgba(225,38,28,.5); } 100% { box-shadow: 0 0 0 22px rgba(225,38,28,0); } }
.an-pin { width: 34px; height: 44px; }
.leaflet-container { font-family: var(--f-ui) !important; }
.leaflet-popup-content { font-size: 13px; }

/* ── seguimiento del pedido */
.seg-card { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 0; }
.eta-big { font-family: var(--f-marca); font-size: 52px; font-weight: 600; color: var(--rojo); line-height: 1; }

/* ── POS mostrador */
.pos { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(320px, 1fr); gap: 16px; align-items: start; }
.pos-prods { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.pos-p { background: #fff; border: 1px solid var(--borde); border-radius: 14px; padding: 12px; cursor: pointer; text-align: left; font: inherit; transition: border .15s, box-shadow .15s; }
.pos-p:hover { border-color: var(--acc); box-shadow: 0 0 0 3px var(--acc-50); }
.pos-p .n { font-weight: 700; font-size: 13.5px; line-height: 1.25; min-height: 34px; }
.pos-p .p { font-size: 17px; font-weight: 800; color: var(--acc-700); margin-top: 6px; }
.pos-p .e { font-size: 11.5px; color: var(--gris); }
.ticket { position: sticky; top: 76px; }
.ticket .tot { font-size: 30px; font-weight: 800; letter-spacing: -.02em; }

/* ── chat del copiloto */
.chat { display: grid; grid-template-columns: 280px minmax(0, 1fr); height: calc(100vh - 60px); }
.chat .hilos { border-right: 1px solid var(--borde); background: #fff; overflow-y: auto; }
.chat .hilos a { display: block; padding: 12px 16px; border-bottom: 1px solid #F4ECE5; color: var(--tinta); text-decoration: none; }
.chat .hilos a.on { background: var(--rojo-50); }
.chat .hilos a small { display: block; }
.chat .conv { display: flex; flex-direction: column; min-width: 0; background: var(--fondo); }
.chat .msgs { flex: 1; overflow-y: auto; padding: 24px; display: flex; flex-direction: column; gap: 14px; }
.msg { max-width: 760px; }
.msg.yo { align-self: flex-end; }
.msg .bur { padding: 12px 16px; border-radius: 18px; font-size: 14.5px; line-height: 1.55; }
.msg.yo .bur { background: var(--tinta); color: #fff; border-bottom-right-radius: 5px; }
.msg.ia .bur { background: #fff; border: 1px solid var(--borde); border-bottom-left-radius: 5px; }
.msg.ia .bur table { border-collapse: collapse; margin: 8px 0; font-size: 13px; }
.msg.ia .bur td, .msg.ia .bur th { border: 1px solid var(--borde); padding: 4px 8px; }
.msg.ia .bur ul, .msg.ia .bur ol { margin: 6px 0; padding-left: 20px; }
.msg.ia .bur p:last-child { margin: 0; }
.msg .meta { font-size: 11.5px; color: var(--gris); margin: 4px 8px; }
.msg.sys { align-self: center; font-size: 12.5px; color: var(--gris); }
.herr { display: inline-flex; gap: 6px; align-items: center; font-size: 12px; background: #F3ECE6; color: var(--tinta-2); padding: 3px 9px; border-radius: 99px; margin: 2px 4px 2px 0; }
.propuesta { border: 1px solid #F3C9A9; background: #FFF6EE; border-radius: 14px; padding: 12px 14px; margin-top: 10px; }
.compositor { padding: 14px 24px 18px; background: #fff; border-top: 1px solid var(--borde); }
.compositor form { display: flex; gap: 10px; align-items: flex-end; max-width: 900px; margin: 0 auto; }
.compositor textarea { min-height: 46px; max-height: 180px; border-radius: 16px; }
.sugeridas { display: flex; gap: 8px; flex-wrap: wrap; max-width: 900px; margin: 0 auto 10px; }
.sugeridas button { border: 1px solid var(--borde-2); background: #fff; border-radius: 99px; padding: 6px 12px; font: 600 12.5px var(--f-ui); cursor: pointer; color: var(--tinta-2); }
.sugeridas button:hover { border-color: var(--rojo); color: var(--rojo-700); }
.escribiendo span { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--gris-2); margin-right: 3px; animation: esc 1.2s infinite; }
.escribiendo span:nth-child(2) { animation-delay: .2s; } .escribiendo span:nth-child(3) { animation-delay: .4s; }
@keyframes esc { 0%, 60%, 100% { transform: translateY(0); opacity: .5; } 30% { transform: translateY(-5px); opacity: 1; } }

/* ── galerones (granja) */
.galerones { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.gal { background: #fff; border: 1px solid var(--borde); border-radius: 18px; padding: 14px 16px; box-shadow: var(--sombra); color: var(--tinta); text-decoration: none !important; display: block; position: relative; }
.gal:hover { box-shadow: var(--sombra-2); }
.gal .cab { display: flex; align-items: center; gap: 8px; }
.gal .cl { font-weight: 800; font-size: 16px; }
.gal .mini { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px; margin-top: 10px; font-size: 12.5px; }
.gal .mini b { display: block; font-size: 17px; font-weight: 750; font-variant-numeric: tabular-nums; }
.gal.rojo { border-color: #F5C1BC; box-shadow: 0 0 0 3px #FDECEA; }
.gal.ambar { border-color: #F5DCA9; }
.barra-std { position: relative; height: 6px; background: #F0E7E0; border-radius: 4px; margin-top: 10px; }
.barra-std i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 4px; background: var(--yema); }
.barra-std u { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--tinta); }

/* ── login */
.login-pag { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.login-pag .lado { background: var(--side-bg); color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.login-pag .lado::after { content: ""; position: absolute; right: -120px; bottom: -120px; width: 420px; height: 420px; border-radius: 50%; background: var(--side-act); opacity: .18; }
.login-pag .lado h1 { font-family: var(--f-marca); font-size: 44px; font-weight: 600; }
.login-pag .form { display: flex; align-items: center; justify-content: center; padding: 40px 24px; }
.login-pag .form .card { width: 100%; max-width: 400px; }
.demo-users { font-size: 12.5px; background: var(--kraft-50); border: 1px dashed var(--kraft); border-radius: 12px; padding: 10px 12px; margin-top: 14px; }
.demo-users button { border: 0; background: transparent; color: var(--acc-700); font: 650 12.5px var(--f-ui); cursor: pointer; padding: 2px 0; text-decoration: underline; }

/* ── toast */
.toasts { position: fixed; right: 18px; bottom: 18px; z-index: 9999; display: flex; flex-direction: column; gap: 8px; }
.toast { background: var(--tinta); color: #fff; padding: 11px 16px; border-radius: 12px; font-size: 14px; box-shadow: var(--sombra-2); animation: entra .25s ease; max-width: 380px; }
.toast.ok { background: #0F6E3C; } .toast.error { background: #A3201A; }
@keyframes entra { from { transform: translateY(10px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ── responsivo */
@media (max-width: 1100px) { .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g-2-1, .g-3-2, .g-1-2 { grid-template-columns: minmax(0, 1fr); } .pos { grid-template-columns: 1fr; } .ticket { position: static; } }
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .side { position: fixed; left: 0; top: 0; bottom: 0; width: 270px; z-index: 100; transform: translateX(-100%); transition: transform .25s; }
  body.menu-abierto .side { transform: none; }
  body.menu-abierto .velo { display: block; position: fixed; inset: 0; background: rgba(20,10,8,.45); z-index: 90; }
  .top { padding: 0 14px; } .top .menu-btn { display: inline-flex; }
  .top .yo .txt { display: none; }
  .content { padding: 16px 16px 50px; }
  .g2, .g3 { grid-template-columns: minmax(0, 1fr); }
  .hero .in { grid-template-columns: 1fr; padding: 36px 20px 44px; } .hero h1 { font-size: 40px; }
  .franja .in { grid-template-columns: 1fr 1fr; }
  .st-nav nav { display: none; }
  .pie-st .in { grid-template-columns: 1fr 1fr; }
  .seg-card { grid-template-columns: 1fr; }
  .login-pag { grid-template-columns: 1fr; } .login-pag .lado { display: none; }
  .chat { grid-template-columns: 1fr; } .chat .hilos { display: none; }
  .mapa { height: 340px; } .mapa.alto { height: 420px; }
}
@media (max-width: 560px) { .g4 { grid-template-columns: 1fr 1fr; } .kpi .k-v { font-size: 21px; } .page-h h1 { font-size: 22px; } .st-nav .marca > svg { width: 34px; height: 34px; } .st-nav .marca .w svg { width: 78px; height: 15px; } .st-nav .marca { gap: 6px; } .pie-st .in { grid-template-columns: 1fr; } }
/* teléfono: que el logo y el carrito quepan sin scroll horizontal (el ícono del carrito basta) */
@media (max-width: 420px) { .st-nav .in { gap: 10px; padding: 10px 14px; } .st-nav .carrito-btn > span:not(.n) { display: none; } .st-nav .marca .s { font-size: 11px; padding: 1px 6px; } }
@media print { .side, .top, .no-print { display: none !important; } .app { display: block; } .content { padding: 0; } .card { box-shadow: none; } }
