/* STEP 104 — a single, consistent nighttime UI in every business workspace.
   The entire legacy Day/Auto selector family is deliberately inactive.
   This layer is visual only: no app state, accounting, imports, or calculations. */
:root[data-ld97-theme="night"]{color-scheme:dark}
html[data-ld97-theme="night"] body{--ld104-text:#ecf6ff;--ld104-muted:#b2c8db;--ld104-surface:#071c31;--ld104-surface-raised:#0a2844;--ld104-border:#285a80;--ld104-accent:#2ec9ff}
html[data-ld97-theme="night"] body.parts-green-theme{--ld104-text:#edfff5;--ld104-muted:#b0dbc8;--ld104-surface:#061c17;--ld104-surface-raised:#092d22;--ld104-border:#2c7151;--ld104-accent:#33e991}
html[data-ld97-theme="night"] body.rpm-invest-mode{--ld104-text:#f4f5f6;--ld104-muted:#c1c8ce;--ld104-surface:#101115;--ld104-surface-raised:#1e2026;--ld104-border:#71747a;--ld104-accent:#d4d8de}

/* There is no appearance switch: old pages and old preferences cannot display it. */
#main-app .ld97-theme-picker,#main-app #ld97-theme-trigger,#main-app #ld97-theme-menu{display:none!important}

/* One topbar scale. This supersedes old oversized Recycle, Home and dealer
   logo rules while keeping the existing logo images and click handlers. */
html body #main-app .topbar,
html body.parts-green-theme #main-app .topbar,
html body.combined-home-overview #main-app .topbar{
  min-height:96px!important;height:96px!important;
  padding:10px clamp(14px,2.2vw,28px)!important;
  gap:clamp(10px,1.5vw,20px)!important;
  align-items:center!important;justify-content:flex-start!important;
  flex-wrap:nowrap!important;
  background:linear-gradient(110deg,#071c31,#0b2c48 55%,#051b30)!important;
  border-bottom:2px solid #169de5!important;
  box-shadow:0 5px 22px #0005!important;
}
html body.parts-green-theme #main-app .topbar{
  background:linear-gradient(110deg,#051a15,#073528 55%,#051914)!important;
  border-bottom-color:#1bd17d!important;
}
html body.rpm-invest-mode #main-app .topbar{
  background:linear-gradient(110deg,#101116,#1b1b20 55%,#0a0a0d)!important;
  border-bottom-color:#8f969e!important;
}
html body #main-app .topbar .app-header-logo,
html body.combined-home-overview #main-app .topbar .app-header-logo,
html body.parts-green-theme #main-app .topbar .app-header-logo{
  display:flex!important;align-items:center!important;justify-content:center!important;
  flex:0 0 clamp(150px,19vw,224px)!important;
  width:clamp(150px,19vw,224px)!important;
  max-width:224px!important;min-width:0!important;
  height:70px!important;max-height:70px!important;
  padding:0!important;margin:0!important;
  background:transparent!important;border:0!important;box-shadow:none!important;
}
html body #main-app .topbar .app-header-logo img,
html body.combined-home-overview #main-app .topbar .app-header-logo img,
html body.parts-green-theme #main-app .topbar .app-header-logo img{
  display:block!important;object-fit:contain!important;object-position:center center!important;
  width:100%!important;max-width:100%!important;height:68px!important;max-height:68px!important;
  background:transparent!important;border:0!important;box-shadow:none!important;
  filter:none!important;
}
html body #main-app .topbar .rpm-brand-lockup,
html body.combined-home-overview #main-app .topbar .rpm-brand-lockup,
html body.parts-green-theme #main-app .topbar .rpm-brand-lockup{
  display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;
  flex:0 0 clamp(146px,18vw,210px)!important;
  width:clamp(146px,18vw,210px)!important;min-width:0!important;
  max-width:210px!important;height:70px!important;max-height:70px!important;
  padding:0 0 0 15px!important;margin:0!important;
  border:0!important;border-left:1px solid #356e96!important;
  background:transparent!important;box-shadow:none!important;
}
html body.parts-green-theme #main-app .topbar .rpm-brand-lockup{border-left-color:#277853!important}
html body #main-app .topbar .rpm-brand-lockup img,
html body.parts-green-theme #main-app .topbar .rpm-brand-lockup img{
  display:block!important;width:100%!important;max-width:100%!important;
  height:62px!important;max-height:62px!important;
  object-fit:contain!important;object-position:center center!important;
  background:transparent!important;mix-blend-mode:normal!important;
  filter:none!important;
}
/* The original artwork includes its subtitle. Do not append a second caption. */
html body #main-app .topbar .rpm-brand-lockup .rove-company-tag{display:none!important}
html body #main-app .topbar .topbar-dealer-area{min-width:0!important;max-width:290px!important;margin-left:auto!important}
html body #main-app .topbar .header-clock{padding:7px 10px!important;gap:7px!important;border-radius:9px!important}
html body #main-app .topbar .top-actions{flex:0 1 auto!important;min-width:0!important}

/* The Recycle navigation is the Autoworks layout, with green instead of blue.
   Preserve the same dimensions, no oversized icons and no pale text. */
html body.parts-green-theme #main-app .sidebar{
  background:#061a15!important;border-bottom:1px solid #246d4a!important;
}
html body.parts-green-theme #main-app .sidebar .nav>button{
  background:transparent!important;color:#d6f3e5!important;
  border-right:1px solid #265e4a!important;font-weight:800!important;
  text-shadow:none!important;box-shadow:none!important;
}
html body.parts-green-theme #main-app .sidebar .nav>button.active{
  background:#0c2e23!important;color:#f3fff9!important;
}
html body.parts-green-theme #main-app .sidebar .nav>button.active::after{
  background:#30e88c!important;box-shadow:0 0 10px #1dea7e!important;
}
html body.parts-green-theme #main-app .sidebar .nav :is(.rpm-nav-label,.rpm-nav-icon){
  color:inherit!important;opacity:1!important;
}
html body #main-app .sidebar .nav button,
html body #main-app .sidebar .nav button .rpm-nav-label{
  text-shadow:none!important;font-weight:800!important;opacity:1!important;
}

