/**
 * SVO InPanel parity skin for mobile.svolabs.net (presentational only).
 * Activated when html has class inpanel-shell (set by svo-inpanel-parity-boot.js or InPanel inject).
 * Does not change API/DB contracts.
 */

/* ========== TOKENS (scoped) ========== */
html.inpanel-shell,
html.inpanel-shell body.inpanel-shell,
.inpanel-shell {
  --ip-primary: #0757C9;
  --ip-primary-dark: #06469F;
  --ip-primary-soft: rgba(7, 87, 201, 0.12);
  --ip-bg: #F5F7FB;
  --ip-surface: #FFFFFF;
  --ip-text: #152238;
  --ip-muted: #64748B;
  --ip-border: #E5EAF2;
  --ip-radius-card: 16px;
  --ip-radius-control: 12px;
  --ip-radius-modal: 20px;
  --ip-space-1: 4px;
  --ip-space-2: 8px;
  --ip-space-3: 12px;
  --ip-space-4: 16px;
  --ip-space-5: 20px;
  --ip-space-6: 24px;
  --ip-space-8: 32px;
  --ip-touch: 44px;
  --ip-z-base: 0;
  --ip-z-header: 400;
  --ip-z-dock: 450;
  --ip-z-drawer-bg: 12000;
  --ip-z-drawer: 12010;
  --ip-z-modal-bg: 200100;
  --ip-z-modal: 200150;
  --ip-z-toast: 300500;

  /* Bridge SOT tokens WITHOUT fighting layout engines */
  --bg: var(--ip-bg);
  --bg2: var(--ip-surface);
  --text: var(--ip-text);
  --muted: var(--ip-muted);
  --line: var(--ip-border);
  --blue: var(--ip-primary);
  --blue2: #3B82F6;
  --radius: var(--ip-radius-card);
  --ticker-h: 0px;
}

html.inpanel-shell[data-theme="dark"],
html.inpanel-shell[data-theme="dark"] body.inpanel-shell,
html.inpanel-shell body.inpanel-shell.theme-dark {
  --ip-primary: #3B82F6;
  --ip-primary-dark: #60A5FA;
  --ip-primary-soft: rgba(59, 130, 246, 0.18);
  --ip-bg: #0B1120;
  --ip-surface: #131C31;
  --ip-text: #F1F5F9;
  --ip-muted: #94A3B8;
  --ip-border: rgba(148, 163, 184, 0.2);
}

html.inpanel-shell,
html.inpanel-shell body.inpanel-shell {
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ip-text);
  background: var(--ip-bg);
  -webkit-font-smoothing: antialiased;
}

