/* =========================================
   ✅ UI Compact global (modo app)
   ========================================= */

/* =========================================================
   Branding institucional
   ========================================================= */

:root {
  --brand-color: #004a9c;
  --brand-color-soft: rgba(0, 74, 156, 0.15);

  --app-primary: #004a9c;
  --app-primary-rgb: 0, 74, 156;
  --app-primary-hover: #0a5fc4;

  --app-header: #d9b25f;
  --app-header-rgb: 217, 178, 95;

  --app-text: #2f3542;
  --app-muted: #6c757d;
  --app-bg: #ffffff;
  --app-border: rgba(0, 0, 0, 0.1);

  --navbott-h: 64px;
}

html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--app-bg);
}

body {
  background: #f8f9fa;
  color: var(--app-text);
  min-height: 100vh;
  min-height: calc(var(--app-vh, 1vh) * 100);
}

body.ui-compact {
  font-size: 0.95rem;
  font-weight: 400;
}

/* Cards / list items un poco más compactos */
body.ui-compact .card-body {
  padding: 12px;
}
body.ui-compact .card-header {
  padding: 12px;
}
body.ui-compact .list-group-item {
  padding: 0.55rem 0.75rem;
}

/* Botones */
body.ui-compact .btn {
  border-radius: 12px;
  font-weight: 500;
}
body.ui-compact .btn-sm {
  padding: 0.28rem 0.55rem;
  font-size: 0.82rem;
  border-radius: 10px;
}

/* Títulos / textos auxiliares */
body.ui-compact h1 {
  font-size: 1.55rem;
}
body.ui-compact h2 {
  font-size: 1.35rem;
}
body.ui-compact h3 {
  font-size: 1.15rem;
}
body.ui-compact h4 {
  font-size: 1.05rem;
}
body.ui-compact h5 {
  font-size: 1rem;
}

body.ui-compact small,
body.ui-compact .small {
  font-size: 0.82rem;
  font-weight: 400;
}

body.ui-compact strong,
body.ui-compact b {
  font-weight: 500;
}

body.ui-compact h1,
body.ui-compact h2,
body.ui-compact h3,
body.ui-compact h4,
body.ui-compact h5,
body.ui-compact h6 {
  font-weight: 600;
  letter-spacing: 0.2px;
}

body.ui-compact .fw-bold {
  font-weight: 600 !important;
}
body.ui-compact .fw-semibold {
  font-weight: 500 !important;
}
body.ui-compact .text-muted {
  font-weight: 400;
}
body.ui-compact .badge {
  font-weight: 500;
}

/* Margins Bootstrap comunes (ligeramente menores) */
body.ui-compact .mt-4 {
  margin-top: 1.1rem !important;
}
body.ui-compact .mb-4 {
  margin-bottom: 1.1rem !important;
}
body.ui-compact .mb-3 {
  margin-bottom: 0.85rem !important;
}

/* =========================================
   BOTONES / ACENTOS GENERALES
   ========================================= */

/* Links activos en sidebar */
.sb-sidenav .nav-link.active {
  background-color: var(--app-primary) !important;
  color: #fff !important;
}

/* Encabezados y acentos */
h1,
h2,
h3,
.fw-bold {
  color: var(--app-primary);
}

/* Navbar superior (legacy SB) */
.navbar-dark {
  background-color: var(--app-primary) !important;
}

/* Barra superior compacta */
.sb-topnav.navbar.navbar-dark {
  position: relative !important;
  padding-top: 0.25rem !important;
  padding-bottom: 0.25rem !important;
  min-height: 42px !important;
  line-height: 1.1 !important;
}

/* Quitar espacio extra del body cuando se usa sb-nav-fixed */
body.sb-nav-fixed {
  padding-top: 0 !important;
}

