/* redesign-dashboard.css — the reseller's own dashboard.

   Track A (Zyentora-branded): this is Zyentora's own surface, not a
   white-labeled store, so it uses the ivory/bronze system from
   redesign-tokens.css rather than the per-store themes.

   Requires redesign-tokens.css and redesign-components.css.

   ---------------------------------------------------------------------------
   WHAT THIS FILE MUST NOT BREAK

   reseller-dashboard.js is not touched by this redesign. It binds to 63
   element ids and generates markup carrying ~60 class names, and it owns the
   money-adjacent paths on this page:

     - the payout flow, which reads reseller_available_balance() and calls
       request_payout(); the balance is never recomputed in JS
     - the per-product selling_price form, whose value create-razorpay-order
       later looks up and re-checks against the live base price
     - the store URL, built from SITE_ORIGIN and never from window.location

   Every selector below therefore styles markup that already exists. Nothing
   here renames a class the JS looks for, and the HTML keeps every id.
   --------------------------------------------------------------------------- */

/* ---------------- Page shell ---------------- */
.loading-gate {
  padding: var(--space-xxl) var(--container-margin);
  text-align: center;
  color: var(--color-text-secondary);
}

#dashboard-root[hidden],
#unlinked-state[hidden] { display: none; }

/* ---------------- Header ---------------- */
.dashboard-header-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-xs);
}

/* Compact square icon buttons on a phone, labelled buttons from tablet up.
   They were stacking vertically because the shared button rule sets
   width:100% below 640px -- three full-width buttons in the header pushed the
   nav to three rows. Icon-only keeps the header one row tall without losing
   the label for anyone using a screen reader (each carries aria-label). */
.dashboard-header-btn,
.dashboard-logout-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  width: 44px;
  min-width: 44px;
  height: 44px;
  min-height: 44px;
  padding: 0;
  flex: none;
  font-size: var(--type-small);
}
.dashboard-header-btn i,
.dashboard-logout-btn i { font-size: 20px; line-height: 1; }

/* Hidden on phones only -- the aria-label carries the name either way. */
.dash-btn-label { display: none; }

@media (min-width: 640px) {
  .dashboard-header-btn,
  .dashboard-logout-btn {
    width: auto;
    min-width: 0;
    padding-inline: var(--space-s);
  }
  .dash-btn-label { display: inline; }
}

/* Unread count on the Messages button. */
.header-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: var(--radius-pill);
  background: var(--color-accent-dark);
  color: #FFFFFF;
  padding: 0 5px;
  border: 2px solid var(--color-background);
  font-size: 11px;
  font-weight: var(--weight-semibold);
  line-height: 1;
}

/* ---------------- Hero ---------------- */
.dashboard-hero {
  padding-block: var(--space-l) var(--space-m);
}
.dashboard-hero h1 {
  margin-bottom: var(--space-xs);
  font-size: var(--type-section);
}
#store-link-line {
  margin: 0;
  font-size: var(--type-body);
  color: var(--color-text-secondary);
}
#store-link-line a {
  color: var(--color-text-primary);
  font-weight: var(--weight-medium);
  text-decoration: none;
  border-bottom: 1px solid var(--color-border);
}
#store-link-line a:hover { border-bottom-color: var(--color-accent-dark); }

/* ---------------- Tabs ---------------- */
/* Same markup the admin dashboard uses (.admin-tabs / .admin-panel), restyled
   here only — components.css keeps its own version for the admin side. */
.dashboard-tabs.admin-tabs {
  display: flex;
  gap: var(--space-xs);
  margin-bottom: var(--space-l);
  padding-bottom: 2px;
  border-bottom: 1px solid var(--color-border);
  overflow-x: auto;
  scrollbar-width: none;
}
.dashboard-tabs.admin-tabs::-webkit-scrollbar { display: none; }

.dashboard-tabs .admin-tab {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 48px;
  padding: 0 var(--space-s);
  margin-bottom: -3px;
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  color: var(--color-text-secondary);
  font-family: var(--font-body);
  font-size: var(--type-body);
  font-weight: var(--weight-medium);
  white-space: nowrap;
  cursor: pointer;
  transition: color var(--motion-base) var(--ease-out),
              border-color var(--motion-base) var(--ease-out);
}
.dashboard-tabs .admin-tab:hover { color: var(--color-text-primary); }
.dashboard-tabs .admin-tab.active {
  color: var(--color-text-primary);
  border-bottom-color: var(--color-accent-dark);
  font-weight: var(--weight-semibold);
}
.admin-panel[hidden] { display: none; }

