/* Shared appearance tokens. Light mode leaves existing page styling intact. */
:root {
 --elmo-bg:#ffffff; --elmo-surface:#ffffff; --elmo-raised:#f2f2f2;
 --elmo-text:#333333; --elmo-muted:#666666; --elmo-border:#dddddd;
 --elmo-link:#0082a7; --elmo-input:#ffffff; --elmo-hover:#f8fcfd;
}
.elmo-appearance { display:flex; align-items:center; gap:7px; color:#fff; font:600 8pt "Open Sans",sans-serif; white-space:nowrap; }
button.elmo-theme-toggle { position:relative; display:inline-flex; align-items:center; justify-content:space-between; box-sizing:border-box; flex:0 0 76px; min-width:76px; min-height:40px; width:76px; height:40px; padding:0 9px; border:1px solid #009fc5; border-radius:24px; background:#007a9d; color:#fff; cursor:pointer; font:600 8pt "Open Sans",sans-serif; transition:background .2s,border-color .2s; }
button.elmo-theme-toggle:hover { background:#006780; border-color:#6ed9f2; }
button.elmo-theme-toggle:focus-visible { outline:2px solid #5ce5ee; outline-offset:3px; }
button.elmo-theme-toggle:disabled { opacity:.5; cursor:default; }
.elmo-theme-toggle svg { display:block; flex:0 0 20px; position:relative; z-index:1; width:20px; height:20px; pointer-events:none; }
.elmo-theme-thumb { position:absolute; left:3px; top:3px; width:32px; height:32px; border-radius:50%; background:#fff0be; box-shadow:0 1px 4px #0004; transition:transform .22s ease,background .22s; pointer-events:none; }
.elmo-theme-sun { color:#694500; }
html[data-elmo-theme="dark"] .elmo-theme-thumb { transform:translateX(36px); background:#d5e7ff; }
html[data-elmo-theme="dark"] .elmo-theme-sun { color:#fff; }
html[data-elmo-theme="dark"] .elmo-theme-moon { color:#18314f; }
@media(prefers-reduced-motion:reduce) { button.elmo-theme-toggle,.elmo-theme-thumb { transition:none; } }
@media(max-width:760px) { .elmo-account { flex:1 0 100%; flex-wrap:wrap; justify-content:flex-end; gap:12px; margin-left:0; } .elmo-brand { flex:1 1 200px; } .elmo-appearance { margin-right:auto; } }
@media print { .elmo-appearance { display:none!important; } }
@media screen {
 html[data-elmo-theme="dark"] {
  --elmo-bg:#121820; --elmo-surface:#1b242f; --elmo-raised:#26323f;
  --elmo-text:#e5ecf3; --elmo-muted:#b0becc; --elmo-border:#445365;
  --elmo-link:#6ed9f2; --elmo-input:#111a24; --elmo-hover:#273a4a;
 }
 html[data-elmo-theme="dark"] .top-header { background:#0b1017; }
 html[data-elmo-theme="dark"] .accent-bar { background-image:linear-gradient(to right,#00bbae,#009ac7); }
 html[data-elmo-theme="dark"] .sidebar { background:#142d3b; }
 /* Match the regular menu's seamless rows and distinct parent/submenu states. */
 html[data-elmo-theme="dark"] .sidebar :is(.RadPanelBar,.rpRootGroup,.rpGroup,.rpItem,.rpLink,.rpHeaderTemplate,.rpOut,.rpIn) { background-color:transparent!important; background-image:none!important; border-color:transparent!important; box-shadow:none!important; }
 html[data-elmo-theme="dark"] .sidebar :is(.rpText,.rpLink,.rpHeaderTemplate) { color:#e5ecf3!important; }
 html[data-elmo-theme="dark"] .sidebar :is(.rpLink,.rpHeaderTemplate):hover { background-color:#244657!important; }
 html[data-elmo-theme="dark"] .sidebar .rpRootGroup > .rpItem > :is(.rpLink,.rpHeaderTemplate):is(.rpExpanded,.rpSelected),
 html[data-elmo-theme="dark"] .sidebar .rpRootGroup > .rpItem:is(.rpExpanded,.rpSelected) > :is(.rpLink,.rpHeaderTemplate) { background-color:#087c80!important; color:#fff!important; }
 html[data-elmo-theme="dark"] .sidebar .rpGroup .rpItem > :is(.rpLink,.rpHeaderTemplate).rpSelected,
 html[data-elmo-theme="dark"] .sidebar .rpGroup .rpItem.rpSelected > :is(.rpLink,.rpHeaderTemplate) { background-color:#08647a!important; color:#fff!important; }
 html[data-elmo-theme="dark"] .sidebar :is(.rpLink,.rpHeaderTemplate):focus-visible { outline:2px solid #6ed9f2; outline-offset:-2px; }
 html[data-elmo-theme="dark"] .page-header { background:#26323f; }
 html[data-elmo-theme="dark"] .page-header-title { color:#e5ecf3; }
 /* Application surfaces; generated page overrides extend this base palette. */
 html[data-elmo-theme="dark"] { color-scheme:dark; }
 html[data-elmo-theme="dark"] :is(body,.content-area,.page-content,.elmo-content-viewport) { background-color:var(--elmo-bg); color:var(--elmo-text); }
 html[data-elmo-theme="dark"] .elmo-content-viewport :is(
 .stock-page,.asset-page,.asset-new-page,.form-page,.profile-page,.package-page,.package-new-page,.packages-page,.locations-page,.location-page,.vehicles-page,.inventory-home-page) { color:var(--elmo-text); }
 html[data-elmo-theme="dark"] .elmo-content-viewport :is(
 h1,h2,h3,h4,.asset-title,.asset-new-title,.form-title,.profile-title,.package-title,.package-new-title,.packages-title,.locations-title,.location-title,.vehicles-title,
 .profile-value,.profile-value-strong,.package-summary-value,.package-field,.package-count,.package-weight,.asset-name,.vehicle-name,.location-name,.inventory-home-card-title,.inventory-home-card-action,.inventory-home-card-heading,.stock-field label,.edit-label,.form-label,.package-label,.asset-search-label,.table-row,.department-card) { color:var(--elmo-text)!important; }
 html[data-elmo-theme="dark"] .elmo-content-viewport :is(
 .stock-card,.asset-card,.form-card,.profile-card,.package-card,.photo-card,.location-card,.inventory-home-card,.inventory-section,.department-card,.packages-grid,.locations-grid,.asset-live-results,.asset-live-result,.package-assets-grid,.edit-section,.form-section) { background-color:var(--elmo-surface)!important; border-color:var(--elmo-border)!important; }
 html[data-elmo-theme="dark"] .elmo-content-viewport :is(
 .stock-card-title,.asset-card-header,.profile-card-header,.package-card-header,.photo-card-header,.location-card-header,.inventory-section summary,.inventory-type-link,.packages-grid-header,.locations-grid-header,.package-assets-header,.table-header,.edit-section-title,.form-section-title) { background-color:var(--elmo-raised)!important; color:var(--elmo-text)!important; border-color:var(--elmo-border)!important; }
 html[data-elmo-theme="dark"] .elmo-content-viewport :is(
 .stock-help,.edit-help,.form-helper,.package-help,.package-muted,.asset-muted,.asset-subtitle,.asset-new-subtitle,.profile-subtitle,.form-subtitle,.package-subtitle,.package-new-subtitle,.packages-subtitle,.packages-summary,.locations-subtitle,.location-subtitle,.vehicles-subtitle,.vehicles-summary,.vehicle-secondary,.package-summary-label,.package-summary-note,.profile-label,.photo-caption,.photo-help,.photo-empty,.package-empty,.locations-empty,.inventory-home-subtitle,.inventory-home-card-meta,.inventory-home-description,.inventory-retired,.asset-search-help) { color:var(--elmo-muted)!important; }
 html[data-elmo-theme="dark"] .elmo-content-viewport :is(
 input:not([type=button]):not([type=submit]):not([type=reset]):not([type=image]):not([type=hidden]):not([type=checkbox]):not([type=radio]),select,textarea) { background-color:var(--elmo-input)!important; color:var(--elmo-text)!important; border-color:var(--elmo-border)!important; color-scheme:dark; }
 html[data-elmo-theme="dark"] .elmo-content-viewport :is(input,textarea)::placeholder { color:#92a4b7; opacity:1; }
 html[data-elmo-theme="dark"] .elmo-content-viewport :is(input,select,textarea):focus { outline:2px solid var(--elmo-link); outline-offset:1px; }
 html[data-elmo-theme="dark"] .elmo-content-viewport input:read-only:not([type=button]):not([type=submit]):not([type=image]):not([type=checkbox]):not([type=radio]) { background-color:var(--elmo-raised)!important; }
 html[data-elmo-theme="dark"] .elmo-content-viewport :is(input[type=checkbox],input[type=radio]) { accent-color:#00a4d3; }
 html[data-elmo-theme="dark"] .elmo-content-viewport :is(.stock-table,.data-table) { background:var(--elmo-surface); color:var(--elmo-text); border-color:var(--elmo-border); }
 html[data-elmo-theme="dark"] .elmo-content-viewport :is(.stock-table,.data-table) :is(th,td) { border-color:var(--elmo-border)!important; }
 html[data-elmo-theme="dark"] .elmo-content-viewport :is(.stock-table,.data-table) th { background:var(--elmo-raised)!important; color:var(--elmo-text)!important; }
 html[data-elmo-theme="dark"] .elmo-content-viewport :is(.stock-table,.data-table) td { background:var(--elmo-surface); color:var(--elmo-text); }
 html[data-elmo-theme="dark"] .elmo-content-viewport :is(.stock-table,.data-table) tr:hover td,
 html[data-elmo-theme="dark"] .elmo-content-viewport :is(.packages-grid-row,.locations-grid-row,.package-assets-row,.table-row,.asset-live-result):hover { background-color:var(--elmo-hover)!important; }
 html[data-elmo-theme="dark"] .elmo-content-viewport :is(.packages-grid-row,.locations-grid-row,.package-assets-row,.table-row) { background-color:var(--elmo-surface); color:var(--elmo-text); border-color:var(--elmo-border)!important; }
 html[data-elmo-theme="dark"] .elmo-content-viewport :is(.packages-grid-row,.locations-grid-row,.package-assets-row,.table-row) > div { border-color:var(--elmo-border)!important; }
 html[data-elmo-theme="dark"] .elmo-content-viewport :is(.profile-link,.asset-live-name,.package-name,.package-back,.package-new-back,.vehicle-name,.location-name,.location-child,.asset-name,.stock-table a,.data-table a) { color:var(--elmo-link)!important; }
 html[data-elmo-theme="dark"] .elmo-content-viewport :is(.issue-note,.issue-tabs,.event-tabs) { border-color:var(--elmo-border); }
 html[data-elmo-theme="dark"] .elmo-content-viewport :is(.issue-tabs a,.event-tab) { color:var(--elmo-muted); }
 html[data-elmo-theme="dark"] .elmo-content-viewport :is(.issue-tabs .active,.event-tab-active) { color:var(--elmo-link); }
 html[data-elmo-theme="dark"] .department-card[aria-current=true] { background:var(--elmo-hover)!important; border-color:#00a4d3!important; }
 html[data-elmo-theme="dark"] .department-card:hover { background:var(--elmo-hover)!important; }
 html[data-elmo-theme="dark"] .elmo-content-viewport :is(.asset-photo-placeholder,.vehicle-photo-placeholder,.vehicle-thumbnail-placeholder,.photo-empty,.asset-photo,.vehicle-photo,.edit-photo-item,.edit-photo-thumb) { background-color:var(--elmo-raised); border-color:var(--elmo-border); color:var(--elmo-muted); }
 html[data-elmo-theme="dark"] .elmo-content-viewport a { color:var(--elmo-link); }
 html[data-elmo-theme="dark"] .elmo-content-viewport small { color:var(--elmo-muted)!important; }
 html[data-elmo-theme="dark"] .department-card { border-top-color:#00a4d3!important; }
 html[data-elmo-theme="dark"] .inventory-home-card-assets { border-top-color:#3f8edb!important; }
 html[data-elmo-theme="dark"] .inventory-home-card-packages { border-top-color:#8b63c7!important; }
 html[data-elmo-theme="dark"] .inventory-home-card-locations { border-top-color:#4ea86b!important; }
 html[data-elmo-theme="dark"] .inventory-home-card-vehicles { border-top-color:#ef9845!important; }
 html[data-elmo-theme="dark"] .inventory-home-card-reports { border-top-color:#24a9a1!important; }
 html[data-elmo-theme="dark"] .inventory-home-card-orders { border-top-color:#d96868!important; }
 html[data-elmo-theme="dark"] .inventory-home-card-settings { border-top-color:#d2a632!important; }
 /* Keep branded buttons and semantic status colors recognizable. */
 html[data-elmo-theme="dark"] .elmo-content-viewport :is(.button-primary,.stock-btn,.package-button,.package-save,.packages-button,.packages-search-button,.vehicles-button,.issue-pager a,.inventory-pager a) { background-color:#007a9d; border-color:#009fc5; color:#fff!important; }
 html[data-elmo-theme="dark"] .elmo-content-viewport :is(.button-primary,.stock-btn,.package-button,.package-save,.packages-button,.packages-search-button,.vehicles-button):hover { background-color:#006780; border-color:#6ed9f2; }
 html[data-elmo-theme="dark"] .elmo-content-viewport :is(.button-secondary,.package-cancel,.directory-reset,.packages-reset-button) { background-color:#423824; border-color:#b79a60; color:#ffe2aa!important; }
 html[data-elmo-theme="dark"] .elmo-content-viewport :is(.stock-message,.asset-message-error,.package-message-error) { background-color:#42262e; color:#ffb9c1!important; border-color:#b76a78; }
 html[data-elmo-theme="dark"] .elmo-content-viewport :is(.asset-message-success,.package-message-success) { background-color:#163d31; color:#9fe6bf!important; border-color:#508d72; }
 html[data-elmo-theme="dark"] .elmo-content-viewport :is(.required,.package-required) { color:#ff9ca9!important; }
}