/* Centrado del texto en el navbar */
.sb-topnav .navbar-brand,
.sb-topnav .navbar-nav .nav-link {
  display: flex;
  align-items: center;
  height: 100%;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

.navbar-dark .navbar-brand {
  color: #fff !important;
  font-weight: 600;
}
.navbar-dark .navbar-brand:hover {
  color: #f5f5f5 !important;
}

/* =========================================
   SIDEBAR
   ========================================= */
.sb-sidenav {
  background-color: #1d1f21 !important;
}
.sb-sidenav .nav-link {
  color: #ccc;
  font-size: 0.95rem;
}
.sb-sidenav .nav-link:hover {
  color: #fff;
}
.sb-sidenav-menu-heading {
  color: #999;
  font-size: 0.75rem;
  text-transform: uppercase;
  margin-top: 1rem;
}
.sb-sidenav-footer {
  background-color: #17191b;
  color: #aaa;
}

/* =========================================
   Bottom Navigation sólida (Eading FIX)
   ========================================= */
.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  min-height: var(--navbott-h);
  height: calc(var(--navbott-h) + env(safe-area-inset-bottom, 0px));
  padding: 0 max(8px, env(safe-area-inset-left, 0px))
    calc(env(safe-area-inset-bottom, 0px) + 2px)
    max(8px, env(safe-area-inset-right, 0px));
  background: #ffffff;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 -6px 20px rgba(0, 0, 0, 0.08);
  display: flex;
  justify-content: space-around;
  align-items: stretch;
  z-index: 1035;
  opacity: 1;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
  isolation: isolate;
}

.bottom-nav::before {
  content: "";
  position: absolute;
  inset: 0;
  background: #ffffff;
  z-index: 0;
}

.bottom-nav > * {
  position: relative;
  z-index: 1;
}

.bottom-nav-link {
  flex: 1 1 0;
  min-width: 0;
  text-align: center;
  text-decoration: none;
  color: var(--app-text);
  font-size: 0.75rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  position: relative;
  min-height: var(--navbott-h);
  padding: 6px 4px 8px;
  transition:
    color 0.2s ease-in-out,
    transform 0.2s ease-in-out;
  -webkit-tap-highlight-color: transparent;
}

.bottom-nav-link i {
  font-size: 1.3rem;
  display: block;
  transition: transform 0.2s ease-in-out;
}

.bottom-nav-link span {
  font-size: 0.72rem;
  line-height: 1.05;
  white-space: nowrap;
}

.bottom-nav-link.active {
  color: var(--app-primary);
  font-weight: 600;
}

.bottom-nav-link.active i {
  transform: translateY(-1px) scale(1.05);
}

@media (hover: hover) {
  .bottom-nav-link:hover {
    color: var(--app-primary);
  }
  .bottom-nav-link:hover i {
    transform: translateY(-1px) scale(1.05);
  }
}

.bottom-nav-link::after {
  content: "";
  position: absolute;
  bottom: 3px;
  left: 50%;
  width: 26px;
  height: 3px;
  border-radius: 999px;
  background: transparent;
  transform: translateX(-50%) scaleX(0);
  transition:
    background 0.25s ease-in-out,
    transform 0.25s ease-in-out;
}

.bottom-nav-link.active::after {
  background: var(--app-primary);
  transform: translateX(-50%) scaleX(1);
}

/* =========================================
   AJUSTES DE ESPACIADO Y RESPONSIVE
   ========================================= */
@media (min-width: 992px) {
  main.container-fluid {
    padding-top: 1rem !important;
    padding-bottom: 1rem !important;
  }

  h2,
  h3 {
    margin-top: 0.5rem !important;
    margin-bottom: 1rem !important;
  }
}

@media (max-width: 991px) {
  .sb-topnav.navbar.navbar-dark {
    padding-top: 0.2rem !important;
    padding-bottom: 0.2rem !important;
    min-height: 40px !important;
  }
}

@media (min-width: 992px) {
  body.sb-nav-fixed main.container-fluid {
    margin-left: 200px;
    padding-right: 12rem;
    transition:
      margin-left 0.3s ease,
      padding-right 0.3s ease;
  }

  body.sb-nav-fixed.sb-sidenav-toggled main.container-fluid {
    margin-left: 0;
  }
}

/* =========================================
   QR / VIDEO
   ========================================= */
#video {
  width: 100%;
  max-width: 380px;
  height: 280px;
  background-color: #000;
  border-radius: 8px;
  display: block;
  margin: 0 auto;
}

