/* ==========================================
   HALONS UNIFIED CSS v1.0
   Sistema Unificado de Estilos - Agencia de Viajes
   ========================================== */

/* ==========================================
   VARIABLES CSS
   ========================================== */
:root {
  /* Paleta base (alineada con boleto_editar y ejemplo) */
  --halons-primary: #1a57d6;
  --halons-primary-soft: rgba(26, 87, 214, 0.10);
  --halons-secondary: #20c7b1;
  --halons-navy: #0b1b3a;
  --halons-blue: #0f3f9d;
  --halons-teal: #20c7b1;
  --halons-deep: #0b1b3a;
  --halons-dark: #0f172a;

  /* Backgrounds */
  --halons-bg: #f3f6fb;
  --halons-bg-soft: #fbfdff;
  --halons-card: #ffffff;

  /* Estados */
  --halons-success: #16a34a;
  --halons-success-ink: #0f7a35;
  --halons-danger: #ef4444;
  --halons-warning: #f59e0b;
  --halons-info: #3b82f6;

  /* Bordes y separadores */
  --halons-border: #e7edf6;
  --halons-muted: #64748b;

  /* Texto */
  --halons-text: #0f172a;
  --halons-text-muted: #64748b;

  /* Layout */
  --navbar-height: 56px;

  /* Sombras */
  --shadow-sm: 0 6px 14px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 10px 22px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 10px 28px rgba(15, 23, 42, 0.10);
  --shadow-card: 0 10px 22px rgba(15, 23, 42, 0.08);

  /* Radios y tipografia */
  --radius: 16px;
  --radius-sm: 12px;
  --fs-base: 13px;
}

/* ==========================================
   RESET Y BASE
   ========================================== */
* {
  box-sizing: border-box;
}

