/* ===================================================================
   WooCommerce POS — tema visual "Tablet" (claro, minimal, inspirado
   en apps de punto de venta tipo tablet).
   =================================================================== */

.woo-pos-wrap {
	--pos-ink:        #1c1c1e;
	--pos-ink-soft:   #6b7280;
	--pos-primary:    #111213;
	--pos-primary-2:  #2b2b2e;
	--pos-accent:     #b8863d;
	--pos-accent-2:   #d9a75a;
	--pos-bg:         #f5f6f8;
	--pos-surface:    #ffffff;
	--pos-border:     #e6e8ec;
	--pos-danger:     #c0392b;
	--pos-danger-bg:  #fbecea;
	--pos-warn:       #9a6400;
	--pos-warn-bg:    #fbf1de;
	--pos-good-bg:    #eef8f0;
	--pos-good:       #1f8a45;
	--pos-radius:     16px;
	--pos-radius-sm:  10px;
	--pos-shadow:     0 1px 2px rgba(20,20,25,.04), 0 8px 24px rgba(20,20,25,.05);

	max-width: 1500px;
	color: var(--pos-ink);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.woo-pos-wrap * { box-sizing: border-box; }

.woo-pos-title { display: none; } /* el encabezado vive en la topbar del shell */

/* ---------- Shell general ---------- */

.woo-pos-shell {
	background: var(--pos-bg);
	border-radius: var(--pos-radius);
	padding: 0 0 20px;
	margin: -10px -10px 0;
}

@media (min-width: 783px) {
	.woo-pos-shell { margin: 0; padding-bottom: 24px; }
}

/* ---------- Topbar ---------- */

.woo-pos-topbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 10px;
	background: var(--pos-surface);
	border-bottom: 1px solid var(--pos-border);
	color: var(--pos-ink);
	padding: 14px 20px;
	border-radius: var(--pos-radius) var(--pos-radius) 0 0;
	margin-bottom: 18px;
	margin-top: -25px;
}

.woo-pos-brand {
	font-size: 17px;
	font-weight: 800;
	letter-spacing: .2px;
}

.woo-pos-topbar-right {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
}

.woo-pos-cashier-name {
	font-size: 13px;
	color: var(--pos-ink-soft);
}

.woo-pos-cash-pill {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .4px;
	padding: 6px 12px;
	border-radius: 999px;
	background: var(--pos-bg);
	color: var(--pos-ink-soft);
}

.woo-pos-cash-pill::before {
	content: "";
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #9aa39c;
	display: inline-block;
}

.woo-pos-cash-pill-open::before { background: var(--pos-good); }
.woo-pos-cash-pill-closed::before { background: #d98a3f; }
.woo-pos-cash-pill-open { background: var(--pos-good-bg); color: var(--pos-good); }
.woo-pos-cash-pill-closed { background: var(--pos-warn-bg); color: var(--pos-warn); }

.woo-pos-icon-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	border-radius: 50%;
	border: 1px solid var(--pos-border);
	background: var(--pos-surface);
	color: var(--pos-ink);
	cursor: pointer;
	padding: 0;
}

.woo-pos-icon-btn:hover { background: var(--pos-bg); }
.woo-pos-icon-btn .dashicons { font-size: 18px; width: 18px; height: 18px; }