#qr-reader {
  width: 100%;
  max-width: 380px;
  margin: 0 auto;
  border-radius: 8px;
  overflow: hidden;
  background: #000;
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.2);
}

/* =========================================
   TOASTS
   ========================================= */
#toast-container {
  position: fixed;
  top: 1rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2000;
  width: 100%;
  max-width: 420px;
  padding: 0 12px;
}

.custom-toast {
  padding-left: 20px !important;
  opacity: 0;
  transform: translateY(-10px);
  transition:
    opacity 0.25s ease-out,
    transform 0.25s ease-out;

  display: flex;
  align-items: center;
  min-width: 280px;
  max-width: 360px;
  background: #fefefe;
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  overflow: hidden;
  margin-bottom: 12px;
  border-left: 16px solid transparent;
  animation: slideIn 0.3s ease;
}

.custom-toast.show {
  opacity: 1;
  transform: translateY(0);
}

.custom-toast .toast-body {
  padding: 10px 15px;
  padding-left: 18px !important;
  flex-grow: 1;
  color: #333;
}

.custom-toast .toast-title {
  font-weight: 600;
  margin-bottom: 3px;
}

.custom-toast .close-btn {
  border: none;
  background: none;
  color: #888;
  font-size: 18px;
  margin-right: 10px;
  cursor: pointer;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.toast-error {
  border-left-color: #e63946;
  box-shadow: inset 14px 0 0 #e63946;
}
.toast-info {
  border-left-color: #1d72f3;
  box-shadow: inset 14px 0 0 #1d72f3;
}
.toast-success {
  border-left-color: #2a9d8f;
  box-shadow: inset 14px 0 0 #2a9d8f;
}
.toast-warning {
  border-left-color: #f4a261;
  box-shadow: inset 14px 0 0 #f4a261;
}

/* =========================================
   Chips de filtro (móvil)
   ========================================= */
.filtro-scroll::-webkit-scrollbar {
  height: 6px;
}
.filtro-scroll::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 10px;
}

.filtro-btn {
  transition: all 0.2s ease-in-out;
}

.filtro-btn.active {
  background-color: var(--app-primary) !important;
  color: #fff !important;
  border-color: var(--app-primary) !important;
  box-shadow: 0 0 6px rgba(var(--app-primary-rgb), 0.35);
}

/* =========================================
   APP HEADER
   ========================================= */
.app-header {
  background: var(--brand-color);
  color: #fff;
  padding: calc(8px + env(safe-area-inset-top, 0px)) 0 8px 0;
  position: sticky;
  top: 0;
  z-index: 999;
}

body.ui-compact .app-header {
  padding: calc(6px + env(safe-area-inset-top, 0px)) 0 6px 0;
}

.app-header .app-title {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
}

body.ui-compact .app-title {
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.app-title {
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.app-version-inline {
  margin-left: 6px;
  font-size: 0.72rem;
  font-weight: 500;
  opacity: 0.75;
}

/* Íconos derecha en cabecera */
.app-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
}

.app-action-btn {
  position: relative;
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: #fff;
  text-decoration: none;
  opacity: 0.9;
  touch-action: manipulation;
}

.app-action-btn:hover {
  opacity: 1;
}
.app-action-btn:active {
  transform: translateY(1px);
}

.app-action-btn:focus-visible {
  outline: 3px solid rgba(255, 255, 255, 0.75);
  outline-offset: 2px;
}

body.ui-compact .app-action-btn {
  width: 44px;
  height: 44px;
}
body.ui-compact .app-action-btn i {
  font-size: 16px;
}

/* Badge notificaciones pro (único, sin duplicados) */
.app-action-btn.has-badge {
  position: relative;
}
.app-action-btn.has-badge .notif-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #d63a3f;
  box-shadow: 0 0 0 2px #004a9c;
}

/* Icono cumple (ahora inline junto al título, sin encimar) */
.icon-cumple {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  line-height: 1;
  opacity: 0.95;
  margin-left: 6px;
  pointer-events: none;
}

