/* Stage 10.6.7: economics and pulse polish. Scoped to the product detail view. */
#product-detail .detail-layout { grid-template-columns: minmax(0,.93fr) minmax(0,1.07fr); gap: clamp(20px,2vw,34px); align-items:start; }
#product-detail .detail-layout > * {min-width:0;}
#product-detail .economics-panel { padding:clamp(18px,2vw,28px); background:#fbfaf6; border:1px solid #d8d6cc; border-left:3px solid #d86b47; border-radius:3px; }
#product-detail .economics-panel > h3, #product-detail .detail-layout>div>h3 { font-family:var(--fn-serif,Georgia,serif); font-size:clamp(23px,2vw,30px); font-weight:500; letter-spacing:-.035em; line-height:1.12; color:#213339; }
#product-detail .economics-panel > p.muted {font-size:13px;line-height:1.65;max-width:44ch;margin:9px 0 18px;}
#product-detail .economics-grid { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:15px 13px;margin:0;}
#product-detail .economics-grid>label {min-width:0;margin:0;display:block;}
#product-detail .economics-grid>label>span {display:block; min-height:30px;margin:0 0 6px;color:#415958;font-size:11px;font-weight:760;line-height:1.4;}
#product-detail .economics-grid input { width:100%;min-width:0;max-width:100%;box-sizing:border-box;height:44px;padding:10px 12px;background:#fffefa;border:1px solid #cbd2cc;border-radius:3px;color:#1d2b2f;font:600 14px/1.2 var(--fn-sans,system-ui,sans-serif);font-variant-numeric:tabular-nums; }
#product-detail .economics-grid .wide {grid-column:1/-1;}
#product-detail .economics-grid .form-actions { padding-top:7px; }
#product-detail .economics-grid .button { min-height:44px;max-width:100%;white-space:normal;text-align:center; padding:11px 16px;background:#20343b;color:#fffefa;border:1px solid #20343b; }
#product-detail .detail-layout .metric-grid, #product-detail .detail-layout .analytics-metrics {grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
#product-detail .metric, #product-detail .analytics-metrics .metric { min-width:0; padding:15px 16px;display:flex;flex-direction:column;align-items:flex-start;justify-content:flex-start;gap:6px;overflow-wrap:anywhere; }
#product-detail .metric span,#product-detail .metric small {margin:0;font-size:11px;line-height:1.45;}
#product-detail .metric strong {display:block;max-width:100%;font-size:clamp(19px,2vw,25px);line-height:1.13;letter-spacing:-.035em;white-space:normal;overflow-wrap:anywhere;}
#product-detail .history-panel.product-analytics-panel {margin-top:18px;padding:clamp(17px,1.7vw,24px);background:#fffdfa;}
#product-detail .product-analytics-heading {display:flex;align-items:flex-start;justify-content:space-between;gap:15px;flex-wrap:wrap;padding-bottom:14px;border-bottom:1px solid #e0e0d7;}
#product-detail .product-analytics-heading>div {flex:1 1 220px;min-width:0;}
#product-detail .product-analytics-heading h4 {font:500 25px/1.15 var(--fn-serif,Georgia,serif);letter-spacing:-.03em;color:#1d3035;}
#product-detail .product-analytics-heading p {max-width:55ch;font-size:12px;line-height:1.65;margin:7px 0 0;}
#product-detail .product-analytics-heading .analytics-window {flex:0 0 auto;}
#product-detail .analytics-metrics {margin-top:15px;}
#product-detail .analytics-metrics .metric small {color:#687675;}
#product-detail .expense-breakdown {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;margin-top:14px;}
#product-detail .expense-breakdown.hidden {display:none;}
#product-detail .expense-breakdown>div {min-width:0; overflow-wrap:anywhere;}
#product-detail .economics-template-bar {margin-top:19px;padding:17px;border:1px solid #d0d7cf;background:#f0f2ed;border-radius:3px;}
#product-detail .economics-template-kicker {display:block;color:#356366;letter-spacing:.14em;font-size:10px;font-weight:800;margin-bottom:7px;}
#product-detail .economics-template-head strong {display:block;font-size:17px;letter-spacing:-.02em;color:#1e3136;}
#product-detail .economics-template-head p {margin:6px 0 13px;font-size:12px;line-height:1.65;color:#697671;}
#product-detail .economics-template-buttons {display:flex;flex-wrap:wrap;gap:8px;margin-bottom:14px;}
#product-detail .economics-template-buttons button {flex:1 1 155px;max-width:100%;min-height:41px;border-radius:2px;white-space:normal;}
#product-detail .economics-template-buttons .button-ghost {color:#1f373a;border:1px solid #9fb0a7;background:#fffefa;}
#product-detail .economics-template-option {display:flex;align-items:flex-start;gap:9px;margin:8px 0;cursor:pointer;}
#product-detail .economics-template-option input {width:16px;height:16px;flex:none;margin:2px 0 0;accent-color:#205b61;}
#product-detail .economics-template-option span {margin:0;font-size:11px;line-height:1.5;}
#product-detail .economics-template-state {margin:12px 0 0;padding-top:12px;border-top:1px solid #dce1d8;font-size:11px;color:#596966;line-height:1.5;}
@media(max-width:1150px) {#product-detail .detail-layout {grid-template-columns:1fr;}}
@media(max-width:620px) {#product-detail .economics-grid {grid-template-columns:1fr;}#product-detail .economics-grid>label>span{min-height:0;}#product-detail .detail-layout .metric-grid,#product-detail .detail-layout .analytics-metrics {grid-template-columns:repeat(2,minmax(0,1fr));}#product-detail .metric {padding:12px;}#product-detail .metric strong {font-size:19px;}}
@media(max-width:360px) {#product-detail .detail-layout .metric-grid,#product-detail .detail-layout .analytics-metrics {grid-template-columns:1fr;}}

/* Stage 10.7.2 — universal workspace control rhythm. Scoped to the client app.
   Retains toggle/checkbox sizes and primary/secondary intent; no layout JS changes. */
.shell { --ui-action-height:44px; --ui-control-radius:3px; --ui-control-gap:10px; }
.shell :is(.button,.icon-button) {
  display:inline-flex; align-items:center; justify-content:center;
  min-height:var(--ui-action-height); padding:10px 16px;
  border-radius:var(--ui-control-radius); line-height:1.35;
  font-size:13px; font-weight:710; text-align:center; box-sizing:border-box;
  white-space:normal; overflow-wrap:break-word; vertical-align:middle;
}
.shell .icon-button { min-width:var(--ui-action-height); padding:9px; }
.shell :is(.button,.icon-button)[disabled] { cursor:not-allowed; transform:none; }
.shell :is(.section-heading,.report-heading,.billing-review-heading,.billing-clarity-heading,.team-panel-heading,.history-panel-heading) {
  gap:clamp(12px,1.6vw,20px); min-width:0;
}
.shell :is(.section-heading,.report-heading,.billing-review-heading,.team-panel-heading) > * { min-width:0; }
.shell :is(.dashboard-command-actions,.onboarding-current-actions,.form-actions,.subscription-payment-actions,.analytics-controls,.admin-actions) {
  gap:var(--ui-control-gap); align-items:center; flex-wrap:wrap;
}
.shell :is(.dashboard-command-actions,.onboarding-current-actions,.form-actions,.analytics-controls) > .button { flex-shrink:0; }
.shell .badge { display:inline-flex; align-items:center; justify-content:center; min-height:30px; padding:5px 11px; line-height:1.35; }
.shell :is(select,input:not([type=checkbox]):not([type=radio]),textarea) {
  min-height:var(--ui-action-height); line-height:1.35; padding:10px 12px;
  border-radius:var(--ui-control-radius); max-width:100%; box-sizing:border-box;
}
.shell textarea { min-height:90px; }
.shell :is(.form-grid,.team-invite-form,.competitor-form) > * { min-width:0; }
.shell :is(.team-invite-form) { align-items:end; gap:12px; }
/* Profit Radar: priority label and action content share a clear baseline. */
.shell .profit-radar .section-heading { align-items:flex-start; }
.shell .radar-lead-control { flex:0 0 156px; max-width:100%; min-width:150px; gap:7px; }
.shell .radar-lead-control select { min-height:var(--ui-action-height); width:100%; }
.shell .radar-summary { margin:22px 0; }
.shell .radar-summary > div { min-width:0; min-height:102px; }
.shell .radar-summary strong { overflow-wrap:anywhere; font-variant-numeric:tabular-nums; }
.shell .radar-action {
  display:grid; grid-template-columns:120px minmax(0,1fr); align-items:start;
  gap:16px; min-height:74px; padding:16px 18px; text-align:left; border-radius:3px;
}
.shell .radar-action > span:nth-child(2) { min-width:0; }
.shell .radar-priority {
  display:inline-flex; align-items:center; justify-content:center;
  margin:0; padding:6px 10px; width:116px; min-height:30px; min-width:0;
  border-radius:3px; border:1px solid #d2ddd7;
  background:#f1f6f3; letter-spacing:.06em; line-height:1.3; text-align:center;
}
.shell .radar-action.severity-critical .radar-priority {background:#fbefec;border-color:#edcdc4;color:#984331;}
.shell .radar-action.severity-warning .radar-priority {background:#fff5e5;border-color:#e8d7b6;color:#825918;}
.shell .radar-sandbox-note { background:#fff4e5; border:1px solid #efcb94;
 border-left:3px solid #ce7b32; padding:12px 16px; margin:5px 0 18px;
 font-size:12px; line-height:1.65; color:#785222; }
.shell .radar-stock-row { border-radius:3px; gap:16px; }
@media(max-width:760px) {
  .shell .profit-radar .section-heading { flex-wrap:wrap; align-items:stretch; }
  .shell .radar-lead-control { flex:1 1 100%; max-width:230px; }
  .shell .radar-action { grid-template-columns:1fr; gap:10px; padding:14px; }
  .shell .radar-summary strong { font-size:clamp(23px,6vw,30px); }
  .shell :is(.dashboard-command-actions,.analytics-controls,.onboarding-current-actions) { width:100%; }
}
@media(max-width:440px) {
  .shell .form-actions .button { width:100%; }
  .shell .radar-stock-row { grid-template-columns:1fr; gap:5px; }
}

/* Stage 10.7.3 — hotfix polish for analytics/workspace controls. */
.shell .stores-panel .form-actions,
.shell .workspace-header-actions,
.shell .analytics-controls,
.shell .telegram-primary-actions,
.shell .wb-import-actions,
.shell .dashboard-command-actions,
.shell .product-analytics-heading,
.shell .section-heading {
  align-items: center;
}
.shell :is(.workspace-header-actions,.analytics-controls,.telegram-primary-actions,.wb-import-actions,.dashboard-command-actions,.stores-panel .form-actions) > :is(.button,.badge,select,input) {
  min-height: var(--ui-action-height);
}
.shell .stores-panel .button,
.shell .analytics-controls .button,
.shell .workspace-header-actions .button,
.shell .telegram-primary-actions .button,
.shell .wb-import-actions .button,
.shell .dashboard-command-actions .button {
  min-width: 132px;
}
.shell .stores-panel .button small,
.shell .workspace-header-actions .button small,
.shell .analytics-controls .button small {
  line-height: 1.2;
}
.shell .list-item {
  width: 100%;
  text-align: left;
  align-items: flex-start;
}
.shell .section-heading .badge,
.shell .product-analytics-heading .badge,
.shell .analytics-controls .badge {
  min-height: 34px;
  white-space: nowrap;
}
@media(max-width:760px) {
  .shell .stores-panel .button,
  .shell .analytics-controls .button,
  .shell .workspace-header-actions .button,
  .shell .telegram-primary-actions .button,
  .shell .wb-import-actions .button,
  .shell .dashboard-command-actions .button {
    min-width: 0;
  }
}

/* Stage 10.7.4 — consistent button baselines and responsive analytics toolbar */
.shell .analytics-page-toolbar { display:flex; align-items:center; justify-content:space-between; gap:24px; }
.shell .analytics-page-toolbar > div:first-child { min-width:0; flex:1 1 auto; }
.shell .analytics-page-toolbar .analytics-controls {
  display:flex; align-items:flex-end; justify-content:flex-end; gap:10px;
  flex:0 0 auto; width:auto; min-width:0; flex-wrap:nowrap;
}
.shell .analytics-page-toolbar .analytics-controls label {
  display:flex; flex-direction:column; justify-content:flex-end; flex:0 0 auto;
  gap:7px; min-width:132px; width:132px; margin:0;
}
.shell .analytics-page-toolbar .analytics-controls label span { line-height:18px; margin:0; }
.shell .analytics-page-toolbar .analytics-controls select,
.shell .analytics-page-toolbar .analytics-controls button {
  box-sizing:border-box; height:44px; min-height:44px; margin:0;
  padding:9px 14px; line-height:24px; align-self:flex-end;
}
.shell .analytics-page-toolbar .analytics-controls button { min-width:140px; }
/* Let title wrap without crushing the adjacent action. */
.shell .stores-panel :is(.section-heading,.store-list-heading,.workspace-heading) { gap:12px; }
.shell .stores-panel .button,
.shell #refresh-stores { min-width:128px; min-height:44px; padding:9px 12px; }
.shell #refresh-stores { white-space:normal; line-height:1.35; text-align:center; }
@media (max-width:850px) {
  .shell .analytics-page-toolbar { align-items:stretch; flex-direction:column; }
  .shell .analytics-page-toolbar .analytics-controls { justify-content:flex-start; width:100%; }
}
@media (max-width:440px) {
  .shell .analytics-page-toolbar .analytics-controls { flex-wrap:wrap; }
  .shell .analytics-page-toolbar .analytics-controls label { flex:1 1 140px; width:auto; }
  .shell .analytics-page-toolbar .analytics-controls button { flex:0 1 auto; }
}

/* Keep store title readable; the refresh control occupies its own full-width row. */
.shell .workspace[data-ui-view="products"] > aside.panel.card > .section-heading {
  display:flex; flex-direction:column; gap:14px; align-items:stretch;
}
.shell .workspace[data-ui-view="products"] > aside.panel.card > .section-heading > div {
  min-width:0;
}
.shell .workspace[data-ui-view="products"] #refresh-stores {
  display:inline-flex; flex-direction:row; align-items:center; justify-content:center;
  gap:10px; width:100%; max-width:none; min-width:0; height:44px;
  padding:10px 12px; border:1px solid #cbd4cd; background:#f4f5ef;
  font:650 13px/1.25 var(--fn-sans,system-ui,sans-serif);
}
.shell #refresh-stores .products-refresh-svg { flex:0 0 17px; width:17px; height:17px; }
.shell #refresh-stores [data-button-label] { display:inline; font-size:13px; line-height:1.25; }

/* Stage 10.7.6 — full-period analytics with labeled points. */
.shell .organization-analytics-chart:not(.is-empty) {
  display:block; overflow-x:auto; overflow-y:hidden; scroll-behavior:smooth;
  max-width:100%; padding-bottom:6px; scrollbar-width:thin;
}
.shell .organization-analytics-chart:not(.is-empty) .analytics-svg {
  display:block; max-width:none; min-width:1000px; height:auto;
}
.shell .analytics-value-label { fill:#1c3435; font-size:11px; font-family:inherit; font-weight:700; pointer-events:none; }
.shell .analytics-value-label.orders-value-label {fill:#5e4cca;}
.shell .analytics-value-label.buyouts-value-label {fill:#087a53;}
.shell .organization-analytics-chart.compact .analytics-inline-legend {
  position:sticky; left:0; display:flex; align-items:center; gap:16px; margin:4px 0 2px 12px;
}
.shell .analytics-chart-hint {font-size:12px;line-height:1.4;color:#64746e;margin:10px 0 0;}

/* Stage 10.8 — lightweight opportunity radar */
.opportunity-form{display:grid;grid-template-columns:minmax(0,1fr) minmax(165px,.45fr) auto;gap:12px;align-items:end;margin:20px 0 14px}
.opportunity-form label{display:flex;flex-direction:column;gap:8px;min-width:0}
.opportunity-form :is(input,select,.button){min-height:44px;box-sizing:border-box}
.opportunity-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,380px),1fr));gap:16px;margin:18px 0}
.opportunity-card{border:1px solid #d4dedb;border-radius:9px;padding:20px;background:#fff;min-width:0}
.opportunity-card-heading{display:flex;justify-content:space-between;align-items:flex-start;gap:12px}
.opportunity-card h3{margin:5px 0 4px;line-height:1.24;font-size:19px}
.opportunity-card :is(h4){margin:19px 0 10px;font-size:14px}
.opportunity-card small{color:#66777b}
.opportunity-metrics{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;margin-top:15px}
.opportunity-metrics>div{background:#f3f6f4;padding:12px;display:flex;flex-direction:column;gap:7px;min-width:0}
.opportunity-metrics span{font-size:11px;color:#66777b}.opportunity-metrics strong{font-size:16px;overflow-wrap:anywhere}
.opportunity-history{display:grid;gap:5px}.opportunity-history>div{display:flex;justify-content:space-between;gap:10px;border-bottom:1px solid #edf0ed;padding:6px 0;font-size:12px}
.opportunity-actions{display:grid;gap:12px}.opportunity-action{display:flex;align-items:center;justify-content:space-between;gap:16px;border:1px solid #e1e6e1;padding:12px}
.opportunity-action p{font-size:12px;margin:5px 0}.opportunity-action .button{flex-shrink:0;min-height:40px}
.opportunity-disclaimer{font-size:12px;line-height:1.5}
@media(max-width:760px){.opportunity-form{grid-template-columns:1fr}.opportunity-card-heading{flex-wrap:wrap}.opportunity-action{flex-direction:column;align-items:stretch}}

.opportunity-compare{background:#f2f6f4;color:#25464b;border-left:3px solid #158469;padding:12px 16px;font-size:13px;line-height:1.55;margin:14px 0}

/* Stage 10.8.1 — decision-grade product intelligence: explicit pair selection, history, card tools. */
.shell .opportunity-compare-workspace { margin:22px 0; padding:clamp(16px,2vw,24px); border:1px solid #d8ded9; background:#fafbf8; border-radius:8px; }
.shell .opportunity-compare-heading h3 { margin:0 0 5px; font-size:clamp(19px,2vw,24px); }
.shell .opportunity-compare-heading p { margin:0; max-width:75ch; }
.shell .opportunity-compare-selectors { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; margin:16px 0 12px; }
.shell .opportunity-compare-selectors label { min-width:0; display:grid; gap:6px; }
.shell .opportunity-compare-selectors select { min-width:0; width:100%; }
.shell .opportunity-compare { min-height:48px; }
.shell .opportunity-compare-kpis { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.shell .opportunity-compare-kpis > div { border:1px solid #dfe5de; padding:13px 15px; min-width:0; background:#fff; border-radius:6px; }
.shell .opportunity-compare-kpis span { display:block; color:#62736d; font-size:12px; margin-bottom:5px; }
.shell .opportunity-compare-kpis strong { display:block; font-size:19px; font-variant-numeric:tabular-nums; overflow-wrap:anywhere; }
.shell .opportunity-compare-kpis small { display:block; margin-top:6px; line-height:1.5; }
.shell .opportunity-card-tools { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.shell .opportunity-card-tools .button { min-height:40px; padding:8px 12px; font-size:12px; }
.shell .opportunity-card-tools .opportunity-remove { color:#8d3b31; border-color:#deb9b2; background:#fff8f6; }
.shell .opportunity-card-history-summary { display:flex; flex-wrap:wrap; gap:8px 16px; margin:14px 0; font-size:12px; color:#4b635e; }
.shell .opportunity-card-history-summary span { display:inline-flex; align-items:center; min-height:28px; }
.shell .opportunity-history { max-height:248px; overflow:auto; overscroll-behavior:contain; }
.shell .opportunity-history > div { min-width:0; }
.shell .opportunity-history time { white-space:nowrap; }
@media(max-width:700px) {
  .shell .opportunity-compare-selectors, .shell .opportunity-compare-kpis { grid-template-columns:1fr; }
  .shell .opportunity-card-tools .button { min-width:0; flex:1 1 130px; }
}


/* Stage 10.8.2 — Opportunity Radar visual repair. All rules stay scoped to this view.
   The Stage 10.8.1 section had a card border but no card padding; its content
   was flush against the frame. Keep the real API/JS/tenant logic untouched. */
.shell #opportunity-radar {
  padding: clamp(20px, 2.55vw, 40px);
  margin-bottom: 28px;
  box-sizing: border-box;
  min-width: 0;
}
.shell #opportunity-radar > .section-heading {
  margin: 0 0 24px;
  padding: 0 0 23px;
  border-bottom: 1px solid #e1e4dc;
  align-items: flex-start;
}
.shell #opportunity-radar > .section-heading > div { max-width: 850px; min-width: 0; }
.shell #opportunity-radar > .section-heading .eyebrow {
  margin: 0 0 12px;
  font-size: 10px;
  line-height: 1.4;
  letter-spacing: .155em;
  color: #3c6466;
}
.shell #opportunity-radar > .section-heading h2 {
  margin: 0;
  font-size: clamp(26px, 2.45vw, 36px);
  line-height: 1.15;
  font-weight: 640;
  letter-spacing: -.047em;
  overflow-wrap: break-word;
}
.shell #opportunity-radar > .section-heading .section-copy {
  margin: 12px 0 0;
  max-width: 73ch;
  font-size: 13px;
  line-height: 1.65;
}
.shell #opportunity-radar .opportunity-form {
  display: grid;
  grid-template-columns: minmax(0,1.4fr) minmax(220px,.76fr) minmax(176px,auto);
  gap: 16px;
  align-items: end;
  margin: 0;
  padding: clamp(17px, 2vw, 25px);
  border: 1px solid #dce3dd;
  border-radius: 3px;
  background: #f5f7f3;
}
.shell #opportunity-radar .opportunity-form label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  min-width: 0;
}
.shell #opportunity-radar .opportunity-form label > span {
  display: flex;
  align-items: flex-end;
  min-height: 32px;
  margin: 0;
  color: #425b5d;
  font-size: 12px;
  font-weight: 720;
  line-height: 1.4;
}
.shell #opportunity-radar .opportunity-form :is(input,select) {
  display: block;
  width: 100%;
  min-width: 0;
  height: 46px;
  min-height: 46px;
  padding: 10px 13px;
  border: 1px solid #cbd6d0;
  border-radius: 3px;
  background: #fffefa;
  color: #1e3135;
  font-size: 13px;
}
.shell #opportunity-radar #opportunity-check {
  min-width: 176px;
  min-height: 46px;
  height: 46px;
  border-radius: 3px;
  padding: 8px 15px;
  background: #1b2c33;
  color: #fff;
  line-height: 1.35;
  font-size: 13px;
  font-weight: 710;
}
.shell #opportunity-radar #opportunity-check:hover { background: #315c60; }
.shell #opportunity-radar #opportunity-check:focus-visible { outline: 3px solid #248879; outline-offset: 3px; }
.shell #opportunity-radar .opportunity-limits {
  margin: 15px 0 0;
  font-size: 12px;
  line-height: 1.65;
  color: #677674;
}
.shell #opportunity-radar .opportunity-status {
  margin: 17px 0 0;
  padding: 13px 16px;
  border-left: 3px solid #17816f;
  border-radius: 0 2px 2px 0;
  background: #eef4f1;
  color: #2f5454;
  font-size: 12px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}
.shell #opportunity-radar .opportunity-compare-workspace {
  min-width: 0;
  margin: 24px 0 0;
  padding: clamp(19px, 2vw, 26px);
  border: 1px solid #d9e1da;
  border-radius: 3px;
  background: #f8faf7;
}
.shell #opportunity-radar .opportunity-compare-heading h3 {
  margin: 0 0 8px;
  font-size: clamp(20px, 1.9vw, 25px);
  line-height: 1.25;
  font-weight: 670;
  letter-spacing: -.035em;
  color: #24353a;
}
.shell #opportunity-radar .opportunity-compare-heading p {
  margin: 0;
  max-width: 73ch;
  font-size: 12px;
  line-height: 1.6;
}
.shell #opportunity-radar .opportunity-compare-selectors {
  gap: 15px;
  margin: 20px 0 15px;
}
.shell #opportunity-radar .opportunity-compare-selectors label { min-width: 0; gap: 7px; }
.shell #opportunity-radar .opportunity-compare-selectors label > span {
  margin: 0;
  font-size: 12px;
  font-weight: 720;
  color: #4b6466;
}
.shell #opportunity-radar .opportunity-compare-selectors select {
  width: 100%;
  min-height: 45px;
  border-radius: 3px;
  background: #fffefa;
  font-size: 13px;
}
.shell #opportunity-radar .opportunity-compare {
  margin: 0;
  padding: 13px 16px;
  min-height: 49px;
  overflow-wrap: anywhere;
  border-radius: 1px;
  font-size: 12px;
}
.shell #opportunity-radar .opportunity-compare-kpis strong { font-size: clamp(17px, 1.5vw, 22px); }
.shell #opportunity-radar .opportunity-grid {
  margin: 22px 0 0;
  gap: 17px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
}
.shell #opportunity-radar .opportunity-card {
  min-width: 0;
  padding: clamp(17px, 1.7vw, 25px);
  border: 1px solid #dce2da;
  border-radius: 3px;
  background: #fffefa;
}
.shell #opportunity-radar .opportunity-card-heading { flex-wrap: wrap; row-gap: 14px; }
.shell #opportunity-radar .opportunity-card-heading > div:first-child { flex: 1 1 240px; min-width: 0; }
.shell #opportunity-radar .opportunity-card h3 { font-size: clamp(19px, 1.5vw, 22px); overflow-wrap: anywhere; }
.shell #opportunity-radar .opportunity-card small { overflow-wrap: anywhere; line-height: 1.55; }
.shell #opportunity-radar .opportunity-card-tools { flex: 1 1 auto; gap: 7px; }
.shell #opportunity-radar .opportunity-card-tools .button { min-height: 39px; min-width: 0; }
.shell #opportunity-radar .opportunity-metrics { gap: 8px; margin-top: 19px; }
.shell #opportunity-radar .opportunity-metrics > div { min-width: 0; padding: 13px; }
.shell #opportunity-radar .opportunity-metrics strong { font-variant-numeric: tabular-nums; }
.shell #opportunity-radar .opportunity-history > div { align-items: baseline; flex-wrap: wrap; }
.shell #opportunity-radar .opportunity-history time { white-space: normal; }
.shell #opportunity-radar .opportunity-action { min-width: 0; border-radius: 2px; }
.shell #opportunity-radar .opportunity-action > div { min-width: 0; overflow-wrap: anywhere; }
.shell #opportunity-radar .opportunity-action .button { min-width: 0; }
.shell #opportunity-radar .opportunity-disclaimer {
  margin: 24px 0 0;
  padding-top: 17px;
  border-top: 1px solid #e4e5df;
  max-width: 110ch;
  color: #687675;
  font-size: 11px;
  line-height: 1.65;
}
@media (max-width: 1180px) {
  .shell #opportunity-radar .opportunity-form {
    grid-template-columns: minmax(0,1fr) minmax(210px,.8fr);
  }
  .shell #opportunity-radar #opportunity-check {
    grid-column: 1 / -1;
    justify-self: start;
    min-width: 205px;
  }
}
@media (max-width: 700px) {
  .shell #opportunity-radar { padding: 19px; }
  .shell #opportunity-radar > .section-heading { margin-bottom: 19px; padding-bottom: 18px; }
  .shell #opportunity-radar .opportunity-form { grid-template-columns: minmax(0,1fr); gap: 14px; padding: 16px; }
  .shell #opportunity-radar .opportunity-form label > span { min-height: 0; }
  .shell #opportunity-radar #opportunity-check { grid-column: auto; width: 100%; min-width: 0; }
  .shell #opportunity-radar .opportunity-compare-workspace { padding: 17px; }
  .shell #opportunity-radar .opportunity-compare-selectors,
  .shell #opportunity-radar .opportunity-compare-kpis { grid-template-columns: minmax(0,1fr); }
  .shell #opportunity-radar .opportunity-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 420px) {
  .shell #opportunity-radar { padding: 15px; }
  .shell #opportunity-radar .opportunity-form { padding: 13px; }
  .shell #opportunity-radar .opportunity-card { padding: 15px; }
  .shell #opportunity-radar .opportunity-metrics { grid-template-columns: minmax(0,1fr); }
  .shell #opportunity-radar .opportunity-card-tools { width: 100%; }
  .shell #opportunity-radar .opportunity-card-tools .button { flex:1 1 100%; }
  .shell #opportunity-radar .opportunity-history > div { justify-content: flex-start; gap: 6px 10px; }
  .shell #opportunity-radar .opportunity-history time { flex: 1 1 100%; }
}

