/* Panel operativo — interfaz propia, minimalista (no comparte estilos con DD4GENT) */
:root {
  --bg: #ffffff;
  --side: #f9f9f8;
  --surface: #ffffff;
  --hover: #f0efed;
  --text: #1f1f1e;
  --muted: #73726e;
  --faint: #a3a29e;
  --border: #e8e7e4;
  --primary: #1f1f1e;
  --on-primary: #ffffff;
  --accent: #c96442;
  --ok: #2f7d4f;
  --ok-bg: #e9f4ee;
  --warn: #9a6a00;
  --warn-bg: #fbf3df;
  --danger: #b4321f;
  --danger-bg: #fbeceA;
  --shadow: 0 1px 2px rgba(0,0,0,.04), 0 4px 16px rgba(0,0,0,.06);
  --radius: 14px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1f1f1e; --side: #191918; --surface: #262624; --hover: #2f2f2d; --text: #ecebe8;
    --muted: #a3a29e; --faint: #73726e; --border: #34332f; --primary: #ecebe8; --on-primary: #1f1f1e;
    --accent: #d97757; --ok: #6cc28f; --ok-bg: #20332a; --warn: #e3b552; --warn-bg: #352d1a;
    --danger: #ef8a78; --danger-bg: #3a2420; --shadow: 0 1px 2px rgba(0,0,0,.3), 0 4px 16px rgba(0,0,0,.3);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #1f1f1e; --side: #191918; --surface: #262624; --hover: #2f2f2d; --text: #ecebe8;
  --muted: #a3a29e; --faint: #73726e; --border: #34332f; --primary: #ecebe8; --on-primary: #1f1f1e;
  --accent: #d97757; --ok: #6cc28f; --ok-bg: #20332a; --warn: #e3b552; --warn-bg: #352d1a;
  --danger: #ef8a78; --danger-bg: #3a2420; --shadow: 0 1px 2px rgba(0,0,0,.3), 0 4px 16px rgba(0,0,0,.3);
  color-scheme: dark;
}

* { box-sizing: border-box; }
[x-cloak] { display: none !important; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--bg); color: var(--text);
  font: 15px/1.55 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
h1, h2, h3 { font-weight: 600; letter-spacing: -.01em; margin: 0; }

/* ── Botones y campos ── */
.btn { text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--border);
  background: var(--surface); border-radius: 10px; padding: 8px 14px; font-size: 14px; transition: background .15s; }
.btn:hover { background: var(--hover); }
.btn-primary { background: var(--primary); color: var(--on-primary); border-color: var(--primary); }
.btn-primary:hover { background: var(--primary); opacity: .88; }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-danger { color: var(--danger); }
.btn-block { width: 100%; padding: 11px 14px; }
.btn:disabled { opacity: .45; cursor: default; }
.icon-btn { width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center;
  border: 0; background: transparent; border-radius: 10px; color: var(--muted); }
.icon-btn:hover { background: var(--hover); color: var(--text); }
.icon-btn svg, .nav svg { width: 18px; height: 18px; }
.field { width: 100%; border: 1px solid var(--border); background: var(--surface); border-radius: 10px;
  padding: 10px 12px; outline: none; transition: border-color .15s; }
