/* New integrated app only. The legacy GAS/workspace styles are not changed. */
body[data-next-ui]{--pine:#191951;--pine2:#292969;--paper:#f4f5f9;--ink:#24283f;--muted:#606a80;--line:#dce0ec;--soft:#eeeff8;background:var(--paper);color:var(--ink);line-height:1.65}
body[data-next-ui] :is(button,input,select,textarea){font-family:inherit}
body[data-next-ui] :is(input,select,textarea){font-size:16px}
body[data-next-ui] :is(button,a,summary):focus-visible{outline:3px solid #907028;outline-offset:3px}
body[data-next-ui] :is(button,.btn){white-space:normal;overflow-wrap:anywhere;text-wrap:balance;line-height:1.5;min-height:44px;max-width:100%}
body[data-next-ui] .btn-primary{min-height:46px}
body[data-next-ui] :is(p,h1,h2,h3,strong,span,label){overflow-wrap:anywhere}
body[data-next-ui] .field{font-size:14px;color:var(--ink);letter-spacing:0}
body[data-next-ui] :is(.small-note,.page-lead,.form-description,.form-foot-note){font-size:13px;line-height:1.65}
body[data-next-ui] .surface{border-radius:16px}
body[data-next-ui] .surface-pad{padding:18px}
body[data-next-ui] .brand-caption span{white-space:nowrap}
body[data-next-ui] #toast{display:none;position:static;flex:none;transform:none;opacity:1;transition:none;max-width:none;max-height:25dvh;overflow:auto;pointer-events:auto;overscroll-behavior:contain;margin:12px 20px 0;padding:12px 16px;font-size:14px;line-height:1.6;overflow-wrap:anywhere}
body[data-next-ui] #toast.visible{display:block}
body[data-next-ui] .page-title{text-wrap:balance;margin:0 0 4px;line-height:1.4;letter-spacing:0}
body[data-next-ui] .page-intro{margin-bottom:20px}
body[data-next-ui] .sheet-row{gap:12px;padding:12px 0;align-items:start;line-height:1.65}
body[data-next-ui] .sheet-row strong{flex:0 1 35%;font-size:13px}
body[data-next-ui] .sheet-row span{font-size:14px;min-width:0;white-space:pre-wrap}
body[data-next-ui] :is(.next-notice,[role=alert]:not(:empty)){padding:12px 14px;border-radius:10px;background:#fff4dc;color:#7c4d08;margin:16px 0}
body[data-next-ui] summary{min-height:44px;padding:11px 0;cursor:pointer;line-height:1.6;font-weight:700}
body[data-next-ui] details>p{margin:12px 0}
body[data-next-ui] .dialog-close{width:44px;height:44px;flex:none;background:#eeeff8;color:var(--pine)}
/* Header, one scroll body, and optional action row. No sticky target over inputs. */
body[data-next-ui] #dialog{overflow:hidden;max-height:calc(100dvh - 32px);width:min(860px,calc(100vw - 32px));border-radius:18px;scroll-padding:0}
body[data-next-ui] #dialogBody{display:flex;flex-direction:column;max-height:calc(100dvh - 32px);min-height:0}
body[data-next-ui] #dialog .dialog-head{flex:none;padding:16px 20px;background:#fff;align-items:center}
body[data-next-ui] #dialog .dialog-head h3{font-size:20px;line-height:1.45;margin:0}
body[data-next-ui] #dialog .dialog-body{flex:1 1 auto;overflow:auto;min-height:0;padding:20px;overscroll-behavior:contain;scroll-padding-block:16px;background:var(--paper)}
body[data-next-ui] #dialog .dialog-body>*{min-width:0;max-width:100%}
body[data-next-ui] #dialog .dialog-body>.btn-row{padding:16px 0;gap:10px}
body[data-next-ui] #dialog .dialog-body>section:not(.next-progress-context){margin-block:16px;padding:18px;background:#fff;border:1px solid var(--line);border-radius:14px}
body[data-next-ui] #dialog .dialog-body>.btn{margin:8px 0}
body[data-next-ui] #dialog .dialog-body .btn-row .btn{flex:1 1 180px;min-width:0}
body[data-next-ui] .next-form-grid{background:#fff;border:1px solid var(--line);border-radius:16px;padding:18px;gap:18px}
body[data-next-ui] .next-form-grid>p{grid-column:1/-1;margin:0;font-size:13px;color:var(--muted)}
body[data-next-ui] .next-form-grid .field{margin:0}
body[data-next-ui] .next-form-grid :is(.next-editor-card,.next-prep-disclosure,.next-thread-history){grid-column:1/-1}
body[data-next-ui] .next-editor-card h2{font-size:18px;margin:0 0 18px}
body[data-next-ui] .next-editor-card .field+.field{margin-top:18px}
body[data-next-ui] .next-prep-disclosure{border-top:1px solid var(--line);padding-top:6px}
body[data-next-ui] .next-prep{padding:16px;margin:12px 0}
body[data-next-ui] .next-prep label{min-height:44px;margin:6px 0;font-size:15px}
body[data-next-ui] .next-prep input{width:20px;height:20px}
body[data-next-ui] .next-draft-tools{margin-top:16px;font-size:13px;color:var(--muted)}
body[data-next-ui] .next-draft-tools .btn{color:#814325;border-color:#dac6ba}
body[data-next-ui] .next-form-actions{display:flex;align-items:center;justify-content:space-between;gap:14px;flex:none;border-top:1px solid var(--line);padding:12px 20px;background:white;min-width:0}
body[data-next-ui] .next-form-actions>.btn{flex:0 1 auto;min-width:120px;max-width:50%;padding:12px 18px}
body[data-next-ui] .next-save-hint{font-size:13px;color:var(--muted)}
body[data-next-ui] .next-progress-context{margin:0 0 16px;padding:18px;border:1px solid var(--line);background:#fff}
body[data-next-ui] .next-progress-identity{gap:6px;margin-top:12px}
body[data-next-ui] .next-progress-identity>strong{font-size:18px}
body[data-next-ui] .next-progress-identity>small{font-size:12px}
body[data-next-ui] .next-progress-confirm{flex:1;min-width:0;margin:0;padding:0;border:0}
body[data-next-ui] .next-target-jump{display:flex;flex-direction:column;width:100%;min-width:0;align-items:start;border:0;background:none;color:var(--ink);padding:0;text-align:left;font:inherit}
body[data-next-ui] .next-target-jump :is(strong,span){display:block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px;line-height:1.4}
body[data-next-ui] .next-target-jump small{font-size:11px;color:var(--pine)}
body[data-next-ui] [data-progress-status]{font-size:12px;line-height:1.45;margin:5px 0 0;font-weight:700}
body[data-next-ui] .next-progress-details{margin-top:16px}
body[data-next-ui] .next-progress-details details{background:#fff;margin:12px 0}
body[data-next-ui] .next-progress-details details[open]{padding:0 12px 12px}
body[data-next-ui] .next-progress-details .btn-row{margin:16px 0}
body[data-next-ui] :is([data-next-action=delete-job],[data-next-action=cancel-reception],[data-next-action=cancel-case],[data-next-action=purge-job],[data-message-action=revoke],[data-message-action=cancel]){color:#8b312c;border-color:#dfc7c5;background:#fff}
body[data-next-ui] .next-thread-history>.surface{margin:12px 0;box-shadow:none;padding:14px;background:#f7f8fc}
body[data-next-ui] .next-thread-empty{padding:32px 12px;text-align:center;color:var(--muted);font-size:14px}
body[data-next-ui] .next-thread-context{margin-bottom:16px;padding:18px;border:1px solid var(--line);border-radius:16px;background:#fff}
body[data-next-ui] .next-thread-context h2{font-size:18px;margin:12px 0 6px}
body[data-next-ui] .next-thread-context p{margin:6px 0;font-size:14px}
body[data-next-ui] .next-message-vehicle{margin:6px 0;font-size:14px;font-weight:400}
body[data-next-ui] .next-message-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:16px;align-items:center}
@media(max-width:600px){body[data-next-ui] .next-message-row{grid-template-columns:minmax(0,1fr)}body[data-next-ui] .next-message-row>.btn{justify-self:start}}
@media(max-width:360px){body[data-next-ui] .next-confirmation-target strong{display:block;text-wrap:balance}}
body[data-next-ui] .next-thread-controls{margin:16px 0;padding:18px;border:1px solid var(--line);border-radius:16px;background:#fff}
body[data-next-ui] .next-thread-controls h3{margin:0 0 12px;font-size:17px}
body[data-next-ui] .next-thread-controls .btn-row{gap:10px;margin:12px 0}
body[data-next-ui] .next-thread-controls details{margin-top:16px;border-top:1px solid var(--line)}
body[data-next-ui] .next-setting-list{display:grid;gap:0;margin-bottom:24px;border:1px solid var(--line);border-radius:16px;background:white;overflow:hidden}
body[data-next-ui] .next-setting-list>.btn{display:flex;flex-direction:column;align-items:stretch;text-align:left;width:100%;padding:18px;border:0;border-bottom:1px solid var(--line);border-radius:0;font-size:16px}
body[data-next-ui] .next-setting-list>.btn:last-child{border-bottom:0}
body[data-next-ui] .next-setting-list small{font-size:13px;color:var(--muted);font-weight:400;margin-top:4px}
body[data-next-ui] .next-home-jobs{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,320px),1fr));gap:16px;margin:16px 0 24px}
body[data-next-ui] .next-home-job{padding:18px;border:1px solid var(--line);border-radius:16px;background:white}
body[data-next-ui] .next-home-job h3{font-size:18px;margin:12px 0 6px}
body[data-next-ui] .next-home-job p{font-size:14px;margin:6px 0}
body[data-next-ui] .next-home-task{background:var(--paper);padding:12px;border-radius:10px;margin:16px 0}
body[data-next-ui] .next-home-job>.btn{width:100%}
body[data-next-ui] .next-fleet-search{margin:0 0 12px}
body[data-next-ui] .next-fleet-search input{width:100%;min-width:0}
body[data-next-ui] .next-fleet-controls{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:12px 0}
body[data-next-ui] .next-fleet-controls>p{margin:0;font-size:13px}
body[data-next-ui] .next-fleet-extra{margin:8px 0 12px}
body[data-next-ui] .next-fleet-extra>summary{font-size:13px}
body[data-next-ui] .next-fleet-types{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));background:#e9ebf3;padding:4px;border-radius:10px;gap:4px}
body[data-next-ui] .next-fleet-types .btn{border:0;background:transparent;color:var(--muted);padding:8px 2px;font-size:13px}
body[data-next-ui] .next-fleet-types .is-selected{background:white;color:var(--pine);box-shadow:0 2px 5px #1919510a}
body[data-next-ui] .next-fleet-filters .btn{border-radius:24px;padding:8px 12px}
body[data-next-ui] .next-fleet-table caption{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
body[data-next-ui] .next-fleet-next-label{font-size:12px;color:var(--muted);margin-right:10px}
body[data-next-ui] .qa-toolbar-menu{position:relative;flex:none;font-size:12px}
body[data-next-ui] .qa-toolbar-menu>summary{padding:8px 12px;min-height:36px;border:1px solid var(--line);border-radius:8px;background:#fff}
body[data-next-ui] .qa-toolbar-menu .qa-toolbar-actions{position:absolute;right:0;top:100%;width:230px;display:grid;padding:10px;background:#fff;border:1px solid var(--line);border-radius:10px;box-shadow:0 8px 30px #19195120;z-index:58}
body[data-next-ui] .qa-toolbar-menu .qa-toolbar-actions .btn{min-height:44px}
body[data-next-ui] .qa-toolbar-notice{flex:1 1 160px;min-width:0;font-size:12px}
body[data-next-ui] .demo-strip.qa-toolbar{gap:8px;padding-block:6px;flex-wrap:nowrap}
body[data-next-ui] #qa-auth{background:var(--paper);padding:24px 16px}
body[data-next-ui] #qa-auth h1{font-size:26px;line-height:1.4;color:var(--pine)}
body[data-next-ui] #qa-login-form{padding:24px;border:1px solid var(--line);border-radius:18px;background:#fff}
body[data-next-ui] #qa-login-form input{min-height:48px;border:1px solid #cdd2df;border-radius:10px;font:inherit}
body[data-next-ui] #qa-reauth{padding:24px;border-radius:18px;max-height:calc(100dvh - 32px);overflow:auto;scroll-padding:16px}
body[data-next-ui] #qa-reauth h2{font-size:22px;line-height:1.45;margin-top:0;text-wrap:balance}
body[data-next-ui] #qa-reauth input{min-height:48px;border:1px solid #cdd2df;border-radius:10px;background:#fff}
body[data-next-ui] #qa-login{width:100%}
body[data-next-ui] #qa-auth-message{font-size:14px}
body[data-next-ui] #customer-qr img{max-width:100%;height:auto}
body[data-next-ui] #dialog :is(input[type=file],canvas,img){max-width:100%}
body[data-next-ui] .local-evidence{background:#fff;border:1px solid var(--line);border-radius:14px;padding:16px;margin:18px 0}
body[data-next-ui] .local-check{min-height:44px;display:flex;align-items:center;gap:10px;font-size:14px;margin:12px 0}
body[data-next-ui] .local-check input{flex:none;width:20px;height:20px}
body[data-next-ui=customer] main{max-width:820px;padding:24px;margin:24px auto;border-radius:16px}
body[data-next-ui=customer] :is(button,input,textarea,select){border-radius:10px}
body[data-next-ui=customer] :is(h1,h2){color:var(--pine);line-height:1.4}
body[data-next-ui=customer] section{border:1px solid var(--line);margin:16px 0;padding:18px;border-radius:16px}
body[data-next-ui=customer] :is(#send,.primary){background:var(--pine);color:#fff}
@media(max-width:1180px){
 body[data-next-ui] .next-fleet-list{background:transparent;border:0;box-shadow:none}
 body[data-next-ui] .next-fleet-table,body[data-next-ui] .next-fleet-table tbody{display:block}
 body[data-next-ui] .next-fleet-table thead{display:none}
 body[data-next-ui] .next-fleet-table th,body[data-next-ui] .next-fleet-table td{display:block;border:0;padding:0}
 body[data-next-ui] .next-fleet-table th[scope=row]{font-size:15px}
 body[data-next-ui] .next-fleet-table .next-fleet-status{display:flex}
 body[data-next-ui] .next-fleet-table .next-fleet-optional{display:none}
 body[data-next-ui] .next-fleet-table tr{display:flex;flex-direction:column;gap:12px;padding:18px;border-radius:16px;margin:0 0 16px;background:#fff;border:1px solid var(--line)}
 body[data-next-ui] .next-fleet-table .next-fleet-optional:nth-child(4){display:block;border-top:1px solid var(--line);padding-top:12px;font-size:13px}
 body[data-next-ui] .next-fleet-table .next-fleet-current{font-size:13px}
 body[data-next-ui] .next-fleet-table .next-fleet-actions .btn{margin:0}
 body[data-next-ui] .next-fleet-table .next-fleet-actions{width:100%}
}
@media(max-width:610px){
 body[data-next-ui] .content{padding:20px 16px 24px}
 body[data-next-ui] #dialog.next-long{width:100%;max-width:100%;height:100dvh;max-height:100dvh;border-radius:0;margin:0;inset:0}
 body[data-next-ui] #dialog.next-long #dialogBody{height:100%;max-height:100dvh}
 body[data-next-ui] #dialog .dialog-head{padding:12px 16px}
 body[data-next-ui] #dialog .dialog-body{padding:16px}
 body[data-next-ui] .next-form-grid{padding:18px;grid-template-columns:1fr}
 body[data-next-ui] .next-form-actions{padding:10px 16px calc(10px + env(safe-area-inset-bottom));gap:10px}
 body[data-next-ui] .next-form-actions>.btn{min-width:104px;padding:11px 12px;font-size:14px}
 body[data-next-ui] .next-save-hint{font-size:12px}
 body[data-next-ui] .next-fleet-filters{gap:6px}
 body[data-next-ui] .next-fleet-filters .btn{font-size:12px;padding:8px 11px}
 body[data-next-ui] .next-fleet-controls .btn{font-size:13px;padding:10px 12px}
 body[data-next-ui] .page-intro h1{font-size:24px}
 body[data-next-ui=customer] main{padding:16px;margin:0;border-radius:0}
}
@media(max-width:360px){
 body[data-next-ui] .content,body[data-next-ui] #dialog .dialog-body{padding:12px}
 body[data-next-ui] .next-form-grid{padding:14px}
 body[data-next-ui] .next-form-actions{padding-inline:12px}
 body[data-next-ui] .next-fleet-types .btn{font-size:12px}
}
@media(max-height:540px){
 body[data-next-ui] .next-target-jump small{display:none}
 body[data-next-ui] .next-form-actions{padding-block:8px}
 body[data-next-ui] #dialog .dialog-head{padding-block:8px}
}

body[data-next-ui] .next-section-title{font-size:18px;margin:24px 0 12px}
body[data-next-ui] .field :is(input,select,textarea){font-weight:400;color:var(--ink)}

body[data-next-ui] .qa-toolbar-menu .qa-toolbar-actions{max-width:none;grid-template-columns:1fr;gap:8px}
body[data-next-ui] .qa-toolbar-menu .qa-toolbar-actions .btn{grid-column:auto;width:100%;white-space:normal}
body[data-next-ui] .next-backup-section h2{font-size:18px;margin:0 0 16px}
body[data-next-ui] .next-backup-section label{display:block;font-size:14px;margin:18px 0 8px}
body[data-next-ui] .next-backup-section input{width:100%;min-height:48px;padding:12px;border:1px solid var(--line);border-radius:10px;background:#fff}
body[data-next-ui] .next-thread-history h2{font-size:18px;margin:0 0 16px}
body[data-next-ui=customer] :is(button,input:not([type=checkbox]):not([type=radio]),textarea,select){min-height:46px}
body[data-next-ui=customer] :is(.choice,fieldset){border-color:var(--line);border-radius:12px}
body[data-next-ui=customer] :is(header,.step,.hint,.skip,.qa){color:var(--muted)}
body[data-next-ui=customer] .actions{gap:12px}
body[data-next-ui=customer] .actions button{flex:1 1 140px}
body[data-next-ui=customer] #controls{display:grid;gap:12px}
body[data-next-ui=customer] #controls[hidden]{display:none}

body[data-next-ui] .next-backup-section .btn-row{margin-top:16px}

/* Long-form text spans the available desktop form width. */
body[data-next-ui] .next-form-grid>.field:has(textarea){grid-column:1/-1}
body[data-next-ui] .next-backup-status{flex:none;margin:0;padding:12px 20px;border-top:1px solid var(--line);background:#fff;font-size:14px;line-height:1.6}
body[data-next-ui] .next-backup-status:empty{display:none}
@media(min-width:821px){
 body[data-next-ui] .fab-cluster{position:relative;right:auto;bottom:auto;margin:0;display:flex;flex-direction:row}
 body[data-next-ui] .fab{min-height:44px;height:auto;padding:8px 12px;border-radius:10px;box-shadow:none;background:var(--pine);color:white;font-size:20px}
 body[data-next-ui] .fab-menu{position:absolute;right:0;top:calc(100% + 8px)}
}

body[data-next-ui] .btn-danger{background:#9b2935;border-color:#9b2935;color:#fff}
body[data-next-ui] [data-save-state="unknown"]{padding:12px 14px;border:1px solid #ad6919;border-radius:10px;background:#fff5e5;color:#643c0d;font-weight:700}
body[data-next-ui] .next-evidence-status{display:grid;gap:12px;margin-top:16px;padding-top:16px;border-top:1px solid var(--line)}
body[data-next-ui] .next-evidence-status p{margin:0}
body[data-next-ui] .next-evidence-status .btn{justify-self:start}
body[data-next-ui] #next-public-open,body[data-next-ui] #customer-link{display:inline-flex;align-items:center;min-height:46px;margin-top:16px}

@media(min-width:821px) and (max-width:1180px){
 body[data-next-ui] .nav-link{padding-inline:10px;gap:8px;font-size:14px;white-space:nowrap}
 body[data-next-ui] .utility-link{padding-inline:10px;gap:8px;font-size:14px}
}
body[data-next-ui=customer] [data-qa-retry]{background:#fff;color:var(--pine);border:1px solid var(--line)}
body[data-next-ui] .btn-danger:hover{background:#7f202b;border-color:#7f202b}

body[data-next-ui] .next-confirmation-target{grid-column:1/-1;padding:14px;border:1px solid var(--line);border-radius:12px;background:var(--paper)}
body[data-next-ui] .next-confirmation-target h4{margin:0 0 8px;font-size:13px;color:var(--muted)}
body[data-next-ui] .next-confirmation-target strong{font-size:16px}
body[data-next-ui] .next-confirmation-target small{display:block;margin-top:8px;overflow-wrap:anywhere}

body[data-next-ui] #dialog .dialog-head h3{text-wrap:balance}
body[data-next-ui] .next-form-actions:has(.next-save-hint){flex-wrap:wrap}
body[data-next-ui] .next-form-actions .next-save-hint{flex:1 1 110px}
body[data-next-ui] .next-form-actions:has(.next-save-hint)>.btn{max-width:100%;text-wrap:balance}

body[data-next-ui=customer] .choice{text-wrap:balance}

body[data-next-ui] .next-fleet-type-label{display:inline-block;white-space:nowrap}
