/*
  GarageOS Neo Layer (additive)
  - Modern background + glass
  - Scroll reveal + hover lift
  - Cursor spotlight + subtle grid
  Safe by design: does not change DOM structure or IDs.
*/

:root{
  --neo-bg0:#070A12;
  --neo-bg1:#0B1022;
  --neo-txt: rgba(255,255,255,.92);
  --neo-mut: rgba(255,255,255,.66);
  --neo-line: rgba(255,255,255,.12);
  --neo-card: rgba(255,255,255,.06);
  --neo-card2: rgba(255,255,255,.10);
  --neo-a:#7C3AED; /* violet */
  --neo-b:#22D3EE; /* cyan */
  --neo-c:#F97316; /* orange */
  --neo-shadow: 0 18px 60px rgba(0,0,0,.55);
  --neo-glow: 0 0 0 1px rgba(255,255,255,.08), 0 18px 70px rgba(34,211,238,.10);
}

/* Background */
body{
  background:
    radial-gradient(1200px 900px at 15% 10%, rgba(124,58,237,.25), transparent 60%),
    radial-gradient(900px 700px at 85% 20%, rgba(34,211,238,.18), transparent 55%),
    radial-gradient(700px 650px at 70% 90%, rgba(249,115,22,.14), transparent 60%),
    linear-gradient(180deg, var(--neo-bg0), var(--neo-bg1));
}

/* Fixed layers injected by fx.js */
#fxGrid, #fxNoise, #fxSpot{
  position:fixed; inset:0; pointer-events:none;
}
#fxGrid{
  z-index:0;
  background-image:
    linear-gradient(to right, rgba(255,255,255,.06) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,.06) 1px, transparent 1px);
  background-size: 56px 56px;
  opacity:.06;
  mask-image: radial-gradient(60% 50% at 50% 40%, #000 55%, transparent 100%);
}
#fxNoise{
  z-index:0;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23n)' opacity='.35'/%3E%3C/svg%3E");
  opacity:.05;
  mix-blend-mode:overlay;
  transform: rotate(2deg) scale(1.1);
}
#fxSpot{
  /* Make spotlight visible above the app background, but still below UI */
  z-index:2;
  background: radial-gradient(420px 420px at var(--mx,50%) var(--my,40%), rgba(255,255,255,.13), transparent 60%);
  opacity:1;
  mix-blend-mode: overlay;
  transition: opacity .35s ease;
}

/* Animated blobs + progress bar (injected by fx.js) */
#fxBlobs{
  position:fixed;
  inset:-12%;
  z-index:0;
  pointer-events:none;
  filter: blur(2px);
  opacity:.9;
  mix-blend-mode: screen;
}
.fxBlob{
  position:absolute;
  width: 520px;
  height: 520px;
  border-radius: 999px;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,.16), rgba(255,255,255,0) 55%),
              radial-gradient(circle at 60% 55%, rgba(34,211,238,.22), rgba(34,211,238,0) 60%),
              radial-gradient(circle at 45% 70%, rgba(124,58,237,.26), rgba(124,58,237,0) 62%);
  filter: blur(10px);
  opacity:.55;
  transform: translate3d(0,0,0);
  animation: fxBlob 14s ease-in-out infinite;
}
.fxBlob.b1{ left: -6%; top: 0%; animation-duration: 16s; }
.fxBlob.b2{ right: -8%; top: 12%; width: 600px; height: 600px; animation-duration: 18s; animation-delay: -6s;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,.12), rgba(255,255,255,0) 58%),
              radial-gradient(circle at 55% 60%, rgba(249,115,22,.20), rgba(249,115,22,0) 62%),
              radial-gradient(circle at 70% 30%, rgba(34,211,238,.18), rgba(34,211,238,0) 65%);
}
.fxBlob.b3{ left: 18%; bottom: -10%; width: 680px; height: 680px; animation-duration: 20s; animation-delay: -12s; }

