/* Un Toque Ventas · estilos. Los colores del negocio entran por --pri y --acc */
:root {
  --pri: #2563eb;
  --acc: #f59e0b;
  --pri-soft: color-mix(in srgb, var(--pri) 10%, white);
  --pri-dark: color-mix(in srgb, var(--pri) 80%, black);
  --bg: #f4f5f7;
  --card: #fff;
  --ink: #0f172a;
  --ink-2: #475569;
  --ink-3: #94a3b8;
  --line: #e7e9ee;
  --ok: #16a34a;
  --warn: #d97706;
  --err: #dc2626;
  --r: 16px;
  --r-sm: 10px;
  --sh: 0 1px 2px rgb(15 23 42 / .04), 0 4px 16px rgb(15 23 42 / .05);
  --font: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg); font-size: 15px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
a { color: var(--pri); text-decoration: none; }
h1, h2, h3 { margin: 0; letter-spacing: -.02em; line-height: 1.2; }
h1 { font-size: 26px; font-weight: 800; }
h2 { font-size: 16px; font-weight: 700; }
h3 { font-size: 14px; font-weight: 700; margin: 18px 0 8px; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.muted { color: var(--ink-2); }
.small { font-size: 13px; }
.center { text-align: center; }
[hidden] { display: none !important; }

/* Formularios */
label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
input, select, textarea {
  font: inherit; font-size: 16px; color: var(--ink); background: #fff; border: 1.5px solid var(--line); border-radius: var(--r-sm);
  padding: 11px 12px; width: 100%; min-width: 0; transition: border-color .15s, box-shadow .15s; font-weight: 500;
}
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--pri); box-shadow: 0 0 0 4px color-mix(in srgb, var(--pri) 15%, transparent); }
input[type=color] { padding: 2px; width: 44px; height: 36px; cursor: pointer; }
input[type=checkbox] { width: auto; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.inline { display: flex; gap: 8px; }
.lbl { font-size: 13px; font-weight: 600; color: var(--ink-2); }

/* Botones */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-weight: 700; font-size: 14px;
  border: 1.5px solid var(--line); background: #fff; color: var(--ink); border-radius: 12px; padding: 10px 16px; cursor: pointer;
  white-space: nowrap; transition: transform .08s, background .15s, border-color .15s; text-decoration: none;
}
.btn:hover { border-color: color-mix(in srgb, var(--ink) 20%, var(--line)); }
.btn:active { transform: scale(.97); }
.btn svg { width: 18px; height: 18px; }
.btn.pri { background: var(--pri); border-color: var(--pri); color: #fff; }
.btn.pri:hover { background: var(--pri-dark); }
.btn.big { padding: 14px 22px; font-size: 15px; border-radius: 14px; }
.btn.sm { padding: 7px 12px; font-size: 13px; border-radius: 10px; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--pri); }
.btn.ghost:hover { background: var(--pri-soft); }
.btn.danger { color: var(--err); }
.btn.danger.ghost:hover { background: #fef2f2; }
.btn.wa { background: #25d366; border-color: #25d366; color: #fff; }
.btn:disabled { opacity: .6; cursor: progress; }
.btn.loading { position: relative; color: transparent !important; }
.btn.loading::after { content: ''; position: absolute; width: 18px; height: 18px; border: 2.5px solid currentColor; border-color: #fff #fff transparent transparent; border-radius: 50%; animation: spin .7s linear infinite; }
.btn:not(.pri):not(.wa).loading::after { border-color: var(--pri) var(--pri) transparent transparent; }
.icon-btn { border: 0; background: transparent; color: var(--ink-2); padding: 8px; border-radius: 10px; cursor: pointer; display: inline-flex; }
.icon-btn:hover { background: var(--bg); color: var(--ink); }

/* Chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips.scroll { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; margin-bottom: 14px; scrollbar-width: none; }
.chip {
  --c: var(--pri); font: inherit; font-size: 14px; font-weight: 600; border: 1.5px solid var(--line); background: #fff; color: var(--ink-2);
  padding: 8px 14px; border-radius: 999px; cursor: pointer; white-space: nowrap; transition: all .15s;
}
.chip:hover { border-color: var(--c); }
.chip.on { background: var(--c); border-color: var(--c); color: #fff; }
.badge { --c: var(--pri); display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; color: var(--c); background: color-mix(in srgb, var(--c) 12%, white); white-space: nowrap; }
.tag { font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 6px; background: color-mix(in srgb, var(--acc) 18%, white); color: color-mix(in srgb, var(--acc) 60%, black); white-space: nowrap; }
.tag.soft { background: var(--bg); color: var(--ink-2); }
.tag.off { background: #fef2f2; color: var(--err); }

/* Splash / carga */
.splash, .loading-view { display: grid; place-items: center; min-height: 50vh; }
.splash { min-height: 100vh; }
.spin { width: 30px; height: 30px; border: 3px solid var(--line); border-top-color: var(--pri); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Toast */
#toast { position: fixed; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px); background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 12px; font-weight: 600; font-size: 14px; opacity: 0; pointer-events: none; transition: all .25s; z-index: 100; max-width: calc(100vw - 32px); box-shadow: 0 10px 30px rgb(0 0 0 / .2); }
#toast.show { opacity: 1; transform: translate(-50%, 0); }
#toast.err { background: var(--err); }

/* Auth */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: radial-gradient(circle at 20% 0%, color-mix(in srgb, var(--pri) 18%, transparent), transparent 50%), radial-gradient(circle at 100% 100%, color-mix(in srgb, var(--acc) 15%, transparent), transparent 45%), var(--bg); }
.auth-card { width: 100%; max-width: 400px; background: #fff; border-radius: 24px; padding: 32px 28px; box-shadow: var(--sh); display: flex; flex-direction: column; gap: 18px; }
.auth-card h1 { font-size: 24px; }
.auth-brand { display: flex; align-items: center; gap: 12px; }
.auth-brand b { display: block; font-size: 17px; font-weight: 800; letter-spacing: -.02em; }
.auth-brand span { font-size: 13px; color: var(--ink-2); font-weight: 600; }
.ut-logo { width: 42px; height: 42px; border-radius: 12px; background: var(--pri); color: #fff; display: grid; place-items: center; }

/* Layout */
.layout { min-height: 100vh; }
.side { display: none; }
.main { padding-bottom: calc(84px + env(safe-area-inset-bottom)); }
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; padding: 10px 16px; background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); min-width: 0; }
.brand img, .brand-ini { width: 38px; height: 38px; border-radius: 11px; object-fit: contain; flex: none; }
.brand img { background: #fff; border: 1px solid var(--line); }
.brand-ini { background: var(--pri); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 18px; }
.brand b { display: block; font-size: 15px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand small { display: block; font-size: 11px; color: var(--ink-3); font-weight: 600; }
.view { padding: 8px 16px 24px; max-width: 1180px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; }

.bottom { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: flex; justify-content: space-around; align-items: center; background: #fff; border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
.bottom a { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; font-weight: 600; color: var(--ink-3); padding: 6px 8px; flex: 1; }
.bottom a.on { color: var(--pri); }
.bottom a.fab { flex: none; }
.bottom a.fab svg { width: 26px; height: 26px; background: var(--pri); color: #fff; border-radius: 16px; padding: 10px; box-sizing: content-box; margin-top: -24px; box-shadow: 0 6px 16px color-mix(in srgb, var(--pri) 40%, transparent); }
.bottom a.fab span { color: var(--pri); }

@media (min-width: 900px) {
  .layout { display: grid; grid-template-columns: 250px 1fr; }
  .side { display: flex; flex-direction: column; gap: 24px; position: sticky; top: 0; height: 100vh; padding: 22px 16px; background: #fff; border-right: 1px solid var(--line); }
  .side nav { display: flex; flex-direction: column; gap: 4px; flex: 1; }
  .side nav a { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 12px; font-weight: 600; color: var(--ink-2); }
  .side nav a:hover { background: var(--bg); color: var(--ink); }
  .side nav a.on { background: var(--pri-soft); color: var(--pri); }
  .side nav a.nav-cta { background: var(--pri); color: #fff; margin: 6px 0; }
  .side nav a.nav-cta:hover { background: var(--pri-dark); }
  .side .me { display: flex; align-items: center; justify-content: space-between; padding: 12px; border-radius: 12px; background: var(--bg); }
  .side .me b { display: block; font-size: 14px; }
  .side .me small { color: var(--ink-3); font-weight: 600; font-size: 12px; }
  .top, .bottom { display: none; }
  .main { padding-bottom: 0; }
  .view { padding: 28px 32px 48px; gap: 18px; }
  #toast { bottom: 28px; }
}

/* Encabezados de página */
.page-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.page-h h1 { flex: 1; }
.back { display: inline-flex; align-items: center; gap: 2px; font-weight: 700; font-size: 14px; color: var(--ink-2); }
.back + h1 { flex-basis: 100%; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.hello { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 4px; }
.hello p { margin: 0 0 2px; font-weight: 600; }
@media (max-width: 899px) { .hello .btn { display: none; } }

/* Cards */
.card { background: var(--card); border-radius: var(--r); padding: 18px; box-shadow: var(--sh); }
.card.flush { padding: 6px 0; }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.card-h a { font-weight: 700; font-size: 14px; }
.grid2 { display: grid; gap: 14px; }
@media (min-width: 900px) { .grid2 { grid-template-columns: 1fr 1fr; gap: 18px; } }

/* KPIs */
.kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.kpis > :last-child:nth-child(odd) { grid-column: 1 / -1; }
@media (min-width: 900px) { .kpis { grid-template-columns: repeat(3, 1fr); gap: 18px; } .kpis.four { grid-template-columns: repeat(4, 1fr); } .kpis > :last-child:nth-child(odd) { grid-column: auto; } }
.kpi { background: var(--card); border-radius: var(--r); padding: 16px; box-shadow: var(--sh); display: flex; flex-direction: column; gap: 2px; color: var(--ink); min-width: 0; }
.kpi span { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.kpi b { font-size: 24px; font-weight: 800; letter-spacing: -.03em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi small { font-size: 12px; color: var(--ink-3); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi:first-child { background: var(--pri); color: #fff; }
.kpi:first-child span, .kpi:first-child small { color: color-mix(in srgb, #fff 80%, transparent); }
.kpi.warn b { color: var(--warn); }

.pipeline { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; }
.pipe { --c: var(--pri); padding: 14px; border-radius: 14px; background: color-mix(in srgb, var(--c) 9%, white); border: 1.5px solid color-mix(in srgb, var(--c) 20%, white); color: var(--ink); display: flex; flex-direction: column; }
.pipe b { font-size: 26px; font-weight: 800; color: var(--c); line-height: 1.1; }
.pipe span { font-size: 13px; font-weight: 600; color: var(--ink-2); }

/* Filas de ventas */
.rows { display: flex; flex-direction: column; }
.row { display: flex; justify-content: space-between; gap: 12px; padding: 13px 4px; border-top: 1px solid var(--line); color: var(--ink); }
.card.flush .row { padding: 13px 18px; }
.rows > .row:first-child { border-top: 0; }
a.row:hover { background: color-mix(in srgb, var(--pri) 4%, white); }
.row-main { min-width: 0; flex: 1; }
.row-t { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; font-weight: 700; }
.row-s { font-size: 13px; color: var(--ink-2); margin-top: 2px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.num { font-size: 13px; color: var(--ink-3); font-weight: 700; }
.num.big { font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--pri); }
.cli { font-size: 15px; }
.row-r { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; text-align: right; flex: none; }
.row-r b { font-size: 15px; font-weight: 800; }
.row-r b.late { color: var(--err); }
.row-r small { font-size: 12px; color: var(--ink-3); font-weight: 600; }
.row-b { display: flex; gap: 5px; flex-wrap: wrap; justify-content: flex-end; }
.debe { font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; color: var(--warn); background: #fff7ed; white-space: nowrap; }
.debe-txt { color: var(--warn); font-weight: 700; }
.row.static { align-items: center; flex-wrap: wrap; }
.row.off { opacity: .6; }
.row-act { display: flex; gap: 6px; flex-wrap: wrap; }
.empty { text-align: center; padding: 40px 16px; color: var(--ink-2); display: flex; flex-direction: column; align-items: center; gap: 12px; }
.empty.small { padding: 18px; }
.empty p { margin: 0; }

/* Filtros */
.filters { display: flex; flex-direction: column; gap: 10px; padding: 12px; }
.filters-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.filters-row select { width: auto; flex: 1 1 150px; }
.search { position: relative; flex-direction: row; align-items: center; }
.search svg { position: absolute; left: 12px; color: var(--ink-3); width: 18px; height: 18px; }
.search input { padding-left: 38px; }
.search.mini input { padding-top: 8px; padding-bottom: 8px; font-size: 14px; }
.search.mini { width: min(240px, 50%); }
.toggle { flex-direction: row; align-items: center; gap: 8px; font-size: 14px; padding: 8px 4px; cursor: pointer; white-space: nowrap; }
.toggle input { width: 18px; height: 18px; accent-color: var(--pri); }
.sum { margin: 0 2px; }

/* Formulario de venta */
.form-venta { display: flex; flex-direction: column; gap: 14px; padding-bottom: 90px; }
.grid-f { display: grid; gap: 12px; grid-template-columns: 1fr; }
.grid-f .full { grid-column: 1 / -1; }
@media (min-width: 640px) { .grid-f { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1100px) { .form-venta .grid-f { grid-template-columns: 1fr 1fr 1fr; } }
.estado-pick { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }

.lns { display: flex; flex-direction: column; margin-bottom: 8px; }
.ln-cat { font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--pri); padding: 14px 4px 6px; }
.ln-cat:first-child { padding-top: 0; }
.ln {
  display: grid; align-items: center; gap: 8px; padding: 9px 8px; border-radius: 12px; border: 1.5px solid transparent;
  grid-template-columns: 1fr auto; grid-template-areas: "name sub" "var step" "precio dup";
}
.ln + .ln { border-top-color: var(--line); border-radius: 0; }
.ln.on { background: var(--pri-soft); border-color: color-mix(in srgb, var(--pri) 25%, white) !important; border-radius: 12px; }
.ln.on + .ln { border-top-color: transparent; }
.ln-name { grid-area: name; font-weight: 700; }
.ln-desc { grid-area: name; }
.ln-var { grid-area: var; max-width: 140px; padding: 8px 10px; font-size: 15px; }
.step { grid-area: step; display: flex; align-items: center; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; overflow: hidden; justify-self: end; }
.step button { border: 0; background: transparent; font: inherit; font-size: 20px; font-weight: 700; color: var(--pri); width: 40px; height: 40px; cursor: pointer; }
.step button:active { background: var(--pri-soft); }
.step input { width: 46px; border: 0; text-align: center; padding: 8px 0; font-weight: 800; border-radius: 0; box-shadow: none !important; }
.ln-precio { grid-area: precio; flex-direction: row; align-items: center; position: relative; max-width: 160px; }
.ln-precio span { position: absolute; left: 10px; color: var(--ink-3); font-weight: 700; font-size: 14px; }
.ln-precio input { padding: 8px 10px 8px 24px; font-size: 15px; }
.ln-sub { grid-area: sub; font-weight: 800; text-align: right; white-space: nowrap; font-size: 15px; }
.ln-dup, .ln-x { grid-area: dup; justify-self: end; border: 0; background: transparent; color: var(--pri); font: inherit; font-weight: 700; font-size: 13px; cursor: pointer; padding: 6px 8px; border-radius: 8px; }
.ln-x { font-size: 22px; color: var(--ink-3); line-height: 1; }
.ln-dup:hover, .ln-x:hover { background: color-mix(in srgb, var(--pri) 10%, white); }
/* Catálogo: las prendas sin cantidad quedan en una sola línea (nombre + botones) */
.lns.cat .ln:not(.on) { grid-template-areas: "name step"; padding-top: 5px; padding-bottom: 5px; }
.lns.cat .ln:not(.on) :is(.ln-var, .ln-precio, .ln-sub, .ln-dup) { display: none; }
.lns.cat .ln:not(.on) .ln-name { font-weight: 600; color: var(--ink-2); }
.ln.libre { grid-template-areas: "name name" "var step" "precio dup" "sub sub"; }
.ln.libre .ln-sub { text-align: left; }
.ln.libre .ln-sub:empty { display: none; }
@media (min-width: 760px) {
  .ln { grid-template-columns: minmax(150px, 1fr) 110px auto 150px 110px 80px; grid-template-areas: "name var step precio sub dup"; padding: 6px 10px; }
  .ln.libre { grid-template-columns: minmax(150px, 1fr) 110px auto 150px 110px 80px; grid-template-areas: "name var step precio sub dup"; }
  .ln.libre .ln-sub { text-align: right; }
  .ln.libre .ln-sub:empty { display: block; }
  .ln-var, .ln-precio { max-width: none; }
  .lns.cat .ln:not(.on) { grid-template-columns: minmax(150px, 1fr) 110px auto 150px 110px 80px; grid-template-areas: "name var step precio sub dup"; }
  .lns.cat .ln:not(.on) :is(.ln-var, .ln-precio, .ln-sub, .ln-dup) { display: flex; visibility: hidden; }
  .ln:not(:has(.ln-var)) { grid-template-columns: minmax(150px, 1fr) auto 150px 110px 50px; grid-template-areas: "name step precio sub dup"; }
}

.pago-row { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; margin-top: 14px; }
.money { flex: 1 1 200px; }
.money div { position: relative; display: flex; align-items: center; }
.money i { position: absolute; left: 14px; font-style: normal; font-weight: 800; color: var(--ink-3); font-size: 18px; }
.money input { padding-left: 32px; font-size: 22px; font-weight: 800; }
.quick { display: flex; gap: 6px; flex-wrap: wrap; padding-bottom: 4px; }

.sticky-bar {
  position: fixed; left: 0; right: 0; bottom: calc(68px + env(safe-area-inset-bottom)); z-index: 25; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 16px; background: color-mix(in srgb, #fff 92%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-top: 1px solid var(--line);
}
.sticky-bar small { display: block; font-size: 12px; font-weight: 700; color: var(--ink-3); text-transform: uppercase; letter-spacing: .05em; }
.sticky-bar b { font-size: 24px; font-weight: 800; letter-spacing: -.03em; }
@media (min-width: 900px) { .sticky-bar { left: 250px; bottom: 0; padding: 14px 32px; } }

/* Detalle */
.det { display: grid; gap: 14px; align-items: start; }
@media (min-width: 980px) { .det { grid-template-columns: 1.6fr 1fr; gap: 18px; } .pagos-card { position: sticky; top: 20px; } }
.det-h h1 { margin: 4px 0; }
.det-h p { margin: 0; font-size: 14px; }
.campos { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin: 18px 0 4px; padding: 14px; background: var(--bg); border-radius: 12px; }
.campos div.full { grid-column: 1 / -1; }
.campos dt { font-size: 12px; font-weight: 700; color: var(--ink-3); text-transform: uppercase; letter-spacing: .04em; }
.campos dd { margin: 2px 0 0; font-weight: 600; white-space: pre-wrap; }
table.items { width: 100%; border-collapse: collapse; margin-top: 18px; font-size: 14px; }
table.items th { text-align: left; font-size: 12px; font-weight: 700; color: var(--ink-3); text-transform: uppercase; letter-spacing: .04em; padding: 8px 6px; border-bottom: 1.5px solid var(--line); }
table.items td { padding: 10px 6px; border-bottom: 1px solid var(--line); font-weight: 500; }
table.items.compact { margin-top: 0; }
.r { text-align: right !important; white-space: nowrap; }
.notas { margin: 16px 0 0; padding: 12px 14px; background: #fffbeb; border-radius: 12px; font-size: 14px; white-space: pre-wrap; }
.totales { display: flex; flex-direction: column; gap: 8px; }
.totales > div { display: flex; justify-content: space-between; align-items: baseline; font-weight: 600; color: var(--ink-2); }
.totales b { font-size: 18px; color: var(--ink); font-weight: 800; }
.totales b.ok { color: var(--ok); }
.totales .saldo { padding: 14px; border-radius: 12px; background: var(--bg); margin-top: 4px; }
.totales .saldo b { font-size: 26px; }
.totales .saldo.debe { background: #fff7ed; } .totales .saldo.debe b { color: var(--warn); }
.totales .saldo.cero { background: #f0fdf4; } .totales .saldo.cero b { color: var(--ok); }
.totales .saldo.favor { background: #eff6ff; }
ul.pagos { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
ul.pagos li { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; background: var(--bg); border-radius: 10px; }
ul.pagos b { display: block; }
ul.pagos small { color: var(--ink-2); font-weight: 600; font-size: 12px; }
.nuevo-pago .money { flex: none; }
.nuevo-pago { display: flex; flex-direction: column; gap: 10px; margin: 14px 0 6px; padding-top: 4px; border-top: 1px solid var(--line); }
.pagado-ok { color: var(--ok); font-weight: 800; text-align: center; padding: 12px; background: #f0fdf4; border-radius: 12px; margin: 14px 0 6px; }
#b-del { margin-top: 10px; }

/* Reportes */
.bars-v { display: flex; align-items: flex-end; gap: 4px; height: 170px; padding-top: 10px; overflow-x: auto; }
.bv { flex: 1 0 14px; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; }
.bv div { width: 100%; max-width: 36px; background: var(--pri); border-radius: 6px 6px 2px 2px; min-height: 3px; }
.bv small { font-size: 10px; color: var(--ink-3); font-weight: 700; }
.bar { margin-bottom: 12px; }
.bar-l { display: flex; justify-content: space-between; font-size: 14px; font-weight: 600; margin-bottom: 5px; }
.bar-t { height: 10px; background: var(--bg); border-radius: 999px; overflow: hidden; }
.bar-t div { height: 100%; background: var(--acc); border-radius: 999px; }

/* Ajustes */
.logo-edit { display: flex; align-items: center; gap: 16px; }
.logo-edit p { margin: 6px 0 0; }
.logo-edit label.btn { display: inline-flex; flex-direction: row; color: var(--ink); }
.logo-prev { width: 76px; height: 76px; border-radius: 18px; border: 1.5px dashed var(--line); display: grid; place-items: center; overflow: hidden; background: #fff; flex: none; }
.logo-prev img { width: 100%; height: 100%; object-fit: contain; }
.logo-prev span { font-size: 30px; font-weight: 800; color: #fff; background: var(--pri); width: 100%; height: 100%; display: grid; place-items: center; }
.colores { display: flex; gap: 20px; flex-wrap: wrap; }
.sw { display: flex; gap: 6px; align-items: center; margin-top: 6px; flex-wrap: wrap; }
.sw button { width: 28px; height: 28px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line); cursor: pointer; }
.cat-list { display: flex; flex-direction: column; gap: 6px; margin: 10px 0; max-height: 520px; overflow: auto; }
.cat-row { display: grid; grid-template-columns: 1fr 1.6fr 120px auto; gap: 6px; align-items: center; }
.cat-row input { padding: 8px 10px; font-size: 14px; }
.cat-row .ln-precio { max-width: none; grid-area: auto; }
.cat-row .ln-precio input { padding-left: 24px; }
.cat-row.nuevo { padding-top: 10px; border-top: 1px solid var(--line); }
@media (max-width: 600px) { .cat-row { grid-template-columns: 1fr 1fr; } .cat-row > :nth-child(2) { grid-column: 1 / -1; order: -1; } }
.card > textarea { margin-bottom: 10px; }
.card > label + label { margin-top: 12px; }
.card > label + .btn { margin-top: 12px; }
.nuevo-user { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }

/* Admin */
.admin-top { display: flex; justify-content: space-between; align-items: center; padding: 16px 24px; background: #fff; border-bottom: 1px solid var(--line); }
.admin-top .me { display: flex; align-items: center; gap: 8px; color: var(--ink-2); font-weight: 600; }
.admin .view { padding-top: 24px; }
.grid-admin { display: grid; gap: 18px; align-items: start; }
@media (min-width: 980px) { .grid-admin { grid-template-columns: 1.5fr 1fr; } }
.rubros { display: flex; flex-direction: column; gap: 8px; }
.rubro { cursor: pointer; position: relative; }
.rubro input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.rubro div { --c: var(--pri); padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 12px; display: flex; flex-direction: column; gap: 2px; transition: all .15s; }
.rubro b { color: var(--ink); font-size: 14px; }
.rubro small { color: var(--ink-2); font-weight: 500; }
.rubro input:checked + div { border-color: var(--c); background: color-mix(in srgb, var(--c) 8%, white); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 15%, transparent); }
.okbox { margin-top: 16px; padding: 16px; border-radius: 14px; background: #f0fdf4; border: 1.5px solid #bbf7d0; }
.okbox p { margin: 4px 0 8px; }
.okbox pre { background: #fff; padding: 12px; border-radius: 10px; font-size: 14px; white-space: pre-wrap; margin: 0 0 10px; }

/* Comprobante para imprimir */
#print { display: none; }
@media print {
  @page { margin: 14mm; }
  body { background: #fff; }
  #app, #toast { display: none !important; }
  #print { display: block; }
  .cp { font-family: var(--font); color: #111; font-size: 12px; }
  .cp header { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; padding-bottom: 14px; border-bottom: 2px solid var(--pri); }
  .cp-brand { display: flex; gap: 12px; align-items: center; }
  .cp-brand img { width: 64px; height: 64px; object-fit: contain; }
  .cp-brand h1 { font-size: 20px; }
  .cp-brand p { margin: 4px 0 0; color: #555; }
  .cp-doc { text-align: right; display: flex; flex-direction: column; gap: 2px; }
  .cp-doc b { font-size: 18px; letter-spacing: .06em; color: var(--pri); }
  .cp-cli { display: flex; flex-wrap: wrap; gap: 10px 28px; padding: 14px 0; }
  .cp-cli small { display: block; color: #777; text-transform: uppercase; font-size: 10px; letter-spacing: .05em; font-weight: 700; }
  .cp-cli b { display: block; font-size: 13px; white-space: pre-wrap; }
  .cp table { width: 100%; border-collapse: collapse; }
  .cp th { text-align: left; font-size: 10px; text-transform: uppercase; letter-spacing: .05em; color: #555; border-bottom: 1.5px solid #222; padding: 6px 4px; }
  .cp td { padding: 7px 4px; border-bottom: 1px solid #ddd; }
  .cp-tot { display: flex; justify-content: space-between; gap: 20px; margin-top: 14px; }
  .cp-pagos { display: flex; flex-direction: column; gap: 2px; color: #444; }
  .cp-pagos small { text-transform: uppercase; font-size: 10px; color: #777; font-weight: 700; }
  .cp-num { min-width: 220px; }
  .cp-num div { display: flex; justify-content: space-between; padding: 3px 0; }
  .cp-num div.big, .cp-num div:only-child { font-size: 16px; font-weight: 800; border-top: 1.5px solid #222; margin-top: 4px; padding-top: 6px; }
  .cp-notas { margin-top: 14px; padding: 10px; border: 1px solid #ddd; border-radius: 6px; white-space: pre-wrap; }
  .cp footer { margin-top: 28px; padding-top: 10px; border-top: 1px solid #ddd; color: #666; font-size: 10px; text-align: center; }
  .cp footer p { margin: 2px 0; }
}

.prueba-banner{margin:12px 16px 0;padding:10px 14px;border-radius:12px;background:#fff7e0;border:1px solid #f5d27a;color:#6b4e00;font-size:14px;font-weight:600}
