.profile-screen .profile-layout{display:grid;grid-template-columns:minmax(0,390px) minmax(0,1fr);gap:40px;max-width:960px;margin:25px auto 0;align-items:start}
.profile-screen:not(.profile-has-detail) .profile-layout{grid-template-columns:minmax(0,390px);justify-content:center}
.profile-screen .profile-overview{min-width:0}.profile-screen .profile-identity{text-align:center;padding:18px 0 10px}.profile-screen .profile-avatar{display:grid;place-items:center;width:80px;height:80px;border-radius:50%;background:var(--kawaii-avatar) center/cover no-repeat;margin:0 auto 20px;box-shadow:inset 0 1px 0 #ffffff88}.profile-screen svg{width:24px;height:24px;flex-shrink:0}.profile-screen .profile-avatar svg{width:32px;height:32px}.profile-screen h1{font-size:30px;line-height:1.2;margin:0 0 10px;font-weight:600;color:#12262e}.profile-screen .profile-identity>p{font-size:14px;color:#4b6168;margin:0}.profile-screen button{font-family:inherit}.profile-screen .profile-account{display:inline-flex;align-items:center;gap:8px;background:#ffffffd9;color:#12262e;border-radius:26px;font-size:13px;padding:12px 18px;margin-top:20px;min-height:46px;box-shadow:0 2px 12px #12262e05}.profile-screen .profile-account svg{width:17px;height:17px}.profile-screen .profile-control-text strong{font-weight:600;display:block}.profile-screen .profile-control-text small{display:block;font-size:13px;margin-top:7px;line-height:1.5;font-weight:400}.profile-screen .profile-tiles{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:12px}.profile-screen .profile-tile{display:flex;flex-direction:column;align-items:flex-start;text-align:left;border-radius:28px;min-height:202px;padding:22px 18px;border:0;color:#12262e;white-space:normal;overflow-wrap:anywhere;min-width:0}.profile-screen .profile-documents{background:linear-gradient(145deg,#e0f3ec,#0e8a6a)}.profile-screen .profile-tax{background:linear-gradient(145deg,#2f6bd8,#2f6bd8);color:#ffffff}.profile-screen .profile-bdpi{background:linear-gradient(145deg,#2f6bd8,#2f6bd8);color:#ffffff}.profile-screen .profile-tile small{color:inherit}.profile-screen .profile-tile .profile-control-text{margin-top:16px}.profile-screen .profile-tile strong{font-size:21px}.profile-screen .profile-tile-action{font-size:12px;margin-top:auto;padding-top:20px}.profile-screen .profile-settings{margin-top:8px;background:#ffffff;border:1px solid #e6ebea;border-radius:18px;overflow:hidden}.profile-screen .profile-row{display:flex;align-items:center;gap:12px;width:100%;background:transparent;color:#12262e;text-align:left;min-height:56px;padding:12px 16px;border:0;border-top:1px solid #e6ebea;border-radius:0;white-space:normal}.profile-screen .profile-row>svg{width:32px;height:32px;padding:7px;background:#e4f0f1;color:#0e5f6d;border-radius:9px;flex:none}.profile-screen .profile-row .profile-control-text{flex:1;min-width:0}.profile-screen .profile-row strong{font-size:15px;font-weight:500}.profile-screen .profile-row small{font-size:12px;color:#4b6168;margin-top:4px}.profile-screen .profile-chevron{font-size:25px}.profile-screen .profile-tool-link{display:flex;align-items:center;gap:13px;width:100%;background:#ffffffd9;color:#12262e;text-align:left;min-height:76px;padding:16px 18px;border-radius:22px;text-decoration:none;box-shadow:0 2px 12px #12262e05;margin-top:12px;border:0;font:inherit;cursor:pointer}.profile-screen .profile-tool-link .profile-control-text{flex:1;min-width:0}.profile-screen .profile-tool-link small{font-size:12px;color:#4b6168;margin-top:4px}.profile-screen .profile-detail{background:#f4f6f5;border-radius:28px;padding:26px;min-width:0;margin:24px 0;box-shadow:none;border:0}.profile-screen .profile-back{background:transparent;color:#12262e;padding:8px 0;border-radius:0;font-size:14px;min-height:44px}.profile-screen .profile-detail>h2{font-size:27px;color:#12262e;margin:18px 0 24px}.profile-screen .profile-content section,.profile-screen .profile-content details.profile-chapter{margin:18px 0;padding:0;background:transparent;border:0;border-radius:0;box-shadow:none}.profile-screen .profile-content h2{font-size:19px}.profile-screen .profile-content p{overflow-wrap:anywhere}.profile-screen .profile-content input,.profile-screen .profile-content select{max-width:100%;min-width:0}.profile-screen .profile-content .button-row{display:flex;flex-wrap:wrap;gap:10px}.profile-screen .profile-content table{width:100%}.profile-screen .profile-content details.profile-chapter>summary{display:none}.profile-screen [hidden]{display:none!important}
@media(max-width:767px){.profile-screen .profile-layout{display:block;max-width:390px;margin:10px auto 0}.profile-screen .profile-identity{padding:20px 0 28px}.profile-screen .profile-detail{padding:20px;background:#ffffff;margin:0;min-height:400px}.profile-screen.profile-has-detail .profile-overview{display:none}.profile-screen .profile-tile{min-height:200px}}
@media(max-width:350px){.profile-screen .profile-tile{padding:20px 14px;border-radius:24px}.profile-screen .profile-tile strong{font-size:18px}.profile-screen .profile-tile small{font-size:12px}.profile-screen .profile-row{gap:10px}.profile-screen .profile-row strong{font-size:13px}.profile-screen .profile-detail{padding:12px 0}}

/* Profilo (ridisegno 10/11/2026): etichette dei tre gruppi; la prima riga di ogni elenco senza divisorio */
.profile-group-label{margin:22px 0 0;font-size:12px;font-weight:600;letter-spacing:.08em;text-transform:uppercase;color:#4b6168}
.profile-settings>.profile-row:first-child{border-top:0}
/* Cifratura verificata (16/11/2026): riga discreta in fondo al Profilo, mai un riquadro */
.profile-screen .profile-encryption{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:4px;margin:22px 0 6px;font-size:12px;line-height:1.5;color:#4b6168;text-align:center}
.profile-screen .profile-encryption svg{width:13px;height:13px}
.profile-screen .profile-encryption a{color:inherit;text-decoration:underline}
/* Buste e diari (11/11/2026, titolare: «lunga 10 km»): un pulsante per caricare, due pannelli chiusi (scarico dal
   portale, archivio) e il diario di bordo in una riga. L'archivio aperto: un mese di lavoro per riga. */
.docs-pagina{display:grid;gap:14px}
:is(#archivio,#screen-documents) .docs-pannello{margin:0;padding:0;border:0;border-bottom:1px solid #e6ebea;border-radius:0;background:none;box-shadow:none}
:is(#archivio,#screen-documents) .docs-pannello:first-of-type{border-top:1px solid #e6ebea}
:is(#archivio,#screen-documents) .docs-pannello>summary{display:flex;align-items:center;gap:10px;min-height:54px;font-size:16px;font-weight:400;color:#12262e;cursor:pointer;list-style:none}
:is(#archivio,#screen-documents) .docs-pannello>summary::-webkit-details-marker{display:none}
:is(#archivio,#screen-documents) .docs-pannello>summary small{margin-left:auto;font-size:14px;color:#4b6168}
:is(#archivio,#screen-documents) .docs-pannello>summary:after{content:"›";color:#7b8f96;margin-left:auto;transition:transform .15s}
:is(#archivio,#screen-documents) .docs-pannello>summary:has(small):after{margin-left:8px}
:is(#archivio,#screen-documents) .docs-pannello[open]>summary:after{content:"›";transform:rotate(90deg)}
:is(#archivio,#screen-documents) .docs-pannello[open]{padding-bottom:12px}
:is(#archivio,#screen-documents) .docs-pannello>summary:focus-visible{outline:2px solid #0e5f6d;outline-offset:2px;border-radius:8px}
.docs-riga{display:grid;grid-template-columns:minmax(0,1fr) 64px 64px;gap:8px;align-items:center;min-height:50px;border-bottom:1px solid #e6ebea;font-size:16px}
.docs-testa{min-height:32px;font-size:12px;font-weight:600;letter-spacing:.08em;text-transform:uppercase;color:#4b6168}
.docs-testa span:not(:first-child),.docs-cella{display:flex;justify-content:center}
.docs-mese{text-transform:capitalize}
.docs-anno{margin:12px 0 0;font-size:13px;font-weight:600;color:#4b6168}
.docs-cella{align-items:center;gap:4px}
.docs-segno{display:grid;place-items:center;width:36px;height:36px;border-radius:10px;font-weight:700;font-size:14px}
.docs-si .docs-segno{background:#e0f3ec;color:#0b6b53}
.docs-no .docs-segno{background:#f4f6f5;color:#4b6168}
.docs-cella:has(.original-pdf) .docs-segno{display:none}
.docs-cella .original-pdf{min-width:44px;min-height:44px;display:grid;place-items:center;border-radius:10px;background:#e0f3ec;color:#0b6b53;font-size:11px;font-weight:700;text-decoration:none}
.docs-nota{margin:8px 0 0;font-size:13px;color:#4b6168}
.docs-diario h2{margin:6px 0 8px;font-size:12px;font-weight:600;letter-spacing:.08em;text-transform:uppercase;color:#4b6168}
.docs-diario-crea{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;align-items:end}
.docs-diario-crea label{margin:0;font-size:13px;color:#4b6168}
.docs-diario-crea select{width:100%;min-height:48px;margin-top:4px}
.docs-diario-crea button{min-height:48px;padding:0 22px}
:is(#archivio,#screen-documents) .docs-diario .docs-pannello{border-top:1px solid #e6ebea;margin-top:6px}
html[data-tono="scuro"] :is(#archivio,#screen-documents) .docs-pannello>summary{color:#ffffff}
html[data-tono="scuro"] :is(#archivio,#screen-documents) :is(.docs-pannello>summary small,.docs-testa,.docs-anno,.docs-nota,.docs-diario h2,.docs-diario-crea label){color:#c6d8d9}
html[data-tono="scuro"] :is(#archivio,#screen-documents) :is(.docs-pannello,.docs-riga){border-color:#ffffff26}
html[data-tono="scuro"] .docs-riga{color:#ffffff}
html[data-tono="scuro"] .docs-no .docs-segno{background:#1b3641;color:#c6d8d9}
html[data-tono="scuro"] :is(#archivio,#screen-documents) .docs-pannello>summary:focus-visible{outline-color:#eaf4f4}
@media(prefers-reduced-motion:reduce){:is(#archivio,#screen-documents) .docs-pannello>summary:after{transition:none}}
:is(#archivio,#screen-documents) .docs-carica{padding:14px 16px;margin:0}
:is(#archivio,#screen-documents) .docs-pannello>summary:after,:is(#archivio,#screen-documents) .docs-pannello>summary:before{background:none;border:0}
html[data-tono="scuro"] :is(#archivio,#screen-documents) :is(#diario-crea,#buste-view button:not(.secondary):not(.text-action)){background:#e0f3ec;color:#12262e}
:is(#archivio,#screen-documents) .docs-cella .original-pdf span{background:none;color:inherit}
html[data-tono="scuro"] :is(#archivio,#screen-documents) button.secondary{background:#1b3641;color:#ffffff;border-color:#ffffff40}
.docs-sotto{margin:12px 0 4px;font-size:13px;font-weight:600;color:#4b6168}
html[data-tono="scuro"] .docs-sotto{color:#c6d8d9}
/* Archivio a chiave: busta chiusa (lucchetto) e avviso sotto la tabella */
.docs-cella .original-pdf-chiuso{position:relative}
.docs-cella .original-pdf-chiuso::after{content:"";position:absolute;right:4px;top:4px;width:7px;height:6px;border:1.5px solid currentColor;border-radius:1.5px;box-shadow:0 -3px 0 -1.5px currentColor}
.original-pdf-nota .original-pdf-apri{margin-left:6px;min-height:44px;padding:0 14px}
/* Profilo → Strumenti: chiave per leggere i turni (17/11/2026) */
.chiave-turni{display:grid;gap:10px;margin-top:14px;padding:14px 0;border-top:1px solid rgba(127,127,127,.25)}
.chiave-turni .profile-control-text{display:grid;gap:4px}
.chiave-turni p{margin:0}
.chiave-turni .button-row{display:flex;flex-wrap:wrap;gap:8px}
.chiave-turni button{min-height:44px;padding:0 16px}
.chiave-turni-link{width:100%;min-height:44px;box-sizing:border-box;font:inherit;font-size:.85em;padding:0 10px}
.chiave-turni[hidden]{display:none}