/* ---------------- Stat cards ---------------- */
.dashboard-stats {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-s);
  margin-bottom: var(--space-l);
}
.stat-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-1);
  padding: var(--space-m);
}
.stat-label {
  margin: 0 0 var(--space-xs);
  font-size: var(--type-label);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--color-text-secondary);
}
.stat-value {
  margin: 0;
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: var(--weight-semibold);
  line-height: 1.05;
  letter-spacing: var(--tracking-heading);
  color: var(--color-text-primary);
  font-variant-numeric: tabular-nums;
}
/* Earnings are the number a reseller opens this page for. */
.stat-value-emerald { color: var(--color-success-dark); }

/* ---------------- Sections ---------------- */
.dashboard-name-section,
.dashboard-bio-section,
.dashboard-theme-section,
.dashboard-products-section,
.dashboard-marketing-section,
.dashboard-analytics-section,
.dashboard-family-section {
  margin-bottom: var(--space-l);
  padding: var(--space-m);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
}
.dashboard-name-section h3,
.dashboard-bio-section h3,
.dashboard-theme-section h3,
.dashboard-products-section h3,
.dashboard-marketing-section h3,
.dashboard-analytics-section h3 {
  margin: 0 0 var(--space-xs);
  font-size: var(--type-card);
}
.dashboard-name-section p,
.dashboard-bio-section p,
.dashboard-theme-section p,
.dashboard-marketing-section > p,
.dashboard-analytics-section > p {
  font-size: var(--type-body);
  color: var(--color-text-secondary);
}
.dashboard-name-section .btn-secondary,
.dashboard-bio-section .btn-secondary,
.dashboard-theme-section .btn-secondary { margin-top: var(--space-s); }

.store-url-locked {
  margin: var(--space-s) 0 0;
  padding: var(--space-s);
  background: var(--color-background);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-input);
  font-size: var(--type-small);
  color: var(--color-text-secondary);
}
.store-url-locked strong { color: var(--color-text-primary); }

.field-status {
  margin: var(--space-xs) 0 0;
  font-size: var(--type-small);
  color: var(--color-text-secondary);
}
.field-status[hidden] { display: none; }

.dashboard-note {
  margin-bottom: var(--space-l);
  padding: var(--space-m);
  background: var(--color-accent-tint);
  border-radius: var(--radius-card);
  font-size: var(--type-body);
}
/* Normal text flow, not flex. Flexing this paragraph turned the inline
   "Contact Us" link into its own flex item, which broke the sentence apart
   and left the link as a 26px block. The icon is aligned inline instead. */
.dashboard-note p { margin: 0; }
.dashboard-note i {
  color: var(--color-accent-dark);
  font-size: 20px;
  vertical-align: -3px;
  margin-right: 6px;
}
.dashboard-note a { color: var(--color-accent-dark); font-weight: var(--weight-medium); }

/* ---------------- Theme picker ---------------- */
/* Four themes since 2026-08-26 (Premium added). 2x2 on a phone, one row from
   tablet up — a 3-column grid left the fourth swatch stranded on its own row. */
.theme-picker {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-s);
  margin-top: var(--space-s);
}
.theme-swatch {
  padding: var(--space-xs);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  cursor: pointer;
  text-align: left;
  transition: border-color var(--motion-base) var(--ease-out);
}
.theme-swatch:hover { border-color: var(--color-text-primary); }
.theme-swatch[aria-pressed="true"] {
  border-color: var(--color-accent-dark);
  box-shadow: 0 0 0 1px var(--color-accent-dark);
}
.theme-swatch-preview {
  display: block;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-input);
  margin-bottom: var(--space-xs);
  padding: var(--space-xs);
  overflow: hidden;
}
.theme-swatch-bar { display: block; height: 6px; border-radius: 999px; margin-bottom: 6px; }
.theme-swatch-dot { display: block; width: 14px; height: 14px; border-radius: 50%; }
.theme-swatch-label {
  display: block;
  font-size: var(--type-small);
  font-weight: var(--weight-medium);
  color: var(--color-text-primary);
}

