/* ==========================================================================
   MOBILE-LOOP-1 (<=860px, screen only) — phone admin rebuilt pixel-for-pixel to the LOOP reference screens:
   deep-green->brand-green hero with centred balance + 4 translucent action tiles, white "Quick Actions" card, green promo banner,
   flat 5-tab bottom bar with an green top indicator, left slide-in drawer, lavender filter chips, white list cards,
   centred page headers with a back arrow, grey filled form fields, brand-green primary buttons.
   Presentation only: same DOM/handlers/routes. Desktop/tablet (>860px) and print are untouched. Load LAST.
   Reference sizes are 720px-wide screenshots, i.e. 1px here = 2px there.
   ========================================================================== */
@font-face { font-family: 'Poppins'; src: url('fonts/poppins-latin-400-normal.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Poppins'; src: url('fonts/poppins-latin-500-normal.woff2') format('woff2'); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: 'Poppins'; src: url('fonts/poppins-latin-600-normal.woff2') format('woff2'); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: 'Poppins'; src: url('fonts/poppins-latin-700-normal.woff2') format('woff2'); font-weight: 700; font-style: normal; font-display: swap; }

/* phone-only blocks injected into the dashboard are hidden everywhere else */
.dm-qa, .dm-promo, .lp-back { display: none; }
.dm-qa, .dm-promo { grid-column: 1 / -1; }

@media screen and (max-width: 860px) {
  html:root {
    --lp-orange: #168A4E; --lp-cta: #168A4E; --lp-purple: #0F6E3E; --lp-lav: #E3F4EB; --lp-lav-ink: #3F7F5E;
    --lp-bg: #F0F0F5; --lp-ink: #0F0F14; --lp-mute: #6E6E78; --lp-line: #D9D9DF; --lp-g: 19px;
    --color-primary: #168A4E; --color-primary-hover: #0F6E3E; --color-primary-soft: #E3F4EB; --color-primary-soft-border: #BFE3CE;
    --color-primary-deep: #0B3B32; --mf-deep: #0B3B32;
    --color-bg: #F0F0F5; --color-surface-muted: #F6F6F9; --color-border-soft: #E7E7EC; --color-border: #E1E1E7;
    --color-text: #0F0F14; --color-text-secondary: #2C2C34; --color-text-muted: #6E6E78;
    --color-success-soft: #E4F5EC; --color-success-text: #1E7A46;
    --radius-card-mobile: 20px; --radius-control: 14px; --mf-gutter: 19px;
    --mf-card-border: 0 solid transparent; --mf-card-shadow: none; --shadow-card-mobile: none;
  }
  body, button, input, select, textarea { font-family: 'Poppins', 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif; }
  body { background: var(--lp-bg); color: var(--lp-ink); }
  .content { padding-left: var(--lp-g); padding-right: var(--lp-g); }

  /* ---------------------------------------------------------------- 1. Header (greeting + icons) */
  .topbar { height: 64px; padding: 16px var(--lp-g) 0; background: #fff; }
  .topbar-store .mark, .topbar-store .mark.is-initial {
    width: 30px; height: 30px; padding: 0; background: #fff; border: 1px solid var(--lp-orange); color: var(--lp-orange);
    font-size: 14px; font-weight: 500; box-shadow: none;
  }
  .topbar-store .tb-greet { font-size: 14px; line-height: 20px; font-weight: 400; letter-spacing: 0; color: var(--lp-ink); }
  .topbar-store b { font-size: 16px; line-height: 22px; font-weight: 600; letter-spacing: 0; color: var(--lp-ink); }
  .topbar-store, .topbar .topbar-store.has-greet { height: auto; min-height: 30px; }
  .topbar-store.has-greet { column-gap: 10px; row-gap: 0; }
  .topbar-store .tb-greet, .topbar-store b { margin: 0; }
  .topbar-account, #topbarAccount { display: none; }
  .topbar-right { gap: 18px; }
  .topbar-right .icon-btn { width: 28px; height: 28px; border: 0; background: transparent; box-shadow: none; border-radius: 0; color: var(--lp-ink); }
  .topbar-right .icon-btn i.ai, .topbar-right .icon-btn i.ai svg { width: 24px; height: 24px; font-size: 24px; color: inherit; }
  .topbar .icon-btn .notif-dot { top: 1px; right: 2px; width: 8px; height: 8px; border: 0; background: #F2594A; }

  /* dashboard: header sits ON the gradient */
  body[data-route="dashboard"] .topbar { position: relative; z-index: 6; height: 72px; padding: 20px var(--lp-g) 0; background: transparent; }
  body[data-route="dashboard"] .topbar .tb-greet, body[data-route="dashboard"] .topbar-store b, body[data-route="dashboard"] .topbar-right .icon-btn { color: #fff; }
  body[data-route="dashboard"] .topbar .tb-greet { font-size: 15px; font-weight: 400; }
  body[data-route="dashboard"] .topbar-store b { font-size: 17px; font-weight: 600; }
  body[data-route="dashboard"] .topbar-store .mark, body[data-route="dashboard"] .topbar-store .mark.is-initial { border-color: #fff; }
  body[data-route="dashboard"] .topbar .icon-btn .notif-dot { background: #FF4D3D; box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .0); }
  body[data-route="dashboard"] .content { padding: 0 var(--lp-g) calc(96px + env(safe-area-inset-bottom, 0px)); }
  body[data-route="dashboard"] .page-head { display: none; }
  body[data-route="dashboard"] .dash-grid { gap: 20px; }

  /* ---------------------------------------------------------------- 2. Hero */
  body[data-route="dashboard"] .dm-hero {
    position: relative; display: flex; flex-direction: column; align-items: center; text-align: center;
    height: 310px; margin: -72px calc(var(--lp-g) * -1) 0; padding: 82px 20px 0; border-radius: 0 0 36px 36px; overflow: visible;
    background: linear-gradient(180deg, #0B3B32 0%, #0E5538 34%, #12733F 68%, #1A9A58 100%); box-shadow: none;
  }
  .dm-hero::before {
    content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: .065;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='580 540 790 842'%3E%3Cg fill='%23fff'%3E%3Cpolygon points='594,881 784,551 1197,551 1353,826 1189,926 970,926 970,828 1244,828 1142,645 836,645 675,927'/%3E%3Cpolygon points='594,1041 784,1371 1197,1371 1353,1096 1189,996 970,996 970,1094 1244,1094 1142,1277 836,1277 675,995'/%3E%3C/g%3E%3C/svg%3E") no-repeat 50% 14px / auto 250px;
  }
  .dm-hero > * { position: relative; }
  .dm-hero-label { order: 1; padding: 0; font-size: 15px; font-weight: 500; line-height: 22px; color: #fff; }
  .dm-hero-val {
    order: 2; display: inline-flex; align-items: center; justify-content: center; gap: 10px; margin-top: 4px;
    font-size: 34px; font-weight: 600; line-height: 46px; letter-spacing: 0; color: #fff;
  }
  .dm-hero-val.is-long { font-size: 30px; }
  .dm-hero-val .cur { margin: 0 6px 0 0; font-size: 15px; font-weight: 500; color: rgba(255, 255, 255, .9); align-self: flex-end; line-height: 38px; }
  .dm-hero-val .dm-eye, .dm-eye { position: static; width: 28px; height: 28px; margin: 0; color: #fff; background: none; border: 0; }
  .dm-hero-val .dm-eye i.ai, .dm-eye i.ai { font-size: 22px; }
  .dm-hero-chg { order: 3; margin-top: 0; }
  .dm-chg { padding: 1px 10px; font-size: 12px; line-height: 18px; background: rgba(255, 255, 255, .2); }
  .dm-split { display: none !important; }
  .dm-split-unused { order: 4; display: flex; align-items: center; justify-content: center; gap: 0; width: auto; margin: 4px 0 0; padding: 0; background: none; border-radius: 0; }
  .dm-split-i { display: inline-flex; align-items: baseline; gap: 6px; padding: 0; font-size: 14px; line-height: 22px; border: 0; color: #fff; }
  .dm-split-i + .dm-split-i { border: 0; }
  .dm-split-i + .dm-split-i::before { content: "\2022"; margin: 0 10px 0 8px; color: rgba(255, 255, 255, .7); }
  .dm-split-i span:not(.dm-amt) { font-size: 14px; font-weight: 400; color: rgba(255, 255, 255, .9); }
  .dm-split-i b, .dm-split-i .dm-amt { font-size: 14px; font-weight: 600; color: #fff; }
  /* period chips take the "pagination dots" slot under the hero */
  .dm-range {
    position: absolute; left: 50%; bottom: -35px; transform: translateX(-50%); width: auto; max-width: none; margin: 0; padding: 0; gap: 8px; background: none; border-radius: 0;
  }
  .dm-range button, .dm-range button.is-on { white-space: nowrap; min-height: 0; height: 26px; padding: 0 14px; border: 0; border-radius: 999px; font-size: 12px; font-weight: 500; line-height: 26px; background: var(--lp-lav); color: var(--lp-lav-ink); box-shadow: none; }
  .dm-range button.is-on { background: var(--lp-purple); color: #fff; }
  #view-dashboard .dash-quick-wrap { position: relative; z-index: 3; margin-top: calc(-310px + 196px - 20px); }

  /* ---------------------------------------------------------------- 3. Four hero tiles */
  #view-dashboard .dash-quick-wrap { padding: 0 6px; background: none; box-shadow: none; border: 0; border-radius: 0; }
  #view-dashboard .dash-quick { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; align-items: start; }
  #view-dashboard .dash-quick .more-tile, #view-dashboard .dash-quick .more-tile[data-dm-route="pos"] {
    display: flex; flex-direction: column; align-items: center; gap: 8px; width: auto; height: auto; min-width: 0; min-height: 0; padding: 0 2px;
    background: none !important; border: 0 !important; box-shadow: none !important; color: #fff;
  }
  #view-dashboard .dash-quick .more-tile .more-tile-ic, #view-dashboard .dash-quick .more-tile[data-dm-route="pos"] .more-tile-ic {
    display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 12px; border: 0;
    background: rgba(255, 255, 255, .26) !important; color: #fff !important; box-shadow: none;
  }
  #view-dashboard .dash-quick .more-tile:active .more-tile-ic { background: rgba(255, 255, 255, .4) !important; }
  #view-dashboard .dash-quick .more-tile-ic i.ai, #view-dashboard .dash-quick .more-tile-ic svg { width: 20px; height: 20px; font-size: 20px; color: #fff; }
  #view-dashboard .dash-quick .more-tile-tx { max-width: 100%; font-size: 13px; font-weight: 500; line-height: 17px; color: #fff; text-align: center; -webkit-line-clamp: 2; }

  /* ---------------------------------------------------------------- 4. Quick Actions card + promo (injected) */
  .dm-qa { display: block; margin-top: 10px; padding: 18px 16px 8px; border-radius: 20px; background: #fff; }
  .dm-qa h3 { margin: 0 0 14px 4px; font-size: 17px; font-weight: 600; line-height: 24px; color: var(--lp-ink); }
  .dm-qa-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 0; }
  .dm-qa-grid a { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 6px 4px 14px; color: var(--lp-ink); text-decoration: none; }
  .dm-qa-grid a i.ai, .dm-qa-grid a i.ai svg { width: 26px; height: 26px; font-size: 26px; color: #1D1D24; }
  .dm-qa-grid a span { font-size: 13px; font-weight: 400; line-height: 20px; text-align: center; color: var(--lp-ink); }
  .dm-qa-grid a { position: relative; }
  .dm-qa-grid a .count-badge { top: 0; left: calc(50% + 8px); right: auto; background: #F2594A; box-shadow: 0 0 0 2px #fff; }
  .dm-qa-grid a:active { opacity: .6; }
  .dm-promo { position: relative; display: block; min-height: 132px; padding: 22px 130px 20px 16px; border-radius: 20px; overflow: hidden; background: #0F6E3E; color: #fff; text-decoration: none; }
  .dm-promo b { display: block; font-size: 18px; font-weight: 700; line-height: 24px; color: #fff; }
  .dm-promo small { display: block; margin-top: 6px; font-size: 12px; line-height: 16px; color: rgba(255, 255, 255, .92); }
  .dm-promo em { display: inline-block; margin-top: 12px; padding: 6px 12px; border-radius: 999px; background: #fff; font-style: normal; font-size: 10px; font-weight: 700; letter-spacing: .02em; color: #0F6E3E; }
  .dm-promo svg { position: absolute; right: 6px; bottom: -6px; width: 128px; height: 128px; }

  /* ---------------------------------------------------------------- 5. Recent activity list */
  .dm-head { margin-bottom: 10px; }
  .dm-head h3 { font-size: 17px; font-weight: 600; line-height: 24px; letter-spacing: 0; }
  .dm-head a { font-size: 13px; font-weight: 500; color: var(--lp-cta); }
  .dm-head a::after { content: " \203A"; }
  .dm-list { padding: 0; border: 0; border-radius: 20px; background: #fff; box-shadow: none; overflow: hidden; }
  .dm-row { min-height: 0; margin: 0; padding: 13px 16px; gap: 12px; border-top: 1px solid var(--lp-line); }
  .dm-row:first-child { border-top: 0; }
  .dm-row-ic { width: 36px; height: 36px; background: var(--lp-bg); color: #1D1D24; }
  .dm-row-ic.has-img { width: 40px; height: 40px; border-radius: 10px; }
  .dm-row-ic.is-pos { background: var(--lp-bg); color: #1D1D24; }
  .dm-row-main b { font-size: 15px; font-weight: 600; line-height: 21px; color: var(--lp-ink); }
  .dm-row-main small { font-size: 13px; line-height: 19px; color: var(--lp-mute); }
  .dm-row-side > b { font-size: 14px; font-weight: 500; }
  .dm-row-time { font-size: 12px; color: var(--lp-mute); }
  .dm-trends-btn { min-height: 52px; border: 0; border-radius: 20px; background: #fff; font-size: 15px; font-weight: 600; box-shadow: none; }
  .dm-target, .dash-src, .dash-share, .card, .dash-card { border: 0; box-shadow: none; border-radius: 20px; background: #fff; }

  /* ---------------------------------------------------------------- 6. Bottom bar: flat, green top indicator on the active tab */
  .mobile-bottom-nav { height: calc(67px + env(safe-area-inset-bottom, 0px)); padding: 0 0 env(safe-area-inset-bottom, 0px); border-radius: 0; background: #fff; border-top: 1px solid #E9E9EE; box-shadow: none; }
  /* 3 tabs only: Home / POS / Menu (drawer holds Orders, Products and everything else). Dot on Menu when orders or stock need attention. */
  .mobile-bottom-nav { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .mobile-bottom-nav #bottomNavOrders, .mobile-bottom-nav [data-route="products"] { display: none; }
  #bottomNavMore { position: relative; }
  #mobileBottomNav:has([data-orders-badge]:not([hidden]), [data-stock-badge]:not([hidden])) #bottomNavMore::after { content: ""; position: absolute; top: 12px; left: calc(50% + 6px); width: 9px; height: 9px; border-radius: 50%; background: #F2594A; border: 2px solid #fff; box-sizing: content-box; }
  /* Lucide icons everywhere on phones (the Polaris layer is switched off) */
  html:root:root:root body i.ai.ai.ai .i-pol, html:root:root:root body i.ai.ai.ai .i-pol-f { display: none !important; }
  html:root:root:root body i.ai.ai.ai .i-lu { display: inline-block !important; }
  .bottom-nav-link { position: relative; height: 67px; justify-content: center; color: #8C8C95; }
  .bottom-nav-link i.ai, .bottom-nav-link i.ai svg { width: 24px; height: 24px; font-size: 24px; }
  .bottom-nav-link span { margin-top: 4px; font-size: 12px; font-weight: 500; line-height: 16px; }
  .bottom-nav-link.active, .bottom-nav-link.active:hover { color: var(--lp-cta); }
  .bottom-nav-link.active span { font-weight: 500; }
  .bottom-nav-link.active::before { content: ""; position: absolute; top: -1px; left: 0; right: 0; height: 2px; background: var(--lp-cta); }
  .bottom-nav-pos i.ai { width: 24px; height: 24px; margin-top: 0; border: 0; border-radius: 0; background: none; color: inherit; box-shadow: none; }
  .bottom-nav-pos:hover i.ai, .bottom-nav-pos:active i.ai, .bottom-nav-pos.active i.ai { background: none; }
  .bottom-nav-pos span { margin-top: 4px; }
  .bottom-nav-pos.active span { color: var(--lp-cta); }
  .bottom-nav-link .count-badge { top: 9px; background: #F2594A; }

  /* ---------------------------------------------------------------- 7. "More" = left drawer (70% wide) */
  .more-sheet-backdrop { background: rgba(0, 0, 0, .62); }
  .more-sheet {
    top: 0; right: auto; bottom: 0; left: 0; width: 70%; max-width: 420px; max-height: none; height: 100%; border-radius: 0;
    box-shadow: none; padding: 0 0 env(safe-area-inset-bottom, 0px); transform: translateX(-100%);
  }
  @supports (height: 100dvh) { .more-sheet { max-height: none; height: 100dvh; } }
  .more-sheet.open { transform: none; }
  .more-sheet-head { justify-content: space-between; padding: 56px 19px 14px; border-bottom: 1px solid var(--lp-line); }
  .more-sheet-head b { font-size: 18px; font-weight: 600; line-height: 26px; }
  .more-sheet-close { width: 28px; height: 28px; background: none; color: var(--lp-ink); }
  .more-sheet-close i.ai, .more-sheet-close svg { width: 26px; height: 26px; font-size: 26px; }
  .more-sheet-body { padding: 6px 19px 18px; }
  .more-group { padding: 8px 0; }
  .more-sheet-close:focus { outline: 0; }
  .more-group + .more-group { margin-top: 0; border-top: 1px solid var(--lp-line); }
  .more-group-label { display: none; }
  .more-grid { display: block; }
  .more-sheet .more-tile { flex-direction: row; align-items: center; gap: 14px; width: 100%; padding: 0; min-height: 42px; margin: 0; text-align: left; }
  .more-sheet .more-tile-ic { width: 26px; height: 26px; border-radius: 0; background: none !important; color: #1D1D24 !important; }
  .more-sheet .more-tile-ic i.ai, .more-sheet .more-tile-ic svg { width: 26px; height: 26px; font-size: 26px; color: inherit; }
  .more-sheet .more-tile-tx { flex: 1; max-width: none; font-size: 16px; font-weight: 400; line-height: 24px; text-align: left; color: var(--lp-ink); -webkit-line-clamp: 1; }
  .more-sheet .more-tile.active .more-tile-tx { color: var(--lp-cta); font-weight: 500; }
  .more-sheet .more-tile.active .more-tile-ic { color: var(--lp-cta) !important; }

  /* ---------------------------------------------------------------- 8. List pages: centred header with back arrow, lavender chips, white cards */
  body:has(.view.active.mfp-page) .content { padding-top: 0; }
  body:has(.view.active.mfp-page) .page-head { display: none; }
  .mfp-page .mfp-head { position: relative; justify-content: center; height: 60px; margin: 0 calc(var(--lp-g) * -1) 0; padding: 0 56px; background: #fff; }
  .mfp-page .mfp-head h1 { font-size: 20px; line-height: 28px; font-weight: 600; letter-spacing: 0; text-align: center; }
  .mfp-page .mfp-head-btns { position: absolute; right: 12px; top: 0; bottom: 0; gap: 4px; }
  .mfp-page .mfp-add { width: 34px; height: 34px; border: 0; border-radius: 50%; background: var(--lp-bg); }
  .lp-back { position: absolute; left: 8px; top: 8px; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; border: 0; background: none; color: var(--lp-ink); cursor: pointer; }
  .lp-back svg { width: 26px; height: 26px; }
  .mfp-page .toolbar { margin: 0; padding: 12px var(--lp-g) 14px; margin-left: calc(var(--lp-g) * -1); margin-right: calc(var(--lp-g) * -1); background: #fff; }
  .mfp-page .toolbar .search-box { height: 50px; padding: 0 16px 0 22px; border: 1px solid #D5D5DD; border-radius: 999px; background: #fff; }
  .mfp-page .toolbar .search-box:focus-within { border-color: var(--lp-purple); }
  .mfp-page .toolbar .search-box > i.ai { order: 2; color: #3F5F52; }
  .mfp-page .toolbar .search-box input { font-size: 16px; font-weight: 400; }
  .mfp-page .toolbar .search-box input::placeholder { color: #B8B8C2; }
  .mfp-page .mfp-filter-btn { order: 3; background: transparent; color: #3F5F52; }

  .dpk-pill, .seg, .segmented, .tabs, .tab-bar { border-radius: 999px; }
  .seg button, .segmented button, .tabs .tab, .tab-bar .tab, .chip, .filter-chip, .pill-tab {
    min-height: 0; height: 35px; padding: 0 18px; border: 0; border-radius: 999px; background: var(--lp-lav); color: var(--lp-lav-ink); font-size: 15px; font-weight: 500; line-height: 35px; box-shadow: none;
  }
  .seg button.is-on, .seg button.active, .segmented button.active, .tabs .tab.active, .tab-bar .tab.active, .chip.active, .chip.is-on, .filter-chip.active, .pill-tab.active, .seg button[aria-pressed="true"], .tabs .tab[aria-selected="true"] {
    background: var(--lp-purple); color: #fff; font-weight: 600;
  }
  .seg, .segmented, .tabs, .tab-bar { display: flex; flex-wrap: nowrap; overflow-x: auto; gap: 8px; padding: 0; background: none; border: 0; scrollbar-width: none; }
  .seg::-webkit-scrollbar, .tabs::-webkit-scrollbar { display: none; }
  .seg button, .segmented button, .tabs .tab, .tab-bar .tab { flex: none; }

  /* lists in white cards, hairline dividers, big dark titles */
  .table-wrap.mc-wrap { border: 0; border-radius: 20px; background: #fff; box-shadow: none; }
  table.mc-cards tr.mc-row { padding: 14px 16px; border-top: 1px solid var(--lp-line); }
  table.mc-cards tr.mc-row:first-child { border-top: 0; }
  table.mc-cards.mc-core tr.mc-row > td.mc-title .row-title .name { font-size: 15px; font-weight: 600; }
  table.mc-cards.mc-core tr.mc-row > td.mc-amt, table.mc-cards.mc-core tr.mc-row.mc-lean > td.mc-meta.mc-qty { color: var(--lp-mute); }

  /* ---------------------------------------------------------------- 9. Buttons, chips, fields */
  .btn { min-height: 48px; border-radius: 14px; font-size: 16px; font-weight: 600; box-shadow: none; }
  .btn.btn-primary, .btn-primary { background: var(--lp-cta); border-color: var(--lp-cta); color: #fff; box-shadow: none; }
  .btn.btn-primary:active:not(:disabled) { background: #0F6E3E; }
  .btn.btn-ghost, .btn-secondary, .btn-outline { background: #fff; color: var(--lp-ink); border: 1px solid #D5D5DD; }
  .badge, .dash-badge { border-radius: 999px; font-weight: 500; }
  .badge.badge-success, .dm-chip.is-ok { background: #E4F5EC; color: #1E7A46; }
  .dm-chip.is-info { background: var(--lp-lav); color: var(--lp-purple); }
  .content label, .field > label, .form-group > label { font-size: 15px; font-weight: 600; color: var(--lp-ink); }
  .content input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]):not([type=color]):not([type=hidden]),
  .content select, .content textarea, .modal input:not([type=checkbox]):not([type=radio]):not([type=file]), .modal select, .modal textarea {
    min-height: 50px; padding: 0 16px; border: 1px solid #EDEEF0; border-radius: 14px; background: #F6F7F8; font-size: 16px; color: var(--lp-ink); box-shadow: none;
  }
  .content textarea, .modal textarea { padding: 12px 16px; }
  .content .search-box input, .content .search-box input:focus { min-height: 0 !important; padding: 0 !important; border: 0 !important; background: transparent !important; border-radius: 0 !important; }
  .content input:focus, .content select:focus, .content textarea:focus { border-color: var(--lp-purple); background: #fff; outline: 0; }
  .content input:disabled, .content select:disabled { color: #B8B8C2; background: #F6F7F8; }
  .page-head h1 { font-size: 22px; line-height: 30px; font-weight: 600; letter-spacing: 0; }

  /* every page except the dashboard and list pages: same centred white header height */
  body:not([data-route="dashboard"]) .topbar { border-bottom: 1px solid #ECECF1; }
}

/* ==========================================================================
   MOBILE-LOOP-2 (<=860px): the "Setup guide" strip (#hmHome) is the FIRST child of .dash-grid, but the green sales hero
   pulls itself up with margin-top:-72px to sit under the top bar, so on phones it slid over the guide and hid it (only the
   top edge of the card peeked out). Keep the hero first and show the guide right after the quick actions / promo instead.
   New stores (.hm-new) keep the original order: there the welcome + setup cards ARE the dashboard.
   ========================================================================== */
@media screen and (max-width: 860px) {
  #view-dashboard:not(.hm-new) #hmHome { order: 1; margin: 0; position: relative; z-index: 1; }
  #view-dashboard:not(.hm-new) #hmHome .hm-guide-bar { margin-top: 0; }
  #view-dashboard:not(.hm-new) .dash-grid > :not(#hmHome):not(#statGrid):not(#dmHero):not(#dashToolbar):not(.dm-qa):not(.dm-promo) { order: 2; }
}

/* ==========================================================================
   MOBILE-LOOP-3 (<=860px): bullet-proof version of LOOP-2.
   1) The sales hero is ALWAYS first on the dashboard (it sits under the transparent top bar), the "Setup guide" strip always
      comes after it. Explicit orders + !important so no later/earlier sheet (home.css `.hm { order:-10 }`, theme sheets) can put
      the guide back above the hero and bury it.
   2) Safety net: if the hero is ever not directly under the top bar, the white greeting/search/bell must still be readable, so the
      page top carries the same deep green as the hero's first stop. When the hero is in place it covers this band completely.
   ========================================================================== */
@media screen and (max-width: 860px) {
  #view-dashboard:not(.hm-new) #dmHero { order: -2 !important; }
  #view-dashboard:not(.hm-new) #hmHome { order: 1 !important; margin: 0 !important; }
  #view-dashboard:not(.hm-new) #dashToolbar, #view-dashboard:not(.hm-new) #statGrid, #view-dashboard:not(.hm-new) .dm-qa, #view-dashboard:not(.hm-new) .dm-promo { order: 0; }
  body[data-route="dashboard"] { background: linear-gradient(180deg, #0B3B32 0, #0B3B32 72px, var(--lp-bg) 72px) no-repeat, var(--lp-bg); }
  body[data-route="dashboard"] .app, body[data-route="dashboard"] .main, body[data-route="dashboard"] .content { background: transparent; }
}
