/* ==============================================================
   OlaOrder — Platform Operations Dashboard
   Reuses existing tokens/components throughout. Shell layout
   (sidebar, mobile nav) deliberately mirrors the seller dashboard's
   own .dash-shell/.dash-sidebar pattern (css/pages/dashboard.css) —
   same grid shape, same ink-black sidebar, same active-link and
   mobile bottom-nav treatment — rendered here by
   js/core/platform-shell.js into #platform-shell-root on every
   platform page, so all 5 routes share one visual system instead of
   the single bare "back to overview" link this used to be.
   ============================================================== */

.platform-shell {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
  background: var(--color-surface-alt);
}

/* The sidebar, mobile header, and mobile bottom-nav are all injected
   as siblings into #platform-shell-root by platform-shell.js (one
   render call producing three top-level elements).
   display: contents was tried here first (to make the wrapper
   transparent to the grid) but produced a confirmed real bug: with
   position: sticky/fixed children inside a display:contents
   ancestor, the mobile header rendered ~150px below the true top of
   the page instead of at y:0 — a known interaction between
   display:contents and sticky/fixed positioning contexts. contents
   is unnecessary here anyway, since every child inside this wrapper
   is itself position: fixed or sticky (the sidebar is a grid child
   only on desktop, where this wrapper's own box has no visible
   layout impact) — so a plain block wrapper is simpler and correct. */
.platform-shell-nav {
  display: block;
}
@media (min-width: 901px) {
  /* On desktop the sidebar (.platform-sidebar, position: sticky, a
     real grid child) needs its wrapper to participate in the grid
     as if it were transparent — display: contents is safe here
     specifically because nothing sticky/fixed inside it is visible
     at this breakpoint (mobile header/nav are display: none above
     900px), avoiding the bug described above. */
  .platform-shell-nav {
    display: contents;
  }
}

.platform-sidebar {
  /* Inherits .dash-sidebar's ink-black/flex/sticky treatment as-is
     — no platform-specific override needed for the sidebar itself,
     only for the page content area and mobile chrome below. */
}

.platform-badge {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-indigo);
  background: var(--color-indigo-soft);
  padding: 2px var(--space-2);
  border-radius: var(--radius-full);
  margin-left: var(--space-2);
  vertical-align: middle;
}
/* Inside the dark sidebar the soft-indigo badge reads as a solid
   block against the ink background — use the sidebar's own lighter
   accent color there instead, same fix already applied to the
   external-link row's icon by .dash-nav-link-external in
   dashboard.css (#C7C9FF on transparent). */
.dash-sidebar .platform-badge {
  color: #C7C9FF;
  background: rgba(91, 95, 239, 0.25);
}

.platform-nav-badge {
  margin-left: auto;
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 700;
  color: var(--color-indigo);
  background: rgba(199, 201, 255, 0.9);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  white-space: nowrap;
}
.dash-mobile-nav.platform-mobile-nav .platform-nav-badge {
  position: absolute;
  top: 2px;
  right: 8px;
  margin-left: 0;
  padding: 0 5px;
  font-size: 10px;
}
.dash-mobile-nav.platform-mobile-nav a {
  position: relative;
}

.platform-mobile-header { display: none; }

.platform-main {
  max-width: 1100px;
  padding: var(--space-8) var(--space-8) var(--space-12);
}

.platform-section {
  margin-bottom: var(--space-10);
}
.platform-section h1 {
  margin-bottom: var(--space-6);
}

.platform-stat-grid {
  grid-template-columns: repeat(3, 1fr);
}

/* Every platform stat-card gets a slim top accent — purely visual,
   same color for every card by default (a neutral indigo hairline)
   so the grid reads as one coherent set, with only the two genuinely
   distinct cards (shop views today, and any future "needs attention"
   metric) given their own accent color via a data attribute, rather
   than color-coding all nine cards arbitrarily. */
.platform-stat-grid .stat-card {
  position: relative;
  overflow: hidden;
}
.platform-stat-grid .stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--color-indigo-soft);
}
.platform-stat-grid .stat-card[data-accent="mint"]::before { background: var(--color-mint); }
.platform-stat-grid .stat-card[data-accent="warn"]::before { background: var(--color-warn); }

/* Priority zone — stale orders/requests and unread inquiries,
   pulled to the top of the overview and given a distinct warm
   surface so genuinely time-sensitive items aren't just another
   card in the scroll, matching the "premium = intentional
   hierarchy" ask rather than only restyling what already existed. */
.platform-priority-zone {
  background: var(--color-warn-soft);
  border: 1px solid rgba(224, 160, 48, 0.3);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  margin-bottom: var(--space-10);
}
.platform-priority-zone-header {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}
.platform-priority-zone-header svg {
  color: var(--color-warn-text);
  flex-shrink: 0;
}
.platform-priority-zone-header h2 {
  margin: 0;
  color: var(--color-warn-text);
}
.platform-priority-zone .card {
  background: var(--color-surface);
}
.platform-priority-zone-empty {
  background: var(--color-surface);
  border-radius: var(--radius-md);
  padding: var(--space-5);
  text-align: center;
  color: var(--color-ink-50);
}

/* Dismiss/restore controls — the button sits at the end of the
   header row via margin-left: auto rather than a separate flex
   justify-content change, so the header's existing icon+heading
   layout doesn't need restructuring for this one addition. */
