/* Savage Labs — Control de stock.
   Layout: barra superior fija (marca, buscador, acciones) · cuerpo a pantalla completa con la lista
   de productos y el historial en una columna lateral (cajón en pantallas chicas).
   Estética negra monocroma; el color aparece solo para estados (ok / reponer / sin stock). */

.sl-app, .sl-capa, .sl-toast {
	--sl-bg: #070708;
	--sl-surface: #111113;
	--sl-surface-2: #19191c;
	--sl-surface-3: #222226;
	--sl-line: #242428;
	--sl-line-strong: #38383f;
	--sl-fg: #efeeea;
	--sl-muted: #8f8e89;
	--sl-faint: #5e5d5a;
	--sl-accent: #f5f3ed;
	--sl-accent-ink: #070708;
	--sl-ok: #79b996;
	--sl-low: #e0ad5c;
	--sl-out: #e5786c;
	--sl-in: #8db6e0;
	--sl-wide: "Archivo", "Arial Black", system-ui, sans-serif;
	--sl-body: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
	--sl-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
	--sl-r: 8px;
	color-scheme: dark;
}

/* ---------- aislamiento del tema ---------- */
body.sl-lienzo { margin: 0 !important; padding: 0 !important; background: #070708 !important; }
/* Por si algún plugin igual inyecta algo: en el lienzo solo se ve el panel. */
html:has(body.sl-lienzo) { margin-top: 0 !important; }
body.sl-lienzo > *:not(.sl-app):not(.sl-capa):not(.sl-toast):not(script):not(style):not(link) { display: none !important; }
body.sl-lienzo #wpadminbar { display: none !important; }
.sl-app, .sl-capa {
	background: var(--sl-bg); color: var(--sl-fg); font-family: var(--sl-body);
	font-size: 15px; line-height: 1.45; text-align: left; -webkit-font-smoothing: antialiased;
}
.sl-app { border-radius: 12px; margin: 0 0 24px; max-width: 100%; overflow: hidden; padding: 20px; }
.sl-app *, .sl-app *::before, .sl-app *::after,
.sl-capa *, .sl-capa *::before, .sl-capa *::after { box-sizing: border-box; }
.sl-app :where(h1, h2, h3, p, ul, li, form, label, fieldset),
.sl-capa :where(h1, h2, h3, p, ul, li, form, label, fieldset) {
	margin: 0; padding: 0; color: inherit; border: 0; background: none; text-transform: none; letter-spacing: normal; font-family: inherit;
}
.sl-app :where(button, input, select, textarea),
.sl-capa :where(button, input, select, textarea) {
	font: inherit; color: inherit; margin: 0; text-transform: none; letter-spacing: normal; box-shadow: none;
	text-shadow: none; min-height: 0; height: auto; line-height: 1.25; width: auto; max-width: 100%;
}
.sl-app :focus-visible, .sl-capa :focus-visible { outline: 2px solid var(--sl-accent); outline-offset: 2px; }
.sl-app [hidden], .sl-capa[hidden], .sl-capa [hidden], .sl-toast[hidden] { display: none !important; }
.sl-app a { color: var(--sl-fg); }

/* ---------- pantalla completa ---------- */
.sl-app.sl-full {
	border-radius: 0; margin: 0; padding: 0; width: 100%;
	min-height: 100vh;
	min-height: calc(100dvh - var(--wp-admin--admin-bar--height, 0px));
	display: flex; flex-direction: column; overflow: visible;
}
/* Si el panel completo queda dentro de un tema (página con constructor), sale del contenedor. */
.entry-content .sl-app.sl-full, .wp-block-post-content .sl-app.sl-full, .elementor-widget-container .sl-app.sl-full {
	width: 100vw; max-width: 100vw; margin-left: calc(50% - 50vw);
}
.sl-cargando { color: var(--sl-muted); padding: 32px; }

/* ---------- marca ---------- */
.sl-logo {
	font-family: var(--sl-wide); font-stretch: 125%; font-weight: 800; text-transform: uppercase;
	letter-spacing: .02em; font-size: 20px; line-height: 1; white-space: nowrap;
}
.sl-logo-sub { font-family: var(--sl-mono); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--sl-muted); margin-top: 5px; white-space: nowrap; }

/* ---------- barra superior ---------- */
.sl-barra {
	position: sticky; top: var(--wp-admin--admin-bar--height, 0px); z-index: 20;
	display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
	padding: 14px max(20px, env(safe-area-inset-right, 0px)) 14px max(20px, env(safe-area-inset-left, 0px));
	background: rgba(7, 7, 8, .92); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
	border-bottom: 1px solid var(--sl-line);
}
.sl-app:not(.sl-full) .sl-barra { position: static; padding: 0 0 16px; background: none; }
.sl-marca { flex: none; }
.sl-buscar {
	flex: 1 1 320px; display: flex; align-items: center; gap: 10px; min-width: 0;
	background: var(--sl-surface); border: 1px solid var(--sl-line); border-radius: var(--sl-r); padding: 0 12px;
	transition: border-color .15s;
}
.sl-buscar:focus-within { border-color: var(--sl-muted); }
.sl-buscar svg { width: 18px; height: 18px; color: var(--sl-muted); flex: none; }
.sl-app .sl-buscar input { flex: 1; min-width: 0; border: 0; background: transparent; padding: 12px 0; font-size: 15px; outline: none; }
.sl-buscar input::placeholder { color: var(--sl-faint); opacity: 1; }
.sl-buscar kbd { font-family: var(--sl-mono); font-size: 11px; color: var(--sl-faint); border: 1px solid var(--sl-line-strong); border-radius: 4px; padding: 1px 6px; }
.sl-barra-acc { display: flex; gap: 8px; flex-wrap: wrap; margin-left: auto; }

