@font-face {
  font-family: "UKNumberPlate";
  src: url("/fonts/UKNumberPlate.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}


/* Layout wrapper so content shifts right of sidebar */
.layout {
  display: block;             /* no need for flex once nav is fixed */
  min-height: 100vh;
  background: #05060a;
}

/* Main content – pushed to the right of the sidebar */
.layout__content {
  margin-left: 64px;          /* matches collapsed sidebar width */
  transition: margin-left 0.25s ease;
  min-width: 0;
}

/* ------------------------------------------------------------------ */
/* Sidebar theme + typography                                         */
/* ------------------------------------------------------------------ */

:root {
  --nav-bg: rgba(3, 5, 12, 0.92);
  --nav-bg-hover: rgba(5, 9, 20, 0.96);
  --nav-border: rgba(255, 255, 255, 0.04);
  --nav-active-bg: rgba(11, 29, 53, 0.98);
  --nav-active-accent: #00d4ff;
  --nav-text: #d7d9e8;
  --nav-text-muted: #9b9fbc;
}

/* Global font (approx SF / Figma look) */
body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont,
    "SF Pro Text", "Segoe UI", sans-serif;
}

/* Sidebar inherits from body */
.side-nav,
.side-nav * {
  font-family: inherit;
}

/* ------------------------------------------------------------------ */
/* Sidebar container – glassy gradient, scrolls as one column         */
/* ------------------------------------------------------------------ */

.side-nav {
  position: fixed;
  left: 0;

  /* was: top: 0; height: 100vh; */
  top: 16px;
  height: calc(100vh - 32px);

  width: 64px;
  background: linear-gradient(
    to right,
    rgba(1, 2, 7, 0.98) 0%,
    rgba(6, 10, 24, 0.96) 45%,
    rgba(10, 14, 30, 0.84) 100%
  );
  border-right: 1px solid var(--nav-border);

  /* keep the nicer internal spacing */
  padding: 24px 12px 16px;

  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  overflow-x: hidden;
  transition: width 0.25s ease;
  z-index: 10;
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  scrollbar-width: none;
  overscroll-behavior: contain;
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.75);
}


.side-nav::-webkit-scrollbar {
  width: 0;
  height: 0;
}

/* Expanded (hover) state – match Figma */
.side-nav:hover {
  width: 280px; /* Figma's expanded width */

  border-right: 0.8px solid rgba(0, 184, 219, 0.20);
  background: rgba(0, 0, 0, 0.40);
  box-shadow: 0 0 20px 0 rgba(6, 182, 212, 0.10);
}

/* When sidebar expands on hover, nudge content over */
.side-nav:hover + .layout__content {
  margin-left: 280px;  /* was 260px */
}


/* ------------------------------------------------------------------ */
/* Collapsed vs expanded                                              */
/* ------------------------------------------------------------------ */

/* Hide labels / text parts when collapsed */
.side-nav:not(:hover) .side-nav__label,
.side-nav:not(:hover) .side-nav__vehicle-text,
.side-nav:not(:hover) .side-nav__vehicle-status,
.side-nav:not(:hover) .side-nav__chevron,
.side-nav:not(:hover) .side-nav__submenu-heading {
  display: none;
}

/* Centre icon chips when collapsed */
.side-nav:not(:hover) .side-nav__item,
.side-nav:not(:hover) .side-nav__vehicle {
  justify-content: center;
  padding-inline: 0;
  background: transparent;
  box-shadow: none;
}

/* In collapsed state, hide the cyan slice – icon glow is enough */
.side-nav:not(:hover) .side-nav__item--active::before {
  display: none;
}

/* ------------------------------------------------------------------ */
/* Common button style + hover glow                                   */
/* ------------------------------------------------------------------ */

.side-nav__item,
.side-nav__vehicle,
.side-nav__menu-item {
  width: 100%;
  border: none;
  background: transparent;
  color: var(--nav-text);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 10px;
  border-radius: 18px;
  cursor: pointer;
  font-size: 14px;
  text-align: left;
  position: relative;
  overflow: hidden; /* so active slice stays inside */
  transition:
    background 0.18s ease,
    color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.12s ease;
}

.side-nav__item:hover,
.side-nav__vehicle:hover,
.side-nav__menu-item:hover {
  transform: translateY(-1px);
}

/* Glow only when sidebar is expanded */
.side-nav:hover
  .side-nav__item:hover:not(.side-nav__item--active),
