:root {
  --bg: #f4f6f8;
  --card: #ffffff;
  --ink: #1f2933;
  --muted: #647382;
  --line: #e2e8f0;
  --brand: #0b6e4f;
  --brand-d: #095c42;
  --done: #15803d;
  --accent: #2563eb;
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
header.topbar {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--brand); color: #fff; padding: 12px 22px;
}
header.topbar h1 { font-size: 18px; margin: 0; font-weight: 600; }
header.topbar .who { font-size: 13px; opacity: .92; display: flex; gap: 12px; align-items: center; }
main { max-width: 980px; margin: 24px auto; padding: 0 18px; }
button {
  font: inherit; border: 0; border-radius: 8px; padding: 8px 14px;
  background: var(--brand); color: #fff; cursor: pointer;
}
button.secondary { background: #fff; color: var(--ink); border: 1px solid var(--line); }
button.ghost { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.5); }
button:hover { filter: brightness(.96); }
button:disabled { opacity: .5; cursor: default; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 18px; margin-bottom: 16px; }
.row { display: flex; gap: 14px; align-items: center; }
.between { justify-content: space-between; }
.muted { color: var(--muted); }
.center { text-align: center; }
a.link { color: var(--accent); cursor: pointer; text-decoration: none; }
input, select {
  font: inherit; padding: 8px 10px; border: 1px solid var(--line);
  border-radius: 8px; width: 100%;
}
label { display: block; font-size: 13px; color: var(--muted); margin: 10px 0 4px; }
table.cases { width: 100%; border-collapse: collapse; }
table.cases th, table.cases td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); }
table.cases tr:hover td { background: #f9fafb; }
.progress { background: var(--line); border-radius: 99px; height: 8px; width: 140px; overflow: hidden; }
.progress > i { display: block; height: 100%; background: var(--brand); }
.badge { font-size: 12px; padding: 2px 8px; border-radius: 99px; background: #eef2f7; color: var(--muted); }
.badge.open { background: #fef9c3; color: #854d0e; }
.badge.completed { background: #dcfce7; color: var(--done); }
.section-title { margin: 22px 0 8px; font-size: 15px; font-weight: 700; color: var(--brand-d); }
.task { display: flex; gap: 12px; align-items: flex-start; padding: 10px 8px; border-bottom: 1px solid var(--line); }
.task input[type=checkbox] { width: 20px; height: 20px; margin-top: 2px; flex: 0 0 auto; }
.task .cosa { font-weight: 500; }
.task.done .cosa { text-decoration: line-through; color: var(--muted); }
.task .meta { font-size: 12px; color: var(--muted); margin-top: 2px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.toast { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); background: #1f2933; color: #fff; padding: 10px 16px; border-radius: 8px; opacity: 0; transition: opacity .2s; }
.toast.show { opacity: .95; }
.toast.err { background: #b91c1c; }
.hidden { display: none; }
