/* Sistema de diseño del Centro de operación y del Panel del revendedor.
   Colores de datos validados (dataviz): serie 1 = azul, superficies #fcfcfb / #1a1a19. */

:root {
  color-scheme: light;
  --bg: #f4f4f1;
  --surface: #fcfcfb;
  --surface-2: #f0efec;
  --ink-1: #0b0b0b;
  --ink-2: #52514e;
  --muted: #898781;
  --grid: #e1e0d9;
  --axis: #c3c2b7;
  --border: rgba(11, 11, 11, 0.10);
  --accent: #2a78d6;
  --accent-ink: #1c5cab;
  --accent-soft: #e6f0fc;
  --series-1: #2a78d6;
  --good: #0ca30c;
  --good-ink: #006300;
  --warning: #fab219;
  --serious: #ec835a;
  --critical: #d03b3b;
  --critical-ink: #b42323;
  --shadow: 0 1px 2px rgba(11, 11, 11, .05), 0 4px 16px rgba(11, 11, 11, .04);
  --radius: 14px;
  --sidebar: 256px;
}
@media (prefers-color-scheme: dark) {
  :root:where(:not([data-theme="light"])) {
    color-scheme: dark;
    --bg: #0d0d0d; --surface: #1a1a19; --surface-2: #232321;
    --ink-1: #ffffff; --ink-2: #c3c2b7; --muted: #898781;
    --grid: #2c2c2a; --axis: #383835; --border: rgba(255, 255, 255, 0.10);
    --accent: #3987e5; --accent-ink: #86b6ef; --accent-soft: #16263b; --series-1: #3987e5;
    --good-ink: #0ca30c; --critical-ink: #e66767;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0d0d0d; --surface: #1a1a19; --surface-2: #232321;
  --ink-1: #ffffff; --ink-2: #c3c2b7; --muted: #898781;
  --grid: #2c2c2a; --axis: #383835; --border: rgba(255, 255, 255, 0.10);
  --accent: #3987e5; --accent-ink: #86b6ef; --accent-soft: #16263b; --series-1: #3987e5;
  --good-ink: #0ca30c; --critical-ink: #e66767;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4);
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg); color: var(--ink-1);
  font: 15px/1.5 Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent-ink); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 24px; font-weight: 650; letter-spacing: -.01em; margin: 0; }
h2 { font-size: 15px; font-weight: 600; margin: 0; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.num { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* --- Estructura ---------------------------------------------------------------------------- */
.app { display: grid; grid-template-columns: var(--sidebar) 1fr; min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  background: var(--surface); border-right: 1px solid var(--border);
  display: flex; flex-direction: column; padding: 18px 12px;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px 18px; color: var(--ink-1); }
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 10px; background: var(--accent); color: #fff;
  display: grid; place-items: center; font-weight: 700; font-size: 14px; flex: none;
}
.brand-logo { width: auto; height: 52px; flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text strong { font-size: 14px; }
.brand-text span { font-size: 12px; color: var(--muted); }

.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a, .nav summary {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 9px;
  color: var(--ink-2); font-size: 14px; font-weight: 500; cursor: pointer; list-style: none;
}
.nav summary::-webkit-details-marker { display: none; }
.nav a:hover, .nav summary:hover { background: var(--surface-2); color: var(--ink-1); text-decoration: none; }
.nav a.active { background: var(--accent-soft); color: var(--accent-ink); font-weight: 600; }
/* Tamaño fijo: sin esto, en pantallas angostas los íconos de los botones se achican hasta 0 px. */
.icon { width: 18px; height: 18px; flex: none; }
.btn.sm .icon { width: 16px; height: 16px; }
.nav .icon { opacity: .85; }
.nav details > summary::after {
  content: ""; margin-left: auto; width: 7px; height: 7px; border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor; transform: rotate(-45deg); transition: transform .15s;
}
.nav details[open] > summary::after { transform: rotate(45deg); }
.nav details .sub { display: flex; flex-direction: column; gap: 2px; margin: 2px 0 6px 18px;
  padding-left: 10px; border-left: 1px solid var(--grid); }
.nav details .sub a { font-size: 13.5px; padding: 6px 10px; }
.nav-label { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em;
  color: var(--muted); padding: 14px 10px 4px; }
.nav .count { margin-left: auto; font-size: 11px; font-weight: 700; background: var(--critical);
  color: #fff; border-radius: 999px; padding: 1px 7px; }
.new-pill { display: inline-block; font-size: 11px; font-weight: 700; background: var(--accent); color: #fff;
  border-radius: 999px; padding: 1px 8px; vertical-align: middle; white-space: nowrap; }
.count-inline { font-size: 11px; font-weight: 700; background: var(--critical); color: #fff; border-radius: 999px; padding: 1px 7px; }
.menu-btn { position: relative; }
.menu-dot { position: absolute; top: 4px; right: 4px; width: 9px; height: 9px; border-radius: 50%;
  background: var(--critical); box-shadow: 0 0 0 2px var(--surface); }
.nav details > summary .count { margin-right: 4px; }
/* Un número que sube en vivo late un momento para que se note sin recargar la página. */
.count-new { animation: count-pulse 1.2s ease-out 2; }
@keyframes count-pulse {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--critical) 60%, transparent); }
  100% { box-shadow: 0 0 0 9px transparent; }
}
@media (prefers-reduced-motion: reduce) { .count-new { animation: none; } }
.sidebar-foot { margin-top: auto; padding: 12px 10px 0; border-top: 1px solid var(--border); font-size: 12px; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px;
  padding: 12px 28px; background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px); border-bottom: 1px solid var(--border);
}
.topbar .title { display: flex; flex-direction: column; min-width: 0; }
.topbar .title span { font-size: 12.5px; color: var(--muted); }
.topbar .spacer { flex: 1; }
.topbar .tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.topbar .tools:empty { display: none; }
.content { padding: 24px 28px 56px; max-width: 1320px; width: 100%; }
.btn.menu-btn { display: none; }

/* --- Menús desplegables ------------------------------------------------------------------- */
.dropdown { position: relative; }
.dropdown > summary { list-style: none; }
.dropdown > summary::-webkit-details-marker { display: none; }
.dropdown .panel {
  position: absolute; right: 0; top: calc(100% + 6px); min-width: 220px; z-index: 40;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, .14); padding: 6px;
}
.dropdown .panel a, .dropdown .panel button {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border-radius: 8px;
  color: var(--ink-1); font: inherit; font-size: 14px; background: none; border: 0; cursor: pointer; text-align: left;
}
.dropdown .panel a:hover, .dropdown .panel button:hover { background: var(--surface-2); text-decoration: none; }
.dropdown .panel .check { width: 16px; font-weight: 700; color: var(--accent-ink); }
.dropdown .panel hr { border: 0; border-top: 1px solid var(--border); margin: 6px 0; }
.dropdown .panel .who { padding: 8px 10px; font-size: 13px; color: var(--muted); }

/* --- Botones y controles --------------------------------------------------------------------- */
.btn, button.btn, input[type=submit].btn {
  display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; border-radius: 10px;
  font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; white-space: nowrap;
  background: var(--accent); color: #fff; border: 1px solid transparent;
}
.btn:hover { text-decoration: none; filter: brightness(1.05); }
.btn.ghost { background: var(--surface); color: var(--ink-1); border-color: var(--border); }
.btn.ghost:hover { background: var(--surface-2); }
.btn.sm { height: 30px; padding: 0 10px; font-size: 13px; }
.chev::after { content: ""; width: 6px; height: 6px; border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor; transform: rotate(45deg) translateY(-2px); margin-left: 2px; }
label { display: block; font-size: 13px; color: var(--ink-2); margin: 12px 0 5px; font-weight: 500; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=search],
input[type=tel], input[type=url], input[type=datetime-local], input[type=date], input[type=month], select, textarea {
  width: 100%; height: 38px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--surface); color: var(--ink-1); font: inherit; font-size: 14px;
}
input:focus, select:focus, button:focus-visible, a:focus-visible, summary:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px;
}
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; margin-bottom: 18px; }
.filters .field { min-width: 170px; }
.filters .field label { margin-top: 0; }