body {
  background-color: var(--halons-bg);
  font-family: "Inter", "Poppins", "Segoe UI", sans-serif;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  font-size: var(--fs-base);
  color: var(--halons-text);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

/* Levantar toasts para que no queden fuera del viewport */
.toast.position-fixed.bottom-0.end-0 {
  bottom: 2.5rem !important;
}

/* ==========================================
   LAYOUT PRINCIPAL - NAVBAR FIJA
   ========================================== */
.navbar.fixed-top {
  height: var(--navbar-height);
  z-index: 1030;
}

/* Contenedor principal con padding para compensar navbar */
.odoo-main {
  padding-top: calc(var(--navbar-height) + 0.5rem) !important;
  /* padding-bottom: 2.5rem !important; */
  padding-bottom: 0 !important;
  padding-left: 0.25rem !important;
  padding-right: 0.25rem !important;
  min-height: calc(100vh - var(--navbar-height));
}

/* Contenedores principales expandibles */
.halons-container,
.halons-boleto {
  display: flex !important;
  flex-direction: column !important;
  min-height: calc(100vh - 130px) !important;
  padding-bottom: 0.25rem !important;
}

.halons-container .card,
.halons-boleto .card {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.halons-container .card-body,
.halons-boleto .card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.halons-container .table-responsive,
.halons-boleto .table-responsive {
  flex: 1;
  overflow-y: auto;
}

/* Asegurar que table-responsive-fixed tenga ancho correcto */
.card-body .table-responsive-fixed {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
}

.container-fluid {
  max-width: 100%;
  padding-left: 0.25rem;
  padding-right: 0.25rem;
}

/* ==========================================
   NAVBAR
   ========================================== */
.navbar-halons,
.navbar-odoo {
  background-color: #fff;
  border-bottom: 1px solid var(--halons-border);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.navbar-halons .navbar-brand,
.navbar-odoo .navbar-brand {
  color: var(--halons-text);
  font-weight: 600;
  letter-spacing: 0.02em;
}

.navbar-halons .navbar-brand:hover,
.navbar-odoo .navbar-brand:hover {
  color: var(--halons-primary);
}

.navbar-halons .badge-env {
  background: rgba(13, 112, 173, 0.12);
  border-radius: 999px;
  padding: 0.15rem 0.6rem;
  font-size: 0.72rem;
  color: var(--halons-primary);
}

/* Navegación Odoo Style */
.nav-odoo .nav-link {
  color: var(--halons-text);
  font-weight: 500;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  position: relative;
  transition: color 0.15s ease, background-color 0.15s ease;
}

.nav-odoo .nav-link:hover {
  color: var(--halons-primary);
  background-color: rgba(13, 112, 173, 0.10);
}

.nav-odoo .nav-link.active {
  color: var(--halons-primary);
  background-color: transparent;
}

.nav-odoo .nav-link.active::after {
  content: "";
  position: absolute;
  left: 0.75rem;
  right: 0.75rem;
  bottom: 0.4rem;
  height: 3px;
  border-radius: 2px;
  background-color: var(--halons-primary);
}

/* Avatar en navbar */
.avatar-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--halons-primary);
  color: white;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.875rem;
  transition: all 0.2s ease;
}

.avatar-circle:hover {
  background: var(--halons-primary-hover);
}

/* ==========================================
   CARDS
   ========================================== */
.card,
.card-halons,
.card-odoo {
  border: 1px solid var(--halons-border);
  border-radius: var(--radius);
  background: var(--halons-card);
  box-shadow: var(--shadow-card);
  margin-bottom: 0.75rem;
  transition: box-shadow 0.2s ease;
}

.card:hover,
.card-halons:hover,
.card-odoo:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.card-header,
.card-halons .card-header,
.card-odoo .card-header {
  border-radius: var(--radius) var(--radius) 0 0 !important;
  border: 0;
  border-bottom: 1px solid var(--halons-border);
  background: linear-gradient(180deg, #ffffff, var(--halons-bg-soft));
  padding: 0.75rem 1rem;
}

.card-halons .card-header h6,
.card-halons .card-header span,
.card-odoo .card-header h6,
.card-odoo .card-header span {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--halons-deep);
  letter-spacing: 0.2px;
}

.card-body {
  padding: 0.75rem;
}

/* Card Header con color Halons Primary */
.card-header.bg-halons,
.card-header.bg-odoo {
  background: var(--halons-primary) !important;
  color: #fff;
}

.card-header.bg-halons h6,
.card-header.bg-odoo h6 {
  color: #fff !important;
}

/* ==========================================
   BOTONES
   ========================================== */
.btn {
  transition: all 0.2s ease;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-halons,
.btn-odoo {
  background: var(--halons-primary);
  color: #fff;
  border: 0;
  font-size: 0.82rem;
  font-weight: 800;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.12);
}

.btn-halons:hover,
.btn-odoo:hover {
  background: var(--halons-deep);
  color: #fff;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.btn-outline-halons {
  border-radius: 999px;
  border: 1px solid var(--halons-primary);
  color: var(--halons-primary);
  font-size: 0.8rem;
  background: #fff;
}

.btn-outline-halons:hover {
  background: var(--halons-primary-soft);
  color: var(--halons-deep);
  border-color: var(--halons-deep);
}

.btn-soft {
  background: rgba(62, 188, 209, 0.08);
  border: 1px solid rgba(62, 188, 209, 0.2);
  color: var(--halons-primary);
  border-radius: 999px;
  transition: all 0.2s ease;
}

.btn-sm {
  font-size: 0.78rem;
  padding: 0.25rem 0.65rem;
}

.btn-soft:hover {
  background: rgba(62, 188, 209, 0.15);
  border-color: rgba(62, 188, 209, 0.3);
  color: var(--halons-deep);
}

/* ==========================================
   TABLAS
   ========================================== */
.table {
  margin-bottom: 0;
  font-size: 0.82rem;
}

.table-halons {
  margin-bottom: 0;
}

.table thead th,
.table-halons thead th {
  background: #f7faff;
  color: var(--halons-text);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 800;
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid var(--halons-border);
  position: sticky;
  top: 0;
  z-index: 2;
}

.table tbody td,
.table-halons tbody td {
  text-align: left;
  vertical-align: middle;
  padding: 0.5rem 0.75rem;
  font-size: 0.82rem;
  border-bottom: 1px solid var(--halons-border);
  background: #fff;
}

.table-hover tbody tr:hover,
.table-halons tbody tr:hover {
  background-color: rgba(13, 112, 173, 0.05);
}

.table-sm th,
.table-sm td {
  padding: 0.4rem 0.6rem;
  font-size: 0.8rem;
}

/* Tablas con scroll */
.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.table-responsive-fixed {
  max-height: 260px;
  overflow-y: auto;
  overflow-x: auto;
  border: 1px solid var(--halons-border);
  border-radius: 0.7rem;
}


.table-container {
  max-height: calc(100vh - 300px);
  min-height: 300px;
  overflow-y: auto;
  border: 1px solid var(--halons-border);
  border-radius: 0.7rem;
}

/* Headers sticky */
.sticky-header thead th {
  position: sticky;
  top: 0;
  background: #F9FAFB;
  color: var(--halons-text);
  z-index: 10;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* ==========================================
   FORMULARIOS
   ========================================== */
.form-control,
.form-select {
  border-radius: 999px;
  border: 1px solid var(--halons-border);
  font-size: 0.82rem;
  background: #fff;
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.04);
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus,
.form-select:focus {
  border-color: rgba(26, 87, 214, 0.35);
  box-shadow: 0 0 0 4px rgba(26, 87, 214, 0.10);
  outline: 0;
}

.form-control-sm,
.form-select-sm {
  padding: 0.25rem 0.5rem;
  font-size: 0.8rem;
  border-radius: 999px;
}

.form-label {
  margin-bottom: 0.25rem;
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--halons-text-muted);
}

.small-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--halons-text-muted);
}

