/* ===== MODERN 2025 UI SYSTEM ===== */
/* CSS Variables per palette colori e design system */

:root {
  /* === COLORI BRAND === */
  --brand-primary: #2563eb;
  --brand-secondary: #7c3aed;
  --brand-accent: #06b6d4;
  
  /* === COLORI TESTO === */
  --text-primary: #000000;
  --text-secondary: #000000;
  --text-muted: #333333;
  --text-inverse: #ffffff;
  
  /* === COLORI BACKGROUND === */
  --bg-primary: #ffffff;
  --bg-secondary: #f9fafb;
  --bg-tertiary: #f3f4f6;
  --bg-overlay: rgba(0, 0, 0, 0.5);
  
  /* === COLORI BORDER === */
  --border-light: #e5e7eb;
  --border-medium: #d1d5db;
  --border-strong: #9ca3af;
  
  /* === COLORI STATO === */
  --success: #10b981;
  --success-bg: #ecfdf5;
  --success-border: #a7f3d0;
  
  --warning: #f59e0b;
  --warning-bg: #fffbeb;
  --warning-border: #fde68a;
  
  --danger: #ef4444;
  --danger-bg: #fef2f2;
  --danger-border: #fecaca;
  
  --info: #3b82f6;
  --info-bg: #eff6ff;
  --info-border: #bfdbfe;
  
  /* === SPAZIATURE (8px grid) === */
  --space-1: 0.25rem; /* 4px */
  --space-2: 0.5rem;  /* 8px */
  --space-3: 0.75rem; /* 12px */
  --space-4: 1rem;    /* 16px */
  --space-6: 1.5rem;  /* 24px */
  --space-8: 2rem;    /* 32px */
  --space-12: 3rem;   /* 48px */
  --space-16: 4rem;   /* 64px */
  
  /* === TIPOGRAFIA === */
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, monospace;
  
  --font-size-xs: 0.75rem;   /* 12px */
  --font-size-sm: 0.875rem;  /* 14px */
  --font-size-base: 1rem;    /* 16px */
  --font-size-lg: 1.125rem;  /* 18px */
  --font-size-xl: 1.5rem;    /* 24px */
  --font-size-2xl: 2rem;     /* 32px */
  
  --line-height-tight: 1.25;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.75;
  
  /* === BORDER RADIUS === */
  --radius-sm: 0.375rem;  /* 6px */
  --radius-md: 0.5rem;    /* 8px */
  --radius-lg: 0.75rem;   /* 12px */
  --radius-xl: 1rem;      /* 16px */
  --radius-full: 9999px;
  
  /* === OMBRE === */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  
  /* === TRANSIZIONI === */
  --transition-fast: 150ms ease-in-out;
  --transition-normal: 200ms ease-in-out;
  --transition-slow: 300ms ease-in-out;
  
  /* === Z-INDEX === */
  --z-dropdown: 1000;
  --z-sticky: 1020;
  --z-fixed: 1030;
  --z-modal: 1040;
  --z-popover: 1050;
  --z-tooltip: 1060;
}

/* === DARK MODE === */
@media (prefers-color-scheme: dark) {
  :root {
    /* === COLORI BRAND (più morbidi in dark) === */
    --brand-primary: #3b82f6;
    --brand-secondary: #8b5cf6;
    --brand-accent: #22d3ee;
    
    /* === COLORI TESTO === */
    --text-primary: #f9fafb;
    --text-secondary: #d1d5db;
    --text-muted: #9ca3af;
    --text-inverse: #1f2937;
    
    /* === COLORI BACKGROUND === */
    --bg-primary: #111827;
    --bg-secondary: #1f2937;
    --bg-tertiary: #374151;
    --bg-overlay: rgba(0, 0, 0, 0.75);
    
    /* === COLORI BORDER === */
    --border-light: #374151;
    --border-medium: #4b5563;
    --border-strong: #6b7280;
    
    /* === COLORI STATO (versioni dark) === */
    --success: #34d399;
    --success-bg: #064e3b;
    --success-border: #065f46;
    
    --warning: #fbbf24;
    --warning-bg: #78350f;
    --warning-border: #92400e;
    
    --danger: #f87171;
    --danger-bg: #7f1d1d;
    --danger-border: #991b1b;
    
    --info: #60a5fa;
    --info-bg: #1e3a8a;
    --info-border: #1d4ed8;
  }
}

