/* Wave 5 — tabelle Syncrogest, grafici, dark. Sopra pro.css/shell.css */
.grid-wrap { position: relative; }
.grid-tools { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; margin: 0 0 .6rem; }
.grid-tools input[type=search] {
  flex: 1; min-width: 160px; border: 1px solid var(--line, #e6eaee); border-radius: 8px;
  padding: .38rem .7rem; font: inherit;
}
.grid-pager { display: flex; gap: .35rem; align-items: center; font-size: .82rem; color: #64748b; }
.grid-pager button {
  border: 1px solid var(--line, #e6eaee); background: #fff; border-radius: 6px;
  padding: .2rem .55rem; cursor: pointer;
}
.grid-pager button[disabled] { opacity: .4; cursor: default; }
table.grid thead th { position: sticky; top: 0; background: #f8fafc; z-index: 1; }
table.grid tbody tr:nth-child(even) { background: #fafbfc; }
table.grid tbody tr:hover { background: #eef6f6; }
table.grid .col-filter {
  display: block; width: 100%; margin-top: .25rem; font-weight: 400;
  border: 1px solid #d7dde3; border-radius: 4px; padding: .15rem .35rem; font-size: .75rem;
}
.theme-tog {
  border: 1px solid #d7dde3; background: #f7f9fb; border-radius: 999px;
  padding: .28rem .7rem; cursor: pointer; font-size: .78rem; color: #334155;
}
.gauge-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1rem; margin: 0 0 1rem; }
.gauge { text-align: center; }
.bar-chart { display: flex; align-items: flex-end; gap: 6px; height: 120px; padding: .4rem 0; }
.bar-chart i { display: block; flex: 1; background: #2aa198; border-radius: 4px 4px 0 0; min-height: 4px; }
.week-grid { display: grid; grid-template-columns: 120px repeat(7, 1fr); gap: 4px; font-size: .78rem; }
.week-grid .wh { font-weight: 700; color: #64748b; padding: .35rem; }
.week-grid .cell {
  min-height: 72px; background: #f8fafc; border: 1px solid #e6eaee; border-radius: 8px; padding: .35rem;
}
.week-grid .cell.today { box-shadow: inset 0 0 0 2px #e8b931; }
.week-grid .chip {
  display: block; background: #123c3d; color: #fff; border-radius: 5px;
  padding: .2rem .35rem; margin: 0 0 .25rem; text-decoration: none;
}
.planner { display: grid; gap: 4px; overflow: auto; }
.planner-row { display: grid; grid-template-columns: 64px repeat(var(--bays, 3), 1fr); gap: 4px; }
.planner-row > div { border: 1px solid #e6eaee; border-radius: 6px; min-height: 42px; padding: .25rem; background: #fff; font-size: .75rem; }
.planner-row .hh { background: #f8fafc; color: #64748b; font-weight: 600; }
.map-box { width: 100%; height: 280px; border-radius: 8px; background: #e8eef2; position: relative; z-index: 1; }
.leaflet-container { font: inherit; position: relative; z-index: 1; }

html.dark, html.dark body.shell, html[data-theme="dark"] {
  --paper: #0f1718; --line: #243033; --side: #0b2425; --side-2: #081b1c;
  background: #0f1718 !important; color: #e7eef0;
  color-scheme: dark;
}
html.dark body.shell .topbar,
html.dark .donut, html.dark .card, html.dark .planner-row > div { background: #152022; border-color: #243033; color: #e7eef0; }
html.dark body.shell h1, html.dark .donut .dv { color: #f1f5f9; }
html.dark .donut .dl, html.dark .act-list .muted { color: #94a3b8; }
html.dark table.grid thead th { background: #1a282a; color: #e7eef0; }
html.dark table.grid tbody tr:nth-child(even) { background: #121c1e; }
html.dark table.grid tbody tr:hover { background: #1c3334; }
html.dark .week-grid .cell, html.dark .grid-tools input, html.dark .grid-pager button, html.dark .theme-tog {
  background: #152022; border-color: #243033; color: #e7eef0;
}
html.dark .act-list li { border-color: #243033; }
html.dark body.shell .topbar .user, html.dark body.shell .topbar a { color: #cbd5e1; }
html.dark input, html.dark select, html.dark textarea, html.dark .form-panel, html.dark .page-head {
  background: #152022; border-color: #334155; color: #e7eef0;
}
html.dark a { color: #7dd3fc; }
html.dark a:hover { color: #bae6fd; }
html.dark table tbody tr:nth-child(even) { background: #121c1e; }
html.dark table tbody td, html.dark table thead th { color: #e7eef0; border-color: #243033; }
html.dark .muted { color: #94a3b8; }


html.dark .card, html.dark .main, html.dark body.app { background: #0f1718; color: #e7eef0; }
html.dark input, html.dark select, html.dark textarea { background: #152022; color: #e7eef0; border-color: #334155; }
html.dark a { color: #7dd3fc; }
html.dark table tbody tr { color: #e7eef0; }
html.dark .btn.secondary { color: #e2e8f0; }


html.dark .card, html.dark .form-panel, html.dark .sheet, html.dark .gantt, html.dark .gantt-wrap,
html.dark .split-detail, html.dark .page-head, html.dark aside, html.dark .side {
  background: #152022 !important; color: #e7eef0 !important; border-color: #243033 !important;
}
html.dark table tbody tr.is-on, html.dark table tbody tr.selected, html.dark tr.active {
  background: #1e3a3c !important; color: #f8fafc !important;
}
html.dark .gantt-bar, html.dark .gantt-row { background: #1a282a; color: #e7eef0; }
html.dark label, html.dark .shift-done label, html.dark form.form-grid label { color: #e7eef0; }
html.dark textarea { background: #152022 !important; color: #e7eef0 !important; border-color: #334155 !important; }
html.dark .col-picker,
html.dark .col-picker-wrap .col-picker {
  background: #1e293b !important; border-color: #334155 !important; color: #e7eef0 !important;
}
html.dark .col-picker label { color: #e7eef0 !important; }
html.dark .grid-tools input,
html.dark .navsearch input,
html.dark input[placeholder*="Cerca"],
html.dark input[placeholder*="cerca"] {
  background: #152022 !important; color: #e7eef0 !important; border-color: #334155 !important;
}
html.dark table thead,
html.dark table thead th,
html.dark table.tbl thead th {
  background: #1a282a !important; color: #e7eef0 !important; border-color: #243033 !important;
}
html.dark tr.late, html.dark tr.in-ritardo, html.dark .late td {
  background: #3f1d1d !important; color: #fecaca !important;
}
