:root {
  --bg: #f6f5f1;
  --surface: #fff;
  --surface-1: #f1efe8;
  --border: #e4e1d8;
  --text: #2c2c2a;
  --muted: #888780;
  --accent: #185fa5;
  --accent-bg: #e6f1fb;
  --danger: #a32d2d;
  --danger-bg: #fcebeb;
  --warning: #854f0b;
  --warning-bg: #faeeda;
  --success: #3b6d11;
  --success-bg: #eaf3de;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; background: var(--bg); color: var(--text); font-size: 14px; }
header { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 10px 20px; background: var(--surface); border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.marchio { display: flex; gap: 10px; align-items: center; }
.marchio small { display: block; color: var(--muted); font-size: 11px; }
.logo { width: 30px; height: 30px; border-radius: 6px; background: var(--text); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; }
nav { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }
nav a { padding: 6px 12px; border-radius: 16px; color: var(--text); text-decoration: none; }
nav a.attivo { background: var(--text); color: #fff; }
main { max-width: 1180px; margin: 0 auto; padding: 20px 16px 60px; }
h1 { font-size: 20px; margin: 0 0 14px; }
h2 { font-size: 16px; margin: 0 0 10px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 16px; margin-bottom: 14px; }
.griglia { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; margin-bottom: 14px; }
.kpi { background: var(--surface-1); border-radius: 8px; padding: 12px 14px; }
.kpi .n { font-size: 22px; font-weight: 600; }
.kpi .l { font-size: 11.5px; color: var(--muted); }
table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
th, td { text-align: left; padding: 7px 8px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { font-size: 11px; text-transform: uppercase; color: var(--muted); letter-spacing: 0.3px; }
.scorre { overflow-x: auto; }
input, select, textarea, button { font: inherit; font-size: 12.5px; min-height: 32px; border-radius: 7px; border: 1px solid #d3d1c7; padding: 6px 10px; background: #fff; color: var(--text); }
input, select, textarea { width: 100%; }
textarea { min-height: 70px; font-family: ui-monospace, Menlo, monospace; font-size: 11.5px; }
button { cursor: pointer; }
button.primario { background: var(--accent); border-color: var(--accent); color: #fff; }
button.pericolo { color: var(--danger); border-color: #e4a5a5; }
button.ghost { background: transparent; border-color: transparent; }
label { display: block; font-size: 11.5px; color: #5f5e5a; margin: 8px 0 3px; }
.riga { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.azioni { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.pill { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 11px; background: var(--surface-1); }
.ok { background: var(--success-bg); color: var(--success); }
.attenzione { background: var(--warning-bg); color: var(--warning); }
.errore { background: var(--danger-bg); color: var(--danger); }
.banner { padding: 8px 12px; border-radius: 8px; margin: 8px 0; font-size: 12.5px; }
.muto { color: var(--muted); }
.check { display: inline-flex; gap: 6px; align-items: center; margin-right: 14px; font-size: 12.5px; color: var(--text); }
.check input { width: auto; min-height: 0; }
.costo td:last-child, .costo th:last-child { text-align: right; }
pre { white-space: pre-wrap; word-break: break-all; background: var(--surface-1); padding: 10px; border-radius: 8px; font-size: 11.5px; }
.accesso { max-width: 380px; margin: 60px auto; }
.sparkline { display: block; }
.sparkline polyline { fill: none; stroke: var(--accent); stroke-width: 1.5; }
.sparkline .base { stroke: var(--border); stroke-width: 1; }
nav a .pill { margin-left: 4px; }