.side-nav:hover .side-nav__vehicle:hover,
.side-nav:hover .side-nav__menu-item:hover {
  background:
    radial-gradient(circle at left center, rgba(0, 212, 255, 0.18), transparent 55%),
    rgba(255, 255, 255, 0.03);
  box-shadow: 0 0 20px rgba(0, 212, 255, 0.3);
}

/* ------------------------------------------------------------------ */
/* Icons – centred chips, active glow                                 */
/* ------------------------------------------------------------------ */

.side-nav__icon,
.side-nav__vehicle-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(
    circle at top left,
    rgba(0, 212, 255, 0.25),
    rgba(8, 10, 22, 0.95)
  );
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.65);
  font-size: 18px;
}

/* Active icon gets stronger accent */
.side-nav__item--active .side-nav__icon {
  background: linear-gradient(135deg, #00d4ff, #00ffa3);
  box-shadow: 0 0 26px rgba(0, 212, 255, 0.75);
}

/* ------------------------------------------------------------------ */
/* Active pill + curved cyan slice                                    */
/* ------------------------------------------------------------------ */

.side-nav__item--active {
  background: var(--nav-active-bg);
}

.side-nav__item--active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 6px;
  width: 8px;
  border-radius: 0 999px 999px 0;
  background: linear-gradient(180deg, #00e0ff, #00ffa3);
  box-shadow: 0 0 18px rgba(0, 212, 255, 0.85);
}

/* ------------------------------------------------------------------ */
/* Top: vehicle card                                                  */
/* ------------------------------------------------------------------ */

/* Make the top vehicle badge taller / less crushed */
.side-nav__vehicle {
  padding: 12px 16px;       /* more vertical + horizontal space */
  min-height: 60px;         /* ensures it can breathe */
  border-bottom: 0.8px solid rgba(0, 184, 219, 0.10); /* Figma border */
}

.side-nav__vehicle-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.side-nav__vehicle-vrm {
  color: #ffffff;
  text-align: left;           /* Figma says center, but in a left-aligned row this looks better */
  font-family: Arial, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 20px;
  font-style: normal;
  font-weight: 700;
  line-height: 30px;          /* 150% */
  letter-spacing: 1px;
}


.side-nav__vehicle-status {
  font-family: Arial, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 12px;
  font-style: normal;
  font-weight: 400;
  line-height: 16px;              /* 133.333% */
  color: rgba(0, 211, 242, 0.70); /* teal from Figma */

  display: flex;
  align-items: center;
  gap: 6px;
}

.side-nav__status-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;                 /* matches that huge radius */
  background: #00C950;
  box-shadow: 0 0 8px 0 rgba(34, 197, 94, 0.60);
}


/* ------------------------------------------------------------------ */
/* Labels / typography                                                */
/* ------------------------------------------------------------------ */

/* Base nav row container */
.side-nav__item {
  width: 100%;
  border: none;
  background: transparent;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border-radius: 10px;              /* MOT History etc. */
  cursor: pointer;
  font: inherit;
  text-align: left;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

/* Label typography for the standard (small) rows */
.side-nav__label {
  font-family: Arial, system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;
  font-size: 12px;
  line-height: 16px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.7);
}


.side-nav__item:hover .side-nav__label,
.side-nav__vehicle:hover .side-nav__vehicle-vrm {
  color: #ffffff;
}

.side-nav__item--active .side-nav__label {
  color: #ffffff;
}

/* ------------------------------------------------------------------ */
/* Vehicle dropdown                                                   */
/* ------------------------------------------------------------------ */

.side-nav__vehicle-menu {
  display: none;
  flex-direction: column;
  gap: 4px;
  margin-top: -4px;
  margin-bottom: 4px;
}

.side-nav__vehicle-menu--open {
  display: flex;
}

/* ------------------------------------------------------------------ */
/* Reg marketplace group + submenu                                    */
/* ------------------------------------------------------------------ */

.side-nav__group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.side-nav__submenu {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding-left: 34px;
}

.side-nav__submenu--open {
  display: flex;
}

.side-nav__item--sub {
  padding-left: 0;
  font-size: 13px;
  color: var(--nav-text-muted);
}

/* "My Reg Market" heading */
.side-nav__submenu-heading {
  font-size: 11px;
  text-transform: none;
  letter-spacing: 0.08em;
  color: var(--nav-active-accent); /* cyan accent */
  margin: 4px 4px 6px;
  opacity: 0.9;
}

