:root {
  --bg0: #070a12;
  --bg1: #0b1020;
  --panel: rgba(255, 255, 255, 0.06);
  --panel2: rgba(255, 255, 255, 0.08);
  --text: rgba(255, 255, 255, 0.92);
  --muted: rgba(255, 255, 255, 0.68);
  --muted2: rgba(255, 255, 255, 0.52);
  --border: rgba(255, 255, 255, 0.10);
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  --radius: 14px;
  --radiusSm: 10px;
  --max: 1100px;
  --focus: 0 0 0 3px rgba(123, 97, 255, 0.35);
}

* { box-sizing: border-box; }

html, body {
  height: 100%;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--text);
  background: radial-gradient(1200px 800px at 15% 0%, #162243 0%, transparent 60%),
              radial-gradient(900px 600px at 100% 20%, #2a1c43 0%, transparent 60%),
              linear-gradient(180deg, var(--bg1), var(--bg0));
}

a { color: inherit; }

.vf-root {
  min-height: 100%;
}

.vf-screen {
  display: none;
  min-height: 100vh;
}

.vf-screen.is-active {
  display: block;
}

.vf-login,
.vf-callback {
  display: grid;
  place-items: center;
  padding: 24px;
}

.vf-loginCard {
  width: 100%;
  max-width: 460px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
  backdrop-filter: blur(14px);
}

.vf-brand {
  display: flex;
  gap: 14px;
  align-items: center;
}

.vf-brandMark {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #7b61ff, #ff5fd7);
  font-weight: 800;
  letter-spacing: 0.5px;
}

.vf-brandTitle {
  font-size: 22px;
  font-weight: 800;
  line-height: 1.05;
}

.vf-brandTag {
  font-size: 13px;
  color: var(--muted);
  margin-top: 2px;
}

.vf-loginBody {
  margin-top: 14px;
}

.vf-muted { color: var(--muted); }
.vf-small { font-size: 12px; }
.vf-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  padding: 2px 6px;
  border-radius: 8px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.10);
}

.vf-btn {
  appearance: none;
  border: 0;
  border-radius: 12px;
  padding: 12px 14px;
  font-weight: 700;
  cursor: pointer;
  color: var(--text);
  background: rgba(255,255,255,0.10);
  transition: transform 120ms ease, background 120ms ease;
}

.vf-btn:active { transform: translateY(1px); }
.vf-btn:focus { outline: none; box-shadow: var(--focus); }

.vf-btnPrimary {
  width: 100%;
  background: linear-gradient(135deg, #7b61ff, #ff5fd7);
}

.vf-btnSecondary {
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.14);
}

.vf-alert {
  margin-top: 14px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  font-size: 13px;
}

.vf-alertError {
  border-color: rgba(255, 64, 64, 0.45);
  background: rgba(255, 64, 64, 0.12);
}

/* APP SHELL */
.vf-app {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: auto 1fr;
}

.vf-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  background: rgba(0,0,0,0.35);
  border-bottom: 1px solid rgba(255,255,255,0.10);
  backdrop-filter: blur(14px);
}

.vf-topbarTitle {
  font-weight: 800;
  letter-spacing: 0.2px;
}

.vf-iconBtn {
  appearance: none;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.06);
  color: var(--text);
  border-radius: 12px;
  padding: 10px 12px;
  cursor: pointer;
}
.vf-iconBtn:focus { outline: none; box-shadow: var(--focus); }

.vf-userChip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06);
}

.vf-userAvatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  background: rgba(255,255,255,0.12);
}