label.small {
  font-size: 0.72rem;
  margin-bottom: 0.2rem;
}

label {
  font-size: 0.72rem;
  color: var(--halons-text-muted);
  font-weight: 800;
}

input[readonly],
.form-control:disabled,
.form-select:disabled {
  background-color: #e9ecef !important;
  cursor: not-allowed;
  opacity: 0.6;
}

/* Ocultar spinners en inputs numéricos */
.no-spinner::-webkit-outer-spin-button,
.no-spinner::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.no-spinner[type="number"] {
  -moz-appearance: textfield !important;
  appearance: textfield !important;
}

/* ==========================================
   SELECT2
   ========================================== */
.select2-container--default .select2-selection--single {
  min-height: 36px !important;
  height: 36px !important;
  padding: 0 0.65rem !important;
  font-size: 0.82rem !important;
  border-radius: 999px !important;
  border: 1px solid var(--halons-border) !important;
  background: #fff !important;
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.04);
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
  line-height: 34px !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  font-size: 0.82rem;
  color: var(--halons-text);
  font-weight: 500;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
  height: 34px !important;
  top: 1px !important;
  right: 8px !important;
}

.select2-container--default.select2-container--focus .select2-selection--single,
.select2-container--default.select2-container--open .select2-selection--single {
  border-color: rgba(26, 87, 214, 0.35) !important;
  outline: 0 !important;
  box-shadow: 0 0 0 4px rgba(26, 87, 214, 0.10) !important;
}

.select2-dropdown {
  border: 1px solid var(--halons-border);
  border-radius: 14px;
  box-shadow: 0 12px 22px rgba(15, 23, 42, 0.12);
}

.select2-container--default .select2-results__option {
  padding: 0.25rem 0.5rem !important;
  font-size: 0.82rem !important;
  color: var(--halons-text);
  font-weight: 500;
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
  background-color: var(--halons-primary) !important;
  color: #fff !important;
}

.select2-container {
  width: 100% !important;
}

/* Select2 en modales */
.modal .select2-container {
  z-index: 1070 !important;
}

.modal .select2-dropdown {
  z-index: 1080 !important;
}

/* ==========================================
   BADGES Y PILLS
   ========================================== */
.badge {
  font-size: 0.7rem;
  padding: 0.25em 0.6em;
  border-radius: 999px;
  font-weight: 700;
}

.badge-pill-soft {
  border-radius: 999px;
  font-size: 0.74rem;
  padding: 0.18rem 0.6rem;
}

.utilidad-badge {
  font-size: 0.72rem;
  font-weight: 500;
  border-radius: 999px;
  padding: 0.15rem 0.45rem;
}

.summary-pill {
  font-size: 0.78rem;
  padding: 0.25rem 0.7rem;
  font-weight: 500;
  border-radius: 999px;
  background: #F9FAFB;
}

.ref-pill {
  font-size: 0.72rem;
  border-radius: 999px;
  padding: 0.12rem 0.55rem;
}

.pill-title {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--halons-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.pill-tab {
  border-radius: 999px !important;
  font-size: 0.78rem;
  padding: 0.2rem 0.75rem;
}

.pill-tab.active {
  background: var(--halons-primary);
  color: #fff !important;
}

/* ==========================================
   ALERTS
   ========================================== */
.alert {
  border-radius: 0.75rem;
  padding: 0.75rem 1rem;
}

.alert-premium {
  border-left: 4px solid var(--halons-danger);
  background: #fdecea;
  color: #a30505;
}

.alert-success-premium {
  border-left: 4px solid var(--halons-success);
  background: #e8f8f5;
  color: #0a5c36;
}

.alert-warning {
  background-color: #fff7e0;
  color: #856404;
  border: 1px solid #ffeeba;
}

.alert-danger {
  background-color: #f8d7da;
  color: #842029;
  border: 1px solid #f5c2c7;
}

/* ==========================================
   SISTEMA DE NOTIFICACIONES
   ========================================== */
#notification-container {
  position: fixed;
  top: 140px;
  right: 20px;
  z-index: 10150;
  max-width: 420px;
  width: calc(100% - 40px);
  pointer-events: none;
}

.notification-item {
  pointer-events: auto;
  margin-bottom: 12px;
  padding: 1rem 1.25rem;
  border-radius: 0.75rem;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  animation: slideInRight 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  transition: all 0.3s ease-out;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.notification-item:hover {
  transform: translateX(-5px);
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.25);
}

.notification-item.removing {
  opacity: 0;
  transform: translateX(450px) scale(0.8);
}

.notification-close {
  background: none;
  border: none;
  color: inherit;
  cursor: pointer;
  font-size: 1.25rem;
  padding: 0;
  line-height: 1;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.notification-close:hover {
  opacity: 1;
}

.notification-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.notification-content {
  flex-grow: 1;
  font-size: 0.9rem;
  line-height: 1.4;
}

.notification-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 0 0 0 0.75rem;
  animation: progressBar linear;
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(450px) scale(0.9);
  }

  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

