/* Merchant dashboard Overview: Figma file MqxpTVwkhcoRRx0k0zDBB4, page "Overview", frame 63:2178 (1440 wide).
   The shell (sidebar, top bar) is shared with every section; the rules below apply to it only while the
   Overview is open. The design has no tablet or phone frame: breakpoints below 1100px keep the same cards
   and reflow them in one or two columns. */
:root {
  --ov-bg: #ffffff;
  --ov-card: #ffffff;
  --ov-border: #d1d5db;
  --ov-line: #e5e5e5;
  --ov-line-soft: #ededed;
  --ov-ink: #111110;
  --ov-ink-strong: #1a1a1a;
  --ov-body: #444440;
  --ov-muted: #888884;
  --ov-subtle: #6b7280;
  --ov-green: #16a34a;
  --ov-red: #dc2626;
  --ov-purple: #7c3aed;
  --ov-pill-green-bg: #dcfce7;
  --ov-pill-green-ink: #166534;
  --ov-pill-red-bg: #fee2e2;
  --ov-pill-red-ink: #991b1b;
  --ov-pill-yellow-bg: #fef9c3;
  --ov-pill-yellow-ink: #854d0e;
  --ov-pill-grey-bg: #f4f4f2;
  --ov-pill-grey-ink: #444440;
  --ov-live-bg: #eff6ff;
  --ov-live-ink: #1e40af;
  --ov-bar: #e4e4e2;
  --ov-font: Inter, "Segoe UI", Arial, sans-serif;
}

/* Shell for the sections built from the Figma file (body[data-figma-shell], set in app.js renderSection: the
   Overview with its Catalog health detail, and Catalog Intelligence): 208px dark sidebar, white top bar with the
   title and a divider. */