@keyframes fxBlob{
  0%{ transform: translate3d(0,0,0) scale(1) rotate(0deg); }
  33%{ transform: translate3d(40px,-30px,0) scale(1.06) rotate(6deg); }
  66%{ transform: translate3d(-30px,40px,0) scale(0.98) rotate(-4deg); }
  100%{ transform: translate3d(0,0,0) scale(1) rotate(0deg); }
}

#fxProgress{
  position:fixed;
  top:0; left:0; right:0;
  height: 3px;
  z-index: var(--z-sticky, 100); /* Token-aligned */
  pointer-events:none;
  background: rgba(255,255,255,.06);
}
.fxProgressBar{
  height:100%;
  width:100%;
  transform-origin: 0% 50%;
  transform: scaleX(0);
  background: linear-gradient(90deg, rgba(34,211,238,.85), rgba(124,58,237,.85), rgba(249,115,22,.75));
  box-shadow: 0 0 22px rgba(34,211,238,.25);
}

@media (pointer:coarse){
  #fxSpot{ display:none; }
}

/* Mobile/coarse-pointer: avoid hover-driven transforms and keep it stable */
html.is-coarse .card,
html.is-coarse .hero-card,
html.is-coarse .sidebar .navitem,
html.is-coarse .btn,
html.is-coarse .iconbtn{
  transform: none !important;
}
html.is-coarse .sidebar .navitem:hover{ transform:none !important; }

/* Reduce decorative intensity on small screens */
@media (max-width: 700px){
  #fxBlobs{ opacity: .72; }
  #fxProgress{ height: 2px; }
}

/* Ensure app layers sit above decorative FX */
.wrap, header, main, .topbar, .shell{ position:relative; z-index: var(--z-raised, 10); }

/* Topbar must always sit above content so menus are clickable */
.topbar{ z-index: var(--z-sticky, 100); }

/* Menu: keep the original behavior (app.js toggles aria-hidden) but guarantee overlay stacking */
.top-actions{ position: relative; z-index: calc(var(--z-sticky, 100) + 5); }
.menu{
  /* IMPORTANT: don't force fixed positioning; it can end up off-screen on some layouts */
  position: absolute !important;
  right: 0 !important;
  top: calc(100% + 10px) !important;
  z-index: calc(var(--z-sticky, 100) + 10) !important;
}
#btnMenu{ position: relative; z-index: calc(var(--z-sticky, 100) + 11); }

/* Mobile: keep the + button balanced (avoid oversized look) */
@media (max-width: 520px){
  #btnAdd{ min-width:44px !important; min-height:44px !important; border-radius:16px !important; font-size:18px !important; }
}

/* Mobile table “cards” should keep the same glass look (avoid dark blocks) */
@media (max-width: 900px){
  table.table tr{ background: rgba(255,255,255,.04) !important; }
}

/* Topbar glass — aligned with glass-3 token */
.topbar{
  background: rgba(7,10,18,.55) !important;
  backdrop-filter: var(--glass-3-filter, saturate(180%) blur(20px)) !important;
  -webkit-backdrop-filter: var(--glass-3-filter, saturate(180%) blur(20px)) !important;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

/* Sidebar glass — aligned with glass-3 token */
.sidebar{
  background: rgba(255,255,255,.03);
  border-right: 1px solid rgba(255,255,255,.08);
  backdrop-filter: var(--glass-3-filter, saturate(180%) blur(20px));
  -webkit-backdrop-filter: var(--glass-3-filter, saturate(180%) blur(20px));
}

/* Maintenance plans (div-based): remove the “black block” feel on mobile */
.planCard{
  background: rgba(255,255,255,.05) !important;
  border: 1px solid rgba(255,255,255,.12) !important;
  border-radius: 18px;
}
.planGrid{
  background: transparent !important;
}

/* Sidebar “active rail” + hover glow */
.sidebar .navitem{
  position:relative;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.02);
  transition: transform .18s ease, border-color .18s ease, background .18s ease, filter .18s ease;
}
.sidebar .navitem:hover{
  transform: translateX(2px);
  border-color: rgba(255,255,255,.14);
  background: rgba(255,255,255,.04);
}
.sidebar .navitem.active{
  border-color: rgba(34,211,238,.22);
  background: linear-gradient(135deg, rgba(34,211,238,.10), rgba(124,58,237,.08));
  box-shadow: var(--neo-glow);
}
.sidebar .navitem.active::before{
  content:"";
  position:absolute;
  left:-1px; top:50%;
  width:3px;
  height:60%;
  transform: translateY(-50%);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(34,211,238,.95), rgba(124,58,237,.95));
  box-shadow: 0 0 18px rgba(34,211,238,.25);
}