@keyframes progressBar {
  from {
    width: 100%;
  }

  to {
    width: 0%;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Colores de notificaciones */
.notification-success {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
}

.notification-error {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: white;
}

.notification-warning {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: white;
}

.notification-info {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: white;
}

/* ==========================================
   DROPDOWN Y MENÚS
   ========================================== */
.dropdown-menu {
  border: 1px solid var(--halons-border);
  border-radius: 0.6rem;
  box-shadow: var(--shadow-md);
}

.dropdown-item {
  font-size: 0.875rem;
  padding: 0.5rem 1rem;
  transition: all 0.15s ease;
}

.dropdown-item:hover {
  background-color: rgba(13, 112, 173, 0.1);
  color: var(--halons-primary);
}

.dropdown-item i {
  width: 1.25rem;
  text-align: center;
}

/* Submenús multinivel */
.dropdown-menu .dropdown-submenu {
  position: relative;
}

.dropdown-submenu>.dropdown-menu {
  top: 0;
  left: 100%;
  margin-top: -1px;
  display: none;
}

.dropdown-submenu:hover>.dropdown-menu {
  display: block;
}

.dropdown-submenu>a {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 0.5rem;
}

.dropdown-submenu>a::after {
  content: "\f285";
  font-family: "bootstrap-icons";
  flex-shrink: 0;
  margin-left: auto;
}

.dropdown-submenu>.dropdown-item:hover {
  background-color: #e9ecef;
}

/* ==========================================
   BOLETO UI (GLOBALIZADO)
   ========================================== */
.halons-boleto {
  background: var(--halons-bg);
  color: var(--halons-text);
  font-size: var(--fs-base);
}

.halons-boleto .card,
.halons-boleto .section,
.halons-boleto .subsection {
  background: var(--halons-card);
  border: 1px solid var(--halons-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
}

.halons-boleto .card-header.topbar {
  margin: 10px 0 14px;
  border-radius: var(--radius);
  overflow: hidden;
  background: radial-gradient(1200px 600px at 10% 0%, rgba(255, 255, 255, 0.16), transparent 55%),
    linear-gradient(90deg, var(--halons-navy), var(--halons-blue) 55%, var(--halons-teal)) !important;
  color: #fff;
  padding: 14px 16px;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.halons-boleto .top-left {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 320px;
}

.halons-boleto .crumbs {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  opacity: 0.95;
}

.halons-boleto .crumb {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.18);
  font-size: 12px;
}

.halons-boleto .crumb .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
}

.halons-boleto .crumbs .sep {
  opacity: 0.6;
  font-weight: 900;
}

.halons-boleto .title h1 {
  margin: 0;
  font-size: 16px;
  letter-spacing: 0.2px;
}

.halons-boleto .title p {
  margin: 0;
  font-size: 12px;
  opacity: 0.86;
  font-weight: 600;
}

.halons-boleto .top-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.halons-boleto .topbar .btn {
  border: 1px solid rgba(255, 255, 255, 0.20);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  padding: 9px 12px;
  border-radius: 999px;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.10);
}

.halons-boleto .topbar .btn:hover {
  background: rgba(255, 255, 255, 0.12);
}

.halons-boleto .topbar .btn.green {
  background: rgba(22, 163, 74, 0.92);
  border-color: rgba(22, 163, 74, 0.92);
}

.halons-boleto .topbar .btn.green:hover {
  background: rgba(22, 163, 74, 1);
}

.halons-boleto .topbar .btn.outline {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.18);
}

.halons-boleto .topbar .ico {
  width: 14px;
  height: 14px;
  display: inline-block;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.22);
  position: relative;
}

.halons-boleto .topbar .ico:before {
  content: "";
  position: absolute;
  inset: 3px 4px;
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-top: none;
  border-left: none;
  transform: rotate(45deg);
  opacity: 0.85;
}

.halons-boleto .section {
  width: 100%;
  overflow: hidden;
}

.halons-boleto .section+.section {
  margin-top: 12px;
}

