/* Orarium, le schermate del terapeuta (/orarium/, FMA_App), dentro la cornice della scrivania
   (segreteria.css: colonna a sinistra, dock in basso sul telefono; dal 10/11/2026).
   Colori dalle variabili della segreteria (--fma-s-*), che la pelle del sito ridefinisce;
   i toni di stato (--fma-m-*) sono qui, la pelle li può ridefinire allo stesso modo.
   Misure in rem: la pelle non le deve riscalare. */

body.fma-wa {
	--fma-m-giallo-fondo: #fbefd9;
	--fma-m-giallo: #7a4e00;
	--fma-m-rosso-fondo: #fbe6e2;
	--fma-m-rosso: #8e2f22;
	--fma-m-verde-fondo: #e3f0e6;
	--fma-m-verde: #24603a;
	--fma-m-terra-fondo: #f6e3d7;
	--fma-m-terra: #7a3e17;
	--fma-m-carta: #ffffff;
	--fma-m-barra: 4.5rem;
	margin: 0;
	background: var(--fma-s-fondo);
	color: var(--fma-s-testo);
	font-family: var(--fma-s-carattere);
	font-size: 1rem;
	line-height: 1.4;
	-webkit-text-size-adjust: 100%;
	-webkit-tap-highlight-color: transparent;
}
body.fma-wa [hidden] { display: none !important; }
body.fma-wa *, body.fma-wa *::before, body.fma-wa *::after { box-sizing: border-box; }
.fma-wa a { color: var(--fma-s-blu); }
/* La base dei pulsanti: nella webapp gestione.css non c'è (la segreteria non lo carica). */
.fma-wa .fma-bottone {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.375rem;
	min-height: 2.75rem;
	padding: 0.5rem 1rem;
	border: 1px solid var(--fma-s-azione);
	border-radius: var(--fma-s-raggio);
	background: var(--fma-s-azione);
	color: var(--fma-s-su-azione);
	font: inherit;
	font-weight: 700;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
}
.fma-wa .fma-bottone.fma-secondario { background: var(--fma-m-carta); color: var(--fma-s-testo); border-color: var(--fma-s-linea); }
.fma-wa .fma-bottone:disabled { cursor: default; }
.fma-wa button, .fma-wa input, .fma-wa select, .fma-wa textarea { font: inherit; color: inherit; }

.fma-m { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.fma-m-corpo {
	flex: 1;
	padding: 0.25rem 1rem calc(var(--fma-m-barra) + 2rem + env(safe-area-inset-bottom));
	display: flex;
	flex-direction: column;
	gap: 0.875rem;
	width: 100%;
	max-width: 40rem;
	margin: 0 auto;
}
.fma-wa-dettaglio .fma-m-corpo { padding-bottom: calc(6.5rem + env(safe-area-inset-bottom)); }

/* L'avatar del paziente nella scheda. */
.fma-m-avatar {
	width: 2.75rem;
	height: 2.75rem;
	border-radius: 50%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: none;
	text-decoration: none;
}
.fma-wa .fma-m-avatar { background: var(--fma-s-tinta); color: var(--fma-s-testo); font-weight: 700; font-size: 0.9375rem; }

.fma-m-titolo { margin: 0; font-family: var(--fma-s-titoli); font-size: 1.875rem; line-height: 1.15; font-weight: 900; color: var(--fma-s-testo); }
.fma-m-sotto { margin: 0; font-size: 0.9375rem; color: var(--fma-s-tenue); }
.fma-m-sotto + .fma-m-titolo, .fma-m-titolo + .fma-m-sotto { margin-top: -0.625rem; }
.fma-m-vuoto { text-align: center; color: var(--fma-s-tenue); padding: 2rem 1rem; margin: 0; }
.fma-m-vuoto b { display: block; color: var(--fma-s-testo); font-size: 1.0625rem; }
.fma-m-icona { flex: none; }

/* Pillole delle sedi e segmenti dei filtri */
.fma-m-pillole { display: flex; gap: 0.5rem; overflow-x: auto; scrollbar-width: none; margin: 0 -1rem; padding: 0 1rem; }
.fma-wa .fma-m-pillole a {
	flex: none;
	min-height: 2.5rem;
	padding: 0 1rem;
	display: inline-flex;
	align-items: center;
	border: 1px solid var(--fma-s-linea);
	background: var(--fma-m-carta);
	color: var(--fma-s-testo);
	text-decoration: none;
	font-size: 0.9375rem;
	border-radius: var(--fma-s-raggio-pillola);
}
.fma-wa .fma-m-pillole a[aria-current] { background: var(--fma-s-testo); border-color: var(--fma-s-testo); color: var(--fma-m-carta); font-weight: 700; }
/* Dentro la bacheca la regola dei link della segreteria (body.fma-segreteria .fma-bacheca a:not(.fma-bottone)) pesa di più: senza questa il testo della pillola scelta spariva sul fondo scuro. */
body.fma-wa .fma-m-pillole a:not(.fma-bottone) { color: var(--fma-s-testo); }
body.fma-wa .fma-m-pillole a[aria-current]:not(.fma-bottone) { color: var(--fma-m-carta); }
.fma-m-segmenti { display: flex; gap: 0.25rem; padding: 0.25rem; background: var(--fma-s-tinta); border-radius: var(--fma-s-raggio); }
.fma-wa .fma-m-segmenti a {
	flex: 1 1 0;
	min-width: 0;
	min-height: 2.5rem;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.25rem;
	text-align: center;
	text-decoration: none;
	color: var(--fma-s-blu);
	font-size: 0.875rem;
	line-height: 1.15;
	border-radius: var(--fma-s-raggio);
}
.fma-wa .fma-m-segmenti a[aria-current] { background: var(--fma-m-carta); color: var(--fma-s-testo); font-weight: 700; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1); }
.fma-m-segmenti span { opacity: 0.75; }