.vf-userName {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

.vf-sidenav {
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  width: min(340px, 86vw);
  background: rgba(8, 10, 18, 0.85);
  border-right: 1px solid rgba(255,255,255,0.12);
  box-shadow: var(--shadow);
  transform: translateX(-110%);
  transition: transform 180ms ease;
  z-index: 30;
  display: flex;
  flex-direction: column;
  backdrop-filter: blur(14px);
}

.vf-sidenav.is-open {
  transform: translateX(0);
}

.vf-sidenavHeader {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px;
  border-bottom: 1px solid rgba(255,255,255,0.10);
}

.vf-brandSmall {
  display: flex;
  gap: 12px;
  align-items: center;
}

.vf-brandMarkSmall {
  width: 38px;
  height: 38px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #7b61ff, #ff5fd7);
  font-weight: 900;
}

.vf-sidenavTitle { font-weight: 800; }
.vf-sidenavSub { font-size: 12px; color: var(--muted); margin-top: 2px; }

.vf-nav {
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.vf-navItem {
  display: flex;
  gap: 10px;
  align-items: center;
  text-decoration: none;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid transparent;
  color: var(--text);
  background: rgba(255,255,255,0.04);
}

.vf-navItem:hover {
  background: rgba(255,255,255,0.07);
  border-color: rgba(255,255,255,0.10);
}

.vf-navItem.is-active {
  background: rgba(123, 97, 255, 0.18);
  border-color: rgba(123, 97, 255, 0.35);
}

.vf-navIcon { width: 22px; text-align: center; }

.vf-navItemButton {
  width: 100%;
  font: inherit;
  cursor: pointer;
}

.vf-pill {
  margin-left: auto;
  font-size: 11px;
  color: rgba(255,255,255,0.78);
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.06);
}

.vf-sidenavFooter {
  margin-top: auto;
  padding: 12px 14px;
  border-top: 1px solid rgba(255,255,255,0.10);
}

.vf-link {
  color: rgba(123, 97, 255, 0.95);
  text-decoration: none;
}
.vf-link:hover { text-decoration: underline; }

.vf-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 25;
}

.vf-main {
  padding: 18px 14px 40px;
}

.vf-container {
  max-width: var(--max);
  margin: 0 auto;
}

.vf-h1 {
  font-size: 26px;
  margin: 0;
  font-weight: 900;
}

.vf-h2 {
  font-size: 16px;
  margin: 0;
  font-weight: 800;
}

.vf-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px;
  backdrop-filter: blur(14px);
}

.vf-row {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.vf-spacer { flex: 1; }

.vf-input {
  width: 100%;
  max-width: 420px;
  padding: 11px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.06);
  color: var(--text);
}

/*
  Dropdown readability (Windows/Chrome):
  Some browsers render the <select> dropdown list with a light (white) background
  but inherit the <select> text color for <option>. Since our theme uses a light
  text color, that can result in white text on white background inside the
  expanded dropdown menu. We keep the closed <select> dark-themed, but force
  dropdown options to use a dark text color so they're always readable.
*/
select.vf-input option,
select.vf-input optgroup {
  /* Fallback */
  color: #111;
  background: #fff;

  /* Prefer system colors when supported (matches OS light/dark UI). */
  color: CanvasText;
  background: Canvas;
}

.vf-input:focus { outline: none; box-shadow: var(--focus); }

.vf-chipRow {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* Toggle controls (used on garage filters) */
.vf-toggleRow {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.vf-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.06);
  cursor: pointer;
  user-select: none;
}

.vf-toggle span {
  font-weight: 800;
  font-size: 12px;
}

.vf-toggle input[type="checkbox"] {
  appearance: none;
  width: 42px;
  height: 22px;
  border-radius: 999px;
  position: relative;
  border: 1px solid rgba(255,255,255,0.22);
  background: rgba(255,255,255,0.14);
  transition: background 0.15s ease, border-color 0.15s ease;
  outline: none;
}

.vf-toggle input[type="checkbox"]::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: rgba(255,255,255,0.92);
  transition: transform 0.15s ease;
}

.vf-toggle input[type="checkbox"]:checked {
  background: rgba(123, 97, 255, 0.30);
  border-color: rgba(123, 97, 255, 0.50);
}

.vf-toggle input[type="checkbox"]:checked::after {
  transform: translateX(20px);
}

.vf-chip {
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.06);
  color: var(--text);
  border-radius: 999px;
  padding: 8px 10px;
  cursor: pointer;
  font-weight: 800;
  font-size: 12px;
}

.vf-chip.is-active {
  background: rgba(123, 97, 255, 0.18);
  border-color: rgba(123, 97, 255, 0.35);
}

.vf-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
  margin-top: 12px;
}

/* Two-column layout used by streamer tools (ex: Users + Selected User panel) */
.vf-splitGrid {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 12px;
  align-items: start;
}

