/* DuaraWarehouse office shell — tokens from docs/plan/audits/office-ui-audit.md (visual contract), layout from design/office-*.html.
   No JS anywhere: the mobile menu is a <details>, forms are plain GET/POST. Stacks below 720 px. */
:root{--space-1:4px;--space-2:8px;--space-3:12px;--space-4:16px;--font-sans:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"PingFang SC","Noto Sans SC",sans-serif;--font-mono:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;--radius-control:7px;--radius-card:12px;--radius-menu:8px;--radius-sheet:16px;--shadow-card:0 2px 10px #17263804;--shadow-menu:0 5px 18px #17263822;--shadow-sheet:0 -8px 30px #17263833;--ink:#172638;--muted:#526173;--line:#d6dfe8;--bg:#f3f5f7;--card:#fff;--primary:#0069c8;--primary-bg:#eaf4ff;--warn:#805000;--warn-bg:#fff4d6;--ok:#176442;--ok-bg:#e8f4ed;--bad:#a12525;--bad-bg:#fff0ef;--muted-bg:#edf0f4;--focus:#0069c8}
*{box-sizing:border-box}
html{scroll-behavior:auto}
body{margin:0;font:15px/1.5 var(--font-sans);color:var(--ink);background:var(--bg);min-height:100vh;display:flex;flex-direction:column}
a{color:var(--primary)}
h1,h2,h3,p{margin:0 0 12px}
h1{font-size:27px;line-height:1.2;letter-spacing:-.7px}
h2{font-size:18px}
h3{font-size:16px}
small,.meta,.help{color:var(--muted);font-size:13px}
.eyebrow{font-size:11px;letter-spacing:1.2px;text-transform:uppercase;color:var(--muted);font-weight:700;margin-bottom:6px}
time{font-variant-numeric:tabular-nums}
:focus-visible{outline:3px solid var(--focus);outline-offset:3px}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.skip{position:absolute;left:12px;top:-100px;background:var(--card);padding:12px;z-index:5;border-radius:6px}
.skip:focus{top:12px}
.ic{flex:none;vertical-align:-3px}

/* shell */
.shell{background:var(--card);border-bottom:1px solid var(--line);padding:0 20px}
.brandbar{display:flex;gap:14px;align-items:center;flex-wrap:wrap;padding:8px 0}
.brand{font-size:18px;font-weight:750;color:var(--ink);text-decoration:none;min-height:44px;display:inline-flex;align-items:center}
.brand span{font-weight:400;color:var(--muted)}
.scope{font-size:12px;font-weight:700;border-left:1px solid var(--line);padding-left:12px}
.language{margin-left:auto;position:relative}
.language summary{display:inline-flex;align-items:center;justify-content:center;gap:3px;min-height:44px;min-width:56px;padding:0 10px;border:1px solid var(--line);border-radius:8px;font-size:13px;font-weight:600;color:var(--primary);background:var(--card);cursor:pointer;list-style:none}
.language summary::-webkit-details-marker{display:none}
.language-options{position:absolute;right:0;top:48px;z-index:4;display:grid;gap:2px;padding:4px;border:1px solid var(--line);border-radius:8px;background:var(--card);box-shadow:0 5px 18px color-mix(in srgb, var(--ink) 13.3%, transparent)}
.language-options a,.language-options b{display:inline-flex;align-items:center;justify-content:center;min-height:44px;min-width:56px;padding:0 10px;border-radius:6px;font-size:13px;font-weight:600;text-decoration:none;color:var(--primary);background:var(--card)}
.language-options b{background:var(--primary);border-color:var(--primary);color:var(--card)}
.desktop-nav{display:flex;flex-wrap:wrap;gap:2px;align-items:center}
.navlink{display:inline-flex;align-items:center;gap:6px;min-height:44px;padding:8px 11px;font:inherit;font-size:13px;font-weight:600;color:var(--primary);text-decoration:none;background:none;border:0;border-bottom:3px solid transparent;cursor:pointer}
.navlink[aria-current=page]{border-bottom-color:var(--primary);color:var(--ink)}
.nav-account{margin-left:auto;display:flex;gap:2px;align-items:center}
.count{background:var(--bad-bg);color:var(--bad);border-radius:20px;min-width:22px;padding:0 6px;display:inline-block;text-align:center;font-size:12px;line-height:20px;margin-left:6px;font-variant-numeric:tabular-nums}
.mobile-nav{display:none;margin:0 -20px;border-top:1px solid var(--line)}
.mobile-nav summary{cursor:pointer;min-height:48px;display:flex;align-items:center;gap:8px;padding:10px 14px;font-size:14px;font-weight:650;list-style:none}
.mobile-nav summary::-webkit-details-marker{display:none}
.mobile-nav nav{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:2px;padding:0 8px 8px}
.mobile-nav .navlink{justify-content:flex-start;border:1px solid var(--line);border-radius:7px;width:100%}
.mobile-nav .navlink[aria-current=page]{background:var(--primary-bg)}
.inline{display:inline;margin:0}
.page{padding:24px 20px;max-width:1000px;width:100%;margin:0 auto;flex:1}
.foot{max-width:1000px;width:100%;margin:0 auto;padding:12px 20px;font-size:11px;color:var(--muted);display:flex;justify-content:space-between;gap:8px;flex-wrap:wrap}

/* header + cards */
.page-head{display:flex;justify-content:space-between;align-items:flex-start;gap:18px;flex-wrap:wrap;margin-bottom:22px}
.page-head h1{margin-bottom:8px}
.page-head .button{margin:0}
.card{background:var(--card);border:1px solid var(--line);border-radius:10px;padding:18px;margin-bottom:16px;min-width:0}
.split{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:18px;align-items:start}
.split>*{min-width:0}
.metrics{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin-bottom:18px}
.metric .value{font-size:28px;font-weight:700;font-variant-numeric:tabular-nums;text-align:right;margin:0;line-height:1.2}
.metric .unit{font-size:14px;font-weight:500;color:var(--muted);margin-left:6px}
.metric .label{font-size:13px;color:var(--muted);text-align:right;margin:4px 0 0}
.metric .meta{text-align:right;margin:6px 0 0}
.metric .drill{display:inline-flex;align-items:center;gap:4px;min-height:44px;font-size:13px;font-weight:600;text-decoration:none;float:right}
.button{display:inline-flex;min-height:44px;align-items:center;justify-content:center;gap:5px;padding:10px 14px;border-radius:7px;border:1px solid var(--line);font:inherit;font-size:14px;font-weight:600;color:var(--primary);text-decoration:none;background:var(--card);margin:4px 5px 4px 0;overflow-wrap:anywhere;max-width:100%;text-align:center;cursor:pointer}
.button:hover{border-color:var(--primary)}
.button.primary{background:var(--primary);border-color:var(--primary);color:var(--card)}
.button.primary.danger{background:var(--bad);border-color:var(--bad)}
.pill{display:inline-block;border-radius:5px;background:var(--primary-bg);color:var(--primary);font-size:12px;font-weight:650;padding:4px 9px;white-space:nowrap}
.pill.warn{color:var(--warn);background:var(--warn-bg)}
.pill.ok{color:var(--ok);background:var(--ok-bg)}
.pill.bad{color:var(--bad);background:var(--bad-bg)}
.pill.muted{color:var(--muted);background:var(--muted-bg)}
.notice{display:flex;align-items:flex-start;gap:10px;flex-wrap:wrap;background:var(--primary-bg);border-left:3px solid currentColor;padding:14px;margin:12px 0;border-radius:4px;font-size:14px;color:var(--primary)}
.notice .text{flex:1 1 220px;min-width:0;color:var(--ink)}
.notice .button{margin:0 0 0 auto}
.notice.warn{color:var(--warn);background:var(--warn-bg)}
.notice.ok{color:var(--ok);background:var(--ok-bg)}
.notice.bad{color:var(--bad);background:var(--bad-bg)}
.notice.info{color:var(--primary)}
.result:focus{outline:3px solid var(--focus);outline-offset:3px}
dl{margin:12px 0}
.fact{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:14px;border-bottom:1px solid var(--muted-bg);padding:8px 0;font-size:13px}
.fact dt{color:var(--muted)}
.fact dd{margin:0;text-align:right;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}

/* forms */
.field{display:flex;flex-direction:column;gap:6px;font-size:13px;font-weight:600;margin:10px 0;min-width:0}
input,select,textarea{font:inherit;min-height:44px;max-width:100%;width:100%;border:1px solid var(--muted);border-radius:6px;background:var(--card);color:var(--ink);padding:10px}
input[type=radio],input[type=checkbox]{width:20px;height:20px;min-height:20px;flex-shrink:0;accent-color:var(--primary)}
.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 14px}
.actions{display:flex;gap:6px;flex-wrap:wrap;justify-content:flex-end;margin-top:8px}
.search{margin-bottom:12px}
.search-row{display:flex;gap:8px;flex-wrap:wrap}
.search-row input{flex:1;min-width:200px}
.search .button{margin:0}
.help{margin:6px 0 0}
details.filters{background:var(--card);border:1px solid var(--line);border-radius:7px;padding:0 12px;margin:12px 0}
details.filters summary{cursor:pointer;min-height:44px;display:flex;align-items:center;gap:8px;padding:11px 0;font-size:13px;font-weight:650}
.chips{list-style:none;margin:0 0 8px;padding:0;display:flex;gap:6px;flex-wrap:wrap}
.chip{display:inline-flex;align-items:center;gap:6px;min-height:44px;padding:8px 12px;border:1px solid var(--line);border-radius:22px;background:var(--card);font-size:13px;font-weight:600;text-decoration:none;color:var(--ink)}
.chip.clear{color:var(--primary)}
.pager{display:flex;justify-content:space-between;align-items:center;gap:10px;font-size:13px;margin:15px 0}
.pager .range{font-variant-numeric:tabular-nums}
.pager .disabled{color:var(--muted);padding:11px 6px;min-height:44px;display:inline-flex;align-items:center}
.pager .button{margin:0}
.confirm .impact{margin:0 0 8px 18px;padding:0;font-size:14px}
.confirm.bad{border-color:var(--bad)}
.confirm.warn{border-color:var(--warn)}

/* state panels */
.state-panel{background:var(--card);border:1px solid var(--line);border-radius:10px;padding:24px;margin-bottom:16px;min-height:250px}
.state-panel .icon{color:var(--primary);margin:6px 0 18px;display:block}
.state-panel h2{font-size:23px;max-width:620px}
.state-panel .notice{margin-top:14px}
.skeleton{height:14px;border-radius:4px;background:var(--line);margin:14px 0;width:75%}
.skeleton:nth-child(2){width:45%}

/* narrow: stack, mobile menu, full-width primary */
@media (max-width:720px){
 .desktop-nav{display:none}
 .mobile-nav{display:block}
 .shell{padding:0 14px}
 .mobile-nav{margin:0 -14px}
 .brandbar{gap:6px}
 .brand{font-size:16px}
 .brandbar .scope{margin-left:auto}
 .language{width:auto;margin-left:auto}
 .page{padding:18px 14px}
 .split,.form-grid,.metrics{grid-template-columns:1fr}
 .metrics{gap:10px}
 .metric{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:0;flex-wrap:wrap}
 .metric .value{font-size:24px}
 .metric .label{max-width:48%;margin:0}
 .metric .meta,.metric .drill{flex-basis:100%;text-align:left;float:none;margin:0}
 .card{padding:15px}
 .page-head>.button.primary{width:100%}
 h1{font-size:25px}
 .pager{font-size:12px}
 .fact{gap:10px}
 .foot{padding:12px 14px}
}