/* Schede degli appuntamenti */
.fma-m-scheda, .fma-m-box { background: var(--fma-m-carta); border-radius: var(--fma-s-raggio-scheda); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06); }
.fma-m-box { padding: 0.875rem 1rem; display: flex; flex-direction: column; gap: 0.5rem; }
.fma-m-box h2 { margin: 0; font-size: 0.875rem; font-weight: 700; color: var(--fma-s-blu); }
.fma-m-box p { margin: 0; }
.fma-wa .fma-m-riga { display: flex; gap: 0.875rem; padding: 1rem; text-decoration: none; color: var(--fma-s-testo); }
.fma-m-ora { flex: none; width: 3.625rem; display: flex; flex-direction: column; }
.fma-m-ora b { font-size: 1.25rem; font-weight: 900; color: var(--fma-s-blu); }
.fma-m-ora small, .fma-m-cosa small { font-size: 0.8125rem; color: var(--fma-s-tenue); }
.fma-m-cosa { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 0.25rem; overflow-wrap: anywhere; }
.fma-m-cosa b { font-size: 1.125rem; font-weight: 700; }
.fma-m-cosa small { font-size: 0.9375rem; }
.fma-m-tags { display: flex; flex-wrap: wrap; gap: 0.375rem; margin: 0.25rem 0 0; }
.fma-m-tag { font-size: 0.8125rem; padding: 0.25rem 0.625rem; background: var(--fma-s-tinta); color: var(--fma-s-blu); border-radius: var(--fma-s-raggio-pillola); }
.fma-m-tag.fma-m-giallo { background: var(--fma-m-giallo-fondo); color: var(--fma-m-giallo); }
.fma-m-tag.fma-m-rosso { background: var(--fma-m-rosso-fondo); color: var(--fma-m-rosso); }
.fma-m-tag.fma-m-verde { background: var(--fma-m-verde-fondo); color: var(--fma-m-verde); font-weight: 700; }
.fma-m-tag.fma-m-terra { background: var(--fma-m-terra-fondo); color: var(--fma-m-terra); font-weight: 700; }
.fma-wa .fma-m-largo { flex: 1; width: 100%; display: flex; align-items: center; justify-content: center; text-align: center; min-height: 2.75rem; margin: 0; }
.fma-wa .fma-m-grande { width: 100%; min-height: 3.5rem; font-size: 1.125rem; font-weight: 900; margin: 0; }
.fma-wa .fma-m-grande:disabled { opacity: 1; background: var(--fma-s-linea) !important; color: var(--fma-s-tenue) !important; border-color: var(--fma-s-linea) !important; cursor: default; }

