/*
 * Restyling Stitch, primo passo: guscio e liste.
 * Spec: docs/superpowers/specs/2026-09-28-restyling-stitch-design.md
 * Caricato dopo style.css: ridisegna solo sidebar, topbar, barra filtri, tabelle e paginatore.
 * Modali e moduli restano sullo stile di prima.
 */

/***** BOF FONT *****/

@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400; font-display: swap; src: url(../fonts/inter-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 500; font-display: swap; src: url(../fonts/inter-latin-500-normal.woff2) format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 600; font-display: swap; src: url(../fonts/inter-latin-600-normal.woff2) format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 700; font-display: swap; src: url(../fonts/inter-latin-700-normal.woff2) format('woff2'); }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 400; font-display: swap; src: url(../fonts/jetbrains-mono-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 500; font-display: swap; src: url(../fonts/jetbrains-mono-latin-500-normal.woff2) format('woff2'); }
/* block e non swap: finche' il font non c'e' meglio un vuoto che il nome dell'icona scritto */
@font-face { font-family: 'Material Symbols Outlined'; font-style: normal; font-weight: 400; font-display: block; src: url(../fonts/material-symbols-outlined-latin-400-normal.woff2) format('woff2'); }

:root {
	--st-red: #e74a3b;
	--st-red-dark: #c8382b;
	--st-crimson: #b1231a;
	--st-bg: #f8f9fa;
	--st-border: #e2e8f0;
	--st-border-soft: #f1f5f9;
	--st-text: #1e293b;
	--st-muted: #64748b;
	--st-faint: #94a3b8;
}

.material-symbols-outlined {
	font-family: 'Material Symbols Outlined';
	font-weight: normal;
	font-style: normal;
	font-size: 20px;
	line-height: 1;
	letter-spacing: normal;
	text-transform: none;
	display: inline-block;
	white-space: nowrap;
	word-wrap: normal;
	direction: ltr;
	font-feature-settings: 'liga';
	-webkit-font-smoothing: antialiased;
	vertical-align: middle;
}

.mono {
	font-family: 'JetBrains Mono', ui-monospace, monospace;
}

.rail, .topbar, .boxTable {
	font-family: 'Inter', system-ui, sans-serif;
	-webkit-font-smoothing: antialiased;
}

/***** EOF FONT *****/

/***** BOF SIDEBAR *****/

/* La striscia e' fissa a sinistra; il contenuto le lascia 64px, o 240px quando e' allargata */
.rail {
	position: fixed;
	top: 0;
	left: 0;
	bottom: 0;
	width: 64px;
	min-width: 0;
	height: auto;
	transform: none;
	transition: width .15s ease;
	background: var(--st-red);
	background-image: none;
	z-index: 1045;
	display: flex;
	flex-direction: column;
	/* Non nasconde: il pulsante apri/chiudi sporge dal bordo destro */
	overflow: visible;
	padding: 0;
}

.rail.open {
	width: 240px;
}

/* Allargata, la sidebar sposta il contenuto: non lo copre mai */
#content {
	margin-left: 64px;
	transition: margin-left .15s ease;
	background: var(--st-bg);
}

.rail.open ~ #content {
	margin-left: 240px;
}

/* Alto quanto la topbar: la riga sotto il logo continua il suo bordo */
.sidebarBrand {
	height: 64px;
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	border-bottom: 1px solid rgba(255, 255, 255, .2);
	padding: 0 8px;
}

.sidebarBrand img {
	max-width: 100%;
	max-height: 48px;
}

/* Stretta: solo "Lilly", reso bianco dal logo rosso del footer; larga: il logo intero */
.sidebarBrand .brandFull, .rail.open .sidebarBrand .brandLilly {
	display: none;
}

.rail.open .sidebarBrand .brandFull {
	display: block;
}

.sidebarBrand .brandLilly {
	width: 40px;
	filter: brightness(0) invert(1);
}

/* Scorre solo l'elenco delle voci: il supporto resta in fondo */
.rail #boxNavBar {
	flex: 1;
	min-height: 0;
	border: 0;
	padding: 12px 8px;
	gap: 6px;
	overflow-x: hidden;
	overflow-y: auto;
	scrollbar-width: none;
}

.rail #supportNoe {
	border-top: 1px solid rgba(255, 255, 255, .2);
	padding: 12px 8px;
	gap: 6px;
	margin-top: 0;
}

.rail .nav-item:last-child {
	margin-bottom: 0;
}

.rail .nav-link {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
	height: 40px;
	padding: 0;
	border-radius: 4px;
	color: rgba(255, 255, 255, .75);
	cursor: pointer;
	white-space: nowrap;
	font-size: 13px;
	font-weight: 500;
	text-decoration: none;
}

/* Allargata: voci allineate a sinistra */
.rail.open .nav-link {
	justify-content: flex-start;
	padding-left: 10px;
}

.rail .nav-link:hover {
	color: #fff;
	background: rgba(255, 255, 255, .1);
}

.rail .nav-link.active {
	color: #fff;
	background: rgba(255, 255, 255, .15);
}

/* Barretta bianca sul bordo della striscia per la voce attiva */
.rail #boxNavBar > .nav-item > .nav-link.active::before {
	content: '';
	position: absolute;
	left: -8px;
	top: 4px;
	bottom: 4px;
	width: 4px;
	border-radius: 0 2px 2px 0;
	background: #fff;
}

.rail .nav-link .material-symbols-outlined {
	font-size: 22px;
	width: 22px;
	flex-shrink: 0;
}

.rail .navLabel {
	display: none;
	overflow: hidden;
	text-overflow: ellipsis;
}

.rail.open .navLabel {
	display: inline;
}

.rail .drugTile {
	flex-shrink: 0;
	text-align: center;
}

.rail.open .drugTile {
	display: none;
}

.rail .drugTile::before {
	content: attr(data-prefix);
	font-family: 'JetBrains Mono', ui-monospace, monospace;
	font-size: 10px;
	font-weight: 500;
	letter-spacing: -.02em;
}

/* Separatore nella striscia, titolo di sezione a sidebar allargata ("Gestione", "Farmaci") */
.rail .navSection {
	height: 1px;
	margin: 8px 8px;
	background: rgba(255, 255, 255, .2);
}

.rail .navSectionFirst {
	display: none;
}

.rail.open .navSection {
	display: block;
	height: auto;
	margin: 12px 4px 4px;
	background: none;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, .7);
}