.halons-boleto .section-hd {
  padding: 12px 14px;
  border-bottom: 1px solid var(--halons-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(180deg, #ffffff, #fbfdff);
}

.halons-boleto .section-hd h3 {
  margin: 0;
  font-size: 12px;
  color: #0b2b6d;
  font-weight: 900;
  letter-spacing: 0.2px;
}

.halons-boleto .hint,
.halons-boleto .right-note {
  color: var(--halons-text-muted);
  font-size: 12px;
  font-weight: 700;
}

.halons-boleto .content {
  padding: 14px;
}

.halons-boleto .subsection {
  overflow: hidden;
}

.halons-boleto .sub-hd {
  padding: 12px 14px;
  border-bottom: 1px solid var(--halons-border);
  background: linear-gradient(180deg, #ffffff, #f7fbff);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.halons-boleto .sub-hd strong {
  font-size: 12px;
  color: #0b2b6d;
  font-weight: 900;
}

.halons-boleto .sub-bd {
  padding: 14px;
}

.halons-boleto .split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  width: 100%;
  margin-top: 12px;
  margin-left: 0;
  margin-right: 0;
  --bs-gutter-x: 0;
}

.halons-boleto .split>[class*="col-"] {
  max-width: none;
  padding: 0;
  width: 100%;
  flex: none;
}

.halons-boleto .btn2 {
  border: 1px solid var(--halons-border);
  background: #fff;
  color: var(--halons-text);
  padding: 9px 12px;
  border-radius: 999px;
  font-weight: 900;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 10px 18px rgba(15, 23, 42, 0.06);
}

.halons-boleto .btn2:hover {
  background: #f7faff;
}

.halons-boleto .btn2.primary {
  background: rgba(22, 163, 74, 0.94);
  border-color: rgba(22, 163, 74, 0.94);
  color: #fff;
}

.halons-boleto .btn2.primary:hover {
  background: rgba(22, 163, 74, 1);
}

.halons-boleto .btn2.soft {
  background: rgba(26, 87, 214, 0.10);
  border-color: rgba(26, 87, 214, 0.14);
  color: #0b2b6d;
}

.halons-boleto .utility-preview {
  margin-top: 12px;
  border: 1px solid var(--halons-border);
  border-radius: var(--radius);
  background: #ffffff;
  padding: 12px 14px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.06);
}

.halons-boleto .utility-preview .meta {
  color: var(--halons-text-muted);
  font-size: 12px;
  line-height: 1.35;
  font-weight: 700;
}

.halons-boleto .utility-preview .numbers {
  text-align: right;
  font-weight: 900;
  font-size: 12px;
}

.halons-boleto .chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  padding: 10px 14px;
  border-top: 1px solid var(--halons-border);
  background: #fbfdff;
}

.halons-boleto .chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid var(--halons-border);
  background: #ffffff;
  font-weight: 900;
  font-size: 11px;
  color: var(--halons-text);
  box-shadow: 0 8px 16px rgba(15, 23, 42, 0.05);
}

.halons-boleto .chip.success {
  background: rgba(22, 163, 74, 0.10);
  border-color: rgba(22, 163, 74, 0.18);
  color: var(--halons-success-ink);
}

.halons-boleto .chip.dark {
  background: rgba(15, 23, 42, 0.06);
  border-color: rgba(15, 23, 42, 0.12);
  color: var(--halons-text);
}

.halons-boleto table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 12px;
}

.halons-boleto thead th {
  text-align: left;
  padding: 10px 12px;
  background: #f7faff;
  border-top: 1px solid var(--halons-border);
  border-bottom: 1px solid var(--halons-border);
  color: var(--halons-text);
  font-weight: 900;
  font-size: 11px;
  letter-spacing: 0.25px;
}

.halons-boleto thead th:first-child {
  border-left: 1px solid var(--halons-border);
  border-top-left-radius: 14px;
}

.halons-boleto thead th:last-child {
  border-right: 1px solid var(--halons-border);
  border-top-right-radius: 14px;
}

.halons-boleto tbody td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--halons-border);
  border-left: 1px solid var(--halons-border);
  color: var(--halons-text);
  background: #fff;
}

.halons-boleto tbody td:last-child {
  border-right: 1px solid var(--halons-border);
}

.halons-boleto tbody tr:last-child td:first-child {
  border-bottom-left-radius: 14px;
}

.halons-boleto tbody tr:last-child td:last-child {
  border-bottom-right-radius: 14px;
}

.halons-boleto .table-wrap {
  padding: 12px 14px 14px;
}

/* ==========================================
   TABLA CON SCROLL Y PAGINACIÓN
   ========================================== */
.tablewrap {
  overflow-y: auto;
  overflow-x: auto;
  max-height: 480px;
  border-radius: var(--radius);
  border: 1px solid var(--halons-border);
  background: #fff;
  /* Crear contexto de apilamiento nuevo para z-index de thead */
  position: relative;
  z-index: 0;
}

.table {
  width: 100%;
  border-collapse: collapse;
  min-width: 840px;
}

.table thead {
  /* thead necesita position relative para que sus hijos sticky funcionen correctamente */
  position: relative;
  z-index: 10;
}

.table thead th {
  position: sticky;
  top: 0;
  z-index: 11;
  background: #fff;
  border-bottom: 1px solid var(--halons-border);
  text-align: left;
  padding: 10px 12px;
  font-size: 12px;
  color: var(--halons-muted);
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  /* Asegurar que el background sea opaco */
  box-shadow: 0 2px 0 0 #fff;
}

.table thead th .sort {
  opacity: 0.7;
  font-size: 11px;
  margin-left: 6px;
  font-family: monospace;
}

