/*
 * HomeMed – tema grafico dell'area referti (14/11/2026).
 * Allinea l'area referti al sito www.homemed.it: caratteri Exo e PT Sans,
 * palette del manuale d'immagine, pulsanti a pillola, schede arrotondate.
 * Si carica dopo gli altri fogli di stile e non cambia il funzionamento delle pagine.
 */
@font-face { font-family: 'Exo'; font-style: normal; font-weight: 100 900; font-display: swap; src: url('/wp-content/themes/homemed/assets/fonts/exo-latin-variable.woff2') format('woff2'); }
@font-face { font-family: 'PT Sans'; font-style: normal; font-weight: 400; font-display: swap; src: url('/wp-content/themes/homemed/assets/fonts/pt-sans-latin-400.woff2') format('woff2'); }
@font-face { font-family: 'PT Sans'; font-style: normal; font-weight: 700; font-display: swap; src: url('/wp-content/themes/homemed/assets/fonts/pt-sans-latin-700.woff2') format('woff2'); }
:root { --hm-blu: #18216d; --hm-blu-scuro: #10175a; --hm-ciano: #00afdf; --hm-rosso: #ee3753; --hm-rosso-scuro: #d42a46; --hm-testo: #4d5160; --hm-bordo: #e3e6ee; --hm-ciano-chiaro: #e5f6fc; --hm-sfondo: #f5f7fb; --hm-link: #007aa3; --hm-titoli: 'Exo', Helvetica, Arial, sans-serif; --hm-testi: 'PT Sans', Helvetica, Arial, sans-serif; --hm-ombra: 0 2px 5px -1px rgba(24, 33, 109, 0.14), 0 1px 3px -1px rgba(0, 0, 0, 0.12); --hm-raggio: 18px; }
html, body { background: var(--hm-sfondo); }
body { color: var(--hm-testo); font-family: var(--hm-testi); font-size: 17px; line-height: 1.6; }
body [style*="font-family"] { font-family: var(--hm-testi) !important; }
h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 { color: var(--hm-blu); font-family: var(--hm-titoli); font-weight: 700; }
a { color: var(--hm-link); }
a:hover { color: var(--hm-blu); }
b, strong { color: var(--hm-blu); }
.navbar.header, nav.navbar.bg-light { background: #ffffff !important; border-bottom: 1px solid var(--hm-bordo); box-shadow: 0 1px 0 rgba(24, 33, 109, 0.04); padding: 12px 24px; }
.navbar.header .navbar-brand img { height: 44px !important; width: auto; }
.navbar .nav-link, .navbar .navbar-nav a { color: var(--hm-blu) !important; font-family: var(--hm-titoli); font-weight: 600; }
.navbar .nav-link:hover, .navbar .navbar-nav a:hover { color: var(--hm-link) !important; }
.hm-torna-sito { margin-left: auto; color: var(--hm-blu) !important; font-family: var(--hm-titoli); font-size: 16px; font-weight: 600; text-decoration: none; }
.hm-torna-sito:hover { color: var(--hm-link) !important; }
.main { padding-top: 24px; }
.container-fluid > .main > .col-12 { max-width: 1180px; margin: 0 auto; }
.card { border: 1px solid var(--hm-bordo); border-radius: var(--hm-raggio); box-shadow: var(--hm-ombra); overflow: hidden; }
.card-header { background: var(--hm-blu); border-bottom: 0; color: #ffffff; font-family: var(--hm-titoli); font-size: 20px; font-weight: 700; padding: 16px 24px; }
.card-body, .card-body.bg-moltochiaro { background: #ffffff !important; padding: 24px; }
.form-control, .custom-select { min-height: 46px; border: 1px solid #cfd5e3; border-radius: 12px; color: var(--hm-blu); font-size: 17px; }
.form-control:focus { border-color: var(--hm-ciano); box-shadow: 0 0 0 3px rgba(0, 175, 223, 0.2); }
.input-group > .form-control { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.input-group .btn-default, .input-group-btn .btn { min-height: 46px; border: 1px solid #cfd5e3; border-left: 0; border-radius: 0 12px 12px 0; background: #ffffff; color: var(--hm-blu); }
label, .control-label { color: var(--hm-blu); font-family: var(--hm-titoli); font-weight: 600; }
.control-label { text-transform: capitalize; }
.btn { border-radius: 999px; font-family: var(--hm-titoli); font-weight: 700; padding: 10px 24px; }
.btn-primary, input[type="submit"].btn-primary { min-height: 50px; background: var(--hm-rosso); border-color: var(--hm-rosso); color: #ffffff; font-size: 18px; text-transform: capitalize; }
.btn-primary:hover, .btn-primary:focus, .btn-primary:not(:disabled):not(.disabled):active { background: var(--hm-rosso-scuro); border-color: var(--hm-rosso-scuro); box-shadow: none; }
.btn-secondary, .btn-info { background: var(--hm-blu); border-color: var(--hm-blu); color: #ffffff; }
.btn-secondary:hover, .btn-info:hover { background: var(--hm-blu-scuro); border-color: var(--hm-blu-scuro); }
.btn-outline-primary { border: 2px solid var(--hm-blu); color: var(--hm-blu); }
.btn-outline-primary:hover { background: var(--hm-ciano-chiaro); color: var(--hm-blu); }
a[href*="registrazione"] > div[style] { display: inline-flex !important; align-items: center; justify-content: center; width: auto !important; min-height: 50px; padding: 0 28px !important; border: 2px solid var(--hm-blu) !important; border-radius: 999px !important; background: var(--hm-blu) !important; font-family: var(--hm-titoli); font-weight: 700; letter-spacing: 0.02em; }
a[href*="registrazione"]:hover > div[style] { background: var(--hm-blu-scuro) !important; }
.table { background: #ffffff; border-radius: 12px; color: var(--hm-testo); }
.table thead th { border-bottom: 2px solid var(--hm-bordo); color: var(--hm-blu); font-family: var(--hm-titoli); font-weight: 700; }
.table td, .table th { border-top: 1px solid var(--hm-bordo); vertical-align: middle; }
.table-hover tbody tr:hover { background: var(--hm-ciano-chiaro); }
.alert { border: 0; border-radius: 14px; }
.alert-info { background: var(--hm-ciano-chiaro); color: var(--hm-blu); }
.alert-danger { background: #fde4e8; color: #8a1c2e; }
.hm-footer-referti { margin: auto -15px 0; padding: 28px 24px; background: var(--hm-blu); color: #c9cde6; font-size: 15px; text-align: center; }
.hm-footer-referti a { color: #ffffff; text-decoration: none; }
.hm-footer-referti a:hover { color: var(--hm-ciano); }
.hm-footer-referti p { margin: 4px 0; }
.hm-footer-referti strong { color: #ffffff; font-family: var(--hm-titoli); }
@media (max-width: 767px) { body { font-size: 16px; } .navbar.header { padding: 10px 16px; } .card-body { padding: 18px; } }

/* Correzioni di impaginazione (altezze fisse di Bootstrap, colonne strette) */
html, body { height: auto !important; overflow-x: hidden; }
.container-fluid.h-100 { height: auto !important; min-height: 100vh; }
.main.h-100, .main.h-90, .main.h-10, .h-90, .h-10 { height: auto !important; }
.card .form-group.row > .control-label { flex: 0 0 110px; max-width: 110px; padding-top: 10px; }
.card .form-group.row > .col-sm-10 { flex: 1 1 0; max-width: none; }
/* Pagina di accesso: benvenuto in una scheda centrata, poi il modulo */
.main.h-10 { justify-content: center; margin: 8px 0 0; }
.main.h-10 > div:nth-child(3) { display: none; }
.main.h-10 > div:nth-child(2) { order: 1; flex: 0 0 100%; max-width: 720px; margin: 0 auto 20px; padding: 26px 30px; background: #ffffff; border: 1px solid var(--hm-bordo); border-radius: var(--hm-raggio); box-shadow: var(--hm-ombra); }
.main.h-10 > div:nth-child(2) > br:nth-child(-n+2) { display: none; }
.main.h-10 > div:nth-child(2)::before { content: 'Area personale'; display: block; margin-bottom: 10px; color: var(--hm-blu); font-family: var(--hm-titoli); font-size: 30px; font-weight: 700; line-height: 1.2; }
.main.h-10 > div:nth-child(1) { order: 2; flex: 0 0 100%; max-width: 720px; margin: 0 auto 8px; text-align: center; }
.main.h-10 > div:nth-child(1) br { display: none; }
@media (min-width: 768px) { .main.h-90 .col-md-6 { flex: 0 0 100%; max-width: 560px; } }

.container-fluid > .main { margin-bottom: 48px; }

.form-group.row > label::first-letter { text-transform: uppercase; }

/* Pagina di accesso come la home: fascia blu sfumata (stile Stripe), benvenuto a sinistra e login a destra */
.main.h-100:has(.main.h-10) {
	position: relative;
	margin: 0 -15px;
	padding: 56px 24px 150px;
	background-color: var(--hm-blu);
	background-image:
		radial-gradient(circle at 88% 18%, rgba(0, 175, 223, 0.95) 0%, rgba(0, 175, 223, 0) 42%),
		radial-gradient(circle at 70% 78%, rgba(168, 150, 200, 0.8) 0%, rgba(168, 150, 200, 0) 38%),
		radial-gradient(circle at 102% 62%, rgba(39, 165, 178, 0.85) 0%, rgba(39, 165, 178, 0) 34%),
		radial-gradient(circle at 48% 40%, rgba(163, 217, 214, 0.28) 0%, rgba(163, 217, 214, 0) 30%);
}
.main.h-100:has(.main.h-10)::after {
	content: '';
	position: absolute;
	left: 0;
	right: 0;
	bottom: -1px;
	height: 110px;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 170' preserveAspectRatio='none'%3E%3Cpath d='M0,20 C420,210 1000,200 1440,10 L1440,170 L0,170 Z' fill='%23f5f7fb'/%3E%3Cpath d='M0,20 C420,210 1000,200 1440,10' fill='none' stroke='%23ee3753' stroke-width='6' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
	pointer-events: none;
}
.main.h-100:has(.main.h-10) > .col-12 {
	position: relative;
	z-index: 1;
	display: grid;
	grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
	gap: 48px;
	align-items: center;
	max-width: 1180px;
	margin: 0 auto;
}
.main.h-100:has(.main.h-10) .main.h-10 { grid-column: 1; margin: 0; padding: 0; }
.main.h-100:has(.main.h-10) .main.h-90 { grid-column: 2; margin: 0; padding: 0; }
.main.h-100:has(.main.h-10) .main.h-90 > .col-12,
.main.h-100:has(.main.h-10) .main.h-90 .col-md-6 { flex: 0 0 100%; max-width: 100%; padding: 0; }
.main.h-100:has(.main.h-10) .main.h-90 .mb-4 { margin: 0 !important; }
.main.h-100:has(.main.h-10) .main.h-10 > div:nth-child(2) {
	max-width: none;
	margin: 0 0 22px;
	padding: 0;
	background: transparent;
	border: 0;
	box-shadow: none;
	color: #e6e9f6;
	font-size: 18px;
}
.main.h-100:has(.main.h-10) .main.h-10 > div:nth-child(2)::before {
	color: #ffffff;
	font-size: 52px;
	margin-bottom: 16px;
}
.main.h-100:has(.main.h-10) .main.h-10 > div:nth-child(2) b { color: #ffffff; }
.main.h-100:has(.main.h-10) .main.h-10 a { color: #ffffff; text-decoration: underline; text-underline-offset: 3px; }
.main.h-100:has(.main.h-10) .main.h-10 > div:nth-child(1) { max-width: none; margin: 0; text-align: left; }
.main.h-100:has(.main.h-10) a[href*="registrazione"] > div[style] { background: transparent !important; border-color: #ffffff !important; margin: 0 !important; }
.main.h-100:has(.main.h-10) a[href*="registrazione"]:hover > div[style] { background: rgba(255, 255, 255, 0.12) !important; }
.main.h-100:has(.main.h-10) .card { box-shadow: 0 30px 60px -12px rgba(24, 33, 109, 0.35), 0 18px 36px -18px rgba(0, 0, 0, 0.3); border: 0; }
@media (max-width: 991px) {
	.main.h-100:has(.main.h-10) { padding: 32px 16px 110px; }
	.main.h-100:has(.main.h-10) > .col-12 { grid-template-columns: 1fr; gap: 28px; }
	.main.h-100:has(.main.h-10) .main.h-10,
	.main.h-100:has(.main.h-10) .main.h-90 { grid-column: 1; }
	.main.h-100:has(.main.h-10) .main.h-10 > div:nth-child(2)::before { font-size: 36px; }
}

/* Pagina personale (dopo l'accesso): fascia sfumata in alto con il nome, elenco referti in una scheda bianca */
.main.h-100:has(.info-paziente) { position: relative; margin: 0 -15px; padding: 48px 24px 64px; background: transparent; }
.main.h-100:has(.info-paziente)::before {
	content: '';
	position: absolute;
	left: 0; right: 0; top: 0;
	height: 300px;
	background-color: var(--hm-blu);
	background-image:
		radial-gradient(circle at 88% 18%, rgba(0, 175, 223, 0.95) 0%, rgba(0, 175, 223, 0) 42%),
		radial-gradient(circle at 70% 78%, rgba(168, 150, 200, 0.8) 0%, rgba(168, 150, 200, 0) 38%),
		radial-gradient(circle at 102% 62%, rgba(39, 165, 178, 0.85) 0%, rgba(39, 165, 178, 0) 34%),
		radial-gradient(circle at 48% 40%, rgba(163, 217, 214, 0.28) 0%, rgba(163, 217, 214, 0) 30%);
}
.main.h-100:has(.info-paziente) > .col-12 { position: relative; z-index: 1; }
.main.h-100:has(.info-paziente) > .col-12::before {
	content: 'I miei referti';
	display: block;
	color: var(--hm-ciano);
	font-family: var(--hm-titoli);
	font-size: 15px;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	margin-bottom: 6px;
}
.info-paziente {
	padding: 0 0 28px !important;
	border: 0 !important;
	background: transparent !important;
	color: #ffffff !important;
	font-family: var(--hm-titoli);
	font-size: 34px;
	font-weight: 700;
	line-height: 1.2;
}
.info-paziente .btn-link, .info-paziente i { color: #ffffff !important; font-size: 24px; }
.table-container {
	background: #ffffff;
	border-radius: var(--hm-raggio);
	box-shadow: 0 30px 60px -12px rgba(24, 33, 109, 0.35), 0 18px 36px -18px rgba(0, 0, 0, 0.3);
	padding: 10px 14px;
	overflow-x: auto;
}
.table-container .table { margin: 0; font-size: 16px; }
.table-container .table.font10, .table-container .table.font10 td, .table-container .table.font10 th { font-size: 16px !important; }
.table-container .table th, .table-container .table thead th, .table-container .table tr:first-child th {
	background: transparent !important;
	border-top: 0;
	border-bottom: 2px solid var(--hm-bordo);
	color: var(--hm-blu) !important;
	font-family: var(--hm-titoli);
	font-size: 14px !important;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	padding: 14px 12px;
}
.table-container .table td { padding: 14px 12px; color: var(--hm-testo); background: transparent !important; }
.table-container .table tbody tr:nth-child(even) td { background: var(--hm-sfondo) !important; }
.table-container .table tbody tr:hover td { background: var(--hm-ciano-chiaro) !important; }
.table-container .table td i.fas { color: var(--hm-link); font-size: 20px; }
.table-container .table td a:hover i.fas, .table-container .table td .btn-link:hover i.fas { color: var(--hm-rosso); }
.table-container .table td .btn-link, .table-container .table td a { color: var(--hm-link); font-family: var(--hm-titoli); font-weight: 600; text-decoration: none; }
/* Testata dopo l'accesso: utente, cambio password, esci */
.navbar .user .username { color: var(--hm-testo); font-size: 14px; }
.navbar .user .userlink { color: var(--hm-blu) !important; font-family: var(--hm-titoli); font-size: 15px; font-weight: 600; text-decoration: none; }
.navbar .user .userlink:hover { color: var(--hm-link) !important; }
.navbar .user .userlink-separator { display: inline-block; width: 1px; height: 16px; margin: 0 10px; background: var(--hm-bordo); color: transparent; overflow: hidden; vertical-align: middle; }
.navbar .navbar-nav.mr-auto .nav-link { margin-left: 18px; font-size: 16px; }
@media (max-width: 767px) {
	.main.h-100:has(.info-paziente) { padding: 32px 12px 48px; }
	.main.h-100:has(.info-paziente)::before { height: 240px; }
	.info-paziente { font-size: 24px; }
}

.table-container .table thead tr { background: transparent !important; }
.table-container .table th, .table-container .table td { border-left: 0 !important; border-right: 0 !important; }

/* Azioni dell'elenco referti: pulsanti a pillola con icona ed etichetta */
.table-container td :is(a, span.btn-link):has(> i.fas) {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	padding: 6px 14px;
	border-radius: 999px;
	background: var(--hm-ciano-chiaro);
	color: var(--hm-blu) !important;
	font-family: var(--hm-titoli) !important;
	font-size: 14px !important;
	font-weight: 700;
	line-height: 1.4;
	white-space: nowrap;
	text-decoration: none;
	cursor: pointer;
	transition: background 0.15s, color 0.15s;
}
.table-container td :is(a, span.btn-link):has(> i.fas):hover { background: var(--hm-blu); color: #ffffff !important; }
.table-container td :is(a, span.btn-link) > i.fas { color: inherit !important; font-size: 16px !important; }
.table-container td :is(a, span.btn-link):has(> i.fas) *:not(i) { font-family: var(--hm-titoli) !important; }
.table-container td :is(a, span.btn-link) > i.fas, .table-container td :is(a, span.btn-link) > i.fas::before { font-family: 'Font Awesome 5 Free' !important; font-weight: 900 !important; }
.table-container td .fa-download::before { content: "\f1c1"; }
.table-container td .fa-file-invoice::before { content: "\f543"; }
.table-container td .fa-eye::before { content: "\f497"; }
.table-container td .fa-share::before { content: "\f1e0"; }
.table-container td :is(a, span.btn-link):has(> .fa-download)::after { content: 'Scarica'; }
.table-container td :is(a, span.btn-link):has(> .fa-file-invoice)::after { content: 'Scarica'; }
.table-container td :is(a, span.btn-link):has(> .fa-eye)::after { content: 'Apri'; }

/* In "Condividi" la parola sta dentro l'icona: testo in Exo, solo il simbolo in Font Awesome */
.table-container td span.btn-link > i.fa-share { font-family: var(--hm-titoli) !important; font-size: 14px !important; font-weight: 700 !important; font-style: normal; }
.table-container td span.btn-link > i.fa-share::before { font-family: 'Font Awesome 5 Free' !important; font-weight: 900 !important; font-size: 15px; margin-right: 7px; }

/* Pulsanti con icona nell'intestazione delle tabelle (es. "+" Nuovo referto): il CSS originale li fa bianchi, su intestazione chiara sparivano */
.table-container .table thead th a:has(> i.fas) {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: var(--hm-link);
	color: #fff !important;
	text-decoration: none;
	box-shadow: var(--hm-ombra);
}
.table-container .table thead th a:has(> i.fas) i.fas { color: #fff !important; font-size: 16px; }
.table-container .table thead th a:has(> i.fas):hover { background: var(--hm-blu); }