/* =========================================
   TABLAS / MISC
   ========================================= */
.container[data-page="pedidos-nuevo"] {
  margin-bottom: 0.75rem !important;
  padding-bottom: 0.5rem;
}

td.importe-linea {
  padding-right: 12px;
}

#pedido-total-display {
  border-top: 2px solid #ddd;
  padding-top: 6px;
}

.table td,
.table th {
  vertical-align: middle;
}

/* =========================================
   MODO IMPRESIÓN (A4)
   ========================================= */
@media print {
  @page {
    margin: 10mm;
  }
  body {
    background: #ffffff !important;
    font-size: 11px;
    padding-bottom: 0 !important;
  }

  #navbott,
  .navbott,
  .navbott-container,
  .nav-bottom-fixed,
  .nav-bottom,
  .bottom-nav,
  .bottom-nav-fixed,
  nav.fixed-bottom,
  .fixed-bottom[data-role="navbott"],
  .no-print {
    display: none !important;
  }

  [data-page="pedidos-procesar"] .container {
    max-width: 100% !important;
    margin: 0;
    padding: 0 10mm;
  }

  [data-page="pedidos-procesar"] #col-lista-pedidos {
    display: none !important;
  }

  [data-page="pedidos-procesar"] #col-detalle-comanda {
    width: 100% !important;
    max-width: 100% !important;
    flex: 0 0 100%;
  }

  [data-page="pedidos-procesar"] #card-detalle-comanda {
    box-shadow: none;
    border: none;
    margin-top: 5mm;
  }

  [data-page="pedidos-procesar"] .comanda-contenido {
    padding: 0;
  }

  [data-page="pedidos-procesar"] #tabla-detalle-procesar th,
  [data-page="pedidos-procesar"] #tabla-detalle-procesar td {
    padding-top: 2px;
    padding-bottom: 2px;
  }

  [data-page="pedidos-procesar"] #tabla-detalle-procesar thead {
    border-bottom: 1px solid #000;
  }
  [data-page="pedidos-procesar"] #tabla-detalle-procesar tfoot {
    border-top: 1px solid #000;
  }
}

/* =========================================
   Home: accesos directos (Quick Card)
   ========================================= */
.quick-card {
  border-radius: 16px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.06);
}

.quick-title {
  font-size: 0.7rem;
  color: rgba(0, 0, 0, 0.55);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.quick-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.quick-item {
  text-decoration: none;
  color: inherit;
  padding: 10px 6px;
  border-radius: 12px;
  transition:
    transform 0.08s ease,
    background 0.08s ease;
}
.quick-item:hover {
  background: rgba(0, 0, 0, 0.03);
  transform: translateY(-1px);
}

.quick-icon {
  width: 52px;
  height: 52px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  margin: 0 auto 6px auto;
  background: color-mix(in srgb, var(--app-primary) 12%, transparent);
}
.quick-icon i {
  font-size: 19px;
  color: var(--app-primary);
}

.quick-label {
  font-size: 0.82rem;
  text-align: center;
  font-weight: 600;
  letter-spacing: 0.2px;
}

/* Selector de perfil dentro del card */
.perfil-switch {
  margin-top: 8px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* =========================================
   Componentes Home (cards)
   ========================================= */

/* Header card */
.header-colaborador {
  background-color: var(--app-header);
  color: #ffffff;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header-colaborador h5 {
  color: #ffffff !important;
}

/* Avatar */
.avatar-iniciales {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--app-primary);
  text-transform: uppercase;
}

/* Card base */
.card-colaborador {
  position: relative;
  overflow: hidden;
  border-radius: 0.75rem;
  border: none;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
  transition:
    transform 0.12s ease-out,
    box-shadow 0.12s ease-out;
}

/* Acento diagonal */
.card-colaborador::before {
  content: "";
  position: absolute;
  top: -40px;
  left: -40px;
  width: 120px;
  height: 120px;
  background: linear-gradient(
    135deg,
    rgba(var(--app-header-rgb), 0.35),
    transparent
  );
  transform: rotate(-5deg);
  pointer-events: none;
}

.card-colaborador:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.14);
}

