/**
 * ERP — SaaS operativo claro (TEC PERU)
 * Superficie clara, teal de acción, tipografía Figtree.
 * Densidad usable todo el día — sin estética “landing”.
 */
@import url('https://fonts.googleapis.com/css2?family=Figtree:wght@400;500;600;700&family=Sora:wght@600;700&display=swap');

:root {
	--erp-primary: #0a2430;
	--erp-primary-soft: #334155;
	--erp-accent: #e8913a;
	--erp-accent-soft: #fff4e8;
	--erp-accent-dark: #c97422;
	--erp-action: #0f7a78;
	--erp-action-soft: #e6f4f3;
	--erp-action-dark: #0a5c5a;
	--erp-success: #059669;
	--erp-success-soft: #ecfdf5;
	--erp-danger: #dc2626;
	--erp-danger-soft: #fef2f2;
	--erp-warning: #e8913a;
	--erp-warning-soft: #fff4e8;
	--erp-info: #0f7a78;
	--erp-info-soft: #e6f4f3;
	--erp-cont: #0f7a78;
	--erp-bg: #f3f6f6;
	--erp-surface: #ffffff;
	--erp-sidebar-bg: #ffffff;
	--erp-sidebar-hover: #eef4f3;
	--erp-header-bg: #ffffff;
	--erp-border: #dce5e4;
	--erp-text: #0a2430;
	--erp-text-muted: #5f7370;
	--erp-radius: 8px;
	--erp-radius-sm: 4px;
	--erp-shadow: 0 1px 2px rgba(10, 36, 48, 0.04);
	--erp-shadow-md: 0 4px 14px rgba(10, 36, 48, 0.06);
	--erp-font: 'Figtree', 'Source Sans Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
	--erp-display: 'Sora', 'Figtree', sans-serif;
	--erp-mono: 'Consolas', 'Roboto Mono', 'Courier New', monospace;
	--erp-header-h: 56px;
}

/* --- Base --- */
body.erp-theme {
	font-family: var(--erp-font);
	background-color: var(--erp-bg);
	color: var(--erp-text);
	-webkit-font-smoothing: antialiased;
	letter-spacing: -0.011em;
	font-size: 0.925rem;
}

body.erp-theme .content-wrapper,
body.erp-theme .content-wrapper-2,
body.erp-theme #contenido {
	background-color: var(--erp-bg) !important;
}

body.erp-theme .content {
	padding: 0.85rem 1.1rem 1.35rem;
}

body.erp-theme .content-header h1,
body.erp-theme h1, body.erp-theme h2, body.erp-theme h3,
body.erp-theme h4, body.erp-theme h5 {
	font-family: var(--erp-display);
	font-weight: 600;
	color: var(--erp-text);
}

body.erp-theme code,
body.erp-theme .erp-mono {
	font-family: var(--erp-mono);
	font-size: 0.875em;
}

/* --- Header --- */
body.erp-theme .main-header,
body.erp-theme .main-header.navbar-erp,
body.erp-theme #header_app,
body.erp-theme #header_app.navbar-erp {
	background: rgba(255, 255, 255, 0.96) !important;
	backdrop-filter: blur(8px);
	border-bottom: 1px solid var(--erp-border);
	box-shadow: none;
	min-height: var(--erp-header-h);
	align-items: center;
	padding-left: 0.35rem;
	padding-right: 0.5rem;
}

body.erp-theme .main-header.navbar-erp .nav-link,
body.erp-theme #header_app.navbar-erp .nav-link {
	color: var(--erp-primary) !important;
	font-weight: 500;
	font-size: 0.86rem;
	padding: 0.4rem 0.65rem;
	border-radius: var(--erp-radius-sm);
	transition: background 0.15s ease, color 0.15s ease;
}

body.erp-theme .main-header.navbar-erp .nav-link:hover,
body.erp-theme #header_app.navbar-erp .nav-link:hover {
	color: var(--erp-action-dark) !important;
	background: var(--erp-sidebar-hover);
}

body.erp-theme .main-header.navbar-erp .form-control-navbar,
body.erp-theme #header_app.navbar-erp .form-control-navbar {
	background: var(--erp-surface);
	border: 1px solid var(--erp-border);
	color: var(--erp-text);
	border-radius: var(--erp-radius-sm);
	height: 34px;
	font-size: 0.84rem;
}

body.erp-theme .main-header.navbar-erp .form-control-navbar::placeholder {
	color: var(--erp-text-muted);
}

body.erp-theme .main-header.navbar-erp .navbar-nav .user-menu > .nav-link,
body.erp-theme #header_app.navbar-erp .navbar-nav .user-menu > .nav-link {
	color: var(--erp-primary) !important;
}

body.erp-theme #header_app .erp-rate-chip {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	background: var(--erp-action-soft) !important;
	color: var(--erp-action-dark) !important;
	border: 1px solid #c5e0de;
	border-radius: var(--erp-radius-sm);
	padding: 0.28rem 0.65rem !important;
	font-size: 0.78rem !important;
	font-weight: 600 !important;
	margin: 0 0.2rem;
	line-height: 1.2;
}

body.erp-theme #header_app .erp-rate-chip:hover {
	background: #d7eceb !important;
	color: var(--erp-action-dark) !important;
}

body.erp-theme #header_app .erp-rate-chip strong {
	font-weight: 700;
	letter-spacing: 0.02em;
}

body.erp-theme #header_app .user-image {
	width: 28px;
	height: 28px;
	object-fit: contain;
	background: #fff;
	border: 1px solid var(--erp-border);
	box-shadow: none !important;
}

body.erp-theme #header_app .btn-danger.btn-sm {
	border-radius: var(--erp-radius-sm);
	font-weight: 600;
	padding: 0.35rem 0.7rem;
}

/* --- Sidebar --- */
body.erp-theme .main-sidebar,
body.erp-theme .main-sidebar.erp-sidebar {
	background: #ffffff !important;
	border-right: 1px solid var(--erp-border);
	box-shadow: none;
}

body.erp-theme .erp-sidebar .brand-link {
	border-bottom: 1px solid var(--erp-border) !important;
	background: #ffffff !important;
	color: var(--erp-text) !important;
	min-height: var(--erp-header-h);
}

body.erp-theme .erp-sidebar .brand-text {
	font-family: var(--erp-display) !important;
	font-weight: 700 !important;
	letter-spacing: 0.02em;
	font-size: 0.95rem !important;
	color: var(--erp-primary) !important;
}

body.erp-theme .erp-sidebar .user-panel {
	border-bottom: 1px solid var(--erp-border);
	padding: 0.65rem 0.5rem !important;
	margin: 0.4rem 0.5rem 0.65rem !important;
}

body.erp-theme .erp-sidebar .user-panel .image img {
	width: 34px;
	height: 34px;
	object-fit: contain;
	background: #fff;
	border: 1px solid var(--erp-border);
	border-radius: 6px !important;
	box-shadow: none !important;
}

body.erp-theme .erp-sidebar .user-panel .info a,
body.erp-theme .erp-sidebar .user-panel .info {
	color: var(--erp-text) !important;
	font-weight: 600;
	font-size: 0.84rem;
}

body.erp-theme .erp-sidebar .nav-sidebar > .nav-item > .nav-link {
	border-radius: var(--erp-radius-sm);
	margin: 1px 8px;
	padding-top: 0.45rem;
	padding-bottom: 0.45rem;
	font-size: 0.84rem;
	font-weight: 500;
	color: var(--erp-primary-soft);
	transition: background 0.12s ease, color 0.12s ease;
}

body.erp-theme .erp-sidebar .nav-sidebar > .nav-item > .nav-link:hover:not(.bg-primary):not(.bg-red):not(.erp-nav-pos) {
	background: var(--erp-sidebar-hover) !important;
	color: var(--erp-text) !important;
}

body.erp-theme .erp-sidebar .nav-sidebar > .nav-item > .nav-link.active:not(.bg-primary):not(.bg-red):not(.erp-nav-pos),
body.erp-theme .erp-sidebar .nav-sidebar .menu-open > .nav-link:not(.bg-primary):not(.bg-red):not(.erp-nav-pos) {
	background: var(--erp-action-soft) !important;
	color: var(--erp-action-dark) !important;
	border-left: none;
	font-weight: 600;
	box-shadow: none;
}

body.erp-theme .erp-sidebar .nav-treeview > .nav-item > .nav-link {
	color: var(--erp-text-muted);
	border-radius: var(--erp-radius-sm);
	margin: 1px 8px 1px 12px;
}

body.erp-theme .erp-sidebar .nav-treeview > .nav-item > .nav-link:hover {
	background: var(--erp-sidebar-hover) !important;
	color: var(--erp-text) !important;
}

body.erp-theme .erp-sidebar .nav-treeview > .nav-item > .nav-link.active {
	background: var(--erp-action-soft) !important;
	color: var(--erp-action-dark) !important;
	font-weight: 600;
}

body.erp-theme .erp-sidebar .nav-icon {
	font-size: 0.92rem;
	color: var(--erp-text-muted);
	width: 1.35rem !important;
}

body.erp-theme .erp-sidebar .nav-link.active .nav-icon,
body.erp-theme .erp-sidebar .menu-open > .nav-link .nav-icon {
	color: var(--erp-action);
}

/* POS destacado — mismo tamaño que el resto; solo color */
body.erp-theme .erp-sidebar .nav-sidebar > .nav-item > .nav-link.bg-primary,
body.erp-theme .erp-sidebar .nav-sidebar > .nav-item > .nav-link.bg-red,
body.erp-theme .erp-sidebar .nav-sidebar > .nav-item > .nav-link.erp-nav-pos {
	background: var(--erp-action) !important;
	color: #fff !important;
	font-weight: 600;
	box-shadow: none !important;
	border: 0 !important;
	margin: 1px 8px !important;
	padding-top: 0.45rem !important;
	padding-bottom: 0.45rem !important;
	padding-left: 1rem !important;
	padding-right: 1rem !important;
}

body.erp-theme .erp-sidebar .nav-link.bg-primary .nav-icon,
body.erp-theme .erp-sidebar .nav-link.bg-primary p,
body.erp-theme .erp-sidebar .nav-link.bg-red .nav-icon,
body.erp-theme .erp-sidebar .nav-link.bg-red p,
body.erp-theme .erp-sidebar .nav-link.erp-nav-pos .nav-icon,
body.erp-theme .erp-sidebar .nav-link.erp-nav-pos p {
	color: #fff !important;
}

/* POS hover/active: solo oscurece, sin tocar caja */
body.erp-theme .erp-sidebar .nav-sidebar > .nav-item > .nav-link.bg-primary:hover,
body.erp-theme .erp-sidebar .nav-sidebar > .nav-item > .nav-link.bg-primary:focus,
body.erp-theme .erp-sidebar .nav-sidebar > .nav-item > .nav-link.bg-primary.active,
body.erp-theme .erp-sidebar .nav-sidebar > .nav-item > .nav-link.bg-red:hover,
body.erp-theme .erp-sidebar .nav-sidebar > .nav-item > .nav-link.bg-red:focus,
body.erp-theme .erp-sidebar .nav-sidebar > .nav-item > .nav-link.bg-red.active,
body.erp-theme .erp-sidebar .nav-sidebar > .nav-item > .nav-link.erp-nav-pos:hover,
body.erp-theme .erp-sidebar .nav-sidebar > .nav-item > .nav-link.erp-nav-pos:focus,
body.erp-theme .erp-sidebar .nav-sidebar > .nav-item > .nav-link.erp-nav-pos.active {
	background: var(--erp-action-dark) !important;
	color: #fff !important;
	box-shadow: none !important;
	border: 0 !important;
	margin: 1px 8px !important;
	padding-top: 0.45rem !important;
	padding-bottom: 0.45rem !important;
	padding-left: 1rem !important;
	padding-right: 1rem !important;
}

body.erp-theme .erp-sidebar .nav-sidebar > .nav-item > .nav-link.bg-primary:hover .nav-icon,
body.erp-theme .erp-sidebar .nav-sidebar > .nav-item > .nav-link.bg-primary:hover p,
body.erp-theme .erp-sidebar .nav-sidebar > .nav-item > .nav-link.bg-primary:focus .nav-icon,
body.erp-theme .erp-sidebar .nav-sidebar > .nav-item > .nav-link.bg-primary:focus p,
body.erp-theme .erp-sidebar .nav-sidebar > .nav-item > .nav-link.bg-primary.active .nav-icon,
body.erp-theme .erp-sidebar .nav-sidebar > .nav-item > .nav-link.bg-primary.active p,
body.erp-theme .erp-sidebar .nav-sidebar > .nav-item > .nav-link.bg-red:hover .nav-icon,
body.erp-theme .erp-sidebar .nav-sidebar > .nav-item > .nav-link.bg-red:hover p,
body.erp-theme .erp-sidebar .nav-sidebar > .nav-item > .nav-link.bg-red:focus .nav-icon,
body.erp-theme .erp-sidebar .nav-sidebar > .nav-item > .nav-link.bg-red:focus p,
body.erp-theme .erp-sidebar .nav-sidebar > .nav-item > .nav-link.bg-red.active .nav-icon,
body.erp-theme .erp-sidebar .nav-sidebar > .nav-item > .nav-link.bg-red.active p,
body.erp-theme .erp-sidebar .nav-sidebar > .nav-item > .nav-link.erp-nav-pos:hover .nav-icon,
body.erp-theme .erp-sidebar .nav-sidebar > .nav-item > .nav-link.erp-nav-pos:hover p,
body.erp-theme .erp-sidebar .nav-sidebar > .nav-item > .nav-link.erp-nav-pos:focus .nav-icon,
body.erp-theme .erp-sidebar .nav-sidebar > .nav-item > .nav-link.erp-nav-pos:focus p,
body.erp-theme .erp-sidebar .nav-sidebar > .nav-item > .nav-link.erp-nav-pos.active .nav-icon,
body.erp-theme .erp-sidebar .nav-sidebar > .nav-item > .nav-link.erp-nav-pos.active p {
	color: #fff !important;
}

/* Sidebar mini colapsado */
@media (min-width: 992px) {
	body.erp-theme.sidebar-mini.sidebar-collapse .main-sidebar:hover,
	body.erp-theme.sidebar-mini.sidebar-collapse .main-sidebar.sidebar-focused {
		background: #ffffff !important;
		box-shadow: 2px 0 12px rgba(36, 49, 64, 0.12);
		z-index: 1038;
	}

	body.erp-theme.sidebar-mini.sidebar-collapse .main-sidebar:hover .user-panel > .info,
	body.erp-theme.sidebar-mini.sidebar-collapse .main-sidebar:hover .nav-sidebar .nav-link p,
	body.erp-theme.sidebar-mini.sidebar-collapse .main-sidebar:hover .brand-text,
	body.erp-theme.sidebar-mini.sidebar-collapse .main-sidebar.sidebar-focused .user-panel > .info,
	body.erp-theme.sidebar-mini.sidebar-collapse .main-sidebar.sidebar-focused .nav-sidebar .nav-link p,
	body.erp-theme.sidebar-mini.sidebar-collapse .main-sidebar.sidebar-focused .brand-text {
		color: var(--erp-text) !important;
		width: auto !important;
	}

	body.erp-theme.sidebar-mini.sidebar-collapse .main-sidebar:hover .brand-text,
	body.erp-theme.sidebar-mini.sidebar-collapse .main-sidebar.sidebar-focused .brand-text {
		color: var(--erp-primary) !important;
	}

	body.erp-theme.sidebar-mini.sidebar-collapse .main-sidebar:hover .nav-sidebar > .nav-item > .nav-link,
	body.erp-theme.sidebar-mini.sidebar-collapse .main-sidebar.sidebar-focused .nav-sidebar > .nav-item > .nav-link {
		color: var(--erp-primary) !important;
	}

	body.erp-theme.sidebar-mini.sidebar-collapse .main-sidebar:hover .nav-sidebar > .nav-item > .nav-link .nav-icon,
	body.erp-theme.sidebar-mini.sidebar-collapse .main-sidebar.sidebar-focused .nav-sidebar > .nav-item > .nav-link .nav-icon {
		color: var(--erp-text-muted) !important;
	}

	body.erp-theme.sidebar-mini.sidebar-collapse .main-sidebar:hover .nav-treeview > .nav-item > .nav-link,
	body.erp-theme.sidebar-mini.sidebar-collapse .main-sidebar.sidebar-focused .nav-treeview > .nav-item > .nav-link {
		color: var(--erp-text-muted) !important;
	}

	body.erp-theme.sidebar-mini.sidebar-collapse .main-sidebar:hover .nav-sidebar > .nav-item > .nav-link:hover,
	body.erp-theme.sidebar-mini.sidebar-collapse .main-sidebar.sidebar-focused .nav-sidebar > .nav-item > .nav-link:hover {
		background: var(--erp-sidebar-hover) !important;
		color: var(--erp-text) !important;
	}

	body.erp-theme.sidebar-mini.sidebar-collapse .main-sidebar:hover .nav-sidebar .menu-open > .nav-link,
	body.erp-theme.sidebar-mini.sidebar-collapse .main-sidebar.sidebar-focused .nav-sidebar .menu-open > .nav-link,
	body.erp-theme.sidebar-mini.sidebar-collapse .main-sidebar:hover .nav-sidebar > .nav-item > .nav-link.active,
	body.erp-theme.sidebar-mini.sidebar-collapse .main-sidebar.sidebar-focused .nav-sidebar > .nav-item > .nav-link.active {
		background: var(--erp-action-soft) !important;
		color: var(--erp-action-dark) !important;
	}

	body.erp-theme.sidebar-mini.sidebar-collapse .main-sidebar:hover .nav-link.bg-white,
	body.erp-theme.sidebar-mini.sidebar-collapse .main-sidebar.sidebar-focused .nav-link.bg-white {
		background: var(--erp-surface) !important;
		color: var(--erp-primary) !important;
	}

	body.erp-theme.sidebar-mini.sidebar-collapse .main-sidebar:hover .nav-link.bg-red,
	body.erp-theme.sidebar-mini.sidebar-collapse .main-sidebar.sidebar-focused .nav-link.bg-red,
	body.erp-theme.sidebar-mini.sidebar-collapse .main-sidebar:hover .nav-link.bg-red p,
	body.erp-theme.sidebar-mini.sidebar-collapse .main-sidebar.sidebar-focused .nav-link.bg-red p {
		color: #fff !important;
	}
}