/* Vehicle dropdown + submenu items share this look */
.side-nav__menu-item {
  width: 100%;
  border: none;
  background: transparent;
  color: var(--nav-text);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 8px;
  border-radius: 12px;
  cursor: pointer;
  font-size: 13px;
  text-align: left;
  position: relative;
  transition:
    background 0.18s ease,
    color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.12s ease;
}

.side-nav__menu-item:hover {
  transform: translateY(-1px);
}

.side-nav:hover .side-nav__menu-item:hover {
  background:
    radial-gradient(circle at left center, rgba(0, 212, 255, 0.18), transparent 55%),
    rgba(255, 255, 255, 0.03);
  box-shadow: 0 0 20px rgba(0, 212, 255, 0.3);
}

.side-nav__menu-icon {
  flex-shrink: 0;
  width: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  opacity: 0.9;
}

.side-nav__menu-label {
  white-space: nowrap;
}

/* ------------------------------------------------------------------ */
/* Scroll area wrapper for main section list                          */
/* ------------------------------------------------------------------ */

.side-nav__scroll {
  flex: 1;
  overflow: visible;         /* let it just flow; no own scrollbar */
  padding-right: 2px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* ------------------------------------------------------------------ */
/* Divider + footer                                                   */
/* ------------------------------------------------------------------ */

.side-nav__divider {
  height: 1px;
  background: var(--nav-border);
  margin: 6px 0;
}

.side-nav__footer {
  margin-top: 6px;
}

.side-nav__item--footer {
  margin-top: 4px;
}

/* ------------------------------------------------------------------ */
/* Chevrons                                                           */
/* ------------------------------------------------------------------ */

.side-nav__chevron {
  margin-left: auto;
  font-size: 11px;
  color: var(--nav-text-muted);
}

.side-nav__chevron--small {
  font-size: 10px;
}

/* ------------------------------------------------------------------ */
/* Global page scroll behaviour                                       */
/* ------------------------------------------------------------------ */

html,
body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;   /* no horizontal scroll on the whole page */
}

/* Larger nav rows – Dashboard Overview, Running Costs, etc. */
.side-nav__item--lg {
  border-radius: 14px;
}

.side-nav__item--lg .side-nav__label {
  font-size: 14px;
  line-height: 20px;
}

/* Bigger style only for Dashboard Overview row */
.side-nav__item--dashboard {
  border-radius: 14px;       /* matches Figma */
  padding: 10px 16px;        /* a bit more breathing room */
}

.side-nav__item--dashboard .side-nav__label {
  font-size: 14px;
  line-height: 20px;         /* 142.857% */
}


/* Active style for "Dashboard Overview" */
.side-nav__item--dashboard.side-nav__item--active {
  border-radius: 14px;
  background: linear-gradient(
    90deg,
    rgba(0, 184, 219, 0.20) 0%,
    rgba(0, 0, 0, 0.00) 100%
  );
  box-shadow: 0 0 15px 0 rgba(6, 182, 212, 0.20);
}

/* --- Reg Marketplace parent pill ----------------------------------- */

/* Base pill – when NOT active */
.side-nav__item--parent {
  border-radius: 14px;                 /* matches Figma */
}

/* Label typography (collapsed or expanded) */
.side-nav__item--parent .side-nav__label {
  font-family: Arial, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  font-size: 14px;
  line-height: 20px;                   /* 142.857% */
  font-weight: 400;
  font-style: normal;
  color: rgba(255, 255, 255, 0.70);    /* default muted white */
}

/* ACTIVE state – gradient glow + cyan text */
.side-nav__item--parent.side-nav__item--parent-active {
  position: relative;
  background: linear-gradient(
    90deg,
    rgba(0, 184, 219, 0.20) 0%,
    rgba(0, 0, 0, 0.00) 100%
  );
  box-shadow: 0 0 15px 0 rgba(6, 182, 212, 0.20);
}

/* Cyan label when active */
.side-nav__item--parent.side-nav__item--parent-active .side-nav__label {
  color: #00D3F2;
}