/* Stage 10.8.3 — silent empty states. Keep failure messages visible only on error. */
.shell #opportunity-radar #opportunity-compare:empty { display: none; }
.shell #opportunity-radar #opportunity-status.hidden { display: none !important; }
.shell #opportunity-radar #opportunity-status:not(.hidden) {
  margin: 16px 0 0;
  background: #fff3ee;
  border-left-color: #bd6e57;
  color: #804334;
}

/* Stage 10.8.5: precise public WB price channels in the Radar. */
.shell #opportunity-radar .opportunity-metrics { grid-template-columns: repeat(auto-fit,minmax(155px,1fr)); }
.shell #opportunity-radar .opportunity-metrics small { font-size:11px; line-height:1.35; }
.shell #opportunity-radar .opportunity-metrics a { color: #186752; text-decoration: underline; text-underline-offset: 2px; }
.shell #opportunity-radar .opportunity-metrics a:hover { color: #103d34; }

.shell #opportunity-radar .opportunity-old-price strong { color: #747e7b; text-decoration: line-through; text-decoration-thickness: 1px; }

/* Stage 10.8.8: factual event stream, cooldown feedback and readable comparison. */
.shell #opportunity-radar .opportunity-next-check {
  margin: 8px 0 0; padding: 10px 13px;
  border-left: 2px solid #187a68; background: #f1f5f1;
  color: #345b55; font-size: 12px; line-height: 1.6;
}
.shell #opportunity-radar .opportunity-next-check.hidden,
.shell #opportunity-radar .opportunity-events.hidden {display:none !important;}
.shell #opportunity-radar #opportunity-check:disabled {opacity:.58; cursor:not-allowed;}
.shell #opportunity-radar .opportunity-events {
  margin: 23px 0 0; padding: clamp(16px,2vw,25px); background: #fffefa;
  border: 1px solid #dde3dc; border-radius:3px;
}
.shell #opportunity-radar .opportunity-events h3 { margin: 0 0 13px; font-size: 19px; }
.shell #opportunity-radar .opportunity-event-row {
  display:flex; justify-content:space-between; align-items:baseline;
  gap:12px 18px; padding: 12px 0; border-bottom:1px solid #e8ece7;
}
.shell #opportunity-radar .opportunity-event-row:last-child {border-bottom:0;padding-bottom:0;}
.shell #opportunity-radar .opportunity-event-row:first-child {padding-top:0;}
.shell #opportunity-radar .opportunity-event-row strong {display:block;color:#203035;font-size:13px;}
.shell #opportunity-radar .opportunity-event-row small {display:block;color:#6b7875;margin-top:3px;font-size:11px;}
.shell #opportunity-radar .opportunity-event-row time {flex-shrink:0;color:#60726e;font-size:11px;}
.shell #opportunity-radar .opportunity-compare-kpis {grid-template-columns:repeat(2,minmax(0,1fr));}
.shell #opportunity-radar .opportunity-compare-kpis > div {min-width:0;}
.shell #opportunity-radar .opportunity-compare-kpis strong {overflow-wrap:anywhere; font-size:clamp(15px,1.4vw,20px);}
.shell #opportunity-radar .opportunity-compare p.muted {font-size:11px;line-height:1.6;}
@media(max-width:700px) {
  .shell #opportunity-radar .opportunity-event-row {flex-direction:column;gap:6px;}
  .shell #opportunity-radar .opportunity-compare-kpis {grid-template-columns:minmax(0,1fr);}
}