/* Appuntamento */
.fma-m-dati { margin: 0; padding: 0.25rem 1rem; background: var(--fma-m-carta); border-radius: var(--fma-s-raggio-scheda); }
.fma-m-dati div { display: flex; justify-content: space-between; gap: 0.75rem; padding: 0.75rem 0; border-bottom: 1px solid var(--fma-s-linea); }
.fma-m-dati div:last-child { border-bottom: 0; }
.fma-m-dati dt { color: var(--fma-s-tenue); font-size: 0.9375rem; flex: none; }
.fma-m-dati dd { margin: 0; text-align: right; font-size: 0.9375rem; overflow-wrap: anywhere; }
.fma-m-apri > summary { cursor: pointer; font-weight: 700; color: var(--fma-s-blu); min-height: 2rem; display: flex; align-items: center; }
.fma-wa .fma-m-box form.fma-campi, .fma-wa .fma-m-campi { display: flex; flex-direction: column; gap: 0.75rem; margin: 0; }
.fma-wa .fma-m-box .fma-campi label, .fma-wa .fma-m-campi label { display: flex; flex-direction: column; gap: 0.25rem; font-size: 0.9375rem; }
.fma-wa .fma-m-corpo input:not([type="radio"]):not([type="checkbox"]):not([type="hidden"]),
.fma-wa .fma-m-corpo select,
.fma-wa .fma-m-corpo textarea {
	width: 100%;
	min-height: 3rem;
	padding: 0.625rem 0.75rem;
	border: 1px solid var(--fma-s-linea);
	background: var(--fma-m-carta);
	font-size: 1rem;
	border-radius: var(--fma-s-raggio);
}
.fma-wa .fma-m-corpo input, .fma-wa .fma-m-corpo select, .fma-wa .fma-m-corpo textarea { flex: none; }
.fma-wa .fma-m-corpo textarea { min-height: 6rem; }
.fma-wa .fma-m-corpo .fma-campi > * { flex: none; }
.fma-wa .fma-m-campi label.fma-m-metodo, .fma-wa .fma-m-box .fma-campi label.fma-m-metodo { flex-direction: row; align-items: center; }
.fma-wa .fma-m-box .fma-campi .fma-bottone { align-self: stretch; min-height: 2.75rem; margin: 0; }
.fma-m-campi fieldset { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0.5rem; }
.fma-m-campi legend { font-weight: 700; margin-bottom: 0.25rem; padding: 0; }

/* Fondo fisso con il pulsante principale */
.fma-m-fondo {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 15;
	padding: 0.75rem 1rem calc(1rem + env(safe-area-inset-bottom));
	background: var(--fma-s-fondo);
	border-top: 1px solid var(--fma-s-linea);
}
.fma-m-importo { margin: -0.5rem 0 0; font-size: 2.125rem; font-weight: 900; }
.fma-m-metodi { display: flex; flex-direction: column; gap: 0.5rem; }
.fma-m-metodo { display: flex; align-items: center; gap: 0.75rem; min-height: 3.5rem; padding: 0.625rem 1rem; background: var(--fma-m-carta); border: 2px solid var(--fma-s-linea); border-radius: var(--fma-s-raggio); cursor: pointer; }
.fma-m-metodo:has(input:checked) { border-color: var(--fma-s-blu); }
.fma-m-metodo input { width: 1.375rem; height: 1.375rem; flex: none; accent-color: var(--fma-s-blu); margin: 0; }
.fma-m-metodo span { display: flex; flex-direction: column; }
.fma-m-metodo small { color: var(--fma-s-tenue); font-size: 0.875rem; }