/* Il farmaco attivo e le sue voci stanno in un gruppo appena piu' chiaro */
.rail #boxNavBar > .nav-item.navGroup {
	padding: 2px 0;
	border-radius: 6px;
	background: rgba(255, 255, 255, .08);
}

/* Voci del farmaco attivo: icone piu' piccole, rientrate quando la sidebar e' allargata */
.rail #subNavBar {
	gap: 2px;
	margin-top: 2px;
}

.rail #subNavBar .nav-link {
	height: 32px;
}

.rail #subNavBar .nav-link .material-symbols-outlined {
	font-size: 18px;
}

.rail.open #subNavBar .nav-link {
	padding-left: 20px;
}

/* Apri/chiudi: tondo a cavallo del bordo destro, sulla riga sotto il logo. Sta nella sidebar
   (1045), quindi sopra la topbar (1000) */
#btSidebarToggle {
	position: absolute;
	top: 52px;
	right: -12px;
	width: 24px;
	height: 24px;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	border: 1px solid var(--st-border);
	border-radius: 50%;
	background: #fff;
	color: var(--st-red);
}

#btSidebarToggle .material-symbols-outlined {
	font-size: 18px;
	transition: transform .15s ease;
}

.rail.open #btSidebarToggle .material-symbols-outlined {
	transform: rotate(180deg);
}

/***** EOF SIDEBAR *****/

/***** BOF TOPBAR *****/

.topbar {
	position: sticky;
	top: 0;
	height: 64px;
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 0 24px;
	background: #fff;
	border-bottom: 1px solid var(--st-border);
	box-shadow: none;
	/* Sopra la barra filtri sticky (99), cosi' il menu del profilo non ci finisce sotto;
	   sotto modali (1050) e sidebar (1045) */
	z-index: 1000;
}

.topbarTitle {
	flex: 1 1 auto;
	min-width: 0;
}

.topbarTitle h1, .topbarTitle p {
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.topbarTitle h1 {
	margin: 0;
	font-size: 20px;
	font-weight: 700;
	line-height: 1.2;
	color: var(--st-crimson);
}

.topbarTitle p {
	margin: 0;
	font-size: 12px;
	line-height: 1.3;
	color: var(--st-muted);
}

/* Non si stringe: i pulsanti non possono, e uscirebbero a destra. Si stringe il titolo, coi puntini */
.topbarActions {
	display: flex;
	flex-shrink: 0;
	align-items: center;
	gap: 12px;
}

/* Tablet con la sidebar allargata: i pulsanti restano a sola icona invece di andare a capo */
@media (min-width: 768px) and (max-width: 1023px) {
	.rail.open ~ #content .topbarActions .btnLabel {
		display: none;
	}
}

.topbarDivider {
	width: 1px;
	height: 32px;
	background: var(--st-border);
}

.btnStitch {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 7px 14px;
	border: 1px solid var(--st-red);
	border-radius: 4px;
	background: var(--st-red);
	color: #fff;
	font-size: 13px;
	font-weight: 600;
	line-height: 1.2;
}

.btnStitch:hover, .btnStitch:focus {
	background: var(--st-red-dark);
	border-color: var(--st-red-dark);
	color: #fff;
}

.btnStitch .material-symbols-outlined {
	font-size: 18px;
}

.btnStitchGhost {
	background: #fff;
	border-color: var(--st-border);
	color: var(--st-text);
}

.btnStitchGhost:hover, .btnStitchGhost:focus {
	background: var(--st-bg);
	border-color: var(--st-faint);
	color: var(--st-text);
}

.topbarUser {
	display: flex;
	align-items: center;
	gap: 10px;
	cursor: pointer;
	text-decoration: none;
	color: var(--st-text);
}

/* E' un link: senza, a:hover di style.css lo sottolinea */
.topbarUser:hover {
	text-decoration: none;
}

.topbarUserText {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	line-height: 1.2;
}

.topbarUserText small {
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: var(--st-faint);
}

.topbarUserText strong {
	font-size: 13px;
	max-width: 220px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.topbarAvatar {
	width: 32px;
	height: 32px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--st-crimson);
	color: #fff;
	font-size: 13px;
	font-weight: 700;
	text-transform: uppercase;
}

.topbarUser > .material-symbols-outlined {
	font-size: 18px;
	color: var(--st-faint);
}

/***** EOF TOPBAR *****/

/***** BOF FILTER BAR *****/

/* I 24px sopra la barra filtri e sotto il piede sono bordi, fuori dall'area che scorre: la barra
   (sticky da style.css) sta in cima all'area fin dall'inizio, quindi scorrendo non si muove e
   sopra non passano righe; il piede sticky sta in fondo e sotto non passano righe */
.boxTable {
	background: var(--st-bg);
	padding: 0 24px;
	border-top: 24px solid var(--st-bg);
	border-bottom: 24px solid var(--st-bg);
	text-align: left !important;
}

#boxBtFilters.filterBar, .boxTable #boxBtFilters {
	top: 0;
}

/* Prima riga: ricerca, "Filtri" e (desktop) paginatore; sotto, a tutta larghezza, le tendine */
#boxBtFilters.filterBar {
	display: flex;
	flex-direction: row;
	flex-wrap: wrap;
	align-items: stretch;
	gap: 12px;
	height: auto;
	min-height: 0;
	margin: 0 0 16px;
	padding: 16px;
	background: #fff;
	border: 1px solid var(--st-border);
	border-radius: 6px;
	box-shadow: 0 1px 2px rgba(0, 0, 0, .05);
}

.filterSearch {
	position: relative;
	display: block;
	flex: 1 1 0;
	min-width: 0;
	margin: 0;
}

.filterToggle {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 0 12px;
	border: 1px solid var(--st-border);
	border-radius: 4px;
	background: #fff;
	font-size: 13px;
	font-weight: 500;
	color: var(--st-text);
}

.filterToggle .material-symbols-outlined {
	font-size: 18px;
}

/* Aperto: pulsante premuto e freccia in su, per richiudere basta ripremerlo */
.filterToggle[aria-expanded="true"] {
	border-color: var(--st-red);
	background: #fff1f2;
	color: var(--st-red);
}

.filterToggle .filterChevron {
	transition: transform .2s;
}

.filterToggle[aria-expanded="true"] .filterChevron {
	transform: rotate(180deg);
}