.field:focus { border-color: var(--faint); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.field:focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
label.lbl { display: block; font-size: 13px; color: var(--muted); margin: 0 0 6px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.error { color: var(--danger); font-size: 13px; }

/* ── Pantallas centradas (login / onboarding) ── */
.center-screen { min-height: 100%; display: flex; align-items: center; justify-content: center; padding: 24px 16px; }
.auth { width: 100%; max-width: 360px; }
.mark { width: 56px; height: 44px; border-radius: 12px; background: var(--accent); margin: 0 auto 6px; font-size: 16px; letter-spacing: -.02em;
  display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 700; }
.auth h1 { font-size: 24px; text-align: center; margin-bottom: 6px; }
.auth .sub { text-align: center; color: var(--muted); margin-bottom: 28px; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.switch-link { text-align: center; font-size: 14px; color: var(--muted); margin-top: 18px; }
.switch-link button { border: 0; background: none; color: var(--text); text-decoration: underline; padding: 0; }

/* ── Layout principal ── */
.app { display: flex; height: 100dvh; }
.sidebar { width: 264px; flex: 0 0 264px; background: var(--side); border-right: 1px solid var(--border);
  display: flex; flex-direction: column; padding: 10px; transition: margin-left .2s ease; z-index: 30; }
.sidebar.closed { margin-left: -264px; }
.scrim { display: none; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; height: 100%; }
.topbar { height: 56px; flex: 0 0 56px; display: flex; align-items: center; gap: 8px; padding: 0 12px; }
.topbar .title { font-weight: 600; font-size: 15px; }
.topbar .spacer { flex: 1; }
.live { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.live i { width: 7px; height: 7px; border-radius: 50%; background: var(--faint); }
.live.on i { background: var(--ok); box-shadow: 0 0 0 3px var(--ok-bg); }
.content { flex: 1; overflow-y: auto; }
.wrap { max-width: 760px; margin: 0 auto; padding: 8px 20px 40px; }
.wrap-wide { max-width: 1080px; }

@media (max-width: 860px) {
  .sidebar { position: fixed; inset: 0 auto 0 0; box-shadow: var(--shadow); }
  .scrim { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.25); z-index: 20; }
  .sidebar.closed + .scrim { display: none; }
}

/* ── Sidebar ── */
.side-head { display: flex; align-items: center; gap: 6px; padding: 4px 4px 10px; }
.biz { flex: 1; min-width: 0; }
.biz-name { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.biz select { width: 100%; border: 0; background: transparent; font-weight: 600; font-size: 14px; padding: 0; outline: none; }
.nav { display: flex; flex-direction: column; gap: 2px; margin-top: 6px; }
.nav button { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: transparent;
  padding: 9px 10px; border-radius: 10px; font-size: 14px; color: var(--text); text-align: left; }
.nav button:hover { background: var(--hover); }
.nav button.active { background: var(--hover); font-weight: 600; }
.nav .count { margin-left: auto; font-size: 12px; background: var(--accent); color: #fff; border-radius: 999px;
  padding: 0 7px; min-width: 20px; text-align: center; }
.side-foot { margin-top: auto; position: relative; }
.me-btn { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: transparent;
  padding: 8px; border-radius: 12px; text-align: left; }
.me-btn:hover { background: var(--hover); }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--primary); color: var(--on-primary);
  display: inline-flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 600; flex: 0 0 32px; }
.me-name { font-size: 14px; font-weight: 500; line-height: 1.2; }
.me-role { font-size: 12px; color: var(--muted); }
.menu-pop { position: absolute; bottom: 52px; left: 0; right: 0; background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; box-shadow: var(--shadow); padding: 6px; }
.menu-pop button { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: transparent;
  padding: 9px 10px; border-radius: 8px; text-align: left; font-size: 14px; }
.menu-pop button:hover { background: var(--hover); }
.menu-pop hr { border: 0; border-top: 1px solid var(--border); margin: 4px 0; }

/* ── Inicio / asistente ── */
.home { min-height: 100%; display: flex; flex-direction: column; }
.hero { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px 20px 12vh; }
.hero h1 { font-size: clamp(26px, 4vw, 34px); font-weight: 500; text-align: center; margin-bottom: 6px; }
.hero h1 .spark { color: var(--accent); }
.hero .sub { color: var(--muted); margin-bottom: 28px; text-align: center; }
.composer { width: 100%; max-width: 720px; background: var(--surface); border: 1px solid var(--border); border-radius: 22px;
  box-shadow: var(--shadow); padding: 10px 10px 10px 18px; display: flex; align-items: flex-end; gap: 8px; }
.composer textarea { flex: 1; border: 0; outline: none; resize: none; background: transparent; padding: 8px 0;
  max-height: 160px; min-height: 24px; }
.send { width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--primary); color: var(--on-primary);
  display: inline-flex; align-items: center; justify-content: center; flex: 0 0 36px; }
.send:disabled { opacity: .3; cursor: default; }
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 16px; max-width: 720px; }
.chip { border: 1px solid var(--border); background: transparent; border-radius: 999px; padding: 7px 14px;
  font-size: 13.5px; color: var(--muted); }
