/* Palette del sito newdentalcesano.it (Elementor "vamtam_accent_*") */
:root {
  --teal: #179E90; --teal-dark: #287178; --teal-deep: #196860; --teal-light: #A6CDC6;
  --navy: #2A3D53; --text: #2E3031; --muted: #6b7378; --bg: #F5F5F5; --card: #ffffff;
  --line: #e2e6e8; --pale: #E6F1F7; --red: #c94a4a; --amber: #cf8a00; --green: #179E90;
  --radius: 10px;
}
* { box-sizing: border-box; }
html { overflow-x: hidden; }
html, body { margin: 0; padding: 0; }
body { font: 16px/1.5 "Work Sans", -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text); background: var(--bg); min-width: 320px; overflow-x: hidden; }
a { color: var(--teal-dark); }
main { width: 100%; max-width: 1280px; margin: 0 auto; padding: 22px 28px 60px; }
h1 { font-size: 24px; font-weight: 600; margin: 4px 0 16px; color: var(--navy); }
h2 { font-size: 18px; font-weight: 600; margin: 0 0 12px; color: var(--navy); }
h3 { font-size: 16px; margin: 16px 0 6px; }
p { margin: 6px 0; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.hint { color: var(--muted); font-size: 14px; margin: 0 0 12px; }

/* ---------- barra in alto con le linguette ---------- */
header.top { background: var(--card); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
header.top .inner { max-width: 1280px; margin: 0 auto; padding: 0 28px; display: flex; align-items: stretch; gap: 28px; min-height: 64px; }
header.top .brand { display: flex; align-items: center; flex: 0 0 auto; }
header.top .brand img { height: 40px; width: auto; display: block; }
nav.tabs { display: flex; align-items: stretch; flex: 1 1 auto; gap: 2px; }
nav.tabs a { display: flex; align-items: center; gap: 6px; padding: 0 18px; color: var(--navy); text-decoration: none;
  font-weight: 500; font-size: 16px; border-bottom: 3px solid transparent; margin-bottom: -1px; white-space: nowrap; }
nav.tabs a:hover { background: var(--pale); }
nav.tabs a.active { color: var(--teal-dark); border-bottom-color: var(--teal); font-weight: 600; }
nav.tabs a.upload { color: var(--teal-dark); }
header.top .who { display: flex; align-items: center; flex: 0 0 auto; }
header.top .who details { position: relative; }
header.top .who summary { list-style: none; cursor: pointer; color: var(--muted); font-size: 14px; padding: 8px 4px; user-select: none; }
header.top .who summary::-webkit-details-marker { display: none; }
header.top .who summary::after { content: " ▾"; }
header.top .who .menu { position: absolute; right: 0; top: 100%; background: var(--card); border: 1px solid var(--line);
  border-radius: 8px; box-shadow: 0 6px 20px rgba(42,61,83,.12); min-width: 190px; padding: 6px 0; }
header.top .who .menu a { display: block; padding: 8px 14px; color: var(--text); text-decoration: none; font-size: 15px; }
header.top .who .menu a:hover { background: var(--pale); }

/* ---------- card e avvisi ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 22px; margin-bottom: 18px; }
.flash { padding: 12px 16px; border-radius: 8px; margin-bottom: 14px; font-weight: 500; }
.flash.ok { background: #e3f4f1; color: var(--teal-deep); }
.flash.error { background: #fbe9e9; color: #7f1d1d; }
.flash.info { background: var(--pale); color: var(--navy); }
.allgood { color: var(--teal-dark); font-weight: 600; }
.warnbox { background: #fff6e5; border: 1px solid #f1d9a6; color: #6b4600; padding: 10px 14px; border-radius: 8px; margin: 10px 0 0; }
.dangerbox { background: #fbe9e9; border: 1px solid #efc0c0; color: #7f1d1d; padding: 10px 14px; border-radius: 8px; margin: 10px 0 0; }

/* ---------- pulsanti ---------- */
.btn { display: inline-block; border: 0; border-radius: 999px; padding: 10px 20px; font: inherit; font-size: 15px; font-weight: 600;
  cursor: pointer; text-decoration: none; color: #fff; background: var(--teal); line-height: 1.2; }
.btn:hover { background: var(--teal-dark); }
.btn.big { font-size: 17px; padding: 14px 26px; }
.btn.grey { background: #e6e9eb; color: #5b6369; cursor: default; }
.btn.grey:hover { background: #e6e9eb; }
.btn.small { padding: 7px 14px; font-size: 14px; }
.btn.link { background: none; color: var(--teal-dark); padding: 4px 6px; font-weight: 500; }
.btn.link:hover { text-decoration: underline; background: none; }

/* ---------- riquadri dei giorni da caricare ---------- */
.days { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 420px)); gap: 16px; }
.day { border: 2px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.day.todo { border-color: var(--teal); background: #f2faf9; }
.day.done { border-color: #d9dde0; background: #f7f8f9; color: #5b6369; }
.day .title { font-size: 18px; color: var(--navy); margin-bottom: 10px; }
.day.done .title { color: #5b6369; }
.day .ok { color: var(--teal-dark); font-weight: 600; }
.day .btn { margin-top: 8px; }

/* ---------- badge ---------- */
.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.badge.ok { background: #e3f4f1; color: var(--teal-deep); }
.badge.danger { background: #fbe9e9; color: #9b2c2c; }
.badge.warn { background: #fff6e5; color: #7a5200; }
.badge.muted { background: #eceff1; color: #5b6369; }
.badge.count { background: var(--red); color: #fff; font-size: 12px; padding: 1px 8px; }
.badge.count.zero { background: #dfe3e6; color: #5b6369; }

/* ---------- tabelle ---------- */
.tablewrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { text-align: left; padding: 10px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; }
tr.done td { color: var(--muted); }
td.nowrap, th.nowrap { white-space: nowrap; }
td .when { font-weight: 600; color: var(--navy); }
td .name { font-weight: 600; font-size: 16px; color: var(--navy); }
td .phone a { text-decoration: none; color: var(--text); }
form.inline { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
form.inline input[type=text] { padding: 7px 10px; border: 1px solid #cfd5d9; border-radius: 8px; font: inherit; font-size: 14px; width: 170px; }

/* ---------- form ---------- */
label { display: block; font-weight: 600; margin: 12px 0 4px; }
input[type=text], input[type=password], input[type=date], input[type=file], select {
  width: 100%; max-width: 420px; padding: 10px 12px; border: 1px solid #cfd5d9; border-radius: 8px; font: inherit; font-size: 16px; background: #fff; }
input[type=file] { padding: 8px; }
.login { max-width: 400px; margin: 70px auto; text-align: center; }
.login img { height: 64px; margin: 6px 0 14px; }
.login form { text-align: left; }
.error { color: var(--red); font-weight: 600; }
.dropzone { border: 2px dashed var(--teal); background: #f2faf9; border-radius: var(--radius); padding: 24px; text-align: center; }
.dropzone input[type=file] { max-width: 100%; margin: 10px auto; }
.msg { border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; margin-bottom: 10px; background: #fff; }
.msg.unread { border-left: 5px solid var(--teal); }
.msg .head { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px; font-size: 14px; color: var(--muted); }
.msg .text { font-size: 16px; margin: 6px 0; white-space: pre-wrap; }
details.help { color: var(--muted); font-size: 14px; margin-top: 8px; }
details.help summary { cursor: pointer; color: var(--teal-dark); }
details.help ul { margin: 6px 0 0 18px; }
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar input[type=search] { padding: 8px 10px; border: 1px solid #cfd5d9; border-radius: 8px; font: inherit; font-size: 14px; }
.bulkbar { background: var(--pale); border-radius: 8px; padding: 8px 12px; margin: 4px 0 10px; }
.bulkbar button:disabled { opacity: .45; cursor: default; }
th.pickcol, td.pickcol { width: 28px; padding-left: 4px; padding-right: 4px; }
input.pick, input.pick-all { width: 17px; height: 17px; cursor: pointer; accent-color: var(--teal); }
th.sortable a { color: var(--muted); text-decoration: none; }
th.sortable a:hover { color: var(--teal-dark); }
th.sortable.on a { color: var(--teal-dark); }
th .arrow { font-size: 10px; }
.toolbar input[type=date] { width: 170px; }
.toolbar select, form.inline select { padding: 8px 10px; border: 1px solid #cfd5d9; border-radius: 8px; font: inherit; font-size: 14px; background: #fff; width: auto; }
form.inline select { color: var(--teal-dark); font-weight: 600; border-color: var(--teal); }

/* ---------- statistiche ---------- */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 6px 0 18px; }
.tile { background: var(--bg); border-radius: var(--radius); padding: 14px 16px; }
.tile .n { font-size: 28px; font-weight: 600; color: var(--navy); line-height: 1.1; }
.tile .l { font-size: 13px; color: var(--muted); margin-top: 4px; }
.tile.ok .n { color: var(--teal-dark); }
.tile.warn .n { color: #8a5a00; }
.tile.danger .n { color: #9b2c2c; }
.cols { display: grid; grid-template-columns: 400px minmax(0, 1fr); gap: 28px; }
.cols > div { min-width: 0; }
.cols .badge { white-space: normal; }
@media (max-width: 1100px) { .cols { grid-template-columns: 1fr; } }
table.compact td, table.compact th { padding: 6px 8px; font-size: 14px; }
td.num, th.num { text-align: right; white-space: nowrap; }
td.bad { color: #9b2c2c; font-weight: 600; }
@media (max-width: 900px) { .cols { grid-template-columns: 1fr; } }

@media (max-width: 900px) {
  main { padding: 16px 16px 40px; }
  header.top .inner { padding: 0 12px; gap: 12px; flex-wrap: wrap; min-height: 56px; }
  header.top .brand img { height: 32px; }
  nav.tabs { order: 3; width: 100%; overflow-x: auto; }
  nav.tabs a { padding: 10px 12px; font-size: 15px; }
  .card { padding: 14px 16px; }
  th, td { padding: 8px 6px; font-size: 14px; }
  form.inline input[type=text] { width: 130px; }
}