/* Sposta: il mese */
.fma-m-adesso small { color: var(--fma-s-tenue); font-size: 0.875rem; }
.fma-m-adesso s { font-size: 1.0625rem; font-weight: 700; text-decoration-color: var(--fma-s-giallo); }
.fma-m-adesso span { color: var(--fma-s-tenue); font-size: 0.9375rem; }
.fma-m-sposta { display: flex; flex-direction: column; gap: 0.75rem; margin: 0; }
.fma-m-mese { padding: 0.625rem; gap: 0.375rem; }
/* Frecce del mese accanto al nome, piene nel colore dei passi; spente col solo bordo (Andrea, 24/11/2026). */
.fma-m-mese-testa { display: flex; align-items: center; justify-content: center; gap: 0.75rem; }
.fma-m-mese-testa b { min-width: 10rem; font-size: 1.125rem; font-weight: 900; text-align: center; text-transform: capitalize; }
.fma-wa .fma-m-mese-testa button { display: inline-flex; align-items: center; justify-content: center; width: 2.75rem; height: 2.75rem; padding: 0; border: 2px solid var(--fma-s-giallo); background: var(--fma-s-giallo); color: var(--fma-s-testo); font-size: 0; cursor: pointer; border-radius: 50%; }
.fma-wa .fma-m-mese-testa button::before { content: ""; width: 0.6875rem; height: 0.6875rem; border: solid currentColor; border-width: 0.1875rem 0.1875rem 0 0; transform: translateX(-0.125rem) rotate(45deg); }
.fma-wa .fma-m-mese-testa button:first-child::before { transform: translateX(0.125rem) rotate(-135deg); }
.fma-wa .fma-m-mese-testa button:hover { filter: brightness(0.94); }
.fma-wa .fma-m-mese-testa button:focus-visible { outline: 3px solid var(--fma-s-blu); outline-offset: 2px; }
.fma-wa .fma-m-mese-testa button:disabled { border-color: var(--fma-s-linea); background: transparent; color: var(--fma-s-tenue); filter: none; cursor: default; }
.fma-m-mese-sett, .fma-m-mese-celle { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 0.125rem; text-align: center; }
.fma-m-mese-sett { font-size: 0.8125rem; color: var(--fma-s-tenue); }
.fma-m-mese-celle button { min-height: 2.75rem; border: 0; background: transparent; font-size: 1rem; cursor: pointer; border-radius: var(--fma-s-raggio); padding: 0; }
.fma-m-mese-celle button.fma-m-aperto { background: var(--fma-s-tinta); font-weight: 700; }
.fma-m-mese-celle button:disabled { color: var(--fma-s-tenue); opacity: 0.45; cursor: default; background: transparent; }
.fma-m-mese-celle button[aria-pressed="true"] { background: var(--fma-s-testo); color: var(--fma-m-carta); }
.fma-m-orari { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.5rem; }
.fma-m-orari button { min-height: 3rem; border: 1px solid var(--fma-s-linea); background: var(--fma-m-carta); font-size: 1rem; font-weight: 700; cursor: pointer; border-radius: var(--fma-s-raggio); }
.fma-m-orari button[aria-pressed="true"] { background: var(--fma-s-testo); border-color: var(--fma-s-testo); color: var(--fma-m-carta); }
.fma-m-spunta { display: flex; align-items: center; gap: 0.75rem; min-height: 3.25rem; padding: 0 1rem; background: var(--fma-m-carta); border-radius: var(--fma-s-raggio); }
.fma-m-spunta input { width: 1.375rem; height: 1.375rem; accent-color: var(--fma-s-blu); margin: 0; }