.chip:hover { background: var(--hover); color: var(--text); }
.thread { flex: 1; max-width: 760px; width: 100%; margin: 0 auto; padding: 8px 20px 24px; display: flex; flex-direction: column; gap: 22px; }
.msg-user { align-self: flex-end; max-width: 80%; background: var(--hover); padding: 10px 16px; border-radius: 20px; }
.msg-user span { white-space: pre-wrap; }
.msg-bot { align-self: stretch; }
.msg-bot .body { white-space: normal; }
.msg-bot .body p { margin: 0 0 8px; }
.msg-bot .body ul { margin: 4px 0 8px; padding-left: 20px; }
.msg-bot .body li { margin: 2px 0; }
.msg-bot.typing .body { color: var(--muted); }
.dock { position: sticky; bottom: 0; background: linear-gradient(to bottom, transparent, var(--bg) 28%); padding: 16px 20px 18px;
  display: flex; flex-direction: column; align-items: center; }
.dock .chips { margin-top: 10px; }
.notice { max-width: 720px; width: 100%; margin: 0 auto 12px; background: var(--warn-bg); color: var(--warn);
  border-radius: 12px; padding: 10px 14px; font-size: 13.5px; }

/* ── Encabezados de sección ── */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin: 12px 0 18px; flex-wrap: wrap; }
.page-head h2 { font-size: 22px; }
.seg { display: inline-flex; background: var(--hover); border-radius: 12px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg button { border: 0; background: transparent; border-radius: 9px; padding: 6px 12px; font-size: 13.5px; color: var(--muted); }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(0,0,0,.08); font-weight: 500; }
.seg b { font-weight: 600; margin-left: 4px; }

/* ── Pedidos ── */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; }
.card.fresh { border-color: var(--accent); }
.order-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.order-num { font-size: 20px; font-weight: 600; }
.order-meta { font-size: 12.5px; color: var(--muted); }
.order-items { list-style: none; padding: 0; margin: 10px 0 12px; }
.order-items li { padding: 3px 0; }
.order-items .q { font-weight: 600; margin-right: 4px; }
.order-items .n { display: block; font-size: 13px; color: var(--warn); }
.order-note { font-size: 13px; background: var(--warn-bg); color: var(--warn); border-radius: 8px; padding: 6px 10px; margin-bottom: 12px; }
.order-actions { display: flex; gap: 8px; }
.order-actions .btn-primary { flex: 1; }
.empty { text-align: center; color: var(--muted); padding: 60px 20px; }
.empty .big { font-size: 28px; margin-bottom: 6px; }