body.erp-theme .sidebar-light-primary .nav-sidebar > .nav-item > .nav-link.active {
	background: var(--erp-action-soft) !important;
	color: var(--erp-action-dark) !important;
}

body.erp-theme .sidebar-light-primary .nav-sidebar > .nav-item > .nav-link.active .nav-icon {
	color: var(--erp-action) !important;
}

/* --- Cards & KPIs --- */
body.erp-theme .card {
	border-radius: var(--erp-radius);
	border: 1px solid var(--erp-border);
	box-shadow: none;
	background: #ffffff;
}

body.erp-theme .card-header {
	background: #ffffff;
	border-bottom: 1px solid var(--erp-border);
	padding: 0.75rem 1rem;
}

body.erp-theme .card-title {
	font-family: var(--erp-display);
	font-size: 0.92rem;
	font-weight: 600;
	margin-bottom: 0;
	letter-spacing: -0.01em;
}

body.erp-theme .card-body {
	padding: 0.9rem 1rem;
}

body.erp-theme .info-box {
	border-radius: var(--erp-radius);
	box-shadow: none;
	border: 1px solid var(--erp-border);
	background: #ffffff;
	min-height: 84px;
}

body.erp-theme .info-box-icon {
	border-radius: var(--erp-radius) 0 0 var(--erp-radius);
	width: 72px;
	font-size: 1.65rem;
}

body.erp-theme .info-box-icon.bg-info,
body.erp-theme .info-box-icon.bg-primary,
body.erp-theme .info-box-icon.bg-success,
body.erp-theme .info-box-icon.bg-warning,
body.erp-theme .info-box-icon.bg-danger,
body.erp-theme .info-box-icon.bg-secondary,
body.erp-theme .info-box-icon.bg-gray,
body.erp-theme .info-box-icon.bg-navy,
body.erp-theme .info-box-icon.bg-indigo,
body.erp-theme .info-box-icon.bg-purple,
body.erp-theme .info-box-icon.bg-orange,
body.erp-theme .info-box-icon.bg-yellow,
body.erp-theme .info-box-icon.bg-blue,
body.erp-theme .info-box-icon.bg-teal {
	box-shadow: none;
}

body.erp-theme .info-box-text {
	font-size: 0.78rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	color: var(--erp-text-muted);
}

body.erp-theme .info-box-number {
	font-weight: 700;
	font-size: 1.35rem;
}

body.erp-theme .erp-section-title {
	font-size: 1.05rem;
	font-weight: 700;
	color: var(--erp-primary);
	margin-bottom: 0.75rem;
	padding-bottom: 0.5rem;
	border-bottom: 2px solid var(--erp-action);
	display: inline-block;
}

body.erp-theme .erp-section-title i {
	color: var(--erp-action);
	margin-right: 0.35rem;
}

/* --- Botones --- */
body.erp-theme .btn {
	border-radius: var(--erp-radius-sm);
	font-weight: 500;
	font-size: 0.86rem;
	letter-spacing: 0.01em;
	transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, color 0.15s ease;
	box-shadow: none;
}

body.erp-theme .btn-default,
body.erp-theme .btn-outline-secondary {
	background: #ffffff;
	border-color: var(--erp-border);
	color: var(--erp-text);
}

body.erp-theme .btn-default:hover,
body.erp-theme .btn-outline-secondary:hover {
	background: var(--erp-sidebar-hover);
	border-color: #d1d5db;
	color: var(--erp-text);
}

body.erp-theme .btn-primary {
	background-color: var(--erp-action);
	border-color: var(--erp-action-dark);
	font-weight: 600;
	border-radius: var(--erp-radius-sm);
	color: #fff;
}

body.erp-theme .btn-outline-primary {
	color: var(--erp-action-dark);
	border-color: var(--erp-action);
	background: transparent;
}

body.erp-theme .btn-outline-primary:hover {
	background: var(--erp-action);
	border-color: var(--erp-action-dark);
	color: #fff;
}

body.erp-theme .btn-primary:hover,
body.erp-theme .btn-primary:focus {
	background-color: var(--erp-action-dark);
	border-color: var(--erp-action-dark);
}

body.erp-theme .btn-warning {
	background-color: var(--erp-accent);
	border-color: var(--erp-accent-dark);
	color: #5c4518;
	font-weight: 600;
}

body.erp-theme .btn-info {
	background-color: var(--erp-action);
	border-color: var(--erp-action-dark);
	color: #fff;
	font-weight: 500;
}

body.erp-theme .btn-success {
	background-color: var(--erp-success);
	border-color: #4a8569;
	color: #fff;
	font-weight: 600;
}

body.erp-theme .btn-danger {
	background-color: var(--erp-danger);
	border-color: #a85a5a;
	color: #fff;
	font-weight: 600;
}

body.erp-theme .btn-secondary {
	background-color: #8a96a1;
	border-color: #73808c;
	color: #fff;
	font-weight: 500;
}

/* Botones de acción en tablas (todas las vistas) */
body.erp-theme table .btn,
body.erp-theme table .btn-sm,
body.erp-theme .table .btn,
body.erp-theme .table .btn-sm,
body.erp-theme .dataTable .btn,
body.erp-theme .dataTable .btn-sm {
	border-radius: 3px !important;
}

body.erp-theme table td .btn,
body.erp-theme .table td .btn,
body.erp-theme .dataTable td .btn {
	padding: 0.35rem 0.55rem;
	font-size: 0.9rem;
	line-height: 1.35;
	min-width: 2rem;
	min-height: 2rem;
}