/* Nuova prenotazione a passi */
.fma-m-prenota { display: flex; flex-direction: column; gap: 0.875rem; margin: 0; }
.fma-m-prenota > section { display: flex; flex-direction: column; gap: 0.75rem; }
.fma-m-passi-testa { display: flex; align-items: center; justify-content: space-between; min-height: 2.75rem; font-size: 0.9375rem; color: var(--fma-s-tenue); }
.fma-m-passi-testa [data-passo-n] { margin-left: auto; }
.fma-m-segni { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.375rem; margin-top: -0.5rem; }
.fma-m-segni span { height: 0.3125rem; background: var(--fma-s-linea); border-radius: 0.1875rem; }
.fma-m-segni span.fma-m-fatto { background: var(--fma-s-giallo); }
.fma-m-scelte { display: flex; flex-direction: column; gap: 0.5rem; }
.fma-wa .fma-m-scelta {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	width: 100%;
	min-height: 3.5rem;
	padding: 0.625rem 1rem;
	text-align: left;
	background: var(--fma-m-carta);
	border: 2px solid var(--fma-s-linea);
	border-radius: var(--fma-s-raggio);
	cursor: pointer;
}
.fma-wa .fma-m-scelta[aria-pressed="true"] { border-color: var(--fma-s-blu); background: var(--fma-s-tinta); }
.fma-wa .fma-m-segmenti button { flex: 1 1 0; min-width: 0; min-height: 2.5rem; border: 0; background: transparent; color: var(--fma-s-blu); font-size: 0.875rem; cursor: pointer; border-radius: var(--fma-s-raggio); }
.fma-wa .fma-m-segmenti button[aria-current] { background: var(--fma-m-carta); color: var(--fma-s-testo); font-weight: 700; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1); }
.fma-m-prenota .fma-m-dati dd { display: flex; flex-direction: column; align-items: flex-end; gap: 0.125rem; }
.fma-m-prenota .fma-m-dati .fma-m-link { min-height: 2rem; padding: 0; font-size: 0.875rem; }
.fma-wa .fma-m-link { border: 0; background: none; color: var(--fma-s-blu); font-weight: 700; min-height: 2.75rem; cursor: pointer; text-decoration: underline; padding: 0 0.5rem; }
.fma-m-passi { margin: 0; padding-left: 1.25rem; display: flex; flex-direction: column; gap: 0.375rem; }

/* Terapeuta */
.fma-wa .fma-m-prossima {
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
	padding: 1rem;
	background: var(--fma-s-blu);
	color: var(--fma-s-su-azione);
	text-decoration: none;
	border-radius: var(--fma-s-raggio-scheda);
}
.fma-m-prossima small { font-size: 0.875rem; font-weight: 700; }
.fma-m-prossima b { font-size: 1.375rem; font-weight: 900; }
.fma-m-giorno { margin: 0.5rem 0 0; font-size: 1rem; font-weight: 700; color: var(--fma-s-tenue); }

/* Le schermate prese dal pannello del terapeuta, dentro l'app */
.fma-wa .fma-m-pannello { display: flex; flex-direction: column; gap: 0.875rem; overflow-wrap: anywhere; }
.fma-wa .fma-m-pannello table { width: 100%; display: block; overflow-x: auto; }
.fma-wa .fma-m-pannello .fma-bottone { min-height: 2.75rem; }
.fma-wa .fma-avviso { margin: 0; }

/* Le tabelle dei moduli presi dal pannello (disponibilità): sul telefono una riga diventa una scheda. */
.fma-wa .fma-m-corpo > * { min-width: 0; max-width: 100%; }
.fma-wa .fma-m-pannello table, .fma-wa .fma-m-pannello tbody, .fma-wa .fma-m-pannello tr, .fma-wa .fma-m-pannello td { display: block; width: 100%; }
.fma-wa .fma-m-pannello table { overflow: visible; border: 0; }
.fma-wa .fma-m-pannello thead { display: none; }
.fma-wa .fma-m-pannello tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.5rem; padding: 0.75rem; margin: 0 0 0.5rem; background: var(--fma-m-carta); border-radius: var(--fma-s-raggio-scheda); }
.fma-wa .fma-m-pannello td { padding: 0; border: 0; }
.fma-wa .fma-m-pannello td:has(select) { grid-column: 1 / -1; }
.fma-wa .fma-m-pannello td:has(input[type="checkbox"])::after { content: " togli"; color: var(--fma-s-tenue); font-size: 0.875rem; }
.fma-wa .fma-m-pannello td:has(input[type="checkbox"]) { display: flex; align-items: center; gap: 0.375rem; min-height: 2.75rem; }
.fma-wa .fma-m-pannello td:has(input[type="checkbox"]) input { width: 1.375rem; height: 1.375rem; }
.fma-wa .fma-m-prossima * { color: inherit; }