/* The cyan “slice” on the far left of the pill */
.side-nav__item--parent.side-nav__item--parent-active::before {
  content: "";
  position: absolute;
  left: -8px;                          /* sticks out slightly from the pill */
  top: 6px;
  bottom: 6px;
  width: 10px;
  border-radius: 0 4px 4px 0;
  background: linear-gradient(180deg, #00D3F2 0%, #00D5BE 100%);
  box-shadow: 0 0 10px 0 rgba(6, 182, 212, 0.60);
  pointer-events: none;
}


/* ===============================
   ICON + LABEL COLOUR BEHAVIOUR
   =============================== */

/* 1. Base icon styling (light grey) */
.side-nav__vehicle-icon--svg svg,
.side-nav__menu-icon--svg svg,
.side-nav__icon--svg svg {
  display: block;
  width: 20px;
  height: 20px;
  color: rgba(255, 255, 255, 0.70);   /* light grey */
  transition:
    color 0.15s ease,
    transform 0.15s ease;
}

/* 2. Hover – make icon + label white and slightly larger */
.side-nav__vehicle:hover .side-nav__vehicle-icon--svg svg,
.side-nav__vehicle:hover .side-nav__vehicle-vrm,
.side-nav__vehicle:hover .side-nav__vehicle-status,
.side-nav__menu-item:hover .side-nav__menu-icon--svg svg,
.side-nav__menu-item:hover .side-nav__menu-label,
.side-nav__item:hover .side-nav__icon--svg svg,
.side-nav__item:hover .side-nav__label {
  color: #ffffff;
}

.side-nav__vehicle:hover .side-nav__vehicle-icon--svg svg,
.side-nav__menu-item:hover .side-nav__menu-icon--svg svg,
.side-nav__item:hover .side-nav__icon--svg svg {
  transform: scale(1.06);
}

/* 3. Active state – cyan icon + text
   (uses your existing .side-nav__item--active class) */
.side-nav__item--active .side-nav__icon--svg svg,
.side-nav__item--active .side-nav__label {
  color: #00D3F2;
}

/* If you want an "active" look for dropdown items later,
   you can add a .side-nav__menu-item--active class and use: */
.side-nav__menu-item--active .side-nav__menu-icon--svg svg,
.side-nav__menu-item--active .side-nav__menu-label {
  color: #00D3F2;
}

/* =========================
   MAIN NAV ITEMS – Figma pill + slice
   (Dashboard, Running Costs, Vehicle Health, etc.)
   ========================== */

/* Base main-item look */
.side-nav__item {
  position: relative;
}

/* Ensure contents sit above the slice */
.side-nav__item > *,
.side-nav__item .side-nav__icon--svg {
  position: relative;
  z-index: 1;
}

/* Base slice – invisible */
.side-nav__item::before {
  content: "";
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: -4px;                        /* nudges slightly outside so it hugs the edge */
  width: 0;                          /* grows on hover / active */
  border-radius: 0 4px 4px 0;        /* <- rounded on the RIGHT side (Figma style) */
  background: linear-gradient(180deg, #00D3F2 0%, #00D5BE 100%);
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.60);
  opacity: 0;
  pointer-events: none;
  transition: width 0.16s ease, opacity 0.16s ease;
}

/* Gradient under-glow for hover + active */
.side-nav__item:hover,
.side-nav__item.side-nav__item--active {
  background: linear-gradient(
    90deg,
    rgba(0, 184, 219, 0.20) 0%,
    rgba(0, 0, 0, 0.00) 100%
  );
  box-shadow: 0 0 15px rgba(6, 182, 212, 0.20);
}

/* Visible when hovered or active */
.side-nav__item:hover::before,
.side-nav__item--active::before {
  width: 8px;                       /* thinner than before so it’s not “fat” */
  opacity: 1;
}

/* -------------------------
   Icons – base, hover, active
   -------------------------- */

/* Base icon colour (light grey) */
.side-nav__icon--svg svg {
  width: 20px;
  height: 20px;
  display: block;
  color: rgba(255, 255, 255, 0.70);   /* used by stroke="currentColor" */
  transition: color 0.18s ease, transform 0.18s ease;
}

/* Remove the big blue disc from active items */
.side-nav__item .side-nav__icon {
  background: #101322;
  box-shadow: none;
}

/* On hover – icon enlarges and turns white */
.side-nav__item:hover .side-nav__icon--svg svg {
  transform: scale(1.08);
  color: #ffffff;
}

.side-nav__item:hover .side-nav__icon--svg path {
  stroke-opacity: 1;
}

/* Active (selected) – cyan icon + thicker stroke */
.side-nav__item.side-nav__item--active .side-nav__icon--svg svg {
  color: #00D3F2;
}

.side-nav__item.side-nav__item--active .side-nav__icon--svg path {
  stroke: #00D3F2;
  stroke-opacity: 1;
  stroke-width: 1.833px;
}

/* -------------------------
   Labels – base, hover, active
   -------------------------- */

/* Your existing label class for main items */
.side-nav__label {
  font-family: Arial, system-ui, -apple-system, BlinkMacSystemFont;
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
  color: rgba(255, 255, 255, 0.70);
  transition: color 0.18s ease;
}

/* Hover – text goes white */
.side-nav__item:hover .side-nav__label {
  color: #ffffff;
}

/* Active – text cyan to match Figma */
.side-nav__item.side-nav__item--active .side-nav__label {
  color: #00D3F2;
}

/* Dropdown rows should never show the slice */
.side-nav__menu-item {
  position: relative;   /* keep their layout happy */
}

.side-nav__menu-item::before {
  content: none !important;
}


/* =========================================================
   OVERRIDES – Figma-style left slice only on main nav rows
   (Dashboard, Running Costs, Vehicle Health, etc.)
   and NEVER on dropdown items
   ========================================================= */

/* 0. Kill the old fat vertical bar shape for active items */
.side-nav__item--active::before {
  /* reset the old bar so we can fully control it below */
  content: "";
  top: auto;
  bottom: auto;
  left: auto;
  right: auto;
  width: 0;
  height: auto;
  border-radius: 0;
  box-shadow: none;
}

/* 1️⃣ Base slice for TOP-LEVEL nav items only
   (children of .side-nav__scroll) */
.side-nav__scroll > .side-nav__item {
  position: relative;
}

.side-nav__scroll > .side-nav__item::before {
  content: "";
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: -4px;                         /* pokes out slightly */
  width: 0;                            /* grows on hover/active */
  border-radius: 0 4px 4px 0;          /* curved on the RIGHT side – cut into pill */
  background: linear-gradient(180deg, #00D3F2 0%, #00D5BE 100%);
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.60);
  opacity: 0;
  pointer-events: none;
  transition: width 0.16s ease, opacity 0.16s ease;
}

/* 2️⃣ Under-glow + visible slice when hovered or active */
.side-nav__scroll > .side-nav__item:hover,
.side-nav__scroll > .side-nav__item.side-nav__item--active {
  background: linear-gradient(
    90deg,
    rgba(0, 184, 219, 0.20) 0%,
    rgba(0, 0, 0, 0.00) 100%
  );
  box-shadow: 0 0 15px rgba(6, 182, 212, 0.20);
}

.side-nav__scroll > .side-nav__item:hover::before,
.side-nav__scroll > .side-nav__item.side-nav__item--active::before {
  width: 8px;                          /* thinner slice */
  opacity: 1;
}

/* 3️⃣ Dropdown rows (Reg Marketplace submenu) – NO slice / glow */
.side-nav__menu-item,
.side-nav__menu-item:hover {
  background: transparent;
  box-shadow: none;
}

/* absolutely disable any ::before that might leak through */
.side-nav__menu-item::before {
  content: none !important;
}

/* 4️⃣ Optional: no slice on the Active Vehicle header either */
.side-nav__vehicle::before,
.side-nav__vehicle:hover::before {
  content: none !important;
}


/* =========================================================
   NO-SLICE VARIANT – for dropdown rows (My Listings, etc.)
   ========================================================= */

.side-nav__item--no-slice,
.side-nav__item--no-slice:hover,
.side-nav__item--no-slice.side-nav__item--active {
  background: transparent !important;
  box-shadow: none !important;
}

/* absolutely disable the cyan slice */
.side-nav__item--no-slice::before {
  content: none !important;
  width: 0 !important;
  opacity: 0 !important;
}

/* When the sidebar is collapsed, never show the submenu */
.side-nav:not(:hover) .side-nav__submenu {
  display: none !important;
}

/* -----------------------------
   Mobile: hide sidebar, show bottom nav
------------------------------ */

.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;

  height: 64px;
  padding-bottom: env(safe-area-inset-bottom);

  display: none;               /* default hidden (desktop) */
  align-items: center;
  justify-content: space-around;

  background: rgba(10, 10, 12, 0.7);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid rgba(255, 255, 255, 0.08);

  z-index: 9999;
}

.bottom-nav__item {
  flex: 1;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;

  text-decoration: none;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.75);
}

.bottom-nav__item.is-active {
  color: #fff;
}

@media (max-width: 768px) {
  .side-nav {
    display: none !important;
  }

  .layout__content {
    margin-left: 0 !important;
    padding-bottom: 90px; /* stops content being hidden behind bottom nav */
  }

  .bottom-nav {
    display: flex;
  }
}