/* === OVERRIDE MANUALE DARK MODE === */
[data-theme="dark"] {
  /* === COLORI BRAND === */
  --brand-primary: #3b82f6;
  --brand-secondary: #8b5cf6;
  --brand-accent: #22d3ee;
  
  /* === COLORI TESTO === */
  --text-primary: #f9fafb;
  --text-secondary: #d1d5db;
  --text-muted: #9ca3af;
  --text-inverse: #1f2937;
  
  /* === COLORI BACKGROUND === */
  --bg-primary: #111827;
  --bg-secondary: #1f2937;
  --bg-tertiary: #374151;
  --bg-overlay: rgba(0, 0, 0, 0.75);
  
  /* === COLORI BORDER === */
  --border-light: #374151;
  --border-medium: #4b5563;
  --border-strong: #6b7280;
  
  /* === COLORI STATO === */
  --success: #34d399;
  --success-bg: #064e3b;
  --success-border: #065f46;
  
  --warning: #fbbf24;
  --warning-bg: #78350f;
  --warning-border: #92400e;
  
  --danger: #f87171;
  --danger-bg: #7f1d1d;
  --danger-border: #991b1b;
  
  --info: #60a5fa;
  --info-bg: #1e3a8a;
  --info-border: #1d4ed8;
}

/* === UTILITY CLASSES === */

/* Spaziature */
.stack-4 { gap: var(--space-1); }
.stack-8 { gap: var(--space-2); }
.stack-12 { gap: var(--space-3); }
.stack-16 { gap: var(--space-4); }
.stack-24 { gap: var(--space-6); }
.stack-32 { gap: var(--space-8); }

.grid-8 { grid-gap: var(--space-2); }
.grid-16 { grid-gap: var(--space-4); }
.grid-24 { grid-gap: var(--space-6); }
.grid-32 { grid-gap: var(--space-8); }

/* Layout */
.container-modern {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--space-4);
}

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.flex-col {
  display: flex;
  flex-direction: column;
}

/* Tipografia moderna */
.text-modern {
  font-family: var(--font-family);
  line-height: var(--line-height-normal);
}

.text-xs { font-size: var(--font-size-xs); }
.text-sm { font-size: var(--font-size-sm); }
.text-base { font-size: var(--font-size-base); }
.text-lg { font-size: var(--font-size-lg); }
.text-xl { font-size: var(--font-size-xl); }
.text-2xl { font-size: var(--font-size-2xl); }

.text-primary { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }
.text-muted { color: var(--text-muted); }

/* Card moderne */
.card-modern {
  background: var(--bg-primary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition-fast);
}

.card-modern:hover {
  box-shadow: var(--shadow-md);
}

.card-modern-header {
  padding: var(--space-4) var(--space-6);
  border-bottom: 1px solid var(--border-light);
  background: var(--bg-secondary);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.card-modern-body {
  padding: var(--space-6);
}

/* Bottoni moderni */
.btn-modern {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  font-family: var(--font-family);
  font-size: var(--font-size-sm);
  font-weight: 500;
  line-height: 1;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
}

.btn-modern:focus {
  outline: 2px solid var(--brand-primary);
  outline-offset: 2px;
}

.btn-modern:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Varianti bottoni */
.btn-primary {
  background: var(--brand-primary);
  color: white;
  border-color: var(--brand-primary);
}

.btn-primary:hover:not(:disabled) {
  background: color-mix(in srgb, var(--brand-primary) 90%, black);
  border-color: color-mix(in srgb, var(--brand-primary) 90%, black);
}

.btn-secondary {
  background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%) !important;
  box-shadow: 0 2px 8px rgba(107, 114, 128, 0.3);
  color: white;
  border-color: #4b5563;
}

