:root {
    --bs-primary: #f79e00;
    --bs-secondary: #bf5444;
    --bs-success: #16A34A;
    --bs-info: #756bfa;
    --bs-warning: #ffc25d;
    --bs-danger: #DC2626;
    --bs-light: #ffffff;
    --bs-gray: #6c757d;
}

body, html {
    height: 100%;
    margin: 0;
}
body {
    font-size: 14px;
    color: #575962;
    font-family: "Work Sans", "Noto Sans", sans-serif;
}

#spinner-overlay {
    position: fixed !important;
    width: 100% !important;
    height: 100% !important;
    top: 0 !important;
    right: 0 !important;
    left: 0 !important;
}


.loading-effect {
  display: inline-block;
  animation: pulse 1s infinite ease-in-out;
}

@keyframes pulse {
  0% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
  100% {
    opacity: 1;
  }
}

@media print {
    #main {
        margin-left: 0 !important;
        margin-top: 0 !important;
    }
}

#navbar-brand {
  width: 250px;
  transition: transform 0.3s ease;
}
#navbar-brand.shrink {
    transform: translateX(-60%);
}

#switch-tenant-container {
    flex: 1;
    justify-self: center !important;
    max-width: 400px;
}

#main {
    margin-left: 250px; /* Width of the aside */
    margin-top: 50px;
    transition: margin-left 0.3s ease;
    background-color: #fcfdff;
}

#aside.hidden {
    transform: translateX(-100%);
}

#main.fullwidth {
    margin-left: 0;
    display: block !important;
}

/* Backdrop of the mobile drawer: never shown on desktop. */
#aside-backdrop {
    display: none;
}

/* Phones and small tablets: the side menu is a drawer, not a fixed column.
   Below this width 250px of menu left the content in a strip too narrow to
   read (the collectors work from a phone). It opens with the same hamburger
   and closes by tapping outside or picking an option. */
@media (max-width: 991.98px) {
    #main,
    #main.fullwidth {
        margin-left: 0;
    }
    /* Conserva los 250px de #aside (declarados más abajo en este archivo, así
       que un ancho puesto aquí no ganaría): sobre 375px deja ver una franja del
       contenido detrás del velo, que es lo que indica que el menú se cierra
       tocando afuera. */
    #aside,
    #aside.hidden {
        transform: translateX(-100%);
    }
    #aside.mobile-open {
        transform: none;
        box-shadow: 0 0 30px rgba(0, 0, 0, 0.25);
    }
    #aside-backdrop {
        position: fixed;
        inset: 56px 0 0 0;
        background: rgba(15, 23, 42, 0.45);
        z-index: 999;
    }
    #aside-backdrop.show {
        display: block;
    }
}

.profile-pic {
  text-decoration: none;
}
.hidden-caret .dropdown-toggle::after {
  display: none !important;
}
.navbar-expand-lg .navbar-nav .dropdown-menu {
    left: auto;
    right: 0;
}
.avatar {
  position: relative;
  display: inline-block;
  width: 3rem;
  height: 3rem;
}
.avatar-xs {
  width: 1.5rem;
  height: 1.5rem;
}
.avatar-sm {
  width: 2.5rem;
  height: 2.5rem;
}
.avatar-lg {
  width: 3.75rem;
  height: 3.75rem;
}
.avatar-xl {
  width: 6rem;
  height: 6rem;
}
.avatar-img {
  width: 100%;
  height: 100%;
  -o-object-fit: cover;
  object-fit: cover;
}
.rounded-circle {
  border-radius: 50% !important;
}

#aside {
    height: calc(100% - 62px);
    width: 250px;
    float: left;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    margin-top: 56px;
    overflow-y: auto;
    display: block;
    z-index: 1000;
    color: #ffffff;
    font-weight: 200;
    background: #ffffff;
    -webkit-box-shadow: 4px 4px 10px rgba(69, 65, 78, 0.06);
    -moz-box-shadow: 4px 4px 10px rgba(69, 65, 78, 0.06);
    box-shadow: 4px 4px 10px rgba(69, 65, 78, 0.06);
    transition: transform 0.3s ease;
}
.sidebar-wrapper {
    position: relative;
    overflow: hidden; /* Remove this to enable native scrolling */
}