/* --- Tarjetas, indicadores y cuadrícula ---------------------------------------------------- */
.grid { display: grid; gap: 16px; }
.kpis { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(190px, 100%), 1fr)); margin-bottom: 18px; }
.kpi, .card, .tile {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow);
}
.kpi { padding: 16px 18px; display: flex; flex-direction: column; gap: 4px; color: inherit; }
a.kpi:hover { text-decoration: none; border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); }
.kpi .label, .tile .label { font-size: 13px; color: var(--ink-2); font-weight: 500; }
.kpi .value, .tile .value { font-size: 26px; font-weight: 650; letter-spacing: -.02em; line-height: 1.2; }
.kpi .hint, .tile .hint { font-size: 12.5px; color: var(--muted); }
.delta { font-size: 12.5px; font-weight: 600; }
.delta.up { color: var(--good-ink); } .delta.down { color: var(--critical-ink); } .delta.flat { color: var(--muted); }
.kpi.hero .value { font-size: 40px; }
.card { padding: 18px 20px; margin-bottom: 16px; min-width: 0; }
.card-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.card-head .sub { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.card-head .actions { margin-left: auto; display: flex; gap: 8px; }
.cols-2 { display: grid; gap: 16px; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
/* `top`: cada columna con su alto (el Resumen, donde la derecha es mucho más larga que el gráfico). Sin ella,
   las tarjetas de una fila quedan del mismo alto y alineadas arriba y abajo. */
.cols-2.top { align-items: start; }
.home-row { margin-bottom: 16px; }
.cols-2 > .stack:not(table) > .card:last-child { flex: 1; }
.card.fill-col { display: flex; flex-direction: column; }
.card.fill-col > .chart { flex: 1; min-height: 0; }
.more-link { display: inline-block; margin-top: 10px; font-size: 13.5px; font-weight: 600; }
.cols-2 > .card { margin-bottom: 0; }
.two { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); margin-bottom: 16px; }
.two > .card { margin-bottom: 0; }
/* Pila vertical de tarjetas. No aplica a las tablas: `table.stack` es la tabla que en el celular se ve como
   tarjetas (antes esta regla también la volvía flex y descuadraba encabezados y columnas). */
.stack:not(table) { display: flex; flex-direction: column; gap: 16px; }
.stack:not(table) > .card { margin-bottom: 0; }

/* --- Tablas -------------------------------------------------------------------------------- */
/* Referencia Settle (2026-10-04): la tabla va de borde a borde de su tarjeta, encabezado en una franja suave,
   filas compactas con líneas finas, montos a la derecha y la acción al extremo derecho. */
.table-wrap { overflow-x: auto; margin: 0 -4px; }
.card > .table-wrap, .card > form > .table-wrap { margin: 0 -20px; }
.card > .table-wrap:last-child, .card > form:last-child > .table-wrap:last-child { margin-bottom: -18px; }
.card > .table-wrap:last-child tbody tr:last-child td,
.card > form:last-child > .table-wrap:last-child tbody tr:last-child td { border-bottom: 0; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--grid); vertical-align: middle; }
.card > .table-wrap th:first-child, .card > .table-wrap td:first-child,
.card > form > .table-wrap th:first-child, .card > form > .table-wrap td:first-child { padding-left: 20px; }
.card > .table-wrap th:last-child, .card > .table-wrap td:last-child,
.card > form > .table-wrap th:last-child, .card > form > .table-wrap td:last-child { padding-right: 20px; }
th { font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .06em;
  white-space: nowrap; padding-top: 9px; padding-bottom: 9px; }
thead th { background: color-mix(in srgb, var(--surface-2) 70%, var(--surface)); border-bottom-color: var(--border); }
tbody tr { transition: background .1s; }
tbody tr:hover { background: color-mix(in srgb, var(--surface-2) 60%, transparent); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
td .muted.small, td.muted.small { white-space: nowrap; }
td.cell-action { text-align: right; white-space: nowrap; width: 1%; }
td > strong:first-child { font-weight: 650; white-space: nowrap; }
tbody td:first-child > a:first-child { white-space: nowrap; font-weight: 600; }
@media (prefers-reduced-motion: reduce) { tbody tr { transition: none; } }
.empty { color: var(--muted); padding: 22px 0; text-align: center; }

/* --- Etiquetas de estado (color + ícono + texto, nunca solo color) ------------------------ */
.badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px 3px 7px; border-radius: 999px;
  font-size: 12px; font-weight: 600; background: var(--surface-2); color: var(--ink-2); white-space: nowrap;
}
/* Fondo suave del color del estado (como Settle); el texto sigue en tinta y el punto lleva el color. */
.badge.info { background: color-mix(in srgb, var(--accent) 12%, var(--surface)); color: var(--ink-1); }
.badge.ok { background: color-mix(in srgb, var(--good) 13%, var(--surface)); color: var(--ink-1); }
.badge.warn { background: color-mix(in srgb, var(--warning) 20%, var(--surface)); color: var(--ink-1); }
.badge.serious { background: color-mix(in srgb, var(--serious) 18%, var(--surface)); color: var(--ink-1); }
.badge.bad { background: color-mix(in srgb, var(--critical) 13%, var(--surface)); color: var(--ink-1); }
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--muted); }
.badge.info::before { background: var(--accent); }
.badge.ok::before { background: var(--good); }
.badge.warn::before { background: var(--warning); }
.badge.serious::before { background: var(--serious); }
.badge.bad::before { background: var(--critical); }

/* --- Pestañas y mensajes ------------------------------------------------------------------ */
.tabs { display: inline-flex; gap: 4px; padding: 4px; background: var(--surface-2); border-radius: 11px; margin-bottom: 16px; flex-wrap: wrap; }
.tabs a { padding: 6px 12px; border-radius: 8px; color: var(--ink-2); font-size: 13.5px; font-weight: 500; }
.tabs a:hover { text-decoration: none; color: var(--ink-1); }
.tabs a.on { background: var(--surface); color: var(--ink-1); box-shadow: var(--shadow); font-weight: 600; }
.msg { padding: 11px 14px; border-radius: 11px; margin-bottom: 14px; font-size: 14px;
  border: 1px solid var(--border); background: var(--surface); display: flex; gap: 10px; align-items: center; }
.msg::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none; }
.msg.success::before { background: var(--good); } .msg.error::before { background: var(--critical); }
.msg.warning::before { background: var(--warning); }