/* ---------------- Products tab ---------------- */
.dashboard-products-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-s);
  margin-bottom: var(--space-xs);
}
.dashboard-products-header h3 { margin: 0; }
.dashboard-products-count {
  margin: 0 0 var(--space-m);
  font-size: var(--type-small);
  color: var(--color-text-secondary);
}

/* One row per product the reseller sells. The price inputs here are what
   create-razorpay-order later looks up — styled, never rewired. */
.my-product-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-s);
  padding: var(--space-m) 0;
  border-top: 1px solid var(--color-border);
}
.my-product-row:first-child { border-top: 0; padding-top: 0; }
.my-product-row-name {
  min-width: 0;
  overflow-wrap: anywhere;   /* product names are author-supplied */
  font-size: var(--type-body);
  font-weight: var(--weight-semibold);
  line-height: 1.4;
}
.my-product-row-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: var(--space-s);
}
.my-product-price-field { display: flex; flex-direction: column; gap: 4px; }
.my-product-price-label {
  font-size: var(--type-label);
  font-weight: var(--weight-semibold);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-text-secondary);
}
.my-product-optional { font-weight: var(--weight-regular); text-transform: none; letter-spacing: 0; }
.my-product-price-edit {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding-left: var(--space-s);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-input);
  background: var(--color-surface);
}
.my-product-price-edit:focus-within { border-color: var(--color-text-primary); }
.my-product-currency { color: var(--color-text-secondary); font-size: var(--type-body); }
.my-product-price-input,
.my-product-compare-input {
  width: 104px;
  min-height: 48px;
  padding: 0 var(--space-xs);
  border: 0;
  background: transparent;
  font-size: var(--type-body);
  font-variant-numeric: tabular-nums;
}
.my-product-price-input:focus,
.my-product-compare-input:focus { outline: none; }
.my-product-price-edit--was { border-style: dashed; }

.my-product-margin-hint {
  flex-basis: 100%;
  margin: 0;
  font-size: var(--type-small);
  color: var(--color-text-secondary);
}
.my-product-save-btn,
.my-product-copy-btn,
.my-product-remove-btn { min-height: 48px; width: auto; font-size: var(--type-small); }
/* Fixed width so "Copy link" -> "Copied!" doesn't shift the row. */
.my-product-copy-btn { min-width: 124px; }
.my-product-copy-btn .ph { font-size: 16px; }
.my-product-remove-btn { color: var(--color-error); border-color: var(--color-border); }
.my-product-remove-btn:hover { border-color: var(--color-error); background: rgba(184, 74, 58, 0.06); }

/* ---------------- Add-products picker ---------------- */
.picker-toolbar { display: grid; gap: var(--space-s); margin-bottom: var(--space-m); }

/* The icon sits inside the field. It was only ever a sibling of the input
   with no positioning, so it rendered above the box instead of within it. */
.picker-search { position: relative; }
.picker-search input { width: 100%; padding-left: 48px; }
.picker-search > i {
  position: absolute;
  left: var(--space-s);
  top: 50%;
  transform: translateY(-50%);
  font-size: 20px;
  line-height: 1;
  color: var(--color-text-secondary);
  pointer-events: none;
}
.picker-categories { display: flex; flex-wrap: wrap; gap: var(--space-xs); }
.picker-selected-count {
  font-size: var(--type-small);
  font-weight: var(--weight-medium);
  color: var(--color-text-secondary);
}
.picker-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-s);
  max-height: 52vh;
  overflow-y: auto;
  padding: 2px;
}
.picker-card {
  display: flex;
  flex-direction: column;
  position: relative;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  padding: var(--space-s);
  cursor: pointer;
  transition: border-color var(--motion-base) var(--ease-out);
}
.picker-card:hover { border-color: var(--color-text-primary); }
.picker-card.selected {
  border-color: var(--color-accent-dark);
  box-shadow: 0 0 0 1px var(--color-accent-dark);
}
.picker-card.already-added { opacity: 0.55; cursor: default; }
.picker-already-label {
  display: inline-block;
  margin-top: var(--space-xs);
  font-size: var(--type-label);
  font-weight: var(--weight-semibold);
  color: var(--color-text-secondary);
}
.picker-checkbox {
  position: absolute;
  opacity: 0;
  width: 1px; height: 1px;
}
/* A bare tick box read as decoration, so resellers didn't realise the card
   was selectable. This is now a full-width labelled control that states what
   it does and flips to "Selected" when ticked. */
