/* Area pazienti: stessa grafica del gestionale (apple.css), pensata per il telefono.
   Chiara, un solo font, una sola altezza dei controlli (--tocco), una sola card. */
@font-face { font-family: "InterV"; src: url(/fonts/InterVariable.woff2) format("woff2"); font-weight: 100 900; font-display: swap; }
:root {
  --bg: #F5F5F7;
  --card: #FFFFFF;
  --label: #1D1D1F;
  --label2: rgba(60, 60, 67, .74);
  --label3: rgba(60, 60, 67, .46);
  --sep: rgba(60, 60, 67, .13);
  --fill: rgba(120, 120, 128, .12);
  --blue: #007AFF;
  --blue-h: #0068DA;
  --green: #2EBD52;
  --red: #D70015;
  --tocco: 44px;
  --raggio: 14px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "InterV", system-ui, sans-serif;
}
[hidden] { display: none !important; }
* { box-sizing: border-box; margin: 0; padding: 0; scrollbar-width: none; }
*::-webkit-scrollbar { display: none; }
html { background: var(--bg); -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font); color: var(--label); font-size: 16px; line-height: 1.42; letter-spacing: -.011em;
  -webkit-font-smoothing: antialiased; min-height: 100vh; background: var(--bg);
  padding: env(safe-area-inset-top) 16px calc(32px + env(safe-area-inset-bottom));
}
button, input { font: inherit; color: inherit; }
button { border: 0; background: none; cursor: pointer; }
a { color: var(--blue); }

.testa { display: flex; align-items: center; gap: 10px; max-width: 640px; margin: 0 auto; padding: 14px 0 6px; }
.testa img { width: 34px; height: 34px; border-radius: 9px; }
.testa span { display: flex; flex-direction: column; line-height: 1.15; flex: 1; min-width: 0; }
.testa b { font-size: 15px; font-weight: 650; }
.testa small { font-size: 12.5px; color: var(--label2); }
.esci { height: var(--tocco); padding: 0 6px; color: var(--blue); font-size: 15px; }

main { max-width: 640px; margin: 0 auto; }
h1 { font-size: 30px; font-weight: 700; letter-spacing: -.025em; margin: 18px 0 10px; }
h2 { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .02em; color: var(--label2); margin: 26px 4px 7px; }
.carica { color: var(--label2); padding: 40px 4px; }

.carta { background: var(--card); border-radius: var(--raggio); box-shadow: 0 .5px 0 rgba(0,0,0,.04); overflow: hidden; }
.carta.corpo { padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.righe .riga { display: flex; align-items: center; gap: 12px; padding: 12px 16px; min-height: 56px; position: relative; text-decoration: none; color: inherit; }
.righe .riga + .riga::before { content: ""; position: absolute; top: 0; left: 16px; right: 0; border-top: .5px solid var(--sep); }
.righe .vuota { color: var(--label2); }
.riga .testo { flex: 1; min-width: 0; }
.riga .testo b { display: block; font-weight: 600; overflow-wrap: anywhere; }
.riga .testo small { display: block; font-size: 13.5px; color: var(--label2); }
.riga.passato { opacity: .55; }
.data { width: 46px; flex: none; text-align: center; line-height: 1.05; }
.data small { display: block; font-size: 11.5px; font-weight: 600; text-transform: uppercase; color: var(--red); }
.data b { font-size: 22px; font-weight: 600; letter-spacing: -.02em; }
.post { display: block !important; padding: 14px 16px !important; }
.post p { white-space: pre-wrap; overflow-wrap: anywhere; }
.post small { display: block; margin-top: 6px; font-size: 13px; color: var(--label2); }
.post.nuovo small::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 99px; background: var(--blue); margin-right: 6px; vertical-align: 1px; }
.ico { width: 36px; height: 36px; flex: none; border-radius: 9px; display: grid; place-items: center; font-size: 11px; font-weight: 700; color: #fff; background: var(--blue); }
.ico.mio { background: #8E8E93; }
.freccia { color: var(--label3); font-size: 20px; }

.campo { display: flex; flex-direction: column; gap: 5px; }
.campo span { font-size: 13px; color: var(--label2); padding-left: 2px; }
.campo input { height: var(--tocco); border: 0; border-radius: 10px; background: var(--fill); padding: 0 12px; font-size: 17px; outline: none; }
.campo input:focus { box-shadow: 0 0 0 3px rgba(0,122,255,.28); }

.btn {
  display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%;
  height: var(--tocco); border-radius: 12px; font-size: 16px; font-weight: 600; text-decoration: none;
  background: linear-gradient(180deg, #1A88FF, var(--blue)); color: #fff; position: relative; overflow: hidden;
}
.btn:active { filter: brightness(.94); }
.btn:disabled { opacity: .5; }
.btn.verde { background: linear-gradient(180deg, #3DD163, var(--green)); margin-top: 10px; }
.btn.secondario { background: var(--card); color: var(--blue); margin-top: 10px; cursor: pointer; }
.btn input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; font-size: 0; }

.msg { font-size: 14.5px; color: var(--label2); padding: 0 4px; }
.msg.err { color: var(--red); margin-bottom: 10px; }
#doc-esito { margin-top: 8px; }