/* Inventory dropdown is appended to BODY, not the main app. Scope it directly
   to prevent faded white text on a white popup, and make the labels readable. */
html body #lotdesk-inventory-menu{
  background:#061c31!important;color:#f2f9ff!important;
  border:1px solid #2478a7!important;border-top:3px solid #21caff!important;
  border-radius:10px!important;
  padding:7px!important;min-width:284px!important;
  box-shadow:0 22px 44px #000b!important;
  opacity:1!important;filter:none!important;
}
html body #lotdesk-inventory-menu button{
  display:flex!important;align-items:center!important;gap:12px!important;
  background:transparent!important;color:#f5fbff!important;
  padding:13px!important;min-height:61px!important;
  font-size:13px!important;font-weight:850!important;line-height:1.35!important;
  opacity:1!important;visibility:visible!important;text-shadow:none!important;
  border:0!important;border-radius:7px!important;
}
html body #lotdesk-inventory-menu button+button{border-top:1px solid #244962!important}
html body #lotdesk-inventory-menu button:hover,
html body #lotdesk-inventory-menu button:focus-visible{
  background:#103d5b!important;color:#ffffff!important;
  outline:2px solid #2abbf8!important;outline-offset:-2px!important;
}
html body #lotdesk-inventory-menu button>span:not(.inv-icon){color:#f5fbff!important;opacity:1!important}
html body #lotdesk-inventory-menu .inv-icon{color:#45d6ff!important;font-size:20px!important;opacity:1!important;filter:none!important}
html body #lotdesk-inventory-menu button small{
  display:block!important;margin-top:4px!important;
  color:#b6d6ed!important;font-weight:600!important;
  font-size:12px!important;opacity:1!important;
}

/* Unified contrast for menu entries and controls in both business workspaces. */
html body #main-app .sidebar .nav>button:not(.active){color:#d2e8fa!important}
html body.parts-green-theme #main-app .sidebar .nav>button:not(.active){color:#d6f3e5!important}
html:not([data-ld227-theme="day"]) body #main-app .content :is(select,textarea,input){color-scheme:dark}
html body select option,html body select optgroup{background:#0b2c45!important;color:#eef7ff!important}
html body.parts-green-theme select option,html body.parts-green-theme select optgroup{background:#0b3427!important;color:#edfff4!important}

@media(max-width:1100px){
  html body #main-app .topbar,html body.parts-green-theme #main-app .topbar,html body.combined-home-overview #main-app .topbar{
    height:auto!important;min-height:96px!important;flex-wrap:wrap!important;padding:10px 16px!important;
  }
  html body #main-app .topbar .topbar-dealer-area{margin-left:auto!important;max-width:none!important}
}
@media(max-width:720px){
  html body #main-app .topbar .app-header-logo,html body.combined-home-overview #main-app .topbar .app-header-logo{flex:0 0 145px!important;width:145px!important;height:53px!important;max-height:53px!important}
  html body #main-app .topbar .app-header-logo img,html body.combined-home-overview #main-app .topbar .app-header-logo img{height:52px!important;max-height:52px!important}
  html body #main-app .topbar .rpm-brand-lockup,html body.combined-home-overview #main-app .topbar .rpm-brand-lockup,html body.parts-green-theme #main-app .topbar .rpm-brand-lockup{flex:0 0 132px!important;width:132px!important;max-width:132px!important;height:53px!important;max-height:53px!important;padding-left:10px!important}
  html body #main-app .topbar .rpm-brand-lockup img,html body.parts-green-theme #main-app .topbar .rpm-brand-lockup img{height:49px!important;max-height:49px!important}
  html body #main-app .topbar .header-clock{display:none!important}
  html body #main-app .topbar .topbar-dealer-area{display:none!important}
  html body #main-app .topbar .top-actions{margin-left:auto!important}
  html body #main-app .sidebar .nav button{min-height:46px!important;font-size:12px!important}
}
@media(max-width:430px){
  html body #main-app .topbar .app-header-logo,html body.combined-home-overview #main-app .topbar .app-header-logo{flex-basis:118px!important;width:118px!important}
  html body #main-app .topbar .rpm-brand-lockup,html body.combined-home-overview #main-app .topbar .rpm-brand-lockup,html body.parts-green-theme #main-app .topbar .rpm-brand-lockup{flex-basis:112px!important;width:112px!important;max-width:112px!important}
  html body #main-app .topbar .top-actions{flex-basis:100%!important;justify-content:flex-end!important}
}
@media print{html body #main-app .topbar{display:none!important}}

/* Preserve context-sensitive visibility even when a legacy selector sets
   display:flex!important on all navigation buttons. */
html body #main-app .sidebar .nav button[hidden],
html body #main-app .sidebar .nav button[aria-hidden="true"]{
  display:none!important;
}
html body.parts-green-theme #main-app #check-topbar-launch{display:none!important}
@media(max-width:720px){
  html body.parts-green-theme #main-app .topbar .app-header-logo{
    flex:0 0 145px!important;width:145px!important;height:53px!important;max-height:53px!important;
  }
  html body.parts-green-theme #main-app .topbar .app-header-logo img{
    height:52px!important;max-height:52px!important;
  }
}
@media(max-width:430px){
  html body.parts-green-theme #main-app .topbar .app-header-logo{
    flex-basis:118px!important;width:118px!important;
  }
}