/* Fondos sólidos AdminLTE → tonos serenos */
body.erp-theme .bg-primary { background-color: var(--erp-action) !important; }
body.erp-theme .bg-info { background-color: var(--erp-info) !important; }
body.erp-theme .bg-success { background-color: var(--erp-success) !important; }
body.erp-theme .bg-warning { background-color: var(--erp-accent) !important; color: #5c4518 !important; }
body.erp-theme .bg-danger { background-color: var(--erp-danger) !important; }
body.erp-theme .bg-secondary { background-color: #8a96a1 !important; }
body.erp-theme .bg-navy { background-color: #4a5d6e !important; }
body.erp-theme .bg-indigo { background-color: var(--erp-cont) !important; }
body.erp-theme .bg-purple { background-color: #8b7aad !important; }
body.erp-theme .bg-orange { background-color: #d08a5a !important; }
body.erp-theme .bg-teal { background-color: #5a9ea0 !important; }
body.erp-theme .bg-olive { background-color: #7a9560 !important; }
body.erp-theme .bg-gray { background-color: #9aa3ab !important; }
body.erp-theme .bg-gray-dark { background-color: #5a6670 !important; }
body.erp-theme .bg-lightblue { background-color: #7aa8c4 !important; }
body.erp-theme .bg-pink { background-color: #c98a9a !important; }
body.erp-theme .bg-maroon { background-color: #a86a72 !important; }
body.erp-theme .bg-lime { background-color: #8aaa6a !important; }
body.erp-theme .bg-fuchsia { background-color: #b07aa8 !important; }

body.erp-theme .info-box-icon.bg-info {
	background-color: var(--erp-info-soft) !important;
	color: var(--erp-info) !important;
}
body.erp-theme .info-box-icon.bg-primary {
	background-color: var(--erp-action-soft) !important;
	color: var(--erp-action-dark) !important;
}
body.erp-theme .info-box-icon.bg-success {
	background-color: var(--erp-success-soft) !important;
	color: var(--erp-success) !important;
}
body.erp-theme .info-box-icon.bg-warning {
	background-color: var(--erp-accent-soft) !important;
	color: var(--erp-accent-dark) !important;
}
body.erp-theme .info-box-icon.bg-danger {
	background-color: var(--erp-danger-soft) !important;
	color: var(--erp-danger) !important;
}
body.erp-theme .info-box-icon.bg-gray,
body.erp-theme .info-box-icon.bg-secondary {
	background-color: #eef0f2 !important;
	color: #6b7782 !important;
}
body.erp-theme .info-box-icon.bg-navy {
	background-color: #e8edf1 !important;
	color: var(--erp-primary) !important;
}
body.erp-theme .info-box-icon.bg-indigo,
body.erp-theme .info-box-icon.bg-purple {
	background-color: #eeedf7 !important;
	color: var(--erp-cont) !important;
}
body.erp-theme .info-box-icon.bg-orange,
body.erp-theme .info-box-icon.bg-yellow {
	background-color: var(--erp-warning-soft) !important;
	color: var(--erp-warning) !important;
}
body.erp-theme .info-box-icon.bg-blue,
body.erp-theme .info-box-icon.bg-lightblue {
	background-color: var(--erp-action-soft) !important;
	color: var(--erp-action) !important;
}
body.erp-theme .info-box-icon.bg-teal {
	background-color: #ccfbf1 !important;
	color: #0f766e !important;
}

body.erp-theme .badge-primary { background-color: var(--erp-action); }
body.erp-theme .badge-info { background-color: var(--erp-info); }
body.erp-theme .badge-success { background-color: var(--erp-success); }
body.erp-theme .badge-warning { background-color: var(--erp-accent); color: #5c4518; }
body.erp-theme .badge-danger { background-color: var(--erp-danger); }
body.erp-theme .badge-secondary { background-color: #8a96a1; }

/* --- Tablas --- */
body.erp-theme .table thead th {
	font-size: 0.72rem;
	font-weight: 650;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--erp-text-muted);
	border-bottom-width: 1px;
	border-color: var(--erp-border);
	background: #eef4f3;
	white-space: nowrap;
}

body.erp-theme .table-sm td,
body.erp-theme .table-sm th {
	padding: 0.45rem 0.65rem;
	vertical-align: middle;
}

body.erp-theme .table-striped tbody tr:nth-of-type(odd) {
	background-color: rgba(243, 246, 246, 0.55);
}

body.erp-theme .table-hover tbody tr:hover {
	background-color: var(--erp-action-soft);
}

body.erp-theme .table td,
body.erp-theme .table th {
	border-color: #e6eeed;
	vertical-align: middle;
	font-size: 0.875rem;
}

/* --- Alertas ERP --- */
.erp-alert {
	border-radius: var(--erp-radius);
	border-width: 1px;
	border-style: solid;
	font-size: 0.92rem;
	box-shadow: var(--erp-shadow);
}

.erp-alert .close {
	text-shadow: none;
	opacity: 0.85;
	color: inherit !important;
}

.erp-alert-link {
	color: inherit !important;
	text-decoration: underline;
	font-weight: 600;
}

.erp-alert-link:hover {
	opacity: 0.9;
	color: inherit !important;
}

.erp-alert--sunat-venta {
	background: #fef2f2 !important;
	border-color: #fecaca !important;
	color: #991b1b !important;
}

.erp-alert--sunat-nc {
	background: #eff6ff !important;
	border-color: #bfdbfe !important;
	color: #1e40af !important;
}

.erp-alert--sunat-guia {
	background: #fff7ed !important;
	border-color: #fed7aa !important;
	color: #c2410c !important;
}

.erp-alert--stock {
	background: #fef2f2 !important;
	border-color: #fca5a5 !important;
	color: #b91c1c !important;
	font-size: 0.95rem;
	box-shadow: var(--erp-shadow);
}

.erp-alert--cont-warn {
	background: #fff7ed !important;
	border-color: #fdba74 !important;
	color: #c2410c !important;
}

.erp-alert--cont-ok {
	background: #eef2ff !important;
	border-color: #c7d2fe !important;
	color: #4338ca !important;
}

.erp-alert--operativo {
	background: #f0f9ff !important;
	border-color: #7dd3fc !important;
	color: #0369a1 !important;
	margin-bottom: 0.75rem;
}

.erp-alert--sunat-venta .erp-alert-link,
.erp-alert--sunat-nc .erp-alert-link,
.erp-alert--sunat-guia .erp-alert-link,
.erp-alert--stock .erp-alert-link,
.erp-alert--cont-warn .erp-alert-link,
.erp-alert--cont-ok .erp-alert-link,
.erp-alert--operativo .erp-alert-link {
	color: inherit !important;
	font-weight: 700;
}

#dashboard_alertas_wrap {
	padding-top: 0.35rem;
}

#contenido {
	overflow-x: hidden;
	max-width: 100%;
}

#dashboard_alertas_wrap,
#dashboard_contabilidad_wrap,
#dashboard_kpis_taller,
#dashboard_kpis_ventas,
#dashboard_kpis_almacen,
#dashboard_complementos_wrap,
#dashboard_graficas_wrap,
.erp-dash-section,
.erp-dash-shell {
	max-width: 100%;
	overflow-x: hidden;
}

/* --- Fase 4: Dashboard / escritorio --- */
body.erp-theme .erp-dash-shell {
	display: flex;
	flex-direction: column;
	gap: 0.65rem;
	padding-bottom: 0.75rem;
}

body.erp-theme .erp-dash-banner-wrap {
	padding-left: 0;
	padding-right: 0;
}

body.erp-theme .erp-dash-banner {
	background:
		linear-gradient(135deg, rgba(15, 122, 120, 0.08) 0%, rgba(255, 255, 255, 0) 42%),
		var(--erp-surface);
	border: 1px solid var(--erp-border);
	border-radius: var(--erp-radius);
	box-shadow: var(--erp-shadow);
	padding: 0.9rem 1.1rem;
}

body.erp-theme .erp-dash-banner h5 {
	font-family: var(--erp-display);
	font-weight: 650;
	color: var(--erp-text);
	font-size: 1.08rem;
	letter-spacing: -0.01em;
}

body.erp-theme .erp-dash-banner h5 .fas {
	color: var(--erp-action);
	margin-right: 0.4rem;
}

body.erp-theme .erp-dash-banner small {
	font-size: 0.78rem;
	color: var(--erp-text-muted);
}

body.erp-theme .erp-dash-quicklinks {
	display: flex;
	flex-wrap: wrap;
	gap: 0.35rem;
	justify-content: flex-end;
}

body.erp-theme .erp-dash-quicklinks .btn {
	font-size: 0.76rem;
	font-weight: 600;
	border-radius: var(--erp-radius-sm);
	margin: 0 !important;
	padding: 0.28rem 0.65rem;
}

body.erp-theme .erp-dash-quicklinks .btn-outline-primary {
	color: var(--erp-action);
	border-color: rgba(15, 122, 120, 0.35);
}

body.erp-theme .erp-dash-quicklinks .btn-outline-primary:hover {
	background: var(--erp-action);
	border-color: var(--erp-action);
	color: #fff;
}

body.erp-theme .erp-dash-quicklinks .btn-danger {
	background: var(--erp-accent);
	border-color: var(--erp-accent);
}

body.erp-theme .erp-dash-quicklinks .btn-danger:hover {
	background: var(--erp-accent-dark);
	border-color: var(--erp-accent-dark);
}

body.erp-theme .erp-dash-section {
	margin-bottom: 0.15rem;
}

body.erp-theme .erp-dash-section-title {
	display: flex;
	align-items: center;
	gap: 0.4rem;
	font-family: var(--erp-display);
	font-weight: 650;
	font-size: 0.86rem;
	color: var(--erp-text);
	margin: 0 0 0.55rem 0;
	letter-spacing: -0.01em;
}

body.erp-theme .erp-dash-section-title .fas {
	font-size: 0.82rem;
}

body.erp-theme .erp-dash-section-title .text-primary,
body.erp-theme .erp-dash-section-title .text-indigo {
	color: var(--erp-action) !important;
}

body.erp-theme .erp-dash-section-title .text-warning {
	color: var(--erp-accent) !important;
}

body.erp-theme .erp-dash-section-title .text-secondary {
	color: var(--erp-text-muted) !important;
}

/* KPI cards */
body.erp-theme .erp-kpi,
body.erp-theme .erp-dash-section .info-box,
body.erp-theme .erp-cont-panel .info-box {
	display: flex;
	align-items: stretch;
	min-height: 74px;
	margin-bottom: 0.65rem;
	background: #fff;
	border: 1px solid var(--erp-border);
	border-radius: var(--erp-radius);
	box-shadow: none;
	overflow: hidden;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

body.erp-theme .erp-kpi:hover,
body.erp-theme .erp-dash-section .info-box:hover,
body.erp-theme .erp-cont-panel .info-box:hover {
	border-color: rgba(15, 122, 120, 0.35);
	box-shadow: 0 4px 14px rgba(15, 36, 48, 0.06);
}

body.erp-theme .erp-kpi-icon,
body.erp-theme .erp-dash-section .info-box-icon,
body.erp-theme .erp-cont-panel .info-box-icon {
	width: 52px;
	min-width: 52px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 1.15rem;
	color: #fff !important;
	border-radius: 0 !important;
	box-shadow: none !important;
}

body.erp-theme .erp-kpi-body,
body.erp-theme .erp-dash-section .info-box-content,
body.erp-theme .erp-cont-panel .info-box-content {
	padding: 0.55rem 0.75rem;
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 0.05rem;
	min-width: 0;
}

body.erp-theme .erp-kpi-label,
body.erp-theme .erp-dash-section .info-box-text,
body.erp-theme .erp-cont-panel .info-box-text {
	font-size: 0.68rem;
	font-weight: 650;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--erp-text-muted);
	line-height: 1.2;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

body.erp-theme .erp-kpi-value,
body.erp-theme .erp-dash-section .info-box-number,
body.erp-theme .erp-cont-panel .info-box-number {
	font-family: var(--erp-display);
	font-size: 1.15rem;
	font-weight: 700;
	color: var(--erp-text);
	line-height: 1.25;
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0.25rem 0.45rem;
}

body.erp-theme .erp-kpi-value small,
body.erp-theme .erp-kpi-meta,
body.erp-theme .erp-dash-section .info-box-number small,
body.erp-theme .erp-cont-panel .info-box-number small {
	font-family: var(--erp-font);
	font-size: 0.78rem !important;
	font-weight: 500;
	color: var(--erp-text-muted);
}

body.erp-theme .erp-kpi--action .erp-kpi-icon,
body.erp-theme .erp-dash-section .info-box-icon.bg-primary,
body.erp-theme .erp-dash-section .info-box-icon.bg-info,
body.erp-theme .erp-cont-panel .info-box-icon.bg-primary,
body.erp-theme .erp-cont-panel .info-box-icon.bg-info,
body.erp-theme .erp-cont-panel .info-box-icon.bg-teal {
	background: var(--erp-action) !important;
}

body.erp-theme .erp-kpi--success .erp-kpi-icon,
body.erp-theme .erp-dash-section .info-box-icon.bg-success,
body.erp-theme .erp-cont-panel .info-box-icon.bg-success {
	background: var(--erp-success) !important;
}

body.erp-theme .erp-kpi--warn .erp-kpi-icon,
body.erp-theme .erp-dash-section .info-box-icon.bg-warning,
body.erp-theme .erp-cont-panel .info-box-icon.bg-warning {
	background: var(--erp-accent) !important;
}

body.erp-theme .erp-kpi--danger .erp-kpi-icon,
body.erp-theme .erp-dash-section .info-box-icon.bg-danger,
body.erp-theme .erp-cont-panel .info-box-icon.bg-danger {
	background: var(--erp-danger) !important;
}

body.erp-theme .erp-kpi--muted .erp-kpi-icon,
body.erp-theme .erp-dash-section .info-box-icon.bg-secondary,
body.erp-theme .erp-dash-section .info-box-icon.bg-gray,
body.erp-theme .erp-cont-panel .info-box-icon.bg-secondary,
body.erp-theme .erp-cont-panel .info-box-icon.bg-light {
	background: #64748b !important;
	color: #fff !important;
}

body.erp-theme .erp-kpi-body a,
body.erp-theme .erp-dash-section .info-box-number a {
	color: var(--erp-action);
	font-weight: 600;
	font-size: 0.82rem;
}

/* Dashboard cards (charts / complementos / contable) */
body.erp-theme .erp-dash-card,
body.erp-theme .erp-dash-chart-card,
body.erp-theme .erp-esc-complementos .card,
body.erp-theme .erp-cont-panel .card {
	border: 1px solid var(--erp-border);
	border-radius: var(--erp-radius);
	box-shadow: none;
	background: #fff;
	overflow: hidden;
}

body.erp-theme .erp-dash-card .card-header,
body.erp-theme .erp-dash-chart-card .card-header,
body.erp-theme .erp-esc-complementos .card-header,
body.erp-theme .erp-cont-panel .card-header {
	background: #fff;
	border-bottom: 1px solid #eef2f7;
	padding: 0.65rem 0.85rem;
}

body.erp-theme .erp-dash-card .card-title,
body.erp-theme .erp-dash-chart-card .card-header .card-title,
body.erp-theme .erp-esc-complementos .card-title,
body.erp-theme .erp-cont-panel .card-title {
	font-family: var(--erp-display);
	font-size: 0.88rem;
	font-weight: 650;
	color: var(--erp-text);
	margin: 0;
}

body.erp-theme .erp-dash-card .card-body,
body.erp-theme .erp-dash-chart-card .card-body,
body.erp-theme .erp-esc-complementos .card-body,
body.erp-theme .erp-cont-panel .card-body {
	padding: 0.65rem 0.85rem;
}

body.erp-theme .erp-dash-chart-card .card-body {
	padding-top: 0.2rem;
}

body.erp-theme .erp-dash-card.card-outline,
body.erp-theme .erp-dash-chart-card.card-outline,
body.erp-theme .erp-esc-complementos .card-outline,
body.erp-theme .erp-cont-panel .card-outline {
	border-top: 1px solid var(--erp-border) !important;
}

body.erp-theme .erp-dash-card.card-outline.card-primary,
body.erp-theme .erp-dash-chart-card.card-outline.card-primary,
body.erp-theme .erp-esc-complementos .card-outline.card-primary,
body.erp-theme .erp-cont-panel .card-outline.card-primary {
	border-top: 2px solid var(--erp-action) !important;
}

body.erp-theme .erp-dash-card.card-outline.card-success,
body.erp-theme .erp-dash-chart-card.card-outline.card-success,
body.erp-theme .erp-cont-panel .card-outline.card-success {
	border-top: 2px solid var(--erp-success) !important;
}

body.erp-theme .erp-dash-card.card-outline.card-warning,
body.erp-theme .erp-dash-chart-card.card-outline.card-warning,
body.erp-theme .erp-cont-panel .card-outline.card-warning {
	border-top: 2px solid var(--erp-accent) !important;
}

body.erp-theme .erp-dash-card.card-outline.card-info,
body.erp-theme .erp-dash-chart-card.card-outline.card-info,
body.erp-theme .erp-cont-panel .card-outline.card-info {
	border-top: 2px solid var(--erp-action) !important;
}

body.erp-theme .erp-dash-card.card-outline.card-secondary,
body.erp-theme .erp-dash-chart-card.card-outline.card-secondary,
body.erp-theme .erp-esc-complementos .card-outline.card-secondary,
body.erp-theme .erp-cont-panel .card-outline.card-secondary {
	border-top: 2px solid #94a3b8 !important;
}

#dashboard_graficas_wrap [id^="chart_"],
#dashboard_contabilidad_wrap [id^="chart_"] {
	overflow: hidden;
	max-width: 100%;
}

body.erp-theme .erp-cont-panel {
	padding-top: 0.35rem;
}

body.erp-theme .erp-cont-dash-toolbar.card-header {
	background: #fff;
	border-bottom: 1px solid var(--erp-border);
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
	align-items: center;
	padding: 0.7rem 1rem;
}

body.erp-theme .erp-cont-dash-toolbar .btn {
	font-size: 0.78rem;
	font-weight: 600;
}

body.erp-theme {
	color-scheme: light;
	--highcharts-background-color: #ffffff;
	--highcharts-neutral-color-100: #243140;
	--highcharts-neutral-color-80: #4a5d6e;
	--highcharts-neutral-color-60: #5a6a7a;
	--highcharts-neutral-color-40: #8b9aab;
	--highcharts-neutral-color-20: #e8edf2;
	--highcharts-neutral-color-10: #f5f7fa;
	--highcharts-neutral-color-5: #fafbfc;
	--highcharts-neutral-color-3: #ffffff;
}

body.erp-theme .highcharts-background,
body.erp-theme .highcharts-plot-background,
body.erp-theme .highcharts-plot-border {
	fill: #ffffff !important;
}

body.erp-theme .highcharts-container {
	background: #ffffff !important;
}

/* --- Footer --- */
body.erp-theme .main-footer,
body.erp-theme .main-footer.bg-dark {
	background: #ffffff !important;
	border-top: 1px solid var(--erp-border);
	font-size: 0.78rem;
	color: var(--erp-text-muted) !important;
	padding: 0.7rem 1rem !important;
}

body.erp-theme .main-footer strong,
body.erp-theme .main-footer a,
body.erp-theme .main-footer a.text-white {
	color: var(--erp-text-muted) !important;
	font-weight: 500;
}

body.erp-theme .main-footer a:hover {
	color: var(--erp-action) !important;
}

/* --- Formularios, cabeceras de módulo y detalles --- */
body.erp-theme .content-header {
	padding: 1rem 1.15rem 0.45rem;
}

body.erp-theme .content-header h1 {
	font-family: var(--erp-display);
	font-size: 1.22rem;
	font-weight: 650;
	letter-spacing: -0.02em;
}

body.erp-theme .content-header h1 small {
	font-size: 0.78rem;
	font-weight: 500;
	color: var(--erp-text-muted);
	margin-left: 0.35rem;
}

body.erp-theme .breadcrumb {
	background: transparent;
	padding: 0;
	margin: 0;
	font-size: 0.78rem;
}

body.erp-theme .breadcrumb-item,
body.erp-theme .breadcrumb-item a {
	color: var(--erp-text-muted);
}

body.erp-theme .breadcrumb-item.active {
	color: var(--erp-text);
	font-weight: 500;
}

body.erp-theme .form-control,
body.erp-theme .custom-select,
body.erp-theme select.form-control,
body.erp-theme textarea.form-control {
	border-color: var(--erp-border);
	border-radius: var(--erp-radius-sm);
	color: var(--erp-text);
	font-size: 0.9rem;
	box-shadow: none;
	background-color: #ffffff;
}

body.erp-theme .form-control:focus,
body.erp-theme .custom-select:focus,
body.erp-theme select.form-control:focus,
body.erp-theme textarea.form-control:focus {
	border-color: var(--erp-action);
	box-shadow: 0 0 0 3px rgba(15, 122, 120, 0.16);
}

body.erp-theme .form-control::placeholder {
	color: #9aa3af;
}

body.erp-theme .input-group-text {
	background: #f8fafc;
	border-color: var(--erp-border);
	color: var(--erp-text-muted);
}

body.erp-theme .modal-content {
	border: 1px solid var(--erp-border);
	border-radius: var(--erp-radius);
	box-shadow: var(--erp-shadow-md);
}

/* --- Modales Bootstrap: cada uno fijo, independiente, con su propio scroll --- */
body.erp-theme.modal-open {
	overflow: hidden !important;
}

body.erp-theme .modal-backdrop {
	background-color: #020617;
}
body.erp-theme .modal-backdrop.show {
	opacity: 0.45;
}
/* Un solo velo: los backdrops extra no se apilan (pantalla negra) */
body.erp-theme.erp-modal-stacked-open .modal-backdrop.erp-modal-backdrop-nested,
body.erp-theme.erp-modal-stacked-open .modal-backdrop.show.erp-modal-backdrop-nested {
	opacity: 0 !important;
	background: transparent !important;
}
body.erp-theme.erp-modal-stacked-open .modal-backdrop,
body.erp-theme.erp-modal-stacked-open .modal:not(.erp-modal-stacked) {
	pointer-events: none !important;
}
body.erp-theme.erp-modal-stacked-open .modal:not(.erp-modal-stacked) > .modal-dialog {
	filter: brightness(0.92);
}
body.erp-theme.erp-modal-stacked-open .modal.erp-modal-stacked {
	pointer-events: auto !important;
}

body.erp-theme .modal,
body.erp-theme.modal-open .modal {
	position: fixed !important;
	top: 0 !important;
	right: 0 !important;
	bottom: 0 !important;
	left: 0 !important;
	width: 100% !important;
	height: 100% !important;
	max-height: 100vh !important;
	overflow-x: hidden !important;
	overflow-y: auto !important;
	overscroll-behavior: contain;
	-webkit-overflow-scrolling: touch;
	padding-right: 0 !important;
}

body.erp-theme .modal .modal-dialog {
	margin: 1.75rem auto;
	max-height: none;
	height: auto;
	display: block;
	pointer-events: auto;
}

body.erp-theme .modal-dialog.modal-xl,
body.erp-theme .modal-dialog.modal-lg {
	max-width: min(92vw, 1280px);
}

body.erp-theme .modal .modal-content {
	width: 100%;
	max-height: none;
	height: auto;
	display: block;
	overflow: visible;
}

body.erp-theme .modal .modal-content > br {
	display: none !important;
}

body.erp-theme .modal .modal-header,
body.erp-theme .modal .modal-footer {
	flex: 0 0 auto;
}

body.erp-theme .modal .modal-body {
	max-height: none;
	overflow: visible;
	flex: none;
	min-height: 0;
}

body.erp-theme .modal .erp-table-sticky-wrap,
body.erp-theme .modal .erp-doc-lines-wrap,
body.erp-theme .modal .erp-doc-lines-wrap.erp-table-sticky-wrap,
body.erp-theme .modal [id$="_detalle_tabla"],
body.erp-theme .modal [id$="_detalle_tabla_vis"],
body.erp-theme .modal [id*="_detalle_tabla"],
body.erp-theme .modal [id$="_tablaproductos"],
body.erp-theme .modal #div_tablaproductos,
body.erp-theme .modal .erp-selprod-table {
	max-height: none;
	height: auto;
	overflow-y: visible;
}

body.erp-theme .modal .table-responsive,
body.erp-theme .modal .erp-table-sticky-wrap .table-responsive,
body.erp-theme .modal .erp-doc-lines-wrap.erp-table-sticky-wrap {
	max-height: none;
	height: auto;
	overflow-x: auto;
	overflow-y: visible;
	-webkit-overflow-scrolling: touch;
}

body.erp-theme .modal.erp-modal-stacked > .modal-dialog > .modal-content {
	box-shadow: 0 18px 50px rgba(2, 6, 23, 0.45), 0 0 0 1px rgba(15, 23, 42, 0.12);
}

body.erp-theme .modal .erp-table-sticky-wrap {
	border: none !important;
	overflow-x: auto !important;
	overflow-y: visible !important;
}

body.erp-theme #contenido .modal-body[style*="padding:0"],
body.erp-theme #contenido .modal-body[style*="padding: 0"],
body.erp-theme .modal .modal-body[style*="padding:0"],
body.erp-theme .modal .modal-body[style*="padding: 0"] {
	padding: 0 !important;
}

/* Footer sticky dentro del body scrolleable — DESACTIVADO:
   quedaba “flotando” sobre el contenido. Los botones se fijan
   fuera del scroll vía erp_modal_pin_actions (JS). */
body.erp-theme .modal .modal-body .box-footer,
body.erp-theme .modal .modal-body .modal-footer,
body.erp-theme .modal .modal-body .erp-action-bar {
	position: relative !important;
	bottom: auto !important;
	z-index: auto;
	box-shadow: none;
}

/* Barra de acciones anclada al pie del modal (fuera del scroll) */
body.erp-theme .modal .modal-content > .box-footer,
body.erp-theme .modal .modal-content > .modal-footer,
body.erp-theme .modal .modal-content > .erp-action-bar,
body.erp-theme .modal .modal-content > .erp-modal-actions {
	flex: 0 0 auto !important;
	position: relative !important;
	bottom: auto !important;
	left: auto !important;
	right: auto !important;
	z-index: 6;
	width: 100%;
	margin: 0 !important;
	float: none !important;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: flex-end;
	gap: 8px;
	padding: 10px 16px !important;
	background: #ffffff !important;
	border-top: 1px solid var(--erp-border);
	box-shadow: 0 -2px 10px rgba(15, 23, 42, 0.06);
}

body.erp-theme .modal-header {
	background: #ffffff;
	border-bottom: 1px solid var(--erp-border);
	padding: 0.85rem 1.15rem;
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 0.5rem;
}

body.erp-theme .modal-title {
	font-family: var(--erp-display);
	font-weight: 650;
	font-size: 1.05rem;
	letter-spacing: -0.015em;
	color: var(--erp-text);
	margin: 0;
	line-height: 1.35;
	flex: 1 1 auto;
}

body.erp-theme .modal-footer {
	background: #ffffff;
	border-top: 1px solid var(--erp-border);
}

body.erp-theme .dropdown-menu {
	border: 1px solid var(--erp-border);
	border-radius: var(--erp-radius-sm);
	box-shadow: var(--erp-shadow-md);
	padding: 0.35rem;
}

body.erp-theme .dropdown-item {
	border-radius: 5px;
	font-size: 0.86rem;
}

body.erp-theme .dropdown-item:hover,
body.erp-theme .dropdown-item:focus {
	background: var(--erp-action-soft);
	color: var(--erp-action-dark);
}

body.erp-theme .select2-container--bootstrap4 .select2-selection {
	border-color: var(--erp-border) !important;
	border-radius: var(--erp-radius-sm) !important;
}

body.erp-theme .page-item.active .page-link {
	background-color: var(--erp-action);
	border-color: var(--erp-action);
}

body.erp-theme .page-link {
	color: var(--erp-action-dark);
}

body.erp-theme .nav-pills .nav-link.active {
	background-color: var(--erp-action);
}

body.erp-theme .brand-image {
	box-shadow: none !important;
	opacity: 1 !important;
}

body.erp-theme .erp-sidebar .brand-text {
	letter-spacing: 0.04em;
	font-size: 0.92rem !important;
}

body.erp-theme .user-panel img {
	box-shadow: none !important;
}

body.erp-theme .elevation-1 {
	box-shadow: var(--erp-shadow) !important;
}

body.erp-theme .elevation-2,
body.erp-theme .elevation-3 {
	box-shadow: var(--erp-shadow-md) !important;
}

/* --- Badges estado --- */
body.erp-theme .badge-erp-pendiente { background: var(--erp-accent-soft); color: #92400e; border: 1px solid #fcd34d; }
body.erp-theme .badge-erp-proceso { background: var(--erp-action); color: #fff; }
body.erp-theme .badge-erp-ok { background: var(--erp-success); color: #fff; }
body.erp-theme .badge-erp-anulado { background: #94a3b8; color: #fff; }

/* --- Preloader --- */
body.erp-theme .preloader {
	background: var(--erp-bg);
}

/* --- Barra de acciones --- */
.erp-form-with-actionbar {
	padding-bottom: 72px;
}

.erp-action-bar {
	position: sticky;
	bottom: 0;
	left: 0;
	right: 0;
	z-index: 1040;
	background: #ffffff;
	border-top: 1px solid var(--erp-border);
	box-shadow: 0 -4px 16px rgba(15, 23, 42, 0.06);
	padding: 10px 16px;
	margin: 0 -1px;
}

.erp-action-bar-inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	max-width: 100%;
}

.erp-action-bar-inner .erp-action-bar-main {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin-left: auto;
}

.erp-action-bar .btn-lg-action {
	font-weight: 600;
	min-width: 130px;
}

.erp-action-bar .erp-print-toggle {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 0.88rem;
	color: var(--erp-text-muted);
	cursor: pointer;
	user-select: none;
	margin-right: 4px;
}

.erp-action-bar .erp-print-toggle input {
	cursor: pointer;
}

/* --- Formularios universales (fase 3 — todo #contenido) --- */
/* (shell de modal con scroll: ver bloque “Modales: altura de pantalla” arriba) */

body.erp-theme #contenido .modal-header.bg-primary,
body.erp-theme #contenido .modal-header.bg-info,
body.erp-theme #contenido .modal-header.bg-success,
body.erp-theme #contenido .modal-header.bg-warning,
body.erp-theme #contenido .modal-header.erp-doc-form-header,
body.erp-theme #contenido .card-header.bg-primary,
body.erp-theme #contenido .card-header.bg-info,
body.erp-theme #contenido .box-header.bg-primary {
	background: #ffffff !important;
	border-bottom: 1px solid var(--erp-border);
	color: var(--erp-text) !important;
}

body.erp-theme #contenido .modal-header.bg-primary,
body.erp-theme #contenido .modal-header.bg-info,
body.erp-theme #contenido .modal-header.bg-success,
body.erp-theme #contenido .modal-header.erp-doc-form-header {
	padding: 0.85rem 1rem;
}

body.erp-theme #contenido .modal-header.bg-primary .modal-title,
body.erp-theme #contenido .modal-header.bg-primary .text-white,
body.erp-theme #contenido .modal-header.bg-primary label,
body.erp-theme #contenido .card-header.bg-primary .card-title,
body.erp-theme #contenido .card-header.bg-primary .text-white {
	color: var(--erp-text) !important;
}

body.erp-theme #contenido .modal-header .close {
	color: var(--erp-text-muted);
	opacity: 0.75;
	text-shadow: none;
}

body.erp-theme #contenido .erp-doc-form-title,
body.erp-theme #contenido h3.erp-doc-form-title,
body.erp-theme #contenido .modal-body > .col-lg-12 > .row h3,
body.erp-theme #contenido form > .row h3,
body.erp-theme #contenido .card > .card-header h3 {
	font-family: var(--erp-display);
	font-size: 1.05rem;
	font-weight: 650;
	color: var(--erp-text);
	letter-spacing: -0.015em;
	margin: 0 0 0.35rem;
}

body.erp-theme #contenido .modal-body > .modal-body {
	padding: 0.75rem 1rem !important;
}

body.erp-theme #contenido form label:not(.erp-print-toggle):not(.custom-control-label):not(.form-check-label):not(.btn),
body.erp-theme #contenido #fieldset_producto label:not(.erp-print-toggle):not(.btn),
body.erp-theme #contenido .modal-body label:not(.erp-print-toggle):not(.custom-control-label):not(.form-check-label):not(.btn),
body.erp-theme #contenido .div_cotizacion_form label:not(.erp-print-toggle):not(.btn),
body.erp-theme #contenido .erp-doc-product-toolbar label:not(.erp-print-toggle):not(.btn) {
	font-size: 0.72rem !important;
	font-weight: 650 !important;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--erp-text-muted) !important;
	margin-bottom: 0.28rem !important;
	display: block;
	line-height: 1.2 !important;
}

body.erp-theme #contenido .nav-tabs-custom,
body.erp-theme #contenido .card-tabs .nav-tabs {
	border: 1px solid var(--erp-border);
	border-radius: var(--erp-radius-sm);
	background: #fff;
	margin-bottom: 0.65rem;
	box-shadow: none;
}

body.erp-theme #contenido .nav-tabs-custom > .nav-tabs,
body.erp-theme #contenido .card-tabs > .nav-tabs {
	border-bottom: 1px solid var(--erp-border);
	padding: 0.35rem 0.5rem 0;
	background: #f8fafc;
	border-radius: var(--erp-radius-sm) var(--erp-radius-sm) 0 0;
}

body.erp-theme #contenido .nav-tabs-custom > .nav-tabs .nav-link,
body.erp-theme #contenido .card-tabs > .nav-tabs .nav-link {
	border: none;
	border-radius: var(--erp-radius-sm) var(--erp-radius-sm) 0 0;
	font-size: 0.82rem;
	font-weight: 600;
	color: var(--erp-text-muted);
	padding: 0.45rem 0.85rem;
	margin-bottom: -1px;
}

body.erp-theme #contenido .nav-tabs-custom > .nav-tabs .nav-link.active,
body.erp-theme #contenido .card-tabs > .nav-tabs .nav-link.active {
	color: var(--erp-action-dark);
	background: #fff;
	border-bottom: 2px solid var(--erp-action);
}

body.erp-theme #contenido .nav-tabs-custom > .tab-content,
body.erp-theme #contenido .card-tabs > .tab-content {
	padding: 0.75rem 0.85rem 0.5rem;
}

body.erp-theme #contenido .erp-doc-form .card,
body.erp-theme #contenido form .card.card-outline,
body.erp-theme #contenido form .card.card-default {
	border-color: var(--erp-border);
	box-shadow: none;
	border-radius: var(--erp-radius-sm);
}

body.erp-theme #contenido .erp-doc-product-toolbar,
body.erp-theme #contenido .div_pro.card,
body.erp-theme #contenido .card.card-primary.div_pro,
body.erp-theme #contenido #fieldset_producto.card-body,
body.erp-theme #contenido .card.card-default:has(#fieldset_producto),
body.erp-theme #contenido .card:has(#fieldset_producto) {
	border: 1px solid var(--erp-border) !important;
	border-radius: var(--erp-radius-sm);
	background: #f8fafc;
	box-shadow: none !important;
	margin-bottom: 0.65rem;
}

body.erp-theme #contenido .erp-doc-product-toolbar .card-body,
body.erp-theme #contenido .div_pro.card .card-body,
body.erp-theme #contenido .card.card-primary.div_pro .card-body {
	background: transparent;
	padding: 0.75rem 0.85rem;
}