/* ── Listas (caja, menú, equipo) ── */
.list { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.row { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--border); }
.row:first-child { border-top: 0; }
.row .grow { flex: 1; min-width: 0; }
.row .t { font-weight: 500; }
.row .s { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .amt { font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
.row.click { cursor: pointer; }
.row.click:hover { background: var(--hover); }
.group-title { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 22px 4px 8px; }
.pill { display: inline-block; font-size: 12px; border-radius: 999px; padding: 2px 9px; background: var(--hover); color: var(--muted); }
.pill.ok { background: var(--ok-bg); color: var(--ok); }
.pill.warn { background: var(--warn-bg); color: var(--warn); }
.totals { display: flex; gap: 28px; flex-wrap: wrap; margin-bottom: 18px; }
.totals div { font-size: 13px; color: var(--muted); }
.totals strong { display: block; font-size: 24px; font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; }
.pay-opts { display: flex; gap: 6px; flex-wrap: wrap; }

/* Interruptor */
.toggle { position: relative; width: 38px; height: 22px; flex: 0 0 38px; border-radius: 999px; border: 0;
  background: var(--border); transition: background .15s; }
.toggle::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%;
  background: #fff; transition: transform .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.toggle.on { background: var(--ok); }
.toggle.on::after { transform: translateX(16px); }

/* ── Reportes ── */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 18px; }
.kpi { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; }
.kpi .l { font-size: 13px; color: var(--muted); }
.kpi .v { font-size: 26px; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.bars { display: flex; align-items: flex-end; gap: 3px; height: 120px; padding-top: 8px; }
.bars div { flex: 1; background: var(--accent); border-radius: 3px 3px 0 0; min-height: 2px; opacity: .85; }
.bars-x { display: flex; justify-content: space-between; font-size: 11px; color: var(--faint); margin-top: 6px; }
.two { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; }

/* ── Diálogos ── */
.dialog-bg { position: fixed; inset: 0; background: rgba(0,0,0,.3); z-index: 50; display: flex; align-items: center;
  justify-content: center; padding: 16px; }
.dialog { background: var(--surface); border-radius: 18px; box-shadow: var(--shadow); width: 100%; max-width: 460px;
  max-height: 90vh; overflow-y: auto; padding: 22px; }
.dialog.lg { max-width: 760px; padding: 0; display: flex; min-height: 480px; }
.dialog h3 { font-size: 18px; margin-bottom: 16px; }
.dialog .foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }
.settings-nav { width: 190px; flex: 0 0 190px; border-right: 1px solid var(--border); padding: 18px 10px; }
.settings-nav h3 { padding: 0 10px; margin-bottom: 12px; }
.settings-body { flex: 1; padding: 22px; overflow-y: auto; min-width: 0; }
.settings-body h4 { font-size: 15px; margin: 0 0 4px; }
.settings-section + .settings-section { margin-top: 26px; }
@media (max-width: 640px) {
  .dialog.lg { flex-direction: column; }
  .settings-nav { width: auto; flex: none; border-right: 0; border-bottom: 1px solid var(--border); padding: 14px 10px 6px; }
  .settings-nav .nav { flex-direction: row; flex-wrap: wrap; }
  .settings-nav .nav button { width: auto; }
}
.code { font: 600 22px/1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: 4px; padding: 10px 14px;
  border: 1px dashed var(--border); border-radius: 10px; display: inline-block; }
.qr-box { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.qr-box img { width: 168px; height: 168px; background: #fff; border-radius: 12px; border: 1px solid var(--border); padding: 6px; }

/* ── Toast ── */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--primary); color: var(--on-primary);
  padding: 10px 18px; border-radius: 999px; font-size: 14px; box-shadow: var(--shadow); z-index: 60; max-width: 90vw; }
.toast.err { background: var(--danger); color: #fff; }

@media print {
  body * { visibility: hidden; }
  .print-area, .print-area * { visibility: visible; }
  .print-area { position: fixed; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
}

/* ── Código del comercio y equipo ── */
.biz-code { display: inline-flex; align-items: center; gap: 5px; margin-top: 3px; border: 0; background: transparent;
  padding: 0; font-size: 12px; color: var(--muted); }
.biz-code b { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: 1px; color: var(--text); font-weight: 600; }
.biz-code:hover { color: var(--text); }
.invite { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px 20px; }
.invite .grow { flex: 1; min-width: 240px; }
.invite .code { margin-top: 6px; }
.invite-actions { display: flex; flex-direction: column; gap: 8px; }
@media (max-width: 640px) { .invite-actions { flex-direction: row; flex-wrap: wrap; } }
.avatar.soft { background: var(--hover); color: var(--text); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--border); flex: 0 0 8px; }
.dot.on { background: var(--ok); box-shadow: 0 0 0 3px var(--ok-bg); }

/* ── Carta PDF e importación ── */
.pdf-bar { display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 6px 8px 6px 14px; margin-bottom: 8px; font-size: 14px; color: var(--muted); }
.pdf-bar .grow { flex: 1; }
.dialog.xl { max-width: 860px; }
.import-table { border: 1px solid var(--border); border-radius: 12px; max-height: 52vh; overflow-y: auto; }
.import-row { display: grid; grid-template-columns: 28px 1fr 1.6fr 120px; gap: 8px; align-items: start; padding: 8px 10px;
  border-top: 1px solid var(--border); }
.import-row:first-child { border-top: 0; }
.import-row.head { position: sticky; top: 0; background: var(--surface); font-size: 12px; color: var(--muted); z-index: 1; }
.import-row input[type=checkbox] { margin-top: 12px; }
.import-row .field { padding: 7px 10px; }
.import-row.off { opacity: .45; }
.field.warnf { border-color: var(--warn); background: var(--warn-bg); }
@media (max-width: 640px) { .import-row { grid-template-columns: 24px 1fr 96px; } .import-row > :nth-child(2) { display: none; } }

/* ── Mejoras de experiencia (2026-10-05) ── */
.live.warn i { background: var(--warn); }
.icon-btn.on { color: var(--accent); background: var(--hover); }
.icon-btn.danger:hover { color: var(--danger); }
.btn-lg { min-height: 46px; font-size: 15px; font-weight: 600; }
.btn-danger-solid { background: var(--danger); border-color: var(--danger); color: #fff; }
.action-card { margin-top: 10px; border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; display: flex;
  flex-direction: column; gap: 10px; background: var(--surface); }
.board { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; align-items: start; }
.board-col { background: var(--side); border-radius: 16px; padding: 10px; min-height: 60vh; }
.board-head { display: flex; justify-content: space-between; align-items: center; padding: 4px 6px 10px; font-weight: 600; }
.board-head b { font-size: 13px; background: var(--hover); border-radius: 999px; padding: 1px 9px; }
.stack-cards { display: flex; flex-direction: column; gap: 10px; }
.card.order .order-num { font-size: 24px; }
.card.order .order-items li { font-size: 16px; }
.card.order.slow { border-color: var(--warn); }
.card.order.slow .wait { color: var(--warn); font-weight: 600; }
.card.order.late { border-color: var(--danger); box-shadow: 0 0 0 1px var(--danger) inset; }
.card.order.late .wait { color: var(--danger); font-weight: 600; }
.card.fresh { animation: pop .5s ease; }
@keyframes pop { 0% { transform: scale(.97); } 60% { transform: scale(1.01); } 100% { transform: none; } }
@media (prefers-reduced-motion: reduce) { .card.fresh { animation: none; } }
.pill.src { margin-left: 6px; font-size: 11px; }
.empty svg { color: var(--faint); margin-bottom: 8px; }
.small-empty { padding: 28px 10px; font-size: 14px; }
.cash-row { flex-wrap: wrap; }
.pay-opts { display: flex; gap: 6px; flex-wrap: wrap; }
.menu-tools { display: flex; gap: 8px; flex-wrap: wrap; }
.menu-tools .field { width: 200px; }
@media (max-width: 640px) { .menu-tools { width: 100%; } .menu-tools .field { width: 100%; flex: 1 1 100%; } }
.row-main { flex: 1; min-width: 0; text-align: left; border: 0; background: none; padding: 0; cursor: pointer; }
.row-main:hover .t { text-decoration: underline; }
.row.dim .amt, .row.dim .row-main .s { opacity: .55; }
.toast.lift { bottom: calc(110px + env(safe-area-inset-bottom)); }

/* ── Plan y cupos del QR ── */
.plan-box { background: var(--side); border: 1px solid var(--border); border-radius: 14px; padding: 14px 16px; margin-bottom: 8px; }
.plan-box strong { font-size: 17px; }
.plan-box p { margin: 6px 0 0; }
.capacity { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 8px; }
.capacity i { width: 22px; height: 8px; border-radius: 4px; background: var(--hover); }
.capacity i.on { background: var(--ok); }

/* ── Demo / PRO ── */
.demo-cta { margin-top: 22px; padding: 16px; border: 1px solid var(--border); border-radius: 14px; background: var(--side);
  display: flex; flex-direction: column; gap: 6px; text-align: center; }
.demo-cta span { font-size: 13.5px; color: var(--muted); margin-bottom: 6px; }
.code-input { text-align: center; font: 600 24px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: 8px; }
.plan-bar { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 7px 14px; font-size: 13.5px; flex-wrap: wrap; }
.plan-bar.green { background: var(--ok-bg); color: var(--ok); }
.plan-bar.amber { background: var(--warn-bg); color: var(--warn); }
.plan-bar.red { background: var(--danger-bg); color: var(--danger); }
.btn-sm { padding: 4px 12px; font-size: 13px; border-radius: 999px; }
.lock { margin-left: auto; font-size: 10px; font-weight: 700; letter-spacing: .06em; padding: 1px 6px; border-radius: 6px;
  background: var(--hover); color: var(--muted); }
.kpi .lock { margin-left: 6px; }
.kpi.teaser { text-align: left; cursor: pointer; border-style: dashed; }
.kpi.teaser:hover { background: var(--hover); }
.kpi .blur { filter: blur(5px); color: var(--muted); user-select: none; }
.mini-bars { display: flex; align-items: flex-end; gap: 4px; height: 34px; filter: blur(2px); opacity: .6; margin-top: 4px; }
.mini-bars i { flex: 1; background: var(--accent); border-radius: 2px; }
.mini-bars i:nth-child(1) { height: 20%; } .mini-bars i:nth-child(2) { height: 45%; } .mini-bars i:nth-child(3) { height: 90%; }
.mini-bars i:nth-child(4) { height: 60%; } .mini-bars i:nth-child(5) { height: 30%; } .mini-bars i:nth-child(6) { height: 75%; }
.mini-bars i:nth-child(7) { height: 40%; }
.pdf-bar.warnbar { background: var(--warn-bg); color: var(--warn); border-color: transparent; }
.chip-strong { background: var(--primary); color: var(--on-primary); border-color: var(--primary); }
.chip-strong:hover { background: var(--primary); color: var(--on-primary); opacity: .88; }
.pro-list { margin: 0; padding-left: 20px; }
.pro-list li { margin: 4px 0; }
.wizard { position: fixed; inset: 0; z-index: 45; background: var(--bg); display: flex; align-items: center; justify-content: center;
  padding: 20px 16px; overflow-y: auto; }
.wizard-card { width: 100%; max-width: 480px; }
.wizard-card h2 { font-size: 24px; margin: 0 0 6px; font-weight: 600; }
.wizard-card .muted { margin: 0 0 18px; }
.wizard-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 28px; }
.wizard-steps i { height: 4px; border-radius: 2px; background: var(--hover); }
.wizard-steps i.on { background: var(--accent); }
.wiz-row { display: grid; grid-template-columns: 1fr 130px; gap: 8px; }
.wiz-row.done { padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; color: var(--muted); }
.wiz-row.done span:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.wiz-qr { width: 210px; height: 210px; background: #fff; border-radius: 16px; border: 1px solid var(--border); padding: 8px; margin: 0 auto 16px; display: block; }
.wiz-party { font-size: 56px; line-height: 1; margin-bottom: 10px; }

.brand-line { text-align: center; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 18px; }

/* ── Dos caminos: dueño / equipo ── */
.paths-title { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); text-align: center; margin: 26px 0 10px; }
.paths { display: grid; gap: 10px; }
.path { text-align: left; border: 1px solid var(--border); background: var(--surface); border-radius: 14px; padding: 14px 16px;
  display: flex; flex-direction: column; gap: 4px; transition: border-color .15s, background .15s; }
.path:hover { border-color: var(--faint); background: var(--side); }
.path strong { font-size: 15px; }
.path span { font-size: 13.5px; color: var(--muted); line-height: 1.4; }
.path em { font-style: normal; font-size: 13.5px; font-weight: 600; color: var(--accent); margin-top: 4px; }
.hint-box { background: var(--side); border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; font-size: 13.5px;
  color: var(--muted); margin-bottom: 14px; text-align: center; }
.hint-box button { border: 0; background: none; padding: 0; text-decoration: underline; color: var(--text); font-weight: 600; }

.import-row .field.desc { margin-top: 6px; font-size: 13.5px; color: var(--muted); resize: vertical; min-height: 44px; }

/* ── Aclaraciones del pedido (personal ↔ cliente) ── */
.order-chat { border-left: 3px solid var(--accent); padding: 4px 0 4px 10px; margin: 0 0 12px; font-size: 14px; display: grid; gap: 3px; }
.order-chat .oc b { font-weight: 600; font-size: 12.5px; color: var(--muted); margin-right: 4px; }
.order-chat .oc.customer span { font-weight: 600; }
.icon-btn { position: relative; }
.icon-btn.alert { color: var(--accent); background: var(--hover); }
.dot-badge { position: absolute; top: 2px; right: 2px; min-width: 16px; height: 16px; border-radius: 8px; background: var(--accent);
  color: #fff; font-size: 10px; font-weight: 700; line-height: 16px; text-align: center; padding: 0 4px; }
.thread-box { max-height: 38vh; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding: 4px 2px; }
.tb { max-width: 86%; padding: 8px 12px; border-radius: 14px; display: flex; flex-direction: column; gap: 2px; }
.tb small { font-size: 11px; color: var(--muted); }
.tb.staff { align-self: flex-end; background: var(--hover); }
.tb.customer { align-self: flex-start; border: 1px solid var(--border); }