/* Receipt workbench: the shell owns the viewport; each pane owns its scrolling. */
.receipt-shell{height:100dvh;min-height:0;color:var(--ink)}
.receipt-shell .tenant-shell{flex:none;padding:0 24px}
.receipt-shell .tenant-bar{max-width:none;min-height:64px;gap:16px}
.receipt-brand small,.receipt-mobile-reset{display:none}
.receipt-brand{font-size:23px;font-weight:750;text-decoration:none;color:var(--ok)}
.receipt-app-name{font-size:12px;font-weight:650;border-left:1px solid var(--line);padding-left:14px}
.receipt-nav{display:flex;align-self:stretch;margin-left:12px;gap:12px}
.receipt-nav a{display:flex;align-items:center;padding:0 12px;font-size:13px;text-decoration:none;border-bottom:3px solid transparent}
.receipt-nav a[aria-current]{border-color:var(--primary);font-weight:700}
.receipt-shell .tenant-shell + .tenant-main{min-height:0}
.receipt-shell .tenant-main{max-width:none;margin:0;padding:20px 24px 16px;min-height:0;display:flex;flex-direction:column;gap:16px}
.receipt-shell .tenant-foot{display:none}
.receipt-page-head{margin:0;flex:none}
.receipt-page-head h1{margin-bottom:4px}
.receipt-page-head p{margin:0;font-size:13px}
.receipt-shell .card{border-radius:12px;box-shadow:0 2px 10px color-mix(in srgb, var(--ink) 1.6%, transparent);margin:0}
.receipt-filters{flex:none;padding:12px 16px;position:relative;max-height:45%;overflow:auto}
.receipt-filters form{display:grid;grid-template-columns:minmax(200px,1.6fr) minmax(0,3fr);gap:8px 14px}
.receipt-search-row{display:contents}
.receipt-filters .field{margin:0;gap:5px;font-size:11px}
.receipt-filters input,.receipt-filters select{min-height:36px;height:36px;padding:6px 8px;border-color:var(--line);font-size:12px}
.search-input{position:relative;display:block}
.search-input>.ic{position:absolute;left:10px;top:10px;color:var(--muted)}
.search-input input{padding-left:34px}
.receipt-search-row .actions{grid-column:1 / -1;grid-row:2;align-self:start;display:flex;justify-content:flex-end;gap:8px;margin:0}
.receipt-filters .button{min-height:36px;margin:0;padding:6px 16px;font-size:12px}
.receipt-advanced{display:contents}
.receipt-advanced>summary{display:none}
.receipt-filter-grid{display:grid!important;grid-template-columns:repeat(6,minmax(0,1fr));gap:10px;grid-column:2;grid-row:1}
.receipt-identity{grid-column:1;grid-row:2;border:0;padding:0;margin:0;align-self:start}
.receipt-identity summary{min-height:36px;padding:8px 0;font-size:11px;color:var(--primary)}
.receipt-identity-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.receipt-workspace{display:grid;grid-template-columns:minmax(0,1fr);gap:16px;flex:1;min-height:0;min-width:0}
.receipt-workspace.has-detail{grid-template-columns:minmax(0,2fr) minmax(0,3fr)}
.receipt-results{min-width:0;min-height:0;display:flex;flex-direction:column;padding:0 14px}
.receipt-list-head{flex:none;display:flex;align-items:center;justify-content:space-between;gap:16px;padding:14px 0 10px}
.receipt-list-head h2{font-size:14px;margin:0}
.receipt-list-head>span{font-size:10px;color:var(--muted);text-align:right}
.receipt-list-scroll{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;padding:3px}
.receipt-list{display:grid;gap:8px}
.receipt-row{position:relative;display:grid;grid-template-columns:62px minmax(0,1.6fr) minmax(82px,.8fr) minmax(86px,.85fr) minmax(90px,.8fr);gap:12px;padding:14px 10px;border:1px solid var(--muted-bg);border-left:3px solid var(--muted-bg);border-radius:7px;align-items:start;font-size:12px}
.receipt-row>*{min-width:0;overflow-wrap:anywhere}
.receipt-row.selected{background:var(--primary-bg);border-color:var(--primary-bg);border-left-color:var(--primary)}
.receipt-row:focus-within{border-color:var(--primary)}
.receipt-identity-cell,.receipt-goods,.receipt-route,.receipt-state,.receipt-quantities{display:flex;flex-direction:column;gap:5px}
.receipt-number:after{content:"";position:absolute;inset:0}
.receipt-number{font-size:16px;font-weight:750;text-decoration:none;color:inherit}
.receipt-identity-cell small{font-size:10px}
.receipt-goods strong{font-size:13px}
.receipt-goods>[lang]{font-size:14px}
.receipt-goods small,.receipt-route{font-size:11px;color:var(--muted)}
.receipt-status{display:inline-block;align-self:flex-start;padding:3px 9px;border-radius:6px;background:var(--muted-bg);color:var(--muted);font-size:11px;font-weight:650;text-align:center;max-width:100%}
.status-Loaded{background:var(--line);color:var(--ok)}.status-PartiallyLoaded,.status-NeedsReview{background:var(--warn-bg);color:var(--warn)}.status-InStock{background:var(--primary-bg);color:var(--primary)}
.receipt-state small{font-size:9px;line-height:1.4;color:var(--muted)}
.receipt-quantities{text-align:right;font-variant-numeric:tabular-nums}
.receipt-quantities strong{font-size:15px;line-height:1.4}
.receipt-quantities>span{font-size:11px}
.receipt-results>.pager{flex:none;margin:0;padding:10px 0;min-height:62px;border-top:1px solid var(--line);font-size:11px}
.receipt-results>.pager>span:last-child{display:flex;gap:6px}
.receipt-results>.pager .button{font-size:11px;min-height:44px;padding:8px 10px;margin:0;white-space:nowrap}
.receipt-shell .receipt-detail{position:static;width:auto;max-width:none;max-height:none;margin:0;min-height:0;min-width:0;padding:0;display:flex;flex-direction:column;z-index:auto;overflow:visible}
.receipt-detail .tenant-modal-head{flex:none;padding:16px 18px 12px;align-items:center;border-bottom:1px solid var(--muted-bg)}
.receipt-detail h2{font-size:23px;margin:0;overflow-wrap:anywhere}
.receipt-detail h2 small{display:block;font-size:11px;font-weight:400}
.receipt-detail .tenant-close{font-size:11px;gap:5px;white-space:normal;flex-shrink:0}
.receipt-detail-scroll{min-height:0;overflow:auto;overscroll-behavior:contain;padding:14px 18px;overflow-wrap:anywhere}
.receipt-detail-scroll>p{margin-bottom:6px}
.receipt-customer{font-size:17px;font-weight:700}
.detail-status{margin:12px 0;flex-direction:row;align-items:center;gap:8px}
.receipt-metrics{display:grid;grid-template-columns:repeat(3,minmax(0,1fr)) minmax(0,1.3fr);margin:20px 0;gap:8px}
.receipt-metrics>div{min-width:0;border-right:1px solid var(--line);padding-right:6px}
.receipt-metrics>div:last-child{border:0;padding:0}
.receipt-metrics dt{font-size:10px;color:var(--muted);margin-bottom:8px}
.receipt-metrics dd{font-size:21px;font-weight:700;margin:0;font-variant-numeric:tabular-nums}
.receipt-metrics dd small{font-size:11px}
.receipt-detail .fact{font-size:12px;gap:10px}
.detail-section{border-top:1px solid var(--line);padding-top:14px;margin-top:18px}
.detail-section h3{display:flex;justify-content:space-between;gap:8px;font-size:13px}
.detail-section p{font-size:12px}
.detail-section details{border:1px solid var(--line);border-radius:6px;margin:8px 0;padding:0 10px}
.detail-section summary{cursor:pointer;padding:10px 0;font-size:12px;min-height:44px;overflow-wrap:anywhere}
.detail-section table{width:100%;table-layout:fixed;border-collapse:collapse;font-size:11px}
.detail-section th,.detail-section td{border-bottom:1px solid var(--muted-bg);padding:6px;text-align:left;overflow-wrap:anywhere}
.raw-cells th{width:45px}
.history-columns{display:grid;grid-template-columns:1fr 1fr;gap:12px;font-size:12px}
.history-columns p{margin:3px 0;overflow-wrap:anywhere}
.detail-pager{justify-content:flex-start;flex-wrap:wrap}
.detail-pager .button{margin:0;font-size:11px;padding:6px;min-height:44px}
.detail-pager .pager-group{display:flex;flex-wrap:wrap;align-items:center;gap:4px;margin:4px 0}
.detail-pager .pager-group>span{font-size:11px;color:var(--muted);font-weight:650}
.receipt-backdrop{display:none}
@media(min-width:721px) and (max-width:1100px){
 .receipt-shell .tenant-bar{gap:10px}.receipt-app-name{display:none}.receipt-nav{margin-left:0;gap:0}
 .receipt-filters form{grid-template-columns:minmax(180px,1fr) minmax(0,3fr)}
}
@media(max-width:720px){
 .receipt-shell .tenant-shell{padding:0 14px}.receipt-shell .tenant-bar{min-height:58px;gap:8px}.receipt-brand{font-size:19px}.receipt-app-name,.receipt-nav{display:none}
 .receipt-shell .tenant-main{padding:14px 12px 8px;gap:12px}.receipt-page-head h1{font-size:24px}.receipt-page-head p{display:none}
 .receipt-shell .tenant-switch{max-width:94px;font-size:11px}.receipt-shell .tenant-language summary{min-width:50px}
 .receipt-filters{padding:10px 12px;max-height:48%;overflow:auto}
 .receipt-filters form{display:flex;flex-wrap:wrap;gap:8px}
 .receipt-search-row{display:flex;align-items:end;gap:8px;width:100%}.search-field{flex:1;min-width:0}
 .receipt-search-row .actions{display:flex;flex-direction:column;gap:0}.receipt-search-row .actions>a{display:none}
 .receipt-filters input,.receipt-filters select,.receipt-filters .button{min-height:44px;height:44px}
 .search-input>.ic{top:13px}
 .receipt-advanced{display:block;width:100%;border:0;padding:0;margin:0}
 .receipt-advanced>summary{display:block;padding:8px 0;min-height:44px;color:var(--primary)}
 .receipt-advanced:not([open])>.receipt-filter-grid{display:none!important}
 .receipt-filter-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
 .receipt-identity{width:100%}.receipt-identity summary{min-height:32px;padding:6px 0}
 .receipt-workspace.has-detail,.receipt-workspace{grid-template-columns:minmax(0,1fr);gap:0}
 .receipt-results{padding:0 3px!important;border:0!important;background:transparent!important;box-shadow:none!important}
 .receipt-list-head{padding:0 0 8px}.receipt-list-head h2{font-size:12px}.receipt-list-head>span{font-size:9px;max-width:130px}
 .receipt-list-scroll{padding:3px}.receipt-list{gap:10px}
 .receipt-row{background:var(--card);padding:14px;grid-template-columns:minmax(0,1fr) minmax(110px,.7fr);gap:10px;border-radius:10px}
 .receipt-identity-cell{grid-column:1;grid-row:1}.receipt-number{font-size:19px;min-height:30px;display:inline-flex;align-items:center}
 .receipt-goods{grid-column:1 / -1;grid-row:2}.receipt-goods strong{font-size:15px}.receipt-goods>[lang]{font-size:15px}
 .receipt-state{grid-column:2;grid-row:1;align-items:flex-end}.receipt-status{align-self:flex-end;font-size:11px}
 .receipt-quantities{grid-column:1 / -1;grid-row:3;flex-direction:row;justify-content:space-between;align-items:center}.receipt-quantities strong{font-size:17px}.receipt-quantities>span{font-size:13px}
 .receipt-route{grid-column:1 / -1;grid-row:4;flex-direction:row-reverse;justify-content:space-between;font-size:11px}
 .receipt-results>.pager{padding:8px 0;min-height:60px}.receipt-results>.pager .range{max-width:150px}.receipt-results>.pager .button{min-height:44px;padding:8px}
 .receipt-shell .receipt-detail{position:fixed;inset:auto 0 0;width:100%;height:86dvh;max-height:86dvh;z-index:3;border-radius:16px 16px 0 0;box-shadow:0 -8px 30px color-mix(in srgb, var(--ink) 20.0%, transparent)}
 .receipt-detail:before{content:"";display:block;flex:none;width:38px;height:4px;border-radius:4px;background:var(--line);margin:8px auto 0}
 .receipt-detail .tenant-modal-head{padding:8px 16px 12px}.receipt-detail .tenant-close{min-height:44px;font-size:12px}
 .receipt-detail-scroll{padding:14px 16px}.receipt-backdrop{display:block;z-index:2}
 .history-columns{grid-template-columns:1fr}
}
@media(min-width:721px){.receipt-advanced::details-content{display:contents;content-visibility:visible}}

@media(max-width:720px){.receipt-brand small{display:block;font-size:9px;font-weight:500;color:var(--muted)}.receipt-mobile-reset{display:inline-flex}}

.receipt-workspace:has(>.notice){grid-template-rows:minmax(0,1fr) auto}

/* Approved issue review: independently scrolling queue and evidence pane. */
.review-page-head{display:flex;align-items:start;justify-content:space-between;gap:12px;flex:none}.review-page-head h1{font-size:28px;margin:0 0 6px}.review-page-head p{margin:0;color:var(--muted)}.review-mobile-receipts{display:none}
.review-workspace{display:grid;grid-template-columns:minmax(280px,.8fr) minmax(0,1.3fr);gap:16px;min-height:0;flex:1}.review-workspace .card{padding:0;min-width:0;border-radius:12px}
.review-queue,.review-detail{display:flex;flex-direction:column;min-height:0;overflow:hidden}.review-queue-head{padding:14px 16px;border-bottom:1px solid var(--line);flex:none}.review-queue-head h2{display:flex;justify-content:space-between;gap:10px;font-size:15px;margin:0 0 8px}.review-queue-head h2 small{color:var(--muted)}.review-muted{color:var(--muted);font-size:12px}.review-queue-head>p{margin:10px 0 0}
.review-search{display:flex;align-items:end;gap:8px;margin:8px 0 12px}.review-search>.field{flex:1;min-width:0;margin:0}.review-search>.button{flex:none;min-height:44px}.review-filter-row{display:grid;grid-template-columns:minmax(0,1.3fr) minmax(0,1fr) 62px;gap:7px}.review-filter-form .field{font-size:11px}.review-filter-form input,.review-filter-form select,.review-flow input:not([type=radio]),.review-flow select{width:100%;min-width:0;min-height:44px;border:1px solid var(--line);border-radius:6px;padding:9px;background:var(--card);color:var(--ink);font:inherit}.review-apply{margin-top:8px;min-height:38px;font-size:12px}.review-rows{min-height:0;overflow:auto;flex:1;padding:10px;overscroll-behavior:contain}.review-row{display:flex;flex-direction:column;gap:5px;padding:14px;border:1px solid var(--line);border-left:3px solid transparent;border-radius:7px;margin-bottom:7px;text-decoration:none;color:var(--ink);overflow-wrap:anywhere}.review-row.selected{background:var(--primary-bg);border-left-color:var(--primary)}.review-row-top{display:flex;justify-content:space-between;align-items:start;gap:8px}.review-row-top strong{font-size:17px}.review-row-top strong small{display:block;font-size:12px;color:var(--muted);margin-top:5px}.review-row>small{font-size:12px;color:var(--muted)}.review-row>[lang]{font-size:13px}.review-source-name{font-size:14px}.review-badge{font-size:11px;white-space:nowrap;padding:3px 7px;background:var(--warn-bg);color:var(--warn);border-radius:5px}.review-badge.severity-High{background:var(--bad-bg);color:var(--bad)}.review-pager{padding:12px 14px;border-top:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;gap:7px;flex:none;font-size:12px}.review-pager>span:last-child{display:flex;gap:5px}.review-pager .button{padding:8px;min-height:44px;font-size:12px}
.review-detail-head{padding:14px 16px;display:flex;justify-content:space-between;align-items:center;gap:10px;border-bottom:1px solid var(--line);flex:none}.review-detail-head h2{font-size:21px;margin:0;overflow-wrap:anywhere}.review-detail-head h2 small{display:block;font-size:12px;font-weight:400;color:var(--muted)}.review-detail-head>.button{flex:none;min-height:44px}.review-flow{display:flex;flex-direction:column;flex:1;min-height:0}.review-detail-body{padding:18px;overflow:auto;min-height:0;flex:1;overscroll-behavior:contain;overflow-wrap:anywhere}.review-detail-body h3{font-size:15px;margin:0 0 10px}.review-detail-body>.field{margin-bottom:12px}.review-detail-body .field{font-size:12px;font-weight:600}.review-detail-footer{border-top:1px solid var(--line);padding:14px 16px;display:flex;gap:8px;align-items:center;flex:none}.review-detail-footer .button{min-height:44px;white-space:normal;text-align:center;line-height:1.3}.review-detail-footer .primary{flex:1}.review-customer-heading{display:flex;align-items:center;justify-content:space-between;gap:8px}.review-customer-heading h3{margin:0}.review-customer-heading .button{font-size:12px;min-height:44px;white-space:nowrap}.review-choice{display:flex;align-items:center;gap:12px;min-height:58px;padding:12px;border:1px solid var(--line);border-radius:8px;margin:7px 0;cursor:pointer}.review-choice input{accent-color:var(--primary);width:18px;height:18px;flex:none}.review-choice small{display:block;color:var(--muted);font-size:12px}.review-choice:has(input:checked){background:var(--primary-bg);border-color:var(--primary)}.review-candidates{border:0;padding:0;margin:16px 0}.review-candidates legend{font-size:12px;color:var(--muted)}.review-evidence{background:var(--bg);border:1px solid var(--muted-bg);padding:12px;border-radius:9px;margin:16px 0}.review-evidence p{margin:4px 0}.review-metrics{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:10px 0;font-size:12px}.review-metrics strong{font-size:21px;display:block}.review-evidence table{width:100%;table-layout:fixed;font-size:12px}.review-evidence th{width:42px}.review-evidence td{overflow-wrap:anywhere}.review-customer-details{display:grid;grid-template-columns:1fr 1fr;gap:10px;background:var(--primary-bg);padding:12px;border-radius:8px;margin:12px 0}.review-customer-details dt{color:var(--muted);font-size:12px}.review-customer-details dd{margin:3px 0 0;font-weight:600;overflow-wrap:anywhere}.review-effect{border-bottom:1px solid var(--line);padding:6px 0}.review-effect summary{min-height:44px;padding:10px 0;cursor:pointer;font-weight:600;font-size:13px}.review-effect summary small{display:block;font-weight:400;font-size:10px;color:var(--muted);overflow-wrap:anywhere}.review-before-after{display:grid;grid-template-columns:1fr 1fr;gap:14px}.review-before-after>section{min-width:0}.review-before-after h4{font-size:12px}.review-before-after pre{white-space:pre-wrap;overflow-wrap:anywhere;word-break:break-word;font-size:10px;max-width:100%;background:var(--bg);padding:8px}.review-facts{font-size:12px}.review-facts dt{color:var(--muted)}.review-facts dd{margin:2px 0 8px;overflow-wrap:anywhere}.review-evidence-pager{display:flex;justify-content:space-between;align-items:center;gap:8px;font-size:12px;margin:14px 0}.review-evidence-pager .button{min-height:44px;padding:8px;font-size:12px}.review-effect-counts{padding-left:20px;font-size:12px}.review-empty-detail{display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;color:var(--muted);padding:30px!important}.review-empty-detail h2{font-size:20px;margin-top:18px}.review-empty{padding:20px}.review-backdrop{display:none}.review-pending{position:absolute;inset:auto 16px 80px;background:var(--warn-bg);padding:14px;border:1px solid var(--warn-bg);border-radius:8px;z-index:5}.review-flow[aria-busy=true]{opacity:.75}.review-flow{position:relative}
@media(max-width:720px){.review-page-head h1{font-size:24px}.review-page-head p{display:none}.review-mobile-receipts{display:block;font-size:12px;padding:8px}.review-workspace{grid-template-columns:minmax(0,1fr);gap:0}.review-empty-detail{display:none}.review-queue-head{padding:10px 12px}.review-filter-form .review-search{margin:4px 0 8px}.review-queue-head>p{margin-top:6px}.review-apply{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);padding:0;border:0}.review-apply:focus{position:static;width:auto;height:auto;clip-path:none;padding:8px}.review-detail{position:fixed;inset:auto 0 0;width:100%;height:86dvh;max-height:86dvh;z-index:3;border-radius:16px 16px 0 0!important;box-shadow:0 -8px 30px color-mix(in srgb, var(--ink) 20.0%, transparent)}.review-detail:before{content:"";display:block;flex:none;width:38px;height:4px;border-radius:4px;background:var(--line);margin:8px auto 0}.review-detail-head{padding:8px 16px 12px}.review-detail-head h2{font-size:20px}.review-detail-head .button{padding:8px;font-size:12px}.review-detail-body{padding:14px 16px}.review-detail-footer{padding:12px 16px}.review-backdrop{display:block;z-index:2}.review-customer-heading{font-size:14px}.review-customer-heading .button{font-size:11px;padding:8px}.review-before-after{grid-template-columns:1fr}.review-pager{padding:8px 10px}.review-filter-row{grid-template-columns:minmax(0,1.3fr) minmax(0,1fr) 60px}.review-flow .notice{font-size:13px}}

