:root{--blue:#1d4ed8;--ink:#111827;--muted:#4b5563;--line:#d1d5db;--bg:#f3f4f6;--card:#fff;
--red:#b91c1c;--redbg:#fee2e2;--green:#15803d;--greenbg:#dcfce7;--orange:#b45309;--orangebg:#fef3c7;--purple:#6d28d9;--purplebg:#ede9fe;--gray:#374151;--graybg:#e5e7eb}
*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{margin:0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;font-size:18px;line-height:1.35;color:var(--ink);background:var(--bg);padding-bottom:env(safe-area-inset-bottom)}
[hidden]{display:none!important}
.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
button,input,textarea{font:inherit;color:inherit}
:focus-visible{outline:3px solid #f59e0b;outline-offset:2px}
.topbar{position:sticky;top:0;z-index:5;display:flex;align-items:center;gap:8px;min-height:60px;padding:8px 12px;padding-top:calc(8px + env(safe-area-inset-top));background:#fff;color:#A0302A;border-bottom:3px solid #A0302A}
.brand{flex:1;display:flex;align-items:center;gap:8px;min-width:0}
.brandmark{width:40px;height:40px;flex:none}
.brandtext{min-width:0}
.topbar h1{margin:0;font-size:24px;font-weight:900;letter-spacing:1px;line-height:1.1}
.tagline{margin:1px 0 0;font-size:12px;font-weight:600;color:#6b2a25;line-height:1.2}
.tagline[hidden]{display:none}
.iconbtn{background:#f6e7e5;border:0;color:#A0302A;border-radius:12px;min-height:46px;min-width:46px;padding:0 14px;font-size:18px;font-weight:700;cursor:pointer}
.gear{font-size:24px;padding:0 10px}
main{max-width:640px;margin:0 auto;padding:14px 12px 40px}
.bigbtn{display:flex;align-items:center;justify-content:center;width:100%;min-height:64px;margin:0 0 14px;border-radius:16px;border:2px solid transparent;font-size:22px;font-weight:800;cursor:pointer;text-align:center}
.primary{background:var(--blue);color:#fff}
.primary:active{background:#1e40af}
.ghost{background:#fff;color:var(--blue);border-color:var(--blue)}
.danger{background:#fff;color:var(--red);border-color:var(--red);margin-top:24px}
.summary{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-bottom:14px}
.sumbox{background:#fff;border-radius:14px;padding:10px 6px;text-align:center;border:1px solid var(--line);display:flex;flex-direction:column;justify-content:center;min-width:0}
.sumnum{font-size:24px;font-weight:800;line-height:1.1;overflow-wrap:anywhere}
.sumlbl{font-size:14px;color:var(--muted);font-weight:600;margin-top:2px}
.sumbox.red .sumnum{color:var(--red)}
.sumbox.green .sumnum{color:var(--green)}
.tabs{display:grid;grid-template-columns:repeat(4,1fr);gap:6px;background:#e5e7eb;padding:5px;border-radius:14px;margin-bottom:10px}
.tab{min-height:48px;border:0;border-radius:10px;background:transparent;font-weight:700;font-size:17px;cursor:pointer;color:var(--gray);padding:0 4px}
.tab.active{background:#fff;color:var(--blue);box-shadow:0 1px 3px rgba(0,0,0,.15)}
.search input{width:100%;min-height:54px;border:2px solid var(--line);border-radius:14px;padding:0 14px;background:#fff;font-size:18px;margin-bottom:12px}
.joblist{display:flex;flex-direction:column;gap:10px}
.card{display:flex;flex-direction:column;align-items:stretch;gap:4px;width:100%;text-align:left;background:var(--card);border:1px solid var(--line);border-left:6px solid var(--blue);border-radius:16px;padding:14px 14px 12px;cursor:pointer;box-shadow:0 1px 2px rgba(0,0,0,.06)}
.card:active{background:#eef2ff}
.card.s-sched{border-left-color:#6d28d9}.card.s-prog{border-left-color:#d97706}.card.s-done{border-left-color:#15803d}.card.s-new{border-left-color:#6b7280}
.card-addr{font-size:23px;font-weight:800;line-height:1.2;overflow-wrap:anywhere}
.card-addr i{color:var(--muted);font-weight:600}
.card-cust{font-size:17px;color:var(--muted)}
.card-row{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px;margin-top:6px}
.card-money{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.card-money b{font-size:22px}
.chip{display:inline-block;padding:5px 11px;border-radius:999px;font-size:15px;font-weight:800;white-space:nowrap}
.c-new{background:var(--graybg);color:var(--gray)}
.c-sched{background:var(--purplebg);color:var(--purple)}
.c-prog{background:var(--orangebg);color:var(--orange)}
.c-done{background:var(--greenbg);color:var(--green)}
.c-yes{background:var(--greenbg);color:var(--green)}
.c-no{background:var(--redbg);color:var(--red)}
.c-part{background:var(--orangebg);color:var(--orange)}
.empty{text-align:center;color:var(--muted);padding:30px 0}
.moneybox{position:sticky;top:calc(60px + env(safe-area-inset-top));z-index:4;background:#0f172a;color:#fff;border-radius:16px;padding:12px 16px;margin-bottom:16px;box-shadow:0 4px 12px rgba(0,0,0,.18)}
.mrow{display:flex;justify-content:space-between;align-items:baseline;font-size:18px;padding:1px 0}
.mrow b{font-size:20px}
.mrow.total{border-top:1px solid rgba(255,255,255,.25);margin-top:4px;padding-top:6px;font-size:22px;font-weight:800}
.mrow.total b{font-size:32px;color:#86efac}
.mrow.owed{color:#fca5a5;font-weight:700}
.mrow.owed.paidok{color:#86efac}
.mnote{margin:4px 0 0;font-size:14px;color:#cbd5e1}
.field{display:block;font-weight:700;font-size:17px;margin-bottom:14px}
.field input,.field textarea{display:block;width:100%;margin-top:6px;min-height:54px;border:2px solid var(--line);border-radius:12px;padding:10px 12px;background:#fff;font-size:19px;font-weight:400}
.field textarea{min-height:80px;resize:vertical}
.field input:focus,.field textarea:focus,.search input:focus{border-color:var(--blue);outline:none;box-shadow:0 0 0 3px rgba(29,78,216,.25)}
.lbl{display:block;margin-bottom:6px}
.phonerow{display:flex;gap:8px;align-items:stretch}
.phonerow input{flex:1;min-width:0}
.callbtn{display:flex;align-items:center;margin-top:6px;padding:0 16px;border-radius:12px;background:var(--green);color:#fff;text-decoration:none;font-weight:800;white-space:nowrap}
.callbtn.off{background:#9ca3af}
.sect{font-size:15px;text-transform:uppercase;letter-spacing:.06em;color:var(--muted);margin:22px 0 8px;border-top:1px solid var(--line);padding-top:16px}
.choices{display:grid;gap:8px;margin-bottom:14px}
.choices.two{grid-template-columns:1fr 1fr}
.choices.three{grid-template-columns:repeat(3,1fr)}
.choices.four{grid-template-columns:1fr 1fr}
.choices button{min-height:58px;border-radius:14px;border:2px solid var(--line);background:#fff;font-size:18px;font-weight:800;cursor:pointer;color:var(--gray);padding:4px}
.choices button.on{background:var(--blue);border-color:var(--blue);color:#fff}
.choices button.on::before{content:"\2713  "}
.choices button.on.c-new{background:#374151;border-color:#374151}
.choices button.on.c-sched{background:#6d28d9;border-color:#6d28d9}
.choices button.on.c-prog{background:#d97706;border-color:#d97706}
.choices button.on.c-done,.choices button.on.c-yes{background:#15803d;border-color:#15803d}
.choices button.on.c-no{background:#b91c1c;border-color:#b91c1c}
.choices button.on.c-part{background:#d97706;border-color:#d97706}
.timerow{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.timerow input{font-size:26px;text-align:center;font-weight:700}
.photos{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-bottom:10px}
.ph{position:relative;aspect-ratio:1;border-radius:10px;overflow:hidden;background:#ddd}
.ph img{width:100%;height:100%;object-fit:cover;display:block}
.ph button{position:absolute;top:4px;right:4px;width:34px;height:34px;border-radius:50%;border:0;background:rgba(0,0,0,.6);color:#fff;font-size:16px;cursor:pointer}
.ph-missing{display:flex;align-items:center;justify-content:center;text-align:center;padding:8px;font-size:13px;color:var(--muted);background:#eceef1}
.photoadd{font-size:20px}
.saved{text-align:center;color:var(--muted);font-size:15px;margin:10px 0}
.saved.on{color:var(--green);font-weight:700}
.hint{color:var(--muted);font-size:16px;margin:0 0 14px}
.toast{position:fixed;left:50%;bottom:calc(24px + env(safe-area-inset-bottom));transform:translateX(-50%);background:#111827;color:#fff;padding:12px 18px;border-radius:12px;font-size:17px;font-weight:600;z-index:10;max-width:90vw;text-align:center}
@media (min-width:700px){main{padding-top:24px}}

.menu{font-size:26px;padding:0 12px}
.shade{position:fixed;inset:0;background:rgba(0,0,0,.45);z-index:20}
.drawer{position:fixed;top:0;left:0;bottom:0;width:min(300px,82vw);background:#fff;z-index:21;box-shadow:6px 0 20px rgba(0,0,0,.25);padding:calc(10px + env(safe-area-inset-top)) 12px 20px;display:flex;flex-direction:column;gap:8px}
.drawer-head{display:flex;align-items:center;justify-content:space-between;font-size:20px;font-weight:900;color:#A0302A;padding:4px 4px 10px;border-bottom:3px solid #A0302A;margin-bottom:6px}
.drawer-item{display:flex;align-items:center;gap:14px;min-height:64px;padding:0 14px;border-radius:14px;background:#f6e7e5;color:var(--ink);text-decoration:none;font-size:22px;font-weight:800}
.drawer-item:active{background:#efd3cf}
.di-ico{font-size:26px;width:32px;text-align:center}
.echips{display:grid;gap:6px;margin-bottom:10px}
.echips.five{grid-template-columns:repeat(3,1fr)}
.echips.three{grid-template-columns:repeat(3,1fr)}
.echips button{min-height:50px;border-radius:12px;border:2px solid var(--line);background:#fff;font-size:16px;font-weight:800;color:var(--gray);cursor:pointer;padding:2px 4px}
.echips button.on{background:var(--blue);border-color:var(--blue);color:#fff}
.echips.seg{background:#e5e7eb;padding:5px;border-radius:14px;gap:5px}
.echips.seg button{border:0;background:transparent;min-height:46px}
.echips.seg button.on{background:#fff;color:var(--blue);box-shadow:0 1px 3px rgba(0,0,0,.15)}
.daterow{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.daterow .field{margin-bottom:8px}
.daterow input{font-size:17px;padding:8px}
.erange{margin:0 0 10px;color:var(--muted);font-weight:700;font-size:16px;text-align:center}
.ecards{display:flex;flex-direction:column;gap:8px}
.ecard{background:#fff;border:1px solid var(--line);border-radius:16px;padding:12px 16px;display:flex;flex-direction:column}
.ecard b{font-size:32px;font-weight:900;line-height:1.1;overflow-wrap:anywhere}
.elbl{font-size:16px;font-weight:800;color:var(--muted)}
.esub{font-size:14px;color:var(--muted)}
.ecard.profit{background:#ecfdf5;border-color:#86efac}.ecard.profit b{color:var(--green);font-size:40px}
.ecard.mats{background:#eff6ff;border-color:#93c5fd}.ecard.mats b{color:var(--blue)}
.ecard-pair{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.ecard-pair b{font-size:26px}
.ecard.paid b{color:var(--green)}.ecard.owed b{color:var(--red)}
.elist{display:flex;flex-direction:column;gap:8px}
.erow{display:grid;grid-template-columns:1fr auto;gap:2px 10px;width:100%;text-align:left;background:#fff;border:1px solid var(--line);border-radius:14px;padding:12px 14px;cursor:pointer}
.erow:active{background:#eef2ff}
.er-addr{font-size:19px;font-weight:800;overflow-wrap:anywhere}
.er-date{font-size:15px;color:var(--muted)}
.er-money{grid-row:1 / span 2;grid-column:2;display:flex;flex-direction:column;align-items:flex-end;justify-content:center;font-size:15px;color:var(--muted);white-space:nowrap}
.er-money b{font-size:20px}
.er-money .p{color:var(--green)}.er-money .m{color:var(--blue)}
.echips.five button[data-range="custom"]{grid-column:span 2}

/* Tools spent (v9) */
.ecard.tools{background:#fff7ed;border-color:#fdba74;text-decoration:none;color:var(--ink)}.ecard.tools b{color:#c2410c}
.ecard.net{background:#ecfdf5;border-color:#86efac}.ecard.net b{color:var(--green)}
.ecard.net.neg b{color:var(--red)}
.ecard.tools.big b{font-size:40px}
.tstores{display:flex;flex-direction:column;margin-top:8px;border-top:1px solid #fed7aa}
.tst{display:flex;justify-content:space-between;align-items:baseline;gap:10px;padding:7px 0;border-bottom:1px solid #fed7aa;font-size:17px;font-weight:700}
.tst:last-child{border-bottom:0}
.tst span{overflow-wrap:anywhere}.tst em{font-style:normal;color:var(--muted);font-weight:600;font-size:14px}
.tst strong{white-space:nowrap;color:#c2410c}
.er-money .t{color:#c2410c}
.bignum{font-size:28px !important;font-weight:800 !important}
#toolView .bigbtn{margin-bottom:10px}

#tStoreChoices button{font-size:16px;line-height:1.15}

.photobtns{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.photobtns .photoadd{margin:0}