.btn-secondary:hover:not(:disabled) {
  background: linear-gradient(135deg, #4b5563 0%, #374151 100%) !important;
  box-shadow: 0 4px 12px rgba(107, 114, 128, 0.4);
  border-color: #374151;
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border-color: transparent;
}

.btn-ghost:hover:not(:disabled) {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.btn-danger {
  background: var(--danger);
  color: white;
  border-color: var(--danger);
}

.btn-danger:hover:not(:disabled) {
  background: color-mix(in srgb, var(--danger) 90%, black);
  border-color: color-mix(in srgb, var(--danger) 90%, black);
}

/* Badge/Chip */
.badge-modern {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-1) var(--space-2);
  font-size: var(--font-size-xs);
  font-weight: 500;
  border-radius: var(--radius-full);
  line-height: 1;
}

.badge-success {
  background: var(--success-bg);
  color: var(--success);
  border: 1px solid var(--success-border);
}

.badge-warning {
  background: var(--warning-bg);
  color: var(--warning);
  border: 1px solid var(--warning-border);
}

.badge-danger {
  background: var(--danger-bg);
  color: var(--danger);
  border: 1px solid var(--danger-border);
}

.badge-info {
  background: var(--info-bg);
  color: var(--info);
  border: 1px solid var(--info-border);
}

/* === MATERIAL DESIGN 3 SYSTEM === */
:root {
  /* Material Design 3 Colors */
  --md3-primary: #6750a4;
  --md3-on-primary: #ffffff;
  --md3-primary-container: #eaddff;
  --md3-on-primary-container: #21005d;
  
  --md3-surface: #fffbfe;
  --md3-on-surface: #1c1b1f;
  --md3-surface-variant: #e7e0ec;
  --md3-on-surface-variant: #49454f;
  
  --md3-outline: #79747e;
  --md3-outline-variant: #cab6cf;
  
  /* Material Design 3 Elevation */
  --md3-elevation-1: 0px 1px 2px 0px rgba(0, 0, 0, 0.3), 0px 1px 3px 1px rgba(0, 0, 0, 0.15);
  --md3-elevation-2: 0px 1px 2px 0px rgba(0, 0, 0, 0.3), 0px 2px 6px 2px rgba(0, 0, 0, 0.15);
  --md3-elevation-3: 0px 1px 3px 0px rgba(0, 0, 0, 0.3), 0px 4px 8px 3px rgba(0, 0, 0, 0.15);
}

@media (prefers-color-scheme: dark) {
  :root {
    --md3-primary: #d0bcff;
    --md3-on-primary: #381e72;
    --md3-primary-container: #4f378b;
    --md3-on-primary-container: #eaddff;
    
    --md3-surface: #141218;
    --md3-on-surface: #e6e1e5;
    --md3-surface-variant: #49454f;
    --md3-on-surface-variant: #cab6cf;
    
    --md3-outline: #938f99;
    --md3-outline-variant: #49454f;
  }
}

/* === MATERIAL DESIGN 3 COMPONENTS === */

/* Material Design 3 Cards */
.md3-card {
  background: var(--md3-surface);
  color: var(--md3-on-surface);
  border-radius: 12px;
  box-shadow: var(--md3-elevation-1);
  transition: box-shadow var(--transition-normal);
  border: none;
}

.md3-card:hover {
  box-shadow: var(--md3-elevation-2);
}

.md3-card-elevated {
  box-shadow: var(--md3-elevation-2);
}

.md3-card-elevated:hover {
  box-shadow: var(--md3-elevation-3);
}

/* Material Design 3 Buttons */
.md3-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 24px;
  font-family: var(--font-family);
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  border-radius: 20px;
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

.md3-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: currentColor;
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.md3-button:hover::before {
  opacity: 0.08;
}

.md3-button:focus::before {
  opacity: 0.12;
}

.md3-button:active::before {
  opacity: 0.16;
}

.md3-button-filled {
  background: var(--md3-primary);
  color: var(--md3-on-primary);
}

.md3-button-outlined {
  background: transparent;
  color: var(--md3-primary);
  border: 1px solid var(--md3-outline);
}

.md3-button-text {
  background: transparent;
  color: var(--md3-primary);
  padding: 10px 12px;
}

/* Material Design 3 Text Fields */
.md3-text-field {
  position: relative;
  display: flex;
  flex-direction: column;
  margin-bottom: 16px;
}

.md3-text-field-outlined {
  position: relative;
}

.md3-text-field-outlined .md3-input {
  width: 100%;
  padding: 16px;
  font-family: var(--font-family);
  font-size: 16px;
  line-height: 24px;
  color: var(--md3-on-surface);
  background: var(--md3-surface);
  border: 1px solid var(--md3-outline);
  border-radius: 4px;
  transition: all var(--transition-fast);
  outline: none;
}

.md3-text-field-outlined .md3-input:focus {
  border-color: var(--md3-primary);
  border-width: 2px;
  padding: 15px; /* Compensate for thicker border */
}

.md3-text-field-outlined .md3-input::placeholder {
  color: var(--md3-on-surface-variant);
  opacity: 1;
}

.md3-text-field-filled {
  position: relative;
}

.md3-text-field-filled .md3-input {
  width: 100%;
  padding: 24px 16px 8px 16px;
  font-family: var(--font-family);
  font-size: 16px;
  line-height: 24px;
  color: var(--md3-on-surface);
  background: var(--md3-surface-variant);
  border: none;
  border-bottom: 1px solid var(--md3-on-surface-variant);
  border-radius: 4px 4px 0 0;
  transition: all var(--transition-fast);
  outline: none;
}

.md3-text-field-filled .md3-input:focus {
  border-bottom: 2px solid var(--md3-primary);
  padding-bottom: 7px; /* Compensate for thicker border */
}

.md3-label {
  font-family: var(--font-family);
  font-size: 12px;
  font-weight: 400;
  color: var(--md3-on-surface-variant);
  margin-bottom: 4px;
  display: block;
}

.md3-supporting-text {
  font-family: var(--font-family);
  font-size: 12px;
  line-height: 16px;
  color: var(--md3-on-surface-variant);
  margin-top: 4px;
}

/* Form moderni con Material Design 3 */
.form-modern .form-label {
  font-family: var(--font-family);
  font-size: var(--font-size-sm);
  font-weight: 500;
  color: var(--md3-on-surface);
  margin-bottom: var(--space-2);
}

.form-modern .form-control {
  font-family: var(--font-family);
  font-size: 16px; /* Prevent zoom on iOS */
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--md3-outline);
  border-radius: 4px;
  background: var(--md3-surface);
  color: var(--md3-on-surface);
  transition: all var(--transition-fast);
  outline: none;
}