/* Hero title shimmer */
.hero .h-title{
  background: linear-gradient(90deg, rgba(255,255,255,.92), rgba(34,211,238,.92), rgba(124,58,237,.92), rgba(255,255,255,.92));
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: neoShimmer 6.5s ease infinite;
  letter-spacing: -0.4px;
}
@keyframes neoShimmer{ 0%{ background-position: 0% 50%; } 50%{ background-position: 100% 50%; } 100%{ background-position: 0% 50%; } }

/* Cards: glass + depth (keep sizing intact) */
.card, .hero-card, .modalbox, .menu{
  background: linear-gradient(180deg, rgba(255,255,255,.07), rgba(255,255,255,.04)) !important;
  border: 1px solid rgba(255,255,255,.12) !important;
  box-shadow: 0 14px 45px rgba(0,0,0,.22);
  backdrop-filter: blur(14px);
}

/* Neon “edge” (purely visual) */
.card, .hero-card{
  position:relative;
  overflow:hidden;
}

/* Inner cards should not clip controls (prevents cut buttons/inputs) */
.card.inner{ overflow: visible; }

/* Trips planner: keep action buttons readable and avoid clipping */
#view-trips .card.inner .row.wrap{ align-items: center; }
#view-trips .card.inner .btn{ white-space: nowrap; }
.card::before, .hero-card::before{
  content:"";
  position:absolute;
  inset:-1px;
  border-radius: inherit;
  padding:1px;
  background: conic-gradient(from 180deg, rgba(34,211,238,.0), rgba(34,211,238,.55), rgba(124,58,237,.55), rgba(249,115,22,.45), rgba(34,211,238,.0));
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity:.18;
  filter: blur(.2px);
  transform: rotate(0deg);
  pointer-events:none;
  transition: opacity .25s ease;
}
.card:hover::before, .hero-card:hover::before{ opacity:.36; }

/* Subtle inner glow (mouse-follow on desktop via --cx/--cy) */
.card::after, .hero-card::after{
  content:"";
  position:absolute; inset:0;
  background:
    radial-gradient(560px 320px at var(--cx,35%) var(--cy,25%), rgba(34,211,238,.14), transparent 60%),
    radial-gradient(560px 340px at calc(var(--cx,35%) + 25%) calc(var(--cy,25%) + 12%), rgba(124,58,237,.14), transparent 62%),
    radial-gradient(620px 360px at 50% 80%, rgba(249,115,22,.10), transparent 65%);
  opacity:.32;
  pointer-events:none;
  transition: opacity .22s ease;
}
.card:hover::after, .hero-card:hover::after{ opacity:.62; }

/* Buttons: polish without changing behavior */
.btn, .iconbtn{
  transition: transform .18s ease, background .18s ease, border-color .18s ease, filter .18s ease;
  position: relative;
  overflow: hidden;
}
.btn:hover, .iconbtn:hover{ transform: translateY(-1px); }
.btn:active, .iconbtn:active{ transform: translateY(0px); }

/* Premium ripple (created by fx.js) */
.fx-ripple{
  position:absolute;
  border-radius:999px;
  transform: translate(-50%, -50%) scale(0);
  opacity:.55;
  pointer-events:none;
  background: radial-gradient(circle, rgba(255,255,255,.55), rgba(255,255,255,0) 60%);
  animation: fxRipple .55s ease-out forwards;
}
@keyframes fxRipple{
  to{ transform: translate(-50%, -50%) scale(1); opacity:0; }
}

