/* Giuro Monitor — redesign completo 2026 (solo giuro.zanon.uk) */
:root {
  --bg: #0b0e14;
  --panel: #161b22;
  --panel-2: #1f252e;
  --border: #30363d;
  --text: #c9d1d9;
  --text-soft: #8b949e;
  --accent: #4da3ff;
  --green: #3fb950;
  --yellow: #d29922;
  --red: #f85149;
  --blue: #58a6ff;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin:0; padding:0; background:var(--bg); color:var(--text); line-height:1.5; font-size:14px; }
a { color:var(--accent); text-decoration:none; }
a:hover { text-decoration:underline; }

header.top {
  background: #12161d;
  border-bottom: 1px solid var(--border);
  padding: 10px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
header.top .left { display:flex; align-items:center; gap:12px; }
header.top .brand {
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -.5px;
}
header.top .brand .dot { color: var(--green); }
header.top .badge {
  font-size: 10px;
  background: #1f4a28;
  color: #3fb950;
  padding: 1px 7px;
  border-radius: 10px;
  font-weight: 600;
  letter-spacing: .5px;
}
header.top nav { display:flex; gap: 4px; flex-wrap:wrap; }
header.top nav a {
  padding: 6px 12px;
  font-size: 13px;
  color: var(--text-soft);
  border-radius: 6px;
}
header.top nav a:hover { background: var(--panel-2); color: var(--text); text-decoration:none; }

main { max-width: 1320px; margin: 0 auto; padding: 24px; }

.section { margin-bottom: 32px; }
.section h2 {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--text-soft);
  margin: 0 0 12px;
  font-weight: 600;
}

/* Top summary */
.summary-bar {
  display: flex;
  gap: 24px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 20px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.summary-bar .item {
  font-size: 13px;
}
.summary-bar .item .num {
  font-size: 21px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  display: block;
  line-height: 1.1;
}
.summary-bar .item .label {
  color: var(--text-soft);
  font-size: 11px;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(172px, 1fr));
  gap: 12px;
}

.site-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(218px, 1fr));
  gap: 10px;
}

.site-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 13px 14px;
  cursor: pointer;
  transition: all .1s ease;
  border-left: 4px solid #30363d;
}
.site-card:hover {
  border-color: #484f58;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
.site-card.active {
  border-color: var(--accent);
  border-left-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent) inset;
}
.site-card .name {
  font-weight: 600;
  font-size: 13.5px;
  line-height: 1.25;
  margin-bottom: 2px;
}
.site-card .meta {
  font-size: 11.5px;
  color: var(--text-soft);
  margin-bottom: 9px;
}
.site-card .kpis {
  display: flex;
  gap: 14px;
  font-size: 12.5px;
}
.site-card .kpi .v { font-weight: 700; font-variant-numeric: tabular-nums; }
.site-card .progress {
  height: 5px;
  background: var(--panel-2);
  margin-top: 8px;
  border-radius: 999px;
  overflow: hidden;
}
.site-card .progress > span { display:block; height:100%; background:var(--green); }

.detail {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 20px;
  margin-top: 8px;
}
.detail-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}
.detail-header h3 { margin:0; font-size: 15px; }

.processes {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px 18px;
}
.proc-host { margin-bottom: 11px; }
.proc-host:last-child { margin-bottom: 0; }
.proc-host .host {
  font-size: 11px;
  color: var(--text-soft);
  margin-bottom: 4px;
  font-weight: 500;
}
.proc-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  padding: 2px 0;
  flex-wrap: wrap;
}
.proc-row .kind {
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 4px;
  min-width: 56px;
  text-align: center;
  font-weight: 600;
}
.kind.download { background:#15391f; color:#3fb950; }
.kind.index { background:#3a2d12; color:#d29922; }
.kind.ingest, .kind.embedding { background:#0c2d6b; color:#58a6ff; }
.kind.parsing, .kind.probing { background:#3a1f5e; color:#bc8cff; }
.kind.ocr { background:#3a2d12; color:#d29922; }
.kind.grafo { background:#15391f; color:#3fb950; }
.kind.web, .kind.altro { background:#21262d; color:#8b949e; }

.pills { display:flex; flex-wrap:wrap; gap:5px; margin: 6px 0 12px; }
.pill {
  display:inline-block;
  font-size:11px;
  padding:2px 8px;
  border-radius:999px;
  background:var(--panel-2);
  color:var(--text-soft);
  border:1px solid var(--border);
}
.pill.green { background:#15391f; color:#3fb950; border-color:#1f4a28; }
.pill.yellow { background:#3a2d12; color:#d29922; border-color:#4a3a19; }
.pill.red { background:#3d1518; color:#f85149; border-color:#5a2125; }
.pill.gray { background:#21262d; color:#8b949e; }

table {
  width:100%;
  border-collapse: collapse;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  font-size: 13px;
}
th, td { padding: 6px 10px; text-align: left; border-bottom: 1px solid #21262d; font-variant-numeric: tabular-nums; }
th { background: var(--panel-2); color: var(--text-soft); font-size: 11px; font-weight: 500; }
td.r, th.r { text-align: right; }
tr:last-child td { border-bottom: none; }

.loading { color: var(--text-soft); }
.error { color: var(--red); }

footer {
  padding: 18px 24px;
  color: var(--text-soft);
  font-size: 12px;
  text-align: center;
  border-top: 1px solid var(--border);
  margin-top: 20px;
}

@media (max-width: 720px) {
  .site-grid { grid-template-columns: 1fr; }
  .summary-bar { gap: 16px; }
}