.platform-priority-zone-header {
  flex-wrap: wrap;
}
.platform-priority-zone-dismiss,
.platform-priority-zone-restore {
  margin-left: auto;
  color: var(--color-warn-text);
  border-color: rgba(224, 160, 48, 0.4);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.platform-priority-zone-dismiss:hover,
.platform-priority-zone-restore:hover {
  background: rgba(224, 160, 48, 0.12);
}

/* Collapsed state — dismissed but the underlying count hasn't
   changed yet. Keeps the warm surface and the count visible (so an
   admin scanning the page still sees "3, dismissed" rather than the
   section vanishing entirely) but drops the padding/margin-bottom
   the full panel needs for its card grid, since there's no card grid
   to make room for here. */
.platform-priority-zone-collapsed {
  padding: var(--space-3) var(--space-5);
}
.platform-priority-zone-collapsed .platform-priority-zone-header {
  margin-bottom: 0;
}

/* Shop-views-today card is a real <button>, not the usual stat-card
   <div>, since it's the one stat-card on this page that's actually
   interactive — reset button chrome so it still looks like the rest
   of the stat-grid, and add a disabled state for the zero-views day. */
.stat-card-clickable {
  font: inherit;
  text-align: left;
  background: var(--color-surface, #fff);
  border: inherit;
  cursor: pointer;
  width: 100%;
}
.stat-card-clickable:disabled {
  cursor: default;
  opacity: 0.6;
}
.stat-card-clickable:disabled:hover {
  border-color: inherit;
  box-shadow: none;
}
.stat-card-hint {
  display: block;
  margin-top: var(--space-1);
}

.platform-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
  margin-bottom: var(--space-4);
}
/* Grid items default to a min-width of "auto", which floors each
   track at its content's min-content width — a long, unbreakable
   string anywhere inside a card (an email address, a URL, a long
   shop name) can silently force the whole grid, and everything
   downstream of it in the page shell, wider than the viewport. This
   opts every direct card/child out of that floor so wrapping and
   ellipsis rules inside the card actually get to do their job. */
.platform-grid-2 > * {
  min-width: 0;
}

.platform-grid-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: var(--space-4);
  margin-bottom: var(--space-4);
}

.platform-trend {
  display: block;
  font-size: var(--text-xs);
  margin-top: var(--space-1);
}
.platform-trend-up { color: var(--color-success-text); }
.platform-trend-down { color: var(--color-danger-text); }
.platform-trend-flat { color: var(--color-ink-30-text); }

/* Overdue-fulfillment row badge — reuses the exact same danger-text
   token already established for .platform-trend-down above, rather
   than introducing a second "this is bad" red. */
.platform-overdue-days {
  display: inline-block;
  margin-left: var(--space-2);
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--color-danger-text);
}

/* Fulfillment-performance panel — same three-way good/fair/poor
   read as .platform-trend-up/-down/-flat above, applied to the
   on-time-rate stat-value instead of a small trend line. Thresholds
   (90%/70%) are a plain, honest read of the rate itself, never a
   manufactured seller-facing score — this panel is platform-health
   only and is never broken down per seller anywhere in this app. */
.platform-fulfillment-rate-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.platform-fulfillment-rate-good { color: var(--color-success-text); }
.platform-fulfillment-rate-fair { color: var(--color-warn-text); }
.platform-fulfillment-rate-poor { color: var(--color-danger-text); }

.platform-fulfillment-breakdown {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-bottom: var(--space-2);
  font-size: var(--text-sm);
}
.platform-fulfillment-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: var(--space-2);
}
.platform-fulfillment-dot-early { background: var(--color-success); }
.platform-fulfillment-dot-ontime { background: var(--color-indigo); }
.platform-fulfillment-dot-late { background: var(--color-warn); }

.platform-fulfillment-coverage-note {
  margin-top: var(--space-2);
}

/* Weekly trend bars — same good/fair/poor read as the rate card
   above, applied per-bar instead of to a single stat value, so a
   glance at the shape of the bars (not just their color) already
   shows whether reliability is trending up or down week to week. */
.platform-fulfillment-trend-bar-good { background: var(--color-success); }
.platform-fulfillment-trend-bar-fair { background: var(--color-warn); }
.platform-fulfillment-trend-bar-poor { background: var(--color-danger); }

/* "Steady" trend badge — deliberately neutral (ink, not a status
   color) since neither improving nor declining is genuinely neutral
   information, not something to visually flag the way the
   good/bad .badge-completed/.badge-cancelled variants do. */
.platform-badge-steady { background: var(--color-ink-10); color: var(--color-ink-30-text); }

/* "Declining" trend — deliberately warn-amber, not .badge-cancelled's
   danger-red (that class is reserved for cancelled/declined ORDERS
   elsewhere in this app). A seller trending down is "worth a look,"
   not a wrongdoing to flag red — matches this whole section's
   explicit outreach-not-punishment framing. */
.platform-badge-declining { background: var(--color-warn-soft); color: var(--color-warn-text); }

.platform-attention-reasons {
  margin: var(--space-2) 0 0;
  padding-left: var(--space-4);
  font-size: var(--text-sm);
  color: var(--color-ink-30-text);
}
.platform-attention-reasons li { margin-bottom: var(--space-1); }

.platform-status-breakdown,
.platform-list-rows {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

/* Date filter bar for the Verifications/Promotions "decided" tabs
   (Approved, Rejected/Declined) — same min-width: 0 discipline as
   the announce-* filter bars above, though a single select never
   actually overflows on its own; kept for consistency. */
.platform-date-filter-bar {
  display: flex;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
}
.platform-date-filter-select {
  min-width: 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: var(--space-2) var(--space-2);
  font-size: var(--text-xs);
  color: var(--color-ink-90);
  background: var(--color-surface);
}
@media (max-width: 480px) {
  .platform-date-filter-select {
    width: 100%;
  }
}
.activity-controls {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
  margin-bottom: var(--space-4);
}
.activity-search-field,
.activity-filter-field,
.activity-sort-field {
  margin-bottom: 0;
  flex: 1;
  min-width: 140px;
}
#activity-show-all {
  margin-top: var(--space-3);
  width: 100%;
}
.platform-status-row,
.platform-list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-2) 0;
  min-width: 0;
  border-bottom: 1px solid var(--color-border);
}
/* .platform-list-row-text is sellerSupportRow()'s own name/email/date
   block. Named explicitly (rather than the previous ":first-child"
   selector) so this rule can't silently start targeting the wrong
   child if the row's markup order ever changes. overflow-wrap:anywhere
   is the one that actually matters here — an email address or a long
   unbroken slug has no natural break point, and break-word alone lets
   some browsers leave it unbroken and overflow anyway; anywhere forces
   a break wherever needed as a last resort. */
.platform-list-row-text {
  min-width: 0;
  overflow-wrap: anywhere;
}
.platform-list-row > a,
.platform-list-row > button {
  flex-shrink: 0;
}
.platform-status-row:last-child,
.platform-list-row:last-child {
  border-bottom: none;
}
.platform-status-count {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--color-ink-70);
}

/* ---------- Recently created storefronts (platform.js's recentShopCard()) ----------
   A dedicated card layout, not the shared .platform-list-row this page
   otherwise uses for shopRow() — "recently created" is specifically about
   scanning a handful of new storefronts at a glance (identity, publish
   state, how recent), which reads better as a small card than a bare
   text row. Reuses .card's own token language throughout — no new colors. */
