:root{font-family:Arial,Helvetica,sans-serif;color:#19345a;background:#f0f2f5;font-size:15px}*{box-sizing:border-box}body{margin:0}header{background:#0a4a8a;color:white;padding:24px max(24px,calc((100vw - 1400px)/2));display:flex;justify-content:space-between;align-items:center;box-shadow:0 3px 12px #16335222}header>div{font-size:25px;font-weight:700}.brand-icon{color:#aac9ff;margin-right:9px}.light{font-weight:400;color:#dbe9ff}header small{color:#dbe9ff}main{max-width:1448px;margin:auto;padding:26px 24px}.toolbar,.actions,.panel-head,.filters{display:flex;align-items:center;gap:12px;justify-content:space-between}.month-label{font-size:11px;font-weight:bold;letter-spacing:1px;display:grid;gap:7px}input,select,button{font:inherit;border:1px solid #cdd5df;border-radius:7px;padding:12px;background:white;color:#19345a;min-height:44px}button{cursor:pointer;font-weight:600}button:hover{background:#eaf1f9}button.primary{background:#0a4a8a;color:white;border-color:#0a4a8a}input:focus,button:focus-visible,select:focus{outline:3px solid #9ac9fa}#month{font-size:19px;font-weight:700;min-width:220px}.notice{font-size:12px;color:#67532c;background:#fff7e7;padding:10px 13px;border-radius:6px;margin:18px 0}.stats{display:grid;grid-template-columns:repeat(4,1fr);gap:18px}.stats article{background:white;border-radius:9px;padding:22px 18px;text-align:center;box-shadow:0 3px 8px #152b4517;border:1px solid #e4e8ee}.symbol{font-size:32px;display:block;margin-bottom:14px}.stats p{font-size:14px;color:#5f6c7e;margin:0 0 8px}.stats strong{font-size:34px;display:block;letter-spacing:-1px}.stats small{display:block;color:#6c7989;font-size:12px;margin-top:9px}.track{height:5px;background:#e9edf3;border-radius:5px;margin:12px 0 0;overflow:hidden}.track i{display:block;height:100%;background:#43a778}nav{display:flex;gap:8px;margin:25px 0 14px}nav button{border:0;background:transparent;color:#62728a}nav .active{background:#e0eaf7;color:#0a4a8a}.panel{background:white;border-radius:9px;box-shadow:0 3px 8px #152b4512;border:1px solid #e4e8ee;overflow:hidden}.panel-head{padding:22px;flex-wrap:wrap}h1{font-size:20px;margin:0 0 7px}.panel-head p{font-size:12px;color:#738095;margin:0}.filters{flex-wrap:wrap;justify-content:flex-end}.filters input{width:190px}.filters button,.filters select{font-size:12px}.table-wrap{overflow:auto}table{border-collapse:collapse;width:100%;white-space:nowrap;font-size:13px}th{text-align:left;background:#edf1f6;color:#52617a;font-size:11px;padding:13px 12px}td{padding:15px 12px;border-bottom:1px solid #e7ecf2}tbody tr:nth-child(even){background:#fafbfd}td:nth-child(2){font-weight:700}td button{padding:7px 10px;font-size:12px;min-height:36px}.badge{display:inline-block;padding:7px 10px;border-radius:5px;font-weight:bold;font-size:11px}.done{background:#e0f3e7;color:#267947}.pending{background:#fce6e4;color:#b6322b}.quick{background:#e6f4ec;color:#267947;border-color:#c3e1ce}footer{padding:16px 22px;font-weight:600;font-size:13px;background:#f8fafc}.bottom-note{text-align:center;color:#8793a3;font-size:12px;margin:25px}dialog{border:0;border-radius:12px;padding:25px;width:min(600px,94vw);max-height:90vh;box-shadow:0 20px 80px #0005}dialog::backdrop{background:#10274788}.dialog-head,.dialog-actions{display:flex;justify-content:space-between;align-items:center;gap:12px}h2{font-size:21px}.dialog-head button{border:0}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin:20px 0}.form-grid label{display:grid;gap:7px;font-size:12px;font-weight:bold}.form-grid input,.form-grid select,.form-grid textarea{width:100%;font-size:15px}.form-grid textarea{padding:12px;border:1px solid #cdd5df;border-radius:7px}.wide{grid-column:1/-1}.dialog-actions{justify-content:flex-end;margin-top:20px}#formError{color:#b6322b;font-size:13px}.client-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:16px;padding:0 22px 22px}.client-card{border:1px solid #e1e7ef;border-radius:8px;padding:18px}.client-card h3{font-size:16px;margin-top:0}.client-card p{font-size:13px;color:#667489;line-height:1.5}.client-card button{font-size:12px}.history{grid-column:1/-1;line-height:1.7}#toast{position:fixed;bottom:22px;left:50%;transform:translateX(-50%);background:#163a5e;color:white;padding:13px 22px;border-radius:8px;display:none;z-index:5}[hidden]{display:none!important}@media(max-width:850px){header small{display:none}.stats{gap:12px}.stats strong{font-size:26px}.toolbar{align-items:flex-start}.actions{flex-wrap:wrap;justify-content:flex-end}.client-grid{grid-template-columns:1fr 1fr}.filters{justify-content:flex-start}}@media(max-width:560px){header{padding:20px 16px}header>div{font-size:20px}main{padding:18px 12px}.toolbar{flex-direction:column;gap:14px}.actions{justify-content:flex-start}.actions button{font-size:12px}.stats{grid-template-columns:1fr 1fr}.stats article{padding:18px 10px}.stats strong{font-size:27px}.symbol{font-size:27px;margin-bottom:10px}.stats p{font-size:12px}.panel-head{padding:17px}.filters{gap:8px}.filters input{width:100%}td:nth-child(2),th:nth-child(2){position:sticky;left:0;background:#fff;box-shadow:3px 0 5px #0001;z-index:1}.client-grid{grid-template-columns:1fr;padding:0 17px 17px}.form-grid{grid-template-columns:1fr}.wide{grid-column:auto}.notice{line-height:1.5}}@media print{header{background:white;color:#163a5e;padding:10px}main{padding:0}.toolbar,.notice,nav,.filters,.bottom-note,td:last-child,th:last-child,dialog,#toast{display:none!important}.stats{gap:8px}.stats article{box-shadow:none;padding:10px}.symbol{display:none}.stats strong{font-size:24px}.panel{box-shadow:none;margin-top:15px}table{font-size:9px}td,th{padding:8px 5px}.table-wrap{overflow:visible}td:nth-child(2),th:nth-child(2){position:static}.quick{display:none}#clients{display:none!important}}

/* Disposizione aggiornata: azioni accanto al mese, ordini leggibili su telefono. */
.toolbar{justify-content:flex-start;align-items:flex-end;gap:16px}.actions{justify-content:flex-start}.data-tools{margin-top:22px;padding:15px 18px;border:1px solid #dce3ec;border-radius:8px;background:white;color:#617089;font-size:13px}.data-tools summary{cursor:pointer;font-weight:bold;min-height:28px}.data-tools p{line-height:1.6;max-width:700px}.data-tools button{margin:6px 4px 0 0;font-size:13px}
@media(max-width:560px){.toolbar{flex-direction:row;align-items:flex-end;gap:10px}.month-label{min-width:0;flex:1;letter-spacing:.5px}#month{min-width:0;width:100%;font-size:16px;padding:10px 7px}.actions{flex-shrink:0}.actions button{font-size:14px;padding:12px 10px}.filters{display:grid;grid-template-columns:1fr 1fr;width:100%}.filters input,.filters select{grid-column:1/-1;width:100%;font-size:16px}.filters button{font-size:12px}.table-wrap{overflow:visible;padding:0 12px}table,tbody{display:block;white-space:normal}thead{display:none}tbody tr{display:grid;grid-template-columns:1fr 1fr;margin-bottom:14px;border:1px solid #dce4ee;border-radius:8px;overflow:hidden;background:white!important}td{display:flex;flex-direction:column;gap:5px;padding:11px 12px;font-size:14px;min-width:0;border-bottom:1px solid #eef1f5}td::before{content:attr(data-label);font-size:10px;color:#738095;font-weight:normal}td:nth-child(2){grid-column:1/-1;grid-row:1;position:static;background:#edf3fb;box-shadow:none;font-size:16px;padding:14px 12px}td:nth-child(2)::before{display:none}td:nth-child(8),td:last-child{grid-column:1/-1}td:nth-child(8){flex-direction:row;flex-wrap:wrap;align-items:center}td:nth-child(8)::before{display:none}td:last-child::before{display:none}td:last-child button{min-height:44px;font-size:14px}td .quick{min-height:44px;font-size:14px;margin-left:auto}.badge{font-size:12px}.form-grid input,.form-grid select,.form-grid textarea{font-size:16px}footer{line-height:1.6}.stats strong{font-size:25px}nav button{font-size:14px}}
@media print{.data-tools{display:none}}

.toolbar{justify-content:flex-end}@media(max-width:560px){.month-label{flex:0 1 220px}.toolbar{justify-content:flex-end}}

header>div{display:flex;align-items:center;gap:12px}.company-logo{width:150px;height:66px;object-fit:contain;flex-shrink:0}@media(max-width:560px){header>div{flex-wrap:wrap;gap:8px;font-size:18px}.company-logo{width:105px;height:46px}.light{font-size:16px}}
.general-summary{margin-right:auto;font-size:13px;line-height:1.7;color:#52617a}.general-summary b{font-size:12px}.general-summary ul{padding-left:19px;margin:5px 0 0}.summary-link{padding:0;border:0;background:transparent;color:#b6322b;min-height:30px;text-align:left;font-size:14px;text-decoration:underline}.summary-link.clear{color:#267947}.summary-link:hover{background:transparent}#backMonth{margin-top:10px;font-size:12px}@media(max-width:700px){.toolbar{flex-wrap:wrap}.general-summary{order:3;width:100%;margin:5px 0 0}.month-label{margin-left:auto}}@media print{.general-summary,#backMonth{display:none}}
#paymentAmount{display:block;background:#edf3fb;padding:12px;border-radius:7px;min-height:44px;line-height:1.5;font-size:14px}
.auth-panel{max-width:430px;margin:50px auto;padding:30px;background:white;border-radius:12px;box-shadow:0 5px 25px #1232}.auth-panel>img{width:160px;display:block;margin:0 auto 22px}.auth-panel h1{text-align:center}.auth-panel p{font-size:14px;color:#60718a;line-height:1.6}.auth-panel label{display:grid;gap:8px;margin:18px 0}.auth-panel input{width:100%;font-size:16px}.auth-panel button{width:100%}#authError{color:#b6322b}.recovery-note{font-size:12px!important}#logout{font-size:12px;padding:8px 14px;min-height:36px;background:#ffffff15;color:white;border-color:#ffffff55}#reloadCloud{font-size:12px;padding:7px;min-height:32px}@media(max-width:560px){.auth-panel{margin:25px 12px;padding:24px}header{flex-wrap:wrap;gap:8px}}