@media (prefers-reduced-motion: reduce) {
	.filterToggle .filterChevron {
		transition: none;
	}
}

.filterCount {
	min-width: 18px;
	padding: 0 5px;
	border-radius: 9px;
	background: var(--st-red);
	color: #fff;
	font-size: 11px;
	line-height: 18px;
	text-align: center;
}

/* Desktop: "Filtri" chiude le tendine, la ricerca resta */
@media (min-width: 768px) {
	#boxBtFilters.filtersClosed .filterRow {
		display: none;
	}
}

.filterSearch .material-symbols-outlined {
	position: absolute;
	left: 12px;
	top: 50%;
	transform: translateY(-50%);
	color: var(--st-faint);
	pointer-events: none;
}

.filterSearch input {
	width: 100%;
	padding: 8px 16px 8px 40px;
	border: 1px solid var(--st-border);
	border-radius: 4px;
	font-size: 13px;
	color: var(--st-text);
	background: #fff;
}

.filterSearch input:focus, .filterSelect select:focus {
	outline: none;
	border-color: var(--st-red);
	box-shadow: 0 0 0 1px var(--st-red);
}

.filterRow {
	flex-basis: 100%;
	min-width: 0;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding-top: 12px;
	border-top: 1px solid var(--st-border-soft);
}

.filterSelects {
	flex: 1 1 auto;
	min-width: 0;
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 10px;
}

/* Tendina compatta "Regione: Tutte": etichetta fissa, la select mostra solo il valore */
.filterSelect {
	position: relative;
	max-width: 100%;
	min-width: 0;
	display: inline-flex;
	align-items: center;
	margin: 0;
	border: 1px solid var(--st-border);
	border-radius: 4px;
	background: #fff;
	font-size: 13px;
	color: var(--st-muted);
}

.filterSelect:hover {
	border-color: var(--st-faint);
}

.filterSelectLabel {
	padding-left: 12px;
	white-space: nowrap;
}

.filterSelect select {
	appearance: none;
	-webkit-appearance: none;
	border: 0;
	border-radius: 4px;
	background: transparent;
	padding: 6px 30px 6px 4px;
	font-size: 13px;
	color: var(--st-text);
	min-width: 0;
	max-width: 240px;
	text-overflow: ellipsis;
	cursor: pointer;
}

.filterSelect > .material-symbols-outlined {
	position: absolute;
	right: 8px;
	font-size: 18px;
	color: var(--st-faint);
	pointer-events: none;
}

.filterCheck {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin: 0 0 0 4px;
	font-size: 13px;
	color: var(--st-text);
	cursor: pointer;
}

.filterCheck input {
	accent-color: var(--st-red);
}

.filterReset {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	flex-shrink: 0;
	border: 0;
	padding: 0;
	background: none;
	font-size: 13px;
	font-weight: 500;
	color: var(--st-crimson);
}

.filterReset:hover {
	text-decoration: underline;
}

.filterReset .material-symbols-outlined {
	font-size: 16px;
}

/***** EOF FILTER BAR *****/

/***** BOF AVVISI *****/

/* Avvisi sopra la lista (fine CNN, altre info, posti in esaurimento): card chiara col bordo a sinistra.
   Il contenitore prende i 24px della lista, cosi' l'avviso ha gli stessi bordi delle card sotto;
   l'avviso non ha margini propri (i template usano anche .m-0, che e' !important) */
#content > .container {
	max-width: none;
	margin: 0;
	padding: 24px 24px 0;
}

#content .alert-warning, #content .alert-danger {
	margin: 0 !important;
	padding: 14px 18px;
	border: 1px solid;
	border-left-width: 4px;
	border-radius: 6px;
	text-align: left !important;
	font-family: 'Inter', system-ui, sans-serif;
	font-size: 13px;
}

#content .alert-warning {
	background: #fffbeb;
	border-color: #fde68a #fde68a #fde68a #f59e0b;
	color: #78350f;
}

#content .alert-danger {
	background: #fff1f2;
	border-color: #fecdd3 #fecdd3 #fecdd3 var(--st-red);
	color: #881337;
}

#content .alert h4 {
	font-size: 14px;
	font-weight: 700;
	text-align: left !important;
	margin-bottom: 4px;
}

/* Testi scritti dall'owner con l'editor (pausa vacanze, fine CNN): HTML ripulito dal server. Gli a
   capo dei testi scritti prima dell'editor restano righe; le parole lunghe (indirizzi) vanno a capo */
.richText {
	white-space: pre-line;
	overflow-wrap: anywhere;
}

.richText p, .richText ul {
	margin: 0;
}

.richText a {
	color: inherit;
	text-decoration: underline;
}

/* Avvisi sopra la lista (le comunicazioni): un clic li chiude sul titolo e sulla prima riga e li
   riapre (navigation.js). Sul telefono partono chiusi, sul desktop aperti. La freccia e' un'icona
   Material scritta dal CSS */
#content > .container .alert {
	position: relative;
	padding-right: 40px;
	cursor: pointer;
}

#content > .container .alert::after {
	content: 'expand_less';
	position: absolute;
	top: 12px;
	right: 12px;
	font-family: 'Material Symbols Outlined';
	font-size: 20px;
	line-height: 1;
}

/* Chiuso: resta solo il titolo */
#content > .container .alert.alertClosed {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 1;
	overflow: hidden;
}

/* Desktop: la lista scorre nel suo riquadro e la barra di scorrimento (15px su Windows) le toglie
   larghezza a destra. Lo stesso spazio si riserva anche sopra, negli avvisi, cosi' avvisi, filtri e
   tabella finiscono allo stesso punto, con o senza barra */
@media (min-width: 768px) {
	.boxTable, #content > .container {
		scrollbar-gutter: stable;
	}

	/* flex-shrink: con overflow hidden l'avviso, elemento della colonna flex di #content, potrebbe
	   restringersi sotto il suo contenuto e restare tagliato in fondo */
	#content > .container {
		overflow: hidden;
		flex-shrink: 0;
	}
}

#content > .container .alert.alertClosed::after {
	content: 'expand_more';
}

/* Chiuso: il margine in basso lascerebbe vedere l'inizio della riga dopo; lo copre il fondo
   dell'avviso stesso */
#content > .container .alert.alertClosed::before {
	content: '';
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 14px;
	background: inherit;
}

/***** EOF AVVISI *****/

