/* ============================================================
   Facturación SiNube — sistema visual "libro contable"
   Reglas finas en vez de sombras, cifras en monoespaciada,
   un solo acento (jade) reservado para lo que importa.
   ============================================================ */

.sfw-facturador {
	--sfw-ink: #16213A;
	--sfw-paper: #F6F4EE;
	--sfw-surface: #FFFFFF;
	--sfw-accent: #1E7D5C;
	--sfw-accent-mist: #E4F1EA;
	--sfw-rule: #DFDACB;
	--sfw-muted: #6E6A5D;
	--sfw-alert: #B4402F;
	--sfw-alert-mist: #F7E9E6;

	--sfw-serif: 'Source Serif 4', Georgia, 'Times New Roman', serif;
	--sfw-sans: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
	--sfw-mono: 'IBM Plex Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;

	font-family: var(--sfw-sans);
	color: var(--sfw-ink);
	background: var(--sfw-paper);
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;

	/* El fondo cubre todo el ancho y alto de la pantalla (para uso en
	   tableta como pantalla de trabajo dedicada), sin importar el ancho
	   del contenedor de la página donde se coloque el shortcode. El
	   contenido interno se limita a un ancho legible y queda centrado. */
	width: 100vw;
	position: relative;
	left: 50%;
	right: 50%;
	margin-left: -50vw;
	margin-right: -50vw;
	min-height: 100vh;
	padding: 24px 24px 32px;
}

.sfw-facturador > * {
	max-width: 900px;
	margin-left: auto;
	margin-right: auto;
}

.sfw-facturador .sfw-layout {
	max-width: 900px;
	margin-left: auto;
	margin-right: auto;
}

/* Los modales (fondo + caja) nunca deben heredar el límite de 900px que
   centra el contenido normal de la página — si no, el fondo oscuro solo
   cubriría una franja central en pantallas anchas, en vez de la pantalla
   completa. */
.sfw-facturador > .sfw-modal-overlay {
	max-width: none;
	margin-left: 0;
	margin-right: 0;
}

.sfw-facturador * { box-sizing: border-box; }

.sfw-facturador h2 {
	font-family: var(--sfw-serif);
	font-size: 26px;
	font-weight: 600;
	margin: 0 0 4px;
	color: var(--sfw-ink);
}

.sfw-facturador h3.sfw-subtitulo {
	font-family: var(--sfw-serif);
	font-size: 18px;
	font-weight: 600;
	margin: 28px 0 4px;
	border-top: 1px solid var(--sfw-rule);
	padding-top: 20px;
}

.sfw-facturador .sfw-hint {
	color: var(--sfw-muted);
	font-size: 14px;
	margin: 0 0 18px;
	max-width: 60ch;
}

/* ---------- layout: riel + hoja ---------- */

.sfw-layout {
	display: grid;
	grid-template-columns: 190px 1fr;
	gap: 32px;
	align-items: start;
}

.sfw-rail ol {
	list-style: none;
	margin: 0;
	padding: 0;
	position: relative;
}

.sfw-rail ol::before {
	content: '';
	position: absolute;
	left: 13px;
	top: 14px;
	bottom: 14px;
	width: 1px;
	background: var(--sfw-rule);
}

.sfw-rail-item {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 10px 0;
	position: relative;
}

.sfw-rail-num {
	width: 28px;
	height: 28px;
	flex: 0 0 28px;
	border-radius: 50%;
	background: var(--sfw-surface);
	border: 1px solid var(--sfw-rule);
	display: flex;
	align-items: center;
	justify-content: center;
	font-family: var(--sfw-mono);
	font-size: 13px;
	color: var(--sfw-muted);
	position: relative;
	z-index: 1;
}

.sfw-rail-label {
	font-size: 14px;
	color: var(--sfw-muted);
}

.sfw-rail-item.is-active .sfw-rail-num {
	background: var(--sfw-accent);
	border-color: var(--sfw-accent);
	color: #fff;
}

.sfw-rail-item.is-active .sfw-rail-label {
	color: var(--sfw-ink);
	font-weight: 600;
}

.sfw-rail-item.is-done .sfw-rail-num {
	background: var(--sfw-accent-mist);
	border-color: var(--sfw-accent);
	color: var(--sfw-accent);
}

