/* Estoque mobile: fila operacional densa, sem reproduzir as planilhas do desktop. */
#s-estoque,
.stock-sheet-overlay {
  --stock-bg: #0b101b;
  --stock-surface: #121925;
  --stock-surface-2: #182130;
  --stock-line: rgba(226, 232, 240, .13);
  --stock-line-strong: rgba(226, 232, 240, .24);
  --stock-text: #f2f1ed;
  --stock-muted: #b2b7c1;
  --stock-dim: #87909f;
  --stock-gold: #d6ae73;
  --stock-gold-strong: #edc987;
  --stock-success: #65b78d;
  --stock-warning: #e2b763;
  --stock-danger: #e28181;
  --stock-chart-navy: #435272;
  --stock-chart-slate: #758098;
  --stock-chart-green: #5f846d;
  --stock-chart-clay: #ac6654;
  --stock-chart-plum: #8a7198;
  --stock-chart-petrol: #557f8f;
  --stock-chart-other: #69717f;
}
#s-estoque {
  padding: 0 !important;
  background: var(--stock-bg) !important;
}
#s-estoque *,
#s-estoque *::before,
#s-estoque *::after,
.stock-sheet-overlay *,
.stock-sheet-overlay *::before,
.stock-sheet-overlay *::after { box-sizing: border-box; }

.stock-mobile-root {
  min-height: 100%;
  color: var(--stock-text);
  font-family: 'DM Sans', system-ui, sans-serif;
  background: var(--stock-bg);
}

.stock-mobile-shell { min-height: 100%; }

.stock-mobile-header {
  position: sticky;
  top: 0;
  z-index: 28;
  padding-top: var(--sat);
  background: rgba(11, 16, 27, .985);
  border-bottom: 1px solid var(--stock-line);
}

.stock-mobile-titlebar {
  height: 52px;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  align-items: center;
  padding: 0 6px;
}

.stock-mobile-back,
.stock-mobile-refresh,
.stock-icon-button {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--stock-text);
  cursor: pointer;
}

.stock-mobile-back svg,
.stock-mobile-refresh svg,
.stock-icon-button svg { width: 20px; height: 20px; }
.stock-mobile-back:active,
.stock-mobile-refresh:active,
.stock-icon-button:active { background: rgba(255,255,255,.07); }
.stock-mobile-refresh[aria-busy="true"] svg { animation: stock-spin .8s linear infinite; }

.stock-mobile-heading { min-width: 0; text-align: left; }
.stock-mobile-heading strong { display: block; font-size: 17px; line-height: 1.15; font-weight: 750; }
.stock-mobile-heading span { display: block; margin-top: 2px; color: var(--stock-muted); font-size: 10.5px; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.stock-mobile-nav {
  display: flex;
  gap: 0;
  overflow-x: auto;
  padding: 0 6px;
  scrollbar-width: none;
  scroll-snap-type: x proximity;
}
.stock-mobile-nav::-webkit-scrollbar { display: none; }
.stock-mobile-nav button {
  min-width: 88px;
  min-height: 46px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 10px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--stock-muted);
  font: inherit;
  font-size: 10.5px;
  font-weight: 650;
  cursor: pointer;
  scroll-snap-align: center;
}
.stock-mobile-nav button svg { width: 16px; height: 16px; flex: 0 0 auto; }
.stock-mobile-nav button.active { color: var(--stock-text); border-bottom-color: var(--stock-gold); }
.stock-mobile-nav button.active svg { color: var(--stock-gold-strong); }

.stock-sync-line { height: 2px; overflow: hidden; }
.stock-sync-line::after { content: ''; display: block; width: 34%; height: 100%; background: var(--stock-gold); transform: translateX(-120%); opacity: 0; }
.stock-mobile-root.is-loading .stock-sync-line::after { opacity: 1; animation: stock-progress 1.05s ease-in-out infinite; }