/***** BOF TABLE *****/

/* La tabella e il suo piede stanno in una card; filtri sopra, fuori dalla card */
.boxTable > .table-responsive,
.boxTable .row > .table-responsive,
.boxTable .table-responsive {
	margin: 0 !important;
	background: #fff;
	border: 1px solid var(--st-border);
	border-bottom: 0;
	border-radius: 6px 6px 0 0;
}

/* Piu' larga della card, la tabella scorre dentro la card. style.css la lascia visible (anche per
   id) per l'intestazione sticky, che la barra filtri sticky copre comunque */
#content .boxTable .table-responsive {
	overflow-x: auto;
}

.boxTable table.table {
	margin: 0;
	font-size: 13px;
	color: var(--st-text);
	border-collapse: collapse;
}

.boxTable table.table > :not(caption) > * > * {
	border-bottom: 1px solid var(--st-border-soft);
	border-left: 0;
	border-right: 0;
	padding: 10px 12px;
	background: transparent;
	box-shadow: none;
}

.boxTable table td, .boxTable table th {
	font-size: 13px;
}

.boxTable thead th {
	background: #f8fafc;
	border-bottom: 1px solid var(--st-border) !important;
	font-size: 11px !important;
	font-weight: 700;
	letter-spacing: .06em;
	line-height: 1.3 !important;
	text-transform: uppercase;
	color: var(--st-muted);
	white-space: nowrap;
}

.boxTable tbody tr:hover > td {
	background: rgba(248, 250, 252, .6);
}

/* Codici, date e numeri in JetBrains Mono (classe .mono sulle celle, Task 5); i codici di
   ordine e paziente anche in rosso, grigi quando il paziente e' chiuso */
.boxTable td.mono {
	font-size: 12px;
}

.boxTable td.cellCode {
	font-weight: 500;
	color: var(--st-crimson);
}

.boxTable tr.closeTherapy > td, .boxTable tr.closeTherapy > td.cellCode {
	color: var(--st-faint);
}

/* Ordine anomalo: fondo rosato e barretta rossa a sinistra (la classe .anomaly la mette gia' orders.js) */
.boxTable tr.rowOrdersTable.anomaly > td {
	background: #fff5f5;
	color: var(--st-text) !important;
}

.boxTable tr.rowOrdersTable.anomaly > td:first-child {
	box-shadow: inset 3px 0 0 var(--st-red);
}

/* Riepilogo confezioni per dosaggio sopra gli ordini */
.boxTable #summaryPacksDosagesOrder {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 8px;
	font-size: 13px;
	color: var(--st-muted);
}

.boxTable #summaryPacksDosagesOrder b:first-child {
	font-weight: 400;
}

.boxTable #summaryPacksDosagesOrder .list-group {
	gap: 8px;
}

.boxTable #summaryPacksDosagesOrder .list-group-item {
	padding: 2px 8px;
	border: 1px solid var(--st-border) !important;
	border-radius: 4px !important;
	background: #f1f5f9;
	font-family: 'JetBrains Mono', ui-monospace, monospace;
	font-size: 12px;
	color: var(--st-text);
}

.boxTable #summaryPacksDosagesOrder #totPacksOrders {
	background: #fff1f2;
	border-color: #fecdd3 !important;
	color: var(--st-crimson);
}

.boxTable .ordersSummary {
	margin: 0 0 16px !important;
	padding: 12px 16px;
	background: #fff;
	border: 1px solid var(--st-border);
	border-radius: 6px;
}

.boxTable td .material-symbols-outlined {
	font-size: 16px;
	color: var(--st-faint);
}

/* Bottoni d'azione delle righe: bianchi col bordo, come "Gestisci" nei mockup */
.boxTable tbody .btn-sm {
	padding: 3px 10px !important;
	border: 1px solid #cbd5e1;
	border-radius: 4px;
	background: #fff;
	color: var(--st-text) !important;
	font-size: 12px;
	font-weight: 500;
}

.boxTable tbody .btn-sm:hover {
	background: var(--st-bg);
	border-color: var(--st-faint);
}

.boxTable tbody .btn-sm.disabled {
	background: var(--st-bg);
	border-color: var(--st-border);
	color: var(--st-faint) !important;
}

.boxTable tbody .btn-sm .material-symbols-outlined {
	font-size: 16px;
	color: inherit;
}

/* Chip di stato */
.chip {
	display: inline-flex;
	align-items: center;
	padding: 1px 8px;
	border: 1px solid;
	border-radius: 4px;
	font-size: 11px;
	font-weight: 600;
	line-height: 1.5;
	white-space: nowrap;
}

