/* ============================================================
   admin.css — Stili pannello di gestione
   ============================================================ */

/* Statistiche top */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin-bottom: 20px; }
.stat-big-card { border-radius: 14px; padding: 20px; display: flex; align-items: center; justify-content: space-between; box-shadow: 0 4px 15px rgba(0,0,0,0.15); color: #fff; position: relative; overflow: hidden; }
.stat-big-card.blue { background: linear-gradient(135deg, #1877F2 0%, #0f5bbb 100%); }
.stat-big-card.green { background: linear-gradient(135deg, #48C764 0%, #2e9e46 100%); }
.stat-big-card.purple { background: linear-gradient(135deg, #8A4FFF 0%, #6832db 100%); }
.stat-big-card.orange { background: linear-gradient(135deg, #FF8000 0%, #cc6600 100%); }
.stat-big-card .num { font-size: 32px; font-weight: 800; line-height: 1.1; margin-bottom: 4px; }
.stat-big-card .lab { font-size: 13px; font-weight: 500; opacity: 0.9; }
.stat-icon-box { width: 50px; height: 50px; border-radius: 12px; background: rgba(255,255,255,0.2); display: flex; align-items: center; justify-content: center; font-size: 24px; }

/* Grafici */
.charts-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; margin-bottom: 20px; }
.chart-card { background: #212B38; border: 1px solid #384659; border-radius: 14px; padding: 20px; display: flex; flex-direction: column; }
.chart-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.chart-title { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 14px; color: #E6EDF5; }
.chart-title-icon { width: 36px; height: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 18px; }
.chart-badge { font-size: 20px; font-weight: 800; }
.chart-svg-container { flex: 1; display: flex; align-items: flex-end; justify-content: center; min-height: 150px; position: relative; }
.c-blue { color: #4DA3FF; } .bg-blue { background: rgba(24,119,242,0.2); color: #4DA3FF; }
.c-green { color: #48C764; } .bg-green { background: rgba(72,199,100,0.2); color: #48C764; }
.c-purple { color: #B085FF; } .bg-purple { background: rgba(138,79,255,0.2); color: #B085FF; }
.c-orange { color: #FF9833; } .bg-orange { background: rgba(255,128,0,0.2); color: #FF9833; }
.year-toggle-btn { background: #2E3A4B; border: 1px solid #384659; color: #8B9BB0; padding: 6px 12px; border-radius: 6px; font-size: 12px; font-weight: 600; cursor: pointer; transition: 0.2s; }
.year-toggle-btn.active { background: #4DA3FF; color: #fff; border-color: #4DA3FF; }
.legend-box { display: flex; gap: 15px; flex-wrap: wrap; font-size: 12px; margin-top: 15px; justify-content: center; }
.legend-item { display: flex; align-items: center; gap: 6px; color: #8B9BB0; }
.legend-color { width: 12px; height: 12px; border-radius: 3px; }
@media (max-width: 600px) { .stats-grid { grid-template-columns: 1fr 1fr; } .stat-big-card .num { font-size: 24px; } .stat-icon-box { width: 40px; height: 40px; font-size: 20px; } .charts-grid { grid-template-columns: 1fr; } }

/* Dashboard a card scorrevoli */
.dashboard-scroll {
  display: flex;
  overflow-x: auto;
  gap: 16px;
  padding-bottom: 20px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  width: 100%;
}
.dashboard-scroll::-webkit-scrollbar { height: 8px; }
.dashboard-scroll::-webkit-scrollbar-track { background: #161E29; border-radius: 8px; }
.dashboard-scroll::-webkit-scrollbar-thumb { background: #384659; border-radius: 8px; }
.dashboard-scroll .settings-block {
  flex: 0 0 270px;
  min-width: 270px;
  scroll-snap-align: start;
  margin-bottom: 0;
  display: flex;
  flex-direction: column;
  padding: 16px;
  height: 420px;
}
.dashboard-scroll .settings-block h3 { font-size: 15px; margin-bottom: 8px; }
.dashboard-scroll .settings-block .desc { font-size: 12px; margin-bottom: 15px; line-height: 1.4; }
.dashboard-scroll .settings-block .btn { padding: 8px 16px; font-size: 13px; }
.dashboard-scroll .settings-block .grid-cards { gap: 8px !important; }
.dashboard-scroll .settings-block .stat-card { padding: 8px; }
.dashboard-scroll .settings-block .stat-card .num { font-size: 18px !important; }
.dashboard-scroll .settings-block .stat-card .lab { font-size: 9px !important; }
.dashboard-scroll .settings-block .field label { font-size: 10px; margin-bottom: 4px; }
.dashboard-scroll .settings-block textarea { height: 38px !important; }

/* Input data/ora scuri */
input[type="date"], input[type="time"] {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-color: #161E29 !important;
  color: #E6EDF5 !important;
  border: 1px solid #384659 !important;
  border-radius: 8px;
  padding: 8px 10px;
  font-family: inherit;
  font-size: 13px;
}
.dashboard-scroll input[type="date"],
.dashboard-scroll input[type="time"],
.field input[type="date"],
.field input[type="time"] {
  width: 100%;
}
.hours-row input[type="time"] {
  width: 110px !important;
  padding: 6px 8px !important;
}
input[type="date"]::-webkit-calendar-picker-indicator,
input[type="time"]::-webkit-calendar-picker-indicator {
  filter: invert(1);
  cursor: pointer;
}
.datenav button {
  font-size: 24px !important;
  padding-bottom: 4px;
  width: 44px !important;
  height: 44px !important;
  display: flex;
  align-items: center;
  justify-content: center;
}
.date-input-cur {
  background: transparent !important;
  border: none !important;
  color: #fff !important;
  font-family: 'Manrope', sans-serif;
  font-weight: 700;
  font-size: 16px;
  text-align: center;
  cursor: pointer;
  outline: none;
  width: 200px;
  padding: 0;
  -webkit-appearance: none;
}
.date-input-cur::-webkit-calendar-picker-indicator {
  filter: invert(1);
  opacity: 0.5;
  cursor: pointer;
}