/* Pendi · estilos compartidos (app del mostrador y consulta del cliente).
   Base: demo-app-negocio.html + demo-design-system.html.
   Layout: una columna del ancho de un celular; encabezado fijo; las pantallas se intercambian abajo.
   Color: coral (marca/acción), menta = listo/pagado, ámbar = por recoger/pendiente; verde WhatsApp solo en lo de WhatsApp.
   Tipografía: Fredoka (logo y títulos), Nunito (texto), números tabulares para dinero. */
:root {
  --bg: #F5ECE6;
  --surface: #FFFFFF;
  --surface-2: #FBF5F1;
  --ink: #2E2A27;
  --muted: #6E6158;
  --line: #ECE0D8;
  --primary: #FF6F59;
  --primary-ink: #C6442F;
  --cta: #E24E2E;
  --ok: #0C8073;
  --ok-soft: #E0F3F0;
  --warn: #B9731A;
  --warn-soft: #FBEFDC;
  --wa: #1FA855;
  --wa-bubble: #D8FDD2;
  --wa-bubble-ink: #103623;
  --pill-neutral: #F0E7E0;
  --pill-neutral-ink: #7A6E66;
  --shadow: 0 1px 2px rgba(46,42,39,.06), 0 8px 24px rgba(46,42,39,.09);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #17120F;
    --surface: #241C18;
    --surface-2: #1D1611;
    --ink: #F3EBE4;
    --muted: #B3A69C;
    --line: #382E27;
    --primary: #FF8470;
    --primary-ink: #FF9D8C;
    --ok: #35C7B6;
    --ok-soft: #10332E;
    --warn: #E0A23E;
    --warn-soft: #33260F;
    --wa: #2CC265;
    --wa-bubble: #1C3A2A;
    --wa-bubble-ink: #D6F3DF;
    --pill-neutral: #2E241E;
    --pill-neutral-ink: #B8A99F;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 10px 28px rgba(0,0,0,.35);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #17120F;
  --surface: #241C18;
  --surface-2: #1D1611;
  --ink: #F3EBE4;
  --muted: #B3A69C;
  --line: #382E27;
  --primary: #FF8470;
  --primary-ink: #FF9D8C;
  --ok: #35C7B6;
  --ok-soft: #10332E;
  --warn: #E0A23E;
  --warn-soft: #33260F;
  --wa: #2CC265;
  --wa-bubble: #1C3A2A;
  --wa-bubble-ink: #D6F3DF;
  --pill-neutral: #2E241E;
  --pill-neutral-ink: #B8A99F;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 10px 28px rgba(0,0,0,.35);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Nunito", system-ui, -apple-system, sans-serif;
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto;
  height: env(safe-area-inset-top, 0px);
  background: var(--surface);
  z-index: 20;
}

.app {
  max-width: 460px;
  margin: 0 auto;
  min-height: 100%;
  background: var(--surface);
  display: flex;
  flex-direction: column;
}
@media (min-width: 540px) {
  .app {
    margin: 18px auto;
    min-height: calc(100% - 36px);
    border: 1px solid var(--line);
    border-radius: 22px;
    box-shadow: var(--shadow);
    overflow: hidden;
  }
  body::before { display: none; }
}

/* ---- Header ---- */
header {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 15;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.bar-inner {
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  padding-block: 12px;
}
.brand-row { display: flex; align-items: center; gap: 10px; }
.logo {
  width: 34px; height: 34px; border-radius: 10px; flex: none;
  display: grid; place-items: center;
  background: var(--primary); color: #fff;
}
.logo svg { width: 19px; height: 19px; }
.brand-text { min-width: 0; flex: 1; }
.wordmark {
  font-family: "Fredoka", system-ui, sans-serif;
  font-weight: 600; font-size: 22px; line-height: 1;
  letter-spacing: 0;
}
.sub { font-size: 12px; color: var(--muted); margin-top: 3px; }
.sub b { color: var(--ink); font-weight: 600; }
.demo-chip {
  font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--primary-ink); background: var(--pill-neutral);
  padding: 4px 8px; border-radius: 999px; flex: none;
}