/* Compact: card docente menos saturada */
body.ui-compact .card-colaborador {
  border-radius: 16px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 0.2rem 0.55rem rgba(0, 0, 0, 0.06);
  overflow: hidden;
}
body.ui-compact .header-colaborador {
  background: #d9b25f;
}
body.ui-compact .header-colaborador .small {
  font-weight: 500;
  opacity: 0.85;
}
body.ui-compact .header-colaborador h5 {
  font-weight: 600;
  letter-spacing: 0.2px;
}

/* Switch de perfil: blanco premium (activo) */
body.ui-compact .header-colaborador .perfil-switch .btn {
  border-radius: 999px;
  padding: 0.28rem 0.75rem;
  font-weight: 600;
  border-width: 1px;
  box-shadow: none !important;
}
body.ui-compact .header-colaborador .perfil-switch .btn.btn-warning {
  background: rgba(255, 255, 255, 0.92) !important;
  border-color: rgba(255, 255, 255, 0.55) !important;
  color: #004a9c !important;
}
body.ui-compact .header-colaborador .perfil-switch .btn.btn-outline-warning {
  background: rgba(255, 255, 255, 0.18) !important;
  border-color: rgba(255, 255, 255, 0.35) !important;
  color: #fff !important;
}
body.ui-compact
  .header-colaborador
  .perfil-switch
  .btn.btn-outline-warning:hover {
  background: rgba(255, 255, 255, 0.26) !important;
}

/* Alert suave */
.alert-soft {
  background-color: #f5f6f7;
  border: 1px solid #e0e0e0;
  color: #495057;
}
.alert-soft i {
  color: var(--app-muted);
}

/* =========================================
   Safe spacing para evitar que el contenido
   quede tapado por la bottom-nav
   ========================================= */
.mb-safe {
  padding-bottom: calc(
    var(--navbott-h) + 20px + env(safe-area-inset-bottom, 0px)
  );
}

main,
.page-with-navsafe,
.app-page {
  padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px));
}

.app-min-vh {
  min-height: calc(var(--app-vh, 1vh) * 100);
}

/* =========================
   Punto 4: Botón principal
   ========================= */
.btn-login {
  height: 50px;
  border-radius: 14px;
  font-weight: 700;
  letter-spacing: 0.2px;
  background: #004a9c;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 10px 18px rgba(0, 74, 156, 0.22);
  transition:
    transform 0.12s ease,
    box-shadow 0.12s ease,
    filter 0.12s ease;
}

.btn-login:hover {
  transform: translateY(-1px);
  filter: brightness(0.97);
  box-shadow: 0 14px 26px rgba(0, 74, 156, 0.3);
}

.btn-login:active {
  transform: translateY(0px);
  box-shadow: 0 8px 14px rgba(0, 74, 156, 0.22);
}

.btn-login:focus {
  box-shadow:
    0 0 0 0.22rem rgba(0, 74, 156, 0.22),
    0 10px 18px rgba(0, 74, 156, 0.22);
}

/* =========================
   Paso 6: Inputs con iconos (SIN rayas internas)
   ========================= */
.login-body .login-field {
  border: 1px solid rgba(0, 0, 0, 0.14);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}

.login-body .login-field .input-group-text {
  border: none !important;
  background: #f9fafb;
  color: #004a9c;
  padding: 0 14px;
}

.login-body .form-control {
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.14);
}

.login-body .login-field:focus-within {
  border-color: #004a9c;
  box-shadow: 0 0 0 0.2rem rgba(0, 74, 156, 0.18);
}

#appLoadingModal .spinner-border {
  width: 3rem;
  height: 3rem;
}
#appLoadingModal .modal-backdrop.show {
  opacity: 0.35;
}