.form-modern .form-control:focus {
  border-color: var(--md3-primary);
  border-width: 2px;
  padding: calc(var(--space-3) - 1px) calc(var(--space-4) - 1px);
  box-shadow: none;
}

.form-modern .form-control::placeholder {
  color: var(--md3-on-surface-variant);
  opacity: 1;
}

/* Fix per input neri - assicura sempre testo visibile */
.form-control,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="number"],
input[type="search"],
input[type="url"],
textarea,
select {
  background-color: #ffffff !important;
  color: #1c1b1f !important;
  border: 1px solid #d1d5db !important;
}

/* Fix specifico per Bootstrap form-control */
.form-control {
  background-color: #ffffff !important;
  color: #1c1b1f !important;
  border: 1px solid #d1d5db !important;
}

.form-control:focus {
  background-color: #ffffff !important;
  color: #1c1b1f !important;
  border-color: #2563eb !important;
  box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.25) !important;
}

/* Fix per input group */
.input-group .form-control {
  background-color: #ffffff !important;
  color: #1c1b1f !important;
}

/* Fix per textarea */
textarea.form-control {
  background-color: #ffffff !important;
  color: #1c1b1f !important;
}

/* Fix per select */
select.form-control,
select.form-select {
  background-color: #ffffff !important;
  color: #1c1b1f !important;
}

.form-modern .form-text {
  font-size: var(--font-size-xs);
  color: var(--md3-on-surface-variant);
  margin-top: var(--space-1);
}

/* Tabelle moderne */
.table-modern {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-family);
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.table-modern th {
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-weight: 600;
  font-size: var(--font-size-sm);
  padding: var(--space-4);
  text-align: left;
  border-bottom: 1px solid var(--border-light);
  position: sticky;
  top: 0;
  z-index: 10;
}

.table-modern td {
  padding: var(--space-4);
  border-bottom: 1px solid var(--border-light);
  color: var(--text-primary);
  font-size: var(--font-size-sm);
}

.table-modern tbody tr:hover {
  background: var(--bg-secondary);
}

.table-modern tbody tr:last-child td {
  border-bottom: none;
}

/* Alert moderni */
.alert-modern {
  padding: var(--space-4);
  border-radius: var(--radius-md);
  border: 1px solid;
  font-family: var(--font-family);
  font-size: var(--font-size-sm);
  line-height: var(--line-height-normal);
}

.alert-success {
  background: var(--success-bg);
  color: var(--success);
  border-color: var(--success-border);
}
 

.alert-danger {
  background: var(--danger-bg);
  color: var(--danger);
  border-color: var(--danger-border);
}

.alert-info {
  background: var(--info-bg);
  color: var(--info);
  border-color: var(--info-border);
}

/* Responsive breakpoints */
@media (max-width: 640px) {
  .container-modern {
    padding: 0 var(--space-3);
  }
  
  .card-modern-body {
    padding: var(--space-4);
  }
  
  .btn-modern {
    padding: var(--space-2) var(--space-3);
    font-size: var(--font-size-xs);
  }
}