.table tbody td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
  font-size: 13px;
  color: var(--halons-text);
  vertical-align: top;
  background: #fff;
}

.table tbody tr:hover td {
  background: rgba(2, 6, 23, 0.02);
}

/* Pie de tabla y paginación */
.tfoot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 12px;
  color: var(--halons-muted);
  font-size: 12px;
  padding: 0 0;
}

.pager {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid var(--halons-border);
  background: #f3f6fb;
  color: var(--halons-muted);
  font-size: 12px;
  user-select: none;
  white-space: nowrap;
}

.pill b {
  font-weight: 700;
  color: var(--halons-text);
}

.select-sm {
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid var(--halons-border);
  background: #fff;
  color: var(--halons-text);
  outline: none;
  font-size: 12px;
  cursor: pointer;
}

@media (max-width: 1100px) {
  .halons-boleto .split {
    grid-template-columns: 1fr;
  }

  .halons-boleto .top-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
  }
}

@media (max-width: 560px) {
  .halons-boleto .crumbs {
    flex-wrap: wrap;
  }
}

/* ==========================================
   MODALES
   ========================================== */
.modal {
  z-index: 10100;
}

.modal-backdrop {
  z-index: 10099;
}

.modal-content {
  border-radius: 0.75rem;
  border: none;
  box-shadow: var(--shadow-lg);
}

.modal-header {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--halons-border);
  border-radius: 0.75rem 0.75rem 0 0;
}

.modal-body {
  padding: 1.5rem;
  max-height: calc(100vh - 200px);
  overflow-y: auto;
}

.modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--halons-border);
}

/* ==========================================
   LOG BOX
   ========================================== */
.log-box {
  max-height: 170px;
  overflow-y: auto;
  font-size: 0.78rem;
  background: #020617;
  color: #e5e7eb;
  border-radius: 0.7rem;
  padding: 0.45rem 0.6rem;
}

.log-box small {
  color: #9ca3af;
}

/* ==========================================
   SECTION TITLES
   ========================================== */
.section-title {
  font-weight: 600;
  color: var(--halons-primary);
  border-bottom: 2px solid var(--halons-primary);
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  font-size: 1rem;
}

/* ==========================================
   UTILIDADES
   ========================================== */
.small {
  font-size: 0.78rem;
}

.opacity-50 {
  opacity: 0.55;
}

.text-halons,
.text-odoo {
  color: var(--halons-primary) !important;
}

.bg-halons,
.bg-odoo {
  background-color: var(--halons-primary);
  color: #fff;
}

.bg-halons-light,
.bg-odoo-light {
  background-color: var(--halons-bg-soft);
  color: var(--halons-text);
}

.mono {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

/* Ocultar elementos */
tbody tr.hidden {
  display: none !important;
}

/* Iconos */
.icon-check {
  color: #28a745;
  font-weight: bold;
}

.icon-x {
  color: #dc3545;
  font-weight: bold;
}

/* Filas interactivas */
.pasajero-row:hover {
  background-color: #e7f3ff !important;
  cursor: pointer;
}

.pasajero-row.table-primary {
  background-color: #cfe2ff !important;
}

.servicio-row {
  transition: all 0.2s ease;
}

/* ==========================================
   FOOTER
   ========================================== */
.odoo-footer {
  position: relative;
  background: #fff;
  border-top: 1px solid var(--halons-border);
  color: var(--halons-muted);
}

/* ==========================================
   PANEL LATERAL STICKY
   ========================================== */
.col-md-2 .card {
  position: sticky;
  top: calc(var(--navbar-height) + 1rem);
  max-height: calc(100vh - var(--navbar-height) - 2rem);
  overflow-y: auto;
}

/* ==========================================
   SCROLLBAR PERSONALIZADO
   ========================================== */
.table-responsive-fixed::-webkit-scrollbar,
.table-container::-webkit-scrollbar,
.log-box::-webkit-scrollbar,
.modal-body::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.table-responsive-fixed::-webkit-scrollbar-track,
.table-container::-webkit-scrollbar-track,
.log-box::-webkit-scrollbar-track,
.modal-body::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

.table-responsive-fixed::-webkit-scrollbar-thumb,
.table-container::-webkit-scrollbar-thumb,
.log-box::-webkit-scrollbar-thumb,
.modal-body::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 4px;
}

.table-responsive-fixed::-webkit-scrollbar-thumb:hover,
.table-container::-webkit-scrollbar-thumb:hover,
.log-box::-webkit-scrollbar-thumb:hover,
.modal-body::-webkit-scrollbar-thumb:hover {
  background: #555;
}

/* ==========================================
   ESTADOS DE CARGA (HTMX)
   ========================================== */
.htmx-request .htmx-indicator {
  display: inline;
}

.htmx-request.htmx-indicator {
  display: inline;
}