body.erp-theme #contenido form .row:has(.form-control),
body.erp-theme #contenido form .row:has(select),
body.erp-theme #contenido .erp-doc-fields-row,
body.erp-theme #contenido #fieldset_producto .row,
body.erp-theme #contenido .erp-doc-product-toolbar .row {
	align-items: flex-start;
}

/* Cliente | Datos generales / Proveedor | Datos generales: alinear arriba */
body.erp-theme #contenido form .row.erp-doc-side-panels,
body.erp-theme #contenido form .row:has(> [class*="col-"] > .nav-tabs-custom),
body.erp-theme #contenido .erp-doc-fields-row:has(> [class*="col-"] > .nav-tabs-custom),
body.erp-theme #contenido form .row:has(> [class*="col-"] > .card),
body.erp-theme .modal form .row.erp-doc-side-panels,
body.erp-theme .modal form .row:has(> [class*="col-"] > .nav-tabs-custom),
body.erp-theme .modal .erp-doc-form .row:has(> [class*="col-"] > .nav-tabs-custom),
body.erp-theme .modal .row:has(> [class*="col-"] > .nav-tabs-custom),
body.erp-theme .modal .row:has(> [class*="col-"] > .box),
body.erp-theme .modal .row:has(> [class*="col-"] > .card),
body.erp-theme #for_ven > .col-lg-12 > .row.erp-doc-side-panels,
body.erp-theme form[id^="for_ven"] > .col-lg-12 > .row.erp-doc-side-panels,
body.erp-theme form[id^="for_com"] > .row.erp-doc-side-panels,
body.erp-theme form[id^="for_com"] > .row.erp-com-top-panels,
body.erp-theme form#for_com > .row.erp-doc-side-panels,
body.erp-theme form#for_com > .row.erp-com-top-panels,
body.erp-theme #for_com > .row.erp-doc-side-panels,
body.erp-theme #for_com > .row.erp-com-top-panels {
	align-items: flex-start !important;
}

/* --- Formularios en modales: headers = patrón Compras --- */
body.erp-theme .modal .modal-header,
body.erp-theme .modal .modal-header.erp-doc-form-header,
body.erp-theme .modal .modal-header.bg-primary,
body.erp-theme .modal .modal-header.bg-info,
body.erp-theme .modal .modal-header.bg-success,
body.erp-theme .modal .modal-header.bg-warning,
body.erp-theme .modal .box-header,
body.erp-theme .modal .box-header.with-border,
body.erp-theme .modal .erp-doc-form > .box-header,
body.erp-theme .modal .erp-doc-form-header,
body.erp-theme .modal-body > .modal-header,
body.erp-theme .modal-body > form > .box-header,
body.erp-theme .modal-body > .box-header,
body.erp-theme .modal-body > .col-lg-12 > .modal-header {
	display: flex !important;
	align-items: center !important;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 0.5rem;
	background: #ffffff !important;
	border-bottom: 1px solid var(--erp-border) !important;
	padding: 0.85rem 1.15rem !important;
	margin: 0 !important;
	width: 100%;
	float: none !important;
	color: var(--erp-text) !important;
	border-radius: 0;
	min-height: 3.1rem;
}

body.erp-theme .modal .modal-header .modal-title,
body.erp-theme .modal .modal-header h3,
body.erp-theme .modal .modal-header h4,
body.erp-theme .modal .modal-header h5,
body.erp-theme .modal .box-header .box-title,
body.erp-theme .modal .box-header h3,
body.erp-theme .modal .box-title,
body.erp-theme .modal .erp-doc-form-title,
body.erp-theme .modal h3.erp-doc-form-title {
	font-family: var(--erp-display) !important;
	font-size: 1.05rem !important;
	font-weight: 650 !important;
	letter-spacing: -0.015em;
	color: var(--erp-text) !important;
	margin: 0 !important;
	padding: 0 !important;
	line-height: 1.35 !important;
	flex: 1 1 auto;
	text-transform: none;
}

body.erp-theme .modal .modal-header .erp-print-toggle {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin-left: auto;
	margin-right: 0.25rem;
	color: var(--erp-text-muted);
	font-size: 0.85rem;
	font-weight: 600;
	white-space: nowrap;
	flex: 0 0 auto;
	cursor: pointer;
	user-select: none;
}

body.erp-theme .modal .modal-header .erp-print-toggle + .close {
	margin-left: 0;
}

body.erp-theme .modal .modal-header .close,
body.erp-theme .modal .box-header .close,
body.erp-theme .modal .erp-doc-form-header .close {
	padding: 0.35rem 0.5rem;
	margin: 0 -0.25rem 0 0;
	font-size: 1.5rem;
	font-weight: 400;
	line-height: 1;
	color: var(--erp-text-muted);
	opacity: 0.75;
	text-shadow: none;
	align-self: center;
	flex: 0 0 auto;
}

body.erp-theme .modal .modal-header .close:hover,
body.erp-theme .modal .box-header .close:hover {
	opacity: 1;
	color: var(--erp-text);
}

body.erp-theme .modal .modal-header .text-white,
body.erp-theme .modal .modal-header label.text-white {
	color: var(--erp-text-muted) !important;
}

body.erp-theme .modal .box-body,
body.erp-theme .modal .erp-doc-form .box-body {
	padding: 0.85rem 1rem 0.35rem;
	background: #fff;
}

body.erp-theme .modal form .form-group,
body.erp-theme .modal .box-body .form-group,
body.erp-theme .modal .erp-doc-form .form-group {
	margin-bottom: 0;
}

body.erp-theme .modal form .row,
body.erp-theme .modal .box-body .row,
body.erp-theme .modal .tab-pane .row,
body.erp-theme .modal .erp-doc-form .row,
body.erp-theme .modal .card-body .row {
	align-items: flex-end;
}

/* Filas con paneles/tabs lado a lado: alinear arriba (evita hueco / Datos generales abajo) */
body.erp-theme .modal form .row:has(.nav-tabs-custom),
body.erp-theme .modal .erp-doc-form .row:has(.nav-tabs-custom),
body.erp-theme .modal .row:has(> [class*="col-"] > .nav-tabs-custom),
body.erp-theme .modal .row:has(> [class*="col-"] > .box),
body.erp-theme .modal .row:has(> [class*="col-"] > .card),
body.erp-theme .modal .row.erp-doc-side-panels {
	align-items: flex-start !important;
}

