/* Gestión Lu & Alé Kids — estilos (móvil primero) */
:root {
  --bg: #FBF7F2;
  --surface: #FFFFFF;
  --surface-2: #F4EFE7;
  --ink: #2E3529;
  --ink-2: #565F50;
  --muted: #868B7E;
  --line: #E8E1D5;
  --sage: #7C8B6A;
  --sage-dark: #56664A;
  --sage-soft: #E9EEE2;
  --rose: #D08487;
  --rose-dark: #A85A5E;
  --rose-soft: #F8E8E6;
  --gold: #C79A45;
  --gold-soft: #F7EEDB;
  --forest: #3F6B53;
  --danger: #B04A46;
  --danger-soft: #F7E2E0;
  --shadow: 0 1px 2px rgba(46, 53, 41, .06), 0 4px 14px rgba(46, 53, 41, .06);
  --radius: 16px;
  --tabbar-h: 64px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.4 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
}
h1, h2, h3 { margin: 0; line-height: 1.2; }
p { margin: 0 0 .6em; }
a { color: var(--sage-dark); }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.center { text-align: center; }
.strong { font-weight: 650; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.mt { margin-top: 14px; }
.mb { margin-bottom: 14px; }
.stack > * + * { margin-top: 12px; }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.grow { flex: 1 1 auto; min-width: 0; }
.money { font-variant-numeric: tabular-nums; white-space: nowrap; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- vista general ---------- */
.view {
  max-width: 760px;
  margin: 0 auto;
  padding: calc(var(--safe-t) + 8px) 16px calc(var(--tabbar-h) + var(--safe-b) + 24px);
  min-height: 100vh;
}
.view.has-footer { padding-bottom: calc(var(--tabbar-h) + var(--safe-b) + 112px); }
.view.wide { max-width: 1200px; }
.loading { padding: 60px 0; text-align: center; color: var(--muted); }

.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 8px;
  margin: 0 -16px 12px; padding: calc(var(--safe-t) + 10px) 16px 10px;
  background: rgba(251, 247, 242, .94);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar h1 { font-size: 1.25rem; font-weight: 700; flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar .sub { display: block; font-size: .8rem; font-weight: 500; color: var(--muted); margin-top: 2px; }
.icon-btn {
  width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--surface); display: inline-grid; place-items: center; cursor: pointer; flex: 0 0 auto;
  font-size: 1.2rem; line-height: 1; color: var(--ink);
}
.icon-btn:active { transform: scale(.97); }

.section-title { font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 22px 2px 10px; }
.section-title:first-child { margin-top: 6px; }

/* ---------- tarjetas ---------- */
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 14px;
}
.card + .card { margin-top: 10px; }
.card.flat { box-shadow: none; }
.card.soft { background: var(--surface-2); box-shadow: none; }
.card h3 { font-size: 1rem; }
.empty { text-align: center; color: var(--muted); padding: 34px 12px; border: 1.5px dashed var(--line); border-radius: var(--radius); }

/* ---------- botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 10px 16px; border-radius: 13px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  font-weight: 650; text-decoration: none; cursor: pointer; user-select: none;
  transition: transform .08s ease, background .15s ease;
}
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--sage-dark); border-color: var(--sage-dark); color: #fff; }
.btn-primary:active { background: #4A5940; }
.btn-rose { background: var(--rose-dark); border-color: var(--rose-dark); color: #fff; }
.btn-soft { background: var(--sage-soft); border-color: transparent; color: var(--sage-dark); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--sage-dark); }
.btn-danger { background: var(--danger-soft); border-color: transparent; color: var(--danger); }
.btn-sm { min-height: 36px; padding: 6px 12px; font-size: .9rem; border-radius: 10px; }
.btn-lg { min-height: 54px; font-size: 1.05rem; }
.btn-block { display: flex; width: 100%; }
.btn-row { display: flex; gap: 10px; }
.btn-row > .btn { flex: 1 1 0; }

/* ---------- formularios ---------- */
.field { display: block; }
.field > span { display: block; font-size: .85rem; font-weight: 600; color: var(--ink-2); margin: 0 0 6px 2px; }
.field input, .field select, .field textarea, .input {
  width: 100%; min-height: 48px; padding: 11px 13px; border-radius: 12px;
  border: 1.5px solid var(--line); background: var(--surface); outline: none;
  font-size: 16px; /* evita zoom en iPhone */
}
.field textarea { min-height: 76px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus, .input:focus { border-color: var(--sage); box-shadow: 0 0 0 3px var(--sage-soft); }
.field .hint { display: block; font-size: .8rem; color: var(--muted); margin: 5px 2px 0; }
.field .warn { color: #8A5A12; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.check { display: flex; align-items: center; gap: 10px; min-height: 44px; cursor: pointer; }
.check input { width: 22px; height: 22px; accent-color: var(--sage-dark); flex: 0 0 auto; }
.search { position: relative; }
.search input { padding-left: 40px; }
.search::before { content: "⌕"; position: absolute; left: 14px; top: 50%; transform: translateY(-52%); font-size: 1.3rem; color: var(--muted); }

/* ---------- avisos ---------- */
.alert { border-radius: 12px; padding: 11px 13px; font-size: .92rem; }
.alert p:last-child { margin: 0; }
.alert-error { background: var(--danger-soft); color: #7D2C29; }
.alert-warn { background: var(--gold-soft); color: #6E4F10; }
.alert-info { background: var(--sage-soft); color: var(--sage-dark); }

/* ---------- chips y segmentos ---------- */
.chips { display: flex; align-items: center; gap: 8px; overflow-x: auto; padding: 2px 0 6px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto; min-height: 38px; padding: 7px 14px; border-radius: 999px; border: 1.5px solid var(--line);
  background: var(--surface); font-weight: 600; font-size: .92rem; cursor: pointer; white-space: nowrap;
}
.chip.on { background: var(--sage-dark); border-color: var(--sage-dark); color: #fff; }
.chip.add { border-style: dashed; color: var(--sage-dark); }
.seg { display: flex; background: var(--surface-2); border-radius: 13px; padding: 4px; gap: 4px; }
.seg button { flex: 1 1 0; min-height: 40px; border: 0; border-radius: 10px; background: transparent; font-weight: 650; cursor: pointer; color: var(--ink-2); }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }

/* ---------- etiquetas de estado ---------- */
.pill { display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: .75rem; font-weight: 700; white-space: nowrap; }
.st-pendiente { background: var(--gold-soft); color: #7A5410; }
.st-preparando { background: var(--rose-soft); color: var(--rose-dark); }
.st-listo { background: #DCEEDD; color: #2D6A43; }
.st-entregado { background: var(--surface-2); color: var(--muted); }
.st-anulado { background: var(--danger-soft); color: var(--danger); }
.st-juego { background: #E5EEF2; color: #3A6274; }
.st-incluido { background: var(--sage-soft); color: var(--sage-dark); }

/* ---------- barra inferior ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  display: flex; justify-content: space-around;
  height: calc(var(--tabbar-h) + var(--safe-b)); padding-bottom: var(--safe-b);
  background: rgba(255, 255, 255, .96); border-top: 1px solid var(--line);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.tabbar a {
  position: relative; flex: 1 1 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: var(--muted); text-decoration: none; font-size: .7rem; font-weight: 650;
}
.tabbar a.on { color: var(--sage-dark); }
.ti { width: 25px; height: 25px; background: currentColor; -webkit-mask: var(--i) center / contain no-repeat; mask: var(--i) center / contain no-repeat; }
.ti-salon { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 9h12v5a5 5 0 0 1-5 5H9a5 5 0 0 1-5-5z'/%3E%3Cpath d='M16 10h1.5a2.5 2.5 0 0 1 0 5H16'/%3E%3Cpath d='M8 3c0 1.5 1.5 1.5 1.5 3M12 3c0 1.5 1.5 1.5 1.5 3'/%3E%3C/svg%3E"); }
.ti-prep { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 17h18'/%3E%3Cpath d='M5 17a7 7 0 0 1 14 0'/%3E%3Cpath d='M12 7V5M10 5h4'/%3E%3Cpath d='M4 20h16'/%3E%3C/svg%3E"); }
.ti-juegos { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='12' width='8' height='8' rx='1.5'/%3E%3Crect x='13' y='12' width='8' height='8' rx='1.5'/%3E%3Crect x='8' y='3' width='8' height='8' rx='1.5'/%3E%3Cpath d='m12 5.3.7 1.4 1.5.2-1.1 1 .3 1.5-1.4-.7-1.4.7.3-1.5-1.1-1 1.5-.2z'/%3E%3C/svg%3E"); }
.ti-facturas { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 3h12v18l-2-1.3-2 1.3-2-1.3-2 1.3-2-1.3L6 21z'/%3E%3Cpath d='M9 8h6M9 12h6M9 16h3'/%3E%3C/svg%3E"); }
.ti-mas { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M8 12h.01M12 12h.01M16 12h.01' stroke-width='2.6'/%3E%3C/svg%3E"); }
.badge {
  position: absolute; top: 6px; left: calc(50% + 6px); min-width: 19px; height: 19px; padding: 0 5px;
  border-radius: 999px; background: var(--rose-dark); color: #fff; font-size: .7rem; font-weight: 800;
  display: grid; place-items: center; border: 2px solid #fff;
}
.badge.alert-badge { background: var(--danger); }

/* ---------- aviso superior (playground) ---------- */
.banner {
  position: fixed; left: 10px; right: 10px; top: calc(var(--safe-t) + 8px); z-index: 60;
  max-width: 740px; margin: 0 auto; padding: 12px 14px; border-radius: 14px;
  background: var(--danger); color: #fff; font-weight: 650; box-shadow: 0 8px 24px rgba(0,0,0,.18);
  display: flex; align-items: center; gap: 10px; cursor: pointer;
}
.banner .grow { line-height: 1.3; }
.banner .strong { white-space: nowrap; }

/* ---------- salón ---------- */
.tables-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 620px) { .tables-grid { grid-template-columns: repeat(3, 1fr); } }
.tcard {
  display: flex; flex-direction: column; justify-content: space-between; min-height: 116px; padding: 13px;
  border-radius: var(--radius); border: 1.5px solid var(--line); background: var(--surface);
  text-align: left; cursor: pointer; box-shadow: var(--shadow); width: 100%;
}
.tcard .tname { font-weight: 750; font-size: 1.05rem; }
.tcard.free { background: transparent; border-style: dashed; box-shadow: none; color: var(--muted); }
.tcard.free .tname { color: var(--ink-2); }
.tcard.busy { border-color: var(--sage); background: linear-gradient(180deg, #fff, #F6F8F2); }
.tcard .tlabel { font-size: .85rem; color: var(--ink-2); margin-top: 2px; }
.tcard .tfoot { display: flex; align-items: flex-end; justify-content: space-between; gap: 6px; margin-top: 10px; }
.tcard .ttotal { font-size: 1.15rem; font-weight: 800; }
.tcard .ticons { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.mini { display: inline-flex; align-items: center; gap: 3px; padding: 2px 7px; border-radius: 999px; font-size: .74rem; font-weight: 700; }
.mini.kids { background: #E5EEF2; color: #3A6274; }
.mini.ready { background: #DCEEDD; color: #2D6A43; }
.mini.prep { background: var(--gold-soft); color: #7A5410; }
.mini.over { background: var(--danger); color: #fff; }

.acc-list .acc { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; cursor: pointer; }

/* ---------- cuenta ---------- */
.group { margin-top: 14px; }
.group-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 0 2px 6px; }
.group-head h3 { font-size: .95rem; }
.item {
  display: flex; gap: 10px; align-items: flex-start; padding: 11px 12px; border-top: 1px solid var(--line);
  background: var(--surface); cursor: pointer; width: 100%; text-align: left; border-left: 0; border-right: 0; border-bottom: 0;
}
.item:first-child { border-top: 0; }
.items { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); }
.item .q { font-weight: 800; min-width: 26px; color: var(--sage-dark); }
.item .nm { font-weight: 650; }
.item .op { font-size: .82rem; color: var(--ink-2); margin-top: 2px; }
.item .nt { font-size: .82rem; color: var(--rose-dark); margin-top: 2px; font-style: italic; }
.item .meta { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.item.void .nm, .item.void .money { text-decoration: line-through; color: var(--muted); }

.footer-bar {
  position: fixed; left: 0; right: 0; bottom: calc(var(--tabbar-h) + var(--safe-b)); z-index: 30;
  background: rgba(255,255,255,.97); border-top: 1px solid var(--line); padding: 10px 16px 12px;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.footer-bar .inner { max-width: 728px; margin: 0 auto; }
.totals-line { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.totals-line .big { font-size: 1.35rem; font-weight: 800; }

/* ---------- menú (agregar) ---------- */
.prod {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; cursor: pointer;
  padding: 12px 13px; background: var(--surface); border: 0; border-top: 1px solid var(--line);
}
.prod:first-child { border-top: 0; }
.prod .pn { font-weight: 650; }
.prod .pd { font-size: .8rem; color: var(--muted); margin-top: 2px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.prod .pp { font-weight: 750; }
.prod.off { opacity: .45; cursor: not-allowed; }
.prod .plus { width: 34px; height: 34px; border-radius: 10px; background: var(--sage-soft); color: var(--sage-dark); display: grid; place-items: center; font-weight: 800; font-size: 1.2rem; flex: 0 0 auto; }
.cat-title { font-size: .8rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 18px 2px 8px; scroll-margin-top: 150px; }
.sticky-tools { position: sticky; top: calc(var(--safe-t) + 63px); z-index: 15; background: var(--bg); margin: 0 -16px; padding: 4px 16px 8px; }

.opt-group { margin-top: 16px; }
.opt-group h4 { margin: 0 0 8px; font-size: .95rem; display: flex; justify-content: space-between; gap: 8px; }
.opt-group h4 small { font-weight: 600; color: var(--muted); }
.opts { display: flex; flex-wrap: wrap; gap: 8px; }
.opt { min-height: 42px; padding: 8px 13px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--surface); cursor: pointer; font-weight: 600; }
.opt.on { border-color: var(--sage-dark); background: var(--sage-soft); color: var(--sage-dark); }
.opt small { color: var(--muted); font-weight: 600; margin-left: 4px; }
.stepper { display: inline-flex; align-items: center; border: 1.5px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--surface); }
.stepper button { width: 44px; height: 44px; border: 0; background: transparent; font-size: 1.3rem; font-weight: 700; cursor: pointer; color: var(--sage-dark); }
.stepper span { min-width: 34px; text-align: center; font-weight: 800; }

/* ---------- hoja inferior ---------- */
.sheet-wrap { position: fixed; inset: 0; z-index: 80; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(30, 34, 27, .42); animation: fade .15s ease; }
.sheet {
  position: absolute; left: 0; right: 0; bottom: 0; max-height: 92vh; overflow-y: auto; -webkit-overflow-scrolling: touch;
  background: var(--bg); border-radius: 22px 22px 0 0; padding: 6px 16px calc(18px + var(--safe-b));
  max-width: 640px; margin: 0 auto; animation: up .2s ease; box-shadow: 0 -10px 30px rgba(0,0,0,.12);
}
.sheet-grip { width: 42px; height: 5px; border-radius: 3px; background: var(--line); margin: 6px auto 10px; }
.sheet h2 { font-size: 1.2rem; margin-bottom: 4px; }
.sheet .sheet-actions { position: sticky; bottom: calc(-18px - var(--safe-b)); background: var(--bg); padding: 12px 0 calc(4px + var(--safe-b)); margin-top: 16px; }
.menu-list { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--surface); }
.menu-list button, .menu-list a {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 52px; padding: 12px 14px; border: 0;
  border-top: 1px solid var(--line); background: transparent; text-align: left; cursor: pointer; font-weight: 600; text-decoration: none; color: var(--ink);
}
.menu-list > :first-child { border-top: 0; }
.menu-list .danger { color: var(--danger); }
.menu-list .chev { margin-left: auto; color: var(--muted); }
@keyframes up { from { transform: translateY(40px); opacity: .4; } to { transform: none; opacity: 1; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@media (min-width: 700px) {
  .sheet { bottom: auto; top: 50%; transform: translateY(-50%); border-radius: 22px; max-height: 86vh; animation: fade .15s ease; }
  .sheet .sheet-actions { bottom: -18px; }
}

/* ---------- aviso flotante ---------- */
.toast {
  position: fixed; left: 0; right: 0; bottom: calc(var(--tabbar-h) + var(--safe-b) + 18px); z-index: 90;
  width: max-content; max-width: min(520px, calc(100% - 32px)); margin: 0 auto; padding: 12px 16px; border-radius: 14px;
  background: #2E3529; color: #fff; font-weight: 600; text-align: center; box-shadow: 0 8px 26px rgba(0,0,0,.22); animation: up .2s ease;
}
#view.has-footer ~ .toast { bottom: calc(var(--tabbar-h) + var(--safe-b) + 128px); }
.toast.error { background: var(--danger); }

/* ---------- playground ---------- */
.kid { display: flex; gap: 12px; align-items: center; }
.kid + .kid { margin-top: 10px; }
.kid .who { font-weight: 750; font-size: 1.05rem; }
.timer { font-variant-numeric: tabular-nums; font-weight: 800; font-size: 1.6rem; letter-spacing: -.02em; text-align: right; line-height: 1.1; }
.timer small { display: block; font-size: .72rem; font-weight: 700; letter-spacing: 0; color: var(--muted); }
.timer.soon { color: #A86F0C; }
.timer.over { color: var(--danger); }
.card.over { border-color: var(--danger); background: #FFF7F6; }
.card.soon { border-color: var(--gold); }
.progress { height: 6px; background: var(--surface-2); border-radius: 4px; overflow: hidden; margin-top: 10px; }
.progress i { display: block; height: 100%; background: var(--sage); border-radius: 4px; width: 0; }
.card.soon .progress i { background: var(--gold); }
.card.over .progress i { background: var(--danger); }

/* ---------- preparación ---------- */
.prep-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 760px) { .prep-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .prep-grid { grid-template-columns: repeat(3, 1fr); } }
.ticket { background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.ticket-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 11px 13px; background: var(--surface-2); }
.ticket-head h3 { font-size: 1.05rem; }
.ticket-head .age { font-weight: 800; font-variant-numeric: tabular-nums; }
.ticket-head .age.late { color: var(--danger); }
.titem { display: flex; gap: 10px; align-items: flex-start; padding: 11px 13px; border-top: 1px solid var(--line); }
.titem .q { font-weight: 900; font-size: 1.15rem; min-width: 30px; }
.titem .nm { font-weight: 700; font-size: 1.05rem; }
.titem .op { font-size: .88rem; color: var(--ink-2); margin-top: 2px; }
.titem .nt { font-size: .88rem; color: var(--rose-dark); font-weight: 650; margin-top: 2px; }
.titem .who { font-size: .78rem; color: var(--muted); margin-top: 2px; }
.titem .sbtn { min-width: 104px; }
.titem.listo { background: #F3FAF3; }
.station-tag { font-size: .68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }

/* ---------- cobro / facturas ---------- */
.kv { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; }
.kv .k { color: var(--ink-2); }
.kv.total { font-size: 1.15rem; font-weight: 800; border-top: 1px solid var(--line); margin-top: 6px; padding-top: 10px; }
.pay-line { display: grid; grid-template-columns: 1fr; gap: 8px; padding: 12px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.pay-line + .pay-line { margin-top: 10px; }
.change { font-weight: 800; color: var(--forest); }
.copy { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px dashed var(--line); }
.copy:first-child { border-top: 0; }
.copy .v { font-weight: 650; word-break: break-word; }
.copy .l { font-size: .75rem; color: var(--muted); }
.lines { width: 100%; border-collapse: collapse; font-size: .88rem; margin-top: 6px; }
.lines th { text-align: left; font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: 6px 4px; border-bottom: 1px solid var(--line); }
.lines td { padding: 7px 4px; border-bottom: 1px solid var(--line); vertical-align: top; }
.lines .n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---------- reportes ---------- */
.kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 620px) { .kpis { grid-template-columns: repeat(4, 1fr); } }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px; box-shadow: var(--shadow); }
.kpi .l { font-size: .75rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.kpi .v { font-size: 1.4rem; font-weight: 800; margin-top: 4px; font-variant-numeric: tabular-nums; }
.kpi .s { font-size: .78rem; color: var(--ink-2); margin-top: 2px; }
.bars .bar { display: grid; grid-template-columns: 54px 1fr 64px; align-items: center; gap: 8px; padding: 4px 0; font-size: .88rem; }
.bars .track { height: 10px; background: var(--surface-2); border-radius: 6px; overflow: hidden; }
.bars .track i { display: block; height: 100%; background: var(--sage); border-radius: 6px; }
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table td, .table th { padding: 9px 6px; border-bottom: 1px solid var(--line); text-align: left; }
.table th { font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.table .n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---------- administración ---------- */
.admin-prod { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-top: 1px solid var(--line); background: var(--surface); }
.admin-prod:first-child { border-top: 0; }
.admin-prod.hidden-prod { opacity: .55; }
.switch { position: relative; width: 50px; height: 30px; flex: 0 0 auto; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 1; }
.switch i { position: absolute; inset: 0; border-radius: 999px; background: #D6D1C7; transition: background .15s; }
.switch i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .15s; }
.switch input:checked + i { background: var(--sage-dark); }
.switch input:checked + i::after { transform: translateX(20px); }
.edit-row { display: grid; grid-template-columns: 1fr 90px 44px; gap: 8px; align-items: center; }
.edit-row + .edit-row { margin-top: 8px; }
.edit-row.t3 { grid-template-columns: 1fr 80px 84px 44px; }
.user-row { display: flex; align-items: center; gap: 12px; }
.avatar { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--rose-soft); color: var(--rose-dark); font-weight: 800; flex: 0 0 auto; }

/* ---------- ingreso ---------- */
.auth-page { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 24px 16px; }
.auth-card { width: 100%; max-width: 420px; }
.auth-logo { display: block; width: 210px; max-width: 70%; height: auto; margin: 0 auto 6px; }
.auth-title { text-align: center; font-size: 1.3rem; margin: 0 0 18px; color: var(--ink-2); }
.auth-card .alert { margin-bottom: 14px; }
.auth-card p.small { margin-top: 18px; }

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

/* ---------- complementos ---------- */
.big { font-size: 1.35rem; font-weight: 800; }
.nt { color: var(--rose-dark); font-style: italic; }
.warn { color: #8A5A12; font-weight: 650; }
.rowbtn { flex: 1 1 auto; min-width: 0; background: none; border: 0; padding: 0; text-align: left; cursor: pointer; color: inherit; font: inherit; }
.card.rowbtn { display: block; width: 100%; background: var(--surface); border: 1px solid var(--line); padding: 14px; margin: 0 0 10px; }
.card.rowbtn.muted { opacity: .6; }
.edit-row.t2 { grid-template-columns: 1fr 52px; }
.edit-row.t3 { grid-template-columns: 1fr 72px 82px 52px; }
.wrap-chips { flex-wrap: wrap; overflow: visible; }
label.chip { display: inline-flex; align-items: center; gap: 6px; }
label.chip input { width: 18px; height: 18px; margin: 0; accent-color: var(--sage-dark); }
.cat-title { scroll-margin-top: 240px; }
ol.small { padding-left: 20px; margin: 8px 0 0; }
ol.small li + li { margin-top: 4px; }
.card h3 + ol { margin-top: 6px; }
.kv .k { min-width: 0; }
.topbar .btn { white-space: nowrap; flex: 0 0 auto; }
details.pick { border: 1.5px solid var(--line); border-radius: 12px; background: var(--surface); }
details.pick > summary { list-style: none; cursor: pointer; padding: 12px 13px; display: flex; justify-content: space-between; gap: 10px; font-weight: 600; }
details.pick > summary::-webkit-details-marker { display: none; }
details.pick > summary .muted { font-weight: 500; }
details.pick[open] > summary { border-bottom: 1px solid var(--line); }
details.pick .chips { padding: 10px; }
.linkbtn { background: none; border: 0; padding: 0; margin: 0; font: inherit; color: inherit; cursor: pointer; text-decoration: underline dotted; text-underline-offset: 3px; }
.linkbtn:active { color: var(--sage-dark); }
.inc-row { display: flex; align-items: center; gap: 10px; width: 100%; margin-top: 12px; padding: 10px 12px; border-radius: 12px; border: 1.5px dashed var(--line); background: var(--surface); text-align: left; cursor: pointer; font: inherit; font-weight: 650; color: var(--ink); }
.inc-row .tick { width: 26px; height: 26px; flex: 0 0 auto; border-radius: 8px; border: 2px solid var(--sage); display: grid; place-items: center; color: #fff; font-size: .95rem; font-weight: 800; }
.inc-row .small { font-weight: 600; color: var(--muted); white-space: nowrap; }
.inc-row.ready { border-style: solid; border-color: var(--gold); background: var(--gold-soft); }
.inc-row.ready .small { color: #7A5410; }
.inc-row.done { border-style: solid; border-color: transparent; background: var(--sage-soft); }
.inc-row.done .tick { background: var(--sage-dark); border-color: var(--sage-dark); }
.inc-row.done .small { color: var(--sage-dark); }