.picker-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  width: 100%;
  min-height: 44px;
  margin-bottom: var(--space-s);
  padding: 0 var(--space-xs);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-button);
  background: var(--color-background);
  font-size: var(--type-small);
  font-weight: var(--weight-semibold);
  color: var(--color-text-primary);
  cursor: pointer;
  transition: background var(--motion-base) var(--ease-out),
              border-color var(--motion-base) var(--ease-out);
}
.picker-toggle::after { content: "Select"; }
.picker-card.selected .picker-toggle::after { content: "Selected"; }
.picker-card.already-added .picker-toggle::after { content: "Already added"; }
.picker-toggle:hover { border-color: var(--color-text-primary); }
.picker-card.selected .picker-toggle {
  background: var(--color-accent-dark);
  border-color: var(--color-accent-dark);
  color: #FFFFFF;
}
.picker-card.already-added .picker-toggle { cursor: default; opacity: 0.7; }
.picker-toggle-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px; height: 22px;
  flex: none;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  background: var(--color-surface);
  color: transparent;
  font-size: 13px;
}
.picker-card.selected .picker-toggle-box {
  background: #FFFFFF;
  border-color: #FFFFFF;
  color: var(--color-accent-dark);
}
.picker-checkbox:focus-visible + .picker-toggle .picker-toggle-box {
  outline: 2px solid var(--color-text-primary);
  outline-offset: 2px;
}
/* Label and input on one line so rows line up across the grid; the two
   message lines sit underneath and only take space when they have content.
   The previous column layout made every card a different height. */
.picker-price-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 6px var(--space-xs);
  margin-top: var(--space-xs);
}
.picker-price-row > label {
  margin: 0;
  font-size: var(--type-small);
  font-weight: var(--weight-medium);
  white-space: nowrap;
}
.picker-price-input { min-height: 48px; width: 100%; }
.picker-earn, .picker-price-error-text { grid-column: 1 / -1; margin: 0; }
.picker-price-error-text { font-size: var(--type-small); color: var(--color-error); }
.picker-earn { font-size: var(--type-small); color: var(--color-success-dark); font-weight: var(--weight-medium); }
.picker-empty, .picker-footer { padding-top: var(--space-s); }
.picker-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-s);
  border-top: 1px solid var(--color-border);
  margin-top: var(--space-s);
}

/* Product cap warning. Amber tint with dark ink — never amber text, which
   fails contrast outright. */
.cap-notice {
  margin: var(--space-s) 0 0;
  padding: var(--space-s);
  border-radius: var(--radius-input);
  background: rgba(197, 139, 27, 0.12);
  color: var(--color-warning-text);
  font-size: var(--type-small);
  line-height: 1.5;
}
.cap-notice[hidden] { display: none; }

/* ---------------- Payout modal ---------------- */
.payout-rules {
  margin-bottom: var(--space-m);
  padding: var(--space-s);
  background: var(--color-background);
  border-radius: var(--radius-input);
  font-size: var(--type-small);
  line-height: 1.6;
}
.payout-rules p { margin: 0 0 var(--space-xs); display: flex; gap: 6px; align-items: center; }
.payout-rules i { color: var(--color-accent-dark); font-size: 18px; }
.payout-rules ul { margin: 0; padding-left: var(--space-m); color: var(--color-text-secondary); }
.payout-rules li + li { margin-top: 4px; }

