/* Shared inventory only: company inventory controls and financial cards stay intact. */
html body .page[data-panel="inventory"]:has([data-inventory-list].is-shared-vehicle-list) > [data-inventory-overview],
html body .page[data-panel="inventory"]:has([data-inventory-list].is-shared-vehicle-list) > .filter-card[hidden],
html body .page[data-panel="inventory"]:has([data-inventory-list].is-shared-vehicle-list) > .inventory-mobile-search-card {
  display: none !important;
}

/* A native button spans the photo and information, without nesting the certificate button. */
html body .page[data-panel="inventory"] .vehicle-list[data-view="card"] .shared-source-row > .shared-source-open-area {
  position: relative !important; z-index: 1;
  grid-column: 1 / 3 !important; grid-row: 1 !important;
  align-self: stretch !important; justify-self: stretch !important;
  display: block !important; width: auto !important; height: auto !important;
  min-width: 0 !important; min-height: 0 !important;
  margin: 0 !important; padding: 0 !important;
  border: 0 !important; border-radius: 9px !important;
  background: transparent !important; box-shadow: none !important; cursor: pointer;
}
html body .page[data-panel="inventory"] .shared-source-row > .shared-source-open-area:focus-visible {
  outline: 2px solid #ba842b !important; outline-offset: -2px;
}
html body .page[data-panel="inventory"] .shared-source-row > .shared-source-photo { grid-column: 1 !important; grid-row: 1 !important; }
html body .page[data-panel="inventory"] .shared-source-row > .shared-source-content { grid-column: 2 !important; grid-row: 1 !important; }
html body .page[data-panel="inventory"] .shared-source-row .shared-source-certification { position: relative; z-index: 2; }
html body .page[data-panel="inventory"] .shared-source-row .shared-source-info h2,
html body .page[data-panel="inventory"] .shared-source-row .shared-source-info h2 span {
  white-space: normal; overflow: visible; overflow-wrap: anywhere; line-height: 1.3;
}
html body .page[data-panel="inventory"] .shared-source-row .shared-source-tags { flex-wrap: wrap; max-height: none; overflow: visible; }
html body .page[data-panel="inventory"] .shared-source-row .shared-source-prices strong { white-space: normal; overflow: visible; text-overflow: clip; line-height: 1.3; }
@media (max-width: 900px) {
  html body:not(.desktop-page) .page[data-panel="inventory"] .vehicle-card.shared-vehicle-card.shared-source-row {
    grid-template-columns: clamp(92px,30vw,118px) minmax(0,1fr) !important;
    min-height: 136px !important;
  }
  html body:not(.desktop-page) .page[data-panel="inventory"] .vehicle-card.shared-vehicle-card.shared-source-row > .shared-source-actions { display: none !important; }
  html body:not(.desktop-page) .page[data-panel="inventory"] .shared-source-row .shared-source-info h2,
  html body:not(.desktop-page) .page[data-panel="inventory"] .shared-source-row .shared-source-info h2 b { font-size: 15px; }
  html body:not(.desktop-page) .page[data-panel="inventory"] .shared-source-row .shared-source-info p { font-size: 11px; white-space: normal; }
  html body:not(.desktop-page) .page[data-panel="inventory"] .shared-source-row .shared-source-info em { font-size: 12px; line-height: 1.3; }
  html body:not(.desktop-page) .page[data-panel="inventory"] .shared-source-row .shared-source-tags > span,
  html body:not(.desktop-page) .page[data-panel="inventory"] .shared-source-row .shared-source-tags > button { font-size: 10px; min-height: 22px; line-height: 1.2; }
  html body:not(.desktop-page) .page[data-panel="inventory"] .shared-source-row .shared-source-prices span { font-size: 11px; }
  html body:not(.desktop-page) .page[data-panel="inventory"] .shared-source-row .shared-source-prices strong { font-size: 13px; }
}
@media (min-width: 901px) {
  html body.desktop-page .desktop-app .page[data-panel="inventory"] .vehicle-list[data-view="card"] .vehicle-card.shared-source-row { height: auto; min-height: 148px !important; max-height: none; }
  html body.desktop-page .desktop-app .page[data-panel="inventory"] .vehicle-list[data-view="card"] .vehicle-card.shared-source-row > .shared-source-actions { grid-column: 3 !important; grid-row: 1 !important; }
  html body .shared-source-row .shared-source-photo,
  html body .shared-source-row .shared-source-photo img,
  html body .shared-source-row .shared-source-photo > span { height: 100%; min-height: 132px; }
  html body .shared-source-row .shared-source-content { height: auto; grid-template-columns: minmax(0,1fr) minmax(170px,.8fr); gap: 10px; overflow: visible; }
  html body .shared-source-row .shared-source-info { grid-column: 1; grid-row: 1; }
  html body .shared-source-row .shared-source-tags { grid-column: 1; grid-row: 2; }
  html body .shared-source-row .shared-source-prices { grid-column: 2; grid-row: 1 / 3; gap: 10px; }
  html body .shared-source-row .shared-source-info h2 { font-size: 20px; }
  html body .shared-source-row .shared-source-info h2 b { font-size: 19px; }
  html body .shared-source-row .shared-source-info p { font-size: 15px; }
  html body .shared-source-row .shared-source-info em { font-size: 16px; }
  html body .shared-source-row .shared-source-tags > span,
  html body .shared-source-row .shared-source-tags > button { font-size: 13px; }
  html body .shared-source-row .shared-source-prices span { font-size: 14px; }
  html body .shared-source-row .shared-source-prices strong { font-size: 20px; }
}
@media (min-width: 1400px) {
  html body .shared-source-row .shared-source-content { grid-template-columns: minmax(0,1fr) minmax(0,1fr) minmax(240px,1fr); }
  html body .shared-source-row .shared-source-tags { grid-column: 2; grid-row: 1; }
  html body .shared-source-row .shared-source-prices { grid-column: 3; grid-row: 1; }
}
html body .shared-return-banner { display: none; }
/* Inspection belongs to company inventory, including entry points injected after rendering. */
html body .page[data-panel="inventory"]:has([data-inventory-list].is-shared-vehicle-list) [data-inspection-alert-open],
html body .page[data-panel="inventory"]:has([data-inventory-list].is-shared-vehicle-list) > .inventory-mobile-primary-actions {
  display: none !important;
}

