:root {
  --cmc-blue: #00497f;
  --cmc-blue-dark: #00365e;
  --cmc-blue-soft: #e6eef5;
  --cmc-red: #d8211a;
  --barbar: #12716f;
  --ink: #16222e;
  --muted: #5d6b78;
  --line: #d9e1e8;
  --bg: #f3f6f9;
  --ok: #1f7a4a;
  --ok-soft: #e2f3e9;
  --warn-soft: #fff4d6;
  --warn: #7a5600;
  --err-soft: #fde4e2;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
header.brand {
  background: #fff; border-bottom: 4px solid var(--cmc-red);
  display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px;
}
header.brand img.cmc { height: 44px; }
header.brand .with { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; text-align: right; }
header.brand img.bb { height: 52px; width: 52px; border-radius: 50%; }
.bar { background: var(--cmc-blue); color: #fff; padding: 10px 16px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.bar h1 { font-size: 19px; margin: 0; flex: 1; }
.bar form { margin: 0; }
.bar button { background: transparent; border: 1px solid rgba(255,255,255,.6); color: #fff; border-radius: 6px; padding: 4px 10px; font: inherit; font-size: 14px; cursor: pointer; }
main { max-width: 760px; margin: 0 auto; padding: 16px 16px 110px; }
.box { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 16px; margin: 12px 0; }
label { display: block; font-weight: 600; margin: 12px 0 4px; }
input[type=text], input[type=email], select {
  width: 100%; font: inherit; padding: 10px 12px; border: 1px solid #b9c6d2; border-radius: 8px; background: #fff;
}
select:disabled, input:disabled { background: #f0f3f6; color: #8b97a3; }
.btn { display: inline-block; background: var(--cmc-blue); color: #fff; border: none; border-radius: 8px; padding: 11px 18px; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; }
.btn:hover { background: var(--cmc-blue-dark); }
.btn:disabled { background: #a9b6c3; cursor: not-allowed; }
.btn.full { width: 100%; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.flash { border-radius: 10px; padding: 12px 14px; margin: 12px 0; }
.flash.ok { background: var(--ok-soft); color: #134d2f; }
.flash.err { background: var(--err-soft); color: #7c1611; }
.flash.late { background: var(--warn-soft); color: var(--warn); }
.tabs { display: flex; gap: 6px; margin: 4px 0 8px; }
.tabs a { flex: 1; text-align: center; padding: 9px; border-radius: 8px; background: #fff; border: 1px solid var(--line); color: var(--cmc-blue); text-decoration: none; font-weight: 600; }
.tabs a.on { background: var(--cmc-blue); color: #fff; border-color: var(--cmc-blue); }
.day { background: #fff; border: 1px solid var(--line); border-radius: 12px; margin: 12px 0; overflow: hidden; }
.day .head { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; background: var(--cmc-blue-soft); }
.day .head b { font-size: 17px; text-transform: capitalize; }
.day .body { padding: 6px 14px 14px; }
.day.passato { opacity: .75; }
.tag { font-size: 13px; border-radius: 999px; padding: 2px 10px; background: #fff; border: 1px solid var(--line); white-space: nowrap; }
.tag.ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.tag.no { color: var(--muted); }
.choice { display: flex; gap: 8px; margin-top: 10px; }
.choice label { flex: 1; margin: 0; font-weight: 600; border: 1px solid #b9c6d2; border-radius: 8px; padding: 10px; text-align: center; cursor: pointer; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice label:has(input:checked) { background: var(--cmc-blue); color: #fff; border-color: var(--cmc-blue); }
.choice label.no:has(input:checked) { background: #6b7785; border-color: #6b7785; }
.choice label:has(input:focus-visible) { outline: 3px solid #9cc0e0; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.grid .wide { grid-column: 1 / -1; }
.late-note { background: var(--warn-soft); color: var(--warn); border-radius: 8px; padding: 8px 10px; margin-top: 10px; font-size: 14px; }
.summary { margin: 8px 0 0; }
.savebar { position: fixed; left: 0; right: 0; bottom: 0; background: rgba(255,255,255,.96); border-top: 1px solid var(--line); padding: 12px 16px; }
.savebar .inner { max-width: 760px; margin: 0 auto; display: flex; gap: 12px; align-items: center; }
.savebar .hint { flex: 1; font-size: 14px; color: var(--muted); }
footer { text-align: center; color: var(--muted); font-size: 13px; padding: 20px 16px; }
@media (max-width: 520px) {
  .grid { grid-template-columns: 1fr; }
  header.brand img.cmc { height: 34px; }
  header.brand img.bb { height: 44px; width: 44px; }
  header.brand .with span { display: none; }
}
