@font-face{font-family:Inter;src:url('/assets/fonts/inter-variable.ttf') format('truetype');font-style:normal;font-weight:100 900;font-display:swap}
/* Approved light, rounded design 08. Behavior and status classes remain in app.css. */
:root{font-family:'Segoe UI',Inter,system-ui,sans-serif;color:#142238;background:#f6f8fb;font-weight:600;--theme-blue:#1c5dc9;--theme-line:#dce3eb;--theme-muted:#59697d;color-scheme:light}
h1{font-weight:800}h2,h3,h4{font-weight:750}a{color:var(--theme-blue)}
.topbar{height:76px;border-color:var(--theme-line)}
.button{border-radius:10px;font-weight:700;box-shadow:none}.primary{background:var(--theme-blue);box-shadow:none}.primary:hover{background:#164fae}.ghost{color:#34465f;border-color:var(--theme-line)}.ghost:hover{background:#edf3ff}.danger{color:#b7393e;border-color:#efd3d5}
.logout-symbol{display:block;width:19px;height:19px}
.language-select{border-radius:10px;border-color:var(--theme-line)}
.workspace{grid-template-columns:211px minmax(0,1fr);min-height:calc(100vh - 76px)}
.sidebar{border-color:var(--theme-line);padding:26px 12px}.nav-item{font-weight:700;border-radius:10px}.nav-item.active{background:#edf3ff;color:var(--theme-blue)}.nav-item.active span{color:var(--theme-blue)}
.main,.main.devices-main{padding:28px 24px}.page-heading h1,.portal-main h1{font-size:30px;font-weight:800;letter-spacing:-.035em}
.muted,.account-email,.client-count,.row-sub,.field-hint{color:var(--theme-muted);font-weight:500}
.panel,.device-card{border-color:var(--theme-line);border-radius:14px;box-shadow:none}
.table-tools{border-color:var(--theme-line)}th{background:#f8fafc;color:#59697d}td{border-color:#e7ecf2}
.search input,.field input:not([type=checkbox]),.field select,.field textarea,.access-pane-head input,.access-object select{border-radius:10px;border-color:var(--theme-line);color:#142238}
input:focus,select:focus,textarea:focus{outline-color:#cddfff;accent-color:var(--theme-blue)}input[type=checkbox]{accent-color:var(--theme-blue)}
.editor{border-radius:16px;box-shadow:0 24px 80px #14223833}.editor::backdrop{background:#14223866}
.auth-page{background:#f6f8fb}.auth-card{border-radius:16px;border-color:var(--theme-line);box-shadow:0 12px 40px #1422380a}
.status.on,.device-icon.availability.online{background:#edf8f1;color:#18794e}
.access-client-title{background:#edf2f7}.access-client{border-radius:12px;border-color:var(--theme-line)}.access-user.active{background:#edf3ff;color:var(--theme-blue)}
.device-portal{max-width:1260px;padding:34px 26px}.device-portal>h1{margin:0 0 26px}
.device-portal .client-group{margin:0 0 24px;border:1px solid #e3e9f0;border-radius:16px;background:#fff}
.device-portal .client-group>summary{padding:19px 16px;background:#fff;border-bottom:0;gap:10px}
.device-portal .client-group>summary h2{font-size:20px;font-weight:750;color:#142238}
.device-portal .client-group>summary .client-count{color:#34465d}
.device-portal .client-group>summary::before{border-left-color:#52657d}
.device-portal .client-washes{padding:0 12px 12px}
.device-portal .client-washes .wash-group{margin:0;border:1px solid #e2e7ed;border-radius:12px;background:#f1f3f6;overflow:hidden}
.device-portal .client-washes .wash-group+.wash-group{margin-top:10px}
.device-portal .client-washes .device-card{border-radius:0}
.device-portal .client-washes .wash-heading{background:#f1f3f6;border-left:0;border-right:0;border-bottom:1px solid var(--theme-line);padding:16px 30px;justify-content:flex-start;text-align:left}
.device-portal .wash-title-line{justify-content:flex-start}
.device-portal .wash-heading h3{font-size:19px;color:#142238;font-weight:750}
.device-portal .wash-device-count{margin-left:auto;color:#34465d;font-size:12px;font-weight:500}
.device-portal .client-washes .device-card,.device-portal .client-washes .device-card+.device-card{background:#fff;border-top:1px solid #e7ecf2;padding:17px 13px;gap:12px 17px}
.device-portal .device-card h4{font-weight:750;font-size:16px;color:#142238}
.device-portal .device-period,.device-portal .device-last-online{font-size:12px;color:var(--theme-muted);font-weight:500}
.device-portal .device-card .device-action .button{min-width:169px;min-height:40px;border-radius:10px}
.device-portal .device-indicators>button,.device-portal .client-title-line>button,.device-portal .wash-title-line>button{border-radius:9px;width:30px;height:30px;min-width:30px}
.device-portal .device-indicators>button svg{width:19px;height:19px}
.device-portal .device-indicators{gap:6px}
.admin-group-row td{background:#edf2f7;border-color:var(--theme-line)}.admin-subgroup-row td{background:#f2f6fa}
.admin-group-toggle{color:#24364b}.admin-group-title{font-weight:750}.admin-group-count{font-weight:500;color:var(--theme-muted)}
.devices-table .notification-cell>button,.devices-table .notification-cell>a{border-radius:7px}
@media(min-width:761px){.device-portal .client-washes .device-card{grid-template-columns:80px minmax(0,1fr) auto}}
@media(max-width:760px){
 .topbar{height:auto;padding:12px 14px;gap:8px}.top-actions .header-navigation{grid-column:1/-1;justify-self:stretch;width:100%}.logout-label{display:none}
 .sidebar{flex-wrap:wrap;overflow:visible;padding:10px;gap:4px;min-width:0}
 .sidebar .nav-item{flex:1 1 170px;min-width:0;max-width:100%;white-space:normal;min-height:44px}
 .sidebar .nav-item>span:first-child{min-width:0;overflow-wrap:anywhere}
 .sidebar .nav-item>span:not(:first-child){flex-shrink:0}
 .topbar .brand-logo{max-width:100%}
 .main,.main.devices-main{padding:24px 14px}.page-heading h1,.portal-main h1{font-size:26px}.page-heading{gap:14px}
 .device-portal{padding:23px 14px}.device-portal .client-group>summary{padding:16px 12px}.device-portal .client-group>summary h2{font-size:18px}
 .device-portal .client-washes .wash-heading{padding:14px 26px}.device-portal .wash-title-line{justify-content:flex-start}
 .device-portal .client-washes .device-card{grid-template-columns:76px minmax(0,1fr);padding:14px 12px;gap:10px}
 .device-portal .client-washes .device-card .device-indicators{flex-wrap:wrap;overflow:visible;gap:7px;padding:3px 0}
 .device-portal .client-washes .device-card .device-indicators>button{width:35px;min-width:35px;height:35px}
 .device-portal .device-card .device-action .button{width:100%;min-height:44px}
 .devices-table{display:block;white-space:normal;width:100%;min-width:0}
 .devices-table>thead{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}
 .devices-table>tbody{display:block;width:100%}
 .devices-table .admin-group-row{display:block}.devices-table .admin-group-row>td{display:block;padding:0;width:100%;max-width:none}
 .devices-table .admin-group-toggle{white-space:normal;align-items:flex-start;padding:14px 12px;gap:8px;width:100%}
 .devices-table .admin-group-title{min-width:0;flex-wrap:wrap;white-space:normal;overflow-wrap:anywhere}
 .devices-table .admin-group-count{white-space:nowrap;margin-left:auto;font-size:11px}
 .devices-table tr[data-record-id]{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px 12px;margin:12px;padding:16px 12px;border:1px solid var(--theme-line);border-radius:14px;background:white}
 .devices-table tr[data-record-id]>td{display:block;border:0;padding:0;min-width:0;max-width:none;width:auto;text-align:left;font-size:13px;white-space:normal;overflow-wrap:anywhere}
 .devices-table tr[data-record-id]>td::before{content:attr(data-label);display:block;margin-bottom:6px;font-size:11px;line-height:1.4;color:var(--theme-muted);font-weight:600}
 .devices-table tr[data-record-id]>.row-main,.devices-table tr[data-record-id]>.notification-cell,.devices-table tr[data-record-id]>.row-actions{grid-column:1/-1}
 .devices-table tr[data-record-id]>.row-main{font-size:16px;font-weight:750}
 .devices-table tr[data-record-id]>.notification-cell{display:flex;flex-wrap:wrap;align-items:center;gap:8px;white-space:normal}
 .devices-table tr[data-record-id]>.notification-cell::before{flex-basis:100%;margin:0}
 .devices-table tr[data-record-id]>.notification-cell>*{margin:0;flex:none}
 .devices-table tr[data-record-id]>.notification-cell>button{width:35px;height:35px;border-radius:9px}
 .devices-table tr[data-record-id]>.row-actions{display:flex;flex-wrap:wrap;gap:8px}
 .devices-table tr[data-record-id]>.row-actions::before{flex-basis:100%;margin:0}
 .devices-table .row-actions .button{flex:1;margin:0;min-height:44px}
 .devices-table .vpn-address-cell a{white-space:normal;overflow-wrap:anywhere}.devices-table .agent-runtime-cell{min-width:0;max-width:none}
}
@media(max-width:760px){
 .devices-table tr[data-record-id]>td:nth-child(n){width:auto;min-width:0;max-width:none;padding:0;text-align:left}
 .devices-table tr[data-record-id]>.library-update-cell{grid-column:1/-1}
 .devices-table tr[data-record-id] .library-job-status{max-width:100%;white-space:normal;overflow-wrap:anywhere}
}
.admin-group-toggle:hover{background:#e4ebf3}.admin-subgroup-row .admin-group-toggle:hover{background:#eaf0f7}
/* Semantic warnings must outrank the neutral secondary-text styling. */
.device-portal .device-period.expired{color:#b7393e;font-weight:700}
.device-portal .device-period.expiring{color:#986000;font-weight:700}
.device-login-dialog,dialog{border-radius:16px}
@media(prefers-reduced-motion:reduce){.button{transition:none}}
/* Button text and brand dimensions follow the approved desktop/mobile reference. */
.button{font-size:13px}
.brand-logo{width:219px;max-width:100%}.brand-logo img{filter:none}
@media(min-width:761px){.device-portal .device-card .device-action .button{width:169px}}
@media(max-width:760px){.brand-logo{width:183px}}

/* Keep site spacing stable in both expanded and collapsed states. */
.device-portal .client-washes .wash-group+.wash-group{margin-top:6px}

/* Avoid horizontal shifts when expanding a portal group adds a scrollbar. */
html:has(.device-portal){scrollbar-gutter:stable}

/* Light outer groups with neutral, inset subgroups. */
.device-portal .client-group[open]>summary{background:#fff;box-shadow:none}
@media(hover:hover){
 .device-portal .client-group:not([open])>summary:hover{background:#f8fafc}
 .device-portal .client-group[open]>summary:hover{background:#f8fafc}
}
.device-portal .client-group>summary:focus-visible{outline:2px solid #1c5dc9;outline-offset:-4px}

.device-portal details.wash-group>.wash-heading::before{border-left-color:#52657d}

/* Keep group status icons on one shared center line, including PRRO. */
.admin-group-title{display:flex;align-items:center;gap:6px;min-width:0}
.admin-group-indicators{display:inline-flex;align-items:center;flex-wrap:nowrap;flex:none;gap:3px;white-space:nowrap;vertical-align:middle}
.admin-group-indicators> :not([hidden]){display:inline-flex;align-items:center;justify-content:center;flex:none;width:30px;height:30px;box-sizing:border-box;margin:0}
.admin-group-indicators svg{display:block;flex:none}
@media(max-width:760px){
 .devices-table .admin-group-title{flex:1}
 .devices-table .admin-group-indicators{max-width:100%;min-width:0;overflow-x:auto;padding-block:3px}
}

/* Group toggles must not select their labels on repeated mouse clicks. */
.device-portal .client-group>summary,
.device-portal details.wash-group>summary,
.admin-group-toggle{
 -webkit-user-select:none;
 user-select:none;
}

/* Library packages use the same full-width table workspace as agent updates. */
.library-packages-main{max-width:none;width:100%}
.library-packages-main .library-package-panel{padding:20px;margin-bottom:20px}
.library-upload-details{border-bottom:1px solid var(--theme-line);padding-bottom:16px}
.library-upload-details>summary{cursor:pointer;font-weight:750;user-select:none}
.library-upload-details form{display:grid;grid-template-columns:1fr 1fr;gap:0 16px}
.library-upload-details form>p{grid-column:1/-1}
.library-upload-details form>button{justify-self:start}
.library-assignment-controls{display:grid;grid-template-columns:1fr 1fr;gap:16px}
.library-assignment-controls>.field:first-child{grid-column:1/-1}
.library-packages-main #device-choices{max-height:none;overflow:visible}
.library-selection-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.library-selection-actions strong{margin-left:auto}
.library-device-scroll{max-height:55dvh;overflow:auto;border:1px solid var(--theme-line);border-radius:10px}
.library-devices-table{min-width:900px}
.library-devices-table th{position:sticky;top:0;z-index:1;background:#f7f9fc}
.library-devices-table td{white-space:normal;min-width:110px}
.library-devices-table td:first-child{min-width:55px;width:55px}
.library-devices-table input[type=checkbox]{width:18px;height:18px}
.library-catalog-table{min-width:700px}
.library-catalog-table td{white-space:normal}
.library-catalog-table td:first-child{font-weight:700}
.library-catalog-table td:nth-child(3){min-width:200px}
.library-packages-main #package-list button{margin:4px}
.library-package-actions{min-width:210px}
@media(max-width:760px){
 .library-assignment-controls,.library-upload-details form{grid-template-columns:minmax(0,1fr)}
 .library-packages-main .library-package-panel{padding:14px}
}

.library-catalog-table .status{white-space:nowrap}

/* Shared root administration workspace; portal pages keep their own layout. */
.workspace>.admin-workspace{width:100%;max-width:none;min-width:0;margin:0;padding-inline:24px}
.admin-workspace>.page-heading{margin-bottom:24px}
.admin-workspace>.panel,.admin-workspace .admin-settings-layout>.panel{border-radius:14px}
.admin-settings-layout{display:grid;grid-template-columns:minmax(0,1.3fr) minmax(0,1fr);gap:24px;align-items:start}
.admin-settings-layout>#settings-form,.admin-settings-layout>.notification-settings{padding:24px;margin:0;max-width:none;min-width:0}
.admin-workspace .maintenance-table{white-space:normal;min-width:400px}
.admin-workspace .maintenance-table td{overflow-wrap:anywhere}
@media(max-width:1100px){.admin-settings-layout{grid-template-columns:minmax(0,1fr)}}
@media(max-width:760px){
 .workspace>.admin-workspace{padding-inline:15px}
 .admin-settings-layout>#settings-form,.admin-settings-layout>.notification-settings{padding:16px}
}

.device-notification-toggle{display:inline-flex;align-items:center;gap:2px;vertical-align:middle;white-space:nowrap;cursor:pointer}
.device-notification-toggle input{width:16px;height:16px;margin:0;accent-color:#1c5dc9;cursor:pointer}
.device-notification-toggle input:disabled{cursor:wait;opacity:.55}

.backup-badge{display:inline-flex;align-items:center;justify-content:center;border:0;border-radius:6px;padding:4px;vertical-align:middle;cursor:pointer}
.backup-table{min-width:900px}.backup-table td{white-space:normal}.backup-table .admin-group-toggle{font-weight:750}
.backup-history-table{min-width:600px}.backup-history-table td{white-space:normal}
.backup-message{white-space:normal;overflow-wrap:anywhere}

.backup-table .backup-badge{margin-right:6px}.backup-history-table td:first-child{overflow-wrap:anywhere;max-width:260px}

.backup-settings-dialog{width:min(900px,calc(100vw - 32px));max-height:calc(100dvh - 32px);overflow:auto;box-sizing:border-box}
.backup-settings-grid{display:grid;grid-template-columns:1fr 1fr;gap:24px}
.backup-settings-grid section{min-width:0}
.backup-settings-grid label{display:block;margin:14px 0;font-weight:600}
.backup-settings-grid input{display:block;width:100%;box-sizing:border-box;margin-top:6px;border:1px solid #d5dfee;border-radius:8px;padding:10px 12px;background:#fff;color:#172e4b}
.backup-settings-grid fieldset{min-width:0;border:1px solid #dbe3ed;border-radius:8px;padding:12px}
.backup-settings-actions{display:flex;justify-content:flex-end;gap:12px;margin-top:20px}
@media(max-width:650px){.backup-settings-grid{grid-template-columns:1fr;gap:12px}}

.backup-settings-grid fieldset{display:grid;grid-template-columns:1fr 1fr;gap:0 16px}
.backup-settings-grid fieldset label{margin:6px 0}

/* A modal owns mobile scrolling; closing/removing the last modal restores it. */
@media(max-width:760px){
 html:has(dialog:modal),body:has(dialog:modal){overflow:hidden;overscroll-behavior:none}
 dialog:modal{overscroll-behavior:contain}
}

/* Reserve the right edge of both portal hierarchy headers for the toggle. */
.device-portal .client-group>summary{position:relative;grid-template-columns:minmax(0,1fr) auto auto;padding-right:38px}
.device-portal .client-washes details.wash-group>.wash-heading{padding-left:16px;padding-right:38px}
.device-portal .client-group>summary::before,
.device-portal details.wash-group>.wash-heading::before{position:absolute;left:auto;right:16px;top:50%;margin-top:-5px}
@media(max-width:760px){
 .device-portal .client-group>summary{grid-template-columns:minmax(0,1fr)}
 .device-portal .client-group>summary .client-count{grid-column:1;grid-row:auto}
 .device-portal .client-washes details.wash-group>.wash-heading{padding-left:12px}
}

/* Offline badges must not create an implicit column in the mobile header. */
.device-portal .client-group>summary>.client-offline-warning{grid-column:auto;max-width:100%;min-width:0}
@media(max-width:760px){
 .device-portal .client-group>summary>.client-offline-warning{grid-column:1;grid-row:auto}
}

/* Uniform app icons beside each client title, independent of image proportions. */
.device-portal .client-group{margin-bottom:14px}
.device-portal .client-group>summary{padding-left:88px;padding-top:10px;padding-bottom:10px;min-height:88px;gap:6px}
.device-portal .client-group-icon{position:absolute;left:8px;top:50%;transform:translateY(-50%);width:72px;height:72px;object-fit:contain;background:transparent;border:0;border-radius:0}

/* Keep the device hierarchy legible when table rows become mobile cards. */
@media(max-width:760px){
 .devices-table .admin-group-toggle{display:grid;grid-template-columns:8px minmax(0,1fr) auto;align-items:start;gap:8px}
 .devices-table .admin-group-arrow{margin-top:6px;grid-column:1;grid-row:1}
 .devices-table .admin-group-title{display:contents}
 .devices-table .admin-group-label{grid-column:2;grid-row:1;width:100%;min-width:0;overflow-wrap:anywhere}
 .devices-table .admin-group-indicators{display:flex;flex-wrap:wrap;gap:4px;width:100%;overflow:visible;padding:0;grid-column:2/-1;grid-row:2}
 .devices-table .admin-group-indicators:empty{display:none}
 .devices-table .admin-group-count{margin:0;padding-top:2px;grid-column:3;grid-row:1}
 .devices-table .admin-subgroup-row .admin-group-toggle{padding-left:30px}
}

/* Every modal keeps its close control reachable above long, scrolling content. */
dialog .modal-dialog-header,dialog .dialog-heading{
 position:sticky;top:0;z-index:5;background:#fff;display:flex;flex-direction:column;align-items:flex-start;gap:10px;
 padding:8px 0 12px;margin:0 0 16px;border-bottom:1px solid var(--theme-line)
}
dialog .modal-dialog-header>h2,dialog .modal-dialog-header>h3{margin:0;min-width:0;overflow-wrap:anywhere}
dialog .modal-dialog-header>[data-dialog-close]{flex:none;min-height:40px}
dialog.push-message .modal-dialog-header .push-message-close{position:static;align-self:flex-start}

@media(max-width:760px){.devices-table tr[data-record-id]>.notification-cell>button.prro-file-badge{width:48px;min-width:48px;height:35px;margin:0}}

@media(max-width:760px){.devices-table tr[data-record-id]>.notification-cell>button.manual-z-badge{width:48px;min-width:48px;height:35px;margin:0}.devices-table .row-actions .device-action-icon{width:40px;min-width:40px;height:40px;min-height:40px;flex:none}}

@media(max-width:760px){.devices-table tr[data-record-id]>.notification-cell>button.manual-z-badge{width:58px;min-width:58px}}
