/* Override main container max-width from 1280px (80rem) to 1440px (90rem) */
.fi-main .max-w-7xl,
.fi-main-content .max-w-7xl,
.fi-body .max-w-7xl,
.max-w-7xl {
    max-width: 90rem !important;
}
/*Modifiche modale*/
.fi-modal-window  table
{
    width: 100% !important;
}
.fi-modal-window .text-xs.text-gray-600.dark\:text-gray-400 {
  padding-right: 5px;
}
.scaduti-rossi {
  background-color: red;
  color: #fff;
  text-transform: uppercase;
}
/* Layout per le cards statistiche degli agenti - 2 righe da 4 colonne */
.modal-agenti .grid.grid-cols-4.gap-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 1rem;
  max-width: 100%;
}

/* Stile per ogni card */
.modal-agenti .bg-white.dark\:bg-gray-800.rounded-xl.p-4.border.border-gray-200.dark\:border-gray-700.shadow-lg.hover\:shadow-xl.transition-all.duration-300 {
  width: 100%;
  height: 120px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* Responsive per schermi più piccoli */
@media (max-width: 1200px) {
  .modal-agenti .grid.grid-cols-4.gap-4 {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(4, 1fr);
  }
}

@media (max-width: 768px) {
  .modal-agenti .grid.grid-cols-4.gap-4 {
    grid-template-columns: 1fr;
    grid-template-rows: repeat(8, 1fr);
  }
}
.modal-agenti .flex.items-center.mt-2.space-x-4.text-sm.text-blue-100 {
  text-transform: uppercase;
  font-weight: bold;
  letter-spacing: 1px;
}
/*Fine modifiche modale*/
/*Inizio modifiche tabelle*/
.px-3 {
  padding-left: .35rem;
  padding-right: .35rem;
}
/*Fine modifiche tabelle*/
/*Inizio modifiche pagina Statistiche*/

/* === FIX CRITICO: FORZARE TESTI SCURI IN LIGHT MODE === */
/* PRIORITÀ MASSIMA: Queste regole si applicano PRIMA delle regole dark mode */

/* Forzare testi scuri SOLO in light mode (quando NON c'è dark mode) */
html:not(.dark) .fi-page-content {
  color: #111827 !important;
}

/* Tutti i figli in light mode devono avere testo scuro */
html:not(.dark) .fi-page-content * {
  color: #111827 !important;
}

/* ECCEZIONE: Mantenere bianco solo nel header con gradiente blu/viola */
html:not(.dark) .fi-page-content .bg-gradient-to-r.from-blue-600.via-purple-600.to-indigo-600,
html:not(.dark) .fi-page-content .bg-gradient-to-r.from-blue-600.via-purple-600.to-indigo-600 *,
html:not(.dark) .fi-page-content .bg-gradient-to-r.from-blue-600,
html:not(.dark) .fi-page-content .bg-gradient-to-r.from-blue-600 * {
  color: #ffffff !important;
}

/* ECCEZIONE: icone bianche nelle cards colorate */
html:not(.dark) .fi-page-content .bg-gradient-to-r.from-blue-500.to-blue-600 svg,
html:not(.dark) .fi-page-content .bg-gradient-to-r.from-purple-500.to-purple-600 svg,
html:not(.dark) .fi-page-content .bg-gradient-to-r.from-green-500.to-green-600 svg,
html:not(.dark) .fi-page-content .bg-gradient-to-r.from-orange-500.to-orange-600 svg,
html:not(.dark) .fi-page-content .bg-gradient-to-r.from-green-500.to-emerald-500 svg,
html:not(.dark) .fi-page-content .bg-gradient-to-r.from-yellow-500.to-amber-500 svg,
html:not(.dark) .fi-page-content .bg-gradient-to-r.from-purple-500.to-pink-500 svg,
html:not(.dark) .fi-page-content .bg-gradient-to-r.from-blue-500.to-indigo-500 svg {
  color: #ffffff !important;
}

/* === Dark Mode - sovrascrivere solo se dark mode è attiva === */
html.dark .fi-page-content,
html.dark .fi-page-content * {
  color: #f3f4f6 !important;
}

html.dark .fi-page-content .bg-gradient-to-r.from-blue-600.via-purple-600.to-indigo-600,
html.dark .fi-page-content .bg-gradient-to-r.from-blue-600.via-purple-600.to-indigo-600 * {
  color: #ffffff !important;
}

html.dark .fi-page-content .text-gray-500,
html.dark .fi-page-content .text-gray-400,
html.dark .fi-page-content .text-gray-600 {
  color: #d1d5db !important;
}

/* === MIGLIORAMENTI TABELLA === */
.fi-page-content .overflow-x-auto table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.fi-page-content .overflow-x-auto table thead {
  position: sticky;
  top: 0;
  z-index: 10;
}

/* LIGHT MODE - Header tabella */
html:not(.dark) .fi-page-content .overflow-x-auto table thead {
  background-color: #f9fafb !important;
}

html:not(.dark) .fi-page-content .overflow-x-auto table thead th {
  background-color: #f9fafb !important;
  border-bottom: 2px solid #e5e7eb !important;
  color: #111827 !important;
  font-weight: 600 !important;
}

/* DARK MODE - Header tabella */
html.dark .fi-page-content .overflow-x-auto table thead {
  background-color: #374151 !important;
}

html.dark .fi-page-content .overflow-x-auto table thead th {
  background-color: #374151 !important;
  border-bottom-color: #4b5563 !important;
  color: #f3f4f6 !important;
}

/* LIGHT MODE - Celle tabella */
html:not(.dark) .fi-page-content .overflow-x-auto table tbody td {
  color: #111827 !important;
  padding: 0.75rem 1.5rem;
}

/* DARK MODE - Celle tabella */
html.dark .fi-page-content .overflow-x-auto table tbody td {
  color: #f3f4f6 !important;
  padding: 0.75rem 1.5rem;
}

/* LIGHT MODE - Hover righe */
html:not(.dark) .fi-page-content .overflow-x-auto table tbody tr:hover {
  background-color: #f9fafb !important;
}

/* DARK MODE - Hover righe */
html.dark .fi-page-content .overflow-x-auto table tbody tr:hover {
  background-color: #374151 !important;
}

/* === SCROLLBAR PERSONALIZZATA === */
.fi-page-content .overflow-x-auto::-webkit-scrollbar {
  height: 8px;
}

/* LIGHT MODE - Scrollbar */
html:not(.dark) .fi-page-content .overflow-x-auto::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

/* DARK MODE - Scrollbar */
html.dark .fi-page-content .overflow-x-auto::-webkit-scrollbar-track {
  background: #374151;
}

.fi-page-content .overflow-x-auto::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 4px;
}