body.erp-theme .modal form [class*="col-"],
body.erp-theme .modal .box-body [class*="col-"],
body.erp-theme .modal .tab-pane [class*="col-"],
body.erp-theme .modal .erp-doc-form [class*="col-"],
body.erp-theme .modal .card-body [class*="col-"] {
	margin-bottom: 0.75rem;
}

/* Wrappers de layout no deben sumar margen extra */
body.erp-theme .modal form > [class*="col-"],
body.erp-theme .modal .erp-form-with-actionbar,
body.erp-theme .modal .erp-form-with-actionbar > [class*="col-"],
body.erp-theme .modal .erp-form-with-actionbar > form > [class*="col-"] {
	margin-bottom: 0 !important;
}

body.erp-theme .modal form .form-control,
body.erp-theme .modal .box-body .form-control,
body.erp-theme .modal select.form-control {
	border-radius: var(--erp-radius-sm);
	font-size: 0.9rem;
	min-height: calc(1.5em + 0.75rem + 2px);
}

body.erp-theme .modal .input-group {
	align-items: stretch;
	flex-wrap: nowrap;
}

body.erp-theme .modal .input-group .form-control {
	min-height: calc(1.5em + 0.75rem + 2px);
}

body.erp-theme .modal .input-group .btn,
body.erp-theme .modal .input-group .btn-flat,
body.erp-theme .modal .input-group-append .btn,
body.erp-theme .modal .input-group-prepend .btn,
body.erp-theme .modal .input-group > .btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: calc(1.5em + 0.75rem + 2px);
	padding-top: 0.375rem;
	padding-bottom: 0.375rem;
}

body.erp-theme .modal [style*="padding-top:30px"],
body.erp-theme .modal [style*="padding-top: 30px"],
body.erp-theme .modal .erp-filter-btn-col {
	padding-top: 0 !important;
	margin-top: 0 !important;
	margin-bottom: 0 !important;
	display: flex !important;
	flex-direction: row !important;
	flex-wrap: wrap !important;
	justify-content: flex-start !important;
	align-items: center !important;
	align-self: flex-start !important;
	gap: 0.4rem !important;
	white-space: nowrap !important;
	min-height: 0 !important;
}

/* Si jQuery hizo .hide(), no dejar que erp-filter-btn-col fuerce display:flex */
body.erp-theme .modal .erp-filter-btn-col[style*="display: none"],
body.erp-theme .modal .erp-filter-btn-col[style*="display:none"],
body.erp-theme .erp-filter-btn-col[style*="display: none"],
body.erp-theme .erp-filter-btn-col[style*="display:none"],
body.erp-theme .div_direccioncombo[style*="display: none"],
body.erp-theme .div_direccioncombo[style*="display:none"],
body.erp-theme .div_direcciontext[style*="display: none"],
body.erp-theme .div_direcciontext[style*="display:none"] {
	display: none !important;
}

body.erp-theme .modal .erp-filter-label-spacer {
	display: none !important;
	margin: 0 !important;
	padding: 0 !important;
	height: 0 !important;
	overflow: hidden;
}

body.erp-theme #contenido form [style*="padding-top:30px"],
body.erp-theme #contenido form [style*="padding-top: 30px"],
body.erp-theme #contenido .erp-doc-form [style*="padding-top:30px"],
body.erp-theme #contenido .erp-doc-form [style*="padding-top: 30px"],
body.erp-theme #contenido .erp-doc-form .erp-filter-btn-col,
body.erp-theme #contenido form .erp-filter-btn-col {
	padding-top: 0 !important;
	margin-top: 0 !important;
	margin-bottom: 0 !important;
	display: flex !important;
	flex-direction: row !important;
	flex-wrap: wrap !important;
	justify-content: flex-start !important;
	align-items: center !important;
	align-self: flex-start !important;
	gap: 0.4rem !important;
	white-space: nowrap !important;
	min-height: 0 !important;
}

body.erp-theme #contenido .erp-doc-lines-wrap {
	margin-bottom: 0.5rem;
}

body.erp-theme #contenido .erp-doc-lines-wrap.erp-table-sticky-wrap {
	max-height: min(42vh, 380px);
}

body.erp-theme #contenido .erp-doc-lines-table {
	margin-bottom: 0;
	font-size: 0.82rem;
}

body.erp-theme #contenido .erp-doc-lines-table thead th {
	font-size: 0.68rem;
	padding: 0.45rem 0.35rem;
	white-space: nowrap;
}

body.erp-theme #contenido .erp-doc-lines-table tbody td {
	padding: 0.35rem 0.4rem;
	vertical-align: middle;
}

body.erp-theme #contenido .erp-doc-totals {
	background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
	border: 1px solid var(--erp-border);
	border-radius: var(--erp-radius-sm);
	padding: 0.65rem 0.85rem;
	margin-top: 0.5rem;
	margin-bottom: 0.25rem;
	align-items: flex-end;
}

body.erp-theme #contenido .erp-doc-totals .form-control,
body.erp-theme #contenido .erp-doc-totals input[type="text"] {
	text-align: right;
	font-weight: 700;
	font-size: 0.92rem;
	background: #fff;
	border-color: var(--erp-border);
}

body.erp-theme #contenido .erp-doc-totals [id$="_tot"]:not([type="hidden"]),
body.erp-theme #contenido .erp-doc-totals input[id*="txt_"][id*="tot"] {
	color: var(--erp-action-dark);
	font-size: 1rem;
	border-color: var(--erp-action);
	background: #fff;
}

body.erp-theme #contenido .box-footer,
body.erp-theme #contenido .box-footer.float-right,
body.erp-theme #contenido .modal-footer {
	position: sticky;
	bottom: 0;
	left: 0;
	right: 0;
	z-index: 1040;
	background: #ffffff;
	border-top: 1px solid var(--erp-border);
	box-shadow: 0 -4px 16px rgba(15, 23, 42, 0.06);
	padding: 10px 16px !important;
	margin: 0 !important;
	float: none !important;
	width: 100%;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: flex-end;
	gap: 8px;
}

/* En modales: nunca sticky encima del contenido */
body.erp-theme #contenido .modal .box-footer,
body.erp-theme #contenido .modal .box-footer.float-right,
body.erp-theme #contenido .modal .modal-footer,
body.erp-theme #contenido .modal .erp-action-bar {
	position: relative !important;
	bottom: auto !important;
	left: auto !important;
	right: auto !important;
	z-index: auto;
	box-shadow: none;
}

body.erp-theme #contenido .modal .modal-content > .box-footer,
body.erp-theme #contenido .modal .modal-content > .modal-footer,
body.erp-theme #contenido .modal .modal-content > .erp-action-bar,
body.erp-theme #contenido .modal .modal-content > .erp-modal-actions {
	box-shadow: 0 -2px 10px rgba(15, 23, 42, 0.06) !important;
	z-index: 6;
}

body.erp-theme #contenido .box-footer .btn,
body.erp-theme #contenido .modal-footer .btn,
body.erp-theme #contenido .erp-action-bar .btn {
	font-weight: 600;
}

/* Stockalerta — configuración */
body.erp-theme #div_stockalerta_config_dialog .modal-content {
	max-height: none !important;
	display: block !important;
	overflow: visible !important;
}

body.erp-theme #div_stockalerta_config_dialog .modal-body.div_stockalerta_config {
	overflow: visible !important;
	max-height: none !important;
	padding: 0 !important;
}

body.erp-theme #div_stockalerta_config_dialog .erp-stockalerta-preview {
	width: 100%;
	height: 280px;
	overflow-y: auto;
	border: 1px solid var(--erp-border);
	padding: 10px;
	background: #fff;
	border-radius: var(--erp-radius-sm);
}

body.erp-theme #div_stockalerta_config_dialog .erp-stockalerta-preview table {
	max-width: 100%;
}

/* --- Modal seleccionar productos: scrollea el overlay (Bootstrap), no la página --- */
body.erp-theme #div_productomarca_form_dialog {
	padding: 0 !important;
	overflow-x: hidden !important;
	overflow-y: auto !important;
}

body.erp-theme #div_productomarca_form_dialog .modal-dialog {
	width: min(96vw, 1280px);
	max-width: 1280px;
	height: auto !important;
	max-height: none !important;
	margin: 0.75rem auto 2rem;
	display: block;
}

body.erp-theme #div_productomarca_form_dialog .modal-content {
	height: auto !important;
	max-height: none !important;
	display: block !important;
	overflow: visible !important;
	border-radius: var(--erp-radius);
}

body.erp-theme #div_productomarca_form_dialog .modal-content > br {
	display: none !important;
}

body.erp-theme #div_productomarca_form_dialog .modal-body.div_productomarca_form {
	display: block !important;
	min-height: 0;
	height: auto !important;
	max-height: none !important;
	overflow: visible !important;
	padding: 0 !important;
	padding-bottom: 0 !important;
	background: #fff;
}

body.erp-theme #div_productomarca_form_dialog .div_productomarca_form > .modal-header,
body.erp-theme #div_productomarca_form_dialog .erp-selprod-head {
	flex: 0 0 auto !important;
	margin: 0;
	position: relative;
	z-index: 3;
}

body.erp-theme #div_productomarca_form_dialog .erp-selprod-vis {
	min-width: 160px;
	max-width: 220px;
}

body.erp-theme #div_productomarca_form_dialog .div_productomarca_form > #div_tablatotales {
	flex: 0 0 auto;
	padding: 0 0.85rem;
}

/* Filtros fijos: no scrollean ni se ocultan al enfocar cantidad */
body.erp-theme #div_productomarca_form_dialog .erp-selprod-filters {
	flex: 0 0 auto !important;
	display: flex !important;
	flex-wrap: wrap;
	align-items: flex-end;
	align-content: flex-start;
	margin: 0 !important;
	padding: 0.55rem 0.85rem 0.35rem !important;
	width: 100%;
	overflow: visible !important;
	min-height: auto !important;
	max-height: none !important;
	position: relative;
	z-index: 2;
	background: #fff;
	border-bottom: 1px solid #eef2f7;
}

body.erp-theme #div_productomarca_form_dialog .erp-selprod-filters > [class*="col-"] {
	margin-bottom: 0.45rem;
}

body.erp-theme #div_productomarca_form_dialog .div_productomarca_form > .row > [style*="height:10px"],
body.erp-theme #div_productomarca_form_dialog .div_productomarca_form > [style*="height:10px"] {
	display: none !important;
}

/* Lista de productos: sin scroll interno */
body.erp-theme #div_productomarca_form_dialog #div_tablaproductos,
body.erp-theme #div_productomarca_form_dialog .erp-selprod-table {
	flex: none !important;
	width: 100%;
	max-width: 100%;
	min-height: 0 !important;
	height: auto !important;
	max-height: none !important;
	overflow: visible !important;
	margin: 0;
	padding: 0;
	border: none;
	border-top: 1px solid var(--erp-border);
	background: #fff;
	position: relative;
	z-index: 1;
}

body.erp-theme #div_productomarca_form_dialog #div_tablaproductos .table-responsive,
body.erp-theme #div_productomarca_form_dialog #div_tablaproductos #tabla_producto_wrap,
body.erp-theme #div_productomarca_form_dialog #div_tablaproductos > .col-lg-12,
body.erp-theme #div_productomarca_form_dialog #div_tablaproductos > div {
	height: auto !important;
	max-height: none !important;
	overflow-x: auto !important;
	overflow-y: visible !important;
	margin: 0;
	padding: 0;
}

body.erp-theme #div_productomarca_form_dialog #div_tablaproductos table {
	margin-bottom: 0;
}

body.erp-theme #div_productomarca_form_dialog #div_tablaproductos thead th {
	position: sticky;
	top: 0;
	z-index: 2;
	background: #f8fafc;
	box-shadow: 0 1px 0 var(--erp-border);
}

body.erp-theme #div_productomarca_form_dialog .modal-footer,
body.erp-theme #div_productomarca_form_dialog .erp-selprod-foot {
	flex: 0 0 auto !important;
	margin-top: 0 !important;
	float: none !important;
	width: 100%;
	border-top: 1px solid var(--erp-border);
	background: #fff;
	position: relative;
	z-index: 3;
}

body.erp-theme #div_productomarca_form_dialog .erp-selprod-filters.erp-doc-fields-row,
body.erp-theme #div_productomarca_form_dialog .erp-selprod-body {
	align-items: flex-end !important;
	overflow: visible !important;
}

body.erp-theme #contenido .col-lg-12:has(> .box-footer),
body.erp-theme #contenido .col-lg-12:has(> .erp-action-bar),
body.erp-theme #contenido .card:has(> .box-footer),
body.erp-theme #contenido .erp-form-with-actionbar:not(.modal-body):not(.div_productomarca_form) {
	padding-bottom: 72px;
}

/* Modal body no necesita padding fantasma: el footer sale del scroll */
body.erp-theme #contenido .modal-body:has(.box-footer),
body.erp-theme #contenido .modal-body:has(.modal-footer),
body.erp-theme #contenido .modal-body.erp-form-with-actionbar,
body.erp-theme #div_productomarca_form_dialog .div_productomarca_form.erp-form-with-actionbar,
body.erp-theme #div_productomarca_form_dialog .modal-body.div_productomarca_form {
	padding-bottom: 0 !important;
}
body.erp-theme #contenido [id$="_detalle_tabla"],
body.erp-theme #contenido [id$="_detalle_tabla_vis"],
body.erp-theme #contenido [id^="div_"][id*="_detalle"] {
	margin-top: 0.25rem;
}

/* --- Listados SaaS (fase 2) --- */
body.erp-theme .erp-list-shell {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}

body.erp-theme .erp-list-toolbar {
	margin-bottom: 0;
}

body.erp-theme .erp-module-toolbar.card-header {
	background: var(--erp-surface);
	border-bottom: 1px solid var(--erp-border);
	padding: 0.7rem 1rem;
	display: flex;
	align-items: center;
	justify-content: flex-start;
	flex-wrap: wrap;
	gap: 0.5rem;
}

body.erp-theme .erp-module-toolbar-title {
	display: flex;
	flex-direction: column;
	gap: 0.1rem;
	min-width: 0;
	order: 2;
	margin-left: 0.35rem;
}

body.erp-theme .erp-module-toolbar-title strong {
	font-family: var(--erp-display);
	font-size: 0.95rem;
	font-weight: 650;
	color: var(--erp-text);
	letter-spacing: -0.01em;
}

body.erp-theme .erp-module-toolbar-title span {
	font-size: 0.78rem;
	color: var(--erp-text-muted);
	font-weight: 500;
}

body.erp-theme .erp-module-toolbar-actions {
	display: flex;
	align-items: center;
	gap: 0.4rem;
	flex-wrap: wrap;
	order: 1;
}

body.erp-theme .erp-module-toolbar .btn {
	font-size: 0.85rem;
	font-weight: 600;
}

body.erp-theme .erp-filter-card {
	margin-bottom: 0;
}

body.erp-theme .erp-filter-card .card-body {
	padding: 0.85rem 1rem 0.45rem;
}

body.erp-theme .erp-filter-card label {
	font-size: 0.72rem;
	font-weight: 650;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--erp-text-muted);
	margin-bottom: 0.28rem;
}

body.erp-theme .erp-filter-card .form-group,
body.erp-theme .erp-filter-card .erp-filter-field {
	margin-bottom: 0.75rem;
}

body.erp-theme .erp-filter-actions {
	display: flex;
	align-items: center;
	gap: 0.4rem;
	padding-top: 0;
	flex-wrap: wrap;
}

body.erp-theme .erp-filter-actions-wrap {
	padding-top: 0;
}

body.erp-theme .erp-list-table-card {
	margin-bottom: 0;
	overflow: hidden;
}

body.erp-theme .erp-list-table-card > .card-header {
	padding: 0.55rem 1rem;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.5rem;
}

body.erp-theme .erp-list-count {
	font-size: 0.82rem;
	font-weight: 600;
	color: var(--erp-text-muted);
}

body.erp-theme .erp-list-count strong {
	color: var(--erp-text);
}

body.erp-theme .erp-list-table-card .card-body {
	padding: 0;
}

body.erp-theme .erp-list-table-card .table {
	margin-bottom: 0;
}