body[data-figma-shell] { font-family: var(--ov-font); background: var(--ov-bg); }
body[data-figma-shell] .workspace-shell { grid-template-columns: 208px minmax(0, 1fr); min-height: 100vh; }
body[data-figma-shell] .sidebar { position: sticky; top: 0; height: 100vh; overflow: auto; padding: 16px 0 18px; background: #111110; color: #fff; display: flex; flex-direction: column; }
body[data-figma-shell] .brand-panel { min-height: 64px; padding: 0 16px 16px; gap: 11px; border-bottom: 1px solid rgba(255, 255, 255, .1); }
body[data-figma-shell] .brand-mark { width: 48px; height: 48px; flex: none; overflow: hidden; border: 0; border-radius: 10px; background: #fff; }
body[data-figma-shell] .brand-mark img { display: block; width: 100%; height: 100%; object-fit: cover; }
body[data-figma-shell] .sidebar h1 { margin: 0; font: 600 16px/normal var(--ov-font); letter-spacing: -.2px; white-space: nowrap; }
body[data-figma-shell] .sidebar-label,
body[data-figma-shell] .sidebar-copy,
body[data-figma-shell] .sidebar-store,
body[data-figma-shell] .sidebar-attention,
body[data-figma-shell] .sidebar-status { display: none; }
body[data-figma-shell] .nav-group-label { margin: 9px 10px 2px; padding: 0; color: rgba(248, 247, 245, .4); font: 600 10px/normal var(--ov-font); letter-spacing: .8px; text-transform: uppercase; }
body[data-figma-shell] .nav-list { display: flex; flex-direction: column; gap: 0; padding: 0; }
body[data-figma-shell] .nav-button { display: block; width: 100%; height: 48px; padding: 0 10px; border: 0; border-left: 2px solid transparent; border-radius: 0; background: #111110; color: #a1a1aa; text-align: left; font: 500 14px/normal var(--ov-font); white-space: nowrap; transition: background .15s ease, color .15s ease; }
body[data-figma-shell] .nav-button:before { display: none; }
body[data-figma-shell] .nav-button:hover { transform: none; background: #1c1c1e; color: #fff; }
body[data-figma-shell] .nav-button.active { border-left-color: #fff; background: #242427; color: #fff; box-shadow: none; }
body[data-figma-shell] .workspace-main { display: block; min-width: 0; background: var(--ov-bg); }
body[data-figma-shell] .topbar { width: auto; min-height: 114px; margin: 0; padding: 22px 24px 17px; display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--ov-line); background: #fff; }
body[data-figma-shell] .topbar .eyebrow { display: none; }
body[data-figma-shell] .topbar h2 { margin: 0 0 5px; color: #111; font: 500 16px/1.25 var(--ov-font); }
body[data-figma-shell] .topbar-subtitle { display: block; margin: 0; color: var(--ov-subtle); font: 400 14px/1.4 var(--ov-font); }
body[data-figma-shell] .topbar-actions { display: none; }
body[data-figma-shell] .main-content { display: block; width: auto; max-width: none; margin: 0; padding: 17px 24px 32px; min-width: 0; }

.ov { width: 100%; max-width: 1392px; color: var(--ov-ink); }
.ov * { box-sizing: border-box; }

/* Metric cards: four across, 88px tall. */
.ov-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin: 0 0 14px; }
.ov-metric { position: relative; min-height: 88px; margin: 0; padding: 11px 20px 10px; border: .5px solid var(--ov-border); border-radius: 9px; background: var(--ov-card); box-shadow: none; }
.ov-metric-label { display: flex; align-items: center; gap: 6px; margin: 0; color: var(--ov-subtle); font: 700 10px/normal var(--ov-font); text-transform: uppercase; }
.ov-metric-value { margin: 4px 0 2px; color: #111; font: 500 30px/normal var(--ov-font); letter-spacing: -.3px; white-space: nowrap; }
.ov-metric-note { margin: 0; color: var(--ov-muted); font: 500 10px/normal var(--ov-font); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ov-metric-note.is-positive { color: var(--ov-green); }
.ov-metric-note.is-negative { color: var(--ov-red); }

/* Info tooltip (frame 63:2410): opens on hover and keyboard focus. */
.ov-tip { position: relative; display: inline-flex; }
.ov-tip-button { display: inline-flex; width: 15px; height: 15px; padding: 0; margin: -2px 0; align-items: center; justify-content: center; border: 0; border-radius: 50%; background: none; color: inherit; cursor: help; }
.ov-tip-button img { display: block; width: 11px; height: 11px; }
.ov-tip-button:focus-visible { outline: 2px solid #111; outline-offset: 1px; }
.ov-tip-card { position: absolute; z-index: 20; top: calc(100% + 8px); left: -14px; width: 378px; max-width: calc(100vw - 48px); display: none; flex-direction: column; gap: 6px; padding: 12px 14px; border: 1px solid #d1d4d9; border-radius: 8px; background: #fbfbfb; box-shadow: 0 4px 16px rgba(0, 0, 0, .1); text-transform: none; text-align: left; }
.ov-tip-card strong { padding-bottom: 6px; border-bottom: 1px solid #e0e3e8; color: #212429; font: 600 11px/14px var(--ov-font); }
.ov-tip-card span { color: #6b7380; font: 400 11px/16px var(--ov-font); }
.ov-tip:hover .ov-tip-card, .ov-tip:focus-within .ov-tip-card { display: flex; }

/* Panels. */
.ov-row { display: grid; gap: 20px; align-items: stretch; }
.ov-row-top { grid-template-columns: minmax(0, 635fr) minmax(0, 488fr); margin-bottom: 16px; }
.ov-row-bottom { grid-template-columns: minmax(0, 340fr) minmax(0, 360fr) minmax(0, 412fr); }
.ov-panel { display: flex; flex-direction: column; min-width: 0; min-height: 364px; margin: 0; padding: 16px 24px 12px; border: .5px solid var(--ov-border); border-radius: 12px; background: var(--ov-card); box-shadow: none; }
.ov-panel > header { display: flex; min-height: 23px; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 10px; padding: 0; border: 0; }
.ov-visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ov-panel h3 { margin: 0; color: var(--ov-ink-strong); font: 700 10px/normal var(--ov-font); text-transform: uppercase; }
.ov-header-tools { display: flex; align-items: center; gap: 8px; }
.ov .overview-text-link { padding: 0; border: 0; background: none; color: var(--ov-muted); font: 400 11px/normal var(--ov-font); text-decoration: none; white-space: nowrap; cursor: pointer; }
.ov .overview-text-link:hover, .ov .overview-text-link:focus-visible { color: #111; text-decoration: underline; }
.ov-note { margin: 8px 0 0; color: var(--ov-muted); font: 400 10px/1.45 var(--ov-font); }
.ov-muted { color: var(--ov-muted); }
.ov-empty, .ov-chart-empty { display: flex; flex: 1; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 120px; padding: 16px; text-align: center; }
.ov-empty strong, .ov-chart-empty strong { color: var(--ov-ink); font: 500 12px/1.4 var(--ov-font); }
.ov-empty span, .ov-chart-empty span { max-width: 300px; color: var(--ov-muted); font: 400 11px/1.45 var(--ov-font); }

/* Pills. */
.ov-pill { display: inline-flex; height: 22px; align-items: center; justify-content: center; padding: 0 11px; border-radius: 18px; font: 700 10px/normal var(--ov-font); white-space: nowrap; }
.ov-pill-green { background: var(--ov-pill-green-bg); color: var(--ov-pill-green-ink); }
.ov-pill-red { background: var(--ov-pill-red-bg); color: var(--ov-pill-red-ink); }
.ov-pill-yellow { background: var(--ov-pill-yellow-bg); color: var(--ov-pill-yellow-ink); }
.ov-pill-grey { background: var(--ov-pill-grey-bg); color: var(--ov-pill-grey-ink); }

/* Dropdown menus (frames 104:1731 and 104:1714). */
.ov-menu { position: relative; }
.ov-menu-button { display: inline-flex; align-items: center; gap: 4px; padding: 0; border: 0; background: none; color: var(--ov-muted); font: 400 11px/normal var(--ov-font); white-space: nowrap; cursor: pointer; }
.ov-menu-button:hover, .ov-menu-button:focus-visible { color: #111; }
.ov-menu-button img { display: block; width: 16px; height: 16px; }
.ov-menu-list { position: absolute; z-index: 15; top: calc(100% + 6px); right: 0; min-width: 119px; margin: 0; padding: 0; list-style: none; border: .5px solid var(--ov-border); border-radius: 8px; background: #fff; box-shadow: 0 8px 24px -8px rgba(0, 0, 0, .07); overflow: hidden; }
.ov-menu-list button { display: block; width: 100%; padding: 10px 12px; border: 0; border-bottom: 1px solid #eaeaea; background: #fff; color: var(--ov-ink); font: 500 12px/normal var(--ov-font); text-align: center; white-space: nowrap; cursor: pointer; }
.ov-menu-list li:last-child button { border-bottom: 0; }
.ov-menu-list button:hover, .ov-menu-list button:focus-visible, .ov-menu-list button[aria-checked=true] { background: #fbfbfb; outline: none; }

/* Top performing items. */
/* The table fits its card at every width (the card is narrow inside Shopify Admin): fixed column shares, long
   product names end in "…", headings may wrap onto a second line rather than be cut off, and a narrow card moves
   the collection under the product name. */
.ov-top-items { container-type: inline-size; }
.ov-table-wrap { width: 100%; overflow-x: auto; }
.ov-top-items table { width: 100%; table-layout: fixed; border-collapse: collapse; text-align: left; }
.ov-top-items th { height: 34px; padding: 4px 6px; border-top: .5px solid var(--ov-line); border-bottom: .5px solid var(--ov-line); color: var(--ov-muted); font: 700 9px/1.2 var(--ov-font); text-transform: uppercase; white-space: normal; overflow-wrap: normal; vertical-align: middle; }
.ov-top-items th:nth-child(1) { width: 35%; }
.ov-top-items th:nth-child(2) { width: 18%; }
.ov-top-items th:nth-child(3) { width: 15%; }
.ov-top-items th:nth-child(4) { width: 15%; }
.ov-top-items th:nth-child(5) { width: 17%; }
.ov-top-items th.ov-number, .ov-top-items td.ov-number { padding-left: 2px; padding-right: 4px; }
.ov-top-items td.ov-number .ov-pill { padding: 0 7px; }
.ov-top-items td { height: 45px; padding: 0 6px; border-bottom: .5px solid var(--ov-line); vertical-align: middle; overflow: hidden; }
.ov-top-items .ov-collection { white-space: nowrap; text-overflow: ellipsis; }
.ov-product-collection { display: none; }
@container (max-width: 480px) {
  .ov-top-items th:nth-child(2), .ov-top-items td.ov-collection { display: none; }
  .ov-top-items th:nth-child(1) { width: 40%; }
  .ov-top-items th:nth-child(3) { width: 20%; }
  .ov-top-items th:nth-child(4) { width: 19%; }
  .ov-top-items th:nth-child(5) { width: 21%; }
  .ov-top-items td.ov-number .ov-pill { padding: 0 5px; }
  .ov-product-sku { display: none; }  /* the narrow card shows the collection on the second line instead */
  .ov-product-collection { display: inline; }
  .ov-product small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
}
.ov-top-items th:first-child, .ov-top-items td:first-child { padding-left: 0; }
.ov-top-items .ov-number { text-align: right; color: var(--ov-ink); font: 400 12px/normal var(--ov-font); }
.ov-top-items th.ov-number { font: 700 9px/normal var(--ov-font); }
.ov-collection { color: var(--ov-body); font: 400 11px/normal var(--ov-font); }
.ov-product { position: relative; min-width: 0; padding-left: 16px; }
.ov-product strong { display: flex; align-items: center; gap: 6px; min-width: 0; color: var(--ov-ink); font: 400 12px/normal var(--ov-font); white-space: nowrap; }
.ov-product-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.ov-product small { display: block; margin-top: 2px; color: var(--ov-muted); font: 400 10px/normal var(--ov-font); }
.ov-top-items tr.is-first .ov-product:before { content: ""; position: absolute; left: 0; top: 50%; width: 3px; height: 34px; border-radius: 1px; background: #1e1e1e; transform: translateY(-50%); }
.ov-arrow { font: 600 11px/normal var(--ov-font); }
.ov-arrow.is-up { color: var(--ov-green); }
.ov-arrow.is-down { color: var(--ov-red); }
.ov-assisted { color: var(--ov-purple); font: 700 10px/normal var(--ov-font); }
.ov-table-empty { height: 180px !important; text-align: center; }
.ov-table-empty strong { display: block; color: var(--ov-ink); font: 500 12px/1.4 var(--ov-font); }
.ov-table-empty span { display: block; margin-top: 4px; color: var(--ov-muted); font: 400 11px/1.45 var(--ov-font); }

/* Activity feed. */
.ov-live { display: inline-flex; height: 23px; align-items: center; padding: 0 12px; border-radius: 12px; background: var(--ov-pill-grey-bg); color: var(--ov-pill-grey-ink); font: 700 9px/normal var(--ov-font); white-space: nowrap; }
.ov-live.is-live { background: var(--ov-live-bg); color: var(--ov-live-ink); }
.ov-activity { flex: 1; margin: 0; padding: 0 8px 0 0; list-style: none; border-top: .5px solid var(--ov-line); overflow-y: auto; max-height: 300px; scrollbar-width: thin; scrollbar-color: #d9d9d9 transparent; }
.ov-activity li { display: grid; grid-template-columns: 8px minmax(0, 1fr); gap: 10px; align-items: start; padding: 11px 0 10px 8px; border-bottom: .5px solid var(--ov-line); }
.ov-activity li > i { width: 8px; height: 8px; margin-top: 4px; border-radius: 50%; background: var(--ov-muted); }
.ov-activity strong { display: block; color: var(--ov-ink); font: 400 12px/normal var(--ov-font); }
.ov-activity small { display: block; margin-top: 3px; color: var(--ov-muted); font: 400 10px/normal var(--ov-font); }

/* Catalog health. */
.ov-health { margin: 0; border-top: .5px solid var(--ov-line); }
.ov-health-row { display: flex; min-height: 45px; align-items: center; justify-content: space-between; gap: 12px; border-bottom: .5px solid var(--ov-line); }
.ov-health-row dt { color: var(--ov-body); font: 400 12px/normal var(--ov-font); }
.ov-health-row dd { margin: 0; color: var(--ov-ink); font: 400 12px/normal var(--ov-font); text-align: right; }
.ov-health-row dd strong { font-weight: 400; }
.ov-health-row dd .ov-muted { font-size: 11px; }

/* AI readiness. */
.ov-readiness { border-top: .5px solid var(--ov-line); padding-top: 12px; }
.ov-readiness-row { margin: 0 0 11px; }
.ov-readiness-row p { display: flex; justify-content: space-between; gap: 8px; margin: 0 0 5px; color: var(--ov-body); font: 400 11px/normal var(--ov-font); }
.ov-readiness-row strong { color: var(--ov-ink); font: 700 11px/normal var(--ov-font); }
.ov-readiness-row.is-untracked strong { color: var(--ov-muted); font-weight: 500; }
.ov-bar-track { width: 100%; height: 5px; border-radius: 2.5px; background: rgba(17, 17, 16, .08); overflow: hidden; }
.ov-bar-track i { display: block; height: 100%; border-radius: 2.5px; background: var(--ov-ink); }

/* Session trend. */
.ov-trend-panel { padding-bottom: 14px; }
.ov-chart { display: grid; flex: 1; grid-template-columns: 24px minmax(0, 1fr); gap: 8px; min-height: 236px; padding: 30px 0 0; border-top: .5px solid var(--ov-line); }
.ov-chart-axis { display: flex; flex-direction: column; justify-content: space-between; height: 180px; padding-bottom: 0; color: var(--ov-muted); font: 400 9px/1 var(--ov-font); text-align: right; }
.ov-chart-plot { position: relative; height: 206px; }
.ov-chart-grid { position: absolute; inset: 0 0 26px; display: flex; flex-direction: column; justify-content: space-between; pointer-events: none; }
.ov-chart-grid i { display: block; height: 0; border-top: .5px solid var(--ov-line); }
.ov-chart-grid i:last-child { border-top-color: #cfcfcf; }
.ov-chart-bars { position: absolute; inset: 0; display: flex; align-items: flex-end; justify-content: space-around; gap: 6px; padding: 0 6px; }
.ov-bar-slot { position: relative; display: flex; flex: 1 1 0; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; max-width: 46px; }
.ov-bar { position: relative; width: 32px; max-width: 100%; margin-bottom: 26px; border-radius: 3px; background: var(--ov-bar); transition: height .2s ease; }
.ov-bar-slot.is-active .ov-bar { background: var(--ov-ink); }
.ov-bar-label { position: absolute; bottom: 4px; left: 50%; color: var(--ov-muted); font: 400 9px/1 var(--ov-font); white-space: nowrap; transform: translateX(-50%); }
.ov-bar-slot.is-active .ov-bar-label { color: var(--ov-ink); font-weight: 600; }
.ov-bar-value { position: absolute; bottom: calc(100% + 6px); left: 50%; display: inline-flex; height: 22px; align-items: center; padding: 0 11px; border-radius: 18px; background: var(--ov-pill-grey-bg); color: var(--ov-ink-strong); font: 700 10px/normal var(--ov-font); white-space: nowrap; transform: translateX(-50%); }
.ov-chart.is-dense .ov-bar { width: 100%; }
.ov-chart.is-dense .ov-bar-slot:nth-child(even) .ov-bar-label { display: none; }
.ov-trend-totals { display: grid; grid-template-columns: 1fr 1fr; align-items: center; margin-top: 12px; padding-top: 10px; border-top: .5px solid var(--ov-line); text-align: center; }
.ov-trend-totals > div:first-child { border-right: .5px solid var(--ov-line); }
.ov-trend-totals strong { display: block; color: var(--ov-ink); font: 500 20px/1.4 var(--ov-font); }
.ov-trend-totals span { display: block; margin-top: 2px; color: var(--ov-muted); font: 400 9px/1 var(--ov-font); }

/* Narrower screens: the design has no tablet or phone frame, so the same cards reflow. */
@media (max-width: 1180px) {
  .ov-row-top { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 14px; }
  .ov-row-bottom { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .ov-row-bottom .ov-trend-panel { grid-column: 1 / -1; }
  .ov-panel { padding: 14px 16px 16px; }
  .ov-metrics { gap: 10px; }
  .ov-metric { padding: 11px 14px 10px; }
}
@media (max-width: 860px) {
  body[data-figma-shell] .workspace-shell { grid-template-columns: 1fr; }
  body[data-figma-shell] .sidebar { position: relative; height: auto; padding-bottom: 8px; }
  body[data-figma-shell] .brand-panel { min-height: 60px; }
  body[data-figma-shell] .nav-list { flex-direction: row; overflow-x: auto; padding: 0 8px 4px; }
  body[data-figma-shell] .nav-group-label { display: none; }
  body[data-figma-shell] .nav-button { width: auto; height: 40px; flex: none; padding: 0 10px; border-left: 0; border-bottom: 2px solid transparent; font-size: 12px; }
  body[data-figma-shell] .nav-button.active { border-bottom-color: #fff; }
  body[data-figma-shell] .topbar { min-height: 0; padding: 16px; }
  body[data-figma-shell] .main-content { padding: 14px 16px 28px; }
  .ov-row-top, .ov-row-bottom { grid-template-columns: 1fr; }
  .ov-panel { min-height: 0; }
  .ov-activity { max-height: 260px; }
}
@media (max-width: 600px) {
  .ov-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .ov-metric { min-height: 80px; padding: 10px 12px; }
  .ov-metric-value { font-size: 26px; }
  .ov-metric-note { white-space: normal; }
  .ov-tip-card { left: auto; right: -40px; }
  .ov-chart { grid-template-columns: 20px minmax(0, 1fr); }
  .ov-bar { width: 22px; }
}
@media (max-width: 400px) {
  .ov-metrics { grid-template-columns: 1fr; }
}