.chipNeutral { background: #f1f5f9; color: #475569; border-color: #e2e8f0; }
.chipBlue { background: #eff6ff; color: #1d4ed8; border-color: #bfdbfe; }
.chipPurple { background: #faf5ff; color: #7e22ce; border-color: #e9d5ff; }
.chipGreen { background: #ecfdf5; color: #047857; border-color: #a7f3d0; }
.chipTeal { background: #f0fdfa; color: #0f766e; border-color: #99f6e4; }
.chipAmber { background: #fffbeb; color: #b45309; border-color: #fde68a; }
.chipRose { background: #fff1f2; color: #be123c; border-color: #fecdd3; }

/* Ruolo nella lista utenti: a blocco, cosi' il <br> di "Farmacista ospedaliero" va a capo */
.chipRole { display: block; }

/* Configurazione: messaggi su una riga, interi nel title */
#configTable td.cellMessage span, #anomalyOptionsTable td.cellMessage span {
	display: block;
	max-width: 280px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

/***** EOF TABLE *****/

/***** BOF PAGER *****/

.tableFooter {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 12px 16px;
	background: #fff;
	border: 1px solid var(--st-border);
	border-radius: 0 0 6px 6px;
	font-size: 13px;
	color: var(--st-muted);
}

/* Il piede col paginatore resta a vista in fondo all'area che scorre (la lista sul desktop, la
   pagina sul telefono): per cambiare pagina non serve arrivare all'ultima riga */
.boxTable > .tableFooter {
	position: sticky;
	bottom: 0;
	z-index: 2;
	box-shadow: 0 -4px 8px rgba(15, 23, 42, .06);
}

/* Lista vuota: niente tabella sopra, il piede e' una card intera */
.boxTable > .tableFooter:first-child,
.filterBar + .tableFooter {
	border-radius: 6px;
}

.tableFooter .pagination {
	gap: 4px;
}

.tableFooter .page-link {
	min-width: 28px;
	height: 28px;
	padding: 0 6px;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 1px solid var(--st-border);
	border-radius: 4px !important;
	background: #fff;
	color: var(--st-text);
	font-size: 13px;
	box-shadow: none;
}

.tableFooter .page-link:hover {
	background: var(--st-bg);
	color: var(--st-text);
}

.tableFooter .page-item.active .page-link {
	background: var(--st-red);
	border-color: var(--st-red);
	color: #fff;
	font-weight: 600;
}

.tableFooter .page-item.disabled .page-link {
	color: var(--st-faint);
	background: #fff;
}

.tableFooter .page-link.pageGap {
	border-color: transparent;
	min-width: 16px;
}

.tableFooter .page-link .material-symbols-outlined {
	font-size: 18px;
}

/***** EOF PAGER *****/

/***** BOF FOOTER *****/

/* Footer dell'app piu' compatto, stessa struttura (testo legale, poi logo e link in riga).
   Solo quello del guscio: login e registrazione hanno il loro */
#content > footer.footer {
	padding: 8px 24px !important;
	border-top: 1px solid var(--st-border);
	box-shadow: none;
	font-family: 'Inter', system-ui, sans-serif;
	font-size: 10px;
	line-height: 1.4;
	color: var(--st-muted);
}

#content > footer.footer .row {
	padding-top: 6px;
	align-items: center;
}

#content > footer.footer img {
	width: 44px;
}

#content > footer.footer .row > div {
	font-size: 11px;
}

/* Il footer cambia altezza con la larghezza (il testo legale va a capo): la sidebar finisce dove
   comincia il footer e il supporto ne occupa la fascia, cosi' le due righe si continuano */
@media (min-width: 768px) {
	#content > footer.footer {
		anchor-name: --appFooter;
	}

	.rail {
		bottom: anchor(--appFooter top);
	}

	.rail #supportNoe {
		position: fixed;
		top: anchor(--appFooter top);
		bottom: 0;
		left: 0;
		width: inherit;
		justify-content: center;
		background: var(--st-red);
	}
}

/***** EOF FOOTER *****/

/***** BOF RIGHE *****/

/* Caselle di ordine anomalo e utente attivo: sono comandi */
.anomalyOrder .material-symbols-outlined, .disabledUser .material-symbols-outlined {
	font-size: 20px;
	cursor: pointer;
}

.boxTable .anomalyOrder .material-symbols-outlined, .boxTable .disabledUser .material-symbols-outlined {
	color: var(--st-red);
}

/* Note del paziente e anomalia: rosse quando ci sono, grigie quando no */
.boxTable td .material-symbols-outlined.text-danger {
	color: var(--st-red) !important;
}

/* Ordine anomalo: triangolo rosso, apre la gestione dell'anomalia */
.anomalyWarn {
	padding: 0;
	border: 0;
	background: none;
	color: var(--st-red);
	line-height: 1;
	cursor: pointer;
}

/* Solo il triangolo: la clessidra del badge e' un'altra icona Material dentro lo stesso pulsante */
.anomalyWarn > .material-symbols-outlined, .boxTable td .anomalyWarn > .material-symbols-outlined {
	font-size: 30px;
	color: var(--st-red);
}

/* Ordine anomalo con risoluzione programmata: clessidra bianca su fondo rosso a badge sull'angolo del triangolo, il giorno e' nel title del pulsante */
.anomalyWarn {
	position: relative;
}

.anomalyScheduled {
	position: absolute;
	right: -6px;
	bottom: -4px;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: var(--st-red);
	box-shadow: 0 0 0 2px #fff;
	line-height: 1;
}

.anomalyScheduled .material-symbols-outlined, .boxTable td .anomalyScheduled .material-symbols-outlined {
	font-size: 12px;
	line-height: 1;
	color: #fff;
}

/* Colonna Azioni di Ordini: Gestisci e Storico affiancati */
.boxTable tbody .rowActionsCell .btn-sm + .btn-sm {
	margin-left: 6px;
}

/* Azioni a sola icona: il nome sta nel title */
.boxTable tbody .rowActionsCell .btnIcon {
	padding: 3px 7px !important;
	line-height: 1;
	cursor: pointer;
}

.boxTable tbody .rowActionsCell .btnIcon .material-symbols-outlined {
	font-size: 18px;
	vertical-align: middle;
}

/* Utente o farmacista disattivato: grigio, non rosso (style.css) */
.boxTable tbody > tr.disabled > td {
	color: var(--st-faint) !important;
}

/* Codice paziente da controllare (Verzenios): resta evidenziato anche in rosso codici */
.boxTable td.cellCode.checkVRZ, .boxTable td.checkVRZ {
	color: #d97706;
}

.boxTable tbody .btn-sm + .btn-sm {
	margin-left: 4px;
}

/* Bottoni d'azione su una riga, icona accanto al testo */
.boxTable tbody .btn-sm {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	white-space: nowrap;
}

/* Chiudi e Riapri del marketing: rosso e verde come nei mockup */
.boxTable tbody .btn-sm.btn-outline-danger {
	border-color: #fca5a5;
	color: var(--st-red) !important;
}

.boxTable tbody .btn-sm.btn-outline-success {
	border-color: #86efac;
	color: #15803d !important;
}

.boxTable td.cellCode {
	white-space: nowrap;
}

/***** EOF RIGHE *****/

/***** BOF MODALI *****/

/* Modali Bootstrap nello stile delle liste: card chiara, Inter, intestazione e piede sottili */
.modal-content {
	border: 1px solid var(--st-border);
	border-radius: 6px;
	box-shadow: 0 12px 32px rgba(15, 23, 42, .18);
	font-family: 'Inter', system-ui, sans-serif;
	font-size: 13px;
	color: var(--st-text);
	-webkit-font-smoothing: antialiased;
}

.modal-header {
	padding: 14px 20px;
	border-bottom: 1px solid var(--st-border);
}

.modal-header h1, .modal-header h2, .modal-header h3, .modal-header h4, .modal-header h5, .modal-header .modal-title {
	margin: 0;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.35;
	color: var(--st-crimson);
}

.modal-header .btn-close {
	font-size: 12px;
}

.modal-body {
	padding: 20px;
}

.modal-body h2, .modal-body h4, .modal-body h5 {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 14px;
	font-weight: 700;
	color: var(--st-text);
}

.modal-body h2 .material-symbols-outlined, .modal-body h4 .material-symbols-outlined, .modal-body h5 .material-symbols-outlined {
	font-size: 18px;
	color: var(--st-faint);
}

.modal-footer {
	padding: 12px 20px;
	gap: 8px;
	justify-content: flex-end !important;
	background: #f8fafc;
	border-top: 1px solid var(--st-border);
	border-radius: 0 0 6px 6px;
}

.modal-footer > * {
	margin: 0;
}

/* Campi */
.modal .form-label, .modal label {
	font-size: 12px;
	font-weight: 600;
	color: var(--st-muted);
}

.modal .form-control, .modal .form-select, .modal input[type="date"], .modal textarea {
	padding: 7px 10px;
	border: 1px solid var(--st-border);
	border-radius: 4px;
	font-size: 13px;
	color: var(--st-text);
	box-shadow: none;
}

.modal .form-control:focus, .modal .form-select:focus, .modal textarea:focus {
	border-color: var(--st-red);
	box-shadow: 0 0 0 1px var(--st-red);
}

.modal .form-control:disabled, .modal .form-control[readonly], .modal .form-select:disabled {
	background: var(--st-bg);
	color: var(--st-muted);
}

.modal input[type="checkbox"], .modal input[type="radio"] {
	accent-color: var(--st-red);
}

/* Bottoni: l'azione in rosso, il resto bianco col bordo */
.modal .btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 7px 14px;
	border-radius: 4px;
	font-size: 13px;
	font-weight: 600;
	text-transform: none;
	box-shadow: none;
}