body.erp-theme .erp-list-table-card .table thead th {
	background: #eef4f3;
}

body.erp-theme .erp-list-table-card tfoot tr,
body.erp-theme .erp-list-table-card tr.erp-list-total {
	background: #f3f6f6;
	font-weight: 650;
}

body.erp-theme .erp-list-table-card tr.erp-list-total td {
	border-top: 1px solid var(--erp-border);
	padding-top: 0.65rem;
	padding-bottom: 0.65rem;
}

body.erp-theme .erp-sunat-ok {
	background: var(--erp-action) !important;
	color: #fff !important;
}

body.erp-theme .erp-sunat-warn {
	background: var(--erp-accent) !important;
	color: #5c4518 !important;
}

body.erp-theme .erp-sunat-bad {
	background: var(--erp-danger) !important;
	color: #fff !important;
}

body.erp-theme .erp-sunat-swap {
	background: var(--erp-success) !important;
	color: #fff !important;
}

/* --- Listados UNIVERSALES (todos los módulos) --- */
body.erp-theme #contenido .erp-list-shell {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}

body.erp-theme #contenido .erp-list-filter-slot {
	margin-bottom: 0;
}

body.erp-theme #contenido .erp-list-filter-slot > section.content {
	padding-top: 0;
	padding-bottom: 0;
}

body.erp-theme #contenido .erp-list-results {
	margin-top: 0;
}

body.erp-theme #contenido section.content .card.erp-list-table-card {
	margin-bottom: 0.75rem;
	box-shadow: none;
	border: 1px solid var(--erp-border);
	border-radius: var(--erp-radius);
	overflow: hidden;
}

body.erp-theme #contenido section.content .card.erp-list-toolbar {
	margin-bottom: 0;
	box-shadow: none;
	border: 1px solid var(--erp-border);
	border-radius: var(--erp-radius);
}

/* Toolbar de módulo: card con Agregar/Actualizar */
body.erp-theme #contenido > section.content .card > .card-header:has(#btn_actualizar),
body.erp-theme #contenido > section.content .card > .card-header:has(#btn_agregar),
body.erp-theme #contenido .erp-module-toolbar {
	display: flex;
	align-items: center;
	justify-content: flex-start;
	flex-wrap: wrap;
	gap: 0.4rem;
	padding: 0.7rem 1rem;
	background: var(--erp-surface);
	border-bottom: 1px solid var(--erp-border);
	float: none !important;
	text-align: left;
}

body.erp-theme #contenido > section.content .card > .card-header.float-right:has(#btn_actualizar),
body.erp-theme #contenido > section.content .card > .card-header.float-right:has(#btn_agregar) {
	float: none !important;
	justify-content: flex-start;
}

body.erp-theme #contenido > section.content > .container-fluid > .row > [class*="col-"] > .card:has(#btn_actualizar),
body.erp-theme #contenido > section.content > .container-fluid > .row > [class*="col-"] > .card:has(#btn_agregar),
body.erp-theme #contenido > section.content .card:has(> .card-header #btn_actualizar),
body.erp-theme #contenido > section.content .card:has(> .card-header #btn_agregar) {
	margin-bottom: 0.75rem;
	box-shadow: none;
}

body.erp-theme #contenido > section.content .card-header #btn_agregar,
body.erp-theme #contenido > section.content .card-header #btn_actualizar,
body.erp-theme #contenido > section.content .card-header [id^="btn_agregar"] {
	font-weight: 600;
	font-size: 0.85rem;
}

body.erp-theme #contenido > .content-header h1 small,
body.erp-theme #contenido .content-header h1 small {
	font-size: 0.78rem;
	font-weight: 500;
	color: var(--erp-text-muted);
	text-transform: lowercase;
}

/* Contenedores AJAX de filtro (div_*_filtro) */
body.erp-theme [id$="_filtro"] > section.content,
body.erp-theme [id*="_filtro"] > section.content {
	padding-top: 0;
	padding-bottom: 0;
	margin: 0;
}

body.erp-theme [id$="_filtro"] > section.content > .container-fluid,
body.erp-theme [id*="_filtro"] > section.content > .container-fluid {
	padding-left: 0;
	padding-right: 0;
}

body.erp-theme [id$="_filtro"] .card,
body.erp-theme [id*="_filtro"] > .card,
body.erp-theme [id$="_filtro"] > section .card {
	margin-bottom: 0.75rem;
	box-shadow: none;
	border: 1px solid var(--erp-border);
	border-radius: var(--erp-radius);
	background: #fff;
}

body.erp-theme [id$="_filtro"] .card > .card-header,
body.erp-theme [id$="_filtro"] .card > .card-body,
body.erp-theme [id*="_filtro"] > .card > .card-header,
body.erp-theme [id*="_filtro"] > .card > .card-body {
	background: #fff;
	padding: 0.85rem 1rem 0.45rem;
	border-bottom: none;
}

body.erp-theme [id$="_filtro"] label,
body.erp-theme [id*="_filtro"] label {
	font-size: 0.72rem !important;
	font-weight: 650 !important;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--erp-text-muted) !important;
	margin-bottom: 0.28rem !important;
}

body.erp-theme [id$="_filtro"] .form-control,
body.erp-theme [id*="_filtro"] .form-control,
body.erp-theme [id$="_filtro"] select.form-control,
body.erp-theme [id*="_filtro"] select.form-control {
	border-radius: var(--erp-radius-sm);
	font-size: 0.9rem;
}

/* Filas de filtro: alinear botones con la base de los inputs */
body.erp-theme [id$="_filtro"] .card .row:has(.form-control),
body.erp-theme [id$="_filtro"] .card .row:has(select),
body.erp-theme [id$="_filtro"] .card .row:has(.btn),
body.erp-theme [id*="_filtro"] .card .row:has(.form-control),
body.erp-theme [id*="_filtro"] .card .row:has(select),
body.erp-theme [id*="_filtro"] .card .row:has(.btn),
body.erp-theme .erp-filter-card .row:has(.form-control),
body.erp-theme .erp-filter-card .row:has(select),
body.erp-theme .erp-filter-card .row:has(.btn),
body.erp-theme [id$="_filtro"] #filtroregistros > .row:has(.form-control),
body.erp-theme [id$="_filtro"] #filtroregistros > .row:has(.btn),
body.erp-theme form .row:has(.form-control):has(.btn),
body.erp-theme form .row:has(select):has(.btn),
body.erp-theme .modal form .row:has(.form-control):has(.btn),
body.erp-theme .modal form .row:has(select):has(.btn),
body.erp-theme .erp-doc-form .row:has(.form-control):has(.btn),
body.erp-theme #fieldset_producto .row,
body.erp-theme .modal #fieldset_producto .row {
	align-items: flex-end !important;
}

/* Sin margin-bottom en form-group: si no, flex-end alinea botones bajo el margen (= “muy abajo”) */
body.erp-theme [id$="_filtro"] .card .row:has(.btn) > [class*="col-"].form-group,
body.erp-theme [id$="_filtro"] .card .row:has(.btn) > .form-group,
body.erp-theme [id*="_filtro"] .card .row:has(.btn) > [class*="col-"].form-group,
body.erp-theme [id*="_filtro"] .card .row:has(.btn) > .form-group,
body.erp-theme .erp-filter-card .row:has(.btn) > [class*="col-"].form-group,
body.erp-theme .erp-filter-card .row:has(.btn) > .form-group,
body.erp-theme [id$="_filtro"] form .row:has(.btn) > [class*="col-"].form-group,
body.erp-theme [id$="_filtro"] form .row:has(.btn) > .form-group,
body.erp-theme form .row:has(.btn) > [class*="col-"].form-group,
body.erp-theme form .row:has(.btn) > .form-group,
body.erp-theme .modal form .row:has(.btn) > [class*="col-"],
body.erp-theme .erp-doc-form .row:has(.btn) > [class*="col-"].form-group {
	margin-bottom: 0 !important;
}

/* Columnas solo con botones: misma estructura que un campo (label + control) */
body.erp-theme .erp-filter-btn-col,
body.erp-theme [id$="_filtro"] [style*="padding-top:30px"],
body.erp-theme [id$="_filtro"] [style*="padding-top: 30px"],
body.erp-theme [id*="_filtro"] [style*="padding-top:30px"],
body.erp-theme [id*="_filtro"] [style*="padding-top: 30px"],
body.erp-theme .erp-filter-card [style*="padding-top:30px"],
body.erp-theme .erp-filter-card [style*="padding-top: 30px"],
body.erp-theme form [style*="padding-top:30px"],
body.erp-theme form [style*="padding-top: 30px"],
body.erp-theme .modal [style*="padding-top:30px"],
body.erp-theme .modal [style*="padding-top: 30px"],
body.erp-theme #contenido [style*="padding-top:30px"],
body.erp-theme #contenido [style*="padding-top: 30px"],
body.erp-theme #fieldset_producto [style*="padding-top:30px"],
body.erp-theme #fieldset_producto [style*="padding-top: 30px"],
body.erp-theme #fieldset_producto .erp-filter-btn-col,
body.erp-theme .div_cotizacion_form #fieldset_producto .erp-filter-btn-col,
body.erp-theme .div_cotizacion_form [style*="padding-top:30px"],
body.erp-theme .div_cotizacion_form [style*="padding-top: 30px"] {
	padding-top: 0 !important;
	margin-top: 0 !important;
	margin-bottom: 0 !important;
	display: flex !important;
	flex-direction: row !important;
	flex-wrap: wrap !important;
	justify-content: flex-start !important;
	align-items: center !important;
	align-self: flex-start !important;
	gap: 0.4rem !important;
	white-space: nowrap !important;
	min-height: 0 !important;
}

body.erp-theme .erp-filter-btn-col > .erp-btn-col-label,
body.erp-theme .erp-btn-col-label {
	display: block !important;
	visibility: hidden !important;
	opacity: 0 !important;
	flex: 0 0 100% !important;
	width: 100% !important;
	height: auto !important;
	min-height: calc(0.72rem * 1.2) !important;
	margin: 0 0 0.28rem !important;
	padding: 0 !important;
	font-size: 0.72rem !important;
	font-weight: 650 !important;
	line-height: 1.2 !important;
	overflow: hidden !important;
	white-space: nowrap !important;
	pointer-events: none !important;
}

body.erp-theme .erp-filter-btn-col > .btn-group,
body.erp-theme .erp-filter-btn-col > .btn,
body.erp-theme .erp-filter-btn-col > span.btn,
body.erp-theme .erp-filter-btn-col > button {
	flex: 0 0 auto !important;
	margin-top: 0 !important;
	white-space: nowrap !important;
}

/* Búsqueda de productos: alinear desde arriba (label + input / label + botones) */
body.erp-theme #fieldset_producto .row,
body.erp-theme .div_cotizacion_form #fieldset_producto .row,
body.erp-theme .modal #fieldset_producto .row,
body.erp-theme #contenido #fieldset_producto .card-body > .row,
body.erp-theme #contenido .card:has(#fieldset_producto) .card-body > .row {
	display: flex !important;
	flex-wrap: wrap !important;
	align-items: flex-start !important;
	align-content: flex-start !important;
}

body.erp-theme .erp-filter-btn-col[style*="display: none"],
body.erp-theme .erp-filter-btn-col[style*="display:none"] {
	display: none !important;
	min-height: 0 !important;
}

body.erp-theme .erp-filter-label-spacer {
	display: none !important;
	margin: 0 !important;
	padding: 0 !important;
	height: 0 !important;
	overflow: hidden;
}

body.erp-theme [id$="_filtro"] .btn,
body.erp-theme [id*="_filtro"] .btn {
	font-weight: 600;
	border-radius: var(--erp-radius-sm);
}

/* Contenedores AJAX de tabla (div_*_tabla) */
body.erp-theme [id$="_tabla"] > section.content,
body.erp-theme [id*="_tabla"] > section.content {
	padding-top: 0;
	padding-bottom: 0;
	margin: 0;
}

body.erp-theme [id$="_tabla"] > section.content > .container-fluid,
body.erp-theme [id*="_tabla"] > section.content > .container-fluid {
	padding-left: 0;
	padding-right: 0;
}

body.erp-theme [id$="_tabla"] .card,
body.erp-theme [id*="_tabla"] > .card,
body.erp-theme [id$="_tabla"] > section .card {
	margin-bottom: 0.75rem;
	box-shadow: none;
	border: 1px solid var(--erp-border);
	border-radius: var(--erp-radius);
	overflow: hidden;
}

body.erp-theme [id$="_tabla"] .card > .card-header,
body.erp-theme [id*="_tabla"] > .card > .card-header {
	padding: 0.55rem 1rem;
	background: #fff;
	border-bottom: 1px solid var(--erp-border);
}

body.erp-theme [id$="_tabla"] .table,
body.erp-theme [id*="_tabla"] .table,
body.erp-theme .erp-list-table-card .table {
	margin-bottom: 0;
}

body.erp-theme [id$="_tabla"] .table thead th,
body.erp-theme [id*="_tabla"] .table thead th {
	background: #eef4f3;
	font-size: 0.72rem;
	font-weight: 650;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--erp-text-muted);
	border-color: var(--erp-border);
	white-space: nowrap;
}

body.erp-theme [id$="_tabla"] .table-hover tbody tr:hover,
body.erp-theme [id*="_tabla"] .table-hover tbody tr:hover,
body.erp-theme [id$="_tabla"] .table tbody tr:hover,
body.erp-theme [id*="_tabla"] .table tbody tr:hover {
	background-color: var(--erp-action-soft);
}

/* Paneles de consulta / cst (filtro + panel/tabla) */
body.erp-theme [id$="_panel"] > section.content,
body.erp-theme [id*="_panel"] > section.content {
	padding-top: 0;
	margin: 0;
}

body.erp-theme [id$="_panel"] .card,
body.erp-theme [id*="_panel"] > .card {
	box-shadow: none;
	border: 1px solid var(--erp-border);
	border-radius: var(--erp-radius);
}

/* DataTables dentro de listados */
body.erp-theme [id$="_tabla"] .dataTables_wrapper,
body.erp-theme [id*="_tabla"] .dataTables_wrapper {
	padding: 0.65rem 0.85rem 0.85rem;
}

body.erp-theme [id$="_tabla"] .dataTables_filter input,
body.erp-theme [id*="_tabla"] .dataTables_length select {
	border: 1px solid var(--erp-border);
	border-radius: var(--erp-radius-sm);
	height: calc(1.5em + 0.5rem + 2px);
	font-size: 0.86rem;
}

.erp-table-sticky-wrap {
	max-height: min(70vh, 640px);
	overflow: auto;
	border: 1px solid var(--erp-border);
	border-radius: var(--erp-radius-sm);
}

body.erp-theme .erp-table-sticky thead th {
	position: sticky;
	top: 0;
	z-index: 2;
	background: #f8fafc;
	color: var(--erp-text-muted);
	font-size: 0.75rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	border-color: var(--erp-border) !important;
	box-shadow: 0 1px 0 var(--erp-border);
}

body.erp-theme .erp-table-sticky thead th:hover {
	background: #f1f5f9 !important;
	color: var(--erp-text) !important;
}

body.erp-theme .erp-table-sticky tbody tr:hover {
	background: var(--erp-action-soft);
}

body.erp-theme .erp-table-sticky tbody tr:hover td,
body.erp-theme .erp-table-sticky tbody tr:hover th {
	color: var(--erp-text) !important;
}

body.erp-theme .erp-table-sticky tbody tr:hover a {
	color: var(--erp-action-dark) !important;
}

body.erp-theme .erp-table-sticky.table-striped tbody tr:nth-of-type(odd) {
	background-color: rgba(255, 255, 255, 0.6);
}

body.erp-theme .datepicker-dropdown,
body.erp-theme .datepicker {
	color: var(--erp-text);
	z-index: 1060 !important;
}

body.erp-theme .datepicker table tr td,
body.erp-theme .datepicker table tr th {
	color: var(--erp-text);
}

body.erp-theme .datepicker table tr td.day:hover,
body.erp-theme .datepicker table tr td.day.focused {
	background: var(--erp-action-soft) !important;
	color: var(--erp-text) !important;
}

body.erp-theme .datepicker table tr td.old,
body.erp-theme .datepicker table tr td.new {
	color: var(--erp-text-muted) !important;
}

body.erp-theme .datepicker table tr td.today,
body.erp-theme .datepicker table tr td.today:hover {
	color: var(--erp-text) !important;
	background: var(--erp-accent-soft) !important;
}