.review-filter-form .field{margin:0;gap:3px}.review-workspace .button{margin:0}.review-row{gap:4px;padding:12px}.review-row-description{font-size:13px}.review-queue-head .review-search{margin:8px 0}.review-filter-form .review-filter-row{margin-top:10px}.review-queue-head .review-muted{font-size:11px}

/* One receipts filter disclosure; search and submit share the input baseline. */
.receipt-filters form{display:flex;flex-direction:column;gap:8px}
.receipt-search-row{display:flex;align-items:flex-end;gap:10px;width:100%}
.receipt-search-row .search-field{flex:1;min-width:0}
.receipt-search-row .actions{align-self:flex-end;flex:none;display:flex;margin:0}
.receipt-filters input,.receipt-filters select,.receipt-filters .button{min-height:44px;height:44px}
.receipt-filters .search-input>.ic{top:13px}
.receipt-advanced{display:block;width:100%;border:0;padding:0;margin:0}
.receipt-advanced>summary{display:flex;align-items:center;gap:6px;padding:8px 0;min-height:44px;color:var(--primary);cursor:pointer;list-style:none}
.receipt-advanced>summary::-webkit-details-marker{display:none}
.receipt-advanced:not([open])>.receipt-filter-grid{display:none!important}
.receipt-filter-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;padding-top:4px}
.receipt-filter-reset{justify-self:start;align-self:end}
@media(max-width:720px){.receipt-filter-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.receipt-search-row{gap:8px}}

