/* ============================================================
   FREIGHT LIVE MARKET — flm.css
   Drop-in CSS (prefix .flm-) — no framework required.
   Catawiki-style: red/orange urgency, big timers, motion.
   ============================================================ */

/* ---------- Design tokens ---------- */
:root {
  --flm-bg:          #f5f3ee;
  --flm-surface:     #ffffff;
  --flm-ink:         #0b0b0d;
  --flm-ink-2:       #2a2a30;
  --flm-mute:        #6b6b73;
  --flm-mute-2:      #a1a1a8;
  --flm-line:        #e6e3db;
  --flm-line-2:      #efede6;

  --flm-brand:       #d63c1e;       /* Catawiki-ish red */
  --flm-brand-ink:   #8a2411;
  --flm-brand-soft:  #fde7e1;

  --flm-accent:      #f08a1a;       /* urgent orange */
  --flm-warn:        #c97a00;
  --flm-warn-bg:     #fff3d6;
  --flm-warn-strong: #f6b24a;

  --flm-success:     #0f7a46;
  --flm-success-bg:  #dff4e6;

  --flm-danger:      #c41c1c;
  --flm-danger-bg:   #fde4e4;

  --flm-info:        #1d5bd4;
  --flm-info-bg:     #e1ebff;

  --flm-hot:         #e8390b;
  --flm-hot-bg:      #ffe0d3;

  --flm-radius:      4px;
  --flm-radius-lg:   6px;
  --flm-radius-xl:   10px;

  --flm-shadow-sm:   0 1px 2px rgba(20,20,25,.06);
  --flm-shadow:      0 2px 6px rgba(20,20,25,.08), 0 1px 2px rgba(20,20,25,.04);
  --flm-shadow-lg:   0 16px 48px rgba(20,20,25,.22), 0 4px 12px rgba(20,20,25,.08);

  --flm-font: ui-sans-serif, -apple-system, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --flm-font-mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
}

