/* Semantic application theme and operational layout repairs. */
:root{--surface: #111e34;--surface-subtle:#172740;--fg:#eff5ff;--fg-muted:#b3c3da;--border:#59718f;--focus:#55ceff;--selected-bg:#153a59;--selected-fg:#bceeff;--notice-bg:#183650;--notice-fg:#d5efff;--warning-bg:#40301b;--warning-fg:#ffe0a4;--error-bg:#402335;--error-fg:#ffc4d2;--success-bg:#163d37;--success-fg:#a2efd9}
:root[data-theme='light']{--bg:#f4f7fb;--bg2:#edf2f8;--panel:#fff;--panel2:#f4f7fb;--text:#14263f;--muted:#4d6078;--line:#c4cfdd;--line2:#a2b2c6;--cyan:#075e9b;--green:#12664d;--red:#a52645;--amber:#79520a;--surface:#fff;--surface-subtle:#f0f4f9;--fg:#14263f;--fg-muted:#4d6078;--border:#a2b2c6;--focus:#075e9b;--selected-bg:#e1effa;--selected-fg:#064f84;--notice-bg:#e7f2fc;--notice-fg:#153b62;--warning-bg:#fff1d5;--warning-fg:#654109;--error-bg:#ffedf1;--error-fg:#92213d;--success-bg:#e4f5ed;--success-fg:#145b40;--glass-panel-face:#fff;--glass-control-face:#f4f7fb;--glass-edge:#c4cfdd;--glass-highlight:#fff;--glass-panel-shadow:0 6px 22px #243b5310;--glass-control-raised:0 2px 5px #243b5310}
[data-theme='light'] body{background:var(--bg)}
[data-theme='light'] .sidebar{background:#fff;border-color:var(--line);box-shadow:3px 0 20px #243b5308}
[data-theme='light'] :is(.panel,.metric-card,.customer-card,.device-card,.remote-session-card,.workspace-section,.workspace-callout,.modal-card,.device-drawer,.workspace-fact,.remote-choice,.tool-group,.tool-button,.inventory-row,.support-queue-item,.support-request,.support-message,.support-workspace-detail,.drawer-section,.drawer-summary,.toast,.reference-health-panel){background:var(--surface);color:var(--fg);border-color:var(--line);box-shadow:var(--glass-panel-shadow)}
[data-theme='light'] :is(h1,h2,h3,h4,strong,.queue-item-top strong,.workspace-section h3,.tool-button strong,.remote-choice h4){color:var(--fg)}
[data-theme='light'] :is(p,small,.muted,.cell-sub,.tool-group-head span,.tool-button span,.remote-choice p,.workspace-section p,.support-message p,.workspace-fact span){color:var(--fg-muted)}
[data-theme='light'] :is(button,input,select,textarea,.device-workspace-tabs,.workspace-details dt,.workspace-details dd,.attachment-preview,.device-table-head,.reference-health-chart){background:var(--surface-subtle);color:var(--fg);border-color:var(--border)}
[data-theme='light'] :is(.primary,.primary-workspace-action,.primary-workspace-action:hover,.primary-support,.fleet-hero-cta){background:#075e9b!important;color:#fff!important;border-color:#075e9b!important}
[data-theme='light'] :is(.control-action,.update-primary-danger,.danger-action){background:var(--error-bg)!important;color:var(--error-fg)!important;border-color:#bd5970!important}
:is(.info-banner,.system-info-note){background:var(--notice-bg)!important;color:var(--notice-fg)!important;border:1px solid var(--border)}
:is(.risk-banner,.telemetry-warning){background:var(--warning-bg)!important;color:var(--warning-fg)!important;border:1px solid var(--border)}
.telemetry-warning{display:flex;align-items:flex-start;gap:10px;line-height:1.6;padding:12px;margin-top:12px}
.telemetry-warning svg{width:20px;height:20px;flex:0 0 20px;margin-top:2px}
[data-theme='light'] :is(.nav-item.active,[role='tab'][aria-selected='true'],.support-queue-item.selected,.support-request.selected){background:var(--selected-bg);color:var(--selected-fg);border-color:var(--focus)}
[data-theme='light'] :is(.status-chip.good,.status-pill.online,.access-pill.approved){background:var(--success-bg);color:var(--success-fg)}
[data-theme='light'] :is(.status-chip.warn,.access-pill.pending){background:var(--warning-bg);color:var(--warning-fg)}
[data-theme='light'] :is(.status-chip.bad,.status-pill.offline){background:var(--error-bg);color:var(--error-fg)}
/* Keep paired dark hero text and surfaces within the light shell. */
[data-theme='light'] .fleet-hero{background:linear-gradient(110deg,#08152bea,#15243bbb 58%,#34225499),url('./fleet-aurora.png') center/cover;color:#f3f8ff}
[data-theme='light'] .fleet-hero h2{color:#f3f8ff}[data-theme='light'] .fleet-hero h2 span{background:linear-gradient(90deg,#55cfff,#c0a7ff);background-clip:text;-webkit-background-clip:text;color:transparent}
[data-theme='light'] :is(.fleet-hero p,.fleet-hero-eyebrow,.fleet-hero-slogan){color:#c3d3eb}
[data-theme='light'] .hero-float{background:#132541;color:#edf5ff;border-color:#607b9d}[data-theme='light'] .hero-float strong{color:#edf5ff}[data-theme='light'] .hero-float small{color:#c3d3eb}
:is(button,a,input,select,textarea,[tabindex]):focus-visible{outline:3px solid var(--focus)!important;outline-offset:3px}
button:disabled{opacity:.65;cursor:not-allowed}button:hover:not(:disabled){filter:brightness(1.06)}
:is(.device-row>div,.device-card>div,.customer-top>div,.topbar>div,.modal-head>div){min-width:0}
:is(.device-row strong,.device-row small,.device-row .cell-sub,.device-card h3,.customer-card strong,.queue-item-top strong,.modal-head h2,.modal-head p,.support-message p,.attachment-chip,.workspace-fact strong){overflow-wrap:anywhere;white-space:normal}
.device-row{cursor:default}.device-cell-actions{flex-wrap:wrap}.device-row .actions button{min-height:36px}
.device-workspace-card{display:flex!important;flex-direction:column;max-height:calc(100dvh - 32px);overflow:hidden!important}
.device-workspace-card .modal-head,.device-workspace-tabs{flex:0 0 auto}.device-workspace-card .modal-head{align-items:flex-start}.device-workspace-close,#device-workspace-close{flex:0 0 auto}
.device-workspace-body{flex:1 1 auto;min-height:0!important;max-height:none!important;overflow:auto;overscroll-behavior:contain}
.modal{padding:16px}.modal-card{max-height:calc(100dvh - 32px)}
.repair-filter-bar{display:flex;gap:10px;flex-wrap:wrap;padding:16px;border-bottom:1px solid var(--line);align-items:end}.repair-filter-bar label{display:grid;gap:5px;font-size:12px;min-width:130px}.repair-filter-bar input{min-width:180px}.repair-filter-summary{padding:12px 16px;color:var(--muted);font-size:12px}.repair-filter-summary strong{color:var(--text)}
#devices-full{display:block;padding:0}#devices-full .device-row{grid-template-columns:minmax(130px,1fr) minmax(140px,1fr) minmax(140px,1fr) 85px 100px 85px 125px;border-radius:0;margin:0;border-bottom:1px solid var(--line)}
.repair-shell-bar{display:flex;align-items:center;gap:12px;margin-bottom:18px;padding-bottom:14px;border-bottom:1px solid var(--line);font-size:12px}.repair-shell-bar .breadcrumb{flex:1;color:var(--muted)}.repair-avatar{width:36px;height:36px;border-radius:50%;background:var(--selected-bg);color:var(--selected-fg);display:grid;place-items:center}
.repair-footer{margin:28px 0 10px;display:flex;justify-content:space-between;gap:14px;font-size:12px;color:var(--muted);flex-wrap:wrap}.repair-relay-panel{padding:14px;margin:16px 12px;border:1px solid var(--line);border-radius:12px;font-size:12px;display:grid;gap:6px}.repair-relay-panel small{color:var(--muted);overflow-wrap:anywhere}
.repair-pending{display:flex;justify-content:space-between;align-items:center;padding:14px 18px;border:1px solid var(--line);border-radius:12px;margin:18px 0;background:var(--warning-bg);color:var(--warning-fg)}
.repair-events{padding:16px;display:grid;gap:10px}.repair-event{display:flex;gap:12px;align-items:center}.repair-event button{text-align:left;flex:1}.repair-event small{color:var(--muted)}
.repair-recipient-list{display:grid;gap:8px;max-height:230px;overflow:auto}.repair-recipient-list label{display:flex;align-items:center;gap:10px;min-height:44px}.repair-recipient-list input{width:20px;min-height:20px}.repair-checkbox-count{color:var(--muted);font-size:12px}
.repair-notifications{position:fixed;top:72px;right:24px;z-index:1000;width:min(430px,calc(100vw - 32px));max-height:70dvh;overflow:auto;padding:18px;border:1px solid var(--line);border-radius:16px;background:var(--surface);color:var(--fg);box-shadow:0 20px 60px #0005}.repair-notifications article{border-bottom:1px solid var(--line);padding:12px 0}.repair-notifications article.unread{border-left:3px solid var(--focus);padding-left:10px}.repair-notifications .actions{margin-top:8px}
.repair-form{display:grid;gap:14px;padding:18px}.repair-form label{display:grid;gap:6px}.repair-form small{color:var(--muted)}.repair-help{padding:18px;color:var(--muted);line-height:1.6}
[hidden]{display:none!important}
@media(max-width:1100px){#devices-full .device-row{grid-template-columns:1.2fr 1fr 1fr}#devices-full .device-cell-actions{grid-column:1/-1}}
@media(max-width:760px){.repair-shell-bar{flex-wrap:wrap;margin-bottom:12px}.repair-shell-bar .breadcrumb{flex-basis:100%}#devices-full .device-row{display:grid;grid-template-columns:minmax(0,1fr);padding:16px;gap:10px}#devices-full .device-cell-actions{grid-column:auto}.repair-filter-bar>*{flex:1 1 140px}.repair-filter-bar input{min-width:0;width:100%}.modal{padding:8px}.device-workspace-card{max-height:calc(100dvh - 16px);width:100%}.device-workspace-tabs button{min-height:44px}.device-workspace-tabs{padding:6px;gap:2px}.modal-head{padding:14px}.device-workspace-body{padding:12px}.remote-choice-grid,.tool-grid,.workspace-fact-grid{grid-template-columns:minmax(0,1fr)}.repair-notifications{right:16px}.repair-footer{font-size:11px}.topbar{align-items:flex-start}.top-actions{flex-wrap:wrap}.top-actions .premium-global-search{min-width:0;width:100%}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important}}
.top-actions .premium-global-search{display:flex!important}
.device-cell-user strong{display:block;line-height:1.5}.device-cell-user .telemetry-state{display:flex;margin-top:4px;line-height:1.4}
#repair-enrollment .modal-card{display:flex;flex-direction:column;max-height:calc(100dvh - 32px)}#repair-enrollment .modal-head{flex-shrink:0}#repair-enrollment .repair-form{overflow:auto;min-height:0}
#devices-full .device-row{font-size:12px;line-height:1.5}#devices-full .cell-sub,#devices-full small{font-size:11px;line-height:1.5}
:root[data-theme='light']{--border:#788a9f}
:is(.cell-sub,.telemetry-state,.repair-filter-summary,.device-card-stats,.settings-grid span,.drawer-muted,.tool-button span,.system-info-note,.panel-head p){color:var(--fg-muted)}
.customer-avatar{display:inline-grid;place-items:center;width:38px;height:38px;background:var(--selected-bg);color:var(--selected-fg);border-radius:12px;margin-bottom:12px;font-weight:700}
:is(.attachment-chip,.attachment-button,.queue-badge){color:var(--fg)!important;background:var(--surface-subtle)!important;border-color:var(--border)!important}
:is(.panel-head p,.cell-sub,.support-message span,.queue-device,.queue-badge,.attachment-chip,.support-description,.section-title span,.device-row small,.status-pill,.access-pill){font-size:12px;line-height:1.5}
:is(.info-banner,.risk-banner,.telemetry-warning){font-size:13px;line-height:1.6}
:root:not([data-theme='light']) :is(.primary,.primary-workspace-action,.primary-support,.fleet-hero-cta){background:linear-gradient(120deg,#1e63a6,#59449d)!important;color:#fff!important;border-color:#859fc7!important}
@media(max-width:760px){button,input,select{min-height:44px}.queue-item-top{flex-wrap:wrap}.workspace-details{grid-template-columns:100px minmax(0,1fr)}}
.tool-button strong{font-size:13px}.tool-button span{font-size:12px;line-height:1.5}
.repair-inventory-head{grid-template-columns:minmax(130px,1fr) minmax(140px,1fr) minmax(140px,1fr) 85px 100px 85px 125px;padding:12px 16px;font-size:12px;color:var(--fg-muted)}
@media(max-width:1100px){.repair-inventory-head{display:none}}
.repair-pending{width:100%;gap:16px}.repair-pending strong{font-size:22px}
[data-theme='light'] #view-overview .metric-card,[data-theme='light'] .auth-card{background:var(--surface);color:var(--fg);border-color:var(--line);box-shadow:var(--glass-panel-shadow)}
.attachment-chip{font-size:12px!important;line-height:1.5}

.repair-notification-categories{display:flex;gap:8px;margin:14px 0}
.repair-notification-categories button{flex:1;min-width:0;min-height:40px;display:flex;align-items:center;justify-content:space-between;gap:8px;padding:8px 12px;border:1px solid var(--line);border-radius:10px;background:var(--surface);color:var(--fg)}
.repair-notification-categories button[aria-pressed="true"]{border-color:var(--focus);box-shadow:inset 0 0 0 1px var(--focus)}
.repair-notification-categories button:focus-visible{outline:2px solid var(--focus);outline-offset:2px}
.repair-notification-categories span{min-width:24px;padding:1px 6px;border:1px solid var(--line);border-radius:999px;text-align:center;font-variant-numeric:tabular-nums}