.review-whatsapp{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.review-whatsapp small{color:var(--muted)}

.review-translation-pair{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:12px;margin-bottom:16px}.review-translation-pair>section{padding:12px;background:var(--bg);border:1px solid var(--line);border-radius:8px;min-width:0}.review-translation-pair small{font-size:12px;color:var(--muted)}.review-translation-pair p{font-size:18px;line-height:1.45;margin:6px 0 0;overflow-wrap:anywhere}.review-flow textarea{display:block;width:100%;min-height:80px;padding:10px;border:1px solid var(--line);border-radius:6px;font:inherit}.review-flow>.field,.review-detail-body>.field{margin-bottom:12px}

.review-source-disclosure{margin-bottom:16px}.review-source-disclosure>summary{min-height:44px;padding:12px 0;cursor:pointer;font-weight:600}.review-source-disclosure .review-evidence{margin-top:0}

/* Fragment targets provide native detail/return navigation without scripting. */
.receipt-row:target{outline:2px solid var(--primary);outline-offset:2px}
.receipt-detail:target{scroll-margin-top:12px}
.review-receipt-count{font-weight:650;color:var(--primary)}

.review-filter-form .review-order-toggle{margin-top:8px;min-height:44px;font-size:12px}

/* B1 approved read-only tenant backup health card. */
.backup-health{border-radius:12px;padding:20px;margin-bottom:20px;box-shadow:0 3px 12px color-mix(in srgb, var(--ink) 2.0%, transparent)}
.backup-health h2{display:flex;align-items:center;gap:9px;font-size:16px;border-bottom:1px solid var(--muted-bg);padding-bottom:14px;margin:0}
.backup-health h2 .ic{width:20px;height:20px;color:var(--primary);flex:none}
.backup-health-state{font-size:13px;font-weight:600;margin:14px 0 8px}.backup-health-state.ok{color:var(--ok)}.backup-health-state.warning{color:var(--warn)}
.backup-health .fact{display:grid;grid-template-columns:1fr 1fr;gap:12px;padding:8px 0;font-size:12px;min-width:0}.backup-health .fact dd{overflow-wrap:anywhere;text-align:right}.backup-health dl{margin:12px 0}
.backup-health-note{color:var(--muted);font-size:12px;line-height:1.5;margin:8px 0}
@media(max-width:720px){.backup-health{padding:16px}}

.destination-source{display:inline!important;margin-inline-start:.45em;color:var(--muted,var(--muted));font-size:11px;font-weight:400;white-space:nowrap}.shipment-block-header{overflow-wrap:anywhere;font-size:13px}.review-choice small{overflow-wrap:anywhere}

/* Agent review uses the shared office shell and review workspace. */
.agent-proposal{border:1px solid var(--line);border-left:4px solid var(--primary);border-radius:8px;background:var(--card);padding:18px;margin:14px 0;min-width:0;overflow-wrap:anywhere;color:var(--ink);font-size:14px;line-height:1.5}.agent-proposal h3{font-size:18px;margin:16px 0 8px}.agent-card-heading{display:flex;gap:10px;justify-content:space-between;align-items:start;flex-wrap:wrap;color:var(--muted)}.agent-chip{display:inline-block;border-radius:16px;padding:3px 9px;background:var(--primary-bg);font-size:12px;font-weight:650;white-space:normal}.agent-rationale{margin:12px 0;white-space:pre-wrap}.agent-original{font-size:16px;margin:8px 0}.agent-evidence summary,.agent-secondary{color:var(--muted);cursor:pointer;min-height:44px;display:inline-flex;align-items:center}.agent-evidence ul{padding-left:20px;max-height:180px;overflow:auto}.agent-evidence a{display:inline-block;margin-right:16px}.agent-effect{padding:14px;border-radius:7px;background:var(--bg);margin:12px 0}.agent-effect p{margin:7px 0 0}.agent-meta,.agent-muted{font-size:12px;color:var(--muted);line-height:1.5}.agent-card-actions{display:flex;align-items:center;gap:16px;flex-wrap:wrap}.agent-bulk-entry{display:flex;align-items:center;justify-content:space-between;gap:12px;background:var(--primary-bg);padding:12px;border:1px solid var(--line);border-radius:7px;margin-top:14px}.agent-bulk-entry small{display:block;color:var(--muted)}.agent-page{height:calc(100dvh - 128px);min-height:0;display:flex;flex-direction:column;gap:14px;max-width:1100px;margin:auto}.agent-page-head{display:flex;gap:15px;align-items:start;justify-content:space-between;flex-shrink:0}.agent-page-head h1{margin:0;font-size:26px}.agent-page-head p{margin:6px 0;color:var(--muted)}.agent-nav{display:flex;gap:16px;flex-wrap:wrap;font-size:14px}.agent-panel{border:1px solid var(--line);border-radius:9px;background:var(--card);padding:20px;min-height:0;overflow:auto;overscroll-behavior:contain}.agent-page>.agent-panel{flex:1}.agent-filter{display:flex;gap:14px;align-items:end;flex-wrap:wrap;border-bottom:1px solid var(--ok-bg);padding-bottom:16px;margin-bottom:14px}.agent-filter .field{flex:1;min-width:130px}.agent-filter input,.agent-filter select,.agent-editor input,.agent-editor select,.agent-editor textarea{max-width:100%;box-sizing:border-box}.agent-selection{list-style:none;padding:0;margin:0}.agent-selection-row{display:flex;gap:12px;padding:16px 0;border-bottom:1px solid var(--line);align-items:start}.agent-selection-row input{width:20px;height:20px;flex-shrink:0;margin-top:5px}.agent-selection-row>div{min-width:0;flex:1}.agent-selection-row strong,.agent-selection-row small{display:block;overflow-wrap:anywhere}.agent-selection-row small{color:var(--muted);margin-top:4px}.agent-selection-meta{display:flex;gap:12px;align-items:center;flex-wrap:wrap;margin-top:6px}.agent-selection-meta .agent-chip{display:inline-block}.agent-sticky-actions{display:flex;gap:12px;justify-content:space-between;align-items:center;flex-wrap:wrap;position:sticky;bottom:-20px;background:var(--card);padding:16px 0 0;border-top:1px solid var(--line);margin-top:20px}.agent-editor{max-width:720px}.agent-editor .field{display:block;margin:14px 0}.agent-editor .field input,.agent-editor .field select,.agent-editor .field textarea{display:block;width:100%;margin-top:6px}.agent-two-columns{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:16px}.agent-photo{display:block;max-width:100%;max-height:280px;object-fit:contain;margin:12px auto;background:var(--bg)}.agent-counts{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:16px 0}.agent-count{border:1px solid var(--line);border-radius:8px;padding:14px;min-width:0}.agent-count strong{display:block;font-size:26px}.agent-count small{color:var(--muted)}.agent-run{border-bottom:1px solid var(--line);padding:16px 0;overflow-wrap:anywhere}.agent-run:first-child{padding-top:0}.agent-run h2{font-size:19px;margin:0}.agent-run-meta{display:flex;gap:12px;flex-wrap:wrap;font-size:12px;color:var(--muted);margin-top:8px}.agent-error{border:1px solid var(--line);background:var(--bad-bg);padding:14px;border-radius:7px;overflow-wrap:anywhere}.agent-result{padding:14px;border-bottom:1px solid var(--line)}.agent-token-secret{font-family:var(--font-mono);overflow-wrap:anywhere;background:var(--bg);border:1px dashed var(--muted);padding:16px;user-select:all}.agent-token-row{padding:14px 0;border-top:1px solid var(--line)}.agent-token-row details{margin-top:8px}.agent-token-row .field{display:block;margin:8px 0}.agent-token-row textarea{width:100%}.agent-token-block form{margin:12px 0}.agent-token-block .field input{display:block;max-width:100%}.agent-token-block .agent-card-heading{align-items:center}.agent-facts{display:grid;grid-template-columns:1fr 1fr;gap:8px}.agent-facts dt{color:var(--muted)}.agent-facts dd{margin:0;overflow-wrap:anywhere}.agent-page .agent-proposal .agent-card-actions,.agent-page .agent-proposal .agent-bulk-entry{display:none}.agent-page .agent-proposal .agent-muted{margin-bottom:0}
body:has(.agent-page){height:100dvh;overflow:hidden}body:has(.agent-page) .tenant-main{max-width:1140px;padding:20px;height:calc(100dvh - 80px);min-height:0;box-sizing:border-box}body:has(.agent-page) .tenant-foot{display:none}
@media(max-width:720px){.agent-proposal{padding:14px;margin:12px 0}.agent-page-head h1{font-size:22px}.agent-page{height:100%;gap:12px}.agent-page-head p{font-size:13px}.agent-panel{padding:14px}.agent-two-columns{grid-template-columns:1fr}.agent-bulk-entry{align-items:stretch;flex-direction:column}.agent-counts{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.agent-count{padding:10px}.agent-card-actions{gap:12px}.agent-filter{gap:10px}.agent-filter .field{min-width:105px}.agent-nav{gap:12px;font-size:13px}.agent-sticky-actions{bottom:-14px}.agent-page-head>.button{padding:8px 10px}.agent-facts{grid-template-columns:1fr}.agent-facts dd{margin-bottom:8px}body:has(.agent-page) .tenant-main{padding:14px;height:calc(100dvh - 70px)}}
@media(min-width:721px){.photo-content:has(.agent-proposal)>.photo-backdrop{display:none}}
body:has(.agent-token-block){height:100dvh;overflow:hidden;display:flex;flex-direction:column}body:has(.agent-token-block)>header,body:has(.agent-token-block)>footer{flex:none}body:has(.agent-token-block)>main.page{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;width:100%;box-sizing:border-box}
.agent-page-head>.button{flex-shrink:0;min-width:68px;max-width:45%;overflow-wrap:normal}.agent-page-head>div{min-width:0}@media(max-width:720px){.agent-filter .field:first-of-type{flex-basis:100%}}

.agent-type-report h3{font-size:16px;margin:20px 0 6px}.agent-type-row{padding:14px 0;border-top:1px solid var(--line)}.agent-type-row h4{margin:0 0 12px;font-size:14px}.agent-type-metrics{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:12px;margin:0}.agent-type-metrics dt{font-size:12px;color:var(--muted);line-height:1.4}.agent-type-metrics dd{margin:6px 0 0;font-size:19px;font-weight:650;overflow-wrap:anywhere}@media(max-width:720px){.agent-type-metrics{grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.agent-type-metrics dd{font-size:18px}}
/* Shared review cards and bottom sheet also serve agent proposals. */
.agent-page .review-workspace{min-height:520px;height:calc(100dvh - 340px)}
.agent-page .agent-panel:has(.review-workspace){padding:0;border:0;background:transparent}
.agent-page .filter-bar{margin-bottom:10px}.agent-page .filter-chips{display:flex;gap:8px;margin:10px 0}
.proposal-choice{position:relative}.proposal-select{display:flex;align-items:center;min-height:44px;gap:8px;font-size:11px;color:var(--muted);padding:0 12px 10px}.proposal-select input{width:18px;height:18px}
.review-detail .agent-proposal{border:0;padding:0;margin:0;background:transparent;color:var(--ink)}
.review-detail .agent-proposal h3{margin:18px 0 8px}.review-detail .agent-proposal .agent-effect{background:var(--muted-bg)}
.agent-page .review-detail-body>.primary,.agent-page .review-detail-body>form>.primary{width:100%}
.agent-page .review-detail-body textarea{width:100%;min-height:80px;font:inherit}
.agent-page.agent-session-page{height:auto}.agent-page.agent-session-page>.agent-panel{overflow:visible}
body:has(.agent-session-page){overflow:auto;height:auto}body:has(.agent-session-page) .tenant-main{height:auto}
@media(max-width:720px){.agent-page .review-workspace{min-height:0;height:calc(100dvh - 340px)}.agent-page .review-detail{margin:0}.agent-page .review-detail-body{padding-bottom:24px}}

.office-app-header>.wa-badge+.wa-badge{margin-left:0}
@media(max-width:720px){.office-app-header:has(>.wa-badge+.wa-badge){height:auto;min-height:110px;flex-wrap:wrap;padding-top:8px;padding-bottom:8px;gap:6px}.office-app-header:has(>.wa-badge+.wa-badge)>.wa-badge{order:5;margin-left:0;flex:1;justify-content:center;max-width:calc(50% - 3px)}.office-app-header:has(>.wa-badge+.wa-badge)>.wa-badge span{max-width:none}.office-app-header:has(>.wa-badge+.wa-badge) .office-language-chip{margin-left:auto}.agent-page{height:100%}body:has(.agent-page) .tenant-main{height:calc(100dvh - 116px)}.agent-page .review-workspace{height:calc(100dvh - 410px)}}
.agent-page .filters form{display:flex;align-items:end;gap:10px;padding-bottom:10px}.agent-page .filters .form-grid{display:grid;grid-template-columns:1fr 1.4fr;gap:10px;flex:1;margin:0}.agent-page .filters .field{margin:0}.agent-page .filters .button{margin:0;flex:none}.agent-page .filters select{min-width:0;width:100%}.agent-page .filters summary{min-height:36px;padding:8px 0}.agent-page .filters{margin:0}.agent-page .filter-chips .chip[aria-current=true]{background:var(--primary);color:var(--card)}
@media(min-width:721px){.agent-page .review-workspace{grid-template-columns:minmax(250px,.75fr) minmax(0,1.5fr)}}
@media(max-width:720px){.agent-page-head p{display:none}.agent-page .filters .field{font-size:11px}.agent-page .filters select{padding:8px 5px;font-size:12px}.agent-page .filters form{gap:6px}.agent-page .filters .form-grid{gap:6px}.agent-page .filters .button{padding:8px;font-size:12px}.office-app-header:has(>.wa-badge+.wa-badge) .office-app-brand{flex:1 1 calc(100% - 170px)}.office-app-header:has(>.wa-badge+.wa-badge)>.wa-badge{flex:1 1 45%}}
.agent-page>.agent-panel:has(.review-workspace){display:flex;flex-direction:column;overflow:hidden;min-height:0}
.agent-page:not(.agent-session-page) .review-workspace{height:auto;min-height:0;flex:1}
.agent-page .filterbar,.agent-page .filter-chips{flex:none}
.agent-page.agent-session-page>.agent-panel{display:block;overflow:visible}
.agent-page.agent-session-page .review-workspace{height:650px;min-height:520px}
.agent-page .agent-error{flex:none}

.office-app-header .agent-badge span{display:inline;white-space:normal;max-width:130px}
@media(max-width:720px){.office-app-header:has(>.agent-badge)>.wa-badge{font-size:10px;font-weight:500}.office-app-header:has(>.agent-badge)>.wa-badge span{display:inline;white-space:normal}}
@media(min-width:721px) and (max-width:1400px){.office-app-header:has(>.agent-badge) .office-desktop-nav{justify-content:flex-start;overflow-x:auto;scrollbar-width:thin}}

/* Keep secondary proposal filters collapsed without hiding their applied values. */
.agent-page .review-queue-head{max-height:70%;overflow:auto;overscroll-behavior:contain}
.agent-page .review-queue-head .filterbar{display:flex;flex-wrap:wrap;align-items:flex-start;gap:8px}
.agent-page .review-queue-head .chips{margin:0;min-width:0}
.agent-page .review-queue-head .filters>summary{min-height:44px;padding:8px 0}
.agent-page .review-queue-head .filters[open]{flex-basis:100%;min-width:0}
.agent-page .review-queue-head .filters form{flex-wrap:wrap;padding-top:8px}
.agent-page .review-queue-head .filters .form-grid{flex-basis:100%;grid-template-columns:repeat(2,minmax(0,1fr))}
.agent-page .review-queue-head .filters .field:last-child{grid-column:1/-1}
.agent-page:not(.agent-session-page) .agent-run h2{display:flex;justify-content:space-between;gap:12px}.agent-page:not(.agent-session-page) .agent-run h2 small{font-size:13px;white-space:nowrap}.agent-page:not(.agent-session-page) .agent-run{padding:12px 0}
/* Tenant document and dialog components, formerly inline in the tenant layout. */

  .tenant-shell{background:var(--card);border-bottom:1px solid var(--line);padding:0 20px}.tenant-bar{max-width:1000px;margin:auto;min-height:60px;display:flex;align-items:center;gap:14px}.tenant-brand{font-size:18px;font-weight:750;color:var(--ink);text-decoration:none}.tenant-brand-short{display:none}.tenant-tools{margin-left:auto;display:flex;align-items:center;gap:6px}.tenant-language,.tenant-menu{position:relative}.tenant-menu summary{list-style:none;gap:5px;min-height:44px;display:inline-flex;align-items:center;justify-content:center;padding:8px 10px;border:1px solid var(--line);border-radius:7px;background:var(--card);color:var(--primary);font-size:13px;cursor:pointer}.tenant-menu summary::-webkit-details-marker{display:none}.tenant-menu-options{position:absolute;right:0;top:48px;z-index:3;background:var(--card);border:1px solid var(--line);border-radius:7px;padding:4px;display:grid;gap:2px;box-shadow:0 5px 18px color-mix(in srgb, var(--ink) 13.3%, transparent);min-width:170px}.tenant-menu-options a{min-height:44px;display:flex;align-items:center;padding:8px 12px;color:var(--primary);text-decoration:none;border-radius:6px;font-size:14px;white-space:nowrap}.tenant-menu-options a:hover{background:var(--primary-bg)}.tenant-language summary,.tenant-language-options a,.tenant-language-options b,.tenant-switch,.tenant-signout,.tenant-close{min-height:44px;display:inline-flex;align-items:center;justify-content:center;padding:8px 10px;border:1px solid var(--line);border-radius:7px;background:var(--card);color:var(--primary);font:inherit;font-size:13px;text-decoration:none;cursor:pointer}.tenant-language summary{list-style:none;gap:3px}.tenant-language summary::-webkit-details-marker{display:none}.tenant-language-options{position:absolute;right:0;top:48px;z-index:3;background:var(--card);border:1px solid var(--line);border-radius:7px;padding:4px;display:grid;gap:2px;box-shadow:0 5px 18px color-mix(in srgb, var(--ink) 13.3%, transparent)}.tenant-language-options a,.tenant-language-options b{border:0;min-width:60px}.tenant-language-options b{background:var(--primary);color:var(--card)}.tenant-signout{cursor:pointer}.tenant-main{max-width:1000px;width:100%;padding:28px 20px;margin:auto;flex:1}.tenant-foot{max-width:1000px;width:100%;padding:12px 20px;margin:auto;color:var(--muted);font-size:11px;display:flex;justify-content:space-between}.tenant-shell + .tenant-main{min-height:calc(100vh - 110px)}.tenant-backdrop{position:fixed;inset:0;background:color-mix(in srgb, var(--ink) 25.1%, transparent);z-index:1}.tenant-modal{position:relative;z-index:2;max-width:600px;margin:22px auto;padding:20px;background:var(--card);border:1px solid var(--line);border-radius:12px;box-shadow:0 12px 36px color-mix(in srgb, var(--ink) 20.0%, transparent)}.tenant-modal-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px}.tenant-close{white-space:nowrap}.tenant-choice-row{display:flex;align-items:center;gap:12px;min-height:64px;border:1px solid var(--line);border-radius:8px;padding:10px 12px;margin:8px 0;cursor:pointer}.tenant-choice-row:has(input:checked){border-color:var(--primary);background:var(--primary-bg)}.tenant-choice-row input{width:20px}.tenant-symbol{width:36px;height:36px;border-radius:50%;background:var(--primary-bg);display:grid;place-items:center;font-weight:750}.tenant-actions{margin-top:16px}.tenant-hero{display:flex;justify-content:space-between;gap:18px;align-items:flex-start;flex-wrap:wrap}.tenant-hero .button{margin:0}.tenant-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin-top:18px}.tenant-receipts{list-style:none;margin:0;padding:0}.tenant-receipts li{border-top:1px solid var(--line);padding:12px 0}.tenant-receipts a{font-weight:700;text-decoration:none}.tenant-number{font-variant-numeric:tabular-nums}.tenant-count{font-size:32px;font-weight:750;line-height:1.1}.tenant-detail{position:fixed;right:0;top:60px;bottom:0;width:min(430px,100%);z-index:2;overflow:auto;border-radius:10px 0 0 10px;box-shadow:-8px 0 28px color-mix(in srgb, var(--ink) 13.3%, transparent)}.tenant-state{max-width:650px;margin:30px auto}.tenant-state .button{margin-top:8px}.tenant-error{border-left:3px solid var(--bad);background:var(--bad-bg);padding:14px;margin:14px 0}.tenant-readonly{font-size:12px;color:var(--muted);border:1px solid var(--line);border-radius:20px;padding:5px 9px}.tenant-muted{color:var(--muted)}
  @media(max-width:720px){.tenant-menu-label{display:none}.tenant-menu summary{width:44px;padding:8px}.tenant-shell{padding:0 14px}.tenant-bar{gap:8px;min-height:58px}.tenant-brand{font-size:16px}.tenant-brand-full{display:none}.tenant-brand-short{display:inline}.tenant-tools{gap:2px}.tenant-language summary{min-width:56px}.tenant-switch{max-width:130px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tenant-signout{font-size:0;width:44px}.tenant-signout .ic{margin:0}.tenant-main{padding:20px 14px}.tenant-foot{padding:12px 14px}.tenant-grid{grid-template-columns:1fr}.tenant-modal{margin:0;position:fixed;left:0;right:0;bottom:0;max-height:88vh;overflow:auto;border-radius:14px 14px 0 0}.tenant-detail{top:auto;left:0;bottom:0;width:100%;max-height:80vh;margin:0;border-radius:14px 14px 0 0}}

/* Shared interaction primitives. Feature sheets only arrange these components. */
:where(.office-app) .button{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;min-width:44px;padding:10px 14px;border:1px solid var(--line);border-radius:var(--radius-control);background:var(--card);color:var(--ink);font:600 14px/1.3 var(--font-sans);text-decoration:none;cursor:pointer;box-shadow:none;text-align:center}
:where(.office-app) .button.primary{background:var(--primary);border-color:var(--primary);color:var(--card)}
:where(.office-app) .button.danger{color:var(--bad)}
:where(.office-app) .button:disabled{opacity:.5;cursor:not-allowed}
:where(.office-app) .card{background:var(--card);border:1px solid var(--line);border-radius:var(--radius-card);box-shadow:var(--shadow-card);min-width:0}
.tabs{display:flex;flex-wrap:wrap;gap:4px;padding:4px;margin:0 0 16px;background:var(--muted-bg);border:1px solid var(--line);border-radius:var(--radius-menu)}
.tabs>a{display:flex;align-items:center;justify-content:center;min-height:44px;min-width:44px;flex:1;padding:8px 12px;border-radius:var(--radius-control);color:var(--muted);font-size:14px;font-weight:600;text-decoration:none;text-align:center}
.tabs>a[aria-current],.tabs>a.active{background:var(--primary);color:var(--card)}
.tabs>a[aria-current] small{color:inherit}
.pill.green,.pill.Issued,.pill.Paid{background:var(--ok-bg);color:var(--ok)}
.pill.amber,.pill.Prepared,.pill.PartiallyPaid,.pill.merged{background:var(--warn-bg);color:var(--warn)}
.pill.red,.pill.Void{background:var(--bad-bg);color:var(--bad)}
.pill.neutral{background:var(--muted-bg);color:var(--muted)}
.chip,.chips a,.filter-chips a{display:inline-flex;align-items:center;justify-content:center;min-height:44px;min-width:44px}
.quick-links{display:flex;flex-wrap:wrap;align-items:center;gap:4px 24px;margin:14px 0 12px;padding-top:10px;border-top:1px solid var(--line)}
.quick-links>a,.agent-nav>a{display:inline-flex;align-items:center;gap:6px;min-height:44px;text-decoration:none;font-weight:600}
:where(.master-detail){display:grid;grid-template-columns:minmax(240px,1fr) minmax(0,2fr);flex:1;min-height:0;gap:16px}
.master-pane,.detail-pane{display:flex;flex-direction:column;min-width:0;min-height:0;overflow:hidden}
.pane-head,.pane-foot{flex:none;padding:16px;border-bottom:1px solid var(--line)}
.pane-foot{border-bottom:0;border-top:1px solid var(--line)}
.pane-scroll{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;padding:16px}
.sample-workspace{height:420px;margin-bottom:24px}.sample-workspace .card{margin:0;padding:0}
.sample-sheet>summary{min-height:44px;display:flex;align-items:center;cursor:pointer;padding:12px 16px;border:1px solid var(--line);border-radius:var(--radius-control)}
.sample-sheet[open]{position:fixed;inset:14dvh 0 0;z-index:60;background:var(--card);border:1px solid var(--line);border-radius:var(--radius-sheet) var(--radius-sheet) 0 0;box-shadow:var(--shadow-sheet);overflow:auto;padding:12px}
.sample-sheet[open]>summary{position:sticky;top:0;background:var(--card)}
body:has(.sample-sheet[open])>.office-rail,body:has(.sample-sheet[open])>.office-app-header,body:has(.sample-sheet[open])>.office-mobile-menu,body:has(.sample-sheet[open])>.skip,body:has(.sample-sheet[open])>.office-main>*:not(.sample-sheet),body:has(.sample-sheet[open])>.office-foot{visibility:hidden}
@media(max-width:720px){:where(.master-detail){grid-template-columns:minmax(0,1fr)}.sample-workspace .detail-pane{display:none}.tabs{gap:4px}.tabs>a{padding:8px;font-size:13px}}

/* office-shipping — shared semantic appearance */
:where(.w3-main) .pagehead p{color:var(--muted);font-size:13px;}
:where(.w3-main) .pagehead .eyebrow{font-size:11px;color:var(--muted);}
:where(.w3-main) .dirhead{border-bottom:1px solid var(--muted-bg);}
:where(.w3-main) .search{border:1px solid var(--line);border-radius:7px;color:var(--muted);}
:where(.w3-main) .search input{border:0;font-size:12px;background:none;}
:where(.w3-main) .filter>summary{list-style:none;}
:where(.w3-main) .filterpanel{background:var(--card);border:1px solid var(--line);box-shadow:0 8px 24px color-mix(in srgb, var(--ink) 12.5%, transparent);border-radius:8px;}
:where(.w3-main) .field{font-size:12px;}
:where(.w3-main) .field input,:where(.w3-main) .field select,:where(.w3-main) .field textarea{border:1px solid var(--line);border-radius:7px;background:var(--card);color:var(--ink);}
:where(.w3-main) .field small{font-size:11px;}
:where(.w3-main) .shiprow{border-bottom:1px solid var(--muted-bg);color:var(--ink);}
:where(.w3-main) .shiprow.selected{background:var(--primary-bg);border-left:2px solid var(--primary);border-radius:7px;}
:where(.w3-main) .rowtitle strong{font-size:13px;}
:where(.w3-main) .shiprow p{font-size:12px;color:var(--muted);}
:where(.w3-main) .shiprow small{font-size:10px;}
:where(.w3-main) .pager{border-top:1px solid var(--muted-bg);font-size:11px;color:var(--muted);}
:where(.w3-main) .detailtop{border-bottom:1px solid var(--muted-bg);}
:where(.w3-main) .detailtop .route{font-size:12px;color:var(--muted);}
:where(.w3-main) .metric{border:1px solid var(--muted-bg);border-radius:9px;}
:where(.w3-main) .metric strong{font-size:23px;letter-spacing:-.6px;font-variant-numeric:tabular-nums;}
:where(.w3-main) .metric small{font-size:11px;}
:where(.w3-main) .sectionhead a{font-size:12px;}
:where(.w3-main) .loadline{border-top:1px solid var(--muted-bg);}
:where(.w3-main) .loadline:first-child{border-top:0;}
:where(.w3-main) .loadheading strong{font-size:13px;}
:where(.w3-main) .loadheading p{font-size:12px;color:var(--muted);}
:where(.w3-main) .goods{font-size:13px;}
:where(.w3-main) .goods .translation{color:var(--muted);}
:where(.w3-main) .qtymain strong{font-size:20px;font-variant-numeric:tabular-nums;color:var(--ink);}
:where(.w3-main) .qtymain small{font-size:10px;}
:where(.w3-main) .receiptmetrics{border:1px solid var(--muted-bg);border-radius:7px;}
:where(.w3-main) .receiptmetrics>div{border-right:1px solid var(--muted-bg);}
:where(.w3-main) .receiptmetrics>div:last-child{border:0;}
:where(.w3-main) .receiptmetrics small{font-size:10px;}
:where(.w3-main) .receiptmetrics strong{font-size:14px;font-variant-numeric:tabular-nums;}
:where(.w3-main) .loadmeta{font-size:11px;color:var(--muted);}
:where(.w3-main) .notice{background:var(--primary-bg);color:var(--muted);border:1px solid var(--line);border-radius:8px;font-size:12px;line-height:1.6;}
:where(.w3-main) .notice.amber{background:var(--bad-bg);border-color:var(--warn-bg);color:var(--warn);}
:where(.w3-main) .source{border:1px solid var(--muted-bg);border-radius:8px;}
:where(.w3-main) .source summary{cursor:pointer;font-size:12px;font-weight:600;}
:where(.w3-main) .source>div{font-size:12px;color:var(--muted);}
:where(.w3-main) .facts dt{font-size:11px;color:var(--muted);}
:where(.w3-main) .facts dd{font-size:12px;}
:where(.w3-main) .detailfooter{border-top:1px solid var(--muted-bg);background:var(--card);}
:where(.w3-main) .detailfooter small{font-size:10px;}
:where(.w3-main) .panelhead h2{font-size:19px;}
:where(.w3-main) .view .intro{font-size:13px;color:var(--muted);}
:where(.w3-main) .option{border:1px solid var(--line);border-radius:7px;font-size:13px;cursor:pointer;}
:where(.w3-main) .option:has(input:checked){background:var(--primary-bg);border-color:var(--line);}
:where(.w3-main) .option input{accent-color:var(--primary);}
:where(.w3-main) .packingdoc{border:1px solid var(--line);background:var(--card);font-size:12px;border-radius:3px;}
:where(.w3-main) .packingdoc h3{font-size:17px;}
:where(.w3-main) .packingdoc .packhead{font-size:10px;color:var(--muted);}
:where(.w3-main) .packrow{border-bottom:1px solid var(--ok-bg);font-size:11px;}
:where(.w3-main) .packrow>span:not(:first-child){font-variant-numeric:tabular-nums;}
:where(.w3-main) .packrow.title{font-weight:600;color:var(--muted);}
:where(.w3-main) .packrow small{font-size:10px;}
:where(.w3-main) .packrow.total{font-weight:700;border-top:2px solid var(--ink);border-bottom:0;}
:where(.w3-main) .delta>div{border:1px solid var(--line);border-radius:8px;}
:where(.w3-main) .auditentry{border-left:2px solid var(--primary);background:var(--bg);font-size:13px;}
:where(.w3-main) .auditentry time{font-size:11px;color:var(--muted);}
:where(.w3-main) .statepane p{color:var(--muted);font-size:13px;}
:where(.w3-main) .statepane>.ic{color:var(--muted);}
.w3-main .sheetbackdrop{display:none;}
:where(.w3-main) .caption{font-size:11px;color:var(--muted);}
:where(.w3-main) .receiptcard h2{font-size:14px;}
:where(.w3-main) .receiptid{font-size:22px;font-weight:650;letter-spacing:-.4px;}
:where(.w3-main) .receiptcard .customername{font-size:14px;}
:where(.w3-main) .receiptcard .facts{border-top:1px solid var(--muted-bg);}
:where(.w3-main) .labelstate{border-top:1px solid var(--muted-bg);}
:where(.w3-main) .labelstate p{font-size:12px;color:var(--muted);}
:where(.w3-main) .labelstage{background:var(--bg);border:1px solid var(--muted-bg);border-radius:10px;}
:where(.w3-main) .paper{background:var(--card);color:var(--ink);border:1px solid var(--ink);line-height:1.2;}
:where(.w3-main) .paperbrand{font-size:13px;font-weight:750;border-bottom:1px solid var(--ink);}
:where(.w3-main) .paper small{font-size:9px;color:var(--ink);}
:where(.w3-main) .paper .client{font-size:21px;font-weight:750;}
:where(.w3-main) .paper .dest{font-size:18px;font-weight:750;}
:where(.w3-main) .paper .labelfacts{font-size:13px;border-bottom:1px solid var(--ink);}
:where(.w3-main) .paper .code{font:8px/1.3 var(--font-mono);}
:where(.w3-main) .labelstage .paper{box-shadow:0 3px 12px color-mix(in srgb, var(--ink) 8.2%, transparent);}
:where(.w3-main) .labelcontrols{font-size:12px;}
:where(.w3-main) .sheetlabels .paper .client{font-size:18px;}
:where(.w3-main) .sheetlabels .paper .dest{font-size:16px;}
:where(.w3-main) .rulesnote{font-size:11px;color:var(--muted);}
:where(.w3-main) .flow-note{font-size:11px;color:var(--muted);}
:where(.w3-main) .skeleton{border-radius:4px;background:var(--muted-bg);}
@media (max-width:720px){:where(.w3-main) .pagehead h1{font-size:24px;}
:where(.w3-main) .pagehead p{font-size:12px;}
:where(.w3-main).has-detail .sheetbackdrop{display:block;}
:where(.w3-main) .detailtop h2{font-size:20px;}
:where(.w3-main) .metric strong{font-size:20px;}
:where(.w3-main) .metric small{font-size:10px;}
:where(.w3-main) .notice{font-size:11px;}
:where(.w3-main) .sheetclose{color:var(--muted);font-size:12px;}
.w3-main .sheetbackdrop{position:absolute;inset:64px 0 0;background:color-mix(in srgb, var(--ink) 37.6%, transparent);z-index:25;}
.w3-main .sheetdetail{position:absolute;inset:104px 0 0;z-index:30;border-radius:16px 16px 0 0;border-width:1px 0 0;box-shadow:0 -8px 28px color-mix(in srgb, var(--ink) 14.5%, transparent);}
.w3-main .sheetdetail:before{content:"";position:absolute;top:6px;left:calc(50% - 18px);width:36px;height:4px;border-radius:4px;background:var(--line);}
.w3-main .sheetdetail .detailtop{padding-top:17px;}
.w3-main .sheetdetail .detailtop .sheetclose{display:flex;justify-content:flex-end;}
:where(.w3-main) .packrow{font-size:10px;}
:where(.w3-main) .packrow small{font-size:9px;}}



:where(.w3-main) .errorbox{background:var(--warn-bg);border:1px solid var(--warn-bg);border-radius:8px;}
:where(.w3-main) .metric strong{font-size:clamp(15px,2vw,23px);}
:where(.w3-main) .summary-actions{font-size:12px;}
:where(.w3-main) .paper .labelfacts{font-size:11px;}
:where(.w3-main) .paperbrand{font-size:11px;}
:where(.w3-main) .paper .dest{font-size:16px;}
:where(.w3-main) .paper .code{font-size:8px;}
:where(.w3-main) .form-error{color:var(--bad);}
@media (max-width:720px){.w3-main .sheetdetail{position:fixed;inset:auto 0 0;height:86dvh;max-height:86dvh;margin:0;}
.w3-main .sheetbackdrop{position:fixed;}
:where(.w3-main) .metric strong{font-size:18px;}
}
@media print{
:where(.w3-main) .office-app-header,:where(.w3-main) .skip,:where(.w3-main) .pagehead,:where(.w3-main) .receiptcard,:where(.w3-main) .detailtop,:where(.w3-main) .detailfooter,:where(.w3-main) .notice,:where(.w3-main) .caption,:where(.w3-main) .labelmeta,.w3-main .sheetbackdrop,:where(.w3-main) .labelcontrols,:where(.w3-main) .pager{display:none!important;}
.w3-main,:where(.w3-main) .workspace,:where(.w3-main) .detail,:where(.w3-main) .scroll{border:0!important;box-shadow:none!important;}
:where(.w3-main) .labelstage{background:var(--card);border:0;}
:where(.w3-main) .paper{border:0!important;box-shadow:none!important;}
:where(.w3-main) .paper .code{font-size:8px!important;}}
:where(.w3-main) .search-submit{border:0;}

/* office-finance — shared semantic appearance */
.finance-page{background:var(--bg);color:var(--ink);}

.finance-page h1{font-size:28px;letter-spacing:-.6px;}
.finance-page h2{font-size:18px;}
.finance-page h3{font-size:14px;}
.finance-main a{color:var(--primary);text-decoration:none;}
.finance-page button,.finance-page input,.finance-page select,.finance-page textarea{font:inherit;}
.finance-page input,.finance-page select,.finance-page textarea{border:1px solid var(--line);border-radius:7px;background:var(--card);color:var(--ink);}
.finance-page input[type=checkbox],.finance-page input[type=radio]{accent-color:var(--primary);}
.finance-page label{font-size:12px;}
.finance-page small,.finance-page .muted{color:var(--muted);font-size:12px;}
.finance-page :focus-visible{outline:3px solid var(--line);outline-offset:3px;}
.finance-page .pagehead p{color:var(--muted);font-size:13px;}
.finance-page .currency-context{color:var(--muted);font-size:12px;}
.finance-page .metric{background:var(--bg);border:1px solid var(--line);border-radius:9px;}
.finance-page .metric strong{font-size:21px;font-variant-numeric:tabular-nums;}
.finance-page .metric small{font-size:11px;}
.finance-page .row{border-bottom:1px solid var(--muted-bg);}
.finance-page .row:last-child{border-bottom:0;}
.finance-page .amount{font-variant-numeric:tabular-nums;}
.finance-page .notice{background:var(--primary-bg);border:1px solid var(--line);border-radius:8px;font-size:13px;color:var(--muted);}
.finance-page .notice.error{background:var(--bad-bg);border-color:var(--warn-bg);color:var(--bad);}
.finance-page .notice.warning{background:var(--bad-bg);border-color:var(--warn-bg);color:var(--warn);}
.finance-page .total{background:var(--primary-bg);border-radius:7px;font-weight:650;}
.finance-page .history{border-top:1px solid var(--ok-bg);}
.finance-page summary{cursor:pointer;}
.finance-page .empty{color:var(--muted);}
.finance-page .empty h2{color:var(--ink);}
.finance-page .goods{font-size:12px;color:var(--muted);}
.finance-page .rate-row{border:1px solid var(--line);border-radius:8px;}
.finance-page .rate-row legend{font-weight:600;}
.finance-page .allocation{border-bottom:1px solid var(--ok-bg);}
.finance-page .finance-backdrop{background:color-mix(in srgb, var(--ink) 33.3%, transparent);}
.finance-page .finance-dialog{position:fixed;z-index:41;top:50%;left:50%;transform:translate(-50%,-50%);width:min(780px,calc(100% - 48px));max-height:calc(100dvh - 64px);display:flex;flex-direction:column;background:var(--card);border-radius:14px;box-shadow:0 24px 80px color-mix(in srgb, var(--ink) 27.1%, transparent);overflow:hidden;}
.finance-page .dialog-head{border-bottom:1px solid var(--ok-bg);}
.finance-page .dialog-body .card{border:0;padding:0;}
.finance-page .customer-option{border-bottom:1px solid var(--ok-bg);}
.finance-page .customer-option:hover{background:var(--primary-bg);}
.finance-page .skip:focus{background:var(--card);}
.finance-page table{border-collapse:collapse;font-size:12px;}
.finance-page td,.finance-page th{border-bottom:1px solid var(--ok-bg);}
.finance-page .audit-pair>div{background:var(--bg);border-radius:8px;}
@media (max-width:720px){.finance-page h1{font-size:24px;}
.finance-page .pagehead p{font-size:12px;}
.finance-page .pagehead>.button{font-size:12px;}
.finance-page .metric strong{font-size:19px;}
.finance-page .finance-dialog{inset:64px 0 0;transform:none;width:100%;max-height:none;border-radius:16px 16px 0 0;}
.finance-page .dialog-head h2{font-size:17px;}
.finance-page .total{font-size:13px;}}

/* customers — shared semantic appearance */
.customer-shell{background:var(--bg);color:var(--ink);}
.customer-actions-menu>div{background:var(--card);border:1px solid var(--line);border-radius:8px;box-shadow:0 8px 24px color-mix(in srgb, var(--ink) 12.5%, transparent);}
.customer-actions-menu a{text-decoration:none;color:var(--ok);font:inherit;font-size:13px;border:0;background:none;}
.customer-head h1{font-size:28px;line-height:1.2;letter-spacing:-.6px;}
.customer-head p{font-size:14px;color:var(--muted);}
.customer-head .button{padding:12px 20px;gap:8px;}
.customer-directory,.customer-profile-pane{background:var(--card);border:1px solid var(--muted-bg);border-radius:12px;box-shadow:0 4px 24px color-mix(in srgb, var(--ink) 1.2%, transparent);}
.customer-search-box{border:1px solid var(--line);border-radius:7px;}
.customer-search-box>button{background:none;border:0;color:var(--muted);cursor:pointer;}
.customer-search-box input{border:0!important;box-shadow:none!important;background:transparent;font-size:12px;outline-offset:-3px;}
.customer-search-box input::placeholder{color:var(--muted);}
.customer-filter>summary{border:1px solid var(--line);border-radius:7px;color:var(--muted);cursor:pointer;list-style:none;}
.customer-filter>form{background:var(--card);border:1px solid var(--line);border-radius:8px;box-shadow:0 6px 22px color-mix(in srgb, var(--ink) 9.4%, transparent);}
.customer-filter .field{font-size:12px;}
.customer-list-row{border-bottom:1px solid var(--muted-bg);color:var(--ink);text-decoration:none;}
.customer-list-row.selected{background:var(--primary-bg);border:1px solid transparent;border-left:2px solid var(--primary);border-radius:7px;}
.customer-avatar{border-radius:50%;background:var(--line);color:var(--ink);font-size:19px;font-weight:600;}
.customer-list-row:nth-child(even) .customer-avatar{background:var(--muted-bg);}
.customer-list-name{font-size:12px;color:var(--muted);line-height:1.35;}
.customer-list-name>strong{font-size:13px;color:var(--ink);}
.customer-list-stock{font-size:12px;font-variant-numeric:tabular-nums;}
.customer-list-stock strong{font-weight:500;}
.customer-list-row>.ic{color:var(--muted);}
.customer-list-row.selected>.ic{color:var(--primary);}
.customer-pager{display:flex;align-items:center;justify-content:space-between;gap:12px;color:var(--muted);font-size:12px;padding:14px 5px 2px;flex:none;}
.customer-pager>span:last-child{display:flex;}
.customer-pager a{display:inline-flex;align-items:center;justify-content:center;min-width:40px;min-height:44px;text-decoration:none;}
.customer-profile-heading{border-bottom:1px solid var(--muted-bg);}
.customer-profile-heading>.customer-avatar{font-size:26px;background:var(--line);}
.customer-profile-heading h2{font-size:21px;line-height:1.2;}
.customer-profile-heading p{font-size:13px;color:var(--muted);}
.customer-status{font-size:11px;line-height:1.5;border-radius:16px;background:var(--ok-bg);color:var(--muted);}
.customer-status.merged{background:var(--muted-bg);color:var(--muted);}
.customer-actions-menu>summary{font-size:12px;border:1px solid var(--line);border-radius:7px;cursor:pointer;list-style:none;}
.customer-profile-facts{font-size:12px;}
.customer-profile-facts dt{color:var(--muted);}
.customer-profile-facts dd{color:var(--ink);font-size:12px;line-height:1.4;}
.customer-stock-card{display:flex;gap:12px;padding:15px 12px;min-width:0;}
.customer-stock-icon{background:var(--primary-bg);border-radius:50%;color:var(--primary);}
.customer-stock-card:last-child .customer-stock-icon{background:var(--muted-bg);color:var(--ink);}
.customer-stock-card>div{min-width:0;flex:1;}
.customer-stock-card h3{font-size:11px;font-weight:400;color:var(--muted);line-height:1.4;min-height:30px;margin:0 0 7px;}
.customer-stock-card strong,.customer-stock-card div>span{display:block;font-size:18px;font-variant-numeric:tabular-nums;line-height:1.4;overflow-wrap:anywhere;}
.customer-stock-card strong{font-weight:700;}
.customer-tab-panel>h3{font-size:14px;}
.customer-goods-heading h3{font-size:13px;}
.customer-goods-heading p{font-size:10px;color:var(--muted);}
.customer-goods-table{border:1px solid var(--muted-bg);border-radius:8px;}
.customer-goods-row{border-bottom:1px solid var(--muted-bg);text-decoration:none;color:var(--ink);font-size:12px;}
.customer-goods-row:last-child{border-bottom:0;}
.customer-goods-row>strong{font-size:13px;font-weight:650;}
.customer-translated{color:var(--muted);}
.customer-translated small{font-size:10px;color:var(--muted);}
.customer-goods-quantity,.customer-goods-volume{font-variant-numeric:tabular-nums;}
.customer-goods-volume{color:var(--muted);}
.customer-receipt-action{color:var(--primary);font-size:11px;}
.customer-table-empty{color:var(--muted);font-size:13px;}
.customer-evidence{border:1px solid var(--muted-bg);border-radius:8px;}
.customer-evidence>summary{font-size:13px;font-weight:650;cursor:pointer;list-style:none;}
.customer-evidence>summary>span{font-weight:400;color:var(--muted);}
.customer-evidence>summary>.ic{color:var(--muted);}
.customer-evidence a{font-size:12px;text-decoration:none;border-top:1px solid var(--muted-bg);}
.customer-evidence p{font-size:12px;color:var(--muted);}
.customer-load-row{border-bottom:1px solid var(--muted-bg);text-decoration:none;font-size:13px;}
.customer-load-row small{color:var(--muted);}
.customer-audit{font-size:12px;border-bottom:1px solid var(--muted-bg);}
.customer-audit>span,.customer-audit>p{color:var(--muted);}
.customer-audit time{font-size:11px;color:var(--muted);}
.customer-profile-close.customer-icon-button,.customer-sheet-handle,.customer-profile-footer,.customer-new-mobile{display:none;}
.customer-notice{border:1px solid var(--line);border-radius:8px;background:var(--primary-bg);font-size:13px;}
.customer-notice[role=alert]{background:var(--bad-bg);border-color:var(--line);}
.customer-empty{color:var(--muted);font-size:13px;}
.customer-empty h2{font-size:16px;color:var(--ink);}
.customer-empty p{line-height:1.6;}
.customer-empty>.button{margin-top:12px;}
.customer-card{padding:20px;margin-bottom:16px;overflow-wrap:anywhere;}
.customer-card h2{font-size:16px;margin:0 0 18px;}
.customer-card p{font-size:13px;}
.customer-facts>div{border-bottom:1px solid var(--muted-bg);font-size:13px;}
.customer-facts dt{color:var(--muted);}
.customer-notes{font-size:13px;}
.customer-form-grid .field{font-size:13px;}
.customer-alias{border-bottom:1px solid var(--muted-bg);font-size:13px;}
.customer-sheet-bar{display:flex;align-items:center;justify-content:space-between;gap:12px;max-width:900px;margin:0 auto 14px;}
.customer-sheet-bar h2{font-size:19px;margin:0;}
.customer-sheet-body{max-width:900px;width:100%;margin:0 auto;}
.customer-icon-button{border-radius:50%;background:var(--muted-bg);color:var(--muted);text-decoration:none;}
.customer-warning{border-left:3px solid var(--warn);background:var(--warn-bg);color:var(--warn);font-size:13px;}
.customer-choice{border:1px solid var(--line);border-radius:8px;font-size:13px;}
.customer-choice:has(input:checked){background:var(--primary-bg);border-color:var(--line);}
.customer-choices{border:0;}
.customer-meta{font-size:12px;color:var(--muted);}
.customer-statement-row{border-bottom:1px solid var(--muted-bg);}
.customer-row-head{font-size:13px;}
.customer-goods{font-size:14px;}
.customer-goods .translation{color:var(--muted);}
@media (min-width:721px) and (max-width:1200px){.customer-profile-heading>.customer-avatar{font-size:23px;}
.customer-profile-facts dt,.customer-profile-facts dd{font-size:11px;}
.customer-stock-card{padding:12px 8px;gap:8px;}
.customer-stock-card strong,.customer-stock-card div>span{font-size:16px;}
.customer-goods-row{font-size:11px;}
.customer-list-row .customer-avatar{font-size:16px;}
.customer-list-name{font-size:11px;}
.customer-list-name>strong{font-size:12px;}
.customer-list-stock{font-size:11px;}}
@media (max-width:720px){.customer-head h1{font-size:23px;}
.customer-directory{border:0;border-radius:0;background:transparent;box-shadow:none;}
.customer-search-box{background:var(--card);}
.customer-search-box input{font-size:12px;}
.customer-filter>summary{background:var(--card);}
.customer-list-row .customer-avatar{font-size:15px;}
.customer-list-name{font-size:10px;}
.customer-list-name>strong{font-size:12px;}
.customer-list-stock{font-size:11px;}
.customer-pager{padding:8px 4px 0;font-size:11px;}
.customer-backdrop{background:color-mix(in srgb, var(--ink) 37.6%, transparent);}
.customer-sheet.is-open,.customer-sheet.customer-full{position:fixed;left:0;right:0;bottom:0;height:65dvh;max-height:88dvh;margin:0;background:var(--card);z-index:21;border:0;border-radius:24px 24px 0 0;box-shadow:0 -8px 35px color-mix(in srgb, var(--ink) 14.5%, transparent);display:flex;flex-direction:column;overflow:hidden;}
.customer-sheet-handle{display:block;position:absolute;top:11px;left:calc(50% - 24px);height:5px;width:48px;border-radius:4px;background:var(--line);z-index:2;}
.customer-profile-heading>.customer-avatar{font-size:22px;}
.customer-profile-heading h2{font-size:18px;}
.customer-profile-heading p{font-size:11px;line-height:1.4;}
.customer-status{font-size:10px;}
.customer-profile-facts{font-size:11px;}
.customer-profile-facts dt{font-size:11px;}
.customer-profile-facts dd{font-size:12px;}
.customer-stock-card{padding:8px 5px;gap:5px;align-items:center;}
.customer-stock-card h3{position:absolute;width:1px;height:1px;min-height:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;}
.customer-stock-card strong,.customer-stock-card div>span{font-size:10px;line-height:1.5;white-space:nowrap;}
.customer-stock-card strong{font-weight:600;}
.customer-stock-card div>span{color:var(--muted);}
.customer-goods-table{border:0;border-radius:0;}
.customer-goods-row{font-size:11px;}
.customer-goods-row>strong{font-size:12px;}
.customer-translated{line-height:1.4;}
.customer-goods-quantity{font-size:11px;color:var(--muted);}
.customer-goods-volume{font-size:11px;}
.customer-evidence{border:0;border-top:1px solid var(--muted-bg);border-radius:0;}
.customer-evidence>summary{font-size:12px;}
.customer-profile-footer{border-top:1px solid var(--muted-bg);background:var(--card);}
.customer-profile-footer .button{width:100%;display:flex;align-items:center;justify-content:center;gap:8px;min-height:44px;}
.customer-sheet-bar{margin:0;padding:18px 16px 12px;width:100%;border-bottom:1px solid var(--muted-bg);flex:none;}
.customer-sheet-bar h2{font-size:18px;}
.customer-sheet-body{overflow:auto;min-height:0;padding:15px;}
.customer-card{padding:16px;}
.customer-notice{font-size:12px;}
.customer-audit{font-size:11px;}
.customer-load-row{font-size:12px;}}
@media (max-width:720px){.customer-mobile-actions a{font-size:12px;}}
@media (max-width:720px){.customer-goods-values{color:var(--muted);}
.customer-stock-card strong,.customer-stock-card div>span{font-size:11px;}
.customer-translated{font-size:12px;}}
@media (min-width:1201px){.customer-head h1{font-size:30px;}
.customer-head p{font-size:16px;}
.customer-head .button{font-size:15px;}
.customer-list-name{font-size:14px;}
.customer-list-name>strong{font-size:15px;}
.customer-list-stock{font-size:14px;}
.customer-profile-heading p{font-size:16px;}
.customer-profile-heading h2{font-size:23px;}
.customer-status{font-size:12px;}
.customer-profile-facts dt,.customer-profile-facts dd{font-size:14px;}
.customer-stock-card h3{font-size:13px;min-height:24px;}
.customer-stock-card strong,.customer-stock-card div>span{font-size:21px;}
.customer-stock-card{padding:16px 14px;}
.customer-goods-heading h3{font-size:15px;}
.customer-goods-heading p{font-size:11px;}
.customer-goods-row{font-size:14px;}
.customer-goods-row>strong{font-size:15px;}
.customer-receipt-action{font-size:12px;}
.customer-evidence>summary{font-size:15px;}}
.customer-shell :focus{outline:none;}
.customer-shell :focus-visible{outline:2px solid var(--muted);outline-offset:3px;}
.customer-shell input:focus,.customer-shell select:focus,.customer-shell textarea:focus{border-color:var(--line);box-shadow:none;}
@media (min-width:721px){.customer-dialog-backdrop{display:block;position:fixed;inset:0;background:color-mix(in srgb, var(--ink) 37.6%, transparent);z-index:20;}
.customer-sheet.customer-dialog{position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);width:min(900px,calc(100vw - 48px));max-height:calc(100dvh - 64px);margin:0;background:var(--card);border:1px solid var(--ok-bg);border-radius:16px;box-shadow:0 24px 80px color-mix(in srgb, var(--ink) 20.0%, transparent);z-index:21;display:flex;flex-direction:column;overflow:hidden;}
.customer-dialog .customer-sheet-bar{width:100%;margin:0;padding:18px 24px;border-bottom:1px solid var(--muted-bg);flex:none;}
.customer-dialog .customer-sheet-body{overflow:auto;min-height:0;padding:20px 24px;overscroll-behavior:contain;}
.customer-dialog .customer-sheet-body>.customer-card{margin:0;}}
.customer-agent-badge{font-size:12px;font-weight:600;color:var(--primary);background:var(--primary-bg);border-radius:5px;}

/* dashboard — shared semantic appearance */
.dashboard-shell{background:var(--bg);}
.dashboard-head{background:linear-gradient(110deg,var(--bg),var(--bg));border-bottom:1px solid var(--line);}
.dashboard-head h1{font-size:28px;line-height:1.2;letter-spacing:-.7px;}
.dashboard-head p{font-size:14px;color:var(--muted);}
.dashboard-card{padding:20px;margin-bottom:20px;overflow-wrap:anywhere;}
.dashboard-metric p{font-size:12px;color:var(--muted);}
.dashboard-metric strong{font-size:28px;line-height:1.2;font-variant-numeric:tabular-nums;}
.dashboard-icon{background:var(--primary-bg);color:var(--primary);border-radius:10px;}
.dashboard-card h2{display:flex;align-items:center;gap:9px;font-size:16px;margin:0;}
.dashboard-card-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;border-bottom:1px solid var(--muted-bg);padding-bottom:14px;margin-bottom:14px;}
.dashboard-card-heading .ic{color:var(--primary);}
.dashboard-card-heading a{font-size:12px;min-height:44px;display:flex;align-items:center;}
.dashboard-priority>b{font-size:40px;font-variant-numeric:tabular-nums;white-space:nowrap;flex:none;}
.dashboard-priority h3{font-size:16px;}
.dashboard-priority p{font-size:13px;color:var(--muted);}
.dashboard-grid>.dashboard-card{min-width:0;padding:16px;}
.dashboard-grid .dashboard-card-heading{display:block;}
.dashboard-grid h2{font-size:15px;}
.dashboard-meta{font-size:12px;color:var(--muted);}
.dashboard-goods{font-size:14px;}
.dashboard-goods .translation{color:var(--muted);}
.dashboard-facts>div{font-size:12px;border-bottom:1px solid var(--muted-bg);}
.dashboard-facts dt{color:var(--muted);}
.dashboard-device{border:1px solid var(--line);border-radius:9px;}
.dashboard-device b{font-size:13px;}
.dashboard-device p{font-size:12px;}
.dashboard-check{border-bottom:1px solid var(--muted-bg);font-size:12px;}
.dashboard-check .ic{color:var(--primary);}
.dashboard-notice{border:1px solid var(--line);background:var(--primary-bg);border-radius:8px;font-size:13px;}
.dashboard-error{background:var(--bad-bg);border-color:var(--line);}
.dashboard-tabs{display:none;}
.tenant-file-tabs,.tenant-file-periods{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:12px;}

