:root{
  --lr-ink: rgba(245,247,255,.96);
  --lr-muted: rgba(214,219,242,.72);
  --lr-line: rgba(255,255,255,.10);
  --lr-line-strong: rgba(255,255,255,.16);
  --lr-surface: linear-gradient(180deg, rgba(255,255,255,.085), rgba(255,255,255,.045));
  --lr-surface-2: linear-gradient(180deg, rgba(255,255,255,.10), rgba(255,255,255,.05));
  --lr-shadow: 0 16px 42px rgba(3,6,18,.38);
  --lr-shadow-soft: 0 10px 28px rgba(3,6,18,.24);
}

body.launch-ready{
  background:
    radial-gradient(1200px 780px at -10% -5%, rgba(124,92,255,.10), transparent 55%),
    radial-gradient(1000px 700px at 120% 10%, rgba(43,208,255,.08), transparent 55%),
    radial-gradient(900px 700px at 50% 120%, rgba(249,115,22,.06), transparent 55%),
    var(--bg);
}

body.launch-ready .topbar{
  background: color-mix(in oklab, var(--panel) 86%, transparent);
  border-bottom-color: rgba(255,255,255,.08);
  box-shadow: 0 10px 30px rgba(0,0,0,.18);
}
body.launch-ready .brandtext .subtitle{ color: var(--muted); letter-spacing: .03em; }
body.launch-ready .content{ max-width: min(1480px, calc(100vw - 320px)); }
body.launch-ready .sidebar{
  width: 112px;
  padding: 18px 12px;
  gap: 14px;
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.035));
  border-right: 1px solid rgba(255,255,255,.08);
  backdrop-filter: blur(24px) saturate(1.25);
  -webkit-backdrop-filter: blur(24px) saturate(1.25);
}
body.launch-ready .sidebar > .navitem[data-view],
body.launch-ready .sidebar > .navsep,
body.launch-ready .sidebar > .nav-zone-label{ display:none !important; }
body.launch-ready .sidebar > #btnWipe{ margin-top:auto; }

.lr-hub-nav{
  display:flex; flex-direction:column; gap:10px;
}
.lr-hub-btn{
  width:100%; min-height:68px; padding:12px 10px; border-radius:22px;
  border:1px solid rgba(255,255,255,.10);
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.03));
  color: var(--text); cursor:pointer; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:6px;
  transition: transform .22s ease, border-color .22s ease, background .22s ease, box-shadow .22s ease;
  box-shadow: var(--lr-shadow-soft);
}
.lr-hub-btn:hover{ transform: translateY(-2px); border-color: rgba(255,255,255,.16); }
.lr-hub-btn.active{
  background: linear-gradient(180deg, rgba(124,92,255,.20), rgba(124,92,255,.08));
  border-color: rgba(139,92,246,.42);
  box-shadow: 0 16px 38px rgba(109,40,217,.18);
}
.lr-hub-icon{ font-size:18px; line-height:1; }
.lr-hub-label{ font-size:10px; text-transform:uppercase; letter-spacing:.08em; font-weight:800; color:var(--lr-muted); }
.lr-hub-btn.active .lr-hub-label{ color: var(--lr-ink); }

.lr-sidebar-meta{
  margin-top:auto;
  border:1px solid rgba(255,255,255,.08);
  border-radius:18px;
  padding:12px 10px;
  background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.02));
  color:var(--muted);
  font-size:11px;
  line-height:1.4;
}
.lr-sidebar-meta strong{ display:block; color:var(--text); font-size:12px; margin-bottom:6px; }

.lr-module-rail{
  position:sticky; top: calc(var(--topbar-h,64px) + 10px); z-index:40;
  display:flex; align-items:center; gap:10px; flex-wrap:wrap;
  margin: 0 0 18px;
  padding: 14px 16px;
  border:1px solid rgba(255,255,255,.10);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(10,14,28,.78), rgba(10,14,28,.60));
  box-shadow: 0 18px 45px rgba(2,6,23,.28);
  backdrop-filter: blur(20px) saturate(1.18);
  -webkit-backdrop-filter: blur(20px) saturate(1.18);
}
.lr-module-lead{ min-width: 200px; }
.lr-module-kicker{ font-size:11px; letter-spacing:.12em; text-transform:uppercase; color:var(--muted); font-weight:800; }
.lr-module-title{ font-size:18px; font-weight:900; color:var(--text); margin-top:4px; }
.lr-module-sub{ font-size:12px; color:var(--muted); margin-top:3px; }
.lr-module-actions{ display:flex; gap:8px; flex-wrap:wrap; min-width:0; }
.lr-module-btn{
  border:1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.045);
  color: var(--text);
  padding: 10px 14px;
  border-radius: 999px;
  font-weight:700;
  font-size:13px;
  min-width:0;
  transition: all .2s ease;
}
.lr-module-btn:hover{ border-color: rgba(255,255,255,.16); background: rgba(255,255,255,.08); transform: translateY(-1px); }
.lr-module-btn.active{
  background: linear-gradient(180deg, rgba(124,92,255,.26), rgba(124,92,255,.13));
  border-color: rgba(139,92,246,.40);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 8px 18px rgba(109,40,217,.14);
}
.lr-module-btn .icon{ margin-right:8px; opacity:.9; }