.woo-pos-btn-accent {
	background: var(--pos-accent);
	border-color: var(--pos-accent);
	color: #fff;
}
.woo-pos-btn-accent:hover { background: var(--pos-accent-2); border-color: var(--pos-accent-2); color: #fff; }

.woo-pos-btn-ghost {
	background: transparent;
	border: 1px solid var(--pos-border);
	color: var(--pos-ink);
}
.woo-pos-btn-ghost:hover { background: var(--pos-bg); color: var(--pos-ink); }

/* ---------- Layout principal ---------- */

.woo-pos-container {
	display: flex;
	gap: 20px;
	align-items: flex-start;
	padding: 0 20px;
}

.woo-pos-products-panel {
	flex: 1.5;
	background: var(--pos-surface);
	border: 1px solid var(--pos-border);
	border-radius: var(--pos-radius);
	box-shadow: var(--pos-shadow);
	padding: 18px;
	min-width: 0;
}

.woo-pos-products-toolbar {
	margin-bottom: 14px;
}

.woo-pos-category-tabs {
	display: flex;
	gap: 8px;
	overflow-x: auto;
	padding-bottom: 10px;
	margin-bottom: 10px;
	border-bottom: 1px solid var(--pos-border);
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
}
.woo-pos-category-tabs::-webkit-scrollbar { display: none; }

.woo-pos-tab {
	flex: 0 0 auto;
	padding: 8px 16px;
	border-radius: 999px;
	border: 1px solid var(--pos-border);
	background: var(--pos-surface);
	color: var(--pos-ink-soft);
	font-size: 13px;
	font-weight: 700;
	cursor: pointer;
	white-space: nowrap;
}

.woo-pos-tab:hover { background: var(--pos-bg); }

.woo-pos-tab.is-active {
	background: var(--pos-primary);
	border-color: var(--pos-primary);
	color: #fff;
}

.woo-pos-search-row {
	position: relative;
}

.woo-pos-search-icon {
	position: absolute;
	left: 14px;
	top: 50%;
	transform: translateY(-50%);
	color: var(--pos-ink-soft);
	pointer-events: none;
}

.woo-pos-search-input {
	width: 100%;
	padding: 12px 44px 12px 50px !important;
	font-size: 15px;
	border: 1px solid var(--pos-border);
	border-radius: var(--pos-radius-sm);
	background: var(--pos-bg);
	color: var(--pos-ink);
}

.woo-pos-search-input:focus {
	outline: none;
	border-color: var(--pos-primary);
	box-shadow: 0 0 0 3px rgba(17,18,19,.08);
}

.woo-pos-scan-btn {
	position: absolute;
	right: 4px;
	top: 50%;
	transform: translateY(-50%);
}

.woo-pos-remote-scan-link-row {
	display: flex;
	gap: 8px;
	margin-bottom: 10px;
	margin-top: 4px;
}

.woo-pos-remote-scan-link-row input {
	flex: 1 1 auto;
	margin-top: 0;
	padding: 9px 10px;
	border: 1px solid var(--pos-border);
	border-radius: var(--pos-radius-sm);
	background: var(--pos-bg);
	font-size: 12px;
	color: var(--pos-ink-soft);
}

.woo-pos-remote-scan-link-row .woo-pos-btn {
	flex: 0 0 auto;
}

.woo-pos-remote-scan-status {
	text-align: center;
	margin: 4px 0 0;
}

.woo-pos-scanner-viewport {
	width: 100%;
	max-width: 360px;
	margin: 0 auto;
	border-radius: 12px;
	overflow: hidden;
	background: #000;
}

.woo-pos-scanner-viewport video {
	width: 100%;
	display: block;
}

.woo-pos-products-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
	gap: 12px;
	max-height: 62vh;
	overflow-y: auto;
	padding-right: 4px;
	padding-top: 10px;
}

.woo-pos-hint {
	grid-column: 1 / -1;
	color: var(--pos-ink-soft);
}

.woo-pos-scan-undo-btn {
	border: 1px solid var(--pos-border);
	background: var(--pos-surface);
	color: var(--pos-ink);
	border-radius: 8px;
	padding: 2px 10px;
	font-size: 12px;
	font-weight: 600;
	cursor: pointer;
	margin-left: 6px;
}

.woo-pos-scan-undo-btn:hover {
	border-color: var(--pos-ink);
}

.woo-pos-product-card {
	position: relative;
	border: 1px solid var(--pos-border);
	border-radius: 14px;
	padding: 12px;
	cursor: pointer;
	background: var(--pos-surface);
	transition: box-shadow .15s ease, transform .1s ease, border-color .15s ease;
}

.woo-pos-product-card:hover {
	box-shadow: 0 6px 16px rgba(20,20,25,.08);
	transform: translateY(-2px);
	border-color: var(--pos-ink);
}

.woo-pos-qty-badge {
	position: absolute;
	top: -8px;
	left: -8px;
	min-width: 22px;
	height: 22px;
	padding: 0 5px;
	border-radius: 999px;
	background: var(--pos-primary);
	color: #fff;
	font-size: 12px;
	font-weight: 800;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 2px 6px rgba(0,0,0,.2);
	z-index: 2;
}

