:root{--ink:#173b3a;--ink-2:#385957;--muted:#6c8581;--teal:#087f78;--teal-2:#0e968b;--teal-soft:#e7f5f2;--canvas:#f4f8f7;--surface:#fff;--line:#e2ece9;--gold:#d99b33;--gold-soft:#fff5e3;--red:#c75a58;--red-soft:#fff0ef;--blue:#467eb8;--blue-soft:#edf4fc;--shadow:0 8px 28px rgba(21,65,60,.07);--radius:18px;font-family:Inter,"Noto Sans TC",-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:var(--ink);font-size:15px;font-synthesis:none;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased}
*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;background:var(--canvas);color:var(--ink);font-size:16px;line-height:1.55}button,input,select,textarea{font:inherit}button{cursor:pointer}a{color:inherit;text-decoration:none}.muted{color:var(--muted)}.tiny{font-size:12.5px;color:#647d78}.small{font-size:14px}.bold{font-weight:700}.h1{font-size:30px;line-height:1.2;letter-spacing:-.7px;font-weight:750;margin:0}.h2{font-size:21px;font-weight:730;margin:0}.h3{font-size:16px;font-weight:720;margin:0}.eyebrow{font-size:12px;font-weight:750;letter-spacing:.09em;text-transform:uppercase;color:var(--muted)}
.app-layout{min-height:100vh;display:grid;grid-template-columns:256px minmax(0,1fr)}.sidebar{background:#073f3e;color:#e8f5f2;padding:24px 16px;display:flex;flex-direction:column;gap:26px;min-height:100vh;position:sticky;top:0;height:100vh;overflow:auto}.brand{display:flex;align-items:center;gap:12px;padding:0 10px}.brand-mark{height:42px;width:42px;border-radius:14px;background:#dff4ed;color:#087c74;display:grid;place-items:center;font-size:22px;font-weight:800}.brand-name{font-size:17px;font-weight:780;letter-spacing:-.3px}.brand-sub{font-size:11px;color:#a9cfca;margin-top:1px}.nav-group{display:grid;gap:6px}.nav-label{padding:0 12px 6px;color:#9cc3bd;font-size:11px;text-transform:uppercase;letter-spacing:.1em;font-weight:750}.nav-link{border:0;background:transparent;color:#d8e9e6;display:flex;align-items:center;gap:12px;text-align:left;padding:11px 13px;border-radius:11px;font-size:15px;font-weight:600;width:100%;transition:.15s}.nav-link:hover{background:rgba(255,255,255,.09)}.nav-link.active{background:#0d8279;color:white;box-shadow:inset 3px 0 #a9e8d9}.nav-icon{width:20px;text-align:center;font-size:16px;opacity:.95}.sidebar-bottom{margin-top:auto;border-top:1px solid rgba(255,255,255,.13);padding:16px 10px 0;color:#a9cfca;font-size:12px}.main-area{min-width:0}.topbar{height:76px;background:rgba(255,255,255,.92);backdrop-filter:blur(12px);border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:0 34px;position:sticky;top:0;z-index:10}.topbar-left{display:flex;align-items:center;gap:14px}.crumb{font-size:13px;color:var(--muted)}.topbar-right{display:flex;align-items:center;gap:12px}.content{max-width:1500px;padding:32px 36px 54px;margin:0 auto}.page-head{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;margin-bottom:26px}.page-head p{margin:8px 0 0;color:var(--muted);font-size:15px}.page-actions{display:flex;gap:10px;align-items:center;flex-wrap:wrap}.grid{display:grid;gap:18px}.grid-4{grid-template-columns:repeat(4,minmax(0,1fr))}.grid-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-2{grid-template-columns:repeat(2,minmax(0,1fr))}.card{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow);padding:22px;min-width:0}.card-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:17px}.stat{display:flex;align-items:flex-start;justify-content:space-between;gap:14px}.stat-label{font-size:14px;font-weight:650;color:var(--muted)}.stat-value{font-size:32px;font-weight:780;letter-spacing:-.8px;margin-top:7px;line-height:1.15}.stat-note{font-size:12px;color:var(--muted);margin-top:9px}.stat-icon{width:44px;height:44px;border-radius:14px;background:var(--teal-soft);display:grid;place-items:center;font-size:20px}.btn{border:1px solid transparent;border-radius:11px;padding:10px 15px;font-weight:700;font-size:14.5px;display:inline-flex;align-items:center;justify-content:center;gap:8px;transition:.15s;min-height:42px}.btn-primary{background:var(--teal);color:#fff}.btn-primary:hover{background:#066e68}.btn-secondary{background:#fff;border-color:var(--line);color:var(--ink)}.btn-secondary:hover{border-color:#b6d3cd;background:#f9fcfb}.btn-ghost{background:transparent;color:var(--ink-2)}.btn-danger{background:var(--red-soft);color:var(--red);border-color:#f5d5d3}.btn-sm{padding:7px 10px;min-height:36px;font-size:13px;border-radius:9px}.badge{display:inline-flex;align-items:center;gap:6px;border-radius:99px;padding:5px 9px;font-size:12.5px;font-weight:750;white-space:nowrap}.badge:before{content:"";width:6px;height:6px;border-radius:50%;background:currentColor}.success{background:#e8f7ef;color:#26845a}.warning{background:var(--gold-soft);color:#a96d11}.danger{background:var(--red-soft);color:#bf4f4b}.info{background:var(--blue-soft);color:#477bb4}.neutral{background:#eef3f1;color:#607772}.table-wrap{overflow:auto;border:1px solid var(--line);border-radius:14px}table{border-collapse:collapse;width:100%;min-width:680px;background:#fff}th{text-align:left;background:#f7faf9;color:#647c77;font-size:12px;letter-spacing:.035em;font-weight:750;padding:14px 15px;white-space:nowrap;border-bottom:1px solid var(--line)}td{padding:15px;font-size:14.5px;border-bottom:1px solid #edf2f0;vertical-align:middle}tbody tr:last-child td{border-bottom:0}tbody tr:hover{background:#fbfdfc}.person{display:flex;align-items:center;gap:10px}.avatar{width:36px;height:36px;border-radius:12px;background:#e2f2ee;color:#08786f;display:grid;place-items:center;font-weight:800;font-size:13px;flex:none}.toolbar{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-bottom:16px}.field{display:grid;gap:7px;min-width:0}.field label{font-size:14px;font-weight:700;color:#365652}.field input,.field select,.field textarea,.input{width:100%;border:1px solid #d8e5e1;border-radius:10px;background:#fff;padding:11px 12px;color:var(--ink);min-height:46px;outline:none;font-size:15px}.field textarea{min-height:88px;resize:vertical}.field input:focus,.field select:focus,.field textarea:focus{border-color:#0b9186;box-shadow:0 0 0 3px rgba(11,145,134,.12)}.field-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:15px}.divider{height:1px;background:var(--line);margin:18px 0}.pill-tabs{display:flex;gap:6px;padding:5px;background:#f0f6f4;border-radius:12px;width:max-content;max-width:100%;flex-wrap:wrap}.tab{border:0;background:transparent;padding:8px 13px;border-radius:9px;font-size:13px;color:var(--muted);font-weight:700}.tab.active{background:white;color:var(--teal);box-shadow:0 1px 4px rgba(0,0,0,.06)}.empty{padding:34px 18px;text-align:center;color:var(--muted)}.notice{display:flex;gap:11px;align-items:flex-start;border:1px solid #d7ebe6;background:#f0faf7;color:#315f58;padding:13px 15px;border-radius:12px;font-size:13px}.progress{height:7px;background:#eaf1ef;border-radius:20px;overflow:hidden}.progress span{display:block;height:100%;background:var(--teal);border-radius:20px}.list-row{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:13px 0;border-bottom:1px solid #edf2f0}.list-row:last-child{border-bottom:0}.modal-backdrop{position:fixed;inset:0;background:rgba(12,35,33,.48);display:none;align-items:center;justify-content:center;padding:20px;z-index:50}.modal-backdrop.open{display:flex}.modal{width:min(560px,100%);max-height:90vh;overflow:auto;background:#fff;border-radius:20px;box-shadow:0 25px 80px rgba(8,37,34,.25);padding:24px}.modal-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:20px}.close{border:0;background:#f0f5f3;width:34px;height:34px;border-radius:10px;font-size:20px;color:#45615b}.toast{position:fixed;right:24px;bottom:24px;z-index:90;background:#173f3b;color:#fff;padding:13px 18px;border-radius:12px;box-shadow:var(--shadow);opacity:0;transform:translateY(10px);pointer-events:none;transition:.2s;font-size:14px}.toast.show{opacity:1;transform:translateY(0)}.chart{height:190px;display:flex;align-items:end;gap:14px;padding:14px 6px 0;border-bottom:1px solid var(--line)}.bar-col{flex:1;display:flex;flex-direction:column;justify-content:flex-end;align-items:center;gap:8px;height:160px}.bar{width:min(34px,70%);background:linear-gradient(180deg,#36b3a5,#087f78);border-radius:8px 8px 0 0;min-height:10px}.bar-label{font-size:11px;color:var(--muted)}.mobile-frame{max-width:440px;min-height:850px;margin:0 auto;background:#f5f8f7;position:relative;border:1px solid #dce8e4;border-radius:30px;overflow:hidden;box-shadow:0 18px 55px rgba(17,61,56,.13)}.mobile-top{background:#fff;padding:18px 20px 14px;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between}.mobile-body{padding:19px 18px 100px;min-height:690px}.mobile-bottom{position:absolute;bottom:0;left:0;right:0;background:#fff;border-top:1px solid var(--line);display:flex;justify-content:space-around;padding:12px 8px 15px}.mobile-nav{border:0;background:transparent;color:#83938f;display:grid;justify-items:center;gap:4px;font-size:12px;font-weight:650}.mobile-nav.active{color:var(--teal)}.mobile-nav span:first-child{font-size:20px}.hero{background:linear-gradient(125deg,#0a7770,#0c9b8b);border-radius:20px;padding:22px;color:white;position:relative;overflow:hidden}.hero:after{content:"";position:absolute;width:170px;height:170px;border-radius:50%;background:rgba(255,255,255,.08);right:-40px;top:-55px}.hero h2{font-size:23px;line-height:1.25;margin:0 0 7px}.hero p{font-size:13px;color:#d7f5ee;margin:0;max-width:230px}.service-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:12px}.service-tile{border:1px solid var(--line);border-radius:15px;padding:15px;background:#fff;text-align:left;display:grid;gap:8px;min-height:116px}.service-tile.selected{border:2px solid var(--teal);background:#f0faf7;padding:14px}.service-icon{width:38px;height:38px;border-radius:12px;background:#e8f5f1;display:grid;place-items:center;font-size:19px}.service-tile strong{font-size:14px}.service-tile small{font-size:12px;color:var(--muted)}.stepper{display:flex;align-items:center;gap:8px}.step-dot{width:28px;height:28px;border-radius:50%;display:grid;place-items:center;background:#e4eeeb;color:#6a8580;font-size:12px;font-weight:800}.step-dot.active{background:var(--teal);color:#fff}.step-line{height:2px;flex:1;background:#dce8e4}.job-card{background:#fff;border:1px solid var(--line);border-radius:16px;padding:16px;margin-bottom:12px}.job-card .job-top{display:flex;justify-content:space-between;gap:10px;align-items:center}.job-action{width:100%;margin-top:12px}.map-placeholder{height:160px;border-radius:16px;background:linear-gradient(135deg,#e7f2ef,#dbece7);position:relative;overflow:hidden;display:grid;place-items:center;color:#47716a}.map-placeholder:before,.map-placeholder:after{content:"";position:absolute;width:140%;height:2px;background:#bed9d1;transform:rotate(-22deg)}.map-placeholder:after{transform:rotate(35deg)}.map-pin{z-index:1;background:#087f78;color:#fff;padding:8px 12px;border-radius:20px;font-size:12px;font-weight:750;box-shadow:var(--shadow)}.kpi-inline{display:flex;align-items:center;gap:8px;font-size:13px;color:var(--muted)}.mobile-title{font-weight:780;font-size:17px}.hide{display:none!important}
@media(max-width:1100px){.grid-4{grid-template-columns:repeat(2,minmax(0,1fr))}.app-layout{grid-template-columns:228px minmax(0,1fr)}.content{padding:26px 24px}}
@media(max-width:800px){.app-layout{grid-template-columns:1fr}.sidebar{position:fixed;left:-270px;z-index:40;width:256px;transition:left .2s}.sidebar.open{left:0;box-shadow:0 0 0 999px rgba(10,35,33,.35)}.topbar{padding:0 18px;height:68px}.content{padding:24px 16px 40px}.page-head{flex-direction:column;align-items:stretch}.grid-3,.grid-2{grid-template-columns:1fr}.mobile-frame{border-radius:0;border:0;min-height:100vh}.mobile-body{min-height:calc(100vh - 150px)}.h1{font-size:27px}}
@media(max-width:520px){.grid-4{grid-template-columns:1fr 1fr;gap:10px}.card{padding:16px}.stat-value{font-size:26px}.field-grid{grid-template-columns:1fr}.page-actions{width:100%}.page-actions .btn{flex:1}.h1{font-size:25px}.topbar-right .hide-small{display:none}.mobile-frame{max-width:none}.mobile-body{padding-left:15px;padding-right:15px}}

/* Client-review sign-in gates */
.auth-screen{min-height:100vh;display:grid;place-items:center;padding:28px 18px;background:radial-gradient(circle at 15% 15%,#e0f4ee 0,transparent 32%),linear-gradient(135deg,#f5f9f7,#edf5f2)}
.auth-card{width:min(440px,100%);background:#fff;border:1px solid var(--line);border-radius:24px;padding:34px;box-shadow:0 22px 70px rgba(21,69,62,.12)}
.auth-brand{display:flex;align-items:center;gap:12px;margin-bottom:26px}.auth-brand .brand-mark{width:48px;height:48px;font-size:20px}
.auth-card h1{font-size:28px;letter-spacing:-.7px;margin:4px 0 8px}.auth-card p{color:var(--muted);font-size:14px;line-height:1.6}.auth-card .field{margin-top:16px}.auth-card .btn{width:100%;margin-top:18px;min-height:48px}.auth-foot{display:flex;justify-content:space-between;gap:12px;border-top:1px solid var(--line);margin-top:22px;padding-top:17px;color:var(--muted);font-size:12px}
@media(max-width:520px){.auth-card{padding:26px 22px;border-radius:20px}.auth-card h1{font-size:25px}}
/* Dispatch assignment modal: keep both short assignment steps usable without hiding the action button. */
#orderModal .modal{max-height:calc(100vh - 28px)}

/* Readability pass for client review */
.page-head p,.crumb{font-size:14.5px}
.nav-label{font-size:11.5px}
th{font-size:12.5px}
.field input:focus,.field select:focus,.field textarea:focus{outline:none}
@media(max-width:520px){.mobile-nav{font-size:12px}.service-tile strong{font-size:14.5px}.service-tile small{font-size:12.5px}}

/* Customer catalogue UX refinement: browse first, then choose quantity in a focused sheet. */
.customer-catalogue-tools{display:grid;grid-template-columns:1fr;gap:8px;margin:18px 0 12px}
.customer-catalogue-tools .field{max-width:100%}
.customer-catalogue-tools select{background:#fff}
.customer-catalogue-caption{font-size:12px;color:var(--muted);padding:0 2px}
.customer-service-list{display:grid;gap:10px;margin-top:12px}
.customer-service-card{display:grid;grid-template-columns:48px minmax(0,1fr) auto;align-items:center;gap:11px;padding:14px;background:#fff;border:1px solid var(--line);border-radius:17px;box-shadow:0 4px 18px rgba(27,72,65,.035)}
.customer-service-icon{width:46px;height:46px;border-radius:14px;background:#e9f5f1;display:grid;place-items:center;font-size:23px;flex:none}
.customer-service-info{min-width:0}
.customer-service-title-row{display:flex;align-items:center;gap:7px;flex-wrap:wrap}
.customer-service-title-row h3{font-size:15px;line-height:1.25;margin:0;color:var(--ink);font-weight:780}
.customer-service-title-row .badge{font-size:10px;padding:4px 7px}
.customer-service-info p{font-size:12px;line-height:1.42;color:var(--muted);margin:4px 0 6px}
.customer-service-price{font-size:15px;font-weight:800;color:#087c72}
.customer-service-price span{font-size:12px;color:var(--muted);font-weight:600}
.service-choose{min-width:76px;align-self:center}
.customer-service-selected{grid-column:2 / 4;font-size:11px;color:#08786f;font-weight:750;margin-top:-6px}
.customer-catalogue-empty{padding:24px 14px;border:1px dashed #cbded8;border-radius:15px;text-align:center;color:var(--muted);font-size:13px;background:#fff}
.customer-basket-hint{margin:14px 2px 6px;font-size:12px;color:var(--muted);text-align:center}
.customer-basket-dock{position:sticky;bottom:76px;z-index:8;margin:18px 0 14px;padding:12px 13px;border-radius:17px;background:#073f3e;color:#fff;box-shadow:0 12px 32px rgba(7,63,62,.22);display:flex;align-items:center;justify-content:space-between;gap:10px}
.customer-basket-dock-copy{display:grid;gap:3px;min-width:0}
.customer-basket-dock-copy strong{font-size:13px;color:#fff}
.customer-basket-dock-copy span{font-size:11px;color:#bddbd5;max-width:155px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.customer-basket-dock .btn{white-space:nowrap;min-height:42px;padding:9px 11px;font-size:12px;background:#fff;color:#075e58}
.customer-summary-lines{display:grid;gap:0;margin:0 0 14px}
.customer-summary-line{display:flex;justify-content:space-between;gap:12px;padding:8px 0;border-bottom:1px solid #edf2f0;font-size:13px}
.customer-summary-line span{color:var(--muted)}
.customer-summary-line strong{white-space:nowrap}
.customer-sheet-backdrop{position:fixed;inset:0;z-index:110;background:rgba(10,34,32,.48);display:none;align-items:flex-end;justify-content:center;padding:12px}
.customer-sheet-backdrop.open{display:flex}
.customer-sheet{width:min(440px,100%);max-height:min(82vh,720px);overflow:auto;background:#fff;border-radius:24px 24px 18px 18px;padding:12px 20px 22px;box-shadow:0 -12px 50px rgba(9,47,43,.2);animation:customerSheetIn .18s ease-out}
@keyframes customerSheetIn{from{transform:translateY(18px);opacity:.7}to{transform:translateY(0);opacity:1}}
.customer-sheet-grabber{width:42px;height:4px;border-radius:8px;background:#d7e4e0;margin:0 auto 16px}
.customer-sheet-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}
.customer-sheet-head h2{font-size:21px;line-height:1.2;margin:4px 0 5px;letter-spacing:-.3px}
.customer-sheet-head p{font-size:12px;color:var(--muted);line-height:1.45;margin:0;max-width:285px}
.customer-sheet-head .eyebrow{font-size:10px}
.customer-picker-price{display:flex;align-items:baseline;gap:7px;margin:17px 0;padding:12px 14px;background:#eff8f5;border-radius:13px}
.customer-picker-price strong{font-size:23px;color:#087c72}
.customer-picker-price span{font-size:12px;color:var(--muted)}
.customer-quantity-block{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:5px 0 15px}
.customer-quantity-block>div:first-child{display:grid;gap:4px;min-width:0}
.customer-quantity-block strong{font-size:13px}
.customer-quantity-block span{font-size:11px;color:var(--muted);line-height:1.35;max-width:185px}
.quantity-control{display:flex;align-items:center;gap:7px;padding:4px;border:1px solid var(--line);border-radius:13px;background:#f9fcfb;flex:none}
.quantity-control button,.customer-mini-quantity button{width:32px;height:32px;border:0;border-radius:9px;background:#e6f3ef;color:#08796f;font-size:20px;font-weight:700;display:grid;place-items:center}
.quantity-control input{width:48px;border:0;background:transparent;text-align:center;font-size:16px;font-weight:800;color:var(--ink);outline:none;padding:0;min-height:32px}
.customer-picker-total{display:flex;align-items:center;justify-content:space-between;padding:14px 0;margin-bottom:14px;border-top:1px solid var(--line);font-size:13px;color:var(--muted)}
.customer-picker-total strong{font-size:18px;color:var(--ink)}
.customer-basket-lines{display:grid;gap:8px;margin:16px 0;max-height:36vh;overflow:auto}
.customer-basket-line{display:grid;grid-template-columns:36px minmax(0,1fr) auto 24px;align-items:center;gap:8px;padding:10px 0;border-bottom:1px solid #edf2f0}
.customer-basket-line-icon{width:34px;height:34px;display:grid;place-items:center;background:#edf7f3;border-radius:11px;font-size:18px}
.customer-basket-line-main{display:grid;gap:4px;min-width:0}
.customer-basket-line-main strong{font-size:12px}
.customer-basket-line-main span{font-size:10px;color:var(--muted)}
.customer-mini-quantity{display:flex;align-items:center;gap:5px}
.customer-mini-quantity button{width:25px;height:25px;font-size:16px}
.customer-mini-quantity span{font-size:12px;min-width:19px;text-align:center;font-weight:750}
.customer-remove{border:0;background:transparent;color:#b45a55;font-size:20px;width:24px;height:28px}
@media(max-width:520px){
 .customer-service-card{grid-template-columns:42px minmax(0,1fr) auto;gap:9px;padding:12px}
 .customer-service-icon{width:42px;height:42px;font-size:21px}
 .customer-service-title-row h3{font-size:14px}
 .customer-service-info p{font-size:11px}
 .customer-service-price{font-size:14px}
 .service-choose{min-width:66px;padding:7px 9px}
 .customer-basket-dock{bottom:68px;padding:10px}
 .customer-basket-dock-copy span{max-width:120px}
 .customer-basket-dock .btn{font-size:11px;padding:8px 9px}
 .customer-sheet-backdrop{padding:0}
 .customer-sheet{border-radius:24px 24px 0 0;padding:12px 18px calc(20px + env(safe-area-inset-bottom))}
}
