/* Pilot Dewei RFQ Lab — approved homepage master visual
   Reference direction: warm wood + forest green + copper, compact B2B dashboard.
   Scoped to body.home-v2 so existing detail/admin pages are untouched. */

.home-v2 {
  --rfq-ink: #141612;
  --rfq-muted: #687067;
  --rfq-line: #e8e2d8;
  --rfq-paper: #fffdf9;
  --rfq-cream: #f7f1e8;
  --rfq-copper: #a9521d;
  --rfq-copper-dark: #7d3511;
  --rfq-green: #174f35;
  --rfq-green-soft: #eaf4ed;
  --rfq-amber: #e56f1f;
  --rfq-blue: #2b73c9;
  --rfq-purple: #7856c6;
  --rfq-shadow: 0 12px 36px rgba(48, 34, 21, .08);
  background: #faf8f4;
  color: var(--rfq-ink);
}

.home-v2 .topbar {
  background: rgba(255, 253, 249, .96);
  border-bottom-color: #eee7dc;
}
.home-v2 .topbar__inner {
  max-width: 1320px;
  padding: 10px 24px;
  min-height: 64px;
}
.home-v2 .brand { font-size: 1.04rem; font-weight: 760; }
.home-v2 .brand__sub { display: none; }
.home-v2 .brand__mark {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, transparent 0 5px, #bd5d24 5px 6.5px, transparent 6.5px 9px, #bd5d24 9px 10.5px, transparent 10.5px 13px, #bd5d24 13px 14.5px, transparent 14.5px 17px, #bd5d24 17px 18.5px, transparent 18.5px),
    #fff8ef;
  border: 1px solid #d89166;
  color: transparent;
  box-shadow: inset 0 0 0 3px #fff8ef;
}
.home-v2 .topnav { gap: 10px; }
.home-v2 .topnav a {
  color: #30352f;
  border-radius: 0;
  padding: 10px 6px;
  font-size: .86rem;
  border-bottom: 2px solid transparent;
}
.home-v2 .topnav a:hover,
.home-v2 .topnav a[aria-current="page"] {
  background: transparent;
  color: var(--rfq-copper-dark);
  border-bottom-color: var(--rfq-copper);
}
.home-v2 .badge-preview {
  background: #f7efe4;
  border-color: #ead5c0;
  color: #8d4a22;
}

.home-shell { max-width: 1320px; margin: 0 auto; padding: 0 24px; }