@media (max-width: 768px) {
  .grid-responsive {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 768px) {
  .grid-responsive {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .grid-responsive {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1280px) {
  .grid-responsive {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* === ACCESSIBILITÀ === */

/* Focus ring visibile */
*:focus {
  outline: 2px solid var(--brand-primary);
  outline-offset: 2px;
}

/* Riduzione movimento per utenti sensibili */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Contrasto alto */
@media (prefers-contrast: high) {
  :root {
    --border-light: #000000;
    --border-medium: #000000;
    --text-secondary: var(--text-primary);
  }
}

/* === LOADING STATES === */
.loading {
  position: relative;
  overflow: hidden;
}

.loading::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.4),
    transparent
  );
  animation: loading-shimmer 1.5s infinite;
}

@keyframes loading-shimmer {
  0% { left: -100%; }
  100% { left: 100%; }
}

/* === THEME TOGGLE === */
.theme-toggle {
  position: fixed;
  bottom: var(--space-6);
  right: var(--space-6);
  z-index: var(--z-fixed);
  background: var(--bg-primary);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-full);
  padding: var(--space-3);
  box-shadow: var(--shadow-lg);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.theme-toggle:hover {
  box-shadow: var(--shadow-xl);
  transform: scale(1.05);
}

/* === MICRO-ANIMAZIONI === */
.animate-fade-in {
  animation: fadeIn 200ms ease-in-out;
}

.animate-slide-up {
  animation: slideUp 200ms ease-in-out;
}

.animate-scale-in {
  animation: scaleIn 150ms ease-in-out;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* === OVERRIDE BOOTSTRAP GRADIENTS === */
.bg-gradient-primary {
  background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-secondary) 100%) !important;
  color: white !important;
}

/* === FIX CONTRASTO TESTO === */
.text-white {
  color: white !important;
}

.card.bg-gradient-primary .card-body h1,
.card.bg-gradient-primary .card-body p {
  color: white !important;
}

/* === FIX LAYOUT BOOTSTRAP === */
.row {
  margin-left: 0;
  margin-right: 0;
}

.row > * {
  padding-left: 0.75rem;
  padding-right: 0.75rem;
}
 
/* Fix per card-body padding */
.card-body {
  padding: 1.5rem !important;
}

.card-body.p-4 {
  padding: 1.5rem !important;
}

.card-body.p-5 {
  padding: 2rem !important;
}

/* Fix per testi invisibili */
.form-label,
.form-text,
.card-header h6,
.card-header small,
.badge,
small {
  color: var(--text-primary);
  opacity: 1 !important;
}

/* Fix per testo grigio scuro nei box bianchi */
.card-body .text-dark-emphasis,
.table .text-dark-emphasis,
.card .text-dark-emphasis {
  color: #212529 !important;
}

.card-body .text-secondary,
.table .text-secondary,
.card .text-secondary {
  color: #6c757d !important;
}

.table-light th {
  background-color: #f8f9fa !important;
  color: #212529 !important;
}

.table td,
.table th {
  color: #212529 !important;
}

.table-hover tbody tr:hover {
  background-color: rgba(0, 0, 0, 0.075) !important;
}

/* Fix per testi bianchi su sfondo bianco */
.card-header.border-0 .text-white,
.bg-gradient-info .text-white,
.bg-gradient-primary .text-white {
  color: white !important;
}

/* Fix per input groups */
.input-group-text {
  background-color: #f8f9fa !important;
  border-color: #dee2e6 !important;
  color: #495057 !important;
}

/* Fix per layout tabella - forza disposizione orizzontale */
.table {
  table-layout: fixed !important;
  width: 100% !important;
}

.table td,
.table th {
  vertical-align: middle !important;
}

.table thead th {
  position: sticky !important;
  top: 0 !important;
  z-index: 10 !important;
}

/* Larghezze specifiche per le colonne */
.table th:nth-child(1),
.table td:nth-child(1) {
  width: 30% !important;
}

.table th:nth-child(2),
.table td:nth-child(2) {
  width: 15% !important;
}

.table th:nth-child(3),
.table td:nth-child(3) {
  width: 20% !important;
}

.table th:nth-child(4),
.table td:nth-child(4) {
  width: 15% !important;
}

.table th:nth-child(5),
.table td:nth-child(5) {
  width: 20% !important;
}

/* === PRINT STYLES === */
@media print {
  .no-print {
    display: none !important;
  }
  
  .card-modern {
    box-shadow: none;
    border: 1px solid #000;
  }
  
  .btn-modern {
    border: 1px solid #000;
    background: white !important;
    color: black !important;
  }
}