/* ---------- Reset-lite, scoped ---------- */
.flm-body {
  margin: 0;
  background: var(--flm-bg);
  color: var(--flm-ink);
  font-family: var(--flm-font);
  font-size: 14px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
.flm-body *,
.flm-body *::before,
.flm-body *::after { box-sizing: border-box; }
.flm-body button { font-family: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
.flm-body a { color: inherit; text-decoration: none; }
.flm-body input { font-family: inherit; }

/* ============================================================
   TOPBAR
   ============================================================ */
.flm-topbar {
  background: var(--flm-ink);
  color: #fff;
  border-bottom: 1px solid #000;
}
.flm-topbar__inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 14px 28px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 32px;
}

.flm-brand { display: flex; align-items: center; gap: 12px; }
.flm-brand__mark {
  color: var(--flm-brand);
  width: 40px; height: 40px;
  background: rgba(255,255,255,.06);
  border-radius: var(--flm-radius);
  display: grid; place-items: center;
}
.flm-brand__logo {
  width: 48px;
  height: 28px;
  object-fit: cover;
  border-radius: 6px;
  display: block;
}
.flm-brand__title { font-weight: 800; letter-spacing: -0.01em; font-size: 15px; }
.flm-brand__sub   { font-size: 11px; color: #9a9aa5; margin-top: 1px; }

.flm-nav { display: flex; gap: 4px; }
.flm-nav__item {
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 500;
  color: #c8c8d0;
  border-radius: var(--flm-radius);
}
.flm-nav__item:hover { background: rgba(255,255,255,.06); color: #fff; }
.flm-nav__item--active {
  background: rgba(255,255,255,.08);
  color: #fff;
  font-weight: 600;
}

.flm-topbar__right { display: flex; align-items: center; gap: 20px; }

.flm-pulse {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(214, 60, 30, .14);
  border: 1px solid rgba(214, 60, 30, .4);
  padding: 6px 12px;
  border-radius: 100px;
  font-size: 12px;
}
.flm-pulse__dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--flm-brand);
  box-shadow: 0 0 0 0 rgba(214, 60, 30, .5);
  animation: flm-pulse 1.6s ease-out infinite;
}
.flm-pulse__label { font-weight: 700; letter-spacing: 0.06em; color: #ffb8a5; }
.flm-pulse__count { color: #e0e0e6; }

@keyframes flm-pulse {
  0%   { box-shadow: 0 0 0 0   rgba(214, 60, 30, .55); }
  70%  { box-shadow: 0 0 0 10px rgba(214, 60, 30, 0);  }
  100% { box-shadow: 0 0 0 0   rgba(214, 60, 30, 0);   }
}

.flm-me { display: flex; align-items: center; gap: 10px; }
.flm-me__avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: linear-gradient(135deg, #f08a1a, #d63c1e);
  color: #fff; font-weight: 800; font-size: 12px;
  display: grid; place-items: center;
  letter-spacing: 0.03em;
}
.flm-me__name { font-size: 13px; font-weight: 600; }
.flm-me__role { font-size: 11px; color: #9a9aa5; }

/* ============================================================
   HERO
   ============================================================ */
.flm-hero {
  background: linear-gradient(180deg, #fdfbf5 0%, var(--flm-bg) 100%);
  border-bottom: 1px solid var(--flm-line);
}
.flm-hero__inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 36px 28px 28px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 40px;
  align-items: end;
}
.flm-hero__eyebrow {
  font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--flm-mute); font-weight: 600; margin-bottom: 10px;
}
.flm-hero__eyebrow span { color: var(--flm-ink); font-variant-numeric: tabular-nums; }
.flm-hero__title {
  font-size: 34px; line-height: 1.1; margin: 0 0 14px;
  font-weight: 800; letter-spacing: -0.025em;
  max-width: 720px;
  text-wrap: balance;
}
.flm-hero__title-accent {
  color: var(--flm-brand);
  font-variant-numeric: tabular-nums;
}
.flm-hero__lead {
  margin: 0; color: var(--flm-mute); font-size: 15px;
  max-width: 560px;
  text-wrap: pretty;
}

.flm-hero__stats {
  display: grid; grid-auto-flow: column; gap: 12px;
}
.flm-stat {
  background: #fff;
  border: 1px solid var(--flm-line);
  border-radius: var(--flm-radius-lg);
  padding: 14px 18px;
  min-width: 120px;
  box-shadow: var(--flm-shadow-sm);
}
.flm-stat__value {
  font-size: 28px; font-weight: 800; letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.flm-stat__label {
  font-size: 11px; color: var(--flm-mute);
  text-transform: uppercase; letter-spacing: 0.08em;
  margin-top: 2px; font-weight: 600;
}
.flm-stat--warn .flm-stat__value    { color: var(--flm-warn); }
.flm-stat--urgent .flm-stat__value  { color: var(--flm-brand); }

/* ============================================================
   NO BIDS BANNER
   ============================================================ */
.flm-nobids-banner {
  background: linear-gradient(90deg, #fff4d6, #ffe7b8);
  border-top: 1px solid var(--flm-warn-strong);
  border-bottom: 1px solid var(--flm-warn-strong);
  position: relative;
}
.flm-nobids-banner::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0; width: 4px;
  background: var(--flm-warn);
  animation: flm-bar-pulse 2s ease-in-out infinite;
}
@keyframes flm-bar-pulse {
  0%,100% { opacity: 1; }
  50%     { opacity: .4; }
}
.flm-nobids-banner__inner {
  max-width: 1440px; margin: 0 auto;
  padding: 14px 28px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 18px;
  align-items: center;
}
.flm-nobids-banner__icon {
  color: var(--flm-warn);
  background: #fff;
  border: 1.5px solid var(--flm-warn-strong);
  width: 48px; height: 48px;
  border-radius: 50%;
  display: grid; place-items: center;
}
.flm-nobids-banner__title {
  font-weight: 700; font-size: 15px; color: #5b3800;
}
.flm-nobids-banner__sub {
  font-size: 13px; color: #7a5000; margin-top: 2px;
}
.flm-nobids-banner__actions { display: flex; gap: 8px; }

/* ============================================================
   TOOLBAR (tabs + view toggle + search)
   ============================================================ */
.flm-toolbar {
  background: var(--flm-bg);
  border-bottom: 1px solid var(--flm-line);
  position: sticky; top: 0; z-index: 30;
  backdrop-filter: saturate(120%) blur(6px);
  background: rgba(245, 243, 238, 0.92);
}
.flm-toolbar__inner {
  max-width: 1440px; margin: 0 auto;
  padding: 10px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.flm-tabs { display: flex; gap: 2px; }
.flm-tab {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--flm-ink-2);
  border-radius: var(--flm-radius);
  position: relative;
}
.flm-tab:hover { background: rgba(0,0,0,.04); }
.flm-tab--active {
  background: var(--flm-ink);
  color: #fff;
  font-weight: 600;
}
.flm-tab__count {
  background: rgba(0,0,0,.08);
  padding: 1px 7px;
  border-radius: 10px;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}
.flm-tab--active .flm-tab__count { background: rgba(255,255,255,.18); }
.flm-tab__count--warn    { background: var(--flm-warn-bg);  color: var(--flm-warn); }
.flm-tab__count--urgent  { background: var(--flm-brand-soft); color: var(--flm-brand); }
.flm-tab__count--mine    { background: rgba(99,179,113,.18); color: #6db87f; }
.flm-tab--active .flm-tab__count--warn   { background: rgba(246,178,74,.3);  color: #000000; }
.flm-tab--active .flm-tab__count--urgent { background: rgba(214,60,30,.3); color: #000000; }
.flm-tab--active .flm-tab__count--mine  { background: rgba(99,179,113,.35); color: #000000; }

.flm-toolbar__right { display: flex; align-items: center; gap: 12px; }

.flm-search {
  display: inline-flex; align-items: center; gap: 8px;
  background: #fff;
  border: 1px solid var(--flm-line);
  border-radius: var(--flm-radius);
  padding: 7px 12px;
  color: var(--flm-mute);
  width: 250px;
  transition: border-color .15s, box-shadow .15s;
}
.flm-search:focus-within {
  border-color: var(--flm-ink);
  box-shadow: 0 0 0 3px rgba(0,0,0,.06);
}
.flm-search input {
  border: 0; outline: 0; background: none;
  font-size: 13px; color: var(--flm-ink); width: 100%;
}

.flm-view-toggle {
  display: inline-flex;
  background: #fff;
  border: 1px solid var(--flm-line);
  border-radius: var(--flm-radius);
  padding: 2px;
}
.flm-view-toggle__btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 10px;
  font-size: 12px;
  color: var(--flm-mute);
  border-radius: 3px;
  font-weight: 500;
}
.flm-view-toggle__btn--active {
  background: var(--flm-ink);
  color: #fff;
}

/* ============================================================
   SECTIONS
   ============================================================ */
.flm-section {
  max-width: 1440px;
  margin: 0 auto;
  padding: 32px 28px 8px;
}
.flm-section--muted {
  background: transparent;
}
.flm-section__header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}
.flm-section__title-group { display: flex; flex-direction: column; gap: 6px; }
.flm-section__badge {
  display: inline-flex; align-items: center; gap: 6px;
  width: fit-content;
  padding: 3px 10px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border-radius: 100px;
}
.flm-section__badge-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: currentColor;
}
.flm-section__badge--warn  { background: var(--flm-warn-bg);    color: var(--flm-warn); }
.flm-section__badge--live  { background: var(--flm-brand-soft); color: var(--flm-brand); }
.flm-section__badge--live .flm-section__badge-dot { animation: flm-pulse-dot 1.4s infinite; }
.flm-section__badge--done  { background: var(--flm-success-bg); color: var(--flm-success); }
@keyframes flm-pulse-dot {
  0%,100% { opacity: 1; }
  50%     { opacity: .3; }
}

.flm-section__title {
  font-size: 22px; font-weight: 800;
  letter-spacing: -0.02em; margin: 0;
}
.flm-section__sub {
  font-size: 13px; color: var(--flm-mute);
}
.flm-section__sub-header {
  font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--flm-mute); padding: 8px 0 10px; margin-top: 4px;
}
.flm-section__sub-header--warn { color: var(--flm-brand); }
.flm-section__link {
  font-size: 13px; font-weight: 600; color: var(--flm-ink);
  padding-bottom: 2px; border-bottom: 1.5px solid var(--flm-ink);
}
.flm-section__link:hover { color: var(--flm-brand); border-bottom-color: var(--flm-brand); }

/* ============================================================
   GRID
   ============================================================ */
.flm-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}
@media (max-width: 1400px) { .flm-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 1060px) { .flm-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 680px)  { .flm-grid { grid-template-columns: 1fr; } }

/* LIST VIEW (toggle) */
.flm-body[data-flm-mode="list"] .flm-grid {
  grid-template-columns: 1fr;
  gap: 8px;
}
.flm-body[data-flm-mode="list"] .flm-card {
  display: grid;
  grid-template-columns: 160px 1fr;
}
.flm-body[data-flm-mode="list"] .flm-card__photo { aspect-ratio: auto; height: 100%; }
.flm-body[data-flm-mode="list"] .flm-card__body { padding: 14px 18px; }
.flm-body[data-flm-mode="list"] .flm-route {
  font-size: 18px;
}
.flm-body[data-flm-mode="list"] .flm-route__city { font-size: 18px; }
.flm-body[data-flm-mode="list"] .flm-card__footer { margin-top: 10px; }
.flm-body[data-flm-mode="list"] .flm-specs { padding: 8px 0; }

/* ============================================================
   CARD
   ============================================================ */
.flm-card {
  background: var(--flm-surface);
  border: 1px solid var(--flm-line);
  border-radius: var(--flm-radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
  position: relative;
}
.flm-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--flm-shadow);
  border-color: #d1cec4;
}

/* Card variants */
.flm-card--nobids {
  border-color: var(--flm-warn-strong);
  box-shadow: 0 0 0 1px var(--flm-warn-strong), var(--flm-shadow-sm);
}
.flm-card--nobids::before {
  content: "";
  position: absolute; inset: 0;
  border-radius: var(--flm-radius-lg);
  box-shadow: 0 0 0 0 rgba(246,178,74,.6);
  pointer-events: none;
  animation: flm-card-pulse 2.2s ease-out infinite;
}
@keyframes flm-card-pulse {
  0%   { box-shadow: 0 0 0 0   rgba(246,178,74,.55); }
  70%  { box-shadow: 0 0 0 10px rgba(246,178,74,0);  }
  100% { box-shadow: 0 0 0 0   rgba(246,178,74,0);   }
}

.flm-card--urgent {
  border-color: var(--flm-brand);
  box-shadow: 0 0 0 1px var(--flm-brand), var(--flm-shadow);
}
.flm-card--mine {
  border-color: var(--flm-success);
  box-shadow: 0 0 0 1px var(--flm-success), var(--flm-shadow-sm);
}
.flm-card--outbid {
  border-color: var(--flm-danger);
  background: linear-gradient(180deg, #fff 0%, #fff 70%, #fff7f6 100%);
}
.flm-card--hot { }

/* Card photo */
.flm-card__photo {
  position: relative;
  aspect-ratio: 16 / 7;
  overflow: hidden;
  background: #1a1a22;
}
.flm-card__photo-img {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(0,0,0,0) 40%, rgba(0,0,0,.55) 100%),
    radial-gradient(120% 80% at 30% 40%, #2c2c38 0%, #12121a 70%);
}
/* Truck illustration as a CSS painting — repeatable across cards */
.flm-card__photo-img::after {
  content: "";
  position: absolute;
  left: 1%; right: 1%; bottom: 1%; top: 1%;
  height: 130%;
  display: block;
  background-image: url("../assets/card-bkg.jpg");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  filter: drop-shadow(0 6px 12px rgba(0,0,0,.35));
  opacity: .92;
}
/* vary truck angles/tints subtly across cards */
.flm-card__photo-img[data-truck="a"] { background: radial-gradient(120% 80% at 30% 40%, #2c2c38 0%, #12121a 70%); }
.flm-card__photo-img[data-truck="b"] { background: radial-gradient(120% 80% at 60% 30%, #2a3340 0%, #10141a 70%); }
.flm-card__photo-img[data-truck="c"] { background: radial-gradient(120% 80% at 40% 50%, #322c28 0%, #18130f 70%); }
.flm-card__photo-img[data-truck="d"] { background: radial-gradient(120% 80% at 70% 40%, #2c3530 0%, #0e1311 70%); }
.flm-card__photo-img[data-truck="e"] { background: radial-gradient(120% 80% at 20% 30%, #3a2020 0%, #170a0a 70%); }
.flm-card__photo-img[data-truck="f"] { background: radial-gradient(120% 80% at 50% 60%, #2a2630 0%, #120f16 70%); }
.flm-card__photo-img[data-truck="g"] { background: radial-gradient(120% 80% at 30% 70%, #22303a 0%, #0b1017 70%); }
.flm-card__photo-img[data-truck="h"] { background: radial-gradient(120% 80% at 60% 50%, #3b2614 0%, #180d06 70%); }
.flm-card__photo-img[data-truck="i"] { background: radial-gradient(120% 80% at 40% 30%, #262c2c 0%, #0d1010 70%); }

.flm-card__badges {
  position: absolute;
  left: 10px; right: 10px;
  display: flex; gap: 6px;
  z-index: 2;
}
.flm-card__badges--top    { top: 10px; }
.flm-card__badges--bottom { bottom: 10px; }

/* Badges */
.flm-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 9px;
  font-size: 11px;
  font-weight: 700;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  line-height: 1;
  backdrop-filter: blur(4px);
}
.flm-badge__dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: currentColor;
}
.flm-badge--warn     { background: var(--flm-warn-bg);    color: var(--flm-warn); }
.flm-badge--urgent   { background: var(--flm-brand);      color: #fff; }
.flm-badge--success  { background: var(--flm-success-bg); color: var(--flm-success); }
.flm-badge--danger   { background: var(--flm-danger);     color: #fff; }
.flm-badge--danger-soft { background: var(--flm-danger-bg); color: var(--flm-danger); }
.flm-badge--info     { background: var(--flm-info-bg);    color: var(--flm-info); }
.flm-badge--hot      { background: var(--flm-hot);        color: #fff; }
.flm-badge--neutral  { background: rgba(255,255,255,.9); color: var(--flm-ink); }
.flm-badge--muted    { background: rgba(255,255,255,.85); color: var(--flm-ink-2); }

.flm-badge--pulse .flm-badge__dot {
  box-shadow: 0 0 0 0 currentColor;
  animation: flm-pulse-badge 1.4s ease-out infinite;
}
@keyframes flm-pulse-badge {
  0%   { box-shadow: 0 0 0 0 rgba(201,122,0,.6); }
  70%  { box-shadow: 0 0 0 8px rgba(201,122,0,0); }
  100% { box-shadow: 0 0 0 0 rgba(201,122,0,0); }
}
.flm-badge--urgent.flm-badge--pulse .flm-badge__dot {
  animation-name: flm-pulse-badge-red;
}
@keyframes flm-pulse-badge-red {
  0%   { box-shadow: 0 0 0 0 rgba(255,255,255,.7); }
  70%  { box-shadow: 0 0 0 8px rgba(255,255,255,0); }
  100% { box-shadow: 0 0 0 0 rgba(255,255,255,0); }
}

/* Card body */
.flm-card__body {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}
.flm-card__meta {
  display: flex; align-items: center; gap: 6px;
  font-size: 11px; color: var(--flm-mute);
  flex-wrap: wrap;
}
.flm-loadid {
  font-family: var(--flm-font-mono);
  font-size: 11px;
  color: var(--flm-ink-2);
  font-weight: 600;
  letter-spacing: 0.02em;
}
.flm-card__dot { color: var(--flm-mute-2); }

.flm-live-activity { display: inline-flex; align-items: center; gap: 5px; }
.flm-live-activity__dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--flm-success);
  animation: flm-pulse-dot 1.4s infinite;
}
.flm-watchers { display: inline-flex; align-items: center; gap: 4px; }

/* Route */
.flm-route {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 14px;
  padding: 4px 0 2px;
}
.flm-route__leg--end { text-align: right; }
.flm-route__city {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--flm-ink);
  line-height: 1.1;
}
.flm-route__country {
  font-size: 11px;
  color: var(--flm-mute);
  margin-top: 2px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.flm-route__arrow { color: var(--flm-mute-2); }

/* Specs row */
.flm-specs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding: 10px 0;
  border-top: 1px dashed var(--flm-line);
  border-bottom: 1px dashed var(--flm-line);
}
.flm-spec__label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--flm-mute);
  font-weight: 600;
}
.flm-spec__value {
  font-size: 13px;
  font-weight: 700;
  color: var(--flm-ink);
  margin-top: 1px;
  font-variant-numeric: tabular-nums;
}

/* Bid row */
.flm-bidrow {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 12px;
  align-items: end;
}
.flm-bidrow__col--right { text-align: right; }
.flm-bidrow__label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--flm-mute);
  font-weight: 600;
}
.flm-bidrow__you {
  color: var(--flm-success);
  font-weight: 700;
}
.flm-bidrow__value {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  margin-top: 3px;
}
.flm-bidrow__value--best  { color: var(--flm-brand); }
.flm-bidrow__value--max   { color: var(--flm-ink-2); font-size: 16px; font-weight: 600; }
.flm-bidrow__value--empty { color: var(--flm-mute-2); }
.flm-bidrow__value--zero  { color: var(--flm-warn); }
.flm-bidrow__value--muted { color: var(--flm-mute); font-size: 16px; font-weight: 600; }

/* Card footer */
.flm-card__footer {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: stretch;
  margin-top: auto;
}

/* Timer */
.flm-timer {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 0 12px;
  height: 38px;
  background: var(--flm-ink);
  color: #fff;
  border-radius: var(--flm-radius);
  font-family: var(--flm-font-mono);
  font-size: 14px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.flm-timer--warn {
  background: var(--flm-warn);
}
.flm-timer--urgent {
  background: var(--flm-brand);
  animation: flm-timer-flash 1s infinite;
  box-shadow: 0 0 0 0 var(--flm-brand);
}
@keyframes flm-timer-flash {
  0%, 100% { box-shadow: 0 0 0 0 rgba(214,60,30,.55); }
  50%      { box-shadow: 0 0 0 6px rgba(214,60,30,0); }
}
.flm-timer__value {}

/* Buttons */
.flm-btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 6px;
  height: 38px;
  padding: 0 14px;
  font-size: 13px;
  font-weight: 700;
  border-radius: var(--flm-radius);
  transition: transform .1s, background .15s, color .15s, border-color .15s;
  white-space: nowrap;
  letter-spacing: 0.01em;
}
.flm-btn:active { transform: translateY(1px); }
.flm-btn--primary {
  background: var(--flm-brand);
  color: #fff;
}
.flm-btn--primary:hover { background: var(--flm-brand-ink); }
.flm-btn--dark {
  background: var(--flm-ink);
  color: #fff;
}
.flm-btn--dark:hover { background: #fab23e; }
.flm-btn--block { width: 100%; }
.flm-btn--lg { height: 46px; font-size: 14px; }
.flm-btn--ghost-on-warn {
  background: transparent; color: #5b3800;
  border: 1px solid rgba(122,80,0,.3);
}
.flm-btn--ghost-on-warn:hover { background: rgba(0,0,0,.05); }
.flm-btn--solid-on-warn {
  background: #5b3800; color: #fff;
}
.flm-btn--solid-on-warn:hover { background: #7a5000; }

/* ============================================================
   FLASH animation on new bid
   ============================================================ */
.flm-flash {
  animation: flm-flash-anim 1.2s ease-out;
}
@keyframes flm-flash-anim {
  0%   { background-color: #fff3d6; box-shadow: 0 0 0 3px var(--flm-warn-strong); }
  100% { background-color: var(--flm-surface); box-shadow: 0 0 0 0 transparent; }
}

/* ============================================================
   AWARDED LIST
   ============================================================ */
.flm-awarded-list {
  background: #fff;
  border: 1px solid var(--flm-line);
  border-radius: var(--flm-radius-lg);
  overflow: hidden;
}
.flm-awarded {
  display: grid;
  grid-template-columns: 140px 2fr 1.2fr 1fr 0.7fr auto;
  gap: 18px;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid var(--flm-line-2);
  font-size: 13px;
}
.flm-awarded:last-child { border-bottom: 0; }
.flm-awarded:hover { background: #fafaf6; }

.flm-awarded__loadid {
  font-family: var(--flm-font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--flm-mute);
}
.flm-awarded__route strong { font-weight: 700; }
.flm-awarded__meta {
  display: block;
  font-size: 11px;
  color: var(--flm-mute);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 2px;
}
.flm-awarded__label {
  display: block;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--flm-mute);
  font-weight: 600;
  margin-bottom: 1px;
}
.flm-awarded__carrier {
  font-weight: 700;
}
.flm-awarded__carrier--you {
  color: var(--flm-success);
}
.flm-awarded__value {
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  font-size: 15px;
}
.flm-awarded__time {
  font-size: 11px;
  color: var(--flm-mute);
  text-align: right;
}

/* ============================================================
   FOOTER
   ============================================================ */
.flm-footer {
  max-width: 1440px;
  margin: 40px auto 0;
  padding: 24px 28px;
  border-top: 1px solid var(--flm-line);
  font-size: 12px;
  color: var(--flm-mute);
}
.flm-footer__inner { display: flex; justify-content: space-between; }
.flm-footer a { color: var(--flm-ink-2); }
.flm-footer a:hover { color: var(--flm-brand); }

/* ============================================================
   MODAL (Auction Room preview)
   ============================================================ */
.flm-modal[hidden] { display: none; }
.flm-modal {
  position: fixed; inset: 0; z-index: 100;
  display: grid;
  place-items: center;
  padding: 28px;
}
.flm-modal__backdrop {
  position: absolute; inset: 0;
  background: rgba(11,11,13,.6);
  backdrop-filter: blur(4px);
  animation: flm-fade 0.18s ease;
}
@keyframes flm-fade { from { opacity: 0; } to { opacity: 1; } }

.flm-modal__panel {
  position: relative;
  width: min(980px, 100%);
  max-height: 90vh;
  overflow: auto;
  background: var(--flm-surface);
  border-radius: var(--flm-radius-xl);
  box-shadow: var(--flm-shadow-lg);
  animation: flm-rise 0.22s ease;
}
@keyframes flm-rise {
  from { opacity: 0; transform: translateY(10px) scale(.98); }
  to   { opacity: 1; transform: none; }
}

.flm-modal__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 26px 16px;
  border-bottom: 1px solid var(--flm-line);
}
.flm-modal__loadid {
  font-family: var(--flm-font-mono);
  font-size: 11px;
  color: var(--flm-mute);
  margin-bottom: 4px;
}
.flm-modal__title {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 4px;
}
.flm-modal__sub {
  font-size: 13px;
  color: var(--flm-mute);
}
.flm-modal__close {
  color: var(--flm-mute);
  padding: 6px;
  border-radius: var(--flm-radius);
}
.flm-modal__close:hover { background: rgba(0,0,0,.05); color: var(--flm-ink); }

.flm-modal__body {
  padding: 20px 26px 26px;
}
.flm-modal__obs {
  border: 1px solid var(--flm-line);
  background: #fffdf3;
  border-radius: var(--flm-radius-lg);
  padding: 12px 14px;
  margin-bottom: 14px;
}
.flm-modal__obs-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--flm-mute);
  font-weight: 700;
  margin-bottom: 6px;
}
.flm-modal__obs-text {
  font-size: 13px;
  color: var(--flm-ink-2);
  white-space: pre-wrap;
}
.flm-modal__stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  background: var(--flm-ink);
  border-radius: var(--flm-radius-lg);
  padding: 18px 20px;
  margin-bottom: 22px;
  color: #fff;
}
.flm-modal__stat + .flm-modal__stat {
  border-left: 1px solid rgba(255,255,255,.1);
  padding-left: 20px;
}
.flm-modal__stat { padding-right: 20px; }
.flm-modal__stat-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: #9a9aa5;
  font-weight: 600;
}
.flm-modal__stat-value {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  margin-top: 4px;
}
.flm-modal__stat-value--timer {
  color: var(--flm-accent);
  font-family: var(--flm-font-mono);
}
.flm-modal__stat-value--price { color: #fff; }
.flm-modal__stat-value--mute  { color: #c8c8d0; font-size: 16px; font-weight: 600; margin-top: 9px; }

.flm-modal__grid {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 20px;
}
@media (max-width: 820px) {
  .flm-modal__grid { grid-template-columns: 1fr; }
  .flm-modal__stats { grid-template-columns: repeat(2,1fr); row-gap: 14px; }
}

/* Leaderboard */
.flm-leaderboard {
  border: 1px solid var(--flm-line);
  border-radius: var(--flm-radius-lg);
  overflow: hidden;
}
.flm-leaderboard__header {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 12px 16px;
  background: var(--flm-bg);
  border-bottom: 1px solid var(--flm-line);
}
.flm-leaderboard__header h4 {
  margin: 0; font-size: 13px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.08em;
}
.flm-leaderboard__hint { font-size: 11px; color: var(--flm-mute); }

.flm-leader {
  display: grid;
  grid-template-columns: 40px 1fr auto auto;
  gap: 14px;
  align-items: center;
  padding: 11px 16px;
  border-bottom: 1px solid var(--flm-line-2);
  font-size: 13px;
}
.flm-leader:last-child { border-bottom: 0; }
.flm-leader__rank {
  font-family: var(--flm-font-mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--flm-mute);
}
.flm-leader__name {
  font-weight: 600;
  color: var(--flm-ink);
}
.flm-leader__youtag {
  display: inline-block;
  background: var(--flm-success);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 3px;
  margin-left: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.flm-leader__price {
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  font-size: 15px;
}
.flm-leader__state {
  font-size: 11px;
  color: var(--flm-mute);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
}
.flm-leader__state--leading { color: var(--flm-success); }
.flm-leader__state--danger  { color: var(--flm-danger); }

.flm-leader--first {
  background: linear-gradient(90deg, #fff8ea, #fff);
}
.flm-leader--first .flm-leader__rank { color: var(--flm-brand); font-size: 15px; }
.flm-leader--first .flm-leader__price { color: var(--flm-brand); }

.flm-leader--you { background: #f1faf4; }
.flm-leader--muted { opacity: .7; }

/* Bid panel */
.flm-bidpanel {
  background: #fafaf6;
  border: 1px solid var(--flm-line);
  border-radius: var(--flm-radius-lg);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.flm-bidpanel__label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--flm-mute);
  font-weight: 600;
}
.flm-bidpanel__beat {
  font-size: 13px;
  color: var(--flm-ink-2);
  margin-top: 2px;
}
.flm-bidpanel__beat strong { color: var(--flm-brand); }

.flm-bidpanel__input {
  position: relative;
}
.flm-bidpanel__input input {
  width: 100%;
  height: 56px;
  background: #fff;
  border: 2px solid var(--flm-ink);
  border-radius: var(--flm-radius);
  font-size: 28px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  padding: 0 48px 0 14px;
  letter-spacing: -0.02em;
}
.flm-bidpanel__input input:focus {
  outline: none;
  border-color: var(--flm-brand);
  box-shadow: 0 0 0 4px rgba(214,60,30,.12);
}
.flm-bidpanel__unit {
  position: absolute;
  right: 14px; top: 50%; transform: translateY(-50%);
  font-size: 20px;
  font-weight: 700;
  color: var(--flm-mute);
}

.flm-bidpanel__quick {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}
.flm-bidpanel__quick button {
  height: 32px;
  background: #fff;
  border: 1px solid var(--flm-line);
  border-radius: var(--flm-radius);
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--flm-ink-2);
}
.flm-bidpanel__quick button:hover { border-color: var(--flm-ink); }

.flm-bidpanel__note {
  font-size: 12px;
  color: var(--flm-mute);
  line-height: 1.5;
}
.flm-bidpanel__note strong { color: var(--flm-brand); }

.flm-bidpanel__activity {
  border-top: 1px solid var(--flm-line);
  padding-top: 12px;
}
.flm-bidpanel__activity-title {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--flm-mute);
  font-weight: 600;
  margin-bottom: 8px;
}
.flm-bidpanel__activity-item {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 8px;
  font-size: 12px;
  padding: 4px 0;
}
.flm-bidpanel__activity-item--muted { opacity: .6; }
.flm-bidpanel__activity-time {
  font-family: var(--flm-font-mono);
  color: var(--flm-mute);
  font-size: 11px;
}

/* ---- Inline bid error ---- */
.flm-bidpanel__error {
  padding: 10px 14px;
  border-radius: var(--flm-radius);
  background: var(--flm-danger-bg);
  border: 1px solid rgba(196,28,28,.25);
  color: var(--flm-danger);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
}

/* ---- Page-level toast ---- */
.flm-toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  background: var(--flm-ink);
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  padding: 12px 20px;
  border-radius: var(--flm-radius-lg);
  box-shadow: var(--flm-shadow-lg);
  max-width: 480px;
  text-align: center;
  pointer-events: none;
  opacity: 1;
  transition: opacity .3s ease;
}
.flm-toast[hidden] { display: none; }
.flm-toast--error { background: var(--flm-danger); }

/* ---- Origin multiselect filter ---- */
.flm-origin-filter {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  font-size: 12px;
  color: var(--flm-mute);
}
.flm-origin-filter__label {
  font-weight: 600;
  white-space: nowrap;
}
.flm-origin-filter__control {
  position: relative;
}
.flm-origin-filter__btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 500;
  color: var(--flm-ink);
  background: #fff;
  border: 1px solid var(--flm-line);
  border-radius: var(--flm-radius);
  box-shadow: var(--flm-shadow-sm);
  cursor: pointer;
  white-space: nowrap;
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.flm-origin-filter__btn span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.flm-origin-filter__dropdown {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  z-index: 200;
  min-width: 220px;
  max-height: 280px;
  overflow-y: auto;
  background: var(--flm-surface);
  border: 1px solid var(--flm-line);
  border-radius: var(--flm-radius);
  padding: 6px 0;
  box-shadow: 0 8px 24px rgba(0,0,0,.35);
}
.flm-origin-filter__item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  font-size: 12px;
  color: var(--flm-ink);
  cursor: pointer;
  user-select: none;
}
.flm-origin-filter__item:hover { background: rgba(255,255,255,.05); }
.flm-origin-filter__item--all {
  font-weight: 600;
  border-bottom: 1px solid var(--flm-line);
  margin-bottom: 4px;
  padding-bottom: 10px;
}
.flm-origin-filter__item input[type="checkbox"] {
  accent-color: var(--flm-accent);
  width: 14px;
  height: 14px;
  cursor: pointer;
  flex-shrink: 0;
}