.woo-pos-product-card img {
	width: 100%;
	aspect-ratio: 1 / 1;
	height: auto;
	object-fit: cover;
	border-radius: 10px;
	margin-bottom: 8px;
	background: var(--pos-bg);
}

.woo-pos-product-name {
	font-size: 13px;
	font-weight: 500;
	line-height: 1.3;
	margin-bottom: 4px;
	min-height: 34px;
}

.woo-pos-product-price {
	font-size: 13px;
	color: var(--pos-ink-soft);
	font-weight: 600;
}

.woo-pos-product-stock {
	font-size: 11px;
	color: var(--pos-ink-soft);
	margin-top: 2px;
}

.woo-pos-product-stock.woo-pos-low-stock {
	color: var(--pos-danger);
	font-weight: 700;
}

.woo-pos-product-card.no-image .woo-pos-product-name {
	margin-top: 4px;
}

.woo-pos-product-card.out-of-stock {
	opacity: 0.45;
	cursor: not-allowed;
}

/* ---------- Panel de la venta actual ---------- */

.woo-pos-cart-panel {
	flex: 1;
	background: var(--pos-surface);
	border: 1px solid var(--pos-border);
	border-radius: var(--pos-radius);
	box-shadow: var(--pos-shadow);
	padding: 18px;
	position: sticky;
	top: 40px;
	min-width: 0;
}

.woo-pos-cart-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 6px;
}

.woo-pos-cart-panel h2 {
	margin: 0;
	font-size: 15px;
	font-weight: 800;
	color: var(--pos-ink);
}

/* Cliente */

.woo-pos-customer-box {
	margin-bottom: 14px;
	padding-bottom: 14px;
	border-bottom: 1px solid var(--pos-border);
	position: relative;
}

.woo-pos-field-label {
	display: block;
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .4px;
	color: var(--pos-ink-soft);
	margin-bottom: 6px;
}

#woo-pos-customer-search {
	width: 100%;
	padding: 9px 10px;
	border: 1px solid var(--pos-border);
	border-radius: var(--pos-radius-sm);
	background: var(--pos-bg);
}

.woo-pos-customer-results {
	position: relative;
	margin-top: 4px;
}

.woo-pos-customer-result-item {
	padding: 8px 10px;
	border: 1px solid var(--pos-border);
	border-top: none;
	background: var(--pos-surface);
	cursor: pointer;
	font-size: 13px;
}

.woo-pos-customer-result-item:hover { background: var(--pos-bg); }

.woo-pos-customer-selected {
	display: flex;
	align-items: center;
	justify-content: space-between;
	background: var(--pos-good-bg);
	border-radius: var(--pos-radius-sm);
	padding: 8px 10px;
	font-size: 13px;
	font-weight: 600;
}

#woo-pos-new-customer-btn {
	margin-top: 6px;
	font-size: 12px;
}

/* Lista de la venta actual (estilo ticket, sin tabla) */

.woo-pos-cart-list {
	max-height: 30vh;
	overflow-y: auto;
	margin-bottom: 10px;
}

.woo-pos-cart-row {
	display: grid;
	grid-template-columns: 1fr auto auto auto;
	align-items: center;
	gap: 10px;
	padding: 10px 0;
	border-bottom: 1px solid var(--pos-border);
}

