/* ==========================================================================
   Nixsa Care · demo cure domiciliari (Casa Serena) · tutte le classi con prefisso dom-
   ========================================================================== */
.dom-nota { margin-top: 10px; font-size: 12.5px; line-height: 1.5; color: var(--muted); }
.dom-p { font-size: 14px; line-height: 1.55; color: var(--ink-2); }
.dom-sotto { display: block; font-size: 11.5px; color: var(--muted); font-weight: 500; line-height: 1.3; margin-top: 2px; }
.dom-h1 { font-size: 26px; font-weight: 600; letter-spacing: -.035em; color: var(--navy); line-height: 1.15; }
.dom-kv { display: block; font-size: 26px; font-weight: 600; letter-spacing: -.04em; color: var(--navy); line-height: 1.1; }
.dom-tre { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.dom-tre .scheda { padding: 12px; }
.dom-torna { font-size: 14px; font-weight: 600; color: var(--blue); }

/* Livelli di intensità (barre orizzontali) */
.dom-livelli { display: grid; gap: 10px; }
.dom-livelli > div { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) 34px; gap: 12px; align-items: center; }
.dom-livelli span b { display: block; font-size: 13px; font-weight: 600; color: var(--ink); line-height: 1.25; }
.dom-livelli span small { font-size: 11.5px; color: var(--muted); }
.dom-livelli i { display: block; height: 10px; border-radius: 6px; background: var(--bg-2); overflow: hidden; }
.dom-livelli em { display: block; height: 100%; border-radius: 6px; transition: width .8s var(--ease); }
.dom-livelli strong { font-size: 15px; font-weight: 600; color: var(--navy); text-align: right; font-variant-numeric: tabular-nums; }

/* Da fare */
.dom-dafare { display: grid; }
.dom-dafare li + li { border-top: 1px solid var(--line); }
.dom-dafare a { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 9px 2px; font-size: 13.5px; color: var(--ink); }
.dom-dafare a:hover span { color: var(--blue); }
.dom-dafare .chip { flex-shrink: 0; }

.dom-mini-barra { display: block; width: 90px; height: 6px; border-radius: 4px; background: var(--line); overflow: hidden; }
.dom-mini-barra i { display: block; height: 100%; background: var(--ok); border-radius: 4px; }
.tab td .dom-mini-barra { margin-top: 2px; }
.dom-tab-op td { white-space: nowrap; }

/* Messaggi (cruscotto) */
.dom-msg-lista { display: grid; gap: 8px; }
.dom-msg { padding: 10px 12px; border-radius: 12px; background: var(--bg-2); }
.dom-msg.fam { background: var(--gold-s); }
.dom-msg small { font-size: 11.5px; color: var(--muted); }
.dom-msg p { margin-top: 2px; font-size: 13.5px; color: var(--ink); }
.dom-msg .btn { margin-top: 8px; }