/* --- Listas compactas ---------------------------------------------------------------------- */
.list { display: flex; flex-direction: column; }
.list .row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--grid); color: inherit; }
.list .row:last-child { border-bottom: 0; }
a.row:hover { text-decoration: none; background: color-mix(in srgb, var(--surface-2) 50%, transparent); }
.list .row .grow { flex: 1; min-width: 0; }
.list .row .grow div:first-child { font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list .row .n { font-size: 20px; font-weight: 650; min-width: 34px; text-align: right; }
/* Las etiquetas de estado de un pedido (nuevo, atrasado, etiqueta lista…) son varias: van juntas y pueden
   pasar a otra línea, en vez de quitarle todo el ancho al título. */
.list .row .row-status { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; align-items: center;
  max-width: 55%; text-align: right; }
.list .row .row-status > .muted { flex-basis: 100%; }
.period-panel { min-width: 250px; }
.period-pick { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; gap: 6px; padding: 4px 8px; }
/* En el celular el selector de período queda a la izquierda, en su propia fila: el panel se abre hacia la derecha
   y nunca se sale de la pantalla (antes se abría hacia la izquierda y se cortaba). */
@media (max-width: 960px) {
  .topbar .tools .dropdown .panel { right: auto; left: 0; width: min(340px, calc(100vw - 32px)); max-width: calc(100vw - 32px); }
  .period-panel a { padding: 10px 12px; }
  .period-pick { grid-template-columns: 48px minmax(0, 1fr) auto; padding: 5px 8px; }
  .period-pick input { height: 38px; font-size: 14px; }
}
.period-pick label { font-size: 12.5px; color: var(--muted); }
.period-pick input { height: 30px; font-size: 13px; min-width: 0; }
/* Barra de período y filtros (2026-10-04, referencia «Settle»). */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-bottom: 16px; }
.seg { display: inline-flex; gap: 2px; padding: 3px; background: var(--surface-2); border-radius: 10px; }
.seg a { padding: 5px 12px; border-radius: 8px; font-size: 13px; font-weight: 500; color: var(--ink-2); }
.seg a:hover { text-decoration: none; color: var(--ink-1); }
.seg a.on { background: var(--surface); color: var(--ink-1); font-weight: 600; box-shadow: var(--shadow); }
.pnav { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.pnav-step { display: inline-flex; align-items: center; gap: 4px; }
.btn.icon-btn { width: 30px; padding: 0; justify-content: center; font-size: 18px; line-height: 1; }
.btn.icon-btn[aria-disabled="true"] { opacity: .35; pointer-events: none; }
.pnav-pick { display: inline-flex; align-items: center; gap: 4px; margin: 0; }
.pnav-pick select, .pnav-pick input, .toolbar-filters select { height: 30px; font-size: 13px; width: auto; min-width: 150px; padding: 0 10px; }
.js .pnav-go { display: none; }
.toolbar-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; }
.toolbar-filters .check-label { margin: 0; font-size: 13px; }
tfoot td { font-weight: 650; border-bottom: 0; border-top: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface-2) 50%, var(--surface)); }
td .sub-line { display: block; font-weight: 400; }
.sales-table td.total-cell strong { font-size: 14px; }
.chart .col { fill: var(--series-1); }
.chart .col.on { fill: var(--accent-ink); }
.chart .hover-band { fill: var(--surface-2); opacity: .7; }
@media (max-width: 600px) {
  .toolbar, .pnav, .toolbar-filters { width: 100%; }
  .pnav-step { flex: 1 1 100%; }
  .pnav-pick { flex: 1; }
  .pnav-pick select, .pnav-pick input, .toolbar-filters select { width: 100%; min-width: 0; flex: 1; }
  .toolbar-filters select { flex: 1 1 140px; }
}
.share-code { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.share-code .code-value { font-size: 26px; letter-spacing: .08em; font-family: ui-monospace, monospace; }
.share-actions { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
@media (max-width: 960px) { .share-row { flex-wrap: wrap; } .share-actions { flex-basis: 100%; justify-content: flex-start; } }

/* --- Gráficos ------------------------------------------------------------------------------ */
.chart { position: relative; width: 100%; }
.chart svg { display: block; width: 100%; overflow: visible; }
.chart .tick { font-size: 11.5px; fill: var(--muted); font-variant-numeric: tabular-nums; }
.chart .gridline { stroke: var(--grid); stroke-width: 1; shape-rendering: crispEdges; }
.chart .baseline { stroke: var(--axis); stroke-width: 1; shape-rendering: crispEdges; }
.chart .line { fill: none; stroke: var(--series-1); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .area { fill: var(--series-1); opacity: .10; }
.chart .dot { fill: var(--series-1); stroke: var(--surface); stroke-width: 2; }
.chart .end-label { font-size: 12px; fill: var(--ink-2); font-weight: 600; }
.chart .crosshair { stroke: var(--axis); stroke-width: 1; }
.chart .empty-note { fill: var(--muted); font-size: 13px; }
.tooltip {
  position: absolute; pointer-events: none; z-index: 5; min-width: 120px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .14); padding: 8px 10px; font-size: 12.5px; transform: translate(-50%, -100%);
}
.tooltip .v { font-size: 15px; font-weight: 700; color: var(--ink-1); display: flex; align-items: center; gap: 8px; }
.tooltip .v::before { content: ""; width: 12px; height: 2px; border-radius: 2px; background: var(--series-1); }
.tooltip .k { color: var(--muted); }
.hbars { display: flex; flex-direction: column; gap: 10px; }
.hbar { display: grid; grid-template-columns: minmax(90px, 160px) 1fr; gap: 12px; align-items: center; position: relative; }
.hbar .name { font-size: 13.5px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbar .track { display: flex; align-items: center; gap: 8px; min-width: 0; }
.hbar .bar { height: 16px; background: var(--series-1); border-radius: 0 4px 4px 0; min-width: 2px; transition: filter .15s; }
.hbar .val { font-size: 12.5px; color: var(--ink-2); font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.hbar:hover .bar, .hbar:focus-visible .bar { filter: brightness(1.15); }
.table-view { margin-top: 12px; font-size: 13px; }
.table-view summary { cursor: pointer; color: var(--muted); font-size: 12.5px; }
.table-view table { margin-top: 8px; }

/* --- Formularios de acción en tarjetas ------------------------------------------------------- */
form.inline { display: inline; }
.actions-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
dl.kv { display: grid; grid-template-columns: max-content 1fr; gap: 8px 18px; margin: 0; font-size: 14px; }
dl.kv dt { color: var(--muted); } dl.kv dd { margin: 0; }
.kv-title { margin: 18px 0 8px; font-size: 13.5px; font-weight: 650; color: var(--ink-1); }

/* --- Fichas y acciones del centro de operación ------------------------------------------ */
.btn.danger { color: var(--critical-ink); }
.btn.ghost.danger:hover { background: color-mix(in srgb, var(--critical) 10%, var(--surface)); }
.action-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); }
.action { border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; background: var(--surface); min-width: 0; }
.action h3 { margin: 0 0 4px; font-size: 15px; }
.action p { margin: 0 0 10px; }
.action.danger { border-color: color-mix(in srgb, var(--critical) 35%, var(--border)); }
.action .actions-row { margin-top: 10px; }
.payout-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: flex-start; min-width: 250px; }
/* Retiros: todas las columnas parten desde arriba (la ficha de datos para transferir hace alta la fila). */
table.payouts td { vertical-align: top; }
table.payouts td.num { white-space: nowrap; }
.pay-days { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.pay-day { display: flex; flex-direction: column; gap: 2px; min-width: 190px; padding: 8px 12px;
  border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); }
.pay-day.is-today { border-color: var(--accent); }
.pay-day-when { font-size: 12.5px; color: var(--muted); }
.pay-day-when::first-letter { text-transform: uppercase; }
.pay-day-total { font-size: 13.5px; }
.pay-form { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.pay-form input, .pay-form select { height: 30px; font-size: 13px; width: auto; min-width: 0; flex: 1 1 130px; }
details.reject > summary { list-style: none; }
details.reject > summary::-webkit-details-marker { display: none; }
details.reject[open] > summary { display: none; }
ol.timeline { list-style: none; margin: 0; padding: 0; }
ol.timeline li { display: grid; grid-template-columns: 92px 1fr; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--grid); font-size: 14px; }
ol.timeline li:last-child { border-bottom: 0; }

/* --- Formularios completos ------------------------------------------------------------------- */
.form-grid { display: grid; gap: 4px 16px; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); }
.form-field { min-width: 0; }
.form-field .help { margin-top: 4px; }
.field-error { color: var(--critical-ink); font-size: 12.5px; margin-top: 4px; }
.has-error input, .has-error select { border-color: var(--critical); }
.check-label { display: flex; align-items: center; gap: 8px; margin: 12px 0 0; color: var(--ink-1); font-size: 14px; cursor: pointer; }
.check-label input { width: 16px; height: 16px; accent-color: var(--accent); }
.checks { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.checks .check-label { margin-top: 0; }
/* Mini gráfico de los indicadores y próximo pago de retiros (2026-10-03, referencia «Settle»). */
.kpi.has-spark { position: relative; }
.kpi .spark { position: absolute; top: 14px; right: 16px; width: 38%; max-width: 120px; height: 30px; overflow: visible; }
.kpi.has-spark .label { padding-right: calc(min(38%, 120px) + 8px); }
.spark-line { fill: none; stroke: var(--series-1); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.spark-area { fill: color-mix(in srgb, var(--series-1) 12%, transparent); stroke: none; }
.spark-dot { fill: var(--series-1); stroke: var(--surface); stroke-width: 2; }
.payout-total { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.payout-total .value { font-size: 26px; font-weight: 650; letter-spacing: -.02em; }
.pay-steps { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 0; }
.pay-steps li { position: relative; display: flex; gap: 12px; padding: 0 0 14px; }
.pay-steps li:last-child { padding-bottom: 0; }
.pay-steps li::before { content: ""; position: absolute; left: 6px; top: 16px; bottom: 0; width: 2px; background: var(--grid); }
.pay-steps li:last-child::before { display: none; }
.pay-steps .dot { position: relative; flex: none; width: 14px; height: 14px; margin-top: 2px; border-radius: 50%;
  border: 2px solid var(--axis); background: var(--surface); }
.pay-steps li.done .dot { border-color: var(--good); background: var(--good); }
.pay-steps li.current .dot { border-color: var(--warning); background: color-mix(in srgb, var(--warning) 35%, var(--surface)); }
.pay-steps .t { font-size: 14px; font-weight: 600; }
.pay-steps li.todo .t { color: var(--ink-2); font-weight: 500; }
@media (max-width: 600px) {
  /* En el celular el mini gráfico va debajo de la cifra, a todo el ancho, para no partir el título. */
  .kpi .spark { position: static; order: 10; width: 100%; max-width: none; height: 22px; margin-top: 6px; }
  .kpi.has-spark .label { padding-right: 0; }
}

/* Ruta en la barra superior y subtítulo al comienzo del contenido (2026-10-03). */
.crumbs { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: 13.5px; color: var(--muted); }
.crumbs .crumb { white-space: nowrap; color: var(--muted); }
.crumbs a.crumb:hover { color: var(--ink-1); }
.crumbs .sep { color: var(--axis); }
.crumbs h1 { font-size: 16px; font-weight: 650; color: var(--ink-1); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.page-intro { margin: -8px 0 18px; color: var(--muted); font-size: 13.5px; }
.page-intro:empty { display: none; }
@media (max-width: 700px) { .crumbs .crumb, .crumbs .sep { display: none; } }
/* Aviso principal del Resumen: lo más urgente y el botón a las tareas. */
.focus {
  display: flex; align-items: center; gap: 14px; padding: 14px 16px; margin-bottom: 18px; border-radius: var(--radius);
  border: 1px solid color-mix(in srgb, var(--warning) 45%, var(--border));
  background: color-mix(in srgb, var(--warning) 10%, var(--surface));
}
.focus.bad {
  border-color: color-mix(in srgb, var(--critical) 40%, var(--border));
  background: color-mix(in srgb, var(--critical) 7%, var(--surface));
}
.focus-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; flex: none;
  background: color-mix(in srgb, var(--warning) 22%, var(--surface)); color: var(--ink-1); }
.focus.bad .focus-icon { background: color-mix(in srgb, var(--critical) 16%, var(--surface)); color: var(--critical-ink); }
.focus-text { flex: 1; min-width: 0; display: grid; gap: 4px; }
.focus-items { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13.5px; }
.focus-items a { color: var(--ink-1); }
.focus-items b { font-weight: 700; }
@media (max-width: 600px) { .focus { flex-wrap: wrap; } .focus .btn { width: 100%; justify-content: center; } }
.age { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.list .row > .age { min-width: 64px; text-align: right; }

/* Aviso emergente de venta nueva (abajo a la derecha). */
.toasts { position: fixed; right: 16px; bottom: 16px; z-index: 60; display: flex; flex-direction: column; gap: 8px; width: min(380px, calc(100vw - 32px)); }
.toast {
  display: grid; gap: 4px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--border);
  border-left: 4px solid var(--accent); border-radius: var(--radius); box-shadow: var(--shadow), 0 8px 24px rgba(0, 0, 0, .18);
}
.toast.ok { border-left-color: var(--good); }
.toast.warn { border-left-color: var(--serious); }
.toast strong { font-size: 14px; }
.toast .toast-text { font-size: 13px; color: var(--ink-2); }
.toast .toast-actions { display: flex; gap: 8px; align-items: center; margin-top: 6px; }
.toast .toast-close { margin-left: auto; }
.toasts .toast-sound { align-self: flex-end; }

/* Lista de productos con buscador (declarar, descontar y cargar stock): al abrirla, la primera línea es el
   buscador. El <select> queda debajo, invisible, para enviar el formulario y mostrar el aviso de campo
   obligatorio del navegador. */
.combo { position: relative; }
.combo > select.combo-native {
  position: absolute; left: 0; bottom: 0; width: 100%; height: 38px; opacity: 0; pointer-events: none;
}
.combo-button {
  display: flex; align-items: center; gap: 8px; width: 100%; height: 38px; padding: 0 12px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--surface); color: var(--ink-1); font: inherit; font-size: 14px;
  text-align: left; cursor: pointer;
}
.combo-button::after {
  content: ""; flex: none; width: 7px; height: 7px; border-right: 1.5px solid var(--ink-2);
  border-bottom: 1.5px solid var(--ink-2); transform: translateY(-2px) rotate(45deg);
}
.combo.open .combo-button::after { transform: translateY(2px) rotate(-135deg); }
.combo-value { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.combo-value.placeholder { color: var(--muted); }
.combo.open .combo-button { border-color: var(--accent); }
.combo.invalid .combo-button { border-color: var(--critical); }
.combo-panel {
  position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 30; overflow: hidden;
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, .14);
}
.combo-panel input[type=search] {
  height: 40px; border: 0; border-bottom: 1px solid var(--border); border-radius: 0; background: var(--surface-2);
}
.combo-panel input[type=search]:focus { outline: none; }
.combo-list { position: relative; list-style: none; margin: 0; padding: 4px; max-height: 280px; overflow-y: auto; }
.combo-list li { padding: 8px 10px; border-radius: 8px; font-size: 14px; line-height: 1.35; cursor: pointer; }
.combo-list li:hover { background: var(--surface-2); }
.combo-list li.active { background: var(--accent-soft); }
.combo-list li[aria-selected=true] { font-weight: 600; }
.combo-note { padding: 7px 12px; font-size: 12px; color: var(--ink-2); border-top: 1px solid var(--border); }
.combo-list:empty + .combo-note { border-top: 0; }

/* Parámetros: menú de secciones a la izquierda y una fila por parámetro (referencia «Settle», 2026-10-03). */
.settings { display: grid; grid-template-columns: 236px minmax(0, 1fr); gap: 20px; align-items: start; }
.settings-nav {
  position: sticky; top: 84px; display: flex; flex-direction: column; gap: 2px; padding: 8px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow);
}
.settings-nav input[type=search] { height: 34px; font-size: 13px; margin-bottom: 6px; }
.settings-nav a {
  display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 8px; color: var(--ink-2);
  font-size: 13.5px;
}
.settings-nav a:hover { background: var(--surface-2); text-decoration: none; }
.settings-nav a.on { background: var(--surface-2); color: var(--ink-1); font-weight: 600; }
.settings-nav a .count { margin-left: auto; font-size: 12px; color: var(--muted); font-weight: 400; }
.settings-nav a[hidden] { display: none; }
.settings-nav .icon { width: 16px; height: 16px; }
.settings-card { padding: 0; scroll-margin-top: 84px; }
.settings-head { padding: 14px 18px 12px; border-bottom: 1px solid var(--border); }
.settings-head h2 { font-size: 15px; margin: 0; }
.settings-head .sub { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.param-row {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, auto); gap: 8px 28px; align-items: center;
  padding: 12px 18px; border-top: 1px solid var(--border); scroll-margin-top: 84px;
}
.settings-head + .param-row { border-top: 0; }
.param-row.wide { grid-template-columns: minmax(0, 1fr); }
.param-row.dirty { background: color-mix(in srgb, var(--accent) 6%, var(--surface)); }
.param-row:target { box-shadow: inset 3px 0 0 var(--accent); }
.param-row[hidden], .settings-card[hidden] { display: none; }
.param-label { display: block; margin: 0; font-size: 13.5px; font-weight: 600; color: var(--ink-1); }
.param-desc { margin: 2px 0 0; font-size: 12.5px; color: var(--muted); line-height: 1.45; max-width: 72ch; }
.param-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; margin-top: 4px; font-size: 11.5px; color: var(--muted); }
.param-meta code { font-size: 11px; }
.param-history summary { cursor: pointer; color: var(--accent-ink); }
.param-history table { margin-top: 4px; font-size: 12px; }
.param-history td { padding: 2px 10px 2px 0; border: 0; }
.param-control { display: flex; align-items: center; justify-content: flex-end; gap: 8px; min-width: 0; }
.param-row.wide .param-control { justify-content: flex-start; flex-wrap: wrap; align-items: flex-end; }
.param-control input[type=text], .param-control input[type=number], .param-control input[type=email],
.param-control select { height: 34px; font-size: 13.5px; }
.param-control > input[type=text]:not(.num), .param-control > select { width: 320px; max-width: 100%; }
.param-control .num { width: 96px; text-align: right; }
.param-control .unit { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.param-grid { flex: 1 1 100%; display: grid; gap: 8px 14px; grid-template-columns: repeat(auto-fill, minmax(min(170px, 100%), 1fr)); }
.param-grid label { margin: 0 0 3px; font-size: 12px; }
.with-unit { display: flex; align-items: center; gap: 6px; }
.with-unit input { min-width: 0; }
.param-more { flex: 1 1 100%; min-width: 0; max-width: 100%; }
.param-more summary { min-width: 0; display: flex; align-items: center; gap: 12px; cursor: pointer; font-size: 13px; list-style: none; }
.param-more summary::-webkit-details-marker { display: none; }
.param-more summary .muted { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.param-more summary .edit { color: var(--accent-ink); font-weight: 600; white-space: nowrap; }
.param-more[open] summary .edit { display: none; }
.param-more textarea { height: auto; padding: 8px 12px; margin-top: 8px; font-size: 13.5px; }
.js .param-row:not(.dirty) .param-save { visibility: hidden; }
.js .param-row.wide:not(.dirty) .param-save { display: none; }
.switch { position: relative; display: inline-flex; margin: 0; cursor: pointer; }
.switch input[type=checkbox] { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch span {
  position: relative; width: 40px; height: 22px; border-radius: 999px; transition: background .15s;
  background: color-mix(in srgb, var(--ink-1) 22%, var(--surface));
}
.switch span::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .3); transition: transform .15s;
}
.switch input:checked + span { background: var(--accent); }
.switch input:checked + span::after { transform: translateX(18px); }
.switch input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .switch span, .switch span::after { transition: none; } }
@media (max-width: 960px) {
  /* Como Settle en el celular: las secciones en una lista vertical dentro de una tarjeta, y cada
     parámetro con el control debajo (el interruptor queda a la derecha del nombre). */
  .settings { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .settings-nav { position: static; padding: 8px; }
  .settings-nav a { padding: 9px 10px; }
  .param-row { grid-template-columns: minmax(0, 1fr); padding: 14px 16px; gap: 10px; }
  .param-row.is-bool { grid-template-columns: minmax(0, 1fr) auto; align-items: start; }
  .param-row.is-bool .param-control { padding-top: 2px; }
  .param-control { justify-content: flex-start; flex-wrap: wrap; }
  .param-control > input[type=text]:not(.num), .param-control > select { width: 100%; max-width: 320px; }
  .js .param-row:not(.dirty) .param-save { display: none; }
}
details.collapsible > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; }
details.collapsible > summary::-webkit-details-marker { display: none; }
details.collapsible > summary h2 { margin: 0; }
details.collapsible > summary::after { content: "+"; margin-left: auto; font-size: 20px; color: var(--muted); }
details.collapsible[open] > summary::after { content: "−"; }
pre.code { white-space: pre-wrap; word-break: break-word; max-height: 320px; overflow: auto; font-size: 12px;
  background: var(--surface-2); border-radius: 8px; padding: 10px; margin: 6px 0 0; }