.sidebar-content {
    position: relative;
    overflow-y: auto; /* Enable vertical scrolling */
    height: 100%;
    overflow-x: hidden; /* Keep horizontal scrolling disabled to maintain design */
}
.sidebar-wrapper > .sidebar-content::-webkit-scrollbar {
  height: 0;
  width: 0;
}
.sidebar-wrapper > .sidebar-content {
    padding-bottom: 55px;
    border: none !important;
    box-sizing: content-box !important;
    height: auto;
    left: 0;
    margin: 0;
    max-height: none;
    max-width: none !important;
    overflow: scroll !important;
    position: relative !important;
    top: 0;
    width: auto !important;
}
.sidebar-wrapper .nav {
  display: block;
}
.sidebar-wrapper .nav .nav-item {
    padding: 0 15px;
    display: list-item;
}
.sidebar-wrapper .nav > .nav-item a {
    display: flex;
    align-items: center;
    color: #575962;
    padding: 6px 10px;
    width: 100%;
    font-size: 14px;
    font-weight: 400;
    position: relative;
    margin-bottom: 3px;
    text-decoration: none;
}
.sidebar-wrapper .nav .nav-item a {
    padding: 8px 10px;
    border-radius: 5px;
}
.sidebar-wrapper .nav .nav-item a:hover, .sidebar-wrapper .nav .nav-item a:focus, .sideba-wrapper .nav .nav-item a[data-bs-toggle=collapse][aria-expanded=true] {
  background: rgba(199, 199, 199, 0.2);
}
.sidebar-wrapper .nav > .nav-item a i {
    color: #8d9498;
    margin-right: 15px;
    width: 25px;
    text-align: center;
    vertical-align: middle;
    float: left;
    font-size: 18px;
    line-height: 30px;
}
.sidebar-wrapper .nav > .nav-item a p {
    font-size: 14px;
    margin-bottom: 0px;
    margin-right: 5px;
    color: #8d9498;
}
.caret {
  display: inline-block;
  width: 0;
  height: 0;
  margin-left: .255em;
  vertical-align: .255em;
  content: "";
  border-top: .3em solid;
  border-right: 0.3em solid transparent;
  border-bottom: 0;
  border-left: 0.3em solid transparent;
}
.sidebar-wrapper .nav > .nav-item a .caret {
    margin-left: auto;
    margin-right: 10px;
    transition: all .5s;
    color: #8d9498;
}
.sidebar-wrapper .nav > .nav-item a[data-bs-toggle=collapse][aria-expanded=true] .caret {
  filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=2);
  -webkit-transform: rotate(-180deg);
  transform: rotate(-180deg);
}
.sidebar-wrapper .nav-collapse.subnav {
    padding-bottom: 10px;
    margin-bottom: 0px;
}
.sidebar-wrapper .nav.nav-primary > .nav-item.active > a {
  background: #f79e00 !important;
  box-shadow: 4px 4px 10px 0 rgba(0, 0, 0, 0.1), 4px 4px 15px -5px rgba(21, 114, 232, 0.4) !important;
}
.sidebar-wrapper .nav.nav-primary > .nav-item.active > a p, .sidebar-wrapper .nav.nav-primary > .nav-item.active > a i, .sidebar-wrapper .nav.nav-primary > .nav-item.active > a .caret, .sidebar-wrapper .nav.nav-primary > .nav-item.active > a span {
    color: #ffffff !important;
}
.sidebar-wrapper .nav-collapse.subnav li a {
    padding-left: 40px !important;
}
.sidebar-wrapper .nav .nav-item a:hover, .sidebar-wrapper .nav .nav-item a:focus, .sidebar-wrapper .nav .nav-item a[data-bs-toggle=collapse][aria-expanded=true] {
    background: rgba(199, 199, 199, 0.2);
}
.sidebar-wrapper .nav-collapse li a {
    margin-bottom: 3px !important;
    padding: 10px 25px !important;
}
.sidebar-wrapper .nav-collapse li a .sub-item {
    font-size: 14px;
    position: relative;
    margin-left: 25px;
    opacity: .85;
}
.sidebar-wrapper .nav-collapse li a .sub-item:before {
    content: '';
    height: 4px;
    width: 4px;
    background: rgba(131, 132, 138, 0.89);
    position: absolute;
    left: -15px;
    top: 50%;
    transform: translateY(-50%);
    border-radius: 100%;
}
.sidebar-wrapper .nav .nav-item .active a {
    background: rgba(199, 199, 199, 0.2);
}
.sidebar-wrapper .nav-collapse li.active > a {
    font-weight: 600;
}

.hive-card {
    border: 0 !important;
    border-radius: 0.5rem;
}

.hive-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 20px auto;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    overflow: hidden;
}

.hive-table tbody tr td {
    border-bottom: 1px solid #e5e7eb !important; /* Use !important to override Bootstrap-specific styles */
}

.hive-table tbody tr:last-child td {
    border-bottom: none !important; /* Ensure no border on the last row */
}

.hive-table th, .hive-table td {
    padding: 8px 12px;
    vertical-align: middle;
}

.hive-table > thead, .hive-table > tfoot {
    background-color: #f2f5f7;
    box-sizing: border-box;
    border-width: 0;
    border-style: solid;
    border-color: #e5e7eb;
}

.hive-table th {
    box-sizing: border-box;
    border-width: 0;
    border-style: solid;
    border-color: #e5e7eb;
    padding: 0.75rem 1.5rem;
    text-align: left;
    font-size: 0.75rem;
    line-height: 1rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgb(107 114 128);
}