.platform-shop-card-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.platform-shop-card {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3);
  min-width: 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: inherit;
  transition: border-color var(--duration-base) var(--ease-standard),
              box-shadow var(--duration-base) var(--ease-standard);
}
.platform-shop-card:hover {
  border-color: var(--color-indigo);
  box-shadow: 0 2px 8px rgba(11, 14, 26, 0.06);
  text-decoration: none;
}
.platform-shop-card-avatar {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
}
.platform-shop-card-avatar-img {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  display: block;
}
.platform-shop-card-avatar-fallback {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: var(--color-indigo-soft);
  color: var(--color-indigo);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: var(--text-lg);
}
.platform-shop-card-body {
  flex: 1;
  min-width: 0;
}
.platform-shop-card-title-row {
  display: flex;
  align-items: center;
  gap: 6px;
}
.platform-shop-card-name {
  color: var(--color-ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* Small, quiet "created very recently" signal — a dot, not another
   badge, since a shop already carries a Published/Unpublished badge
   below and a second competing badge here would just be noise. Title
   attribute carries the real explanation for anyone who needs it. */
.platform-shop-card-new-dot {
  flex-shrink: 0;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--color-mint);
}
.platform-shop-card-slug {
  margin: 1px 0 0;
  font-size: var(--text-sm);
  color: var(--color-ink-50);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.platform-shop-card-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-1) var(--space-2);
  margin-top: var(--space-2);
}
.platform-shop-card-time {
  font-size: var(--text-xs);
  white-space: nowrap;
}
.platform-shop-card-chevron {
  flex-shrink: 0;
  color: var(--color-ink-30);
  font-size: var(--text-lg);
}

@media (max-width: 480px) {
  .platform-shop-card {
    padding: var(--space-2);
  }
}

/* Most-viewed storefronts — ranked list. Deliberately not a
   platform-shop-card: the rank number and the proportional bar are the
   point here, not a logo/chevron pattern meant for "go look at this
   shop" lists. */
.platform-rank-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.platform-rank-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-3);
  min-width: 0;
  border-radius: var(--radius-md);
  text-decoration: none;
  color: inherit;
  transition: background var(--duration-base) var(--ease-standard);
}
.platform-rank-row:hover {
  background: var(--color-surface-alt);
  text-decoration: none;
}
.platform-rank-number {
  flex-shrink: 0;
  width: 24px;
  text-align: center;
  font-weight: 700;
  font-size: var(--text-sm);
  color: var(--color-ink-30);
}
/* Top 3 get the shop's theme accent — small visual reward for the
   ranking actually meaning something, without adding a badge. */