.tenant-file-row{background:var(--card);border:1px solid var(--line);border-radius:12px;}
.tenant-file-row img{background:var(--ok-bg);border-radius:6px;}
.tenant-file-row h2{font-size:14px;}
.tenant-file-row p{font-size:12px;color:var(--muted);}
.tenant-file-pager{font-size:12px;}
.tenant-file-error{color:var(--muted);background:var(--ok-bg);}
@media (max-width:720px){.dashboard-shell .tenant-switch{font-size:11px;}
.dashboard-head h1{font-size:25px;}
.dashboard-head p{font-size:13px;}
.dashboard-head>.button{width:100%;margin-top:16px;}
.dashboard-card{padding:16px;margin-bottom:16px;}
.dashboard-metrics .dashboard-card{margin-bottom:0;}
.dashboard-grid .dashboard-card-heading{display:flex;}
.dashboard-tabs{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));background:var(--card);border-top:1px solid var(--line);padding:5px 6px max(6px,env(safe-area-inset-bottom));flex:none;}
.dashboard-tabs a{min-height:50px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;font-size:10px;color:var(--muted);text-decoration:none;}
.dashboard-tabs a[aria-current]{background:var(--primary-bg);border-radius:8px;color:var(--primary);}
.tenant-file-toolbar input{font-size:13px;}
.tenant-file-tabs a,.tenant-file-periods a{font-size:12px;}
.dashboard-priority>b{font-size:34px;}}
.tenant-file-day{font-size:14px;color:var(--muted);}
.tenant-excel-list{border:1px solid var(--line);border-radius:10px;}
.tenant-excel-list .tenant-file-row{border:0;border-bottom:1px solid var(--line);border-radius:0;}
.tenant-excel-list .dashboard-facts>div{border:0;}
.tenant-excel-list .dashboard-facts dt{font-size:11px;}
.tenant-photo-grid .tenant-file-row{border-radius:8px;}
.tenant-photo-grid .tenant-file-row img{border-radius:0;}
.tenant-photo-grid .tenant-file-row h2{font-size:11px;font-weight:400;color:var(--muted);}
.tenant-photo-grid .tenant-file-error{font-size:11px;}
@media (max-width:720px){.tenant-excel-list .tenant-file-row>a{font-size:12px;}
.tenant-excel-list .tenant-file-row h2{font-size:13px;}}
.dashboard-head .dashboard-day{font-size:12px;}
.dashboard-metric .textlink{font-size:13px;text-decoration:none;font-weight:600;}
@media (min-width:721px){.dashboard-shell .receipt-app-name{font-size:13px;font-weight:700;border-left:1px solid var(--line);}
.dashboard-shell .receipt-nav a{font-size:13px;font-weight:600;}
.dashboard-shell .receipt-nav a[aria-current]{border-radius:0;border-bottom:3px solid var(--primary);}}
.tenant-file-filter{border:1px solid var(--line);border-radius:8px;background:var(--card);}
.tenant-file-filter summary{cursor:pointer;font-size:13px;font-weight:600;color:var(--primary);}