body.launch-ready .hero{
  display:grid; grid-template-columns: minmax(0,1.35fr) minmax(320px,.9fr); align-items:stretch; gap:16px;
  border-color: rgba(255,255,255,.10);
  box-shadow: var(--lr-shadow);
}
body.launch-ready .hero-left,
body.launch-ready .hero-right,
body.launch-ready .hero-card,
body.launch-ready .card,
body.launch-ready .grid2 > *,
body.launch-ready .kpi,
body.launch-ready .hero-stat-cell,
body.launch-ready .gos-hub-cards > *,
body.launch-ready .lr-dashboard-grid > *,
body.launch-ready .lr-stack > *{ min-width:0; }
body.launch-ready .hero-right{ display:grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap:12px; }
body.launch-ready .hero-card{
  min-height: 124px;
  border-radius: 22px;
  border:1px solid rgba(255,255,255,.10);
  background: var(--lr-surface-2);
  box-shadow: var(--lr-shadow-soft);
}
body.launch-ready .hero .h-title{ font-size: clamp(28px, 3vw, 42px); }
body.launch-ready .hero .h-sub{ max-width: 74ch; }
body.launch-ready .hero .h-row{ gap:10px; flex-wrap:wrap; }
body.launch-ready .hero .pill, body.launch-ready .hero .selectpill{ border-color: rgba(255,255,255,.10); background: rgba(255,255,255,.055); }

body.launch-ready .grid2,
body.launch-ready .settings-grid,
body.launch-ready .cards-grid,
body.launch-ready .grid{ gap:16px; }
body.launch-ready .grid2{ grid-template-columns: repeat(2, minmax(0,1fr)); }
body.launch-ready .card,
body.launch-ready .panel,
body.launch-ready .hero-card,
body.launch-ready .modalbox,
body.launch-ready .menu{
  border-color: rgba(255,255,255,.10);
  box-shadow: var(--lr-shadow-soft);
}
body.launch-ready .cardhead h2,
body.launch-ready .h-title,
body.launch-ready h1,
body.launch-ready h2,
body.launch-ready h3,
body.launch-ready .big,
body.launch-ready .hero-stat-value{ color: var(--text); }
body.launch-ready .muted,
body.launch-ready .small,
body.launch-ready .lr-muted{ color: var(--muted) !important; }
body.launch-ready .btn,
body.launch-ready .iconbtn,
body.launch-ready .menuit,
body.launch-ready .filepill,
body.launch-ready .pill{ color: var(--text); }

