:root { --bg: #f5f3ee; --card: #fff; --text: #1f1d1a; --muted: #77716a; --line: #e4dfd6; --accent: #1f4e79;
        --red: #b42318; --red-bg: #fde8e6; --green: #1e7a3a; --green-bg: #e3f4e8; --amber: #8a5a00; --amber-bg: #fdf1d8; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.45 system-ui, -apple-system, "Segoe UI", sans-serif; }
header { display: flex; align-items: center; justify-content: space-between; padding: 12px 20px; background: var(--accent); color: #fff; }
header a, header .link { color: #fff; text-decoration: none; }
header nav { display: flex; gap: 16px; align-items: center; }
header form { margin: 0; }
.marchio { font-weight: 700; font-size: 17px; }
main { max-width: 1200px; margin: 0 auto; padding: 20px 16px 60px; }
h1 { font-size: 22px; margin: 0; }
h2 { font-size: 16px; margin: 0 0 10px; }
.barra { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.scheda { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 16px; margin-bottom: 16px; }
.tabella { overflow-x: auto; padding: 0; }
.tabella h2 { padding: 14px 16px 0; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
tr:last-child td { border-bottom: 0; }
a { color: var(--accent); }
.mono { font-family: Consolas, "SF Mono", monospace; }
.piccolo { color: var(--muted); font-size: 12px; }
.badge { display: inline-block; padding: 2px 9px; border-radius: 99px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.verde { background: var(--green-bg); color: var(--green); }
.rosso { background: var(--red-bg); color: var(--red); }
.giallo { background: var(--amber-bg); color: var(--amber); }
.grigio { background: #eceae5; color: var(--muted); }
.testo-rosso { color: var(--red); }
.errore { color: var(--red); background: var(--red-bg); padding: 8px 12px; border-radius: 8px; }
.attenzione { color: var(--amber); background: var(--amber-bg); padding: 8px 12px; border-radius: 8px; }
.chiave { font-size: 18px; }
button { background: var(--accent); color: #fff; border: 0; border-radius: 7px; padding: 7px 12px; font: inherit; font-size: 14px; cursor: pointer; }
button.pericolo { background: var(--red); }
button.link { background: none; padding: 0; }
.azioni form, .riga { display: flex; gap: 6px; flex-wrap: wrap; margin: 0; }
.azioni button { padding: 5px 9px; font-size: 13px; }
input, textarea { width: 100%; padding: 8px 10px; border: 1px solid var(--line); border-radius: 7px; font: inherit; background: #fff; }
.barra input { width: 260px; }
.modulo { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.modulo label { display: flex; flex-direction: column; gap: 4px; font-weight: 600; font-size: 14px; }
.modulo small { font-weight: 400; color: var(--muted); }
.modulo button { justify-self: start; align-self: end; padding: 10px 18px; }
.login { max-width: 360px; margin: 80px auto; display: flex; flex-direction: column; gap: 12px; }
.login label { display: flex; flex-direction: column; gap: 4px; font-weight: 600; }
.login button { padding: 10px; }