.woo-pos-cart-row-main {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.woo-pos-cart-row-name {
	font-size: 13px;
	font-weight: 700;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.woo-pos-cart-row-unit {
	font-size: 11px;
	color: var(--pos-ink-soft);
}

.woo-pos-cart-row-qty {
	display: flex;
	align-items: center;
	gap: 4px;
}

.woo-pos-qty-btn {
	width: 24px;
	height: 24px;
	border-radius: 50%;
	border: 1px solid var(--pos-border);
	background: var(--pos-bg);
	cursor: pointer;
	font-size: 14px;
	line-height: 1;
	padding: 0;
}

.woo-pos-qty-btn:hover { background: var(--pos-border); }

.woo-pos-cart-row .woo-pos-qty-input {
	width: 36px;
	text-align: center;
	border: 1px solid var(--pos-border);
	border-radius: 6px;
	padding: 3px;
	font-size: 13px;
}

.woo-pos-cart-row-subtotal {
	font-size: 13px;
	font-weight: 700;
	min-width: 60px;
	text-align: right;
}

.woo-pos-empty-row {
	color: var(--pos-ink-soft);
	text-align: center;
	padding: 24px 0;
	font-size: 13px;
}

.woo-pos-remove-item {
	color: var(--pos-ink-soft);
	cursor: pointer;
	font-weight: bold;
	background: none;
	border: none;
	font-size: 16px;
	line-height: 1;
	padding: 0 2px;
}
.woo-pos-remove-item:hover { color: var(--pos-danger); }

/* Desglose de totales */

.woo-pos-totals-breakdown {
	border-top: 1px dashed var(--pos-border);
	padding-top: 10px;
	margin-bottom: 12px;
}

.woo-pos-totals-row {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	font-size: 13px;
	color: var(--pos-ink-soft);
	padding: 3px 0;
}

.woo-pos-totals-row strong {
	color: var(--pos-ink);
	font-weight: 600;
}

.woo-pos-totals-final {
	margin-top: 4px;
	padding-top: 8px;
	border-top: 1px solid var(--pos-border);
	font-size: 14px;
	color: var(--pos-ink);
	font-weight: 700;
}

.woo-pos-totals-final strong {
	font-size: 24px;
	color: var(--pos-ink);
	font-weight: 800;
}

.woo-pos-form-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px;
}

.woo-pos-checkout-form label {
	display: block;
	margin-bottom: 10px;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .3px;
	color: var(--pos-ink-soft);
}

.woo-pos-note-label { margin-top: 2px; }

.woo-pos-checkout-form input,
.woo-pos-checkout-form select,
.woo-pos-checkout-form textarea {
	width: 100%;
	margin-top: 4px;
	padding: 9px 10px;
	box-sizing: border-box;
	font-weight: normal;
	border: 1px solid var(--pos-border);
	border-radius: var(--pos-radius-sm);
	background: var(--pos-bg);
	color: var(--pos-ink);
	font-size: 13px;
}

.woo-pos-checkout-form input:focus,
.woo-pos-checkout-form select:focus,
.woo-pos-checkout-form textarea:focus {
	outline: none;
	border-color: var(--pos-primary);
	box-shadow: 0 0 0 3px rgba(17,18,19,.08);
}

.woo-pos-change-row {
	display: flex;
	justify-content: space-between;
	background: var(--pos-good-bg);
	color: var(--pos-good);
	padding: 8px 10px;
	border-radius: var(--pos-radius-sm);
	margin-bottom: 10px;
	font-weight: 700;
}

.woo-pos-success-box {
	margin-top: 14px;
	padding: 12px;
	background: var(--pos-good-bg);
	border: 1px solid #b7e0c1;
	border-radius: var(--pos-radius-sm);
	text-align: center;
}

.woo-pos-success-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 8px 0 4px;
}
.woo-pos-success-actions .woo-pos-btn { flex: 1 1 auto; min-width: 130px; }

.woo-pos-error-box {
	margin-top: 14px;
	padding: 10px 12px;
	background: var(--pos-danger-bg);
	border: 1px solid #e3aaa2;
	border-radius: var(--pos-radius-sm);
	color: var(--pos-danger);
	font-size: 13px;
}

/* ---------- Botones ---------- */

.woo-pos-btn {
	display: inline-block;
	padding: 10px 16px;
	font-size: 13px;
	font-weight: 700;
	border-radius: var(--pos-radius-sm);
	border: 1px solid var(--pos-primary);
	background: var(--pos-primary);
	color: #fff;
	cursor: pointer;
	text-align: center;
	text-decoration: none;
	line-height: 1.4;
	transition: background .15s ease, transform .05s ease;
}

.woo-pos-btn:hover {
	background: var(--pos-primary-2);
	border-color: var(--pos-primary-2);
	color: #fff;
}

.woo-pos-btn:active { transform: translateY(1px); }
.woo-pos-btn:disabled { opacity: .6; cursor: not-allowed; }

.woo-pos-btn-primary {
	background: var(--pos-primary);
	border-color: var(--pos-primary);
}

.woo-pos-btn-secondary {
	background: var(--pos-surface);
	border-color: var(--pos-border);
	color: var(--pos-ink);
}

.woo-pos-btn-secondary:hover {
	background: var(--pos-bg);
	color: var(--pos-ink);
}