.stock-mobile-body { min-width: 0; overflow-x: hidden; padding: 0 6px calc(22px + var(--sab)); }
.stock-view-head { padding: 12px 4px 8px; }
.stock-view-head h2 { margin: 0; font-size: 15px; line-height: 1.25; font-weight: 750; }
.stock-view-head p { margin: 3px 0 0; color: var(--stock-muted); font-size: 11px; line-height: 1.4; }

.stock-subtabs {
  display: flex;
  align-items: center;
  min-height: 44px;
  overflow-x: auto;
  border-bottom: 1px solid var(--stock-line);
  scrollbar-width: none;
}
.stock-subtabs::-webkit-scrollbar { display: none; }
.stock-subtabs button {
  min-width: max-content;
  min-height: 44px;
  padding: 0 14px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--stock-muted);
  font: inherit;
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
}
.stock-subtabs button.active { color: var(--stock-text); border-color: var(--stock-gold); }

.stock-filterbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  padding: 9px 4px;
  border-bottom: 1px solid var(--stock-line);
}
.stock-filterbar > * { min-width: 0; }
.stock-filterbar.is-period { grid-template-columns: 1fr 1fr; }
.stock-filterbar label { min-width: 0; }
.stock-filterbar label > span { display: block; margin-bottom: 4px; color: var(--stock-dim); font-size: 10px; }
.stock-input,
.stock-select,
.stock-date,
.stock-textarea {
  width: 100%;
  min-height: 44px;
  padding: 0 11px;
  border: 1px solid var(--stock-line-strong);
  border-radius: 8px;
  background: var(--stock-surface);
  color: var(--stock-text);
  font: inherit;
  font-size: 12px;
  outline: none;
}
.stock-textarea { min-height: 88px; padding-block: 10px; resize: vertical; }
.stock-input:focus,
.stock-select:focus,
.stock-date:focus,
.stock-textarea:focus { border-color: var(--stock-gold); box-shadow: 0 0 0 2px rgba(214,174,115,.13); }
.stock-date { color-scheme: dark; }
.stock-date { min-width: 0; }
.stock-period-control { border-bottom: 1px solid var(--stock-line); }
.stock-period-summary {
  width: 100%;
  min-height: 44px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) 20px;
  align-items: center;
  gap: 10px;
  padding: 0 8px 0 5px;
  border: 0;
  background: transparent;
  color: var(--stock-text);
  text-align: left;
  font: inherit;
}
.stock-period-summary > span { color: var(--stock-dim); font-size: 10px; }
.stock-period-summary > strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11.5px; font-weight: 650; }
.stock-period-summary svg { width: 16px; height: 16px; color: var(--stock-muted); }
.stock-period-summary[aria-expanded="true"] svg { transform: rotate(90deg); }
.stock-period-editor { padding: 4px 4px 10px; }
.stock-period-editor[hidden] { display: none; }
.stock-filter-toggle { min-width: 44px; height: 44px; align-self: end; border: 1px solid var(--stock-line-strong); border-radius: 8px; background: var(--stock-surface); color: var(--stock-text); font: inherit; cursor: pointer; }
.stock-filter-toggle.has-filters { color: var(--stock-gold-strong); border-color: rgba(214,174,115,.5); }

.stock-filter-panel {
  padding: 10px 4px 12px;
  border-bottom: 1px solid var(--stock-line);
  background: var(--stock-bg);
}
.stock-filter-panel[hidden] { display: none; }
.stock-filter-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.stock-filter-grid .wide { grid-column: 1 / -1; }
.stock-filter-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 10px; }