.hive-table td {
    box-sizing: border-box;
    border-width: 0;
    border-style: solid;
    border-color: #e5e7eb;
}

/* Typography */
.text-left {
    text-align: left !important;
}
.fw-400 {
    font-weight: 400 !important;
}
.fw-500 {
    font-weight: 500 !important;
}
.fw-600 {
    font-weight: 600 !important;
}
.fw-700 {
    font-weight: 700 !important;
}
.text-xs {
    font-size: 0.75rem !important;
    line-height: 1rem !important;
}
.text-sm {
    font-size: 0.875rem !important;
    line-height: 1.25rem !important;
}
.text-xl {
    font-size: 1.25rem !important;
    line-height: 1.75rem !important;
}
.text-2xl {
    font-size: 1.5rem !important;
    line-height: 2rem !important;
}
.money-td {
  text-align: right !important;
  white-space: nowrap !important;
}

.w-30 {
    width: 30% !important;
}

.w-48 {
    width: 48% !important;
}

/* CheckBox */
.hv-checkbox {
    display: inline-block;
    width: 20px;
    height: 20px;
    position: relative;
}

.hv-checkbox input {
    display: none;
}

.hv-checkbox input+label {
    position: relative;
    cursor: pointer;
    padding-left: 35px;
}

.hv-checkbox input+label:before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    width: 30px;
    height: 30px;
    border: 2px solid #f79e00 !important;
    border-radius: 3px;
}

.hv-checkbox input:checked+label:before {
    background-color: #f79e00 !important;
}

.hv-checkbox input:disabled+label {
    opacity: 0.5;
}

.hv-checkbox input+label:hover:before {
    background-color: #f79e00 !important;
}

/* Buttons */
.btn-none {
    background: none !important;
    border: none !important;
    color: inherit !important;
    font: inherit !important;
    cursor: pointer !important;
    outline: inherit !important;
    border-radius: 25% !important;
}
.btn-white {
  background: #ffffff !important;
  color: #1a2035 !important;
}
.btn-white:hover, .btn-white:focus, .btn-white:disabled {
    background: #ffffff !important;
    color: #1a2035 !important;
}

.btn-default {
      background: #1a2035 !important;
      color: #ffffff !important;
}
.btn-default:hover, .btn-default:focus, .btn-default:disabled {
    background: #1a2035 !important;
    color: #ffffff !important;
}

.btn-primary {
    background: #f79e00 !important;
    border-color: #f79e00 !important;
}
.btn-primary:hover {
    color: #fff;
    background-color: #d88800 !important;
    border-color: #c07d00 !important;
}
.btn-check:focus + .btn-primary, .btn-primary:focus {
    color: #fff !important;
    background-color: #d88800 !important;
    border-color: #c07d00 !important;
    box-shadow: 0 0 0 .25rem rgba(247, 158, 0, .5) !important;
}
.btn-primary.disabled, .btn-primary:disabled {
    background-color: #ffc472;
    border-color: #ffc472;
    cursor: not-allowed;
    opacity: 0.65;
}

.btn-secondary {
    background: #bf5444 !important;
    border-color: #bf5444 !important;
}
.btn-secondary:hover {
    color: #fff;
    background-color: #a7493c !important;
    border-color: #953e35 !important;
}
.btn-check:focus + .btn-secondary, .btn-secondary:focus {
    color: #fff !important;
    background-color: #a7493c !important;
    border-color: #953e35 !important;
    box-shadow: 0 0 0 .25rem rgba(191, 84, 68, .5) !important;
}
.btn-secondary.disabled, .btn-secondary:disabled {
    background-color: #d8a29a;
    border-color: #d8a29a;
    cursor: not-allowed;
    opacity: 0.65;
}

.btn-info {
    background: #756bfa !important;
    border-color: #756bfa !important;
}
.btn-info:hover {
    color: #fff;
    background-color: #5f55e6 !important;
    border-color: #534ace !important;
}
.btn-check:focus + .btn-info, .btn-info:focus {
    color: #fff !important;
    background-color: #5f55e6 !important;
    border-color: #534ace !important;
    box-shadow: 0 0 0 .25rem rgba(117, 107, 250, .5) !important;
}
.btn-info.disabled, .btn-info:disabled {
    background-color: #b7affd;
    border-color: #b7affd;
    cursor: not-allowed;
    opacity: 0.65;
}

.btn-success {
    background: #16A34A !important;
    border-color: #16A34A !important;
}
.btn-success:hover {
    color: #fff;
    background-color: #15803D !important;
    border-color: #166534 !important;
}
.btn-check:focus + .btn-success, .btn-success:focus {
    color: #fff !important;
    background-color: #15803D !important;
    border-color: #166534 !important;
    box-shadow: 0 0 0 .25rem rgba(22, 163, 74, .5) !important;
}
.btn-success.disabled, .btn-success:disabled {
    color: #fff;
    background-color: #86EFAC;
    border-color: #86EFAC;
    cursor: not-allowed;
    opacity: 0.65;
}