.payout-balance-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-s);
  margin-bottom: var(--space-m);
}
.payout-balance-item {
  padding: var(--space-s);
  background: var(--color-background);
  border-radius: var(--radius-input);
}
.payout-balance-item-final {
  background: var(--color-surface);
  border: 1px solid var(--color-accent-dark);
}
.payout-balance-value {
  margin: 0;
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: var(--weight-semibold);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.payout-balance-fee { color: var(--color-text-secondary); }

.payout-method-row { margin-bottom: var(--space-s); }
.payout-method-row label,
#payout-upi-fields label,
#payout-bank-fields label {
  display: block;
  margin-bottom: var(--space-xs);
  font-size: var(--type-small);
  font-weight: var(--weight-medium);
}
#payout-upi-fields input,
#payout-bank-fields input { margin-bottom: var(--space-s); }
#payout-upi-fields[hidden],
#payout-bank-fields[hidden],
#payout-request-form[hidden],
#payout-body[hidden],
#payout-pending-notice[hidden],
#payout-blocked-notice[hidden] { display: none; }

/* Payout messages surface inline. Never switch these to showToast() — it
   silently no-ops on this page, and a payout error that disappears is the
   worst failure mode here. */
.payout-success {
  margin: var(--space-s) 0 0;
  padding: var(--space-s);
  border-radius: var(--radius-input);
  background: rgba(47, 125, 75, 0.12);
  color: var(--color-success-dark);
  font-size: var(--type-body);
  font-weight: var(--weight-medium);
}
.payout-success[hidden] { display: none; }

/* ---------------- Messages modal ---------------- */
.modal-wide { max-width: 720px; }
.msg-thread {
  display: flex;
  flex-direction: column;
  gap: var(--space-s);
  max-height: 48vh;
  overflow-y: auto;
  padding: var(--space-xs) 0;
}
.msg-row { display: flex; }
.msg-row.msg-mine { justify-content: flex-end; }
.msg-bubble {
  max-width: 80%;
  padding: var(--space-s);
  border-radius: var(--radius-card);
  background: var(--color-background);
  border: 1px solid var(--color-border);
  font-size: var(--type-body);
  line-height: 1.55;
}
.msg-mine .msg-bubble {
  background: var(--color-text-primary);
  border-color: var(--color-text-primary);
  color: #FFFFFF;
}
.msg-is-broadcast .msg-bubble {
  background: var(--color-accent-tint);
  border-color: var(--color-accent-dark);
}
/* Sits on the accent tint inside broadcast bubbles, where the standard
   secondary grey measured 4.3:1. Darkened to clear AA on every bubble type. */
.msg-sender, .msg-meta {
  font-size: var(--type-label);
  color: #565049;
}
.msg-mine .msg-meta { color: rgba(255, 255, 255, 0.7); }
.msg-kind {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: var(--type-label);
  font-weight: var(--weight-semibold);
  color: var(--color-accent-dark);
}
.msg-body { margin: 4px 0 0; white-space: pre-line; }
.msg-composer { margin-top: var(--space-s); padding-top: var(--space-s); border-top: 1px solid var(--color-border); }
.msg-composer-actions { display: flex; gap: var(--space-xs); margin-top: var(--space-xs); }
.msg-composer-actions .btn-primary,
.msg-composer-actions .btn-secondary { width: auto; min-height: 48px; font-size: var(--type-small); }

/* ---------------- Analytics ---------------- */
.analytics-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-s);
  margin-bottom: var(--space-l);
}
.analytics-card {
  padding: var(--space-m);
  background: var(--color-background);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
}
.analytics-card-hint { margin: 4px 0 0; font-size: var(--type-small); color: var(--color-text-secondary); }

.analytics-chart-card { margin-bottom: var(--space-l); }
.analytics-chart-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-s);
  margin-bottom: var(--space-s);
}
.analytics-legend { display: flex; gap: var(--space-m); font-size: var(--type-small); color: var(--color-text-secondary); }
.analytics-legend-item { display: inline-flex; align-items: center; gap: 6px; }
.analytics-swatch { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.analytics-swatch-visitors { background: var(--color-accent-dark); }
.analytics-swatch-views { background: var(--color-accent-tint); border: 1px solid var(--color-accent); }
.analytics-chart { overflow-x: auto; }
.analytics-chart svg { width: 100%; height: auto; }
.chart-bar-visitors { fill: var(--color-accent-dark); }
.chart-bar-views { fill: var(--color-accent); opacity: 0.35; }
.chart-axis { fill: var(--color-text-secondary); font-size: 11px; }
.chart-grid { stroke: var(--color-border); }
.analytics-footnote { margin: var(--space-s) 0 0; font-size: var(--type-small); color: var(--color-text-secondary); }

.analytics-top-products { display: grid;
  grid-template-columns: minmax(0, 1fr); gap: var(--space-xs); }
.top-product-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--space-s);
  padding: var(--space-xs) 0;
}
.top-product-name { min-width: 0; overflow-wrap: anywhere; font-size: var(--type-body); }
.top-product-bar { grid-column: 1 / -1; height: 8px; border-radius: 999px; background: var(--color-border); overflow: hidden; }
.top-product-fill { display: block; height: 100%; border-radius: 999px; background: var(--color-accent-dark); }
.top-product-count { font-size: var(--type-small); color: var(--color-text-secondary); font-variant-numeric: tabular-nums; }