/* Stage 10.8.9 — intentional metric alignment and evidence-based analysis. */
.shell #opportunity-radar .opportunity-metrics {
  grid-template-columns: repeat(5,minmax(0,1fr)); gap: 9px; align-items:stretch;
}
.shell #opportunity-radar .opportunity-metrics > div {
  min-height: 122px; box-sizing:border-box; display:flex; flex-direction:column;
  align-items:center; justify-content:center; text-align:center; gap:8px;
  padding: 15px 11px; background:#f2f5f3;
}
.shell #opportunity-radar .opportunity-metrics span {font-size:11px;line-height:1.4;min-height:30px;display:flex;align-items:center;justify-content:center;}
.shell #opportunity-radar .opportunity-metrics strong {font-size:clamp(17px,1.5vw,23px);line-height:1.2;letter-spacing:-.025em;}
.shell #opportunity-radar .opportunity-metrics small {line-height:1.4;margin-top:2px;}
.shell #opportunity-radar .opportunity-metrics a {overflow-wrap:anywhere;}
.shell #opportunity-radar .opportunity-old-price strong {color:#77817d;}
.shell #opportunity-radar .opportunity-analysis {margin-top:23px;border-top:1px solid #e0e6df;padding-top:22px;}
.shell #opportunity-radar .opportunity-analysis-heading h4 {margin:6px 0 5px;font-size:clamp(19px,1.8vw,24px);letter-spacing:-.03em;line-height:1.2;color:#1d3036;}
.shell #opportunity-radar .opportunity-analysis-heading p {margin:0 0 15px;font-size:12px;color:#62736d;line-height:1.55;}
.shell #opportunity-radar .opportunity-analysis-kicker {display:block;font-size:10px;font-weight:750;letter-spacing:.15em;color:#326861;line-height:1.4;}
.shell #opportunity-radar .opportunity-insights {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;}
.shell #opportunity-radar .opportunity-insight {min-width:0;padding:17px 19px;border:1px solid #dfe6de;background:#fafbf8;display:flex;flex-direction:column;gap:6px;}
.shell #opportunity-radar .opportunity-insight > span {font-size:10px;letter-spacing:.12em;text-transform:uppercase;color:#387568;font-weight:730;}
.shell #opportunity-radar .opportunity-insight > strong {font-size:15px;color:#203238;line-height:1.35;}
.shell #opportunity-radar .opportunity-insight > p {font-size:12px;line-height:1.65;margin:0;color:#586a66;overflow-wrap:anywhere;}
.shell #opportunity-radar .opportunity-pair-analysis {margin-top:19px;background:#fffefa;border:1px solid #dde4dd;padding:20px 22px;color:#273e41;}
.shell #opportunity-radar .opportunity-pair-analysis h4 {font-size:18px;line-height:1.3;margin:7px 0 13px;color:#203239;}
.shell #opportunity-radar .opportunity-pair-analysis p {margin:8px 0;color:#3b5653;font-size:13px;line-height:1.6;}
.shell #opportunity-radar .opportunity-pair-analysis small {display:block;margin-top:14px;color:#6a7a73;font-size:11px;line-height:1.5;}
.shell #opportunity-radar .opportunity-compare-kpis > div {display:flex;flex-direction:column;justify-content:center;text-align:center;align-items:center;min-height:125px;}
@media(max-width:1250px) {
 .shell #opportunity-radar .opportunity-metrics {grid-template-columns:repeat(3,minmax(0,1fr));}
}
@media(max-width:700px) {
 .shell #opportunity-radar .opportunity-metrics {grid-template-columns:repeat(2,minmax(0,1fr));}
 .shell #opportunity-radar .opportunity-insights {grid-template-columns:minmax(0,1fr);}
}
@media(max-width:390px) {
 .shell #opportunity-radar .opportunity-metrics {grid-template-columns:minmax(0,1fr);}
 .shell #opportunity-radar .opportunity-pair-analysis {padding:16px;}
}
/* Keep the analytical fact row legible even when two watched cards exist. */
.shell #opportunity-radar .opportunity-grid {grid-template-columns:minmax(0,1fr);}
.shell #opportunity-radar .opportunity-metrics strong {white-space:nowrap;font-size:clamp(16px,1.5vw,22px);}
@media(max-width:700px) {
 .shell #opportunity-radar .opportunity-metrics strong {white-space:normal;}
}