/* photo-inbox — shared semantic appearance */
.photo-shell{background:var(--bg);}
.photo-head{background:linear-gradient(110deg,var(--bg),var(--bg));border-bottom:1px solid var(--line);}
.photo-head h1{font-size:28px;line-height:1.2;letter-spacing:-.7px;}
.photo-head p{font-size:14px;color:var(--muted);}
.photo-card{padding:20px;margin-bottom:16px;overflow-wrap:anywhere;}
.photo-card h2{display:flex;align-items:center;gap:10px;font-size:16px;margin:0 0 16px;padding-bottom:14px;border-bottom:1px solid var(--line);}
.photo-card h2 .ic{color:var(--primary);}
.photo-main-image{background:var(--ok-bg);border:1px solid var(--line);border-radius:6px;}
.photo-facts dt{font-size:12px;color:var(--muted);}
.photo-facts dd{font-size:13px;font-weight:600;}
.photo-tile{border:1px solid var(--line);border-radius:8px;}
.photo-tile:has(input:checked){background:var(--primary-bg);border-color:var(--line);}
.photo-tile img{background:var(--ok-bg);border-radius:5px;}
.photo-tile .field{font-size:12px;}
.photo-tile label.check{font-size:12px;}
.photo-hint{font-size:12px;color:var(--muted);}
.photo-receipt{border:1px solid var(--line);border-radius:8px;color:var(--ink);text-decoration:none;}
.photo-receipt:has(input:checked){background:var(--primary-bg);border-color:var(--line);}
.photo-receipt p{font-size:13px;}
.photo-receipt small{font-size:11px;color:var(--muted);}
.photo-pagination{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:8px 24px 14px;flex:none;font-size:12px;}
.photo-pagination a{min-height:44px;}
.photo-notice{border-radius:8px;background:var(--primary-bg);border:1px solid var(--line);font-size:13px;}
.photo-notice[role=alert]{background:var(--bad-bg);border-color:var(--line);}
.photo-empty{background:var(--card);border:1px solid var(--line);border-radius:12px;}
.photo-mobile-open,.photo-sheet-close,.photo-tabs{display:none;}
.photo-audit{font-size:12px;border-bottom:1px solid var(--line);}
@media (max-width:720px){.photo-shell .tenant-switch{font-size:11px;}
.photo-head h1{font-size:25px;}
.photo-head p{font-size:13px;}
.photo-head>.button{display:none;}
.photo-card{padding:16px;}
.photo-pagination{padding:6px 14px;}
.photo-sheet{position:fixed;inset:auto 0 0;z-index:5;max-height:88dvh;height:88dvh;background:var(--bg);border-radius:16px 16px 0 0;box-shadow:0 -8px 30px color-mix(in srgb, var(--ink) 20.0%, transparent);display:flex;flex-direction:column;overflow:hidden;}
.photo-sheet .photo-match-pane{display:block;overflow:auto;min-height:0;padding:14px;flex:1;}
.photo-sheet-close{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 14px;background:var(--card);border-bottom:1px solid var(--line);flex:none;}
.photo-sheet-close h2{font-size:17px;margin:0;}
.photo-backdrop{background:color-mix(in srgb, var(--ink) 25.1%, transparent);}
.photo-tabs{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));background:var(--card);border-top:1px solid var(--line);padding:5px 6px max(6px,env(safe-area-inset-bottom));flex:none;}
.photo-tabs a{min-height:50px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;font-size:10px;color:var(--muted);text-decoration:none;}
.photo-tabs a[aria-current]{color:var(--primary);background:var(--primary-bg);border-radius:8px;}
.photo-search .button{padding:10px;}}
@media (min-width:721px){.photo-desktop-detail,.photo-sheet{min-height:0;display:flex;flex-direction:column;}}
@media (max-width:720px){.photo-desktop-detail{display:none;}}
@media (max-width:720px){.photo-toolbar .textlink{font-size:12px;}
.photo-toolbar .button{padding:10px;}
.photo-toolbar input{font-size:13px;}}
.photo-image-error{background:var(--ok-bg);color:var(--muted);border-radius:6px;}