/* Menu open/close animation without changing app logic */
.menu{
  transform-origin: 90% 0%;
  transition: opacity .16s ease, transform .16s ease;
}
.menu[aria-hidden="true"]{ opacity:0; transform: translateY(-6px) scale(.98); pointer-events:none; }
.menu[aria-hidden="false"]{ opacity:1; transform: translateY(0) scale(1); }

/* View transitions (fx.js toggles .fx-view-enter) */
.view{ transition: opacity .22s ease, transform .22s ease; }
.view.fx-view-enter{ opacity:0; transform: translateY(8px); }

/* Primary button glow */
.btn.primary, .iconbtn.primary{
  border-color: rgba(34,211,238,.28) !important;
  background: linear-gradient(135deg, rgba(124,58,237,.85), rgba(34,211,238,.60)) !important;
  box-shadow: 0 18px 55px rgba(124,58,237,.22);
}

/* Hero spotlight shimmer line */
.hero{
  position:relative;
  overflow:hidden;
}
.hero::after{
  content:"";
  position:absolute; left:-80px; right:-80px; bottom:-1px; height:2px;
  background: linear-gradient(90deg, transparent, rgba(34,211,238,.65), rgba(124,58,237,.65), transparent);
  opacity:.35;
  filter: blur(.2px);
  animation: fxLine 5.2s ease-in-out infinite;
  pointer-events:none;
}
@keyframes fxLine{
  0%{ transform: translateX(-10%) scaleX(.8); opacity:.18; }
  50%{ transform: translateX(10%) scaleX(1.12); opacity:.42; }
  100%{ transform: translateX(-10%) scaleX(.8); opacity:.18; }
}

/* Reveal animation class added by fx.js */
.fx-reveal{
  opacity:0;
  transform: translateY(12px);
  filter: blur(2px);
  transition: opacity .7s ease, transform .7s ease, filter .7s ease;
}
.fx-reveal.fx-on{
  opacity:1;
  transform: translateY(0);
  filter: blur(0);
}

/* Hover lift for cards (non-modal) */
.card:not(.inner):hover{
  box-shadow: var(--neo-shadow);
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce){
  #fxSpot{ opacity:0 !important; }
  #fxBlobs{ display:none !important; }
  #fxProgress{ display:none !important; }
  .fxBlob{ animation:none !important; }
  .fx-reveal{ opacity:1 !important; transform:none !important; filter:none !important; }
  .hero::after{ animation:none !important; }
  .hero .h-title{ animation:none !important; }
  .btn, .iconbtn{ transition:none !important; }
}


/* --- Extras UI (Help, Command Palette, Back-to-top) --- */
#fxTop{
  width:44px; height:44px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(0,0,0,.28);
  backdrop-filter: blur(10px);
  box-shadow: 0 14px 45px rgba(0,0,0,.28);
}
#fxTop:hover{ background: rgba(255,255,255,.07); }

#fxHelp, #fxCmd{
  position: fixed;
  inset: 0;
  z-index: var(--z-overlay, 1000);
}
#fxHelp[aria-hidden="true"], #fxCmd[aria-hidden="true"]{ display:none; }
.fxHelpBack, .fxCmdBack{
  position:absolute; inset:0;
  background: rgba(0,0,0,.55);
}
.fxHelpBox{
  position: relative;
  width: min(720px, calc(100% - 20px));
  margin: 60px auto;
  border-radius: 22px;
  border: 1px solid rgba(255,255,255,.12);
  background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.04));
  box-shadow: 0 18px 60px rgba(0,0,0,.55);
}
.fxHelpHead{
  display:flex; align-items:center; justify-content:space-between;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255,255,255,.10);
}
.fxHelpTitle{ font-weight: 860; letter-spacing:-.2px; }
.fxHelpBody{ padding: 14px; }
.fxHelpGrid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.fxHelpGrid > div{
  display:flex; justify-content:space-between; gap:10px;
  padding: 10px 12px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.20);
}
.fxHelpGrid b{ font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; }
.fxHelpGrid span{ color: rgba(255,255,255,.72); font-size: 13px; }