.woo-pos-btn-hero {
	width: 100%;
	padding: 15px 20px;
	font-size: 16px;
	border-radius: 14px;
	margin-top: 4px;
}

.woo-pos-btn-link {
	display: inline-block;
	margin-top: 6px;
	background: none;
	border: none;
	color: var(--pos-ink);
	text-decoration: underline;
	cursor: pointer;
	font-size: 12px;
	font-weight: 600;
	padding: 0;
}

/* ---------- Modales (caja / cliente / historial) ---------- */

.woo-pos-modal-overlay {
	position: fixed;
	inset: 0;
	background: rgba(20,20,25,.55);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 100000;
	padding: 16px;
	box-sizing: border-box;
}

.woo-pos-modal {
	background: var(--pos-surface);
	border-radius: var(--pos-radius);
	padding: 20px;
	width: 100%;
	max-width: 420px;
	max-height: 90vh;
	overflow-y: auto;
	overflow-x: hidden;
	box-sizing: border-box;
	box-shadow: 0 20px 60px rgba(0,0,0,.3);
}

.woo-pos-modal * { box-sizing: border-box; max-width: 100%; }

.woo-pos-modal-wide { max-width: 420px; }

.woo-pos-modal-confirm {
	max-width: 320px;
	text-align: center;
	padding: 26px 24px 20px;
}

.woo-pos-confirm-message {
	margin: 0 0 20px;
	font-size: 14px;
	color: var(--pos-ink);
	line-height: 1.5;
}

.woo-pos-modal-confirm .woo-pos-modal-actions {
	justify-content: center;
}

.woo-pos-modal h3 {
	margin-top: 0;
	color: var(--pos-ink);
}

.woo-pos-modal-hint {
	font-size: 13px;
	color: var(--pos-ink-soft);
	margin-top: -6px;
}

.woo-pos-modal label {
	display: block;
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .3px;
	color: var(--pos-ink-soft);
	margin-bottom: 12px;
}

.woo-pos-modal input,
.woo-pos-modal textarea {
	width: 100%;
	margin-top: 4px;
	padding: 9px 10px;
	border: 1px solid var(--pos-border);
	border-radius: var(--pos-radius-sm);
	background: var(--pos-bg);
	font-weight: normal;
	font-size: 13px;
}

.woo-pos-modal-actions {
	display: flex;
	justify-content: flex-end;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 6px;
}

.woo-pos-modal-actions .woo-pos-btn {
	flex: 1 1 auto;
}

/* Modal: producto escaneado */

.woo-pos-scan-product-detail {
	display: flex;
	gap: 14px;
	align-items: flex-start;
	margin-bottom: 16px;
}

.woo-pos-scan-product-detail img {
	width: 84px;
	height: 84px;
	object-fit: cover;
	border-radius: 10px;
	background: var(--pos-bg);
	flex-shrink: 0;
}

.woo-pos-scan-product-info {
	flex: 1;
	min-width: 0;
}

.woo-pos-scan-product-name {
	font-size: 15px;
	font-weight: 800;
	color: var(--pos-ink);
	margin-bottom: 4px;
	line-height: 1.3;
}

.woo-pos-scan-product-price {
	font-size: 14px;
	font-weight: 700;
	color: var(--pos-ink-soft);
	margin-bottom: 4px;
}

.woo-pos-scan-qty-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 10px 0;
	border-top: 1px dashed var(--pos-border);
	margin-bottom: 6px;
}

.woo-pos-scan-qty-row > span {
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .3px;
	color: var(--pos-ink-soft);
}

#woo-pos-scan-product-qty {
	width: 48px;
	text-align: center;
	border: 1px solid var(--pos-border);
	border-radius: 6px;
	padding: 4px;
	font-size: 14px;
	margin: 0 2px;
}

.woo-pos-close-result {
	font-size: 13px;
	margin-bottom: 10px;
}

.woo-pos-neg { color: var(--pos-danger); font-weight: 700; }
.woo-pos-pos { color: var(--pos-good); font-weight: 700; }

/* Bloques separados del detalle de cierre de caja: efectivo físico,
   métodos electrónicos y total general, cada uno con su propio recuadro
   para que no se mezclen visualmente. Cada fila es un grid de 2
   columnas (etiqueta flexible + monto fijo a la derecha) para que
   nunca se encimen ni desborden el ancho del modal. */

