@media (min-width: 761px) {
  .campaign-control,
  .ws-control { min-height: 720px; }
}

.ws-top-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1.8fr) minmax(300px, .82fr);
  margin-bottom: 24px;
}
.ws-panel { background: white; border: 1px solid #e5dde7; min-width: 0; }
.ws-panel-head {
  align-items: center;
  border-bottom: 1px solid #e8e1e9;
  display: flex;
  gap: 14px;
  justify-content: space-between;
  min-height: 49px;
  padding: 11px 14px;
}
.ws-panel-head strong { display: block; font-size: 13px; font-weight: 800; }
.ws-panel-head span { color: #665d68; display: block; font-size: 11px; font-weight: 550; margin-top: 3px; }
.ws-chip { background: #f1ebf3; color: var(--purple); font-size: 9px; font-weight: 800; padding: 7px 8px; white-space: nowrap; }
.ws-quote-summary { display: grid; grid-template-columns: repeat(3, 1fr); }
.ws-quote-summary .campaign-metric { border-bottom: 1px solid #e8e1e9; border-left-width: 3px; padding: 11px 13px; }
.ws-quote-summary .campaign-metric strong { display: inline-block; font-size: 21px; margin-right: 4px; }
.ws-quote-summary .campaign-metric span { font-size: 10px; }
.ws-quote-table { overflow: hidden; }
.ws-quote-row {
  align-items: center;
  border-bottom: 1px solid #eee8ef;
  display: grid;
  gap: 10px;
  grid-template-columns: 1.35fr .85fr .72fr .72fr 1.08fr;
  min-height: 47px;
  padding: 0 14px;
}
.ws-quote-row:last-child { border-bottom: 0; }
.ws-quote-row.labels { background: #faf8fa; color: #867d89; font-size: 9px; font-weight: 800; letter-spacing: .05em; min-height: 29px; text-transform: uppercase; }
.ws-product strong { display: block; font-size: 12px; font-weight: 800; }
.ws-product span { color: #6f6671; display: block; font-size: 10px; font-weight: 550; margin-top: 3px; }
.ws-money { font-size: 12px; font-weight: 800; white-space: nowrap; }
.ws-current { color: var(--green); font-size: 17px; font-weight: 850; }
.ws-current.low { color: #b84255; }
.ws-variance { background: #e8f7f1; color: #178864; font-size: 10px; font-weight: 800; padding: 7px 5px; text-align: center; }
.ws-variance.low { background: #fdecef; color: #b84255; }
.ws-trend { color: #6f6671; font-size: 10px; font-weight: 700; }
.ws-trend::before { color: var(--green); content: "↗ "; font-weight: 900; }
.ws-trend.stable::before { color: #b16b10; content: "→ "; }

.ws-ai { background: linear-gradient(155deg, #25102e, #351540 65%, #18243a); border-color: #402a48; color: white; }
.ws-ai .ws-panel-head { border-color: rgba(255,255,255,.1); }
.ws-ai-head { align-items: center; display: flex; gap: 9px; }
.ws-ai-orb { background: radial-gradient(circle at 32% 30%, #f4aaf0, #ad4bbd 47%, #5a2a81 72%); border: 2px solid rgba(255,255,255,.13); border-radius: 50%; box-shadow: 0 0 17px rgba(220,105,223,.35); height: 29px; width: 29px; }
.ws-ai .ws-panel-head span { color: #aa9bae; }
.ws-ai-body { padding: 12px; }
.ws-ai-rating { background: rgba(255,255,255,.065); border: 1px solid rgba(255,255,255,.1); padding: 11px; }
.ws-ai-rating small { color: #b8a9bc; display: block; font-size: 9px; font-weight: 800; letter-spacing: .08em; }
.ws-ai-rating strong { color: #ffd69a; display: block; font-size: 19px; margin: 6px 0 8px; }
.ws-ai-rating p { color: #d7ced9; font-size: 10px; line-height: 1.5; margin: 0; }
.ws-signals { display: grid; gap: 5px; margin-top: 8px; }
.ws-signal { align-items: center; background: rgba(255,255,255,.05); display: grid; font-size: 10px; gap: 6px; grid-template-columns: 7px 1fr auto; min-height: 31px; padding: 5px 8px; }
.ws-signal i { background: #6cd0b3; border-radius: 50%; height: 7px; width: 7px; }
.ws-signal.warn i { background: #efbb70; }
.ws-signal.info i { background: #759ee9; }
.ws-signal span { color: #cfc5d2; }
.ws-signal b { font-size: 10px; }
.ws-scan-note { border-top: 1px solid rgba(255,255,255,.1); color: #c8bdcb; font-size: 9px; line-height: 1.45; margin-top: 9px; padding-top: 9px; }
.ws-scan-note b { background: #3567cf; color: white; display: inline-block; font-size: 8px; letter-spacing: .07em; margin-bottom: 5px; padding: 4px 5px; }

.ws-case-metrics { display: grid; grid-template-columns: repeat(3, 1fr); margin-bottom: 0; }
.ws-case-metrics .campaign-metric { border-bottom: 1px solid #e8e1e9; padding: 12px 14px; }
.ws-case-metrics .campaign-metric strong { display: inline-block; font-size: 22px; margin-right: 5px; }
.ws-case-metrics .campaign-metric.deduct strong { color: #b84255; }
.ws-case-row {
  align-items: center;
  border-bottom: 1px solid #ece6ed;
  display: grid;
  gap: 12px;
  grid-template-columns: .6fr 1.25fr 1fr 1.35fr .6fr 1fr .75fr;
  min-height: 57px;
  padding: 10px 14px;
}
.ws-case-row:last-child { border-bottom: 0; }
.ws-case-row.labels { background: #faf8fa; color: #867d89; font-size: 9px; font-weight: 800; letter-spacing: .05em; min-height: 31px; padding-block: 7px; text-transform: uppercase; }
.ws-case-id { color: var(--purple); font-size: 11px; font-weight: 850; }
.ws-case-cell strong { display: block; font-size: 11px; }
.ws-case-cell span { color: #6f6671; display: block; font-size: 9px; line-height: 1.35; margin-top: 3px; }
.ws-fine { font-size: 12px; font-weight: 850; }
.ws-case-status { font-size: 9px; font-weight: 800; padding: 7px 5px; text-align: center; }
.ws-case-status.closed { background: #e8f7f1; color: #178864; }
.ws-case-status.confirmed { background: #fdecef; color: #b84255; }

.market-panel { background: white; border: 1px solid #e5dde7; min-width: 0; }
.market-panel-head { align-items: center; border-bottom: 1px solid #e8e1e9; display: flex; gap: 14px; justify-content: space-between; min-height: 45px; padding: 9px 14px; }
.market-panel-head strong { display: block; font-size: 13px; font-weight: 800; }
.market-panel-head span { color: #665d68; display: block; font-size: 10px; font-weight: 550; margin-top: 3px; }
.market-chip { background: #f1ebf3; color: var(--purple); font-size: 9px; font-weight: 800; padding: 7px 8px; white-space: nowrap; }
.market-share-table,
.market-merch-table { overflow: hidden; }
.market-share-row { align-items: center; border-bottom: 1px solid #eee8ef; display: grid; gap: 10px; grid-template-columns: 1.05fr 1.5fr .55fr .62fr .62fr .62fr .62fr; min-height: 35px; padding: 0 14px; }
.market-share-row:last-child,
.market-merch-row:last-child { border-bottom: 0; }
.market-share-row.labels,
.market-merch-row.labels { background: #faf8fa; color: #867d89; font-size: 9px; font-weight: 800; letter-spacing: .05em; min-height: 27px; text-transform: uppercase; }
.market-share-row.ours,
.market-merch-row.ours { background: #fcf8fd; box-shadow: inset 4px 0 var(--purple); }
.market-brand { align-items: center; display: flex; font-size: 11px; font-weight: 800; gap: 8px; }
.market-brand i { background: #988b9c; border-radius: 50%; height: 8px; width: 8px; }
.ours .market-brand i { background: var(--purple); box-shadow: 0 0 0 3px #f0dff3; }
.market-share-bar { background: #eee9ef; height: 9px; }
.market-share-bar i { background: #9d91a1; display: block; height: 100%; }
.ours .market-share-bar i { background: linear-gradient(90deg, var(--purple), #d66add); }
.market-percent { font-size: 11px; font-weight: 800; }
.market-delta { font-size: 9px; font-weight: 800; padding: 6px 3px; text-align: center; }
.market-delta.up { background: #e8f7f1; color: #178864; }
.market-delta.down { background: #fdecef; color: #b84255; }
.market-merch { margin-top: 12px; }
.market-summary { align-items: center; display: flex; flex-wrap: wrap; gap: 6px; }
.market-summary b { color: var(--purple); font-size: 11px; }
.market-summary em { color: #8e8490; font-size: 9px; font-style: normal; }
.market-merch-row { align-items: center; border-bottom: 1px solid #eee8ef; display: grid; gap: 10px; grid-template-columns: 1.05fr 1.95fr .68fr .58fr .68fr .62fr; min-height: 36px; padding: 0 14px; }
.market-listing-bar { background: #ddd7e0; height: 18px; overflow: hidden; }
.market-listing-bar i { align-items: center; background: #928697; color: white; display: flex; font-size: 9px; font-style: normal; font-weight: 800; height: 100%; justify-content: center; }
.ours .market-listing-bar i { background: linear-gradient(90deg, var(--purple), #d66add); }
.market-count { color: #766d78; font-size: 10px; font-weight: 650; text-align: center; }
.market-count.preferred { background: #f1dff4; color: var(--purple); font-size: 12px; font-weight: 850; padding: 6px 3px; }
.market-count.dianping { background: #fff0f1; color: #d14c63; font-size: 11px; font-weight: 850; padding: 6px 3px; }
.market-priorities { display: grid; gap: 9px; grid-template-columns: repeat(2, 1fr); margin-top: 12px; }
.market-priority { align-items: center; background: white; border: 1px solid #e5dde7; border-left: 4px solid var(--purple); display: grid; gap: 12px; grid-template-columns: 1.1fr 1fr auto; min-height: 64px; padding: 9px 12px; }
.market-priority:nth-child(2) { border-left-color: #e0a03a; }
.market-priority small { color: var(--purple); display: block; font-size: 9px; font-weight: 800; letter-spacing: .05em; }
.market-priority strong { display: block; font-size: 16px; margin-top: 4px; }
.market-priority p { color: #6f6671; font-size: 9px; line-height: 1.4; margin: 0; }
.market-prices { align-items: center; background: #f7f3f8; display: flex; font-size: 11px; font-weight: 850; gap: 6px; padding: 8px; white-space: nowrap; }
.market-prices b:first-child { color: #b84255; }
.market-prices b:last-child { color: #178864; }

@media (max-width: 760px) {
  .ws-top-grid { grid-template-columns: 1fr; }
  .ws-quote-summary,
  .ws-case-metrics { grid-template-columns: 1fr; }
  .ws-quote-row { grid-template-columns: 1.25fr .82fr .7fr; }
  .ws-quote-row > :nth-child(4),
  .ws-quote-row > :nth-child(5) { display: none; }
  .ws-case-table { overflow-x: auto; }
  .ws-case-row { min-width: 820px; }
  .market-share-table,
  .market-merch-table { overflow-x: auto; }
  .market-share-row { min-width: 840px; }
  .market-merch-row { min-width: 820px; }
  .market-panel-head { align-items: start; flex-direction: column; }
  .market-priorities { grid-template-columns: 1fr; }
}