.stock-button {
  min-height: 44px;
  padding: 0 13px;
  border: 1px solid var(--stock-line-strong);
  border-radius: 8px;
  background: transparent;
  color: var(--stock-text);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  cursor: pointer;
}
.stock-button svg { width: 16px; height: 16px; flex: 0 0 auto; }
.stock-button.primary { border-color: var(--stock-gold); background: var(--stock-gold); color: #171a20; }
.stock-button.danger { border-color: rgba(226,129,129,.55); color: #f0a0a0; }
.stock-button:disabled { opacity: .45; cursor: not-allowed; }
.stock-button-row { display: flex; flex-wrap: wrap; gap: 8px; padding: 9px 4px; }

.stock-opportunity-command {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 4px 8px;
  border-bottom: 1px solid var(--stock-line);
}
.stock-opportunity-command > span { min-width: 0; }
.stock-opportunity-command strong,
.stock-opportunity-command small { display: block; }
.stock-opportunity-command strong { color: var(--stock-text); font-size: 11px; font-weight: 720; }
.stock-opportunity-command small { margin-top: 3px; overflow: hidden; color: var(--stock-muted); font-size: 9.5px; text-overflow: ellipsis; white-space: nowrap; }
.stock-opportunity-command .stock-button { flex: 0 0 auto; }
.stock-opportunity-empty { min-height: 156px; border-bottom: 1px solid var(--stock-line); }

.stock-kpi-band {
  display: flex;
  overflow-x: auto;
  margin: 8px 0 0;
  border-top: 1px solid var(--stock-line);
  border-bottom: 1px solid var(--stock-line);
  scrollbar-width: none;
}
.stock-kpi-band::-webkit-scrollbar { display: none; }
.stock-kpi {
  min-width: 126px;
  flex: 1 0 126px;
  padding: 10px 9px 9px;
  border-right: 1px solid var(--stock-line);
}
.stock-kpi:last-child { border-right: 0; }
.stock-kpi span { display: block; color: var(--stock-muted); font-size: 10px; line-height: 1.25; }
.stock-kpi strong { display: block; margin-top: 4px; color: var(--stock-text); font-size: 17px; line-height: 1.2; font-weight: 750; white-space: nowrap; }
.stock-kpi strong,
.stock-row-value strong,
.stock-detail-kpis strong,
.stock-product-price strong { font-variant-numeric: tabular-nums; }
.stock-kpi em { display: block; margin-top: 3px; color: var(--stock-dim); font-size: 9.5px; font-style: normal; }
.stock-kpi.is-good strong { color: var(--stock-success); }
.stock-kpi.is-warn strong { color: var(--stock-warning); }

.stock-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 46px;
  padding: 10px 4px 7px;
}
.stock-section-title strong { font-size: 13px; font-weight: 750; }
.stock-section-title span { color: var(--stock-muted); font-size: 10.5px; }

.stock-chart-switch { display: flex; overflow-x: auto; border-bottom: 1px solid var(--stock-line); scrollbar-width: none; scroll-snap-type: x proximity; }
.stock-chart-switch::-webkit-scrollbar { display: none; }
.stock-chart-switch button { min-height: 42px; flex: 0 0 auto; padding: 0 12px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--stock-muted); font: inherit; font-size: 10.5px; cursor: pointer; scroll-snap-align: center; }
.stock-chart-switch button.active { color: var(--stock-text); border-color: var(--stock-gold); }
.stock-chart-legend { display: flex; gap: 12px; min-height: 35px; overflow-x: auto; padding: 9px 4px 7px; border-bottom: 1px solid var(--stock-line); scrollbar-width: none; }
.stock-chart-legend:empty { display: none; }
.stock-chart-legend::-webkit-scrollbar { display: none; }
.stock-chart-legend span { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px; color: var(--stock-muted); font-size: 9.5px; white-space: nowrap; }
.stock-chart-legend i { width: 9px; height: 9px; border-radius: 2px; background: var(--legend-color); }
.stock-chart-host { position: relative; height: 250px; padding: 12px 4px 8px; border-bottom: 1px solid var(--stock-line); }
.stock-chart-host canvas { width: 100% !important; height: 100% !important; }