/* Disponibilità: un giorno per scheda con l'interruttore, le fasce come pillole da aprire. */
.fma-m-settimana { display: flex; flex-direction: column; gap: 0.625rem; margin: 0; }
.fma-m-dispo-giorno { background: var(--fma-m-carta); border-radius: var(--fma-s-raggio-scheda); padding: 0.75rem 1rem; display: flex; flex-direction: column; gap: 0.5rem; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06); }
.fma-m-dispo-testa { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; min-height: 2.75rem; font-size: 1.0625rem; font-weight: 700; }
.fma-wa .fma-m-interruttore {
	-webkit-appearance: none;
	appearance: none;
	flex: none;
	position: relative;
	width: 3.25rem;
	height: 2rem;
	margin: 0;
	border-radius: 1rem;
	background: var(--fma-s-linea);
	cursor: pointer;
	transition: background-color 0.15s;
}
.fma-wa .fma-m-interruttore::after {
	content: "";
	position: absolute;
	top: 0.1875rem;
	left: 0.1875rem;
	width: 1.625rem;
	height: 1.625rem;
	border-radius: 50%;
	background: var(--fma-m-carta);
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
	transition: transform 0.15s;
}
.fma-wa .fma-m-interruttore:checked { background: var(--fma-s-blu); }
.fma-wa .fma-m-interruttore:checked::after { transform: translateX(1.25rem); }
.fma-wa .fma-m-interruttore:focus-visible { outline: 2px solid var(--fma-s-blu); outline-offset: 2px; }
.fma-m-fasce { display: flex; flex-wrap: wrap; gap: 0.375rem; }
.fma-m-riposo { margin: 0; font-size: 0.9375rem; color: var(--fma-s-tenue); }
.fma-m-dispo-giorno:has(.fma-m-interruttore:checked) .fma-m-riposo,
.fma-m-dispo-giorno:has(.fma-m-interruttore:not(:checked)) .fma-m-fasce { display: none; }
.fma-m-fascia { min-width: 0; }
.fma-m-fascia[open] { flex: 1 1 100%; }
.fma-m-fascia > summary {
	list-style: none;
	display: inline-flex;
	align-items: center;
	min-height: 2.5rem;
	padding: 0.375rem 0.75rem;
	border-radius: var(--fma-s-raggio);
	background: var(--fma-s-tinta);
	color: var(--fma-s-testo);
	font-size: 0.9375rem;
	cursor: pointer;
}
.fma-m-fascia > summary::-webkit-details-marker { display: none; }
.fma-m-fascia[open] > summary { font-weight: 700; }
.fma-m-fascia:has(input[name$="[togli]"]:checked) > summary { text-decoration: line-through; color: var(--fma-s-tenue); }
.fma-m-fascia.fma-m-nuova > summary { background: none; color: var(--fma-s-blu); font-weight: 700; border: 1.5px dashed var(--fma-s-linea); }
.fma-m-fascia-campi { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.625rem; padding: 0.75rem 0 0.25rem; }
.fma-m-fascia-campi label { display: flex; flex-direction: column; gap: 0.25rem; font-size: 0.9375rem; min-width: 0; }
.fma-m-fascia-campi label small { color: var(--fma-s-tenue); }
.fma-m-fascia-campi .fma-m-intero, .fma-m-fascia-campi .fma-m-togli { grid-column: 1 / -1; }
.fma-wa .fma-m-fascia-campi label.fma-m-togli { flex-direction: row; align-items: center; gap: 0.5rem; min-height: 2.75rem; color: var(--fma-m-rosso); }
.fma-wa .fma-m-fascia-campi .fma-m-togli input { width: 1.375rem; height: 1.375rem; margin: 0; }
.fma-wa button.fma-m-togli { justify-self: start; min-height: 2.75rem; padding: 0; border: 0; background: none; color: var(--fma-m-rosso); font-weight: 700; cursor: pointer; }
.fma-wa .fma-m-aggiungi { min-height: 2.5rem; padding: 0.375rem 0.75rem; border: 1.5px dashed var(--fma-s-linea); border-radius: var(--fma-s-raggio); background: none; color: var(--fma-s-blu); font-size: 0.9375rem; font-weight: 700; cursor: pointer; }
.fma-m-dispo-elenco { margin: 0; }
.fma-m-dispo-elenco .fma-m-fascia > summary { white-space: normal; text-align: left; }
.fma-m-dispo-elenco:not(:has(details[open])):not(.fma-m-cambiato) .fma-m-salva { display: none; }
/* Il pulsante della settimana resta a portata di dito quando c'è qualcosa da salvare. */
.fma-m-settimana.fma-m-cambiato .fma-m-salva { position: sticky; bottom: calc(var(--fma-m-barra) + env(safe-area-inset-bottom) + 0.5rem); z-index: 5; }
.fma-m-settimana.fma-m-cambiato .fma-m-salva .fma-bottone { box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18); }

