/* fwc-domingo: FWC 2026 Retail Day app. Palette = finewinecelebration.com design system. */
:root {
  --sage: #b9c7ad; --sage-soft: #e3e9dc; --wine: #72283f; --wine-deep: #431925;
  --gold: #c5a151; --gold-soft: #ead69b; --paper: #f5f0e7; --card: #fffdf8;
  --ink: #2a1d20; --muted: #6f6266; --line: #e3d9c8; --ok: #3f6b3a; --warn: #9a5b12; --bad: #9b2335;
  --radius: 14px; --shadow: 0 1px 2px rgba(67,25,37,.08), 0 4px 14px rgba(67,25,37,.06);
  --font: "Avenir Next", Avenir, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { overflow-x: hidden; margin: 0; background: var(--paper); color: var(--ink); font-family: var(--font); font-size: 17px; line-height: 1.4; -webkit-text-size-adjust: 100%; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--wine); }
.wrap { max-width: 720px; margin: 0 auto; padding: 0 16px; }

/* top */
.top { position: sticky; top: 0; z-index: 20; background: var(--wine-deep); color: #fff; }
.top .wrap { display: flex; align-items: center; gap: 10px; min-height: 52px; }
.brand { font-weight: 700; letter-spacing: .02em; font-size: 17px; flex: 1; }
.brand small { display: block; font-weight: 500; font-size: 12px; color: var(--gold-soft); letter-spacing: .08em; text-transform: uppercase; }
.who { font-size: 13px; color: var(--gold-soft); background: none; border: 1px solid rgba(234,214,155,.5); border-radius: 999px; padding: 6px 12px; }
.clock { background: var(--gold); color: var(--wine-deep); font-size: 14px; font-weight: 600; text-align: center; padding: 7px 12px; }
.clock b { font-variant-numeric: tabular-nums; }
.clock.done { background: #d9cfc0; color: var(--muted); }
.testbar { background: #fff3cd; color: #6b4e00; font-size: 13px; text-align: center; padding: 5px 10px; border-bottom: 1px solid #f0dc9a; }

main { padding: 14px 0 110px; }
h1 { font-size: 24px; margin: 6px 0 10px; color: var(--wine-deep); }
h2 { font-size: 19px; margin: 18px 0 8px; color: var(--wine-deep); }
.sub { color: var(--muted); font-size: 15px; margin: 0 0 12px; }
.empty { text-align: center; color: var(--muted); padding: 30px 10px; }
.empty .big { font-size: 40px; display: block; margin-bottom: 8px; }

/* tabs */
.tabs { position: fixed; bottom: 0; left: 0; right: 0; z-index: 30; background: var(--card); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
.tabs .wrap { display: grid; grid-template-columns: repeat(4, 1fr); }
.tabs a { text-decoration: none; color: var(--muted); text-align: center; font-size: 12px; padding: 8px 0 9px; position: relative; }
.tabs a .ic { display: block; font-size: 22px; line-height: 1.2; }
.tabs a.on { color: var(--wine); font-weight: 600; }
.badge { position: absolute; top: 4px; left: 50%; margin-left: 8px; background: var(--wine); color: #fff; border-radius: 999px; font-size: 11px; min-width: 18px; padding: 1px 5px; font-weight: 700; }

/* search + chips */
.search { width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); font-size: 17px; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 10px 0 4px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 7px 13px; font-size: 14px; }
.chip.on { background: var(--wine); color: #fff; border-color: var(--wine); }

/* tables list */
.mesas { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; margin-top: 10px; }
.mesa-row { min-width: 0; display: flex; gap: 12px; align-items: center; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 12px 14px; text-decoration: none; color: inherit; }
.mesa-no { flex: none; width: 46px; height: 46px; border-radius: 12px; background: var(--sage-soft); color: var(--wine-deep); display: grid; place-items: center; font-weight: 700; font-size: 17px; }
.mesa-row .t { flex: 1; min-width: 0; }
.mesa-row .t b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mesa-row .t span { font-size: 13px; color: var(--muted); }
.prog { font-size: 12px; color: var(--ok); font-weight: 600; white-space: nowrap; }

/* wine card */
.vinos { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.vino { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px; display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 12px; min-width: 0; }
.vino .foto { width: 64px; height: 150px; display: flex; align-items: center; justify-content: center; }
.vino .foto img { max-width: 64px; max-height: 150px; object-fit: contain; }
.vino .foto.none img { width: 40px; opacity: .45; }
.vino h3 { margin: 0; font-size: 17px; line-height: 1.25; }
.vino .bodega { font-size: 14px; color: var(--muted); margin: 2px 0 4px; }
.vino .meta { font-size: 13px; color: var(--muted); }
.precio { margin: 8px 0 2px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px; }
.precio .was { text-decoration: line-through; color: var(--muted); font-size: 14px; }
.precio .now { font-size: 20px; font-weight: 700; color: var(--wine); }
.precio .ivu { font-size: 12px; color: var(--muted); }
.precio .socio { font-size: 13px; background: var(--gold-soft); color: var(--wine-deep); border-radius: 6px; padding: 1px 7px; font-weight: 600; }
.precio .unc { font-size: 12px; color: var(--muted); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.tag { font-size: 12px; border-radius: 6px; padding: 2px 8px; background: var(--sage-soft); color: var(--wine-deep); }
.tag.warn { background: #fbe7cf; color: var(--warn); font-weight: 600; }
.tag.bad { background: #f6d9dd; color: var(--bad); font-weight: 600; }
.tag.hot { background: #f2e6c4; color: #6b4e00; }
.acciones { grid-column: 1 / -1; display: grid; gap: 10px; border-top: 1px dashed var(--line); padding-top: 10px; }
.fila { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.btn { border: 1px solid var(--line); background: var(--card); border-radius: 10px; padding: 9px 13px; font-size: 15px; min-height: 42px; }
.btn.on { background: var(--sage); border-color: var(--sage); color: var(--wine-deep); font-weight: 600; }
.btn.primary { background: var(--wine); border-color: var(--wine); color: #fff; font-weight: 600; }
.btn.gold { background: var(--gold); border-color: var(--gold); color: var(--wine-deep); font-weight: 700; }
.btn.block { width: 100%; padding: 14px; font-size: 17px; }
.btn:disabled { opacity: .5; }
.gusto { display: flex; gap: 6px; flex-wrap: wrap; }
.gusto .btn { padding: 8px 11px; font-size: 14px; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--card); }
.qty button { border: 0; background: none; width: 44px; height: 42px; font-size: 22px; color: var(--wine); }
.qty span { min-width: 34px; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }
.nota { width: 100%; min-height: 64px; border: 1px solid var(--line); border-radius: 10px; padding: 10px; background: #fff; resize: vertical; }
.nudge { font-size: 13px; color: var(--wine-deep); background: var(--gold-soft); border-radius: 8px; padding: 6px 10px; }
.desc { background: var(--card); border-radius: var(--radius); padding: 12px 14px; font-size: 15px; color: var(--ink); box-shadow: var(--shadow); margin-bottom: 12px; }
.desc summary { cursor: pointer; font-weight: 600; color: var(--wine); }
.back { display: inline-block; margin: 2px 0 6px; text-decoration: none; font-size: 15px; }

/* suggestions */
.porque { font-size: 13px; color: var(--muted); margin-top: 4px; }
.vamos { display: inline-block; background: var(--wine-deep); color: #fff; border-radius: 8px; padding: 3px 9px; font-size: 13px; font-weight: 600; text-decoration: none; }

/* cart */
.linea { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 12px 14px; display: grid; grid-template-columns: 1fr auto; gap: 6px 10px; align-items: center; }
.linea .n { font-weight: 600; }
.linea .d { font-size: 13px; color: var(--muted); }
.linea .p { text-align: right; font-weight: 700; color: var(--wine); }
.lineas { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.totales { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 12px 14px; margin-top: 12px; }
.totales div { display: flex; justify-content: space-between; padding: 3px 0; }
.totales .tot { font-size: 20px; font-weight: 700; color: var(--wine-deep); border-top: 1px solid var(--line); margin-top: 6px; padding-top: 8px; }
.opcion { display: flex; gap: 10px; align-items: flex-start; background: var(--card); border: 2px solid var(--line); border-radius: 12px; padding: 12px; margin: 8px 0; }
.opcion.on { border-color: var(--wine); }
.opcion input { margin-top: 4px; width: 20px; height: 20px; accent-color: var(--wine); }
.campo { width: 100%; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; font-size: 17px; margin: 6px 0; }
label.lbl { font-size: 14px; color: var(--muted); display: block; margin-top: 10px; }
.aviso { background: #fbf3e2; border-left: 4px solid var(--gold); border-radius: 8px; padding: 10px 12px; font-size: 14px; margin: 10px 0; }
.err { background: #f6d9dd; color: var(--bad); border-radius: 8px; padding: 10px 12px; font-size: 15px; margin: 10px 0; }
.okbox { background: #e3eedc; color: var(--ok); border-radius: 8px; padding: 10px 12px; font-size: 15px; margin: 10px 0; }

/* modal (opens from the top: phone keyboards push bottom sheets away) */
.modal { position: fixed; inset: 0; z-index: 50; background: rgba(42,29,32,.55); display: flex; align-items: flex-start; justify-content: center; padding: 16px; overflow-y: auto; }
.sheet { background: var(--paper); border-radius: 18px; width: 100%; max-width: 480px; padding: 18px; box-shadow: 0 10px 40px rgba(0,0,0,.25); }
.sheet h2 { margin-top: 0; }
.sheet .cerrar { float: right; border: 0; background: none; font-size: 26px; line-height: 1; color: var(--muted); }
.check { display: flex; gap: 10px; align-items: flex-start; margin: 10px 0; font-size: 15px; }
.check input { width: 22px; height: 22px; flex: none; margin-top: 1px; accent-color: var(--wine); }
.codigo { font-size: 28px; letter-spacing: .3em; text-align: center; }
.toast { position: fixed; left: 50%; bottom: 84px; transform: translateX(-50%); background: var(--wine-deep); color: #fff; border-radius: 999px; padding: 10px 18px; font-size: 15px; z-index: 60; box-shadow: var(--shadow); max-width: 90vw; text-align: center; }
.pedido { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 12px 14px; margin-bottom: 10px; }
.estado { font-size: 12px; font-weight: 700; border-radius: 6px; padding: 2px 8px; text-transform: uppercase; letter-spacing: .04em; }
.estado.pendiente { background: #fbe7cf; color: var(--warn); }
.estado.pagado { background: #e3eedc; color: var(--ok); }
.estado.reembolsado, .estado.anulado { background: #eee; color: var(--muted); }
.loader { text-align: center; padding: 40px 0; color: var(--muted); }
@media (min-width: 720px) { .vino { grid-template-columns: 84px minmax(0, 1fr); } .vino .foto, .vino .foto img { width: 84px; max-width: 84px; } }