.sfw-rail-item.is-done .sfw-rail-num::after {
	content: '✓';
	font-size: 13px;
}

.sfw-rail-item.is-done {
	cursor: pointer;
}

.sfw-rail-item.is-done:hover .sfw-rail-label {
	color: var(--sfw-accent);
}

.sfw-sheet {
	background: var(--sfw-surface);
	border: 1px solid var(--sfw-rule);
	padding: 32px 36px;
	min-height: 360px;
}

/* ---------- inputs y botones ---------- */

.sfw-facturador input[type="text"],
.sfw-facturador input[type="number"],
.sfw-facturador input[type="password"],
.sfw-facturador input[type="date"],
.sfw-facturador textarea {
	font-family: var(--sfw-sans);
	font-size: 15px;
	color: var(--sfw-ink);
	background: var(--sfw-surface);
	border: none;
	border-bottom: 1px solid var(--sfw-rule);
	padding: 8px 2px;
	width: 100%;
	max-width: 420px;
	transition: border-color .15s ease;
	border-radius: 0;
	appearance: none;
	-webkit-appearance: none;
}

.sfw-facturador input:focus {
	outline: none;
	border-bottom: 2px solid var(--sfw-accent);
	padding-bottom: 7px;
}

.sfw-search { margin-bottom: 4px; }

.sfw-select {
	font-family: var(--sfw-sans);
	font-size: 15px;
	color: var(--sfw-ink);
	background: var(--sfw-surface);
	border: 1px solid var(--sfw-rule);
	padding: 11px 12px;
	width: 100%;
	max-width: 520px;
	min-height: 44px;
}

.sfw-select:focus { outline: none; border-color: var(--sfw-accent); box-shadow: 0 0 0 1px var(--sfw-accent); }

.sfw-campos-pago {
	display: flex;
	gap: 28px;
	flex-wrap: wrap;
	margin-bottom: 20px;
}