/* Hero */
.rfq-hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(115deg, #fffaf3 0%, #f7eee1 49%, #eee2d3 100%);
  border-bottom: 1px solid var(--rfq-line);
}
.rfq-hero__grid {
  min-height: 400px;
  display: grid;
  grid-template-columns: 1.08fr .92fr;
  align-items: stretch;
}
.rfq-hero__copy {
  padding: 54px 38px 36px 0;
  position: relative;
  z-index: 2;
}
.rfq-hero__kicker {
  margin-bottom: 12px;
  font-size: .7rem;
  font-weight: 780;
  letter-spacing: .2em;
  color: #7e776f;
  text-transform: uppercase;
}
.rfq-hero h1 {
  max-width: 720px;
  margin: 0 0 14px;
  font-size: clamp(2.6rem, 5vw, 5.35rem);
  line-height: .98;
  letter-spacing: -.055em;
  font-weight: 780;
}
.rfq-hero h1 em {
  color: var(--rfq-green);
  font-style: normal;
  display: block;
}
.rfq-hero__lede {
  max-width: 640px;
  color: #555b55;
  font-size: 1.03rem;
  line-height: 1.55;
}
.rfq-hero__actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }
.home-v2 .rfq-primary {
  background: linear-gradient(135deg, #b55e24, #85390f);
  color: #fff;
  border: 0;
  box-shadow: 0 10px 24px rgba(133, 57, 15, .18);
}
.home-v2 .rfq-primary:hover { background: #7b330d; color: #fff; }
.home-v2 .rfq-secondary { background: rgba(255,255,255,.68); border-color: #ccb79f; color: #3b2d24; }
.rfq-trust {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 24px;
  color: #5a615a;
  font-size: .76rem;
  font-weight: 650;
}
.rfq-trust span::before { content: "✓"; color: var(--rfq-copper); margin-right: 6px; font-weight: 900; }
.rfq-hero__media { position: relative; min-height: 400px; overflow: hidden; }
.rfq-hero__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, #f8efe3 0%, rgba(248,239,227,.22) 22%, transparent 50%);
  pointer-events: none;
}
.rfq-hero__media img { width: 100%; height: 100%; object-fit: cover; object-position: center 45%; }
.rfq-hero__note {
  position: absolute;
  z-index: 2;
  left: 36px;
  bottom: 30px;
  max-width: 220px;
  padding: 13px 16px;
  border-radius: 14px;
  background: rgba(255,253,248,.9);
  border: 1px solid rgba(255,255,255,.75);
  box-shadow: var(--rfq-shadow);
  font-size: .78rem;
  color: #5c5146;
}
.rfq-hero__note strong { display: block; color: #2e2a25; margin-bottom: 2px; }

/* Compact dashboard stack */
.rfq-dashboard { padding: 16px 0 42px; }
.rfq-panel {
  background: rgba(255,255,255,.94);
  border: 1px solid var(--rfq-line);
  border-radius: 18px;
  box-shadow: 0 4px 18px rgba(42,31,22,.035);
}

/* Journey */
.rfq-journey {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 185px 1fr;
  min-height: 150px;
}
.rfq-journey__title {
  background: linear-gradient(145deg, #153d2c, #1f5d40);
  color: #fff;
  padding: 26px 22px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.rfq-journey__title h2 { color: #fff; font-size: 1.35rem; margin: 0 0 4px; }
.rfq-journey__title p { margin: 0; color: rgba(255,255,255,.72); font-size: .8rem; }
.rfq-journey__steps {
  padding: 24px 20px 18px;
  display: grid;
  grid-template-columns: repeat(7, minmax(95px, 1fr));
  gap: 0;
  align-items: start;
  overflow-x: auto;
}
.rfq-step { text-align: center; position: relative; min-width: 105px; }
.rfq-step::before {
  content: "";
  position: absolute;
  top: 18px;
  left: -50%;
  width: 100%;
  height: 2px;
  background: #d7dad6;
}
.rfq-step:first-child::before { display: none; }
.rfq-step--done::before { background: var(--rfq-green); }
.rfq-step--active::before { background: linear-gradient(90deg, var(--rfq-green), var(--rfq-amber)); }
.rfq-step__dot {
  position: relative;
  z-index: 2;
  margin: 0 auto 9px;
  width: 37px;
  height: 37px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #fff;
  border: 2px solid #cfd4d0;
  color: #7b817c;
  font-size: .78rem;
  font-weight: 800;
}
.rfq-step--done .rfq-step__dot { background: var(--rfq-green); border-color: var(--rfq-green); color: #fff; }
.rfq-step--active .rfq-step__dot {
  background: var(--rfq-amber);
  border-color: #fff;
  color: #fff;
  box-shadow: 0 0 0 4px rgba(229,111,31,.18);
}
.rfq-step__name { font-size: .72rem; line-height: 1.25; font-weight: 760; color: #30352f; min-height: 36px; }
.rfq-step--active .rfq-step__name { color: #a94d16; }
.rfq-step__date { margin-top: 5px; font-size: .66rem; color: #8a908b; }

/* KPI */
.rfq-kpis { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin: 12px 0; }
.rfq-kpi {
  border-radius: 15px;
  padding: 16px 17px;
  display: grid;
  grid-template-columns: 42px 1fr;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(0,0,0,.045);
}
.rfq-kpi:nth-child(1) { background: #ecf6ee; }
.rfq-kpi:nth-child(2) { background: #fbf0e5; }
.rfq-kpi:nth-child(3) { background: #edf5fd; }
.rfq-kpi:nth-child(4) { background: #f1edfb; }
.rfq-kpi:nth-child(5) { background: #edf7ef; }
.rfq-kpi__icon {
  width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(255,255,255,.72); font-size: 1.15rem; font-weight: 850;
}
.rfq-kpi:nth-child(1) .rfq-kpi__icon, .rfq-kpi:nth-child(5) .rfq-kpi__icon { color: var(--rfq-green); }
.rfq-kpi:nth-child(2) .rfq-kpi__icon { color: var(--rfq-copper); }
.rfq-kpi:nth-child(3) .rfq-kpi__icon { color: var(--rfq-blue); }
.rfq-kpi:nth-child(4) .rfq-kpi__icon { color: var(--rfq-purple); }
.rfq-kpi__value { font-size: 1.5rem; line-height: 1; font-weight: 820; color: #1d211d; }
.rfq-kpi__label { font-size: .72rem; color: #485049; font-weight: 720; margin-top: 4px; }
.rfq-kpi__note { font-size: .62rem; color: #758078; margin-top: 2px; }

/* Latest updates */
.rfq-updates {
  display: grid;
  grid-template-columns: 155px repeat(3, 1fr) 130px;
  align-items: stretch;
  margin-bottom: 12px;
  overflow: hidden;
}
.rfq-updates__label {
  background: linear-gradient(110deg, #fbecd9, #fff8ef);
  padding: 17px 18px;
  display: flex; align-items: center; gap: 8px; font-weight: 780; color: #74401f;
}
.rfq-update { padding: 13px 16px; border-left: 1px solid var(--rfq-line); }
.rfq-update strong { display: block; font-size: .72rem; line-height: 1.3; color: #343934; margin-bottom: 3px; }
.rfq-update span { font-size: .64rem; color: #858a86; }
.rfq-updates__link { border-left: 1px solid var(--rfq-line); display: grid; place-items: center; padding: 12px; font-size: .7rem; font-weight: 740; color: var(--rfq-copper); }

/* Search and filters */
.rfq-controls { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin: 12px 0; }
.rfq-search { flex: 1 1 360px; position: relative; }
.rfq-search::before { content: "⌕"; position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: #737a74; }
.rfq-search input { width: 100%; height: 42px; border: 1px solid var(--rfq-line); border-radius: 12px; background: #fff; padding: 0 14px 0 38px; font: inherit; font-size: .8rem; }
.rfq-filterbar { display: flex; gap: 7px; flex-wrap: wrap; }
.rfq-filter {
  height: 36px; padding: 0 13px; border-radius: 999px; border: 1px solid var(--rfq-line); background: #fff; color: #505851; font-size: .68rem; font-weight: 720; cursor: pointer;
}
.rfq-filter[aria-pressed="true"] { background: #8e4319; border-color: #8e4319; color: #fff; }
.rfq-filter .dot { width: 6px; height: 6px; display: inline-block; border-radius: 50%; background: currentColor; margin-right: 6px; }

/* RFQ grid */
.rfq-projects { padding: 16px; }
.rfq-projects__head { display: flex; align-items: end; justify-content: space-between; gap: 16px; padding: 2px 2px 13px; }
.rfq-projects__head h2 { margin: 0; font-size: 1.18rem; }
.rfq-projects__meta { font-size: .7rem; color: #7a817b; }
.rfq-project-grid { display: grid; grid-template-columns: 1.35fr repeat(3, 1fr); gap: 12px; align-items: stretch; }
.rfq-featured {
  border: 1px solid #e6c29f;
  background: linear-gradient(180deg, #fff 0%, #fff9f1 100%);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 12px 28px rgba(126,62,19,.08);
  grid-row: span 2;
}
.rfq-featured__media { position: relative; height: 215px; overflow: hidden; }
.rfq-featured__media img { width: 100%; height: 100%; object-fit: cover; }
.rfq-featured__badge { position: absolute; left: 10px; top: 10px; background: #9d4818; color: #fff; font-size: .64rem; font-weight: 800; padding: 6px 9px; border-radius: 7px; }
.rfq-featured__body { padding: 16px; }
.rfq-featured__topline { display: flex; justify-content: space-between; gap: 10px; align-items: center; color: #6d746e; font-size: .67rem; }
.rfq-status { padding: 4px 8px; border-radius: 999px; background: var(--rfq-green-soft); color: var(--rfq-green); font-weight: 800; }
.rfq-featured h3 { margin: 10px 0 7px; font-size: 1.18rem; line-height: 1.14; }
.rfq-featured__summary { color: #69706a; font-size: .73rem; line-height: 1.48; }
.rfq-progress-mini { display: flex; align-items: center; gap: 4px; margin: 13px 0 6px; }
.rfq-progress-mini span { height: 4px; flex: 1; background: #e4e3df; border-radius: 999px; }
.rfq-progress-mini .done { background: var(--rfq-green); }
.rfq-progress-mini .active { background: var(--rfq-amber); }
.rfq-progress-label { display: flex; justify-content: space-between; color: #a74a16; font-size: .66rem; font-weight: 760; }
.rfq-specs { margin: 14px 0 2px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; }
.rfq-spec { padding-top: 7px; border-top: 1px solid #eee6dc; }
.rfq-spec b { display: block; font-size: .62rem; color: #8a8178; text-transform: uppercase; letter-spacing: .06em; }
.rfq-spec span { display: block; font-size: .72rem; color: #363a36; margin-top: 2px; }
.rfq-view { display: inline-flex; margin-top: 13px; font-size: .72rem; font-weight: 800; color: var(--rfq-copper); }

.rfq-slot {
  min-height: 208px;
  border: 1px dashed #d8d6d0;
  border-radius: 15px;
  background: linear-gradient(145deg, #fbfbf8, #f6f4ef);
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.rfq-slot__tag { font-size: .62rem; color: #7d847e; font-weight: 760; text-transform: uppercase; letter-spacing: .09em; }
.rfq-slot h3 { font-size: .91rem; margin: 8px 0 5px; color: #4f5750; }
.rfq-slot p { font-size: .7rem; color: #858b86; line-height: 1.45; }
.rfq-slot__line { display: flex; gap: 4px; }
.rfq-slot__line span { height: 4px; flex: 1; border-radius: 999px; background: #e2e1dd; }
.rfq-empty-search { display: none; padding: 28px; text-align: center; color: #7a817b; font-size: .8rem; }

.home-v2 .footer { margin-top: 0; background: #fffdf9; border-top: 1px solid var(--rfq-line); }
.home-v2 .footer__inner { max-width: 1320px; padding: 24px; }

@media (max-width: 1080px) {
  .rfq-hero__grid { grid-template-columns: 1fr 1fr; }
  .rfq-hero h1 { font-size: clamp(2.45rem, 5vw, 4rem); }
  .rfq-kpis { grid-template-columns: repeat(3, 1fr); }
  .rfq-project-grid { grid-template-columns: 1.25fr repeat(2, 1fr); }
  .rfq-updates { grid-template-columns: 140px repeat(2, 1fr); }
  .rfq-updates .rfq-update:nth-of-type(4), .rfq-updates__link { display: none; }
}

@media (max-width: 820px) {
  .home-v2 .topbar__inner { min-height: 58px; }
  .rfq-hero__grid { grid-template-columns: 1fr; }
  .rfq-hero__copy { padding: 38px 0 26px; }
  .rfq-hero__media { min-height: 260px; border-radius: 16px; margin-bottom: 18px; }
  .rfq-journey { grid-template-columns: 1fr; }
  .rfq-journey__title { padding: 16px 18px; }
  .rfq-journey__steps { padding: 20px 12px; }
  .rfq-kpis { grid-template-columns: repeat(2, 1fr); }
  .rfq-updates { grid-template-columns: 1fr; }
  .rfq-updates__label, .rfq-update { border-left: 0; border-bottom: 1px solid var(--rfq-line); }
  .rfq-updates__link { display: grid; }
  .rfq-project-grid { grid-template-columns: 1fr 1fr; }
  .rfq-featured { grid-row: auto; grid-column: 1 / -1; }
}

@media (max-width: 560px) {
  .home-shell { padding: 0 14px; }
  .rfq-hero__copy { padding-top: 30px; }
  .rfq-hero h1 { font-size: 2.55rem; }
  .rfq-trust { gap: 10px 15px; }
  .rfq-dashboard { padding-top: 12px; }
  .rfq-kpis { grid-template-columns: 1fr; gap: 8px; }
  .rfq-kpi { padding: 13px 14px; }
  .rfq-projects { padding: 12px; }
  .rfq-project-grid { grid-template-columns: 1fr; }
  .rfq-featured { grid-column: auto; }
  .rfq-slot { min-height: 150px; }
  .rfq-controls { align-items: stretch; }
  .rfq-filterbar { width: 100%; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 4px; }
  .rfq-filter { flex: none; }
}