/* Stage 10.8.10 — align real observation history using three stable columns. */
.shell #opportunity-radar .opportunity-history > .opportunity-history-row {
  display:grid;
  grid-template-columns: minmax(168px,1fr) minmax(260px,1.3fr) minmax(100px,1fr);
  column-gap:18px;
  align-items:center;
  justify-content:initial;
  padding:10px 0;
}
.shell #opportunity-radar .opportunity-history-row > time { min-width:0; text-align:left; }
.shell #opportunity-radar .opportunity-history-prices { min-width:0; text-align:center; justify-self:center; font-variant-numeric:tabular-nums; }
.shell #opportunity-radar .opportunity-history-rating { min-width:0; text-align:right; justify-self:end; white-space:nowrap; font-variant-numeric:tabular-nums; }
.shell #opportunity-radar .opportunity-metrics > div { align-items:center; justify-content:center; text-align:center; }
.shell #opportunity-radar .opportunity-metrics > div > span,
.shell #opportunity-radar .opportunity-metrics > div > strong,
.shell #opportunity-radar .opportunity-metrics > div > small { text-align:center; }
@media(max-width:760px) {
 .shell #opportunity-radar .opportunity-history > .opportunity-history-row {grid-template-columns:minmax(0,1fr) auto;row-gap:5px;column-gap:10px;}
 .shell #opportunity-radar .opportunity-history-row > time {grid-column:1;grid-row:1;}
 .shell #opportunity-radar .opportunity-history-rating {grid-column:2;grid-row:1;}
 .shell #opportunity-radar .opportunity-history-prices {grid-column:1 / -1;grid-row:2;justify-self:start;text-align:left;white-space:normal;}
}

