/* ==============================================
   OPTIMIZACIÓN TABLET/NOTEBOOK PARA DASHBOARD
   ============================================== */

/* === MEJORAS ESPECÍFICAS PARA TABLETS/NOTEBOOKS === */

/* Optimización para todas las pantallas desde tablet en adelante */
@media (min-width: 768px) {

  /* === CONTENEDOR PRINCIPAL SIN OVERFLOW === */
  .main-content {
    height: 100vh !important;
    overflow: hidden !important;
    padding: 0.5rem !important;
  }

  .bd {
    height: calc(100vh - 1rem) !important;
    overflow: hidden !important;
    padding: 0.25rem !important; /* Padding mínimo */
  }

  /* === CARDS ULTRA COMPACTAS PARA ELIMINAR SCROLL GENERAL === */
  .bd-card {
    min-height: 180px !important; /* Mucho más compacto */
    max-height: 220px !important; /* Límite muy bajo */
    border-radius: 8px !important;
  }

  .bd-card .card-body {
    padding: 0.75rem !important; /* Padding muy reducido */
    gap: 0.25rem !important; /* Gap mínimo */
  }

  /* === SCROLL INTERNO ULTRA COMPACTO === */
  .bd-scroll {
    min-height: 100px !important;
    max-height: 200px !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    padding-right: 6px;
    scrollbar-width: thin;
    scrollbar-color: var(--bond1) transparent;
  }

  .bd-scroll::-webkit-scrollbar {
    width: 6px;
  }

  .bd-scroll::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.05);
    border-radius: 3px;
  }

  .bd-scroll::-webkit-scrollbar-thumb {
    background: var(--bond1);
    border-radius: 3px;
  }

  /* === ITEMS ULTRA COMPACTOS === */
  .bd-timeline li {
    padding: 0.3rem 0.3rem !important;
    margin-bottom: 0.2rem !important;
    border-radius: 3px !important;
    font-size: 0.75rem !important;
    line-height: 1.1 !important;
    background: rgba(0,0,0,0.02);
    border: 1px solid rgba(0,0,0,0.03);
  }

  .list-group-item.bd-item {
    padding: 0.4rem !important;
    margin-bottom: 0.15rem !important;
    border-radius: 3px !important;
    font-size: 0.75rem !important;
  }

  /* === TIPOGRAFÍA ULTRA COMPACTA === */
  .bd-card .card-title {
    font-size: 0.95rem !important;
    font-weight: 600 !important;
    margin-bottom: 0.25rem !important;
  }

  .bd-kpi {
    font-size: 1.4rem !important; /* Muy compacto */
    font-weight: 700 !important;
    line-height: 1;
  }

  /* === GRÁFICOS ULTRA COMPACTOS === */
  .bd-bars {
    height: 45px !important; /* Muy compacto */
    padding: 0.25rem 0 !important;
    gap: 0.2rem !important;
  }

  .bd-bars__col {
    min-width: 20px !important;
  }

  .bd-bars__bar {
    min-width: 12px !important;
    border-radius: 2px !important;
  }

  /* === ELEMENTOS VISUALES ULTRA COMPACTOS === */
  .bd-badge {
    padding: 0.2rem 0.4rem !important;
    font-size: 0.7rem !important;
    font-weight: 500 !important;
    border-radius: 3px !important;
  }

  .bd-rank {
    width: 24px !important;
    height: 24px !important;
    font-size: 0.7rem !important;
    font-weight: 600 !important;
  }

  .bd-progress {
    height: 4px !important;
    border-radius: 2px !important;
  }

  .bd-hbar {
    height: 6px !important;
    border-radius: 3px !important;
  }

  /* === ESPACIADO GENERAL ULTRA COMPACTO === */
  .bd {
    overflow: visible !important;
    padding: 0.25rem !important; /* Padding mínimo */
  }

  .bd .row {
    margin-bottom: 0.5rem !important; /* Espacio mínimo entre filas */
  }

  /* === MANTENER RESPONSIVE GRID ULTRA COMPACTO === */
  .bd .col-12,
  .bd .col-md-6,
  .bd .col-lg-4,
  .bd .col-lg-8 {
    padding: 0.25rem !important; /* Padding mínimo entre columnas */
  }
}

/* === AJUSTES PARA PANTALLAS MÁS GRANDES === */
@media (min-width: 1200px) {

  .bd-card {
    min-height: 160px !important;
    max-height: 280px !important;
  }

  .bd-scroll {
    min-height: 100px !important;
    max-height: 180px !important;
  }

  .bd-kpi {
    font-size: 1.3rem !important;
  }

  .bd-timeline li {
    font-size: 0.7rem !important;
    padding: 0.25rem 0.25rem !important;
    margin-bottom: 0.1rem !important;
  }

  .bd-bars {
    height: 40px !important;
  }

  .bd-card .card-title {
    font-size: 0.9rem !important;
  }
}

/* === MODO OSCURO === */
.bd.dark .bd-card {
  background: rgba(255, 255, 255, 0.05) !important;
  /* border: 1px solid rgba(255, 255, 255, 0.1) !important; */
}

.bd.dark .bd-card .card-title {
  color: #f8fafc !important;
}

.bd.dark .bd-timeline li {
  background: rgba(255,255,255,0.03) !important;
  border-color: rgba(255,255,255,0.05) !important;
}

.bd.dark .bd-scroll {
  scrollbar-color: var(--bond3) rgba(255,255,255,0.1);
}

.bd.dark .bd-scroll::-webkit-scrollbar-track {
  background: rgba(255,255,255,0.05);
}

.bd.dark .bd-scroll::-webkit-scrollbar-thumb {
  background: var(--bond3);
}