@media (max-width: 980px) {
  .vf-splitGrid {
    grid-template-columns: 1fr;
  }
}

.vf-tile {
  position: relative;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.04);
  cursor: pointer;
  min-height: 90px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.vf-tile:hover {
  background: rgba(255,255,255,0.07);
  border-color: rgba(255,255,255,0.14);
}

.vf-tile.is-selected {
  border-color: rgba(123, 97, 255, 0.45);
  background: rgba(123, 97, 255, 0.14);
}

.vf-tileTitle {
  font-weight: 900;
  font-size: 13px;
  line-height: 1.15;
}

.vf-tileMeta {
  font-size: 11px;
  color: var(--muted);
  margin-top: 6px;
}

.vf-tileBadge {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(0,0,0,0.35);
}

.vf-tileBadgeStar {
  border-color: rgba(255, 215, 90, 0.40);
  background: rgba(255, 215, 90, 0.10);
}

.vf-tileBadgeLock {
  border-color: rgba(255, 120, 120, 0.40);
  background: rgba(255, 120, 120, 0.10);
}

.vf-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.vf-toast {
  position: fixed;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(12px);
  z-index: 40;
  max-width: min(90vw, 760px);
  font-size: 13px;
}

@media (min-width: 960px) {
  .vf-topbarTitle {
    font-size: 16px;
  }
}


/* ---------- MULTI-PAGE ADDITIONS ---------- */

.vf-menuLinks {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.vf-menuLinkCard {
  display: block;
  text-decoration: none;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.04);
}

.vf-menuLinkCard:hover {
  background: rgba(255,255,255,0.07);
  border-color: rgba(255,255,255,0.14);
}

.vf-cardTitle {
  font-weight: 900;
  font-size: 15px;
}

.vf-cardSub {
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted);
}

/* ---------- GARAGE LAYOUT ---------- */

.vf-garageLayout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 12px;
}

/*
  Garage uses a horizontally scrollable vehicle table.

  In CSS Grid, children default to min-width:auto which can allow wide content
  (like tables with a min-width) to force the entire grid wider than the
  container. Setting min-width:0 on the direct children ensures the table can
  scroll inside its own card without stretching the whole layout.
*/
.vf-garageLayout > * {
  min-width: 0;
}

@media (min-width: 980px) {
  .vf-garageLayout {
    /* Use minmax(0, …) so columns can shrink even when content is wide. */
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
    align-items: start;
  }
}

.vf-gridFixed {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.vf-vehicleTile {
  position: relative;
  padding: 10px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.04);
  cursor: pointer;
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 10px;
  align-items: center;
  min-height: 68px;
}

.vf-vehicleTile:hover {
  background: rgba(255,255,255,0.07);
  border-color: rgba(255,255,255,0.14);
}

.vf-vehicleTile.is-locked {
  opacity: 0.60;
  filter: grayscale(0.55);
  /* Locked vehicles are still selectable (preview), just not settable as default. */
  cursor: pointer;
}

.vf-vehicleTile.is-locked:hover {
  transform: none;
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.10);
}

.vf-vehicleTile.is-selected {
  border-color: rgba(123, 97, 255, 0.45);
  background: rgba(123, 97, 255, 0.14);
}

.vf-tileThumb {
  width: 54px;
  height: 54px;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(0,0,0,0.25);
  border: 1px solid rgba(255,255,255,0.10);
  display: grid;
  place-items: center;
}

.vf-tileImg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.vf-tileInfo {
  min-width: 0;
}

