*{box-sizing:border-box}body{margin:0;background:#f0f4f8;color:#182e46;font:16px/1.7 system-ui,sans-serif}header{background:#14263e;color:white;padding:18px clamp(16px,5vw,50px);display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:12px}header small{color:#bed7ee}main{max-width:760px;margin:32px auto;padding:0 18px}section{background:white;padding:24px;border:1px solid #d7e1eb;border-radius:14px}h1{margin:0 0 12px;font-size:24px}form{display:grid;gap:14px;max-width:450px}label{display:grid;gap:6px}input,button{font:inherit;padding:10px 13px;border-radius:8px;border:1px solid #bacbdb}button{background:#176ba1;color:white;cursor:pointer}button:disabled{opacity:.6;cursor:wait}.bar{display:flex;justify-content:space-between;align-items:center}ul{padding:0;list-style:none}li{border-top:1px solid #e0e6ed;padding:12px 0;white-space:pre-wrap;overflow-wrap:anywhere}.foot,#revision{color:#52677c;font-size:14px}#status{min-height:1.7em}
[hidden]{display:none!important}#workspace form{margin:18px 0;padding:16px;border:1px solid #d7e1eb;border-radius:10px;max-width:none}textarea{font:inherit;padding:10px 13px;border-radius:8px;border:1px solid #bacbdb;resize:vertical;width:100%}.note-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:10px}.note-actions button{font-size:14px;padding:6px 12px}#workspace form h2{margin:0;font-size:20px}#workspace form p{margin:0;color:#52677c;font-size:14px}

.cloud-tabs{display:flex;gap:10px;flex-wrap:wrap;margin:12px 0 22px;padding-bottom:14px;border-bottom:1px solid #d7e1eb}.cloud-tabs button:disabled{opacity:1;background:#14263e;cursor:default}.cloud-tabs+div,.cloud-tabs+div+div{min-width:0}#workspace table{border-collapse:collapse;width:100%;font-size:14px;min-width:560px}#workspace th,#workspace td{text-align:right;padding:8px;border-bottom:1px solid #d7e1eb;overflow-wrap:anywhere}#workspace th{background:#eaf1f7}#workspace td button{font-size:13px;padding:6px 9px}#workspace div:has(>table){overflow-x:auto;margin-top:16px}#workspace select{font:inherit;padding:10px 13px;border:1px solid #bacbdb;border-radius:8px;background:white;color:#182e46}#workspace input[type=search]{max-width:100%;margin:0 0 12px 8px}#workspace h3{margin:0}main:has(.cloud-tabs){max-width:1100px}

#workspace form>div{display:grid;gap:12px}#workspace input[type=checkbox]{width:20px;height:20px;accent-color:#176ba1}#workspace input[type=date],#workspace select{margin-inline-end:8px;margin-block-end:8px;max-width:100%}#workspace form select{margin:0;width:100%}#workspace form input{width:100%}#workspace form input[type=checkbox]{width:20px}

.loading-card{border:1px solid #d7e1eb;border-radius:12px;padding:16px;margin-block:14px;background:#f7fafd}.loading-card>h3{margin-block-end:12px!important}.loading-trip{padding:12px;background:white;border:1px solid #d7e1eb;border-radius:8px;margin-block:12px}.loading-trip p{margin:6px 0;overflow-wrap:anywhere}.loading-trip details{margin-top:10px;font-size:14px;color:#52677c}.loading-trip summary{cursor:pointer}.loading-trip>strong{color:#14263e}

.count-negative{color:#b42318;font-weight:700;background:#fef3f2}.count-positive{color:#166534;font-weight:700;background:#f0fdf4}#workspace form table{min-width:840px}#workspace textarea{box-sizing:border-box;max-width:100%}#workspace input[type=datetime-local]{max-width:100%}

.cash-totals{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:12px;margin:16px 0}.cash-tile{display:grid;gap:6px;border:1px solid #d7e1eb;border-radius:10px;background:#f7fafd;padding:14px}.cash-tile span{font-size:14px;color:#52677c}.cash-tile strong{font-size:22px;overflow-wrap:anywhere;font-variant-numeric:tabular-nums}.cash-tile strong.count-negative{padding:2px 5px;border-radius:5px}

/* Original shell adaptations: legacy cloud screen controls retain their behavior. */
body{font-family:"Segoe UI Variable","Segoe UI",Tahoma,Arial,sans-serif;font-size:14px;line-height:1.6;background:var(--bg);color:var(--text)}
body:has(.cloud-shell:not([hidden])){overflow:hidden}
.cloud-shell{height:100dvh;min-width:0;grid-template-columns:260px minmax(0,1fr);overflow:hidden}
.cloud-shell .main-side{min-height:0;min-width:0}
.cloud-shell #workspace{display:flex;flex-direction:column;flex:1;min-height:0;min-width:0;padding:0;border:0;border-radius:0;background:var(--bg)}
.cloud-shell .topbar{flex-shrink:0;background:var(--surface);color:var(--text);padding:18px 26px 14px}
.cloud-shell .topbar h1{font-size:21px;margin:2px 0 0}
.cloud-shell .topbar .icon-btn{background:var(--surface);color:var(--text);padding:0}
.cloud-shell .side-nav .nav-link,.cloud-shell .side-footer .nav-link,.cloud-shell .nav-quiet{background:transparent;border:0;color:#bdcee1;padding:11px 13px;font-weight:500}
.cloud-shell .nav-link.active{background:linear-gradient(90deg,#1763b0,#207cbd);color:#fff}
.cloud-shell .nav-link:hover,.cloud-shell .nav-quiet:hover{background:#253754;color:white}
.cloud-shell .cloud-tabs{margin:0;padding:0 26px 8px;gap:5px;flex-wrap:nowrap;overflow:auto;flex-shrink:0;background:var(--surface)}
.cloud-shell .cloud-tabs .workspace-tab{background:transparent;color:var(--muted);padding:12px 15px 10px;border:1px solid transparent}
.cloud-shell .cloud-tabs .workspace-tab:disabled{opacity:1;cursor:default;background:linear-gradient(180deg,rgba(28,129,189,.1),rgba(28,129,189,.02));color:var(--blue);border-color:rgba(34,131,194,.15)}
.cloud-shell .cloud-tabs .workspace-tab:disabled:after{content:"";position:absolute;inset-inline:14px;bottom:0;height:3px;border-radius:3px;background:#198bca}
.cloud-shell .cloud-content{width:100%;max-width:none;margin:0;padding:24px 26px;min-height:0;overflow:auto}
.cloud-shell .cloud-content>div:not([hidden]){background:var(--surface);border:1px solid var(--border);border-radius:14px;box-shadow:var(--shadow);padding:20px;min-width:0}
.cloud-shell .cloud-content h2{font-size:18px;margin:0 0 12px}
.cloud-shell .cloud-content h3{font-size:15px;margin-block:16px 8px}
.cloud-shell .cloud-content button{background:var(--blue);border-color:var(--blue);font-size:13px;font-weight:600;min-height:36px;padding:7px 13px}
.cloud-shell .cloud-content input,.cloud-shell .cloud-content select{width:auto;max-width:100%}
.cloud-shell .cloud-content label input,.cloud-shell .cloud-content label select,.cloud-shell .cloud-content label textarea{width:100%}
.cloud-shell #workspace table{font-size:12px;min-width:560px}
.cloud-shell #workspace th{background:#f4f7fb;color:#586a81;padding:12px}
.cloud-shell #workspace td{padding:10px 12px;border-color:#edf1f6}
.cloud-shell #workspace tbody tr:hover{background:#f6fafe}
.cloud-shell .bottomline{flex-shrink:0;padding:8px 22px;overflow-wrap:anywhere}
.cloud-auth-main{max-width:480px!important;margin:24px auto;padding:0 18px}
.cloud-auth-main #login.auth-card{width:100%;margin:auto;text-align:center;padding:28px}
.cloud-auth-main #login label{text-align:right}
.cloud-auth-main #login input{width:100%}
.cloud-auth-main #status{font-size:13px;text-align:center}
.cloud-shell.collapsed .nav-quiet>span:first-child{display:inline-block}
@media(min-width:761px) and (max-width:1050px){.cloud-shell{grid-template-columns:76px minmax(0,1fr)}.cloud-shell .nav-quiet>span:first-child{display:inline-block}}
@media(max-width:760px){.cloud-shell,.cloud-shell.collapsed{display:flex;min-width:0}.cloud-shell .main-side{width:100%}.cloud-shell .sidebar{position:fixed;inset-block:0;inset-inline-start:0;width:min(280px,85vw);z-index:20;display:none;box-shadow:0 0 0 100vmax rgba(18,29,49,.3)}.cloud-shell.mobile-open .sidebar{display:flex}.cloud-shell .sidebar .side-brand>div:not(.brand-mark),.cloud-shell .sidebar .side-workspace,.cloud-shell .sidebar .nav-link>span:not(.nav-ico),.cloud-shell .sidebar .nav-quiet>span{display:block}.cloud-shell .sidebar .nav-link{justify-content:flex-start}.cloud-shell .topbar{padding:12px}.cloud-shell .topbar h1{font-size:17px}.cloud-shell .top-title{gap:9px}.cloud-shell .breadcrumb{font-size:10px}.cloud-shell .today-label{display:none}.cloud-shell .cloud-tabs{padding:0 8px 6px}.cloud-shell .cloud-content{padding:10px}.cloud-shell .cloud-content>div:not([hidden]){padding:12px}.cloud-shell .bottomline{padding:6px 12px}.cloud-shell .top-actions{gap:6px}.cloud-shell .avatar{width:30px;height:30px}}

/* Directory tables follow the desktop fixed-width / horizontal scrolling model. */
.cloud-shell .directory-panel{min-width:0;max-width:100%}
.cloud-shell .directory-panel .table-wrap{max-width:100%;overflow:auto;max-height:62vh}
.cloud-shell .directory-panel table{border-collapse:separate;border-spacing:0}
.cloud-shell .directory-panel th{position:sticky;top:0;z-index:1}
.cloud-shell .directory-panel .vehicle-assets-table th,.cloud-shell .directory-panel .vehicle-assets-table td{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.cloud-shell .cloud-content .directory-sort{border:0;background:transparent;color:inherit;min-height:0;padding:0;white-space:nowrap;font-weight:700;font-size:12px}
.cloud-shell .cloud-content .directory-sort:hover{color:var(--blue)}
.cloud-shell .cloud-content .column-customizer-buttons button,.cloud-shell .cloud-content .toolbar button:not(.primary){background:white;color:var(--text);border:1px solid var(--border)}
.cloud-shell .cloud-content .column-customizer-choice input[type=checkbox]{width:16px;height:16px;margin:0}
.cloud-shell .cloud-content .toolbar{margin:12px 0;flex-wrap:wrap}
.cloud-shell .cloud-content .toolbar .search{min-width:min(240px,100%);margin:0}

.cloud-shell .loading-matrix{min-width:1020px!important}
.cloud-shell .loading-matrix td{vertical-align:top;white-space:normal;max-width:none}
.cloud-shell .loading-matrix td:last-child{min-width:350px;max-width:600px}
.cloud-shell .loading-matrix .loading-trip{margin:0 0 8px;padding:9px;background:#f7fafd;border:1px solid var(--border);border-radius:9px}
.cloud-shell .loading-matrix td>p{margin:3px 0;font-size:11px;color:var(--muted)}
.cloud-shell .loading-matrix .note-actions{margin-top:6px}
.cloud-shell .loading-matrix .note-actions button{min-height:30px;padding:4px 9px;font-size:12px}
.cloud-shell .loading-matrix details{white-space:normal;overflow-wrap:anywhere}

.global-search-dialog{width:min(720px,calc(100vw - 24px));max-height:84dvh;overflow:auto;border:1px solid var(--border);border-radius:16px;padding:20px;background:var(--surface);color:var(--text);box-shadow:0 20px 70px #14263e44;direction:rtl}
.global-search-dialog::backdrop{background:#121d3180}
.global-search-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:16px}
.global-search-head h2{margin:0;font-size:20px}
.global-search-head button{background:transparent;color:var(--text);border:1px solid var(--border);border-radius:8px;min-width:36px;font-size:20px}
.global-search-dialog .toolbar{display:flex;gap:8px;flex-wrap:wrap}
.global-search-dialog .toolbar input{flex:1;min-width:160px}
.global-search-dialog .toolbar select{width:auto;max-width:100%}
.global-search-results{display:grid;gap:8px}
.global-search-result{display:grid;gap:4px;border:1px solid var(--border);border-radius:10px;padding:12px;overflow-wrap:anywhere}
.global-search-result small{color:var(--muted)}
.global-search-result p{margin:0;white-space:pre-wrap}
.global-search-result button{justify-self:start}
.cloud-shell .global-search-trigger{color:var(--text);background:var(--surface);border:1px solid var(--border);border-radius:8px;white-space:nowrap;font-size:12px;padding:8px}
@media(max-width:760px){.global-search-dialog{padding:12px}.global-search-dialog .toolbar input{width:100%}.cloud-shell .global-search-trigger{font-size:11px;padding:6px}}

.asset-bulk-panel{background:var(--surface2);border:1px solid var(--border);border-radius:12px;padding:16px;margin:14px 0}.asset-bulk-panel>input,.asset-bulk-panel>button{margin:5px}.asset-bulk-panel table td:last-child{min-width:260px;white-space:normal;overflow-wrap:anywhere}.asset-bulk-panel input[type=file]{max-width:100%}

/* Locale follows logical document direction; operational values retain their original text. */
.language-toggle{border:1px solid var(--border);border-radius:8px;background:var(--surface);color:var(--text);font-size:12px;padding:7px 10px;white-space:nowrap;cursor:pointer}.cloud-auth-main .language-toggle{display:block;margin-inline-start:auto;margin-block-end:8px}.cloud-shell .top-actions .language-toggle{flex:0 0 auto}html[dir=ltr] .global-search-dialog{direction:ltr}html[dir=ltr] #workspace th,html[dir=ltr] #workspace td,html[dir=ltr] .cloud-auth-main #login label{text-align:left}html[dir=ltr] .cloud-shell .sidebar{text-align:left}html[dir=ltr] .cloud-shell .top-title,html[dir=ltr] .cloud-shell .top-actions{direction:ltr}@media(max-width:760px){.language-toggle{font-size:11px;padding:5px 7px}.cloud-shell .topbar .top-actions{flex-wrap:wrap;justify-content:flex-end}.cloud-shell .top-title{min-width:0}.cloud-shell .topbar h1{overflow-wrap:anywhere}.cloud-shell .topbar .avatar{display:none}}

/* Local appearance preferences: retain the original Windows theme tokens. */
body[data-ui-font="85"]{--ui-font:0.85}body[data-ui-font="100"]{--ui-font:1}body[data-ui-font="110"]{--ui-font:1.1}body[data-ui-font="120"]{--ui-font:1.2}body[data-ui-font="135"]{--ui-font:1.35}
body[data-ui-font]{font-size:calc(14px * var(--ui-font))}
body[data-ui-font] .cloud-shell #workspace table,body[data-ui-font] .cloud-shell .directory-sort{font-size:calc(12px * var(--ui-font))}
body[data-ui-font] .cloud-shell .cloud-content button,body[data-ui-font] .cloud-shell .nav-link,body[data-ui-font] .cloud-shell .workspace-tab{font-size:calc(13px * var(--ui-font))}
body[data-ui-font] .cloud-shell .cloud-content h3{font-size:calc(15px * var(--ui-font))}
body.dark{color-scheme:dark}
body.dark section,body.dark #workspace form,body.dark input,body.dark textarea,body.dark #workspace select,body.dark .global-search-dialog select{background:var(--surface);color:var(--text);border-color:var(--border)}
body.dark .cloud-shell #workspace th,body.dark .cloud-shell .bottomline{background:var(--surface2);color:var(--text)}
body.dark .cloud-shell #workspace td,body.dark li{border-color:var(--border)}
body.dark .cloud-shell #workspace tbody tr:hover,body.dark .loading-card,body.dark .cash-tile,body.dark .cloud-shell .loading-matrix .loading-trip,body.dark .loading-trip{background:var(--surface2);border-color:var(--border)}
body.dark .cloud-shell .cloud-content .toolbar button:not(.primary),body.dark .cloud-shell .cloud-content .column-customizer-buttons button{background:var(--surface);color:var(--text);border-color:var(--border)}
body.dark #workspace form p,body.dark .cash-tile span,body.dark .loading-trip details,body.dark .foot,body.dark #revision{color:var(--muted)}
body.dark .loading-trip>strong{color:var(--text)}
body.dark .count-negative{background:#522c32;color:#ffb2b5}body.dark .count-positive{background:#173f32;color:#a4f2cc}
body.dark .cloud-shell .cloud-tabs .workspace-tab:disabled{color:#9bd6ff;background:#263d56}
.cloud-shell .side-footer{max-height:40vh;overflow:auto}

.setup-readiness{border:1px solid var(--border);border-radius:12px;padding:14px;margin-block-end:18px}.setup-step{display:grid;grid-template-columns:2rem minmax(0,1fr) minmax(3rem,auto) auto;align-items:center;gap:10px;padding:9px 4px;border-block-start:1px solid var(--border)}.setup-step>span{font-variant-numeric:tabular-nums}.setup-step>span:first-child{color:var(--muted)}@media(max-width:520px){.setup-step{grid-template-columns:1.5rem minmax(0,1fr) auto;gap:6px}.setup-step button{grid-column:2 / -1;justify-self:start}}

/* Responsive parity: keep each wide data grid inside its own accessible scroll region. */
.cloud-shell .cloud-content{min-width:0;overscroll-behavior:contain}
.cloud-shell .cloud-content>div:not([hidden]),.cloud-shell .cloud-content form,.cloud-shell .cloud-content form>div,.cloud-shell .cloud-content label{min-width:0}
.cloud-shell .cloud-content .cloud-table-scroll,.global-search-dialog .cloud-table-scroll{width:100%;max-width:100%;min-width:0;overflow:auto;max-height:60dvh;overscroll-behavior-x:contain;border:1px solid var(--border);border-radius:10px;margin-block:10px 16px;scrollbar-width:thin}
.cloud-table-scroll>.cloud-data-table{width:100%;border-collapse:separate!important;border-spacing:0}
.cloud-table-scroll th{position:sticky;top:0;z-index:1;text-align:start!important}
.cloud-table-scroll td{text-align:start!important;vertical-align:top;max-width:420px;overflow-wrap:anywhere}
.cloud-table-scroll:focus-visible,.cloud-shell button:focus-visible,.cloud-shell summary:focus-visible{outline:2px solid var(--bright);outline-offset:2px}
.table-wrap:has(>.cloud-table-scroll){max-height:none;overflow:visible}
.cloud-shell .cash-tile{position:relative;min-width:0;background:var(--surface);border-color:var(--border);padding:16px 18px;box-shadow:var(--shadow);border-radius:14px}
.cloud-shell .cash-tile:before{content:"";position:absolute;inset-inline-start:0;inset-block:0;width:4px;background:var(--bright);border-start-start-radius:14px;border-end-start-radius:14px}
.cloud-shell .cash-tile span{color:var(--muted)}
.cloud-shell .cloud-content button[type=submit]{background:var(--blue);color:#fff}
.cloud-shell .cloud-content button:disabled{cursor:not-allowed}
.cloud-nav-backdrop{position:fixed;inset:0;z-index:19;background:rgba(18,29,49,.48);border:0;border-radius:0;padding:0;display:block}
.cloud-shell .sidebar{box-shadow:none}
@media(min-width:761px) and (max-width:1050px){.cloud-shell:not(.collapsed){grid-template-columns:220px minmax(0,1fr)}.cloud-shell.collapsed{grid-template-columns:76px minmax(0,1fr)}.cloud-shell .side-brand{padding-inline:14px}}
@media(max-width:760px){
 .cloud-shell .sidebar{box-shadow:0 12px 40px #121d3150}
 .cloud-shell.mobile-open .sidebar{display:flex}
 .cloud-shell .sidebar .side-nav{overscroll-behavior:contain}
 .cloud-shell .cloud-content .cash-totals{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
 .cloud-shell .cash-tile{padding:12px;box-shadow:none}
 .cloud-shell .cash-tile strong{font-size:19px}
 .cloud-shell .topbar{align-items:flex-start}
 .cloud-shell .top-actions{flex-shrink:0;max-width:48%}
 .cloud-shell .cloud-content button,.cloud-shell .cloud-content select,.cloud-shell .cloud-content input:not([type=checkbox]){min-height:44px}
 .cloud-shell .cloud-content input[type=date],.cloud-shell .cloud-content input[type=datetime-local]{max-width:100%}
 .cloud-shell .cloud-content .toolbar>*{max-width:100%;min-width:0}
 .cloud-shell .cloud-content form{padding:12px}
 .cloud-shell .cloud-content .dossier-crew,.cloud-shell .cloud-content .dossier-grid{grid-template-columns:minmax(0,1fr)}
 .cloud-shell .cloud-content .dossier-head{padding:14px;flex-wrap:wrap}
 .cloud-shell .cloud-content .dossier-event{grid-template-columns:minmax(0,1fr)}
 .cloud-shell .cloud-content .dossier-event span:last-child{grid-column:auto}
 .cloud-shell .cloud-content .cloud-table-scroll{max-height:65dvh}
 .cloud-auth-main #login.auth-card{padding:20px}
}
@media(max-width:350px){.cloud-shell .cloud-content .cash-totals{grid-template-columns:minmax(0,1fr)}.cloud-shell .topbar{flex-wrap:wrap}.cloud-shell .top-actions{max-width:100%}}
@media(prefers-reduced-motion:reduce){.cloud-shell *{scroll-behavior:auto!important;transition:none!important}}

/* R4 reference: original dashboard hierarchy and five reporting views. */
.cloud-shell .r4-dashboard-stats{grid-template-columns:repeat(4,minmax(0,1fr))}
.cloud-shell .r4-dashboard-columns{grid-template-columns:minmax(0,2fr) minmax(260px,1fr)}
.cloud-shell .r4-finance-stats,.cloud-shell .r4-dashboard-extra{grid-template-columns:repeat(2,minmax(0,1fr))}
.cloud-shell .r4-dashboard-columns,.cloud-shell .r4-dashboard-stats,.cloud-shell .r4-dashboard-extra{border:0;padding:0;background:transparent}
.cloud-shell .r4-dashboard-columns>.panel{padding:0;background:var(--surface)}
.cloud-shell .r4-shortcuts button.tile{background:var(--surface);color:var(--text);border:1px solid var(--border);text-align:start;display:block;min-height:76px;padding:14px}
.cloud-shell .r4-shortcuts button.tile:hover{background:var(--surface2);color:var(--blue)}
.cloud-shell .r4-shortcuts small{display:block;margin-top:6px;color:var(--muted)}
.cloud-shell .cloud-content .report-views .report-view-button{background:transparent;color:var(--muted);border:1px solid transparent;min-height:43px;white-space:normal}
.cloud-shell .cloud-content .report-views .report-view-button.selected{background:linear-gradient(125deg,#1669a6,#0e91ba);color:white;border-color:#348cc6}
.cloud-shell .report-section{min-width:0}
.cloud-shell .filter-area label{min-width:145px;max-width:100%}
.cloud-shell .column-customizer{max-width:100%}
@media(max-width:1200px){.cloud-shell .r4-dashboard-columns{grid-template-columns:minmax(0,1fr)}}
@media(max-width:850px){.cloud-shell .r4-dashboard-stats{grid-template-columns:repeat(2,minmax(0,1fr))}.cloud-shell .r4-shortcuts{grid-template-columns:repeat(2,minmax(0,1fr))}.cloud-shell .stat{padding:12px}.cloud-shell .stat .number{font-size:23px}}
@media(max-width:350px){.cloud-shell .r4-dashboard-stats,.cloud-shell .r4-finance-stats,.cloud-shell .r4-dashboard-extra,.cloud-shell .r4-shortcuts{grid-template-columns:1fr}}

/* Original R4 attendance and loading grids; quick buttons open the existing protected editor. */
.cloud-shell .r4-attendance-stats{grid-template-columns:repeat(3,minmax(0,1fr));margin-block:12px}
.cloud-shell .r4-loading-stats{grid-template-columns:repeat(4,minmax(0,1fr));margin-block:12px}
.cloud-shell .mini-toolbar{display:flex;flex-wrap:wrap;gap:5px;align-items:center}
.cloud-shell .mini-toolbar .btn.small{padding:6px 10px;font-size:12px;min-height:32px}
.cloud-shell .mini-toolbar .btn.primary{background:var(--blue);color:white}
.cloud-shell .r4-count-directory{margin-block:14px;padding:0;background:transparent;border:0}
@media(max-width:850px){.cloud-shell .r4-attendance-stats,.cloud-shell .r4-loading-stats{grid-template-columns:repeat(2,minmax(0,1fr))}.cloud-shell .mini-toolbar .btn.small{min-height:44px}}

/* R4 fuel control panels and interval explanation. */
.cloud-shell .r4-fuel-panel{padding:0;margin-block:12px;border:1px solid var(--border);background:var(--surface)}
.cloud-shell .r4-fuel-panel .panel-body{min-width:0;padding:12px}
.cloud-shell .r4-fuel-panel .cloud-table-scroll{margin-block:0}
.cloud-shell .r4-fuel-stats{grid-template-columns:repeat(auto-fit,minmax(180px,1fr))}
@media(max-width:760px){.cloud-shell .r4-fuel-stats{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* R4-style administration section: no separate visual language. */
.cloud-shell .access-admin-panel{margin-block:16px;padding:16px;border:1px solid var(--border);border-radius:12px;background:var(--surface)}
.cloud-shell .access-editor{display:grid;gap:12px;grid-template-columns:repeat(2,minmax(0,1fr));padding:16px;margin-block:12px;background:var(--surface2);border-radius:10px}
.cloud-shell .access-editor>h3,.cloud-shell .permission-grid{grid-column:1/-1}
.cloud-shell .permission-grid{display:grid;gap:8px;grid-template-columns:repeat(2,minmax(0,1fr))}
.cloud-shell .permission-grid label{display:flex;align-items:center;gap:8px;min-height:34px}
.cloud-shell .permission-grid input[type=checkbox]{width:auto;margin:0}
@media(max-width:760px){.cloud-shell .access-editor,.cloud-shell .permission-grid{grid-template-columns:minmax(0,1fr)}}

/* Permission hiding is independent of normal hidden/disabled rendering. */
[data-wop-denied="true"]{display:none!important;}

/* Read-only report print snapshot; never print navigation or unrelated screens through the export button. */
#report-print-root{display:none}
.history-timeline{display:grid;gap:10px}.history-event{display:grid;gap:6px;padding:14px 16px;border:1px solid var(--border);border-inline-start:4px solid var(--bright);border-radius:12px;background:var(--surface);overflow-wrap:anywhere}.history-event small{color:var(--muted)}.history-event p{margin:0;white-space:pre-wrap}.history-event button{justify-self:start}
@media print{
 @page{size:A4 landscape;margin:12mm}
 body.wop-report-print{display:block!important;background:white!important;color:#111!important;margin:0!important;font:10pt Arial,sans-serif!important}
 body.wop-report-print>*:not(#report-print-root){display:none!important}
 body.wop-report-print #report-print-root:not([hidden]){display:block!important;position:static!important;width:100%!important;max-width:none!important;color:#111!important;background:white!important}
 #report-print-root h1{font-size:18pt;margin:0 0 8pt}#report-print-root h2{font-size:12pt;break-after:avoid;margin:12pt 0 5pt}#report-print-root p{margin:4pt 0}#report-print-root table{border-collapse:collapse;width:100%;table-layout:fixed;font-size:9pt;margin:0 0 10pt;color:#111;background:white}#report-print-root thead{display:table-header-group}#report-print-root tr{break-inside:avoid}#report-print-root th,#report-print-root td{border:1px solid #aaa;padding:4pt;text-align:start;white-space:normal;overflow-wrap:anywhere;color:#111;background:white}#report-print-root th{font-weight:bold;background:#eee}
}

.cloud-shell #fuel-access-button.fuel-access-active{color:#17683c;border-color:#83ba9a;background:#e9f7ee}.cloud-shell #fuel-access-button{font-variant-numeric:tabular-nums}.cloud-shell .top-actions{flex-wrap:wrap}@media(max-width:760px){.cloud-shell #fuel-access-button{font-size:11px;padding:6px;white-space:normal}.cloud-shell .top-actions{max-width:60%;justify-content:flex-end}}

.cloud-shell .fuel-access-trigger{color:var(--text);background:var(--surface);border:1px solid var(--border);border-radius:8px;white-space:nowrap;font-size:12px;padding:8px}

.evidence-dialog .evidence-tools{display:grid;grid-template-columns:repeat(auto-fit,minmax(130px,1fr));gap:8px;margin-block:12px}.evidence-dialog .evidence-tools button{min-height:44px}.evidence-dialog .evidence-preview img,.evidence-dialog .evidence-preview video,.evidence-dialog>video{display:block;max-width:100%;max-height:340px;object-fit:contain;margin:8px auto;border-radius:10px}.evidence-dialog .evidence-preview audio{width:100%;max-width:100%}.evidence-dialog [hidden]{display:none!important}.evidence-dialog .evidence-tools[hidden]{display:none!important}@media(max-width:480px){.evidence-dialog .evidence-tools{grid-template-columns:repeat(2,minmax(0,1fr))}.evidence-dialog .evidence-tools button{font-size:13px;white-space:normal}}

.evidence-dialog #evidence-file{display:none}

.evidence-tools label{display:flex;align-items:center;gap:6px}.evidence-tools label input[type=checkbox]{width:auto;min-width:18px}.setup-readiness progress{width:100%;height:16px}

/* WOP professional UI, shared tokens and responsive behavior */
:root{--muted:#52677c;--wop-focus:#087bc0;--wop-heading:var(--text);--wop-label:#435b73;--wop-input-border:#cbd9e7;--wop-input:var(--surface);--wop-form:#fbfcff;--wop-stripe:#f5f8fc;--wop-hover:#eaf3fb;--wop-table-head:var(--surface2);--wop-soft:#edf5fb;--wop-accent-text:#155f98;--wop-accent-line:#cbdfee;--wop-danger-bg:#fff1f1;--wop-danger-text:#a52c39;--wop-danger-line:#e9bec4;--wop-ok-bg:#e9f7ef;--wop-ok-text:#13785b;--wop-ok-line:#a9d5bf;--wop-warn-bg:#fff5e8;--wop-warn-text:#85571c;--wop-warn-line:#e5d0ae;--wop-icon-bg:#eaf4fc;--wop-icon-text:#155f98}
body.dark{--wop-focus:#79c5f4;--wop-heading:#e5edf8;--wop-label:#c3d0e1;--wop-input-border:#43546a;--wop-input:#172331;--wop-form:#1b2939;--wop-stripe:#202f41;--wop-hover:#2b4056;--wop-table-head:#243347;--wop-soft:#263d56;--wop-accent-text:#9bd6ff;--wop-accent-line:#496680;--wop-danger-bg:#422832;--wop-danger-text:#ffb9c1;--wop-danger-line:#794554;--wop-ok-bg:#1d3b34;--wop-ok-text:#a4f2cc;--wop-ok-line:#3d7562;--wop-warn-bg:#433524;--wop-warn-text:#ffd28b;--wop-warn-line:#725d40;--wop-icon-bg:#263d56;--wop-icon-text:#a5dcff;--positive:#8ce7bb;--danger:#ff9fa9;--bright:#78c4f3;--shadow:0 8px 26px rgba(0,0,0,.16)}
body{font-family:"Segoe UI Variable","Segoe UI",Tahoma,Arial,sans-serif;line-height:1.65}
.wop-icon{width:18px;height:18px;display:inline-block;vertical-align:middle;flex:none;pointer-events:none}
.cloud-shell .sidebar{background:linear-gradient(165deg,#102337,#163451);border-inline-end:1px solid #223d58}.cloud-shell .side-brand{padding-block:22px 16px}.brand-mark{background:linear-gradient(150deg,#258dcc,#105da1);border:1px solid #5dadd9;box-shadow:0 5px 14px #071d3690}.brand-mark .wop-icon{width:25px;height:25px}.brand-mark.large .wop-icon{width:34px;height:34px}
.cloud-shell .side-workspace{background:#1e3b56;border-color:#355370;color:#e2efff;border-radius:11px}
.cloud-shell .side-nav .nav-link,.cloud-shell .side-footer .nav-link,.cloud-shell .nav-quiet{min-height:46px;transition:background .16s,color .16s,box-shadow .16s}
.cloud-shell .nav-link.active,.cloud-shell .nav-link[aria-current=page]{background:#146aa9;box-shadow:0 3px 12px #091b3b55;color:white}
.nav-ico{display:inline-flex;align-items:center;justify-content:center;width:22px}.nav-ico .wop-icon{width:21px;height:21px}
.cloud-shell .topbar{min-height:74px;border-bottom:1px solid var(--border);box-shadow:0 2px 12px #1d385a08}.cloud-shell .topbar h1{font-weight:750}.cloud-shell .breadcrumb{color:var(--muted);font-size:12px}.cloud-shell .topbar .icon-btn{display:inline-grid;place-items:center;min-width:40px;height:40px;border-radius:11px}
.cloud-shell .cloud-tabs{gap:6px;scrollbar-width:thin;padding-block-start:3px}.cloud-shell .cloud-tabs .workspace-tab{border-radius:10px;font-weight:600;transition:background .16s,color .16s}.cloud-shell .cloud-tabs .workspace-tab:hover:not(:disabled){background:var(--wop-soft);color:var(--wop-accent-text)}.cloud-shell .cloud-tabs .workspace-tab:disabled{background:var(--wop-soft);color:var(--wop-accent-text);border-color:var(--wop-accent-line)}
.cloud-shell .cloud-content{background:var(--bg)}.cloud-shell .cloud-content>div:not([hidden]){border-radius:14px;box-shadow:var(--shadow);border-color:var(--border)}.cloud-shell .cloud-content h3{font-weight:700;color:var(--wop-heading)}
.cloud-shell #workspace form{background:var(--wop-form);border-color:var(--border);border-radius:14px;padding:18px}.cloud-shell #workspace label,dialog label{font-weight:600;color:var(--wop-label)}
.cloud-shell input:not([type=checkbox]),.cloud-shell select,.cloud-shell textarea,dialog input:not([type=checkbox]),dialog select,dialog textarea,#login input{border-color:var(--wop-input-border);border-radius:10px;min-height:41px;color:var(--text);background:var(--wop-input);transition:border-color .15s,box-shadow .15s}
.cloud-shell input:focus,.cloud-shell select:focus,.cloud-shell textarea:focus,dialog input:focus,dialog select:focus,dialog textarea:focus,#login input:focus{outline:2px solid var(--wop-focus);outline-offset:1px;box-shadow:0 0 0 3px #1684c41c}button:focus-visible,a:focus-visible{outline:2px solid var(--wop-focus);outline-offset:3px}
.cloud-shell .cloud-content button,dialog button,#login button{border-radius:10px;min-height:39px;font-weight:650;transition:background .15s,border-color .15s,box-shadow .15s,transform .15s}
button[data-wop-action]{display:inline-flex;align-items:center;justify-content:center;gap:7px}button[data-wop-action]>.wop-icon{order:-1;width:17px;height:17px}
.cloud-shell .cloud-content button:not(:disabled):hover,dialog button:not(:disabled):hover,#login button:not(:disabled):hover{filter:brightness(.97);box-shadow:0 3px 8px #17385716}
.cloud-shell .cloud-content button:not(:disabled):active,dialog button:not(:disabled):active,#login button:not(:disabled):active{transform:translateY(1px)}
.cloud-shell .cloud-content button[data-wop-action=close],dialog button[data-wop-action=close]{background:var(--surface);color:var(--text);border-color:var(--wop-input-border)}
.cloud-shell .cloud-content button[data-wop-action=trash],dialog button[data-wop-action=trash]{background:var(--wop-danger-bg);color:var(--wop-danger-text);border-color:var(--wop-danger-line)}
.cloud-shell .cloud-content button[data-wop-action=download],.cloud-shell .cloud-content button[data-wop-action=refresh],dialog button[data-wop-action=download]{background:var(--wop-soft);color:var(--wop-accent-text);border-color:var(--wop-accent-line)}
.cloud-shell .cloud-content button:disabled,dialog button:disabled{opacity:.52;cursor:not-allowed;box-shadow:none;transform:none}
.cloud-shell .cloud-content .tile{background:var(--surface);color:var(--text);border:1px solid var(--border);min-height:66px;justify-content:flex-start;gap:10px}.r4-shortcuts .tile>.wop-icon{width:23px;height:23px;color:var(--wop-icon-text);margin-inline-end:5px}
.r4-dashboard-stats .stat,.cash-tile{background:var(--surface);border:1px solid var(--border);border-radius:14px;box-shadow:0 3px 12px #13345208}.stat{padding:18px 16px}.stat .label{color:var(--wop-label);font-weight:600;padding-inline-end:35px}.wop-stat-icon{position:absolute;inset-inline-end:12px;top:12px;width:34px;height:34px;display:grid;place-items:center;background:var(--wop-icon-bg);color:var(--wop-icon-text);border-radius:10px}.stat.red .wop-stat-icon{color:var(--wop-danger-text);background:var(--wop-danger-bg)}.stat.green .wop-stat-icon{color:var(--wop-ok-text);background:var(--wop-ok-bg)}
.cash-tile span{font-weight:600;color:var(--wop-label)}.cash-tile strong,.stat .number{font-variant-numeric:tabular-nums;font-weight:750}
.loading-card,.loading-trip,.global-search-result{background:var(--surface);border-color:var(--border);border-radius:12px;box-shadow:0 2px 8px #1e3d5b06}
.cloud-shell #workspace th{background:var(--wop-table-head);color:var(--wop-heading);border-color:var(--border);font-weight:700}.cloud-shell #workspace td{border-color:var(--border)}.cloud-shell #workspace tbody tr:nth-child(even){background:var(--wop-stripe)}.cloud-shell #workspace tbody tr:hover{background:var(--wop-hover)}
dialog{border:1px solid var(--border);border-radius:18px;box-shadow:0 24px 72px rgba(14,33,55,.22);background:var(--surface);color:var(--text)}dialog::backdrop{background:rgba(12,28,47,.46)}
.evidence-dialog .evidence-tools{gap:10px}.evidence-dialog .evidence-tools button{min-height:48px;background:var(--wop-soft);color:var(--wop-accent-text);border-color:var(--wop-accent-line)}
.cloud-shell .bottomline{background:var(--surface2);color:var(--muted);font-size:11px;border-color:var(--border)}.cloud-auth-main #login.auth-card{border-radius:22px;border:1px solid var(--border);box-shadow:0 16px 50px #203d6014;padding:34px 28px}.cloud-auth-main #login h1{color:var(--wop-heading)}.cloud-auth-main #login p{color:var(--muted)}
@keyframes wop-enter{from{opacity:0;transform:translateY(5px)}to{opacity:1;transform:translateY(0)}}
@media(prefers-reduced-motion:no-preference){dialog[open],.cloud-shell .cloud-content>div:not([hidden]){animation:wop-enter .18s ease-out both}.cloud-shell.mobile-open .sidebar{animation:wop-enter .16s ease-out both}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}
@media(max-width:760px){.cloud-shell .topbar{min-height:62px;padding:11px 12px}.cloud-shell .topbar h1{font-size:17px}.cloud-shell .breadcrumb{font-size:10px}.cloud-shell .cloud-content{padding:10px}.cloud-shell .cloud-content>div:not([hidden]){padding:13px}.cloud-shell #workspace form{padding:13px}.cloud-shell .cloud-content button,dialog button{min-height:44px}.cloud-shell .cloud-tabs .workspace-tab{padding:9px 12px;min-height:44px}.stat .label{padding-inline-end:28px}.wop-stat-icon{width:28px;height:28px;inset-inline-end:8px;top:10px}.wop-stat-icon .wop-icon{width:17px;height:17px}.stat .number{font-size:25px}.cloud-auth-main #login.auth-card{padding:24px 20px}}

.cloud-shell .nav-quiet>.wop-icon{flex-shrink:0;width:21px;height:21px}.cloud-shell.collapsed .nav-quiet{justify-content:center}
.cloud-shell .cloud-tabs .workspace-tab>.wop-icon{width:16px;height:16px}
.cloud-shell .r4-shortcuts .tile{display:flex;align-items:center}.cloud-shell .r4-shortcuts .tile small{margin-inline-start:auto;color:var(--muted)}
.cloud-shell .cloud-content progress{accent-color:var(--blue);height:10px;border-radius:999px;max-width:100%}

/* R4 surfaces and states: every foreground shares the active theme's palette. */
body{background:var(--bg);color:var(--text)}
body.dark{color-scheme:dark}
.cloud-shell .sidebar{background:linear-gradient(165deg,#111f35 0%,#172940 57%,#112235 100%)}
.cloud-shell .side-nav .nav-link.center-link{min-height:51px;margin:6px 0;border:1px solid transparent;font-weight:650;line-height:1.45}
.cloud-shell .nav-link.center-link.active{background:linear-gradient(105deg,#177bb9,#1a5e99);border-color:#48a4d4;box-shadow:0 8px 20px rgba(10,19,36,.28)}
.cloud-shell .nav-link.center-link:not(.active):hover{background:#263e56;border-color:#3c5872}
.cloud-shell .cloud-content{background:radial-gradient(ellipse at 85% 8%,rgba(58,166,215,.06),transparent 36%),var(--bg)}
.cloud-shell .panel,.cloud-shell .stat,.cloud-shell .access-admin-panel,.cloud-shell .setup-readiness,.cloud-shell .loading-card,.cloud-shell .loading-trip,.cloud-shell .cash-tile,.global-search-result{background:var(--surface);color:var(--text);border-color:var(--border)}
.cloud-shell .panel-header{background:linear-gradient(105deg,rgba(59,141,185,.045),transparent 80%),var(--surface);color:var(--text);border-color:var(--border)}
.cloud-shell .cloud-content h1,.cloud-shell .cloud-content h2,.cloud-shell .cloud-content h3,.cloud-shell .cloud-content h4,dialog h1,dialog h2,dialog h3{color:var(--wop-heading)}
.cloud-shell .cloud-content .muted,.cloud-shell .cloud-content .foot,.cloud-shell .cloud-content .eyebrow,.cloud-shell .cloud-content small,dialog small,.cloud-shell .cloud-content .stat .label{color:var(--muted)}
.cloud-shell #workspace form,dialog form{background:var(--wop-form);color:var(--text);border-color:var(--border)}
.cloud-shell #workspace label,dialog label,#login label{color:var(--wop-label)}
.cloud-shell input:not([type=checkbox]):not([type=radio]),.cloud-shell select,.cloud-shell textarea,dialog input:not([type=checkbox]):not([type=radio]),dialog select,dialog textarea,#login input{background:var(--wop-input);color:var(--text);border-color:var(--wop-input-border)}
input::placeholder,textarea::placeholder{color:var(--muted);opacity:1}
.cloud-shell #workspace table,dialog table{background:var(--surface);color:var(--text)}
.cloud-shell #workspace th,dialog th{background:var(--wop-table-head);color:var(--wop-heading);border-color:var(--border);font-weight:700}
.cloud-shell #workspace td,dialog td{color:var(--text);border-color:var(--border)}
.cloud-shell #workspace tbody tr,dialog tbody tr{background:var(--surface);color:var(--text)}
.cloud-shell #workspace tbody tr:nth-child(even),dialog tbody tr:nth-child(even){background:var(--wop-stripe);color:var(--text)}
body.dark .cloud-shell #workspace tbody tr:hover,.cloud-shell #workspace tbody tr:hover,dialog tbody tr:hover{background:var(--wop-hover);color:var(--text)}
.cloud-shell .cloud-content .toolbar button:not(.primary),.cloud-shell .cloud-content .column-customizer-buttons button,dialog button[data-wop-action=close]{background:var(--surface);color:var(--text);border-color:var(--border)}
.cloud-shell .cloud-content button[data-wop-action=trash],dialog button[data-wop-action=trash]{background:var(--wop-danger-bg);color:var(--wop-danger-text);border-color:var(--wop-danger-line)}
.cloud-shell .cloud-content button[data-wop-action=download],.cloud-shell .cloud-content button[data-wop-action=refresh],dialog button[data-wop-action=download]{background:var(--wop-soft);color:var(--wop-accent-text);border-color:var(--wop-accent-line)}
.cloud-shell .cloud-content .btn.primary,.cloud-shell .cloud-content button[type=submit],dialog button[type=submit]{background:var(--blue);color:#fff;border-color:var(--blue)}
.cloud-shell .cloud-content .btn.danger{background:var(--wop-danger-bg);color:var(--wop-danger-text);border-color:var(--wop-danger-line)}
.cloud-shell .cloud-content .tile,.cloud-shell .r4-shortcuts button.tile{background:var(--surface);color:var(--text);border-color:var(--border)}
.cloud-shell .r4-shortcuts button.tile:hover{background:var(--wop-soft);color:var(--wop-accent-text)}
.cloud-shell .report-views,.cloud-shell .dossier-toolbar,.cloud-shell .dossier-section,.cloud-shell .column-customizer-body,.cloud-shell .asset-bulk-panel,.cloud-shell .access-editor{color:var(--text);border-color:var(--border)}
.cloud-shell .cloud-content .report-views .report-view-button:not(.selected):hover{background:var(--wop-hover);color:var(--text)}
.cloud-shell .cloud-tabs .workspace-tab:disabled{opacity:1;color:var(--wop-accent-text);background:var(--wop-soft);border-color:var(--wop-accent-line)}
.cloud-shell .profile-link,.cloud-shell .dossier-overline,.cloud-shell .dossier-count,.cloud-shell .column-customizer[open] .column-customizer-trigger{color:var(--wop-accent-text)}
.cloud-shell .count-negative,.cloud-shell #workspace td.count-negative,.cloud-shell .pill.bad,.alert.error{background:var(--wop-danger-bg);color:var(--wop-danger-text);border-color:var(--wop-danger-line)}
.cloud-shell .count-positive,.cloud-shell #workspace td.count-positive,.cloud-shell .pill.ok{background:var(--wop-ok-bg);color:var(--wop-ok-text);border-color:var(--wop-ok-line)}
.cloud-shell .pill.warn,.alert:not(.info):not(.error){background:var(--wop-warn-bg);color:var(--wop-warn-text);border-color:var(--wop-warn-line)}
.cloud-shell .pill:not(.ok):not(.warn):not(.bad){background:var(--surface2);color:var(--text)}
.cloud-shell .positive{color:var(--wop-ok-text)}.cloud-shell .negative,.cloud-shell .stat.red .number{color:var(--wop-danger-text)}
body.dark .cloud-shell #fuel-access-button.fuel-access-active{background:var(--wop-ok-bg);color:var(--wop-ok-text);border-color:var(--wop-ok-line)}
body.dark .cloud-shell .loading-matrix .loading-trip{background:var(--surface2);color:var(--text)}
body.dark .cloud-shell .directory-sort,body.dark .cloud-shell .global-search-trigger,body.dark .language-toggle{color:var(--text);background:var(--surface);border-color:var(--border)}
body.dark .cloud-shell .avatar{background:#263d56;color:#c3e7ff}
body.dark .cloud-auth-main #login.auth-card,body.dark dialog{background:var(--surface);color:var(--text);border-color:var(--border)}
body.dark .cloud-shell .bottomline{background:var(--surface2);color:var(--muted)}
/* Readable long role permissions without altering role assignments. */
.cloud-shell .access-admin-panel .cloud-table-scroll td{vertical-align:top;line-height:1.8}
.cloud-shell .access-admin-panel .cloud-table-scroll th{font-size:12px}
.cloud-shell .access-admin-panel .cloud-table-scroll td:nth-child(2){max-width:none}
@media print{body.wop-report-print #report-print-root th{color:#111;background:#eee}body.wop-report-print #report-print-root td{color:#111;background:white}}

/* Sign-in continuity: the remembered-device option is deliberately opt-in. */
#loginForm .remember-login{display:flex;align-items:center;gap:10px;text-align:start;color:var(--text);font-size:13px;cursor:pointer}
#loginForm .remember-login input[type=checkbox]{width:18px;height:18px;min-height:0;flex:0 0 18px;margin:0;accent-color:var(--blue)}

/* Startup gate: CSS hides both login and workspace from the very first paint. */
#wop-startup{display:none}
body.wop-auth-pending>main,body.wop-auth-pending>header,body.wop-auth-pending>.cloud-shell{display:none!important}
body.wop-auth-pending #wop-startup{position:fixed;inset:0;display:grid;place-items:center;padding:24px;z-index:1000;background:var(--bg,#f0f4f8);color:var(--text,#182e46)}
.wop-startup-card{width:min(100%,340px);display:grid;justify-items:center;gap:12px;padding:32px 24px;text-align:center}
.wop-startup-card strong{font-size:19px;font-weight:700}.wop-startup-card p{margin:0;color:var(--muted,#52677c)}
.wop-startup-mark{width:56px;height:56px;border-radius:17px;background:linear-gradient(145deg,#198bca,#175d97);box-shadow:0 8px 18px #0b487a33;position:relative}
.wop-startup-mark:before{content:'';position:absolute;inset:14px;border:2px solid white;border-top-left-radius:5px;border-top-right-radius:5px;border-radius:5px;transform:rotate(0deg)}
.wop-startup-mark:after{content:'';position:absolute;left:23px;right:23px;top:24px;bottom:14px;border:2px solid white;border-bottom:0;border-radius:2px}
.wop-startup-progress{display:block;width:140px;height:4px;background:var(--surface2,#dce6ef);border-radius:10px;overflow:hidden;position:relative;margin-top:8px}
.wop-startup-progress:after{content:'';position:absolute;inset-block:0;width:40%;border-radius:10px;background:var(--bright,#198bca);animation:wop-startup-progress 1s ease-in-out infinite alternate}
@keyframes wop-startup-progress{from{inset-inline-start:0}to{inset-inline-start:60%}}
@media(prefers-reduced-motion:reduce){.wop-startup-progress:after{animation:none;width:100%;opacity:.7}}

/* R4 branch maintenance workspace — responsive, with semantic dark/light tokens. */
.maintenance-panel{padding:clamp(12px,2vw,24px)}
.maintenance-hero{display:flex;align-items:center;justify-content:space-between;padding:20px;border-radius:14px;background:linear-gradient(115deg,#155e95,#17324d);color:#fff;margin-bottom:16px;gap:12px}
.maintenance-hero h2{margin:0;color:#fff!important;font-size:clamp(18px,2.4vw,25px)}.maintenance-hero p{color:#d5eaff!important;margin:4px 0 0}.maintenance-hero>svg{width:42px;height:42px;flex:none;color:#b9e2ff}
.maintenance-stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(130px,1fr));gap:10px;margin-bottom:16px}
.maintenance-stat{border:1px solid var(--border);border-inline-start:4px solid #198bca;background:var(--surface);border-radius:10px;padding:12px;display:grid;gap:4px}.maintenance-stat span{font-size:13px;color:var(--muted)}.maintenance-stat strong{font-size:25px;font-variant-numeric:tabular-nums;color:var(--text)}.maintenance-stat[data-tone=amber]{border-inline-start-color:#e5a329}.maintenance-stat[data-tone=green]{border-inline-start-color:#16805d}.maintenance-stat[data-tone=red]{border-inline-start-color:#c44048}
.maintenance-toolbar{display:flex;align-items:end;gap:10px;flex-wrap:wrap;margin:0 0 12px}.maintenance-toolbar label{flex:1 1 145px;min-width:0}.maintenance-toolbar input,.maintenance-toolbar select{width:100%;min-width:0}
.maintenance-split{display:grid;grid-template-columns:minmax(0,.95fr) minmax(0,1.35fr);gap:16px;align-items:start}.maintenance-split>div{min-width:0}
.maintenance-list{display:grid;gap:9px;max-height:68vh;overflow:auto;padding:2px}.maintenance-case-card{display:grid!important;gap:9px;text-align:start;background:var(--surface)!important;color:var(--text)!important;border:1px solid var(--border)!important;border-radius:10px;padding:12px!important;width:100%;min-width:0;white-space:normal!important;box-shadow:none}.maintenance-case-card:hover,.maintenance-case-card.active{border-color:#198bca!important;background:var(--surface2)!important}.maintenance-card-head{display:flex;align-items:start;justify-content:space-between;gap:8px;flex-wrap:wrap}.maintenance-card-head strong{min-width:0;overflow-wrap:anywhere}.maintenance-card-meta{display:flex;gap:9px;flex-wrap:wrap;font-size:12px;color:var(--muted)}
.maintenance-badge{display:inline-flex;border-radius:999px;background:#dbeafe;color:#184c80;padding:3px 10px;font-size:12px;font-weight:700;line-height:1.4;white-space:normal}.maintenance-badge[data-state=IN_PROGRESS],.maintenance-badge[data-state=DRAFT_COMPLETION]{background:#fef3c7;color:#854d0e}.maintenance-badge[data-state=CLOSED]{background:#d1fae5;color:#065f46}.maintenance-badge[data-state=DRAFT_REQUEST]{background:var(--surface2);color:var(--text)}
body.dark .maintenance-badge{background:#173f60;color:#cce8ff}body.dark .maintenance-badge[data-state=IN_PROGRESS],body.dark .maintenance-badge[data-state=DRAFT_COMPLETION]{background:#543d19;color:#ffe1a4}body.dark .maintenance-badge[data-state=CLOSED]{background:#164837;color:#b8f3d6}body.dark .maintenance-badge[data-state=DRAFT_REQUEST]{background:var(--surface2);color:var(--text)}
.maintenance-detail{background:var(--surface);border:1px solid var(--border);border-radius:12px;padding:clamp(12px,2vw,20px);min-height:200px}.maintenance-detail-head h3{overflow-wrap:anywhere;margin:0 0 8px}.maintenance-detail-head p{margin:10px 0 4px}.maintenance-detail-head small,.maintenance-event small{color:var(--muted)}
.maintenance-timeline{border-inline-start:2px solid var(--border);margin-block:20px;padding-inline-start:15px;display:grid;gap:14px}.maintenance-event{position:relative;display:grid;gap:6px;border:1px solid var(--border);padding:12px;border-radius:9px;background:var(--surface2)}.maintenance-event:before{content:"";position:absolute;inset-inline-start:-22px;top:15px;width:10px;height:10px;background:#198bca;border:2px solid var(--surface);border-radius:50%}.maintenance-event[data-action=CLOSE]:before{background:#16805d}.maintenance-event[data-action=RETURN]:before{background:#e5a329}.maintenance-event p{margin:0;white-space:pre-wrap;overflow-wrap:anywhere}.maintenance-event button{justify-self:start}.maintenance-actions{gap:8px;flex-wrap:wrap}
.maintenance-action form,.branch-admin-panel form{max-width:none!important;display:grid;gap:12px;background:var(--surface);border:1px solid var(--border)!important;border-radius:10px;padding:16px!important}.maintenance-action form label{min-width:0}.maintenance-action form input,.maintenance-action form textarea,.maintenance-action form select{width:100%}.branch-admin-grid{display:grid;gap:7px;margin-top:10px}.branch-admin-row{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,.8fr) auto;align-items:center;gap:10px;padding:10px;background:var(--surface2);border-radius:8px}.branch-admin-row strong,.branch-admin-row span{overflow-wrap:anywhere}
@media(max-width:760px){.maintenance-split{grid-template-columns:1fr}.maintenance-list{max-height:42vh}.maintenance-stats{grid-template-columns:repeat(2,minmax(0,1fr))}.branch-admin-row{grid-template-columns:minmax(0,1fr) auto}.branch-admin-row span{grid-column:1}}

/* Branch scope in the existing R4 top bar; use native keyboard-friendly controls. */
.global-branch-scope{display:grid;gap:3px;min-width:130px;max-width:240px;margin:0;align-self:center}
.global-branch-scope[hidden]{display:none!important}
.global-branch-scope>span{font-size:11px;font-weight:700;line-height:1.2}
.global-branch-scope select{width:100%;min-height:34px;max-width:240px;font-size:12px;margin:0}
.global-branch-scope small{font-size:10px;line-height:1.15;opacity:.8}
.maintenance-event progress{display:block;width:100%;height:8px;margin-block:6px;accent-color:#208052}
@media(max-width:760px){.global-branch-scope{min-width:95px;max-width:155px}.global-branch-scope select{max-width:155px}.global-branch-scope small{display:none}.top-actions:has(.global-branch-scope:not([hidden])) .today-label{display:none}}

/* Maintenance attention: follows the existing R4 palette and native focus behavior. */
.maintenance-attention-button{position:relative;flex-shrink:0}
.maintenance-attention-button[hidden],.maintenance-attention-counter[hidden]{display:none!important}
.maintenance-attention-counter{position:absolute;inset-block-start:-5px;inset-inline-end:-5px;background:#b42318;color:white;border-radius:99px;font-size:10px;line-height:18px;min-width:18px;padding-inline:4px;text-align:center}
.maintenance-attention-dialog{width:min(92vw,540px);max-height:85dvh;overflow:auto;border:1px solid #dbe3ec;border-radius:14px;padding:16px}
.maintenance-attention-head{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:12px}
.maintenance-attention-dashboard{padding:16px}
.maintenance-attention-content{display:grid;gap:8px}
.maintenance-attention-stats{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.maintenance-attention-stats>div{display:grid;gap:4px;border:1px solid currentColor;border-color:color-mix(in srgb,currentColor 20%,transparent);border-radius:9px;padding:10px}
.maintenance-attention-stats strong{font-size:22px}
.maintenance-attention-item{display:grid;gap:5px;text-align:start;width:100%;white-space:normal;overflow-wrap:anywhere}
.maintenance-attention-item small{font-weight:400;opacity:.85}
@media(max-width:760px){.maintenance-attention-dialog{padding:12px}.maintenance-attention-head h2{font-size:16px}.maintenance-attention-dashboard{padding:12px}}