/* === LOGIN INPUTS LIMPIOS (sin rayas internas) === */
.login-field {
  border: 2px solid #004a9c;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}

.login-field .input-group-text {
  border: none !important;
  background: transparent;
  color: #004a9c;
  padding-left: 14px;
  padding-right: 10px;
}

.login-field .form-control {
  border: none !important;
  outline: none;
  box-shadow: none !important;
  padding-left: 6px;
}

.login-field:focus-within {
  border-color: #0a5fc4;
  box-shadow: 0 0 0 3px rgba(0, 74, 156, 0.15);
}

.login-body .login-field .form-control {
  border: none !important;
}

/* =========================================================
   Notificaciones Inbox
   ========================================================= */

.notif-inbox-modal {
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 0.75rem 2rem rgba(0, 0, 0, 0.22);
}

.notif-inbox-header {
  background: var(--app-primary);
  color: #fff;
  border-bottom: 0;
  padding: 12px 14px;
}

.notif-inbox-header .modal-title {
  font-weight: 700;
  letter-spacing: 0.3px;
}

.notif-inbox-body {
  background: #f3f4f6;
  padding: 14px;
}

.notif-search-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.notif-search {
  flex: 1;
  position: relative;
}

.notif-search i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(0, 0, 0, 0.45);
  pointer-events: none;
}

.notif-search .form-control {
  border-radius: 16px;
  padding-left: 36px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  background: #fff;
  box-shadow: 0 0.15rem 0.4rem rgba(0, 0, 0, 0.05);
}

.notif-search .form-control:focus {
  outline: none;
  box-shadow: none;
  border-color: #004a9c;
}

.notif-pill {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  padding: 8px 10px;
  min-width: 92px;
  text-align: center;
  font-weight: 700;
  font-size: 0.82rem;
  user-select: none;
  cursor: pointer;
}

.notif-pill:active {
  transform: translateY(1px);
}

.notif-inbox-list {
  display: grid;
  gap: 12px;
}

.notif-card {
  background: #fff;
  border-radius: 18px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.07);
  padding: 14px;
  cursor: pointer;
  transition:
    transform 0.08s ease,
    box-shadow 0.08s ease;
}

.notif-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 0.35rem 1rem rgba(0, 0, 0, 0.1);
}

.notif-title {
  font-weight: 800;
  color: rgba(0, 0, 0, 0.82);
  margin-bottom: 6px;
}

.notif-preview {
  color: rgba(0, 0, 0, 0.6);
  line-height: 1.25rem;
  margin: 0;

  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;

  overflow: hidden;
}

.notif-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
}

.notif-date {
  font-size: 0.82rem;
  color: rgba(0, 0, 0, 0.45);
  font-weight: 600;
}

.notif-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #d63a3f;
  box-shadow: 0 0 0 2px rgba(var(--app-primary-rgb), 0.35);
}

.notif-empty {
  text-align: center;
  padding: 30px 10px;
  color: rgba(0, 0, 0, 0.65);
}
.notif-empty i {
  font-size: 34px;
  opacity: 0.7;
}

.notif-inbox-footer {
  background: #fff;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

#notifMarkAllReadBtn {
  background: var(--app-primary);
  border-color: var(--app-primary);
}
#notifMarkAllReadBtn:hover {
  background: var(--app-primary-hover);
  border-color: var(--app-primary-hover);
}

body.ui-compact .notif-inbox-header {
  padding: 10px 12px;
}
body.ui-compact .notif-inbox-body {
  padding: 12px;
}
body.ui-compact .notif-card {
  padding: 12px;
  border-radius: 16px;
}
body.ui-compact .notif-search .form-control {
  border-radius: 14px;
}

.top5-box {
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  padding: 10px;
  background: #fff;
}

.top5-title {
  font-weight: 700;
  font-size: 0.95rem;
}

.top5-badge {
  font-size: 0.72rem;
}

.top5-ol {
  padding-left: 1.1rem;
}

.top5-ol li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 3px 0;
  border-bottom: 1px dashed rgba(0, 0, 0, 0.08);
}

.top5-ol li:last-child {
  border-bottom: 0;
}

.top5-item {
  font-size: 0.92rem;
}

.top5-qty {
  font-size: 0.9rem;
  font-weight: 600;
}

.top5-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px dashed rgba(0, 0, 0, 0.08);
}
.top5-row:last-child {
  border-bottom: 0;
}