.vf-tileId {
  font-size: 11px;
  color: var(--muted2);
  margin-top: 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vf-controlsGrid {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: end;
}

.vf-field {
  display: grid;
  gap: 6px;
}

.vf-fieldLabel {
  font-size: 11px;
  color: var(--muted);
  font-weight: 800;
}

.vf-inputSmall {
  width: 100px;
  max-width: 140px;
  padding: 10px 10px;
}

.vf-pager {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.vf-btnTiny {
  padding: 9px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 800;
}

/* ---------- PREVIEW ---------- */

.vf-previewViewport {
  margin-top: 12px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(0,0,0,0.25);
  height: 260px;
  overflow: hidden;

  /*
    IMPORTANT:
    Use flex (not grid) for the preview viewport.

    We previously used a grid container and sized the <img> using percentage
    heights. In practice, some browsers can resolve percentage heights on
    replaced elements (like <img>) inside auto-sized grid tracks in a way that
    lets the image render larger than the viewport and then get clipped by
    overflow:hidden.

    Flex + explicit padding is more reliable for keeping every PNG fully
    visible (no cut-off) while still filling the available preview area.
  */
  display: flex;
  align-items: center;
  justify-content: center;

  /* Breathing room without scaling tricks */
  padding: 12px;
  box-sizing: border-box;
}

.vf-previewImg {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center;
  /*
    Vehicle preview image.
    We use object-fit: contain so the full PNG is visible, centered.
  */
  display: block;
  transform: none;
  user-select: none;
  -webkit-user-drag: none;
}

.vf-previewHint {
  margin-top: 10px;
  font-size: 12px;
  color: var(--muted);
}

.vf-previewControls {
  margin-top: 10px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* Make menu cards two columns on wider screens */
@media (min-width: 720px) {
  .vf-menuLinks {
    grid-template-columns: 1fr 1fr;
  }
}

/* ---------- STATS TABLE ---------- */

.vf-tableWrap {
  width: 100%;
  overflow-x: auto;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(0,0,0,0.18);
}

/* Taller scroll container (used by Stats page) so sticky headers work nicely */
.vf-tableWrapTall {
  max-height: 68vh;
  overflow: auto;
}

.vf-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1180px; /* allow horizontal scroll for many columns */
}

/*
  Opt-in override for tables that should NOT force a large min-width.
  Used by the Garage vehicle list so the Name column doesn't expand to an
  unnecessarily wide size when only a few columns are visible.
*/
.vf-tableAuto {
  min-width: 0;
}

/* Allow a slightly narrower table when users hide most columns */
.vf-tableStriped {
  min-width: 980px;
}

.vf-table th,
.vf-table td {
  padding: 10px 10px;
  border-bottom: 1px solid rgba(255,255,255,0.10);
  border-right: 1px solid rgba(255,255,255,0.08);
  font-size: 12px;
  white-space: nowrap;
}

/* Remove the last vertical border in each row */
.vf-table tr > *:last-child {
  border-right: none;
}

.vf-table thead th {
  text-align: left;
  font-weight: 900;
  color: rgba(255,255,255,0.92);
  background: rgba(255,255,255,0.04);
  cursor: pointer;
  user-select: none;
}

/* Right align numeric headers so they match right-aligned numeric cells */
.vf-table thead th.vf-thNum {
  text-align: right;
}

.vf-table thead th.vf-thViewer {
  text-align: left;
}

/* Two-line header labels */
.vf-thTop {
  font-size: 12px;
  line-height: 1.1;
}

.vf-thBottom {
  margin-top: 2px;
  font-size: 10px;
  line-height: 1.1;
  color: rgba(255,255,255,0.70);
  font-weight: 800;
  letter-spacing: 0.02em;
}

.vf-sortIcon {
  margin-left: 4px;
  opacity: 0.9;
}

/* Optional grouped header row */
.vf-thGroupRow th {
  background: rgba(255,255,255,0.025);
  color: rgba(255,255,255,0.70);
  font-weight: 900;
  font-size: 11px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  cursor: default;
  text-align: center;
}

.vf-thGroup {
  padding-top: 8px;
  padding-bottom: 8px;
}

.vf-table tbody tr:hover td {
  background: rgba(255,255,255,0.03);
}

/* Alternating row color */
.vf-tableStriped tbody tr:nth-child(even) td {
  background: rgba(255,255,255,0.02);
}

.vf-tableStriped tbody tr:hover td {
  background: rgba(255,255,255,0.05);
}

.vf-tdViewer {
  font-weight: 800;
}

/* Viewer cell (avatar + name) */
.vf-viewerCell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.vf-viewerText {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.vf-viewerName {
  font-weight: 900;
}

.vf-viewerSub {
  font-size: 11px;
  color: rgba(255,255,255,0.70);
}

.vf-avatar {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.12);
  object-fit: cover;
  background: rgba(255,255,255,0.04);
}

.vf-avatarPlaceholder {
  display: grid;
  place-items: center;
  font-size: 12px;
}

.vf-tdNum {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* Sticky header + sticky first column (Stats page) */
.vf-tableSticky thead th {
  position: sticky;
  top: 0;
  z-index: 5;
}

.vf-stickyCol {
  position: sticky;
  left: 0;
  z-index: 4;
  background: rgba(0,0,0,0.35);
  backdrop-filter: blur(2px);
  border-right: 1px solid rgba(255,255,255,0.16);
}

/* Ensure striped background still looks right on sticky cells */
.vf-tableStriped tbody tr:nth-child(even) td.vf-stickyCol {
  background: rgba(0,0,0,0.28);
}

.vf-tableStriped tbody tr:hover td.vf-stickyCol {
  background: rgba(0,0,0,0.42);
}

.vf-tableSticky thead th.vf-stickyCol {
  z-index: 6;
}

/* ---------- MODAL (Stats Columns) ---------- */

.vf-modalBackdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.58);
  backdrop-filter: blur(3px);
  z-index: 2000;
}

.vf-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(860px, calc(100vw - 32px));
  max-height: calc(100vh - 72px);
  overflow: auto;
  z-index: 2001;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(10, 12, 18, 0.96);
  padding: 16px;
  box-shadow: 0 18px 70px rgba(0,0,0,0.55);
}

