/* ==========================================================================
   MOBILE-FINTECH-1 (<=860px, screen only) — phone UI rebuilt to the two reference sets:
     A) green wallet app: greeting header + round buttons, dark balance card, 4 quick actions,
        rounded transaction list, floating centre button in the bottom nav, segmented pills
     B) ADOL app: 2-up stat cards, segmented Today/Weekly/Monthly, thumbnail product list
   Colours are NOT changed: every value is an existing token (brand green, deep green, soft green,
   slate neutrals). Only geometry, spacing and type change. Desktop/tablet >860px and print are untouched.
   Load LAST (after dash-donezo.css). Logic untouched: same DOM, same handlers, same routes.
   ========================================================================== */
/* MOBILE-FINTECH-4: injected Products chrome is phone-only */
.mfp-head, .mfp-filter-btn, .mfp-sheet { display: none; }
@media screen and (max-width: 860px) {
  :root {
    --radius-control:      12px;   /* inputs, buttons, chips: reference uses 12-14px */
    --radius-card-mobile:  20px;   /* cards and lists */
    --radius-hero-mobile:  24px;
    --mf-gutter:           20px;
    --mf-card-border:      1px solid var(--color-border-soft);
    --mf-card-shadow:      0 1px 2px rgba(16, 24, 40, .04);
    --shadow-card-mobile:  0 1px 2px rgba(16, 24, 40, .04);
    --mf-deep:             var(--color-primary-deep);
  }
  body { background: var(--color-bg); }

  /* ------------------------------------------------------------------
     1. Header: greeting (left) + round buttons (right), on the page colour
     ------------------------------------------------------------------ */
  .topbar, body[data-route="dashboard"] .topbar {
    position: sticky; top: 0; z-index: 40; height: 72px; padding: 14px var(--mf-gutter) 10px; gap: 12px;
    background: var(--color-bg); border-bottom: 0; box-shadow: none; color: var(--color-text);
  }
  body[data-route="dashboard"] .topbar { position: static; }
  .topbar-left { flex: 1; min-width: 0; gap: 0; }
  .topbar .menu-toggle { display: none; }
  .topbar-store { height: 44px; gap: 10px; background: none; border: 0; padding: 0; text-align: left; }
  .topbar-store .mark { width: 44px; height: 44px; padding: 8px; border-radius: 50%; background: var(--color-primary-soft); border: 0; }
  .topbar-store .mark.is-initial { padding: 0; font-size: 18px; font-weight: 600; color: var(--color-primary-hover); }
  .topbar-store i.ai { display: none; }
  .topbar-store .tb-greet, .topbar-store b { display: block; min-width: 0; padding: 0; height: auto; background: none; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .topbar-store .tb-greet { font-size: 17px; font-weight: 700; line-height: 22px; letter-spacing: -.01em; color: var(--color-text); }
  .topbar-store b { font-size: 12.5px; font-weight: 400; line-height: 16px; letter-spacing: 0; color: var(--color-text-muted); }
  .topbar-store.has-greet { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 10px; align-content: center; align-items: center; }
  .topbar-store.has-greet .mark { grid-row: 1 / 3; }
  .topbar-store.has-greet .mark[style*="none"] { display: none; }
  .topbar-store.has-greet .mark[style*="none"] ~ .tb-greet { grid-column: 1 / -1; }
  .topbar-store.has-greet .tb-greet { grid-column: 2; grid-row: 1; align-self: end; }
  .topbar-store.has-greet b { grid-column: 2; grid-row: 2; align-self: start; }

  .topbar .topbar-store.has-greet { flex: 1 1 auto; width: 100%; max-width: 100%; }
  .topbar .topbar-store.has-greet b { display: block; max-width: none; }
  .topbar-right { gap: 10px; }
  #refreshBtn, #viewStorefrontLink, #topbarSettingsLink, .topbar-account .who { display: none; }
  .topbar-right .icon-btn, .topbar-account .av {
    width: 44px; height: 44px; border-radius: 50%; background: var(--color-surface); color: var(--color-text);
    border: 1px solid var(--color-border-soft); box-shadow: var(--mf-card-shadow);
  }
  .topbar-right .icon-btn:hover, .topbar-right .icon-btn:focus-visible, .topbar-account .av:hover, .topbar-account .av:focus-visible { background: var(--color-surface-muted); }
  .topbar-right .icon-btn i.ai, .topbar-account .av i.ai { font-size: 20px; color: var(--color-text); }
  .topbar .icon-btn .notif-dot { top: 11px; right: 12px; border: 2px solid var(--color-surface); }

  /* page titles on every other screen: bold, left, like "Analytics" in the reference */
  .page-head h1 { font-size: 24px; line-height: 30px; font-weight: 700; letter-spacing: -.02em; color: var(--color-text); }
  .content { padding-left: var(--mf-gutter); padding-right: var(--mf-gutter); }
  body[data-route="dashboard"] .content { padding: 0 var(--mf-gutter) calc(104px + env(safe-area-inset-bottom, 0px)); }
  body[data-route="dashboard"] .dash-grid { gap: 24px; }

  /* ------------------------------------------------------------------
     2. Balance card (the old hero): deep green, left aligned, no edge bleed
     ------------------------------------------------------------------ */
  .dm-hero {
    display: flex; flex-direction: column; align-items: stretch; text-align: left;
    margin: 4px 0 0; padding: 18px 18px 16px; border-radius: var(--radius-card-mobile); overflow: hidden;
    background:
      radial-gradient(120% 90% at 100% 0%, rgba(255, 255, 255, .10) 0%, rgba(255, 255, 255, 0) 55%),
      linear-gradient(180deg, var(--color-primary-hover) 0%, var(--mf-deep) 100%);
    box-shadow: 0 8px 24px rgba(11, 59, 50, .22);
  }
  .dm-hero-label { order: 1; margin: 0; padding-right: 44px; font-size: 13.5px; font-weight: 500; line-height: 20px; color: rgba(255, 255, 255, .78); }
  .dm-eye { top: 10px; right: 10px; width: 36px; height: 36px; color: rgba(255, 255, 255, .86); }
  .dm-eye i.ai { font-size: 20px; }
  .dm-hero-val { order: 2; margin-top: 6px; font-size: clamp(32px, 9.6vw, 38px); font-weight: 700; line-height: 1.15; letter-spacing: -.03em; color: #fff; }
  .dm-hero-val.is-long { font-size: clamp(26px, 7.6vw, 32px); }
  .dm-hero-val .cur { margin-right: .28em; font-size: .5em; font-weight: 600; color: rgba(255, 255, 255, .78); letter-spacing: 0; }
  .dm-hero-chg { order: 3; justify-content: flex-start; margin-top: 10px; min-height: 0; font-size: 12.5px; color: rgba(255, 255, 255, .78); }
  .dm-chg { padding: 3px 10px; border-radius: 999px; background: rgba(255, 255, 255, .16); font-size: 12.5px; font-weight: 600; line-height: 18px; color: #fff; }
  .dm-chg.is-up { background: rgba(123, 211, 161, .28); color: #D5F5E3; }
  .dm-chg.is-down { background: rgba(240, 68, 56, .30); color: #FFE4E1; }
  .dm-split {
    order: 4; margin: 16px 0 0; background: rgba(255, 255, 255, .08); border: 0; border-radius: 14px; box-shadow: none; overflow: hidden;
  }
  .dm-split-i { padding: 10px 14px 10px; }
  .dm-split-i + .dm-split-i { border-left: 1px solid rgba(255, 255, 255, .12); }
  a.dm-split-i:active { background: rgba(255, 255, 255, .10); }
  .dm-split-i span:not(.dm-amt) { color: rgba(255, 255, 255, .70); }
  .dm-split-i b, .dm-split-i .dm-amt { color: #fff; }
  .dm-range {
    order: 5; width: 100%; max-width: none; margin: 14px 0 0; padding: 4px; gap: 4px;
    background: rgba(255, 255, 255, .10); border-radius: 999px;
  }
  .dm-range button { min-height: 34px; border-radius: 999px; font-size: 13px; font-weight: 500; color: rgba(255, 255, 255, .82); }
  .dm-range button.is-on { background: #fff; color: var(--mf-deep); font-weight: 600; box-shadow: 0 1px 2px rgba(0, 0, 0, .12); }

  /* ------------------------------------------------------------------
     3. Quick actions: no card, four 56px tiles with the label underneath
     ------------------------------------------------------------------ */
  .dash-quick-wrap { padding: 0; background: none; border-radius: 0; box-shadow: none; }
  .dash-quick-head { display: none; }
  #view-dashboard .dash-quick { gap: 8px; }
  .dash-quick .more-tile { gap: 8px; padding: 0; background: none; box-shadow: none; }
  .dash-quick .more-tile-ic { width: 56px; height: 56px; border-radius: 18px; background: var(--color-surface); border: 1px solid var(--color-border-soft); box-shadow: var(--mf-card-shadow); color: var(--mf-deep); }
  .dash-quick .more-tile-ic i.ai { font-size: 22px; }
  .dash-quick .more-tile:active .more-tile-ic { background: var(--color-primary-soft); }
  .dash-quick .more-tile-tx { font-size: 12px; font-weight: 500; line-height: 16px; color: var(--color-text); text-align: center; }

  /* ------------------------------------------------------------------
     4. Recent activity: "Recent Transactions" list
     ------------------------------------------------------------------ */
  .dm-head { margin-bottom: 10px; }
  .dm-head h3 { font-size: 18px; font-weight: 700; line-height: 24px; letter-spacing: -.01em; }
  .dm-head a { padding: 8px 0 8px 12px; font-size: 13.5px; font-weight: 500; color: var(--color-text-muted); }
  .dm-head a::after { content: " \2192"; }
  .dm-list { padding: 4px 16px; border: var(--mf-card-border); border-radius: var(--radius-card-mobile); box-shadow: var(--mf-card-shadow); }
  .dm-row { align-items: center; gap: 12px; min-height: 64px; padding: 12px 0; }
  .dm-row-ic { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 44px; height: 44px; border-radius: 50%; background: var(--color-primary-soft); color: var(--color-primary-hover); }
  .dm-row-ic i.ai { font-size: 20px; }
  .dm-row-ic.has-img { width: 48px; height: 48px; border-radius: 12px; overflow: hidden; background: var(--color-surface-muted); }
  .dm-row-ic.has-img img { display: block; width: 100%; height: 100%; object-fit: cover; }
  .dm-row-ic.is-pos { background: var(--color-surface-muted); color: var(--color-text); }
  .dm-row-main b { font-size: 15px; font-weight: 600; line-height: 20px; }
  .dm-row-main small { font-size: 12.5px; line-height: 17px; }
  .dm-row-main small + small { display: none; }          /* time moves to the right column, like the date in the reference */
  .dm-row-side { align-items: flex-end; gap: 2px; max-width: 42%; }
  .dm-row-side > b { font-size: 15px; font-weight: 700; }
  .dm-row-time { font-size: 12px; line-height: 16px; color: var(--color-text-muted); white-space: nowrap; }
  .dm-chip { padding: 1px 8px; font-size: 11px; font-weight: 600; line-height: 16px; }
  .dm-chip.is-ok { background: var(--color-success-soft); color: var(--color-success-text); }
  .dm-chip.is-bad { background: var(--color-danger-soft); color: var(--color-danger-text); }
  .dm-chip.is-info { background: var(--color-primary-soft); color: var(--color-primary-hover); }
  .dm-trends-btn { min-height: 56px; border: var(--mf-card-border); border-radius: var(--radius-card-mobile); box-shadow: var(--mf-card-shadow); font-size: 16px; font-weight: 700; }
  .dm-target, .dash-src, .dash-share { border: var(--mf-card-border); border-radius: var(--radius-card-mobile); box-shadow: var(--mf-card-shadow); }

  /* ------------------------------------------------------------------
     5. Generic cards / segmented controls on every other phone screen
     ------------------------------------------------------------------ */
  .card, .dash-card, .table-wrap, .dash-table-wrap { border-radius: var(--radius-card-mobile); }
  .card, .dash-card { border: var(--mf-card-border); box-shadow: var(--mf-card-shadow); }
  .dpk-pill, .seg, .segmented, .tabs, .tab-bar { border-radius: 999px; }
  .seg button, .segmented button, .tabs .tab, .tab-bar .tab { border-radius: 999px; }

  /* ------------------------------------------------------------------
     6. Bottom nav: white sheet with rounded top, floating centre button (POS)
     ------------------------------------------------------------------ */
  .mobile-bottom-nav {
    height: calc(68px + env(safe-area-inset-bottom, 0px)); padding: 0 8px env(safe-area-inset-bottom, 0px);
    background: var(--color-surface); border: 0; border-radius: 26px 26px 0 0;
    box-shadow: 0 -4px 24px rgba(16, 24, 40, .08);
  }
  .bottom-nav-link { height: 68px; color: var(--color-text-muted); }
  .bottom-nav-link i.ai { font-size: 24px; }
  .bottom-nav-link span { margin-top: 4px; font-size: 11px; font-weight: 500; line-height: 14px; }
  .bottom-nav-link.active, .bottom-nav-link.active:hover { color: var(--mf-deep); }
  .bottom-nav-link.active span { font-weight: 700; }
  .bottom-nav-pos { overflow: visible; }
  .bottom-nav-pos i.ai {
    width: 56px; height: 56px; margin-top: -26px; font-size: 24px; border-radius: 50%;
    background: var(--mf-deep); color: #fff; border: 4px solid var(--color-surface);
    box-shadow: 0 6px 16px rgba(11, 59, 50, .35);
  }
  .bottom-nav-pos:hover i.ai, .bottom-nav-pos:active i.ai, .bottom-nav-pos.active i.ai { background: var(--mf-deep); }
  .bottom-nav-pos span { margin-top: 2px; }
  .bottom-nav-pos.active span { color: var(--mf-deep); }
  .bottom-nav-link .count-badge { top: 8px; }

  /* ------------------------------------------------------------------
     7. Product list (ADOL right phone): thumbnail | name / price · stock | status
     ------------------------------------------------------------------ */
  .table-wrap.mc-wrap { border: var(--mf-card-border); border-radius: var(--radius-card-mobile); background: var(--color-surface); box-shadow: var(--mf-card-shadow); overflow: hidden; }
  table.mc-cards tr.mc-row { padding: 14px 16px; border-top: 1px solid var(--color-border-soft); }
  table.mc-cards.mc-core tr.mc-row { grid-template-columns: auto minmax(0, 1fr) auto; column-gap: 0; row-gap: 0; padding-top: 12px; padding-bottom: 12px; }
  table.mc-cards.mc-core tr.mc-row > td.mc-title { grid-column: 1 / 3; grid-row: 1; }
  table.mc-cards.mc-core tr.mc-row > td.mc-title .row-title { gap: 12px; }
  table.mc-cards.mc-core tr.mc-row > td.mc-title .row-thumb { width: 48px; height: 48px; border-radius: 10px; flex: none; object-fit: cover; }
  table.mc-cards.mc-core tr.mc-row > td.mc-title .row-title .name { font-size: 14.5px; font-weight: 600; line-height: 20px; }
  table.mc-cards.mc-core tr.mc-row > td.mc-amt { grid-column: 1; grid-row: 2; justify-self: start; margin: 2px 0 0 0; white-space: nowrap; font-size: 12.5px; font-weight: 400; line-height: 18px; color: var(--color-text-muted); }
  table.mc-cards.mc-core tr.mc-row:has(.row-thumb) > td.mc-amt { margin-left: 60px; }
  table.mc-cards.mc-core tr.mc-row.mc-lean > td.mc-meta.mc-qty { grid-column: 2; grid-row: 2; margin: 2px 0 0 6px; font-size: 12.5px; font-weight: 400; line-height: 18px; white-space: nowrap; color: var(--color-text-muted); }
  table.mc-cards.mc-core tr.mc-row.mc-lean > td.mc-meta.mc-qty::before { font-size: 12.5px; font-weight: 400; }
  table.mc-cards.mc-core tr.mc-row.mc-lean > td.mc-meta.mc-qty::before { content: "\00b7  " attr(data-qty); }
  table.mc-cards.mc-core tr.mc-row.mc-lean > td.mc-meta.mc-qty.mc-low { color: var(--color-danger-text); }
  table.mc-cards.mc-core tr.mc-row.mc-lean > td.mc-meta.mc-qty.mc-low::before { content: "\00b7  " attr(data-qty); font-weight: 600; }
  table.mc-cards.mc-core tr.mc-row > td.mc-status { grid-column: 3; grid-row: 1 / 3; align-self: center; justify-self: end; margin: 0; }
  table.mc-cards .badge, table.ord-cards .badge, table.mc-cards .dash-badge { border-radius: 999px; padding: 2px 10px; font-size: 11.5px; line-height: 18px; }
  table.mc-cards .badge.badge-success, table.ord-cards .badge.badge-success, table.mc-cards .dash-badge.is-success { background: var(--color-success-soft); color: var(--color-success-text); }
  table.mc-cards .badge.badge-warning, table.mc-cards .badge.badge-danger, table.ord-cards .badge.badge-warning, table.ord-cards .badge.badge-danger, table.mc-cards .dash-badge.is-warning { background: var(--color-danger-soft); color: var(--color-danger-text); }
  table.mc-cards .badge:not(.badge-success):not(.badge-warning):not(.badge-danger), table.ord-cards .badge:not(.badge-success):not(.badge-warning):not(.badge-danger), table.mc-cards .dash-badge:not(.is-success):not(.is-warning) { background: var(--color-primary-soft); color: var(--color-primary-hover); }
  .mc-sortbar { padding: 12px 16px; }
  .mc-sel-btn, .mc-sel-all, .mc-sort-dir { border-radius: 999px; }


  /* ------------------------------------------------------------------
     8. MOBILE-FINTECH-2 — ADOL "Sales Report" table: real compact table with a header row,
        No | Product Name | figures (right aligned). Applies to every analytics table (.dash-table).
     ------------------------------------------------------------------ */
  .card:has(> .dash-table-wrap.mc-wrap) { padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; }
  .dash-table-wrap.mc-wrap { padding: 0; border: 1px solid var(--color-border-soft); border-radius: 16px; background: var(--color-surface); box-shadow: none; overflow: hidden; }
  table.dash-table.mc-cards { display: table; width: 100%; table-layout: fixed; border-collapse: collapse; counter-reset: mfno; }
  table.dash-table.mc-cards thead { display: table-header-group; }
  table.dash-table.mc-cards thead tr { display: table-row; background: var(--color-bg); }
  table.dash-table.mc-cards tbody { display: table-row-group; }
  table.dash-table.mc-cards th {
    display: table-cell; width: 20%; padding: 10px 6px; border: 0; border-bottom: 1px solid var(--color-border-soft); background: none;
    font-size: 12px; font-weight: 600; line-height: 16px; letter-spacing: 0; text-align: right; white-space: nowrap; color: var(--color-text-muted);
  }
  table.dash-table.mc-cards th:first-child { width: auto; padding-left: 12px; text-align: left; }
  table.dash-table.mc-cards th:last-child, table.dash-table.mc-cards tr.mc-row > td:last-child { width: 25%; padding-right: 12px; }
  table.dash-table.mc-cards tr.mc-row > td .badge, table.dash-table.mc-cards tr.mc-row > td .dash-badge { padding: 2px 8px; font-size: 11px; }
  table.dash-table.mc-cards th:first-child::before { content: "No"; display: inline-block; width: 36px; }
  table.dash-table.mc-cards th.mc-hide, table.dash-table.mc-cards tr.mc-row > td.mc-hide, table.dash-table.mc-cards tr.mc-row > td.mc-empty { display: none; }
  table.dash-table.mc-cards tr.mc-row { display: table-row; padding: 0; counter-increment: mfno; border: 0; background: none; }
  table.dash-table.mc-cards tr.mc-row::before { content: none; }
  table.dash-table.mc-cards tr.mc-row > td {
    display: table-cell; padding: 10px 8px; border-top: 1px solid var(--color-border-soft); vertical-align: middle;
    font-size: 12.5px; font-weight: 500; line-height: 16px; text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--color-text);
  }
  table.dash-table.mc-cards tbody tr.mc-row:first-child > td { border-top: 0; }
  table.dash-table.mc-cards tr.mc-row > td:first-child { padding-left: 12px; text-align: left; }
  table.dash-table.mc-cards tr.mc-row > td.mc-status { overflow: visible; text-overflow: clip; }
  table.dash-table.mc-cards tr.mc-row > td:first-child::before { content: counter(mfno); display: inline-block; width: 36px; vertical-align: middle; font-size: 12.5px; font-weight: 500; letter-spacing: 0; color: var(--color-text-muted); }
  table.dash-table.mc-cards tr.mc-row > td:first-child > * { display: inline-flex; vertical-align: middle; width: calc(100% - 40px); }
  table.dash-table.mc-cards tr.mc-row > td.mc-title .row-title { gap: 8px; align-items: center; min-width: 0; }
  table.dash-table.mc-cards tr.mc-row > td.mc-title .row-thumb { width: 28px; height: 28px; border-radius: 6px; flex: none; object-fit: cover; }
  table.dash-table.mc-cards tr.mc-row > td.mc-title .row-title .name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12.5px; font-weight: 500; line-height: 16px; }
  table.dash-table.mc-cards tr.mc-row > td.mc-title .row-title .name small { display: none; }
  table.dash-table.mc-cards tr.mc-row > td.mc-meta[data-label]::before { content: none; display: none; }
  table.dash-table.mc-cards tr.mc-row > td.mc-meta, table.dash-table.mc-cards tr.mc-row > td.mc-amt, table.dash-table.mc-cards tr.mc-row > td.mc-status { margin: 0; font-size: 12.5px; font-weight: 500; line-height: 16px; color: var(--color-text); }
  table.dash-table.mc-cards tr.mc-plain { display: table-row; }
  table.dash-table.mc-cards tr.mc-plain > td { display: table-cell; padding: 14px 12px; text-align: left; white-space: normal; border-top: 1px solid var(--color-border-soft); }

  /* ------------------------------------------------------------------
     9. MOBILE-FINTECH-2 — ADOL "Product List": flat rows on the page (no outer card), hairline dividers,
        56px thumbnail | name / "price · N in stock" | "Edit" on the right
     ------------------------------------------------------------------ */
  .card.card-flush:has(table.mc-core) { border: 0; border-radius: 0; background: none; box-shadow: none; }
  .table-wrap.mc-wrap:has(table.mc-core) { border: 0; border-radius: 0; background: none; box-shadow: none; }
  table.mc-cards.mc-core tr.mc-row { grid-template-columns: auto minmax(0, 1fr) auto; align-content: center; min-height: 80px; padding: 12px 0; border-top: 1px solid var(--color-border-soft); }
  table.mc-cards.mc-core tbody:first-of-type tr.mc-row:first-child { border-top: 0; }
  table.mc-cards.mc-core tr.mc-row > td.mc-title { grid-column: 1 / 3; grid-row: 1; }
  table.mc-cards.mc-core.mc-selecting tr.mc-row .row-thumb { left: 52px; }
  table.mc-cards.mc-core tr.mc-row > td.mc-title .row-title { display: block; padding-left: 68px; }
  table.mc-cards.mc-core tr.mc-row > td.mc-title .row-thumb { position: absolute; left: 0; top: 50%; transform: translateY(-50%); width: 56px; height: 56px; border-radius: 8px; border: 1px solid var(--color-border-soft); background: var(--color-surface); object-fit: cover; }
  table.mc-cards.mc-core tr.mc-row > td.mc-title .row-title .name { font-size: 16px; font-weight: 600; line-height: 22px; }
  table.mc-cards.mc-core tr.mc-row > td.mc-amt { font-size: 14px; line-height: 20px; }
  table.mc-cards.mc-core tr.mc-row > td.mc-title .row-title .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  table.mc-cards.mc-core tr.mc-row:has(.row-thumb) > td.mc-amt { margin-left: 68px; }
  table.mc-cards.mc-core tr.mc-row.mc-lean > td.mc-meta.mc-qty { font-size: 14px; line-height: 20px; }
  table.mc-cards.mc-core tr.mc-row.mc-lean > td.mc-meta.mc-qty::before { font-size: 14px; line-height: 20px; }
  table.mc-cards.mc-core tr.mc-row > td.mc-status { grid-column: 3; grid-row: 1 / 3; align-self: center; justify-self: end; margin: 0 0 0 12px; text-align: right; }
  table.mc-cards.mc-core tr.mc-row > td.mc-status > * { display: none; }
  table.mc-cards.mc-core tr.mc-row > td.mc-status::after { content: "Edit"; display: block; font-size: 14px; font-weight: 500; line-height: 20px; color: var(--color-primary); }
  table.mc-cards.mc-core tr.mc-row > td.mc-status:has(.badge:not(.badge-success))::before { content: "Draft"; display: block; font-size: 11px; font-weight: 500; line-height: 14px; color: var(--color-text-muted); }


  /* ------------------------------------------------------------------
     10. MOBILE-FINTECH-5 — every list page (.mfp-page) = ADOL "Product List" header:
         bold title + outlined (+) + (⋮), then one search pill with a filter button. No top bar, no dropdowns.
     ------------------------------------------------------------------ */
  body:has(.view.active.mfp-page) .topbar { display: none; }
  body:has(.view.active.mfp-page) .content { padding-top: 16px; }
  .mfp-page .mfp-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 16px; }
  .mfp-page .mfp-head h1 { margin: 0; font-size: 26px; line-height: 32px; font-weight: 700; letter-spacing: -.02em; color: var(--color-text); }
  .mfp-page .mfp-head-btns { display: flex; align-items: center; gap: 12px; }
  .mfp-page .mfp-add { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; padding: 0; border: 1.5px solid var(--color-text); border-radius: 10px; background: transparent; color: var(--color-text); cursor: pointer; }
  .mfp-page .mfp-more { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 38px; padding: 0; border: 0; background: transparent; color: var(--color-text); cursor: pointer; }
  .mfp-page .mfp-add:active, .mfp-page .mfp-more:active { opacity: .6; }
  .mfp-page .mfp-head svg { width: 20px; height: 20px; }
  .mfp-page .mfp-more svg { width: 22px; height: 22px; }

  .mfp-page .toolbar { display: block; margin: 0 0 12px; padding: 0; }
  .mfp-page .toolbar-left { width: 100%; }
  .mfp-page .toolbar-left { display: block; }
  .mfp-page .toolbar > :not(.toolbar-left), .mfp-page .toolbar-left > :not(.search-box) { display: none !important; }
  .mfp-page .toolbar .search-box {
    display: flex; align-items: center; gap: 10px; width: 100%; min-width: 0; height: 48px; padding: 0 6px 0 16px; box-sizing: border-box;
    border: 1px solid var(--color-border-soft); border-radius: 999px; background: var(--color-surface-muted, #F3F4F6); box-shadow: none;
  }
  .mfp-page .toolbar .search-box:focus-within { border-color: var(--color-border-strong); background: var(--color-surface); }
  .mfp-page .toolbar .search-box > i.ai { flex: none; color: var(--color-text-muted); }
  .mfp-page .toolbar .search-box > i.ai svg { width: 20px; height: 20px; }
  .mfp-page .toolbar .search-box input { flex: 1; min-width: 0; height: 100%; padding: 0; border: 0; background: transparent; font-size: 16px; color: var(--color-text); }
  .mfp-page .toolbar .search-box input::placeholder { color: var(--color-text-muted); opacity: 1; }
  .mfp-page .mfp-filter-btn { position: relative; display: inline-flex; align-items: center; justify-content: center; flex: none; width: 38px; height: 38px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--color-text); cursor: pointer; }
  .mfp-page .mfp-filter-btn:active { background: var(--color-surface); }
  .mfp-page .mfp-filter-btn.has-active::after { content: ""; position: absolute; top: 7px; right: 7px; width: 8px; height: 8px; border-radius: 50%; background: var(--color-primary); border: 2px solid var(--color-surface-muted, #F3F4F6); box-sizing: content-box; }

  /* sort + select bar: only while Select mode is on (sorting lives in the Filter sheet, Select in the ⋮ sheet) */
  .mfp-page .mc-sortbar { display: none; }
  .mfp-page .card:has(.mc-selecting) .mc-sortbar { display: flex; border-bottom: 0; background: none; padding: 0 0 10px; }
  .mfp-page .card:has(.mc-selecting) .mc-sort-wrap { display: none; }

  /* Filter sheet */
  .mfp-sheet { display: block; }
  .mfp-sheet .mfp-field { display: block; margin: 0 0 14px; padding: 0 8px; }
  .mfp-sheet .mfp-field > span { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 600; color: var(--color-text-muted); }
  .mfp-sheet select { width: 100%; height: 48px; padding: 0 12px; box-sizing: border-box; border: 1px solid var(--color-border-strong); border-radius: 12px; background: var(--color-surface); font-size: 16px; color: var(--color-text); }
  .mfp-sheet .mfp-sortrow { display: flex; gap: 8px; }
  .mfp-sheet .mfp-dir { flex: none; width: 48px; height: 48px; border: 1px solid var(--color-border-strong); border-radius: 12px; background: var(--color-surface); color: var(--color-text); }
  .mfp-sheet .mfp-actions { display: flex; gap: 10px; padding: 6px 8px 0; }
  .mfp-sheet .mfp-actions button { flex: 1; height: 48px; border-radius: 999px; font-size: 16px; font-weight: 600; cursor: pointer; }
  .mfp-sheet .mfp-clear { border: 1px solid var(--color-border-strong); background: var(--color-surface); color: var(--color-text); }
  .mfp-sheet .mfp-done { border: 0; background: var(--color-primary); color: #fff; }

  /* ------------------------------------------------------------------
     11. MOBILE-FINTECH-5 — all other tables: same flat list as Product List (no outer card, hairline dividers, edge-to-edge in the gutter)
     ------------------------------------------------------------------ */
  .card.card-flush:has(> .table-wrap.mc-wrap), .card.card-flush:has(table.ord-cards) { border: 0; border-radius: 0; background: none; box-shadow: none; }
  .table-wrap.mc-wrap:not(.dash-table-wrap), .card.card-flush .table-wrap:has(table.ord-cards) { border: 0; border-radius: 0; background: none; box-shadow: none; }
  table.mc-cards:not(.dash-table):not(.inv-lines) tr.mc-row:not(.mc-form-row) { padding-left: 0; padding-right: 0; }
  table.mc-cards:not(.dash-table):not(.inv-lines) tr.mc-row.mc-lean.mc-menu { padding-right: 40px; }
  table.mc-cards:not(.dash-table):not(.inv-lines) tr.mc-row.mc-lean.mc-menu > td.mc-act { right: -6px; }
  table.mc-cards:not(.mc-core):not(.dash-table) tr.mc-row > td.mc-title, table.mc-cards:not(.mc-core):not(.dash-table) tr.mc-row > td.mc-title .row-title .name { font-size: 16px; line-height: 22px; }
  table.ord-cards tr:not(.ord-sec) { padding-left: 0; padding-right: 0; }
  table.ord-cards tr > td:nth-child(2) { font-size: 16px; line-height: 22px; }
  table.ord-cards tr.ord-sec > td { padding-left: 12px; padding-right: 12px; border-radius: 10px; }
  .mc-sortbar { padding-left: 0; padding-right: 0; }

  /* sheets and dialogs */
  .mc-sheet-panel, .more-sheet { border-radius: 26px 26px 0 0; }
}
@media (prefers-reduced-motion: reduce) { .bottom-nav-link, .dm-row { transition: none; } }

/* ==========================================================================
   MOBILE-FINTECH-6 — WhatsApp-style multi-select on phone lists (<=860px, screen only).
   Colours/metrics sampled from the reference screenshots (WhatsApp Business chat list, 720px-wide capture ≈ 411dp):
     action bar #F6F5F3 · selected row #F2EEEB · ink #212121 · menu white, 180px wide, 44px items, 12px radius
   JS: js/mobile-tables.js (.mc-abar / .mc-amenu are built there). Rows: no checkbox column — tint + black check badge on the avatar.
   ========================================================================== */
@media screen and (max-width: 860px) {
  :root { --mc-sel-bg: #F2EEEB; --mc-bar-bg: #F6F5F3; --mc-ink: #212121; }

  /* contextual action bar */
  .mc-abar[hidden], .mc-amenu[hidden] { display: none !important; }
  .mc-abar {
    position: fixed; top: 0; left: 0; right: 0; z-index: 1100; box-sizing: border-box;
    height: calc(52px + env(safe-area-inset-top, 0px)); padding: env(safe-area-inset-top, 0px) 0 0 4px;
    display: flex; align-items: center; background: var(--mc-bar-bg); color: var(--mc-ink); -webkit-tap-highlight-color: transparent;
  }
  .mc-ab-btn {
    flex: none; display: grid; place-items: center; width: 44px; height: 44px; margin: 0; padding: 0; border: 0; border-radius: 50%;
    background: transparent; color: var(--mc-ink); cursor: pointer;
  }
  .mc-ab-btn svg { width: 24px; height: 24px; }
  .mc-ab-btn:active { background: rgba(0, 0, 0, .08); }
  .mc-ab-btn:disabled { opacity: .38; pointer-events: none; }
  .mc-ab-more { width: 40px; }
  .mc-ab-count { flex: 1; min-width: 0; margin-left: 18px; font-size: 20px; line-height: 24px; font-weight: 400; color: var(--mc-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .mc-abar.is-empty .mc-ab-count { font-size: 17px; }
  .mc-ab-acts { flex: none; display: flex; align-items: center; }

  /* overflow menu */
  .mc-amenu {
    position: fixed; z-index: 1101; top: calc(env(safe-area-inset-top, 0px) + 46px); right: 4px; width: 180px; box-sizing: border-box; padding: 10px 0;
    background: #fff; border-radius: 12px; box-shadow: 0 1px 3px rgba(0, 0, 0, .2), 0 6px 20px rgba(0, 0, 0, .18);
  }
  .mc-amenu button { display: block; width: 100%; height: 44px; margin: 0; padding: 0 16px; border: 0; border-radius: 0; background: transparent; text-align: left; font: inherit; font-size: 15px; line-height: 44px; color: var(--mc-ink); cursor: pointer; }
  .mc-amenu button:active { background: var(--mc-sel-bg); }
  .mc-amenu button.is-danger { color: var(--color-danger, #D92D20); }
  .mc-amenu button:disabled { opacity: .38; pointer-events: none; }

  /* the old Select/Done/All strip and the floating bulk bar are replaced by the action bar */
  body.mc-abar-on .mc-sortbar, body.mc-abar-on .bulk-bar { display: none !important; }
  body.mc-abar-on .mobile-bottom-nav { display: none !important; }

  /* rows: no checkbox column, no layout shift for rows that already have a thumbnail */
  table.mc-cards.mc-selecting tr.mc-row, table.ord-cards.mc-selecting tr:not(.ord-sec) { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
  table.mc-cards.mc-selecting tr.mc-row:is(.mc-has-img, :has(.row-thumb)) > td.mc-chk { display: none; }
  table.mc-cards.mc-selecting tr.mc-row:is(.mc-has-img, :has(.row-thumb)) { padding-left: inherit; }
  table.mc-cards.mc-selecting.mc-core tr.mc-row .row-thumb { left: 0; }

  /* rows without a picture get a neutral 40px avatar circle (the old checkbox cell, restyled) */
  table.mc-cards.mc-selecting:not(.dash-table):not(.inv-lines) tr.mc-row:not(.mc-form-row):not(.mc-has-img):not(:has(.row-thumb)),
  table.ord-cards.mc-selecting tr:not(.ord-sec) { padding-left: 52px; }
  table.mc-cards.mc-selecting tr.mc-row:not(.mc-has-img):not(:has(.row-thumb)) > td.mc-chk,
  table.ord-cards.mc-selecting tr:not(.ord-sec) > td:nth-child(1) {
    display: block; position: absolute; left: 0; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; margin: 0; padding: 0; border: 0; border-radius: 50%; background: #E9E5E1; overflow: hidden;
  }
  table.mc-cards.mc-selecting tr.mc-row > td.mc-chk input, table.ord-cards.mc-selecting tr:not(.ord-sec) > td:nth-child(1) input {
    position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; pointer-events: none;
  }

  /* selected row: warm tint edge to edge (bleeds through the page gutter, no gaps between rows) */
  table.mc-cards.mc-selecting tr.mc-row:has(td.mc-chk input:checked),
  table.ord-cards.mc-selecting tr:not(.ord-sec):has(> td:nth-child(1) input:checked) {
    background: var(--mc-sel-bg); border-top-color: var(--mc-sel-bg);
    box-shadow: calc(-1 * var(--m-gutter, 16px)) 0 0 var(--mc-sel-bg), var(--m-gutter, 16px) 0 0 var(--mc-sel-bg);
  }
  /* black check badge, bottom-right of the avatar (20px disc + 2px ring in the row tint) */
  table.mc-cards.mc-selecting tr.mc-row:has(td.mc-chk input:checked)::after,
  table.ord-cards.mc-selecting tr:not(.ord-sec):has(> td:nth-child(1) input:checked)::after {
    content: ""; position: absolute; z-index: 3; left: 20px; top: 50%; width: 20px; height: 20px; box-sizing: content-box; border: 2px solid var(--mc-sel-bg); border-radius: 50%; pointer-events: none;
    background: #1B1B1B url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 12px 12px no-repeat;
  }
  /* rows with a thumbnail: the badge sits on the thumbnail's bottom-right corner instead */
  table.mc-cards.mc-selecting tr.mc-row:is(.mc-has-img, :has(.row-thumb)):has(td.mc-chk input:checked)::after { left: 35px; top: calc(50% + 7px); }
}
