/* Stile provvisorio (C1). La grafica definitiva arriva nel blocco C7. */
:root {
  --bg: #0b0e14;
  --panel: #131824;
  --line: #232b3d;
  --text: #e8ecf4;
  --muted: #8b95ab;
  --accent: #3dd6c6;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
.shell { min-height: 100%; display: grid; place-items: center; padding: 24px; }
.card {
  width: min(720px, 100%);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 28px;
}
.card--center { width: min(440px, 100%); text-align: center; }
h1 { margin: 0 0 8px; font-size: 1.4rem; letter-spacing: -0.01em; }
.muted { color: var(--muted); }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.btn {
  display: inline-block;
  margin-top: 12px;
  padding: 10px 18px;
  border-radius: 10px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #06201c;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.btn--ghost { background: transparent; color: var(--text); border-color: var(--line); margin-top: 0; }
.btn:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }

/* Caselle (C2) */
.card--wide { width: min(1040px, 100%); }
.bar__actions { display: flex; gap: 10px; align-items: center; }
.bar__actions form { margin: 0; }
.btn--sm { padding: 6px 12px; font-size: .875rem; margin-top: 0; }
.small { font-size: .875rem; }
.right { text-align: right; }
.name { font-weight: 600; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; margin: 16px 0; }
.input {
  background: var(--bg); color: var(--text); border: 1px solid var(--line);
  border-radius: 10px; padding: 9px 12px; font: inherit; min-width: 0;
}
.filters .input[type="search"] { flex: 1 1 240px; }
.input:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table th.right, .table td.right { text-align: right; }
.table th { font-size: .78rem; color: var(--muted); font-weight: 600; letter-spacing: .02em; }
.table tr:last-child td { border-bottom: 0; }
.table tr.is-missing { opacity: .55; }
.badge {
  display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .78rem;
  border: 1px solid var(--line); color: var(--muted);
}
.badge--on { color: #06201c; background: var(--accent); border-color: var(--accent); font-weight: 600; }
.badge--warn { color: #ffcf7a; border-color: #5b4520; }
.flash { margin: 12px 0; padding: 10px 14px; border-radius: 10px; border: 1px solid var(--line); }
.flash--ok { border-color: #1f5c52; color: #9cefe3; }
.flash--err { border-color: #6a2a33; color: #ff9aa8; }
.pager { display: flex; gap: 16px; align-items: center; justify-content: center; margin-top: 16px; }
.pager a { color: var(--accent); }
.empty { padding: 24px 0; text-align: center; }
.stats { display: flex; gap: 12px; flex-wrap: wrap; margin: 16px 0; }
.stat { flex: 1 1 140px; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.stat strong { display: block; font-size: 1.5rem; }

/* Navigazione, form e regole (C3) */
.topnav {
  display: flex; gap: 4px; flex-wrap: wrap; padding: 10px 24px;
  border-bottom: 1px solid var(--line); background: var(--panel);
}
.topnav a {
  color: var(--muted); text-decoration: none; padding: 6px 12px; border-radius: 8px; font-size: .95rem;
}
.topnav a:hover, .topnav a:focus-visible { color: var(--text); background: var(--bg); outline: none; }
.nowrap { white-space: nowrap; }
.plain { list-style: none; margin: 0; padding: 0; }
.list li { padding: 8px 0; border-bottom: 1px solid var(--line); }
.list li.is-new { border-left: 3px solid var(--accent); padding-left: 10px; }
h2 { font-size: 1.05rem; margin: 24px 0 8px; }
.stack { display: grid; gap: 18px; margin-top: 12px; }
.field { display: grid; gap: 6px; }
.field > span { font-size: .85rem; color: var(--muted); }
.grid2 { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.group { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; display: grid; gap: 10px; }
.group legend { padding: 0 8px; font-weight: 600; }
.row3 { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.check { display: flex; align-items: center; gap: 8px; }
.actions { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }
.actions form { margin: 0; }
.btn--danger { color: #ff9aa8; border-color: #6a2a33; }

/* Duplicati e spam (C4) */
.group-card { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin: 14px 0; }
.group-card p { margin: 4px 0; }
.badge--danger { color: #ffb3bd; border-color: #7a2d38; background: #2a1419; }
.reasons { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 4px; font-size: .9rem; }
.pts { display: inline-block; min-width: 2.4em; color: var(--accent); font-variant-numeric: tabular-nums; }