.platform-rank-row:nth-child(1) .platform-rank-number,
.platform-rank-row:nth-child(2) .platform-rank-number,
.platform-rank-row:nth-child(3) .platform-rank-number {
  color: var(--ola-theme-accent, var(--color-indigo));
}
.platform-rank-body {
  flex: 1;
  min-width: 0;
}
.platform-rank-title-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-2);
}
.platform-rank-name {
  color: var(--color-ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.platform-rank-views {
  flex-shrink: 0;
  font-size: var(--text-xs);
  color: var(--color-ink-50);
}
.platform-rank-bar-track {
  margin-top: 6px;
  height: 4px;
  border-radius: 2px;
  background: var(--color-border);
  overflow: hidden;
}
.platform-rank-bar-fill {
  height: 100%;
  border-radius: 2px;
  background: var(--ola-theme-accent, var(--color-indigo));
}
@media (max-width: 480px) {
  .platform-rank-row {
    padding: var(--space-2);
  }
}

.platform-chart {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 88px;
  margin-top: var(--space-4);
  padding-top: var(--space-2);
  border-bottom: 1px solid var(--color-border);
}
.platform-chart-bar {
  width: 100%;
  background: linear-gradient(180deg, var(--color-indigo) 0%, var(--color-indigo-hover) 100%);
  border-radius: 3px 3px 1px 1px;
  min-height: 3px;
  transition: opacity var(--duration-fast) var(--ease-standard), transform var(--duration-fast) var(--ease-standard);
}
.platform-chart-bar:hover {
  opacity: 0.85;
  transform: scaleY(1.02);
  transform-origin: bottom;
}
.platform-chart-bar-today {
  background: linear-gradient(180deg, var(--color-warn) 0%, #C6821D 100%);
}
.platform-chart-caption {
  margin-top: var(--space-3);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-2);
}
.platform-chart-caption-total {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--color-ink-90);
}

@media (prefers-reduced-motion: reduce) {
  .platform-chart-bar { transition: none; }
}

@media (max-width: 768px) {
  .platform-grid-2 { grid-template-columns: 1fr; }
  .platform-grid-3 { grid-template-columns: 1fr; }
  .platform-list-row { flex-direction: column; align-items: flex-start; gap: var(--space-2); }
}

/* Shell responsive breakpoint — identical 900px cutover to the
   seller dashboard's own .dash-shell rule, so the two consoles
   switch to mobile chrome at the same real viewport width. Below
   it: hide the sidebar, show the sticky mobile header + bottom nav,
   and let the stat grid scroll horizontally as a row of cards
   instead of stacking to a single column — stacking pushed the
   growth charts several screens down on a phone; a horizontal strip
   keeps every stat reachable within the first scroll. */
@media (max-width: 900px) {
  /* Real bug, root-caused: with only grid-template-columns set and
     no grid-template-rows, .platform-shell's two children
     (#platform-shell-root and #platform-main) each land in their own
     implicit grid row — and with min-height: 100vh on the grid
     container, Chromium's default row sizing (align-content: stretch)
     split that 100vh evenly-ish between the two rows, stretching the
     nav wrapper's row to ~324px tall even though its own content
     (a 61px sticky header, everything else display:none or
     position:fixed) never needed that height. grid-auto-rows: min-
     content stops the implicit rows from stretching to fill the
     container — each row sizes to its actual content instead. */
  /* minmax(0, 1fr), not bare 1fr: confirmed by direct measurement
     that a bare 1fr track's implicit minimum is "auto" (its
     content's max-content size), the identical footgun as flex
     items' default min-width: auto, just for grid tracks instead.
     At a 320px viewport this resolved gridTemplateColumns to
     332.39px — wider than the 320px .platform-shell box itself —
     which is what was still leaking through every min-width: 0 fix
     applied to the *children* below; the track itself needed the
     same treatment. minmax(0, 1fr) is the honest, complete fix. */
  .platform-shell { grid-template-columns: minmax(0, 1fr); grid-auto-rows: min-content; }
  .platform-sidebar { display: none; }
  .platform-main {
    padding: var(--space-4);
    padding-bottom: 88px;
    max-width: 100%;
    /* Real root cause, found by walking the ancestor chain: a grid
       item's default min-width is "auto", so #platform-main (the
       .platform-shell grid's second column) refused to shrink below
       its content's natural width — the horizontally-scrollable stat
       row's full 448px unrolled content — and stretched the whole
       page to 480px in a 390px viewport instead of staying at 390px
       and letting the *inner* row scroll on its own. This is the fix
       that actually stops the leak; width:100%/min-width:0 on
       .platform-stat-grid itself (below) were necessary but not
       sufficient without this. */
    min-width: 0;
  }

  .platform-mobile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-4);
    background: var(--color-ink);
    position: sticky;
    top: 0;
    z-index: 21;
    /* Same real bug as .platform-stat-grid/#platform-main earlier:
       a flex container's own box can measure wider than its actual
       available space (confirmed: 332px at a 320px viewport, even
       though both children individually fit) unless width is
       explicitly capped and min-width: 0 lets it actually shrink. */
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }
  /* Real overflow, confirmed at a 320px viewport (iPhone SE and
     similar): "OlaOrder" + the PLATFORM badge + "Seller dashboard"
     never fit on one line without wrapping, and neither child had
     min-width: 0 to let the browser even consider shrinking them —
     the header measured 373px wide inside a 320px viewport, leaking
     horizontal scroll onto the whole page exactly like the earlier
     .platform-stat-grid bug. min-width: 0 on both children plus a
     shorter button label below 360px fixes it without losing the
     link on any real device. */
  .platform-mobile-header > * {
    min-width: 0;
  }
  .dash-mobile-brand.platform-mobile-header a,
  .platform-mobile-header .dash-mobile-brand {
    color: white;
    min-width: 0;
    overflow: hidden;
    font-size: var(--text-lg);
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
  }
  .platform-mobile-header .dash-mobile-brand:hover { text-decoration: none; }

  .platform-mobile-header-back-short { display: none; }
  /* Below ~360px (confirmed real overflow at 320px, iPhone SE and
     similar), "Seller dashboard" is swapped for the shorter
     "Dashboard" — same short/full label-swap idiom already used
     elsewhere in this app (.stat-label-short) rather than a new
     pattern, and it's what actually closes the remaining gap once
     min-width: 0 alone wasn't enough to fit both header halves. */
  @media (max-width: 360px) {
    .platform-mobile-header-back-full { display: none; }
    .platform-mobile-header-back-short { display: inline; }
  }

  /* Real 2-column grid, not horizontal scroll — every stat is visible
     without a swipe gesture, which is what "premium" actually meant
     here per direct feedback (the scroll row hid cards off-screen and
     required a swipe to discover them). Same min-width: 0 discipline
     as everywhere else in this file, since .platform-stat-grid is
     still a grid item of #platform-main and would otherwise inherit
     the identical overflow bug already fixed twice above.

     Selector is doubled (.platform-stat-grid.platform-stat-grid) to
     match dashboard.css's own @media (max-width: 640px) specificity
     bump on the shared .stat-grid.stat-grid rule — markup here is
     `class="stat-grid platform-stat-grid"`, so without this the
     dashboard rule's higher specificity silently forces 3 columns
     back at ≤640px, undoing this override right where it matters
     most (small phones). Confirmed via isolated render test: without
     the doubled selector, 320/390px rendered 3 columns instead of 2. */
  .platform-stat-grid.platform-stat-grid {
    grid-template-columns: repeat(2, 1fr);
    width: 100%;
    max-width: 100%;
    min-width: 0;
    gap: var(--space-3);
  }
  .platform-stat-grid .stat-card {
    min-width: 0;
  }

  .platform-priority-zone { padding: var(--space-4); }
}


.announce-seller-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  max-height: 320px;
  overflow-y: auto;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-2);
}
.announce-seller-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  transition: background-color var(--duration-fast) var(--ease-standard);
}
.announce-seller-row:hover {
  background: var(--color-surface-alt);
}
.announce-seller-row-optedout {
  opacity: 0.5;
}
.announce-seller-row-optedout:hover {
  background: none;
}
.announce-seller-row-label {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 2px var(--space-3);
  cursor: pointer;
  min-width: 0;
  flex: 1;
}
.announce-seller-row-optedout .announce-seller-row-label {
  cursor: default;
}
/* Real bug, found by rendering this row with a genuinely long seller
   name + long email at 320-375px (the exact combination this list
   routinely has, e.g. "Oluwadamilare Oluwatobiloba Adekunle-Johnson"):
   flex-shrink: 0 forced the name to its full content width, which the
   card's own overflow handling then silently clipped mid-word
   ("...Adekunle-Ad") rather than wrapping or ellipsizing it — an
   admin picking who to exclude from an announcement couldn't actually
   read who they were looking at. The name and email now sit in a
   min-width:0, flex-wrap:wrap row (see .announce-seller-row-label
   above) so a long name simply wraps to its own line above the email,
   instead of being cut off. */