.fxCmdBox{
  position: relative;
  width: min(680px, calc(100% - 20px));
  margin: 90px auto;
  border-radius: 22px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.35);
  backdrop-filter: blur(14px);
  box-shadow: 0 18px 60px rgba(0,0,0,.55);
  overflow:hidden;
}
.fxCmdInputWrap{
  display:flex; align-items:center; gap:10px;
  padding: 12px;
  border-bottom: 1px solid rgba(255,255,255,.10);
}
.fxCmdHint{
  font-size:12px; color: rgba(255,255,255,.62);
  border:1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.06);
  padding:6px 10px; border-radius: 999px;
}
.fxCmdList{ max-height: 360px; overflow:auto; padding: 8px; }
.fxCmdItem{
  width:100%;
  display:flex; align-items:center; justify-content:space-between;
  gap:10px;
  padding: 10px 12px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.04);
  cursor:pointer;
  color: rgba(255,255,255,.88);
  margin-bottom: 8px;
}
.fxCmdItem:hover{ background: rgba(255,255,255,.08); }
.fxCmdKey{
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 12px;
  color: rgba(255,255,255,.65);
}

/* Timeline / Trips / Docs */
.fxTimeGroup{ margin-top: 12px; }
.fxTimeDate{ font-weight: 860; color: rgba(255,255,255,.78); margin: 10px 0 8px; display:flex; align-items:center; justify-content:space-between; gap:12px; }
.fxTimeTotal{ font-weight: 900; color: rgba(255,255,255,.86); font-size: 13px; opacity:.95; }
.fxTimeItem{
  display:flex; align-items:flex-start; justify-content:space-between; gap:12px;
  padding: 12px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.04);
  margin-bottom: 10px;
}
.fxTimeType{ font-size:12px; color: rgba(255,255,255,.62); }
.fxTimeTitle{ font-weight: 780; margin-top: 2px; }
.fxTimeMeta{ color: rgba(255,255,255,.62); font-size: 13px; margin-top: 4px; }
.fxMini{ padding: 8px 10px; border-radius: 14px; }

/* Garage view summary */
.fxGarageTotals{ 
  border: 1px solid rgba(255,255,255,.12);
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.03));
  border-radius: 22px;
  padding: 12px 12px;
  margin: 8px 0 14px;
}
.fxGarageTotals .fxGTMain{ display:flex; align-items:baseline; justify-content:space-between; gap:12px; }
.fxGarageTotals .fxGTMain .k{ color: rgba(255,255,255,.60); font-size:12px; }
.fxGarageTotals .fxGTMain .v{ font-weight: 950; font-size: 18px; }
.fxGarageTotals .fxGTRow{ display:grid; grid-template-columns: repeat(auto-fit, minmax(150px,1fr)); gap:10px; margin-top: 10px; }
.fxGarageTotals .fxGT{ border: 1px solid rgba(255,255,255,.10); background: rgba(0,0,0,.22); border-radius: 18px; padding: 10px 12px; }
.fxGarageTotals .fxGT .k{ color: rgba(255,255,255,.60); font-size:12px; }
.fxGarageTotals .fxGT .v{ font-weight: 900; margin-top:2px; }

.fxTimeDate{ display:flex; align-items:center; justify-content:space-between; gap:10px; }
.fxTimeTotal{ color: rgba(255,255,255,.78); font-weight: 900; }