.woo-pos-cash-block {
	border: 1px solid var(--pos-border);
	border-radius: var(--pos-radius-sm);
	padding: 10px 12px;
	margin-bottom: 8px;
	overflow: hidden;
}

.woo-pos-cash-block-title {
	font-size: 10.5px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .3px;
	color: var(--pos-ink-soft);
	margin-bottom: 6px;
}

.woo-pos-cash-row {
	display: grid;
	grid-template-columns: 1fr auto;
	align-items: baseline;
	gap: 10px;
	padding: 3px 0;
}

.woo-pos-cash-row-label {
	min-width: 0;
	overflow-wrap: break-word;
	color: var(--pos-ink-soft);
}

.woo-pos-cash-row-value {
	font-weight: 700;
	white-space: nowrap;
	text-align: right;
}

.woo-pos-cash-block-physical {
	background: var(--pos-bg);
	border-color: var(--pos-ink-soft);
}

.woo-pos-cash-row-subtotal {
	border-top: 1px dashed var(--pos-border);
	border-bottom: 1px dashed var(--pos-border);
	margin: 4px 0;
	padding: 5px 0 !important;
}
.woo-pos-cash-row-subtotal .woo-pos-cash-row-label,
.woo-pos-cash-row-subtotal .woo-pos-cash-row-value { font-weight: 700; color: var(--pos-ink); }

.woo-pos-cash-row-diff {
	margin-top: 4px;
	padding-top: 4px;
	border-top: 1px solid var(--pos-border);
}
.woo-pos-cash-row-diff .woo-pos-cash-row-label { font-weight: 700; color: var(--pos-ink); }

.woo-pos-cash-block-electronic {
	background: #f2ecdf;
	border-color: transparent;
}

.woo-pos-cash-block-electronic .woo-pos-cash-block-title {
	color: var(--pos-accent);
}

.woo-pos-cash-block-note {
	font-size: 11px;
	color: var(--pos-ink-soft);
	margin-top: 6px;
	line-height: 1.4;
}

.woo-pos-cash-block-summary {
	background: transparent;
	border-style: dashed;
}

.woo-pos-close-status {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 10px 12px;
	border-radius: var(--pos-radius-sm);
	font-size: 13px;
	font-weight: 700;
	margin-bottom: 10px;
}

.woo-pos-close-status-ok {
	background: var(--pos-good-bg);
	color: var(--pos-good);
}

.woo-pos-close-status-warn {
	background: var(--pos-warn-bg);
	color: var(--pos-warn);
}

/* Desglose por método de pago (admin: historial de cajas) */

.woo-pos-method-breakdown {
	list-style: none;
	margin: 0;
	padding: 0;
	font-size: 12px;
}

.woo-pos-method-breakdown li {
	display: flex;
	justify-content: space-between;
	gap: 10px;
	padding: 1px 0;
	white-space: nowrap;
}

.woo-pos-method-cash { font-weight: 700; }
.woo-pos-method-other em { font-style: normal; color: var(--pos-ink-soft); font-size: 11px; }

/* Historial de cajas del cajero */

.woo-pos-history-list {
	max-height: 50vh;
	overflow-y: auto;
	margin-bottom: 12px;
}

.woo-pos-history-row {
	border: 1px solid var(--pos-border);
	border-radius: var(--pos-radius-sm);
	padding: 10px 12px;
	margin-bottom: 8px;
}

.woo-pos-history-row-top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 6px;
	flex-wrap: wrap;
	gap: 6px;
}

.woo-pos-history-date {
	font-size: 12px;
	color: var(--pos-ink-soft);
}

.woo-pos-history-row-details {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	font-size: 12px;
	color: var(--pos-ink-soft);
}

.woo-pos-history-row-details strong { color: var(--pos-ink); }

#woo-pos-history-load-more {
	width: 100%;
	margin-bottom: 6px;
}

/* Historial de ventas */

.woo-pos-sales-filters {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 14px;
}

.woo-pos-sales-filters input {
	flex: 1 1 140px;
	margin-top: 0;
}

.woo-pos-sales-filters .woo-pos-btn {
	flex: 0 0 auto;
}

.woo-pos-sale-row .woo-pos-history-row-top {
	justify-content: space-between;
	font-weight: 600;
	color: var(--pos-ink);
}