.modal .btn .material-symbols-outlined {
	font-size: 18px;
}

.modal .btn-primary, .modal .btn-danger, .modal .btn-success {
	background: var(--st-red);
	border: 1px solid var(--st-red);
	color: #fff;
}

.modal .btn-primary:hover, .modal .btn-danger:hover, .modal .btn-success:hover {
	background: var(--st-red-dark);
	border-color: var(--st-red-dark);
	color: #fff;
}

.modal .btn-light, .modal .btn-secondary, .modal .btn-outline-secondary, .modal .btn-info {
	background: #fff;
	border: 1px solid var(--st-border);
	color: var(--st-text);
}

.modal .btn-light:hover, .modal .btn-secondary:hover, .modal .btn-outline-secondary:hover, .modal .btn-info:hover {
	background: var(--st-bg);
	border-color: var(--st-faint);
	color: var(--st-text);
}

/* Avvisi e tabelle dentro le modali come nelle liste */
.modal .alert-warning, .modal .alert-danger {
	margin-bottom: 16px !important;
	padding: 12px 16px;
	border: 1px solid;
	border-left-width: 4px;
	border-radius: 6px;
	text-align: left !important;
	font-size: 13px;
}

.modal .alert-warning {
	background: #fffbeb;
	border-color: #fde68a #fde68a #fde68a #f59e0b;
	color: #78350f;
}

.modal .alert-danger {
	background: #fff1f2;
	border-color: #fecdd3 #fecdd3 #fecdd3 var(--st-red);
	color: #881337;
}

.modal .alert h4 {
	justify-content: flex-start;
	font-size: 14px;
	text-align: left !important;
}

#boxTablePatientOrders {
	border: 1px solid var(--st-border);
	border-radius: 6px;
}

#boxTablePatientOrders table {
	font-size: 13px;
}

#boxTablePatientOrders thead th {
	background: #f8fafc;
	border-bottom: 1px solid var(--st-border);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: var(--st-muted);
}

#boxTablePatientOrders td {
	border-bottom: 1px solid var(--st-border-soft);
}

.modal .table td .material-symbols-outlined {
	font-size: 16px;
	color: var(--st-faint);
}

/***** EOF MODALI *****/

/***** BOF DIALOGHI *****/

/* Conferme e avvisi di dialog.js: stessa card delle modali, bottoni a destra */
.dialog-background {
	background: rgba(15, 23, 42, .4);
}

.dialog {
	width: 380px;
	left: calc(50vw - 190px);
	border: 1px solid var(--st-border);
	border-radius: 6px;
	box-shadow: 0 12px 32px rgba(15, 23, 42, .18);
	text-align: left;
	font-family: 'Inter', system-ui, sans-serif;
	color: var(--st-text);
	animation: none;
	-webkit-font-smoothing: antialiased;
}

.dialog-title {
	padding: 16px 20px 0;
	font-size: 15px;
	font-weight: 700;
	color: var(--st-crimson);
}

.dialog-message {
	padding: 10px 20px 18px;
	font-size: 13px;
	line-height: 1.5;
}

.dialog-buttons {
	justify-content: flex-end;
	gap: 8px;
	padding: 12px 20px;
	background: #f8fafc;
	border-top: 1px solid var(--st-border);
	border-radius: 0 0 6px 6px;
}

.dialog-button {
	flex: 0 0 auto;
	padding: 6px 14px;
	border: 1px solid var(--st-border);
	border-radius: 4px;
	background: #fff;
	font-size: 13px;
	font-weight: 600;
}

.dialog-button:hover {
	background: var(--st-bg);
}

/* L'ultimo bottone e' l'azione (OK, Chiudi, Riapri...) */
.dialog-button:last-child {
	background: var(--st-red);
	border-color: var(--st-red);
	color: #fff;
}

.dialog-button:last-child:hover {
	background: var(--st-red-dark);
}

/***** EOF DIALOGHI *****/

/***** BOF CENTRI E STRUTTURE *****/

/* Linguette Centri / Strutture della gestione: sottolineate in rosso, come un filtro sopra la lista */
.mgmtTabs {
	display: flex;
	gap: 4px;
	margin: 0;
	border-bottom: 1px solid var(--st-border);
}

/* Le linguette stanno sopra la lista, fuori da quella che scorre: 16px fino alla barra filtri */
.mgmtTabsBox + .boxTable {
	border-top-width: 16px;
}

.mgmtTab {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin-bottom: -1px;
	padding: 8px 14px;
	border: 0;
	border-bottom: 2px solid transparent;
	background: none;
	font-size: 13px;
	font-weight: 600;
	color: var(--st-muted);
}

.mgmtTab:hover {
	color: var(--st-text);
}