td input[type=checkbox], th input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--accent); }

ul.rules { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; line-height: 1.5; }

/* Guía de inicio del revendedor: pasos con su estado y el recorrido de una venta. */
.guide-steps, .guide-flow { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.guide-step {
  display: flex; align-items: center; gap: 14px; padding: 12px 14px; border: 1px solid var(--border);
  border-radius: 12px; background: var(--surface);
}
.guide-step.done { background: var(--surface-2); }
.guide-mark {
  width: 28px; height: 28px; border-radius: 50%; flex: none; display: grid; place-items: center;
  font-weight: 700; font-size: 13px; background: var(--accent-soft); color: var(--accent-ink);
}
.guide-step.done .guide-mark { background: color-mix(in srgb, var(--good) 18%, var(--surface)); color: var(--good-ink); }
.guide-body { flex: 1; min-width: 0; }
.guide-body p { margin: 2px 0 0; }
.guide-title { font-weight: 600; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.guide-flow { counter-reset: flow; }
.guide-flow li { counter-increment: flow; position: relative; padding-left: 40px; line-height: 1.5; min-height: 28px; }
.guide-flow li::before {
  content: counter(flow); position: absolute; left: 0; top: 0; width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center; font-weight: 700; font-size: 13px; background: var(--accent-soft); color: var(--accent-ink);
}
.guide-note { margin: 12px 0 0; }
.tabs .count-inline { margin-left: 4px; }
.todo-card { margin-bottom: 14px; }

/* Cómo se reparte el precio de sus ventas (Detalle por venta): barra apilada con 2 px entre tramos y leyenda con montos. */
.split-bar { display: flex; gap: 2px; height: 14px; border-radius: 7px; overflow: hidden; background: var(--surface-2); }
.split-bar i { display: block; height: 100%; min-width: 3px; }
.split-bar i:first-child, .split-legend .swatch.k-mine { border-radius: 0; }
.k-mine { background: var(--accent); }
.k-transfer_discount { background: var(--axis); }
.k-vat { background: var(--ink-2); }
.k-gateway_fee { background: var(--muted); }
.k-shipping { background: color-mix(in srgb, var(--ink-2) 55%, var(--surface)); }
.k-service { background: var(--ink-1); }
.split-legend { list-style: none; margin: 14px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 8px 24px; }
.split-legend li { display: flex; align-items: center; gap: 10px; }
.split-legend .swatch { width: 12px; height: 12px; border-radius: 3px; flex: none; }
.split-legend .split-label { flex: 1; min-width: 0; }
.split-legend .split-amount { font-variant-numeric: tabular-nums; font-weight: 600; }
.split-legend .split-pct { min-width: 52px; text-align: right; font-variant-numeric: tabular-nums; }

/* «Antes de enviar» del formulario de producto: avance y lista de lo obligatorio y lo recomendado. */
.quality-bar { height: 8px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.quality-bar i { display: block; height: 100%; width: 0; background: var(--accent); border-radius: 99px; transition: width .2s; }
.quality-list { list-style: none; margin: 14px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 6px 24px; }
.quality-list li { display: flex; align-items: center; gap: 10px; }
.quality-list .q-mark {
  width: 20px; height: 20px; border-radius: 50%; flex: none; display: grid; place-items: center; font-size: 12px; font-weight: 700;
  border: 1.5px solid var(--axis); color: var(--muted);
}
.quality-list .q-ok .q-mark { background: color-mix(in srgb, var(--good) 18%, var(--surface)); border-color: var(--good); color: var(--good-ink); }
.quality-list .q-label { flex: 1; min-width: 0; }
@media (prefers-reduced-motion: reduce) { .quality-bar i { transition: none; } }
.guide-card { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; justify-content: space-between; margin-bottom: 14px; }
.guide-card-text { flex: 1 1 320px; min-width: 0; }
.guide-card-text p { margin: 2px 0 8px; }
.guide-card .actions { display: flex; gap: 8px; align-items: center; }
.guide-bar { height: 6px; border-radius: 99px; background: var(--surface-2); overflow: hidden; max-width: 360px; }
.guide-bar i { display: block; height: 100%; background: var(--accent); border-radius: 99px; }
@media (max-width: 640px) { .guide-step { flex-wrap: wrap; } .guide-step .btn { margin-left: 42px; } }

/* --- Auditoría ------------------------------------------------------------------------------ */
.audit-day { font-size: 13px; font-weight: 600; color: var(--muted); margin: 18px 0 4px;
  padding-bottom: 6px; border-bottom: 1px solid var(--border); }
.audit-day::first-letter { text-transform: uppercase; }
.audit-row { display: flex; gap: 14px; padding: 12px 0 12px 10px; border-bottom: 1px solid var(--grid);
  border-left: 3px solid transparent; }
.audit-row.bad { border-left-color: var(--critical); }
.audit-row.warn { border-left-color: var(--warning); }
.audit-time { flex: none; width: 44px; font-variant-numeric: tabular-nums; color: var(--muted); font-size: 13px;
  padding-top: 2px; }
.audit-main { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 4px; }
.audit-title { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.audit-cat { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em;
  color: var(--accent-ink); background: var(--accent-soft); border-radius: 999px; padding: 1px 8px; }
.audit-subject { font-size: 14px; }
.audit-facts { display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 2px 0; font-size: 13px; }
.audit-facts div { display: flex; gap: 6px; min-width: 0; }
.audit-facts dt { color: var(--muted); }
.audit-facts dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }
@media (max-width: 600px) { .audit-row { flex-direction: column; gap: 2px; } .audit-time { width: auto; } }

/* --- Productos propuestos ------------------------------------------------------------------ */
.product-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 12px; }
.product-card { display: flex; gap: 12px; padding: 10px; border: 1px solid var(--border); border-radius: 12px;
  color: inherit; background: var(--surface); }
.product-card:hover { text-decoration: none; border-color: var(--accent); }
.product-pick { display: flex; align-items: center; gap: 8px; min-width: 0; }
.product-pick .product-card { flex: 1; min-width: 0; }
.product-pick input { flex: none; width: 18px; height: 18px; accent-color: var(--accent); }
.product-card img, .product-noimg { flex: none; width: 84px; height: 84px; border-radius: 8px; object-fit: cover;
  background: var(--surface-2); }
.product-noimg { display: grid; place-items: center; font-size: 12px; color: var(--muted); }
.product-info { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.product-form .card { margin-bottom: 16px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr)); gap: 0 16px; }
.name-preview { margin-top: 14px; padding: 10px 12px; border-radius: 10px; background: var(--accent-soft);
  color: var(--ink-1); font-size: 14px; }
.cat-checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr)); gap: 6px 16px;
  margin-bottom: 6px; }