.top5-barwrap {
  grid-column: 1 / -1;
  height: 8px;
  background: rgba(0, 0, 0, 0.06);
  border-radius: 999px;
  overflow: hidden;
}

.top5-bar {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  opacity: 0.85;
  transition:
    width 0.7s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.2s ease;
}

.top5-bar:hover {
  opacity: 1;
}

.top5-bar.cant {
  background: rgb(76, 87, 96);
}

.top5-bar.monto {
  background: linear-gradient(90deg, rgb(40, 167, 69), rgb(25, 135, 84));
}

.top5-qty {
  font-weight: 700;
}

/* =========================================================
   HOME – Eading
   Accesos directos (launcher)
   ========================================================= */

.quick-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.quick-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  padding: 14px 10px;
  border-radius: 16px;
  background: #f9fafb;
  border: 1px solid rgba(0, 0, 0, 0.08);
  transition: all 0.2s ease;
}

.quick-item:hover {
  background: #eef4ff;
  transform: translateY(-2px);
}

.quick-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #004a9c;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  margin-bottom: 6px;
}

.quick-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #374151;
  text-align: center;
}

/* Responsive */
@media (max-width: 420px) {
  .quick-icon {
    width: 46px;
    height: 46px;
    font-size: 1.2rem;
  }
}

/* =========================================================
   Toast global reutilizable - Eading
   ========================================================= */
.toast-stack {
  position: fixed;
  z-index: 2000;
  top: 14px;
  right: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: min(380px, calc(100vw - 24px));
  pointer-events: none;
}

@media (max-width: 575px) {
  .toast-stack {
    left: 12px;
    right: 12px;
    top: 12px;
    max-width: unset;
  }
}

.toastx {
  pointer-events: auto;
  border-radius: 16px;
  padding: 12px 12px 10px;
  background: rgba(255, 255, 255, 0.84);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.14);
  transform: translateY(-8px);
  opacity: 0;
  transition:
    transform 0.22s ease,
    opacity 0.22s ease;
  overflow: hidden;
}

.toastx.show {
  transform: translateY(0);
  opacity: 1;
}

.toastx-row {
  display: grid;
  grid-template-columns: 34px 1fr 28px;
  gap: 10px;
  align-items: start;
}

.toastx-ic {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 15px;
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.14);
}

.toastx-title {
  margin: 0;
  font-size: 13px;
  font-weight: 750;
  letter-spacing: 0.2px;
  color: #111827;
  line-height: 1.1;
}

.toastx-msg {
  margin: 3px 0 0 0;
  font-size: 12.5px;
  color: #374151;
  line-height: 1.35;
  word-break: break-word;
}

.toastx-msg strong {
  font-weight: 750;
}

.toastx-close {
  border: 0;
  background: transparent;
  width: 28px;
  height: 28px;
  border-radius: 10px;
  color: rgba(17, 24, 39, 0.65);
  display: grid;
  place-items: center;
  cursor: pointer;
}

.toastx-close:hover {
  background: rgba(0, 0, 0, 0.06);
  color: rgba(17, 24, 39, 0.85);
}

.toastx-bar {
  height: 3px;
  margin-top: 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

.toastx-bar > span {
  display: block;
  height: 100%;
  width: 100%;
  transform-origin: left;
  transform: scaleX(1);
  animation: toastxShrink linear forwards;
}

@keyframes toastxShrink {
  to {
    transform: scaleX(0);
  }
}

/* Variantes */
.toastx.success .toastx-ic {
  background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
}
.toastx.success .toastx-bar > span {
  background: #16a34a;
}

.toastx.error .toastx-ic {
  background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%);
}
.toastx.error .toastx-bar > span {
  background: #ef4444;
}

.toastx.info .toastx-ic {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
}
.toastx.info .toastx-bar > span {
  background: #2563eb;
}

.toastx.warn .toastx-ic {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}
.toastx.warn .toastx-bar > span {
  background: #f59e0b;
}

.toastx.brand .toastx-ic {
  background: linear-gradient(135deg, #004a9c 0%, #0a5fc4 100%);
}
.toastx.brand .toastx-bar > span {
  background: #004a9c;
}