.mgmtTab.active {
	border-bottom-color: var(--st-red);
	color: var(--st-crimson);
}

.mgmtTab .material-symbols-outlined {
	font-size: 18px;
}

/***** EOF CENTRI E STRUTTURE *****/

/***** BOF ACCESSO *****/

/* Login, richiesta account, esiti di Lilly Passport: card centrata sullo sfondo chiaro
   dell'app, footer compatto sotto a tutta larghezza (#main e' una riga flex: la pagina la occupa tutta) */
.authPage {
	flex: 1 1 100%;
	min-width: 0;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	align-items: center;
	padding: 56px 16px 0;
	background: var(--st-bg);
	border-top: 4px solid var(--st-red);
	font-family: 'Inter', system-ui, sans-serif;
	color: var(--st-text);
	-webkit-font-smoothing: antialiased;
}

.authCard {
	width: 100%;
	max-width: 420px;
	padding: 32px;
	background: #fff;
	border: 1px solid var(--st-border);
	border-radius: 6px;
	box-shadow: 0 1px 2px rgba(0, 0, 0, .05);
	text-align: center;
}

.authCard {
	margin-bottom: 56px;
}

.authCardWide {
	max-width: 560px;
}

.authLogo {
	display: block;
	width: 240px;
	max-width: 100%;
	margin: 0 auto 24px;
}

.authTitle {
	margin: 0 0 8px;
	font-size: 18px;
	font-weight: 700;
	color: var(--st-crimson);
}

.authLead {
	margin: 0 0 24px;
	font-size: 13px;
	color: var(--st-muted);
}

.authAction {
	width: 100%;
	justify-content: center;
	padding: 10px 14px;
	cursor: pointer;
}

.authLinks {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin-top: 24px;
	padding-top: 16px;
	border-top: 1px solid var(--st-border-soft);
	font-size: 13px;
}

/* Specificita' pari a quella di Bootstrap per a:not([href]), che li renderebbe neri */
.authPage .authLinks a {
	color: var(--st-crimson);
	text-decoration: none;
	cursor: pointer;
}

.authLinks a:hover {
	text-decoration: underline;
}

.authForm {
	display: flex;
	flex-direction: column;
	gap: 6px;
	text-align: left;
}

.authForm .form-label {
	margin: 10px 0 0;
	font-size: 12px;
	font-weight: 600;
	color: var(--st-muted);
}

.authForm .form-control, .authForm .form-select {
	padding: 8px 10px;
	border: 1px solid var(--st-border);
	border-radius: 4px;
	font-size: 13px;
	color: var(--st-text);
	box-shadow: none;
}

.authForm .form-control:focus, .authForm .form-select:focus {
	border-color: var(--st-red);
	box-shadow: 0 0 0 1px var(--st-red);
}

.authForm .form-select:disabled {
	background-color: var(--st-bg);
	color: var(--st-faint);
}

.authForm .authAction {
	margin-top: 20px;
}

/* Il consenso privacy e' lungo: riquadro che scorre, testo intero */
.authConsent {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	max-height: 180px;
	margin-top: 16px;
	padding: 12px;
	overflow-y: auto;
	background: var(--st-bg);
	border: 1px solid var(--st-border);
	border-radius: 4px;
}

.authConsent input {
	flex-shrink: 0;
	margin-top: 3px;
	accent-color: var(--st-red);
}

.authConsent label {
	margin: 0;
	font-size: 11px;
	font-weight: 400;
	line-height: 1.5;
	color: var(--st-muted);
}

.authConsent a {
	color: var(--st-crimson);
}

/* Footer delle pagine di accesso: stessa struttura, compatto, sotto la card */
.authPage > .footer {
	position: static;
	align-self: stretch;
	width: auto;
	margin: auto -16px 0;
	padding: 16px 24px !important;
	background: #fff;
	border-top: 1px solid var(--st-border);
	box-shadow: none;
	font-size: 10px;
	line-height: 1.5;
	color: var(--st-muted);
}

.authPage > .footer .row {
	padding-top: 8px;
	align-items: center;
}

.authPage > .footer .row > div {
	font-size: 11px;
}

.authPage > .footer img {
	width: 44px;
}

/***** EOF ACCESSO *****/

/***** BOF TELEFONO *****/

/* Sotto 768px. In fondo al file: deve valere su tutte le regole sopra */

/* Colonna Azioni: con piu' di un'azione per riga, solo ⋮ e le azioni (col loro nome) in un menu,
   anche sul desktop per recuperare spazio (Marco, 02/10). Il menu lo posiziona navigation.js: la
   card della tabella scorre e lo taglierebbe. Fuori dal menu le azioni sono a sola icona */
.rowActionLabel, .boxTable tbody .rowMenuOnly {
	display: none;
}

.rowMenuToggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: none;
	color: var(--st-muted);
}

.rowMenuToggle:hover, .rowMenuToggle[aria-expanded="true"] {
	background: var(--st-bg);
}

.rowActions {
	display: none;
}

.rowActions.open {
	position: fixed;
	z-index: 1040;
	display: flex;
	flex-direction: column;
	min-width: 180px;
	padding: 4px;
	background: #fff;
	border: 1px solid var(--st-border);
	border-radius: 6px;
	box-shadow: 0 8px 24px rgba(15, 23, 42, .15);
}

.boxTable tbody .rowActions .rowActionLabel, .boxTable tbody .rowActions .rowMenuOnly {
	display: inline;
}

/* Voci del menu: solo il nome, in testo normale (Marco, 02/10) */
.boxTable tbody .rowActions .btn-sm {
	display: flex;
	justify-content: flex-start;
	margin: 0;
	padding: 10px 12px !important;
	border: 0;
	font-size: 14px;
	font-weight: 400;
	text-align: left;
}

.boxTable tbody .rowActions .btn-sm .material-symbols-outlined {
	display: none;
}