/* Health gauge */
.fxGaugeWrap{ margin-top: 10px; }
.fxGauge{ width: 140px; height: 140px; position:relative; }
.fxGauge svg{ width: 140px; height: 140px; transform: rotate(-90deg); }
.fxGaugeTrack{ fill:none; stroke: rgba(255,255,255,.14); stroke-width: 10; }
.fxGaugeProg{ fill:none; stroke: rgba(34,211,238,.9); stroke-width: 10; stroke-linecap: round; }
.fxGaugeWrap.warn .fxGaugeProg{ stroke: rgba(251,191,36,.95); }
.fxGaugeWrap.bad .fxGaugeProg{ stroke: rgba(251,113,133,.95); }
.fxGaugeCenter{ position:absolute; inset:0; display:grid; place-items:center; }
.fxGaugeCenter span{ font-weight: 950; font-size: 38px; letter-spacing:-.5px; }

.fxTripTitle{ font-weight: 900; font-size: 18px; letter-spacing:-.2px; }
.fxTripKpis{ display:grid; grid-template-columns: repeat(auto-fit, minmax(150px,1fr)); gap:10px; margin-top: 12px; }
.fxK{ border: 1px solid rgba(255,255,255,.10); background: rgba(0,0,0,.22); border-radius: 18px; padding: 10px 12px; }
.fxK .k{ color: rgba(255,255,255,.60); font-size: 12px; }
.fxK .v{ font-weight: 900; font-size: 16px; margin-top: 2px; }

.fxDoc{ display:flex; align-items:center; justify-content:space-between; gap:10px;
  padding: 12px; border-radius: 18px; border: 1px solid rgba(255,255,255,.10); background: rgba(255,255,255,.04); margin-bottom:10px; }
.fxDocT{ font-weight: 800; }

.fxKrow{ display:flex; align-items:center; justify-content:space-between; padding: 8px 0; border-bottom: 1px dashed rgba(255,255,255,.12); }
.fxKrow:last-child{ border-bottom: none; }

.pill.ok{ border:1px solid rgba(52,211,153,.25); background: rgba(52,211,153,.10); color: rgba(255,255,255,.86); }
.pill.warn{ border:1px solid rgba(251,191,36,.25); background: rgba(251,191,36,.10); color: rgba(255,255,255,.86); }
.pill.bad{ border:1px solid rgba(251,113,133,.25); background: rgba(251,113,133,.10); color: rgba(255,255,255,.86); }

@media (max-width: 900px){
  .fxHelpBox{ margin: 18px auto; }
  .fxHelpGrid{ grid-template-columns: 1fr; }
  .fxTripKpis{ grid-template-columns: 1fr 1fr; }
  #fxTop{ left: 12px; bottom: 12px; }
}


/* === Extras UI helpers (safe) === */
.grid3{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}
@media (max-width: 980px){.grid3{grid-template-columns:1fr}}

.grid4{display:grid;grid-template-columns:repeat(4,1fr);gap:12px}
@media (max-width: 1100px){.grid4{grid-template-columns:repeat(2,1fr)}}
@media (max-width: 700px){.grid4{grid-template-columns:1fr}}

.fxForm{border:1px solid rgba(255,255,255,.10);border-radius:18px;padding:12px;background:rgba(255,255,255,.03)}
.fxFormGrid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}
@media (max-width: 980px){.fxFormGrid{grid-template-columns:1fr}}
.fxField{display:flex;flex-direction:column;gap:6px}
.fxLabel{font-size:12px;letter-spacing:.2px;color:rgba(255,255,255,.72)}
.fxSpan2{grid-column:span 2}
@media (max-width: 980px){.fxSpan2{grid-column:auto}}

#docsList .card{margin:0}
#docsList .fxDocRow{padding:12px;border:1px solid rgba(255,255,255,.10);border-radius:16px;background:rgba(255,255,255,.04);display:flex;gap:12px;align-items:flex-start;justify-content:space-between;flex-wrap:wrap}
#docsList .fxDocMeta{color:rgba(255,255,255,.70);font-size:13px;line-height:1.35}

/* Avoid double-scroll in modals: card stays natural, overlay handles scroll */
.modalbox{overflow:visible !important; max-height:none !important}
.modal{overflow:auto !important}