.sfw-campos-pago label {
	font-size: 12px;
	color: var(--sfw-muted);
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.sfw-campos-pago input {
	font-family: var(--sfw-mono);
	max-width: 140px;
}

.sfw-actions {
	margin-top: 24px;
	padding-top: 20px;
	border-top: 1px solid var(--sfw-rule);
}

.sfw-actions-split {
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.sfw-btn {
	font-family: var(--sfw-sans);
	font-size: 14px;
	font-weight: 500;
	padding: 11px 22px;
	border-radius: 2px;
	border: 1px solid var(--sfw-ink);
	background: transparent;
	color: var(--sfw-ink);
	cursor: pointer;
	transition: background .15s ease, color .15s ease;
}

.sfw-btn:hover { background: var(--sfw-ink); color: #fff; }

.sfw-btn-primary {
	background: var(--sfw-accent);
	border-color: var(--sfw-accent);
	color: #fff;
}

.sfw-btn-primary:hover { background: #185f47; border-color: #185f47; }

.sfw-btn-quitar {
	background: none;
	border: none;
	cursor: pointer;
	width: 30px;
	height: 30px;
	padding: 6px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 4px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23B4402F' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 6h18'/%3E%3Cpath d='M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2'/%3E%3Cpath d='M19 6l-1 14a2 2 0 0 1-2 2H8a2 2 0 0 1-2-2L5 6'/%3E%3Cline x1='10' y1='11' x2='10' y2='17'/%3E%3Cline x1='14' y1='11' x2='14' y2='17'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: center;
	background-size: 16px 16px;
	transition: background-color .15s ease;
}

.sfw-btn-quitar:hover { background-color: var(--sfw-alert-mist); }


/* ---------- paso 1: sucursal ---------- */

.sfw-facturar-datos {
	font-family: var(--sfw-sans);
	font-size: 15px;
	font-weight: 400;
	line-height: 1.6;
	color: var(--sfw-ink);
	margin-top: 10px;
}

.sfw-facturar-datos > div + div {
	margin-top: 2px;
}

/* ---------- resultados de búsqueda (dropdown tipo ficha) ---------- */

.sfw-dropdown {
	border: 1px solid var(--sfw-rule);
	max-width: 480px;
	max-height: 260px;
	overflow-y: auto;
	margin-top: -1px;
}

.sfw-dropdown:empty { border: none; }

.sfw-dropdown-item {
	padding: 10px 14px;
	border-bottom: 1px solid var(--sfw-rule);
	cursor: pointer;
	border-left: 2px solid transparent;
	transition: border-color .1s ease, background .1s ease;
}

.sfw-dropdown-item:last-child { border-bottom: none; }

.sfw-dropdown-item:hover {
	border-left-color: var(--sfw-accent);
	background: var(--sfw-accent-mist);
}

.sfw-dropdown-item .sfw-item-titulo {
	font-family: var(--sfw-sans);
	font-size: 15px;
	font-weight: 700;
	color: var(--sfw-ink);
}

.sfw-dropdown-item .sfw-item-meta {
	font-family: var(--sfw-mono);
	font-size: 12px;
	color: var(--sfw-muted);
	margin-top: 2px;
}

/* ---------- ficha de cliente / línea de captura ---------- */

.sfw-cliente-card,
.sfw-captura-linea {
	background: var(--sfw-paper);
	border: 1px solid var(--sfw-rule);
	padding: 16px 18px;
	margin-top: 12px;
}

.sfw-cliente-card .sfw-item-titulo {
	font-family: var(--sfw-serif);
	font-size: 18px;
}

.sfw-cliente-card .sfw-item-meta { margin-top: 4px; }

.sfw-tags { margin-top: 10px; display: flex; gap: 8px; flex-wrap: wrap; }

.sfw-tag {
	font-family: var(--sfw-mono);
	font-size: 11px;
	color: var(--sfw-muted);
	border: 1px solid var(--sfw-rule);
	padding: 3px 8px;
	border-radius: 2px;
}

.sfw-captura-linea .sfw-campo-inline {
	display: inline-flex;
	flex-direction: column;
	gap: 4px;
	margin-right: 20px;
	font-size: 12px;
	color: var(--sfw-muted);
}

.sfw-captura-linea input { max-width: 110px; }

/* ---------- tabla ledger ---------- */

.sfw-ledger {
	width: 100%;
	border-collapse: collapse;
	margin-top: 20px;
	font-size: 14px;
}

.sfw-tabla-conceptos-wrap {
	max-height: 34vh;
	overflow-y: auto;
	margin-top: 20px;
}

.sfw-tabla-conceptos-wrap .sfw-ledger {
	margin-top: 0;
}

.sfw-tabla-conceptos-wrap thead th {
	position: sticky;
	top: 0;
	background: var(--sfw-surface);
	z-index: 1;
}

.sfw-ledger thead th {
	text-align: left;
	font-size: 11px;
	letter-spacing: .02em;
	color: var(--sfw-muted);
	font-weight: 500;
	padding: 0 8px 8px;
	border-bottom: 1px solid var(--sfw-ink);
}

.sfw-ledger td {
	padding: 10px 8px;
	border-bottom: 1px solid var(--sfw-rule);
	vertical-align: middle;
}

.sfw-ledger .sfw-num,
.sfw-ledger td:nth-child(3),
.sfw-ledger td:nth-child(4),
.sfw-ledger td:nth-child(5) {
	font-family: var(--sfw-mono);
	text-align: right;
	white-space: nowrap;
}

/* Tablas de "Existencias y lotes" (frontend y wp-admin) — columnas
   numéricas centradas con su encabezado, a diferencia del renglón de
   factura de arriba (.sfw-ledger), que las alinea a la derecha. */
.sfw-tabla-frontend th.sfw-num,
.sfw-tabla-frontend td.sfw-num,
.widefat th.sfw-num,
.widefat td.sfw-num {
	text-align: center;
}

/* Renglones que pertenecen a la misma factura en "Lotes facturados": sin
   línea divisoria entre ellos, solo después del último de cada grupo.
   !important porque en wp-admin compite con el borde propio de .widefat. */
.sfw-fila-agrupada td {
	border-bottom: none !important;
}

/* Montos (ej. columna Total en Historial de facturas) — alineados a la
   derecha, como es costumbre para cifras de dinero. Distinto de .sfw-num
   (centrado), que se usa para conteos/cantidades. */
.sfw-tabla-frontend th.sfw-monto,
.sfw-tabla-frontend td.sfw-monto,
.widefat th.sfw-monto,
.widefat td.sfw-monto {
	text-align: right;
}

/* Agrupa los botones de acciones (Editar/Dar de baja/Eliminar) para que,
   si no caben en una sola línea, se acomoden en filas parejas — en vez de
   que el botón que no cabe se vaya suelto hasta la izquierda. */
.sfw-btn-grupo {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.sfw-lote-tag {
	display: inline-block;
	margin-left: 6px;
	font-family: var(--sfw-mono);
	font-size: 12px;
	color: var(--sfw-accent);
	background: var(--sfw-accent-mist);
	padding: 1px 6px;
	border-radius: 2px;
}

/* ---------- avisos ---------- */

.sfw-aviso {
	background: #FBF3E0;
	border-left: 3px solid #B98A1E;
	padding: 12px 16px;
	font-size: 14px;
	margin: 14px 0;
}

.sfw-error {
	background: var(--sfw-alert-mist);
	border-left: 3px solid var(--sfw-alert);
	padding: 12px 16px;
	font-size: 14px;
	color: var(--sfw-alert);
	margin: 14px 0;
}

/* ---------- resumen de totales ---------- */

.sfw-totales {
	margin-top: 18px;
	padding-top: 14px;
	border-top: 1px solid var(--sfw-rule);
	max-width: 340px;
	margin-left: auto;
}

.sfw-totales-fila {
	display: flex;
	justify-content: space-between;
	font-family: var(--sfw-mono);
	font-size: 13px;
	color: var(--sfw-muted);
	padding: 3px 0;
}

.sfw-totales-fila.sfw-total-final {
	color: var(--sfw-ink);
	font-size: 17px;
	font-weight: 600;
	border-top: 1px solid var(--sfw-ink);
	margin-top: 6px;
	padding-top: 8px;
}

/* ---------- resumen oculto (se conserva para cálculos y timbrado) ---------- */
.sfw-resumen-oculto {
	display: none !important;
}

/* ---------- vista previa: se ve como una prefactura real ---------- */

.sfw-vista-previa-factura {
	border: 1px solid var(--sfw-ink);
	padding: 28px 32px;
	background: var(--sfw-surface);
	margin-top: 0;
}

.sfw-vista-previa-factura .sfw-vp-encabezado {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	border-bottom: 2px solid var(--sfw-ink);
	padding-bottom: 14px;
	margin-bottom: 18px;
}

.sfw-vista-previa-factura .sfw-vp-titulo {
	font-family: var(--sfw-serif);
	font-size: 22px;
}

.sfw-vista-previa-factura .sfw-vp-cliente {
	font-size: 14px;
	color: var(--sfw-muted);
	margin-bottom: 4px;
}

.sfw-vista-previa-factura .sfw-vp-cliente strong {
	color: var(--sfw-ink);
	font-family: var(--sfw-serif);
	font-size: 16px;
	display: block;
}

.sfw-vista-previa-factura table {
	width: 100%;
	border-collapse: collapse;
	margin-top: 16px;
}

.sfw-vista-previa-factura th {
	text-align: left;
	font-size: 11px;
	color: var(--sfw-muted);
	font-weight: 500;
	padding: 0 6px 8px;
	border-bottom: 1px solid var(--sfw-ink);
}

.sfw-vista-previa-factura th.sfw-num {
	text-align: right;
	font-family: var(--sfw-mono);
}

.sfw-vista-previa-factura td {
	padding: 9px 6px;
	border-bottom: 1px solid var(--sfw-rule);
	font-size: 13px;
	vertical-align: top;
}

.sfw-vista-previa-factura td.sfw-num {
	font-family: var(--sfw-mono);
	text-align: right;
	white-space: nowrap;
}

.sfw-vista-previa-factura th:nth-child(2),
.sfw-vista-previa-factura td:nth-child(2) {
	width: 14%;
}

.sfw-vista-previa-factura th:nth-child(3),
.sfw-vista-previa-factura td:nth-child(3) {
	width: 18%;
}

.sfw-vista-previa-factura th:nth-child(4),
.sfw-vista-previa-factura td:nth-child(4) {
	width: 18%;
}

/* ---------- resultado de timbrado ---------- */

.sfw-factura-emitida {
	border: 1px solid var(--sfw-rule);
	padding: 16px 18px;
	margin-bottom: 10px;
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
	gap: 10px;
}

.sfw-factura-emitida .sfw-fe-datos { font-size: 14px; }

.sfw-factura-emitida .sfw-fe-datos .sfw-uuid {
	font-family: var(--sfw-mono);
	font-size: 12px;
	color: var(--sfw-muted);
	display: block;
	margin-top: 2px;
}

/* ---------- responsive ---------- */

@media (max-width: 720px) {
	.sfw-layout { grid-template-columns: 1fr; }
	.sfw-rail ol { display: flex; overflow-x: auto; gap: 18px; }
	.sfw-rail ol::before { display: none; }
	.sfw-rail-item { flex-direction: column; text-align: center; gap: 6px; }
	.sfw-sheet { padding: 22px 18px; }
}

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

/* ============================================================
   Pantallas operativas adicionales (panel, recepción de stock,
   reporte de lotes, historial) — mismo lenguaje visual que el
   asistente de factura, sin el riel de pasos.
   ============================================================ */

.sfw-facturador h3 {
	font-family: var(--sfw-serif);
	font-size: 18px;
	font-weight: 600;
	margin: 28px 0 10px;
}

.sfw-facturador > h2:first-child,
.sfw-facturador h3:first-child {
	margin-top: 0;
}

/* ---------- tablas genéricas de listado ---------- */

.sfw-tabla-frontend {
	width: 100%;
	border-collapse: collapse;
	margin: 12px 0 8px;
	font-size: 14px;
}

.sfw-tabla-frontend thead th {
	text-align: left;
	font-size: 11px;
	letter-spacing: .02em;
	color: var(--sfw-muted);
	font-weight: 500;
	padding: 0 10px 10px;
	border-bottom: 1px solid var(--sfw-ink);
}

.sfw-tabla-frontend td {
	padding: 10px;
	border-bottom: 1px solid var(--sfw-rule);
	vertical-align: top;
	font-size: 13px;
}

.sfw-tabla-frontend tbody tr:hover { background: var(--sfw-accent-mist); }

.sfw-toggle-icono {
	width: 18px;
	color: var(--sfw-muted);
	font-size: 11px;
}

.sfw-fila-detalle > td {
	background: var(--sfw-paper);
	padding: 12px 16px !important;
}

/* ---------- botones compactos (acciones de fila) ---------- */

.sfw-btn-small {
	font-size: 12px;
	padding: 6px 12px;
}

.sfw-btn-alert {
	border-color: var(--sfw-alert);
	color: var(--sfw-alert);
}

.sfw-btn-alert:hover { background: var(--sfw-alert); color: #fff; }

/* ---------- filtros en línea (reporte de lotes) ---------- */

.sfw-filtros-linea {
	display: flex;
	gap: 16px;
	flex-wrap: wrap;
	align-items: flex-end;
	margin: 4px 0 20px;
}

.sfw-filtros-linea input[type="text"] {
	max-width: 220px;
}

/* Cada campo del filtro (etiqueta arriba + su input) es un solo bloque
   flex, y el rango de fechas ("Del ... al ...") es a su vez un solo
   bloque que agrupa sus dos campos — así ninguno de los dos se separa
   de su etiqueta ni el rango se parte a la mitad cuando el filtro
   completo tiene que envolver a la siguiente línea. */
.sfw-filtro-campo {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.sfw-filtro-campo label {
	font-size: 12px;
	color: var(--sfw-muted);
	font-weight: 500;
	white-space: nowrap;
}

.sfw-filtro-rango {
	display: flex;
	align-items: flex-end;
	gap: 10px;
}

.sfw-filtro-rango-sep {
	padding-bottom: 9px;
	color: var(--sfw-muted);
	font-size: 13px;
}

.sfw-filtro-checkbox label {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 13px;
	white-space: nowrap;
	padding-bottom: 1px;
}

.sfw-filtro-checkbox input[type="checkbox"] {
	width: auto;
}

.sfw-filtro-botones {
	display: flex;
	gap: 8px;
}

/* ---------- panel con pestañas ---------- */

.sfw-panel-tabs {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
	margin-bottom: 28px;
	border-bottom: 1px solid var(--sfw-rule);
}

.sfw-panel-tabs a {
	font-family: var(--sfw-sans);
	font-size: 14px;
	font-weight: 500;
	padding: 10px 4px;
	margin-bottom: -1px;
	margin-right: 22px;
	text-decoration: none;
	color: var(--sfw-muted);
	border-bottom: 2px solid transparent;
	transition: color .15s ease, border-color .15s ease;
}

.sfw-panel-tabs a:hover { color: var(--sfw-ink); }

.sfw-panel-tabs a.is-active {
	color: var(--sfw-ink);
	border-bottom-color: var(--sfw-accent);
}

.sfw-panel-tab { display: none; }

/* ---------- texto tipo "estado"/estadística corta ---------- */

.sfw-stat-linea {
	font-family: var(--sfw-mono);
	font-size: 13px;
	color: var(--sfw-muted);
	margin: 0 0 20px;
}

/* ---------- formulario de recepción de stock: campos más anchos ---------- */

#sfw-stock-form-lote input[type="text"],
#sfw-stock-form-lote input[type="date"] {
	max-width: 220px;
}

/* ---------- modales del aplicativo (reemplazan alert()/confirm() del navegador) ---------- */

.sfw-modal-overlay {
	display: none;
	position: fixed;
	inset: 0;
	background: rgba(22, 33, 58, 0.45);
	z-index: 100000;
	align-items: center;
	justify-content: center;
	padding: 20px;
}

.sfw-modal-box {
	background: var(--sfw-surface);
	border: 1px solid var(--sfw-rule);
	border-radius: 2px;
	max-width: 420px;
	width: 100%;
	padding: 26px 24px;
	font-family: var(--sfw-sans);
	color: var(--sfw-ink);
	box-shadow: 0 12px 32px rgba(22, 33, 58, 0.25);
	max-height: 90vh;
	overflow-y: auto;
}

.sfw-modal-titulo {
	font-family: var(--sfw-serif);
	font-size: 19px;
	font-weight: 600;
	margin: 0 0 10px;
}

.sfw-modal-mensaje {
	font-size: 14px;
	line-height: 1.5;
	margin: 0 0 22px;
	white-space: pre-line;
}

.sfw-modal-botones {
	display: flex;
	justify-content: flex-end;
	gap: 10px;
}

/* ---------- pantalla de acceso (login del panel/facturación) ---------- */

.sfw-login-wrap {
	display: flex;
	justify-content: center;
	padding: 48px 16px;
}

.sfw-login-card {
	width: 100%;
	max-width: 380px;
	background: var(--sfw-surface);
	border: 1px solid var(--sfw-rule);
	border-radius: 2px;
	padding: 36px 32px;
	box-shadow: 0 2px 10px rgba(22, 33, 58, 0.06);
}

.sfw-login-card h2 {
	text-align: center;
	margin-bottom: 24px;
}

.sfw-login-card form {
	max-width: 100% !important;
}

.sfw-login-card .sfw-actions {
	border-top: none;
	padding-top: 4px;
	margin-top: 4px;
	justify-content: stretch;
}

.sfw-login-card .sfw-actions .sfw-btn {
	width: 100%;
	text-align: center;
	justify-content: center;
}

.sfw-login-card .sfw-search { margin-bottom: 0; }

.sfw-login-card label {
	display: block;
	font-size: 13px;
	font-weight: 500;
	margin-bottom: 6px;
	color: var(--sfw-muted);
}

/* ---------- modal de captura (ej. registrar lote) ---------- */

.sfw-modal-box-form {
	max-width: 480px;
	position: relative;
	text-align: left;
}

.sfw-modal-box-ancho {
	max-width: 900px;
	width: 92vw;
	position: relative;
	text-align: left;
}

.sfw-modal-cerrar {
	position: absolute;
	top: 14px;
	right: 16px;
	background: none;
	border: none;
	font-size: 22px;
	line-height: 1;
	color: var(--sfw-muted);
	cursor: pointer;
	padding: 4px;
}

.sfw-modal-cerrar:hover { color: var(--sfw-ink); }

.sfw-modal-box-form .sfw-captura-linea {
	border: none;
	padding: 0;
	background: none;
}

.sfw-modal-box-form .sfw-item-titulo {
	font-family: var(--sfw-serif);
	font-size: 19px;
	font-weight: 600;
	margin: 0 0 4px;
	padding-right: 24px; /* espacio para no encimarse con el botón "×" */
}

/* ---------- captura de producto en modal (pensado para dedo/tableta) ---------- */

.sfw-opciones-lote {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin: 14px 0;
}

.sfw-opcion-lote {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 4px;
	width: 100%;
	text-align: left;
	background: var(--sfw-surface);
	border: 1px solid var(--sfw-rule);
	border-radius: 4px;
	padding: 16px 18px;
	font-family: var(--sfw-sans);
	cursor: pointer;
	transition: border-color .15s ease, background .15s ease;
	min-height: 56px;
	justify-content: center;
}

.sfw-opcion-lote:hover,
.sfw-opcion-lote:active {
	border-color: var(--sfw-accent);
	background: var(--sfw-accent-mist);
}

.sfw-opcion-lote-titulo {
	font-size: 16px;
	font-weight: 600;
	color: var(--sfw-ink);
}

.sfw-opcion-lote-meta {
	font-family: var(--sfw-mono);
	font-size: 13px;
	color: var(--sfw-muted);
}

.sfw-opcion-lote-ninguno {
	border-style: dashed;
}

.sfw-campo-stepper {
	margin: 18px 0;
}

.sfw-campo-stepper label,
.sfw-campo-precio label {
	display: block;
	font-size: 13px;
	font-weight: 500;
	color: var(--sfw-muted);
	margin-bottom: 8px;
}

.sfw-stepper {
	display: flex;
	align-items: stretch;
	max-width: 220px;
}

.sfw-stepper-btn {
	width: 52px;
	height: 52px;
	flex: none;
	font-size: 26px;
	line-height: 1;
	font-family: var(--sfw-sans);
	background: var(--sfw-surface);
	border: 1px solid var(--sfw-ink);
	color: var(--sfw-ink);
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
	touch-action: manipulation;
}

.sfw-stepper-btn:first-child { border-radius: 4px 0 0 4px; border-right: none; }
.sfw-stepper-btn:last-child { border-radius: 0 4px 4px 0; border-left: none; }
.sfw-stepper-btn:active { background: var(--sfw-ink); color: #fff; }

.sfw-facturador .sfw-stepper input[type="number"] {
	width: 100%;
	height: 52px;
	text-align: center;
	font-size: 20px;
	font-family: var(--sfw-mono);
	border: 1px solid var(--sfw-rule);
	border-left: none;
	border-right: none;
	max-width: none;
	padding: 0;
}

.sfw-stepper input[type="number"]::-webkit-inner-spin-button,
.sfw-stepper input[type="number"]::-webkit-outer-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

.sfw-campo-precio p {
	font-family: var(--sfw-mono);
	font-size: 20px;
	font-weight: 600;
	margin: 0;
}

.sfw-btn-grande {
	width: 100%;
	padding: 16px 22px;
	font-size: 16px;
}

/* ---------- barra superior (reiniciar / cerrar sesión) ---------- */

.sfw-topbar {
	display: flex;
	justify-content: flex-end;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 18px;
}

.sfw-btn-chico {
	font-family: var(--sfw-sans);
	font-size: 12px;
	font-weight: 500;
	padding: 6px 12px;
	border-radius: 2px;
	border: 1px solid var(--sfw-rule);
	background: var(--sfw-surface);
	color: var(--sfw-muted);
	cursor: pointer;
	text-decoration: none;
	display: inline-block;
	line-height: 1.4;
}

.sfw-btn-chico:hover {
	border-color: var(--sfw-ink);
	color: var(--sfw-ink);
}

.sfw-sync-resultado-chico {
	font-size: 12px;
	color: var(--sfw-muted);
	align-self: center;
}
