/**
 * ERP Taller / Repuestos — Tema Fase 1
 * Plomo suave + ámbar operativo + azul acción
 */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
	--erp-primary: #2f3e4e;
	--erp-primary-soft: #4a5d6e;
	--erp-accent: #e8a317;
	--erp-accent-soft: #fdf0d5;
	--erp-accent-dark: #c8840a;
	--erp-action: #3b6fd9;
	--erp-action-soft: #e8f0fe;
	--erp-action-dark: #2f5eb8;
	--erp-success: #059669;
	--erp-danger: #dc2626;
	--erp-warning: #ea580c;
	--erp-info: #0284c7;
	--erp-cont: #6366f1;
	/* Plomo suave */
	--erp-bg: #e9edf2;
	--erp-surface: #f5f7fa;
	--erp-sidebar-bg: #eef2f6;
	--erp-sidebar-hover: #e3e9f0;
	--erp-header-bg: #dde3ea;
	--erp-border: #b8c4d0;
	--erp-text: #243140;
	--erp-text-muted: #5a6a7a;
	--erp-radius: 8px;
	--erp-radius-sm: 6px;
	--erp-shadow: 0 1px 2px rgba(36, 49, 64, 0.07);
	--erp-shadow-md: 0 2px 6px rgba(36, 49, 64, 0.1);
	--erp-font: 'Inter', 'Source Sans Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
	--erp-mono: 'Consolas', 'Roboto Mono', 'Courier New', monospace;
}

/* --- Base --- */
body.erp-theme {
	font-family: var(--erp-font);
	background-color: var(--erp-bg);
	color: var(--erp-text);
	-webkit-font-smoothing: antialiased;
}

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

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-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 (plomo suave) --- */
body.erp-theme .main-header.navbar-erp,
body.erp-theme #header_app.navbar-erp {
	background: linear-gradient(180deg, var(--erp-header-bg) 0%, #d4dbe4 100%) !important;
	border-bottom: 2px solid var(--erp-accent);
	box-shadow: var(--erp-shadow-md);
}

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.9rem;
}

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: rgba(255, 255, 255, 0.45);
	border-radius: var(--erp-radius-sm);
}

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);
}

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;
}

/* --- Sidebar (plomo claro) --- */
body.erp-theme .main-sidebar.erp-sidebar {
	background: linear-gradient(180deg, var(--erp-sidebar-bg) 0%, #e8edf3 100%) !important;
	border-right: 1px solid #d8e0e8;
	box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.6);
}

body.erp-theme .erp-sidebar .brand-link {
	border-bottom: 1px solid #d8e0e8 !important;
	background: rgba(255, 255, 255, 0.55) !important;
	color: var(--erp-text) !important;
}

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

body.erp-theme .erp-sidebar .user-panel {
	border-bottom: 1px solid #d8e0e8;
}

body.erp-theme .erp-sidebar .user-panel .info a,
body.erp-theme .erp-sidebar .user-panel .info {
	color: var(--erp-text) !important;
}

body.erp-theme .erp-sidebar .nav-sidebar > .nav-item > .nav-link {
	border-radius: var(--erp-radius-sm);
	margin: 2px 10px;
	font-size: 0.875rem;
	font-weight: 500;
	color: var(--erp-primary);
}

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

body.erp-theme .erp-sidebar .nav-sidebar > .nav-item > .nav-link.active,
body.erp-theme .erp-sidebar .nav-sidebar .menu-open > .nav-link {
	background: var(--erp-accent-soft) !important;
	color: var(--erp-text) !important;
	border-left: 3px solid var(--erp-accent);
	margin-left: 7px;
	padding-left: calc(0.5rem + 5px);
	font-weight: 600;
	box-shadow: inset 0 0 0 1px rgba(232, 163, 23, 0.25);
}

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

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

body.erp-theme .erp-sidebar .nav-icon {
	font-size: 0.95rem;
	color: var(--erp-text-muted);
}

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