/* === Garage/Report/Trips refinements (stable) === */
.fxTimeList{ display:flex; flex-direction:column; gap:10px; margin-top:10px; }
.fxTimeItem{ display:flex; align-items:flex-start; justify-content:space-between; gap:12px; padding:12px 14px; border:1px solid rgba(255,255,255,.08); border-radius:14px; background:rgba(255,255,255,.03); }
.fxTimeLeft{ min-width:0; }
.fxTimeType{ font-size:12px; opacity:.8; margin-bottom:2px; }
.fxTimeTitle{ font-weight:900; letter-spacing:-.2px; }
.fxTimeMeta{ margin-top:4px; opacity:.85; font-size:13px; }
.fxMini{ padding:8px 10px; border-radius:12px; }

.fxReportHead{ display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:12px; }
.fxReportBtns{ display:flex; gap:8px; flex-wrap:wrap; }
.fxReportTitle{ font-weight:950; font-size:18px; letter-spacing:-.2px; }
.fxReportSub{ opacity:.8; font-size:13px; margin-top:2px; }

.fxKpiGrid{ display:grid; grid-template-columns:repeat(auto-fit,minmax(160px,1fr)); gap:10px; margin-bottom:12px; }
.fxKpi{ padding:12px 14px; border-radius:16px; border:1px solid rgba(255,255,255,.08); background:rgba(255,255,255,.03); }
.fxKpi .k{ font-size:12px; opacity:.8; }
.fxKpi .v{ font-weight:950; font-size:18px; letter-spacing:-.2px; margin-top:2px; }

.fxReportGrid{ display:grid; grid-template-columns: 1fr 1fr; gap:12px; margin-top:12px; }
@media (max-width: 900px){ .fxReportGrid{ grid-template-columns: 1fr; } }

.fxPanel{ padding:14px; border-radius:18px; border:1px solid rgba(255,255,255,.08); background:rgba(255,255,255,.03); margin-top:12px; }
.fxPanelTitle{ font-weight:900; margin-bottom:10px; }
.fxTable th, .fxTable td{ padding:10px 10px; }

.fxGaugeWrap{ display:flex; justify-content:center; align-items:center; }
.fxGauge{ margin: 8px auto; }


/* === Trip Planner layout (no horizontal scroll, rectangular cards) === */
.fxTripPlannerGrid{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:14px;
}
.fxTripPlannerGrid > .card.inner{
  min-width:0;
  overflow:visible;
}
.fxTripPlannerGrid > .card.inner:nth-child(1){
  grid-column:1 / -1; /* Detalhes full width */
}
.fxTripPlannerGrid > .card.inner:nth-child(4){
  grid-column:1 / -1; /* Rota & notas full width */
}
@media (max-width: 900px){
  .fxTripPlannerGrid{ grid-template-columns:1fr; }
  .fxTripPlannerGrid > .card.inner:nth-child(1),
  .fxTripPlannerGrid > .card.inner:nth-child(4){ grid-column:auto; }
}


.fxTripPlannerGrid .fxFormGrid{
  grid-template-columns:repeat(2, minmax(0, 1fr));
}
.fxTripPlannerGrid .fxField{min-width:0;}
.fxTripPlannerGrid .input, .fxTripPlannerGrid .select, .fxTripPlannerGrid textarea{width:100%; box-sizing:border-box;}


/* Trips planner layout: stack cards full width (Details -> Checklist -> Budget -> Notes) */
#view-trips .fxTripPlannerGrid{display:grid !important; grid-template-columns:1fr !important; gap:16px !important;}
#view-trips .fxTripPlannerGrid .card.inner{width:100% !important;}
#view-trips .fxTripChecklistCard, #view-trips .fxTripBudgetCard{min-height:auto !important;}
#view-trips .fxTripBudgetCard input, #view-trips .fxTripBudgetCard select, #view-trips .fxTripBudgetCard textarea{max-width:100% !important;}
#view-trips .fxTripChecklistCard .fxClRow{flex-wrap:wrap !important;}
#view-trips .fxTripChecklistCard .fxClRow label{min-width:0 !important;}


/* ═══════════════════════════════════════════════════════════