.stock-ledger { border-top: 1px solid var(--stock-line); }
.stock-row {
  width: 100%;
  min-height: 76px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px 4px;
  border: 0;
  border-bottom: 1px solid var(--stock-line);
  background: transparent;
  color: inherit;
  text-align: left;
  font: inherit;
  cursor: pointer;
  content-visibility: auto;
  contain-intrinsic-size: 0 78px;
}
.stock-row:active { background: rgba(255,255,255,.035); }
.stock-row.is-atypical { background: rgba(148, 105, 22, .07); }
.stock-row:focus-visible,
.stock-button:focus-visible,
.stock-icon-button:focus-visible,
.stock-period-summary:focus-visible { outline: 2px solid var(--stock-gold); outline-offset: -2px; }
.stock-row-main { min-width: 0; }
.stock-row-title { display: flex; align-items: baseline; gap: 7px; min-width: 0; }
.stock-row-title b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; line-height: 1.25; font-weight: 720; }
.stock-row-title i { flex: 0 0 auto; color: var(--stock-gold-strong); font-size: 10px; font-style: normal; font-weight: 750; }
.stock-row-copy { margin-top: 4px; color: var(--stock-muted); font-size: 11px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.stock-row-meta { display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: 6px; color: var(--stock-dim); font-size: 9.5px; }
.stock-atypical-flag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--stock-warning);
  font-weight: 720;
}
.stock-atypical-flag svg { width: 12px; height: 12px; }
.stock-row-value { min-width: 76px; max-width: 108px; text-align: right; }
.stock-row-value strong { display: block; font-size: 12px; line-height: 1.2; font-weight: 750; }
.stock-row-value span { display: block; margin-top: 4px; color: var(--stock-muted); font-size: 9.5px; line-height: 1.25; }
.stock-row-status { color: var(--stock-warning) !important; }
.stock-row-status.is-good { color: var(--stock-success) !important; }
.stock-row-status.is-danger { color: var(--stock-danger) !important; }

.stock-rank-row { grid-template-columns: 30px minmax(0, 1fr) auto; }
.stock-rank { color: var(--stock-gold-strong); font-size: 14px; font-weight: 780; text-align: center; }