html body .shared-network-summary { grid-column: 1 / -1; min-width: 0; margin: 0 0 16px; }
html body .shared-network-overview {
  --stat-icon: 48px;
  --stat-label: 26px;
  --stat-number: 56px;
  --stat-unit: 28px;
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: repeat(4,minmax(0,1fr));
  gap: 0;
  grid-column: 1 / -1;
  margin: 0;
  padding: 26px 12px;
  border: 1px solid #424951;
  border-radius: 32px;
  background: linear-gradient(120deg,#0a151e 0%,#101b25 48%,#263039 100%);
  box-shadow: inset 0 1px 0 #ffffff15,0 5px 14px #1724321c;
  overflow: hidden;
}
html body .shared-network-overview::before { content: ""; position: absolute; z-index: -1; inset: 0; background: linear-gradient(150deg,#ffffff04,transparent 70%); clip-path: polygon(20% 0,100% 0,100% 100%,48% 42%); pointer-events: none; }
html body .shared-network-overview > button {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  width: 100%; min-width: 0; min-height: 0;
  margin: 0; padding: 0 8px;
  border: 0; border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: #f3f4f1;
  font: inherit;
  cursor: pointer;
}
html body .shared-network-overview > button:not(:last-child)::after { content: ""; position: absolute; top: 8px; bottom: 5px; right: 0; width: 1px; background: #ffffff24; pointer-events: none; }
html body .shared-network-overview > button:disabled { opacity: 1; cursor: default; }
html body .shared-network-overview > button:focus-visible { outline: 2px solid #eed49c; outline-offset: -3px; border-radius: 8px; }
html body .shared-network-overview > button[aria-pressed="true"]:not([data-shared-overview-filter="all"]) { box-shadow: inset 0 -2px #ead79e; }
html body .shared-network-overview svg { flex: 0 0 var(--stat-icon); width: var(--stat-icon); height: var(--stat-icon); fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
html body .shared-network-overview button > span { color: #f3f4f1; font-size: var(--stat-label); font-weight: 650; line-height: 1.25; text-align: center; white-space: nowrap; letter-spacing: .02em; }
html body .shared-network-overview strong { display: flex; align-items: baseline; justify-content: center; gap: 8px; margin: 0; color: #f5e8bb; font-family: Arial,"Noto Sans TC","Microsoft JhengHei",sans-serif; font-size: var(--stat-number); font-weight: 700; line-height: 1.05; font-variant-numeric: tabular-nums; letter-spacing: 0; white-space: nowrap; }
html body .shared-network-overview em { color: inherit; font-family: "Noto Sans TC","Microsoft JhengHei",sans-serif; font-size: var(--stat-unit); font-style: normal; font-weight: 500; }

/* Match the public source sheet: search above six centered, icon-free pills. */
html body .page[data-panel="inventory"] .shared-source-toolbar {
  display: flex; flex-direction: column; align-items: stretch; gap: 12px;
}
html body .page[data-panel="inventory"] .shared-source-quick-filters {
  display: grid; grid-template-columns: repeat(3,minmax(0,1fr)) minmax(0,1.5fr) repeat(2,minmax(0,1fr));
  width: 100%; min-width: 0; gap: 6px;
}
/* One field, one border: the label itself is not a second card. */
html body .page[data-panel="inventory"] .shared-source-select {
  height: 38px; margin: 0; padding: 0 !important;
  border: 0 !important; border-radius: 0 !important;
  background: transparent !important; box-shadow: none !important;
}
html body .page[data-panel="inventory"] .shared-source-select > select {
  box-sizing: border-box !important;
  display: block !important;
  width: 100% !important; min-width: 0 !important; max-width: none !important;
  height: 38px !important; min-height: 0 !important; margin: 0 !important;
  padding: 0 16px 0 5px !important;
  border: 1.5px solid #c9d3e1 !important; border-radius: 19px !important;
  appearance: none !important; background: #fff !important;
  box-shadow: 0 3px 8px rgba(23,41,70,.08) !important;
  color: transparent !important; -webkit-text-fill-color: transparent !important; line-height: normal !important;
  font-size: 16px !important; font-weight: 700;
  text-align: center; text-align-last: center; text-overflow: ellipsis;
}
/* Keep the native picker at 16px to avoid iOS zoom. Its visual label is smaller
   and does not intercept taps, so all six labels can fit on narrow screens. */
html body .page[data-panel="inventory"] .shared-source-select > .shared-source-select-value {
  position: absolute; left: 5px; right: 16px; top: 0;
  display: block; height: 38px; padding: 0; margin: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: #15233b; font-size: 13px; font-weight: 700; line-height: 38px; text-align: center;
  pointer-events: none;
}
html body .page[data-panel="inventory"] .shared-source-select > select option {
  color: #15233b !important; -webkit-text-fill-color: #15233b !important;
}
html body .page[data-panel="inventory"] .shared-source-select > i {
  position: absolute; top: 50%; right: 7px; width: 6px; height: 6px;
  border-right: 1.5px solid #15233b; border-bottom: 1.5px solid #15233b;
  transform: translateY(-65%) rotate(45deg); pointer-events: none;
}
html body .page[data-panel="inventory"] .shared-source-select.has-selection > select { border-color: #bd8b32 !important; background: #fff0cf !important; }
html body .page[data-panel="inventory"] .shared-source-select.has-selection > .shared-source-select-value { color: #86580e; }
html body .page[data-panel="inventory"] .shared-source-select:focus-within { outline: none; }
html body .page[data-panel="inventory"] .shared-source-select > select:focus-visible { outline: 2px solid #c99132 !important; outline-offset: 2px; }
html body .page[data-panel="inventory"] .shared-source-search > label { border: 0 !important; background: transparent !important; box-shadow: none !important; }
html body .page[data-panel="inventory"] .shared-source-search input {
  width: 100% !important; min-width: 0 !important; margin: 0 !important; padding: 0 !important;
  border: 0 !important; border-radius: 0 !important; background: transparent !important; box-shadow: none !important;
}

@media (max-width:899px) {
  html body .page[data-panel="inventory"] .shared-source-quick-filters { gap: 4px; }
  html body #hongyi-mobile-shell .page[data-panel="inventory"] .shared-source-select > select { height: 38px !important; min-height: 38px !important; padding: 0 12px 0 3px !important; }
  html body .page[data-panel="inventory"] .shared-source-select > .shared-source-select-value { left: 3px; right: 12px; font-size: 12px; }
  html body .page[data-panel="inventory"] .shared-source-select > i { right: 6px; width: 5px; height: 5px; }
  html body:not(.desktop-page) .page[data-panel="inventory"]:has([data-inventory-list].is-shared-vehicle-list) > .inventory-title-strip {
    display: none !important;
  }
  html body:not(.desktop-page) .page[data-panel="inventory"]:has([data-inventory-list].is-shared-vehicle-list) > .inventory-title-strip::after {
    content: none !important;
  }
  html body:not(.desktop-page) .page[data-panel="inventory"] .shared-return-banner {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%; min-width: 0; min-height: 0;
    margin: 2px 0 16px; padding: 10px 14px;
    border: 2px solid #101b25;
    border-radius: 26px;
    background: linear-gradient(150deg,#fff 10%,#fcfaf4 50%,#e3d9c7);
    box-shadow: inset 0 2px 0 #fff,0 3px 9px #22314010;
    color: #0c1721; text-align: left; cursor: pointer;
    overflow: hidden;
  }
  html body .shared-return-icon {
    position: relative; z-index: 1;
    display: grid; place-items: center; flex: 0 0 52px;
    width: 52px; height: 52px; border: 1px solid #dec48c; border-radius: 50%;
    background: linear-gradient(#fff,#f4edda); box-shadow: 0 1px 8px #c6a46060;
  }
  html body .shared-return-icon svg { width: 35px; height: 35px; fill: none; stroke: #0c1721; stroke-width: 2.8; stroke-linecap: round; stroke-linejoin: round; }
  html body .shared-return-copy { position: relative; z-index: 1; display: flex; flex: 1 1 auto; min-width: 0; flex-direction: column; gap: 5px; }
  html body .shared-return-copy strong { color: #0c1721; font-size: clamp(18px,5.5vw,28px); font-weight: 900; letter-spacing: .1em; line-height: 1.1; white-space: nowrap; }
  html body .shared-return-copy small { color: #73716b; font-size: clamp(6px,1.7vw,10px); letter-spacing: .13em; line-height: 1.2; white-space: nowrap; }
  html body .shared-return-arrow { position: relative; z-index: 1; display: grid; place-items: center; flex: 0 0 32px; width: 32px; height: 32px; border-radius: 50%; background: #fffdf8; color: #0c1721; line-height: 0; box-shadow: 0 2px 6px #3c42391c; }
  html body .shared-return-arrow > svg { display: block; width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
  html body .shared-return-car { position: absolute; right: 15px; top: 3px; width: 55%; height: 100%; opacity: .28; fill: none; stroke: #b7a990; stroke-width: 5; pointer-events: none; }
  html body .shared-return-banner:focus-visible { outline: 3px solid #c99132; outline-offset: 2px; }
  html body .shared-network-overview {
    --stat-icon: clamp(20px,5.7vw,30px);
    --stat-label: clamp(10.5px,2.9vw,18px);
    --stat-number: clamp(23px,6.2vw,36px);
    --stat-unit: clamp(11px,3vw,18px);
    padding: 8px 3px; border-radius: 18px;
  }
  html body .shared-network-overview > button { gap: 4px; padding: 0 3px; }
  html body .shared-network-overview strong { gap: 4px; }
}
@media (max-width:360px) {
  html body .page[data-panel="inventory"] .shared-source-select > .shared-source-select-value { font-size: 11px; }
  html body:not(.desktop-page) .page[data-panel="inventory"] .shared-return-banner { gap: 8px; padding: 9px 10px; border-radius: 22px; }
  html body .shared-return-icon { flex-basis: 43px; width: 43px; height: 43px; }
  html body .shared-return-icon svg { width: 29px; height: 29px; }
  html body .shared-return-copy strong { font-size: 18px; }
  html body .shared-return-copy small { font-size: 6px; letter-spacing: .08em; }
}