.seg {
  display: flex; gap: 4px; margin-top: 12px;
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: 12px; padding: 4px;
}
.seg button {
  flex: 1; border: 0; background: transparent; cursor: pointer;
  font: inherit; font-weight: 600; font-size: 14px; color: var(--muted);
  padding: 8px 10px; border-radius: 9px; transition: background .15s, color .15s;
}
.seg button[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(17,42,49,.08); }

/* ---- Screens ---- */
main { flex: 1; }
.screen {
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  padding-block: 16px 28px;
}

.search { position: relative; margin-bottom: 12px; }
.search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 17px; height: 17px; color: var(--muted); }
.search input {
  width: 100%; font: inherit; color: var(--ink);
  padding: 11px 12px 11px 36px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--surface-2);
}
input, select, textarea { color: var(--ink); }
input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible, a:focus-visible {
  outline: 2px solid var(--primary); outline-offset: 2px;
}

.filters { display: flex; gap: 7px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 14px; scrollbar-width: none; }
.filters::-webkit-scrollbar { display: none; }
.chip {
  flex: none; border: 1px solid var(--line); background: var(--surface);
  color: var(--muted); font: inherit; font-weight: 600; font-size: 13px;
  padding: 7px 13px; border-radius: 999px; cursor: pointer; white-space: nowrap;
}
.chip[aria-pressed="true"] { background: var(--ink); color: var(--surface); border-color: var(--ink); }