/* ---------- botones ---------- */
.sl-btn, .sl-app .sl-btn, .sl-capa .sl-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	border: 1px solid var(--sl-line-strong); background: transparent; color: var(--sl-fg);
	border-radius: var(--sl-r); padding: 11px 16px; cursor: pointer; font-weight: 700; font-size: 14px;
	text-decoration: none; white-space: nowrap; transition: background .15s, border-color .15s, transform .05s;
	min-height: 44px;
}
.sl-btn:hover { background: var(--sl-surface-2); border-color: var(--sl-muted); color: var(--sl-fg); }
.sl-btn:active { transform: translateY(1px); }
.sl-app .sl-btn.sl-primario, .sl-capa .sl-btn.sl-primario { background: var(--sl-accent); color: var(--sl-accent-ink); border-color: var(--sl-accent); }
.sl-app .sl-btn.sl-primario:hover, .sl-capa .sl-btn.sl-primario:hover { background: #fff; }
.sl-capa .sl-btn.sl-peligro { color: var(--sl-out); border-color: rgba(229, 120, 108, .45); }
.sl-capa .sl-btn.sl-peligro.sl-armado { background: var(--sl-out); color: var(--sl-accent-ink); border-color: var(--sl-out); }
.sl-btn:disabled { opacity: .4; cursor: not-allowed; }
.sl-btn svg { width: 17px; height: 17px; flex: none; }
.sl-solo-movil { display: none !important; }

/* ---------- cuerpo ---------- */
.sl-cuerpo { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) 380px; min-height: 0; }
.sl-app:not(.sl-full) .sl-cuerpo { grid-template-columns: minmax(0, 1fr); gap: 24px; }
.sl-main { padding: 24px max(20px, env(safe-area-inset-left, 0px)) 48px; display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.sl-app:not(.sl-full) .sl-main { padding: 0; }

/* totales */
.sl-totales { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--sl-line); border: 1px solid var(--sl-line); border-radius: var(--sl-r); overflow: hidden; }
.sl-total { background: var(--sl-surface); padding: 16px 18px; display: flex; flex-direction: column; gap: 4px; min-width: 0; text-align: left; border: 0; border-radius: 0; }
.sl-app button.sl-total { cursor: pointer; transition: background .15s; }
.sl-app button.sl-total:hover { background: var(--sl-surface-2); }
.sl-total .sl-lbl { font-family: var(--sl-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--sl-muted); }
.sl-total .sl-val { font-family: var(--sl-wide); font-stretch: 110%; font-size: clamp(24px, 3vw, 32px); font-weight: 600; line-height: 1.1; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.sl-total .sl-sub { font-size: 12.5px; color: var(--sl-faint); }
.sl-total.sl-atencion .sl-val { color: var(--sl-low); }
.sl-total.sl-atencion .sl-sub { color: var(--sl-muted); }

/* filtros */
.sl-filtros { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.sl-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.sl-app .sl-chip {
	display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--sl-line); background: transparent;
	color: var(--sl-muted); border-radius: 999px; padding: 8px 14px; cursor: pointer; font-weight: 700; font-size: 13px; min-height: 38px;
}
.sl-app .sl-chip:hover { border-color: var(--sl-line-strong); color: var(--sl-fg); }
.sl-app .sl-chip[aria-pressed="true"] { background: var(--sl-fg); color: var(--sl-accent-ink); border-color: var(--sl-fg); }
.sl-chip .sl-n { font-family: var(--sl-mono); font-weight: 500; font-size: 12px; opacity: .75; }
.sl-chip .sl-punto { width: 7px; height: 7px; border-radius: 50%; }
.sl-filtros-der { display: flex; gap: 8px; margin-left: auto; flex-wrap: wrap; }
.sl-app .sl-select, .sl-capa .sl-select {
	background: var(--sl-surface); border: 1px solid var(--sl-line); border-radius: var(--sl-r);
	padding: 9px 12px; min-height: 38px; color: var(--sl-fg); font-size: 13px; font-weight: 600; appearance: auto;
}

/* lista de productos */
.sl-lista { display: flex; flex-direction: column; border: 1px solid var(--sl-line); border-radius: var(--sl-r); background: var(--sl-surface); overflow: hidden; }
.sl-fila, .sl-cabecera {
	display: grid; grid-template-columns: minmax(0, 1fr) 128px 190px 268px; gap: 16px; align-items: center;
	padding: 14px 18px; border-bottom: 1px solid var(--sl-line);
}
.sl-solo-lectura .sl-fila, .sl-solo-lectura .sl-cabecera { grid-template-columns: minmax(0, 1fr) 128px 190px; }
.sl-cabecera { padding-block: 10px; font-family: var(--sl-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--sl-faint); background: var(--sl-bg); }
.sl-cabecera .sl-der { text-align: right; }
.sl-fila:last-child { border-bottom: 0; }
.sl-fila { transition: background .12s; position: relative; }
.sl-fila:hover { background: var(--sl-surface-2); }
.sl-fila::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: transparent; }
.sl-fila.sl-e-low::before { background: var(--sl-low); }
.sl-fila.sl-e-out::before { background: var(--sl-out); }
.sl-fila.sl-destello { animation: sl-destello 1.2s ease-out; }
@keyframes sl-destello { from { background: var(--sl-surface-3); } to { background: transparent; } }
.sl-nombre { font-weight: 700; font-size: 15.5px; overflow-wrap: anywhere; }
.sl-meta { font-size: 12.5px; color: var(--sl-faint); margin-top: 2px; overflow-wrap: anywhere; }
.sl-meta .sl-codigo { font-family: var(--sl-mono); color: var(--sl-muted); }
.sl-pill { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; white-space: nowrap; background: var(--sl-surface-3); }
.sl-pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.sl-pill.sl-ok { color: var(--sl-ok); } .sl-pill.sl-low { color: var(--sl-low); } .sl-pill.sl-out { color: var(--sl-out); }
.sl-stock { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.sl-stock-num { display: flex; align-items: baseline; gap: 6px; }
.sl-cant { font-family: var(--sl-wide); font-stretch: 110%; font-weight: 600; font-size: 26px; line-height: 1; font-variant-numeric: tabular-nums; }
.sl-u { font-size: 12px; color: var(--sl-muted); }
.sl-medidor { width: 120px; height: 4px; border-radius: 2px; background: var(--sl-line); overflow: hidden; }
.sl-medidor i { display: block; height: 100%; border-radius: 2px; }
.sl-min { font-size: 11.5px; color: var(--sl-faint); }
.sl-acciones { display: flex; gap: 8px; justify-content: flex-end; }
.sl-app .sl-mov { min-height: 42px; padding: 9px 14px; font-size: 14px; }
.sl-app .sl-mov.sl-mov-in:hover { border-color: var(--sl-in); }
.sl-app .sl-mov.sl-mov-out:hover { border-color: var(--sl-out); }
.sl-app .sl-icono { width: 42px; min-height: 42px; padding: 0; }
.sl-vacio { padding: 48px 24px; text-align: center; color: var(--sl-muted); display: flex; flex-direction: column; align-items: center; gap: 14px; }
.sl-vacio strong { font-family: var(--sl-wide); font-stretch: 110%; font-size: 22px; color: var(--sl-fg); font-weight: 700; }
.sl-pasos { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 24px; font-size: 14px; color: var(--sl-muted); margin: 4px 0 6px; list-style: none; counter-reset: paso; }
.sl-pasos li { counter-increment: paso; display: flex; gap: 8px; align-items: center; }
.sl-pasos li::before { content: counter(paso); font-family: var(--sl-mono); font-size: 12px; width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--sl-line-strong); display: grid; place-items: center; color: var(--sl-fg); }