.announce-seller-name {
  font-size: var(--text-sm);
  font-weight: 600;
  min-width: 0;
  overflow-wrap: break-word;
}
.announce-history-row {
  position: relative;
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--color-border);
}
.announce-history-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}
.announce-history-row-clickable {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding-right: var(--space-8);
  cursor: pointer;
}
.announce-history-subject {
  font-size: var(--text-sm);
  font-weight: 600;
  margin: 0 0 var(--space-1);
}
.announce-history-count {
  flex-shrink: 0;
  white-space: nowrap;
}
.announce-history-expand-icon {
  flex-shrink: 0;
  color: var(--color-ink-30-text);
  transition: transform var(--duration-fast) var(--ease-standard);
}
.announce-history-row-expanded .announce-history-expand-icon {
  transform: rotate(180deg);
}
.announce-history-body {
  margin-top: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: var(--color-surface-alt);
  border-radius: var(--radius-sm);
  border-left: 2px solid var(--color-border);
  font-size: var(--text-sm);
  color: var(--color-ink-70);
  line-height: 1.6;
}
.announce-history-row-actions {
  position: absolute;
  top: var(--space-3);
  right: 0;
  display: flex;
  align-items: center;
  gap: var(--space-1);
}
.announce-history-forward-btn {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: var(--radius-sm);
  border: none;
  background: var(--color-surface-alt);
  color: var(--color-indigo);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color var(--duration-fast) var(--ease-standard);
}
.announce-history-forward-btn:hover {
  background: var(--color-indigo-soft);
}
.announce-history-delete-btn {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
  border: none;
  background: none;
  color: var(--color-ink-30-text);
  font-size: var(--text-sm);
  cursor: pointer;
  transition: color var(--duration-fast) var(--ease-standard), background-color var(--duration-fast) var(--ease-standard);
}
.announce-history-delete-btn:hover {
  color: var(--color-danger);
  background: var(--color-danger-soft);
}
.announce-confirm-count {
  text-align: center;
  background: var(--color-indigo-soft);
}
.announce-confirm-number {
  font-family: var(--font-mono);
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--color-indigo);
  margin: 0;
}
.announce-confirm-actions {
  display: flex;
  gap: var(--space-3);
}

@media (max-width: 480px) {
  .announce-seller-row { flex-wrap: wrap; }
  .announce-confirm-actions { flex-direction: column-reverse; }
  .announce-confirm-actions .btn { width: 100%; }
  .platform-list-row { flex-wrap: wrap; }
  .verification-review-actions { flex-wrap: wrap; width: 100%; }
}

.platform-tabs {
  display: flex;
  gap: var(--space-1);
  border-bottom: 1px solid var(--color-border);
  margin-bottom: var(--space-4);
  overflow-x: auto;
}
/* On narrow viewports the tab strip genuinely doesn't fit (confirmed:
   scrollWidth 471px vs clientWidth 326px at 390px), so it scrolls —
   but a hard-clipped last tab with no visual cue reads as "broken"
   rather than "scrollable". A right-edge fade signals there's more,
   and a hidden native scrollbar keeps that fade from being undercut
   by a visible scrollbar track. Scoped to mobile only — confirmed the
   strip already fits without scrolling at desktop widths. */
@media (max-width: 640px) {
  .platform-tabs {
    scrollbar-width: none;
  }
  .platform-tabs::-webkit-scrollbar {
    display: none;
  }
  /* Applied/removed by JS (wireTabScrollFade) based on real scroll
     position, not just statically — a static fade would keep
     implying "more to scroll" even once the strip is scrolled all
     the way to its last tab, which is its own false cue. */
  .platform-tabs.has-more-tabs {
    -webkit-mask-image: linear-gradient(to right, black calc(100% - 28px), transparent 100%);
    mask-image: linear-gradient(to right, black calc(100% - 28px), transparent 100%);
  }
}
.platform-tab-btn {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-ink-50);
  cursor: pointer;
  white-space: nowrap;
  transition: color var(--duration-base) var(--ease-standard);
}
.platform-tab-btn:hover {
  color: var(--color-ink-90);
}
.platform-tab-btn.is-active {
  color: var(--color-indigo);
  border-bottom-color: var(--color-indigo);
}
.platform-tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 var(--space-1);
  border-radius: 999px;
  background: var(--color-surface-alt);
  color: var(--color-ink-70);
  font-size: var(--text-xs);
  font-weight: 700;
}
.platform-tab-btn.is-active .platform-tab-count {
  background: var(--color-indigo-soft);
  color: var(--color-indigo);
}

.platform-list-row {
  transition: background var(--duration-base) var(--ease-standard);
  border-radius: var(--radius-sm);
  padding-left: var(--space-2);
  padding-right: var(--space-2);
}
.platform-list-row:hover {
  background: var(--color-surface-alt);
}

/* Recipient emails dropdown — confirmed simple, gentle treatment
   sitting quietly below the bold indigo count card, directly
   rendered and confirmed correct before this code was written,
   including scroll behavior tested against 60 fake recipients. */
.announce-recipients-dropdown {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
}
.announce-recipients-summary {
  cursor: pointer;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-ink-70);
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.announce-recipients-summary::-webkit-details-marker {
  display: none;
}
.announce-recipients-summary svg {
  color: var(--color-ink-30-text);
  transition: transform var(--duration-fast) var(--ease-standard);
  flex-shrink: 0;
}
.announce-recipients-dropdown[open] .announce-recipients-summary svg {
  transform: rotate(180deg);
}
.announce-recipients-list {
  margin-top: var(--space-3);
  padding-top: var(--space-3);
  border-top: 1px solid var(--color-surface-alt);
  max-height: 180px;
  overflow-y: auto;
}
.announce-recipient-row {
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
  padding: var(--space-1) 0;
  min-width: 0;
}
.announce-recipient-name {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-ink-90);
  flex-shrink: 0;
}
.announce-recipient-email {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-ink-30-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

/* Exclude-sellers sort toggle — confirmed compact segmented
   control, directly rendered and approved before this code was
   written, sitting beside the existing heading without disturbing
   the hint or list below it. */
.announce-seller-list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: 2px;
}
.announce-sort-toggle {
  display: flex;
  gap: 4px;
  background: var(--color-surface-alt);
  border-radius: var(--radius-sm);
  padding: 3px;
  flex-shrink: 0;
}
.announce-sort-btn {
  border: none;
  background: none;
  padding: 5px var(--space-3);
  border-radius: 6px;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-ink-30-text);
  cursor: pointer;
  transition: background-color var(--duration-fast) var(--ease-standard),
              color var(--duration-fast) var(--ease-standard);
}
.announce-sort-btn-active {
  background: var(--color-surface);
  color: var(--color-ink-90);
  box-shadow: var(--shadow-sm);
}
/* Real, confirmed mobile fix — the tab labels ("New announcement",
   "Announcement Library") are genuinely longer than the short 2-3
   word pairs (e.g. "Newest"/"Oldest") this shared toggle pattern was
   originally sized for. On a narrow phone, letting them wrap kept
   the pill's shape intact instead of it overflowing. */
@media (max-width: 480px) {
  .announce-sort-toggle {
    width: 100%;
  }
  .announce-sort-btn {
    flex: 1;
    text-align: center;
  }
}