.woo-pos-sale-products {
	font-size: 12px;
	color: var(--pos-ink-soft);
	margin: 4px 0;
}

.woo-pos-sale-actions {
	display: flex;
	gap: 14px;
	margin-top: 8px;
}

.woo-pos-sale-detail-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	font-size: 12px;
	color: var(--pos-ink-soft);
	margin: 10px 0;
}

.woo-pos-sale-detail-meta strong { color: var(--pos-ink); }

.woo-pos-sale-detail-items {
	border: 1px solid var(--pos-border);
	border-radius: var(--pos-radius-sm);
	margin-bottom: 12px;
	max-height: 30vh;
	overflow-y: auto;
}

.woo-pos-sale-detail-item {
	display: flex;
	justify-content: space-between;
	gap: 10px;
	padding: 8px 12px;
	font-size: 13px;
	border-bottom: 1px solid var(--pos-border);
}

.woo-pos-sale-detail-item:last-child { border-bottom: none; }

#woo-pos-sales-history-load-more {
	width: 100%;
	margin-bottom: 6px;
}

/* ---------- Barra inferior (solo móvil) ---------- */

.woo-pos-bottom-nav {
	display: none;
}

.woo-pos-bottom-nav-item {
	flex: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 2px;
	padding: 8px 0 6px;
	background: none;
	border: none;
	color: var(--pos-ink-soft);
	font-size: 11px;
	font-weight: 700;
	cursor: pointer;
	position: relative;
}

.woo-pos-bottom-nav-item.is-active { color: var(--pos-ink); }
.woo-pos-bottom-nav-item .dashicons { font-size: 20px; width: 20px; height: 20px; }

.woo-pos-cart-badge {
	position: absolute;
	top: 2px;
	right: calc(50% - 22px);
	min-width: 16px;
	height: 16px;
	padding: 0 4px;
	border-radius: 999px;
	background: var(--pos-danger);
	color: #fff;
	font-size: 10px;
	display: flex;
	align-items: center;
	justify-content: center;
}

/* ---------- Frontend ---------- */

.woo-pos-frontend {
	max-width: 1500px;
	margin: 0 auto;
	padding: 20px 0;
}