.stock-empty,
.stock-error,
.stock-loading {
  min-height: 180px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 24px 18px;
  text-align: center;
  color: var(--stock-muted);
}
.stock-empty svg,
.stock-error svg { width: 24px; height: 24px; color: var(--stock-dim); }
.stock-empty strong,
.stock-error strong { color: var(--stock-text); font-size: 13px; }
.stock-empty p,
.stock-error p { max-width: 310px; margin: 0; font-size: 11px; line-height: 1.5; }
.stock-skeleton { padding: 8px 4px; }
.stock-skeleton span { display: block; height: 68px; margin-bottom: 8px; border-radius: 7px; background: #151e30; animation: stock-pulse 1.1s ease-in-out infinite alternate; }

.stock-offline-banner,
.stock-notice {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--stock-line);
  color: var(--stock-muted);
  font-size: 10.5px;
  line-height: 1.35;
}
.stock-offline-banner svg,
.stock-notice svg { width: 16px; height: 16px; flex: 0 0 auto; }
.stock-notice.is-error { color: #efa3a3; }
.stock-notice.is-success { color: #83c8a4; }

.stock-atypical-notice {
  min-height: 54px;
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(148, 105, 22, .38);
  color: var(--stock-warning);
}
.stock-atypical-notice > svg { width: 18px; height: 18px; margin-top: 1px; }
.stock-atypical-notice > span { min-width: 0; }
.stock-atypical-notice strong,
.stock-atypical-notice small { display: block; }
.stock-atypical-notice strong { font-size: 11.5px; }
.stock-atypical-notice small { margin-top: 3px; color: var(--stock-muted); font-size: 10.5px; line-height: 1.4; }

.stock-pagination { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 12px 4px; }
.stock-pagination span { color: var(--stock-muted); font-size: 11px; }
.stock-pagination button { width: 44px; height: 44px; border: 1px solid var(--stock-line-strong); border-radius: 8px; background: transparent; color: var(--stock-text); }
.stock-pagination button:disabled { opacity: .35; }

.stock-sheet-overlay {
  position: fixed;
  inset: 0;
  z-index: 1120;
  display: none;
  align-items: flex-end;
  justify-content: center;
  padding-top: var(--sat);
  background: rgba(3, 6, 11, .86);
  font-family: 'DM Sans', system-ui, sans-serif;
  overscroll-behavior: none;
}
.stock-sheet-overlay.open { display: flex; }
.stock-sheet {
  width: min(100%, 760px);
  min-height: 0;
  max-height: calc(100dvh - var(--sat));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--stock-line-strong);
  border-bottom: 0;
  border-radius: 10px 10px 0 0;
  background: #0b101b;
  color: var(--stock-text);
  box-shadow: 0 -4px 18px rgba(2, 5, 10, .28);
  isolation: isolate;
}
.stock-sheet[data-size="compact"] { height: auto; max-height: min(72dvh, 680px); }
.stock-sheet[data-size="regular"] { height: auto; max-height: min(84dvh, 780px); }
.stock-sheet[data-size="full"] { height: min(94dvh, 900px); }
.stock-sheet-header {
  flex: 0 0 auto;
  min-height: 58px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px;
  align-items: center;
  gap: 8px;
  padding: 7px 7px 7px 14px;
  border-bottom: 1px solid var(--stock-line);
  background: #121925;
}
.stock-sheet-header strong { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.stock-sheet-header span { display: block; margin-top: 3px; color: var(--stock-muted); font-size: 10px; }
.stock-sheet-scroll { min-height: 0; flex: 1 1 auto; overflow-y: auto; padding: 0 14px 20px; background: #0b101b; overscroll-behavior: contain; }
.stock-sheet-footer { flex: 0 0 auto; display: flex; flex-wrap: wrap; gap: 8px; padding: 9px 10px calc(9px + var(--sab)); border-top: 1px solid var(--stock-line); background: #121925; }
.stock-sheet-footer .stock-button { flex: 1 1 118px; }
.stock-sheet svg { flex: 0 0 auto; max-width: 24px; max-height: 24px; }
.stock-sheet .stock-button svg { width: 16px !important; height: 16px !important; }
.stock-sheet .stock-icon-button svg { width: 20px !important; height: 20px !important; }
.stock-sheet .stock-empty svg,
.stock-sheet .stock-error svg { width: 24px !important; height: 24px !important; }

.stock-detail-lead { padding: 16px 0 13px; border-bottom: 1px solid var(--stock-line); }
.stock-detail-lead h3 { margin: 0; font-size: 19px; line-height: 1.25; font-weight: 760; }
.stock-detail-lead p { margin: 8px 0 0; color: var(--stock-muted); font-size: 12px; line-height: 1.55; }
.stock-detail-kpis { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid var(--stock-line); }
.stock-detail-kpis div { min-height: 67px; padding: 10px 0; border-bottom: 1px solid var(--stock-line); }
.stock-detail-kpis div:nth-child(odd) { padding-right: 10px; border-right: 1px solid var(--stock-line); }
.stock-detail-kpis div:nth-child(even) { padding-left: 10px; }
.stock-detail-kpis span { display: block; color: var(--stock-dim); font-size: 10px; }
.stock-detail-kpis strong { display: block; margin-top: 4px; font-size: 13px; line-height: 1.3; overflow-wrap: anywhere; }
.stock-detail-kpis .is-primary strong { color: var(--stock-gold-strong); font-size: 17px; }
.stock-detail-section { padding: 15px 0; border-bottom: 1px solid var(--stock-line); }
.stock-detail-section > h4 { margin: 0 0 9px; font-size: 12px; font-weight: 750; }
.stock-detail-section > p { margin: 0; color: var(--stock-muted); font-size: 11.5px; line-height: 1.55; white-space: pre-wrap; }
.stock-detail-list { border-top: 1px solid var(--stock-line); }
.stock-detail-line { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--stock-line); }
.stock-detail-line strong { display: block; font-size: 11.5px; line-height: 1.35; }
.stock-detail-line span { display: block; margin-top: 3px; color: var(--stock-muted); font-size: 10px; line-height: 1.35; }
.stock-detail-line b { font-size: 11px; white-space: nowrap; }

.stock-opportunity-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 12px;
  min-height: 39px;
  align-items: center;
  border-bottom: 1px solid var(--stock-line);
  color: var(--stock-muted);
  font-size: 10px;
}
.stock-opportunity-meta span + span { position: relative; }
.stock-opportunity-meta span + span::before {
  content: '';
  position: absolute;
  top: 50%;
  left: -7px;
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: var(--stock-dim);
}
.stock-opportunity-kpis .is-primary strong { color: var(--stock-success); }
.stock-opportunity-reasoning,
.stock-opportunity-providers,
.stock-opportunity-trace { padding: 15px 0; border-bottom: 1px solid var(--stock-line); }
.stock-opportunity-reasoning > h4,
.stock-opportunity-providers > h4,
.stock-opportunity-trace > h4 {
  margin: 0 0 10px;
  color: var(--stock-text);
  font-size: 11.5px;
  font-weight: 750;
}
.stock-opportunity-reasoning > h4 { display: flex; align-items: center; gap: 7px; }
.stock-opportunity-reasoning > h4 svg { width: 16px; height: 16px; color: var(--stock-gold-strong); }
.stock-opportunity-reasoning ol { margin: 0; padding: 0; list-style: none; }
.stock-opportunity-reasoning li {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 9px;
  padding: 10px 0;
  border-bottom: 1px solid var(--stock-line);
}
.stock-opportunity-reasoning li > span {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: var(--stock-surface-2);
  color: var(--stock-text);
  font-size: 10px;
  font-weight: 780;
}
.stock-opportunity-reasoning li small,
.stock-opportunity-reasoning li strong { display: block; }
.stock-opportunity-reasoning li small { color: var(--stock-dim); font-size: 9px; line-height: 1.3; }
.stock-opportunity-reasoning li strong { margin-top: 3px; color: var(--stock-muted); font-size: 11px; line-height: 1.48; font-weight: 650; }
.stock-opportunity-reasoning > p {
  display: grid;
  grid-template-columns: 17px minmax(0, 1fr);
  gap: 7px;
  align-items: start;
  margin: 10px 0 0;
  color: var(--stock-muted);
  font-size: 10px;
  line-height: 1.45;
}
.stock-opportunity-reasoning > p svg { width: 15px; height: 15px; margin-top: 1px; color: var(--stock-dim); }
.stock-opportunity-reasoning > p strong { color: var(--stock-text); }
.stock-opportunity-providers > div { display: grid; }
.stock-opportunity-providers article {
  min-height: 63px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 9px 0;
  border-bottom: 1px solid var(--stock-line);
}
.stock-opportunity-providers article:last-child { border-bottom: 0; }
.stock-opportunity-provider-copy { min-width: 0; }
.stock-opportunity-provider-copy strong,
.stock-opportunity-provider-copy small { display: block; }
.stock-opportunity-provider-copy strong { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.stock-opportunity-provider-copy small { margin-top: 4px; color: var(--stock-muted); font-size: 9.5px; }
.stock-opportunity-provider-copy i {
  display: block;
  width: 100%;
  height: 3px;
  margin-top: 7px;
  overflow: hidden;
  border-radius: 2px;
  background: var(--stock-surface-2);
}
.stock-opportunity-provider-copy i span { display: block; height: 100%; background: var(--stock-chart-slate); }
.stock-opportunity-providers article > b {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--stock-text);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.stock-opportunity-providers article > b svg { width: 13px; height: 13px; }
.stock-opportunity-providers article > b.is-best { color: var(--stock-success); }
.stock-opportunity-trace p { margin: 0; color: var(--stock-muted); font-size: 10px; line-height: 1.5; }
.stock-evidence-button { width: 100%; min-height: 52px; display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 8px; align-items: center; padding: 8px 0; border: 0; border-bottom: 1px solid var(--stock-line); background: transparent; color: inherit; text-align: left; }
.stock-evidence-button strong { display: block; font-size: 11.5px; }
.stock-evidence-button span { display: block; margin-top: 3px; color: var(--stock-muted); font-size: 10px; }

.stock-product-summary { padding: 14px 0 4px; border-bottom: 1px solid var(--stock-line); }
.stock-product-price { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: end; padding-bottom: 13px; }
.stock-product-price span { display: block; color: var(--stock-muted); font-size: 10px; }
.stock-product-price strong { display: block; margin-top: 3px; font-size: 25px; line-height: 1; letter-spacing: -.3px; }
.stock-product-price em { color: var(--stock-muted); font-size: 10px; font-style: normal; text-align: right; }
.stock-product-range { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--stock-line); }
.stock-product-range div { min-width: 0; padding: 10px 8px 9px 0; }
.stock-product-range div + div { padding-left: 10px; border-left: 1px solid var(--stock-line); }
.stock-product-range span { display: block; color: var(--stock-dim); font-size: 9.5px; }
.stock-product-range strong { display: block; margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.stock-detail-tabs { display: flex; border-bottom: 1px solid var(--stock-line); }
.stock-detail-tabs button { min-height: 42px; padding: 0 14px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--stock-muted); font: inherit; font-size: 11px; font-weight: 650; }
.stock-detail-tabs button.active { border-color: var(--stock-gold); color: var(--stock-text); }
.stock-product-chart { height: 220px; padding-inline: 0; }
.stock-product-purchases[hidden],
.stock-product-chart-wrap[hidden] { display: none; }
.stock-sophia-section summary { min-height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 10px; list-style: none; cursor: pointer; font-size: 12px; font-weight: 700; }
.stock-sophia-section summary::-webkit-details-marker { display: none; }
.stock-sophia-section summary::after { content: '+'; color: var(--stock-gold-strong); font-size: 18px; font-weight: 400; }
.stock-sophia-section[open] summary::after { content: '−'; }
.stock-sophia-body { padding: 0 0 15px; color: var(--stock-muted); font-size: 11.5px; line-height: 1.55; }
.stock-sophia-body section + section { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--stock-line); }
.stock-sophia-body h5 { margin: 0 0 5px; color: var(--stock-text); font-size: 11.5px; }
.stock-sophia-body p { margin: 0; white-space: pre-wrap; }
.stock-drilldown-lead { padding: 14px 0 12px; border-bottom: 1px solid var(--stock-line); }
.stock-drilldown-lead strong { display: block; font-size: 22px; font-variant-numeric: tabular-nums; }
.stock-drilldown-lead span { display: block; margin-top: 5px; color: var(--stock-muted); font-size: 11px; }
.stock-breakdown-bar { display: flex; height: 7px; margin-top: 10px; overflow: hidden; border-radius: 2px; background: var(--stock-surface-2); }
.stock-breakdown-bar i { display: block; height: 100%; background: var(--breakdown-color); }

.stock-choice-list { display: grid; gap: 7px; padding: 12px 0; }
.stock-choice-list button { min-height: 48px; padding: 0 12px; border: 1px solid var(--stock-line-strong); border-radius: 8px; background: var(--stock-surface); color: var(--stock-text); font: inherit; font-size: 12px; text-align: left; }
.stock-choice-list button.selected { border-color: var(--stock-gold); color: var(--stock-gold-strong); }

.stock-import-summary { padding: 12px 0; }
.stock-import-summary dl { margin: 0; }
.stock-import-summary div { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--stock-line); }
.stock-import-summary dt { color: var(--stock-muted); font-size: 11px; }
.stock-import-summary dd { margin: 0; font-size: 11px; font-weight: 700; text-align: right; overflow-wrap: anywhere; }