/* Legacy sends — redesigned. The old layout repeated an identical
   orange "Legacy — identity inferred" badge on every single row
   inside a section already titled "Legacy sends", which read as a
   wall of warnings rather than a data-provenance note. The
   explanation now appears once, as a quiet info panel above the
   list; each row carries only the facts that actually differ
   (subject, send count, date). */
.announce-legacy-heading-row {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
}
.announce-legacy-heading-row .dash-analytics-subheading {
  margin: 0;
}
.announce-legacy-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 var(--space-1);
  border-radius: var(--radius-full);
  background: var(--color-surface-alt);
  color: var(--color-ink-50);
  font-size: var(--text-xs);
  font-weight: 700;
}
.announce-legacy-note {
  display: flex;
  gap: var(--space-2);
  align-items: flex-start;
  background: var(--color-surface-alt);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  margin-bottom: var(--space-4);
}
.announce-legacy-note svg {
  flex-shrink: 0;
  color: var(--color-ink-30-text);
  margin-top: 2px;
}
.announce-legacy-note p {
  margin: 0;
  font-size: var(--text-xs);
  color: var(--color-ink-50);
  line-height: 1.5;
}
.announce-legacy-list {
  padding: 0;
  overflow: hidden;
}
/* Real bug, found by rendering this row with a genuinely long legacy
   subject line (these are free-text email subjects, sometimes a full
   sentence) at 320px: with justify-content: space-between and no
   flex-wrap, .announce-legacy-row-main correctly shrank via its own
   min-width: 0, but the "Compose new from this" button never dropped
   below it — it kept reserving its own width on every wrapped line of
   the subject, so the subject wrapped one or two words per line for
   the row's entire height, and the button visually overlapped the
   last couple of wrapped words. flex-wrap: wrap lets the button drop
   to its own line below the subject once the subject needs more than
   one line, which is exactly what happens on any realistically long
   legacy subject on a phone. */
.announce-legacy-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-2) var(--space-4);
  padding: var(--space-4);
  transition: background var(--duration-base) var(--ease-standard);
}
.announce-legacy-row:hover {
  background: var(--color-surface-alt);
}
.announce-legacy-row-divided {
  border-bottom: 1px solid var(--color-border);
}
.announce-legacy-row-main {
  min-width: 0;
  flex: 1 1 260px;
}
.announce-legacy-subject {
  display: block;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-ink-90);
  margin-bottom: var(--space-1);
}
.announce-legacy-meta {
  margin: 0;
  font-size: var(--text-xs);
  color: var(--color-ink-50);
}
.announce-legacy-meta-muted {
  color: var(--color-ink-30-text);
}

/* Real, confirmed bug — a legacy-send row pairs its subject text
   (which can genuinely shrink) with the "Compose new from this"
   button, a .btn, which sets white-space: nowrap globally. As a flex
   item, a button's default min-width is "auto" — it refuses to
   shrink below its own full, un-wrapped text width (confirmed via
   direct measurement: ~218px), which on a narrow phone left almost
   no room for .announce-legacy-row-main, squeezing the actual
   subject text down to roughly 58px — one word per line. Letting the
   row wrap moves the button onto its own full-width line below the
   text instead, so neither side is starved for space. */
@media (max-width: 640px) {
  .announce-legacy-row {
    flex-wrap: wrap;
  }
  .announce-legacy-row .announce-legacy-recompose-btn {
    width: 100%;
  }
}

/* Select-for-targeting control — confirmed genuinely distinct from
   the exclude checkbox, directly rendered and approved before this
   code was written, specifically to avoid an admin confusing
   "excluding someone from a broadcast" with "targeting them for a
   specific send". */
.announce-select-btn {
  flex-shrink: 0;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  border-radius: var(--radius-sm);
  padding: 5px var(--space-3);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-indigo);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: background-color var(--duration-fast) var(--ease-standard),
              color var(--duration-fast) var(--ease-standard),
              border-color var(--duration-fast) var(--ease-standard);
}
.announce-select-btn:hover:not(:disabled) {
  border-color: var(--color-indigo);
}
.announce-select-btn:disabled {
  color: var(--color-ink-30-text);
  cursor: not-allowed;
}
.announce-select-btn-active {
  background: var(--color-indigo);
  color: white;
  border-color: var(--color-indigo);
}
.announce-select-btn-active svg {
  flex-shrink: 0;
}

/* Floating "Compose to selected" bar — appears only once at least
   one seller is targeted, correctly appended to document.body so
   it sits outside normal page flow and stays visible while
   scrolling the seller list. */
.announce-floating-bar {
  position: fixed;
  bottom: var(--space-5);
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-ink-90);
  color: white;
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  display: flex;
  align-items: center;
  gap: var(--space-4);
  font-size: var(--text-sm);
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  z-index: 50;
}

@media (max-width: 500px) {
  .announce-seller-row {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-2);
  }
  .announce-seller-row-label {
    flex-wrap: wrap;
  }
  .announce-seller-name {
    white-space: normal;
  }
  .announce-select-btn {
    align-self: flex-end;
  }
  .announce-seller-list-header {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-2);
  }
}

/* Announcement receipt — recipients list inside the expanded
   history row. Directly rendered and confirmed before this code
   was written. */
.announce-history-recipients-label {
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-ink-50);
  margin: var(--space-4) 0 var(--space-2);
}
.announce-history-recipients-list {
  max-height: 180px;
  overflow-y: auto;
}
.announce-history-recipient-row {
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
  padding: var(--space-1) 0;
  font-size: var(--text-sm);
}
.announce-history-recipient-name {
  font-weight: 600;
  color: var(--color-ink-90);
  flex-shrink: 0;
}
.announce-history-recipient-email {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-ink-30-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.announce-history-recipient-failed {
  background: var(--color-danger-soft);
  color: var(--color-danger-text);
  font-size: 10px;
  font-weight: 700;
  padding: 1px var(--space-2);
  border-radius: 4px;
  flex-shrink: 0;
  margin-left: auto;
}

@media (max-width: 500px) {
  .announce-history-recipient-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
  }
  .announce-history-recipient-email {
    white-space: normal;
    word-break: break-word;
  }
  .announce-history-recipient-failed {
    margin-left: 0;
  }
}

/* Recent sends filter bar — confirmed by direct rendering at both
   the wide and the real narrow confirmed width before this code
   was written. */