.lr-dashboard-grid{
  display:grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr);
  gap:16px;
  margin: 0 0 18px;
}
.lr-card{
  border:1px solid rgba(255,255,255,.10);
  border-radius:24px;
  padding:18px;
  background: linear-gradient(180deg, rgba(255,255,255,.065), rgba(255,255,255,.03));
  box-shadow: var(--lr-shadow-soft);
  position:relative;
  overflow:hidden;
}
.lr-card::before{
  content:""; position:absolute; inset:0; pointer-events:none;
  background: radial-gradient(380px 180px at -10% -15%, rgba(255,255,255,.10), transparent 60%);
  opacity:.55;
}
.lr-card-head{ display:flex; align-items:flex-start; justify-content:space-between; gap:12px; margin-bottom:16px; position:relative; z-index:1; }
.lr-card-kicker{ font-size:11px; text-transform:uppercase; letter-spacing:.12em; color:var(--muted); font-weight:800; }
.lr-card-title{ font-size:20px; font-weight:900; color:var(--text); margin-top:5px; }
.lr-card-sub{ font-size:13px; color:var(--muted); margin-top:6px; }
.lr-kpi-grid{ display:grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap:10px; position:relative; z-index:1; }
.lr-kpi{
  border:1px solid rgba(255,255,255,.08);
  border-radius:18px;
  padding:12px;
  background: rgba(255,255,255,.03);
}
.lr-kpi .k{ font-size:11px; text-transform:uppercase; letter-spacing:.08em; color:var(--muted); }
.lr-kpi .v{ font-size:18px; font-weight:900; color:var(--text); margin-top:6px; }
.lr-kpi .s{ font-size:12px; color:var(--muted); margin-top:6px; }
.lr-score-wrap{ display:flex; align-items:center; gap:16px; position:relative; z-index:1; }
.lr-ring{
  --score:72;
  width:118px; height:118px; border-radius:50%;
  background: conic-gradient(var(--brand) calc(var(--score) * 1%), rgba(255,255,255,.09) 0);
  display:grid; place-items:center; box-shadow: inset 0 0 0 1px rgba(255,255,255,.08);
}
.lr-ring::after{
  content:""; width:86px; height:86px; border-radius:50%;
  background: linear-gradient(180deg, rgba(10,14,28,.96), rgba(12,18,36,.86)); border:1px solid rgba(255,255,255,.08);
}
.lr-score-wrap > .lr-score-ring{ position:relative; width:118px; height:118px; flex:0 0 118px; display:grid; place-items:center; }
.lr-ring-num{ position:absolute; inset:0; display:grid; place-items:center; font-size:28px; font-weight:950; color:var(--text); z-index:2; pointer-events:none; }
.lr-score-copy{ flex:1; min-width:0; }
.lr-score-copy ul{ list-style:none; display:grid; gap:8px; margin-top:12px; }
.lr-score-copy li{ display:flex; justify-content:space-between; gap:12px; font-size:13px; color:var(--text); }
.lr-score-copy li span:last-child{ color:var(--muted); }
.lr-stack{ display:grid; gap:12px; position:relative; z-index:1; }
.lr-action-row{ display:flex; gap:10px; flex-wrap:wrap; position:relative; z-index:1; margin-top:14px; }
.lr-chip{
  display:inline-flex; align-items:center; gap:8px; padding:8px 12px; border-radius:999px;
  border:1px solid rgba(255,255,255,.09); background: rgba(255,255,255,.04); color:var(--text); font-size:12px; font-weight:700;
}
.lr-list{ display:grid; gap:10px; }
.lr-list-item{
  display:flex; align-items:flex-start; justify-content:space-between; gap:14px; padding:12px 14px; border-radius:18px;
  border:1px solid rgba(255,255,255,.08); background: rgba(255,255,255,.03);
}
.lr-list-main{ min-width:0; }
.lr-list-title{ font-size:14px; font-weight:800; color:var(--text); }
.lr-list-meta{ font-size:12px; color:var(--muted); margin-top:4px; }
.lr-badge{ padding:6px 10px; border-radius:999px; font-size:11px; font-weight:800; text-transform:uppercase; letter-spacing:.06em; }
.lr-badge.ok{ background: rgba(16,185,129,.12); color:#86efac; }
.lr-badge.warn{ background: rgba(245,158,11,.12); color:#fcd34d; }
.lr-badge.bad{ background: rgba(239,68,68,.12); color:#fca5a5; }
.lr-mini-grid{ display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.lr-section-anchor{ scroll-margin-top: calc(var(--topbar-h,64px) + 18px); }

#view-trips .fxTripPlannerGrid,
#view-dashboard .grid2,
#view-dashboard .kpis,
#view-dashboard #recent,
#view-maintenance .grid2,
#view-health .grid2{ min-width:0; }
#view-dashboard #recent .row,
#view-dashboard #upcoming .row,
#view-maintenance .table-wrap,
#view-health .table-wrap{ min-width:0; }

.lr-inline-tools{ display:flex; gap:10px; flex-wrap:wrap; }
.lr-panel-grid{ display:grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap:16px; }
.lr-subcard{
  border:1px solid rgba(255,255,255,.08);
  border-radius:18px; padding:14px;
  background: rgba(255,255,255,.035);
}
.lr-subcard h3{ font-size:15px; font-weight:850; margin:0 0 8px; }
.lr-data-grid{ display:grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap:10px; }
.lr-data{
  border:1px solid rgba(255,255,255,.08); border-radius:16px; padding:10px 12px; background: rgba(255,255,255,.025);
}
.lr-data .k{ font-size:11px; text-transform:uppercase; letter-spacing:.08em; color:var(--muted); }
.lr-data .v{ font-size:15px; font-weight:850; color:var(--text); margin-top:6px; }
.lr-empty{ padding:16px; border:1px dashed rgba(255,255,255,.12); border-radius:18px; color:var(--muted); }
.lr-link-btn{ width:100%; justify-content:flex-start; }

.lr-command-palette{
  position: fixed; inset: 0; z-index: 1200; display:none; align-items:flex-start; justify-content:center;
  padding: 10vh 20px 20px; background: rgba(4,8,20,.60); backdrop-filter: blur(14px);
}
.lr-command-palette.open{ display:flex; }
.lr-command-shell{
  width:min(760px, 100%); border-radius:28px; border:1px solid rgba(255,255,255,.10);
  background: linear-gradient(180deg, rgba(10,14,28,.96), rgba(10,14,28,.90));
  box-shadow: 0 28px 80px rgba(0,0,0,.42); overflow:hidden;
}
.lr-command-head{ padding:16px 18px; border-bottom:1px solid rgba(255,255,255,.08); }
.lr-command-input{
  width:100%; border:none; outline:none; background:transparent; color:var(--text); font-size:18px; font-weight:700;
}
.lr-command-list{ max-height: 58vh; overflow:auto; padding:10px; display:grid; gap:8px; }
.lr-command-item{
  width:100%; text-align:left; padding:14px 14px; border-radius:18px; border:1px solid rgba(255,255,255,.06);
  background: rgba(255,255,255,.03); color:var(--text); display:flex; align-items:center; justify-content:space-between; gap:12px;
}
.lr-command-item:hover,
.lr-command-item.active{ border-color: rgba(139,92,246,.35); background: rgba(139,92,246,.10); }
.lr-command-meta{ font-size:12px; color:var(--muted); margin-top:4px; }
.lr-command-kbd{ font-size:11px; color:var(--muted); border:1px solid rgba(255,255,255,.10); border-radius:10px; padding:4px 8px; }

@media (max-width: 1180px){
  body.launch-ready .content{ max-width:none; }
  body.launch-ready .hero{ grid-template-columns:1fr; }
  body.launch-ready .hero-right{ grid-template-columns: repeat(2, minmax(0,1fr)); }
  .lr-dashboard-grid, .lr-panel-grid{ grid-template-columns:1fr; }
}
@media (max-width: 860px){
  body.launch-ready .shell{ flex-direction:column; }
  body.launch-ready .sidebar{
    width:100%; padding:10px 12px; overflow:auto; display:block; border-right:none; border-bottom:1px solid rgba(255,255,255,.08);
  }
  .lr-hub-nav{ flex-direction:row; min-width:max-content; }
  .lr-hub-btn{ width:88px; min-height:64px; border-radius:18px; }
  .lr-sidebar-meta{ display:none; }
  .lr-module-rail{ top: calc(var(--topbar-h,64px) + 8px); padding:12px; border-radius:20px; }
  .lr-module-lead{ min-width:100%; }
}
@media (max-width: 640px){
  body.launch-ready .sidebar{ padding:8px 10px; }
  .lr-module-actions, .lr-inline-tools, .lr-action-row{ flex-wrap:nowrap; overflow:auto; padding-bottom:2px; }
  .lr-module-actions::-webkit-scrollbar, .lr-inline-tools::-webkit-scrollbar, .lr-action-row::-webkit-scrollbar{ display:none; }
  body.launch-ready .hero-right{ grid-template-columns:1fr; }
  .lr-kpi-grid, .lr-mini-grid, .lr-panel-grid, .lr-data-grid{ grid-template-columns:1fr; }
  .lr-score-wrap{ flex-direction:column; align-items:flex-start; }
  .lr-module-title{ font-size:16px; }
  .lr-card-title{ font-size:18px; }
}


/* ===== Stability + layout fixes ===== */
body.launch-ready .content{ width:100%; max-width:min(1560px, calc(100vw - 160px)); }
body.launch-ready .hero{ grid-template-columns:minmax(0,1.2fr) minmax(320px,.8fr); }
body.launch-ready #view-dashboard .hero-right{ grid-template-columns:minmax(0,1fr); align-content:stretch; }
body.launch-ready #view-dashboard .hero-right .hero-card{ width:100%; min-height:144px; display:flex; flex-direction:column; justify-content:center; }
body.launch-ready #view-trips .hero-right{ display:grid !important; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; width:100%; }
body.launch-ready #view-trips .hero-right .hero-card{ min-width:0; min-height:116px; display:flex; flex-direction:column; justify-content:center; }
.hero-stats-row{ display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:0; align-items:stretch; grid-column:1 / -1; width:100%; margin-top:14px; }
.hero-stat-cell{ min-width:0; min-height:88px; display:flex; flex-direction:column; justify-content:center; padding:14px 16px; }
.hero-stat-value{ font-size:clamp(15px,1.3vw,20px); line-height:1.15; }
.lr-module-rail{ position:relative; top:auto; z-index:8; flex-wrap:nowrap; justify-content:space-between; align-items:center; }
.lr-module-summary{ display:flex; flex-wrap:wrap; gap:8px; min-width:0; }
.lr-module-actions{ display:none !important; }
.gos-hub-rail, #sidebarCtxPanel{ display:none !important; }
#reportPreview .fxReportBtns, #reportPreview #reportOpen, #reportPreview #reportPrint{ display:none !important; }
.lr-action-row .btn{ display:inline-flex; align-items:center; justify-content:center; }
.lr-card .btn, .lr-card .btn.ghost{ min-height:42px; }
.lr-side-pop{ position:fixed; z-index:90; width:300px; max-width:calc(100vw - 32px); padding:14px; border-radius:22px; border:1px solid rgba(255,255,255,.12); background:linear-gradient(180deg, rgba(10,14,28,.94), rgba(10,14,28,.88)); box-shadow:0 20px 48px rgba(2,6,23,.42); backdrop-filter:blur(20px) saturate(1.2); -webkit-backdrop-filter:blur(20px) saturate(1.2); opacity:0; pointer-events:none; transform:translateY(6px) scale(.98); transition:opacity .18s ease, transform .18s ease; }
.lr-side-pop.open{ opacity:1; pointer-events:auto; transform:translateY(0) scale(1); }
.lr-side-pop:not(.open){ pointer-events:none !important; }
.lr-side-pop-head{ padding:2px 4px 12px; }
.lr-side-pop-title{ color:var(--text); font-size:16px; font-weight:900; }
.lr-side-pop-sub{ color:var(--muted); font-size:12px; margin-top:4px; line-height:1.45; }
.lr-side-pop-list{ display:grid; gap:8px; }
.lr-side-link{ display:flex; align-items:center; gap:10px; width:100%; padding:12px 14px; border-radius:16px; border:1px solid rgba(255,255,255,.08); background:rgba(255,255,255,.035); color:var(--text); font-weight:700; text-align:left; }
.lr-side-link:hover, .lr-side-link.active{ border-color:rgba(139,92,246,.38); background:linear-gradient(180deg, rgba(124,92,255,.18), rgba(124,92,255,.08)); }
.lr-side-link .icon{ width:18px; text-align:center; }
@media (max-width: 1024px){
  body.launch-ready .content{ max-width:100%; }
  .lr-module-rail{ padding:12px 14px; flex-wrap:wrap; }
  .lr-side-pop.mobile{ width:auto; max-width:none; }
}
@media (max-width: 820px){
  .hero-stats-row{ grid-template-columns:repeat(2,minmax(0,1fr)); }
  body.launch-ready #view-trips .hero-right{ grid-template-columns:1fr; }
}
@media (max-width: 560px){
  .hero-stats-row{ grid-template-columns:1fr; }
}

@media (max-width: 760px){
  body.launch-ready .hero{grid-template-columns:1fr !important; align-items:start;}
  body.launch-ready .hero-left, body.launch-ready .hero-right{width:100% !important; min-width:0;}
  body.launch-ready .hero-right{display:grid !important; grid-template-columns:1fr !important; gap:12px; align-content:start;}
  body.launch-ready .hero-card{width:100% !important; min-height:auto !important; height:auto !important; flex:0 0 auto !important;}
  body.launch-ready #view-dashboard .hero-right .hero-card, body.launch-ready #view-trips .hero-right .hero-card{min-height:auto !important;}
}
.lr-hub-nav.hover-lock .lr-hub-btn:hover, body.lr-hover-lock .lr-hub-btn:hover{ background:transparent !important; transform:none !important; box-shadow:none !important; }