.size-table input { max-width: 140px; }
.price-preview { margin-top: 14px; padding: 12px; border-radius: 10px; border: 1px solid var(--border); }
.price-preview .price-range { margin: 0; }
.price-matrix td, .price-matrix th { white-space: nowrap; }
.price-details { margin-top: 8px; }
.price-details summary { cursor: pointer; font-size: 14px; }
.bad-text { color: var(--critical); }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.photo-thumb { display: flex; flex-direction: column; }
.photo-thumb img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; border: 1px solid var(--border);
  background: var(--surface-2); }
.decision-form textarea { height: auto; padding: 8px 12px; }

/* --- Acceso (login) ----------------------------------------------------------------------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 3fr) minmax(380px, 2fr); }
/* Panel de marca (diseño del 2026-10-06): siempre oscuro, con la foto de la camiseta a la derecha que se
   funde con el fondo. Los textos son de la página (no van dentro de la imagen). */
.auth-visual { position: sticky; top: 0; align-self: start; overflow: hidden; color: #fff;
  background: radial-gradient(90% 70% at 85% 0%, #123a7a 0%, transparent 62%), linear-gradient(180deg, #060d1c 0%, #040813 100%); }
.auth-photo { position: absolute; top: 0; right: 0; width: min(54%, 640px); height: 74%; background-size: cover; background-position: top right; }
.auth-photo::after { content: ""; position: absolute; inset: 0;
  background: linear-gradient(to right, #050b19 0%, rgba(5, 11, 25, .45) 38%, transparent 75%),
    linear-gradient(to top, #040813 0%, rgba(4, 8, 19, .6) 22%, transparent 55%); }
.auth-visual-inner { position: relative; display: flex; flex-direction: column; justify-content: center; gap: 40px;
  min-height: 100vh; padding: 36px clamp(28px, 5vw, 64px); }
.auth-eyebrow { margin: 0 0 14px; font-size: 13px; font-weight: 600; letter-spacing: .32em; text-transform: uppercase; color: #4a9bff; }
.auth-headline { margin: 0; max-width: 11em; font-size: clamp(34px, 4.2vw, 60px); line-height: 1.04; font-weight: 700;
  letter-spacing: -.02em; color: #fff; text-wrap: balance; }
.auth-headline span { color: #2f8bff; }
.auth-lead { margin: 18px 0 0; max-width: 34ch; font-size: 17px; line-height: 1.55; color: rgba(255, 255, 255, .82); }
.auth-features { list-style: none; margin: 32px 0 0; padding: 0; display: grid; gap: 20px 18px; max-width: 780px;
  grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); }
.auth-features li { display: grid; align-content: start; gap: 4px; max-width: none; }
.auth-features strong { font-size: 15px; }
.auth-features li > span:not(.feat-icon) { font-size: 13.5px; line-height: 1.4; color: rgba(255, 255, 255, .7); }
.feat-icon { width: 46px; height: 46px; margin-bottom: 8px; border-radius: 12px; display: grid; place-items: center;
  color: #5aa2ff; background: rgba(47, 139, 255, .14); border: 1px solid rgba(47, 139, 255, .35); }
.feat-icon svg { width: 24px; height: 24px; }
.auth-join { display: flex; align-items: center; gap: 16px; max-width: 780px; padding: 16px 20px; border-radius: 14px; color: #fff;
  background: rgba(20, 70, 160, .28); border: 1px solid rgba(47, 139, 255, .35); }
.auth-join:hover { text-decoration: none; background: rgba(20, 70, 160, .4); }
.join-icon { width: 48px; height: 48px; flex: none; border-radius: 12px; display: grid; place-items: center; background: #1c64e0; }
.join-icon svg { width: 26px; height: 26px; }
.join-text { display: grid; gap: 2px; min-width: 0; }
.join-text strong { font-size: 16px; }
.join-text span { font-size: 14px; color: rgba(255, 255, 255, .75); }
.join-script { margin-left: auto; padding-left: 12px; font-family: Caveat, "Segoe Script", cursive; font-size: 28px; line-height: 1;
  color: #4a9bff; transform: rotate(-6deg); white-space: nowrap; }
/* Pantallas bajas (portátiles): todo el panel izquierdo cabe sin cortarse. */
@media (max-height: 860px) {
  .auth-visual-inner { padding-block: 22px; gap: 26px; }
  .auth-headline { font-size: clamp(30px, 3.4vw, 46px); }
  .auth-lead { margin-top: 12px; font-size: 16px; }
  .auth-features { margin-top: 20px; gap: 14px; }
  .feat-icon { width: 40px; height: 40px; margin-bottom: 4px; }
  .auth-join { padding: 12px 18px; }
}
.auth-form { background: var(--surface); display: flex; align-items: center; justify-content: center; padding: 40px 32px; }
.auth-inner { width: 100%; max-width: 440px; }
.auth-title { font-size: 24px; font-weight: 600; margin: 0 0 6px; }
.auth-title.hero { font-size: clamp(30px, 3vw, 40px); font-weight: 700; line-height: 1.1; letter-spacing: -.02em; margin: 0 0 14px; }
.auth-title.hero span { color: var(--accent); }
.auth-sub { color: var(--muted); margin: 0 0 20px; font-size: 15px; }
.auth-fields label { margin-top: 10px; }
.auth-fields input[type=email], .auth-fields input[type=password], .auth-fields input[type=text] { height: 52px; border-radius: 10px; }
.input-icon { position: relative; }
.input-icon .field-icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px;
  color: var(--muted); pointer-events: none; }
.input-icon input { width: 100%; padding-left: 46px; }
.password-field { position: relative; }
.password-field input { padding-right: 46px; width: 100%; }
.pw-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; border: 0;
  background: transparent; color: var(--muted); border-radius: 8px; cursor: pointer; display: grid; place-items: center; }
.pw-toggle:hover { color: var(--ink-1); background: var(--surface-2); }
.pw-toggle svg { width: 20px; height: 20px; }
.pw-toggle[aria-pressed="true"] { color: var(--accent); }
.auth-row { display: flex; justify-content: flex-end; margin: 10px 0 16px; font-size: 14px; }
.auth-submit { width: 100%; justify-content: center; height: 52px; font-size: 16px; border-radius: 10px; gap: 10px; }
.auth-submit .icon { width: 20px; height: 20px; }
.auth-trust { list-style: none; margin: 34px 0 0; padding: 0; display: flex; justify-content: center; flex-wrap: wrap; gap: 8px 0; }
.auth-trust li { display: inline-flex; align-items: center; gap: 8px; max-width: none; padding: 0 18px; font-size: 13px; color: var(--ink-2); }
.auth-trust li + li { border-left: 1px solid var(--border); }
.auth-trust .icon { width: 20px; height: 20px; color: var(--accent); }
@media (max-width: 480px) { .auth-trust { flex-wrap: nowrap; } .auth-trust li { padding: 0 9px; gap: 6px; font-size: 12.5px; white-space: nowrap; } .auth-trust .icon { width: 18px; height: 18px; } }
.apply-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
@media (max-width: 480px) { .apply-grid { grid-template-columns: 1fr; } }
.apply-section { margin: 18px 0 0; font-size: 13px; font-weight: 600; color: var(--ink-1); }
/* Postulaciones en el centro de operación: una tarjeta por persona, con secciones. */
.app-card { padding: 0; }
.app-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.app-avatar { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; flex: none; font-weight: 700;
  background: var(--accent-soft); color: var(--accent-ink); }
.app-head h2 { margin: 0; font-size: 17px; }
.app-head .sub { color: var(--muted); font-size: 12.5px; }
.app-head .grow { flex: 1; min-width: 200px; }
.app-body { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(230px, 100%), 1fr)); gap: 0; }
.app-block { padding: 14px 20px; border-right: 1px solid var(--border); min-width: 0; }
.app-block:last-child { border-right: 0; }
@media (max-width: 760px) { .app-block { border-right: 0; border-top: 1px solid var(--border); } .app-block:first-child { border-top: 0; } }
.app-block h3 { margin: 0 0 8px; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; }
.app-block dl { margin: 0; display: grid; gap: 6px; font-size: 13.5px; }
.app-block dt { color: var(--muted); font-size: 12px; }
.app-block dd { margin: 0; overflow-wrap: anywhere; }
.app-socials { display: flex; flex-wrap: wrap; gap: 6px; }
.app-socials a { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: var(--surface-2); font-size: 13px; color: var(--ink-1); }
.app-socials a:hover { text-decoration: none; background: var(--accent-soft); }
.app-flags { display: grid; gap: 6px; margin-top: 8px; }
.app-foot { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 10px; padding: 14px 20px; border-top: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface-2) 50%, var(--surface)); border-radius: 0 0 var(--radius) var(--radius); }
.app-foot .grow { flex: 1; min-width: 220px; font-size: 13.5px; }
.apply-actions { display: flex; gap: 8px; align-items: flex-start; flex-wrap: wrap; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.auth-foot { margin: 22px 0 0; text-align: center; color: var(--muted); font-size: 14px; }
.auth-or { display: flex; align-items: center; gap: 12px; margin: 18px 0; color: var(--muted); font-size: 13px; }
.auth-or::before, .auth-or::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.auth-google { width: 100%; justify-content: center; height: 44px; gap: 10px; font-size: 15px; }
.auth-google svg { width: 18px; height: 18px; }
.auth-note { margin: 8px 0 0; text-align: center; color: var(--muted); font-size: 13px; }
@media (max-width: 960px) {
  .auth { grid-template-columns: 1fr; }
  .auth-visual { display: none; }
  .auth-form { align-items: flex-start; padding: 32px 16px; }
}
/* Páginas de error */
.error-card { text-align: left; }
.error-code { font-size: 46px; font-weight: 700; letter-spacing: -.02em; color: var(--muted); margin: 0 0 2px; line-height: 1.1; }
.error-card h1 { font-size: 20px; margin: 0 0 8px; }
.error-card .actions-row { margin-top: 20px; }
.qr svg { display: block; width: 100%; height: auto; }

/* --- Celular ------------------------------------------------------------------------------ */
@media (max-width: 960px) {
  .app { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed; z-index: 60; left: 0; top: 0; width: min(300px, 86vw);
    transform: translateX(-102%); transition: transform .2s ease; box-shadow: 0 0 40px rgba(0, 0, 0, .25);
  }
  body.nav-open .sidebar { transform: none; }
  body.nav-open::after { content: ""; position: fixed; inset: 0; background: rgba(0, 0, 0, .35); z-index: 50; }
  .btn.menu-btn { display: inline-flex; }
  .topbar { padding: 10px 16px; min-height: 56px; flex-wrap: wrap; row-gap: 8px; gap: 8px; }
  /* Una sola fila: menú, título (en una línea) y botones. Los filtros de la página, si hay, van debajo;
     la explicación de la página va al comienzo del contenido (referencia Settle). */
  .topbar .title { flex: 1 1 0; min-width: 0; }
  .topbar h1, .crumbs h1 { font-size: 17px; line-height: 1.3; font-weight: 650; white-space: nowrap;
    overflow: hidden; text-overflow: ellipsis; }
  .page-intro { margin: 0 0 14px; font-size: 13px; }
  .topbar .spacer { display: none; }
  .topbar .tools { order: 10; flex-basis: 100%; gap: 6px; }
  .topbar .tools .muted.small { flex-basis: 100%; }
  /* Tablas que en el celular se muestran como tarjetas (clase "stack"). */
  .table-wrap:has(table.stack) { overflow: visible; margin: 0; }
  .card:has(table.stack) { background: none; border: 0; box-shadow: none; padding: 0; }
  table.stack, table.stack tbody, table.stack tr, table.stack td { display: block; width: 100%; }
  table.stack thead { display: none; }
  table.stack tr { border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; margin-bottom: 10px;
    background: var(--surface); }
  table.stack td { border: 0; padding: 3px 0; }
  table.stack td[data-label]::before { content: attr(data-label); display: block; font-size: 11px; font-weight: 600;
    text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-top: 6px; }
  table.stack td.cell-action { padding-top: 10px; }
  /* Montos en tarjetas: nombre a la izquierda y valor a la derecha, una línea cada uno. */
  table.stack td.num[data-label] { display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
    text-align: right; padding: 4px 0; border-top: 1px dashed var(--grid); }
  table.stack td.num[data-label]::before { margin-top: 0; flex: none; }
  table.stack td.cell-title { padding-bottom: 6px; }
  .table-wrap table.stack td:first-child, .table-wrap table.stack td:last-child { padding-left: 0; padding-right: 0; }
  table.stack td.num.nocost[data-label] { display: none; }
  table.stack tfoot { display: block; }
  table.stack tfoot tr { background: color-mix(in srgb, var(--surface-2) 50%, var(--surface)); }
  table.stack tfoot td { background: none; border-top: 0; }
  table.stack tfoot td:empty { display: none; }
  table.stack td.cell-action .btn { width: 100%; justify-content: center; height: 40px; }
  .content { padding: 18px 16px 48px; }
  /* Botones de la cabecera de una tarjeta: bajan de línea en vez de salirse de la pantalla. */
  .card-head { flex-wrap: wrap; }
  .card-head .actions { margin-left: 0; flex-wrap: wrap; }
  .cols-2 { grid-template-columns: minmax(0, 1fr); }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kpi { padding: 12px 14px; }
  .kpi .value { font-size: 20px; } .kpi.hero .value { font-size: 24px; }
  .kpi .delta .muted { display: none; }
  .hide-sm { display: none; }
  .list .row { flex-wrap: wrap; }
  .list .row .row-status { flex-basis: 100%; max-width: 100%; justify-content: flex-start; text-align: left; }
}
@media print { .sidebar, .topbar { display: none; } .app { display: block; } }

/* Novedades de la tienda: tarjetas y lista del administrador. */
.news-body { line-height: 1.55; max-width: 75ch; }
.news-card.is-new { border-color: var(--accent); }
.news-item .news-body { margin-top: 6px; font-size: 14px; }
.news-item.archived { opacity: .6; }
.news-image { display: block; max-width: min(100%, 720px); max-height: 560px; width: auto; height: auto; margin-top: 12px; border-radius: 8px; border: 1px solid var(--border); }
.news-zoom { display: inline-block; cursor: zoom-in; }
.news-zoom-hint { margin-top: 6px; }
.news-item .news-image { max-width: min(100%, 360px); max-height: 260px; }
.news-reaction-summary { margin-top: 8px; }
.news-reactions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.reaction { display: inline-flex; align-items: center; gap: 5px; min-height: 36px; padding: 4px 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); font-size: 16px; line-height: 1; cursor: pointer; color: inherit; }
.reaction:hover { border-color: var(--accent); }
.reaction.is-mine { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, var(--surface)); }
.reaction-count { font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
/* Chat con la tienda (2026-10-16): burbujas; las propias a la derecha */
.chat-layout { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 860px) { .chat-layout { grid-template-columns: 1fr; } }
.chat-scroll { max-height: 56vh; overflow-y: auto; padding: 4px 2px; }
.chat-list { display: flex; flex-direction: column; gap: 10px; }
.chat-msg { max-width: 82%; padding: 9px 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); align-self: flex-start; }
.chat-msg.mine { align-self: flex-end; background: color-mix(in srgb, var(--accent) 14%, var(--surface)); border-color: color-mix(in srgb, var(--accent) 35%, var(--border)); }
.chat-meta { font-size: 11.5px; color: var(--muted); margin-bottom: 3px; }
.chat-body { line-height: 1.5; overflow-wrap: anywhere; }
.chat-form { margin-top: 14px; }
.btn.whatsapp { background: #128c4a; border-color: #128c4a; color: #fff; }
/* Datos de la cuenta de la tienda: plegados hasta que el revendedor los pide */
details.store-bank > summary { list-style: none; display: inline-flex; }
details.store-bank > summary::-webkit-details-marker { display: none; }
details.store-bank[open] > summary { margin-bottom: 4px; }
/* Dónde dejar el paquete: mapa oficial de Blue Express que se carga a pedido */
.dropoff-map { margin-top: 10px; }
.dropoff-frame { display: block; width: 100%; height: 480px; margin-top: 12px; border: 1px solid var(--border); border-radius: 10px; }
/* Imagen ampliada: un toque la abre en grande, otro a tamaño real (se desplaza) */
.lightbox { padding: 0; border: 0; background: transparent; max-width: 100vw; max-height: 100vh; overflow: visible; }
.lightbox::backdrop { background: rgba(0, 0, 0, .86); }
.lightbox img { display: block; max-width: 94vw; max-height: 88vh; border-radius: 8px; cursor: zoom-in; }
.lightbox.is-zoomed { width: 100vw; height: 100vh; overflow: auto; }
.lightbox.is-zoomed img { max-width: none; max-height: none; border-radius: 0; cursor: zoom-out; }
.lightbox-close { position: fixed; top: 12px; right: 12px; z-index: 2; width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .92); color: #0b0b0b; font-size: 18px; cursor: pointer; }
.news-ai button.is-busy { opacity: .7; cursor: progress; }

/* Mi cumplimiento y modo vacaciones (Inicio del revendedor). */
.standing-card { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; justify-content: space-between; margin-bottom: 14px; }
.standing-text { flex: 1 1 320px; min-width: 0; }
.standing-text p { margin: 2px 0 0; }
.standing-meter { flex: 0 1 260px; display: flex; flex-direction: column; gap: 6px; }
.standing-count { font-size: 20px; font-variant-numeric: tabular-nums; }
.vacation-banner { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; justify-content: space-between; }
.vacation-banner form { margin: 0; }

/* Cuadro de confirmación propio (reemplaza el del navegador): título, texto y botones con el tema del panel. */
.confirm-dialog {
  border: 1px solid var(--border); border-radius: var(--radius); padding: 0; background: var(--surface); color: var(--ink-1);
  width: min(92vw, 440px); box-shadow: 0 24px 70px rgba(0, 0, 0, .35);
}
.confirm-dialog::backdrop { background: rgba(11, 11, 11, .55); backdrop-filter: blur(2px); }
.confirm-dialog[open] { animation: confirm-in .14s ease-out; }
@keyframes confirm-in { from { opacity: 0; transform: translateY(6px) scale(.98); } to { opacity: 1; transform: none; } }
.confirm-dialog form { padding: 22px 22px 18px; margin: 0; }
.confirm-icon {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 20px;
  background: var(--accent-soft); color: var(--accent-ink); margin-bottom: 12px;
}
.confirm-dialog.danger .confirm-icon { background: color-mix(in srgb, var(--critical) 14%, var(--surface)); color: var(--critical-ink); }
.confirm-dialog h2 { font-size: 17px; line-height: 1.3; margin: 0 0 6px; }
.confirm-dialog p { margin: 0; color: var(--ink-2); line-height: 1.55; font-size: 14px; }
.confirm-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; margin-top: 20px; }
.btn.critical { background: var(--critical); border-color: var(--critical); color: #fff; }
.btn.critical:hover { filter: brightness(1.08); }
@media (prefers-reduced-motion: reduce) { .confirm-dialog[open] { animation: none; } }

/* Tablas de stock por producto: una fila por producto y sus tallas en una línea (pedido del 2026-10-14). */
.size-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.size-chip {
  display: inline-flex; align-items: baseline; gap: 6px; padding: 2px 9px; border-radius: 999px; font-size: 13px;
  border: 1px solid var(--border); background: var(--surface-2); font-variant-numeric: tabular-nums; white-space: nowrap;
}
.size-chip b { font-weight: 700; }
.size-chip.is-zero { opacity: .5; }
.size-chip.is-low { background: color-mix(in srgb, var(--warning) 22%, var(--surface)); border-color: var(--warning); }
details.sizes > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
details.sizes > summary::-webkit-details-marker { display: none; }
details.sizes > summary::after { content: "Ver detalle"; margin-left: auto; font-size: 12px; color: var(--accent-ink); white-space: nowrap; }
details.sizes[open] > summary::after { content: "Ocultar"; }
details.sizes table.mini, table.mini { width: 100%; background: var(--surface-2); border-radius: 10px; }
.stock-table .stock-name { min-width: 180px; }
.stock-table tr.stock-group > td { vertical-align: top; }
/* El detalle por talla va en una fila propia, a todo el ancho, que se muestra cuando la fila de arriba está abierta. */
tr.stock-detail { display: none; }
tr.stock-group:has(details.sizes[open]) + tr.stock-detail { display: table-row; }
tr.stock-detail > td { padding-top: 0; }
tr.stock-group:has(details.sizes[open]) > td { border-bottom-color: transparent; }