.announce-history-filter-bar {
  display: flex;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
}
.announce-history-search {
  flex: 1.6;
  min-width: 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: var(--space-2) var(--space-2);
  font-size: var(--text-xs);
  color: var(--color-ink-90);
  background: var(--color-surface);
}
.announce-history-search::placeholder {
  color: var(--color-ink-30-text);
}
.announce-history-select {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: var(--space-2) var(--space-1);
  font-size: var(--text-xs);
  color: var(--color-ink-90);
  background: var(--color-surface);
}

/* Announcement Library filter bar — same proven-safe flex pattern as
   .announce-history-filter-bar above (min-width: 0 on both children
   is required so they can shrink below their intrinsic content width
   on narrow viewports; omitting it is what caused the Legacy sends
   overflow bug fixed earlier in this file). */
.announce-library-filter-bar {
  display: flex;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
}
.announce-library-search {
  flex: 1.6;
  min-width: 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: var(--space-2) var(--space-2);
  font-size: var(--text-xs);
  color: var(--color-ink-90);
  background: var(--color-surface);
}
.announce-library-search::placeholder {
  color: var(--color-ink-30-text);
}
.announce-library-select {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: var(--space-2) var(--space-1);
  font-size: var(--text-xs);
  color: var(--color-ink-90);
  background: var(--color-surface);
}

/* Announcement recipient tabs and search — confirmed by direct
   rendering before this code was written. */
.announce-recipient-tabs {
  display: flex;
  gap: 4px;
  background: var(--color-surface-alt);
  border-radius: var(--radius-sm);
  padding: 3px;
  margin-top: var(--space-3);
  margin-bottom: var(--space-2);
}
.announce-recipient-tab {
  flex: 1;
  border: none;
  background: none;
  padding: 5px var(--space-2);
  border-radius: 6px;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-ink-30-text);
  cursor: pointer;
  transition: background-color var(--duration-fast) var(--ease-standard),
              color var(--duration-fast) var(--ease-standard);
}
.announce-recipient-tab-active {
  background: var(--color-surface);
  color: var(--color-ink-90);
  box-shadow: var(--shadow-sm);
}
.announce-recipient-search {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: var(--space-2) var(--space-3);
  font-size: var(--text-xs);
  color: var(--color-ink-90);
  background: var(--color-surface);
  margin-bottom: var(--space-2);
}
.announce-recipient-search::placeholder {
  color: var(--color-ink-30-text);
}
.announce-recipient-caveat {
  line-height: 1.4;
  margin: 0 0 var(--space-3);
}
.announce-history-recipient-optedout {
  font-size: 10px;
  color: var(--color-ink-30-text);
  flex-shrink: 0;
  margin-left: auto;
}

/* "Send to this seller" — reuses .announce-select-btn's exact visual
   language (same pill, same indigo, same hover) for consistency, but
   this row has no parent justify-content:space-between to push it
   right, so it needs its own placement here. */
.announce-resend-btn {
  margin-left: auto;
  white-space: nowrap;
}
.announce-resend-btn:disabled {
  color: var(--color-ink-30-text);
  border-color: var(--color-border);
  cursor: not-allowed;
}

@media (max-width: 500px) {
  .announce-resend-btn {
    margin-left: 0;
    align-self: flex-end;
  }
}

/* Support Access page — the admin support-session audit trail
   (platform-support.js). Reuses .platform-list-row/.badge/.card
   throughout by design (a real, honest audit log, not a bespoke
   showpiece) — these are the few small additions that pattern alone
   doesn't cover. */
.platform-support-arrow {
  color: var(--color-ink-30-text);
  margin: 0 4px;
  font-weight: 400;
}
.platform-support-reason {
  font-style: italic;
  margin-top: 2px;
}

/* "Open a seller's dashboard" search — the actual entry point that
   makes every seller reachable, not just the 10 most recent ones
   Overview happens to show. Results reuse .platform-list-row via
   sellerSupportRow() (../core/admin-support.js), so a search result
   looks identical to Overview's own "Recent seller registrations"
   rows — same component, same Support button, same modal. */
.platform-support-search-field {
  margin-bottom: 0;
}
.platform-support-search-field input {
  min-height: 40px;
}
.platform-support-search-results {
  margin-top: var(--space-3);
}
.platform-support-search-results:empty {
  margin-top: 0;
}

/* Full-history filter — same flex-row-with-trailing-control shape as
   .platform-priority-zone-header, reused here at section level since
   .dash-page-controls is reserved for the page's own <h1> row
   elsewhere in this app (Orders, Customers) and pairing it with a
   section <h2> here would be a different pattern wearing the same
   class name. */
.platform-support-history-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}
.platform-support-history-header .dash-section-heading {
  margin-bottom: 0;
}
.platform-support-history-filter {
  min-width: 220px;
  flex: 0 1 260px;
}

@media (max-width: 480px) {
  .platform-support-history-filter {
    width: 100%;
    flex-basis: 100%;
  }
}

/* Lists inside platform cards show four rows, then scroll (the height is
   set from the real rows by js/core/platform-scroll-lists.js). */
.platform-scroll-cap {
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: var(--space-2);
  scrollbar-gutter: stable;
  -webkit-overflow-scrolling: touch;
}
.platform-scroll-cap:focus-visible {
  outline: 2px solid var(--color-indigo);
  outline-offset: 2px;
  border-radius: var(--radius-md);
}
/* Rows keep their natural height (never squeezed by flex), so the
   four-row cap above measures — and scrolls — true row sizes. */
.card .platform-list-rows > *,
.card .platform-shop-card-list > * {
  flex-shrink: 0;
}

/* Announcement centre (v1.43.0) */
.ac-actions { white-space: nowrap; }
.ac-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: var(--space-3); margin: 0 0 var(--space-3); }
.ac-stats dt { font-size: .8125rem; color: var(--color-ink-30-text); }
.ac-stats dd { margin: 2px 0 0; font-size: 1.25rem; font-weight: 700; }
.ac-pick-list { max-height: 240px; overflow: auto; border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: var(--space-2); margin-top: 6px; }
.ac-preview summary { cursor: pointer; font-weight: 600; margin: var(--space-3) 0 var(--space-2); }
#ac-form input[type="text"], #ac-form input[type="search"], #ac-form input[type="datetime-local"], #ac-form select, #ac-form textarea { width: 100%; box-sizing: border-box; }

