:root{color:#173b48;background:#f4f7f8;font:16px/1.5 system-ui,sans-serif}*{box-sizing:border-box}body{margin:0}header{position:sticky;top:0;display:flex;align-items:center;gap:18px;padding:14px 4%;background:white;border-bottom:1px solid #d3e1e5}nav{display:flex;flex:1;gap:6px;overflow:auto;white-space:nowrap}main{max-width:1120px;margin:28px auto;padding:0 20px}h1{font-size:1.625rem}h2{font-size:1.1875rem}button,a{cursor:pointer}button{font:inherit;border:1px solid #bed2d7;background:white;color:#007d78;padding:8px 14px;border-radius:7px}button:hover,button.active{background:#e2f2ef}button:disabled{opacity:.5;cursor:wait}label{display:flex;flex-direction:column;gap:5px;font-size:.875rem}input,select,textarea{font:inherit;padding:9px;border:1px solid #b6cdd4;border-radius:6px;min-width:0;width:100%;background:white;color:inherit}textarea{min-height:85px}form,.panel{background:white;padding:20px;border:1px solid #d3e1e5;border-radius:10px;margin:15px 0}.grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}.wide{grid-column:1/-1}.row{display:flex;align-items:center;gap:12px;flex-wrap:wrap}.row h1{margin-right:auto}.tag{font-size:.75rem;padding:3px 9px;background:#e0f0ed;border-radius:5px}.notice{font-size:.8125rem;color:#7e5a23}#error{color:#ac3434;white-space:pre-line}.scroll{overflow:auto}table{width:100%;border-collapse:collapse}th,td{text-align:left;border-bottom:1px solid #e0e9eb;padding:10px;font-size:.875rem}td button{padding:3px 7px}#logout{font-size:.75rem;padding:5px 8px}small{color:#667e87}.drop{border:2px dashed #a4c6c8;padding:28px;text-align:center}.badge{background:#c9363c;color:white;border-radius:20px;padding:0 6px;font-size:.75rem}@media(max-width:700px){header{flex-wrap:wrap;gap:8px}nav{order:3;flex-basis:100%}.grid{grid-template-columns:1fr}main{padding:0 12px}th:nth-child(4),td:nth-child(4){display:none}.tag{font-size:.6875rem}h1{font-size:1.375rem}}
#content>.panel>.row{align-items:flex-end}#content>.panel>.row>input{flex:2;min-width:180px}#content>.panel>.row>select{flex:1;min-width:120px;width:auto}.dot{display:inline-block;width:12px;height:12px;border-radius:50%;border:1px solid #526c77;flex-shrink:0}.colors label{display:flex;flex-direction:row;align-items:center;gap:5px}.colors input{width:auto}.timeline-event{border-left:2px solid #d4e1e4;padding-left:18px;position:relative}.timeline-event>.dot{position:absolute;left:-7px;top:6px}fieldset{border:1px solid #d3e1e5;border-radius:6px;margin:12px 0}pre{white-space:pre-wrap;overflow-wrap:anywhere}.grid input[type=checkbox],label>input[type=checkbox]{width:auto}form .row{margin-top:16px}#content table{min-width:560px}
.icon{width:18px;height:18px;flex-shrink:0;vertical-align:-3px;margin-right:6px}h1 .icon{width:28px;height:28px;vertical-align:-4px}nav button{display:inline-flex;align-items:center;white-space:nowrap}html[data-font=large]{font-size:19px}html[data-density=compact] td,html[data-density=compact] th{padding:6px}html[data-theme=dark]{background:#171717;color:#f2f2f2}html[data-theme=dark] header,html[data-theme=dark] .panel,html[data-theme=dark] form,html[data-theme=dark] input,html[data-theme=dark] select,html[data-theme=dark] textarea,html[data-theme=dark] button{background:#212121;color:#f2f2f2;border-color:#565656}html[data-theme=dark] small{color:#a6a6a6}html[data-theme=dark] .notice{color:#e6c794}html[data-theme=dark] .tag{background:#343434}#config-editor input[type=checkbox]{width:auto}#config-editor label:has(input[type=checkbox]){flex-direction:row}#queue-list p{overflow-wrap:anywhere}

html[data-theme=dark] button.active{background:#525252;border-color:#a6a6a6}

/* Consistent controls and spacing across settings, masters and requests. */
header{z-index:10}header>b{flex-shrink:0}nav{min-width:0}button:disabled{cursor:not-allowed}button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,summary:focus-visible{outline:2px solid #007d78;outline-offset:3px}summary{cursor:pointer;font-weight:600}details[open]>summary{margin-bottom:18px}details.panel>form{padding:0;border:0;margin:0;border-radius:0;background:transparent}.settings-sections{display:contents}.hint{color:#667e87;font-size:.875rem}.form-actions,form>.grid+button,form>fieldset+button{margin-top:24px}.form-actions{display:flex;align-items:center;gap:12px;flex-wrap:wrap}label:has(>input[type=checkbox]),label:has(>input[type=radio]){flex-direction:row;align-items:center;gap:9px}input[type=checkbox],input[type=radio]{width:18px;height:18px;margin:0;flex:none;accent-color:#007d78}.check-row{margin:22px 0 0;min-height:32px}.recipient-row{display:flex;align-items:flex-end;gap:12px;margin-bottom:14px}.recipient-row label{flex:1;min-width:0}.recipient-row button{flex:none}.branch-row{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:32px;max-width:480px;padding:12px 0;border-bottom:1px solid #e0e9eb}.branch-row:last-child{border-bottom:0}.branch-name{display:flex;align-items:center;gap:9px;overflow-wrap:anywhere}#new-branch{margin-top:18px}.drop{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:14px;min-height:190px;margin:18px 0 12px;padding:32px 20px;border-radius:10px;background:#f4f8f8;cursor:pointer}.drop input[type=file]{position:absolute;width:1px;height:1px;padding:0;border:0;opacity:0}.drop:focus-within{outline:2px solid #007d78;outline-offset:3px}.file-button{padding:9px 18px;border:1px solid #77a9aa;border-radius:7px;background:white;color:#007d78}.drop.is-dragover{background:#e2f2ef;border-color:#007d78}.drop[aria-busy=true]{opacity:.65;cursor:progress}.drop small{font-size:.75rem}.help>details{border-top:1px solid #d3e1e5;padding:16px 0}.help>details:last-child{padding-bottom:0}.help li{margin:9px 0}.help p{overflow-wrap:anywhere}#bulk-status:empty,#error:empty{display:none}#content>h1{margin-top:0;padding-top:12px}#content>.row:first-child{min-height:64px;margin-bottom:16px}#content>.row:first-child h1{margin-top:0;margin-bottom:0}#config-form{padding:0;border:0}#config-form fieldset{padding:16px}#config-form fieldset>label{margin:10px 0}html[data-theme=dark] .hint{color:#a6a6a6}html[data-theme=dark] .drop{background:#292929}html[data-theme=dark] .drop.is-dragover{background:#525252}html[data-theme=dark] .file-button{background:#212121;color:#f2f2f2}
@media(max-width:700px){.panel,form{padding:16px}.drop{min-height:180px;padding:28px 12px}.branch-row{gap:20px}.recipient-row{gap:8px}.recipient-row button{padding:9px 10px}#logout{min-height:40px}.help ol{padding-left:22px}}

form>label+button,form>details+button{margin-top:24px}#content .panel>p:has(>[data-file]){display:flex;align-items:center;flex-wrap:wrap;gap:10px}#content .panel>p>[data-file]{overflow-wrap:anywhere;max-width:100%;text-align:left}#queue-list p{display:flex;align-items:center;flex-wrap:wrap;gap:10px}

/* Preferences scale actual text, not only the root. Use scoped preview variables. */
:root{--panel-space:20px;--field-gap:14px;--cell-y:10px;--control-y:9px}
html[data-density=compact]{--panel-space:14px;--field-gap:10px;--cell-y:6px;--control-y:6px}
form,.panel{padding:var(--panel-space)}.grid{gap:var(--field-gap);grid-template-columns:repeat(2,minmax(0,1fr))}th,td{padding:var(--cell-y) 10px}html[data-density=compact] td,html[data-density=compact] th{padding:var(--cell-y) 10px}.grid>*{min-width:0}small{font-size:.8125rem}h3{font-size:1.0625rem}
input:not([type=checkbox]):not([type=radio]):not([type=file]),select{min-height:2.75rem;padding:var(--control-y) 12px}textarea{padding:var(--control-y) 12px}
select{appearance:none;-webkit-appearance:none;width:auto;max-width:min(100%,24rem);min-width:8em;align-self:flex-start;padding-right:2.4em;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='m4 6 4 4 4-4' fill='none' stroke='%235a7d86' stroke-width='2'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right .7em center}#content>.panel>.row>select{flex:0 1 auto}#content select:disabled{opacity:.65}
.appearance-controls{display:flex;flex-wrap:wrap;gap:16px 24px}.appearance-controls select{width:10em}#form-kind{width:12em}label:has(>select){align-items:flex-start}label>select{max-width:100%}
#content input[type=checkbox],#content input[type=radio]{appearance:none;-webkit-appearance:none;box-sizing:border-box;width:1.375rem;min-width:1.375rem;height:1.375rem;padding:0;flex:0 0 1.375rem;border:2px solid #77989f;border-radius:4px;background:transparent;cursor:pointer;vertical-align:middle}#content input[type=radio]{border-radius:50%}#content input[type=checkbox]:checked{background:#007d78 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='m4 10 4 4 8-8' fill='none' stroke='white' stroke-width='2.5'/%3E%3C/svg%3E") center/100% no-repeat;border-color:#007d78}#content input[type=radio]:checked{background:#007d78;box-shadow:inset 0 0 0 4px white;border-color:#007d78}#content input[type=checkbox]:disabled,#content input[type=radio]:disabled{opacity:.4;cursor:not-allowed}label:has(>input[type=checkbox]),label:has(>input[type=radio]){min-height:44px;cursor:pointer;padding:4px 0;gap:10px}
.listing-heading h2{margin-right:auto}.home-tiles{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(260px,100%),1fr));gap:18px;margin:24px 0}.home-tile{display:flex;flex-direction:column;justify-content:space-between;gap:24px;min-height:160px;padding:24px;text-align:left;color:inherit;border:2px solid #d3e1e5;border-radius:12px;box-shadow:0 2px 0 #173b480a}.home-tile:hover{border-color:#007d78}.tile-title{text-wrap:balance;font-size:1.3rem;font-weight:700;line-height:1.5}.tile-title .icon{width:1.5rem;height:1.5rem}.tile-footer{display:flex;justify-content:space-between;align-items:center;color:#007d78;font-weight:600;font-size:.875rem}.tile-footer>span:last-child{font-size:1.75rem}.home-guide{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 30px;padding:16px 20px;border:1px solid #d3e1e5;border-radius:10px;background:white}#help{scroll-margin-top:150px}
.appearance-preview{--preview-size:16px;--preview-pad:18px;--preview-gap:18px;--preview-bg:#f4f7f8;--preview-surface:white;--preview-ink:#173b48;--preview-muted:#667e87;--preview-line:#b6cdd4;font-size:var(--preview-size);color:var(--preview-ink);background:var(--preview-bg);border:1px solid var(--preview-line);border-radius:10px;padding:var(--preview-pad);margin-top:24px}
.appearance-preview[data-font=large]{--preview-size:19px}.appearance-preview[data-density=compact]{--preview-pad:12px;--preview-gap:10px}.appearance-preview[data-theme=dark]{--preview-bg:#171717;--preview-surface:#212121;--preview-ink:#f2f2f2;--preview-muted:#a6a6a6;--preview-line:#565656}
.appearance-preview h3{font-size:1.0625em;margin:0}.appearance-preview .preview-note{font-size:.8125em;color:var(--preview-muted)}.preview-item{display:flex;align-items:center;flex-wrap:wrap;gap:var(--preview-gap);padding:var(--preview-pad);background:var(--preview-surface);border:1px solid var(--preview-line);border-radius:6px;margin:var(--preview-gap) 0}.preview-item>div{flex:1;min-width:150px}.preview-item small{display:block;font-size:.8125em;color:var(--preview-muted)}.preview-item .tag{font-size:.75em}.appearance-preview label{font-size:.875em}.appearance-preview input,.appearance-preview input:read-only{background:var(--preview-surface)!important;color:var(--preview-ink)!important;border-color:var(--preview-line)!important;font-size:1em;min-height:calc(var(--preview-size)*2.75)}.appearance-preview[data-theme=light] .tag{background:#e0f0ed;color:#173b48}.appearance-preview[data-theme=dark] .tag{background:#343434;color:#f2f2f2}
html[data-theme=dark] select{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16'%3E%3Cpath d='m4 6 4 4 4-4' fill='none' stroke='%23a6a6a6' stroke-width='2'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right .7em center}html[data-theme=dark] .home-guide{background:#212121;border-color:#565656}html[data-theme=dark] .tile-footer{color:#f2f2f2}
@media(max-width:700px){.grid{grid-template-columns:1fr}.home-tiles{grid-template-columns:1fr}.home-tile{min-height:125px;padding:20px}.appearance-controls{gap:12px}.appearance-controls label{flex:0 1 auto}.home-guide{flex-wrap:wrap}#content select{max-width:100%}.panel,form{padding:var(--panel-space)}}
@media(forced-colors:active){#content input[type=checkbox],#content input[type=radio]{appearance:auto;-webkit-appearance:auto}}

/* Match the on-prem monochrome dark palette. */
html[data-theme=light]{color-scheme:light}html[data-theme=dark]{color-scheme:dark}
html[data-theme=dark] th,html[data-theme=dark] td,html[data-theme=dark] fieldset,html[data-theme=dark] .branch-row,html[data-theme=dark] .help>details,html[data-theme=dark] .timeline-event{border-color:#3a3a3a}
html[data-theme=dark] button:hover,html[data-theme=dark] .home-tile:hover{background:#2b2b2b;border-color:#a6a6a6}html[data-theme=dark] button.active{background:#525252}
html[data-theme=dark] .notice{color:#f5d28b}html[data-theme=dark] #error{color:#f2b8b5}
html[data-theme=dark] :focus-visible,html[data-theme=dark] .drop:focus-within{outline-color:#d9d9d9}
html[data-theme=dark] #content input[type=checkbox]:checked{background-color:#525252;border-color:#d9d9d9}html[data-theme=dark] #content input[type=radio]:checked{background:#f2f2f2;box-shadow:inset 0 0 0 4px #212121;border-color:#d9d9d9}
.appearance-preview[data-theme=dark]{color-scheme:dark}.appearance-preview[data-theme=light]{color-scheme:light}.appearance-controls select[name=theme]{width:17em;max-width:100%}
.appearance-controls label{min-width:0;max-width:100%}html[data-theme=dark] .drop.is-dragover{border-color:#d9d9d9}
.appearance-preview .preview-item small{color:var(--preview-muted)}

html[data-font=extra]{font-size:21px}.appearance-preview[data-font=extra]{--preview-size:21px}.card-preview,.form-attachments{border:1px solid #b6cdd4;border-radius:8px;padding:18px;margin:18px 0}.card-preview strong{font-size:1.35rem}.field-required{font-size:.6875rem;color:#ac3434}.request-comment{white-space:pre-wrap;padding:16px;border-left:4px solid #bd9145;background:#fff1d6}.file-preview{width:min(1100px,95vw);max-height:95vh;border:1px solid #aaa;border-radius:10px}.file-preview .row{justify-content:space-between}.file-preview h2{overflow-wrap:anywhere}.file-preview iframe{width:100%;height:70vh;border:0}.file-preview img{display:block;max-width:100%;max-height:75vh;margin:auto;object-fit:contain}.file-preview::backdrop{background:#0009}html[data-theme=dark] .request-comment{background:#3b301e}html[data-theme=dark] .field-required{color:#ffaaaa}
.list-extra{margin-top:14px}.period-filters{align-items:flex-end;margin-top:12px}.period-filters input[type=month]{width:12em}

.original-viewer{min-width:0;max-height:none;overflow:visible}.original-viewer canvas{max-width:100%;height:auto;display:block;margin:12px auto}.file-preview{background:#fff;color:#173b48}.original-viewer button{background:white;color:#007d78}.original-viewer .row{position:sticky;top:0;background:white;padding:8px}
.permission-editor{margin:18px 0}.progress-steps{display:block;font-size:.7rem;white-space:nowrap;color:#667e87}.progress-steps .current{font-weight:700;color:#007d78}.progress-steps+small{display:block}html[data-theme=dark] .progress-steps{color:#aaa}html[data-theme=dark] .progress-steps .current{color:white}

[hidden]{display:none!important}

.action-dialog{width:min(560px,94vw);border:1px solid #aaa;border-radius:10px;padding:0;color:inherit;background:inherit}.action-dialog form{margin:0}.action-dialog::backdrop{background:#0009}
.review-layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);align-items:start;gap:16px}.review-layout>form{min-width:0}.review-layout .grid{grid-template-columns:1fr}.original-side{position:sticky;top:100px;min-width:0}.original-side select{max-width:100%;margin-bottom:12px}.original-stage{overflow:auto;max-height:65vh;background:#fff}.original-viewer img{object-fit:contain;display:block}.viewer-controls{font-size:.8rem;gap:6px}.viewer-controls button{padding:6px;min-height:36px}.live-total{display:block;padding:14px;border-radius:8px;background:#e2f2ef;font-weight:700}html[data-theme=dark] .live-total{background:#303030}@media(max-width:850px){.review-layout{grid-template-columns:1fr}.original-side{position:static}.original-stage{max-height:45vh}}
.connection-strip{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:12px;padding:12px 16px;border:1px solid #d3e1e5;border-radius:8px;margin:0 0 20px;font-size:.8125rem}.connection-strip button{font-size:inherit;padding:6px 10px}.connection-strip[data-state=attention]{border-color:#bd9145}.maintenance>details,.mail-admin>details{padding:16px 0;border-top:1px solid #d3e1e5}.maintenance summary{scroll-margin-top:120px}html[data-theme=dark] .connection-strip,html[data-theme=dark] .maintenance>details,html[data-theme=dark] .mail-admin>details{border-color:#565656}.maintenance li{margin:10px 0}
.viewer-controls{color:#173b48;background:#fff}

/* Stronger action borders; compensate padding to preserve existing button dimensions. */
button:not(.home-tile){border-width:2px;border-color:#528f90;padding:7px 13px}
td button:not(.home-tile){padding:2px 6px}
#logout{padding:4px 7px}
.viewer-controls button{padding:5px}
.connection-strip button{padding:5px 9px}
.file-button{border-width:2px;border-color:#528f90;padding:8px 17px}
button:not(.home-tile):disabled{border-color:#bed2d7}
html[data-theme=dark] button:not(.home-tile),html[data-theme=dark] .file-button{border-color:#929292}
html[data-theme=dark] button:not(.home-tile):disabled{border-color:#565656}
@media(max-width:700px){.recipient-row button{padding:8px 9px}}

/* Attribution stays behind page content and opaque controls. */
.screen-watermark{position:fixed;inset:0;z-index:0;pointer-events:none;user-select:none;overflow:hidden;display:grid;grid-template-columns:repeat(3,minmax(260px,1fr));align-content:space-around;gap:70px 30px;padding:80px 0;opacity:.055}
.screen-watermark span{color:inherit;font-size:1rem;font-weight:800;white-space:nowrap;text-align:center;transform:rotate(-24deg)}
.permission-editor[hidden]{display:none}
.presence-panel li{margin:8px 0}
@media(max-width:800px){.screen-watermark{grid-template-columns:repeat(2,minmax(220px,1fr));gap:80px 10px;opacity:.065}.screen-watermark span{font-size:.875rem}}
@media print{.screen-watermark{display:grid!important}}

body{isolation:isolate}body>main{position:relative;z-index:1}.connection-strip{background:#f4f7f8}html[data-theme=dark] .connection-strip{background:#171717}

/* ID login keeps short forms readable on desktop and phone. */
#id-login,#password-change{max-width:38rem}#id-login label,#password-change label,#login-settings label{display:block;margin-block:1rem}#login-settings input{max-width:32rem}

/* Shared responsive layout: details, forms, tables and navigation. */
:root{--page-gutter:clamp(12px,3vw,40px)}
main{width:100%;max-width:1440px;padding-inline:var(--page-gutter);margin:24px auto}
header{padding-inline:var(--page-gutter);gap:clamp(8px,1.4vw,18px)}
header>nav{min-width:0}header>.tag,header>#logout{flex-shrink:0}
#content,.panel,form,details,fieldset,.row>*{min-width:0}
h1,h2,h3,p,dt,dd,li,td,th,summary{overflow-wrap:anywhere}
.row>button,.form-actions>button{max-width:100%;white-space:normal}
nav>button{white-space:nowrap;flex-shrink:0}
.grid{grid-template-columns:repeat(auto-fit,minmax(min(100%,18rem),1fr))}
.request-facts{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:var(--field-gap) 28px;margin:0}
.request-fact{min-width:0;padding:12px 0;border-bottom:1px solid #e0e9eb}
.request-fact dt{color:#667e87;font-size:.8125rem;margin:0 0 6px}
.request-fact dd{margin:0;white-space:pre-wrap;overflow-wrap:anywhere}
.request-fact.fact-wide{grid-column:1/-1}.detail-actions{margin-top:22px}
.detail-actions:empty{display:none}
#content>.row{gap:12px}#content>.row>h1{flex:1 1 14rem}
#content>.row>input{flex:1 1 18rem;width:auto}
.scroll{max-width:100%;overscroll-behavior-inline:contain}
#content table{min-width:560px}td,th{max-width:32rem}
#content .grid>label:has(textarea){grid-column:1/-1}
#content .grid>label>input,#content .grid>label>textarea{max-width:100%}
#content>.panel>.row>input{min-width:min(180px,100%)}
.recipient-row,.period-filters,.appearance-controls{max-width:100%}
.recipient-row{flex-wrap:wrap}.recipient-row label{flex:1 1 15rem}
#id-login,#password-change{margin-inline:auto;width:100%}
#login>h1,#login>button,#demo-login{max-width:38rem;margin-inline:auto}#login>button{display:block;margin-block:12px}
.review-layout{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
.review-layout .grid{grid-template-columns:1fr}
html[data-theme=dark] .request-fact{border-color:#3a3a3a}html[data-theme=dark] .request-fact dt{color:#a6a6a6}
@media(max-width:1050px){.request-facts{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:850px){.review-layout{grid-template-columns:1fr}}
@media(max-width:700px){
 main{margin-block:18px}header{gap:8px}header>b{flex:1}header>.tag{font-size:.65rem}
 nav{order:3;flex-basis:100%}#logout{margin-left:auto}
 .grid{grid-template-columns:1fr}
 th:nth-child(4),td:nth-child(4){display:table-cell}
 .row>button,.form-actions>button{min-height:44px}
 #content>.row:first-child{align-items:center}#content>.row>h1{flex-basis:100%;margin-right:0}
 .home-tile{min-height:120px}
}
@media(max-width:600px){.request-facts{grid-template-columns:1fr;gap:4px}.request-fact{padding-block:12px}}

/* Caption badges remain inline; controls align at the bottom of each grid row. */
.field-caption{display:block;line-height:1.5}.field-caption .field-required{display:inline-block;vertical-align:baseline;white-space:nowrap;font-weight:500;font-size:.6875rem}
.grid>label:not(.drop){justify-content:flex-end}.grid>label>select{margin-top:auto}

.refresh-button,.branch-badge{display:inline-flex;align-items:center;gap:7px}.refresh-button .icon{margin:0}.branch-badge .dot{flex:0 0 12px}.branch-badge{white-space:nowrap}#auth-loading{padding:24px 0;color:#667e87}html[data-theme=dark] #auth-loading{color:#aaa}

.field>.password-control,.password-control{display:flex;align-items:stretch;gap:8px;width:100%;min-width:0}.password-control>input{flex:1 1 0;width:0;min-width:0}.password-control>.password-toggle{display:inline-flex;align-items:center;justify-content:center;flex:0 0 44px;width:44px;min-width:44px;min-height:44px;padding:0;margin:0;border:2px solid var(--input-line,#789a9e);border-radius:8px;background:transparent;color:inherit;cursor:pointer}.password-toggle svg{display:block;flex:none}.password-toggle[aria-pressed="true"]{background:var(--hover,#e5eeed)}.password-toggle:focus-visible{outline:2px solid currentColor;outline-offset:2px}

.ocr-record pre{white-space:pre-wrap;overflow-wrap:anywhere;max-height:24rem;overflow:auto}

.backup-detail{flex-basis:100%;min-width:0}.backup-detail p{overflow-wrap:anywhere;margin:.6em 0}.backup-detail summary{cursor:pointer}

.month-period-control{width:16rem;max-width:100%}

.request-section-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap;margin-bottom:20px}.request-section-heading h2{margin:0}.primary-edit{display:inline-flex;align-items:center;background:#e2f2ef;color:#006d69}.request-secondary-actions{display:flex;gap:12px;flex-wrap:wrap;margin-top:20px;padding-top:18px;border-top:1px solid #d3e1e5}.edit-lock-reason{margin:0 0 20px}.attachment-row{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:14px 0;border-bottom:1px solid #d3e1e5}.attachment-name{display:inline-flex;align-items:center;min-width:0;max-width:100%;text-align:left}.attachment-name span{overflow-wrap:anywhere;min-width:0}.attachment-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap;flex-shrink:0}.attachment-remove{display:inline-flex;align-items:center;color:#975044;border-color:#b67a6e}.original-remove{margin:0 0 16px}.form-attachments h2{margin-top:0}html[data-theme=dark] .primary-edit{background:#343434;color:#fff}html[data-theme=dark] .attachment-remove{color:#efc1b8;border-color:#ad8983}@media(max-width:700px){.attachment-row{align-items:stretch;flex-direction:column;gap:10px}.attachment-actions{flex-shrink:1}.request-section-heading{align-items:flex-start}.request-secondary-actions>button,.attachment-actions>button{max-width:100%;white-space:normal;text-align:left}}

.original-selection{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:end;gap:12px;margin:0 0 18px}.original-selection .original-choice{display:flex;flex-direction:column;gap:6px;min-width:0;margin:0}.original-choice>span{font-size:.875rem}.original-selection select,.original-selection .original-remove{box-sizing:border-box;height:50px;min-height:50px;margin:0;padding:8px 12px;line-height:1.4}.original-selection select{width:100%;min-width:0;max-width:100%}.original-selection .original-remove{display:inline-flex;align-items:center;justify-content:center;white-space:nowrap;align-self:end}.detail-actions [data-action=cancel]{display:inline-flex;align-items:center}.original-selection:has(>.original-choice:only-child){grid-template-columns:minmax(0,1fr)}

/* Align all direct filter controls, including unlabeled selects. */
.row>select{align-self:auto}.admin-filters{align-items:center!important;gap:10px}.admin-filters>input,.admin-filters>select,.admin-filters>button{height:3rem;min-height:3rem;line-height:1.4;margin:0;align-self:center}.admin-filters>input{flex:1 1 14rem!important;width:auto}.admin-filters>select{flex:0 1 auto!important;min-width:0!important;padding-right:2.1em}.admin-filters>button{flex:0 0 auto;white-space:nowrap}.backup-controls{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin-top:18px}
@media(max-width:700px){.admin-filters>input{flex-basis:100%!important}.admin-filters>select{max-width:100%}.admin-filters>button{height:auto}}

/* iOS date controls must fit their grid column, including native inner content. */
form,.panel,label{min-width:0;max-width:100%}
input[type=date],input[type=month],input[type=datetime-local],input[type=time]{display:block;appearance:none;-webkit-appearance:none;box-sizing:border-box;min-width:0;max-width:100%;min-inline-size:0;max-inline-size:100%}
input::-webkit-date-and-time-value{min-width:0;text-align:left;min-height:1.5em}
.field-caption .field-required{font-weight:400;color:#ac3434}
html[data-theme=dark] .field-caption .field-required{color:#ffaaaa}

/* Keep desktop filters in their existing row; phones use one disclosure. */
.list-filter-group,.list-filter-options,.list-filter-options>label{display:contents}
.list-filter-toggle,.list-filter-label,.list-filter-close{display:none}
@media(max-width:700px){
 main{padding-inline:clamp(24px,6vw,32px)}
 .list-filters>#search{flex-basis:100%;max-width:100%!important}
 .list-filter-group{display:block;flex-basis:100%;width:100%;border:1px solid #b6cdd4;border-radius:8px;background:white}
 .list-filter-toggle{display:flex;flex-direction:column;align-items:stretch;gap:5px;text-align:left;width:100%;border:0;border-radius:8px;padding:12px 14px;color:inherit;background:transparent}
 .list-filter-title{display:flex;justify-content:space-between;align-items:center;gap:12px;font-weight:600}
 .list-filter-title::after{content:'⌄';flex:none}
 .is-open .list-filter-title::after{content:'⌃'}
 .list-filter-summary{display:block;white-space:normal;font-size:.75rem;font-weight:400;line-height:1.6}
 .list-filter-options{display:none;padding:0 14px 14px}
 .is-open .list-filter-options{display:grid;gap:12px}
 .list-filter-options>label{display:grid;grid-template-columns:4em minmax(0,1fr);align-items:center;gap:10px}
 .list-filter-label{display:block}
 #content .list-filter-options select{width:100%!important;min-width:0;max-width:100%;margin:0}
 .list-filter-close{display:block;justify-self:end}
 html[data-theme=dark] .list-filter-group{background:#212121;border-color:#565656}
}
/* Separate major sections, while keeping each heading and its actions aligned. */
.listing-heading{align-items:flex-start;margin-bottom:16px}
.listing-heading>h1,.listing-heading>h2{margin-block:0}
.home-tiles+div{margin-bottom:44px}
#content>:is(.panel,form,details)+:is(.panel,form,details),#content>.request-content+.attachments-panel{margin-top:32px}
#content>:is(.panel,form,details)+.listing-heading{margin-top:40px}
#content>.home-guide{margin-top:32px}

.initial-login{border-top:1px solid #b6cdd4;margin-top:28px;padding-top:16px}
/* Show missing input at the field itself, with accessible text. */
[aria-invalid=true]:is(input,select,textarea),.has-field-error.form-attachments{border:2px solid #c83434!important;background:#fff5f5!important}
.field-error{display:block;color:#b52121;font-size:.8125rem;font-weight:600;margin-top:4px}
html[data-theme=dark] [aria-invalid=true]:is(input,select,textarea),html[data-theme=dark] .has-field-error.form-attachments{background:#321e1e!important;border-color:#ee7777!important}
html[data-theme=dark] .field-error{color:#ff9b9b}
.customer-choice{grid-column:1/-1;margin:0 0 14px;padding:16px}
.customer-choice>.row{margin:0 0 14px}.customer-choice>label+label{margin-top:14px}
.customer-choice input[type=radio]{width:20px;height:20px}
.attachment-modes{margin:8px 0 20px;padding:16px;border:1px solid #b6cdd4;border-radius:8px}
.attachment-all{margin-bottom:14px}.attachment-mode-row{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.attachment-mode-row>div{min-width:0;border:1px solid #b6cdd4;border-radius:7px;padding:10px 6px;text-align:center}
.attachment-mode-row strong{display:block;font-size:.875rem;margin-bottom:6px}
.attachment-mode-row label{display:flex;flex-direction:row;justify-content:center;align-items:center;gap:6px;font-size:.75rem}
.as-attached::after{content:'添付通り';color:#667e87;font-size:.8125rem}
.attachment-count{font-weight:600}.attachment-name{gap:14px;flex:1}
.attachment-thumb-slot{display:flex;align-items:center;justify-content:center;width:84px;height:84px;flex-shrink:0;border:1px solid #b6cdd4;border-radius:6px;background:#f4f7f8;overflow:hidden}
.attachment-thumb-slot img,.attachment-thumb-slot canvas{display:block;width:100%;height:100%;object-fit:contain}
.attachment-thumb-slot>.icon{width:28px;height:28px;margin:0}.attachment-size{display:block;margin-top:5px}
@media(max-width:700px){.attachment-modes{padding:12px 8px}.attachment-mode-row>div{padding:9px 3px}.attachment-mode-row label{gap:4px}.attachment-mode-row input[type=checkbox]{width:20px;height:20px}.attachment-thumb-slot{width:76px;height:76px}}

#request[data-kind=invoice] .grid>label:not(.drop){justify-content:flex-start}
[aria-invalid=true]:focus-visible{outline-color:#007d78}
html[data-theme=dark] [aria-invalid=true]:focus-visible{outline-color:#007d78}

/* Invoice intake: one clear next step; less-used tools stay in disclosures. */
.simple-office nav{overflow:visible;flex-wrap:wrap;align-items:center}
.simple-navigation{position:relative;font-size:.875rem}.simple-navigation>summary{display:flex;align-items:center;min-height:48px;padding:10px 14px;border:1px solid #bed2d7;border-radius:7px;background:white;list-style:none}.simple-navigation>summary::after{content:'⌄';margin-left:10px}.simple-navigation[open]>summary{margin-bottom:0}.simple-navigation>div{position:absolute;right:0;top:calc(100% + 8px);z-index:20;display:grid;gap:8px;padding:12px;width:min(290px,calc(100vw - 48px));background:white;border:1px solid #bed2d7;border-radius:8px;box-shadow:0 6px 20px #0002;white-space:normal}.simple-navigation:not([open])>div{display:none}.simple-navigation button{width:100%;min-height:48px;white-space:normal;text-align:left}
.simple-home{margin:24px 0 40px}.simple-home h1{margin-bottom:8px}.simple-home .home-tiles:empty{display:none}.simple-home .home-tile{min-height:64px;display:flex;justify-content:center;align-items:center;max-width:520px;text-align:center;font-size:1.125rem;padding:18px 24px}
#content :is(.primary-next){background:#006e68;color:white;border:2px solid #006e68;min-height:56px;padding:14px 24px;font-size:1.125rem;font-weight:700;display:inline-flex;justify-content:center;align-items:center;gap:6px}.primary-next:hover{filter:brightness(.9)}
.simple-invoice{max-width:820px;margin-inline:auto}.simple-invoice form>.grid{grid-template-columns:1fr;gap:24px}.simple-invoice label{font-size:1rem;gap:8px}.simple-invoice input:not([type=checkbox]):not([type=radio]),.simple-invoice select,.simple-invoice textarea{min-height:52px;font-size:1rem}.simple-invoice .grid>label{align-items:stretch}.simple-invoice select{width:100%;max-width:100%}.simple-invoice textarea{min-height:110px}.simple-invoice .customer-choice{margin:0}.simple-invoice .customer-choice legend{font-weight:700}.simple-invoice .customer-choice>.row{margin-top:0}.simple-invoice label.as-attached{display:none!important}.simple-example{font-size:.875rem}.simple-invoice .attachment-modes{margin:0;padding:16px}.simple-invoice .attachment-mode-row label{font-size:.8125rem}.simple-invoice .attachment-mode-row strong{font-size:.9375rem}.simple-invoice .attachment-mode-row>div{padding:10px 4px}.simple-invoice .form-attachments{margin-top:32px}.simple-invoice .form-attachments>h2{font-size:1.125rem}.simple-invoice .attachment-size{display:none}.simple-invoice .live-total{margin:24px 0;font-size:1rem}.simple-invoice .drop{min-height:150px;padding:22px 12px}.simple-invoice .file-button{min-height:48px;display:flex;align-items:center;font-size:1rem}.simple-invoice #request>p:has(.primary-next){margin-top:32px}.simple-invoice #request>.hint,.simple-invoice #request>small{display:block;margin-top:12px}
.simple-extra{padding:16px 0;border-top:1px solid #d3e1e5;margin-top:24px}.simple-extra>summary{min-height:44px;font-size:1rem;line-height:1.6}.simple-extra-body{display:grid;gap:20px;padding-top:16px}.simple-extra:not([open])>.simple-extra-body{display:none}.simple-extra[open]>summary{margin-bottom:0}.simple-extra-body .request-facts{margin:0}.simple-extra-body>.panel{margin:0}.simple-extra-body .detail-actions:empty{display:none}
.simple-steps{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;padding:0;margin:24px 0 32px;list-style:none}.simple-steps li{display:flex;flex-direction:column;align-items:center;gap:6px;text-align:center;font-size:.875rem;color:#667e87}.simple-steps li>span{display:flex;align-items:center;justify-content:center;border:1px solid #bed2d7;border-radius:50%;width:32px;height:32px;font-size:1rem}.simple-steps [aria-current]{color:#006e68;font-weight:700}.simple-steps [aria-current]>span{background:#006e68;color:white;border-color:#006e68}.simple-send-area{margin:32px 0;text-align:center;padding:20px;border:2px solid #a4c6c8;border-radius:8px;background:white}.simple-send-area p{margin:0 0 18px}.simple-send-area .primary-next{width:100%;max-width:480px}.simple-delivery{padding:16px 20px;border:2px solid #a4c6c8;background:white;border-radius:8px;font-weight:700;font-size:1.125rem}.simple-invoice .request-facts dt{font-size:.875rem}.simple-invoice .request-facts dd{font-size:1rem}.simple-invoice .request-section-heading button,.simple-invoice #back{min-height:48px}.simple-invoice>.simple-extra{background:white;padding:16px 20px;border:1px solid #d3e1e5;border-radius:8px}
.simple-invoice-list .listing-heading>h1,.simple-invoice-list .listing-heading>h2{margin-right:auto}.simple-invoice-list #search{max-width:100%!important;flex:1 1 250px;min-height:52px}.simple-invoice-list .list-filter-group{display:block;flex:0 0 auto;background:white;border:1px solid #b6cdd4;border-radius:8px}.simple-filter-group .list-filter-toggle{display:block;min-height:52px;width:100%;border:0;color:inherit}.simple-filter-group .list-filter-title{display:flex;gap:12px;justify-content:space-between}.simple-filter-group .list-filter-title::after{content:'⌄'}.simple-filter-group.is-open .list-filter-title::after{content:'⌃'}.simple-filter-group .list-filter-options{display:none;padding:14px;width:min(100%,700px)}.simple-filter-group.is-open{flex-basis:100%}.simple-filter-group.is-open .list-filter-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.simple-filter-group .list-filter-options>label{display:flex;flex-direction:column;gap:6px}.simple-filter-group .list-filter-label,.simple-filter-group .list-filter-close{display:block}.simple-filter-group .list-filter-options select{width:100%!important;max-width:100%;min-width:0}.simple-filter-group .list-filter-close{grid-column:1/-1;justify-self:end}.simple-invoice-list #content table,.simple-invoice-list table{min-width:0!important}.simple-invoice-list th:nth-child(4),.simple-invoice-list td:nth-child(4){display:none}.simple-invoice-list .simple-open{min-height:48px;padding:10px 16px}.simple-invoice-list .simple-empty{padding:24px 12px;white-space:normal}.simple-invoice-list .list-extra{margin:24px 0}.simple-invoice-list .scroll{margin-top:24px}.simple-invoice-list .listing-heading{margin-top:32px}.simple-invoice-list #refresh{min-height:48px}.simple-invoice-list td:first-child{overflow-wrap:anywhere}.simple-invoice-list th,.simple-invoice-list td{font-size:1rem}
html[data-theme=dark] :is(.simple-navigation>summary,.simple-navigation>div,.simple-extra,.simple-send-area,.simple-delivery,.simple-invoice-list .list-filter-group){background:#212121;border-color:#565656}html[data-theme=dark] #content .primary-next{background:#efefef;color:#171717;border-color:#efefef}html[data-theme=dark] .simple-steps [aria-current]{color:white}html[data-theme=dark] .simple-steps [aria-current]>span{background:#efefef;color:#171717;border-color:#efefef}
@media(max-width:700px){
 .simple-office header{padding-inline:16px}.simple-office nav{gap:6px}.simple-office nav>button,.simple-navigation>summary{font-size:.8125rem;padding:10px 12px;min-height:48px}.simple-office header>.tag{margin-left:auto}.simple-navigation>div{position:fixed;left:16px;right:16px;top:auto;width:auto}.simple-office main{padding-inline:24px}.simple-invoice .panel,.simple-invoice form{padding:16px}.simple-invoice .attachment-modes{padding:12px 8px}.simple-invoice .attachment-all{font-size:.9375rem}.simple-invoice .attachment-mode-row label{gap:5px;font-size:.75rem}.simple-invoice .request-section-heading{align-items:flex-start}.simple-invoice .request-section-heading h2{margin:0}.simple-invoice .request-section-heading button{padding:10px}.simple-invoice-list .list-filter-group{flex-basis:100%}.simple-invoice-list .scroll{padding:0 14px 18px}.simple-invoice-list table thead{display:none}.simple-invoice-list table tbody{display:grid;gap:12px;padding-top:8px}.simple-invoice-list table tr{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px 12px;padding:18px 0;border-bottom:1px solid #d3e1e5}.simple-invoice-list table td{padding:0!important;border:0}.simple-invoice-list table td:first-child{grid-column:1/-1;font-weight:700}.simple-invoice-list table td:nth-child(2){grid-column:1;grid-row:2}.simple-invoice-list table td:nth-child(3){grid-column:1;grid-row:3}.simple-invoice-list table td:last-child{grid-column:2;grid-row:2/4;align-self:center}.simple-invoice-list .simple-empty{grid-column:1/-1}.simple-invoice-list .listing-heading{gap:12px}.simple-invoice-list .listing-heading:has(#new)>h1{flex-basis:100%}.simple-invoice-list #new{flex:1}.simple-invoice-list .simple-home .home-tile{width:100%;font-size:1.0625rem}.simple-invoice-list .simple-open{padding:10px 12px}.simple-invoice-list .home-guide{padding:14px}
}

.simple-invoice .request-facts{grid-template-columns:repeat(2,minmax(0,1fr))}@media(max-width:600px){.simple-invoice .request-facts{grid-template-columns:1fr}}

.invoice-content-amount{display:grid;grid-template-columns:minmax(0,2fr) minmax(0,1fr);gap:24px;align-items:start}.invoice-content-amount>label{min-width:0}.invoice-content-amount textarea{min-height:110px}.invoice-content-amount .as-attached{display:none!important}.invoice-content-amount:has(>label.as-attached){grid-template-columns:1fr}.invoice-content-amount:has(>label.as-attached):not(:has(>label:not(.as-attached))){display:none}.party-branches{display:flex;gap:8px 24px;flex-wrap:wrap;margin-top:12px}.party-branches>label{display:flex;flex-direction:row;align-items:center;gap:8px}@media(max-width:700px){.invoice-content-amount{grid-template-columns:1fr;gap:24px}}
/* Leave two caption lines in the paired row when larger text wraps the badge. */
@media(min-width:701px){html[data-font=large] .invoice-content-amount:not(:has(>.as-attached))>label>.field-caption,html[data-font=extra] .invoice-content-amount:not(:has(>.as-attached))>label>.field-caption{min-height:3em}}

.simple-unsent-notice{margin:0 0 20px;color:#b42318;font-weight:700;line-height:1.6;overflow-wrap:anywhere}html[data-theme=dark] .simple-unsent-notice{color:#ffaaa3}

/* Current stage stays readable without relying on color alone. */
.request-location{--phase-ink:#305f8b;--phase-bg:#edf4fc;--phase-line:#a7bfd8}
.request-location[data-progress-phase="1"]{--phase-ink:#795516;--phase-bg:#fff6e5;--phase-line:#d5b77b}
.request-location[data-progress-phase="2"]{--phase-ink:#216954;--phase-bg:#eaf6ef;--phase-line:#92c2ae}
.request-location[data-progress-phase="cancelled"]{--phase-ink:#5b6470;--phase-bg:#f0f2f4;--phase-line:#b5bec8}
.request-status{display:inline-block;padding:5px 9px;border:1px solid var(--phase-line);border-radius:6px;background:var(--phase-bg);color:var(--phase-ink);font-size:1rem;font-weight:700;line-height:1.5}
.request-location .progress-steps{display:flex;align-items:center;flex-wrap:wrap;gap:5px;margin-top:7px;font-size:.75rem;white-space:normal;line-height:1.5}
.request-location .progress-steps .current{padding:3px 7px;border:1px solid var(--phase-line);border-radius:5px;background:var(--phase-bg);color:var(--phase-ink);font-size:.9375rem;font-weight:700}
html[data-theme=dark] .request-location{--phase-ink:#c4dfff;--phase-bg:#233449;--phase-line:#7099bf}
html[data-theme=dark] .request-location[data-progress-phase="1"]{--phase-ink:#f1d299;--phase-bg:#3a3020;--phase-line:#aa8b54}
html[data-theme=dark] .request-location[data-progress-phase="2"]{--phase-ink:#b0e2cf;--phase-bg:#203a32;--phase-line:#619c87}
html[data-theme=dark] .request-location[data-progress-phase="cancelled"]{--phase-ink:#d3d9e0;--phase-bg:#30343a;--phase-line:#818b97}
html[data-theme=dark] .request-location .progress-steps .current{color:var(--phase-ink)}

/* Search stays outside; all remaining list tools share one frame. */
.list-filters .unified-list-filters{display:block;flex:0 0 auto;max-width:100%;border:1px solid #b6cdd4;border-radius:8px;background:white}
.unified-list-filters .list-filter-toggle{display:flex;flex-direction:column;align-items:stretch;gap:5px;width:100%;min-height:52px;border:0;background:transparent;color:inherit;padding:12px 14px;text-align:left}
.unified-list-filters .list-filter-title{display:flex;justify-content:space-between;gap:12px;font-weight:600}
.unified-list-filters .list-filter-title::after{content:'⌄'}
.unified-list-filters.is-open .list-filter-title::after{content:'⌃'}
.list-filters .unified-list-filters.is-open{flex-basis:100%}
.list-filters .unified-list-filters .list-filter-options{display:none;width:100%;padding:0 14px 14px}
.list-filters .unified-list-filters.is-open .list-filter-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.list-filters .unified-list-filters .list-filter-options>label{display:flex;flex-direction:column;align-items:stretch;gap:6px;min-width:0}
.unified-list-filters .list-filter-label{display:block}
#content .unified-list-filters :is(select,input[type=month]){width:100%!important;min-width:0;max-width:100%}
.unified-list-filters .list-filter-actions{display:flex;grid-column:1/-1;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;padding-top:16px;border-top:1px solid #d3e1e5}
.unified-list-filters .list-filter-downloads{display:flex;gap:12px;flex-wrap:wrap}
.unified-list-filters .list-filter-close{display:block;margin-left:auto}
html[data-theme=dark] .list-filters .unified-list-filters{background:#212121;border-color:#565656}
html[data-theme=dark] .unified-list-filters .list-filter-actions{border-color:#565656}
@media(max-width:700px){.list-filters .unified-list-filters{flex-basis:100%;width:100%}.list-filters .unified-list-filters.is-open .list-filter-options{grid-template-columns:1fr}.unified-list-filters .list-filter-downloads,.unified-list-filters .list-filter-actions{width:100%}.unified-list-filters .list-filter-downloads button{flex:1;white-space:normal}}

.customer-choice>#standard-party-dates{display:block;margin-top:16px}

.invoice-destination{margin:0;min-width:0;padding:16px}.invoice-destination legend{font-weight:700}.invoice-destination-fields{display:grid;gap:20px;grid-template-columns:1fr}.invoice-destination-fields>label{min-width:0}
.invoice-method{margin:0;min-width:0;padding:16px}.invoice-method legend{font-weight:700}.invoice-method .row{margin:0;gap:16px 24px}.invoice-method label{display:flex;flex-direction:row;align-items:center;gap:8px}.invoice-method .hint{margin-bottom:0}.quote-essential{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:24px}.quote-essential>label{min-width:0}.quote-optional{margin-top:24px}.quote-optional>.simple-extra-body>.simple-extra{margin-top:0}.quote-optional .invoice-content-amount{grid-template-columns:1fr}.quote-reference-note{font-weight:600;margin:0 0 20px}@media(max-width:700px){.quote-essential{grid-template-columns:1fr;gap:24px}.invoice-method .row{gap:14px}}

/* Give invoice field headings a clear hierarchy without enlarging controls or hints. */
.simple-invoice #request legend,.simple-invoice #request .field-caption{font-size:1.125rem;font-weight:700;line-height:1.5}
.simple-invoice #request legend .field-required,.simple-invoice #request .field-caption .field-required{font-size:.6875rem;font-weight:400}
.simple-invoice .request-facts dt{font-size:1.125rem;font-weight:700;line-height:1.5}

.simple-invoice #request textarea[name=description]{resize:none;width:100%;max-width:100%;height:132px;min-height:132px;max-height:132px;overflow:auto;box-sizing:border-box}
.simple-invoice .invoice-content-amount{min-width:0}.simple-invoice .invoice-content-amount>label{min-width:0}

.invoice-method-fields{display:grid;grid-template-columns:minmax(0,1fr);gap:24px;margin-top:24px;min-width:0}.invoice-method .invoice-method-fields label{flex-direction:column;align-items:stretch;min-width:0}.simple-invoice .invoice-method-fields .live-total{margin:0}.invoice-method-fields>.quote-essential{grid-column:1/-1}

.invoice-date-row{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:24px;min-width:0}.invoice-date-row>label{min-width:0}.invoice-supplemental{margin-top:24px}.quote-optional .invoice-supplemental{margin-top:0}@media(max-width:700px){.invoice-date-row{grid-template-columns:minmax(0,1fr)}}

.form-validation-summary{color:#b52121;font-weight:700;margin:0 0 16px}.has-field-error:not(label){border:2px solid #c83434;border-radius:6px;padding:8px}.field-error{white-space:normal}html[data-theme=dark] .form-validation-summary{color:#ff9b9b}

/* Settings only: each expanded level moves its children one step to the right. */
.simple-settings{--settings-indent:18px;display:flex;flex-direction:column;gap:20px}
#content.simple-settings>h1{margin:0}
.simple-settings .settings-primary{display:flex;flex-direction:column;gap:20px}
#content.simple-settings>.panel,.simple-settings .settings-primary>.panel{margin:0}
.simple-settings details[open]>:not(summary){margin-inline-start:var(--settings-indent)}
.simple-settings .settings-details>[data-settings-body]>.panel{padding:14px 0;border:0;border-block-start:1px solid #d3e1e5;border-radius:0;background:transparent;box-shadow:none;margin-block:0}
.simple-settings .settings-details>[data-settings-body]>.panel:first-child{border-block-start:0}
.simple-settings .settings-details>summary{display:list-item}
html[data-theme=dark] .simple-settings .settings-details>[data-settings-body]>.panel{border-color:#3a3a3a}
@media(max-width:600px){.simple-settings{--settings-indent:12px}.simple-settings .settings-details>[data-settings-body]>.panel{padding-block:12px}}
/* Shared trial: keep the help control at the same touch size as other actions. */
.home-guide button{min-height:44px}
button{min-height:44px}

/* A saved form becomes actionable only after a valid change. */
#content button.save-ready{background:#007d78;color:#fff;border-color:#007d78}#content button.save-ready:hover{background:#00685f}#content button.save-idle{background:#edf0f1;color:#71828a;border-color:#d3dce0;cursor:default;opacity:1}#content [data-action=cancel],#content .danger-outline{color:#a33232;border-color:#a33232;background:white}#content [data-action=cancel]:hover,#content .danger-outline:hover{background:#fff0ed}html[data-theme=dark] #content button.save-idle{background:#303538;color:#a5b1b6;border-color:#59636a}html[data-theme=dark] #content [data-action=cancel]{background:#252525;color:#f0b2aa;border-color:#d98980}.config-field-heading{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap}.config-field-heading h3{margin:0}.config-inactive-row{display:flex;align-items:center;gap:12px;justify-content:space-between;padding:12px 0;border-bottom:1px solid #d3e1e5}.draft-save-status:empty{display:none}.draft-save-status{display:inline-block;color:#216954;font-size:.875rem}

.trial-sample-files .sample-links{display:flex;flex-wrap:wrap;gap:10px}.trial-sample-files button{max-width:100%;white-space:normal;overflow-wrap:anywhere;min-height:44px}

#content #save-draft.save-ready{background:transparent;color:#007d78;border-color:#007d78}#content #save-draft.save-ready:hover{background:#e2f2ef}.revision-request h2{margin-top:0}.revision-request p{white-space:pre-wrap;margin-bottom:0}.branch-save-status{color:#216954;margin:8px 0 20px}

.action-dialog .danger-outline{color:#a33232;border-color:#a33232;background:white}.action-dialog .danger-outline:hover{background:#fff0ed}

/* The current section remains visible while its input form is open. */
#nav [aria-current=page]:disabled{opacity:1;background:#e2f2ef;border-color:#94bcb9;color:#006e68;cursor:default}html[data-theme=dark] #nav [aria-current=page]:disabled{background:#343434;color:#fff;border-color:#aaa}

/* Native disclosure marker, matching every other settings section. */
.simple-settings .settings-details>summary{display:list-item;list-style:disclosure-closed inside}.simple-settings .settings-details[open]>summary{list-style-type:disclosure-open}.config-group{margin-block:24px}.config-group h3{margin-bottom:12px}.config-item{border-bottom:1px solid #d3e1e5;padding:10px 0}.config-row{display:grid;grid-template-columns:minmax(0,1fr) auto auto;align-items:center;gap:18px;min-height:44px}.config-row>span{overflow-wrap:anywhere}.config-row>span>small{display:block}.config-row>label{display:flex;flex-direction:row;align-items:center;gap:6px;white-space:nowrap}.config-row-details{margin:6px 0 0 16px;padding:8px 0}.config-row-details>.grid{margin:14px 0}.config-group>[data-add-group]{margin-top:14px}@media(max-width:600px){.config-row{gap:10px}.config-row>span{font-size:.875rem}}
.config-row>.config-name{display:flex;flex-direction:column;align-items:stretch;white-space:normal;min-width:0}.config-name input{width:100%;min-width:0}.config-name>small{white-space:normal}
@media(max-width:600px){.config-row{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.config-row>:first-child{grid-column:1/-1;font-size:1rem}.config-row>span>small{font-size:.875rem}.config-row-details{margin-inline-start:0}}

/* Field captions stay above the controls, even when an inherited label rule uses a row. */
.simple-invoice #request label:not(:has(>input[type=checkbox])):not(:has(>input[type=radio])){display:flex;flex-direction:column;align-items:stretch;min-width:0}
.simple-invoice #request .field-caption{width:100%;min-width:0;overflow-wrap:normal;word-break:normal}
.history-snapshot{margin-top:10px}.history-snapshot .request-facts{margin-top:14px}.history-snapshot dd{white-space:pre-wrap;overflow-wrap:anywhere}

#branches>.branch-row{grid-template-columns:minmax(0,1fr) auto;gap:12px}#deleted-branches{margin-top:20px}#deleted-branches .branch-row{grid-template-columns:minmax(0,1fr) auto} @media(max-width:480px){#branches>.branch-row{gap:8px}#branches>.branch-row>.branch-name{grid-column:1/-1}#branches>.branch-row>button{grid-row:2}}

/* A long saved branch name must not set the trial header's intrinsic width. */
header:has(#role-lab-switch){flex-wrap:wrap}
header:has(#role-lab-switch) nav{flex:1 1 auto;min-width:min(100%,18rem)}
header #role-lab-switch{flex:0 1 22rem;flex-direction:row;align-items:center;min-width:0;max-width:100%}
header #role-lab-switch select{flex:1 1 12rem;min-width:0;width:100%;max-width:100%;height:max(44px,2.75rem);min-height:44px;max-height:max(44px,2.75rem);text-overflow:ellipsis}
@media(max-width:650px){header #role-lab-switch{flex-basis:100%}}

/* Shared settings keep their existing disclosure layout inside headquarters management. */
.management-settings{--settings-indent:18px}
.management-settings>.settings-primary{margin-block:20px}
.management-settings .settings-details>[data-settings-body]>.panel{padding:14px 0;border:0;border-block-start:1px solid #d3e1e5;border-radius:0;background:transparent;box-shadow:none;margin-block:0}
.management-settings .settings-details>[data-settings-body]>.panel:first-child{border-block-start:0}
.management-settings .settings-details>summary{display:list-item;list-style:disclosure-closed inside}
.management-settings .settings-details[open]>summary{list-style-type:disclosure-open}
.management-settings .settings-details details[open]>:not(summary){margin-inline-start:var(--settings-indent)}
html[data-theme=dark] .management-settings .settings-details>[data-settings-body]>.panel{border-color:#3a3a3a}
@media(max-width:600px){.management-settings{--settings-indent:12px}}

/* Keep registration beside its section title, matching the card directory. */
.admin-section-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:20px}
.admin-section-heading h2{margin:0;min-width:0}
.admin-section-heading>button{margin-inline-start:auto;flex:0 0 auto;max-width:100%}
/* Treat the notification wrapper and every management panel as equal rows. */
.management-settings{display:flex;flex-direction:column;gap:20px}
.management-settings>h1{margin:0}
#content.management-settings>.panel,#content.management-settings>.settings-primary,#content.management-settings>.settings-primary>.panel{margin:0}
.management-settings>.settings-primary{display:flex;flex-direction:column;gap:20px}

.invoice-items-editor{min-width:0;margin-top:20px}.invoice-items-cards{display:grid;gap:16px;margin:16px 0}.invoice-item-card,.invoice-item-review{min-width:0;border:1px solid #bed2d7;border-radius:10px;padding:16px;background:var(--panel,#fff)}.invoice-item-card>summary,.invoice-item-review>summary{min-height:44px;overflow-wrap:anywhere;font-weight:700;cursor:pointer}.invoice-item-inputs{margin-top:16px}.invoice-item-inputs label{min-width:0;flex-direction:column!important;align-items:stretch!important}.invoice-item-inputs label:last-child{grid-column:1/-1}.invoice-items-summary{display:block;margin-top:16px;font-weight:700;overflow-wrap:anywhere}.invoice-items-review{margin-top:24px;display:grid;gap:16px}.invoice-items-review h3{margin-bottom:0}.invoice-items-review .request-facts{margin-top:12px}.invoice-request-summary{display:block;white-space:normal;overflow-wrap:anywhere}.invoice-common-period{min-width:0}.invoice-grouping-note{margin-top:0}
@media(max-width:650px){.invoice-item-inputs{grid-template-columns:minmax(0,1fr)}.invoice-item-card,.invoice-item-review{padding:12px}.invoice-items-editor #add-invoice-item{width:100%;min-height:44px}}
.invoice-item-card>.invoice-item-remove{margin-top:16px}
.invoice-items-editor #add-invoice-item{background:#007d78;color:#fff;border-color:#007d78}
.invoice-items-editor #add-invoice-item:hover:not(:disabled){background:#00685f;border-color:#00685f}
.invoice-items-editor #add-invoice-item:disabled{background:#edf0f1;color:#71828a;border-color:#d3dce0;opacity:1}
html[data-theme=dark] .invoice-items-editor #add-invoice-item:disabled{background:#303538;color:#a5b1b6;border-color:#59636a}
html[data-theme=dark] .invoice-item-card,html[data-theme=dark] .invoice-item-review{background:#212121;color:#f2f2f2;border-color:#565656}

/* Plain file selection for invoice forms and invoice detail only. */
.simple-office .drop.file-picker-plain{gap:10px;cursor:default}
.simple-office .file-picker-plain .file-button{border:0;border-radius:0;background:transparent;color:#007d78;padding:10px 18px;min-height:44px;justify-content:center;font:inherit}
.simple-office .file-picker-plain .file-button:hover{text-decoration:underline}
.simple-office .drop.file-picker-plain:focus-within{outline:0}
html[data-theme=dark] .file-picker-plain .file-button{color:#f2f2f2}
/* Keep modal geometry and controls independent of original-image zoom. */
.file-preview[open]{display:flex;flex-direction:column;gap:12px;width:min(1100px,calc(100vw - 24px));height:min(820px,calc(100dvh - 24px));max-width:calc(100vw - 24px);max-height:calc(100dvh - 24px);padding:16px;overflow:hidden}
.file-preview .preview-header{flex:none;min-height:44px;flex-wrap:nowrap;gap:12px}
.file-preview .preview-header h2{flex:1;min-width:0;margin:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.file-preview .preview-header button{flex:none;min-height:44px}
.file-preview .preview-pane{flex:1;min-width:0;min-height:0;display:grid;grid-template-rows:auto auto minmax(0,1fr);gap:8px;overflow:hidden}
.file-preview .viewer-controls{position:static;display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:8px;padding:0;align-items:center}
.file-preview .viewer-controls button,.file-preview .viewer-controls a{min-width:0;min-height:44px;display:flex;align-items:center;justify-content:center}
.file-preview .viewer-controls span{text-align:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.file-preview .preview-pane>p{margin:0}
.file-preview .original-stage{min-width:0;min-height:0;max-height:none;overflow:auto;overscroll-behavior:contain}
.file-preview .original-stage img{max-height:none;margin:0 auto}
.file-preview .original-stage canvas{margin:0 auto}
.file-preview :is(button,a):focus-visible{outline:2px solid #007d78;outline-offset:2px}
@media(max-width:600px){.file-preview[open]{padding:12px}.file-preview .viewer-controls{grid-template-columns:repeat(3,minmax(0,1fr))}}

.file-preview .original-stage:focus-visible{outline:2px solid #007d78;outline-offset:-2px}

.file-preview .original-stage.can-pan>img,.file-preview .original-stage.can-pan>canvas{cursor:grab}
.file-preview .original-stage.is-panning,.file-preview .original-stage.is-panning>img,.file-preview .original-stage.is-panning>canvas{cursor:grabbing;user-select:none}

/* Keep the attachment title on its outer border, like the existing form groups. */
.simple-invoice #request .form-attachments{min-inline-size:0}
/* Shared groups use the same inner width and 24px column gap as quote fields. */
@media(min-width:701px){.simple-invoice .invoice-common-period,.simple-invoice .invoice-issue-method{width:calc((100% - 24px)/2)}}

.invoice-issue-group{min-inline-size:0;margin:0;padding:16px}
.simple-invoice .customer-choice>.invoice-common-period{margin-top:20px}
.simple-invoice .customer-choice>.invoice-grouping-note{margin:14px 0 0}

.invoice-supplemental{min-inline-size:0;padding:16px}.invoice-supplemental>legend{font-weight:700}.invoice-supplemental>.simple-extra-body{display:grid}

/* Match input-group borders without adding another outer panel. */
.simple-invoice #request .form-attachments{padding:16px;border-color:#d3e1e5;border-radius:6px}
html[data-theme=dark] .simple-invoice #request .form-attachments{border-color:#3a3a3a}
#party-form>.party-scope,#branch-form>fieldset{padding:16px}
.request-section-heading .simple-unsent-notice{margin:0;flex:1 1 240px;font-size:1.125rem}
@media(max-width:700px){.request-section-heading .simple-unsent-notice{order:3;flex-basis:100%}.request-section-heading #edit{margin-left:auto}}

/* Compact, labelled export tools live in the saved-content heading. */
.request-output-panel{margin-left:auto;max-width:100%;min-width:0}
.request-output-actions{display:flex;align-items:center;gap:4px}
.request-output-panel .request-output-actions button{display:inline-flex;align-items:center;justify-content:center;flex:none;width:44px;min-width:44px;min-height:44px;padding:9px;border:1px solid transparent;background:transparent;color:#007d78;border-radius:6px}
.request-output-panel .request-output-actions button:hover{background:#e2f2ef;border-color:#bed2d7}
.request-output-actions .icon{width:22px;height:22px;margin:0}
.output-a11y{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip-path:inset(50%);white-space:nowrap;border:0!important}
.request-output-panel [data-output-error]{max-width:320px;white-space:normal;color:#ac3434;font-size:.875rem;margin:8px 0 0}
.action-dialog .form-actions{justify-content:flex-end;gap:12px}
.action-dialog .form-actions>button{min-height:44px;white-space:normal}
.action-dialog button.primary-confirm{background:#006e68;border:2px solid #006e68;color:#fff;font-weight:600}
.action-dialog button.primary-confirm:hover{background:#005b56;border-color:#005b56}
.simple-invoice-list .simple-open{white-space:nowrap;min-width:64px}
.simple-invoice-list .request-status{white-space:nowrap}
html[data-theme=dark] .request-output-panel .request-output-actions button{color:#d5efef}
html[data-theme=dark] .request-output-panel .request-output-actions button:hover{background:#343434;border-color:#565656}
html[data-theme=dark] .request-output-panel [data-output-error]{color:#ffaaaa}
html[data-theme=dark] .action-dialog .danger-outline{background:#252525;color:#f0b2aa;border-color:#d98980}
@media(max-width:700px){.request-section-heading .request-output-panel{order:1}.request-section-heading #edit{order:2}.request-section-heading .simple-unsent-notice{order:3}}

/* Anchor export tools to the content frame, independently of the heading text. */
.simple-invoice .request-content{position:relative}
.request-content .request-section-heading{padding-right:104px;min-height:44px;align-items:flex-start}
.request-content .request-output-panel{position:absolute;top:var(--panel-space,20px);right:var(--panel-space,20px);margin:0;max-width:none}
.request-content .request-output-actions{justify-content:flex-end}
.request-content .request-output-panel [data-output-error]{position:absolute;right:0;top:44px;width:min(320px,calc(100vw - 100px));background:white;border:1px solid #ac3434;border-radius:6px;padding:10px;box-shadow:0 3px 12px #0002;z-index:2}
html[data-theme=dark] .request-content .request-output-panel [data-output-error]{background:#252525;border-color:#ffaaaa}
@media(max-width:700px){.request-content .request-section-heading{padding-right:0}.request-content .request-section-heading h2{padding-right:100px;max-width:100%;min-height:44px;align-content:center}.request-content .simple-unsent-notice{order:1}.request-content #edit{order:2}}

/* Keep the frame-corner tools aligned with the edit button's top edge. */
@media(max-width:700px){.request-content .request-output-panel{top:16px;right:16px}}
.simple-send-area>p{text-align:left}
.simple-delivery.send-success{background:#e2f2ef;border-color:#5c9994;color:#164b43}
html[data-theme=dark] .simple-delivery.send-success{background:#173f3b;border-color:#60998d;color:#d4f4e9}

.config-custom-format{margin-top:10px}.config-format-toolbar{display:flex;align-items:flex-end;gap:14px;flex-wrap:wrap}.config-format-toolbar>label{width:112px;min-width:0;margin:0}.config-format-toolbar>button{display:inline-flex;align-items:center;gap:8px;white-space:nowrap}.config-custom-format>[data-options-for]{display:block;margin-top:14px}.config-custom-format>small{display:block;margin-top:10px}

#content .unified-list-filters .list-filter-title{align-items:center}#content .unified-list-filters .list-filter-title::after{content:"";width:.75em;height:.5em;flex:none;background:currentColor;clip-path:polygon(0 0,100% 0,50% 100%);transform:none}#content .unified-list-filters.is-open .list-filter-title::after{transform:rotate(180deg)}.unified-list-filters .list-filter-controls{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin-left:auto}.unified-list-filters .list-filter-controls button{white-space:nowrap}

#content .primary-register:not(:disabled){background:#006e68;border-color:#006e68;color:#fff;font-weight:600}#content .primary-register:not(:disabled):hover{background:#005b56;border-color:#005b56}.monthly-submission>h2{margin-top:0}.monthly-submission{margin-top:24px}

.help>.usage-section{border-top:1px solid #d3e1e5;padding:24px 0}.help>.usage-section:last-child{padding-bottom:0}.usage-section>h3{margin:0 0 18px}.usage-layout{display:grid;grid-template-columns:180px minmax(0,1fr);gap:24px;align-items:start}.guide-figure{margin:0;width:180px;max-width:100%}.guide-figure figcaption{font-size:.75rem;color:#667e87;margin-top:8px}.guide-image-button{display:block;position:relative;width:100%;padding:0;border:1px solid #b6cdd4;border-radius:8px;overflow:hidden;background:#f4f8f8;line-height:0}.guide-image-button img,.guide-enlarged img{display:block;width:100%;height:auto}.guide-marker,.guide-step-number{display:inline-flex;align-items:center;justify-content:center;min-width:24px;height:24px;border-radius:50%;background:#a33232;color:white;border:2px solid white;font-weight:700;font-size:14px;line-height:1;box-shadow:0 1px 4px #0004}.guide-marker{position:absolute;transform:translate(-50%,-50%);pointer-events:none}.guide-steps{margin:0;padding:0;list-style:none}.guide-steps>li{display:flex;align-items:flex-start;gap:10px;margin:0 0 18px}.guide-step-number{flex:none}.usage-layout p{margin:16px 0 0}.usage-image-dialog{width:min(440px,calc(100vw - 32px));max-height:calc(100dvh - 32px);overflow:auto;border:1px solid #b6cdd4;border-radius:12px;padding:18px;background:white;color:inherit}.usage-image-dialog::backdrop{background:#0009}.usage-image-dialog>h2{font-size:1.1rem;margin:0 0 16px}.guide-enlarged{position:relative;width:100%;line-height:0}.usage-image-dialog>.form-actions{justify-content:flex-end;margin-top:16px}.usage-image-dialog .guide-close{min-width:80px}.guide-enlarged .guide-marker{min-width:28px;height:28px;font-size:16px}
@media(max-width:650px){.usage-layout{grid-template-columns:1fr;gap:20px}.guide-figure{justify-self:center}.usage-section>h3{font-size:1.05rem}}
html[data-theme=dark] .help>.usage-section{border-color:#565656}html[data-theme=dark] .usage-image-dialog{background:#212121;color:#f2f2f2}html[data-theme=dark] .guide-figure figcaption{color:#b9cdd2}

.usage-image-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;position:sticky;top:-18px;padding:0 0 12px;background:inherit;z-index:2}.usage-image-heading>h2{font-size:1.05rem;margin:0}.usage-image-heading>.guide-close{flex:none}

.trial-toolbar[hidden]{display:none!important}
.trial-toolbar{margin:16px 0 0;padding:0 40px}
.connection-strip[hidden]{display:none!important}
.trial-toolbar-actions{display:flex;flex-wrap:wrap;gap:12px;align-items:center}
.trial-toolbar-actions button{min-height:44px;margin:0;padding:10px 18px;white-space:normal}
.trial-toolbar [role=status]{margin:8px 0 0;color:var(--muted);font-size:.9rem}
.trial-toolbar [role=status]:empty{display:none}
#role-lab-switch{margin-inline-start:auto;display:flex;align-items:center;gap:8px;flex-wrap:wrap;font-size:.9rem}
#role-lab-switch select{width:auto;min-width:180px;min-height:44px;margin:0}
#logout{display:none!important}
@media(max-width:650px){.trial-toolbar{padding:0 16px;margin-top:12px}.trial-toolbar-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.trial-toolbar-actions button{width:100%;padding:10px 12px;font-size:.875rem}.trial-toolbar-actions button:last-child{grid-column:1/-1}#role-lab-switch{flex-basis:100%;align-items:stretch}#role-lab-switch select{width:100%;min-width:0}}
