*{box-sizing:border-box}body{margin:0;background:#f5f6f8;color:#202630;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;font-size:14px}button,input,select,textarea{font:inherit}button{cursor:pointer}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:3px solid #94b5ff;outline-offset:3px}button{border:0;border-radius:10px;padding:11px 15px;background:#eef1f6;color:#394251}button:hover{filter:brightness(.97)}.primary{background:#3265ed;color:white}.shell{display:grid;grid-template-columns:232px 1fr;min-height:100vh}.sidebar{background:#fff;border-right:1px solid #e6e9ef;padding:31px 20px;display:flex;flex-direction:column;position:fixed;width:232px;height:100vh}.brand{display:flex;gap:10px;align-items:center;font-size:21px;letter-spacing:-.8px;font-weight:700;margin:0 9px 32px}.logo{display:grid;place-items:center;background:#3265ed;color:white;width:34px;height:34px;border-radius:11px;font-weight:800}.brand small{display:block;font-size:10px;letter-spacing:1.8px;color:#8992a3;margin-top:5px}.workspace{padding:14px;background:#f6f7fa;border:1px solid #edf0f4;border-radius:12px;margin-bottom:30px}.workspace strong{display:block;margin-bottom:5px}.muted{color:#88909f;font-size:12px}.nav{display:flex;flex-direction:column;gap:7px}.nav button{display:flex;gap:12px;text-align:left;align-items:center;background:transparent;color:#737d8f;padding:13px}.nav button.active{background:#edf2ff;color:#3265ed;font-weight:600}.nav svg{width:19px;height:19px}.sidebar-bottom{margin-top:auto;border-top:1px solid #edf0f4;padding:20px 9px 0}.avatar{background:#e8eefa;color:#5878b9;width:34px;height:34px;border-radius:50%;display:inline-grid;place-items:center;font-weight:600}.profile{display:flex;gap:10px;align-items:center}.main{grid-column:2;min-width:0}.topbar{height:79px;background:#ffffffa8;border-bottom:1px solid #e6e9ef;display:flex;justify-content:space-between;align-items:center;padding:0 40px;gap:15px}.search{border:0;background:transparent;min-width:280px;padding:10px;color:#5d6777}.topright{display:flex;gap:15px;align-items:center}.demo{font-size:11px;background:#eef2f9;color:#68758b;padding:6px 9px;border-radius:6px}.content{max-width:1440px;margin:auto;padding:35px 40px 24px}.eyebrow{text-transform:uppercase;letter-spacing:1.7px;font-size:10px;font-weight:700;color:#8590a3}.heading{display:flex;align-items:center;justify-content:space-between;gap:18px;margin:10px 0 28px}.heading h1{font-size:30px;letter-spacing:-1px;margin:0 0 8px;font-weight:650}.heading p{margin:0;color:#8791a0;font-size:13px}.actions{display:flex;gap:8px;align-items:center}.stats{display:grid;grid-template-columns:repeat(4,1fr);gap:18px;margin-bottom:27px}.card{background:white;border:1px solid #e7eaf0;border-radius:15px;padding:23px}.stat-title{display:flex;justify-content:space-between;color:#788396;font-size:12px}.stat-title span:last-child{color:#7b94cb}.stat-value{font-size:29px;font-weight:650;letter-spacing:-1px;margin:18px 0 10px}.positive{color:#289a76;font-size:11px}.stat-note{color:#8c95a3;font-size:11px}.grid{display:grid;grid-template-columns:minmax(0,1.9fr) minmax(280px,1fr);gap:22px}.card-title{display:flex;justify-content:space-between;align-items:center;margin-bottom:22px}.card-title h2{font-size:15px;margin:0;font-weight:600}.link{padding:0;background:transparent;color:#3265ed;font-size:12px}.chart{height:170px;display:flex;align-items:end;gap:15px;padding:0 5px;border-bottom:1px solid #edf0f5;margin:10px 0 15px}.bar-group{flex:1;display:flex;align-items:end;justify-content:center;gap:5px;height:100%;position:relative}.bar{width:22%;border-radius:5px 5px 0 0;background:#3265ed}.bar.soft{background:#dce6ff}.chart-labels{display:flex;justify-content:space-around;color:#9aa2af;font-size:10px}.legend{display:flex;gap:18px;font-size:11px;color:#8690a0;margin-top:22px}.dot{width:7px;height:7px;background:#3265ed;display:inline-block;border-radius:50%;margin-right:6px}.feed-item{display:flex;gap:12px;padding:13px 0;border-bottom:1px solid #f0f2f6}.feed-icon{width:32px;height:32px;border-radius:10px;background:#edf3ff;color:#3265ed;display:grid;place-items:center;flex-shrink:0}.feed-item strong{font-size:12px;display:block;font-weight:550;margin-bottom:6px}.feed-item p{margin:0;color:#939cab;font-size:11px;line-height:1.6}.table-card{margin-top:23px;padding:23px 0 8px;overflow:hidden}.table-card .card-title{padding:0 23px}table{border-collapse:collapse;width:100%;text-align:left}th{background:#fafbfd;font-size:10px;font-weight:600;text-transform:uppercase;letter-spacing:.6px;color:#929aa7;padding:13px 20px}td{padding:17px 20px;border-bottom:1px solid #f0f2f6;font-size:12px;white-space:nowrap}td strong{display:block;font-weight:550;margin-bottom:4px}.table-wrap{overflow:auto}.badge{padding:6px 9px;border-radius:6px;font-size:10px;display:inline-block;background:#eff2f7;color:#7c8593}.badge.blue{background:#eef3ff;color:#3265ed}.badge.green{background:#eaf8f2;color:#269570}.badge.orange{background:#fff4e7;color:#c89139}.progress{width:95px;height:5px;background:#edf0f5;border-radius:5px;display:inline-block}.progress i{display:block;height:5px;background:#3265ed;border-radius:5px}.footer{display:flex;justify-content:space-between;color:#a0a7b3;font-size:10px;padding:24px 2px;gap:15px}.banner{margin-bottom:24px;display:flex;justify-content:space-between;gap:18px;align-items:center;padding:20px 24px;background:#ecf2ff;border:1px solid #dfe8ff;border-radius:14px;color:#5673aa}.banner strong{display:block;color:#345d9e;margin-bottom:5px}.banner p{font-size:12px;margin:0;line-height:1.6}.filters{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:20px}.filters button.selected{background:#e8efff;color:#3265ed}.empty{padding:45px;text-align:center;color:#8a94a4}.board{display:grid;grid-template-columns:repeat(3,1fr);gap:20px}.column{border-radius:14px;background:#edf0f5;padding:16px}.column h3{font-size:12px;color:#788397;margin:3px 0 20px}.job{padding:19px;margin-bottom:12px;cursor:pointer}.job h3{font-size:14px;color:#273142;margin:13px 0 7px}.job p{font-size:12px;color:#8994a5;line-height:1.6}.job-bottom{display:flex;justify-content:space-between;margin-top:22px;color:#8d96a6;font-size:11px}.clients{display:grid;grid-template-columns:repeat(3,1fr);gap:20px}.client h3{font-size:16px}.client p{font-size:12px;color:#8791a0;line-height:1.8}dialog{border:1px solid #e4e8ee;border-radius:20px;width:650px;max-width:calc(100vw - 30px);padding:30px;color:#273142;max-height:90vh;overflow:auto}dialog::backdrop{background:#17213b66;backdrop-filter:blur(5px)}.modal-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:20px}.modal-head h2{font-size:21px;margin:0}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px}label{display:block;font-size:12px;color:#748195}label input,label select,label textarea{display:block;width:100%;border:1px solid #dfe4ed;border-radius:9px;background:white;color:#273142;padding:11px;margin-top:7px}textarea{min-height:80px;resize:vertical}.wide{grid-column:1/-1}.line{display:grid;grid-template-columns:1fr 65px 95px 35px;gap:8px;margin-top:10px}.line input{min-width:0;width:100%;padding:10px;border:1px solid #dfe4ed;border-radius:8px}.total{text-align:right;font-size:24px;margin:20px 0}.modal-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:25px}.detail-pair{display:flex;justify-content:space-between;padding:12px 0;border-bottom:1px solid #eef1f5;font-size:13px}.tasks label{display:flex;align-items:center;gap:12px;padding:14px 0}.tasks input{width:18px;height:18px;margin:0}.mobile-menu{display:none}#toast{position:fixed;bottom:25px;left:50%;transform:translateX(-50%);background:#253249;color:white;border-radius:12px;padding:14px 22px;box-shadow:0 10px 30px #17213b33;display:none;z-index:9}body.printing .shell{display:none}@media(max-width:1150px){.sidebar{width:200px}.shell{grid-template-columns:200px 1fr}.content{padding:28px}.topbar{padding:0 28px}.stats{gap:12px}.card{padding:19px}.grid{grid-template-columns:1.6fr 1fr}.clients{grid-template-columns:repeat(2,1fr)}.search{min-width:200px}}@media(max-width:850px){.sidebar{width:75px;padding:26px 12px}.shell{grid-template-columns:75px 1fr}.brand{margin:0 7px 30px}.brand-text,.workspace,.nav span,.sidebar-bottom{display:none}.nav button{justify-content:center}.stats{grid-template-columns:repeat(2,1fr)}.grid{grid-template-columns:1fr}.board{grid-template-columns:1fr}.topbar{height:67px}.heading{align-items:flex-start}.heading h1{font-size:26px}.actions{flex-wrap:wrap;justify-content:end}.footer{line-height:1.6}.content{padding:24px}.topright .avatar{display:none}}@media(max-width:520px){.content{padding:22px 15px}.topbar{padding:0 15px}.search{min-width:0;width:145px;font-size:12px}.topright{gap:5px}.heading{display:block}.heading .actions{justify-content:start;margin-top:18px}.stats{gap:10px}.stat-value{font-size:25px}.card{padding:17px}.clients{grid-template-columns:1fr}.banner{display:block;padding:17px}.banner button{margin-top:12px}.form-grid{grid-template-columns:1fr}.line{grid-template-columns:1fr 45px 70px 30px;gap:4px}.footer{display:block}.footer span{display:block}.demo{font-size:9px}.legend{gap:10px}}@media print{body{background:white}.shell,#toast,.modal-actions,.modal-head button{display:none!important}dialog[open]{display:block;position:static;border:0;width:100%;max-width:none;max-height:none}dialog::backdrop{background:white}}
.integration-panel{background:#f6f9ff;border:1px solid #dce7fc;border-radius:12px;padding:18px;margin-top:20px}.integration-panel p{font-size:12px;color:#7b879b;line-height:1.7}.integration-panel .card-title{margin-bottom:12px}.invoice-flow{display:grid;grid-template-columns:repeat(3,1fr);gap:20px;margin-bottom:24px}.invoice-flow>div{background:white;border:1px solid #e7eaf0;border-radius:14px;padding:22px}.invoice-flow span{display:block;color:#3265ed;font-size:12px;margin-bottom:15px}.invoice-flow strong{font-size:14px}.invoice-flow p{color:#8c96a6;font-size:12px;line-height:1.7;margin-bottom:0}.invoice-stats{grid-template-columns:repeat(3,1fr)}button:disabled{opacity:.45;cursor:not-allowed}@media(max-width:650px){.invoice-flow,.invoice-stats{grid-template-columns:1fr}.detail-pair{gap:15px;flex-wrap:wrap}}

.footer a{color:inherit;text-decoration:none}.footer a:hover{color:#3265ed;text-decoration:underline}

/* Telefono: menu in basso, intestazione compatta, tabelle con le sole colonne essenziali. */
@media(max-width:520px){
.shell{display:block}
.main{padding-bottom:calc(64px + env(safe-area-inset-bottom))}
.sidebar{top:auto;bottom:0;left:0;width:100%;height:auto;flex-direction:row;align-items:center;padding:6px 6px calc(6px + env(safe-area-inset-bottom));border-right:0;border-top:1px solid #e6e9ef;z-index:5}
.sidebar .brand{display:none}
.nav{flex-direction:row;gap:0;width:100%;justify-content:space-between}
.nav button{flex:1;padding:12px 0;border-radius:10px}
.topbar label{flex:1;min-width:0}
.search{flex:1;width:auto;min-width:0}
.demo{white-space:nowrap}
#toast{bottom:calc(78px + env(safe-area-inset-bottom));width:calc(100% - 30px);text-align:center}
th,td{padding:13px 8px}th:first-child,td:first-child{padding-left:15px}th:last-child,td:last-child{padding-right:15px}
.table-card{padding:18px 0 8px}
.table-card .card-title{padding:0 15px}
td:first-child{white-space:normal;min-width:130px}
.t-quotes th:nth-child(2),.t-quotes td:nth-child(2),.t-quotes th:nth-child(3),.t-quotes td:nth-child(3),.t-quotes th:nth-child(6),.t-quotes td:nth-child(6),
.t-jobs th:nth-child(2),.t-jobs td:nth-child(2),.t-jobs th:nth-child(3),.t-jobs td:nth-child(3),.t-jobs th:nth-child(5),.t-jobs td:nth-child(5),
.t-ajobs th:nth-child(3),.t-ajobs td:nth-child(3),
.t-ajobs th:nth-child(4),.t-ajobs td:nth-child(4),
.t-inv th:nth-child(2),.t-inv td:nth-child(2){display:none}
.t-inv td:last-child,.t-inv td:nth-child(4){white-space:normal}.t-inv .badge{white-space:normal;line-height:1.3}
.t-inv td:first-child,.t-ajobs td:first-child{min-width:105px}
dialog{padding:20px 16px}
.modal-actions{flex-wrap:wrap}
.modal-actions button{flex:1 1 auto}
}