body.erp-theme .datepicker table tr td.active,
body.erp-theme .datepicker table tr td.active:hover,
body.erp-theme .datepicker table tr td span.active,
body.erp-theme .datepicker table tr td span.active:hover {
	background: var(--erp-action) !important;
	color: #fff !important;
}

body.erp-theme .datepicker thead tr:first-child th:hover,
body.erp-theme .datepicker tfoot tr th:hover {
	background: var(--erp-sidebar-hover) !important;
	color: var(--erp-text) !important;
}

body.erp-theme .erp-sidebar .nav-treeview > .nav-item > .nav-link:hover,
body.erp-theme .erp-sidebar .nav-treeview > .nav-item > .nav-link:focus {
	background: var(--erp-sidebar-hover) !important;
	color: var(--erp-text) !important;
}

.erp-badge {
	display: inline-block;
	padding: 0.28em 0.55em;
	font-size: 0.72rem;
	font-weight: 600;
	line-height: 1.2;
	border-radius: 4px;
	text-transform: uppercase;
	letter-spacing: 0.02em;
	white-space: nowrap;
}

.erp-badge-ot-abierta { background: var(--erp-action-soft); color: var(--erp-action-dark); border: 1px solid #93c5fd; }
.erp-badge-ot-finalizada { background: var(--erp-accent-soft); color: #92400e; border: 1px solid #fcd34d; }
.erp-badge-ot-facturada { background: #d1fae5; color: #065f46; border: 1px solid #6ee7b7; }
.erp-badge-ot-cancelada { background: #f1f5f9; color: #64748b; border: 1px solid #cbd5e1; }
.erp-badge-ot-vencido { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }
.erp-badge-ot-hoy { background: #ffedd5; color: #9a3412; border: 1px solid #fdba74; }
.erp-badge-ot-manana { background: var(--erp-action-soft); color: var(--erp-action-dark); border: 1px solid #93c5fd; }
.erp-badge-ot-plazo { background: #d1fae5; color: #065f46; border: 1px solid #6ee7b7; }

body.erp-theme .erp-badge-cont-ok { background: #d1fae5; color: #065f46; }
body.erp-theme .erp-badge-cont-warn { background: var(--erp-accent-soft); color: #92400e; }
body.erp-theme .erp-badge-cont-danger { background: #fee2e2; color: #991b1b; }
body.erp-theme .erp-badge-cont-info { background: var(--erp-action-soft); color: var(--erp-action-dark); }

.erp-ot-timeline {
	background: var(--erp-surface);
	border: 1px solid var(--erp-border);
	border-radius: var(--erp-radius);
	padding: 12px 14px;
}

.erp-ot-timeline-doc {
	margin-bottom: 10px;
	font-size: 0.95rem;
}

.erp-ot-timeline-track {
	display: flex;
	align-items: flex-start;
	flex-wrap: nowrap;
	overflow-x: auto;
	gap: 0;
	padding-bottom: 2px;
}

.erp-ot-step {
	display: flex;
	flex-direction: column;
	align-items: center;
	min-width: 72px;
	flex-shrink: 0;
	text-align: center;
}

.erp-ot-step-icon {
	width: 34px;
	height: 34px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #e2e8f0;
	color: #64748b;
	font-size: 0.85rem;
	border: 2px solid #cbd5e1;
	transition: all 0.2s ease;
}

.erp-ot-step-lbl {
	margin-top: 4px;
	font-size: 0.68rem;
	font-weight: 600;
	color: var(--erp-text-muted);
	text-transform: uppercase;
	line-height: 1.2;
	max-width: 72px;
}

.erp-ot-step--done .erp-ot-step-icon {
	background: var(--erp-success);
	border-color: var(--erp-success);
	color: #fff;
}

.erp-ot-step--done .erp-ot-step-lbl {
	color: var(--erp-success);
}

.erp-ot-step--active .erp-ot-step-icon {
	background: var(--erp-accent);
	border-color: var(--erp-accent-dark);
	color: #fff;
	box-shadow: 0 0 0 3px var(--erp-accent-soft);
}

.erp-ot-step--active .erp-ot-step-lbl {
	color: var(--erp-accent-dark);
}

.erp-ot-step-line {
	flex: 1;
	min-width: 16px;
	height: 2px;
	background: #cbd5e1;
	margin-top: 17px;
}

.erp-ot-step-line--done {
	background: var(--erp-success);
}

.erp-ot-timeline--cancelada {
	text-align: center;
	padding: 16px;
}

body.erp-theme .erp-cont-panel .info-box {
	border-radius: var(--erp-radius-sm);
	box-shadow: var(--erp-shadow);
	border: 1px solid rgba(184, 196, 208, 0.45);
}

body.erp-theme .erp-cont-panel .card {
	border-radius: var(--erp-radius);
}

.erp-esc-complementos .card {
	border-radius: var(--erp-radius);
	box-shadow: var(--erp-shadow);
}

.erp-ple-light {
	border: 1px solid var(--erp-border);
	border-radius: var(--erp-radius-sm);
	padding: 10px 8px;
	background: var(--erp-surface);
	position: relative;
	min-height: 72px;
}

.erp-ple-light-dot {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	margin: 0 auto 6px;
	background: #94a3b8;
}

.erp-ple-light--ok {
	border-color: #6ee7b7;
	background: #f0fdf4;
}

.erp-ple-light--ok .erp-ple-light-dot {
	background: var(--erp-success);
	box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.2);
}

.erp-ple-light--warn {
	border-color: #fcd34d;
	background: var(--erp-accent-soft);
}

.erp-ple-light--warn .erp-ple-light-dot {
	background: var(--erp-warning);
	box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.2);
}

.erp-ple-light--empty {
	border-color: var(--erp-border);
	background: #f8fafc;
}

.erp-ple-light--empty .erp-ple-light-dot {
	background: #94a3b8;
}

#dashboard_complementos_wrap {
	max-width: 100%;
	overflow-x: hidden;
}

/* --- Login TEC PERU --- */
html.erp-login-html,
html.erp-login-html body.erp-theme.erp-login {
	height: 100%;
	margin: 0;
}

body.erp-theme.erp-login {
	--login-ink: #0a2430;
	--login-teal: #0f7a78;
	--login-teal-deep: #0a5c5a;
	--login-teal-soft: #e6f4f3;
	--login-amber: #e8913a;
	--login-amber-deep: #c97422;
	--login-paper: #f7faf9;
	--login-line: #d5e3e1;
	--login-muted: #5f7370;
	--login-display: 'Sora', 'Figtree', sans-serif;
	--login-sans: 'Figtree', 'Source Sans Pro', sans-serif;
	min-height: 100vh;
	background: var(--login-ink);
	font-family: var(--login-sans);
	color: var(--login-ink);
	-webkit-font-smoothing: antialiased;
	overflow-x: hidden;
}

body.erp-theme.erp-login .erp-login-shell {
	position: relative;
	min-height: 100vh;
	display: flex;
	isolation: isolate;
}

body.erp-theme.erp-login .erp-login-atmosphere {
	position: absolute;
	inset: 0;
	z-index: 0;
	pointer-events: none;
	background:
		radial-gradient(ellipse 70% 55% at 18% 42%, rgba(15, 122, 120, 0.55) 0%, transparent 62%),
		radial-gradient(ellipse 50% 45% at 88% 12%, rgba(232, 145, 58, 0.18) 0%, transparent 55%),
		linear-gradient(145deg, #071820 0%, #0a3d3c 48%, #0a2430 100%);
	overflow: hidden;
}

body.erp-theme.erp-login .erp-login-wave {
	position: absolute;
	inset: -20% -10%;
	opacity: 0.22;
	background:
		repeating-radial-gradient(
			ellipse at 30% 50%,
			transparent 0,
			transparent 28px,
			rgba(255, 255, 255, 0.07) 29px,
			rgba(255, 255, 255, 0.07) 30px
		);
	animation: erp-login-drift 28s linear infinite;
	will-change: transform;
}

body.erp-theme.erp-login .erp-login-orb {
	position: absolute;
	border-radius: 50%;
	filter: blur(48px);
	opacity: 0.45;
}

body.erp-theme.erp-login .erp-login-orb-a {
	width: 280px;
	height: 280px;
	left: 8%;
	bottom: 8%;
	background: rgba(15, 122, 120, 0.7);
	animation: erp-login-float 9s ease-in-out infinite;
}

body.erp-theme.erp-login .erp-login-orb-b {
	width: 180px;
	height: 180px;
	right: 38%;
	top: 10%;
	background: rgba(232, 145, 58, 0.35);
	animation: erp-login-float 11s ease-in-out infinite reverse;
}

@keyframes erp-login-drift {
	from { transform: translate3d(0, 0, 0) rotate(0deg); }
	to { transform: translate3d(-3%, 2%, 0) rotate(8deg); }
}

@keyframes erp-login-float {
	0%, 100% { transform: translate3d(0, 0, 0); }
	50% { transform: translate3d(12px, -18px, 0); }
}

@keyframes erp-login-rise {
	from {
		opacity: 0;
		transform: translate3d(0, 18px, 0);
	}
	to {
		opacity: 1;
		transform: translate3d(0, 0, 0);
	}
}

body.erp-theme.erp-login .erp-login-visual {
	position: relative;
	z-index: 1;
	flex: 1 1 54%;
	display: flex;
	align-items: center;
	padding: 3.5rem 3.25rem 3.5rem 4rem;
	color: #f2f8f7;
	min-width: 0;
}

body.erp-theme.erp-login .erp-login-visual-inner {
	max-width: 440px;
	animation: erp-login-rise 0.7s ease both;
}

body.erp-theme.erp-login .erp-login-logo {
	display: block;
	width: min(220px, 72vw);
	height: auto;
	margin-bottom: 1.75rem;
	filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.25));
	background: rgba(255, 255, 255, 0.96);
	padding: 0.65rem 0.85rem;
	border-radius: 8px;
}

body.erp-theme.erp-login .erp-login-kicker {
	margin: 0 0 0.55rem;
	font-family: var(--login-sans);
	font-size: 0.78rem;
	font-weight: 600;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: rgba(232, 145, 58, 0.95);
}

body.erp-theme.erp-login .erp-login-wordmark {
	margin: 0 0 0.85rem;
	font-family: var(--login-display);
	font-size: clamp(2.35rem, 4.2vw, 3.35rem);
	font-weight: 700;
	letter-spacing: 0.02em;
	line-height: 1.05;
	color: #ffffff;
}

body.erp-theme.erp-login .erp-login-lead {
	margin: 0;
	max-width: 42ch;
	font-size: 1.05rem;
	line-height: 1.55;
	color: rgba(226, 240, 238, 0.88);
	font-weight: 400;
	letter-spacing: 0.02em;
}

body.erp-theme.erp-login .erp-login-panel {
	position: relative;
	z-index: 1;
	flex: 0 0 min(440px, 42%);
	display: flex;
	flex-direction: column;
	background: var(--login-paper);
	min-width: 0;
	box-shadow: -18px 0 40px rgba(4, 20, 28, 0.18);
	animation: erp-login-rise 0.75s 0.12s ease both;
}

body.erp-theme.erp-login .erp-login-panel-inner {
	flex: 1;
	display: flex;
	flex-direction: column;
	justify-content: center;
	width: 100%;
	max-width: 360px;
	margin: 0 auto;
	padding: 2.75rem 1.85rem 1.5rem;
}

body.erp-theme.erp-login .erp-login-company {
	display: flex;
	justify-content: center;
	align-items: center;
	margin-bottom: 1.5rem;
}

body.erp-theme.erp-login .erp-login-company-logo {
	display: block;
	width: auto;
	max-width: 220px;
	max-height: 72px;
	height: auto;
	object-fit: contain;
}

body.erp-theme.erp-login .erp-login-heading {
	margin-bottom: 1.5rem;
}

body.erp-theme.erp-login .erp-login-heading h2 {
	margin: 0 0 0.3rem;
	font-family: var(--login-display);
	font-size: 1.35rem;
	font-weight: 600;
	color: var(--login-ink);
	letter-spacing: -0.02em;
}

body.erp-theme.erp-login .erp-login-heading p {
	margin: 0;
	font-size: 0.92rem;
	color: var(--login-muted);
}

body.erp-theme.erp-login .erp-login-msg {
	margin-bottom: 1rem;
	padding: 0.65rem 0.8rem;
	border-radius: 8px;
	font-size: 0.84rem;
	font-weight: 500;
	border: 1px solid transparent;
}

body.erp-theme.erp-login .erp-login-msg.is-error {
	background: #fef2f2;
	border-color: #fecaca;
	color: #991b1b;
}

body.erp-theme.erp-login .erp-login-msg.is-ok {
	background: #ecfdf5;
	border-color: #a7f3d0;
	color: #065f46;
}

body.erp-theme.erp-login .erp-login-field {
	margin-bottom: 1.05rem;
}

body.erp-theme.erp-login .erp-login-label {
	display: block;
	font-size: 0.78rem;
	font-weight: 600;
	color: var(--login-ink);
	margin-bottom: 0.4rem;
}

body.erp-theme.erp-login .erp-login-control {
	position: relative;
}

body.erp-theme.erp-login .erp-login-control > i {
	position: absolute;
	left: 13px;
	top: 50%;
	transform: translateY(-50%);
	color: #7a9490;
	font-size: 0.82rem;
	pointer-events: none;
	transition: color 0.18s ease;
}

body.erp-theme.erp-login .erp-login-control input {
	display: block;
	width: 100%;
	height: 48px;
	padding: 0 42px 0 38px;
	border: 1px solid var(--login-line);
	border-radius: 8px;
	background: #fff;
	color: var(--login-ink);
	font-size: 0.95rem;
	font-family: inherit;
	outline: none;
	transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

body.erp-theme.erp-login .erp-login-control input::placeholder {
	color: #8aa09c;
}

body.erp-theme.erp-login .erp-login-control:focus-within input {
	border-color: var(--login-teal);
	box-shadow: 0 0 0 3px rgba(15, 122, 120, 0.15);
}

body.erp-theme.erp-login .erp-login-control:focus-within > i {
	color: var(--login-teal);
}

body.erp-theme.erp-login .erp-login-eye {
	position: absolute;
	right: 6px;
	top: 50%;
	transform: translateY(-50%);
	width: 34px;
	height: 34px;
	border: 0;
	background: transparent;
	color: #7a9490;
	border-radius: 6px;
	cursor: pointer;
	padding: 0;
	transition: color 0.15s ease, background 0.15s ease;
}

body.erp-theme.erp-login .erp-login-eye:hover {
	color: var(--login-ink);
	background: var(--login-teal-soft);
}

body.erp-theme.erp-login .erp-login-submit {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 48px;
	margin-top: 0.4rem;
	border: 0;
	border-radius: 8px;
	background: var(--login-teal);
	color: #fff;
	font-family: var(--login-display);
	font-size: 0.95rem;
	font-weight: 600;
	letter-spacing: 0.02em;
	cursor: pointer;
	transition: background 0.18s ease, transform 0.18s ease;
}

body.erp-theme.erp-login .erp-login-submit:hover:not(:disabled) {
	background: var(--login-teal-deep);
	transform: translateY(-1px);
}

body.erp-theme.erp-login .erp-login-submit:active:not(:disabled) {
	transform: translateY(0);
}

body.erp-theme.erp-login .erp-login-submit:disabled {
	opacity: 0.85;
	cursor: wait;
}

body.erp-theme.erp-login .erp-login-submit-wait {
	display: none;
}

body.erp-theme.erp-login .erp-login-submit.is-loading .erp-login-submit-label {
	display: none;
}

body.erp-theme.erp-login .erp-login-submit.is-loading .erp-login-submit-wait {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
}

body.erp-theme.erp-login .erp-login-hint {
	margin: 1.2rem 0 0;
	text-align: center;
	font-size: 0.78rem;
	color: var(--login-muted);
}

body.erp-theme.erp-login .erp-login-footer {
	padding: 0.85rem 1.5rem 1.15rem;
	text-align: center;
	font-size: 0.75rem;
	color: var(--login-muted);
}

body.erp-theme.erp-login .erp-login-footer a {
	color: var(--login-teal-deep);
	font-weight: 600;
	text-decoration: none;
	transition: color 0.15s ease;
}

body.erp-theme.erp-login .erp-login-footer a:hover {
	color: var(--login-amber-deep);
}

@media (max-width: 900px) {
	body.erp-theme.erp-login .erp-login-shell {
		flex-direction: column;
	}

	body.erp-theme.erp-login .erp-login-visual {
		flex: none;
		padding: 1.75rem 1.35rem 1.4rem;
		min-height: 34vh;
	}

	body.erp-theme.erp-login .erp-login-visual-inner {
		max-width: none;
	}

	body.erp-theme.erp-login .erp-login-logo {
		width: min(168px, 58vw);
		margin-bottom: 1rem;
		padding: 0.45rem 0.6rem;
	}

	body.erp-theme.erp-login .erp-login-wordmark {
		font-size: clamp(1.75rem, 7vw, 2.2rem);
		margin-bottom: 0.35rem;
	}

	body.erp-theme.erp-login .erp-login-lead {
		font-size: 0.92rem;
		max-width: 36ch;
	}

	body.erp-theme.erp-login .erp-login-panel {
		flex: 1 1 auto;
		box-shadow: none;
		border-radius: 18px 18px 0 0;
		margin-top: -0.5rem;
	}

	body.erp-theme.erp-login .erp-login-panel-inner {
		padding-top: 2rem;
		max-width: 400px;
	}

	body.erp-theme.erp-login .erp-login-orb-b {
		right: 8%;
	}
}

@media (prefers-reduced-motion: reduce) {
	body.erp-theme.erp-login .erp-login-wave,
	body.erp-theme.erp-login .erp-login-orb,
	body.erp-theme.erp-login .erp-login-visual-inner,
	body.erp-theme.erp-login .erp-login-panel {
		animation: none !important;
	}
}

/* Compra form: layout Proveedor | Datos (scroll = reglas globales de .modal) */
body.erp-theme #div_compra_form_dialog .modal-dialog {
	width: 95% !important;
	max-width: min(95vw, 1400px) !important;
}

/* Compra: Proveedor | Datos generales — contenedor propio (no pelear con .row flex-end) */
body.erp-theme #div_compra_form_dialog .erp-com-top-panels,
body.erp-theme .div_compra_form .erp-com-top-panels,
body.erp-theme #for_com > .erp-com-top-panels {
	display: flex !important;
	flex-direction: row !important;
	flex-wrap: wrap !important;
	align-items: flex-start !important;
	align-content: flex-start !important;
	justify-content: flex-start !important;
	margin-left: -7.5px !important;
	margin-right: -7.5px !important;
}

body.erp-theme #div_compra_form_dialog .erp-com-top-panels > .erp-com-top-left,
body.erp-theme #div_compra_form_dialog .erp-com-top-panels > .erp-com-top-right,
body.erp-theme .div_compra_form .erp-com-top-panels > [class*="col-"],
body.erp-theme #for_com > .erp-com-top-panels > [class*="col-"] {
	align-self: flex-start !important;
	margin-top: 0 !important;
	padding-top: 0 !important;
	float: none !important;
	position: relative !important;
	top: 0 !important;
}

body.erp-theme #div_compra_form_dialog #tabproveedor,
body.erp-theme .div_compra_form #tabproveedor {
	margin-top: 0 !important;
	margin-bottom: 0.65rem !important;
	position: relative !important;
	top: 0 !important;
}

body.erp-theme #div_compra_form_dialog #for_com > .row.erp-doc-side-panels,
body.erp-theme #div_compra_form_dialog #for_com > .row.erp-com-top-panels,
body.erp-theme #div_compra_form_dialog #for_com > .row:has(> [class*="col-"] > .nav-tabs-custom),
body.erp-theme .div_compra_form #for_com > .row.erp-doc-side-panels,
body.erp-theme .div_compra_form #for_com > .row.erp-com-top-panels {
	display: flex !important;
	flex-wrap: wrap !important;
	align-items: flex-start !important;
	align-content: flex-start !important;
}

/* Filas de campos / búsqueda de producto: label + control alineados arriba */
body.erp-theme #div_compra_form_dialog #for_com > .row.erp-doc-fields-row:not(.erp-doc-side-panels):not(.erp-com-top-panels),
body.erp-theme #div_compra_form_dialog #for_com > .row:has(.form-control):has(.btn),
body.erp-theme #div_compra_form_dialog #fieldset_producto .row,
body.erp-theme .div_compra_form #for_com > .row:has(.form-control):has(.btn),
body.erp-theme .div_compra_form #fieldset_producto .row {
	display: flex !important;
	flex-wrap: wrap !important;
	align-items: flex-start !important;
	align-content: flex-start !important;
}

body.erp-theme #div_compra_form_dialog #for_com > .row.erp-doc-side-panels > [class*="col-"],
body.erp-theme #div_compra_form_dialog #for_com > .row.erp-com-top-panels > [class*="col-"],
body.erp-theme .div_compra_form #for_com > .row.erp-doc-side-panels > [class*="col-"],
body.erp-theme .div_compra_form #for_com > .row.erp-com-top-panels > [class*="col-"] {
	align-self: flex-start !important;
	margin-top: 0 !important;
	float: none !important;
}