.btn-warning {
    background: #ffc25d !important;
    border-color: #ffc25d !important;
    color: #ffffff !important;
}
.btn-warning:hover {
    color: #ffffff;
    background-color: #e6a84b !important;
    border-color: #d59a44 !important;
}
.btn-check:focus + .btn-warning, .btn-warning:focus {
    color: #ffffff !important;
    background-color: #e6a84b !important;
    border-color: #d59a44 !important;
    box-shadow: 0 0 0 .25rem rgba(255, 194, 93, .5) !important;
}
.btn-warning.disabled, .btn-warning:disabled {
    color: #ffffff;
    background-color: #ffe1a6;
    border-color: #ffe1a6;
    cursor: not-allowed;
    opacity: 0.65;
}

.btn-danger {
    background: #DC2626 !important;
    border-color: #DC2626 !important;
}
.btn-danger:hover {
    color: #fff;
    background-color: #B91C1C !important;
    border-color: #991B1B !important;
}
.btn-check:focus + .btn-danger, .btn-danger:focus {
    color: #fff !important;
    background-color: #B91C1C !important;
    border-color: #991B1B !important;
    box-shadow: 0 0 0 .25rem rgba(220, 38, 38, .5) !important;
}
.btn-danger.disabled, .btn-danger:disabled {
    color: #fff;
    background-color: #FCA5A5;
    border-color: #FCA5A5;
    cursor: not-allowed;
    opacity: 0.65;
}

.btn-light {
    background: #ffffff !important;
    border-color: transparent;
}
.btn-light:hover {
    color: #000;
    background-color: #e6e6e6 !important;
    border-color: transparent;
}
.btn-check:focus + .btn-light, .btn-light:focus {
    color: #000 !important;
    background-color: #e6e6e6 !important;
    border-color: transparent;
    box-shadow: 0 0 0 .25rem rgba(255, 255, 255, .5) !important;
}
.btn-light.disabled, .btn-light:disabled {
    color: #6c757d;
    background-color: #f8f9fa;
    border-color: transparent;
    cursor: not-allowed;
    opacity: 0.65;
}

.btn-gray {
    background: #6c757d !important;
    border-color: #6c757d !important;
    color: #fff !important;
}
.btn-gray:hover {
    color: #fff;
    background-color: #5a6268 !important; /* Slightly darker shade for hover effect */
    border-color: #545b62 !important; /* Darker border on hover */
}
.btn-check:focus + .btn-gray, .btn-gray:focus {
    color: #fff !important;
    background-color: #5a6268 !important;
    border-color: #545b62 !important;
    box-shadow: 0 0 0 .25rem rgba(108, 117, 125, .5) !important; /* Box-shadow for focus indication */
}
.btn-gray.disabled, .btn-gray:disabled {
    color: #e9ecef;
    background-color: #adb5bd;
    border-color: #adb5bd;
    cursor: not-allowed;
    opacity: 0.65;
}
/**/

/* Small uppercase filter/field label — used by saved_filters_dropdown.html
   and any list view with a compact filter toolbar (ver purchase_list.html). */
.f-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 800;
    color: #64748b;
    line-height: 1;
    margin-bottom: 3px;
}

/* Filter toolbar widgets (dropdowns, date range) — patrón estándar de
   filtros de lista, ver hive-ui-ux-guide.md sección 8. Originalmente
   local a mm/purchase_list.html, ahora global para que cualquier vista
   nueva lo use sin copiar CSS. */
.filter-item {
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 0.25rem;
    padding: 0.3rem 0.85rem;
    cursor: pointer;
    height: 38px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    transition: all 0.2s;
}
.filter-item:hover {
    background: #fff;
    border-color: #cbd5e1;
}
.f-value {
    font-size: 13px;
    color: #1e293b;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.search-group {
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 0.25rem;
    padding: 0 0.85rem;
    display: flex;
    align-items: center;
    height: 48px;
}
.search-group input {
    border: none;
    background: transparent;
    outline: none;
    width: 100%;
    margin-left: 8px;
    font-size: 0.9rem;
    color: #1e293b;
}

/* Saved filters (presets) — filas renderizadas por
   core/static/core/js/saved_filters.js dentro de
   core/templates/core/saved_filters_dropdown.html */
.saved-filter-item {
    padding: 0.5rem 0.75rem;
    border-radius: 0.4rem;
    font-size: 13.5px;
    font-weight: 500;
    color: #1e293b;
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: background 0.2s;
}
.saved-filter-item:hover {
    background: #f1f5f9;
    color: #f79e00;
}

/* DataTables full-table loading overlay (ver hive-ui-ux-guide.md sección 5).
   Ocultamos el indicador nativo — se mantiene processing:true solo para que
   dispare el evento processing.dt, no para mostrar su propio spinner (si
   no, aparecen dos "Cargando..." a la vez). El overlay en sí
   (.dt-loading-overlay/.dt-loading-inner) lo agrega cada vista. */