/* ---------------- Marketing kit ---------------- */
.marketing-product-card {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  margin-bottom: var(--space-s);
  overflow: hidden;
}
.marketing-product-head {
  display: flex;
  align-items: center;
  gap: var(--space-s);
  padding: var(--space-s);
  background: var(--color-background);
}
.marketing-product-thumb {
  flex: none;
  width: 48px;
  aspect-ratio: 3 / 4;
  border-radius: 6px;
  background-size: cover;
  background-position: center top;
  background-color: var(--color-border);
}
.marketing-product-name { min-width: 0; overflow-wrap: anywhere; margin: 0; font-size: var(--type-body); font-weight: var(--weight-semibold); }
.marketing-product-meta { margin: 2px 0 0; font-size: var(--type-small); color: var(--color-text-secondary); }
.marketing-product-body { padding: var(--space-s); display: grid;
  grid-template-columns: minmax(0, 1fr); gap: var(--space-s); }
.marketing-block { border: 1px solid var(--color-border); border-radius: var(--radius-input); padding: var(--space-s); }
.marketing-block-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-s);
  font-size: var(--type-small);
  font-weight: var(--weight-semibold);
}
.marketing-block-text { margin: var(--space-xs) 0 0; font-size: var(--type-body); line-height: 1.6; white-space: pre-line; }
.marketing-block-note { margin: var(--space-xs) 0 0; font-size: var(--type-small); color: var(--color-text-secondary); }
.marketing-points-list { margin: var(--space-xs) 0 0; padding-left: var(--space-m); font-size: var(--type-body); line-height: 1.6; }
.marketing-copy-btn,
.marketing-sample-btn { min-height: 44px; width: auto; font-size: var(--type-small); }
.marketing-caret { transition: transform var(--motion-base) var(--ease-out); }
.marketing-tips { margin-top: var(--space-m); padding: var(--space-s); background: var(--color-background); border-radius: var(--radius-input); }
.marketing-tips-title { margin: 0 0 var(--space-xs); font-size: var(--type-small); font-weight: var(--weight-semibold); }

/* ---------------- Announcements ---------------- */
.family-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-m);
  align-items: center;
}
.family-copy h3 { margin-bottom: var(--space-xs); }
.family-copy p { margin: 0; font-size: var(--type-body); color: var(--color-text-secondary); }
.family-actions { display: flex; flex-wrap: wrap; gap: var(--space-xs); }
.family-btn { width: auto; min-height: 48px; font-size: var(--type-small); }

/* ---------------- Utility ---------------- */
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.link-btn {
  background: none;
  border: 0;
  padding: 0;
  min-height: 44px;
  color: var(--color-accent-dark);
  font: inherit;
  font-size: var(--type-small);
  text-decoration: underline;
  cursor: pointer;
}

/* ---------------- Tablet ---------------- */
@media (min-width: 640px) {
  .dashboard-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .payout-balance-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .analytics-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .picker-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .my-product-row { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
  .family-card { grid-template-columns: minmax(0, 1fr) auto; }
  .dashboard-name-section,
  .dashboard-bio-section,
  .dashboard-theme-section,
  .dashboard-products-section,
  .dashboard-marketing-section,
  .dashboard-analytics-section,
  .dashboard-family-section { padding: var(--space-l); }
  .theme-picker { grid-template-columns: repeat(4, minmax(0, 1fr)); max-width: 640px; }
}

/* ---------------- Desktop ---------------- */
@media (min-width: 1024px) {
  .analytics-cards { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .dashboard-hero h1 { font-size: var(--type-section); }
}
