/* Timbra 11.9.6 — linguaggio visivo e responsive condiviso delle aree operative. */
:root{--workspace:1480px;--panel-radius:18px;--card-radius:15px;--ui-shadow:0 14px 38px rgba(0,0,0,.16)}
html,body{max-width:100%;overflow-x:hidden}
.shell{transition:width .2s ease}
.shell.wide-workspace{width:min(var(--workspace),100%)}
.shell.wide-complex{width:min(1720px,100%)}
.app-page,.app-page>*{min-width:0}

/* Pannelli, titoli e navigazione interna condividono la stessa presenza visiva. */
.focused-section,.shift-content-panel,.platform-content-panel,.company-content-panel{width:100%;max-width:none}
.focused-section,.shift-content-panel,.platform-content-panel,.company-content-panel,.complex-day-card{box-shadow:var(--ui-shadow)}
.panel,.focused-section,.shift-content-panel,.platform-content-panel,.company-content-panel{border-radius:var(--panel-radius)}
.page-title{gap:20px}
.page-title h1{max-width:860px}
.panel-head{gap:18px}
.panel-head>div{min-width:0}
.panel-head h2,.panel-head h3{letter-spacing:-.025em}
.compact-title{margin-top:28px}

.section-launchers{gap:12px}
.section-launchers button{position:relative;overflow:hidden;min-height:118px;padding:20px;border-radius:var(--card-radius);background:linear-gradient(145deg,var(--surface2),var(--surface));box-shadow:0 9px 24px rgba(0,0,0,.1);transition:transform .18s ease,border-color .18s ease,background .18s ease}
.section-launchers button::before{content:"";position:absolute;inset:0 auto 0 0;width:3px;background:var(--accent);opacity:.8}
.section-launchers button:hover{transform:translateY(-2px);border-color:#606870;background:linear-gradient(145deg,#292e33,var(--surface))}
.section-launchers button:focus-visible{outline:2px solid var(--accent);outline-offset:3px}
.section-launchers span{font-size:17px;letter-spacing:-.02em}
.section-launchers small{max-width:42ch;font-size:11px;line-height:1.55}
.employee-section-launchers,.shift-section-launchers{max-width:none}

/* Schede ed elenchi delle nuove sezioni. */
.employee-menu,.site-list,.absence-type-grid,.report-archive-grid{gap:12px}
.employee-menu-item,.site-card,.absence-type-card,.request-list-item,.complex-person,.report-archive-card,.employee-site-group{border-radius:var(--card-radius);background:linear-gradient(145deg,var(--surface2),rgba(25,28,31,.98));box-shadow:0 8px 22px rgba(0,0,0,.09);transition:transform .16s ease,border-color .16s ease,background .16s ease}
.employee-menu-item:hover,.site-card:hover,.absence-type-card:hover,.request-list-item:hover,.complex-person:hover,.report-archive-card:hover{transform:translateY(-2px);border-color:#616970}
.employee-menu-item.active,.site-card.active,.request-list-item.active,.complex-person.active{border-color:var(--accent);box-shadow:inset 0 0 0 1px rgba(227,59,50,.3),0 10px 26px rgba(0,0,0,.12)}
.request-layout{grid-template-columns:minmax(310px,.72fr) minmax(0,1.55fr);gap:18px}
.request-list-item>*{min-width:0}
.request-list-item strong{overflow-wrap:anywhere}
.document-card,.document-confirm-list div{min-width:0}

/* Sedi: stessi campi, stessi contrasti, nessun testo che scompare. */
.shift-site-selector,.employee-site-select{box-shadow:var(--ui-shadow)}
.shift-site-selector select,.site-primary-control select,.employee-site-select select,#request-site,#absence-site-filter{appearance:none;-webkit-appearance:none;color-scheme:dark;background-color:var(--surface2);background-image:linear-gradient(45deg,transparent 50%,var(--muted) 50%),linear-gradient(135deg,var(--muted) 50%,transparent 50%);background-position:calc(100% - 17px) 50%,calc(100% - 12px) 50%;background-size:5px 5px,5px 5px;background-repeat:no-repeat;color:var(--text);padding-right:34px}
.shift-site-selector select{background-color:transparent}
.shift-site-selector select option,.site-primary-control select option,.employee-site-select select option,#request-site option,#absence-site-filter option{background:#22262a;color:#f4f3ef}
.employee-site-group{padding:18px}
.site-options-grid{gap:12px!important}
.site-option-card{min-width:0;transition:border-color .16s ease,background .16s ease,transform .16s ease}
.site-option-card:hover{border-color:#616970;transform:translateY(-1px)}

/* Calendario turni: tutto visibile su desktop, scorrimento solo quando lo spazio è davvero insufficiente. */
.shift-content-panel{padding:clamp(18px,2vw,28px)}
.shift-calendar{max-width:100%}
.shift-grid{width:100%;min-width:0;border-radius:var(--card-radius);box-shadow:0 10px 28px rgba(0,0,0,.12)}
.shift-grid-head,.shift-grid-row{grid-template-columns:minmax(150px,180px) repeat(var(--shift-days),minmax(0,1fr))}
.shift-grid-head>*{min-width:0;padding:11px 6px}
.shift-grid-row>*{min-width:0}
.shift-person{overflow-wrap:anywhere}
.shift-card,.shift-absence{min-width:0;overflow:hidden}
.shift-card strong,.shift-card span,.shift-card small,.shift-absence strong,.shift-absence span{white-space:normal;overflow-wrap:anywhere}
.shift-site-context{margin-top:14px}

/* Report complesso: campi leggibili senza una tabella larga da trascinare. */
.complex-report-layout,.complex-editor,.complex-days{min-width:0}
.complex-day-fields{grid-template-columns:repeat(5,minmax(110px,1fr))}
.complex-day-fields label{min-width:0}
.complex-day-fields input{min-width:0}
.complex-table-wrap{max-width:100%}

@media(min-width:1101px){
  .shift-calendar{overflow:visible}
  .employee-menu{grid-template-columns:repeat(auto-fill,minmax(300px,1fr))}
  .company-section-launchers,.platform-section-launchers{grid-template-columns:repeat(3,minmax(0,1fr))}
}

@media(min-width:721px) and (max-width:1100px){
  .shell.wide-workspace{width:100%}
  .shift-calendar{overflow-x:auto;overscroll-behavior-inline:contain;scrollbar-gutter:stable}
  .shift-grid{min-width:980px}
  .complex-day-fields{grid-template-columns:repeat(3,minmax(120px,1fr))}
}

@media(max-width:720px){
  .shell,.shell.wide-workspace,.shell.wide-complex{width:100%;padding-inline:12px}
  .page-title{align-items:stretch}
  .page-title h1{font-size:clamp(29px,10vw,40px)}
  .page-actions,.dialog-actions{flex-wrap:wrap}
  .page-actions>*{min-width:0}
  .focused-section,.shift-content-panel,.platform-content-panel,.company-content-panel{padding:15px;border-radius:16px}
  .section-launchers,.employee-section-launchers,.company-section-launchers,.platform-section-launchers,.shift-section-launchers{grid-template-columns:1fr}
  .section-launchers button{min-height:94px;padding:17px 17px 17px 19px}
  .request-layout{grid-template-columns:1fr}
  .shift-toolbar{grid-template-columns:auto 1fr auto}
  .shift-toolbar strong{grid-column:1/-1;grid-row:1;text-align:left}
  .shift-site-selector{min-width:0;width:100%;grid-column:1/-1}
  .shift-calendar{overflow:visible}
  .shift-grid{min-width:0}
  .shift-grid-head,.shift-grid-row{grid-template-columns:minmax(105px,.72fr) minmax(0,1.28fr)}
  .shift-grid-head>*{padding:9px 5px}
  .shift-person{padding:9px 7px}
  .shift-cell{padding:6px}
  .complex-day-fields{grid-template-columns:repeat(2,minmax(0,1fr))}
  .document-card{grid-template-columns:40px minmax(0,1fr)}
  .document-actions{width:100%}
  .document-actions>*{min-width:0}
  .site-primary-control{grid-template-columns:1fr!important}
}

@media(max-width:430px){
  .shell,.shell.wide-workspace,.shell.wide-complex{padding-inline:10px}
  .panel{padding:14px}
  .topbar{height:auto;min-height:68px;gap:10px}
  .account{gap:8px}
  .account>span{display:none}
  .complex-day-fields{grid-template-columns:1fr 1fr}
}
.settings-card{display:grid;gap:14px;padding:18px;border:1px solid var(--line,#303438);border-radius:18px;background:var(--surface,#171a1d)}
.settings-card h3,.settings-card p{margin:0}.settings-card small{color:var(--muted,#9ba1a6)}