.woo-pos-frontend-notice {
	padding: 14px 18px;
	background: var(--pos-danger-bg, #fbeaea);
	border: 1px solid #d07a7a;
	border-radius: var(--pos-radius-sm);
	color: #8a1f1f;
	max-width: 600px;
}

/* ---------- Responsivo ---------- */

@media (max-width: 900px) {
	.woo-pos-container {
		flex-direction: column;
		padding: 0 12px 74px;
	}

	.woo-pos-topbar {
		padding: 12px 14px;
	}

	.woo-pos-cashier-name { display: none; }

	/* En móvil, la barra inferior controla la vista: "Productos" muestra
	   solo el catálogo; "Venta" (por defecto) muestra el catálogo junto
	   con el carrito para poder seguir agregando productos sin cambiar
	   de pestaña; "Cajas" no afecta estos paneles. */
	.woo-pos-products-panel,
	.woo-pos-cart-panel {
		display: block; /* visibles por defecto: vista "Venta" */
		width: 100%;
	}
	.woo-pos-cart-panel {
		position: static;
	}
	.woo-pos-container.woo-pos-view-products-only .woo-pos-cart-panel {
		display: none;
	}

	.woo-pos-products-grid {
		max-height: none;
	}

	.woo-pos-bottom-nav {
		display: flex;
		position: fixed;
		left: 0; right: 0; bottom: 0;
		background: var(--pos-surface);
		border-top: 1px solid var(--pos-border);
		box-shadow: 0 -4px 16px rgba(0,0,0,.06);
		z-index: 9000;
		padding-bottom: env(safe-area-inset-bottom, 0);
	}

	.woo-pos-form-grid {
		grid-template-columns: 1fr;
	}
}

@media (min-width: 901px) {
	.woo-pos-products-panel,
	.woo-pos-cart-panel {
		display: block !important;
	}
}

@media (max-width: 480px) {
	.woo-pos-modal-overlay { padding: 10px; }
	.woo-pos-modal { padding: 14px; }
	.woo-pos-success-actions { flex-direction: column; }
	.woo-pos-success-actions .woo-pos-btn { min-width: 0; }

	/* Modales: botones apilados y ocupando todo el ancho, más fáciles
	   de tocar en pantallas angostas. */
	.woo-pos-modal-actions {
		flex-direction: column-reverse;
	}
	.woo-pos-modal-actions .woo-pos-btn {
		width: 100%;
	}

	/* Cierre de caja: bloques y filas más compactos. */
	.woo-pos-cash-block {
		padding: 8px 10px;
	}
	.woo-pos-cash-row,
	.woo-pos-close-status {
		font-size: 12.5px;
	}

	/* Producto escaneado: imagen arriba, datos abajo, para que quepa
	   sin achicar demasiado el texto. */
	.woo-pos-scan-product-detail {
		flex-direction: column;
		align-items: center;
		text-align: center;
	}

	/* Fila del carrito: menos espacio entre columnas para que el
	   nombre del producto tenga más lugar. */
	.woo-pos-cart-row {
		gap: 6px;
	}
	.woo-pos-cart-row-subtotal {
		min-width: 44px;
	}
}

/* ===================================================================
   Páginas de administración: Cajeros / Cajas / Trazabilidad
   =================================================================== */

.woo-pos-admin-columns {
	display: flex;
	gap: 20px;
	align-items: flex-start;
	flex-wrap: wrap;
	margin-top: 16px;
}

.woo-pos-admin-card {
	background: #fff;
	border: 1px solid #e6e8ec;
	border-radius: 12px;
	padding: 18px 20px;
	flex: 1;
	min-width: 280px;
}

.woo-pos-admin-card-wide {
	flex: 2;
}

.woo-pos-pill {
	display: inline-block;
	padding: 3px 10px;
	border-radius: 999px;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .3px;
}

.woo-pos-pill-open { background: #eef8f0; color: #1f8a45; }
.woo-pos-pill-closed { background: #f1eee4; color: #6b6459; }
.woo-pos-pill-neutral { background: #eef2ff; color: #33408a; }

.woo-pos-neg { color: #c0392b; font-weight: 700; }
.woo-pos-pos { color: #1f8a45; font-weight: 700; }

.woo-pos-log-filters {
	display: flex;
	gap: 8px;
	align-items: center;
	flex-wrap: wrap;
	margin-top: 10px;
}

/* Tablas responsivas: en pantallas chicas cada fila se convierte en una
   tarjeta apilada (encabezado como etiqueta de cada dato) en vez de
   forzar scroll horizontal, que es incómodo en el admin de WordPress. */
.woo-pos-table-scroll {
	width: 100%;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

@media (max-width: 782px) {
	.woo-pos-responsive-table thead {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip: rect(0 0 0 0);
	}
	.woo-pos-responsive-table,
	.woo-pos-responsive-table tbody,
	.woo-pos-responsive-table tr,
	.woo-pos-responsive-table td {
		display: block;
		width: 100%;
	}
	.woo-pos-responsive-table tr {
		margin-bottom: 12px;
		border: 1px solid #e6e8ec;
		border-radius: 10px;
		padding: 4px 12px;
		background: #fff;
	}
	.woo-pos-responsive-table td {
		display: flex;
		justify-content: space-between;
		align-items: center;
		gap: 12px;
		padding: 8px 0;
		border-bottom: 1px solid #f1f1f1 !important;
		border-left: none !important;
		border-right: none !important;
		border-top: none !important;
		text-align: right;
		white-space: normal;
	}
	.woo-pos-responsive-table tr td:last-child { border-bottom: none !important; }
	.woo-pos-responsive-table td[data-label]::before {
		content: attr(data-label);
		font-weight: 600;
		color: var(--pos-ink-soft, #6b7280);
		text-align: left;
		margin-right: 12px;
		flex: 0 0 auto;
	}
	.woo-pos-responsive-table td:not([data-label]) {
		justify-content: flex-end;
	}
}

@media (max-width: 782px) {
	.woo-pos-admin-columns {
		flex-direction: column;
	}
	.woo-pos-admin-card,
	.woo-pos-admin-card-wide {
		width: 100%;
		min-width: 0;
	}
	.woo-pos-log-filters {
		flex-direction: column;
		align-items: stretch;
	}
	.woo-pos-log-filters select,
	.woo-pos-log-filters input {
		width: 100%;
	}
}