.mod-estoque {
  background: #1a2333;
  color: #f2eadc;
}
.mod-estoque .mod-card-icon { background: #d6ae73; color: #1a202b; border-color: rgba(255,255,255,.18); }
.mod-estoque::before { content: ''; position: absolute; right: -20px; bottom: -30px; width: 110px; height: 110px; border: 1px solid rgba(214,174,115,.18); transform: rotate(32deg); }

html[data-theme="light"] #s-estoque,
html[data-theme="light"] .stock-sheet-overlay {
  --stock-bg: #f4f0e8;
  --stock-surface: #faf7f1;
  --stock-surface-2: #eee8dc;
  --stock-line: rgba(38, 47, 63, .12);
  --stock-line-strong: rgba(38, 47, 63, .2);
  --stock-text: #202a3b;
  --stock-muted: #5f6877;
  --stock-dim: #7d8490;
  --stock-gold: #af7d31;
  --stock-gold-strong: #8e601e;
  --stock-success: #397d5a;
  --stock-warning: #946916;
  --stock-danger: #a34f4f;
  background: var(--stock-bg) !important;
}
html[data-theme="light"] .stock-mobile-header { background: rgba(244,240,232,.97); }
html[data-theme="light"] .stock-date { color-scheme: light; }
html[data-theme="light"] .stock-skeleton span { background: #e9e3d8; }
html[data-theme="light"] .stock-sheet-overlay { background: rgba(29,34,43,.52); }
html[data-theme="light"] .stock-sheet { background: #f4f0e8; }
html[data-theme="light"] .stock-sheet-header,
html[data-theme="light"] .stock-sheet-footer { background: #faf7f1; }
html[data-theme="light"] .stock-sheet-scroll { background: #f4f0e8; }
html[data-theme="light"] .mod-estoque { background: #ded2bd; }
html[data-theme="light"] .mod-estoque .mod-card-name { color: #252d3b; }
html[data-theme="light"] .mod-estoque .mod-card-stat,
html[data-theme="light"] .mod-estoque .mod-card-cta { color: rgba(37,45,59,.66); }

@media (min-width: 680px) {
  .stock-mobile-body { width: min(100%, 920px); margin-inline: auto; padding-inline: 14px; }
  .stock-mobile-nav { justify-content: center; }
  .stock-mobile-nav button { min-width: 112px; }
  .stock-filter-grid { grid-template-columns: repeat(3, 1fr); }
  .stock-filter-grid .wide { grid-column: span 2; }
  .stock-chart-host { height: 320px; }
}

@media (max-width: 350px) {
  .stock-mobile-nav button { min-width: 82px; padding-inline: 8px; font-size: 10px; }
  .stock-kpi { min-width: 116px; flex-basis: 116px; }
  .stock-detail-kpis { grid-template-columns: 1fr 1fr; }
  .stock-product-price strong { font-size: 22px; }
  .stock-product-range strong { font-size: 11px; }
  .stock-opportunity-command { align-items: stretch; flex-direction: column; }
  .stock-opportunity-command .stock-button { width: 100%; }
}

@media (orientation: landscape) and (max-height: 520px) {
  .stock-sheet-overlay { padding-top: 0; }
  .stock-sheet[data-size="full"] { height: 100dvh; max-height: 100dvh; border-radius: 0; }
  .stock-sheet[data-size="regular"] { max-height: 94dvh; }
  .stock-product-chart { height: 190px; }
}

html.stock-sheet-open,
html.stock-sheet-open body { overflow: hidden !important; }

@media (prefers-reduced-motion: reduce) {
  .stock-mobile-root.is-loading .stock-sync-line::after,
  .stock-skeleton span,
  .stock-mobile-refresh[aria-busy="true"] svg { animation: none; }
}

@keyframes stock-spin { to { transform: rotate(360deg); } }
@keyframes stock-progress { 0% { transform: translateX(-120%); } 65%, 100% { transform: translateX(330%); } }
@keyframes stock-pulse { from { opacity: .5; } to { opacity: 1; } }