/* ==========================================
   TOOLTIPS
   ========================================== */
.tooltip {
  font-size: 0.8rem;
}

/* ==========================================
   ACCESIBILIDAD
   ========================================== */
a:focus,
button:focus,
input:focus,
select:focus,
textarea:focus {
  outline: 2px solid var(--halons-primary);
  outline-offset: 2px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* ==========================================
   RESPONSIVE - MÓVIL
   ========================================== */
@media (max-width: 768px) {
  .odoo-main {
    padding-left: 0.25rem !important;
    padding-right: 0.25rem !important;
    padding-top: calc(var(--navbar-height) + 0.25rem) !important;
  }

  .container-fluid {
    padding-left: 0.25rem;
    padding-right: 0.25rem;
  }

  .card-body {
    padding: 0.5rem;
  }

  .card-header {
    padding: 0.4rem 0.5rem;
  }

  .table-responsive-fixed {
    max-height: 50vh;
  }

  .col-md-2 .card {
    position: relative;
    top: auto;
    max-height: none;
  }

  #notification-container {
    top: 60px;
    right: 10px;
    width: calc(100% - 20px);
    max-width: none;
  }

  .notification-item {
    padding: 0.875rem 1rem;
    font-size: 0.85rem;
  }

  .dropdown-submenu>.dropdown-menu {
    position: static;
    left: 0;
    margin-left: 1rem;
    border-left: 2px solid #dee2e6;
  }
}

/* ==========================================
   RESPONSIVE - PANTALLAS GRANDES
   ========================================== */
@media (min-width: 1400px) {
  .container-fluid {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }

  .odoo-main {
    padding-left: 0.5rem !important;
    padding-right: 0.5rem !important;
  }
}

/* ==========================================
   OPTIMIZACIÓN PARA CARGA DINÁMICA (HTMX)
   ========================================== */
#bloque-content #idboleto-editar {
  padding-left: 0 !important;
  padding-right: 0 !important;
}

#bloque-content .container-fluid {
  padding-left: 0.25rem !important;
  padding-right: 0.25rem !important;
}

#bloque-content>* {
  padding-left: 0 !important;
  padding-right: 0 !important;
}

/* ==========================================
   ESPACIADO OPTIMIZADO
   ========================================== */
.py-4 {
  padding-top: 0.5rem !important;
  padding-bottom: 0.5rem !important;
}

.py-3 {
  padding-top: 0.5rem !important;
  padding-bottom: 0.5rem !important;
}

.px-4 {
  padding-left: 0.25rem !important;
  padding-right: 0.25rem !important;
}

.px-3 {
  padding-left: 0.25rem !important;
  padding-right: 0.25rem !important;
}

.row.g-2 {
  --bs-gutter-x: 0.5rem;
  --bs-gutter-y: 0.5rem;
}

.row.g-3 {
  --bs-gutter-x: 1rem;
  --bs-gutter-y: 0.75rem;
}

.container-fluid .container-fluid {
  padding-left: 0 !important;
  padding-right: 0 !important;
}

.container-fluid>.card {
  margin-left: 0;
  margin-right: 0;
}

body:has(#idboleto-editar) .card,
body:has(#cont-boleto-table) .card {
  margin-bottom: 0.5rem;
}

#idboleto-editar.container-fluid,
.container-fluid.py-4 {
  padding-top: 0.5rem !important;
  padding-bottom: 0.5rem !important;
  padding-left: 0.25rem !important;
  padding-right: 0.25rem !important;
}

/* ==========================================
   SISTEMA DE NOTIFICACIONES
   ========================================== */
#notification-container {
  position: fixed;
  top: 140px;
  right: 20px;
  z-index: 10150;
  max-width: 420px;
  width: calc(100% - 40px);
  pointer-events: none;
}

.notification-item {
  pointer-events: auto;
  margin-bottom: 12px;
  padding: 1rem 1.25rem;
  border-radius: 0.75rem;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  animation: slideInRight 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  transition: all 0.3s ease-out;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.notification-item:hover {
  transform: translateX(-5px);
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.25);
}

.notification-item.removing {
  opacity: 0;
  transform: translateX(450px) scale(0.8);
}

.notification-close {
  background: none;
  border: none;
  color: inherit;
  cursor: pointer;
  font-size: 1.25rem;
  padding: 0;
  line-height: 1;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.notification-close:hover {
  opacity: 1;
}

.notification-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.notification-content {
  flex-grow: 1;
  font-size: 0.9rem;
  line-height: 1.4;
}

.notification-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 0 0 0 0.75rem;
  animation: progressBar linear;
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(450px) scale(0.9);
  }

  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

@keyframes progressBar {
  from {
    width: 100%;
  }

  to {
    width: 0%;
  }
}

/* Colores de notificaciones */
.notification-success {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
}

.notification-error {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: white;
}

.notification-warning {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: white;
}

.notification-info {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: white;
}