body.erp-theme #div_compra_form_dialog #for_com > .row:has(.form-control):has(.btn) > .erp-filter-btn-col,
body.erp-theme #div_compra_form_dialog #for_com > .row:has(.form-control):has(.btn) > [style*="padding-top:30px"],
body.erp-theme #div_compra_form_dialog #for_com > .row:has(.form-control):has(.btn) > [style*="padding-top: 30px"],
body.erp-theme #div_compra_form_dialog #fieldset_producto .erp-filter-btn-col,
body.erp-theme .div_compra_form #for_com > .row:has(.form-control):has(.btn) > .erp-filter-btn-col,
body.erp-theme .div_compra_form #fieldset_producto .erp-filter-btn-col {
	align-self: flex-start !important;
}

@media (min-width: 576px) {
	.modal-dialog.modal-xl {
		max-width: 90vw;
		width: 90%;
	}
}

/* --- Modal aviso servicio / pago (serviciopago_form) --- */
@keyframes erp-pago-in {
	from { opacity: 0; transform: translateY(10px) scale(0.985); }
	to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes erp-pago-pulse {
	0%, 100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.28); }
	50% { box-shadow: 0 0 0 10px rgba(220, 38, 38, 0); }
}
@keyframes erp-pago-icon {
	from { opacity: 0; transform: scale(0.7); }
	to { opacity: 1; transform: scale(1); }
}

body.erp-theme .erp-pago-modal .modal-dialog {
	max-width: 640px;
	margin: 1.25rem auto;
}

body.erp-theme .erp-pago-modal-content,
body.erp-theme #div_pago_form_dialog .modal-content {
	border: 1px solid var(--erp-border);
	border-radius: 14px;
	overflow: visible;
	max-height: none !important;
	box-shadow: 0 18px 48px rgba(10, 36, 48, 0.14);
	animation: erp-pago-in 0.38s ease-out both;
}

body.erp-theme #div_pago_form_dialog .modal-body.div_pago_form,
body.erp-theme #div_pago_form_dialog .modal-body.div_pago_form.p-0 {
	padding: 0 !important;
	background:
		radial-gradient(120% 80% at 100% 0%, rgba(15, 122, 120, 0.06), transparent 55%),
		radial-gradient(90% 60% at 0% 100%, rgba(232, 145, 58, 0.06), transparent 50%),
		#fff;
}

body.erp-theme .erp-pago-header {
	align-items: flex-start !important;
	padding: 1rem 1.15rem 0.85rem !important;
	border-bottom: 1px solid var(--erp-border) !important;
	background: #fff !important;
}

body.erp-theme .erp-pago-header--warn {
	border-top: 3px solid var(--erp-warning);
}
body.erp-theme .erp-pago-header--due {
	border-top: 3px solid var(--erp-accent-dark);
}
body.erp-theme .erp-pago-header--danger {
	border-top: 3px solid var(--erp-danger);
}

body.erp-theme .erp-pago-header-text {
	flex: 1 1 auto;
	min-width: 0;
}

body.erp-theme .erp-pago-badge {
	display: inline-block;
	font-size: 0.68rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	padding: 0.2rem 0.5rem;
	border-radius: 4px;
	margin-bottom: 0.35rem;
	background: var(--erp-warning-soft);
	color: var(--erp-accent-dark);
}

body.erp-theme .erp-pago-header--due .erp-pago-badge {
	background: #fff1e0;
	color: #a85a12;
}
body.erp-theme .erp-pago-header--danger .erp-pago-badge {
	background: var(--erp-danger-soft);
	color: var(--erp-danger);
}

body.erp-theme .erp-pago-header .modal-title {
	font-family: var(--erp-display);
	font-size: 1.15rem;
	font-weight: 700;
	letter-spacing: -0.02em;
}

body.erp-theme .erp-pago-header-meta {
	margin: 0.15rem 0 0;
	font-size: 0.82rem;
	color: var(--erp-text-muted);
}

body.erp-theme .erp-pago-body {
	padding: 1rem 1.15rem 1.2rem;
}

body.erp-theme .erp-pago-hero {
	display: flex;
	gap: 0.9rem;
	align-items: flex-start;
	margin-bottom: 0.9rem;
}

body.erp-theme .erp-pago-hero-icon {
	flex: 0 0 auto;
	width: 44px;
	height: 44px;
	border-radius: 12px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 1.15rem;
	animation: erp-pago-icon 0.45s ease-out 0.08s both;
	background: var(--erp-warning-soft);
	color: var(--erp-accent-dark);
}

body.erp-theme .erp-pago-body--due .erp-pago-hero-icon {
	background: #fff1e0;
	color: #a85a12;
}
body.erp-theme .erp-pago-body--danger .erp-pago-hero-icon {
	background: var(--erp-danger-soft);
	color: var(--erp-danger);
	animation: erp-pago-icon 0.45s ease-out 0.08s both, erp-pago-pulse 2.2s ease-in-out 0.5s infinite;
}

body.erp-theme .erp-pago-msg {
	margin: 0 0 0.25rem;
	font-family: var(--erp-display);
	font-size: 1.02rem;
	font-weight: 650;
	line-height: 1.35;
	color: var(--erp-text);
	letter-spacing: -0.015em;
}

body.erp-theme .erp-pago-sub {
	margin: 0;
	font-size: 0.88rem;
	color: var(--erp-text-muted);
	line-height: 1.45;
}

body.erp-theme .erp-pago-facts {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.5rem;
	margin-bottom: 1rem;
}

body.erp-theme .erp-pago-facts--3 {
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

body.erp-theme .erp-pago-fact {
	background: #f7faf9;
	border: 1px solid var(--erp-border);
	border-radius: 10px;
	padding: 0.55rem 0.65rem;
}

body.erp-theme .erp-pago-fact-label {
	display: block;
	font-size: 0.64rem;
	font-weight: 650;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: var(--erp-text-muted);
	margin-bottom: 0.15rem;
}

body.erp-theme .erp-pago-fact-value {
	display: block;
	font-family: var(--erp-display);
	font-size: 0.95rem;
	font-weight: 700;
	color: var(--erp-text);
	letter-spacing: -0.02em;
}

/* Layout: Yape QR + cuentas */
body.erp-theme .erp-pago-layout {
	display: grid;
	gap: 0.85rem;
}

body.erp-theme .erp-pago-layout--with-yape {
	grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
	align-items: start;
}

body.erp-theme .erp-pago-yape {
	background: linear-gradient(165deg, #1a0f24 0%, #2d1840 48%, #3b2154 100%);
	border-radius: 14px;
	padding: 0.85rem 0.85rem 1rem;
	text-align: center;
	color: #f5eefb;
	box-shadow: 0 10px 28px rgba(45, 24, 64, 0.22);
	animation: erp-pago-in 0.45s ease-out 0.12s both;
}

body.erp-theme .erp-pago-yape-top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.5rem;
	margin-bottom: 0.65rem;
}

body.erp-theme .erp-pago-yape-mark {
	font-family: var(--erp-display);
	font-weight: 700;
	font-size: 0.95rem;
	letter-spacing: -0.02em;
}

body.erp-theme .erp-pago-yape-hint {
	font-size: 0.68rem;
	font-weight: 650;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	opacity: 0.72;
}

body.erp-theme .erp-pago-yape-qr {
	margin: 0 auto;
	padding: 0.55rem;
	max-width: 220px;
	background: #fff;
	border-radius: 12px;
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
}

body.erp-theme .erp-pago-yape-qr img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 6px;
}

body.erp-theme .erp-pago-yape-num {
	margin: 0.75rem 0 0;
	display: flex;
	flex-direction: column;
	gap: 0.1rem;
	align-items: center;
}

body.erp-theme .erp-pago-yape-num span {
	font-size: 0.64rem;
	font-weight: 650;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	opacity: 0.7;
}

body.erp-theme .erp-pago-yape-num strong {
	font-family: var(--erp-mono);
	font-size: 1.05rem;
	font-weight: 700;
	letter-spacing: 0.04em;
}

body.erp-theme .erp-pago-side {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	min-width: 0;
}

body.erp-theme .erp-pago-section-label {
	margin: 0 0 0.4rem;
	font-size: 0.68rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--erp-text-muted);
}

body.erp-theme .erp-pago-account-grid {
	display: grid;
	gap: 0.45rem;
	margin-bottom: 0;
}

body.erp-theme .erp-pago-account {
	display: flex;
	flex-direction: column;
	gap: 0.15rem;
	padding: 0.65rem 0.75rem;
	border-radius: 10px;
	border: 1px solid var(--erp-border);
	background: #fff;
}

body.erp-theme .erp-pago-account--bcp {
	border-left: 3px solid #e31837;
}
body.erp-theme .erp-pago-account--ibk {
	border-left: 3px solid #00a651;
}

body.erp-theme .erp-pago-account-bank {
	font-size: 0.7rem;
	font-weight: 650;
	color: var(--erp-text-muted);
	letter-spacing: 0.03em;
	text-transform: uppercase;
}

body.erp-theme .erp-pago-account-nro {
	font-family: var(--erp-mono);
	font-size: 0.95rem;
	font-weight: 700;
	color: var(--erp-text);
	background: transparent;
	padding: 0;
	letter-spacing: 0.03em;
	word-break: break-all;
}

body.erp-theme .erp-pago-contact {
	padding: 0.7rem 0.8rem;
	border-radius: 10px;
	background: var(--erp-action-soft);
	border: 1px solid #c5e4e2;
}

body.erp-theme .erp-pago-contact-label {
	display: block;
	font-size: 0.66rem;
	font-weight: 700;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: var(--erp-action-dark);
	margin-bottom: 0.2rem;
}

body.erp-theme .erp-pago-contact-text {
	margin: 0;
	font-size: 0.88rem;
	color: var(--erp-text);
	line-height: 1.45;
}

body.erp-theme .erp-pago-phone {
	font-weight: 700;
	color: var(--erp-action-dark);
	text-decoration: none;
	border-bottom: 1px dashed rgba(10, 92, 90, 0.35);
}

body.erp-theme .erp-pago-phone:hover {
	color: var(--erp-action);
}

body.erp-theme .erp-pago-admin {
	padding-top: 0.15rem;
}

body.erp-theme .erp-pago-admin label {
	font-size: 0.72rem !important;
	font-weight: 650 !important;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--erp-text-muted) !important;
	margin-bottom: 0.3rem !important;
}

body.erp-theme .erp-pago-footer,
body.erp-theme #div_pago_form_dialog .box-footer.erp-pago-footer {
	display: flex !important;
	justify-content: flex-end;
	align-items: center;
	gap: 0.5rem;
	float: none !important;
	margin: 0;
	padding: 0.85rem 1.15rem;
	border-top: 1px solid var(--erp-border);
	background: #fafcfc;
}

@media (max-width: 575.98px) {
	body.erp-theme .erp-pago-facts--3 {
		grid-template-columns: 1fr;
	}
	body.erp-theme .erp-pago-layout--with-yape {
		grid-template-columns: 1fr;
	}
	body.erp-theme .erp-pago-yape {
		order: -1;
	}
	body.erp-theme .erp-pago-yape-qr {
		max-width: 200px;
	}
	body.erp-theme .erp-pago-modal .modal-dialog {
		margin: 0.65rem;
		max-width: calc(100% - 1.3rem);
	}
}

@media (prefers-reduced-motion: reduce) {
	body.erp-theme .erp-pago-modal-content,
	body.erp-theme #div_pago_form_dialog .modal-content,
	body.erp-theme .erp-pago-hero-icon,
	body.erp-theme .erp-pago-yape {
		animation: none !important;
	}
}