/* 0.28.0: «Ordina per» sopra le liste di Pazienti e Richieste */
.fma-m-ordina { display: flex; align-items: center; gap: 0.5rem; margin: 0.75rem 0; color: var(--fma-s-tenue); font-size: 0.875rem; white-space: nowrap; }
.fma-wa .fma-m-ordina select { flex: 1 1 0; width: auto; min-width: 0; max-width: 100%; min-height: 2.75rem; padding: 0 0.75rem; border: 1px solid var(--fma-s-linea); border-radius: var(--fma-s-raggio); background: var(--fma-m-carta); color: var(--fma-s-testo); font: inherit; font-size: 1rem; }

/* 0.29.0: i luoghi prima del terapeuta vanno a capo, così si vedono tutti */
.fma-wa .fma-m-pillole.fma-m-sedi { flex-wrap: wrap; overflow: visible; margin: 0 0 0.5rem; padding: 0; }

/* Incassa: le altre opzioni di pagamento sotto i metodi principali, a freccia. */
.fma-wa .fma-m-altre { margin: 0.25rem 0 0; }
.fma-wa .fma-m-altre[open] > summary { margin-bottom: 0.5rem; }
.fma-wa .fma-m-altre .fma-m-metodo + .fma-m-metodo { margin-top: 0.5rem; }

/* Sposta: la scelta del Dove sopra il calendario. */
.fma-m-campo-dove { display: flex; flex-direction: column; gap: 6px; margin: 0 0 12px; font-weight: 600; }
.fma-m-campo-dove select { width: 100%; min-height: 48px; font-size: 16px; }
/* «Altre opzioni»: una freccia che dice che si apre. */
.fma-m-apri > summary { list-style: none; }
.fma-m-apri > summary::-webkit-details-marker { display: none; }
.fma-m-apri > summary::before { content: "▸"; display: inline-block; width: 1.1em; transition: transform .15s; }
.fma-m-apri[open] > summary::before { transform: rotate(90deg); }

/* Scheda paziente del terapeuta: un'azione per riga, pulsanti grandi. */
.fma-t-azioni { display: flex; flex-direction: column; align-items: stretch; gap: 10px; margin: 14px 0 0; }
.fma-t-azioni .fma-bottone { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 48px; margin: 0; text-align: center; }
.fma-t-azioni .fma-nota { margin: 0; }
.fma-t-azioni label { display: flex; flex-direction: column; gap: 6px; width: 100%; }
.fma-t-azioni select { width: 100%; min-height: 48px; }

/* Oggi del terapeuta: tre numeri grandi, toccabili, che portano alla loro lista. */
.fma-t-numeri { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 6px 0 16px; }
.fma-t-numero { display: flex; flex-direction: column; gap: 2px; min-height: 76px; padding: 12px; border: 1px solid #e1e5ee; border-radius: 12px; background: #fff; color: inherit; text-decoration: none; }
.fma-t-numero b { font-size: 28px; line-height: 1.1; }
.fma-t-numero span { font-size: 14px; line-height: 1.25; }
.fma-t-numero.fma-t-giallo { background: #fff6e0; border-color: #f0d38a; }
.fma-t-numero.fma-t-rosso { background: #fdecec; border-color: #f1b9b9; }
@media (max-width: 360px) { .fma-t-numeri { grid-template-columns: 1fr; } }


/* La ricerca della scrivania nelle schermate del terapeuta: un bordo solo, quello del riquadro.
   Serve questo peso: la regola dei campi dell'app (.fma-wa .fma-m-corpo input:not(...)) è più forte. */
body.fma-wa .fma-m-corpo .fma-s-cerca input[type="search"]:not([type="radio"]):not([type="checkbox"]) { border: 0; box-shadow: none; background: transparent; }