/* Pianificazione */
.dom-giorni { margin-top: -6px; }
.dom-giorni button { font-size: 13.5px; padding: 7px 12px; }
.dom-legenda { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; font-size: 12px; color: var(--muted); }
.dom-legenda i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: -7px; }
.dom-legenda i.vuoto-l { border: 2px dashed var(--gold); background: #fff; }
.dom-legenda i.via-l { width: 18px; height: 8px; border-radius: 3px; background: repeating-linear-gradient(135deg, #D3D8E0 0 3px, transparent 3px 6px); }
.dom-ops { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.dom-ops button { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border: 1px solid var(--line-2); border-radius: 99px; background: #fff; font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.dom-ops button i { width: 9px; height: 9px; border-radius: 50%; }
.dom-ops button[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: #fff; }
.dom-mappa { width: 100%; height: auto; border-radius: 14px; font-family: var(--sans); }
.dom-mappa.piccola { aspect-ratio: 1.4; }
.dom-mappa .dom-tappa { cursor: pointer; }
.dom-mappa .dom-tappa:hover circle { filter: brightness(1.15); }
.dom-daass { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.dom-daass:last-child { border-bottom: 0; }
.dom-daass b { display: block; font-size: 14px; color: var(--navy); }
.dom-daass small { display: block; font-size: 12.5px; color: var(--muted); line-height: 1.45; }
.dom-daass .btn { flex-shrink: 0; }
.dom-sel { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(43,72,112,.1); }
.dom-sel .dati { grid-template-columns: 96px 1fr; }
.dom-giro-kpi { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
.dom-giro-kpi div { padding: 8px 10px; border-radius: 12px; background: var(--bg-2); }
.dom-giro-kpi small { display: block; font-size: 11.5px; color: var(--muted); }
.dom-giro-kpi b { font-size: 17px; font-weight: 600; color: var(--navy); letter-spacing: -.02em; }
.dom-tappe { display: grid; max-height: 330px; overflow-y: auto; }
.dom-tappe li { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 4px; border-top: 1px solid var(--line); cursor: pointer; border-radius: 8px; }
.dom-tappe li:hover, .dom-tappe li.on { background: var(--tint); }
.dom-tappe li > i { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; color: #fff; font-style: normal; font-size: 11px; font-weight: 700; }
.dom-tappe b { display: block; font-size: 13.5px; color: var(--navy); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dom-tappe small { display: block; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Calendario della giornata (timeline per operatore) */
.dom-tl { min-width: 1060px; }
.dom-tl__riga { display: grid; grid-template-columns: 128px minmax(0, 1fr); align-items: center; border-bottom: 1px solid var(--line); }
.dom-tl__riga:last-child { border-bottom: 0; }
.dom-tl__testa { border-bottom: 0; }
.dom-tl__testa .dom-tl__pista { height: 20px; }
.dom-tl__testa span { position: absolute; top: 0; transform: translateX(-50%); font-size: 11px; font-weight: 600; color: var(--muted); }
.dom-tl__chi { display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 0; min-width: 0; position: sticky; left: 0; z-index: 6; background: #fff; align-self: stretch; }
.blocco__t:has(.dom-legenda) { flex-wrap: wrap; }
.dom-tl__chi > i { width: 8px; height: 30px; border-radius: 4px; flex-shrink: 0; }
.dom-tl__chi b { display: block; font-size: 13px; color: var(--navy); line-height: 1.2; white-space: nowrap; }
.dom-tl__chi small { font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.dom-tl__pista { position: relative; height: 48px; }
.dom-tl__pista > em { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--line); }
.dom-tl__pista > u { position: absolute; top: 6px; bottom: 6px; background: #EEF1F5; border-radius: 8px; text-decoration: none; }
.dom-tl__pista.assente { background: repeating-linear-gradient(135deg, transparent 0 8px, #F3F4F6 8px 16px); }
.dom-tl__assente { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); font-size: 12px; font-weight: 600; color: var(--muted); }
.dom-tl__via { position: absolute; top: 21px; height: 6px; border-radius: 3px; background: repeating-linear-gradient(135deg, #CBD2DC 0 3px, transparent 3px 6px); }
.dom-tl__acc { position: absolute; top: 7px; bottom: 7px; min-width: 6px; padding: 2px 5px 2px 6px; border-radius: 7px; border-left: 3px solid var(--c); background: color-mix(in srgb, var(--c) 14%, #fff); text-align: left; overflow: hidden; display: flex; flex-direction: column; justify-content: center; transition: box-shadow .2s, transform .2s; }
.dom-tl__acc b { font-size: 11px; font-weight: 700; color: var(--navy); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.2; }
.dom-tl__acc small { font-size: 10px; color: var(--muted); white-space: nowrap; overflow: hidden; line-height: 1.2; font-variant-numeric: tabular-nums; }
.dom-tl__acc:hover { box-shadow: 0 4px 12px -4px rgba(14,26,43,.35); z-index: 2; }
.dom-tl__acc.on { box-shadow: 0 0 0 2px var(--navy); z-index: 3; }
.dom-tl__acc.st-fatto { background: var(--ok-s); border-left-color: var(--ok); }
.dom-tl__acc.st-corso { background: var(--warn-s); border-left-color: var(--warn); }
.dom-tl__acc.st-mancato { background: repeating-linear-gradient(135deg, var(--ko-s) 0 5px, #fff 5px 10px); border-left-color: var(--ko); }
.dom-tl__acc.st-mancato b { text-decoration: line-through; color: var(--ko); }
.dom-tl__acc.st-ritardo { box-shadow: inset 0 0 0 1.5px var(--ko); border-left-color: var(--ko); }
.dom-tl__ora { position: absolute; top: -2px; bottom: -2px; width: 2px; background: var(--ko); z-index: 4; }
.dom-legenda i.turno-l { width: 18px; height: 10px; border-radius: 3px; background: #EEF1F5; }
.dom-legenda i.ora-l { width: 2px; height: 12px; border-radius: 0; background: var(--ko); }

/* Settimana */
.dom-sett td.dom-cella { padding: 4px; text-align: center; }
.dom-sett .dom-cella.oggi { background: var(--tint); }
.dom-cella button { width: 100%; min-width: 74px; padding: 6px 4px; border-radius: 10px; border: 1px solid var(--line); background: #fff; transition: border-color .2s; }
.dom-cella button:hover { border-color: var(--blue); }
.dom-cella button b { display: block; font-size: 16px; font-weight: 600; color: var(--navy); line-height: 1.1; }
.dom-cella button small { font-size: 11px; color: var(--muted); white-space: nowrap; }
.dom-cella__no { display: block; padding: 10px 4px; font-size: 11.5px; color: var(--muted); border-radius: 10px; background: repeating-linear-gradient(135deg, transparent 0 6px, #F3F4F6 6px 12px); }
.dom-sett__tot td { background: var(--bg-2); }

/* App dell'operatore: testata, rete, lista accessi */
.dom-tel-testa { padding: 30px 18px 16px; }
.dom-tel-riga { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 6px; }
.dom-tel-riga small { font-size: 12px; }
.dom-rete { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 99px; background: rgba(255,255,255,.14); color: #fff; font-size: 11.5px; font-weight: 700; white-space: nowrap; }
.dom-rete::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #6BD39E; box-shadow: 0 0 0 3px rgba(107,211,158,.25); }
.dom-rete.off { background: var(--gold-l); color: var(--navy); }
.dom-rete.off::before { background: var(--ko); box-shadow: 0 0 0 3px rgba(180,68,58,.25); }
.dom-indietro { color: #fff; font-size: 13px; font-weight: 600; opacity: .9; }
.dom-tel-prog { display: block; height: 5px; margin-top: 12px; border-radius: 3px; background: rgba(255,255,255,.2); overflow: hidden; }
.dom-tel-prog i { display: block; height: 100%; background: var(--gold-l); border-radius: 3px; }
.dom-tel-banner, .dom-tel-ok { display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; border-radius: 12px; font-size: 12.5px; line-height: 1.4; }
.dom-tel-banner { background: var(--gold-s); color: #6E4F15; }
.dom-tel-ok { background: var(--ok-s); color: #1F5A40; }
.dom-tel-banner .ico, .dom-tel-ok .ico { width: 16px; height: 16px; margin-top: 1px; }
.dom-acc { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 4px 10px; text-align: left; width: 100%; transition: border-color .2s, box-shadow .2s; }
.dom-acc:hover { border-color: var(--line-2); }
.dom-acc.su { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(43,72,112,.12); }
.dom-acc.st-fatto, .dom-acc.st-mancato { opacity: .72; }
.dom-acc__ora { font-size: 14px; font-weight: 700; color: var(--navy); font-variant-numeric: tabular-nums; line-height: 1.2; }
.dom-acc__ora small { display: block; font-size: 11px; font-weight: 500; color: var(--muted); }
.dom-acc__c b { display: block; font-size: 14px; color: var(--navy); line-height: 1.25; }
.dom-acc__c small { display: block; font-size: 12px; color: var(--muted); line-height: 1.35; }
.dom-acc__p { margin-top: 3px; color: var(--ink-2) !important; }
.dom-acc__s { grid-column: 2; display: flex; flex-wrap: wrap; gap: 4px; }
.dom-acc__s .chip { font-size: 11px; padding: 2px 8px; }
.dom-tel-piede { padding: 4px 6px 10px; font-size: 11.5px; color: var(--muted); text-align: center; line-height: 1.45; }
.dom-tel-lista { display: grid; gap: 4px; }
.tel-card .dom-tel-lista li, .dom-tel-lista li { display: flex; grid-template-columns: none; gap: 8px; align-items: center; padding: 3px 0; font-size: 13px; }
.dom-tel-lista .ico { width: 15px; height: 15px; color: var(--ok); }
.dom-tel-btn { width: 100%; border-radius: 14px !important; min-height: 46px !important; }
.dom-tel-link { justify-self: center; padding: 6px; font-size: 13px; font-weight: 600; color: var(--blue); }
.dom-tel-timer { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 12px; background: var(--warn-s); color: #7A5214; font-size: 12.5px; }
.dom-tel-timer .ico { width: 16px; height: 16px; }
.dom-check { display: grid; gap: 2px; }
.dom-check label { display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 7px 4px; border-radius: 8px; font-size: 13px; cursor: pointer; }
.dom-check label:has(input:checked) { background: var(--tint); color: var(--navy); font-weight: 600; }
.dom-check input { width: 17px; height: 17px; accent-color: var(--blue); }
.dom-check em { font-style: normal; font-size: 10.5px; font-weight: 700; color: var(--blue); background: var(--tint); padding: 1px 6px; border-radius: 99px; }
.dom-check em.fuori { color: var(--warn); background: var(--warn-s); }
.dom-altre { margin-top: 6px; }
.dom-altre summary { cursor: pointer; font-size: 12.5px; font-weight: 600; color: var(--blue); padding: 4px; }
.dom-param { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.dom-param label { display: grid; gap: 3px; font-size: 11.5px; font-weight: 600; color: var(--ink-2); }
.dom-param .campo-d { height: 36px; width: 100%; min-width: 0; font-size: 14px; padding: 0 10px; }
.tel-card textarea.campo-d { min-height: 70px; font-size: 13px; }
.dom-firma { position: relative; margin-top: 10px; }
.dom-firma canvas { display: block; width: 100%; height: 132px; border: 1.5px dashed var(--line-2); border-radius: 12px; background: #fff; touch-action: none; cursor: crosshair; }
.dom-firma span { position: absolute; left: 12px; bottom: 36px; right: 12px; border-top: 1px solid var(--line-2); padding-top: 3px; font-size: 10.5px; color: var(--muted-2); pointer-events: none; }
.dom-firma .dom-tel-link { display: block; margin: 4px 0 0 auto; }
.dom-firma-img { display: block; max-width: 180px; margin-top: 8px; padding: 4px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.dom-coda { display: grid; }
.dom-coda li { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.dom-coda time { font-family: var(--mono); font-size: 12px; color: var(--muted); }

/* Assistiti */
.dom-figure { display: flex; flex-wrap: wrap; gap: 4px; }
.dom-figure span { padding: 2px 8px; border-radius: 99px; background: var(--bg-2); font-size: 11.5px; font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.dom-param-riga { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 6px; font-size: 13px; color: var(--muted); }
.dom-param-riga b { color: var(--navy); }

/* Prese in carico */
.dom-richieste { display: grid; gap: 8px; }
.dom-rich { display: flex; gap: 12px; align-items: flex-start; width: 100%; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: #fff; text-align: left; transition: border-color .2s, box-shadow .2s; }
.dom-rich:hover { border-color: var(--line-2); }
.dom-rich.on { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(43,72,112,.1); }
.dom-rich b { display: block; font-size: 14.5px; color: var(--navy); }
.dom-rich small { display: block; font-size: 12.5px; color: var(--muted); }
.dom-rich__chip { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.dom-rich-dett .dati { grid-template-columns: 112px 1fr; font-size: 13.5px; }
.dom-avviso { display: flex; gap: 10px; align-items: flex-start; margin-top: 14px; padding: 12px 14px; border-radius: 14px; background: var(--warn-s); color: #7A5214; font-size: 13.5px; }
.dom-avviso .ico { width: 18px; height: 18px; margin-top: 1px; }

/* Rendicontazione */
.dom-anom { padding: 12px 0; border-bottom: 1px solid var(--line); }
.dom-anom:last-child { border-bottom: 0; }
.dom-anom__t { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.dom-anom__t b { font-size: 14px; color: var(--navy); }
.dom-anom__t small { font-size: 12px; color: var(--muted); }
.dom-anom p { margin-top: 5px; font-size: 13.5px; color: var(--ink-2); }
.dom-anom__az { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.dom-anom__az .btn { white-space: normal; text-align: left; line-height: 1.3; padding-block: 6px; }
.dom-anom.risolta { opacity: .75; }
.dom-anom__esito { display: flex; gap: 6px; align-items: center; color: var(--ok) !important; font-weight: 600; font-size: 13px !important; }
.dom-anom__esito .ico { width: 16px; height: 16px; }
.dom-siad-esito { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 12px; padding: 10px 12px; border-radius: 12px; background: var(--bg-2); font-size: 13.5px; }
.dom-siad-esito.ok { background: var(--ok-s); color: #1F5A40; flex-wrap: nowrap; align-items: flex-start; }
.dom-siad-esito .ico { width: 17px; height: 17px; }
.dom-fatt { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 0; border-bottom: 1px solid var(--line); }
.dom-fatt b { display: block; font-size: 14px; color: var(--navy); }
.dom-fatt small { display: block; font-size: 12.5px; color: var(--muted); }
.dom-fatt > div { flex: 1; min-width: 200px; }
.dom-fatt + .xml, .dom-fatt + .scorri { margin: 10px 0 4px; }

/* Personale */
.dom-scad { display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: flex-end; flex-shrink: 0; }
.turni .cella .dom-sotto { min-height: 13px; }

/* App caregiver */
.dom-prossimo { border-color: var(--blue); }
.dom-eta { margin: 10px 0 2px; font-size: 14px; color: var(--navy); }
.dom-stelle { display: flex; align-items: center; gap: 2px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.dom-stelle span { flex: 1; font-size: 12.5px; color: var(--muted); }
.dom-stelle button { font-size: 21px; line-height: 1; color: var(--line-2); padding: 2px; transition: color .15s, transform .15s; }
.dom-stelle:hover button { color: var(--gold-l); }
.dom-stelle button:hover ~ button { color: var(--line-2); }
.dom-stelle button:hover { transform: scale(1.15); }
.dom-grazie { display: flex; gap: 6px; align-items: center; margin-top: 10px; font-size: 12.5px; color: var(--ok); font-weight: 600; }
.dom-grazie .ico { width: 15px; height: 15px; }
.tel-card .dom-sett-lista li { display: grid; grid-template-columns: 52px minmax(0, 1fr) 16px; gap: 6px; align-items: center; padding: 4px 0; font-size: 12.5px; }
.dom-sett-lista time { font-size: 11.5px; font-weight: 600; color: var(--muted); }
.dom-sett-lista li.fatto span { color: var(--muted); }
.dom-sett-lista .ico { width: 14px; height: 14px; color: var(--ok); }
.dom-chat { display: grid; gap: 6px; max-height: 210px; overflow-y: auto; }
.dom-chat div { max-width: 88%; padding: 8px 10px; border-radius: 12px 12px 12px 4px; background: var(--bg-2); }
.dom-chat div.mio { justify-self: end; border-radius: 12px 12px 4px 12px; background: var(--tint); }
.dom-chat p { font-size: 12.5px; line-height: 1.4; color: var(--ink); }
.dom-chat small { font-size: 10.5px; color: var(--muted); }
.dom-doc { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 6px 0; font-size: 13px; border-top: 1px solid var(--line); }
.dom-doc:first-of-type { border-top: 0; }
.dom-elenco { display: grid; gap: 10px; font-size: 14px; }
.dom-elenco li { display: flex; gap: 10px; align-items: flex-start; }
.dom-elenco .ico { color: var(--blue); margin-top: 2px; }

@media (max-width: 1180px) {
  .dom-giro-kpi { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .dom-scenario .d-ruolo--chi { min-width: 0; }
  .dom-scenario .d-top__in { gap: 8px; }
  .dom-scenario .d-ruolo select { font-size: 12.5px; padding: 0 22px 0 9px; background-position: right 8px center; letter-spacing: -.01em; }
  .dom-scenario .d-ruolo--chi select { max-width: 134px; min-width: 0; }
  .dom-scenario .d-ruolo--struttura select { max-width: 132px; }
  .dom-livelli > div { grid-template-columns: minmax(0, 1fr) 70px 28px; }
  .dom-daass { flex-wrap: wrap; }
  .dom-tl { min-width: 900px; }
  .dom-rich-dett .dati, .dom-sel .dati { grid-template-columns: 96px 1fr; }
  .dom-giorni { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .dom-giorni button { flex-shrink: 0; }
  .dom-scad { justify-content: flex-start; }
  .dom-dafare a { flex-wrap: wrap; }
}
