body {
    font-family: 'Segoe UI', sans-serif;
    background-color: #ffffff;
    margin: 0;
    padding: 2.5rem;
}

.dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.kpi-card {
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
    padding: 1.25rem;
}

.kpi-label {
    color: #6b7280;
    font-size: 0.875rem;
    margin-bottom: 5px;
}

.kpi-value {
    font-size: 1.5rem;
    font-weight: 600;
    color: #111827;
}

.kpi-sub {
    font-size: 0.875rem;
    font-weight: 500;
}

.card {
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
    padding: 1.25rem;
    margin-bottom: 20px;
}

.card-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: #111827;
}

/* Define color primario (puedes ajustar el valor hex según tu marca) */
:root {
    --color-primary: #007bff; /* Azul Bootstrap por defecto */
}

/* Enlaces de navegación */
.nav-link {
    color: var(--color-primary) !important;
    font-weight: 500;
    text-decoration: none;
    font-size: medium;
}

.nav-link:hover {
    color: darken(var(--color-primary), 10%) !important;
    text-decoration: underline;
}

/* Color del texto para el nav-link activo (pill seleccionado) */
.nav-pills .nav-link.active {
    color: white !important;
}

/* Color del texto para los nav-links inactivos */
.nav-pills .nav-link {
    color: #0d6efd;  /* Bootstrap primary */
}

/* Color primario para el botón de menú en pantallas pequeñas */
.navbar-dark .navbar-toggler {
    border-color: #0d6efd;
}

.navbar-dark .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%230d6efd' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.waiting-cursor {
    cursor: wait !important;
}

/* Estilo general para todas las tabs */
.tab {
    background-color: white;
    color: #0d6efd;  /* Bootstrap primary */
    border: 1px solid #0d6efd;
    padding: 0.625rem 1.25rem;
    margin-right: 5px;
    font-weight: 500;
    border-radius: 1rem;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    text-decoration: none;
}

/* Hover sobre tabs inactivas */
.tab:hover {
    text-decoration: underline;
    background-color: white; /* No cambia el fondo */
    color: #0a58ca; /* Azul más oscuro (opcional) */
}

/* Tab seleccionada */
.tab--selected {
    background-color: #0d6efd;
    color: white;
    text-decoration: none;
    font-weight: bold;
}

.Select-menu-outer {
    font-size: 0.875rem;
}

.Select-value-label {
    font-size: 0.875rem;
}

.Select-placeholder {
    font-size: 0.875rem;
}

.label-sm {
    font-size: 0.875rem;
}

.label-lg {
    font-size: 1.25rem;
}

/* assets/styles.css */

.date-picker-elegante {
    border: 1px solid #ced4da;
    border-radius: 12px;
    padding: 0.25rem 0.3125rem;
    background-color: #228be675;
    font-family: 'Segoe UI', sans-serif;
    font-size: 1rem;
    color: #333;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    transition: all 0.3s ease-in-out;
}

.date-picker-elegante:hover,
.date-picker-elegante:focus-within {
    border-color: #228be6;
    box-shadow: 0 0 0 3px rgba(34, 139, 230, 0.2);
    background-color: #ffffff;
}

/* assets/custom.css */
.VirtualizedSelectOption {
    white-space: normal !important;
    word-wrap: break-word;
    max-width: 300px;
}

/* Estilo personalizado para tooltips de Dash DataTable */
.dash-table-tooltip {
    font-size: 0.6875rem;
    max-width: 300px;
    white-space: normal;
    color: black;
    padding: 0.375rem 0.625rem;
    border-radius: 4px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    z-index: 9999;
}

.btn-open-filters-fixed {
    position: fixed;
    right: 1rem;
    top: 50%;
    writing-mode: vertical-rl;
    transform: translateY(-50%) rotate(180deg);
    z-index: 1050;
    text-orientation: upright;
    white-space: nowrap;
}

/* 1) Forzar wrap en la lista de opciones */
.Select-menu-outer,
[class$="-menu-list"],
[class*="MenuList"] {
  white-space: normal !important;
  word-break: break-word !important;
  word-wrap: break-word !important;
  line-height: 1.3 !important;
  overflow: hidden !important;          /* oculta el desbordamiento */
  text-overflow: ellipsis !important;   /* muestra “…” */
}

/* 2) Cada opción dentro del menú */
.Select-menu-outer .select-option,
[class$="-option"],
[class*="Option"] {
  display: flex !important;
  align-items: center !important;
  height: auto !important;
  padding: 0.25rem 0.5rem !important;
  white-space: normal !important;
  word-break: break-word !important;
  overflow: hidden !important;          /* oculta el desbordamiento */
  text-overflow: ellipsis !important;   /* muestra “…” */
}

/* 3) Wrap también en las "píldoras" multiselección */
.Select-value-label,
.css-1rhbuit-MultiValue,     /* clase genérica Dash vX */
[class*="multi-value__label"] {
  white-space: normal !important;
  word-break: break-word !important;
  max-width: 100% !important;
  overflow: hidden !important;          /* oculta el desbordamiento */
  text-overflow: ellipsis !important;   /* muestra “…” */
}

/* 4) Asegura que el menú esté por encima */
.Select-menu-outer,
[class*="menu-outer"] {
  z-index: 1000 !important;
  overflow: hidden !important;          /* oculta el desbordamiento */
  text-overflow: ellipsis !important;   /* muestra “…” */
}

/* Opciones del menú: corte con puntos suspensivos */
.dropdown-fix .Select-menu-outer .select-option {
  white-space: nowrap !important;       /* sin wrap */
  overflow: hidden !important;          /* oculta el desbordamiento */
  text-overflow: ellipsis !important;   /* muestra “…” */
}

/* Etiquetas multiselección (“píldoras”) */
.dropdown-fix .Select-value-label,
.dropdown-fix .css-1rhbuit-MultiValue {
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  max-width: 100%;      /* para que reserve todo el ancho posible */
}

@media (max-width: 1024px) {
  body {
    padding: 2rem;
  }
  .card {
    margin-bottom: 1rem;
  }
  .kpi-value {
    font-size: 1.25rem;
  }
}

@media (max-width: 768px) {
  body {
    padding: 1rem;
  }
  .card {
    margin-bottom: 0.75rem;
  }
  .kpi-value {
    font-size: 1rem;
  }
  .kpi-label,
  .kpi-sub,
  .card-title {
    font-size: 0.75rem;
  }
}