.fi-page-content .overflow-x-auto::-webkit-scrollbar-thumb:hover {
  background: #555;
}

/* === BADGE SCONTI === */
/* LIGHT MODE - Badge */
html:not(.dark) .fi-page-content .inline-flex.items-center {
  font-weight: 600 !important;
  color: #111827 !important;
}

/* DARK MODE - Badge */
html.dark .fi-page-content .inline-flex.items-center {
  font-weight: 600 !important;
  color: #f3f4f6 !important;
}

/* === LAYOUT E SPACING === */
.fi-page-content .mb-8 {
  margin-bottom: 2rem !important;
}

.fi-page-content .mb-6 {
  margin-bottom: 1.5rem !important;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
  .fi-page-content .grid.grid-cols-1 {
    grid-template-columns: 1fr !important;
  }
  
  .fi-page-content .rounded-2xl {
    border-radius: 1rem;
  }
  
  .fi-page-content .p-8 {
    padding: 1.5rem;
  }
  
  .fi-page-content .text-3xl {
    font-size: 1.5rem;
  }
  
  .fi-page-content .text-lg {
    font-size: 0.875rem;
  }
}
.fi-panel-dashboard h1
{
  color: #000 !important;
}
.fi-panel-dashboard p
{
  color: #000 !important;
}
.fi-panel-dashboard .mb-8 svg {
  color: #000 !important;
  height: 40px;
  width: auto;
}
.fi-panel-dashboard  .min-w-full {
  width: 100%;
}
/*Fine modifiche pagina Statistiche*/