/* ==========================================
   TABLAS STICKY (REPORTES)
   ========================================== */
.sticky-table-container {
  max-height: calc(100vh - 250px);
  overflow-y: auto;
}

.sticky-table thead th {
  position: sticky;
  top: 0;
  z-index: 10;
  background-color: #fff;
  box-shadow: 0 2px 2px -1px rgba(0, 0, 0, 0.1);
}

.sticky-table thead th.bg-secondary {
  background-color: #6c757d !important;
}

/* ==========================================
   RESPONSIVE
   ========================================== */
@media (max-width: 768px) {
  #notification-container {
    top: 60px;
    right: 10px;
    width: calc(100% - 20px);
    max-width: none;
  }

  .notification-item {
    padding: 0.875rem 1rem;
    font-size: 0.85rem;
  }
}

/* ==========================================
   IMPRESIÓN
   ========================================== */
@media print {
  .no-print {
    display: none !important;
  }

  body {
    background: #fff;
  }

  .card,
  .card-halons,
  .card-odoo {
    box-shadow: none;
  }

  .table thead th {
    position: static;
  }
}

/* Estilos personalizados para el datepicker */
/* Tamaño general del calendario */
.flatpickr-calendar {
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
  border-radius: 0.375rem;
  z-index: 9999;
  font-size: 12px;
  width: 250px !important;
  /* Forzar ancho reducido */
}

/* Reducir contenedores internos */
.flatpickr-innerContainer {
  width: 250px !important;
  padding: 4px;
}

.flatpickr-rContainer {
  width: 250px !important;
  padding: 0;
}

.flatpickr-days {
  width: 250px !important;
}

.dayContainer {
  width: 250px !important;
  min-width: 250px !important;
  max-width: 250px !important;
}

/* Reducir tamaño de los días */
.flatpickr-day {
  height: 30px;
  line-height: 30px;
  max-width: 35px;
  flex-basis: 14.2857%;
  /* Para 7 días */
  font-size: 11px;
}

.flatpickr-day.selected {
  background-color: #714b67 !important;
  border-color: #714b67 !important;
}

.flatpickr-day.selected:hover {
  background-color: #5a3c52 !important;
  border-color: #5a3c52 !important;
}

/* Reducir tamaño del mes y año en el encabezado */
.flatpickr-months {
  height: 32px;
}

.flatpickr-current-month {
  font-size: 13px;
  height: 32px;
  line-height: 1;
  padding: 6px 0;
}

.flatpickr-current-month .flatpickr-monthDropdown-months {
  font-size: 12px;
}

.flatpickr-current-month input.cur-year {
  font-size: 12px;
  padding: 0 4px;
}

/* Reducir tamaño de los nombres de días de la semana */
.flatpickr-weekdays {
  height: 28px;
}

.flatpickr-weekday {
  font-size: 10px;
  height: 28px;
  line-height: 28px;
}

/* Reducir flechas de navegación */
.flatpickr-months .flatpickr-prev-month,
.flatpickr-months .flatpickr-next-month {
  height: 28px;
  width: 28px;
  padding: 4px;
}

.flatpickr-months .flatpickr-prev-month svg,
.flatpickr-months .flatpickr-next-month svg {
  width: 12px;
  height: 12px;
}

.flatpickr-months .flatpickr-prev-month:hover svg,
.flatpickr-months .flatpickr-next-month:hover svg {
  fill: #714b67 !important;
}

/* Reducir tamaño del mes y año en el encabezado */
.flatpickr-months {
  height: 32px;
}

.flatpickr-month {
  height: 32px;
  line-height: 32px;
}

.flatpickr-current-month {
  font-size: 12px !important;
  height: 32px;
  line-height: 1;
  padding: 6px 0;
}

/* Dropdown del mes */
.flatpickr-current-month .flatpickr-monthDropdown-months {
  font-size: 11px !important;
  font-weight: normal;
  padding: 2px;
}

/* Input del año */
.flatpickr-current-month input.cur-year {
  font-size: 11px !important;
  font-weight: normal;
  padding: 0 2px !important;
  width: 50px;
}

/* Altura del span que contiene mes y año */
.flatpickr-current-month .numInputWrapper {
  width: 50px;
}

.flatpickr-current-month .numInputWrapper input {
  font-size: 11px !important;
}

/* Reducir flechas de navegación */
.flatpickr-months .flatpickr-prev-month,
.flatpickr-months .flatpickr-next-month {
  height: 24px;
  width: 24px;
  padding: 2px;
  line-height: 24px;
  top: 4px;
}

.flatpickr-months .flatpickr-prev-month svg,
.flatpickr-months .flatpickr-next-month svg {
  width: 10px;
  height: 10px;
}

.flatpickr-months .flatpickr-prev-month:hover svg,
.flatpickr-months .flatpickr-next-month:hover svg {
  fill: #714b67 !important;
}