/* OneUI-style extras (works with Bootstrap 5 CDN) */
:root {
  --bs-border-color: #e2e8ef;
  --oneui-border: #e2e8ef;
  --bs-primary: #001f3d;
  --oneui-primary: #001f3d;
  --bs-primary-rgb: 0, 31, 61;
}
html { -webkit-text-size-adjust: 100%; }
html, body { overflow-x: hidden; }
body { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
#page-container { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; overflow-x: hidden; }
@media (max-width: 991px) {
  #main-container { -webkit-overflow-scrolling: touch; }
}
#main-container { flex: 1 0 auto; }
/* Fondo del área de contenido siempre #f6f7f8 */
.main-content-narrow { background-color: #f6f7f8; }
.hero { display: flex; justify-content: center; align-items: center; width: 100%; min-height: 100vh; min-height: 500px; }
.hero-inner { width: 100%; }
.hero-static { min-height: 100vh; display: flex; align-items: center; }
.btn-alt-primary { color: #fff; background-color: #001f3d; border-color: #001f3d; }
.btn-alt-primary:hover { color: #fff; background-color: #00152b; border-color: #001226; }
.btn-primary { background-color: #001f3d; border-color: #001f3d; color: #fff; }
.btn-primary:hover { background-color: #00152b; border-color: #001226; color: #fff; }
.btn-primary:focus { background-color: #001f3d; border-color: #001f3d; color: #fff; box-shadow: 0 0 0 0.2rem rgba(0, 31, 61, 0.5); }
/* Color primario para texto */
.text-primary { color: #001f3d !important; }
/* Badge primario */
.badge.bg-primary { background-color: #001f3d !important; color: #fff !important; }
.form-control-lg { padding: .75rem 1rem; font-size: 1rem; border-radius: .375rem; }
/* Inputs y botones login (altura moderada, responsive) */
.login-input-lg {
  padding: 0.5rem 0.875rem;
  font-size: 1rem;
  min-height: 2.25rem;
  border-radius: .375rem;
}
.login-btn-lg {
  padding: 0.5rem 1rem;
  font-size: 1rem;
  min-height: 2.25rem;
  font-weight: 600;
  border-radius: .375rem;
}
/* Contenedor input con botón mostrar/ocultar contraseña */
.password-wrap { position: relative; }
.password-wrap .form-control { padding-right: 2.75rem; }
.password-toggle {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #6c757d;
  padding: 0.25rem;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  border-radius: .25rem;
}
.password-toggle:hover { color: #001f3d; }
.me-1 { margin-right: .25rem; }
.fs-sm { font-size: .875rem; }
.g-0 { --bs-gutter-x: 0; --bs-gutter-y: 0; }
.content { padding: 1.875rem 1rem; }
.content-full { max-width: 1200px; margin-left: auto; margin-right: auto; padding-left: 1rem; padding-right: 1rem; }
@media (max-width: 991px) { .content { padding: 1rem; } }
.fs-lg { font-size: 1.125rem; }
.form-control-alt { border-color: #e2e8ef; background-color: #f8f9fa; }
.form-control-alt:focus { border-color: #001f3d; background-color: #fff; box-shadow: 0 0 0 0.2rem rgba(0, 31, 61, 0.25); }
.btn-alt-secondary { color: #6c757d; background-color: #f8f9fa; border-color: #e2e8ef; }
.btn-alt-secondary:hover { color: #495057; background-color: #e9ecef; border-color: #e2e8ef; }
.opacity-50 { opacity: .5; }
.ms-1 { margin-left: .25rem; }
.login-card { max-width: 400px; margin: 0 auto; }
.login-card .block { border: 1px solid #e2e8ef; border-radius: 1rem; box-shadow: 0 .25rem 1rem rgba(0,0,0,.08); overflow: hidden; }
.login-card .block-header { background: #f8f9fa; border-bottom: 1px solid #e2e8ef; padding: 1rem 1.25rem; }
.login-card .block-content { padding: 1.5rem 1.25rem; }
.login-card .form-control { padding: .6rem .875rem; border-radius: .375rem; }
.login-card .btn-primary { padding: .6rem 1rem; font-weight: 600; border-radius: .375rem; }
/* Mensaje de error debajo del campo (validación JS, no HTML5) */
.field-error {
  display: none;
  font-size: 0.875rem;
  margin-top: 0.25rem;
  color: var(--bs-danger, #dc3545);
}
.field-error:not(:empty) { display: block; }
.login-hero-title { font-size: 1.75rem; font-weight: 700; color: #1f2937; letter-spacing: -0.02em; }
.login-hero-sub { font-size: 1rem; color: #6b7280; }
.bg-body-extra-light { background-color: #f8f9fa; }
.bg-body-light { background-color: #f0f2f5; }
.content-header { padding: 0.75rem 1rem; }
/* Título de página: negrita solo en desktop */
.page-title { font-size: 1.25rem; margin-bottom: 1rem; }
@media (min-width: 992px) {
  #main-container .page-title { font-weight: 700; }
}
.link-fx { text-decoration: none; }
.si { font-style: normal; display: inline-block; }
.si-cursor::before { content: "\f245"; font-family: "Font Awesome 6 Free"; font-weight: 900; }
.si-logout::before { content: "\f2f5"; font-family: "Font Awesome 6 Free"; font-weight: 900; }
.tracking-wider { letter-spacing: 0.05em; }
.nav-main { list-style: none; padding: 0; margin: 0; }
.nav-main-link { display: flex; align-items: center; padding: 0.6rem 1rem; color: #495057; text-decoration: none; border-left: 3px solid transparent; }
.nav-main-link:hover { background: rgba(0,0,0,.04); color: #001f3d; }
.nav-main-link.active { background: rgba(0,31,61,.08); color: #001f3d; border-left-color: transparent; }
.nav-main-link-icon { width: 1.5rem; margin-right: 0.75rem; text-align: center; opacity: .7; }
.nav-main-link-name { flex: 1; }
#sidebar { width: 250px; background: #0e172a; position: fixed; top: 0; left: 0; bottom: 0; z-index: 1030; overflow-y: auto; transition: width 0.2s ease; display: flex; flex-direction: column; }
#sidebar .content-side { flex: 1 1 auto; overflow-y: auto; }
#sidebar.sidebar-mini { width: 60px; }
#sidebar.sidebar-mini .sidebar-brand-text { display: none !important; }
#sidebar.sidebar-mini .sidebar-brand-short { display: inline !important; }
#sidebar.sidebar-mini .nav-main-link-name { display: none; }
#sidebar.sidebar-mini .content-header { flex-direction: column; gap: 0.25rem; padding: 0.5rem; }
#sidebar.sidebar-mini .content-header > a { order: 1; }
#sidebar.sidebar-mini .nav-main-link { justify-content: center; padding-left: 0; padding-right: 0; }
#sidebar .sidebar-brand-wrap { display: flex; align-items: center; justify-content: center; text-align: center; width: 100%; }
#sidebar .sidebar-brand-wrap > a { display: block; }
@media (min-width: 992px) {
  #sidebar .sidebar-brand-wrap { justify-content: center; }
  #sidebar .sidebar-brand-wrap > a { width: 100%; text-align: center; }
}
#sidebar .sidebar-close-btn { min-width: 2.5rem; min-height: 2.5rem; text-decoration: none !important; opacity: .9; color: #fff !important; border: none; background: transparent; }
#sidebar .sidebar-close-btn:hover { opacity: 1; color: #fff !important; }
#sidebar .sidebar-close-btn i { color: #fff !important; }
#sidebar .sidebar-footer { margin-top: auto; border-top: 1px solid rgba(255,255,255,.1); }
#sidebar .sidebar-version { font-size: 0.75rem; }
.header-datetime { display: flex; flex-direction: column; line-height: 1.2; }
.header-datetime .header-date { font-size: 0.75rem; }
.header-datetime .header-time { font-size: 0.9rem; }
.header-bcv-rate { background: #f8f9fa; border: 1px solid #e2e8ef; font-size: 0.8rem; }
#page-header .header-bcv-rate { color: #212529; }
@media (max-width: 991.98px) { .header-bcv-rate { display: none !important; } }
#sidebar.sidebar-mini .nav-main-link-icon { margin-right: 0; }
/* Sidebar: links grises, hover claro, activo SIN fondo, texto blanco */
#sidebar .nav-main-link { color: #94a3b8; }
#sidebar .nav-main-link:hover { background: rgba(255,255,255,.08); color: #cbd5e1; }
#sidebar .nav-main-link.active { background: transparent; color: #fff; border-left-color: transparent; }
#sidebar .nav-main-link.active .nav-main-link-icon { opacity: 1; color: #fff; }
#sidebar .content-header { border-bottom: 1px solid rgba(255,255,255,.1); }
#sidebar .font-semibold { color: #fff; }
#page-header { height: 4rem; background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%); border-bottom: 1px solid #e2e8ef; position: fixed; top: 0; right: 0; left: 250px; z-index: 1020; display: flex; align-items: center; padding: 0 1rem; transition: left 0.2s ease; }
#page-header .header-inner { position: relative; width: 100%; }
body.sidebar-mini #page-header { left: 60px; }
.main-content-narrow { margin-left: 250px; padding-top: 4rem; min-height: 100vh; max-width: 90%; margin-right: auto; transition: margin-left 0.2s ease; overflow-x: hidden; display: flex; flex-direction: column; }
.main-content-narrow #main-container { flex: 1 1 auto; }
body.sidebar-mini .main-content-narrow { margin-left: 60px; }
.dashboard-full-width .main-content-narrow { max-width: none; width: calc(100% - 250px); box-sizing: border-box; }
body.sidebar-mini .dashboard-full-width .main-content-narrow { width: calc(100% - 60px); }
/* Footer estático desktop: fecha/hora, USD BCV, base de datos - degradado de fondo */
#page-footer { flex: 0 0 auto; font-size: 0.8rem; flex-wrap: wrap; gap: 0.5rem; background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%) !important; }
#page-footer .page-footer-bcv { border-left: 1px solid #dee2e6; padding-left: 0.75rem; }
#page-footer .page-footer-db { border-left: 1px solid #dee2e6; padding-left: 0.75rem; }
@media (max-width: 991px) {
  #sidebar { width: 100%; max-width: 100%; transform: translateX(-100%); transition: transform 0.2s ease; }
  body.sidebar-open #sidebar { transform: translateX(0); }
  body.sidebar-open #sidebar::after { content: ''; position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: -1; }
  #page-header { left: 0; background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%); border-bottom-color: #e2e8ef; }
  #page-header .header-toggle-btn,
  #page-header .header-back-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    min-width: 2.5rem;
    min-height: 2.5rem;
    background: #e9ecef;
    color: #212529;
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    z-index: 5;
  }
  #page-header .header-toggle-btn:hover,
  #page-header .header-back-btn:hover {
    background: #dee2e6;
    color: #212529;
  }
  .header-title-mobile { display: block !important; position: absolute; left: 50%; transform: translateX(-50%); width: auto; max-width: 60%; text-align: center; color: #212529 !important; }
  .header-datetime { display: none !important; }
  #page-header .dropdown .btn-link { color: #212529 !important; }
  #page-header .dropdown .text-muted { color: #6c757d !important; }
  .main-content-narrow { margin-left: 0; width: 100% !important; max-width: 100% !important; }
  #main-container { width: 100%; max-width: 100%; padding-left: 0.75rem; padding-right: 0.75rem; box-sizing: border-box; overflow-x: hidden; }
  body.dashboard-full-width .main-content-narrow { width: 100% !important; max-width: 100% !important; }
  body.dashboard-full-width #main-container .container-fluid { width: 100%; max-width: 100%; padding-left: 0.75rem; padding-right: 0.75rem; }
  .header-user-wrap { display: none !important; }
  .main-content-narrow { display: block; }
  .main-content-narrow #main-container { flex: none; }
  #page-footer { display: none !important; }
  #sidebar .sidebar-brand-wrap { justify-content: space-between; text-align: left; }
  #sidebar .sidebar-brand-wrap > a { flex: 1; text-align: center; }
  #sidebar .nav-main-link { padding: 0.85rem 1rem; min-height: 2.75rem; font-size: 1rem; }
  #sidebar .nav-main-link-icon { width: 1.5rem; margin-right: 1rem; font-size: 1.1rem; }
}
/* Bottom bar móvil */
.bottom-bar { position: fixed; bottom: 0; left: 0; right: 0; height: calc(88px + env(safe-area-inset-bottom, 0)); background: #0e172a; z-index: 1020; display: flex; align-items: flex-start; justify-content: space-around; padding: 0.4rem 0 env(safe-area-inset-bottom, 0); border-top: 1px solid rgba(255,255,255,.08); }
.bottom-bar-item { display: flex; flex-direction: column; align-items: center; justify-content: flex-start; flex: 1; padding: 0 0.4rem; padding-top: 0.15rem; color: #94a3b8; text-decoration: none; font-size: 0.65rem; min-height: 4rem; -webkit-tap-highlight-color: transparent; }
.bottom-bar-item i { font-size: 1.35rem; margin-bottom: 0.5rem; display: block; }
.bottom-bar-item:hover { color: #94a3b8; }
.bottom-bar-item.active { color: #fff; }
@media (min-width: 992px) {
  .main-content-narrow { padding-bottom: 0; }
}
/* Espacio para bottom bar en móvil */
@media (max-width: 991px) {
  .main-content-narrow { padding-bottom: calc(88px + env(safe-area-inset-bottom, 0) + 0.5rem); }
}
.block-rounded { border-radius: 1rem; }
.block { margin-bottom: 1.25rem; background: #fff; box-shadow: 0 .25rem 1rem rgba(0,0,0,.1); border-radius: 1rem; overflow: hidden; }
.block-header { padding: 0.75rem 1rem; border-bottom: 1px solid #e2e8ef; }
.block-title { margin: 0; font-size: 1rem; font-weight: 600; }
.block-content { padding: 1rem; }
.breadcrumb-alt { padding: 0; margin: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 0.5rem; font-size: 0.875rem; }
.breadcrumb-item a { color: #6c757d; text-decoration: none; }
.breadcrumb-item a:hover { color: #001f3d; }
.items-push > * { margin-bottom: 1.25rem; }
.block-link-shadow { transition: box-shadow 0.2s ease; }
.block-link-shadow:hover { box-shadow: 0 4px 12px rgba(0,0,0,.12); }
.table-vcenter td { vertical-align: middle; }

/* Dashboard: fondo gris claro, cards blancos, totales primario, tabla con bordes */
body.dashboard-full-width .main-content-narrow { background-color: #f6f7f8; }
body.dashboard-full-width .main-content-narrow .block { background: #fff; border-radius: 1rem; box-shadow: 0 .25rem 1rem rgba(0,0,0,.1); }
.dashboard-stat-card,
.dashboard-stat-card .block-content,
.dashboard-stat-card .bg-body-light { background: #fff !important; background-color: #fff !important; }
.dashboard-stat-card { border-radius: 1rem !important; -webkit-border-radius: 1rem !important; border: 1px solid #e2e8ef; box-shadow: 0 .25rem 1rem rgba(0,0,0,.1) !important; overflow: hidden; transition: box-shadow 0.2s ease; }
.dashboard-stat-card:hover { color: inherit; box-shadow: 0 .35rem 1.25rem rgba(0,0,0,.12) !important; }

/* Dashboard stat widgets: header primario, icono de fondo en body */
.dashboard-stat-widget { background: #fff !important; border: 1px solid #e2e8ef; border-radius: 1rem; box-shadow: 0 .25rem 1rem rgba(0,0,0,.1); transition: box-shadow 0.2s ease; }
.dashboard-stat-widget:hover { box-shadow: 0 .35rem 1.25rem rgba(0,0,0,.12); }
.dashboard-stat-widget-header { flex-shrink: 0; background-color: #001f3d !important; }
.dashboard-stat-widget-body { background: #fff; min-height: 3.5rem; }
.dashboard-stat-widget-bg-icon {
  position: absolute;
  right: 0.5rem;
  bottom: 0.25rem;
  font-size: 3.5rem;
  opacity: 0.08;
  color: #001f3d;
  pointer-events: none;
}
/* Dashboard stat widget: números con color primario */
.dashboard-stat-widget-body .text-primary { color: #001f3d !important; }
.dashboard-stat-widget-body .fs-2 { color: #001f3d !important; }
.block-dashboard-table { border-radius: 1rem; overflow: hidden; box-shadow: 0 .25rem 1rem rgba(0,0,0,.1); }
.table-dashboard-last-orders { overflow: hidden; border-radius: 0 0 1rem 1rem; }
.table-dashboard-orders { border-collapse: collapse; }
.table-dashboard-orders thead th { background-color: #001f3d; color: #fff; border-bottom: 1px solid rgba(255,255,255,.2); padding: 0.75rem 1rem; font-weight: 600; }
.table-dashboard-orders tbody td { border-bottom: 1px solid #e2e8ef; padding: 0.75rem 1rem; background-color: #fff; }
.table-dashboard-orders tbody tr:last-child td { border-bottom: 0; }
.table-dashboard-orders tbody tr:nth-of-type(even) td { background-color: #f9fafe; }
/* Últimos pedidos: cards en móvil */
.last-orders-cards-list { display: flex; flex-direction: column; gap: 0.5rem; }
.last-order-card { display: block; background: #fff; border-radius: 1rem; border: 1px solid #e2e8ef; box-shadow: 0 2px 8px rgba(0,0,0,.08); transition: box-shadow 0.2s ease; overflow: hidden; }
.last-order-card:hover { box-shadow: 0 4px 14px rgba(0,0,0,.1); }
.last-order-card-header { background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%); border-bottom: 1px solid #e2e8ef; display: flex; align-items: center; justify-content: center; text-align: center; }
.last-order-card-header-code { display: block; width: 100%; }
.last-order-card-header-icon { color: #001f3d; font-size: 0.9rem; }
.last-order-card-body { }
.last-order-card-row-icon { width: 1.25rem; text-align: center; flex-shrink: 0; font-size: 0.8rem; }
.last-order-card-footer { background: #f8f9fa; border-top: 1px solid #e2e8ef; }
.last-order-card-footer .fa-chevron-right { font-size: 0.65rem; }
/* Móvil: header de card mismo degradado que page-header, código centrado, monto 3 decimales centrado sin icono */
@media (max-width: 991px) {
  .last-order-card-header { background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%); }
  .last-order-card-total-row { justify-content: center !important; }
  .last-order-card-total-row .last-order-card-row-icon { display: none !important; }
  .last-order-card-total-row .last-order-card-amount { text-align: center; width: 100%; }
}

/* Empty state últimos pedidos: icono inbox + texto */
.last-orders-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 1rem;
  text-align: center;
}
.last-orders-empty-icon {
  font-size: 3rem;
  color: #ced4da;
  margin-bottom: 0.75rem;
}
.last-orders-empty-text {
  margin: 0;
  color: #6c757d;
  font-size: 0.9375rem;
}
.last-orders-empty-cards {
  padding: 2rem 1rem;
}
.last-orders-empty-cards .last-orders-empty-icon {
  font-size: 2.5rem;
}

/* Detalle pedido: líneas como cards en móvil */
.order-lines-cards-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.order-line-card {
  background: #fff;
  border-radius: 1rem;
  border: 1px solid #e2e8ef;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  overflow: hidden;
  transition: box-shadow 0.2s ease;
}
.order-line-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}
.order-line-card-header {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border-bottom: 1px solid #e2e8ef;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
}
.order-line-card-num {
  font-weight: 600;
  color: #495057;
}
.order-line-card-total {
  font-size: 1rem;
}
.order-line-card-body {
  padding: 0.75rem;
  font-size: 0.875rem;
}
.order-line-card-art {
  line-height: 1.4;
}
.order-line-card-row {
  margin-top: 0.25rem;
  padding-top: 0.5rem;
  border-top: 1px solid #e2e8ef;
}
.order-lines-empty {
  color: #6c757d;
  font-size: 0.875rem;
}

/* Global page loader (spinner) - fullscreen overlay */
.global-page-loader {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}
.global-page-loader-backdrop {
  position: absolute;
  inset: 0;
  background-color: rgba(255, 255, 255, 0.9);
}
.global-page-loader-spinner {
  position: relative;
  z-index: 1;
}
.global-page-loader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* API Data Table Custom: dos cards (filtros + tabla/paginador), esquinas 1rem, paginador centrado */
.api-datatable-custom {
  /* wrapper sin estilo de card */
}
/* Card principal que envuelve todo el data table (igual que tabla últimos pedidos) */
.api-dt-main-card {
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 .25rem 1rem rgba(0, 0, 0, 0.1);
  background: #fff;
  border: 1px solid #e2e8ef;
}
.api-dt-filters-card,
.api-dt-table-card {
  border-radius: 0 !important;
  overflow: hidden;
  border: none !important;
  box-shadow: none !important;
}
.api-dt-filters-card {
  border-bottom: 1px solid #e2e8ef !important;
}
/* Botón Nuevo sobre data tables: sombra visible */
.btn-nuevo-shadow {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  transition: box-shadow 0.2s ease;
}
.btn-nuevo-wrap .btn-nuevo-shadow:hover {
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.16);
}
.api-datatable-custom .api-dt-per-page-wrap {
  display: none !important; /* oculto por ahora */
}
.api-datatable-custom .api-dt-toolbar {
  flex-wrap: wrap;
}
/* Vista desktop: filtros en una sola fila, reparto igual del espacio */
@media (min-width: 768px) {
  .api-datatable-custom .api-dt-toolbar {
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 0.5rem;
  }
  /* Contenedor de filtros + búsqueda + botón: una sola fila, ocupa el espacio disponible */
  .api-datatable-custom .api-dt-filters-and-search {
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 0.5rem;
    flex: 1 1 auto;
    min-width: 0;
    width: 100%;
  }
  /* Los 4 selects (Almacén, Categoría, Línea, Sublínea) comparten espacio por igual */
  .api-datatable-custom .api-dt-filters-unified {
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 0.5rem;
    flex: 1 1 0;
    min-width: 0;
  }
  .api-datatable-custom .api-dt-warehouse-wrap,
  .api-datatable-custom .api-dt-toolbar .api-dt-filter-item {
    display: flex;
    align-items: stretch;
    flex: 1 1 0;
    min-width: 0;
    position: relative;
  }
  /* Altura unificada: todos 2.25rem */
  .api-datatable-custom .api-dt-filter-custom-desk-trigger,
  .api-datatable-custom .api-dt-search,
  .api-datatable-custom .api-dt-search-wrap .form-control,
  .api-datatable-custom .api-dt-clear-filters {
    height: 2.25rem !important;
    min-height: 2.25rem !important;
    max-height: 2.25rem !important;
    box-sizing: border-box;
    line-height: 1.25;
    flex-shrink: 0;
  }
  .api-datatable-custom .api-dt-desk-control-wrap.api-dt-filter-custom-desk-wrap {
    flex: 1 1 0;
    min-width: 0;
  }
  .api-datatable-custom .api-dt-desk-control-wrap.api-dt-filter-custom-desk-wrap .api-dt-filter-custom-desk-trigger {
    width: 100%;
    min-width: 0;
  }
  .api-datatable-custom .api-dt-desk-control-wrap.api-dt-search-wrap {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    align-items: stretch;
  }
  .api-datatable-custom .api-dt-desk-control-wrap.api-dt-search-wrap .input-group-api-dt-search,
  .api-datatable-custom .api-dt-desk-control-wrap.api-dt-search-wrap .api-dt-search {
    min-width: 0;
    width: 100%;
    flex: 1;
  }
  .api-datatable-custom .api-dt-clear-filters {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    min-width: 6rem;
    white-space: nowrap;
    border: none;
  }
  .api-datatable-custom .api-dt-clear-filters.btn-primary {
    background-color: #001f3d;
    color: #fff;
  }
  .api-datatable-custom .api-dt-clear-filters.btn-primary:hover {
    background-color: #0d52b8;
    color: #fff;
  }
  /* Desktop: filtros con custom dropdown (mismo diseño que registros por página) */
  .api-datatable-custom .api-dt-filter-custom-desk-wrap {
    position: relative;
  }
  .api-datatable-custom .api-dt-filter-custom-desk-wrap .api-dt-filter-native-desk {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
    clip: rect(0, 0, 0, 0);
  }
  .api-datatable-custom .api-dt-filter-custom-desk-trigger {
    min-width: 0;
    width: 100%;
    min-height: 2.25rem;
    height: 2.25rem;
    border-radius: 0.375rem;
    padding: 0.375rem 1.75rem 0.375rem 0.75rem;
    border: 1px solid #e2e8ef;
    font-size: 0.875rem;
    background-color: #fff;
    color: #495057;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    text-align: left;
    appearance: none;
    overflow: hidden;
  }
  .api-datatable-custom .api-dt-filter-custom-desk-trigger .api-dt-filter-custom-desk-trigger-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
  }
  .api-datatable-custom .api-dt-filter-custom-desk-trigger:hover:not(:disabled) {
    border-color: #adb5bd;
  }
  .api-datatable-custom .api-dt-filter-custom-desk-trigger:focus {
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
    outline: 0;
  }
  .api-datatable-custom .api-dt-filter-custom-desk-trigger:disabled {
    opacity: 0.65;
    cursor: not-allowed;
  }
  .api-datatable-custom .api-dt-filter-custom-desk-chevron {
    font-size: 0.7rem;
    opacity: 0.7;
    pointer-events: none;
  }
  .api-datatable-custom .api-dt-filter-custom-desk-panel {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 0.25rem;
    min-width: 100%;
    width: 10rem;
    background: #fff;
    border: 1px solid #e2e8ef;
    border-radius: 0.375rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    z-index: 1050;
    max-height: 16rem;
    overflow: hidden;
    display: none;
  }
  .api-datatable-custom .api-dt-filter-custom-desk-panel.is-open,
  .api-datatable-custom .api-dt-filter-custom-desk-panel[aria-hidden="false"] {
    display: flex;
    flex-direction: column;
  }
  .api-datatable-custom .api-dt-filter-custom-desk-option {
    display: block;
    width: 100%;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    text-align: left;
    border: none;
    background: none;
    cursor: pointer;
    color: #212529;
  }
  .api-datatable-custom .api-dt-filter-custom-desk-option:hover {
    background-color: #f8f9fa;
  }
  .api-datatable-custom .api-dt-filter-custom-desk-option.is-selected {
    background-color: rgba(0, 31, 61, 0.08);
    color: #001f3d;
    font-weight: 500;
  }
}
/* Select: native oculto cuando hay trigger custom */
.api-dt-per-page-wrap {
  position: relative;
}
.api-dt-per-page-wrap .api-dt-per-page {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
  clip: rect(0, 0, 0, 0);
}
.api-dt-per-page-trigger {
  min-width: 4.5rem;
  border-radius: 0.375rem;
  padding: 0.35rem 1.75rem 0.35rem 0.75rem;
  border: 1px solid #e2e8ef;
  font-size: 0.875rem;
  background-color: #fff;
  color: #495057;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  text-align: left;
  appearance: none;
}
.api-dt-per-page-trigger:hover {
  border-color: #adb5bd;
}
.api-dt-per-page-trigger:focus {
  border-color: #86b7fe;
  box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
  outline: 0;
}
.api-dt-per-page-chevron {
  font-size: 0.7rem;
  opacity: 0.7;
  pointer-events: none;
}
/* Dropdown desktop: esquinas redondeadas */
.api-dt-per-page-panel {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 0.25rem;
  min-width: 100%;
  background: #fff;
  border: 1px solid #e2e8ef;
  border-radius: 0.375rem;
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
  z-index: 1050;
  max-height: 16rem;
  overflow-y: auto;
  display: none;
}
.api-dt-per-page-panel.is-open {
  display: block;
}
.api-dt-per-page-panel[aria-hidden="false"] {
  display: block;
}
.api-dt-per-page-panel.is-sheet.is-open,
.api-dt-per-page-panel.is-sheet[aria-hidden="false"] {
  display: flex !important;
}
.api-dt-per-page-option {
  display: block;
  width: 100%;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  text-align: left;
  border: none;
  background: none;
  cursor: pointer;
  color: #212529;
}
.api-dt-per-page-option:hover {
  background-color: #f8f9fa;
}
.api-dt-per-page-option.is-selected {
  background-color: rgba(0, 31, 61, 0.08);
  color: #001f3d;
  font-weight: 500;
}
/* Bottom sheet móvil */
.api-dt-per-page-sheet-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 1040;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.api-dt-per-page-sheet-backdrop.is-open {
  display: block;
  opacity: 1;
}
.api-dt-per-page-sheet-title {
  display: none;
  padding: 0;
  margin: 0;
  font-weight: 600;
  font-size: 1rem;
}
@media (max-width: 767.98px) {
  .api-dt-per-page-panel.is-sheet {
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    top: auto !important;
    margin: 0 !important;
    min-width: 0 !important;
    height: 60vh !important;
    max-height: 60vh !important;
    border-radius: 1rem 1rem 0 0;
    border: none;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    padding-bottom: env(safe-area-inset-bottom, 0);
    animation: api-dt-sheet-in 0.25s ease-out;
    display: flex !important;
    flex-direction: column;
    background: #fff;
  }
  .api-dt-per-page-panel.is-sheet .api-dt-per-page-sheet-title-wrap {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
    border-bottom: 1px solid #e2e8ef;
    background: #fff;
    position: sticky;
    top: 0;
    z-index: 1;
    padding: 0.75rem 1rem 1rem;
  }
  .api-dt-per-page-panel.is-sheet .api-dt-per-page-sheet-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    padding: 0;
    border: none;
    background: transparent;
    color: #6c757d;
    cursor: pointer;
    border-radius: 0.375rem;
    flex-shrink: 0;
  }
  .api-dt-per-page-panel.is-sheet .api-dt-per-page-sheet-close:hover {
    color: #212529;
    background: #f8f9fa;
  }
  .api-dt-per-page-panel.is-sheet .api-dt-per-page-sheet-close .fa {
    font-size: 1.25rem;
  }
  .api-dt-per-page-panel.is-sheet .api-dt-per-page-sheet-title {
    display: block;
    text-align: center;
    padding: 0;
    margin: 0;
    flex: 1;
    color: #495057;
  }
  .api-dt-per-page-panel.is-sheet .api-dt-per-page-sheet-title::before {
    content: '';
    display: block;
    width: 2.5rem;
    height: 0.25rem;
    background: #dee2e6;
    border-radius: 2px;
    margin: 0 auto 0.75rem;
  }
  .api-dt-per-page-panel.is-sheet .api-dt-per-page-options {
    text-align: center;
    padding: 0;
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .api-dt-per-page-panel.is-sheet .api-dt-per-page-option {
    display: block;
    width: 100%;
    text-align: center;
    padding: 0.75rem 1rem;
    font-size: 1rem;
  }
  .api-dt-per-page-option {
    padding: 0.75rem 1rem;
    font-size: 1rem;
  }
}
@keyframes api-dt-sheet-in {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

/* Form custom select: mismo diseño que cantidad de registros; desktop = dropdown, móvil = bottom sheet */
.form-custom-select-wrap {
  position: relative;
  width: 100%;
}
.form-custom-select-wrap .form-custom-select-native {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
  clip: rect(0, 0, 0, 0);
}
.form-custom-select-trigger {
  width: 100%;
  min-height: calc(1.5em + 0.75rem + 2px);
  border-radius: 0.375rem;
  padding: 0.375rem 2rem 0.375rem 0.75rem;
  border: 1px solid #e2e8ef;
  font-size: 1rem;
  background-color: #fff;
  color: #212529;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  text-align: left;
  appearance: none;
}
.form-custom-select-trigger:hover {
  border-color: #adb5bd;
}
.form-custom-select-trigger:focus {
  border-color: #86b7fe;
  box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
  outline: 0;
}
.form-custom-select-chevron {
  font-size: 0.7rem;
  opacity: 0.7;
  pointer-events: none;
  flex-shrink: 0;
}
.form-custom-select-panel {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 0.25rem;
  min-width: 100%;
  background: #fff;
  border: 1px solid #e2e8ef;
  border-radius: 0.375rem;
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
  z-index: 1050;
  max-height: 16rem;
  overflow-y: auto;
  display: none;
}
@media (min-width: 768px) {
  .form-custom-select-panel {
    right: auto;
  }
}
.form-custom-select-panel.is-open {
  display: block;
}
.form-custom-select-panel[aria-hidden="false"] {
  display: block;
}
.form-custom-select-panel.is-sheet.is-open,
.form-custom-select-panel.is-sheet[aria-hidden="false"] {
  display: flex !important;
}
.form-custom-select-option {
  display: block;
  width: 100%;
  padding: 0.5rem 0.75rem;
  font-size: 1rem;
  text-align: left;
  border: none;
  background: none;
  cursor: pointer;
  color: #212529;
}
.form-custom-select-option:hover {
  background-color: #f8f9fa;
}
.form-custom-select-option.is-selected {
  background-color: rgba(0, 31, 61, 0.08);
  color: #001f3d;
  font-weight: 500;
}
.form-custom-select-sheet-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 1040;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.form-custom-select-sheet-backdrop.is-open {
  display: block;
  opacity: 1;
}
.form-custom-select-sheet-title {
  display: none;
  padding: 0;
  margin: 0;
  font-weight: 600;
  font-size: 1rem;
}
@media (max-width: 767.98px) {
  .form-custom-select-panel.is-sheet {
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    top: auto !important;
    margin: 0 !important;
    min-width: 0 !important;
    height: 60vh !important;
    max-height: 60vh !important;
    border-radius: 1rem 1rem 0 0;
    border: none;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    padding-bottom: env(safe-area-inset-bottom, 0);
    animation: api-dt-sheet-in 0.25s ease-out;
    display: flex !important;
    flex-direction: column;
    background: #fff;
  }
  .form-custom-select-panel.is-sheet .form-custom-select-sheet-title-wrap {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
    border-bottom: 1px solid #e2e8ef;
    background: #fff;
    position: sticky;
    top: 0;
    z-index: 1;
    padding: 0.75rem 1rem 1rem;
  }
  .form-custom-select-panel.is-sheet .form-custom-select-sheet-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    padding: 0;
    border: none;
    background: transparent;
    color: #6c757d;
    cursor: pointer;
    border-radius: 0.375rem;
    flex-shrink: 0;
  }
  .form-custom-select-panel.is-sheet .form-custom-select-sheet-close:hover {
    color: #212529;
    background: #f8f9fa;
  }
  .form-custom-select-panel.is-sheet .form-custom-select-sheet-title {
    display: block;
    text-align: center;
    padding: 0;
    margin: 0;
    flex: 1;
    color: #495057;
  }
  .form-custom-select-panel.is-sheet .form-custom-select-sheet-title::before {
    content: '';
    display: block;
    width: 2.5rem;
    height: 0.25rem;
    background: #dee2e6;
    border-radius: 2px;
    margin: 0 auto 0.75rem;
  }
  .form-custom-select-panel.is-sheet .form-custom-select-options {
    padding: 0;
    text-align: center;
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .form-custom-select-panel.is-sheet .form-custom-select-option {
    display: block;
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    text-align: center;
  }
}

/* Form custom date picker: mismo diseño que custom select; desktop = dropdown calendar, móvil = bottom sheet */
.form-custom-datepicker-wrap {
  position: relative;
  width: 100%;
}
.form-custom-datepicker-wrap .form-custom-datepicker-native {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
  clip: rect(0, 0, 0, 0);
}
.form-custom-datepicker-trigger {
  width: 100%;
  min-height: calc(1.5em + 0.75rem + 2px);
  border-radius: 0.375rem;
  padding: 0.375rem 2rem 0.375rem 0.75rem;
  border: 1px solid #e2e8ef;
  font-size: 1rem;
  background-color: #fff;
  color: #212529;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  text-align: left;
  appearance: none;
}
.form-custom-datepicker-trigger:hover {
  border-color: #adb5bd;
}
.form-custom-datepicker-trigger:focus {
  border-color: #86b7fe;
  box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
  outline: 0;
}
.form-custom-datepicker-icon {
  font-size: 0.875rem;
  opacity: 0.7;
  pointer-events: none;
  flex-shrink: 0;
}
.form-custom-datepicker-panel {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 0.25rem;
  min-width: 100%;
  background: #fff;
  border: 1px solid #e2e8ef;
  border-radius: 0.375rem;
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
  z-index: 1050;
  padding: 0.75rem;
  display: none;
  max-width: 320px;
}
.form-custom-datepicker-panel.is-open {
  display: block;
}
.form-custom-datepicker-panel[aria-hidden="false"] {
  display: block;
}
.form-custom-datepicker-panel.is-sheet.is-open,
.form-custom-datepicker-panel.is-sheet[aria-hidden="false"] {
  display: flex !important;
}
@media (min-width: 768px) {
  .form-custom-datepicker-panel {
    right: auto;
  }
}
.form-custom-datepicker-sheet-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 1040;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.form-custom-datepicker-sheet-backdrop.is-open {
  display: block;
  opacity: 1;
}
.form-custom-datepicker-sheet-title {
  display: none;
  padding: 0;
  margin: 0;
  font-weight: 600;
  font-size: 1rem;
}
.form-custom-datepicker-calendar-container {
  width: 100%;
}
.form-custom-datepicker-header {
  user-select: none;
  background: #f8f9fa;
  border-radius: 0.375rem;
  margin: -0.75rem -0.75rem 0.5rem;
  padding: 0.5rem;
}
.form-custom-datepicker-prev,
.form-custom-datepicker-next {
  padding: 0.375rem 0.5rem;
  color: #495057;
  text-decoration: none;
  border: none;
  background: none;
  cursor: pointer;
  font-size: 0.875rem;
  border-radius: 0.25rem;
  transition: all 0.15s;
  min-width: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.form-custom-datepicker-prev:hover,
.form-custom-datepicker-next:hover {
  color: #001f3d;
  background: rgba(0, 31, 61, 0.08);
}
.form-custom-datepicker-month-year {
  text-transform: capitalize;
  font-size: 0.9375rem;
  font-weight: 600;
  color: #212529;
}
.form-custom-datepicker-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.25rem;
  margin-bottom: 0.5rem;
  padding: 0 0.25rem;
}
.form-custom-datepicker-weekday {
  text-align: center;
  font-size: 0.75rem;
  font-weight: 600;
  color: #6c757d;
  padding: 0.375rem 0.25rem;
}
.form-custom-datepicker-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.25rem;
  padding: 0 0.25rem;
}
.form-custom-datepicker-day {
  aspect-ratio: 1;
  border: 1px solid transparent;
  background: none;
  border-radius: 0.25rem;
  font-size: 0.875rem;
  cursor: pointer;
  color: #212529;
  padding: 0.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, border-color 0.15s;
  min-height: 2rem;
}
.form-custom-datepicker-day:hover:not(.form-custom-datepicker-day-empty) {
  background: #f8f9fa;
  border-color: #e2e8ef;
}
.form-custom-datepicker-day-today {
  background: rgba(0, 31, 61, 0.08);
  border-color: #001f3d;
  font-weight: 600;
}
.form-custom-datepicker-day-selected {
  background: #001f3d;
  color: #fff;
  border-color: #001f3d;
  font-weight: 600;
}
.form-custom-datepicker-day-selected:hover {
  background: #00152b;
  border-color: #00152b;
}
.form-custom-datepicker-day-empty {
  cursor: default;
  pointer-events: none;
}
@media (max-width: 767.98px) {
  .form-custom-datepicker-panel.is-sheet {
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    top: auto !important;
    margin: 0 !important;
    min-width: 0 !important;
    width: 100% !important;
    max-width: none !important;
    height: auto !important;
    /* Permite scroll solo si en pantallas bajas no entra completo */
    max-height: calc(100dvh - 4.5rem) !important;
    overflow-y: auto;
    border-radius: 1rem 1rem 0 0;
    border: none;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    padding-bottom: env(safe-area-inset-bottom, 0);
    animation: api-dt-sheet-in 0.25s ease-out;
    display: flex !important;
    flex-direction: column;
    background: #fff;
  }
  .form-custom-datepicker-panel.is-sheet .form-custom-datepicker-sheet-title-wrap {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
    border-bottom: 1px solid #e2e8ef;
    background: #fff;
    position: sticky;
    top: 0;
    z-index: 1;
    padding: 0.75rem 1rem 1rem;
  }
  .form-custom-datepicker-panel.is-sheet .form-custom-datepicker-sheet-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    padding: 0;
    border: none;
    background: transparent;
    color: #6c757d;
    cursor: pointer;
    border-radius: 0.375rem;
    flex-shrink: 0;
  }
  .form-custom-datepicker-panel.is-sheet .form-custom-datepicker-sheet-close:hover {
    color: #212529;
    background: #f8f9fa;
  }
  .form-custom-datepicker-panel.is-sheet .form-custom-datepicker-sheet-title {
    display: block;
    text-align: center;
    padding: 0;
    margin: 0;
    flex: 1;
    color: #495057;
  }
  .form-custom-datepicker-panel.is-sheet .form-custom-datepicker-sheet-title::before {
    content: '';
    display: block;
    width: 2.5rem;
    height: 0.25rem;
    background: #dee2e6;
    border-radius: 2px;
    margin: 0 auto 0.75rem;
  }
  .form-custom-datepicker-panel.is-sheet .form-custom-datepicker-calendar-container {
    padding: 0.75rem 1rem 1rem;
    /* Mantener el alto al tamaño del calendario */
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
  }
  .form-custom-datepicker-panel.is-sheet .form-custom-datepicker-calendar-container .form-custom-datepicker-calendar {
    width: 100%;
    /* Calendario centrado, pero aprovechando mejor pantallas grandes */
    max-width: 26rem;
    flex-shrink: 0;
  }
  .form-custom-datepicker-panel.is-sheet .form-custom-datepicker-days {
    min-height: auto;
  }
  .form-custom-datepicker-panel.is-sheet .form-custom-datepicker-day {
    min-height: 2.25rem;
    aspect-ratio: 1;
  }
}

/* Filtros móvil: full width, custom select con bottom sheet */
.api-dt-filters .api-dt-filter-item {
  width: 100%;
}
.api-dt-filters .form-custom-select-wrap {
  width: 100%;
}

/* Buscador: altura estándar como el resto de inputs, solo placeholder (sin icono) */
.api-datatable-custom .input-group-api-dt-search {
  min-height: 2.25rem;
}
.api-datatable-custom .api-dt-search {
  min-height: 2.25rem;
  height: 2.25rem;
  padding: 0.375rem 0.75rem;
  font-size: 0.875rem;
  border: 1px solid #e2e8ef;
  border-radius: 0.375rem 0.375rem 0.375rem 0.375rem;
  width: 100%;
  background-color: #fff;
}
.api-datatable-custom .api-dt-search:focus {
  border-color: #001f3d;
  box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
  outline: 0;
}
/* Date range filter: ancho mínimo para ver bien la fecha */
.api-datatable-custom .api-dt-date-range-wrap .form-custom-datepicker-wrap,
.api-datatable-custom .api-dt-filters-date .form-custom-datepicker-wrap {
  min-width: 11rem;
}
/* CXC (Cuentas por cobrar): filtros más anchos, búsqueda como un select, Limpiar primario */
@media (min-width: 768px) {
  .api-datatable-custom.api-dt-is-cxc .api-dt-filters-and-search {
    flex-wrap: nowrap;
  }
  .api-datatable-custom.api-dt-is-cxc .api-dt-filters-unified {
    flex-wrap: nowrap;
    flex: 1 1 0;
    min-width: 0;
  }
  .api-datatable-custom.api-dt-is-cxc .api-dt-filters-unified .form-custom-datepicker-wrap,
  .api-datatable-custom.api-dt-is-cxc .api-dt-filters-unified .api-dt-client-wrap,
  .api-datatable-custom.api-dt-is-cxc .api-dt-filters-unified .api-dt-document-type-wrap {
    flex: 1 1 0;
    display: flex;
    align-items: stretch;
  }
  .api-datatable-custom.api-dt-is-cxc .api-dt-filters-unified .form-custom-datepicker-wrap {
    min-width: 10rem;
  }
  .api-datatable-custom.api-dt-is-cxc .api-dt-filters-unified .api-dt-client-wrap {
    min-width: 14rem;
  }
  .api-datatable-custom.api-dt-is-cxc .api-dt-filters-unified .api-dt-document-type-wrap {
    min-width: 10rem;
  }
  .api-datatable-custom.api-dt-is-cxc .api-dt-filters-unified .form-custom-datepicker-trigger,
  .api-datatable-custom.api-dt-is-cxc .api-dt-filters-unified .api-dt-filter-custom-desk-trigger {
    min-width: 100%;
  }
  .api-datatable-custom.api-dt-is-cxc .api-dt-filters-unified .form-custom-datepicker-trigger {
    height: 2.25rem !important;
    min-height: 2.25rem !important;
    max-height: 2.25rem !important;
    padding: 0.375rem 1.75rem 0.375rem 0.75rem;
    font-size: 0.875rem;
    box-sizing: border-box;
    line-height: 1.25;
    min-width: 0;
    overflow: hidden;
  }
  .api-datatable-custom.api-dt-is-cxc .api-dt-filters-unified .form-custom-datepicker-trigger .form-custom-datepicker-trigger-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
  }
  /* Input de búsqueda mismo ancho que un select (como los filtros) */
  .api-datatable-custom.api-dt-is-cxc .api-dt-search-wrap {
    flex: 0 0 auto;
    min-width: 11rem;
    max-width: 11rem;
  }
  .api-datatable-custom.api-dt-is-cxc .api-dt-search-wrap .api-dt-search {
    width: 100%;
  }
  .api-datatable-custom.api-dt-is-cxc .api-dt-export-btn {
    flex-shrink: 0;
  }
}

/* CXC móvil: sin línea superior en bloque de fechas; Fecha ini/Fecha fin mismo ancho, alto y espacio que Clientes/Tipo doc */
@media (max-width: 767.98px) {
  .api-datatable-custom.api-dt-is-cxc .api-dt-filters-date.api-dt-cxc-mob-dates {
    border-top: none !important;
    flex-direction: column;
    width: 100%;
    padding-top: 0.5rem;
    gap: 0.5rem;
  }
  .api-datatable-custom.api-dt-is-cxc .api-dt-filters-date.api-dt-cxc-mob-dates .api-dt-cxc-date-wrap {
    width: 100%;
    min-width: 0;
  }
  .api-datatable-custom.api-dt-is-cxc .api-dt-filters-date.api-dt-cxc-mob-dates .api-dt-cxc-date-wrap .form-control {
    width: 100%;
    min-height: 2.25rem;
    height: 2.25rem;
    max-height: 2.25rem;
    box-sizing: border-box;
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    line-height: 1.25;
  }
  .api-datatable-custom.api-dt-is-cxc .api-dt-filters-date.api-dt-cxc-mob-dates .form-custom-datepicker-trigger {
    width: 100%;
    min-height: 2.25rem;
    height: 2.25rem;
    box-sizing: border-box;
  }
}

/* CXC móvil: ocultar filtros genéricos y bloque fechas suelto; stack único mismo orden que desktop, full width, mismo alto */
@media (max-width: 991.98px) {
  .api-datatable-custom.api-dt-is-cxc .api-dt-cxc-hide-mob {
    display: none !important;
  }
}
@media (max-width: 767.98px) {
  .api-datatable-custom.api-dt-is-cxc .api-dt-cxc-mobile-stack {
    width: 100%;
    max-width: 100%;
  }
  .api-datatable-custom.api-dt-is-cxc .api-dt-cxc-mobile-stack .api-dt-cxc-mob-row {
    width: 100%;
    min-width: 0;
    flex: 0 0 auto;
  }
  .api-datatable-custom.api-dt-is-cxc .api-dt-cxc-mobile-stack .api-dt-cxc-mob-control,
  .api-datatable-custom.api-dt-is-cxc .api-dt-cxc-mobile-stack .form-control,
  .api-datatable-custom.api-dt-is-cxc .api-dt-cxc-mobile-stack .form-select {
    width: 100% !important;
    min-width: 0;
    min-height: 2.25rem;
    height: 2.25rem;
    box-sizing: border-box;
  }
  .api-datatable-custom.api-dt-is-cxc .api-dt-cxc-mobile-stack .form-custom-datepicker-wrap {
    width: 100%;
    min-width: 0;
  }
  .api-datatable-custom.api-dt-is-cxc .api-dt-cxc-mobile-stack .form-custom-datepicker-wrap .form-control {
    width: 100% !important;
    min-height: 2.25rem;
    height: 2.25rem;
    box-sizing: border-box;
  }
  .api-datatable-custom.api-dt-is-cxc .api-dt-cxc-mobile-stack .btn {
    min-height: 2.25rem;
    height: 2.25rem;
  }
}

/* Pedidos móvil: ocultar filtros duplicados; stack Código, Fecha ini, Fecha fin, Clientes, Limpiar con mismo ancho y alto */
@media (max-width: 767.98px) {
  .api-datatable-custom.api-dt-is-orders .api-dt-orders-hide-mob {
    display: none !important;
  }
  .api-datatable-custom.api-dt-is-orders .api-dt-filters.api-dt-orders-hide-mob {
    display: none !important;
  }
  .api-datatable-custom.api-dt-is-orders .api-dt-orders-mobile-stack {
    width: 100%;
  }
  .api-datatable-custom.api-dt-is-orders .api-dt-mob-row {
    width: 100%;
    min-width: 0;
  }
  .api-datatable-custom.api-dt-is-orders .api-dt-orders-mob-control {
    width: 100%;
    min-height: 2.25rem;
    height: 2.25rem;
    box-sizing: border-box;
  }
  .api-datatable-custom.api-dt-is-orders .api-dt-orders-mobile-stack .form-custom-datepicker-wrap .form-custom-datepicker-trigger {
    width: 100%;
    min-height: 2.25rem;
    height: 2.25rem;
    box-sizing: border-box;
  }
  .api-datatable-custom.api-dt-is-orders .api-dt-orders-mobile-stack .btn {
    min-height: 2.25rem;
    height: 2.25rem;
  }
}

/* Ventas por vendedor móvil: ocultar fila desktop en todos los casos (cxc o sales-invoices); mismo orden que desktop; full width, mismo alto */
@media (max-width: 991.98px) {
  .api-datatable-custom .api-dt-seller-only-hide-mob {
    display: none !important;
  }
}
@media (max-width: 767.98px) {
  .api-datatable-custom .api-dt-seller-only-mobile-stack {
    width: 100%;
    max-width: 100%;
  }
  .api-datatable-custom .api-dt-seller-only-mobile-stack .api-dt-mob-row {
    width: 100%;
    min-width: 0;
  }
  .api-datatable-custom .api-dt-seller-only-mob-control,
  .api-datatable-custom .api-dt-seller-only-mobile-stack .form-control,
  .api-datatable-custom .api-dt-seller-only-mobile-stack .form-select {
    width: 100% !important;
    min-width: 0;
    min-height: 2.25rem;
    height: 2.25rem;
    box-sizing: border-box;
  }
  .api-datatable-custom .api-dt-seller-only-mobile-stack .btn {
    min-height: 2.25rem;
    height: 2.25rem;
  }
}

/* Ventas por cliente móvil: ocultar fila desktop y bloque fechas suelto; stack único mismo orden que desktop */
@media (max-width: 991.98px) {
  .api-datatable-custom .api-dt-client-only-hide-mob {
    display: none !important;
  }
}
@media (max-width: 767.98px) {
  .api-datatable-custom .api-dt-client-only-mobile-stack {
    width: 100%;
    max-width: 100%;
  }
  .api-datatable-custom .api-dt-client-only-mobile-stack .api-dt-mob-row {
    width: 100%;
    min-width: 0;
  }
  .api-datatable-custom .api-dt-client-only-mob-control,
  .api-datatable-custom .api-dt-client-only-mobile-stack .form-control,
  .api-datatable-custom .api-dt-client-only-mobile-stack .form-select {
    width: 100% !important;
    min-width: 0;
    min-height: 2.25rem;
    height: 2.25rem;
    box-sizing: border-box;
  }
  .api-datatable-custom .api-dt-client-only-mobile-stack .btn {
    min-height: 2.25rem;
    height: 2.25rem;
  }
  /* Ventas por cliente (CXC): stack Exportar, Fecha Ini, Fecha Fin, Cliente, Buscar, Limpiar — full width, mismo alto */
  .api-datatable-custom .api-dt-client-only-cxc-mobile-stack {
    width: 100%;
    max-width: 100%;
  }
  .api-datatable-custom .api-dt-client-only-cxc-mobile-stack .api-dt-client-cxc-mob-row {
    width: 100%;
    min-width: 0;
  }
  .api-datatable-custom .api-dt-client-only-cxc-mobile-stack .api-dt-client-cxc-mob-control,
  .api-datatable-custom .api-dt-client-only-cxc-mobile-stack .form-control,
  .api-datatable-custom .api-dt-client-only-cxc-mobile-stack .form-select {
    width: 100% !important;
    min-width: 0;
    min-height: 2.25rem;
    height: 2.25rem;
    box-sizing: border-box;
  }
  .api-datatable-custom .api-dt-client-only-cxc-mobile-stack .form-custom-datepicker-wrap {
    width: 100%;
    min-width: 0;
  }
  .api-datatable-custom .api-dt-client-only-cxc-mobile-stack .form-custom-datepicker-wrap .form-control {
    width: 100% !important;
    min-height: 2.25rem;
    height: 2.25rem;
    box-sizing: border-box;
  }
  .api-datatable-custom .api-dt-client-only-cxc-mobile-stack .btn {
    min-height: 2.25rem;
    height: 2.25rem;
  }
}

/* Ventas por vendedor/cliente desktop: Exportar, Vendedores/Clientes, Buscar, Limpiar en una fila (aplica cxc y sales-invoices) */
@media (min-width: 992px) {
  .api-datatable-custom .api-dt-seller-only-desk-row {
    flex-wrap: nowrap;
  }
  .api-datatable-custom .api-dt-seller-only-desk-row .api-dt-filters-unified {
    flex-wrap: nowrap;
    flex: 1 1 auto;
    min-width: 0;
  }
  .api-datatable-custom .api-dt-seller-only-control {
    height: 2.25rem;
    min-height: 2.25rem;
  }
  .api-datatable-custom .api-dt-seller-only-desk-row .api-dt-export-btn {
    flex-shrink: 0;
  }
  .api-datatable-custom .api-dt-seller-only-desk-row .api-dt-seller-wrap {
    flex: 1 1 0;
    min-width: 0;
    max-width: 220px;
  }
  .api-datatable-custom .api-dt-seller-only-desk-row .api-dt-search-wrap {
    flex: 1 1 0;
    min-width: 0;
  }
  .api-datatable-custom .api-dt-seller-only-desk-row .api-dt-clear-filters {
    flex-shrink: 0;
  }
  .api-datatable-custom .api-dt-client-only-desk-row {
    flex-wrap: nowrap;
  }
  .api-datatable-custom .api-dt-client-only-desk-row .api-dt-filters-unified {
    flex-wrap: nowrap;
    flex: 1 1 auto;
    min-width: 0;
  }
  .api-datatable-custom .api-dt-client-only-desk-row .api-dt-client-only-control {
    height: 2.25rem;
    min-height: 2.25rem;
  }
  .api-datatable-custom .api-dt-client-only-desk-row .api-dt-export-btn {
    flex-shrink: 0;
  }
  .api-datatable-custom .api-dt-client-only-desk-row .api-dt-client-wrap {
    flex: 1 1 0;
    min-width: 0;
    max-width: 220px;
  }
  .api-datatable-custom .api-dt-client-only-desk-row .api-dt-search-wrap {
    flex: 1 1 0;
    min-width: 0;
  }
  .api-datatable-custom .api-dt-client-only-desk-row .api-dt-clear-filters {
    flex-shrink: 0;
  }
}

/* Pedidos: todos los filtros en una fila, mismo ancho */
@media (min-width: 768px) {
  .api-datatable-custom.api-dt-is-orders .api-dt-filters-and-search {
    flex-wrap: nowrap;
    gap: 0.5rem;
  }
  .api-datatable-custom.api-dt-is-orders .api-dt-filters-unified {
    flex-wrap: nowrap;
    flex: 1 1 0;
    min-width: 0;
    gap: 0.5rem;
  }
  .api-datatable-custom.api-dt-is-orders .api-dt-filters-unified .form-custom-datepicker-wrap,
  .api-datatable-custom.api-dt-is-orders .api-dt-filters-unified .api-dt-client-wrap,
  .api-datatable-custom.api-dt-is-orders .api-dt-filters-unified .api-dt-status-wrap {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    align-items: stretch;
  }
  .api-datatable-custom.api-dt-is-orders .api-dt-filters-unified .form-custom-datepicker-trigger {
    height: 2.25rem !important;
    min-height: 2.25rem !important;
    max-height: 2.25rem !important;
    padding: 0.375rem 1.75rem 0.375rem 0.75rem;
    font-size: 0.875rem;
    box-sizing: border-box;
    line-height: 1.25;
    min-width: 0;
    overflow: hidden;
    width: 100%;
  }
  .api-datatable-custom.api-dt-is-orders .api-dt-filters-unified .form-custom-datepicker-trigger .form-custom-datepicker-trigger-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
  }
  .api-datatable-custom.api-dt-is-orders .api-dt-filters-unified .api-dt-status-wrap .api-dt-filter-custom-desk-trigger,
  .api-datatable-custom.api-dt-is-orders .api-dt-filters-unified .api-dt-client-wrap .api-dt-filter-custom-desk-trigger {
    height: 2.25rem !important;
    min-height: 2.25rem !important;
    max-height: 2.25rem !important;
    padding: 0.375rem 1.75rem 0.375rem 0.75rem;
    font-size: 0.875rem;
    box-sizing: border-box;
    line-height: 1.25;
    min-width: 0;
    overflow: hidden;
    width: 100%;
  }
  .api-datatable-custom.api-dt-is-orders .api-dt-search-wrap {
    flex: 1 1 0;
    min-width: 0;
    max-width: none;
  }
  .api-datatable-custom.api-dt-is-orders .api-dt-search-wrap .api-dt-search {
    min-width: 0;
    height: 2.25rem !important;
    min-height: 2.25rem !important;
    max-height: 2.25rem !important;
  }
  .api-datatable-custom.api-dt-is-orders .api-dt-clear-filters {
    flex: 1 1 0;
    min-width: 0;
    max-width: 120px;
    height: 2.25rem !important;
    min-height: 2.25rem !important;
    max-height: 2.25rem !important;
  }
}
@media (min-width: 768px) {
  .api-datatable-custom .api-dt-search-wrap {
    max-width: 380px;
  }
  .api-datatable-custom .api-dt-search-wrap {
    min-width: 12rem;
    flex-shrink: 0;
  }
  /* Sin filtros (ej. clientes): buscar a la derecha */
  .api-datatable-custom .api-dt-toolbar-search-only {
    justify-content: flex-end;
  }
  .api-datatable-custom .api-dt-search-wrap-right {
    margin-left: auto;
  }
}
@media (max-width: 767.98px) {
  .api-datatable-custom .api-dt-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  .api-datatable-custom .api-dt-filters {
    order: 1;
    width: 100%;
  }
  .api-datatable-custom .api-dt-filters-and-search {
    order: 2;
    flex-direction: column;
    width: 100%;
  }
  .api-datatable-custom .api-dt-filters-and-search .api-dt-search-wrap,
  .api-datatable-custom .api-dt-filters-and-search .api-dt-clear-filters {
    width: 100%;
    flex: 0 0 auto;
  }
  .api-datatable-custom .api-dt-filters .api-dt-mob-label {
    display: none;
  }
  .api-datatable-custom .api-dt-per-page-wrap,
  .api-datatable-custom .api-dt-search-wrap {
    width: 100%;
  }
  .api-dt-per-page-trigger {
    width: 100%;
  }
  .api-datatable-custom .api-dt-search,
  .api-datatable-custom .input-group-api-dt-search {
    width: 100%;
  }
}
/* Data table legacy (datatable.blade.php): mismo estándar de altura, solo placeholder (sin icono) */
.input-group-dt-search {
  min-height: 2.375rem;
}
.input-group-dt-search .dt-search-input,
.input-group-dt-search [data-dt-search] {
  min-height: 2.375rem;
  padding: 0.375rem 0.75rem;
  border: 1px solid #e2e8ef;
  border-radius: 0.375rem 0.375rem 0.375rem 0.375rem;
  width: 100%;
}
.api-datatable-custom .api-dt-table-wrap {
  min-height: 120px;
}
.api-datatable-custom .api-dt-desktop {
  border: 1px solid #e2e8ef;
  border-top: none;
  border-radius: 0;
  overflow: hidden;
}
.api-datatable-custom .api-dt-table {
  margin-bottom: 0;
  border-collapse: collapse;
}
.api-datatable-custom .api-dt-table thead th {
  background-color: #001f3d;
  color: #fff;
  border-bottom: 1px solid rgba(255,255,255,.2);
  padding: 0.75rem 1rem;
  font-weight: 600;
  font-size: 0.875rem;
}
.api-datatable-custom .api-dt-table tbody td {
  border-bottom: 1px solid #e2e8ef;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  background-color: #fff;
}
.api-datatable-custom .api-dt-table tbody tr:nth-of-type(even) td {
  background-color: #f9fafe;
}
.api-datatable-custom .api-dt-table tbody tr:last-child td {
  border-bottom: 0;
}
.api-datatable-custom .api-dt-table tbody td.api-dt-cell-pre-line {
  white-space: pre-line;
}
.api-datatable-custom .api-dt-stock-badge {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  font-weight: 700;
  font-size: 0.875rem;
  min-width: 2.5rem;
  text-align: center;
}
.api-datatable-custom .api-dt-stock-zero {
  background-color: #fee2e2;
  color: #dc2626;
}
.api-datatable-custom .api-dt-stock-low {
  background-color: #fef3c7;
  color: #d97706;
}
.api-datatable-custom .api-dt-stock-ok {
  background-color: #dcfce7;
  color: #16a34a;
}
.api-datatable-custom .api-dt-price-highlight {
  font-weight: 700;
  font-size: 0.875rem;
  line-height: 1.4;
}
.api-datatable-custom .api-dt-price-highlight strong {
  font-weight: 700;
}
.api-datatable-custom .api-dt-description-truncate {
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.api-datatable-custom .api-dt-price-highlight .price-unit {
  font-size: 0.6875rem;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  margin-bottom: 0.125rem;
}
.api-datatable-custom .api-dt-price-highlight .price-value {
  color: #1f2937;
}
.api-datatable-custom .api-dt-price-highlight .price-value-usd {
  color: #059669;
}
.api-datatable-custom.api-dt-seller-mode .api-dt-btn-action[href*="/edit"],
.api-datatable-custom.api-dt-seller-mode .form-check-input.api-dt-state-switch {
  display: none !important;
}
.api-datatable-custom.api-dt-seller-mode .api-dt-col-inactive .form-check {
  visibility: hidden;
}
.api-datatable-custom .api-dt-sort.cursor-pointer {
  cursor: pointer;
}
.api-datatable-custom .api-dt-footer {
  flex-wrap: wrap;
  flex-direction: row;
  align-items: center;
  gap: 0.5rem;
  background-color: #f9fafe;
  padding: 0.75rem 1rem;
  border-top: 1px solid #e2e8ef;
}
.api-datatable-custom .api-dt-footer .api-dt-footer-left {
  flex: 1;
  min-width: 0;
  text-align: left;
}
.api-datatable-custom .api-dt-footer .api-dt-footer-center {
  flex: 1;
  min-width: 0;
  justify-content: center;
}
.api-datatable-custom .api-dt-footer .api-dt-footer-right {
  flex: 1;
  min-width: 0;
}
.api-datatable-custom .api-dt-pagination-wrap {
  width: 100%;
  justify-content: center;
}
@media (min-width: 576px) {
  .api-datatable-custom .api-dt-pagination-wrap {
    width: auto;
  }
}
.api-datatable-custom .api-dt-pagination .page-link {
  padding: 0.35rem 0.75rem;
}
.api-datatable-custom .api-dt-pagination .page-item.disabled .page-link {
  pointer-events: none;
}
/* Footer paginador: info izquierda, paginador centrado (común a datatable y api-datatable-custom) */
.api-dt-footer-row .api-dt-footer-left,
.api-dt-footer .api-dt-footer-left {
  text-align: left;
}
.api-dt-footer-row .api-dt-footer-center,
.api-dt-footer .api-dt-footer-center {
  display: flex;
  justify-content: center;
}
/* Cards en vista móvil */
.api-datatable-custom .api-dt-mobile-cards {
  display: block;
}
.api-datatable-custom .api-dt-card {
  background: #fff;
  transition: box-shadow 0.2s ease;
  cursor: default;
}
.api-datatable-custom .api-dt-card .api-dt-card-body {
  pointer-events: auto;
}
/* Product image in table cell */
.api-datatable-custom .api-dt-cell-image {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.25rem 0;
}
.api-datatable-custom .api-dt-product-img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  border-radius: 0.375rem;
  background: #f8f9fa;
}
/* Product image on mobile card (top) */
.api-datatable-custom .api-dt-card-image-wrap {
  width: 100%;
  margin: -1rem -1rem 0.75rem -1rem;
  border-radius: 0.5rem 0.5rem 0 0;
  overflow: hidden;
  background: #f8f9fa;
  max-height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.api-datatable-custom .api-dt-card-product-img {
  width: 100%;
  height: 120px;
  object-fit: contain;
}
/* Artículos: card móvil — foto centrada y fondo blanco */
.api-datatable-custom.api-dt-is-articles .api-dt-card-image-wrap {
  background: #fff;
}
.api-datatable-custom.api-dt-is-articles .api-dt-card-product-img {
  object-fit: contain;
  max-width: 100%;
  max-height: 120px;
  width: auto;
  height: auto;
}
.api-datatable-custom .api-dt-card .api-dt-card-footer .api-dt-btn-action {
  cursor: pointer;
}
.api-datatable-custom .api-dt-card {
  box-shadow: 0 .25rem 1rem rgba(0, 0, 0, 0.1);
}
.api-datatable-custom .api-dt-card:hover {
  box-shadow: 0 .35rem 1.25rem rgba(0, 0, 0, 0.14) !important;
}
.api-datatable-custom .api-dt-card-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.25rem 0;
  font-size: 0.875rem;
}
.api-datatable-custom .api-dt-card-label {
  color: #6c757d;
  flex-shrink: 0;
}
.api-datatable-custom .api-dt-card-value {
  text-align: right;
  word-break: break-word;
}
.api-datatable-custom .api-dt-card .badge {
  font-size: 0.75rem;
}
/* Footer de la card móvil: acciones centradas */
.api-datatable-custom .api-dt-card-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
}
/* Botones de acción: cuadrados, grises */
.api-datatable-custom .api-dt-btn-action {
  border-radius: 0.25rem;
  background-color: #e9ecef;
  border: 1px solid #e2e8ef;
  color: #495057;
}
.api-datatable-custom .api-dt-btn-action:hover {
  background-color: #dee2e6;
  border-color: #e2e8ef;
  color: #212529;
}
/* Empty state: icono inbox + texto */
.api-dt-empty-cell {
  vertical-align: middle !important;
}
.api-datatable-custom .api-dt-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 1rem;
  text-align: center;
}
.api-datatable-custom .api-dt-empty-icon {
  font-size: 3rem;
  color: #ced4da;
  margin-bottom: 0.75rem;
}
.api-datatable-custom .api-dt-empty-text {
  margin: 0;
  color: #6c757d;
  font-size: 0.9375rem;
}
.api-datatable-custom .api-dt-empty-state-cards {
  padding: 2rem 1rem;
}
.api-datatable-custom .api-dt-empty-state-cards .api-dt-empty-icon {
  font-size: 2.5rem;
}

/* Cards de formularios y detalle: sombra visible */
.client-create-card, .client-edit-card, .user-create-card, .user-edit-card,
.pos-create-card, .profile-card, .profile-section, .client-detail-card,
.user-detail-card, .sales-by-client-card, .sales-by-seller-card, .cxc-detail-card {
  box-shadow: 0 .25rem 1rem rgba(0, 0, 0, 0.1) !important;
  transition: box-shadow 0.2s ease;
}
.client-create-card:hover, .client-edit-card:hover, .user-create-card:hover, .user-edit-card:hover,
.pos-create-card:hover, .profile-card:hover, .client-detail-card:hover,
.user-detail-card:hover, .sales-by-client-card:hover, .sales-by-seller-card:hover, .cxc-detail-card:hover {
  box-shadow: 0 .35rem 1.25rem rgba(0, 0, 0, 0.12) !important;
}

/* Switch estado: más grande y cursor pointer */
.api-datatable-custom .api-dt-state-switch-wrap {
  cursor: pointer;
  padding: 0.25rem 0;
}
.api-datatable-custom .api-dt-state-switch-wrap .form-check-input {
  width: 2.5em;
  height: 1.25em;
  cursor: pointer;
}
.api-datatable-custom .api-dt-state-switch-wrap .form-check-input:focus {
  box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* Toast reutilizable: desktop superior derecha, móvil centrado abajo */
.toast-container-custom {
  position: fixed;
  z-index: 9999;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.toast-container-custom--desktop {
  top: 1rem;
  right: 1rem;
  left: auto;
  bottom: auto;
  align-items: flex-end;
  max-width: 360px;
}
.toast-container-custom--mobile {
  left: 50%;
  right: auto;
  bottom: 5rem;
  top: auto;
  transform: translateX(-50%);
  align-items: center;
  width: calc(100% - 2rem);
  max-width: 340px;
}
.toast-custom {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
  font-size: 0.9375rem;
  opacity: 0;
  transform: translateX(100%);
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.toast-container-custom--mobile .toast-custom {
  transform: translateY(100%);
}
.toast-custom--visible {
  opacity: 1;
  transform: translateX(0);
}
.toast-container-custom--mobile .toast-custom--visible {
  transform: translateY(0);
}
.toast-custom-icon {
  flex-shrink: 0;
  font-size: 1.25rem;
}
.toast-custom-message {
  flex: 1;
}
.toast-custom--success {
  background-color: #d1e7dd;
  border: 1px solid #badbcc;
  color: #0f5132;
}
.toast-custom--success .toast-custom-icon { color: #0f5132; }
.toast-custom--error {
  background-color: #f8d7da;
  border: 1px solid #f5c2c7;
  color: #842029;
}
.toast-custom--error .toast-custom-icon { color: #842029; }
.toast-custom--info {
  background-color: #cff4fc;
  border: 1px solid #b6effb;
  color: #055160;
}
.toast-custom--info .toast-custom-icon { color: #055160; }
""  
"/* Colores primarios globales - añadidos para refuerzo */"  
".bg-primary { background-color: #001f3d !important; }" 