/* ---------- historial (columna lateral / cajón) ---------- */
.sl-lateral { border-left: 1px solid var(--sl-line); background: var(--sl-bg); display: flex; flex-direction: column; min-height: 0; }
.sl-app.sl-full .sl-lateral { position: sticky; top: calc(var(--wp-admin--admin-bar--height, 0px) + var(--sl-barra-h, 73px)); height: calc(100vh - var(--wp-admin--admin-bar--height, 0px) - var(--sl-barra-h, 73px)); }
.sl-app:not(.sl-full) .sl-lateral { border: 1px solid var(--sl-line); border-radius: var(--sl-r); max-height: 560px; }
.sl-lateral-cab { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 20px 20px 12px; }
.sl-h { font-family: var(--sl-wide); font-stretch: 110%; font-weight: 700; font-size: 18px; letter-spacing: -.005em; }
.sl-log { flex: 1; overflow-y: auto; padding: 0 12px 20px; display: flex; flex-direction: column; gap: 2px; }
.sl-log-dia { font-family: var(--sl-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--sl-faint); padding: 14px 8px 6px; }
.sl-log-item { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 10px; align-items: start; padding: 10px 8px; border-radius: 6px; }
.sl-log-item:hover { background: var(--sl-surface); }
.sl-delta { font-family: var(--sl-mono); font-weight: 500; font-size: 14px; font-variant-numeric: tabular-nums; padding-top: 1px; }
.sl-delta.sl-in { color: var(--sl-in); } .sl-delta.sl-outv { color: var(--sl-out); } .sl-delta.sl-adj { color: var(--sl-low); }
.sl-log-main { min-width: 0; }
.sl-log-t { font-weight: 700; font-size: 14px; overflow-wrap: anywhere; }
.sl-log-n { font-size: 12.5px; color: var(--sl-muted); overflow-wrap: anywhere; }
.sl-log-meta { text-align: right; font-family: var(--sl-mono); font-size: 11.5px; color: var(--sl-faint); white-space: nowrap; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.sl-app .sl-link { background: none; border: 0; padding: 0; color: var(--sl-muted); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; font-family: var(--sl-body); font-size: 12px; font-weight: 600; }
.sl-app .sl-link:hover { color: var(--sl-fg); }
.sl-cerrar-lateral { display: none !important; }

/* ---------- capas (diálogos) ---------- */
.sl-capa {
	position: fixed; inset: 0; z-index: 100000; background: rgba(0, 0, 0, .74);
	display: grid; place-items: center; padding: 16px;
}
.sl-dlg {
	width: min(540px, 100%); background: var(--sl-surface); border: 1px solid var(--sl-line-strong); border-radius: 14px;
	max-height: calc(100% - 16px); overflow-y: auto; display: flex; flex-direction: column;
	animation: sl-entrar .16s ease-out;
}
@keyframes sl-entrar { from { transform: translateY(8px); opacity: .6; } to { transform: none; opacity: 1; } }
.sl-dlg-cab { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 22px 22px 4px; }
.sl-dlg-cab h3 { font-family: var(--sl-wide); font-stretch: 110%; font-weight: 700; font-size: 22px; line-height: 1.15; overflow-wrap: anywhere; }
.sl-dlg-cab p { color: var(--sl-muted); margin-top: 4px; font-size: 14px; }
.sl-dlg-cab p b { color: var(--sl-fg); }
.sl-capa .sl-x { width: 40px; height: 40px; min-height: 40px; padding: 0; border-radius: 50%; border-color: transparent; flex: none; font-size: 22px; line-height: 1; }
.sl-dlg-cuerpo { padding: 16px 22px; display: flex; flex-direction: column; gap: 16px; }
.sl-dlg-pie { padding: 14px 22px 22px; display: flex; gap: 10px; flex-wrap: wrap; justify-content: space-between; border-top: 1px solid var(--sl-line); }
.sl-dlg-pie .sl-der { display: flex; gap: 10px; margin-left: auto; flex-wrap: wrap; }

.sl-tipos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.sl-capa .sl-tipo, .sl-app .sl-tipo {
	display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left;
	border: 1px solid var(--sl-line-strong); border-radius: var(--sl-r); background: transparent; padding: 11px 12px; cursor: pointer;
}
.sl-tipo b { font-size: 14.5px; display: flex; align-items: center; gap: 6px; }
.sl-tipo small { font-size: 12px; color: var(--sl-muted); line-height: 1.3; }
.sl-tipo:hover { border-color: var(--sl-muted); }
.sl-capa .sl-tipo[aria-checked="true"], .sl-app .sl-tipo[aria-checked="true"] { background: var(--sl-fg); color: var(--sl-accent-ink); border-color: var(--sl-fg); }
.sl-tipo[aria-checked="true"] small { color: #3d3c39; }

.sl-campo { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.sl-campo > span, .sl-etq { font-size: 13px; font-weight: 700; color: var(--sl-fg); }
.sl-campo > small { font-size: 12px; color: var(--sl-muted); }
.sl-capa .sl-input, .sl-app .sl-input {
	width: 100%; background: var(--sl-bg); border: 1px solid var(--sl-line-strong); border-radius: var(--sl-r);
	padding: 12px 13px; font-size: 15px; color: var(--sl-fg); min-height: 46px;
}
.sl-input::placeholder { color: var(--sl-faint); opacity: 1; }
.sl-input:focus { border-color: var(--sl-muted); outline: none; }
.sl-dos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }

.sl-stepper { display: grid; grid-template-columns: 56px minmax(0, 1fr) 56px; gap: 8px; }
.sl-capa .sl-stepper .sl-btn { min-height: 64px; font-size: 26px; font-weight: 500; padding: 0; }
.sl-capa .sl-stepper input {
	text-align: center; font-family: var(--sl-wide); font-stretch: 110%; font-size: 34px; font-weight: 600;
	min-height: 64px; padding: 6px; font-variant-numeric: tabular-nums; -moz-appearance: textfield;
}
.sl-capa input[type="number"]::-webkit-outer-spin-button, .sl-capa input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.sl-capa input[type="number"] { -moz-appearance: textfield; }
.sl-rapidos { display: flex; flex-wrap: wrap; gap: 6px; }
.sl-capa .sl-rapido { border: 1px solid var(--sl-line); background: transparent; border-radius: 999px; padding: 6px 13px; font-family: var(--sl-mono); font-size: 13px; cursor: pointer; color: var(--sl-muted); min-height: 34px; }
.sl-capa .sl-rapido:hover { color: var(--sl-fg); border-color: var(--sl-line-strong); }

.sl-resultado { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-radius: var(--sl-r); background: var(--sl-bg); border: 1px solid var(--sl-line); }
.sl-resultado .sl-de-a { display: flex; align-items: baseline; gap: 10px; font-family: var(--sl-wide); font-stretch: 110%; font-weight: 600; font-size: 22px; font-variant-numeric: tabular-nums; }
.sl-resultado .sl-flecha { color: var(--sl-faint); font-size: 18px; }
.sl-resultado .sl-txt { font-size: 13px; color: var(--sl-muted); text-align: right; }
.sl-resultado.sl-mal { border-color: rgba(229, 120, 108, .5); }
.sl-resultado.sl-mal .sl-txt { color: var(--sl-out); }
.sl-resultado.sl-aviso .sl-txt { color: var(--sl-low); }

.sl-error { color: var(--sl-out); font-size: 13.5px; font-weight: 600; min-height: 0; }
.sl-mas { border: 1px solid var(--sl-line); border-radius: var(--sl-r); }
.sl-mas summary { cursor: pointer; padding: 12px 14px; font-weight: 700; font-size: 14px; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.sl-mas summary::-webkit-details-marker { display: none; }
.sl-mas summary::after { content: "+"; font-size: 20px; font-weight: 400; color: var(--sl-muted); }
.sl-mas[open] summary::after { content: "–"; }
.sl-mas-cuerpo { padding: 4px 14px 14px; display: flex; flex-direction: column; gap: 14px; }

/* ---------- aviso flotante ---------- */
.sl-toast {
	position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 100001;
	display: flex; align-items: center; gap: 16px; max-width: calc(100% - 32px);
	background: #f5f3ed; color: #070708; padding: 12px 14px 12px 18px; border-radius: 10px;
	font-family: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif; font-size: 14px; font-weight: 600; line-height: 1.35;
	box-shadow: 0 12px 40px rgba(0, 0, 0, .5);
}
.sl-toast button {
	font: inherit; font-weight: 800; background: #070708; color: #f5f3ed; border: 0; border-radius: 6px;
	padding: 8px 12px; cursor: pointer; white-space: nowrap; margin: 0; text-transform: none; letter-spacing: normal; min-height: 36px;
}

/* ---------- vistas sueltas ---------- */
.sl-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.sl-alertas { display: flex; flex-direction: column; border: 1px solid var(--sl-line); border-radius: var(--sl-r); background: var(--sl-surface); }
.sl-alerta { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 16px; border-bottom: 1px solid var(--sl-line); flex-wrap: wrap; }
.sl-alerta:last-child { border-bottom: 0; }
.sl-alerta .sl-falta { font-size: 13px; color: var(--sl-muted); }
.sl-elegir { display: flex; flex-direction: column; gap: 14px; }
.sl-elegir .sl-acciones { justify-content: flex-start; flex-wrap: wrap; }

/* ---------- ingreso ---------- */
.sl-ingreso { display: grid; place-items: center; padding: 40px 20px; }
.sl-ingreso-caja { width: min(400px, 100%); display: flex; flex-direction: column; gap: 14px; }
.sl-ingreso-caja .sl-logo { font-size: 28px; }
.sl-ingreso-caja > p { color: var(--sl-muted); margin: 10px 0 4px; }
.sl-ingreso form p { margin: 0 0 14px; }
.sl-ingreso form label { display: block; font-size: 13px; font-weight: 700; margin-bottom: 6px; }
.sl-ingreso form input[type="text"], .sl-ingreso form input[type="password"] {
	width: 100%; background: var(--sl-surface); border: 1px solid var(--sl-line-strong); border-radius: var(--sl-r);
	padding: 12px 13px; color: var(--sl-fg); min-height: 46px;
}
.sl-ingreso form .login-remember label { display: flex; gap: 8px; align-items: center; font-weight: 500; color: var(--sl-muted); }
.sl-ingreso form input[type="submit"] {
	width: 100%; background: var(--sl-accent); color: var(--sl-accent-ink); border: 0; border-radius: var(--sl-r);
	padding: 13px; font-weight: 800; cursor: pointer; min-height: 48px;
}

/* ---------- stock en línea ---------- */
.sl-cantidad-inline { font-family: "IBM Plex Mono", ui-monospace, monospace; font-weight: 500; padding: 1px 7px; border-radius: 4px; background: #111113; color: #efeeea; border: 1px solid #38383f; white-space: nowrap; }
.sl-cantidad-inline.sl-st-low { color: #e0ad5c; }
.sl-cantidad-inline.sl-st-out { color: #e5786c; }

/* ---------- responsive ---------- */
@media (max-width: 1240px) {
	.sl-cuerpo, .sl-app.sl-full .sl-cuerpo { grid-template-columns: minmax(0, 1fr); }
	.sl-app .sl-lateral {
		position: fixed !important; top: 0 !important; right: 0; bottom: 0; height: auto !important; max-height: none !important;
		width: min(420px, 100%); z-index: 100000; border-left: 1px solid var(--sl-line-strong); border-radius: 0 !important;
		transform: translateX(100%); transition: transform .2s ease-out; box-shadow: -20px 0 60px rgba(0, 0, 0, .6);
		padding-top: var(--wp-admin--admin-bar--height, 0px);
	}
	.sl-app .sl-lateral.sl-abierto { transform: none; }
	.sl-cerrar-lateral { display: inline-flex !important; }
	.sl-solo-movil { display: inline-flex !important; }
}
@media (max-width: 1060px) {
	.sl-fila { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "info stock" "estado stock" "acc acc"; row-gap: 8px; }
	.sl-solo-lectura .sl-fila { grid-template-areas: "info stock" "estado stock"; grid-template-columns: minmax(0, 1fr) auto; }
	.sl-cabecera { display: none; }
	.sl-fila > .sl-info { grid-area: info; }
	.sl-fila > .sl-estado { grid-area: estado; }
	.sl-fila > .sl-stock { grid-area: stock; }
	.sl-fila > .sl-acciones { grid-area: acc; justify-content: stretch; }
	.sl-fila .sl-acciones .sl-mov { flex: 1; }
}
@media (max-width: 760px) {
	.sl-totales { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.sl-barra { gap: 12px; }
	.sl-buscar { order: 3; flex-basis: 100%; }
	.sl-buscar kbd { display: none; }
	.sl-barra-acc .sl-txt-largo { display: none; }
	.sl-barra-acc { order: 2; width: 100%; margin-left: 0; flex-wrap: nowrap; }
	.sl-barra-acc .sl-btn { flex: 1; padding-inline: 10px; }
	.sl-barra-acc [data-accion="exportar"] { flex: none; width: 48px; }
	.sl-marca { order: 1; }
	.sl-filtros-der { margin-left: 0; width: 100%; }
	.sl-filtros-der .sl-select { flex: 1; }
	.sl-capa { place-items: end center; padding: 0; }
	.sl-dlg { width: 100%; border-radius: 16px 16px 0 0; max-height: 94%; padding-bottom: env(safe-area-inset-bottom, 0px); }
	.sl-tipos { grid-template-columns: minmax(0, 1fr); }
	.sl-tipo { flex-direction: row !important; align-items: baseline !important; gap: 10px !important; }
	.sl-medidor { width: 90px; }
	.sl-app:not(.sl-full) { padding: 16px; }
}
@media (max-width: 420px) {
	.sl-dos { grid-template-columns: minmax(0, 1fr); }
	.sl-logo { font-size: 17px; }
}
@media (prefers-reduced-motion: reduce) {
	.sl-app *, .sl-capa * { transition: none !important; animation: none !important; }
}

/* v2.1 — tragos (sin control de stock) y Clover */
.sl-pill.sl-na { color: var(--sl-muted); }
.sl-fila.sl-e-na .sl-nombre { opacity: .85; }
.sl-clover { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .02em; padding: 1px 7px; border-radius: 999px; background: rgba(121,185,150,.14); color: var(--sl-ok); }
.sl-btn.sl-girando svg { animation: sl-girar 1s linear infinite; }
@keyframes sl-girar { to { transform: rotate(360deg); } }

/* v2.5 — botellas, recetas y Square */
.sl-fila, .sl-cabecera { grid-template-columns: minmax(0, 1fr) 128px 190px 320px; }
.sl-solo-lectura .sl-fila, .sl-solo-lectura .sl-cabecera { grid-template-columns: minmax(0, 1fr) 128px 190px; }
.sl-receta { font-size: 12.5px; color: var(--sl-muted); margin-top: 4px; overflow-wrap: anywhere; }

/* pestañas */
.sl-modos { display: inline-flex; gap: 4px; padding: 4px; max-width: 100%; overflow-x: auto; scrollbar-width: none; border: 1px solid var(--sl-line); border-radius: 999px; background: var(--sl-surface); align-self: flex-start; }
.sl-app .sl-modo {
	display: inline-flex; align-items: center; gap: 8px; border: 0; background: transparent; color: var(--sl-muted);
	border-radius: 999px; padding: 9px 18px; font-weight: 700; font-size: 14px; cursor: pointer; min-height: 40px;
}
.sl-app .sl-modo svg { width: 16px; height: 16px; }
.sl-app .sl-modo:hover { color: var(--sl-fg); }
.sl-app .sl-modo[aria-selected="true"] { background: var(--sl-fg); color: var(--sl-accent-ink); }
[data-r="vista-lista"] { display: flex; flex-direction: column; gap: 22px; }
[data-r="vista-botellas"] { display: flex; flex-direction: column; gap: 18px; }

/* grilla de botellas */
.sl-bot-barra { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.sl-bot-tit { font-family: var(--sl-wide); font-stretch: 110%; font-weight: 700; font-size: 22px; }
.sl-bot-sub { color: var(--sl-muted); font-size: 13.5px; margin-top: 2px; }
.sl-bot-aviso { border: 1px solid rgba(224, 173, 92, .35); background: rgba(224, 173, 92, .07); border-radius: var(--sl-r); padding: 11px 14px; font-size: 13.5px; color: var(--sl-muted); }
.sl-bot-aviso b { color: var(--sl-low); }
.sl-bot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(178px, 1fr)); gap: 12px; }
.sl-bot-grupo { grid-column: 1 / -1; font-family: var(--sl-mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--sl-faint); padding-top: 10px; }
.sl-app .sl-bot {
	display: flex; flex-direction: column; text-align: left; padding: 0; overflow: hidden; cursor: pointer;
	border: 1px solid var(--sl-line); border-radius: 12px; background: var(--sl-surface); color: var(--sl-fg);
	transition: border-color .15s, transform .12s, background .15s;
}
.sl-app .sl-bot:hover { border-color: var(--sl-line-strong); background: var(--sl-surface-2); transform: translateY(-2px); }
.sl-app .sl-bot.sl-destello { animation: sl-destello 1.2s ease-out; }
.sl-bot-foto { position: relative; height: 150px; display: grid; place-items: center; background: radial-gradient(120% 90% at 50% 100%, var(--sl-surface-3), var(--sl-bg)); border-bottom: 1px solid var(--sl-line); }
.sl-bot-foto img { width: 100%; height: 100%; object-fit: cover; }
.sl-bot-svg { height: 118px; width: auto; }
.sl-bot-x { position: absolute; top: 9px; right: 9px; font-family: var(--sl-mono); font-size: 12px; font-weight: 500; padding: 2px 8px; border-radius: 999px; background: rgba(7, 7, 8, .78); border: 1px solid var(--sl-line-strong); }
.sl-bot.sl-e-low .sl-bot-foto { box-shadow: inset 0 -3px 0 var(--sl-low); }
.sl-bot.sl-e-out .sl-bot-foto { box-shadow: inset 0 -3px 0 var(--sl-out); }
.sl-bot-txt { display: flex; flex-direction: column; gap: 3px; padding: 12px 14px 14px; min-width: 0; }
.sl-bot-nombre { font-weight: 800; font-size: 15px; line-height: 1.25; overflow-wrap: anywhere; }
.sl-bot-cant { font-size: 14px; color: var(--sl-muted); }
.sl-bot-cant b { color: var(--sl-fg); font-family: var(--sl-wide); font-stretch: 110%; font-size: 16px; }
.sl-bot.sl-e-out .sl-bot-cant b { color: var(--sl-out); }
.sl-bot-oz { font-family: var(--sl-mono); font-size: 11.5px; color: var(--sl-faint); }
.sl-bot-usos { font-size: 12px; color: var(--sl-muted); margin-top: 4px; }

/* ficha de botella */
.sl-dlg.sl-dlg-bot { width: min(860px, 100%); }
.sl-sec { display: flex; flex-direction: column; gap: 12px; }
.sl-sec + .sl-sec { border-top: 1px solid var(--sl-line); padding-top: 18px; }
.sl-sec-t { font-family: var(--sl-mono); font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--sl-muted); font-weight: 500; }
.sl-sec-t small { text-transform: none; letter-spacing: 0; font-family: var(--sl-body); color: var(--sl-faint); margin-left: 6px; font-size: 12px; }
.sl-bot-contar { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.sl-bot-num { display: flex; flex-direction: column; gap: 16px; }
.sl-foto { display: flex; flex-direction: column; gap: 10px; }
.sl-capa .sl-foto-vacia {
	display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center;
	min-height: 300px; border: 1.5px dashed var(--sl-line-strong); border-radius: 12px; cursor: pointer; padding: 18px;
	background-size: cover; background-position: center; color: var(--sl-fg);
}
.sl-foto-vacia:hover { border-color: var(--sl-muted); }
.sl-foto-vacia svg { width: 38px; height: 38px; color: var(--sl-muted); }
.sl-foto-vacia small { color: var(--sl-muted); font-size: 12.5px; }
.sl-foto-marco { position: relative; border-radius: 12px; overflow: hidden; background: #000; touch-action: none; user-select: none; }
.sl-foto-marco img { display: block; width: 100%; max-height: 440px; object-fit: contain; pointer-events: none; }
.sl-foto-capa { position: absolute; inset: 0; cursor: ns-resize; }
.sl-linea { position: absolute; left: 0; right: 0; height: 0; border-top: 2px dashed rgba(255, 255, 255, .55); pointer-events: none; }
.sl-linea span { position: absolute; right: 8px; top: -11px; font-family: var(--sl-mono); font-size: 11px; padding: 1px 7px; border-radius: 999px; background: rgba(7, 7, 8, .8); color: var(--sl-muted); }
.sl-l-nivel { border-top: 3px solid var(--sl-accent); box-shadow: 0 0 0 1px rgba(0, 0, 0, .5); }
.sl-l-nivel::before { content: ""; position: absolute; left: 50%; top: -12px; width: 22px; height: 22px; margin-left: -11px; border-radius: 50%; background: var(--sl-accent); box-shadow: 0 1px 6px rgba(0, 0, 0, .6); }
.sl-l-nivel span { color: var(--sl-accent-ink); background: var(--sl-accent); font-weight: 600; }
.sl-relleno { position: absolute; left: 0; right: 0; background: rgba(121, 185, 150, .18); pointer-events: none; }
.sl-foto-acc { display: flex; gap: 8px; flex-wrap: wrap; }
.sl-foto-acc .sl-btn { flex: 1; }
.sl-foto-ayuda { font-size: 12.5px; color: var(--sl-muted); line-height: 1.45; }
.sl-capa .sl-rango { width: 100%; accent-color: var(--sl-accent); height: 32px; }
.sl-usos { display: flex; flex-direction: column; border: 1px solid var(--sl-line); border-radius: var(--sl-r); overflow: hidden; }
.sl-uso { display: grid; grid-template-columns: minmax(0, 1fr) 88px 104px 44px; gap: 8px; align-items: center; padding: 8px 8px 8px 14px; border-bottom: 1px solid var(--sl-line); }
.sl-uso:last-child { border-bottom: 0; }
.sl-uso-n { display: flex; flex-direction: column; min-width: 0; }
.sl-uso-n b { font-size: 14px; overflow-wrap: anywhere; }
.sl-uso-n small { font-size: 12px; color: var(--sl-faint); }
.sl-capa .sl-uso .sl-input { min-height: 40px; padding: 8px 10px; font-size: 14px; }
.sl-capa .sl-uso .sl-btn.sl-icono { min-height: 40px; width: 40px; padding: 0; font-size: 18px; }
.sl-usos-vacio { padding: 14px; color: var(--sl-muted); font-size: 13.5px; }
.sl-usos-add { display: grid; grid-template-columns: minmax(0, 1fr) 88px auto; gap: 8px; }
.sl-capa .sl-oz { text-align: right; font-family: var(--sl-mono); }
@media (max-width: 760px) {
	.sl-bot-contar { grid-template-columns: minmax(0, 1fr); }
	.sl-foto-vacia { min-height: 180px !important; }
	.sl-bot-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
	.sl-uso { grid-template-columns: minmax(0, 1fr) 72px 92px 40px; padding-left: 10px; }
	.sl-usos-add { grid-template-columns: minmax(0, 1fr) 72px; }
	.sl-usos-add .sl-btn { grid-column: 1 / -1; }
	.sl-modos { align-self: stretch; }
	.sl-app .sl-modo { flex: 1 0 auto; white-space: nowrap; justify-content: center; padding-inline: 10px; }
}
@media (max-width: 1060px) {
	.sl-fila, .sl-solo-lectura .sl-fila { grid-template-columns: minmax(0, 1fr) auto; }
}

/* v2.6 — ingreso y usuario */
.sl-login { display: flex; flex-direction: column; gap: 14px; margin-top: 6px; }
.sl-login .sl-campo > span { display: block; font-size: 13px; font-weight: 700; margin-bottom: 6px; }
.sl-login .sl-input { width: 100%; }
.sl-pass { position: relative; display: block; }
.sl-pass .sl-input { padding-right: 58px; }
.sl-app .sl-ver-pass { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: transparent; color: var(--sl-muted); font-size: 12.5px; font-weight: 700; padding: 8px; cursor: pointer; }
.sl-app .sl-ver-pass[aria-pressed="true"] { color: var(--sl-fg); }
.sl-recordar { display: flex; gap: 9px; align-items: center; font-size: 13.5px; color: var(--sl-muted); cursor: pointer; }
.sl-recordar input { width: 17px; height: 17px; accent-color: var(--sl-accent); }
.sl-app .sl-login-ok { width: 100%; justify-content: center; min-height: 50px; font-size: 15.5px; }
.sl-login-olvide { align-self: center; font-size: 13px; color: var(--sl-muted); text-decoration: underline; text-underline-offset: 3px; }
.sl-login-olvide:hover { color: var(--sl-fg); }
.sl-login-error { border: 1px solid rgba(229, 120, 108, .45); background: rgba(229, 120, 108, .1); color: var(--sl-out); border-radius: var(--sl-r); padding: 11px 14px; font-size: 14px; font-weight: 600; }
.sl-app .sl-yo { gap: 9px; text-decoration: none; }
.sl-yo-ini { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--sl-surface-3); border: 1px solid var(--sl-line-strong); font-family: var(--sl-mono); font-size: 11px; font-weight: 500; color: var(--sl-fg); }
@media (max-width: 760px) {
	.sl-barra-acc .sl-btn { min-width: 0; }
	.sl-barra-acc .sl-yo, .sl-barra-acc [data-accion="clover"] { flex: none; width: 48px; padding-inline: 0; justify-content: center; }
}

/* ingreso centrado en la pantalla */
.sl-app.sl-ingreso { display: flex !important; align-items: center; justify-content: center; padding: 48px 20px !important; box-sizing: border-box; width: 100%; max-width: 100%; }
.sl-app.sl-ingreso.sl-full { min-height: calc(100vh - var(--wp-admin--admin-bar--height, 0px)); min-height: calc(100dvh - var(--wp-admin--admin-bar--height, 0px)); }
.sl-ingreso-caja { margin: 0 auto; }
.sl-ingreso-caja .sl-logo, .sl-ingreso-caja .sl-logo-sub, .sl-ingreso-caja > p { text-align: center; }
.sl-ingreso-caja .sl-logo { line-height: 1.1; padding-top: 4px; }
.sl-ingreso-caja .sl-logo-sub { margin-top: -6px; }
.sl-ingreso-caja > .sl-btn { align-self: center; }
.sl-login-ok-msg { border: 1px solid rgba(121, 185, 150, .4); background: rgba(121, 185, 150, .09); color: var(--sl-ok); border-radius: var(--sl-r); padding: 11px 14px; font-size: 14px; font-weight: 600; }
.sl-app .sl-ajustes { text-decoration: none; }
@media (max-width: 760px) { .sl-barra-acc .sl-ajustes { flex: none; width: 48px; padding-inline: 0; justify-content: center; } }

/* v2.9 — menú de Square */
.sl-sq-lista { border: 1px solid var(--sl-line); border-radius: var(--sl-r); overflow: hidden; background: var(--sl-surface); }
.sl-sq-grupo { font-family: var(--sl-mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--sl-faint); padding: 16px 20px 8px; background: var(--sl-bg); border-bottom: 1px solid var(--sl-line); }
.sl-sq-fila { display: grid; grid-template-columns: minmax(0, 1fr) 120px 130px 170px; gap: 16px; align-items: center; padding: 13px 20px; border-bottom: 1px solid var(--sl-line); }
.sl-sq-fila:last-child { border-bottom: 0; }
.sl-sq-n { display: flex; flex-direction: column; min-width: 0; }
.sl-sq-n b { font-size: 15px; overflow-wrap: anywhere; }
.sl-sq-n small { font-size: 12.5px; color: var(--sl-low); margin-top: 2px; }
.sl-sq-p { font-family: var(--sl-mono); font-size: 14px; text-align: right; }
.sl-sq-s { text-align: right; font-family: var(--sl-wide); font-stretch: 110%; font-weight: 700; font-size: 16px; }
.sl-sq-s .sl-u { margin-left: 6px; }
.sl-sq-e { text-align: right; }
.sl-sq-pill { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 700; padding: 5px 11px; border-radius: 999px; background: var(--sl-surface-3); color: var(--sl-muted); white-space: nowrap; }
.sl-sq-pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.sl-sq-igual .sl-sq-pill { color: var(--sl-ok); background: rgba(121, 185, 150, .1); }
.sl-sq-distinto .sl-sq-pill { color: var(--sl-low); background: rgba(224, 173, 92, .1); }
.sl-sq-falta .sl-sq-pill { color: var(--sl-out); background: rgba(229, 120, 108, .1); }
.sl-sq-falta { opacity: .85; }
.sl-chip.sl-sq-distinto i { background: var(--sl-low); }
.sl-chip.sl-sq-falta i { background: var(--sl-out); }
.sl-chip.sl-sq-solo i { background: var(--sl-muted); }
.sl-chip i { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 2px; }
@media (max-width: 760px) {
	.sl-sq-fila { grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; padding: 12px 14px; }
	.sl-sq-s { grid-column: 1; grid-row: 2; text-align: left; font-size: 14px; }
	.sl-sq-e { grid-column: 2; grid-row: 2; }
	.sl-sq-p { grid-column: 2; grid-row: 1; }
	.sl-sq-grupo { padding: 14px 14px 8px; }
}
[data-r="vista-square"] { display: flex; flex-direction: column; gap: 16px; }
@media (max-width: 760px) {
	/* encabezado: si no entra en una fila, pasa a dos (nada se corta) */
	.sl-barra-acc { flex-wrap: wrap; }
	.sl-barra-acc .sl-btn { flex: 1 0 auto; }
	.sl-barra-acc .sl-yo, .sl-barra-acc .sl-ajustes, .sl-barra-acc [data-accion="clover"], .sl-barra-acc [data-accion="exportar"] { flex: 0 0 48px; }
	/* pestañas: entran las tres en una fila */
	.sl-modos { overflow-x: auto; scrollbar-width: none; }
	.sl-app .sl-modo { flex: 1 0 auto; white-space: nowrap; padding: 9px 12px; font-size: 13.5px; }
	.sl-app .sl-modo svg { display: none; }
	.sl-bot-barra .sl-der { width: 100%; }
	.sl-bot-barra .sl-der, .sl-bot-barra > .sl-der { display: flex; gap: 8px; }
	.sl-bot-barra .sl-der .sl-btn { flex: 1; }
}
.sl-bot-barra .sl-der { display: flex; gap: 8px; flex-wrap: wrap; }

/* v3.0 — lista por categorías */
.sl-grupos-barra { display: flex; justify-content: flex-end; padding: 10px 20px; border-bottom: 1px solid var(--sl-line); background: var(--sl-bg); }
.sl-app .sl-grupo {
	display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; cursor: pointer;
	padding: 16px 20px; border: 0; border-bottom: 1px solid var(--sl-line); background: var(--sl-surface-2); color: var(--sl-fg);
	font: inherit; min-height: 60px;
}
.sl-app .sl-grupo:hover { background: var(--sl-surface-3); }
.sl-grupo-color { width: 34px; height: 34px; border-radius: 7px; flex: none; }
.sl-grupo-n { font-weight: 800; font-size: 15.5px; letter-spacing: .04em; text-transform: uppercase; }
.sl-grupo-c { color: var(--sl-muted); font-size: 13.5px; margin-left: auto; white-space: nowrap; }
.sl-grupo-a { font-size: 12.5px; font-weight: 700; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.sl-grupo-a.sl-out { color: var(--sl-out); background: rgba(229, 120, 108, .1); }
.sl-grupo-a.sl-low { color: var(--sl-low); background: rgba(224, 173, 92, .1); }
.sl-grupo-flecha { width: 10px; height: 10px; border-right: 2px solid var(--sl-muted); border-bottom: 2px solid var(--sl-muted); transform: rotate(45deg); margin: -4px 4px 0 6px; transition: transform .15s; flex: none; }
.sl-grupo[aria-expanded="false"] .sl-grupo-flecha { transform: rotate(-45deg); margin-top: 0; }
@media (max-width: 760px) {
	.sl-app .sl-grupo { flex-wrap: wrap; gap: 6px 10px; padding: 14px; }
	.sl-grupo-color { width: 26px; height: 26px; }
	.sl-grupo-n { flex: 1; font-size: 14.5px; }
	.sl-grupo-c { order: 3; margin-left: 36px; }
	.sl-grupo-flecha { order: 2; }
	.sl-grupo-a { order: 4; }
}

/* ---- inventarios por lugar ---- */
.sl-lugares { display: flex; gap: 6px; padding: 14px 0 0; overflow-x: auto; scrollbar-width: none; }
.sl-lugares:empty { display: none; }
.sl-lugar { flex: none; display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--sl-line-strong); background: transparent; color: var(--sl-muted, var(--sl-fg)); font: inherit; font-size: 14px; cursor: pointer; }
.sl-lugar span { font-family: var(--sl-mono); font-size: 12px; opacity: .7; }
.sl-lugar[aria-selected="true"] { background: var(--sl-accent); color: var(--sl-accent-ink); border-color: var(--sl-accent); }
.sl-lugar[aria-selected="true"] span { opacity: .8; }
.sl-por-lugar { font-family: var(--sl-mono); font-size: 11px; color: var(--sl-faint); }

/* ---- historial de ventas ---- */
.sl-vt-filtros { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 14px 0; }
.sl-vt-fechas { display: inline-flex; align-items: center; gap: 6px; color: var(--sl-faint); font-size: 13px; }
.sl-vt-fechas input { min-height: 40px; color-scheme: dark; }
.sl-chip.sl-vt-clover[aria-pressed="true"] { background: #2f7d4f; border-color: #2f7d4f; color: #fff; }
.sl-chip.sl-vt-square[aria-pressed="true"] { background: #e9e6df; border-color: #e9e6df; color: #070708; }
.sl-vt-res { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px; padding: 0 0 18px; }
.sl-vt-tot { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; border-radius: 14px; background: var(--sl-surface-3); border: 1px solid var(--sl-line-strong); }
.sl-vt-tot span { font-size: 12px; color: var(--sl-faint); text-transform: uppercase; letter-spacing: .08em; }
.sl-vt-tot b { font-family: var(--sl-mono); font-size: 26px; font-weight: 500; }
.sl-vt-tot small { color: var(--sl-faint); font-size: 12px; }
.sl-vt-emp { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 14px; background: transparent; border: 1px solid var(--sl-line); color: var(--sl-fg); font: inherit; text-align: left; cursor: pointer; }
.sl-vt-emp[aria-pressed="true"] { border-color: var(--sl-accent); box-shadow: inset 0 0 0 1px var(--sl-accent); }
.sl-vt-emp .sl-yo-ini { width: 34px; height: 34px; flex: none; }
.sl-vt-emp-n { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.sl-vt-emp-n b { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sl-vt-emp-n small, .sl-vt-emp-t small { color: var(--sl-faint); font-size: 11.5px; }
.sl-vt-emp-t { display: flex; flex-direction: column; align-items: flex-end; font-family: var(--sl-mono); font-size: 15px; }
.sl-vt-lista { border-top: 1px solid var(--sl-line); }
.sl-vt-fila { display: grid; grid-template-columns: 52px 64px 1fr auto; align-items: center; gap: 12px; padding: 10px 20px; border-bottom: 1px solid var(--sl-line); }
.sl-vt-hora { font-family: var(--sl-mono); font-size: 13px; color: var(--sl-faint); }
.sl-vt-plat { justify-self: start; font-size: 11px; padding: 3px 8px; border-radius: 999px; border: 1px solid var(--sl-line-strong); }
.sl-vt-plat.sl-vt-clover { color: #79b996; border-color: rgba(121,185,150,.4); }
.sl-vt-plat.sl-vt-square { color: #e9e6df; }
.sl-vt-prod { min-width: 0; display: flex; flex-direction: column; }
.sl-vt-prod b { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sl-vt-prod small { color: var(--sl-faint); font-size: 12px; }
.sl-vt-monto { font-family: var(--sl-mono); }
.sl-vt-dev .sl-vt-prod b, .sl-vt-dev .sl-vt-monto { text-decoration: line-through; opacity: .6; }
@media (max-width: 600px) {
	.sl-vt-fila { grid-template-columns: 44px 1fr auto; padding: 10px 14px; }
	.sl-vt-plat { display: none; }
}

button.sl-vt-tot { font: inherit; color: var(--sl-fg); text-align: left; cursor: pointer; background: transparent; border-color: var(--sl-line); }
button.sl-vt-tot[aria-pressed="true"] { border-color: var(--sl-accent); box-shadow: inset 0 0 0 1px var(--sl-accent); }
.sl-vt-tot .sl-vt-plat { font-style: normal; text-transform: none; letter-spacing: 0; }

/* ---- reporte ---- */
.sl-vt-sec { margin-bottom: 18px; }
.sl-vt-ok { padding: 12px 0; color: #79b996; font-size: 14px; }
.sl-vt-alerta { margin: 8px 0; padding: 12px 14px; border-radius: 12px; border: 1px solid rgba(233,182,72,.45); background: rgba(233,182,72,.08); font-size: 13.5px; line-height: 1.6; }
.sl-vt-alerta b { color: #f0c770; }
.sl-vt-alerta em { font-style: normal; color: var(--sl-faint); font-family: var(--sl-mono); font-size: 12px; }
.sl-vt-desc { border-top: 1px solid var(--sl-line); }
.sl-vt-fila.sl-vt-df { grid-template-columns: 1fr auto 96px; }
.sl-vt-monto small { display: block; text-align: right; font-size: 11px; color: var(--sl-faint); }
.sl-vt-queda { text-align: right; font-family: var(--sl-mono); font-size: 12.5px; color: var(--sl-faint); }
.sl-vt-cero { color: #e5726a; }
@media (max-width: 600px) { .sl-vt-fila.sl-vt-df { grid-template-columns: 1fr auto; } .sl-vt-queda { grid-column: 2; } }

.sl-vt-nota { margin: 4px 0 10px; color: var(--sl-faint); font-size: 12.5px; }
.sl-vt-tabla { border-top: 1px solid var(--sl-line); font-size: 14px; }
.sl-vt-th, .sl-vt-tr { display: grid; gap: 10px; align-items: start; padding: 9px 4px; border-bottom: 1px solid var(--sl-line); }
.sl-vt-bal .sl-vt-th, .sl-vt-bal .sl-vt-tr { grid-template-columns: minmax(0, 1fr) 72px 72px 80px 80px 72px; }
.sl-vt-vend .sl-vt-th, .sl-vt-vend .sl-vt-tr { grid-template-columns: minmax(0, 1fr) 96px 96px 90px; }
.sl-vt-th { font-family: var(--sl-mono); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--sl-faint); }
.sl-vt-th span:not(:first-child), .sl-vt-tr span:not(:first-child) { text-align: right; font-family: var(--sl-mono); font-size: 13px; }
.sl-vt-tr small { display: block; font-size: 11px; color: var(--sl-faint); font-family: inherit; }
.sl-vt-tr span:first-child { overflow-wrap: anywhere; }
.sl-vt-rubro { padding: 12px 4px 6px; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--sl-faint); }
.sl-vt-quieto { opacity: .55; }
.sl-vt-todo { margin-top: 10px; }
@media (max-width: 700px) {
	.sl-vt-bal .sl-vt-th, .sl-vt-bal .sl-vt-tr { grid-template-columns: minmax(0, 1fr) 52px 52px 56px 56px 52px; gap: 6px; font-size: 13px; }
	.sl-vt-vend .sl-vt-th, .sl-vt-vend .sl-vt-tr { grid-template-columns: minmax(0, 1fr) 70px 70px 70px; gap: 6px; }
	.sl-vt-th span:not(:first-child), .sl-vt-tr span:not(:first-child) { font-size: 11.5px; }
}

/* ---- planilla ---- */
.sl-pl-acc { display: flex; gap: 8px; }
.sl-pl-barra { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 14px 0; }
.sl-pl-estado { color: var(--sl-faint); font-size: 13px; }
.sl-pl-mal { color: #e5726a; }
.sl-pl-wrap { overflow: auto; max-height: 72vh; border: 1px solid var(--sl-line-strong); border-radius: 12px; }
.sl-pl-t { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; }
.sl-pl-t th { position: sticky; top: 0; z-index: 2; background: var(--sl-surface-3, #1a1a1c); color: var(--sl-faint); font-family: var(--sl-mono); font-size: 11px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; text-align: right; padding: 10px 10px; border-bottom: 1px solid var(--sl-line-strong); white-space: nowrap; }
.sl-pl-t th.sl-pl-n { text-align: left; left: 0; z-index: 3; }
.sl-pl-t td { border-bottom: 1px solid var(--sl-line); border-right: 1px solid var(--sl-line); padding: 0; text-align: right; }
.sl-pl-t td.sl-pl-n { position: sticky; left: 0; z-index: 1; background: var(--sl-bg, #070708); text-align: left; padding: 6px 12px; min-width: 220px; max-width: 340px; }
.sl-pl-n span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sl-pl-n small { display: block; font-size: 11px; color: var(--sl-faint); }
.sl-pl-rubro td { position: sticky; left: 0; background: var(--sl-surface-2, #111113); text-align: left; padding: 8px 12px; font-family: var(--sl-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--sl-faint); }
.sl-pl-c { width: 100%; min-width: 92px; height: 40px; border: 0; background: transparent; color: var(--sl-fg); font: inherit; font-family: var(--sl-mono); text-align: right; padding: 0 10px; outline: none; border-radius: 0; }
.sl-pl-c:focus { background: rgba(255,255,255,.06); box-shadow: inset 0 0 0 2px var(--sl-accent); }
.sl-pl-c.sl-pl-cambio { background: rgba(233,182,72,.14); color: #f0c770; }
.sl-pl-c.sl-pl-error { background: rgba(229,114,106,.16); color: #e5726a; }
.sl-pl-tot, .sl-pl-ro { padding: 0 12px !important; font-family: var(--sl-mono); white-space: nowrap; color: var(--sl-faint); }
.sl-pl-tot { color: var(--sl-fg); font-weight: 600; min-width: 80px; }
.sl-pl-t tr:hover td.sl-pl-n, .sl-pl-t tr:hover .sl-pl-c:not(:focus):not(.sl-pl-cambio) { background: rgba(255,255,255,.03); }
@media (max-width: 600px) {
	.sl-pl-t td.sl-pl-n { min-width: 140px; max-width: 160px; padding: 6px 8px; font-size: 13px; }
	.sl-pl-c { min-width: 64px; padding: 0 6px; }
	.sl-pl-acc { width: 100%; }
	.sl-pl-acc .sl-btn { flex: 1; }
}
