:root {
  --bg: #f5f7fb;
  --card: #ffffff;
  --text: #162033;
  --muted: #667085;
  --border: #d9deea;
  --primary: #0b5cff;
  --danger: #b42318;
  --success: #067647;
  --warning: #a15c00;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: Inter, Arial, sans-serif; background: var(--bg); color: var(--text); line-height: 1.45; }
a { color: var(--primary); }
.container { width: min(1180px, calc(100% - 28px)); margin: 28px auto; }
.narrow { width: min(720px, calc(100% - 28px)); }
.brand { font-size: 22px; font-weight: 800; margin-bottom: 18px; }
.topbar { display:flex; justify-content:space-between; align-items:center; gap:12px; margin-bottom:18px; flex-wrap:wrap; }
.card { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 22px; margin-bottom: 18px; box-shadow: 0 6px 24px rgba(16,24,40,.05); }
h1,h2,h3 { margin-top: 0; }
h1 { font-size: 28px; }
h2 { font-size: 21px; }
h3 { font-size: 17px; }
label { display:block; font-weight: 650; margin-bottom: 14px; }
input, select, textarea {
  width:100%; margin-top:6px; padding:11px 12px; border:1px solid var(--border);
  border-radius:9px; background:#fff; color:var(--text); font:inherit;
}
textarea { min-height:120px; resize:vertical; }
button, .button {
  appearance:none; display:inline-block; border:0; border-radius:9px; padding:11px 16px;
  background:var(--primary); color:white; text-decoration:none; font-weight:750; cursor:pointer;
}
.button.secondary, button.secondary { background:#344054; }
.button.light, button.light { background:#eef2f8; color:#1d2939; }
.grid { display:grid; gap:14px; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.inline { display:flex; gap:10px; align-items:center; flex-wrap:wrap; }
.inline > * { margin-bottom:0; }
.flash { padding:12px 14px; border-radius:9px; margin-bottom:15px; }
.flash.success { background:#ecfdf3; color:var(--success); }
.flash.error { background:#fef3f2; color:var(--danger); }
.flash.warning { background:#fffaeb; color:var(--warning); }
.muted { color:var(--muted); }
.badge { display:inline-block; padding:4px 8px; border-radius:999px; background:#eef2f8; font-size:12px; font-weight:700; }
.badge.paid { background:#ecfdf3; color:var(--success); }
.badge.partial { background:#fffaeb; color:var(--warning); }
.badge.unpaid { background:#fef3f2; color:var(--danger); }
table { width:100%; border-collapse:collapse; }
th,td { text-align:left; padding:11px 9px; border-bottom:1px solid var(--border); vertical-align:top; }
th { color:var(--muted); font-size:13px; }
.table-wrap { overflow:auto; }
.stat { font-size:28px; font-weight:800; }
.small { font-size:13px; }
hr { border:0; border-top:1px solid var(--border); margin:22px 0; }
.checkbox { display:flex; gap:8px; align-items:center; font-weight:600; }
.checkbox input { width:auto; margin:0; }
.actions { display:flex; gap:8px; flex-wrap:wrap; }
@media (max-width: 760px) {
  .grid.two,.grid.three,.grid.four { grid-template-columns:1fr; }
  .card { padding:16px; }
  h1 { font-size:24px; }
}
/* Colori righe prenotazioni in base allo stato */

tr.row-da-iniziare > td {
    background-color: #f1f3f5;
}

tr.row-in-lavorazione > td {
    background-color: #fff0d9;
}

tr.row-completato > td {
    background-color: #e7f8ed;
}

tr.row-annullato > td {
    background-color: #fde8e8;
}

/* Colore leggermente più intenso passando il mouse */

tr.row-da-iniziare:hover > td {
    background-color: #e4e7eb;
}

tr.row-in-lavorazione:hover > td {
    background-color: #ffe2b8;
}

tr.row-completato:hover > td {
    background-color: #d1f1dc;
}

tr.row-annullato:hover > td {
    background-color: #f9d0d0;
}