/* office-arrivals — shared semantic appearance */
:where(.arrival-page) .arrival-list-title{font-size:14px;}
:where(.arrival-page) .arrival-search-submit{border:0;}
.arrival-page .metric strong{font-size:26px;}
.arrival-page .metric small{font-size:11px;}
:where(.arrival-page) .arrival-line{border-top:1px solid var(--muted-bg);}
:where(.arrival-page) .arrival-line .rowtitle strong{font-size:13px;}
:where(.arrival-page) .arrival-line .rowtitle strong a{color:var(--ink);}
:where(.arrival-page) .arrival-line-actions{font-size:11px;}
:where(.arrival-page) .arrival-intro{color:var(--muted);font-size:12px;}
:where(.arrival-page) .arrival-delivery{border-bottom:1px solid var(--muted-bg);}
:where(.arrival-page) .arrival-empty p{color:var(--muted);font-size:12px;}
:where(.arrival-page) .pill.red{background:var(--bad-bg);color:var(--bad);}
:where(.arrival-page) .arrival-close{font-size:12px;}
@media (max-width:720px){.arrival-page .sheetdetail{inset:auto 0 0;height:86dvh;max-height:86dvh;}
.arrival-page .metric strong{font-size:20px;}
.arrival-page .metric small{font-size:10px;}
.arrival-page .sectionhead .button{font-size:11px;}}

/* office-lists — shared semantic appearance */
.office-list-filters .office-filter-chips a,.office-list-filters .receipt-advanced>summary{border-radius:6px;font-size:11px;line-height:1.2;color:var(--muted);text-decoration:none;}
.office-list-filters .office-filter-chips a.active{color:var(--primary);background:var(--primary-bg);font-weight:600;}
.office-list-filters .receipt-advanced>summary{background:var(--primary-bg);color:var(--primary);}
.office-arrival-block{border:1px solid var(--line);border-radius:9px;font-size:13px;}
.office-arrival-block h3{font-size:14px;}
.office-arrival-block small{color:var(--muted);}
.office-arrival-block a{color:var(--primary);}
.office-arrival-block .arrival-block-row{border-bottom:1px solid var(--muted-bg);}
.office-arrival-block .arrival-block-row:last-child{border-bottom:0;}
.receipt-results>.receipt-filters-compact{border-bottom:1px solid var(--line);}
.receipt-search-box{border:1px solid var(--line);border-radius:7px;background:var(--card);}
.receipt-search-box>button{background:none;border:0;color:var(--muted);cursor:pointer;}
.receipt-search-box input{border:0!important;box-shadow:none!important;background:transparent;font-size:14px;}
.receipt-search-box input::placeholder{color:var(--muted);}
.receipt-filters-compact.card,.receipt-filters-compact form.office-list-filters{overflow:visible;}
.receipt-filters-compact .receipt-advanced>summary{border:1px solid var(--line);border-radius:7px;background:var(--card);color:var(--primary);list-style:none;}
.receipt-filters-compact .receipt-advanced[open]>summary{background:var(--primary-bg);border-color:var(--line);}
.receipt-filters-compact .receipt-advanced>.receipt-filter-grid{background:var(--card);border:1px solid var(--line);border-radius:8px;box-shadow:0 8px 24px color-mix(in srgb, var(--ink) 12.5%, transparent);}

/* whatsapp — shared semantic appearance */
.wa-page{color:var(--ink);}
.wa-card{padding:22px;margin:18px 0;}
.wa-card h2{font-size:20px;margin:0 0 8px;}
.wa-muted,.wa-reference{color:var(--muted);font-size:13px;}
.wa-draft{border-top:1px solid var(--line);text-decoration:none;color:var(--ink);}
.wa-draft:hover{background:var(--bg);}
.wa-media{background:var(--muted-bg);border:1px solid var(--line);border-radius:8px;color:var(--muted);}
.wa-copy>strong{font-size:16px;line-height:1.35;}
.wa-meta time{font-size:11px;color:var(--muted);}
.wa-overlay{position:fixed;inset:0;background:color-mix(in srgb, var(--ink) 36.9%, transparent);padding:35px;display:flex;align-items:center;justify-content:center;z-index:50;}
.wa-dialog{width:710px;max-height:100%;background:var(--card);border:1px solid var(--line);border-radius:12px;display:flex;flex-direction:column;min-height:0;box-shadow:0 12px 40px color-mix(in srgb, var(--ink) 20.0%, transparent);}
.wa-dialog header{display:flex;justify-content:space-between;align-items:center;gap:16px;padding:18px 24px;border-bottom:1px solid var(--line);}
.wa-dialog header h2{margin:0;font-size:20px;}
.wa-dialog footer{padding:15px 24px;border-top:1px solid var(--line);}
.wa-field{font-weight:600;}
.wa-message{background:var(--bg);color:var(--ink);line-height:1.7;border:1px solid var(--line);border-radius:6px;font-size:14px;}
.wa-note{background:var(--bad-bg);border:1px solid var(--warn-bg);border-radius:7px;}
.wa-photos img{border-radius:6px;}
.wa-audit{border-top:1px solid var(--line);}
.wa-templates .wa-card{margin:0;}
.wa-badge{background:var(--primary-bg);border-radius:20px;font-size:11px;text-decoration:none;color:var(--muted);}
@media (max-width:720px){.wa-card{padding:17px;}
.wa-copy>strong{font-size:15px;}
.wa-reference{font-size:12px;}
.wa-overlay{padding:50px 0 0;align-items:flex-end;}
.wa-dialog{width:100%;border-radius:16px 16px 0 0;}
.wa-dialog header,.wa-dialog footer{padding:12px 17px;}
.wa-message{font-size:15px;}
.wa-badge{font-size:10px;}}
.quick-links{border-top:1px solid var(--line);}
.quick-links .wa-link{font-weight:600;text-decoration:none;color:var(--primary);}
.quick-links .wa-link:hover,.quick-links .wa-link:focus-visible{text-decoration:underline;}

/* office-header — shared semantic appearance */
body.office-shell{background:var(--bg);color:var(--ink);}
.office-rail{background:var(--card);border-right:1px solid var(--line);}
.office-brand{color:var(--ink);text-decoration:none;font-size:16px;font-weight:700;}.office-brand-mark{flex:none;display:block}.office-brand-sub{font-weight:500;color:var(--muted)}
.account-brand{display:flex;align-items:center;gap:10px;margin:0 0 var(--space-4);font-size:20px;font-weight:700;color:var(--ink)}.account-brand span{font-weight:500;color:var(--muted)}
.office-nav-heading{color:var(--muted);font-size:11px;line-height:14px;font-weight:650;text-transform:uppercase;letter-spacing:.04em;}
.office-nav-link{position:relative;display:flex;align-items:center;gap:10px;min-height:44px;min-width:44px;padding:8px 10px;margin:2px 0;border-left:3px solid transparent;border-radius:7px;text-decoration:none;color:var(--ink);font-size:13px;line-height:1.3;}
.office-nav-link>.ic{flex:none;}
.office-nav-link:hover{background:var(--bg);}
.office-nav-link[aria-current]{background:var(--primary-bg);border-left-color:var(--primary);color:var(--primary);font-weight:650;}
.count-pill{margin-left:auto;flex:none;display:inline-flex;align-items:center;justify-content:center;min-width:22px;padding:2px 6px;border-radius:20px;background:var(--primary-bg);color:var(--primary);font-size:11px;font-weight:650;font-variant-numeric:tabular-nums;line-height:18px;}
.office-mode{border-top:1px solid var(--line);font-size:12px;text-decoration:none;color:var(--muted);}
.nav-compact .office-rail .office-nav-link{width:48px;padding:4px 8px;justify-content:center;margin:0;}
.nav-compact .office-rail .count-pill{position:absolute;top:-1px;right:-2px;min-width:18px;font-size:9px;line-height:15px;padding:0 3px;border:1px solid var(--card);}
.nav-compact .office-nav-group+.office-nav-group{border-top:1px solid var(--line);}
.office-app-header{background:var(--card);border-bottom:1px solid var(--line);}
.office-tenant{color:var(--ink);font-size:15px;font-weight:650;text-decoration:none;}
.office-language-chip>summary,.office-account>summary{list-style:none;cursor:pointer;border:1px solid var(--line);border-radius:7px;font-size:12px;}
.office-account>summary{border-radius:50%;background:var(--muted-bg);}
.office-language,.office-account>div{background:var(--card);border:1px solid var(--line);border-radius:8px;box-shadow:0 5px 18px color-mix(in srgb, var(--ink) 13.3%, transparent);}
.office-language a,.office-account a,.office-account button{color:var(--ink);font:inherit;font-size:13px;text-decoration:none;border:0;background:none;border-radius:6px;}
.office-account button{cursor:pointer;}
.office-language a[aria-current],.office-language a:hover,.office-account a:hover,.office-account button:hover{color:var(--primary);background:var(--primary-bg);}
.office-foot{color:var(--muted);font-size:11px;}
.office-workspace .wa-page .wa-card{min-height:0;overflow:auto;overscroll-behavior:contain;flex:1;margin-bottom:0;}
.office-workspace.finance-page .finance-main>div:first-child>.card{min-height:0;flex:1;overflow:auto;overscroll-behavior:contain;}
.office-workspace.finance-page .finance-main>div:first-child>.pagehead,.office-workspace.finance-page .finance-main>div:first-child>.filters,.office-workspace.finance-page .finance-main>div:first-child>.tabs{flex:none;}
.office-shell .button{border-radius:7px;box-shadow:none;}
.office-shell :focus-visible{outline:3px solid var(--focus);outline-offset:3px;}
@media (max-width:720px){.office-tenant{font-size:14px;}
.office-mobile-menu>summary{list-style:none;cursor:pointer;background:var(--card);color:var(--ink);border-radius:7px;}
.office-mobile-menu[open]>summary{border-bottom:1px solid var(--line);border-radius:16px 16px 0 0;}
.office-mobile-menu[open] .office-drawer-close{font-size:14px;}
.office-drawer{border:1px solid var(--line);border-radius:16px 16px 0 0;box-shadow:0 -8px 30px color-mix(in srgb, var(--ink) 20.0%, transparent);background:var(--card);}
.office-shell .office-drawer .count-pill{position:static;font-size:11px;line-height:18px;}
.office-workspace.finance-page .finance-main>div:first-child>.tabs{overflow:auto;min-height:44px;}}
.finance-main .finance-results>.card{margin-bottom:16px;}
.office-document.finance-page .finance-dialog{position:static;transform:none;width:100%;max-height:none;margin:0;box-shadow:none;}
.office-document.customer-shell .customer-dialog{position:static;transform:none;width:auto;max-height:none;margin:0 24px 24px;overflow:visible;box-shadow:none;}
.office-document.customer-shell .customer-sheet-body{overflow:visible;}
@media (max-width:720px){.office-shell:has(.review-detail,.receipt-detail,.photo-sheet,.customer-sheet.is-open,.has-detail .sheetdetail)>.office-app-header,.office-shell:has(.review-detail,.receipt-detail,.photo-sheet,.customer-sheet.is-open,.has-detail .sheetdetail)>.office-mobile-menu{visibility:hidden;}
.office-shell:has(.photo-sheet) .photo-master,.office-shell:has(.has-detail .sheetdetail) .directory,.office-shell:has(.customer-sheet.is-open) .customer-directory{visibility:hidden;}}
@media (max-width:720px){.office-shell:has(.review-detail,.receipt-detail,.photo-sheet,.customer-sheet.is-open,.has-detail .sheetdetail)>.office-main>*{visibility:hidden;}
.office-shell .review-detail,.office-shell .receipt-detail,.office-shell .photo-sheet,.office-shell .customer-sheet.is-open,.office-shell .sheetdetail,.office-shell .sheetbackdrop{visibility:visible;}}