.vf-colsBody {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.vf-colsGroup {
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 14px;
  padding: 12px;
  background: rgba(255,255,255,0.03);
}

.vf-colsGroupTitle {
  font-weight: 950;
  letter-spacing: 0.02em;
  margin-bottom: 8px;
}

.vf-colsGrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

@media (max-width: 760px) {
  .vf-colsGrid {
    grid-template-columns: 1fr;
  }
}

.vf-checkRow {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(0,0,0,0.16);
  border: 1px solid rgba(255,255,255,0.06);
}

.vf-checkRow:hover {
  background: rgba(255,255,255,0.04);
}

.vf-checkLabel {
  font-weight: 850;
}

.vf-table thead th:hover {
  background: rgba(255,255,255,0.06);
}

.vf-table tbody tr:last-child td {
  border-bottom: 0;
}

/* ---------- ACHIEVEMENTS PAGE ---------- */

.vf-achList {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 12px;
}

@media (min-width: 860px) {
  .vf-achList {
    grid-template-columns: 1fr 1fr;
  }
}

.vf-achCard {
  padding: 14px;
}

.vf-achCard.is-unlocked {
  border-color: rgba(255, 215, 90, 0.42);
  background: rgba(255, 215, 90, 0.06);
}

.vf-achCard.is-eligible {
  border-color: rgba(123, 97, 255, 0.42);
  background: rgba(123, 97, 255, 0.08);
}

.vf-achHeader {
  display: flex;
  align-items: center;
  gap: 10px;
}

.vf-achTitle {
  font-weight: 900;
  font-size: 16px;
  line-height: 1.2;
  flex: 1;
}

.vf-achBadge {
  font-size: 11px;
  font-weight: 900;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(0, 0, 0, 0.25);
  white-space: nowrap;
}

.vf-achBadgeDone {
  border-color: rgba(255, 215, 90, 0.55);
  background: rgba(255, 215, 90, 0.12);
}

.vf-achBadgeEligible {
  border-color: rgba(123, 97, 255, 0.55);
  background: rgba(123, 97, 255, 0.18);
}

.vf-achDesc {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.vf-achOverall {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,0.10);
}

.vf-achOverallTop {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.vf-achOverallLabel {
  font-size: 12px;
  font-weight: 900;
  color: rgba(255,255,255,0.88);
}

.vf-achOverallPct {
  font-size: 12px;
  font-weight: 900;
  color: rgba(255,255,255,0.78);
}

.vf-progressBar {
  height: 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  overflow: hidden;
  margin-top: 8px;
}

.vf-progressFill {
  height: 100%;
  width: 0%;
  background: linear-gradient(135deg, #7b61ff, #ff5fd7);
}

.vf-achMeta {
  margin-top: 8px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.35;
}

.vf-achReqs {
  margin-top: 12px;
  display: grid;
  gap: 10px;
}

.vf-achReq {
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.04);
  padding: 10px;
}

.vf-achReqMain {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.vf-achReqLabel {
  font-weight: 900;
  font-size: 12px;
}

.vf-achReqValue {
  font-size: 12px;
  color: rgba(255,255,255,0.78);
  white-space: nowrap;
}

.vf-achReqBar {
  height: 8px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  overflow: hidden;
  margin-top: 8px;
}

.vf-achReqBarFill {
  height: 100%;
  width: 0%;
  background: rgba(123, 97, 255, 0.85);
}


/* ---------- DATA GRID (shared with Admin) ---------- */

.vf-select {
  padding: 11px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.06);
  color: var(--text);
}

.vf-select:focus { outline: none; box-shadow: var(--focus); }

/* Keep dropdown list readable on light-background native option menus */
.vf-select option,
.vf-select optgroup {
  /* Fallback */
  color: #111;
  background: #fff;

  /* Prefer system colors when supported */
  color: CanvasText;
  background: Canvas;
}

/* Small sort indicator used by datagrid tables */
.vf-sort {
  margin-left: 6px;
  font-size: 11px;
  opacity: 0.85;
}

/* Selected row highlight (datagrid uses tr.is-selected) */
.vf-table tbody tr.is-selected td {
  background: rgba(123, 97, 255, 0.14);
}

/* Small thumbnail used inside table grids. */
.vf-gridThumb {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(0,0,0,0.25);
  border: 1px solid rgba(255,255,255,0.10);
  display: flex;
  align-items: center;
  justify-content: center;
}

.vf-gridThumbImg {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* Column picker (datagrid) */
.vf-colPicker {
  position: relative;
}

.vf-colPickerPanel {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 220px;
  max-width: 320px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 10px;
  z-index: 30;
}

.vf-colPickerTitle {
  font-size: 12px;
  font-weight: 900;
  margin-bottom: 8px;
}

.vf-colPickerList {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 260px;
  overflow: auto;
  padding-right: 2px;
}

.vf-colPickerOpt {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  border-radius: 12px;
  cursor: pointer;
  user-select: none;
  border: 1px solid transparent;
}

.vf-colPickerOpt:hover {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.10);
}

.vf-colPickerOpt input {
  width: 16px;
  height: 16px;
}

.vf-colPickerOpt span {
  font-size: 12px;
  font-weight: 800;
}

/* -------------------------------------------------------------------------- */
/* Vehicle Slots (Streamer tool) */
/* -------------------------------------------------------------------------- */

.vf-slotGridHeader {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 10px;
}

.vf-slotGridHeaderCell {
  text-align: center;
  font-weight: 900;
  font-size: 12px;
  color: var(--muted);
}

.vf-slotGrid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.vf-slotCell {
  position: relative;
  min-height: 92px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.04);
  user-select: none;
}

.vf-slotCell.is-filled {
  cursor: grab;
  /* Make room for the vehicle thumbnail in the bottom-right corner. */
  padding-right: 64px;
}

.vf-slotCell.is-empty {
  cursor: pointer;
  opacity: 0.92;
}

.vf-slotCell.is-drop {
  outline: 2px dashed rgba(123, 97, 255, 0.55);
  outline-offset: 2px;
}

.vf-slotNum {
  position: absolute;
  top: 10px;
  left: 10px;
  font-size: 12px;
  font-weight: 900;
  padding: 2px 8px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(0,0,0,0.35);
}

.vf-slotLabel {
  margin-top: 22px;
  font-weight: 900;
  font-size: 13px;
  line-height: 1.15;
}

.vf-slotSub {
  margin-top: 6px;
  font-size: 11px;
  color: var(--muted);
  word-break: break-word;
}

.vf-slotClearBtn {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(0,0,0,0.25);
  color: inherit;
  cursor: pointer;
}

.vf-slotClearBtn:hover {
  background: rgba(255,255,255,0.08);
}

.vf-slotThumb {
  position: absolute;
  right: 10px;
  bottom: 10px;
}

.vf-vehicleList {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 70vh;
  overflow: auto;
  padding-right: 2px;
}

.vf-vehicleItem {
  min-height: 86px;
}

/* Use contain so the full PNG is visible (no crop) like the Garage preview thumbnails. */
.vf-vehicleThumbImg {
  object-fit: contain;
  background: transparent;
}
