:root{--navy:#063c4c;--teal:#087483;--orange:#ed641b;--ink:#142e38;--muted:#5a727c;--paper:#f5f8fa;--border:#d7e4e9;--white:#fff;--green:#147c5a;--red:#b52d33;--amber:#a56005;--shadow:0 10px 32px #07384613}
*{box-sizing:border-box}html{font-size:15px}body{margin:0;font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;background:var(--paper);color:var(--ink);-webkit-font-smoothing:antialiased}button,input,textarea,select{font:inherit}button{cursor:pointer}a{color:var(--teal)}button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:3px solid #76b5c4;outline-offset:2px}.app{display:grid;grid-template-columns:258px minmax(0,1fr);min-height:100dvh}.side{background:var(--navy);color:#fff;padding:26px 16px;position:sticky;top:0;height:100dvh;display:flex;flex-direction:column}.logo{display:flex;align-items:center;gap:12px;padding:2px 10px 25px;border-bottom:1px solid #ffffff3d;margin-bottom:15px}.brand-symbol{background:var(--orange);color:white;font-size:22px;font-weight:900;letter-spacing:-2px;padding:10px;border-radius:15px}.brandname b{font-size:17px}.brandname span{display:block;color:#a9d0d9;letter-spacing:.11em;font-size:10px;font-weight:700;margin-top:5px}.navitem{width:100%;display:flex;align-items:center;gap:10px;color:#d9e8ec;background:transparent;border:0;text-align:left;border-radius:11px;padding:13px 14px;margin:3px 0;font-weight:600}.navitem.active,.navitem:hover{background:#146576;color:white}.sidenote{margin-top:auto;font-size:12px;line-height:1.5;color:#c0dce2;padding:15px 12px;border-top:1px solid #ffffff25}.main{min-width:0;padding:28px max(24px,3vw) 45px}.top{display:flex;align-items:flex-start;justify-content:space-between;margin-bottom:25px;gap:12px}.top h1{margin:0;font-size:27px;letter-spacing:-.035em}.subtitle{color:var(--muted);margin:6px 0 0}.userpill{display:flex;align-items:center;gap:9px;background:#fff;padding:8px 12px;border:1px solid var(--border);border-radius:12px;font-size:12px;max-width:275px;overflow:hidden}.avatar{border-radius:50%;width:29px;height:29px;background:#e2f0f2;display:grid;place-items:center;font-weight:800;color:var(--teal);flex:none}.userpill span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:15px}.two{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}.card{background:var(--white);border:1px solid var(--border);border-radius:16px;box-shadow:var(--shadow);padding:21px;margin-bottom:18px;min-width:0}.card h2{font-size:18px;margin:0 0 15px;letter-spacing:-.025em}.card h3{font-size:15px;margin:0 0 9px}.kpi .val{font-size:29px;font-weight:850;letter-spacing:-.04em}.kpi .lab{font-size:12px;color:var(--muted);margin-top:4px}.accent{border-top:4px solid var(--orange)}.tag{display:inline-flex;align-items:center;padding:4px 9px;border-radius:30px;background:#e9f4f6;color:#0d6372;font-size:11px;font-weight:750}.tag.warn{background:#fff2df;color:#985d11}.tag.good{background:#e8f6ed;color:#14704c}.tag.bad{background:#fdebed;color:#b13035}.eyebrow{color:var(--teal);font-size:11px;letter-spacing:.12em;font-weight:800;text-transform:uppercase;margin:0 0 8px}.muted,.hint{color:var(--muted)}.hint{font-size:12px;line-height:1.55}.flex{display:flex;align-items:center;gap:10px}.between{justify-content:space-between}.wrap{flex-wrap:wrap}.stack{display:flex;flex-direction:column;gap:12px}.formgrid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:13px}.field{display:flex;flex-direction:column;gap:6px;min-width:0}.field label{font-size:12px;font-weight:750;color:#385461}.field input,.field select,.field textarea,.search,.smallinput{width:100%;padding:11px 12px;border:1px solid #bed2da;border-radius:10px;color:#203c45;background:#fff;min-height:44px}.field textarea{resize:vertical;min-height:75px}.smallinput{padding:8px 10px;min-height:38px}.btn{border:1px solid transparent;border-radius:10px;background:var(--teal);color:#fff;padding:11px 16px;min-height:42px;font-weight:750;display:inline-flex;gap:7px;align-items:center;justify-content:center}.btn:hover{filter:brightness(.94)}.btn.secondary{background:#e6f2f4;color:#0b6271;border-color:#c3e0e4}.btn.orange{background:var(--orange)}.btn.red{background:#fcebed;color:#aa3133}.btn.ghost{background:#fff;color:#1d5565;border:1px solid var(--border)}.btn.small{min-height:34px;padding:7px 11px;font-size:12px}.btn:disabled{opacity:.5;cursor:not-allowed}.table-scroll{overflow-x:auto;-webkit-overflow-scrolling:touch}table{width:100%;border-collapse:collapse;min-width:590px;text-align:left}th{font-size:11px;color:var(--muted);text-transform:uppercase;letter-spacing:.06em;border-bottom:1px solid var(--border);padding:12px 10px;white-space:nowrap}td{padding:12px 10px;font-size:13px;border-bottom:1px solid #ebf1f3;vertical-align:middle}td:last-child,th:last-child{text-align:right}tbody tr:hover{background:#f8fbfc}.num{font-variant-numeric:tabular-nums;white-space:nowrap;font-weight:700}.line{height:1px;background:var(--border);margin:15px 0}.totalrow{display:flex;justify-content:space-between;gap:10px;padding:8px 0}.totalrow.primary{font-size:20px;font-weight:850;border-top:2px solid #b4cdd2;margin-top:10px;padding-top:13px;color:var(--navy)}.info{background:#e8f4f7;border:1px solid #c7e4e9;color:#345c67;border-radius:12px;padding:12px 14px;line-height:1.55;font-size:13px}.alert{background:#fff0e4;border:1px solid #efcfae;border-radius:12px;padding:12px 14px;color:#7c4716;line-height:1.55;font-size:13px;margin:10px 0}.error{background:#ffe8e8;color:#96272e;border:1px solid #f0bec2}.itembox{border:1px solid var(--border);padding:15px;border-radius:14px;margin:13px 0;background:#fbfdfd}.itemhead{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px}.check{display:flex;gap:8px;align-items:flex-start;font-size:13px;color:#3d5964}.check input{width:18px;height:18px;accent-color:var(--teal);flex:none;margin:1px 0}.notice{font-size:12px;color:var(--muted);margin-top:9px;line-height:1.5}.listcard{background:#fff;border:1px solid var(--border);padding:12px;border-radius:12px;display:flex;gap:8px;align-items:center;justify-content:space-between;margin:6px 0}.listcard.active{border-color:var(--teal);box-shadow:inset 0 0 0 1px var(--teal)}.auth-wrap{min-height:100dvh;display:grid;place-items:center;padding:22px;background:radial-gradient(circle at top right,#d6f0f0,transparent 42%),var(--paper)}.authbox{max-width:440px;width:100%;background:white;border:1px solid #d7e6eb;border-radius:24px;padding:32px;box-shadow:0 22px 70px #093d4d1b}.authbox .brand-symbol{display:inline-block;margin-bottom:16px}.authbox h1{font-size:26px;margin:5px 0}.authbox p{line-height:1.6}.toast{position:fixed;right:20px;bottom:22px;background:#103c47;color:#fff;padding:12px 17px;border-radius:12px;box-shadow:0 6px 28px #0003;z-index:200;max-width:min(420px,90vw);font-size:13px}.toast.error{background:#8b2936;color:white}.mobilebar{display:none}.mobile-head{display:none}.empty{padding:24px;color:var(--muted);text-align:center}.small{font-size:12px}.clickable{cursor:pointer}.mobile-only{display:none}
@media(max-width:1070px){.grid{grid-template-columns:repeat(2,1fr)}.two{grid-template-columns:1fr}.side{width:215px}.app{grid-template-columns:215px minmax(0,1fr)}.main{padding:24px 22px}}
@media(max-width:720px){.app{display:block;padding-bottom:calc(72px + env(safe-area-inset-bottom))}.side{display:none}.mobile-head{display:flex;background:var(--navy);color:white;align-items:center;justify-content:space-between;padding:14px 17px;padding-top:calc(13px + env(safe-area-inset-top));position:sticky;top:0;z-index:20}.mobile-head b{letter-spacing:.025em}.mobile-head .minilogo{background:var(--orange);font-weight:900;border-radius:9px;padding:7px;margin-right:7px}.mobilebar{display:flex;position:fixed;bottom:0;left:0;right:0;z-index:40;background:#fff;border-top:1px solid #cadce2;padding:7px 6px calc(7px + env(safe-area-inset-bottom));justify-content:space-around;box-shadow:0 -5px 20px #062e3a11}.mobilebar button{border:0;background:transparent;color:#627883;display:flex;flex-direction:column;align-items:center;gap:4px;padding:6px 1px;font-size:10px;font-weight:700;min-width:0;flex:1}.mobilebar button.active{color:var(--teal)}.mobilebar span{font-size:20px;line-height:1}.main{padding:19px 14px 22px}.top{margin-bottom:18px}.top h1{font-size:23px}.top .userpill{display:none}.card{padding:16px;border-radius:15px;margin-bottom:14px}.grid{gap:9px}.kpi .val{font-size:24px}.formgrid{grid-template-columns:1fr}.mobile-only{display:block}.desktop-only{display:none}.two{gap:0}.btn{min-height:45px}.top .subtitle{font-size:12px}table{min-width:520px}.listcard{align-items:flex-start}.itembox{padding:12px}.toast{right:10px;bottom:calc(85px + env(safe-area-inset-bottom));left:10px;max-width:none}.authbox{padding:25px 20px}}
@media print{.side,.mobile-head,.mobilebar,.top,.btn,.notice,.no-print{display:none!important}.app{display:block;padding:0}.main{padding:0}.card{box-shadow:none;border:1px solid #ddd;break-inside:avoid}}
@media print{body.printing-invoice *{visibility:hidden!important}body.printing-invoice #invoice-print,body.printing-invoice #invoice-print *{visibility:visible!important}body.printing-invoice #invoice-print{position:absolute;top:0;left:0;width:100%;margin:0;border:0;padding:0}body.printing-invoice .table-scroll{overflow:visible}body.printing-invoice table{min-width:0}}

/* GPS official flyer logo — brand assets only; functional pricing unchanged */
.logo .brand-symbol {padding:5px; background:#fff; border-radius:10px; width:77px; height:77px; flex:none; display:grid; place-items:center; overflow:hidden;}
.brand-symbol img {display:block; width:100%; height:100%; object-fit:contain;}
.authbox .brand-symbol {display:block; width:140px; height:138px; padding:7px; background:#fff; border-radius:12px; margin-bottom:12px; border:1px solid #e2e9e9;}
.mobile-head .minilogo {display:inline-flex; width:45px; height:43px; padding:3px; background:white; align-items:center; justify-content:center; vertical-align:middle; margin-right:9px; overflow:hidden;}
.mobile-head .minilogo img {width:100%; height:100%; object-fit:contain; display:block;}
.invoice-brand {display:flex;gap:15px; align-items:center; min-width:0;}
.invoice-logo {width:91px; height:90px; object-fit:contain; border:1px solid #edf0f0; border-radius:6px; background:#fff; flex:none;}
@media (max-width:720px) {.logo .brand-symbol{width:60px;height:60px}.invoice-logo{width:65px;height:65px}.invoice-brand{gap:9px;}.invoice-brand h2{font-size:17px;}}
@media print {.invoice-logo {width:95px;height:95px; print-color-adjust:exact;-webkit-print-color-adjust:exact;}}

/* Automatic HS matching and item-value previews */
.line-duty-preview{margin-top:14px;padding:12px 13px;background:#f1f7f8;border:1px solid #c6dfe5;border-radius:10px;font-size:13px;line-height:1.5;color:#234c58}
.error-text{color:#ae2d32;font-weight:700}
.tariff-lookup .hint{min-height:26px}

/* Simplified GPS intake: employee Customs data is accessible but collapsed by default */
.package-intake h3{margin:5px 0 0}.simple-main-fields{gap:12px}
.simple-item{background:#fff;border:1px solid #d5e5e9;box-shadow:0 3px 12px #0738460a}
.simple-item .itemhead{margin-bottom:10px}.simple-item .itemhead strong{font-size:15px}
.duty-result{margin:13px 0 5px;background:#e9f6f3;border:1px solid #c1dfd7;padding:12px 14px;border-radius:11px;font-size:14px;color:#194c48;display:flex;align-items:baseline;gap:9px;flex-wrap:wrap}
.draft-caution{color:#91611f;font-size:12px}.simple-match-note{margin:5px 0 10px}
.employee-details{margin-top:13px;border:1px solid #d5e1e6;border-radius:11px;background:#fff}
.employee-details>summary{cursor:pointer;padding:13px 14px;font-weight:750;font-size:12px;color:#315562;list-style-position:inside}
.employee-details>summary:hover{background:#f8fbfc}.employee-details>summary .hint{font-weight:400}
.employee-details-content{padding:4px 15px 16px;border-top:1px solid #e5eef1;display:flex;flex-direction:column;gap:12px}
.employee-details-content .check{margin-top:6px}.simple-package-value{display:flex;align-items:center;justify-content:space-between;gap:10px;background:#f5f9fa;border:1px solid #e1edef;border-radius:11px;padding:13px 14px;font-size:13px}
.simple-package-value strong{color:var(--navy);white-space:nowrap}.simple-estimate{background:#f8fbfb;border:1px solid #cfdee4;border-radius:13px;padding:17px}
.simple-estimate h3{font-size:16px;margin:0 0 13px}.simple-estimate h4{margin:20px 0 5px;font-size:12px;letter-spacing:.03em;text-transform:uppercase;color:#587079}.simple-estimate .totalrow{font-size:13px;padding:7px 0}.simple-estimate .totalrow.primary{font-size:16px}
.optional-intake>.employee-details-content{padding-top:14px}
/* Customer invoice keeps sensitive staff classification and rates hidden. */
.gps-customer-invoice{max-width:850px;margin:18px auto;background:#fff;padding:28px 32px}
.customer-invoice-head{display:flex;justify-content:space-between;gap:18px;align-items:flex-start}
.customer-invoice-head .invoice-brand h2{font-size:19px;margin-bottom:7px}
.invoice-address{color:#566a72;font-size:12px;line-height:1.6;margin:0}
.invoice-meta{text-align:right;display:flex;flex-direction:column;gap:5px;white-space:nowrap}
.invoice-meta h2{font-size:26px;letter-spacing:.07em;margin:0;color:var(--navy)}
.invoice-meta span{font-size:12px;color:#48626b}
.invoice-billto{display:flex;justify-content:space-between;gap:15px;align-items:flex-start;margin:24px 0;border-top:1px solid #d9e4e9;border-bottom:1px solid #d9e4e9;padding:15px 0}
.invoice-billto>div:first-child{display:flex;flex-direction:column;gap:5px}
.invoice-billto strong{font-size:16px}.invoice-billto span:not(.tag){font-size:12px;color:#536975}
.invoice-label{font-weight:800;color:#6b818c;letter-spacing:.08em}
.customer-invoice-table{min-width:0}.customer-invoice-table th{font-size:11px}.customer-invoice-table td{font-size:13px;padding:12px 8px}.customer-invoice-table .invoice-subtotal{background:#f2f6f7}
.invoice-total-due{display:flex;justify-content:space-between;align-items:center;gap:15px;border-top:2px solid var(--navy);margin-top:18px;padding-top:18px;color:var(--navy);font-weight:800}
.invoice-total-due strong{font-size:27px;letter-spacing:-.03em}.invoice-footer{margin-top:30px;text-align:center;font-size:11px;color:#6b8089}
@media(max-width:720px){.gps-customer-invoice{padding:18px 12px}.customer-invoice-head .invoice-brand{gap:7px}.customer-invoice-head .invoice-brand h2{font-size:15px}.invoice-meta h2{font-size:18px}.invoice-meta span{font-size:10px}.customer-invoice-head .invoice-logo{width:55px;height:55px}.invoice-address{font-size:10px}.invoice-total-due strong{font-size:22px}}
@media print{.gps-customer-invoice{border:none;box-shadow:none;max-width:none;padding:12mm 13mm!important;margin:0!important}.customer-invoice-table{min-width:0!important}.customer-invoice-table th,.customer-invoice-table td{font-size:11pt}.invoice-total-due strong{font-size:20pt}.invoice-state .tag.warn{print-color-adjust:exact}}

/* Professional GPS billing document. Design follows reference only; all charges come from Supabase snapshot. */
.gps-customer-invoice{max-width:910px;margin:24px auto 18px!important;padding:0!important;border:1px solid #d7e5e8;border-radius:10px!important;overflow:hidden;box-shadow:0 15px 35px #103f4916!important;background:#fff;color:#173d4c}
.invoice-stripe{height:8px;background:linear-gradient(90deg,#006c77 0 79%,#f07522 79% 100%)}
.invoice-header{padding:32px 37px 26px;display:flex;justify-content:space-between;align-items:flex-start;gap:18px;border-bottom:1px solid #e0e9ec}
.invoice-brand{display:flex;align-items:flex-start;gap:18px;min-width:0;max-width:67%}.invoice-brand .invoice-logo{width:115px;height:113px;object-fit:contain;border:0;border-radius:0}
.invoice-office strong{display:block;color:#073e4c;font-size:18px;line-height:1.3;margin:2px 0 10px}.invoice-office p{font-size:11px;line-height:1.6;margin:0 0 7px;color:#526e78}
.invoice-office p b{color:#205561}
.invoice-meta{flex:none;white-space:normal;text-align:right;min-width:215px;color:#345765}.invoice-meta h2{color:#082d4a;font-size:33px;letter-spacing:.075em;line-height:1;margin:0 0 10px}.invoice-number{color:#007079;font-size:15px;display:block;margin:0 0 10px}.invoice-meta dl{margin:0}.invoice-meta dl div{display:flex;justify-content:space-between;gap:16px;padding:5px 0;font-size:11px;border-top:1px solid #e8eef0}.invoice-meta dt{color:#82969c;font-weight:700}.invoice-meta dd{margin:0;font-weight:700;color:#234853}
.invoice-details{display:grid;grid-template-columns:1fr 1fr;gap:18px;padding:23px 37px 25px;background:#f6fafb}.invoice-details>div{display:flex;flex-direction:column;gap:6px;min-width:0}.invoice-overline{font-size:10px;letter-spacing:.12em;color:#007b7e;font-weight:850}.invoice-details strong{font-size:15px;color:#092f4b}.invoice-details span:not(.invoice-overline){font-size:11px;color:#5e7580;overflow-wrap:anywhere}.invoice-value-note{font-style:italic}
.invoice-lines{padding:25px 37px 14px}.invoice-lines table{width:100%;min-width:0;border-collapse:collapse}.invoice-lines thead{background:#007078}.invoice-lines th{color:#fff;font-size:11px;text-transform:uppercase;letter-spacing:.075em;padding:13px 15px;border:0}.invoice-lines th:last-child{text-align:right}.invoice-lines td{padding:11px 15px;font-size:12px;color:#294956;border-bottom:1px solid #e9eef0}.invoice-lines td.invoice-money{text-align:right;color:#173f4b;font-weight:740;font-variant-numeric:tabular-nums;white-space:nowrap}.invoice-section-row td{background:#eef5f5;color:#007379!important;font-size:10px;text-transform:uppercase;letter-spacing:.095em;font-weight:850;border-bottom:0;padding:11px 15px}.invoice-lines tbody tr:hover{background:transparent}
.invoice-summary{max-width:390px;margin:12px 37px 28px auto;min-width:265px}.invoice-sum-line{display:flex;justify-content:space-between;gap:20px;padding:9px 13px;font-size:12px;color:#355663}.invoice-sum-line strong{white-space:nowrap}.invoice-balance{margin-top:8px;display:flex;gap:25px;justify-content:space-between;align-items:center;color:#fff;background:#006974;border-radius:7px;padding:17px 17px;font-weight:850}.invoice-balance span{font-size:11px;letter-spacing:.08em}.invoice-balance strong{font-size:23px;white-space:nowrap}
.invoice-bottom{background:#082e49;color:#e5f7f7;padding:15px 37px;display:flex;gap:20px;justify-content:space-between;align-items:center;font-size:10px}.invoice-bottom p{margin:0}.invoice-bottom span{color:#ff9b4d;font-weight:800;white-space:nowrap}
.gps-email-panel{max-width:910px;margin-left:auto;margin-right:auto}.gps-email-panel p{font-size:13px;line-height:1.6}.gps-email-panel .hint{font-size:12px}
@media(max-width:720px){.invoice-header{padding:20px 17px 18px}.invoice-brand{gap:8px;max-width:58%}.invoice-brand .invoice-logo{width:64px;height:64px}.invoice-office strong{font-size:12px}.invoice-office p{font-size:9px}.invoice-meta{min-width:0;max-width:41%}.invoice-meta h2{font-size:20px}.invoice-number{font-size:10px}.invoice-meta dl div{font-size:9px;gap:5px}.invoice-details{padding:17px;grid-template-columns:1fr 1fr;gap:12px}.invoice-lines{padding:16px 12px}.invoice-lines td{padding:11px 9px}.invoice-summary{margin:10px 12px 22px auto;width:calc(100% - 24px);max-width:390px}.invoice-balance strong{font-size:18px}.invoice-bottom{padding:15px;display:block;text-align:center}.invoice-bottom span{display:block;margin-top:5px}}
@page{size:A4;margin:8mm}
@media print{html,body{background:#fff!important;color:#183742!important}.gps-customer-invoice{max-width:100%!important;width:100%!important;margin:0!important;box-shadow:none!important;border:0!important;border-radius:0!important;print-color-adjust:exact;-webkit-print-color-adjust:exact}.invoice-stripe,.invoice-lines thead,.invoice-section-row,.invoice-balance,.invoice-bottom,.invoice-details{print-color-adjust:exact!important;-webkit-print-color-adjust:exact!important}.invoice-header{padding:13mm 9mm 8mm}.invoice-brand .invoice-logo{width:27mm;height:27mm}.invoice-details{padding:7mm 9mm}.invoice-lines{padding:7mm 9mm 2mm}.invoice-lines tr{break-inside:avoid}.invoice-summary{margin:6mm 9mm 6mm auto}.invoice-bottom{padding:5mm 9mm}.gps-customer-invoice .invoice-lines table{min-width:0!important}.customer-invoice-table{min-width:0!important}body.printing-invoice #invoice-print{top:0;left:0}.gps-email-panel{display:none!important}}
@media print{
 body{padding:0!important;margin:0!important;font-size:11px!important}
 .invoice-header{padding:6mm 8mm 5mm!important}
 .invoice-brand .invoice-logo{width:23mm!important;height:23mm!important}
 .invoice-office strong{font-size:14px!important;margin-bottom:4px!important}
 .invoice-office p{font-size:9px!important;line-height:1.35!important;margin-bottom:3px!important}
 .invoice-meta h2{font-size:24px!important;margin-bottom:4px!important}
 .invoice-meta .invoice-number{margin-bottom:3px!important}
 .invoice-meta dl div{padding:2px 0!important;font-size:9px!important}
 .invoice-details{padding:4mm 8mm!important}
 .invoice-details strong{font-size:12px!important}
 .invoice-lines{padding:4mm 8mm 0!important}
 .invoice-lines th{padding:7px 10px!important;font-size:9px!important}
 .invoice-lines td{padding:6px 10px!important;font-size:10px!important}
 .invoice-section-row td{padding:7px 10px!important;font-size:9px!important}
 .invoice-summary{margin:3mm 8mm 4mm auto!important}
 .invoice-sum-line{padding:5px 9px!important;font-size:10px!important}
 .invoice-balance{padding:10px 13px!important}
 .invoice-balance strong{font-size:17px!important}
 .invoice-bottom{padding:3mm 8mm!important;font-size:9px!important}
}

/* Invoice history action column */
.invoice-history-table th:last-child,.invoice-history-table td:last-child{text-align:right}
.invoice-history-table .btn{white-space:nowrap}

/* Consolidated GPS release — Miami manifests, staff package recovery and admin history */
@media print {
  body.printing-manifest * { visibility:hidden!important; }
  body.printing-manifest #manifest-print-area,
  body.printing-manifest #manifest-print-area * { visibility:visible!important; }
  body.printing-manifest #manifest-print-area { position:absolute;top:0;left:0;width:100%;margin:0;padding:12px;border:0;box-shadow:none; }
  body.printing-manifest #manifest-print-area table {min-width:0;font-size:11px;}
}
@media(max-width:720px){ .mobilebar button{font-size:9px;}.mobilebar span{font-size:17px;} }

/* GPS bank-transfer details — customer invoice only */
.invoice-payment-instructions{margin:0 37px 24px;border:1px solid #cddfe5;border-radius:9px;padding:15px 18px;color:#143e4c;background:#f6fbfc;break-inside:avoid}
.invoice-payment-instructions h3{font-size:13px;margin:0 0 12px;color:#064b60;text-transform:uppercase;letter-spacing:.04em}
.invoice-bank-grid{display:grid;grid-template-columns:125px 1fr;gap:7px 15px;font-size:11px}
.invoice-bank-grid span{color:#587481}.invoice-bank-grid strong{font-weight:700;color:#153b50;overflow-wrap:anywhere}
.invoice-payment-instructions p{font-size:10px;color:#506a76;margin:13px 0 0}
@media(max-width:720px){.invoice-payment-instructions{margin:0 13px 17px;padding:12px}.invoice-bank-grid{grid-template-columns:99px 1fr;gap:6px 9px;font-size:10px}}
@media print{.invoice-payment-instructions{margin:4mm 9mm 5mm;padding:4mm 5mm;break-inside:avoid}.invoice-bank-grid{font-size:9px;gap:4px 10px}}

/* GPS Miami phone-camera scan workflow */
.gps-scan-intro{display:flex;align-items:center;justify-content:space-between;gap:14px;flex-wrap:wrap;background:linear-gradient(125deg,#edf8f5,#eef4ff);padding:14px;border-radius:12px;border:1px solid #cde9df;margin:15px 0;}
.gps-scan-intro strong{color:#0d5147}.gps-scan-intro p{margin:4px 0 0}
.gps-scan-start{min-height:46px;white-space:normal}.gps-pending-warning{background:#fff3d9;border:1px solid #ecc46e;padding:12px;border-radius:11px;margin:10px 0}.gps-pending-warning strong{color:#794510}
.gps-complete-form{border:2px solid #6ea89e;border-radius:12px;padding:16px;margin:20px 0;background:#f5fbf8}
body.gps-scanning{overflow:hidden}
#gps-phone-scanner{position:fixed;inset:0;z-index:10000;background:rgba(3,16,23,.88);display:flex;align-items:center;justify-content:center;padding:12px;overflow:auto}
.gps-scanner-panel{width:min(100%,540px);max-height:96dvh;overflow-y:auto;background:#fff;border-radius:17px;padding:17px;color:#172c37;box-shadow:0 20px 50px #0007}
.gps-scanner-header{display:flex;justify-content:space-between;align-items:start;gap:12px}.gps-scanner-header p{font-size:.70rem;font-weight:700;letter-spacing:.08em;margin:0;color:#57807b}.gps-scanner-header h2{font-size:1.15rem;margin:5px 0 10px;overflow-wrap:anywhere}
.gps-scan-stats{display:flex;justify-content:space-between;gap:8px;font-size:.88rem;margin:9px 0}.gps-scan-stats strong{font-size:1.25rem;color:#075847}
.gps-scanner-camera{width:100%;min-height:240px;max-height:340px;overflow:hidden;background:#081a22;border-radius:12px;display:flex;align-items:center;justify-content:center}.gps-scanner-camera video,.gps-scanner-camera #qr-shaded-region{max-width:100%}.gps-scanner-camera #gps-native-preview{width:100%;height:300px;object-fit:cover}
.gps-scanner-feedback{border-radius:9px;padding:12px;margin:11px 0;font-weight:650;font-size:.91rem;overflow-wrap:anywhere}.gps-scanner-feedback.info{background:#eaf3fa;color:#17476c}.gps-scanner-feedback.success{background:#daf7e9;color:#10583a}.gps-scanner-feedback.warning{background:#fff0cc;color:#80510c}.gps-scanner-feedback.error{background:#ffe8e8;color:#9b2929}
.gps-scan-manual label{display:block;margin-bottom:6px;font-size:.88rem;font-weight:650}.gps-scan-manual-row{display:flex;gap:6px}.gps-scan-manual-row input{flex:1;min-width:0;text-transform:uppercase;padding:11px;border:1px solid #a3b1bc;border-radius:8px}.gps-scan-manual-row button{flex:0 0 auto}.gps-scanner-help{font-size:.78rem;color:#526571;line-height:1.4;margin:12px 0 0}
@media(max-width:580px){#gps-phone-scanner{padding:0}.gps-scanner-panel{width:100%;min-height:100dvh;max-height:100dvh;border-radius:0;padding:16px 13px 20px}.gps-scanner-camera{min-height:240px}.gps-scan-intro .btn{width:100%}}

/* GPS Miami Scanner v2 — camera photo fallback and accessibility */
.gps-scan-photo{display:flex;flex-wrap:wrap;align-items:center;gap:9px;margin:12px 0 16px}.gps-scan-photo label{cursor:pointer;margin:0}.gps-scan-photo input[type=file]{position:absolute;width:1px;height:1px;opacity:0;overflow:hidden;clip-path:inset(50%)}.gps-scan-photo .hint{font-size:.78rem;flex:1;min-width:150px}.gps-scanner-camera video{object-fit:cover}.gps-scanner-camera{min-height:270px}

/* Miami mobile scanned-detail workflow: keep existing tracking attached to saved details. */
.gps-scan-detail-guide{border:2px solid #ed641b;border-radius:14px;background:#fff7ed;padding:16px;margin:15px 0 10px}
.gps-scan-detail-guide h3{font-size:16px;margin:5px 0 8px;color:#763409}
.gps-scan-detail-guide p{font-size:13px;line-height:1.55}
.gps-urgent-label{font-size:10px;letter-spacing:.1em;font-weight:850;color:#9c4c12}
.gps-scan-detail-queue{display:flex;gap:7px;flex-wrap:wrap;margin:11px 0}
.gps-scan-detail-queue button{max-width:100%;overflow-wrap:anywhere;white-space:normal}
.gps-track-highlight{background:#eaf7f4;padding:11px 13px;border-radius:9px;border:1px solid #c3e5d8;margin:0;overflow-wrap:anywhere}
.gps-complete-form{border-color:#ed641b;background:#fffcf7}
.gps-save-scan-details{width:100%;min-height:52px}
@media(max-width:720px){.gps-scan-detail-queue button{width:100%;justify-content:flex-start}.gps-scan-detail-guide{padding:13px}}

/* GPS v4: named manifests and secure employee setup */
.gps-temp-pass{margin-top:18px;padding:16px;border:1px solid #c7d8d5;border-radius:13px;background:#f1f9f7;overflow-wrap:anywhere}
.gps-temp-pass-value{font-size:1.05rem;letter-spacing:.02em;padding:12px 10px;margin:10px 0;background:white;border:1px dashed #739e96;border-radius:8px;font-family:ui-monospace,monospace;user-select:all;overflow-wrap:anywhere}
.gps-rename-form{margin:12px 0;padding:10px;background:#f5f8f9;border:1px solid #d9e4e8;border-radius:12px}
.gps-rename-form .search{flex:1;min-width:170px}

/* GPS v5: scan -> immediately complete the SAME cargo row, with a verified save. */
.gps-scanner-detail-form {background:#fff;border:2px solid #e5a11c;border-radius:15px;padding:18px;color:#152b35;box-shadow:0 10px 30px #0002;margin:14px 0;scroll-margin-top:15px}
.gps-scanner-detail-form[hidden] {display:none!important}
.gps-scan-details-top {display:flex;align-items:flex-start;justify-content:space-between;gap:10px;margin-bottom:12px}
.gps-scan-details-top strong {font-size:1.12rem}
.gps-scan-details-top .hint {margin:6px 0;overflow-wrap:anywhere}
.gps-scanner-detail-form .field input {width:100%;min-width:0;font-size:16px;min-height:45px}
.gps-scan-details-actions {display:flex;gap:10px;flex-wrap:wrap;margin-top:8px}
.gps-scan-details-actions button {flex:1;min-height:48px;white-space:normal}
.gps-scan-details-error {color:#9a251c;background:#fff1ef;border:1px solid #e99285;border-radius:8px;padding:10px;font-weight:600}
@media(max-width:600px){.gps-scanner-detail-form{padding:12px;margin:10px 0}.gps-scan-details-actions {flex-direction:column}.gps-scan-details-actions button{width:100%}}

.gps-form-save-error{color:#9c211a;background:#fff1ef;padding:12px;border:1px solid #d65f59;border-radius:8px;font-weight:700}.gps-form-save-error[hidden]{display:none}
