:root{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:#16302e;background:#f4f6f4;font-synthesis:none;--ink:#15332f;--muted:#72827c;--dark:#102d2b;--green:#267b64;--mint:#e6f5ed;--red:#b33946;--rose:#fff1f1;--line:#e2e9e5;--accent:#b9dfc9;--paper:#fff;--shadow:0 9px 30px rgba(15,45,35,.055);-webkit-tap-highlight-color:transparent}
*{box-sizing:border-box}body{margin:0;min-height:100dvh}button,input,select,textarea{font:inherit}button{cursor:pointer}button:disabled{opacity:.5;cursor:not-allowed}button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:3px solid #8dd1b4;outline-offset:2px}#app{min-height:100dvh}.shell{max-width:1050px;margin:auto;padding:22px 22px 116px}.mast{display:flex;align-items:center;gap:12px;justify-content:space-between;margin:2px 0 27px}.brand{display:flex;gap:10px;align-items:center}.brandmark{width:41px;height:41px;display:grid;place-items:center;border-radius:13px;background:var(--dark);color:#c0e8d0;font-size:18px;font-weight:900;letter-spacing:-2px}.brand-title{font-size:19px;font-weight:850;letter-spacing:-.7px;color:var(--dark);line-height:1}.brand-sub{font-size:11px;letter-spacing:.8px;color:var(--muted);margin-top:5px;text-transform:uppercase;font-weight:700}.tag{font-size:12px;font-weight:700;background:#e9f1ed;color:#45675b;border:1px solid #d7e6dd;padding:8px 10px;border-radius:20px}.eyebrow{font-size:11px;text-transform:uppercase;letter-spacing:1.5px;font-weight:800;color:var(--green)}h1{font-size:31px;letter-spacing:-1.3px;margin:7px 0 9px;line-height:1.12;color:var(--dark)}h2{font-size:21px;letter-spacing:-.55px;margin:0;color:var(--ink)}h3{margin:0;font-size:16px;color:var(--ink)}p{margin:0;line-height:1.45}.muted{color:var(--muted)}.small{font-size:12px}.medium{font-size:14px}.strong{font-weight:800}.mb5{margin-bottom:5px}.mb10{margin-bottom:10px}.mt12{margin-top:12px}.mt18{margin-top:18px}.mt24{margin-top:24px}.gap12{gap:12px}.topline{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;margin-bottom:19px}.topline .desc{max-width:650px}.iconbtn{border:1px solid var(--line);border-radius:13px;background:var(--paper);width:42px;height:42px;display:grid;place-items:center;color:var(--ink);font-size:18px;box-shadow:var(--shadow)}.btn{border:0;border-radius:14px;padding:14px 17px;font-weight:790;min-height:47px;display:inline-flex;gap:8px;align-items:center;justify-content:center;letter-spacing:-.15px}.btn-primary{background:var(--dark);color:white;box-shadow:0 7px 15px #102d2b20}.btn-green{background:#e5f3eb;color:#1a634c}.btn-light{background:#f0f4f2;color:#345649}.btn-outline{border:1px solid #cfdcd5;background:white;color:var(--ink)}.btn-danger{background:#fff0f0;color:var(--red)}.btn-mini{padding:8px 11px;font-size:12px;min-height:35px;border-radius:10px}.w-full{width:100%}.center{text-align:center}.actionrow{display:flex;align-items:center;gap:9px;flex-wrap:wrap}.card{background:white;border-radius:21px;border:1px solid var(--line);box-shadow:var(--shadow);padding:19px;margin-bottom:14px}.card-dark{background:linear-gradient(135deg,#173c34,#102d2b);border:none;color:white;position:relative;overflow:hidden}.card-dark:after{content:"";position:absolute;right:-75px;top:-110px;width:240px;height:240px;border:1px solid #ffffff22;border-radius:50%;box-shadow:0 0 0 30px #ffffff05,0 0 0 70px #ffffff05;pointer-events:none}.card-dark .eyebrow{color:#b0d9bd}.card-dark h2{color:#fff}.card-dark .muted{color:#b1c8c0}.summary-row{display:flex;justify-content:space-between;gap:20px;align-items:center;margin-top:18px;position:relative}.hero-value{font-size:32px;font-weight:850;letter-spacing:-1px;line-height:1.1}.hero-small{font-size:11px;color:#c6ddd2;margin-top:5px}.hero-div{width:1px;height:42px;background:#ffffff38}.kpi-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-bottom:17px}.kpi{background:white;padding:15px;border:1px solid var(--line);border-radius:17px;min-width:0}.kpi-val{font-size:23px;font-weight:850;letter-spacing:-.8px;color:var(--ink);white-space:nowrap}.kpi-label{font-size:11px;color:var(--muted);margin-top:4px}.kpi-over{font-size:12px;color:var(--green);font-weight:800;margin-bottom:6px}.switch-week{display:flex;gap:9px;align-items:center}.week-name{font-size:13px;font-weight:790;min-width:121px;text-align:center}.week-button{font-size:15px;background:white;border:1px solid var(--line);border-radius:9px;padding:7px 11px}.section-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:25px 0 12px}.day{padding:0;overflow:hidden}.day-bar{display:flex;align-items:center;justify-content:space-between;padding:16px 18px;background:#fafcfb;border-bottom:1px solid var(--line)}.day-left{display:flex;align-items:center;gap:10px}.datebox{background:#eaf4ed;color:#216c55;border-radius:12px;min-width:43px;min-height:44px;display:flex;flex-direction:column;align-items:center;justify-content:center}.datebox strong{font-size:20px;line-height:1}.datebox small{font-size:9px;text-transform:uppercase;font-weight:800;letter-spacing:.5px}.day-body{padding:10px 17px 16px}.visit{padding:13px 1px;border-bottom:1px solid #edf1ee;display:flex;align-items:center;justify-content:space-between;gap:11px}.visit:last-child{border-bottom:none}.visit-main{flex:1;min-width:0}.visit-title{font-size:15px;font-weight:790;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.visit-meta{color:var(--muted);font-size:12px;margin-top:4px}.visit-money{font-weight:800;font-size:13px;white-space:nowrap;text-align:right}.visit-money small{display:block;color:var(--muted);font-size:10px;font-weight:500;margin-top:3px}.chevron{color:#78978b;margin-left:5px;font-size:20px}.empty-day{display:flex;align-items:center;justify-content:space-between;color:var(--muted);font-size:13px;gap:5px;padding:14px 0 3px}.dash-note{padding:13px;border-radius:13px;background:#edf5ee;color:#47755c;font-size:12px;line-height:1.5;margin:12px 0}.pill{border-radius:8px;padding:4px 8px;font-size:10px;font-weight:760;white-space:nowrap}.pill-green{background:#e0f5e9;color:#24634c}.pill-gray{background:#e8eeeb;color:#63736d}.pill-red{background:#fff0f1;color:#ac404b}.variance.good{color:#168159;font-weight:800}.variance.bad{color:#b53d48;font-weight:800}.variance.neutral{color:#6c8477;font-weight:760}.expense-table{width:100%;border-collapse:collapse}.expense-table th{font-size:10px;color:#87938b;text-transform:uppercase;letter-spacing:.5px;font-weight:800;text-align:right;padding:10px 5px;border-bottom:1px solid var(--line)}.expense-table th:first-child{text-align:left}.expense-table td{font-size:13px;padding:13px 5px;border-bottom:1px solid #ecf0ed;text-align:right;white-space:nowrap}.expense-table td:first-child{text-align:left;white-space:normal}.expense-table tr:last-child td{border-bottom:0}.table-label{font-weight:780}.soft{color:#819189}.foot-result{background:#f5faf6;border-radius:12px;padding:14px;margin-top:12px;display:flex;justify-content:space-between;gap:10px;align-items:center}.fields{display:grid;gap:14px}.field label,.field .flabel{display:block;font-size:12px;font-weight:760;color:#4e6258;margin-bottom:7px}.field input,.field select,.field textarea{display:block;width:100%;border:1px solid #d9e3dc;background:#fff;border-radius:12px;padding:13px;color:var(--ink);font-size:16px;min-height:47px;box-shadow:0 1px 2px #00000003}.field input:disabled{background:#f2f5f3}.field textarea{min-height:80px;resize:vertical}.two{display:grid;grid-template-columns:1fr 1fr;gap:11px}.three{display:grid;grid-template-columns:1fr 1fr 1fr;gap:11px}.wizard-steps{display:flex;gap:7px;margin:15px 0 25px}.step-bubble{height:5px;border-radius:6px;background:#dce6df;flex:1}.step-bubble.active{background:#267b64}.option-line{display:flex;align-items:center;gap:9px;padding:11px 0;border-bottom:1px solid #edf1ee}.option-line:last-child{border:0}.option-line input[type=checkbox]{width:20px;height:20px;accent-color:#226b58;margin:0}.option-line label{flex:1;font-size:14px;font-weight:730}.option-line input[type=number]{width:92px;border:1px solid #d8e1db;border-radius:10px;padding:9px;font-size:14px;text-align:right}.option-line .avg-note{font-size:11px;font-weight:500;color:var(--muted);display:block;margin-top:3px}.mini-stat{background:#f7faf8;border:1px solid #e6ede8;border-radius:14px;padding:12px;min-width:0}.mini-stat .val{font-size:19px;font-weight:850;letter-spacing:-.5px;margin-top:3px;white-space:nowrap}.mini-stat .label{font-size:10px;color:var(--muted)}.details-head{background:var(--dark);color:white;padding:20px 18px;border-radius:20px;margin:14px 0}.details-head h1{color:white;font-size:27px}.details-head .muted{color:#c1d8cc}.row-between{display:flex;justify-content:space-between;gap:10px;align-items:center}.history-item{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:14px 0;border-bottom:1px solid #e8eeea}.history-item:last-child{border:0}.category-icon{font-size:22px;width:38px;height:38px;border-radius:12px;background:#edf6ef;display:grid;place-items:center;flex:none}.history-title{font-weight:780;font-size:14px}.history-sub{font-size:11px;color:var(--muted);margin-top:3px}.nav{position:fixed;bottom:0;left:0;right:0;background:#ffffffed;backdrop-filter:blur(18px);border-top:1px solid #dfe6e0;display:flex;justify-content:space-evenly;padding:10px 10px calc(10px + env(safe-area-inset-bottom));z-index:50}.nav button{display:flex;flex-direction:column;align-items:center;gap:5px;justify-content:center;background:transparent;border:0;color:#7c8e86;font-size:10px;font-weight:750;min-width:58px;min-height:49px}.nav .ni{font-size:22px;font-weight:500}.nav button.active{color:#126c50}.nav button.active .ni{transform:translateY(-2px)}.shade{position:fixed;inset:0;background:#0a2523a1;z-index:80;display:flex;align-items:flex-end;justify-content:center}.sheet{background:#fff;width:100%;max-width:640px;padding:22px 20px calc(25px + env(safe-area-inset-bottom));border-radius:24px 24px 0 0;max-height:95dvh;overflow-y:auto;box-shadow:0 -20px 70px #00181144;animation:up .18s ease-out}.sheet-handle{width:40px;height:5px;background:#d4dfd7;border-radius:10px;margin:0 auto 22px}.sheet-top{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:0 0 15px}.sheet h2{font-size:23px;line-height:1.2}.toast{position:fixed;top:16px;left:50%;transform:translate(-50%,-130px);background:#103a30;color:#fff;padding:12px 17px;border-radius:12px;font-size:13px;font-weight:750;transition:transform .2s;box-shadow:0 8px 25px #123b3455;z-index:101;width:max-content;max-width:92vw;text-align:center}.toast.show{transform:translate(-50%,0)}.divider{height:1px;background:var(--line);margin:15px 0}.dangerzone{border:1px solid #f2d3d4;background:#fff9f9;padding:14px;border-radius:14px}.notice{background:#edf5ee;color:#3d6c55;border-radius:12px;padding:12px;font-size:12px;line-height:1.5}.notice-warning{background:#fff5e6;color:#885b19}.scroll-x{overflow-x:auto}.back{background:transparent;border:0;padding:4px 0;color:#416e5a;font-weight:800;font-size:14px}.no-data{text-align:center;padding:29px 17px;color:var(--muted);font-size:13px}.no-data-icon{font-size:31px;margin-bottom:10px}.helper{color:#758b7e;font-size:11px;line-height:1.45}.inline-error{color:var(--red);font-size:12px;margin-top:8px}.click-row{cursor:pointer}.small-bar{display:flex;gap:6px;align-items:center}.badge-on{width:7px;height:7px;border-radius:50%;background:#35b37d}.record-button{border:1px solid #d3e4d8;background:#f2f9f4;color:#236d52;padding:9px 11px;border-radius:11px;font-size:12px;font-weight:800}@keyframes up{from{transform:translateY(30px);opacity:.6}to{transform:none;opacity:1}}@media(min-width:820px){.shell{padding-top:30px}.desktop-grid{display:grid;grid-template-columns:1.45fr 1fr;gap:18px}.desktop-grid .day{break-inside:avoid}.nav{width:min(730px,90vw);left:50%;transform:translateX(-50%);bottom:16px;border:1px solid #e1e9e3;border-radius:20px;box-shadow:0 10px 40px #15332f25;padding:8px}.kpi-grid{gap:15px}.card{padding:22px}.sheet{border-radius:24px;margin-bottom:20px}.shade{align-items:center}.topline{margin-bottom:22px}}@media(max-width:370px){.shell{padding:15px 13px 110px}.kpi{padding:10px}.kpi-val{font-size:19px}.week-name{font-size:11px;min-width:100px}.expense-table td{font-size:11px}h1{font-size:27px}}@media(prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}

/* v1.3: quick backup accessible from every screen, including iPhone */
.quick-backup{display:inline-flex;align-items:center;justify-content:center;gap:5px;flex:none;border:1px solid #badccb;border-radius:12px;background:#e6f5ed;color:#16583f;font-size:12px;font-weight:800;padding:10px 11px;min-height:43px;white-space:nowrap;box-shadow:0 3px 9px #0a583310;}
.quick-backup span{font-size:21px;line-height:1;font-weight:700;}
.quick-backup:active{background:#d7ece0;}
@media(max-width:390px){.brand-sub{font-size:9px;letter-spacing:.4px}.brand-title{font-size:17px}.quick-backup{padding:8px;font-size:11px;gap:3px}.mast{gap:6px}}

/* v1.4: original Thermmark logo and two compact header actions */
.mast{gap:10px;min-height:56px;margin-bottom:21px;align-items:center}
.brand{min-width:0;flex:1 1 auto;max-width:260px}
.brand-logo{display:block;width:100%;height:auto;max-height:58px;object-fit:contain;object-position:left center}
.header-actions{display:flex;flex:0 0 auto;gap:6px}
.header-action{width:74px;min-height:52px;padding:6px 3px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;border:1px solid #cdded3;border-radius:12px;background:white;color:var(--ink);box-shadow:var(--shadow)}
.header-action span{font-size:20px;line-height:1.15;color:#1b7659}
.header-action small{font-size:10px;font-weight:800;white-space:nowrap;letter-spacing:-.25px}
.header-backup{background:#e7f5ec;border-color:#bbe0ca}
.kpi-link{text-align:left;cursor:pointer;font-family:inherit;box-shadow:var(--shadow);width:100%}
.kpi-alert{background:#fffbef;border-color:#ecd39a}
.kpi-link:active{transform:translateY(1px)}
.main-plan{margin:0 0 10px;font-size:15px;box-shadow:0 9px 18px #102d2b20}
.contact-name{font-weight:750;font-size:14px;margin:10px 0 6px;color:#e3ffec}
.expense-actions{display:flex;flex-wrap:wrap;gap:9px;margin:13px 0}
.accessory-teaser{background:#f3f8f4;border:1px dashed #c8dfcc;border-radius:15px;padding:14px}
.mini-pending{font-size:10px;color:#965319;font-weight:750;margin-top:5px}
.pending-summary{display:flex;justify-content:space-between;align-items:center;gap:16px;background:#eff7f1}
.pending-item{display:flex;justify-content:space-between;align-items:center;gap:12px;border-bottom:1px solid var(--line);padding:13px 0}
.pending-item:last-child{border-bottom:0;padding-bottom:0}
.text-btn{color:#1d694f;border:0;background:transparent;font-size:12px;font-weight:800;text-decoration:underline;margin-left:4px;padding:3px}
@media(max-width:420px){.shell{padding:16px 13px 112px}.header-action{width:69px}.header-action small{font-size:9px}.mast{gap:7px}.brand{max-width:190px}.header-actions{gap:5px}.kpi{padding:12px 9px}.kpi-over{font-size:10px}.kpi-label{font-size:10px}.kpi-val{font-size:22px}.expense-actions .btn{flex:1 1 140px;font-size:12px;padding:11px 8px}}
@media(max-width:355px){.header-action{width:61px}.header-action small{font-size:8px}.brand{max-width:170px}}

/* v1.5: agenda/statistics, contact book, trip type and booking */
.chart-months{height:155px;display:flex;gap:5px;align-items:end;justify-content:space-between;padding:15px 2px 0;border-bottom:1px solid #d7e2da;margin-top:14px}.chart-col{flex:1;min-width:0;display:flex;flex-direction:column;align-items:center;justify-content:end;height:100%;gap:6px}.chart-col b{font-size:10px;color:#2b6755}.chart-col small{font-size:10px;color:#71867a;text-transform:capitalize}.chart-bar{background:linear-gradient(#3b9d7b,#21654e);width:100%;max-width:24px;border-radius:5px 5px 0 0;min-height:4px}.contact-choice{border:none;background:none;padding:8px 0;text-align:left;flex:1;display:flex;flex-direction:column;gap:3px;min-width:0}.trip-summary{margin:0 0 15px;display:flex;gap:9px;flex-wrap:wrap;align-items:center}.hotel-fields{background:#f4f8f5;border:1px solid #dfe9df;padding:12px;border-radius:14px;display:grid;gap:13px}.is-hidden{display:none!important}.kpi-link{min-width:0}.kpi-link .kpi-over{white-space:nowrap}.kpi-link .kpi-label{line-height:1.15}.brand img.brand-logo{min-width:95px}@media(max-width:380px){.brand img.brand-logo{min-width:85px}.header-action{width:62px}}

/* v1.6 · Compact brand, true trip and client reports, manual budgets */
.mast{align-items:stretch;min-height:62px;margin-top:0;margin-bottom:23px}
.brand{display:flex;flex-direction:column;justify-content:center;align-items:flex-start;gap:0;min-width:0;max-width:none}
.brand img.brand-logo{width:100%;height:auto;max-height:39px;min-width:0;object-fit:contain;object-position:left center;transform:translateY(-2px)}
.brand-caption{width:100%;text-align:left;padding-left:1px;margin-top:3px;letter-spacing:.75px;color:#2a805d;font-size:9px;font-weight:850;white-space:nowrap;line-height:1.25}
.header-action{min-height:62px}
.home-heading{display:flex;align-items:center;justify-content:space-between;gap:14px;width:100%}
.home-heading h1{flex:0 0 auto;margin:0;max-width:55%;font-size:clamp(23px,6.6vw,31px)}
.home-side-desc{flex:1;text-align:left;font-size:11px;line-height:1.37;max-width:250px}
.accessory-budget-list{margin-top:12px;display:grid;gap:0}
.budget-row{display:flex;align-items:center;gap:12px;justify-content:space-between;padding:10px 2px;border-bottom:1px solid #deeadf}
.budget-row:last-child{border:0}
.budget-row label{font-size:13px;font-weight:735;flex:1;min-width:0}
.budget-input{display:flex;align-items:center;gap:5px;flex:0 0 115px}
.budget-input input{background:white;width:90px;min-height:42px;border:1px solid #d3dfd5;border-radius:10px;padding:8px 9px;text-align:right;font-size:16px;color:var(--ink)}
.budget-input span{font-size:12px;color:#537364;font-weight:800}
.commercial-fields .field label{white-space:nowrap;font-size:11px;letter-spacing:-.15px}
.trip-list-card,.client-list-card{display:block;text-align:left;width:100%;font:inherit;color:inherit;cursor:pointer;margin-bottom:12px;background:white}
.trip-list-card:active,.client-list-card:active{background:#f1f8f3}
.trip-row-bottom{border-top:1px solid var(--line);margin-top:13px;padding-top:11px;display:flex;gap:12px;justify-content:space-between;flex-wrap:wrap;color:var(--muted);font-size:11px}
.trip-row-bottom b{color:var(--ink)}
.client-money{display:flex;flex-wrap:wrap;column-gap:18px;row-gap:5px;font-size:11px;color:var(--muted);margin-top:12px}
.client-money b{color:var(--ink);white-space:nowrap}
.mini-stat .val.small-value{font-size:13px;letter-spacing:-.2px;white-space:normal;overflow-wrap:anywhere}
.quick-report{display:flex;align-items:center;justify-content:space-between;gap:12px}
.quick-report>div{flex:1;min-width:0}
.quick-report .btn{flex:0 0 auto}
@media(max-width:420px){
 .mast{gap:6px}
 .brand-caption{font-size:8.7px;letter-spacing:.35px}
 .brand img.brand-logo{max-height:34px}
 .home-heading{gap:10px}
 .home-heading h1{font-size:25px;max-width:52%}
 .home-side-desc{font-size:10.5px}
 .budget-input{flex-basis:105px}
 .budget-input input{width:81px}
}
@media(max-width:350px){.brand-caption{font-size:7.5px}.home-heading h1{font-size:22px}.home-side-desc{font-size:9.5px}}

/* v1.7: maggiore contrasto e navigazione più agevole su iPhone */
:root{--ink:#102a24;--muted:#405e53;--green:#17654b;--line:#c5d5cb;--dark:#0b2d25;--paper:#fff;--shadow:0 4px 15px rgba(7,30,20,.085)}
body{color:var(--ink);background:#edf3ef}
.small.muted,.medium.muted,.helper,.no-data,.eyebrow,.trip-row-bottom,.client-money,.kpi-label,.home-side-desc{color:#466359}
.field label,.strong,.section-head h2,.mini-stat .label{color:#14392d;font-weight:800}
.card{border-color:#d2dfd6;box-shadow:var(--shadow)}
input,select,textarea{color:#0f3026!important;border-color:#aabfb2!important;background:#fff!important}
input::placeholder,textarea::placeholder{color:#607b6e;opacity:1}
.btn-outline,.back{color:#0c6145;border-color:#b4cbb9}
.wizard-client-banner{background:#e2eee7;border:1px solid #b7d2c0;color:#103e2d;font-size:14px;line-height:1.45;padding:11px 13px;border-radius:12px;margin:12px 0 5px}
.commercial-fields{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}
.commercial-fields .field{min-width:0}
.commercial-fields .field label{font-size:9.2px;letter-spacing:-.15px;white-space:nowrap;line-height:1.25;overflow:visible}
.commercial-fields input{width:100%;min-width:0;padding:9px 4px;font-size:14px;text-align:right;box-sizing:border-box}
.client-profile{border:1px solid #bdd8c4;background:#fff}
.client-profile .row-between{align-items:flex-start}
.client-profile .row-between>div{flex:1;min-width:0}
.client-profile h3{margin-top:6px;overflow-wrap:anywhere}
.contact-profile{padding:12px 0;border-bottom:1px solid #d4e0d6;line-height:1.6}
.contact-profile:last-child{border:0}
.contact-profile a{color:#126044;font-weight:700;text-decoration:underline}
.client-contact-edit{border:1px solid #cddcd1;padding:14px;border-radius:14px;background:#f7faf7;display:grid;gap:11px;margin:12px 0}
.visit-schedule{border-left:4px solid #33865f}
.bottom-back{margin-top:26px;min-height:46px}
.global-bottom-back{max-width:1006px;margin:-80px auto 118px;padding:0 20px}
.wizard-client-banner b{font-weight:900}
@media(max-width:410px){.commercial-fields .field label{font-size:8.9px}.commercial-fields{gap:5px}.commercial-fields input{padding:8px 3px;font-size:13px}}


/* v1.7.1 — Mobile layout repair and highly visible annual client revenue */
:root {font-size: 16px; -webkit-text-size-adjust: 100%; text-size-adjust: 100%;}
html,body,#app{width:100%;max-width:100%;min-width:0;overflow-x:clip}
.shell{width:100%;min-width:0;overflow-x:clip}
.card,.details-head,.wizard-client-banner{min-width:0;max-width:100%}
.field,.fields,.row-between,.row-between>div{min-width:0}
.field input,.field select,.field textarea{max-width:100%;min-width:0;box-sizing:border-box}
.two,.three{grid-template-columns:repeat(2,minmax(0,1fr))}
.three{grid-template-columns:repeat(3,minmax(0,1fr))}
.mast{display:grid;grid-template-columns:minmax(0,1fr) 70px 70px;gap:7px;min-height:70px;align-items:center;margin-bottom:20px;width:100%}
.mast .brand{min-width:0!important;max-width:100%!important;width:100%;height:66px;display:flex;justify-content:center;align-items:stretch;gap:6px;overflow:hidden}
.mast .brand img.brand-logo{display:block;box-sizing:border-box;width:100%!important;min-width:0!important;max-width:100%!important;max-height:35px!important;height:auto!important;object-fit:contain!important;object-position:left center!important;transform:none!important}
.mast .brand-caption{font-size:8px;font-weight:850;letter-spacing:0;line-height:1.3;white-space:normal;overflow-wrap:normal;margin:0;max-width:100%;}
.mast .header-actions{display:contents}
.mast .header-action{box-sizing:border-box;width:70px;min-width:0;max-width:70px;min-height:60px;padding:6px 2px;}
.mast .header-action small{white-space:normal;text-align:center;font-size:9px;letter-spacing:-.1px;line-height:1.1}
.home-heading{min-width:0;gap:10px;flex-wrap:wrap}
.home-heading h1{min-width:0;max-width:100%;font-size:clamp(23px,6vw,30px)}
.home-side-desc{min-width:0;max-width:100%;font-size:11px;line-height:1.3}
.section-head{flex-wrap:wrap}
.section-head>div{min-width:0}
.switch-week{max-width:100%;min-width:0}
.week-name{min-width:0;max-width:170px;font-size:12px}
.card-dark .hero-value,.hero-value{font-size:clamp(21px,7vw,32px);overflow-wrap:anywhere}
.summary-row{gap:10px}
.commercial-fields{display:grid!important;grid-template-columns:minmax(0,.83fr) minmax(0,1fr) minmax(0,1.2fr);gap:7px;width:100%;min-width:0}
.commercial-fields .field{min-width:0}
.commercial-fields .field label{min-height:27px;white-space:normal!important;overflow-wrap:anywhere;font-size:10px!important;line-height:1.28;letter-spacing:0;color:#1a4334}
.commercial-fields .field input{width:100%!important;min-width:0!important;font-size:15px!important;text-align:left;padding:10px 7px!important;max-width:100%}
.live-sales-card{border:1px solid #9ecdb0;background:#eef8f0;display:flex;flex-direction:column;gap:11px}
.live-sales-title{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:9px}
.live-sales-label{font-size:14px;font-weight:800;color:#144c35;margin-top:5px}
.live-sales-amount{font-size:clamp(18px,5.8vw,24px);font-weight:900;letter-spacing:-.5px;color:#0a4731;white-space:normal;overflow-wrap:anywhere}
.live-sales-card .btn{align-self:flex-start}
.client-sales-highlight{padding:13px;border:1px solid #c4ddcb;border-radius:14px;background:#edf7ee;margin:4px 0}
.client-sales-amount{font-size:clamp(21px,6vw,28px);font-weight:900;color:#0b4831;margin:6px 0 12px}
.quick-sales-form{display:flex;align-items:end;gap:9px;flex-wrap:wrap}
.quick-sales-form .field{flex:1 1 170px;min-width:0}
.quick-sales-form .field input{width:100%;font-size:16px}
.quick-sales-form .btn{flex:1 0 110px;min-height:47px}
.client-money{font-size:12px;line-height:1.5;gap:8px}
@media(max-width:420px){
 .shell{padding:16px 13px 116px}
 .mast{grid-template-columns:minmax(0,1fr) 65px 65px;gap:5px}
 .mast .header-action{width:65px;max-width:65px}
 .brand-caption{font-size:7.6px!important;letter-spacing:0!important}
 .home-heading h1{font-size:24px}
 .home-side-desc{font-size:10px}
 .commercial-fields{gap:5px}
 .commercial-fields .field label{font-size:9.7px!important}
 .commercial-fields .field input{font-size:14px!important;padding:9px 5px!important}
 .summary-row{gap:8px}
}
@media(max-width:350px){
 .mast{grid-template-columns:minmax(0,1fr) 59px 59px;gap:4px}
 .mast .header-action{width:59px;max-width:59px;padding:4px 1px}
 .mast .header-action small{font-size:8px}
 .mast .brand-caption{font-size:7px!important}
 .home-heading{display:block}
 .home-heading h1{font-size:23px}
 .home-side-desc{margin-top:6px;font-size:11px}
 .commercial-fields .field label{font-size:9px!important}
 .commercial-fields .field input{font-size:13px!important}
}

/* v1.7.3 — Coherent responsive grid. Visual styles only: no data or form logic changes. */
:root{
  --page-pad:16px;
  --ui-gap:12px;
  --line:#cbdad1;
}
html,body,#app{min-width:0;max-width:100%;overflow-x:clip}
body{font-size:15px;line-height:1.4}
.shell{width:100%;max-width:900px;min-width:0;margin-inline:auto;padding:18px var(--page-pad) 124px;overflow:visible}
.shell>*,.shell .card,.shell .details-head,.shell .fields,.shell .field{min-width:0;max-width:100%}

/* Main header: brand and action buttons use one common vertical grid. */
.mast{
  display:grid;grid-template-columns:minmax(0,1fr) 68px 68px;
  align-items:center;gap:8px;min-height:68px;
  margin:0 0 23px;
}
.mast .brand{min-width:0;width:100%;max-width:100%;height:68px;display:flex;flex-direction:column;justify-content:center;align-items:flex-start;gap:5px;overflow:hidden}
.mast .brand img.brand-logo{display:block;width:100%!important;min-width:0!important;max-width:100%!important;height:auto!important;max-height:38px!important;object-fit:contain!important;object-position:left center!important;transform:none!important;flex:none}
.mast .brand-caption{width:100%;min-width:0;margin:0;padding:0;white-space:nowrap;font-size:8.4px!important;letter-spacing:.28px!important;line-height:1.2;color:#1e6e52;text-align:left;font-weight:850}
.mast .header-actions{display:contents}
.mast .header-action{width:68px;max-width:68px;min-width:0;height:64px;min-height:64px;box-sizing:border-box;margin:0;padding:6px 3px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;border-radius:14px}
.mast .header-action span{line-height:1;font-size:21px}
.mast .header-action small{line-height:1.1;min-height:20px;font-size:9px;white-space:normal!important;text-align:center;display:flex;align-items:center;justify-content:center}

/* All page headings share a stable horizontal rhythm. */
.topline{width:100%;margin:0 0 16px;min-width:0}
.topline>div{min-width:0;width:100%}
.home-heading{display:grid;grid-template-columns:max-content minmax(0,1fr);align-items:center;gap:12px;min-width:0}
.home-heading h1{font-size:clamp(22px,6vw,29px);margin:0;max-width:none;letter-spacing:-.85px;line-height:1.14;white-space:nowrap}
.home-heading .home-side-desc{font-size:11px;line-height:1.32;text-align:left;max-width:none;margin:0;min-width:0;overflow-wrap:break-word}
.section-head{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap}
.section-head>div{min-width:0}
.section-head h2{line-height:1.15}
.switch-week{gap:5px;min-width:0;max-width:100%;flex:none}
.week-name{min-width:0;max-width:none;font-size:12px;white-space:nowrap}
.week-button{min-height:40px;min-width:33px;padding:7px 8px}

/* Cards and dashboards align to the same column edges. */
.card{border-radius:19px;padding:17px;margin-bottom:13px}
.card-dark{padding:18px}
.summary-row{align-items:center;gap:10px;margin-top:17px}
.summary-row>div:not(.hero-div){flex:1 1 0;min-width:0}
.summary-row .hero-div{flex:0 0 1px}
.hero-value{font-size:clamp(20px,6vw,30px);white-space:nowrap;overflow-wrap:normal;letter-spacing:-.8px}
.kpi-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:9px;margin-bottom:16px}
.kpi{padding:13px 10px;border-radius:16px;min-width:0;display:flex;flex-direction:column;align-items:flex-start;justify-content:space-between;gap:2px}
.kpi-over{font-size:10px;line-height:1.3;white-space:normal!important;margin:0}
.kpi-val{font-size:clamp(19px,5.6vw,24px);line-height:1.1;letter-spacing:-.6px;overflow-wrap:anywhere;white-space:normal}
.kpi-label{font-size:10px;line-height:1.35;margin:3px 0 0;overflow-wrap:break-word}
.day-bar{gap:12px}
.day-left{min-width:0;flex:1}
.day-left>div{min-width:0}
.day-bar .btn{flex:none}
.visit{gap:9px}
.visit-main{min-width:0;flex:1}
.visit-meta{overflow-wrap:break-word}
.visit-money{flex:none;font-size:12px}

/* All form rows, regardless of section, use the same consistent heights. */
.fields{gap:14px}
.field{min-width:0}
.field label,.field .flabel{font-size:12px;line-height:1.35;margin-bottom:7px;letter-spacing:0;font-weight:760}
.field input,.field select,.field textarea{box-sizing:border-box;min-width:0;max-width:100%;width:100%;font-size:16px;min-height:48px;border-radius:12px;padding:11px 12px}
.field input[type=number]{font-variant-numeric:tabular-nums}
.two{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.three{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}
.row-between{min-width:0;gap:10px}
.row-between>*{min-width:0}
.row-between .btn,.row-between .pill{flex:none}

/* Exactly three sales fields on a single line, with aligned labels and inputs. */
.commercial-fields{display:grid!important;grid-template-columns: minmax(0,.73fr) minmax(0,1.08fr) minmax(0,1.19fr);gap:9px!important;align-items:end;width:100%;min-width:0}
.commercial-fields .field{display:flex;flex-direction:column;align-self:stretch;min-width:0}
.commercial-fields .field label{font-size:10px!important;min-height:31px!important;display:flex;align-items:flex-end;line-height:1.22!important;letter-spacing:0!important;white-space:normal!important;overflow-wrap:break-word;hyphens:none;margin-bottom:6px}
.commercial-fields .field input{box-sizing:border-box;width:100%!important;min-width:0!important;max-width:100%;height:46px;min-height:46px;padding:9px 7px!important;font-size:15px!important;line-height:1.2;text-align:left;font-variant-numeric:tabular-nums;border-radius:10px}
.commercial-fields .field input[name="ytdDisplay"]{background:#eef6f0!important;color:#174e37!important;font-size:12px!important;font-weight:850}

/* Annual sales value and client title align instead of wrapping arbitrarily. */
.live-sales-card{gap:10px}
.live-sales-title{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:9px;align-items:center;width:100%}
.live-sales-title>div{min-width:0}
.live-sales-card .eyebrow{font-size:10px;letter-spacing:.5px;line-height:1.35}
.live-sales-label{font-size:13px;line-height:1.3;margin-top:4px}
.live-sales-amount{font-size:clamp(17px,4.8vw,23px);line-height:1.2;text-align:right;white-space:nowrap;overflow-wrap:normal}
.client-profile h3{line-height:1.35}
.client-sales-amount{font-variant-numeric:tabular-nums}
.mini-stat{min-width:0;overflow:hidden}
.mini-stat .val{font-size:clamp(13px,4.5vw,18px);line-height:1.2;overflow-wrap:anywhere;white-space:normal}
.mini-stat .label{font-size:10px;line-height:1.3;min-height:13px}

/* New visit: contact import and new contact stay side-by-side. */
#wizard1 .actionrow{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;width:100%}
#wizard1 .actionrow>.btn{min-width:0;width:100%;min-height:41px;padding:9px 7px;white-space:normal;font-size:12px;text-align:center;line-height:1.2}
#wizard1 .actionrow>.btn:first-child{grid-column:1/-1}

.expense-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
.expense-actions .btn{padding:10px 7px;white-space:normal;font-size:12px;line-height:1.25;min-width:0;min-height:48px}
.budget-row{min-width:0}
.budget-row label{min-width:0;overflow-wrap:break-word}
.budget-input{flex:none;min-width:0}
.quick-report{gap:10px}
.quick-report .btn{flex:none}

/* Bottom navigation aligns evenly across the viewport. */
.nav{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));align-items:stretch;justify-items:stretch;gap:0;padding:9px 6px calc(9px + env(safe-area-inset-bottom))}
.nav button{width:100%;min-width:0;max-width:none;min-height:51px;line-height:1.1;gap:4px;padding:4px 0;text-align:center}
.nav .ni{font-size:21px;line-height:1.05}

@media(min-width:700px){
  .shell{padding:26px 24px 130px}
  .mast{grid-template-columns:minmax(0,1fr) 76px 76px;gap:12px}
  .mast .header-action{width:76px;max-width:76px;height:66px;min-height:66px}
  .mast .brand{max-width:380px}
  .mast .brand img.brand-logo{max-height:46px!important}
  .mast .brand-caption{font-size:10px!important;letter-spacing:.5px!important}
  .commercial-fields .field label{font-size:12px!important}
  .commercial-fields .field input{font-size:16px!important}
}
@media(max-width:370px){
  :root{--page-pad:12px}
  .mast{grid-template-columns:minmax(0,1fr) 61px 61px;gap:6px;min-height:64px}
  .mast .brand{height:64px}
  .mast .brand img.brand-logo{max-height:33px!important}
  .mast .brand-caption{font-size:7.2px!important;letter-spacing:.12px!important}
  .mast .header-action{width:61px;max-width:61px;height:61px;min-height:61px;padding:4px 2px}
  .mast .header-action small{font-size:8.2px}
  .home-heading{grid-template-columns:minmax(0,1fr);gap:4px}
  .home-heading h1{font-size:25px;white-space:normal}
  .home-heading .home-side-desc{font-size:11px}
  .commercial-fields{gap:5px!important}
  .commercial-fields .field label{font-size:9px!important;min-height:31px!important}
  .commercial-fields .field input{font-size:14px!important;padding:9px 5px!important}
  .commercial-fields .field input[name="ytdDisplay"]{font-size:11px!important;padding:9px 3px!important}
  .live-sales-title{grid-template-columns:minmax(0,1fr)}
  .live-sales-amount{text-align:left}
  .section-head h2{font-size:19px}
  .week-name{font-size:11px}
  .week-button{min-width:29px;padding:6px 6px}
  .kpi{padding:11px 8px}
  .kpi-label{font-size:9px}
}

/* v1.7.4 — ONLY the first-screen header: brand, two actions, week heading. */
.mast{
  align-items:stretch;
  min-height:0;
  margin-bottom:14px;
}
.mast .brand{
  box-sizing:border-box;
  width:min(100%,300px);
  max-width:300px!important;
  min-height:48px;
  height:auto;
  display:flex;
  flex-direction:column;
  align-items:stretch;
  justify-content:space-between;
  gap:5px;
  overflow:visible;
}
.mast .brand img.brand-logo{
  display:block;
  width:100%!important;
  min-width:0!important;
  max-width:100%!important;
  height:auto!important;
  max-height:none!important;
  object-fit:contain!important;
  object-position:left top!important;
  transform:none!important;
  flex:0 0 auto;
}
/* Every caption character group spans exactly the image's rendered width. */
.mast .brand-caption{
  box-sizing:border-box;
  display:flex;
  flex-direction:row;
  align-items:center;
  justify-content:space-between;
  width:100%;
  min-width:0;
  max-width:100%;
  margin:0;
  padding:0;
  white-space:nowrap!important;
  line-height:1.15;
  font-size:clamp(7px,2.10vw,10px)!important;
  letter-spacing:0!important;
  font-weight:850;
  color:#1e6e52;
  flex:0 0 auto;
}
.mast .brand-dot{font-size:1.1em;line-height:1}
.mast .header-action,.mast .header-action.header-backup{
  box-sizing:border-box;
  height:auto;
  min-height:48px;
  align-self:stretch;
  background:#e7f5ec;
  border:1px solid #b8d9c5;
  color:#1b7659;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:3px;
  padding:5px 3px;
}
.mast .header-action-icon{
  width:21px;
  height:21px;
  display:block;
  flex:none;
  color:#1b7659;
}
.mast .header-action small{
  min-height:0;
  display:block;
  font-size:11px;
  font-weight:800;
  line-height:1.15;
  letter-spacing:0;
  white-space:nowrap!important;
}
/* Equal vertical spacing: main header → week heading → summary card. */
.topline{margin:0 0 14px}
.home-heading{
  display:grid;
  grid-template-columns:max-content minmax(0,1fr);
  gap:10px;
  align-items:center;
  flex-wrap:nowrap;
}
.home-heading h1{
  margin:0;
  max-width:none;
  font-size:clamp(19px,5.6vw,27px);
  letter-spacing:-.85px;
  line-height:1.15;
  white-space:nowrap;
}
.home-heading .home-side-desc{
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  align-self:stretch;
  width:auto;
  min-width:0;
  max-width:none;
  margin:0;
  font-size:clamp(9px,2.75vw,11.5px);
  line-height:1.18;
  white-space:nowrap;
  text-align:left;
}
@media(min-width:700px){
  .mast .brand{max-width:300px!important}
  .mast .header-action{width:76px;max-width:76px}
  .home-heading h1{font-size:27px}
  .home-heading .home-side-desc{font-size:11.5px}
}
@media(max-width:370px){
  .mast .brand{min-height:48px;height:auto}
  .mast .header-action{width:61px;max-width:61px;height:auto;min-height:48px}
  .mast .header-action small{font-size:10px}
  .mast .brand-caption{font-size:7px!important}
  .home-heading{grid-template-columns:max-content minmax(0,1fr);gap:7px}
  .home-heading h1{font-size:clamp(19px,5.6vw,21px);white-space:nowrap}
  .home-heading .home-side-desc{font-size:9px;white-space:nowrap}
}


/* v1.7.5 — just two focused typography corrections; no app logic changes. */
/* Space-distribute the actual caption text from logo's left edge to right edge. */
.mast .brand-caption{
  display:block;
  width:100%;
  margin:0;
  text-align:justify;
  text-align-last:justify;
  text-justify:inter-word;
  white-space:nowrap!important;
  font-size:clamp(7.3px,2.3vw,10px)!important;
  letter-spacing:.1px!important;
}
/* The shortened descriptor is now a single line, centered against the heading. */
.home-heading .home-side-desc{
  display:block;
  align-self:center;
  white-space:nowrap!important;
  width:100%;
  margin:0;
  font-size:clamp(9px,2.65vw,11.5px);
  line-height:1.15;
}
@media(max-width:370px){
  .mast .brand-caption{font-size:7px!important;letter-spacing:0!important}
  .home-heading .home-side-desc{font-size:9px}
}
@media(max-width:350px){
  .mast .brand-caption{font-size:6.5px!important}
  .home-heading .home-side-desc{font-size:8.2px}
}

/* v1.8.0 — condensed first screen (do not shrink controls or text inputs) */
.shell-week{padding-top:9px}
.shell-week .mast{margin-bottom:8px;min-height:0}
.shell-week .topline{margin-bottom:7px}
.shell-week .home-heading h1{line-height:1.1}
.shell-week .card-dark{padding:14px 16px;margin-bottom:10px}
.shell-week .card-dark .summary-row{margin-top:9px}
.shell-week .card-dark .divider{margin:11px 0}
.shell-week .card-dark .row-between{align-items:center}
.shell-week .kpi-grid{gap:7px;margin-bottom:7px}
.shell-week .kpi{padding:10px 9px;gap:1px}
.shell-week .kpi-over{font-size:10px}
.shell-week .kpi-label{margin-top:1px}
.shell-week .section-head{margin:13px 0 9px}
.shell-week .section-head .mt12{margin-top:4px}
.shell-week .day{margin-bottom:9px}
.shell-week .day-bar{padding:11px 13px}
.shell-week .day-body{padding:7px 13px 11px}
.shell-week .empty-day{padding:8px 0 2px}
.shell-week .day .visit{padding:10px 0}

/* Connected week/month control: compact and always visible beneath heading. */
.period-toggle{display:flex;gap:3px;align-items:center;width:max-content;max-width:100%;border:1px solid #bdd7c7;background:#e7f0ea;padding:3px;border-radius:11px;margin-bottom:10px}
.period-choice{border:0;border-radius:8px;color:#3b6b54;background:transparent;font-size:12px;font-weight:800;min-width:90px;min-height:29px;padding:4px 11px}
.period-choice.is-current{background:#fff;color:#126047;box-shadow:0 1px 4px #113a2d16}
.month-navigator{display:flex;align-items:center;justify-content:space-between;gap:10px;background:#fff;border:1px solid var(--line);padding:8px 10px;border-radius:15px;margin-bottom:8px}
.month-navigator h2{font-size:18px;text-transform:capitalize;text-align:center;flex:1;min-width:0}
.month-navigator .week-button{min-width:37px;min-height:33px;border-color:#cedcd2}
.month-legend{line-height:1.35;margin:0 0 10px}
.month-metrics{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:0 0 12px}
.month-metric{padding:12px;background:white;border:1px solid var(--line);border-radius:14px;display:flex;flex-direction:column;gap:3px;min-width:0}
.month-metric-label{font-size:10px;color:#227353;letter-spacing:.4px;font-weight:850}
.month-metric strong{font-size:clamp(18px,5.3vw,24px);line-height:1.2;letter-spacing:-.5px;white-space:nowrap;color:#12362b}
.month-metric small{font-size:10px;color:#70847a;line-height:1.25}
.month-totals{padding:13px 15px}
.month-total-row{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:7px 0;border-bottom:1px solid #e9efeb;font-size:12px}
.month-total-row:last-child{border-bottom:0}
.month-total-row b{white-space:nowrap;font-size:13px}
.month-exports{display:grid;grid-template-columns:1.5fr 1fr;gap:8px;margin-bottom:10px}
.month-exports .btn{padding:10px 6px;min-height:44px;font-size:12px;border-radius:11px;line-height:1.2;text-align:center}
.month-section{margin-top:15px!important}
.month-breakdown{padding:12px 14px}
.month-expense{display:flex;gap:12px;align-items:baseline;justify-content:space-between;border-bottom:1px solid #edf2ee;padding:9px 0;font-size:12px}
.month-expense:last-child{border-bottom:0}
.month-expense>span:last-child{text-align:right;white-space:nowrap;font-weight:790}
.month-expense small{font-size:10px;font-weight:400}
.month-expense-accent{color:#156449}
.month-day{padding:0;overflow:hidden}
.month-date-head{display:flex;justify-content:space-between;align-items:center;background:#f2f8f4;padding:10px 14px;border-bottom:1px solid #dce9df;text-transform:capitalize;font-size:13px}
.month-visit{display:flex;justify-content:space-between;align-items:center;gap:10px;width:100%;text-align:left;background:#fff;border:0;border-bottom:1px solid #edf2ef;padding:12px 14px;color:var(--ink)}
.month-visit:last-child{border-bottom:0}
.month-visit-body{min-width:0;display:flex;flex-direction:column;gap:3px}
.month-visit-body b{font-size:14px}
.month-visit-body small{font-size:11px;overflow-wrap:anywhere;color:var(--muted)}
@media(min-width:700px){.month-metrics{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:370px){.month-metric{padding:10px}.month-metric strong{font-size:17px}.month-exports{grid-template-columns:1fr 1fr}.month-exports .btn{font-size:11px}.period-toggle{margin-bottom:8px}}
/* v1.9.0 · sales budgets and receipt camera */
.commercial-breakdown{display:grid;gap:10px;margin:15px 0 5px}
.commercial-breakdown .row-between{align-items:baseline;flex-wrap:wrap}
.commercial-breakdown b{font-size:14px;white-space:nowrap}
.sales-edit-year{padding:16px;background:#f6faf7;border:1px solid #dae8df;border-radius:15px;display:grid;gap:10px}
.sales-edit-year h3{margin:0}
.sales-edit-year input{max-width:100%}
.receipt-panel{padding:16px;border:1px solid #d5e5db;border-radius:15px;background:#f6faf7;display:grid;gap:10px}
.receipt-panel.is-active{background:#f0f8f2;border-color:#8fc9a9}
.receipt-buttons{display:flex;gap:9px;flex-wrap:wrap}
.receipt-file-choice{position:relative;display:inline-flex!important;align-items:center;justify-content:center;flex:1 1 130px;min-height:43px;padding:9px 12px;border-radius:12px;background:#e3f2e8;border:1px solid #a9d2b9;color:#175b41;cursor:pointer;font-size:13px;font-weight:800;margin:0!important;text-align:center}
/* v1.14.7 - Keep Safari's native 'Choose file' text completely invisible. The user taps the full-size, transparent native input above our custom tile. */
.receipt-panel{min-width:0;gap:11px}
.receipt-panel-heading{flex-wrap:wrap;align-items:center;gap:7px}
.receipt-panel-heading strong{font-size:15px;color:#15332f}
.receipt-explanation{font-size:12px;line-height:1.5;margin:0!important;color:#486157}
.receipt-buttons{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;min-width:0}
.receipt-file-choice{position:relative;display:flex!important;min-width:0;flex-direction:column;gap:7px;align-items:center;justify-content:center;min-height:85px;padding:12px 7px;overflow:hidden;background:#e5f3eb;border:1px solid #a9d2b9;border-radius:13px;color:#175b41;font-size:13px;font-weight:750;line-height:1.3;text-align:center;cursor:pointer;isolation:isolate;margin:0!important}
.receipt-file-choice svg{height:24px;width:24px;flex-shrink:0;pointer-events:none}
.receipt-file-choice span{display:block;pointer-events:none}
.receipt-file-choice .receipt-select{position:absolute!important;inset:0!important;width:100%!important;height:100%!important;max-width:100%!important;min-height:0!important;opacity:0!important;cursor:pointer;z-index:2;display:block!important;margin:0!important;padding:0!important;border:0!important;appearance:none!important;-webkit-appearance:none!important;font-size:0!important;background:transparent!important}
.receipt-file-choice:focus-within{outline:3px solid #78be99;outline-offset:2px}
.receipt-error{color:#a22e37!important;font-weight:750}
.receipt-thumb{width:100%;height:auto;max-height:240px;object-fit:contain;background:white;border-radius:9px;border:1px solid #dfeae3}
.receipt-thumb[hidden]{display:none!important}
/* v1.9.0 · individual customer orders: readable on narrow iPhone screens */
.order-entry{padding:13px 12px;border:1px solid #d6e7dc;background:#f6faf7;border-radius:14px;display:grid;gap:8px;margin:12px 0}
.order-entry h3{font-size:15px;margin:0}
.order-item{display:flex;align-items:center;justify-content:space-between;gap:10px;border-bottom:1px solid #e4ede7;padding:11px 0;font-size:12px;min-width:0}
.order-item:last-child{border-bottom:0}
.order-item>div{min-width:0;overflow-wrap:anywhere}
.order-item b{font-size:13px}
.order-item .btn{flex-shrink:0}
.order-item .small{font-size:11px;line-height:1.4;margin-top:4px}
.order-entry .btn{min-height:39px}
@media(max-width:370px){.commercial-breakdown b{font-size:12px}.order-item .btn{padding:7px 8px}}

/* v1.10 · customer history, preserving the existing weekly/mobile layout */
.client-results-tap{cursor:pointer;transition:border-color .15s,background .15s}
.client-results-tap:hover,.client-results-tap:focus-visible{border-color:#9bc9ad;background:#fcfffd}
.dossier-orders-trigger{cursor:pointer;outline-offset:2px}
.dossier-tabs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px;background:#e8f1eb;border-radius:15px;padding:5px;margin-bottom:15px}
.dossier-tabs button{border:0;border-radius:11px;background:transparent;font-size:12px;font-weight:800;color:#48695b;min-height:43px;padding:9px 3px}
.dossier-tabs button.active{background:#fff;color:#14563f;box-shadow:0 2px 8px #123c2f18}
.dossier-amount{font-size:clamp(11px,3.2vw,16px)!important;overflow-wrap:anywhere;white-space:normal!important}
.dossier-visit{border-left:3px solid #90bda0}
.dossier-field{padding:11px 0;border-bottom:1px solid #edf1ee}
.dossier-field .eyebrow{font-size:10px;letter-spacing:.6px;margin-bottom:7px}
.dossier-source-text{font-size:13px;line-height:1.5;white-space:pre-wrap;overflow-wrap:anywhere;color:#1c3f32;margin-top:8px}
.dossier-consideration{padding:13px 0;border-bottom:1px solid #e4ede7}
.dossier-consideration:last-child{border-bottom:0}
.dossier-consideration .row-between{align-items:center;gap:6px}
.dossier-consideration .row-between>div{min-width:0;flex:1;overflow-wrap:anywhere}
.dossier-consideration .btn{flex-shrink:0}

/* v1.11.0 — global iPhone form geometry and dossier actions. */
*,*::before,*::after{box-sizing:border-box}
html,body,#app{max-width:100%;min-width:0}
.shell,.card,.sheet,.fields,.field,.two,.three,.row-between,.dossier-tabs,.hotel-fields,.client-contact-edit{min-width:0;max-width:100%}
.fields,.hotel-fields,.client-contact-edit{grid-template-columns:minmax(0,1fr)}
.two{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;width:100%;min-width:0}
.three{grid-template-columns:repeat(3,minmax(0,1fr))}
.two>.field,.two>div,.fields>.field,.sheet form,.field{min-width:0;width:100%;max-width:100%}
.field input,.field select,.field textarea,.order-numbers input,
.sheet input:not([type=checkbox]):not([type=radio]),.sheet select,.sheet textarea{
 display:block;width:100%;min-width:0;max-width:100%;box-sizing:border-box;min-height:48px;
}
input[type="date"],input[type="time"],input[type="month"],input[type="datetime-local"]{
 -webkit-min-logical-width:0;min-width:0;width:100%;max-width:100%;padding-left:8px!important;padding-right:8px!important;
}
input[type="date"]::-webkit-date-and-time-value,input[type="time"]::-webkit-date-and-time-value{min-width:0;text-align:center}
input[type="date"]::-webkit-datetime-edit,input[type="time"]::-webkit-datetime-edit{min-width:0;padding:0}
.sheet{max-width:min(640px,100vw);min-width:0;overflow-x:hidden}
.sheet .fields,.sheet .two{width:100%}
.visit-schedule{border-left:1px solid #d2dfd6!important}
.order-numbers{align-items:end}
.order-numbers .field label{min-height:34px;display:flex;align-items:flex-end;line-height:1.2}
.order-numbers input{font-size:15px;padding:10px 9px}
.dossier-new-visit{margin:1px 0 13px}
.dossier-visit-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:14px}
.dossier-visit-actions .btn{flex:1 1 130px;padding:10px 9px;font-size:12px}
.dossier-visit-actions .small{flex:1 1 140px;align-self:center}
.visit-considerations{background:#fff}
@media(max-width:390px){.two{gap:8px}.order-numbers input{font-size:14px;padding:9px 6px}.order-numbers .field label{font-size:11px}}


/* v1.11.1 — Mobile UI polish; no changes to stored information or calculations. */

/* Compact, equally sized address-book actions inside step 1 of the visit wizard. */
#wizard1 > .actionrow:first-child{
  display:grid!important;
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:7px!important;
  width:100%;
  align-items:stretch;
}
#wizard1 > .actionrow:first-child > .btn,
#wizard1 > .actionrow:first-child > .btn:first-child{
  grid-column:auto!important;
  min-width:0;
  width:100%;
  min-height:44px;
  padding:8px 4px!important;
  font-size:clamp(10px,2.8vw,12px)!important;
  letter-spacing:-.22px;
  white-space:nowrap!important;
  line-height:1.2;
  gap:3px;
}

/* Always preserve contrast in the dark explainer card, regardless of other
   muted-text declarations elsewhere in the stylesheet. */
.card-dark .medium.muted,
.card-dark .small.muted,
.card-dark p.muted,
.card-dark .muted{
  color:#e4f3eb!important;
  opacity:1!important;
}
.card-dark > p{position:relative;z-index:1;line-height:1.55}

/* Intrinsic native iOS date input width is wider than its grid allocation at
   phone sizes. Do not allow it to overlap the price field in bottom sheets. */
.sheet .field,.sheet .two > .field{min-width:0;max-width:100%;}
.sheet input,.sheet select,.sheet textarea{max-width:100%;}
.sheet .two{grid-template-columns:repeat(2,minmax(0,1fr));gap:13px;}
@media(max-width:540px){
  /* Stack date/price only: retains full native iPhone date-picker affordance,
     avoids clipping or overlap, and provides room for currency input. */
  #history-form .history-date-amount{grid-template-columns:minmax(0,1fr)!important;gap:13px!important;}
  /* Similar paired date inputs can also overflow due to WebKit intrinsic sizing. */
  .sheet form .two:has(input[type="date"]):not(.order-numbers){grid-template-columns:minmax(0,1fr);gap:13px;}
}
/* Ensure bottom-sheet content can scroll on compact iPhones with keyboard. */
.sheet form,.sheet .fields,.sheet .field{min-width:0;}
.sheet .field label{overflow-wrap:break-word;}

/* v1.12.0 — Tight editorial layout, better legibility, client segmentation and dated relations. */
.brand-caption{display:flex!important;align-items:center;justify-content:space-between!important;width:100%;font-size:clamp(7px,2.05vw,10px)!important;letter-spacing:0!important;white-space:nowrap!important;gap:2px;line-height:1.35!important}
.brand-caption span{display:inline-block;white-space:nowrap}.brand-caption i{font-style:normal;color:#4b8971;font-size:12px;font-weight:400}
.header-actions{gap:7px}.header-action,.header-backup{background:#d9ecdf!important;border:1.5px solid #73ad92!important;color:#165e42!important;box-shadow:0 3px 10px #24574125!important}
.header-action-icon{color:#165e42!important}.header-action small{color:#18553f!important;font-size:10px!important;font-weight:850!important}
.mast{margin-bottom:13px!important}
.stats-page .stats-back{display:block;width:max-content;font-size:14px;font-weight:850;color:#195b43;background:#e8f4eb;border:1px solid #c5dece;padding:9px 13px;border-radius:12px;margin:2px 0 12px;line-height:1.2}
.stats-page .stats-eyebrow{margin:0 0 3px!important;font-size:clamp(9px,2.6vw,11px);letter-spacing:1.4px}
.stats-page h1.stats-title{font-size:clamp(25px,7vw,31px);letter-spacing:-.8px;line-height:1.16;margin:4px 0 7px!important;text-align:justify;text-align-last:justify;width:100%}
.stats-page p.stats-intro{margin:0 0 12px!important;line-height:1.4}
.stats-page>.card{margin-bottom:12px}.stats-page .chart-months{padding-top:9px;margin-top:5px;height:139px}
.chart-legend{display:flex;flex-wrap:wrap;gap:8px 13px;margin:10px 0 0;font-size:11px;color:#35584a;font-weight:650}.chart-legend span{display:flex;align-items:center;gap:5px}.chart-legend i{width:10px;height:10px;border-radius:3px;display:inline-block}.legend-done,.chart-done{background:#258766}.legend-future,.chart-future{background:#e7b83b}.legend-cancel,.chart-cancel{background:#d85756}.chart-none{background:#dee5df}.chart-stack{width:min(24px,100%);height:107px;display:flex;flex-direction:column;justify-content:flex-end;overflow:visible;border-radius:5px}.chart-piece{min-height:0;width:100%}.chart-stack .chart-piece:first-child{border-radius:4px 4px 0 0}.chart-status .chart-col{gap:5px}
/* customer profile and revenue header: stronger information hierarchy, tighter rhythm */
.shell-clients>.card{padding:14px 16px;margin-bottom:10px}.shell-clients .section-head{margin:12px 0 6px}
.client-profile>.divider{margin:9px 0!important}.client-profile h3{margin:2px 0 0!important}.client-profile .row-between{gap:8px}
.client-sales-highlight{padding:12px!important;margin:0!important}.client-sales-layout{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;align-items:center}
.client-sales-layout>.client-sales-secondary{display:grid;gap:6px;min-width:88px}.client-sales-secondary>div{display:grid;gap:1px;text-align:right}.client-sales-secondary span{font-size:10px;color:#557266}.client-sales-secondary b{font-size:clamp(10px,2.9vw,13px);color:#174b38;white-space:nowrap;font-variant-numeric:tabular-nums}
.client-sales-layout .client-sales-amount{font-size:clamp(20px,5.4vw,28px)!important;line-height:1.1;margin:5px 0 0!important;letter-spacing:-.6px;overflow-wrap:anywhere}
.client-sales-highlight>.btn{margin-top:8px!important;padding:8px 10px!important;font-size:12px;min-height:32px!important}
.contact-profile{padding:7px 0!important;line-height:1.3!important}.contact-profile b{font-size:14px}.contact-profile .small{margin:1px 0 0!important;line-height:1.3}
.client-profile .section-head{margin:10px 0 2px!important}.commercial-breakdown{gap:5px!important;margin:7px 0!important}.commercial-breakdown .row-between{gap:9px;min-height:27px;align-items:center!important}.commercial-breakdown .row-between span{flex:1 1 auto;min-width:0}.commercial-breakdown .row-between b{font-size:13px}.commercial-breakdown .divider{margin:5px 0!important}
.shell-clients .client-results-tap>.divider{margin:9px 0!important}.shell-clients .client-results-tap>.helper{margin-top:7px!important}.shell-clients .client-results-tap>.btn{margin-top:9px!important;padding:11px!important}
.order-item{padding:7px 0!important;line-height:1.35;gap:8px}.order-item .small{font-size:11px}.order-item .btn{min-height:32px!important;padding:7px 9px!important}
.shell-clients .trip-list-card{padding:12px 15px!important;margin-bottom:8px!important;line-height:1.25}.shell-clients .trip-list-card h3{font-size:17px;margin-top:5px!important;margin-bottom:3px}.shell-clients .trip-list-card .small{font-size:12px;line-height:1.32;margin-top:4px!important}.shell-clients .trip-list-card .eyebrow{font-size:11px}
/* Segment editor/filter: can tag one or several categories, any = OR, none = all */
.segments-editor,.segments-filter-list{display:flex;flex-wrap:wrap;gap:7px;margin-top:8px}.segment-option,.segment-chip{display:flex;align-items:center;gap:8px;border:1px solid #cbdfd0;background:#f2f8f3;border-radius:12px;padding:10px 11px;font-size:12px;line-height:1.25;color:#1b4b37;font-weight:700;cursor:pointer;flex:1 1 145px;max-width:100%;min-width:0}.segment-option input,.segment-chip input{width:17px;height:17px;min-height:17px;accent-color:#277a5b;flex-shrink:0}.segment-chip:has(input:checked),.segment-option:has(input:checked){background:#d6f0df;border-color:#67b58b}.segment-badges{display:flex;gap:5px;flex-wrap:wrap;margin-top:7px}.segment-badge{background:#e6f1eb;border-radius:9px;padding:4px 7px;color:#225a40;font-size:10px;font-weight:800}.segment-filters{padding:13px 14px!important}.segment-filters h3{margin:0}.segment-filters .helper{margin:6px 0}.segment-filters .segments-filter-list{gap:6px}
/* Dossier: chronological full-width dated reflections alternating with original three-part visit reports. */
.dossier-tabs-two{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px;margin-bottom:10px!important}.dossier-intro{margin:7px 0 11px!important}.dossier-new-visit{margin:2px 0 10px!important;min-height:43px}.dossier-kpis{padding:11px 12px!important}.dossier-timeline-intro{padding:13px!important}.dossier-timeline-intro .btn{margin-top:10px}.dossier-interaction{padding:13px!important;border-left:0!important;margin-bottom:10px!important;border-top:3px solid #78b794}.dossier-interaction-top{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-bottom:8px}.dossier-interaction-top>div{min-width:0;flex:1}.dossier-interaction-top h3{font-size:17px;line-height:1.22;margin:4px 0}.dossier-visit-contact{font-weight:500;color:#527263;font-size:12px}.dossier-columns{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}.dossier-columns>div{min-width:0;background:#f3f8f4;border-radius:11px;padding:9px 8px}.dossier-columns b{font-size:11px;color:#1a6545;display:block;margin-bottom:5px}.dossier-columns p{font-size:12px;line-height:1.38;color:#234537;margin:0;white-space:pre-wrap;overflow-wrap:anywhere}.dossier-interaction-actions{margin-top:9px;border-top:1px solid #e1ebe3;padding-top:8px}.dossier-interaction-actions .btn{font-size:11px;min-height:33px;padding:7px 10px}
.dossier-standalone{border-left:0!important;border-top:3px solid #d2ac48;padding:12px 14px!important;margin-bottom:10px!important;background:#fffcf3}.dossier-standalone .dossier-consideration{padding:5px 0 0!important;border:0}.dossier-standalone .dossier-consideration .dossier-source-text{font-size:13px;color:#213e30;line-height:1.5}.dossier-consideration .row-between{align-items:center;gap:8px}.dossier-consideration .dossier-source-text{margin:6px 0 0!important}.dossier-consideration .btn{padding:7px 9px;min-height:32px}
@media(max-width:430px){.dossier-columns{grid-template-columns:repeat(3,minmax(0,1fr));gap:5px}.dossier-columns>div{padding:8px 6px}.dossier-columns b{font-size:10px}.dossier-columns p{font-size:11px;line-height:1.4}.stats-page h1.stats-title{font-size:clamp(24px,6.5vw,29px)}.client-sales-layout .client-sales-amount{letter-spacing:-1px}.client-sales-secondary b{font-size:11px}}
@media(max-width:350px){.client-sales-layout{grid-template-columns:minmax(0,1fr) auto;gap:5px}.client-sales-layout .client-sales-amount{font-size:19px!important}.client-sales-secondary b{font-size:10px}.dossier-columns{grid-template-columns:minmax(0,1fr)}.dossier-columns>div{padding:7px 9px}.dossier-columns b{font-size:11px}.dossier-columns p{font-size:12px}}
/* Visit detail: no uncontrolled vertical whitespace, yet distinct readable blocks. */
.shell .details-head{margin-bottom:11px}.shell .details-head+.card{margin-top:8px}.shell .visit-schedule{padding:15px!important}.shell .visit-schedule .field{margin-bottom:0}.shell .visit-schedule .two{gap:9px}.shell .visit-schedule .fields{gap:10px}.shell .details-head .mt18{margin-top:10px}.shell .details-head .mt24{margin-top:12px}

/* 1.12.0 detail polish / stats title aligned without distorting word spacing. */
.stats-page h1.stats-title{text-align:left!important;text-align-last:auto!important;letter-spacing:-.7px!important;font-size:clamp(27px,7.4vw,32px)!important}
.shell .details-head{padding:16px 17px!important}.shell .details-head p{margin-top:5px!important;line-height:1.35}.shell .details-head h1{margin:6px 0!important}.shell .details-head+.card{margin-top:10px}
.shell .visit-schedule .fields{gap:10px}.shell .visit-schedule form{margin-top:10px!important}.shell .visit-schedule h3{line-height:1.25}.shell .visit-schedule .pill{font-size:11px}
.shell .card.live-sales-card{padding:13px 15px!important;gap:8px!important}.shell .card.live-sales-card .helper{margin:1px 0 0;line-height:1.35}
.shell .card:has(#km-form) .divider{margin:8px 0!important}.shell .card:has(#km-form) form{gap:10px}.shell .card:has(#km-form) .row-between{gap:7px}


/* v1.13.0 — aligned customer actions, compact contact form, visit groups. */
.dossier-action-pair{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;align-items:stretch;margin:6px 0 11px}
.dossier-action-pair .btn{width:100%;min-width:0;max-width:100%;margin:0!important;min-height:46px;padding:10px 7px;font-size:clamp(11px,3vw,13px);line-height:1.2;white-space:normal;text-align:center}
.dossier-action-pair .dossier-new-interaction{border-color:#78b498;color:#165f43;background:#f5fbf6}
.dossier-contact-entry{border-top-color:#82a9bd!important;background:#f6fafc!important}
.dossier-contact-entry h3{margin:5px 0 0;font-size:16px}
.dossier-contact-text{margin:8px 0 0;white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.45;font-size:14px;color:#24483b}
.stats-client-group{border:1px solid #e0eae3;border-radius:12px;margin-top:9px;overflow:hidden;background:white}
.stats-client-head,.stats-client-visit{display:flex;align-items:center;justify-content:space-between;text-align:left;gap:9px;width:100%;background:transparent;border:0;color:#14392d;font:inherit;padding:12px 13px;min-width:0}
.stats-client-head span:first-child,.stats-client-visit span:first-child{flex:1;min-width:0}
.stats-client-head strong{display:block;font-size:15px;line-height:1.25}
.stats-client-head small,.stats-client-visit small{display:block;color:#56776a;font-size:11px;line-height:1.4;margin-top:4px;overflow-wrap:anywhere}
.stats-client-visits{border-top:1px solid #e0eae3;background:#f6faf7;padding:2px 9px 5px}
.stats-client-visit{padding:10px 6px;border-bottom:1px solid #dce9e0}
.stats-client-visit:last-child{border-bottom:0}
.stats-client-visit b{font-size:12px}
.stats-client-visit:active,.stats-client-head:active{background:#e7f3ea}
.interaction-date-time{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;min-width:0}
.interaction-date-time input{min-width:0;max-width:100%;width:100%;box-sizing:border-box;font-size:14px}
@media(max-width:370px){.dossier-action-pair{gap:6px}.dossier-action-pair .btn{font-size:11px;padding:8px 5px}.interaction-date-time{grid-template-columns:minmax(0,1fr)}}


/* v1.13.1 — iPhone Safari: inset and separated visit schedule date/time controls.
   These are native input controls, so keep the system date/time pickers enabled. */
.shell .visit-schedule{overflow:hidden;}
#visit-schedule-form{
  box-sizing:border-box!important;
  min-width:0!important;max-width:100%!important;width:100%!important;
  padding-inline:5px 10px!important;
}
#visit-schedule-form > .field,#visit-schedule-form > .two{min-width:0;max-width:100%;width:100%;}
#visit-schedule-form .two{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;column-gap:14px!important;}
#visit-schedule-form .two > .field{min-width:0;max-width:100%;width:100%;}
#visit-schedule-form .field input:is([type="date"],[type="time"]){
  box-sizing:border-box!important;display:block!important;
  inline-size:100%!important;min-inline-size:0!important;max-inline-size:100%!important;
  width:100%!important;min-width:0!important;max-width:100%!important;
  padding-inline:6px!important;overflow:hidden;
}
#visit-schedule-form .two .field input[type="time"]{font-size:clamp(14px,3.7vw,16px)!important;}
@media(max-width:350px){
  #visit-schedule-form{padding-inline:4px 8px!important;}
  #visit-schedule-form .two{column-gap:11px!important;}
  #visit-schedule-form .two .field input[type="time"]{font-size:14px!important;}
}
/* v1.14 – three aligned period choices, company terms and customer no-show */
.period-toggle{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:7px!important;width:100%;}
.period-toggle .period-choice{width:100%;min-width:0;text-align:center;justify-content:center;padding-inline:4px;}
.customer-commercial-terms{display:flex;flex-wrap:wrap;align-items:center;column-gap:14px;row-gap:7px;font-size:12px;margin-top:11px;}
.customer-commercial-terms>span{flex:0 1 auto;min-width:0;}
.customer-commercial-terms>p{flex-basis:100%;margin:2px 0 0;}
.payment-flag{font-size:12px;font-weight:750;border-radius:9px;padding:5px 9px;line-height:1.4;display:inline-flex;align-items:center;gap:5px;}
.payment-unknown{background:#e6edeb;color:#516d65;}.payment-punctual{background:#dcf5e8;color:#176c47;}.payment-occasional{background:#fff2cd;color:#8b6716;}.payment-chronic{background:#ffe2c9;color:#ad4e17;}.payment-critical{background:#ffdbdd;color:#ac273a;}
.noshow-alert{background:#ffe4e6;border:1px solid #d9636d;border-radius:12px;padding:10px 13px;color:#a32134;font-weight:800;margin:12px 0 0;}
.annual-months{padding-block:7px!important;}.annual-month{display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:11px;align-items:center;border-bottom:1px solid #e9eeea;padding:11px 0;font-size:12px;}
.annual-month:last-child{border:0}.annual-month strong{font-size:13px;white-space:nowrap}.annual-month span{color:var(--muted);font-size:11px;}.year-sales{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:12px;}
.year-sales>div{background:#f4faf7;padding:12px;border-radius:11px;min-width:0}.year-sales small{display:block;color:var(--muted);font-size:11px}.year-sales strong{display:block;font-size:17px;color:var(--dark);margin-top:5px;overflow-wrap:anywhere}
.month-exports{display:grid!important;grid-template-columns:1fr!important;gap:8px!important}.month-exports>.btn{width:100%;min-height:45px;}
@media(max-width:375px){.annual-month{grid-template-columns:minmax(0,1fr) auto}.annual-month span{grid-column:1;grid-row:2}.annual-month strong{grid-column:2;grid-row:1 / span 2}}

.text-no-show{color:#b62439!important;font-weight:800!important;}

/* v1.14.1 — dated ACI tariffs, four commercial indicators, unmistakable no-show */
.aci-current{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:10px;margin:13px 0 8px}
.aci-current>div{background:#eef6f0;border:1px solid #d2e8d9;border-radius:13px;padding:11px;min-width:0;display:flex;flex-direction:column;gap:5px}
.aci-current span{font-size:10px;color:#547369;font-weight:800;text-transform:uppercase;letter-spacing:.25px}
.aci-current strong{color:#0a563d;font-size:clamp(11px,3.4vw,15px);line-height:1.3;overflow-wrap:anywhere}
.aci-history{display:grid;gap:0;margin-top:8px}
.aci-history-item{display:flex;align-items:center;gap:10px;justify-content:space-between;border-bottom:1px solid #e3eee6;padding:10px 2px;min-width:0}
.aci-history-item:last-child{border-bottom:0}
.aci-history-item>div{display:flex;flex-direction:column;gap:3px;min-width:0}
.aci-history-item b{font-size:14px;color:#164b39}
.aci-history-item small{color:#537063;font-size:11px}
.aci-validity{grid-template-columns:minmax(0,1fr)!important}
.four-sales-metrics{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:11px 0}
.four-sales-metrics>div{padding:10px 8px;border-radius:11px;background:#f0f6f1;display:flex;flex-direction:column;gap:5px;min-width:0}
.four-sales-metrics small{font-size:9px;font-weight:800;color:#537668;letter-spacing:.2px}
.four-sales-metrics b{font-size:clamp(14px,4vw,18px);overflow-wrap:anywhere;color:#0c4330;line-height:1.17}
.previous-year-strip{margin-top:9px}
.visit-no-show{background:#fff3f3!important;border:1px solid #da6067!important;border-left:5px solid #b42335!important;color:#8a1826!important}
.visit-no-show .visit-title,.visit-no-show strong,.visit-no-show b{color:#a31f30!important}
.visit-no-show .visit-meta,.visit-no-show small,.visit-no-show .eyebrow{color:#952a3a!important}
.details-no-show{background:linear-gradient(135deg,#781c28,#a52d3c)!important;border-left:6px solid #ec4558}
.details-no-show .muted{color:#fff2f2!important}
@media(min-width:480px){.four-sales-metrics{grid-template-columns:repeat(4,minmax(0,1fr))}.aci-validity{grid-template-columns:repeat(2,minmax(0,1fr))!important}}

/* v1.14.2 — visible ACI review reminder and compact six-rate history */
.header-action{position:relative}
.aci-due-dot{position:absolute;top:4px;right:5px;width:8px;height:8px;border-radius:50%;background:#d45128;border:2px solid #fff;box-sizing:content-box;pointer-events:none}
.aci-watch{border-radius:12px;padding:10px 11px;margin:10px 0 6px;border:1px solid #cde3d2;background:#eff8f1}
.aci-watch-due{background:#fff6e9;border-color:#eed4ae}
.aci-watch-head{display:flex;justify-content:space-between;flex-wrap:wrap;align-items:baseline;gap:4px 8px}
.aci-watch-head strong{font-size:12px;color:#1d6049}
.aci-watch-due .aci-watch-head strong{color:#885400}
.aci-watch-head small{font-size:10px;color:#5c7468}
.aci-watch p{color:#536b5d;font-size:11px;line-height:1.4;margin:5px 0 9px}
.aci-watch-actions{display:grid;grid-template-columns:1fr 1fr;gap:7px}
.aci-watch-actions .btn{min-width:0;text-align:center;display:flex;align-items:center;justify-content:center;white-space:normal;font-size:11px;padding:8px 6px;line-height:1.22;min-height:38px}
.aci-list-heading{margin-top:12px!important;margin-bottom:3px!important}
.aci-list-heading h3{font-size:14px;line-height:1.25}
.aci-list-heading .pill{font-size:10px;padding:4px 8px}
.aci-history{gap:0!important;margin-top:2px!important}
.aci-history-item{display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;align-items:center!important;gap:5px!important;padding:5px 0!important;min-height:34px!important}
.aci-history-item>div{display:flex!important;flex-direction:row!important;align-items:center!important;justify-content:space-between!important;flex-wrap:wrap;column-gap:8px!important;row-gap:1px!important;min-width:0}
.aci-history-item b{font-size:12px!important;white-space:nowrap;line-height:1.2}
.aci-history-item small{font-size:10px!important;line-height:1.2;overflow-wrap:anywhere}
.aci-history-item .btn{font-size:10px!important;min-height:31px!important;padding:5px 7px!important;white-space:nowrap}
@media(max-width:370px){.aci-current{gap:6px}.aci-current>div{padding:8px}.aci-watch-actions{gap:5px}}

/* v1.14.3 · Vehicle reference, plate and mileage bracket (iPhone-safe layout). */
.aci-vehicle-form{margin:13px 0 10px;padding:13px;border:1px solid #dce8df;border-radius:15px;background:#f8fbf8;gap:9px}
.aci-vehicle-form .field{min-width:0;margin:0}
.aci-vehicle-form .field label{font-size:12px;line-height:1.25;display:block;margin-bottom:5px}
.aci-vehicle-form input,.aci-vehicle-form select,.aci-vehicle-form textarea{box-sizing:border-box;max-width:100%;min-width:0;font-size:14px;min-height:43px;padding:9px 11px}
.aci-vehicle-row{display:grid;grid-template-columns:minmax(0,.77fr) minmax(0,1.23fr);gap:9px;min-width:0}
.aci-vehicle-footer{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap}
.aci-vehicle-footer .helper{flex:1;min-width:120px;margin:0;font-size:11px}
.aci-vehicle-footer .btn{white-space:nowrap}
@media(max-width:350px){.aci-vehicle-row{grid-template-columns:minmax(0,1fr)}.aci-vehicle-footer{flex-direction:column;align-items:stretch}}

.aci-vehicle-form textarea{min-height:55px;line-height:1.35;resize:vertical;}

/* v1.14.4 — consistent, visible commercial & expense report actions */
.month-reports{padding:14px 14px 12px;margin:10px 0 14px;background:#f9fcfa;border:1px solid #bfdaca;}
.month-reports-title{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap;}
.month-reports-title h3{margin:0;color:#123e30;font-size:16px;}
.month-reports-title .pill{text-transform:capitalize;}
.month-reports p{margin:7px 0 10px;line-height:1.35;}
.month-reports .month-exports{margin:0;gap:8px;}
.month-reports .month-exports>.btn{display:flex;align-items:center;justify-content:center;min-height:48px;font-size:13px;line-height:1.3;padding:10px 9px;white-space:normal;}
.month-csv-button{width:100%;margin-top:9px;min-height:34px;}
.settings-report-access .month-navigator{margin:8px 0 10px;}

/* v1.14.6 — document evidence indicators, compact and legible on iPhone */
.receipt-badge{display:inline-flex;align-items:center;gap:3px;max-width:100%;padding:4px 7px;border-radius:8px;font-size:10px;font-weight:800;line-height:1.25;white-space:normal;text-align:left}
.receipt-badge-attached{background:#e5f5ea;color:#146b43}
.receipt-badge-missing{background:#fff0ee;color:#ac3640}
.receipt-badge-neutral{background:#eef2ef;color:#64766b}
.receipt-list-status{margin-top:5px}.receipt-note{display:inline-block;margin-top:3px}.month-receipt-row{display:flex;width:100%;padding:11px 0;align-items:center;justify-content:space-between;gap:12px;text-align:left;border:0;border-bottom:1px solid #e8eee9;background:transparent;color:var(--ink)}
.month-receipt-row:last-child{border-bottom:0}.month-receipt-main{min-width:0;display:flex;flex-direction:column;gap:3px}.month-receipt-main b{font-size:12px;line-height:1.35;overflow-wrap:anywhere}.month-receipt-main small{font-size:11px;color:#63766d}.month-receipt-row .receipt-badge{flex:0 0 auto;max-width:145px}.receipt-instructions{margin-bottom:9px}.category-receipt-count{font-size:10px;color:#4e6d5a;white-space:nowrap}
@media(max-width:370px){.month-receipt-row{gap:6px}.month-receipt-row .receipt-badge{max-width:112px;font-size:9px}.month-receipt-main b{font-size:11px}}

/* v1.14.8 — compact receipt status aligned to the expense name */
.expense-history-main{flex:1 1 auto;min-width:0}
.expense-name-line{display:flex;align-items:center;justify-content:space-between;gap:8px;min-width:0}
.expense-name-line .history-title,.expense-name-line .table-label{min-width:0;overflow-wrap:anywhere}
.expense-name-line .receipt-badge{flex:0 0 auto}
.receipt-badge{font-size:10px;white-space:nowrap;padding:4px 7px;line-height:1.2;text-align:center;letter-spacing:.1px}
.expense-table .expense-name-line{min-width:146px}
.expense-table .receipt-note{display:block;max-width:180px;overflow-wrap:anywhere;margin-top:3px}
.expense-table td:first-child{min-width:158px}
.history-item:has(.expense-history-main){gap:7px}

@media(max-width:370px){.expense-name-line{gap:5px}.receipt-badge{font-size:9px;padding:4px 5px}.expense-history-main .history-title{font-size:12px}}
/* Keep expense labels and receipt status together on narrow iPhone screens. */
@media(max-width:520px){
 .expense-table thead{display:none}
 .expense-table tbody{display:block}
 .expense-table tr{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px 10px;padding:11px 1px;border-bottom:1px solid #ecf0ed}
 .expense-table tr:last-child{border-bottom:0}
 .expense-table td,.expense-table td:first-child{border:0;padding:0;min-width:0;font-size:12px;white-space:normal;text-align:left}
 .expense-table td:first-child{grid-column:1/-1}
 .expense-table .expense-name-line{min-width:0;justify-content:flex-start;gap:8px}
 .expense-table .table-label{font-size:13px;white-space:nowrap}
 .expense-table .receipt-badge{font-size:10px}
 .expense-table .receipt-note{margin:3px 0 0;max-width:none;font-size:10px}
 .expense-table td:nth-child(n+2){font-size:12px;font-weight:760}
 .expense-table td:nth-child(n+2)::before{display:block;margin-bottom:2px;color:#738a7c;font-size:9px;font-weight:800;letter-spacing:.25px}
 .expense-table td:nth-child(2)::before{content:'PREVISTO'}
 .expense-table td:nth-child(3)::before{content:'REALE'}
 .expense-table td:nth-child(4)::before{content:'SCOSTAMENTO'}
}

/* v1.14.9 — align receipt immediately after expense name; enlarge amounts, clear variance */
.expense-name-line{display:flex;justify-content:flex-start!important;align-items:center;flex-wrap:wrap;gap:5px 9px;min-width:0}
.expense-name-line .history-title,.expense-name-line .table-label{flex:0 1 auto;font-size:15px;overflow-wrap:normal;white-space:normal}
.receipt-badge{appearance:none;-webkit-appearance:none;display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;white-space:nowrap;font-family:inherit;font-size:11px!important;font-weight:800;line-height:1.15!important;letter-spacing:0;border-radius:7px;padding:5px 7px!important;cursor:pointer;min-height:28px;vertical-align:middle}
.receipt-badge:focus-visible{outline:3px solid #76be9b;outline-offset:2px}
.expense-history-row{display:block;padding:13px 0!important;cursor:pointer}
.expense-history-row .expense-history-main{width:100%;max-width:none;min-width:0}
.expense-figures{display:flex;align-items:flex-end;gap:8px 18px;flex-wrap:wrap;margin-top:8px;min-width:0}
.expense-figure{display:flex;flex-direction:column;gap:3px;flex:0 0 auto;min-width:0;color:var(--ink)}
.expense-figure small{font-size:11px;line-height:1.3;color:var(--muted);font-weight:600}
.expense-figure strong{font-size:17px;font-weight:850;line-height:1.2;white-space:nowrap;letter-spacing:-.3px}
.expense-figure.variance.good,.expense-figure.variance.bad,.expense-figure.variance.neutral{font-weight:700}
.expense-figure.variance.good strong{color:#14724f}
.expense-figure.variance.bad strong{color:#b22e3e}
.expense-figure.variance.neutral strong{color:var(--ink)}
.expense-delta{font-size:15px!important;font-weight:850;white-space:nowrap;line-height:1.4;align-self:flex-end;margin-left:auto}
.expense-to-register{font-size:13px;font-weight:750;color:#566960;align-self:flex-end}
.expense-detail-list{display:grid;gap:9px;margin:13px 0}
.expense-detail-item{border:1px solid #e0e8e2;border-radius:13px;padding:12px;background:#fafcfb;cursor:pointer;min-width:0}
.expense-detail-item .table-label{font-size:15px}
.expense-detail-item .expense-figures{gap:9px 14px}
.expense-note{font-size:12px;color:var(--muted);margin:7px 0 0}
.mileage-summary{background:#f5f9f6;border:1px solid #dce9df;border-radius:13px;padding:12px;margin-top:14px}
.mileage-heading{font-size:14px;font-weight:800;margin-bottom:9px}
.mileage-amounts,.mileage-comparison{display:flex;flex-wrap:wrap;align-items:center;gap:7px 17px;font-size:14px;margin-bottom:9px}
.mileage-amounts b,.mileage-comparison strong{font-size:16px;white-space:nowrap}
.mileage-summary-footer{display:flex;justify-content:space-between;gap:8px;align-items:center;flex-wrap:wrap}
.mileage-diff{font-size:15px;font-weight:850;white-space:nowrap}
.week-balance-message{border-radius:12px;padding:12px 13px;margin:14px 0 0;font-size:16px;font-weight:750;line-height:1.4}
.week-balance-message strong{font-size:19px;white-space:nowrap}
.week-balance-message.good{background:#eaf7ef;color:#156741}
.week-balance-message.bad{background:#fff0f0;color:#b03240}
.week-balance-message.neutral{background:#edf2ef;color:#3f6152}
.week-balance-caption{font-size:13px;font-weight:550}
@media(max-width:370px){.receipt-badge{font-size:10px!important;padding:5px 6px!important}.expense-figures{gap:7px 11px}.expense-figure strong{font-size:16px}.expense-delta{font-size:14px!important}.mileage-amounts,.mileage-comparison{gap:7px 12px}}
/* Receipt controls: remove native button border across Safari/Chromium. */
.receipt-badge{border:0!important;box-shadow:none;background-clip:padding-box}
.receipt-badge-attached{background:#e0f5e9;color:#24634c}
.receipt-badge-missing{background:#fff0f1;color:#ac404b}
.receipt-badge-neutral{background:#e8eeeb;color:#63736d}

/* v1.15.0 · Dense 4-column expense accounting and clear reporting readiness */
.expense-detail-item,.expense-history-row{padding-top:10px!important;padding-bottom:10px!important}
.expense-detail-list{gap:7px!important;margin:10px 0!important}
.expense-receipt-strip{display:flex;align-items:center;justify-content:flex-start;gap:8px;min-height:26px;margin:0 0 7px}
.expense-receipt-strip .receipt-badge{font-size:11px!important;min-height:25px;padding:4px 7px!important}
.expense-inline-warning{font-size:11px;font-weight:650;color:#5b6d61}
.expense-summary-grid{display:grid;grid-template-columns:minmax(0,1.12fr) minmax(0,.98fr) minmax(0,.91fr) minmax(0,1.17fr);gap:6px;align-items:end;width:100%;min-width:0}
.expense-sum-cell{display:flex;flex-direction:column;min-width:0;gap:4px;justify-content:end}
.expense-sum-caption{font-size:10px;font-weight:800;letter-spacing:.1px;color:#677f73;line-height:1.25;white-space:nowrap}
.expense-sum-cell strong{font-size:clamp(12px,3.5vw,15px);font-weight:820;line-height:1.2;color:#143d30;letter-spacing:-.35px;overflow-wrap:anywhere}
.expense-sum-name strong{font-size:clamp(12px,3.7vw,15px);letter-spacing:-.2px;line-height:1.2}
.expense-sum-final{text-align:right;align-items:flex-end;border-left:1px solid #dae4dd;padding-left:4px}
.expense-sum-final strong{font-weight:900;font-size:clamp(13px,3.8vw,16px)}
.expense-sum-cell.variance.good strong{color:#126943}
.expense-sum-cell.variance.bad strong{color:#b02e3c}
.expense-sum-cell.variance.neutral strong{color:#143d30}
.expense-summary-grid .expense-sum-cell:nth-child(2),.expense-summary-grid .expense-sum-cell:nth-child(3){text-align:right;align-items:flex-end}
.expense-history-row .expense-history-main{width:100%;max-width:100%}
.period-balance{padding:11px 12px;margin:12px 0 0;border-radius:12px;border:1px solid #dde4df;line-height:1.35}
.period-balance.good{background:#ebf7f0;color:#176544;border-color:#c6e2d0}
.period-balance.bad{background:#fff0f0;color:#a52c39;border-color:#f1c9cd}
.period-balance.neutral{background:#f0f5f2;color:#315d48;border-color:#d8e7de}
.period-balance-head{font-size:14px;font-weight:900;letter-spacing:.3px;margin-bottom:5px}
.period-balance-open .period-balance-head{background:#fff0cf;color:#76521b;display:inline-block;padding:5px 8px;border-radius:7px;margin-bottom:8px}
.period-balance-ready .period-balance-head{background:#176a45;color:#fff;display:inline-block;padding:5px 8px;border-radius:7px;margin-bottom:8px}
.period-balance-statement{font-size:15px;font-weight:750}
.period-balance-statement strong{font-size:17px;font-weight:900}
.period-balance-detail{font-size:12px;line-height:1.4;margin:6px 0 0;font-weight:600;opacity:.88}
.month-category-item{padding:10px 0;border-bottom:1px solid #dce5df}
.month-category-item:last-child{border-bottom:0}
.month-category-top{display:flex;align-items:center;gap:7px;justify-content:space-between;flex-wrap:wrap;margin-bottom:8px}
.month-category-top b{font-size:14px;line-height:1.15}
.month-category-status{font-size:10px;color:#5b7165;font-weight:700}
.month-category-figures{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr) minmax(0,1.35fr);gap:8px;align-items:end}
.month-category-figures>div{display:flex;flex-direction:column;gap:3px;min-width:0}
.month-category-figures small{font-size:10px;font-weight:850;color:#677f73;white-space:nowrap}
.month-category-figures strong{font-size:clamp(12px,3.6vw,17px);font-weight:850;overflow-wrap:anywhere;line-height:1.2}
.month-category-figures>div:nth-child(2){text-align:center}
.month-category-figures .month-category-refund{align-items:flex-end;text-align:right;border-left:1px solid #dce5df;padding-left:5px}
.month-category-refund strong{font-weight:950!important}
.month-category-figures .variance.good strong{color:#176b46}
.month-category-figures .variance.bad strong{color:#ae2c3a}
@media(max-width:360px){.expense-summary-grid{grid-template-columns:minmax(0,1.05fr) minmax(0,.93fr) minmax(0,.87fr) minmax(0,1.12fr);gap:4px}.expense-sum-cell strong{font-size:11.5px}.expense-sum-final strong{font-size:12.3px}.expense-sum-caption{font-size:9px}.expense-sum-name strong{font-size:12px}.month-category-figures{gap:4px}.month-category-figures strong{font-size:12px}.month-category-figures small{font-size:9px}}

/* v1.15.1: densità, gerarchia degli importi, stato della spesa */
.shell .card{padding-top:16px;padding-bottom:16px}
.shell .section-head{margin-top:18px;margin-bottom:9px}
.shell .divider{margin-top:12px;margin-bottom:12px}
.shell .history-item{padding-top:10px;padding-bottom:10px}
.shell .fields{gap:11px}
.shell .field{gap:5px}
.shell .field label{margin-bottom:0}
.shell .visit-schedule .fields{gap:10px}
.shell .month-total-row{padding-top:9px;padding-bottom:9px}
.shell .month-metrics{gap:9px}
.shell .month-metric{padding:12px}
.shell .expense-history-row{padding:10px 0!important}
.expense-compact-row{width:100%;min-width:0}
.expense-name-line{display:flex;align-items:center;gap:8px;margin-bottom:8px;font-size:16px;line-height:1.2}
.expense-name-line strong{font-weight:850}
.expense-open-mark{font-size:21px;color:#82968a;font-weight:600}
.expense-status-done strong{color:#147348}
.expense-status-future strong{color:#8a9691}
.expense-status-missing strong{color:#b92f42}
.expense-status-partial strong{color:#c17b19}
.expense-summary-grid{grid-template-columns:minmax(0,1fr) minmax(0,1fr) minmax(0,.9fr) minmax(0,1.25fr);gap:6px}
.expense-sum-cell{gap:3px}
.expense-sum-cell strong{font-size:clamp(12px,3.45vw,16px);white-space:nowrap;overflow-wrap:normal;letter-spacing:-.45px}
.expense-sum-caption{font-size:10px;letter-spacing:0}
.expense-summary-grid .expense-sum-cell:nth-child(2),.expense-summary-grid .expense-sum-cell:nth-child(3){text-align:left;align-items:flex-start}
.expense-sum-final strong{color:#123d2f!important;font-size:clamp(14px,3.8vw,18px);font-weight:900}
.expense-balance-card{padding-top:3px!important;padding-bottom:9px!important}
.expense-balance-card .period-balance{margin-top:0;border:0;background:transparent;padding:7px 3px}
.period-balance-open .period-balance-head,.period-balance-ready .period-balance-head{display:block;background:transparent;color:inherit;padding:0;border:0;margin:0 0 4px;font-size:clamp(12px,3.5vw,15px);font-weight:800;letter-spacing:-.25px;white-space:nowrap}
.period-balance-statement,.period-balance-statement strong{font-size:clamp(12px,3.45vw,15px);line-height:1.28}
.period-balance-detail{font-size:12px;margin-top:5px}
.mileage-heading{font-size:15px;margin-bottom:7px}
.mileage-summary{padding:10px;margin-top:10px}
.mileage-summary-footer{gap:8px;align-items:center}
.mileage-refund-final{margin-left:auto;text-align:right;display:flex;flex-direction:column;gap:3px}
.mileage-refund-final small{font-size:10px;font-weight:850;color:#637e6e}
.mileage-refund-final strong{font-size:18px;font-weight:900;color:#123d2f}
.aci-history-item{padding-top:7px!important;padding-bottom:7px!important}
@media(max-width:370px){.expense-summary-grid{gap:3px}.expense-sum-caption{font-size:9px}.expense-sum-cell strong{font-size:11.4px}.expense-sum-final strong{font-size:12.6px}.mileage-refund-final strong{font-size:15px}}

.month-category-figures{grid-template-columns:minmax(0,1fr) minmax(0,1fr) minmax(0,.85fr) minmax(0,1.22fr);gap:5px}
.month-category-figures>div:nth-child(2){text-align:left}
.month-category-figures .month-category-percent{text-align:left}
.month-category-figures strong{font-size:clamp(11px,3.25vw,15px);white-space:nowrap;overflow-wrap:normal}
.month-category-figures small{font-size:9px}
@media(max-width:370px){.month-category-figures{gap:3px}.month-category-figures strong{font-size:11px}.month-category-figures small{font-size:8.5px}}
/* v1.16.0 — compact and consistent expense reconciliation */
.expense-topline{margin-bottom:6px!important}
.expense-selectors{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.3fr);gap:8px;margin:6px 0 10px}
.expense-selectors label{font-size:11px;font-weight:750;color:#527060;min-width:0}
.expense-selectors select{display:block;width:100%;min-width:0;margin-top:4px;border:1px solid #c7d8ce;border-radius:10px;background:#fff;color:#163e30;padding:9px 6px;font-size:12px;font-weight:700;min-height:38px}
.expense-hero{margin-bottom:8px!important}
.expense-balance-action{display:block;width:100%;text-align:left;border:1px solid #d6e5db;cursor:pointer;margin-bottom:10px!important}
.expense-balance-action .period-balance{padding:2px 0!important}
.expense-balance-action .period-balance-head{background:none!important;color:inherit!important;white-space:nowrap;font-size:clamp(11px,3.2vw,14px)!important;letter-spacing:-.25px!important}
.expense-balance-action .period-balance-statement,.expense-balance-action .period-balance-statement strong{font-size:clamp(11px,3.2vw,14px)!important;white-space:nowrap}
.expense-balance-action .period-balance-detail{margin-top:4px;font-size:11px}
.expense-pending-hint{font-size:11px;color:#526e5d;margin-top:4px;font-weight:700}
.expense-section-head{margin:12px 0 7px!important}
.expense-section-head h2{font-size:clamp(12px,3.4vw,16px);white-space:nowrap;letter-spacing:-.35px}
.expense-visit-card{padding:12px!important;margin-bottom:8px!important}
.expense-visit-card .divider{margin:9px 0!important}
.expense-visit-card .expense-history-row{padding:8px 0!important}
.expense-visit-card .expense-name-line{margin-bottom:5px;font-size:15px}
.expense-visit-card .expense-sum-cell strong{font-size:clamp(11px,3.05vw,15px)}
.expense-visit-card .expense-sum-final strong{font-size:clamp(12px,3.4vw,16px)}
.expense-visit-card .expense-summary-grid{gap:3px}
.expense-visit-card .expense-sum-caption{font-size:9px}
.expense-km-caption{font-size:11px;color:#637c6c;margin:-2px 0 5px}
.expense-status-done strong{color:#009b4d!important}
.expense-status-future strong{color:#85918b!important}
.expense-status-missing strong{color:#dc2626!important}
.expense-status-partial strong{color:#ea7900!important}
.expense-pending-card{padding:8px 10px!important}
.expense-pending-count{font-size:12px;font-weight:800;color:#547161;margin-bottom:4px}
.expense-screen-head h1{font-size:23px;margin:7px 0 4px}
.expense-pending-item{display:flex;align-items:center;gap:7px;width:100%;border:0;border-top:1px solid #e4ece6;padding:6px 1px;background:transparent;text-align:left;color:#183c2d;cursor:pointer;min-height:42px}
.expense-pending-marker{height:29px;width:4px;flex:0 0 4px;border-radius:4px;background:#85918b}
.expense-pending-item.expense-status-missing .expense-pending-marker{background:#dc2626}
.expense-pending-item.expense-status-partial .expense-pending-marker{background:#ea7900}
.expense-pending-item .expense-pending-content{flex:1;min-width:0;display:flex;flex-direction:column;gap:1px}
.expense-pending-primary,.expense-pending-secondary{display:flex;justify-content:space-between;gap:6px;align-items:center;min-width:0}
.expense-pending-primary strong{font-size:13px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.expense-pending-item.expense-status-missing .expense-pending-primary strong{color:#dc2626}
.expense-pending-item.expense-status-partial .expense-pending-primary strong{color:#ea7900}
.expense-pending-item.expense-status-future .expense-pending-primary strong{color:#85918b}
.expense-pending-primary span,.expense-pending-secondary{font-size:10px;color:#6e8277}
.expense-pending-secondary span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.expense-pending-arrow{font-size:17px;color:#7e9387}
.week-today{border:1px solid #b6d2c1;border-radius:7px;background:#f2f8f4;color:#176c48;padding:5px 7px;font-size:11px;font-weight:850;cursor:pointer}
@media(max-width:370px){.expense-selectors{gap:5px}.expense-selectors select{font-size:11px;padding-inline:3px}.expense-section-head h2{font-size:11.5px}}
/* v1.17.0 — uniform form rhythm, clearer variances and compact information */
:root{--tm-positive:#00B84A;--tm-negative:#F02030}
.variance.good,.variance.good strong,.expense-figure.variance.good strong,.expense-sum-cell.variance.good strong,.month-category-figures .variance.good strong{color:var(--tm-positive)!important}
.variance.bad,.variance.bad strong,.expense-figure.variance.bad strong,.expense-sum-cell.variance.bad strong,.month-category-figures .variance.bad strong{color:var(--tm-negative)!important}
.fields{row-gap:14px!important}.fields .field{display:flex;flex-direction:column;gap:4px!important;margin:0!important;min-width:0}.fields .two,.fields .aci-vehicle-row{gap:12px!important;min-width:0;align-items:start}.fields .field>input:not([type=checkbox]),.fields .field>select{min-height:48px;box-sizing:border-box;width:100%}.fields .field>textarea{box-sizing:border-box;width:100%}
#visit-schedule-form .two{column-gap:12px!important}.aci-vehicle-row{grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important}.aci-vehicle-row>.field{min-width:0}.aci-vehicle-footer{gap:12px;align-items:center}
#vehicle-model{white-space:nowrap;overflow-x:auto;font-size:clamp(11px,2.9vw,14px);text-overflow:clip}
.details-head>p.muted.medium{color:#D9F5E7!important;opacity:1!important}
.tm-client-actions{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:10px}.tm-client-actions .btn{min-width:0;padding-inline:6px;font-size:13px}
.tm-order-view{display:grid;gap:0;margin:12px 0 18px}.tm-order-view p{display:flex;justify-content:space-between;align-items:flex-start;gap:10px;border-bottom:1px solid #e3eae5;padding:9px 0;margin:0}.tm-order-view p small{color:#64786d;flex:0 0 42%}.tm-order-view p strong{text-align:right;overflow-wrap:anywhere}
.tm-budget-panel{padding:13px!important;margin:10px 0!important}.tm-budget-panel h3{font-size:15px}.tm-budget-values{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:12px 0}.tm-budget-values>div{min-width:0}.tm-budget-values small{display:block;color:#627a6b;font-size:10px}.tm-budget-values strong{font-size:clamp(12px,3.5vw,16px);white-space:nowrap}.tm-budget-track{height:10px;border-radius:20px;background:#e5ece8;overflow:hidden}.tm-budget-track>div{height:100%;background:var(--tm-positive);border-radius:20px}.tm-budget-panel .helper{margin-top:8px}.tm-budget-equivalent{font-size:13px;color:#176448;background:#edf8f1;border-radius:9px;padding:11px}
.tm-nav-bar{display:flex;justify-content:space-between;align-items:center;gap:8px;margin:6px 0}.tm-nav-bar .back{margin:0!important;white-space:nowrap;font-size:12px}.tm-nav-bar+.back{display:none}
/* Keep the old contextual back only where the new history navigation is absent. */
.shell:has(.tm-nav-bar)>.back:first-of-type{display:none}
.client-profile .medium.mt12{font-size:clamp(11px,3.2vw,14px);letter-spacing:-.15px;overflow-wrap:anywhere}
.tm-budget-warning{font-size:12px;font-weight:700;color:#B52E30;background:#fff2ee;padding:8px 10px;border-radius:8px;margin-top:8px}
.tm-archived-clients{margin-top:10px}.tm-archived-row{border-top:1px solid #e4ece7;padding:9px 0;gap:10px}.tm-archived-row span{overflow-wrap:anywhere}

/* v1.18.0 – consistent spacing and navigation across iPhone screens */
.tm-nav-bar{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.5fr);align-items:center;gap:8px;margin:8px 0 14px;min-height:34px}
.tm-nav-bar .back:first-child{text-align:left;justify-self:start;font-size:14px;font-weight:750}
.tm-nav-bar .back:last-child:not(:first-child){text-align:right;justify-self:end;font-size:11px;white-space:normal;line-height:1.2}
#visit-schedule-form .two{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;column-gap:12px!important;align-items:start!important}
#visit-schedule-form .two>.field{min-width:0!important;max-width:100%!important}
#visit-schedule-form .two input{min-width:0!important;width:100%!important;box-sizing:border-box!important}
.aci-vehicle-row{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:12px!important}
.aci-vehicle-row>.field{min-width:0!important}
.aci-vehicle-row input,.aci-vehicle-row select{width:100%!important;min-width:0!important;box-sizing:border-box!important}
#vehicle-model{white-space:nowrap!important;overflow-x:auto!important;line-height:1.4!important}
.details-head>p.muted.medium{color:#D9F5E7!important;opacity:1!important}
:root{--tm-positive:#00B84A;--tm-negative:#F02030}
.variance.good{color:var(--tm-positive)!important}.variance.bad{color:var(--tm-negative)!important}
@media(max-width:370px){.tm-nav-bar .back{font-size:11px!important}.tm-nav-bar .back:last-child:not(:first-child){font-size:10px!important}}

/* v1.20.0 · spese raggruppate per cliente e visita */
.tm-expense-client-card{padding:0!important;overflow:hidden;margin-bottom:10px!important}
.tm-expense-client-head,.tm-expense-visit-toggle{font:inherit;border:0;background:transparent;color:inherit;width:100%;display:grid;align-items:center;text-align:left;cursor:pointer;min-width:0}
.tm-expense-client-head{grid-template-columns:minmax(0,1fr) auto 16px;gap:12px;padding:15px 13px;background:#edf7f0}
.tm-expense-client-name{font-weight:800;font-size:18px;min-width:0;overflow-wrap:anywhere;color:#103f30}
.tm-expense-client-name small,.tm-expense-client-total small,.tm-expense-visit-date small,.tm-expense-visit-money small{display:block;font-size:11px;font-weight:500;color:#5d786b;margin-top:3px}
.tm-expense-client-total{text-align:right;white-space:nowrap;color:#104f37}
.tm-expense-client-total strong{font-size:16px}
.tm-expense-chevron{color:#537a68;font-weight:700;font-size:16px}
.tm-expense-visit-list{padding:0 12px 5px}
.tm-expense-visit+.tm-expense-visit{border-top:1px solid #dbe6df}
.tm-expense-visit-toggle{grid-template-columns:minmax(0,1fr) minmax(68px,.68fr) minmax(68px,.68fr) 12px;gap:7px;padding:12px 0}
.tm-expense-visit-date{font-size:13px;font-weight:750;color:#173f32;min-width:0}
.tm-expense-visit-date small{font-size:10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.tm-expense-visit-money{min-width:0;text-align:right}
.tm-expense-visit-money strong{font-size:clamp(11px,3.2vw,15px);white-space:nowrap;color:#123d30}
.tm-expense-visit-money small{font-size:9px;font-weight:750;letter-spacing:.03em}
.tm-expense-visit-details{border-top:1px dashed #c7d7cd;padding:8px 0 11px}
.tm-expense-visit-actions{display:flex;flex-wrap:wrap;gap:6px;margin:3px 0 10px}
.tm-expense-visit-actions .btn{font-size:11px;padding:8px 10px;min-height:34px}
.tm-expense-visit-details .expense-history-row{padding:8px 0!important}
@media(max-width:365px){.tm-expense-visit-toggle{grid-template-columns:minmax(0,1fr) 72px 72px 10px;gap:3px}.tm-expense-visit-date{font-size:12px}.tm-expense-visit-money strong{font-size:11px}}

.client-profile-actions{display:flex;justify-content:flex-end;margin-top:14px;padding-top:12px;border-top:1px solid var(--line)}.client-profile-actions .btn{font-size:13px}