.dt-processing, .dataTables_processing { display: none !important; }

/* El overlay de carga que sí se muestra. Estaba copiado en 48 plantillas; el
   position:sticky mantiene el spinner a la vista aunque la tabla sea larga y el
   usuario esté scrolleado hacia abajo. La vista solo agrega el marcado y el
   listener de processing.dt (ver hive-ui-ux-guide.md sección 5). */
.dt-loading-overlay {
    display: none;
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, .75);
    z-index: 10;
}

.dt-loading-overlay.active {
    display: block;
}

.dt-loading-overlay .dt-loading-inner {
    position: sticky;
    top: 40%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .5rem;
    padding-top: 2rem;
}

/* Bootstrap 5.0.2's .text-* utilities are hardcoded to Bootstrap's default
   blue/green/etc, NOT the brand colors above — override them so
   text-primary/text-success/etc actually render the brand palette. */
.text-primary { color: #f79e00 !important; }
.text-secondary { color: #bf5444 !important; }
.text-success { color: #16A34A !important; }
.text-info { color: #756bfa !important; }
.text-warning { color: #ffc25d !important; }
.text-danger { color: #DC2626 !important; }

/* Same problem as .text-primary above, but for pagination (DataTables
   uses Bootstrap's .pagination/.page-link as-is, hardcoded to Bootstrap
   blue #007bff) — override so every paginated table uses brand orange. */
.page-link {
    color: #f79e00;
}
.page-link:hover {
    color: #d88800;
    background-color: #f8f9fa;
}
.page-link:focus {
    box-shadow: 0 0 0 .2rem rgba(247, 158, 0, .25);
}
.page-item.active .page-link {
    background-color: #f79e00;
    border-color: #f79e00;
    color: #fff;
}

/* Una tabla ancha de DataTables desborda su contenedor: 36 plantillas repiten
   este parche con `scroll`, que deja la barra siempre visible. `auto` la muestra
   solo cuando hace falta. */
.dataTables_wrapper {
    overflow-x: auto;
}

/* Columna "Acciones" fija al borde derecho dentro de .table-responsive —
   evita tener que escrolear toda la fila horizontalmente en tablas anchas
   (muchas columnas) para llegar al botón de editar/eliminar/kebab. Aplicar
   la clase .col-actions al th y al td de esa columna (ver hive-ui-ux-guide.md
   sección 5). El box-shadow simula el borde que separa la columna fija del
   resto de la tabla al hacer scroll.

   Notas de compatibilidad — sin esto el sticky se ve "roto" (otras columnas
   se superponen o el fondo queda transparente al hacer scroll):
   - Bootstrap pinta el fondo/hover de cada celda con
     `box-shadow: inset 0 0 0 9999px var(--bs-table-accent-bg)`, no con
     `background-color` — por eso el fondo de .col-actions necesita
     `!important` para no quedar transparente detrás de ese box-shadow.
   - `border-collapse: collapse` (el default de `.table` de Bootstrap)
     rompe la posición `sticky` en columnas en varios navegadores — hay
     que forzar `border-collapse: separate` en cualquier tabla que tenga
     una columna sticky (`:has()` lo aplica solo a esas tablas). */
.table-responsive table:has(.col-actions) {
    border-collapse: separate;
    border-spacing: 0;
}
.table-responsive table th.col-actions,
.table-responsive table td.col-actions {
    position: sticky;
    right: 0;
    z-index: 5;
    background-color: #fff !important;
    box-shadow: -6px 0 6px -6px rgba(0, 0, 0, .15);
    /* width:1% + white-space:nowrap es el truco estándar para que una
       columna de table-layout:auto se encoja al mínimo necesario para
       su contenido (1 ícono, o 1 ícono + separación si hay varios) en
       vez de repartirse el ancho sobrante junto con las demás columnas. */
    width: 1%;
    white-space: nowrap;
}
.table-responsive table thead th.col-actions {
    background-color: #f8fafc !important;
    z-index: 6;
    padding-left: 1rem;
}
.table-responsive table tbody tr:hover td.col-actions {
    background-color: #f8fafc !important;
}

/* selectize.js ships .375rem — usamos el mismo radius más chico que el
   resto de inputs/botones de HIVE (.25rem). */
.selectize-input,
.selectize-input.dropdown-active,
.selectize-dropdown,
.selectize-dropdown.form-control {
    border-radius: 0.25rem;
}

/* selectize.js solo dibuja la flechita de dropdown en modo single-select
   (.selectize-control.single); en modo multi (multiple="true", ej.
   filtros de categoría) no hay ningún indicador visual — se agrega el
   mismo triángulo que ya usa el single, para que quede claro que es un
   dropdown. */
.selectize-control.multi .selectize-input {
    padding-right: calc(0.75rem + 15px) !important;
}
.selectize-control.multi .selectize-input:not(.no-arrow):after {
    content: " ";
    display: block;
    position: absolute;
    top: 50%;
    right: calc(0.75rem + 5px);
    margin-top: -3px;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 5px 5px 0 5px;
    border-color: #64748b transparent transparent transparent;
}
.selectize-control.multi .selectize-input:not(.no-arrow).dropdown-active:after {
    margin-top: -4px;
    border-width: 0 5px 5px 5px;
    border-color: transparent transparent #64748b transparent;
}

/* Bootstrap ships .2rem para el tamaño "sm" de .input-group — lo subimos
   a .25rem para que quede igual al resto de controles de HIVE. */
.input-group-sm > .form-control,
.input-group-sm > .input-group-append > .btn,
.input-group-sm > .input-group-append > .input-group-text,
.input-group-sm > .input-group-prepend > .btn,
.input-group-sm > .input-group-prepend > .input-group-text,
.input-group-sm > .btn,
.input-group-sm > .form-select,
.input-group-sm > .input-group-text {
    border-radius: 0.25rem;
}

/* Soft badges (bg-<color>-soft + text-<color>) — tinted background at ~12%
   of the brand color, solid brand color text. Used across the app for
   status badges (ver hive-architecture.md / hive-ui-ux-guide.md). */
.bg-primary-soft { background-color: rgba(247, 158, 0, .12) !important; }
.bg-secondary-soft { background-color: rgba(191, 84, 68, .12) !important; }
/* Verde/rojo pastel tomados de crm/ar.html (Cuentas por Cobrar) — colores
   literales, no un tinte por opacidad del color base, para igualar el tono
   exacto que ya se veía bien ahí (badges .badge-nd/.badge-90 de esa vista). */
.bg-success-soft { background-color: #DCFCE7 !important; }
.bg-info-soft { background-color: rgba(117, 107, 250, .12) !important; }
.bg-warning-soft { background-color: rgba(255, 194, 93, .18) !important; }
.bg-danger-soft { background-color: #FEE2E2 !important; }

/* Botones de la columna Acciones de una vista de lista (ver
   hive-ui-ux-guide.md sección 5) — azul tomado de crm/ar.html
   (.text-blue-600/.text-blue-700, botones de expandir/colapsar de esa
   vista), reemplazando el gris neutro de btn-outline-secondary que se
   usaba antes en ambos casos. Ambos son planos, sin borde ni fondo —
   .btn-kebab (trigger del menú ⋮ more_vert, 2+ acciones) y
   .btn-row-icon (ícono único Editar/Ver/Eliminar, 1 sola acción)
   comparten el mismo tratamiento visual, solo cambia el ícono. */
.btn-kebab, .btn-row-icon,
table.dataTable a.btn-kebab, table.dataTable a.btn-row-icon,
td.col-actions a.btn-kebab, td.col-actions a.btn-row-icon,
td.col-actions .btn-kebab, td.col-actions .btn-row-icon {
    color: #2563EB !important;
    border: none !important;
    background: transparent !important;
}
.btn-kebab:hover, .btn-kebab:focus,
.btn-row-icon:hover, .btn-row-icon:focus,
table.dataTable a.btn-kebab:hover, table.dataTable a.btn-kebab:focus,
table.dataTable a.btn-row-icon:hover, table.dataTable a.btn-row-icon:focus {
    color: #1D4ED8 !important;
    background: transparent !important;
}
.btn-kebab .material-icons-outlined, .btn-row-icon .material-icons-outlined {
    font-size: 20px !important;
}

/* Backgrounds */
.bg-slate-100 {
    background-color: rgb(241 245 249) !important;
}
.bg-gray-50 {
    background-color: rgb(249 250 251) !important;
}
.bg-green-100 {
    background-color: rgb(210, 245, 220) !important;
}
.bg-red-50 {
    background-color: rgb(254 242 242) !important;
}
.bg-red-100 {
    background-color: rgb(252, 230, 230) !important;
}
.hover\:bg-red-100:hover {
    background-color: rgb(254 226 226) !important;
}
.bg-yellow-100 {
    background-color: rgb(252, 250, 205) !important;
}
.bg-sky-100 {
    background-color: rgb(214, 240, 250) !important;
}
.bg-blue-50 {
    background-color: rgb(239 246 255) !important;
}
.hover\:bg-blue-100:hover {
    background-color: rgb(219 234 254) !important;
}

/* text color */
.text-primary {
  color: #f79e00 !important;
}
.text-slate-700 {
    color: rgb(51 65 85) !important;
}
.text-slate-800 {
    color: rgb(30 41 59) !important;
}
.text-slate-900 {
    color: rgb(15 23 42) !important;
}
.text-gray-400 {
    color: rgb(156 163 175) !important;
}
.text-gray-500 {
    color: rgb(107 114 128) !important;
}
.text-gray-700 {
    color: rgb(55 65 81) !important;
}
.hover\:text-gray-700:hover {
    color: rgb(55 65 81) !important;
}
.text-green-800 {
    color: rgb(18, 90, 45) !important;
}
.text-red-500 {
    color: rgb(239 68 68) !important;
}
.text-red-600 {
    color: rgb(220 38 38) !important;
}
.text-red-700 {
    color: rgb(185 28 28) !important;
}
.hover\:text-red-700:hover {
    color: rgb(185 28 28) !important;
}
.text-red-800 {
    color: rgb(139, 30, 30) !important;
}
.text-yellow-800 {
    color: rgb(120, 70, 10) !important;
}
.text-sky-800 {
    color: rgb(5, 80, 125) !important;
}
.text-blue-600 {
    color: rgb(37 99 235) !important;
}
.text-blue-700 {
    color: rgb(29 78 216) !important;
}
.hover\:text-blue-700:hover {
    color: rgb(29 78 216) !important;
}
.hover\:text-blue-800:hover {
    color: rgb(30 64 175) !important;
}


.border-blue-200 {
    border-color: rgb(191 219 254) !important;
}


/* Swal */
.swal-50pcj {
  width: 95% !important;
  max-width: 800px;
}

@media (min-width: 768px) {
  .swal-50pcj {
    width: 60% !important;
  }
}

@media (min-width: 1200px) {
  .swal-50pcj {
    width: 50% !important;
  }
}

/* Highlight Glow */
@keyframes glow {
  0% {
    box-shadow: 0 0 10px 0 rgb(18, 105, 219);
  }
  50% {
    box-shadow: 0 0 20px 10px rgb(18, 105, 219);
  }
  100% {
    box-shadow: 0 0 10px 0 rgb(18, 105, 219);
  }
}
.glowing {
  animation: glow 2s;
}

/* ==========================================================================
   FICHAS (vistas de detalle) — sección 9 de hive-ui-ux-guide.md

   Estas clases estaban copiadas y pegadas en cada plantilla de ficha, con
   valores ligeramente distintos en cada una (tres "labels" diferentes para el
   mismo dato, dos sistemas de tiles idénticos con distinto nombre). Viven acá
   para que haya una sola definición y el ajuste se haga en un solo lugar.
   ========================================================================== */

/* Card de una sección de ficha: reemplaza a repetir
   `card shadow-sm border-0 hive-card bg-white p-3` en cada bloque. */
.ficha-section {
    background: #fff;
    border: 0;
    border-radius: 0.5rem;
    box-shadow: 0 .125rem .25rem rgba(0, 0, 0, .075);
    padding: 1rem;
}

/* Encabezado: el módulo arriba, el nombre del registro abajo. */
.ficha-eyebrow {
    font-size: 0.8rem;
    font-weight: 500;
    color: #9ca2b3;
    letter-spacing: .02em;
}

/* Par etiqueta/valor. .empty marca el dato que no existe, para que un campo
   vacío se lea como vacío y no como un error de carga. */
.field-label {
    font-size: 12px;
    font-weight: 500;
    color: #64748b;
    margin-bottom: 0;
    line-height: 1.35;
}

.field-value {
    font-size: 13.5px;
    font-weight: 400;
    color: #1a2035;
    margin-bottom: 0;
    line-height: 1.4;
    word-break: break-word;
}

.field-value.empty {
    color: #b6bcc9;
    font-style: italic;
}

/* Cifra destacada (saldo, total, existencia). Reemplaza a .kpi-tile y
   .amount-box, que eran el mismo diseño con dos nombres. */
.kpi-tile {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: .5rem .85rem;
    background: #fff;
    height: 100%;
}

.kpi-tile .label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .05em;
    font-weight: 700;
    color: #64748b;
}

.kpi-tile .value {
    font-size: 17px;
    font-weight: 800;
    color: #1a2035;
    font-variant-numeric: tabular-nums;
    line-height: 1.3;
}

.kpi-tile.is-main {
    border-color: var(--bs-primary);
}

/* Foto o iniciales del registro que representa a una persona o entidad. */
.ficha-photo {
    width: 76px;
    height: 76px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--bs-primary);
    color: #fff;
    font-size: 2rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}

/* Variante para una ficha sin cara: un ícono de marca en vez de iniciales. */
.ficha-icon {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    background: var(--bs-primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}

.ficha-icon .material-icons-outlined {
    font-size: 28px;
}

/* Código / placa / correlativo del registro, junto al título. */
.ficha-code {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border: 2px solid #1a2035;
    border-radius: 8px;
    background: #fff;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-weight: 700;
    font-size: 13px;
    letter-spacing: .5px;
    color: #1a2035;
}

/* La misma idea que .ficha-code pero del tamaño de una celda: el identificador
   del registro en la primera columna de una vista de lista (placa, código, SKU,
   correlativo). Va dentro del enlace a la ficha, ver la sección 5 de la guía. */
.hive-code-chip {
    display: inline-block;
    padding: 2px 8px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: #f8fafc;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-weight: 700;
    letter-spacing: .5px;
    color: #1a2035;
    /* A code never breaks in two (DNOV-05 on a phone). */
    white-space: nowrap;
}

/* Teléfono / correo / dirección bajo el nombre, con su ícono. */
.contact-line {
    display: flex;
    align-items: center;
    gap: .35rem;
    font-size: 13px;
    color: #64748b;
}

.contact-line .material-icons-outlined {
    font-size: 16px;
}

/* Enlace a WhatsApp junto a un teléfono: el logo (verde de WhatsApp, no el de
   marca) en vez de la palabra. El enlace lleva aria-label y title. */
.whatsapp-link {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

.whatsapp-icon {
    display: inline-block;
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%2325D366' d='M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 00-3.48-8.413Z'/%3E%3C/svg%3E") no-repeat center / contain;
}

.whatsapp-icon.sm {
    width: 14px;
    height: 14px;
}

.whatsapp-link:hover .whatsapp-icon {
    opacity: .8;
}

/* Teléfono con su código de país (core/js/phone_country.js): el código a la
   izquierda, angosto, y el número ocupando el resto. */
.phone-group {
    display: flex;
    gap: .5rem;
}

.phone-group .selectize-control {
    flex: 0 0 7.5rem;
    min-width: 0;
}

/* el código en gris que sigue legible sobre la opción resaltada */
.phone-country-dial {
    opacity: .6;
}

.phone-group > input {
    flex: 1;
    min-width: 0;
}

/* Pestañas de una ficha. Activa en el naranja de marca: antes cada ficha caía
   en el azul por defecto de Bootstrap (#0d6efd) o definía el suyo (#4361ee). */
.ficha-tabs.nav-tabs {
    border-bottom: 1px solid #e2e8f0;
    gap: .25rem;
}

.ficha-tabs.nav-tabs .nav-link {
    display: inline-flex;
    align-items: center;
    border: 0;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    padding: .5rem .85rem;
    font-size: 14px;
    font-weight: 600;
    color: #64748b;
    background: transparent;
}

.ficha-tabs.nav-tabs .nav-link:hover {
    color: #1a2035;
    border-bottom-color: #e2e8f0;
}

.ficha-tabs.nav-tabs .nav-link.active {
    color: var(--bs-primary);
    border-bottom-color: var(--bs-primary);
    background: transparent;
}

.ficha-tabs.nav-tabs .nav-link .material-icons-outlined {
    font-size: 18px;
}

/* Contador dentro de la pestaña: cuántos registros hay en ella. Su color dice
   si esa pestaña pide acción (danger/warning) o ya está resuelta (success),
   así se sabe si queda trabajo sin abrir ninguna. Patrón de la conciliación
   bancaria, elegido por el usuario el 2026-09-21. */
.ficha-tabs.nav-tabs .nav-link .tab-count {
    margin-left: .4rem;
    font-size: 11px;
    font-weight: 700;
    min-width: 1.6em;
    font-variant-numeric: tabular-nums;
}

/* Encabezado y celdas de cualquier tabla de datos de HIVE — vistas de lista y
   fichas por igual. Este bloque estaba copiado, idéntico y apuntando a un #id
   distinto, en 70 plantillas. */
.hive-data-table thead th {
    background: #f8fafc;
    color: #64748b;
    font-size: 11px;
    text-transform: uppercase;
    font-weight: 700;
    border-bottom: 1px solid #e2e8f0;
}

.hive-data-table td,
.hive-data-table th {
    padding: .55rem .75rem;
    vertical-align: middle;
    font-size: 13px;
}

.hive-data-table td.num,
.hive-data-table th.num {
    text-align: right;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.hive-data-table tbody tr:hover > td {
    background: #f8fafc;
}

/* Columna de identificador (id, código corto) en la primera posición: se
   encoge a su contenido. Sin esto DataTables reparte el ancho entre pocas
   columnas y un id de 3 dígitos terminaba ocupando un tercio de la tabla. */
.hive-data-table .col-id {
    width: 1%;
    white-space: nowrap;
}

/* Fila que se despliega para mostrar su detalle (patrón del historial de Taller). */
.hive-data-table tr.expandable {
    cursor: pointer;
}

.hive-data-table tr.expandable .chevron {
    transition: transform .2s;
    color: #94a3b8;
}

.hive-data-table tr.expandable.open .chevron {
    transform: rotate(90deg);
    color: var(--bs-primary);
}

.hive-data-table tr.detail-row > td {
    background: #f8fafc;
    padding: .5rem 1rem 1rem 3rem;
}

/* Anulado / sin efecto. */
.hive-data-table .voided {
    color: #94a3b8;
    text-decoration: line-through;
}