/* ---- v1.44.1: announcements tabs, channel note, phone-friendly list ---- */
.announce-channel-note { margin: calc(-1 * var(--space-2)) 0 var(--space-4); }
.ac-actions-explainer { margin: var(--space-3) 0 var(--space-2); }
.announce-sort-toggle { max-width: 100%; }
.announce-sort-btn { white-space: nowrap; }
@media (max-width: 480px) {
  .announce-sort-toggle { overflow-x: auto; scrollbar-width: none; }
  .announce-sort-toggle::-webkit-scrollbar { display: none; }
  .announce-sort-btn { flex: 1 0 auto; padding: 8px var(--space-2); }
}
.ac-table-wrap { overflow-x: auto; }
.ac-table { width: 100%; border-collapse: collapse; text-align: left; }
.ac-table th, .ac-table td { padding: var(--space-2) var(--space-3) var(--space-2) 0; vertical-align: top; }
.ac-table thead th { font-size: .8125rem; color: var(--color-ink-30-text); font-weight: 600; border-bottom: 1px solid var(--color-border); }
.ac-table tbody tr + tr td { border-top: 1px solid var(--color-border); }
@media (max-width: 640px) {
  .ac-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .ac-table, .ac-table tbody, .ac-table tr, .ac-table td { display: block; width: 100%; }
  .ac-table tr { padding: var(--space-3) 0; }
  .ac-table tbody tr + tr { border-top: 1px solid var(--color-border); }
  .ac-table tbody tr + tr td { border-top: 0; }
  .ac-table td { padding: 2px 0; display: flex; gap: var(--space-3); justify-content: space-between; align-items: baseline; text-align: right; }
  .ac-table td::before { content: attr(data-label); flex: 0 0 5.5rem; text-align: left; font-size: .8125rem; color: var(--color-ink-30-text); font-weight: 600; }
  .ac-table td[data-label="Title"] { display: block; text-align: left; }
  .ac-table td[data-label="Title"]::before { display: none; }
  .ac-table td.ac-actions { justify-content: flex-start; flex-wrap: wrap; white-space: normal; padding-top: var(--space-2); }
  .ac-table td.ac-actions::before { display: none; }
}

/* v1.45.0 announcement composer */
.ac-form-head { margin-bottom: var(--space-3); }
.ac-form-head h3 { margin: 0 0 4px; }
.ac-form-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: var(--space-5); align-items: start; }
.ac-form-main { display: grid; gap: var(--space-4); min-width: 0; }
.ac-form-preview { position: sticky; top: var(--space-4); min-width: 0; padding: var(--space-3); border: 1px dashed var(--color-border, #d6d6d6); border-radius: var(--radius-md, 8px); background: var(--color-surface-2, transparent); }
.ac-preview-title { margin: 0 0 var(--space-2); font-weight: 600; font-size: .85rem; }
.ac-label { display: block; margin-bottom: 6px; font-weight: 600; }
.ac-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; padding: 6px; border: 1px solid var(--color-border, #d6d6d6); border-bottom: 0; border-radius: 8px 8px 0 0; }
.ac-toolbar + textarea { border-radius: 0 0 8px 8px; }
.ac-tool { min-height: 40px; min-width: 40px; padding: 0 10px; border: 1px solid transparent; background: transparent; border-radius: 6px; cursor: pointer; font: inherit; color: inherit; }
.ac-tool:hover, .ac-tool:focus-visible { background: var(--color-surface-2, rgba(0,0,0,.06)); border-color: var(--color-border, #d6d6d6); }
.ac-tool-hl { background: color-mix(in srgb, var(--color-warning, #f5b301) 40%, transparent); padding: 0 3px; border-radius: 3px; }
.ac-tool-alert { color: var(--color-danger, #c0392b); font-weight: 700; }
.ac-tool-sep { width: 1px; height: 22px; background: var(--color-border, #d6d6d6); margin: 0 4px; }
.ac-guide, .ac-more { margin-top: var(--space-2); }
.ac-guide summary, .ac-more summary { cursor: pointer; font-weight: 600; min-height: 32px; }
.ac-guide ul { padding-left: 1.2em; margin: var(--space-2) 0 0; line-height: 1.6; font-size: .9rem; }
.ac-guide code { word-break: break-word; }
.ac-more { border: 1px solid var(--color-border, #d6d6d6); border-radius: 8px; padding: var(--space-2) var(--space-3); }
.ac-more[open] { display: grid; gap: var(--space-3); }
.ac-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.ac-chip { min-height: 44px; padding: 0 var(--space-4); border: 1px solid var(--color-border, #d6d6d6); border-radius: 999px; background: transparent; font: inherit; color: inherit; cursor: pointer; }
.ac-chip.is-on { background: var(--color-primary, #1a6b4a); border-color: var(--color-primary, #1a6b4a); color: #fff; font-weight: 600; }
.ac-seg { display: grid; gap: var(--space-2); margin-top: 8px; }
.ac-sub { margin: var(--space-2) 0 0; font-weight: 600; font-size: .9rem; }
.ac-checks { display: flex; flex-wrap: wrap; gap: 8px; }
.ac-check { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 12px; border: 1px solid var(--color-border, #d6d6d6); border-radius: 999px; cursor: pointer; }
.ac-count-line { margin: var(--space-2) 0 0; font-weight: 600; }
.ac-push-preview { display: grid; gap: 2px; padding: var(--space-3); border-radius: 12px; border: 1px solid var(--color-border, #d6d6d6); font-size: .9rem; }
.ac-push-preview span { overflow-wrap: anywhere; }
.ac-actions-explainer { margin: var(--space-3) 0 0; }
.ac-form-actions { flex-wrap: wrap; }
.ac-form-actions .btn { min-height: 44px; }
@media (max-width: 860px) {
  .ac-form-grid { grid-template-columns: minmax(0, 1fr); }
  .ac-form-preview { position: static; }
  .ac-form-actions .btn { flex: 1 1 45%; }
}
.ac-form-main .field { margin: 0; }
.ac-form-main { gap: var(--space-4); }
.ac-form-main > .pw-option { margin: 0; }
.ac-form-grid { grid-template-columns: minmax(0, 1.8fr) minmax(0, 1fr); }
.ac-tool { padding: 0 8px; }
.ac-form-preview { align-self: start; }
@media (max-width: 860px) { .ac-form-grid { grid-template-columns: minmax(0, 1fr); } }
