:root{--red:#c21b17;--red-dark:#981c1b;--ink:#292b30;--muted:#73757b;--bg:#f0eeeb;--line:#e1dcd6;--shadow:0 3px 16px #412d2310;font-family:'Segoe UI',system-ui,-apple-system,sans-serif;color:var(--ink);background:var(--bg);font-synthesis:none}
*{box-sizing:border-box}body{margin:0;font-size:14px;line-height:1.5}a{color:var(--red);text-decoration:none}button,input,select,textarea{font:inherit}button{cursor:pointer}button,a,input,select,textarea{-webkit-tap-highlight-color:transparent}button:focus-visible,a:focus-visible{outline:3px solid #cf5b5670;outline-offset:4px}h1,h2,p{margin-top:0}h1{margin-bottom:8px;font-size:clamp(25px,2.3vw,34px);font-weight:680;line-height:1.2;letter-spacing:-.9px}h2{margin-bottom:5px;font-size:18px;font-weight:650;letter-spacing:-.25px;line-height:1.35}p{margin-bottom:18px}[hidden]{display:none!important}.icon{width:21px;height:21px;flex:0 0 auto;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}.muted{color:var(--muted)}.eyebrow{display:block;color:#8a5751;font-size:10px;font-weight:750;line-height:1.4;letter-spacing:1.55px}.skip-link{position:fixed;left:16px;top:-70px;padding:12px 20px;background:white;color:var(--red);z-index:100;border-radius:8px}.skip-link:focus{top:16px}
/* Identita e navigazione */
.sidebar{position:fixed;inset:0 auto 0 0;width:242px;padding:27px 18px 20px;display:flex;flex-direction:column;z-index:20;color:#fff;background:linear-gradient(165deg,#a21e1c 0%,#831b1b 54%,#6c1b1e 100%);box-shadow:5px 0 25px #4d191811}.brand{display:flex;flex-direction:column;align-items:flex-start;padding:0 12px 29px;color:white}.brand-logo{width:160px;height:91px;display:grid;place-items:center;background:white;border-radius:10px;box-shadow:0 4px 14px #3e090a18;margin-bottom:21px}.brand-logo img{width:145px;height:77px;object-fit:contain}.brand-name{font-size:27px;font-weight:650;letter-spacing:-1px;line-height:1.2}.brand-name>span{font-weight:350;color:#f0b8b3}.brand-caption{margin-top:7px;font-size:8px;font-weight:600;letter-spacing:1.9px;color:#e8bdb9}.sidebar nav{display:flex;flex-direction:column;gap:6px}.nav-label{margin:16px 13px 7px;color:#e4b3b0;font-size:9px;letter-spacing:1.8px;font-weight:650}.sidebar nav a{display:flex;align-items:center;gap:13px;min-height:48px;padding:12px 14px;border-radius:9px;color:#f9e8e5;font-size:13px;font-weight:550;transition:background .16s,color .16s}.sidebar nav a:hover{background:#ffffff12;color:white}.sidebar nav a.active{background:#fffaf7;color:#9b201e;box-shadow:0 4px 14px #470b1320;font-weight:700}.sidebar-bottom{margin-top:auto;border-top:1px solid #ffffff25;padding:20px 10px 0;display:flex;gap:10px;color:#f4d5d0}.sidebar-bottom>.icon{width:19px;margin-top:2px}.sidebar-bottom strong{display:block;font-size:11px;font-weight:600}.sidebar-bottom small{display:block;font-size:10px;color:#d5a5a3;margin-top:4px}.workspace{margin-left:242px;min-width:0}.topbar{min-height:82px;padding:16px 32px;background:#fffcfa;border-bottom:1px solid #dfd9d4;display:flex;align-items:center;justify-content:space-between;gap:20px}.page-context{min-width:0}.page-context .eyebrow{color:#8c8580;font-size:8px;letter-spacing:1.4px}.page-context .eyebrow span{margin:0 5px;color:#c7b9b1}.page-context>strong{display:block;margin-top:5px;font-size:18px;font-weight:650;line-height:1.25}.profile{display:flex;align-items:center;gap:10px;flex-shrink:0}.profile-info strong{display:block;font-size:12px;font-weight:650}.profile-info small{display:block;color:var(--muted);font-size:10px;margin-top:2px}.avatar{width:37px;height:37px;display:inline-grid;place-items:center;flex:0 0 auto;background:#f1ded8;color:#a32320;border:1px solid #ead1c8;border-radius:11px;font-size:12px;font-weight:700}.avatar.mini{width:31px;height:31px;border-radius:9px;font-size:11px}.profile-password{display:flex;align-items:center;gap:6px;padding:8px 10px;color:#84756d;margin-left:9px;font-size:11px}.profile-password .icon{width:16px;height:16px}.logout-button{background:transparent!important}.content{max-width:1740px;padding:27px 32px 20px;margin:auto;min-width:0}
/* Struttura delle pagine */
.page-heading{display:flex;align-items:center;justify-content:space-between;gap:24px;margin-bottom:23px;padding:12px 0 12px 18px;border-left:3px solid var(--red)}.page-heading .eyebrow{margin-bottom:8px}.page-heading .muted{margin:0;font-size:13px}.dashboard-hero{border:0;position:relative;overflow:hidden;border-radius:17px;color:white;padding:28px 30px;min-height:166px;background:linear-gradient(112deg,#8c1c1c 0%,#b02721 68%,#bd382d 100%);box-shadow:0 8px 25px #8e25251b}.dashboard-hero:after{content:'';position:absolute;right:245px;top:-50px;width:160px;height:300px;transform:rotate(27deg);border-left:1px solid #ffffff16;border-right:24px solid #ffffff05;pointer-events:none}.hero-copy{position:relative;z-index:1}.dashboard-hero .eyebrow{color:#f0c7c0;font-size:9px}.dashboard-hero h1{font-size:clamp(23px,2.35vw,34px);margin-bottom:9px;letter-spacing:-.7px}.dashboard-hero p{margin-bottom:0;max-width:480px;color:#f1d3cb;font-size:12px;line-height:1.7}.hero-actions{position:relative;z-index:1;display:flex;flex-direction:column;align-items:flex-end;gap:14px;flex-shrink:0}.hero-date{display:inline-flex;align-items:center;gap:8px;color:#f6ded6;font-size:11px}.hero-date .icon{width:15px;height:15px}.card{min-width:0;padding:24px;background:#fffdfa;border:1px solid #e2dcd6;box-shadow:var(--shadow);border-radius:14px;margin-bottom:20px}.btn{min-height:41px;display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:10px 15px;border:1px solid #d9d1ca;border-radius:8px;color:#5d514a;background:#fffcf8;font-size:12px;font-weight:650;white-space:nowrap;transition:background .15s,box-shadow .15s}.btn .icon{width:17px;height:17px}.btn:hover{background:#f6eee7;border-color:#c7b4a7}.btn.primary{background:var(--red);color:white;border-color:var(--red);box-shadow:0 3px 8px #a71f1a15}.btn.primary:hover{background:#a91815;box-shadow:0 4px 12px #a71f1a24}.btn.hero-button{background:#fffaf6;color:#9f2420;border-color:#fff4ec;box-shadow:0 4px 14px #66151125;min-height:43px}.btn.hero-button:hover{background:white}.btn.small{min-height:34px;padding:7px 10px;font-size:11px}.btn.danger{color:#b2221e;background:#fff6f2;border-color:#dfb9ad;margin-top:18px}.btn:disabled{opacity:.65;cursor:progress}.full{width:100%}.grow{flex:1}.right{text-align:right}.toolbar{display:flex;align-items:center;flex-wrap:wrap;gap:9px;min-width:0}.toolbar.card{padding:15px 18px}.toolbar input,.toolbar select{width:auto;max-width:100%;min-height:39px;padding:8px 10px;font-size:12px}.toolbar .search{flex:1;min-width:180px}.period-toolbar{padding:0 0 19px}.period-range{margin-left:auto;color:#685e57;font-size:12px;font-weight:550}.period-range>span{margin:0 6px;color:#ab9281}.segmented{display:inline-flex;background:#e3ddd7;padding:4px;border-radius:9px;gap:3px}.segmented button{border:0;border-radius:6px;padding:7px 16px;color:#7e6f64;background:transparent;font-size:12px;font-weight:600}.segmented button.selected{color:#a02620;background:white;box-shadow:0 2px 5px #54403114}
/* Dashboard */
.kpi-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:15px}.kpi{padding:20px;overflow:hidden}.kpi-top{display:flex;align-items:flex-start;justify-content:space-between;gap:6px;min-height:36px}.kpi-top>span:first-child{color:#6b635e;font-size:11px;font-weight:600;max-width:140px}.kpi-icon{display:grid;place-items:center;background:#f5e9e1;color:#ad4033;padding:8px;border-radius:10px;flex:0 0 auto}.kpi-icon .icon{width:18px;height:18px}.kpi>strong{display:block;margin:9px 0 15px;font-size:41px;font-weight:650;letter-spacing:-1.3px;line-height:1.15;font-variant-numeric:tabular-nums}.kpi>strong em{margin-left:3px;color:#9e8a7e;font-size:22px;font-style:normal}.kpi>small{display:block;padding-top:12px;border-top:1px solid #eee5de;color:#75695f;font-size:10px}.kpi.accent{background:#f9e5dc;border-color:#edc9b9}.kpi.accent .kpi-icon{background:#fff8f0;color:#b02721}.kpi.accent>strong{color:#ac2921}.kpi.accent>small{border-color:#ebcbbf;color:#805b4c}.dash-grid{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(280px,1fr);gap:20px}.section-head{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:18px}.section-head .eyebrow{margin-bottom:7px;color:#80634f;font-size:8px}.section-head p{font-size:11px;margin-bottom:0}.badge{display:inline-block;padding:5px 9px;border-radius:6px;background:#f0ebe5;color:#88715d;font-size:10px;font-weight:650;white-space:nowrap}.badge.enabled{background:#e6f0e8;color:#35654c}.badge.disabled{background:#f8ded8;color:#a62b23}.chart{padding-top:1px}.bar-row{display:grid;grid-template-columns:100px minmax(0,1fr) 25px;align-items:center;gap:15px;margin:17px 0;font-size:11px}.bar-row>strong{text-align:right;font-variant-numeric:tabular-nums;font-weight:650;color:#65554b}.bar-track{height:9px;overflow:hidden;background:#f0eae3;border-radius:3px}.bar{height:100%;border-radius:3px;background:var(--event)}.dot{display:inline-block;width:7px;height:7px;margin-right:7px;border-radius:50%;background:var(--event)}.o-DaEsitare{--event:#a39588;--event-bg:#f3eee8}.o-Polizza{--event:#4c739d;--event-bg:#eaf1f7}.o-Positivo{--event:#488263;--event-bg:#eaf3e9}.o-Ritorno{--event:#b18735;--event-bg:#fcf4dc}.o-Negativo{--event:#645f62;--event-bg:#efebed}.o-Saltato{--event:#c05b4a;--event-bg:#fbe8df}.followup-card{background:#e9e1d6;border-color:#dbcebc;padding:23px}.followup-heading{display:flex;align-items:center;gap:10px;margin-bottom:15px}.feature-icon{width:31px;height:31px;display:grid;place-items:center;background:#fff8ef;color:#a43528;border-radius:9px}.feature-icon .icon{width:18px}.followup-heading .eyebrow{color:#8c6951;font-size:8px}.followup-card>.muted{font-size:11px;color:#766354;margin-bottom:8px}.insight{display:flex;align-items:center;gap:17px;padding:14px 0;border-bottom:1px solid #d7cbbb}.insight>strong{min-width:30px;font-size:30px;line-height:1;font-weight:650;color:#7b3b2e;font-variant-numeric:tabular-nums}.insight span{display:block;font-size:11px;color:#645146;font-weight:600}.insight small{display:block;font-size:10px;color:#7a6656;margin-top:3px}.followup-card>.btn{margin-top:20px;justify-content:space-between}.table-wrap{max-width:100%;overflow-x:auto;overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch}table{width:100%;border-collapse:collapse;font-size:12px;white-space:nowrap}th{padding:13px 14px;color:#8e7c6e;background:#f1ebe3;border-top:1px solid #e8dfd4;border-bottom:1px solid #e8dfd4;text-align:left;font-size:9px;font-weight:650;letter-spacing:.7px;text-transform:uppercase}td{padding:16px 14px;border-bottom:1px solid #eee5dd}tbody tr:last-child td{border-bottom:0}tbody tr:hover{background:#fbf5ee}.person-cell{display:flex;align-items:center;gap:11px}.person-cell strong{font-weight:600}.metric-number{font-variant-numeric:tabular-nums;font-weight:600;color:#6e5a4c}.count-badge{display:inline-block;min-width:28px;text-align:center;border-radius:6px;padding:4px 7px;background:#f6e4d9;color:#ac3b2c;font-size:11px;font-weight:650}.conversion-cell{display:flex;align-items:center;gap:12px;font-size:11px}.conversion-cell>strong{min-width:28px;font-weight:600}.conversion-track{display:block;width:65px;height:5px;background:#ece1d7;border-radius:5px;overflow:hidden}.conversion-track>span{display:block;height:100%;background:#bd4432}.empty{padding:33px 16px;margin:0;text-align:center;color:#7e6b5b;font-size:12px}
/* Planning: le altezze corrispondono alle posizioni calcolate dal server. */
.filters{padding:17px;background:#e9e3db;border-color:#dcd1c4}.filters .toolbar+.toolbar{margin-top:11px;padding-top:12px;border-top:1px solid #dbcebf}.legend{display:flex;flex-wrap:wrap;gap:15px;color:#877464;font-size:10px;margin-bottom:15px}.planner-wrap{overflow:auto;max-width:100%;max-height:720px;border:1px solid #d5c9bd;background:#fffdf9;box-shadow:var(--shadow);border-radius:12px;overscroll-behavior:contain}.planner{display:grid;min-width:340px}.time-heading,.column-heading{position:sticky;top:0;z-index:3;padding:16px 8px;border-right:1px solid #ded3c5;border-bottom:2px solid #c9ad98;background:#e9dfd2;display:flex;align-items:center;justify-content:center;gap:5px;font-size:11px}.column-heading>strong{font-weight:600}.time-heading{color:#a08470;font-size:8px;letter-spacing:1px}.time-axis{height:864px;background:#f6f0e7}.time-axis>div{height:72px;padding-top:4px;text-align:center;color:#ab8e77;font-size:10px}.day-column{position:relative;height:864px;border-left:1px solid #e8ded1}.slot{display:block;height:72px;padding:9px;text-align:right;color:#bb6b4e;border-bottom:1px solid #eee5d9}.slot:nth-child(even){background:#f8f4ec65}.slot>span{opacity:0}.slot:hover{background:#f9e9dc}.slot:hover>span{opacity:1}.event{position:absolute;left:5px;right:5px;padding:5px 8px;overflow:hidden;border-left:3px solid var(--event);border-radius:5px;background:var(--event-bg);color:#5b4c41;box-shadow:0 1px 4px #60472710;z-index:1}.event small{display:block;opacity:.8;font-size:10px}.event strong{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:11px}.event:hover{box-shadow:0 4px 13px #60472722}.week-grid{display:grid;grid-template-columns:repeat(7,minmax(150px,1fr));gap:11px;min-width:0;overflow-x:auto;overscroll-behavior-x:contain}.week-day{min-height:315px;padding:14px 11px;border-top:3px solid #c9ad98}.week-day h2{font-size:16px}.week-day .section-head{gap:8px}.week-day .eyebrow{font-size:9px}.week-event{display:block;margin:10px 0;padding:10px;background:var(--event-bg);color:#655144;border-left:3px solid var(--event);border-radius:5px}.week-event small{display:block;margin:3px 0;font-size:10px;opacity:.8}.week-event strong{font-size:12px}
/* Moduli */
.editor{max-width:940px;padding:25px 28px;border-top:3px solid #a62b23}.narrow{max-width:590px}.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:4px 22px}.form-grid>div{min-width:0}.span2{grid-column:span 2}label{display:block;margin:16px 0 7px;color:#7e6654;font-size:11px;font-weight:650}input,select,textarea{width:100%;min-width:0;max-width:100%;min-height:42px;padding:10px 12px;border:1px solid #d9cdbf;border-radius:7px;outline:0;color:#4d443e;background:#fffcf7}input::placeholder,textarea::placeholder{color:#b7a18c}input:focus,select:focus,textarea:focus{border-color:#b95542;background:white;box-shadow:0 0 0 3px #c2351f0d}input[type=checkbox],input[type=radio]{min-height:0;width:16px;height:16px;accent-color:var(--red);flex:0 0 auto}textarea{resize:vertical}.check{display:flex;align-items:center;gap:9px;min-height:42px}.help{font-size:11px;color:#7e6b5b;line-height:1.7;margin:11px 0 0}.form-actions{display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:10px;border-top:1px solid #e8dcd0;padding-top:20px;margin-top:25px}.tabs{display:flex;gap:8px;padding:5px;margin-bottom:24px;border-radius:9px;background:#ede3d7}.tabs button{flex:1;min-height:40px;padding:9px 12px;border:0;border-radius:6px;color:#8d7560;background:transparent;font-weight:600;font-size:12px}.tabs button.selected{background:#fffdf8;color:#a52b21;box-shadow:0 2px 5px #65482d15}.outcomes{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:11px;margin:23px 0}.outcome-choice{display:flex;align-items:center;gap:8px;padding:15px 12px;margin:0;border:1px solid #ddd0c2;border-radius:8px;background:var(--event-bg);color:#6a5645}.outcome-choice:has(input:checked){outline:2px solid var(--event);outline-offset:1px}.validation{background:#fce8df;color:#ab3020;border-radius:8px;font-size:12px}.validation:has(ul){padding:12px 17px;margin-bottom:20px;border-left:3px solid #c1543a}.validation ul{padding-left:16px;margin:0}.validation-summary-valid{display:none}.notice{display:flex;align-items:center;gap:10px;padding:13px 17px;margin-bottom:20px;border:1px solid;border-radius:9px;font-size:12px}.notice .icon{width:18px}.notice.success{background:#e9f0e5;color:#4f7047;border-color:#d2dfc9}.notice.error{background:#f8e0d4;color:#a03d27;border-color:#e9c7b4}dialog{width:min(440px,calc(100vw - 32px));max-width:100%;padding:28px;border:1px solid #d9beaa;border-top:4px solid var(--red);border-radius:14px;background:#fffcf7;color:var(--ink);box-shadow:0 24px 90px #2e140b40}dialog::backdrop{background:#33221c75;backdrop-filter:blur(3px)}dialog h2{margin-bottom:15px}dialog .form-actions{margin-top:21px}body.loading{cursor:progress}footer{display:flex;align-items:center;gap:11px;flex-wrap:wrap;border-top:1px solid #dcd0c2;padding:19px 0 4px;margin-top:31px;color:#a18b77;font-size:10px}footer>strong{color:#8e6c56;font-weight:650}.footer-security{display:flex;align-items:center;gap:5px;margin-left:auto}.footer-security .icon{width:13px;height:13px}
/* Login */
.auth-shell{min-height:100dvh;display:grid;grid-template-columns:1fr 1fr;background:#eee6dc}.auth-story{position:relative;overflow:hidden;padding:54px 10% 35px;display:flex;flex-direction:column;color:white;background:linear-gradient(148deg,#6d1b1e 0%,#9d211d 56%,#b33828 100%)}.auth-story:after{content:'';position:absolute;width:220px;height:130%;transform:rotate(23deg);right:-120px;top:-10%;border-left:1px solid #ffffff12;border-right:60px solid #ffffff04;pointer-events:none}.auth-brand{font-size:31px;font-weight:650;letter-spacing:-1px}.auth-brand>span{font-weight:350;color:#eebaae}.auth-brand>small{display:block;margin-top:3px;font-size:8px;font-weight:550;letter-spacing:2px;color:#e6b7aa}.auth-story-content{padding:70px 0;margin:auto 0;z-index:1}.auth-story .eyebrow{color:#edc1af;font-size:9px}.auth-story h1{margin:22px 0 23px;font-size:clamp(31px,3.5vw,54px);line-height:1.15;font-weight:600;letter-spacing:-1.7px}.auth-story p{max-width:380px;font-size:14px;line-height:1.9;color:#eac7b9}.auth-features{display:flex;gap:21px;flex-wrap:wrap;margin-top:38px;padding-top:22px;border-top:1px solid #ffffff23}.auth-features>span{display:flex;align-items:center;gap:8px;color:#f5dacd;font-size:11px}.auth-features .icon{width:17px;height:17px}.auth-story-footer{color:#dba997;font-size:10px;z-index:1}.auth-form-area{display:grid;place-items:center;padding:38px}.auth-card{width:100%;max-width:430px;padding:35px 38px;background:#fffcf8;border:1px solid #e5d7c5;border-radius:16px;box-shadow:0 15px 50px #5f311112}.login-logo{display:block;width:136px;height:77px;object-fit:contain;object-position:left;margin-bottom:26px}.auth-card .eyebrow{font-size:8px}.auth-card h2{margin:9px 0 10px;font-size:27px;letter-spacing:-.6px}.auth-card>p.muted{font-size:12px;line-height:1.7}.auth-card label{margin-top:17px}.auth-card input{min-height:44px}.auth-card .primary{min-height:45px;justify-content:space-between;margin-top:24px}.login-security{display:flex;justify-content:center;align-items:center;gap:7px;color:#765a43;margin-top:20px;font-size:10px}.login-security .icon{width:15px;height:15px}.auth-card>.help{text-align:center;font-size:10px;margin-top:18px}
/* Laptop e tablet */
@media(max-width:1250px){.content{padding:24px}.topbar{padding:15px 24px}.kpi{padding:16px}.kpi-icon{padding:6px}.kpi-top>span:first-child{font-size:10px}.kpi>small{font-size:9px}.profile-password>span{display:none}.hero-actions{gap:12px}.hero-button{font-size:11px}.dashboard-hero{padding:25px}.dashboard-hero p{max-width:345px}}
@media(max-width:1050px) and (min-width:681px){.sidebar{width:86px;padding:18px 10px}.brand{padding:0 0 22px;align-items:center}.brand-logo{width:64px;height:51px;border-radius:8px;margin:0}.brand-logo img{width:60px;height:42px}.brand-name,.brand-caption,.sidebar-bottom,.nav-label,.sidebar nav a>span{display:none}.sidebar nav{gap:10px}.sidebar nav a{justify-content:center;padding:13px 8px}.workspace{margin-left:86px}.sidebar nav a .icon{width:22px;height:22px}}
@media(max-width:1050px){.kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.kpi-top>span:first-child{font-size:12px;max-width:unset}.kpi>small{font-size:10px}.dash-grid{grid-template-columns:minmax(0,1.4fr) minmax(240px,1fr);gap:15px}.card{padding:21px}.kpi{padding:19px}.dashboard-hero h1{font-size:29px}}
@media(max-width:830px){.dash-grid{grid-template-columns:minmax(0,1fr)}.dashboard-hero{align-items:flex-start}.hero-actions .hero-date{font-size:10px}.dashboard-hero h1{font-size:26px}.hero-button{padding:10px}.hero-button .icon{display:none}.topbar{padding:14px 20px}.content{padding:22px 20px}.profile-info{max-width:140px}.profile-info strong{font-size:11px}.auth-form-area{padding:24px}.auth-card{padding:30px 26px}.auth-story{padding:35px 9%}.auth-features{gap:15px}}
/* Smartphone: controlli sempre raggiungibili, overflow limitato ai dati. */
@media(max-width:680px){.sidebar{position:sticky;top:0;width:100%;height:auto;padding:9px 12px;flex-direction:row;align-items:center;gap:12px;background:linear-gradient(110deg,#8b1d1d,#a62b23);box-shadow:0 3px 14px #551c1720}.brand{padding:0;flex:0 0 auto}.brand-logo{width:62px;height:46px;margin:0;border-radius:6px}.brand-logo img{width:58px;height:39px}.brand-name,.brand-caption,.sidebar-bottom,.nav-label{display:none}.sidebar nav{flex:1;min-width:0;flex-direction:row;justify-content:flex-end;gap:5px}.sidebar nav a{padding:8px 11px;min-height:44px;font-size:10px;gap:6px;border-radius:7px}.sidebar nav a .icon{width:17px;height:17px}.workspace{margin-left:0}.topbar{gap:10px;min-height:77px;padding:13px 16px}.page-context .eyebrow{font-size:7px;letter-spacing:.6px}.page-context>strong{font-size:15px}.profile{gap:7px}.profile>.avatar,.profile-info{display:none}.profile-password{margin-left:0;padding:9px 6px}.logout-button{padding:8px!important}.logout-button>.icon{display:none}.content{padding:21px 14px 16px}.page-heading{padding:5px 0 5px 13px;gap:15px;flex-wrap:wrap;margin-bottom:22px}.page-heading h1{font-size:26px}.page-heading .muted{font-size:12px}.page-heading>.btn{margin-top:2px}.dashboard-hero{padding:23px;flex-direction:column;align-items:stretch;gap:21px}.dashboard-hero h1{font-size:29px}.dashboard-hero p{font-size:12px;max-width:100%}.hero-actions{flex-direction:row;justify-content:space-between;align-items:center;gap:9px}.hero-actions .hero-date{font-size:9px;gap:5px;white-space:nowrap}.hero-date .icon{width:13px;height:13px}.hero-button{min-height:39px!important;font-size:10px;padding:9px 11px}.period-toolbar{gap:8px}.period-toolbar input{flex:1;width:132px;min-width:125px}.period-toolbar .segmented{padding:3px}.segmented button{padding:7px 12px}.period-range{width:100%;margin:5px 0 0;font-size:11px}.kpi-grid{gap:10px}.card{padding:18px;margin-bottom:16px;border-radius:11px}.kpi{padding:15px}.kpi-top>span:first-child{font-size:10px;max-width:105px}.kpi-icon{padding:5px;border-radius:7px}.kpi-icon .icon{width:15px;height:15px}.kpi>strong{font-size:36px;margin:8px 0 12px}.kpi>small{font-size:9px;min-height:37px}.kpi>strong em{font-size:19px}.dash-grid{gap:0}.section-head{gap:10px;flex-wrap:wrap}.section-head .eyebrow{font-size:7px}.section-head h2{font-size:17px}.bar-row{grid-template-columns:89px minmax(0,1fr) 22px;gap:12px}.filters{padding:14px}.toolbar{gap:8px}.toolbar .grow{display:none}.toolbar .search{min-width:100%}.filters .toolbar select{flex:1;max-width:100%;min-width:125px}.filters .toolbar input[type=date]{flex:1;min-width:130px}.filters .toolbar .btn{font-size:11px;padding:9px 12px}.legend{gap:10px;font-size:9px}.week-grid{grid-template-columns:repeat(7,minmax(200px,1fr))}.week-day{min-height:280px;padding:15px}.planner-wrap{max-height:620px}.column-heading{padding:13px 7px}.form-grid{grid-template-columns:minmax(0,1fr);gap:0}.span2{grid-column:auto}.editor{padding:20px 17px}.outcomes{grid-template-columns:repeat(2,minmax(0,1fr))}.outcome-choice{padding:13px 9px;gap:6px}.tabs{gap:3px}.tabs button{padding:9px 5px;font-size:11px}.form-actions{margin-top:21px}.form-actions>.btn{flex:1}footer{font-size:9px;gap:6px 10px;margin-top:23px}.footer-security{margin-left:0}.auth-shell{display:block;min-height:100dvh;background:#eee6dc}.auth-story{padding:23px 26px;background:linear-gradient(120deg,#841b1c,#aa2a21)}.auth-brand{font-size:25px}.auth-brand>small{font-size:7px}.auth-story-content,.auth-story-footer{display:none}.auth-form-area{padding:26px 17px}.auth-card{max-width:430px;padding:27px 25px}.login-logo{margin-bottom:23px}.auth-card h2{font-size:26px}}
@media(max-width:380px){.sidebar{padding:8px;gap:7px}.brand-logo{width:49px;height:42px}.brand-logo img{width:47px;height:34px}.sidebar nav{gap:4px}.sidebar nav a{flex-direction:column;gap:2px;padding:5px 9px;font-size:8px;min-height:45px}.hero-actions{align-items:stretch;flex-direction:column;gap:12px}.hero-button{align-self:flex-start}.dashboard-hero h1{font-size:27px}.kpi{padding:12px}.kpi-top{gap:4px}.kpi-icon{padding:4px}.kpi-top>span:first-child{font-size:9px}.kpi>strong{font-size:32px}.period-toolbar>.btn{width:100%}.period-toolbar input{min-width:130px}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{scroll-behavior:auto!important;transition:none!important}}
@media print{.sidebar,.topbar,footer,.page-heading>.btn,.hero-actions,.filters{display:none!important}.workspace{margin-left:0}.content{padding:0}body{background:white}.card,.dashboard-hero{box-shadow:none;break-inside:avoid}.dashboard-hero{color:#222;background:#eee}.dashboard-hero p,.dashboard-hero .eyebrow{color:#555}.table-wrap{overflow:visible}}
/* Nomi lunghi e campi touch: stabilita del layout e nessuno zoom automatico su iOS. */
.profile-info{max-width:170px}.profile-info strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.column-heading{min-width:0}.column-heading>strong{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.week-event strong{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
@media(max-width:680px){input,select,textarea,.toolbar input,.toolbar select{font-size:16px}.profile-info{max-width:120px}}
/* Identita dell'agenzia: nome completo leggibile, senza modificare il logo Generali. */
.brand-name{font-size:19px;line-height:1.3;letter-spacing:-.3px;max-width:190px}.brand-name>span{display:block;font-size:23px;font-weight:650;color:white;margin-top:2px}.auth-brand{font-size:25px;line-height:1.3;letter-spacing:-.5px}.auth-brand>span{display:block;font-size:34px;font-weight:650;color:white}.auth-brand>small{margin-top:9px}
@media(max-width:680px){.auth-brand{font-size:17px}.auth-brand>span{font-size:25px}.auth-brand>small{margin-top:6px}}

/* Logo Generali accanto al nome dell'agenzia nella login. */
.auth-agency{display:flex;align-items:center;gap:20px;position:relative;z-index:1}.auth-agency-logo{display:block;flex:0 0 auto;width:88px;height:88px;object-fit:contain;background:#fff;border-radius:12px;padding:5px;box-shadow:0 6px 20px #4a101024}.auth-agency .auth-brand{min-width:0}
@media(min-width:681px) and (max-width:1100px){.auth-agency{gap:14px}.auth-agency-logo{width:70px;height:70px}.auth-agency .auth-brand{font-size:20px}.auth-agency .auth-brand>span{font-size:28px}}
@media(max-width:680px){.auth-agency{gap:14px}.auth-agency-logo{width:64px;height:64px;border-radius:9px;padding:3px}}
@media(max-width:360px){.auth-agency{gap:12px}.auth-agency-logo{width:56px;height:56px}.auth-agency .auth-brand{font-size:16px}.auth-agency .auth-brand>span{font-size:23px}}

/* Produzione assicurativa: riepiloghi, avanzamento e schede commerciali. */
.production-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}.production-summary .card{min-width:0}.production-summary strong{display:block;margin:12px 0 8px;font-size:29px;line-height:1.2;letter-spacing:-.6px;font-variant-numeric:tabular-nums}.production-summary small{display:block;color:var(--muted);font-size:11px}.production-section{margin-top:30px;padding-top:23px;border-top:1px solid var(--line)}.production-status-list{display:grid;gap:8px;margin:14px 0;font-size:11px}.production-status-list>span{display:flex;align-items:center}.production-status-list b{margin-left:auto}.p-FuoriProduzione{--event:#949ba6;--event-bg:#eeeff1}.p-Presentata{--event:#b18735;--event-bg:#fcf4dc}.p-Emessa{--event:#4c739d;--event-bg:#eaf1f7}.p-Perfezionata{--event:#488263;--event-bg:#eaf3e9}.p-Annullata{--event:#c05b4a;--event-bg:#fbe8df}.badge[class*="p-"]{background:var(--event-bg);color:var(--event)}.production-link{max-width:940px}.production-link p{font-size:12px}
@media(max-width:830px){.production-summary{grid-template-columns:1fr}.production-summary .card{margin-bottom:0}.production-summary{margin-bottom:18px}.production-summary strong{font-size:27px}}
@media(max-width:380px){.sidebar nav a{padding:5px 6px}.sidebar nav a>span{font-size:8px}}
@media(max-width:680px){.sidebar nav a{flex-direction:column;gap:2px;padding:6px 7px;font-size:9px}.sidebar nav a>span{white-space:nowrap}.sidebar nav{gap:3px}}

/* Revisione operativa: marchio, intervalli, sezioni e polizze. */
.brand{padding-left:0;padding-right:0;width:100%}.brand-logo{width:100%;height:110px}.brand-logo img{width:calc(100% - 24px);height:94px}.brand-name{font-size:26px;max-width:none;line-height:1.2;letter-spacing:-.5px}.brand-name>span{font-size:21px;font-weight:550;margin-top:5px}.auth-brand{font-size:32px;line-height:1.22;font-weight:700}.auth-brand>span{font-size:25px;font-weight:550;margin-top:6px}.auth-brand>small{font-size:8px}.range-field{display:flex;flex-direction:column;gap:5px;margin:0;font-size:10px}.range-field input{margin:0}.dashboard-section{margin:30px 0 40px}.dashboard-section-heading{padding:0 0 16px;border-bottom:1px solid var(--line);margin-bottom:20px}.dashboard-section-heading h2{font-size:27px;margin:7px 0}.dashboard-section-heading p{font-size:12px;margin:0}.production-kpis .kpi>strong{font-size:clamp(21px,2vw,30px)}.policy-number-box{padding:18px 22px;border-radius:10px;background:#f4e9e1;border:1px solid #dfc7b8;margin-bottom:20px}.policy-number-box label{margin-top:0}.policy-number-box input{font-size:19px;font-weight:600;background:#fffdf9}.policy-owner{margin:0 0 24px;max-width:410px}.three-columns{grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}.policy-state-help{font-size:11px;color:var(--muted);margin-top:15px}.policy-counts{display:flex;gap:10px;flex-wrap:wrap;margin:8px 0 20px}.policy-counts .badge{font-size:12px;padding:9px 14px}.month-grid{display:grid;grid-template-columns:repeat(7,minmax(145px,1fr));gap:9px;overflow-x:auto;margin-bottom:20px}.month-grid .week-day{min-height:160px;padding:12px}.month-grid .week-event{padding:7px;font-size:11px}.planner-day-label{margin:20px 0 12px}.outcomes{grid-template-columns:repeat(3,minmax(0,1fr))}input[readonly]{background:#eee9e3;color:#695c52;border-style:dashed;cursor:default}
@media(min-width:681px) and (max-width:1100px){.auth-agency .auth-brand{font-size:25px}.auth-agency .auth-brand>span{font-size:21px}}
@media(min-width:681px) and (max-width:1050px){.brand-logo{width:64px;height:51px}.brand-logo img{width:60px;height:42px}}
@media(max-width:680px){.brand{width:auto}.brand-logo{width:62px;height:46px}.brand-logo img{width:58px;height:39px}.auth-agency .auth-brand{font-size:23px}.auth-agency .auth-brand>span{font-size:18px}.three-columns{grid-template-columns:1fr;gap:0}.outcomes{gap:6px}.outcome-choice{padding:11px 6px;font-size:10px;gap:4px}.outcome-choice .dot{display:none}.range-field{flex:1;min-width:125px}.range-field input{width:100%}.production-kpis .kpi>strong{font-size:22px}.dashboard-section-heading h2{font-size:24px}.month-grid{grid-template-columns:repeat(7,minmax(180px,1fr))}}
@media(max-width:380px){.brand-logo{width:49px;height:42px}.brand-logo img{width:47px;height:34px}.auth-agency .auth-brand{font-size:22px}.auth-agency .auth-brand>span{font-size:17px}}/* Date filters: align the controls below their labels on every wrapped row. */
.period-toolbar,.filters>.toolbar:first-child{align-items:flex-end}
.period-toolbar .range-field input,.filters>.toolbar:first-child .range-field input,.filters>.toolbar:first-child>select{height:44px;min-height:44px}
.period-toolbar>.btn,.filters>.toolbar:first-child>.btn{height:44px;min-height:44px}
.period-toolbar>.segmented{height:44px;box-sizing:border-box;align-items:stretch}
.period-toolbar>.period-range{align-self:center}