/* POS destacado */
body.erp-theme .erp-sidebar .nav-link.bg-red {
	background: linear-gradient(135deg, #ef4444, #dc2626) !important;
	color: #fff !important;
	border-radius: var(--erp-radius-sm);
	margin: 6px 10px;
	font-weight: 600;
	box-shadow: var(--erp-shadow);
}

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

/* POS — mantener rojo y texto blanco al hover (no usar hover genérico del sidebar) */
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 {
	background: linear-gradient(135deg, #dc2626, #b91c1c) !important;
	color: #fff !important;
	box-shadow: var(--erp-shadow-md);
	border-left: none !important;
	margin-left: 10px !important;
	padding-left: 0.5rem !important;
}

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 {
	color: #fff !important;
}

/* Sidebar mini colapsado: AdminLTE pone color:#fff al expandir en hover (pensado para sidebar oscuro) */
@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: linear-gradient(180deg, var(--erp-sidebar-bg) 0%, #e8edf3 100%) !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-accent-soft) !important;
		color: var(--erp-text) !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;
	}
}

/* Anular active azul Bootstrap en sidebar claro — usar tema ERP */
body.erp-theme .sidebar-light-primary .nav-sidebar > .nav-item > .nav-link.active {
	background: var(--erp-accent-soft) !important;
	color: var(--erp-text) !important;
}

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

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

body.erp-theme .card-header {
	background: linear-gradient(180deg, #fafbfc 0%, #f0f3f7 100%);
	border-bottom: 1px solid var(--erp-border);
	padding: 0.65rem 1rem;
}

body.erp-theme .card-title {
	font-size: 0.95rem;
	font-weight: 600;
	margin-bottom: 0;
}

body.erp-theme .info-box {
	border-radius: var(--erp-radius);
	box-shadow: var(--erp-shadow);
	border: 1px solid var(--erp-border);
	background: var(--erp-surface);
	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-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-accent);
	display: inline-block;
}

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

/* --- Botones --- */
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);
}

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: #78350f;
	font-weight: 600;
}

/* --- Tablas --- */
body.erp-theme .table thead th {
	font-size: 0.78rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--erp-text-muted);
	border-bottom-width: 2px;
	border-color: var(--erp-border);
	background: #eef2f6;
}

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(255, 255, 255, 0.55);
}

body.erp-theme .table-hover tbody tr:hover {
	background-color: rgba(37, 99, 235, 0.06);
}

/* --- Alertas ERP (escritorio) --- */
.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: 8px;
}

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

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

/* --- Escritorio por rol (Fase 2) --- */
.erp-dash-banner-wrap {
	padding-left: 0;
	padding-right: 0;
}

.erp-dash-banner {
	background: var(--erp-surface);
	border: 1px solid var(--erp-border);
	border-radius: var(--erp-radius);
	box-shadow: var(--erp-shadow);
	padding: 12px 16px;
}

.erp-dash-banner h5 {
	font-weight: 600;
	color: var(--erp-text);
	font-size: 1.05rem;
}

.erp-dash-banner h5 .fas {
	color: var(--erp-accent-dark);
	margin-right: 6px;
}

.erp-dash-quicklinks .btn {
	font-size: 0.78rem;
	font-weight: 500;
}

.erp-dash-section {
	margin-bottom: 4px;
}

.erp-dash-section-title {
	font-weight: 600;
	font-size: 0.92rem;
	color: var(--erp-text);
	margin: 0 0 8px 2px;
	letter-spacing: 0.01em;
}

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

.erp-dash-section .info-box-number {
	font-weight: 600;
}

.erp-dash-chart-card .card-header .card-title {
	font-size: 0.95rem;
	font-weight: 600;
}

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

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

/* --- Footer --- */
body.erp-theme .main-footer {
	background: var(--erp-surface);
	border-top: 1px solid var(--erp-border);
	font-size: 0.82rem;
	color: var(--erp-text-muted);
}

/* --- Badges estado (reutilizable) --- */
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);
}

/* --- Fase 3: módulos críticos --- */

/* Barra de acciones fija (venta, OT, etc.) */
.erp-form-with-actionbar {
	padding-bottom: 72px;
}

.erp-action-bar {
	position: sticky;
	bottom: 0;
	left: 0;
	right: 0;
	z-index: 1040;
	background: linear-gradient(180deg, rgba(245, 247, 250, 0.92) 0%, var(--erp-surface) 100%);
	border-top: 2px solid var(--erp-accent);
	box-shadow: 0 -4px 12px rgba(36, 49, 64, 0.12);
	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;
}

/* Toolbar de módulo (listados) */
.erp-module-toolbar.card-header {
	background: var(--erp-surface);
	border-bottom: 1px solid var(--erp-border);
	padding: 10px 14px;
}

.erp-module-toolbar .btn {
	font-size: 0.85rem;
	font-weight: 500;
}

/* Tablas con cabecera sticky */
.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: var(--erp-primary);
	color: #fff;
	font-size: 0.78rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	border-color: var(--erp-primary-soft) !important;
	box-shadow: 0 1px 0 var(--erp-border);
}

body.erp-theme .erp-table-sticky thead th:hover {
	background: var(--erp-primary-soft) !important;
	color: #fff !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);
}

/* Datepicker — fechas legibles al hover */
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;
}

/* Badges unificados */
.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); }

/* Timeline OT */
.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;
}

/* Dashboard contable — cards alineadas al escritorio */
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);
}

/* --- Escritorio Fase 4: complementos --- */
.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;
}