.list { display: flex; flex-direction: column; gap: 10px; }
.note {
  width: 100%; text-align: left; cursor: pointer;
  background: var(--surface); border: 1px solid var(--line); border-radius: 15px;
  padding: 13px 14px; font: inherit; color: var(--ink);
  display: flex; flex-direction: column; gap: 9px;
}
.note:hover { border-color: var(--primary); }
.note-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.note-name { font-weight: 700; font-size: 15.5px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.folio { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; flex: none; }
.note-items { font-size: 13.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.note-foot { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.amount { margin-left: auto; font-weight: 700; font-variant-numeric: tabular-nums; }

.pill { font-size: 11.5px; font-weight: 700; padding: 4px 9px; border-radius: 999px; letter-spacing: .01em; white-space: nowrap; }
.pill.recibido { background: var(--pill-neutral); color: var(--pill-neutral-ink); }
.pill.listo { background: var(--ok-soft); color: var(--ok); }
.pill.entregado { background: var(--pill-neutral); color: var(--muted); }
.pill.pagado { background: var(--ok-soft); color: var(--ok); }
.pill.pendiente { background: var(--warn-soft); color: var(--warn); }
.badge-wait { font-size: 11.5px; font-weight: 700; padding: 4px 9px; border-radius: 999px; background: var(--warn-soft); color: var(--warn); }
.badge-wait.soft { background: var(--pill-neutral); color: var(--muted); }

.empty { text-align: center; color: var(--muted); padding: 40px 16px; font-size: 14px; }

/* Floating new-note button */
.fab {
  position: fixed; z-index: 14;
  right: max(18px, calc(env(safe-area-inset-right, 0px) + 18px));
  bottom: calc(env(safe-area-inset-bottom, 0px) + 18px);
  display: flex; align-items: center; gap: 8px;
  background: var(--cta); color: #fff; border: 0; cursor: pointer;
  font: inherit; font-weight: 700; font-size: 14.5px;
  padding: 13px 18px; border-radius: 999px; box-shadow: 0 8px 22px rgba(226,78,46,.42);
}
@media (min-width: 540px) { .fab { position: absolute; } }
.fab svg { width: 18px; height: 18px; }

/* ---- Forms ---- */
.screen h2 { font-family: "Fredoka", system-ui, sans-serif; font-weight: 600; font-size: 23px; margin: 2px 0 4px; text-wrap: balance; }
.screen .lead { color: var(--muted); font-size: 13.5px; margin: 0 0 18px; }
.back {
  display: inline-flex; align-items: center; gap: 6px; background: none; border: 0; cursor: pointer;
  font: inherit; font-weight: 600; color: var(--primary-ink); padding: 0; margin-bottom: 10px;
}
.back svg { width: 16px; height: 16px; }

.field { margin-bottom: 15px; }
.field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.field .hint { font-weight: 500; color: var(--muted); }
.field input, .field textarea, .field select {
  width: 100%; font: inherit; padding: 11px 12px; border: 1px solid var(--line);
  border-radius: 11px; background: var(--surface-2);
}
.field textarea { resize: vertical; min-height: 58px; }
.field.key input { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 6%, var(--surface-2)); }
.tag-new { font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #fff; background: var(--cta); padding: 2px 7px; border-radius: 999px; margin-left: 6px; vertical-align: middle; }

.add-row { display: flex; gap: 8px; }
.add-row select { flex: 1; min-width: 0; font: inherit; padding: 11px 12px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface-2); color: var(--ink); }
.add-btn { flex: none; font: inherit; font-weight: 700; font-size: 13.5px; cursor: pointer; border: 0; background: var(--primary); color: #fff; padding: 0 16px; border-radius: 11px; }
.cart { display: flex; flex-direction: column; gap: 7px; margin-top: 10px; }
.cart:empty { display: none; }
.ci { display: flex; align-items: center; gap: 10px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 11px; padding: 8px 10px; }
.ci-name { flex: 1; min-width: 0; font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ci-name span { display: block; font-size: 11.5px; color: var(--muted); font-weight: 500; }
.qty { display: flex; align-items: center; gap: 0; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; background: var(--surface); flex: none; }
.qty button { width: 40px; height: 38px; border: 0; background: transparent; color: var(--ink); font: inherit; font-size: 18px; cursor: pointer; line-height: 1; }
.qty span { min-width: 22px; text-align: center; font-size: 13.5px; font-weight: 700; font-variant-numeric: tabular-nums; }
.ci-tot { flex: none; font-size: 13.5px; font-weight: 700; font-variant-numeric: tabular-nums; min-width: 52px; text-align: right; }
.ci-rm { flex: none; border: 0; background: none; cursor: pointer; color: var(--muted); font-size: 18px; line-height: 1; padding: 8px 6px; }
.cart-sub { display: flex; justify-content: space-between; align-items: center; margin-top: 9px; padding-top: 9px; border-top: 1px dashed var(--line); font-size: 13.5px; }
.cart-sub b { font-variant-numeric: tabular-nums; }

.choice { display: flex; gap: 8px; }
.choice button {
  flex: 1; font: inherit; font-weight: 600; font-size: 13.5px; cursor: pointer;
  padding: 10px; border-radius: 11px; border: 1px solid var(--line); background: var(--surface-2); color: var(--muted);
}
.choice button[aria-pressed="true"] { border-color: var(--primary); color: var(--ink); background: color-mix(in srgb, var(--primary) 8%, var(--surface)); }

.btn-primary {
  width: 100%; font: inherit; font-weight: 700; font-size: 15px; cursor: pointer;
  background: var(--cta); color: #fff; border: 0; padding: 14px; border-radius: 13px; margin-top: 6px;
}
.btn-ghost {
  width: 100%; font: inherit; font-weight: 600; font-size: 14px; cursor: pointer;
  background: var(--surface); color: var(--ink); border: 1px solid var(--line); padding: 12px; border-radius: 12px;
}

/* ---- Detail ---- */
.detail-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 2px; }
.detail-head h2 { margin: 0; }
.meta-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; margin: 16px 0; padding: 14px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 14px; }
.meta-grid .full { grid-column: 1 / -1; }
.meta-k { font-size: 11.5px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 3px; }
.meta-v { font-size: 14.5px; font-weight: 600; }
.meta-v.money { font-variant-numeric: tabular-nums; }

.block-label { font-size: 12.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 20px 0 8px; }
.seg3 { display: flex; gap: 6px; }
.seg3 button {
  flex: 1; font: inherit; font-weight: 600; font-size: 13px; cursor: pointer;
  padding: 10px 6px; border-radius: 11px; border: 1px solid var(--line); background: var(--surface-2); color: var(--muted);
}
.seg3 button[aria-pressed="true"].s-recibido { background: var(--pill-neutral); color: var(--pill-neutral-ink); border-color: transparent; }
.seg3 button[aria-pressed="true"].s-listo { background: var(--ok); color: #fff; border-color: transparent; }
.seg3 button[aria-pressed="true"].s-entregado { background: var(--ink); color: var(--surface); border-color: transparent; }

/* WhatsApp simulation */
.wa {
  margin-top: 14px; border: 1px solid var(--line); border-radius: 15px; overflow: hidden;
  background: var(--surface-2);
}
.wa-top { display: flex; align-items: center; gap: 9px; padding: 9px 12px; background: var(--wa); color: #fff; }
.wa-top .av { width: 26px; height: 26px; border-radius: 50%; background: rgba(255,255,255,.25); display: grid; place-items: center; font-weight: 700; font-size: 12px; flex: none; }
.wa-top .nm { font-weight: 700; font-size: 13.5px; }
.wa-top .st { font-size: 10.5px; opacity: .85; }
.wa-body { padding: 14px 12px; display: flex; flex-direction: column; gap: 8px; }
.wa-bubble {
  align-self: flex-end; max-width: 88%;
  background: var(--wa-bubble); color: var(--wa-bubble-ink);
  padding: 9px 11px 7px; border-radius: 12px 12px 3px 12px;
  font-size: 13.5px; line-height: 1.4; box-shadow: 0 1px 1px rgba(0,0,0,.08);
}
.wa-bubble .t { display: block; font-size: 10px; text-align: right; opacity: .6; margin-top: 3px; }
.wa-bubble.arrive { animation: arrive .45s cubic-bezier(.2,.7,.3,1); }
@keyframes arrive { from { opacity: 0; transform: translateY(12px) scale(.95); } to { opacity: 1; transform: none; } }
.wa-stage { align-self: center; font-size: 10.5px; font-weight: 700; color: var(--muted); background: var(--surface); border: 1px solid var(--line); padding: 3px 10px; border-radius: 999px; margin: 4px 0 1px; }
.wa-cap { font-size: 11.5px; color: var(--muted); text-align: center; padding: 0 12px 11px; }
.btn-wa { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; margin-top: 12px; background: var(--wa); color: #fff; font-weight: 700; font-size: 14.5px; padding: 13px; border-radius: 12px; text-decoration: none; }
.btn-wa svg { width: 18px; height: 18px; }
.wa-live-note { font-size: 12px; color: var(--muted); margin-top: 8px; line-height: 1.4; text-align: center; }

.avisos { margin-top: 10px; display: flex; flex-direction: column; gap: 7px; }
.aviso { display: flex; align-items: center; gap: 9px; font-size: 13px; color: var(--muted); }
.aviso .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); flex: none; }
.aviso b { color: var(--ink); font-weight: 600; }
.msg-hint { font-size: 13px; color: var(--muted); background: var(--surface-2); border: 1px dashed var(--line); border-radius: 12px; padding: 12px; }
.msg-hint b { color: var(--ink); font-weight: 700; }
.wa-real { display: inline-flex; align-items: center; gap: 6px; margin-top: 12px; font-weight: 700; font-size: 13.5px; color: var(--primary-ink); text-decoration: none; }
.wa-real:hover { text-decoration: underline; }
.wa-real-note { font-size: 11.5px; color: var(--muted); margin-top: 4px; line-height: 1.4; }
.msg-hint.ok { background: var(--ok-soft); border-color: transparent; color: var(--ok); }
.msg-hint.ok b { color: var(--ok); }
.auto-note { font-size: 12px; color: var(--muted); margin-top: 12px; line-height: 1.4; }

/* Customer view */
/* Login */
.login-hero { text-align: center; padding: 18px 4px 20px; }
.login-hero .logo { width: 52px; height: 52px; border-radius: 15px; margin: 0 auto 14px; }
.login-hero .logo svg { width: 28px; height: 28px; }
.login-hero h2 { font-family: "Fredoka", system-ui, sans-serif; font-weight: 600; font-size: 23px; margin: 0 0 4px; }
.login-hero p { color: var(--muted); font-size: 14px; margin: 0; }
.users { display: flex; flex-direction: column; gap: 10px; margin-top: 4px; }
.user-btn {
  display: flex; align-items: center; gap: 13px; width: 100%; text-align: left; cursor: pointer;
  background: var(--surface); border: 1px solid var(--line); border-radius: 15px; padding: 14px; font: inherit; color: var(--ink);
}
.user-btn:hover { border-color: var(--primary); }
.user-av { width: 42px; height: 42px; border-radius: 50%; flex: none; display: grid; place-items: center; font-weight: 700; font-size: 16px; color: #fff; }
.user-meta { min-width: 0; flex: 1; }
.user-name { font-weight: 700; font-size: 15.5px; }
.user-role { font-size: 12.5px; color: var(--muted); }
.user-btn .go { color: var(--muted); }
.user-btn .go svg { width: 18px; height: 18px; }
.login-foot { text-align: center; color: var(--muted); font-size: 12px; margin-top: 18px; }
.signout { display: inline-flex; align-items: center; gap: 5px; background: none; border: 0; cursor: pointer; font: inherit; font-size: 12px; color: var(--muted); padding: 0; }
.captured-by { font-size: 12px; color: var(--muted); }
.captured-by b { color: var(--ink); font-weight: 600; }

.cust-hero { text-align: center; padding: 10px 4px 20px; }
.cust-hero .logo { width: 48px; height: 48px; border-radius: 14px; margin: 0 auto 12px; }
.cust-hero .logo svg { width: 26px; height: 26px; }
.cust-hero h2 { font-family: "Fredoka", system-ui, sans-serif; font-weight: 600; margin: 0 0 4px; }
.cust-hero p { color: var(--muted); font-size: 13.5px; margin: 0; }
.cust-form { display: flex; flex-direction: column; gap: 10px; }
.cust-hintline { font-size: 12px; color: var(--muted); text-align: center; margin-top: 2px; }
.cust-hintline button { background: none; border: 0; color: var(--primary-ink); font: inherit; font-weight: 700; cursor: pointer; padding: 0; }

.result { margin-top: 20px; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.result-head { padding: 16px; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.result-head .r-name { font-weight: 700; font-size: 16px; }
.result-head .r-folio { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; margin-top: 2px; }
.result-body { padding: 16px; }
.ready-banner { display: flex; align-items: center; gap: 10px; background: var(--ok-soft); color: var(--ok); border-radius: 12px; padding: 12px; font-weight: 700; font-size: 14.5px; margin-bottom: 16px; }
.ready-banner svg { width: 20px; height: 20px; flex: none; }
.wait-banner { background: var(--warn-soft); color: var(--warn); border-radius: 12px; padding: 12px; font-weight: 600; font-size: 13.5px; margin-bottom: 16px; }

.track { display: flex; flex-direction: column; gap: 0; margin: 4px 0 8px; }
.step { display: flex; gap: 12px; }
.step .rail { display: flex; flex-direction: column; align-items: center; }
.step .mark { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line); background: var(--surface); display: grid; place-items: center; flex: none; }
.step .mark svg { width: 12px; height: 12px; color: #fff; }
.step.done .mark { background: var(--ok); border-color: var(--ok); }
.step.current .mark { border-color: var(--primary); background: var(--primary); }
.step .line { width: 2px; flex: 1; background: var(--line); min-height: 20px; }
.step.done .line { background: var(--ok); }
.step .txt { padding-bottom: 18px; }
.step .txt .s-title { font-weight: 700; font-size: 14px; }
.step.pending .txt .s-title { color: var(--muted); font-weight: 600; }
.step .txt .s-when { font-size: 12px; color: var(--muted); margin-top: 1px; }
.r-pay { display: flex; align-items: center; justify-content: space-between; padding-top: 12px; border-top: 1px solid var(--line); margin-top: 6px; }
.r-pay .k { font-size: 13px; color: var(--muted); }
.r-pay .amount { font-size: 15px; }

.toast {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: calc(env(safe-area-inset-bottom, 0px) + 84px);
  background: var(--ink); color: var(--surface); font-weight: 600; font-size: 13.5px;
  padding: 11px 18px; border-radius: 999px; z-index: 30; box-shadow: var(--shadow);
  opacity: 0; transition: opacity .2s, transform .2s; pointer-events: none;
}
.toast.show { opacity: 1; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* =================== Agregados para la app real (Fase 1) =================== */
[hidden] { display: none !important; }
button:disabled, .btn-primary:disabled { opacity: .55; cursor: default; }
.seg .count {
  display: inline-block; min-width: 19px; margin-left: 5px; padding: 1px 6px; border-radius: 999px;
  background: var(--cta); color: #fff; font-size: 11px; font-weight: 800; line-height: 1.5;
}
.seg .count:empty { display: none; }
.sub .signout { text-decoration: underline; }

.msg-err { background: color-mix(in srgb, var(--cta) 10%, var(--surface)); color: var(--primary-ink); border: 1px solid color-mix(in srgb, var(--cta) 30%, transparent); border-radius: 12px; padding: 11px 12px; font-size: 13.5px; font-weight: 600; margin-bottom: 12px; }
.msg-ok { background: var(--ok-soft); color: var(--ok); border-radius: 12px; padding: 11px 12px; font-size: 13.5px; font-weight: 600; margin-bottom: 12px; }
.small { font-size: 12.5px; color: var(--muted); }
.center { text-align: center; }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; font-weight: 700; color: var(--primary-ink); cursor: pointer; }
.linkbtn.danger { color: var(--cta); }
.stack { display: flex; flex-direction: column; gap: 10px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mt { margin-top: 14px; }

.check { display: flex; align-items: flex-start; gap: 10px; font-size: 13.5px; cursor: pointer; padding: 4px 0; }
.check input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--ok); flex: none; }
.check .hint { color: var(--muted); font-weight: 500; }

.quick { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.quick .chip { padding: 6px 11px; font-size: 12.5px; }

.pill.sinaviso { background: var(--pill-neutral); color: var(--muted); }
.badge-wait.late { background: color-mix(in srgb, var(--cta) 14%, var(--surface)); color: var(--primary-ink); }

.cargando { text-align: center; color: var(--muted); padding: 30px 10px; font-size: 13.5px; }
.refresh { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: var(--muted); margin: -4px 0 10px; }

/* Menú "Más" */
.menu { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 15px; overflow: hidden; }
.menu-item {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; cursor: pointer;
  background: var(--surface); border: 0; border-bottom: 1px solid var(--line); padding: 14px; font: inherit; color: var(--ink);
}
.menu-item:last-child { border-bottom: 0; }
.menu-item .mi-ico { width: 34px; height: 34px; border-radius: 10px; background: var(--surface-2); display: grid; place-items: center; flex: none; color: var(--primary-ink); }
.menu-item .mi-ico svg { width: 18px; height: 18px; }
.menu-item .mi-txt { flex: 1; min-width: 0; }
.menu-item .mi-t { font-weight: 700; display: block; }
.menu-item .mi-s { font-size: 12.5px; color: var(--muted); display: block; }

.linkbox { display: flex; gap: 8px; align-items: center; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; font-size: 13px; word-break: break-all; }
.btn-row { display: flex; gap: 8px; margin-top: 10px; }
.btn-row > * { flex: 1; }
.btn-small { font: inherit; font-weight: 700; font-size: 13.5px; cursor: pointer; padding: 10px 12px; border-radius: 11px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); text-align: center; text-decoration: none; }
.code-big { font-family: "Fredoka", system-ui, sans-serif; font-size: 30px; font-weight: 600; letter-spacing: .18em; text-align: center; padding: 10px; background: var(--surface-2); border: 1px dashed var(--line); border-radius: 12px; }

/* Avisos pendientes */
.aviso-card { border: 1px solid var(--line); border-radius: 15px; padding: 13px 14px; display: flex; flex-direction: column; gap: 8px; }
.aviso-card .ac-top { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.aviso-card .ac-msg { font-size: 13px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.aviso-card .btn-wa { margin-top: 2px; padding: 11px; font-size: 14px; }
.btn-wa.off { background: var(--pill-neutral); color: var(--muted); pointer-events: none; }

/* Historial de avisos en el detalle */
.hist { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; }
.hist details { border: 1px solid var(--line); border-radius: 11px; padding: 9px 11px; background: var(--surface-2); }
.hist summary { cursor: pointer; font-size: 13px; color: var(--muted); list-style: none; display: flex; gap: 8px; align-items: center; }
.hist summary::-webkit-details-marker { display: none; }
.hist summary b { color: var(--ink); font-weight: 700; }
.hist .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); flex: none; }
.hist p { margin: 8px 0 0; font-size: 13px; white-space: pre-wrap; }

/* Catálogo */
.cat-group { margin-bottom: 16px; }
.cat-group h3 { font-family: "Fredoka", system-ui, sans-serif; font-weight: 600; font-size: 17px; margin: 0 0 8px; }
.cat-row { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; cursor: pointer; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 11px 12px; font: inherit; color: var(--ink); margin-bottom: 7px; }
.cat-row .cr-n { flex: 1; min-width: 0; font-weight: 600; }
.cat-row .cr-n span { display: block; font-size: 12px; color: var(--muted); font-weight: 500; }
.cat-row .cr-p { font-weight: 700; font-variant-numeric: tabular-nums; }
.cat-row.off { opacity: .55; }

/* Mensajes (plantillas) */
.tpl { border: 1px solid var(--line); border-radius: 14px; padding: 12px; margin-bottom: 12px; }
.tpl-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 8px; }
.tpl-head b { font-size: 14px; }
.tpl textarea { width: 100%; font: inherit; font-size: 13.5px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); min-height: 92px; resize: vertical; }
.tpl .dias { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); }
.tpl .dias input { width: 64px; font: inherit; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); }
.vars { font-size: 12px; color: var(--muted); background: var(--surface-2); border: 1px dashed var(--line); border-radius: 12px; padding: 10px 12px; margin-bottom: 14px; }
.vars code { font-size: 11.5px; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 1px 5px; }

/* Consulta del cliente: varios pedidos */
.wa-bubble { overflow-wrap: anywhere; white-space: pre-wrap; }
.results { display: flex; flex-direction: column; gap: 14px; }
.results .result { margin-top: 0; }
.contacto { display: block; text-align: center; margin-top: 18px; font-weight: 700; color: var(--primary-ink); text-decoration: none; font-size: 13.5px; }
.privacidad { font-size: 11.5px; color: var(--muted); text-align: center; margin-top: 22px; line-height: 1.45; }