/* Stage 10.8.14 — financial analytics only. Graphs fill the panel, never 90-day sideways strips. */
.shell .organization-analytics-chart:not(.is-empty) {
  width:100%;max-width:100%;overflow-x:hidden;overflow-y:hidden;scroll-behavior:auto;
}
.shell .organization-analytics-chart:not(.is-empty) .analytics-svg {
  display:block;width:100% !important;max-width:100%;min-width:0;height:auto;
}
.shell .analytics-chart-interactive {cursor:pointer;outline:none;}
.shell .analytics-chart-interactive:focus-visible {stroke:#172e29;stroke-width:3px;}
.shell .analytics-chart-detail {
  margin:7px 0 0;padding:9px 12px;border-left:2px solid #438d79;
  background:#f3f6f1;color:#39554d;font-size:12px;line-height:1.55;
  overflow-wrap:anywhere;
}
@media(max-width:600px){
  .shell .analytics-chart-detail {font-size:11px;padding:8px 10px;}
  .shell .analytics-value-label {font-size:10px;}
}

/* Stage 10.8.15: comparison quotas are distinct from legacy competitors limits. */
.shell .plan-card .plan-comparison-limit {border-top:1px solid #e1e8e2;padding-top:11px;display:flex;flex-direction:column;gap:5px;min-width:0;}
.shell .plan-card .plan-comparison-limit strong {color:#295953;font-size:12px;font-weight:750;}
.shell .plan-card .plan-comparison-limit span {color:#334a48;font-size:13px;font-weight:650;line-height:1.45;font-variant-numeric:tabular-nums;}