/* Soft wash — do not break SOT ::before sizing */
html.inpanel-shell body.inpanel-shell.theme-light::before {
  opacity: 1;
  background:
    radial-gradient(ellipse 70% 40% at 0% 0%, rgba(7, 87, 201, 0.07), transparent 55%),
    linear-gradient(180deg, #F8FAFC 0%, var(--ip-bg) 50%, #EEF2F7 100%);
}

html.inpanel-shell[data-theme="dark"] body.inpanel-shell::before,
html.inpanel-shell body.inpanel-shell.theme-dark::before {
  opacity: 1;
  background:
    radial-gradient(ellipse 70% 40% at 0% 0%, rgba(59, 130, 246, 0.14), transparent 55%),
    linear-gradient(180deg, #0F172A 0%, var(--ip-bg) 55%, #090D16 100%);
}

/* ========== TICKER (inPanel only) ========== */
html.inpanel-shell .svo-page-ticker,
html.inpanel-shell .svo-page-ticker-track,
html.inpanel-shell .svo-login-ticker,
html.inpanel-shell .svo-login-ticker-track {
  display: none !important;
  height: 0 !important;
  max-height: 0 !important;
  overflow: hidden !important;
  pointer-events: none !important;
  visibility: hidden !important;
}

/* ========== HEADER — compact, no double safe-area padding ========== */
html.inpanel-shell .m-nav {
  background: var(--ip-surface);
  border-bottom: 1px solid var(--ip-border);
  box-shadow: none;
  color: var(--ip-text);
  z-index: var(--ip-z-header);
  max-width: 100vw;
  box-sizing: border-box;
}

html.inpanel-shell .m-nav .m-brand-text {
  filter: none;
  background: none;
  -webkit-background-clip: unset;
  background-clip: unset;
  color: var(--ip-text);
  font-weight: 800;
  font-size: 15px;
}

html.inpanel-shell .m-nav-actions .m-btn,
html.inpanel-shell .m-nav-actions .m-btn-icon {
  min-height: var(--ip-touch);
  color: var(--ip-text);
  font-weight: 600;
}

/* ========== DRAWER — viewport constrained ========== */
html.inpanel-shell .m-drawer-backdrop {
  z-index: var(--ip-z-drawer-bg);
}

html.inpanel-shell .m-drawer-panel {
  z-index: var(--ip-z-drawer);
  width: min(84vw, 320px) !important;
  max-width: min(84vw, 320px) !important;
  max-height: 100dvh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: var(--ip-surface);
  border-color: var(--ip-border);
  color: var(--ip-text);
  box-shadow: 4px 0 24px rgba(21, 34, 56, 0.12);
  box-sizing: border-box;
}

html.inpanel-shell .m-drawer-head {
  padding: var(--ip-space-3) var(--ip-space-4);
  border-bottom: 1px solid var(--ip-border);
  position: sticky;
  top: 0;
  background: var(--ip-surface);
  z-index: 1;
}

html.inpanel-shell .m-drawer-list a,
html.inpanel-shell .m-drawer-list button {
  min-height: var(--ip-touch);
  padding: var(--ip-space-3) var(--ip-space-4);
  font-weight: 600;
  color: var(--ip-text);
  border-radius: var(--ip-radius-control);
}

html.inpanel-shell .m-drawer-list .is-active,
html.inpanel-shell .m-drawer-list a:active {
  background: var(--ip-primary-soft);
  color: var(--ip-primary-dark);
}

/* ========== DOCK — FIXED to viewport (never at end of document scroll) ========== */
html.inpanel-shell .m-dock,
html.inpanel-shell nav.m-dock {
  position: fixed !important;
  left: 8px !important;
  right: 8px !important;
  bottom: calc(8px + env(safe-area-inset-bottom, 0px)) !important;
  top: auto !important;
  width: auto !important;
  max-width: 100vw;
  height: 56px;
  z-index: var(--ip-z-dock) !important;
  background: var(--ip-surface) !important;
  border: 1px solid var(--ip-border);
  border-radius: 18px;
  box-shadow: 0 6px 20px rgba(21, 34, 56, 0.12);
  box-sizing: border-box;
  padding: 3px 2px 4px;
  margin: 0 !important;
  transform: none !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  display: block !important;
  overflow: visible;
  isolation: isolate;
}

html.inpanel-shell .m-dock-scrim {
  position: fixed !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  z-index: calc(var(--ip-z-dock) - 1);
  height: calc(72px + env(safe-area-inset-bottom, 0px) + 10px);
  pointer-events: none !important;
  display: block !important;
  visibility: visible !important;
}

/* Keep glass wrapper if present; do not break rail grid */
html.inpanel-shell .m-dock .liquidGlass-effect {
  pointer-events: none;
}

/* Positioning context for Activity center button — INSIDE fixed dock only */
html.inpanel-shell .m-dock-rail {
  position: relative;
  display: grid;
  align-items: end;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  min-height: 48px;
}

html.inpanel-shell .m-dock-7 .m-dock-rail {
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

html.inpanel-shell .m-dock-5 .m-dock-rail {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

html.inpanel-shell .m-dock-center-slot {
  min-width: 0;
  height: 1px;
  pointer-events: none;
  visibility: hidden;
}

html.inpanel-shell .m-dock-item {
  font-size: 10px;
  font-weight: 600;
  color: var(--ip-muted);
  border-radius: var(--ip-radius-control);
  min-height: 48px;
  position: relative;
  z-index: 1;
}

html.inpanel-shell .m-dock-item.is-active {
  color: var(--ip-primary-dark);
  background: var(--ip-primary-soft);
  font-weight: 700;
}

/* SVO Activity — dead-center of navbar, visible with sibling tabs */
html.inpanel-shell .m-dock-item.is-center,
html.inpanel-shell .m-dock-item.is-center.is-active {
  position: absolute !important;
  left: 50% !important;
  bottom: 8px !important;
  transform: translateX(-50%) !important;
  z-index: 5 !important;
  visibility: visible !important;
  opacity: 1 !important;
  display: flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: clamp(52px, 14.5vw, 60px);
  height: 54px;
  min-height: 54px;
  margin: 0;
  padding: 6px 4px 5px;
  color: #fff !important;
  background: linear-gradient(160deg, #2B7DE9, var(--ip-primary) 55%, var(--ip-primary-dark)) !important;
  box-shadow: 0 6px 14px rgba(7, 87, 201, 0.28);
  border: 1px solid transparent;
  border-radius: 18px;
  pointer-events: auto !important;
}

html.inpanel-shell .m-dock-item.is-center .m-dock-center-sub {
  color: rgba(255, 255, 255, 0.95);
  font-size: 9px;
  font-weight: 700;
}

html.inpanel-shell .m-dock-brand-sv { color: #fff; }
html.inpanel-shell .m-dock-brand-o { color: #fdba74; }

/* ========== SCROLL LOCK — gulir = tidak bisa buka menu (Activity + Wallet) ========== */
html.inpanel-shell.inpanel-finger-scroll #actHubList,
html.inpanel-shell.inpanel-finger-scroll #actHubList *,
html.inpanel-shell.inpanel-finger-scroll #actTypeGrid,
html.inpanel-shell.inpanel-finger-scroll #actTypeGrid *,
html.inpanel-shell.inpanel-finger-scroll [data-act-open],
html.inpanel-shell.inpanel-finger-scroll [data-act-type],
html.inpanel-shell.inpanel-finger-scroll .act-hub-item,
html.inpanel-shell.inpanel-finger-scroll .svo-fab-item,
html.inpanel-shell.inpanel-finger-scroll .ip-act-tile,
html.inpanel-shell.inpanel-finger-scroll .act-type-chip,
html.inpanel-shell.inpanel-finger-scroll .hm-board-card,
html.inpanel-shell.inpanel-finger-scroll .act-hub-card,
html.inpanel-shell.inpanel-finger-scroll .act-type-card,
html.inpanel-shell.inpanel-finger-scroll .m-card[data-page],
html.inpanel-shell.inpanel-finger-scroll a[data-page],
html.inpanel-shell.inpanel-finger-scroll button[data-page]:not(.m-dock-item),
html.inpanel-shell.inpanel-finger-scroll .svo-wallet-shell .cat-pill,
html.inpanel-shell.inpanel-finger-scroll .svo-wallet-shell .svo-card-wrapper,
html.inpanel-shell.inpanel-finger-scroll .svo-wallet-shell .svo-peek-real,
html.inpanel-shell.inpanel-finger-scroll .svo-wallet-shell .svo-peek-stack,
html.inpanel-shell.inpanel-finger-scroll .svo-wallet-shell button,
html.inpanel-shell.inpanel-finger-scroll .svo-wallet-shell a,
html.inpanel-shell.inpanel-finger-scroll .svo-wallet-shell [data-dir],
html.inpanel-shell.inpanel-finger-scroll #svoWalletActions button,
html.inpanel-shell.inpanel-finger-scroll .svo-wallet-sheet button,
html.inpanel-shell.inpanel-finger-scroll .svo-wallet-sheet a {
  pointer-events: none !important;
}

/* Activity hub list: pan vertikal = scroll, bukan manipulasi tap */
html.inpanel-shell #actHubList,
html.inpanel-shell .act-hub-list,
html.inpanel-shell .svo-fab-list {
  touch-action: pan-y;
  -webkit-overflow-scrolling: touch;
}

/* Wallet: kategori horizontal + deck vertikal = pan saja saat digeser */
html.inpanel-shell .svo-wallet-shell .category-scroll-nav {
  touch-action: pan-x;
  -webkit-overflow-scrolling: touch;
}
html.inpanel-shell .svo-wallet-shell .deck-main-content,
html.inpanel-shell .svo-wallet-shell .card-stack-viewport,
html.inpanel-shell .svo-wallet-shell .app-viewport,
html.inpanel-shell .svo-wallet-sheet-body {
  touch-action: pan-y;
  -webkit-overflow-scrolling: touch;
}

/* ========== SVO ACTIVITY HUB — banking-style hero + icon grid (inPanel only) ========== */
html.inpanel-shell .act-hub-shell.ip-act-hub,
html.inpanel-shell #actShell.ip-act-hub {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0 !important;
  margin: 0 0 12px;
  background: transparent;
  border: none;
  box-shadow: none;
  overflow: visible;
}

html.inpanel-shell .ip-act-hub .ip-act-hero.m-section-head,
html.inpanel-shell .ip-act-hub .m-section-head.ip-act-hero {
  position: relative;
  margin: 0 0 12px;
  padding: 18px 16px 48px;
  border-radius: 0 0 28px 28px;
  background: linear-gradient(165deg, #2B7DE9 0%, var(--ip-primary) 42%, var(--ip-primary-dark) 100%);
  color: #fff;
  box-shadow: 0 10px 24px rgba(7, 87, 201, 0.28);
}

html.inpanel-shell .ip-act-hub .ip-act-hero > span {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.85;
  color: #fff;
}

html.inpanel-shell .ip-act-hub .ip-act-hero h2 {
  margin: 6px 0 4px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #fff !important;
}

html.inpanel-shell .ip-act-hub .ip-act-hero p {
  margin: 0;
  font-size: 13px;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.9);
}

html.inpanel-shell .ip-act-hub .ip-act-search.act-hub-search-wrap {
  margin: -28px 16px 12px;
  padding: 12px 12px 4px;
  border-radius: 16px 16px 0 0;
  background: var(--ip-surface);
  position: relative;
  z-index: 2;
  box-shadow: 0 -2px 0 var(--ip-surface);
}

html.inpanel-shell .ip-act-hub .ip-act-search .att-purpose-label,
html.inpanel-shell .ip-act-hub .ip-act-search .act-type-label {
  display: none;
}

html.inpanel-shell .ip-act-hub .act-hub-search {
  min-height: 44px;
  border-radius: 12px;
  border: 1px solid var(--ip-border);
  background: #F8FAFC;
  color: var(--ip-text);
  font-size: 14px;
}

/* List induk = stack vertikal section (BRImo). Jangan grid multi-kolom di sini. */
html.inpanel-shell .ip-act-hub #actHubList,
html.inpanel-shell .ip-act-hub #actHubList.ip-act-groups,
html.inpanel-shell .ip-act-hub .act-hub-list,
html.inpanel-shell .ip-act-hub .act-hub-list.ip-act-groups {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  gap: 12px;
  margin: 0 16px 20px;
  padding: 8px 10px 16px !important;
  background: var(--ip-surface);
  border: 1px solid var(--ip-border);
  border-radius: 0 0 16px 16px;
  box-shadow: 0 8px 24px rgba(21, 34, 56, 0.08);
  grid-template-columns: none !important;
  overflow: visible !important;
  overflow-y: visible !important;
  overscroll-behavior: auto !important;
  max-height: none !important;
  height: auto !important;
}

/* Flat fallback (tanpa .act-hub-group): list sendiri jadi icon grid */
html.inpanel-shell .ip-act-hub #actHubList.ip-act-grid:not(.ip-act-groups),
html.inpanel-shell .ip-act-hub .act-hub-list.ip-act-grid:not(.ip-act-groups) {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 10px 6px;
  flex-direction: unset !important;
}
@media (max-width: 360px) {
  html.inpanel-shell .ip-act-hub #actHubList.ip-act-grid:not(.ip-act-groups),
  html.inpanel-shell .ip-act-hub .act-hub-list.ip-act-grid:not(.ip-act-groups) {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

html.inpanel-shell .ip-act-hub .act-hub-group {
  display: flex !important;
  flex-direction: column !important;
  width: 100% !important;
  max-width: 100%;
  min-width: 0;
  gap: 4px;
  box-sizing: border-box;
}

html.inpanel-shell .ip-act-hub .ip-act-tile.act-hub-item,
html.inpanel-shell .ip-act-hub .ip-act-tile.svo-fab-item {
  display: flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  position: relative;
  overflow: visible;
  min-height: 84px;
  padding: 8px 4px !important;
  margin: 0 !important;
  border: none !important;
  border-radius: 14px;
  background: transparent !important;
  box-shadow: none !important;
  text-align: center;
  width: auto !important;
  max-width: 100%;
  box-sizing: border-box;
}

html.inpanel-shell .ip-act-hub .ip-act-tile:active {
  background: var(--ip-primary-soft) !important;
}

html.inpanel-shell .ip-act-hub .ip-act-tile-ico {
  width: 56px;
  height: 56px;
  min-width: 56px;
  min-height: 56px;
  max-width: 56px;
  max-height: 56px;
  aspect-ratio: 1 / 1;
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  /* BRImo: aset sudah seragam 160×160 fill~92% — jangan double frame */
  background: transparent;
  flex-shrink: 0;
  box-shadow: none;
  box-sizing: border-box;
}

html.inpanel-shell .ip-act-hub .ip-act-tile-ico img,
html.inpanel-shell .ip-act-hub .ip-act-tile-ico .act-hub-ico-img {
  width: 56px !important;
  height: 56px !important;
  min-width: 56px;
  min-height: 56px;
  max-width: 56px;
  max-height: 56px;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  object-position: center;
  display: block;
  filter: none !important;
  border-radius: 0;
  box-sizing: border-box;
}

html.inpanel-shell .ip-act-hub .ip-act-tile-lbl {
  font-size: 10px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--ip-text);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  white-space: normal;
  word-break: break-word;
}

/* Teks list lama disembunyikan — ikon tile HARUS tetap terlihat */
html.inpanel-shell .ip-act-hub .svo-fab-item-text {
  display: none !important;
}
html.inpanel-shell .ip-act-hub .svo-fab-item-ico:not(.ip-act-tile-ico) {
  display: none !important;
}
html.inpanel-shell .ip-act-hub .ip-act-tile-ico {
  display: flex !important;
}

/* ========== MAIN — leave room under fixed dock; do NOT push dock into flow ========== */
html.inpanel-shell #pMain {
  max-width: 100vw;
  box-sizing: border-box;
  /* visible: overflow-x:clip di sini membuat overflow-y ikut auto dan menelan gulir mouse di desktop */
  overflow: visible;
  padding-bottom: calc(88px + env(safe-area-inset-bottom, 0px)) !important;
}

html.inpanel-shell body.inpanel-shell {
  padding-bottom: 0 !important;
}

/* ========== CARDS — light skin, avoid padding explosion ========== */
html.inpanel-shell .m-card,
html.inpanel-shell .pf-card,
html.inpanel-shell .m-stat,
html.inpanel-shell .hm-board-card,
html.inpanel-shell .hm-chart-card,
html.inpanel-shell .att-card,
html.inpanel-shell .att-daily-card {
  background: var(--ip-surface);
  border: 1px solid var(--ip-border);
  border-radius: var(--ip-radius-card);
  box-shadow: 0 2px 10px rgba(21, 34, 56, 0.04);
  color: var(--ip-text);
}

html.inpanel-shell h1,
html.inpanel-shell h2,
html.inpanel-shell h3,
html.inpanel-shell .m-title {
  color: var(--ip-text);
  font-weight: 800;
  letter-spacing: -0.02em;
}

html.inpanel-shell .muted,
html.inpanel-shell .m-sub,
html.inpanel-shell .hint {
  color: var(--ip-muted);
}

/* ========== BUTTONS / INPUTS ========== */
html.inpanel-shell .m-btn-primary {
  background: var(--ip-primary);
  border-color: var(--ip-primary);
  color: #fff;
  border-radius: var(--ip-radius-control);
  min-height: var(--ip-touch);
  font-weight: 700;
  box-shadow: none;
}

html.inpanel-shell .m-btn-ghost,
html.inpanel-shell .m-btn:not(.m-btn-primary) {
  border-radius: var(--ip-radius-control);
  min-height: var(--ip-touch);
}

html.inpanel-shell input:not([type="checkbox"]):not([type="radio"]),
html.inpanel-shell select,
html.inpanel-shell textarea,
html.inpanel-shell .m-input,
html.inpanel-shell .sf-input {
  border-radius: var(--ip-radius-control);
  border-color: #CBD5E1;
  background: var(--ip-surface);
  color: var(--ip-text);
  min-height: var(--ip-touch);
}

html.inpanel-shell input:focus,
html.inpanel-shell select:focus,
html.inpanel-shell textarea:focus {
  border-color: var(--ip-primary);
  box-shadow: 0 0 0 3px var(--ip-primary-soft);
  outline: none;
}

/* ========== MODALS / QRIS — stacking ABOVE drawer; no layout hijack ========== */
html.inpanel-shell .popup,
html.inpanel-shell .modal,
html.inpanel-shell .att-cam-modal,
html.inpanel-shell .att-photo-modal,
html.inpanel-shell [role="dialog"]:not(.m-drawer-panel),
html.inpanel-shell .svo-wallet-sheet,
html.inpanel-shell .svo-wallet-modal,
html.inpanel-shell .qris-modal,
html.inpanel-shell .qris-sheet {
  z-index: var(--ip-z-modal);
}

html.inpanel-shell #pToast,
html.inpanel-shell .p-toast {
  z-index: var(--ip-z-toast) !important;
}

html.inpanel-shell .modal-backdrop,
html.inpanel-shell .popup-backdrop,
html.inpanel-shell .svo-wallet-sheet-backdrop {
  z-index: var(--ip-z-modal-bg);
}

/* When wallet/QRIS sheet open, keep dock from fighting sheet */
html.inpanel-shell body.svo-wallet-sheet-open .m-dock,
html.inpanel-shell.svo-wallet-sheet-open .m-dock {
  z-index: var(--ip-z-dock);
}

/* Do NOT restyle QR canvas/img — scannability first */
html.inpanel-shell .qris-qr img,
html.inpanel-shell .qris-qr canvas,
html.inpanel-shell [data-qris] img,
html.inpanel-shell [data-qris] canvas,
html.inpanel-shell .svo-wallet-shell canvas,
html.inpanel-shell .svo-wallet-shell img[src*="qris"],
html.inpanel-shell .svo-wallet-shell img[alt*="QR" i] {
  max-width: min(100%, 280px);
  height: auto;
  object-fit: contain;
  position: relative;
  z-index: 1;
}

/* ========== LOGIN ========== */
html.inpanel-shell .svo-login-card,
html.inpanel-shell .svo-login-panel {
  background: var(--ip-surface);
  border: 1px solid var(--ip-border);
  border-radius: var(--ip-radius-modal);
  box-shadow: 0 12px 32px rgba(21, 34, 56, 0.1);
  color: var(--ip-text);
  max-width: min(100vw - 32px, 400px);
  box-sizing: border-box;
}

/* ========== REDUCE NOISE (scoped) ========== */
html.inpanel-shell .glass,
html.inpanel-shell .liquid-glass {
  box-shadow: none;
  filter: none;
}

html.inpanel-shell .salePulse {
  animation: none;
}

@media (prefers-reduced-motion: reduce) {
  html.inpanel-shell *,
  html.inpanel-shell *::before,
  html.inpanel-shell *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Never hide chrome */
html.inpanel-shell .m-dock,
html.inpanel-shell .m-nav,
html.inpanel-shell .m-drawer,
html.inpanel-shell .m-drawer-panel {
  visibility: visible;
  opacity: 1;
}

/* ========== Activity hub groups — section stack + icon rows (BRImo) ========== */
html.inpanel-shell .ip-act-hub .act-hub-group-title {
  margin: 8px 4px 2px;
  padding: 0;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--ip-text);
  width: 100%;
}

/* Grid ikon hanya di dalam tiap group — baris 4 kolom */
html.inpanel-shell .ip-act-hub .act-hub-group-grid,
html.inpanel-shell .ip-act-hub .act-hub-group-grid.ip-act-grid {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 10px 6px;
  margin: 0;
  padding: 8px 0 12px;
  width: 100%;
  box-sizing: border-box;
  flex-direction: unset !important;
}

@media (max-width: 360px) {
  html.inpanel-shell .ip-act-hub .act-hub-group-grid,
  html.inpanel-shell .ip-act-hub .act-hub-group-grid.ip-act-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

html.inpanel-shell .ip-act-hub .act-hub-lock {
  position: absolute;
  top: 2px;
  right: 2px;
  z-index: 2;
  font-size: 8px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.04em;
  padding: 2px 4px;
  border-radius: 999px;
  background: rgba(21, 34, 56, 0.12);
  color: var(--ip-muted);
  pointer-events: none;
  white-space: nowrap;
}

/* ========== Dock AI icons ========== */
html.inpanel-shell .m-dock-item .ip-dock-ico {
  width: 22px;
  height: 22px;
  object-fit: cover;
  border-radius: 6px;
  display: block;
}
html.inpanel-shell .m-dock-item.is-center .ip-dock-ico-center {
  width: 18px;
  height: 18px;
  object-fit: cover;
  border-radius: 5px;
  margin-bottom: 2px;
}

/* ========== Wallet theme tokens (scoped) ========== */
html.inpanel-shell .svo-wallet-shell {
  --bg-main: var(--ip-bg) !important;
  --bg-surface: var(--ip-surface) !important;
  --bg-surface-elevated: var(--ip-surface) !important;
  --text-primary: var(--ip-text) !important;
  --text-secondary: var(--ip-muted) !important;
  --text-muted: #94A3B8 !important;
  --accent-blue: var(--ip-primary) !important;
  background: var(--ip-bg) !important;
  color: var(--ip-text) !important;
}

/* ========== Contrast: label vs field (never same color) ========== */
html.inpanel-shell label,
html.inpanel-shell .att-purpose-label,
html.inpanel-shell .act-type-label,
html.inpanel-shell .m-sub,
html.inpanel-shell .hint,
html.inpanel-shell .muted {
  color: var(--ip-muted) !important;
}
html.inpanel-shell input:not([type="checkbox"]):not([type="radio"]),
html.inpanel-shell select,
html.inpanel-shell textarea,
html.inpanel-shell .m-input,
html.inpanel-shell .sf-input,
html.inpanel-shell .act-hub-search {
  background: var(--ip-surface) !important;
  color: var(--ip-text) !important;
  border: 1px solid var(--ip-border) !important;
}
html.inpanel-shell input::placeholder,
html.inpanel-shell textarea::placeholder {
  color: #94A3B8 !important;
  opacity: 1;
}

/* ========== Toggle / dropdown enrichment ========== */
html.inpanel-shell select {
  min-height: var(--ip-touch);
  border-radius: var(--ip-radius-control);
  padding: 8px 36px 8px 12px;
  appearance: none;
  -webkit-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, #64748B 50%), linear-gradient(135deg, #64748B 50%, transparent 50%);
  background-position: calc(100% - 18px) calc(50% - 3px), calc(100% - 12px) calc(50% - 3px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  background-color: var(--ip-surface) !important;
}
html.inpanel-shell input[type="checkbox"],
html.inpanel-shell input[type="radio"] {
  width: 20px;
  height: 20px;
  accent-color: var(--ip-primary);
}
html.inpanel-shell .theme-toggle,
html.inpanel-shell [role="switch"] {
  min-height: var(--ip-touch);
  min-width: 48px;
  border-radius: 999px;
}

/* ========== ERP popup above OTA banner & dock ========== */
html.inpanel-shell .svo-ui-popup-overlay,
html.inpanel-shell #svoUiPopupOverlay {
  z-index: 300200 !important;
  pointer-events: auto !important;
}
html.inpanel-shell .svo-ui-popup-overlay *,
html.inpanel-shell #svoUiPopupOverlay * {
  pointer-events: auto !important;
}
html.inpanel-shell .svo-ui-popup-overlay button,
html.inpanel-shell #svoUiPopupOverlay button,
html.inpanel-shell .svo-ui-popup-overlay a,
html.inpanel-shell #svoUiPopupOverlay a {
  touch-action: manipulation;
}

/* ========== In-app OTA banner ========== */
html.inpanel-shell #inpanelOtaBanner {
  position: fixed;
  left: 10px;
  right: 10px;
  top: calc(8px + env(safe-area-inset-top, 0px));
  z-index: 90;
  display: none;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 14px;
  background: #0757C9;
  color: #fff;
  box-shadow: 0 8px 24px rgba(7, 87, 201, 0.35);
  font-size: 13px;
  font-weight: 600;
}
html.inpanel-shell #inpanelOtaBanner.is-on { display: flex; }
html.inpanel-shell #inpanelOtaBanner .ip-ota-msg { flex: 1; min-width: 0; }
html.inpanel-shell #inpanelOtaBanner button {
  border: 0;
  border-radius: 10px;
  min-height: 36px;
  padding: 0 10px;
  font-weight: 700;
  font-size: 12px;
}
html.inpanel-shell #inpanelOtaBanner .ip-ota-dl {
  background: #fff;
  color: #0757C9;
}
html.inpanel-shell #inpanelOtaBanner .ip-ota-later {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}
html.inpanel-shell #inpanelOtaBanner .ip-ota-prog {
  display: none;
  flex: 1;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.25);
  overflow: hidden;
}
html.inpanel-shell #inpanelOtaBanner.is-downloading .ip-ota-prog { display: block; }
html.inpanel-shell #inpanelOtaBanner.is-downloading .ip-ota-dl,
html.inpanel-shell #inpanelOtaBanner.is-downloading .ip-ota-later { display: none; }
html.inpanel-shell #inpanelOtaBanner .ip-ota-prog > i {
  display: block;
  height: 100%;
  width: 0%;
  background: #fff;
}