/* Devices component */
:where(.devices-page) .devices-page{position:relative}
:where(.devices-page) .record{border-top:1px solid var(--muted-bg);padding:12px 0 4px}
:where(.devices-page) .record:first-of-type{border-top:0;padding-top:0}
:where(.devices-page) .record-head{display:flex;justify-content:space-between;gap:10px;flex-wrap:wrap;align-items:center;font-weight:650;margin-bottom:6px}
:where(.devices-page) .record p{margin:0 0 8px;font-size:14px}
:where(.devices-page) details.evidence{margin:6px 0 8px;font-size:13px}
:where(.devices-page) details.evidence summary{cursor:pointer;min-height:44px;display:flex;align-items:center;gap:6px;font-weight:600;color:var(--primary)}
:where(.devices-page) details.evidence dl{margin:4px 0}
:where(.devices-page) .keys .fact dd{text-align:left}
:where(.devices-page) .keys .fact{grid-template-columns:minmax(0,1.4fr) minmax(0,1fr)}
:where(.devices-page) .keys .pill{white-space:normal;text-align:left}
:where(.devices-page) .secret{font:600 17px/1.4 var(--font-mono);background:var(--muted-bg);border:1px dashed var(--muted);border-radius:8px;padding:14px;overflow-wrap:anywhere;user-select:all;margin:0 0 12px}
:where(.devices-page) .check{display:flex;gap:10px;align-items:center;font-size:14px;font-weight:600;min-height:44px;margin:8px 0}
:where(.devices-page) .sheet-bar{display:none}
:where(.devices-page) .flow .actions{justify-content:flex-start}
@media  (min-width:721px){:where(.devices-page) .has-sheet .normal{display:none}
:where(.devices-page) .flow{max-width:720px}}
@media  (max-width:720px){:where(.devices-page) .has-sheet .normal{opacity:.45}
:where(.devices-page) .has-sheet::before{content:"";position:fixed;inset:0;background:rgba(23,38,56,.45);z-index:15}
:where(.devices-page) .flow{position:fixed;bottom:0;left:0;right:0;max-height:90vh;overflow:auto;overscroll-behavior:contain;z-index:20;border:1px solid var(--line);border-radius:22px 22px 0 0;margin:0;padding:0 18px 22px;box-shadow:0 -8px 30px rgba(0,0,0,.25)}
:where(.devices-page) .sheet-bar{display:flex;position:sticky;top:0;z-index:1;justify-content:flex-end;align-items:center;min-height:68px;padding:14px 0 4px;background:var(--card);gap:12px}
:where(.devices-page) .sheet-handle{position:absolute;width:36px;height:4px;border-radius:4px;background:var(--line);top:8px;left:calc(50% - 18px)}
:where(.devices-page) .sheet-bar .button{min-width:74px;margin:0}}

/* OrganisationsJournal component */
:where(.platform-shell) .journal-row{display:grid;grid-template-columns:minmax(140px,.9fr) minmax(0,2fr);gap:8px 14px;padding:12px 0;border-top:1px solid var(--muted-bg);font-size:14px}
:where(.platform-shell) .journal-row:first-of-type{border-top:0;padding-top:0}
:where(.platform-shell) .journal-row .who{color:var(--muted);font-size:13px}
:where(.platform-shell) .journal-row details{font-size:13px;margin-top:6px}
:where(.platform-shell) .journal-row summary{cursor:pointer;min-height:44px;display:flex;align-items:center;color:var(--primary);font-weight:600}
:where(.platform-shell) .journal-row pre{white-space:pre-wrap;overflow-wrap:anywhere;font-size:11px;background:var(--muted-bg);padding:8px;border-radius:6px;max-width:100%}
@media  (max-width:720px){:where(.platform-shell) .journal-row{grid-template-columns:1fr}}

/* _OrganisationsNav component */


/* OrganisationsNew component */
:where(.platform-shell) .new-form{max-width:560px}
:where(.platform-shell) .secret{font:600 17px/1.4 var(--font-mono);background:var(--muted-bg);border:1px dashed var(--muted);border-radius:8px;padding:14px;overflow-wrap:anywhere;user-select:all;margin:0 0 12px}

/* Adoption component */
:where(.platform-shell) .adoption .fact{grid-template-columns:minmax(0,1.3fr) minmax(0,1fr)}
:where(.platform-shell) .adoption .fact dd{text-align:left}
:where(.platform-shell) .adoption .fact .pill{white-space:normal;line-height:1.5}
:where(.platform-shell) .adoption h2{font-size:17px;margin:18px 0 6px}
:where(.platform-shell) .adoption .card{padding:14px 16px;margin-bottom:12px}
:where(.platform-shell) .adoption .mono{font-family:var(--font-mono);font-size:12px;overflow-wrap:anywhere}
:where(.platform-shell) .adoption .confirm{margin-top:16px}

/* Organisations component */
:where(.platform-shell) .platform-page{position:relative}
:where(.platform-shell) .org-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px 14px;padding:12px 0;border-top:1px solid var(--muted-bg);align-items:center}
:where(.platform-shell) .org-row:first-child{border-top:0;padding-top:0}
:where(.platform-shell) .org-row h2{font-size:16px;margin:0 0 4px;display:flex;gap:8px;align-items:center;flex-wrap:wrap}
:where(.platform-shell) .org-row .button{margin:0}
:where(.platform-shell) .org-meta{color:var(--muted);font-size:13px;margin:0;overflow-wrap:anywhere}
:where(.platform-shell) .member-row{display:flex;justify-content:space-between;align-items:center;gap:10px;flex-wrap:wrap;padding:8px 0;border-top:1px solid var(--muted-bg);font-size:14px;min-height:44px}
:where(.platform-shell) .member-row:first-of-type{border-top:0}
:where(.platform-shell) .member-row .button{margin:0;min-height:44px;padding:6px 12px}
:where(.platform-shell) .member-row small{color:var(--muted)}
:where(.platform-shell) .flow h2{margin-bottom:4px}
:where(.platform-shell) .flow .actions{justify-content:flex-start}
:where(.platform-shell) .flow .button.danger-outline{color:var(--bad);border-color:var(--bad)}
:where(.platform-shell) .sheet-bar{display:none}
@media  (max-width:720px){:where(.platform-shell) .org-row{grid-template-columns:1fr}
:where(.platform-shell) .has-sheet .normal{opacity:.45}
:where(.platform-shell) .has-sheet::before{content:"";position:fixed;inset:0;background:rgba(23,38,56,.45);z-index:15}
:where(.platform-shell) .flow{position:fixed;bottom:0;left:0;right:0;max-height:90vh;overflow:auto;overscroll-behavior:contain;z-index:20;border:1px solid var(--line);border-radius:22px 22px 0 0;margin:0;padding:0 18px 22px;box-shadow:0 -8px 30px rgba(0,0,0,.25)}
:where(.platform-shell) .sheet-bar{display:flex;position:sticky;top:0;z-index:1;justify-content:flex-end;align-items:center;min-height:68px;padding:14px 0 4px;background:var(--card);gap:12px}
:where(.platform-shell) .sheet-handle{position:absolute;width:36px;height:4px;border-radius:4px;background:var(--line);top:8px;left:calc(50% - 18px)}
:where(.platform-shell) .sheet-bar .button{min-width:74px;margin:0}}

/* Supplemental component geometry */
:where(.w3-main) .panelhead .button{padding:8px;}
@media (max-width:720px){:where(.w3-main) .detailfooter>.button.primary{flex:1;}
:where(.w3-main) .receiptcard .button{width:100%;}}


@media (max-width:720px){.arrival-page .sectionhead .button{padding:8px;}}




@media (max-width:720px){.finance-page .pagehead>.button{padding:8px;}
.finance-page .actions>.button{flex:1;}}
.finance-page .inline-search .button,.finance-page .dialog-head>.button{flex-shrink:0;white-space:nowrap;}
.quick-links .wa-link+.wa-link{margin-left:0}

.office-app .button,.customer-pager a,.photo-pagination a{min-height:44px}
:where(.master-detail)>:is(.directory,.detail){padding:0}
.shiprow,.customer-list-row,.review-row{text-decoration:none}
:where(.w3-main) .chips a{display:inline-flex;min-height:44px;align-items:center;justify-content:center;text-decoration:none}
.pagehead>.button,.page-head>.button{flex-shrink:0;white-space:nowrap}
.tabs>a{flex:1 0 auto;white-space:nowrap}
@media(max-width:720px){
 .office-shell:has(.devices-page.has-sheet,.platform-page.has-sheet)>.office-rail,.office-shell:has(.devices-page.has-sheet,.platform-page.has-sheet)>.office-app-header,.office-shell:has(.devices-page.has-sheet,.platform-page.has-sheet)>.office-mobile-menu,.office-shell:has(.devices-page.has-sheet,.platform-page.has-sheet)>.office-foot{visibility:hidden}
 :is(.devices-page,.platform-page).has-sheet .normal{visibility:hidden}
}
@media(max-width:720px){
 .sample-workspace .detail-pane:target{display:flex;position:fixed;inset:14dvh 0 0;z-index:60;border-radius:var(--radius-sheet) var(--radius-sheet) 0 0;box-shadow:var(--shadow-sheet)}
 .sample-workspace:has(.detail-pane:target) .master-pane{visibility:hidden}
 body:has(.sample-workspace .detail-pane:target)>.office-app-header,body:has(.sample-workspace .detail-pane:target)>.office-mobile-menu,body:has(.sample-workspace .detail-pane:target)>.office-main>*:not(.sample-workspace),body:has(.sample-workspace .detail-pane:target)>.office-foot{visibility:hidden}
}

/* Shared bottom sheets and modal focus isolation */
:where(.w3-main) .sheetclose{display:none;}
:where(.w3-main) .sheetlabels{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;margin:18px 0;}
:where(.w3-main) .sheetlabels .paper{width:100%;min-height:315px;}
:where(.w3-main) .sheetlabels .paper .qr{width:96px;height:96px;}
:where(.w3-main) .printview .sheetlabels{justify-items:center;}
@media (max-width:720px){:where(.w3-main) .sheetclose{display:inline-flex;min-width:44px;min-height:44px;align-items:center;gap:5px;}
:where(.w3-main) .detailtop .sheetclose{margin-top:-6px;margin-bottom:4px;}
:where(.w3-main) .sheetlabels{grid-template-columns:minmax(0,1fr);justify-items:center;}
:where(.w3-main) .sheetlabels .paper{max-width:302px;min-height:340px;}
:where(.w3-main) .sheetlabels .paper .qr{width:110px;height:110px;}}
:where(.w3-main) .sheetclose{display:none;}
@media (max-width:720px){:where(.w3-main) .detail .sheetclose{display:flex;}}
@media print{:where(.w3-main) .sheetlabels{display:block!important;margin:0!important;}}



.office-language-chip>summary::-webkit-details-marker,.office-account>summary::-webkit-details-marker,.office-mobile-menu>summary::-webkit-details-marker{display:none;}
.office-mobile-menu{display:none;}
.office-drawer-close{display:none;}
@media (max-width:720px){.office-mobile-menu{display:block;position:fixed;left:12px;top:6px;z-index:40;}
.office-mobile-menu>summary{display:flex;align-items:center;justify-content:center;min-width:44px;min-height:44px;}
.office-mobile-menu[open]>summary{position:fixed;inset:14dvh 12px auto;justify-content:space-between;padding:12px;min-height:56px;z-index:42;}
.office-mobile-menu[open] .office-drawer-close{display:flex;align-items:center;gap:8px;}
.office-drawer{position:fixed;inset:14dvh 0 0;max-height:86dvh;padding:68px 12px 16px;overflow:auto;overscroll-behavior:contain;}
.office-mobile-menu[open]~.office-app-header,.office-mobile-menu[open]~.office-main,.office-mobile-menu[open]~.office-foot{visibility:hidden;}
.office-shell .office-drawer .office-nav-label,.office-shell .office-drawer .office-nav-heading{display:block;}}
@media print{.office-rail,.office-app-header,.office-mobile-menu,.office-foot,.skip{display:none!important;}}
.office-document.finance-page .finance-backdrop{display:none;}
.office-document.finance-page .dialog-body{overflow:visible;}
.office-document.customer-shell .customer-columns,.office-document.customer-shell .customer-backdrop{display:none;}
@media (max-width:720px){body:has(.office-mobile-menu[open])>.skip{visibility:hidden;}}
.customer-backdrop{display:none;}
@media (max-width:720px){.customer-backdrop{display:block;position:fixed;inset:0;z-index:20;}}

@media (max-width:720px){.photo-backdrop{position:fixed;inset:0;z-index:4;}}
.finance-page .finance-backdrop{position:fixed;inset:0;z-index:40;}
.finance-page .dialog-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:18px 22px;flex:none;}
.finance-page .dialog-head h2{overflow-wrap:anywhere;}
.finance-page .dialog-body{padding:20px 22px;overflow:auto;overscroll-behavior:contain;min-height:0;}
.finance-page.has-dialog{overflow:hidden;}
@media (max-width:720px){.finance-page .dialog-head{padding:15px 16px;}
.finance-page .dialog-body{padding:16px 16px 28px;}}

.review-filter-form .check,.photo-toolbar .check{display:flex;align-items:center;gap:8px;min-height:44px}
.review-filter-form input[type=checkbox],.photo-toolbar input[type=checkbox]{width:20px;height:20px;min-height:20px;flex:none}
.photo-toolbar .button{white-space:nowrap;flex:none}

/* Compact shared spacing. Paper/print geometry is deliberately separate. */
@media screen{
.office-shell .office-main .card{padding:var(--space-3);margin-bottom:var(--space-3)}
.office-shell .office-main .card:last-child{margin-bottom:0}
.office-shell .office-main :is(.master-detail,.metrics,.split,.tenant-grid,.dashboard-grid,.dashboard-metrics,.tenant-file-list)>.card{margin:0}
.office-shell .office-main .master-detail>.card{padding:0}
.office-shell .office-main .agent-page>.agent-panel{margin:0}
.office-shell .office-main .agent-panel:has(.review-workspace){padding:0}
.office-shell .office-main :is(.page-head,.pagehead){gap:var(--space-2);margin-bottom:var(--space-2)}
.office-shell .office-main :is(.quick-links,.agent-nav){gap:var(--space-1) var(--space-3)}
.office-shell .office-main .quick-links{margin:var(--space-2) 0;padding-top:var(--space-2)}
.office-shell .office-main :is(.pane-head,.pane-foot,.pane-scroll,.review-queue-head,.review-detail-head,.review-detail-body,.review-detail-footer,.dirhead,.detailtop,.detailfooter,.scroll){padding:var(--space-3)}
.office-shell .office-main :is(.pager,.customer-pager,.photo-pagination){margin:0;padding:var(--space-1) var(--space-3);gap:var(--space-2)}
.office-shell .office-main :is(.metrics,.split,.tenant-grid,.dashboard-grid,.dashboard-metrics,.tenant-file-list,.form-grid,.agent-two-columns){gap:var(--space-3)}
.office-shell .office-main :is(.metrics,.dashboard-metrics){margin-top:var(--space-2);margin-bottom:var(--space-3)}
.office-shell .office-main :is(.metric,.dashboard-metric){padding:var(--space-3)}
.office-shell .office-main :is(.filters form,.search-row,.filterrow,.customer-search-row,.photo-search){gap:var(--space-2)}
.office-shell .office-main :is(.filterrow,.customer-search-row){margin-bottom:var(--space-2)}
.office-shell .office-main :is(.review-empty-detail,.photo-empty,.empty){padding:var(--space-3)}
}

/* Stable rail geometry prevents activation/badge changes from moving its links. */
.office-rail .office-nav-link{height:44px;margin:0;padding:4px 8px;font-weight:650}

/* Receipt panes own their inner spacing, like the shared pane components. */
@media screen{
.office-shell .office-main :is(.receipt-filters-compact,.receipt-list-head,.receipt-list-scroll,.receipt-detail-scroll),
.office-shell .office-main .receipt-detail .tenant-modal-head{padding:var(--space-3)}
.office-shell .office-main .receipt-list-head{padding-bottom:0;gap:var(--space-2)}
}
@media screen and (min-width:721px){
.receipt-workspace.has-detail .receipt-row{grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:var(--space-2);padding:var(--space-3)}
.receipt-workspace.has-detail .receipt-identity-cell{grid-column:1;grid-row:1}
.receipt-workspace.has-detail .receipt-state{grid-column:2;grid-row:1;align-items:flex-end}
.receipt-workspace.has-detail .receipt-status{align-self:flex-end}
.receipt-workspace.has-detail .receipt-goods{grid-column:1 / -1;grid-row:2}
.receipt-workspace.has-detail .receipt-route{grid-column:1;grid-row:3}
.receipt-workspace.has-detail .receipt-quantities{grid-column:2;grid-row:3}
}