@media (max-width: 767px) {
	/* La pagina scorre intera: il contenuto non e' alto quanto lo schermo, il footer va in fondo
	   alla lista invece di starle fisso sopra, e la barra filtri scorre con la pagina */
	/* min-width: senza overflow nascosto l'elemento flex si allargherebbe quanto la tabella */
	#content {
		min-width: 0;
		height: auto;
		min-height: 100vh;
		overflow: visible;
	}

	.boxTable {
		height: auto !important;
		overflow: visible;
	}

	#content > footer.footer, #boxBtFilters.filterBar {
		position: static;
	}

	/* Topbar: titolo, pulsanti a sola icona e avatar */
	.topbar {
		padding: 0 12px;
	}

	.topbarTitle p, .topbarUserText, .topbarDivider, .topbarActions .btnLabel {
		display: none;
	}

	/* Sidebar allargata: copre il contenuto invece di spostarlo, con un velo che la chiude */
	.rail.open ~ #content {
		margin-left: 64px;
	}

	.rail.open ~ #content::before {
		content: '';
		position: fixed;
		inset: 0;
		z-index: 1044;
		background: rgba(0, 0, 0, .4);
	}

	/* Qui scorre la pagina intera, non la lista: il piede col paginatore deve restare in fondo allo
	   schermo. overflow-x: hidden inline sul body (index.html) fa di overflow-y un auto: il body
	   diventa un'area di scorrimento che non scorre mai, e il piede sticky resta attaccato a lei.
	   Il taglio orizzontale lo fa gia' html, che passa il suo overflow alla finestra */
	body {
		overflow-x: visible !important;
	}

	/* Filtri: la ricerca resta a vista, il resto si apre da "Filtri", una tendina per riga */
	/* min-width (regola generale): una tendina e' larga quanto la sua opzione piu' lunga (nomi di
	   centri e strutture), e senza il pannello la seguirebbe fuori dalla card */
	.filterRow {
		flex-direction: column;
		align-items: stretch;
	}

	#boxBtFilters:not(.filtersOpen) .filterRow {
		display: none;
	}

	.filterSelects {
		flex-direction: column;
		align-items: stretch;
	}

	.filterSelect select {
		flex: 1 1 auto;
		max-width: none;
	}

	.filterReset {
		align-self: flex-start;
	}

	/* Riepilogo confezioni: i dosaggi uno sotto l'altro col totale in fondo, "Cambia data
	   spedizioni" sotto (le utility Bootstrap del contenitore sono !important) */
	.boxTable .ordersSummary {
		flex-direction: column;
		align-items: stretch !important;
		gap: 12px;
	}

	/* Chiuso mostra solo il totale; si apre toccandolo (navigation.js), come gli avvisi.
	   height: style.css lo fissa a 60px, e in colonna ne uscirebbe sotto il pulsante */
	.boxTable #summaryPacksDosagesOrder {
		position: relative;
		height: auto;
		padding-right: 28px;
		cursor: pointer;
	}

	.boxTable #summaryPacksDosagesOrder .list-group {
		flex-direction: column;
		width: 100%;
	}

	.boxTable #summaryPacksDosagesOrder::after {
		content: 'expand_more';
		position: absolute;
		top: 0;
		right: 0;
		font-family: 'Material Symbols Outlined';
		font-size: 20px;
		line-height: 1;
	}

	.boxTable #summaryPacksDosagesOrder:not(.summaryOpen) .countPacksDosageOrders {
		display: none;
	}

	.boxTable #summaryPacksDosagesOrder.summaryOpen::after {
		content: 'expand_less';
	}

	/* Tabelle: celle su una riga (la tabella scorre gia' nella card); stretta al 100% le colonne
	   andavano a capo a ogni parola. I nomi di centri e strutture su al massimo due righe, interi
	   nel title */
	.boxTable table th, .boxTable table td {
		white-space: nowrap;
	}

	.boxTable table td.cellName {
		min-width: 180px;
		white-space: normal;
	}

	.boxTable td.cellName > span {
		display: -webkit-box;
		-webkit-box-orient: vertical;
		-webkit-line-clamp: 2;
		overflow: hidden;
	}

	/* Colonna Azioni in fondo alla riga, stretta; le azioni singole mostrano anche il nome */
	.boxTable .phoneHidden {
		display: none;
	}

	.boxTable tbody .rowActionsCell {
		padding: 0 4px !important;
	}

	.rowActionLabel {
		display: inline;
	}
}

/***** EOF TELEFONO *****/

/* Voce 5: modale anomalia */
.anomalyOrderState {
	display: inline-block;
	margin-left: 8px;
	padding: 2px 8px;
	border-radius: 20px;
	font-size: 11px;
	font-weight: 600;
	vertical-align: middle;
	color: var(--st-muted);
	background: var(--st-border-soft);
}

.anomalyOrderState.open {
	color: var(--st-crimson);
	background: #fdecea;
}

.anomalyOrderInfo {
	display: grid;
	grid-template-columns: max-content 1fr;
	gap: 6px 16px;
	margin: 0 0 20px;
}

.anomalyOrderInfo dt {
	color: var(--st-muted);
	font-weight: 500;
}

.anomalyOrderInfo dd {
	margin: 0;
	overflow-wrap: anywhere;
}

.anomalyOrderMuted {
	color: var(--st-muted);
}

.anomalyOrderMissing {
	color: var(--st-crimson);
}

.anomalyOrderReason, .anomalyOrderHistory .text {
	white-space: pre-line;
	overflow-wrap: anywhere;
}

.anomalyOrderHistory {
	list-style: none;
	padding: 0;
	margin: 0 0 20px;
}

.anomalyOrderHistory li {
	padding: 8px 0 8px 12px;
	border-left: 2px solid var(--st-border);
}

.anomalyOrderHistory li.ev-aperta, .anomalyOrderHistory li.ev-riaperta, .anomalyOrderHistory li.ev-annullata {
	border-left-color: var(--st-red);
}

.anomalyOrderHistory li.ev-sbloccata {
	border-left-color: #16a34a;
}

.anomalyOrderHistory .meta {
	color: var(--st-muted);
	font-size: 12px;
}

.anomalyOrderHistory .text {
	margin-top: 2px;
}

.anomalyOrderError {
	color: var(--st-crimson);
	margin-top: 8px;
}

.anomalyOrderError:empty {
	display: none;
}

.modal .btn.anomalyOrderDanger {
	color: var(--st-crimson);
	margin-right: auto !important;
}

@media (max-width: 575px) {
	.anomalyOrderInfo {
		grid-template-columns: 1fr;
		gap: 0;
	}

	.anomalyOrderInfo dd {
		margin-bottom: 8px;
	}

	.anomalyOrderModal .modal-footer {
		flex-wrap: wrap;
	}

	.anomalyOrderModal .modal-footer > .btn {
		flex: 1 1 auto;
	}
}
