/* ==========================================================================
   MYBANGJO OWNER MOBILE APP — DEDICATED STYLESHEET
   Mobile-first, touch-optimized, self-contained shell for APK & Mobile PWA.
   ========================================================================== */

:root {
  --owner-theme-primary: #485868;
  --owner-theme-accent: #64748b;
  --owner-bg: #f8fafc;
  --owner-surface: #ffffff;
}

html {
  scroll-padding-top: max(var(--topbar-height-mobile, 68px), calc(var(--topbar-height-mobile, 68px) + env(safe-area-inset-top, 0px)));
}

body.x-owner-mobile-app {
  margin: 0;
  padding: 0;
  background-color: var(--owner-bg);
  color: #0f172a;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  overflow-x: clip;
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
  padding-bottom: 0 !important; /* Bottom clearance handled by .x-dash-main to prevent double padding */
  scroll-padding-top: max(var(--topbar-height-mobile, 68px), calc(var(--topbar-height-mobile, 68px) + env(safe-area-inset-top, 0px)));
}

body.x-owner-mobile-app::-webkit-scrollbar,
body.x-owner-mobile-app *::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

body.x-owner-mobile-app * {
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}

/* 1. Never show desktop sidebar in mobile app */
body.x-owner-mobile-app .x-dash-sidebar,
body.x-owner-mobile-app #x-dash-sidebar {
  display: none !important;
}

/* 2. Never show desktop horizontal data tables in mobile app */
body.x-owner-mobile-app .bm-orders-desktop-table,
body.x-owner-mobile-app .x-desktop-table-view {
  display: none !important;
}

/* 3. Hide legacy bottom nav — modern navigation is handled by OwnerAppShell */
body.x-owner-mobile-app .x-owner-bottom-nav,
body.x-owner-mobile-app #x-owner-bottom-nav {
  display: none !important;
}

body.x-owner-mobile-app .x-owner-nav-item {
  position: relative !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: flex-start !important;
  padding-top: 4px !important;
  gap: 6px !important;
  pointer-events: auto !important;
  cursor: pointer !important;
}

body.x-owner-mobile-app .x-owner-nav-item img,
body.x-owner-mobile-app .x-owner-nav-item svg {
  width: 20px !important;
  height: 20px !important;
  opacity: 0.85 !important;
  transition: filter 0.15s ease, opacity 0.15s ease !important;
}

body.x-owner-mobile-app .x-owner-nav-item span {
  font-family: 'Plus Jakarta Sans', sans-serif !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  line-height: 14px !important;
  color: #0F172A !important;
}

body.x-owner-mobile-app .x-owner-nav-item.active img,
body.x-owner-mobile-app .x-owner-nav-item.active svg {
  opacity: 1 !important;
  filter: brightness(0) saturate(100%) invert(48%) sepia(97%) saturate(1451%) hue-rotate(116deg) brightness(92%) contrast(101%) !important;
}

body.x-owner-mobile-app .x-owner-nav-item.active::before {
  content: '' !important;
  position: absolute !important;
  top: -10px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  width: 40px !important;
  height: 3.5px !important;
  border-radius: 0 0 4px 4px !important;
  background: #16A34A !important;
}

body.x-owner-mobile-app .x-owner-nav-item * {
  pointer-events: none !important;
}

body.x-owner-mobile-app.x-hide-bottom-nav .x-owner-bottom-nav,
body.x-owner-mobile-app .x-owner-bottom-nav.x-nav-hidden {
  display: none !important;
}

body.x-owner-mobile-app.x-hide-bottom-nav {
  padding-bottom: 0 !important;
}

body.x-owner-mobile-app.x-hide-bottom-nav .x-dash-main {
  padding-bottom: 5px !important;
}

body.x-owner-mobile-app.x-hide-bottom-nav .x-tab-content {
  padding-bottom: 5px !important;
}

body.x-owner-mobile-app.x-hide-bottom-nav .x-owner-child-page-shell,
body.x-owner-mobile-app.x-hide-bottom-nav .x-card-panel.x-owner-child-page-shell {
  padding-bottom: 5px !important;
  margin-bottom: 0 !important;
}

body.x-owner-mobile-app.x-hide-bottom-nav .x-owner-child-page-shell > *:last-child,
body.x-owner-mobile-app.x-hide-bottom-nav .x-tab-content > *:last-child {
  margin-bottom: 5px !important;
}

/* 4. Always display canonical mobile child header back chevron */
body.x-owner-mobile-app .x-owner-child-mobile-header .x-owner-mobile-page-back,
body.x-owner-mobile-app .x-title-back-btn.x-owner-mobile-page-back {
  display: inline-flex !important;
}

/* 5. Touch-friendly mobile cards stack */
body.x-owner-mobile-app .bm-orders-mobile-cards {
  display: block !important;
}

/* 6. Mobile container full width with topbar and bottom nav clearance */
body.x-owner-mobile-app .x-dash-main {
  margin: 0 !important;
  padding-top: max(var(--topbar-height-mobile, 68px), calc(var(--topbar-height-mobile, 68px) + env(safe-area-inset-top, 0px))) !important;
  padding-bottom: max(105px, calc(81px + 24px + env(safe-area-inset-bottom, 0px))) !important;
  padding-left: 16px !important;
  padding-right: 16px !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  scroll-padding-top: max(var(--topbar-height-mobile, 68px), calc(var(--topbar-height-mobile, 68px) + env(safe-area-inset-top, 0px))) !important;
}

/* 7. Dedicated mobile topbar (ensure fixed alignment and safe area support) */
body.x-owner-mobile-app .x-dash-topbar,
body.x-owner-mobile-app .x-owner-mobile-topbar {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  height: var(--topbar-height-mobile, 68px) !important;
  min-height: var(--topbar-height-mobile, 68px) !important;
  padding: 0 16px !important;
  padding-top: env(safe-area-inset-top, 0px) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  background: #ffffff !important;
  border-bottom: 1px solid #e2e8f0 !important;
  z-index: 100 !important;
  box-sizing: border-box !important;
}

/* 8. Sub-hub Cards Container (Katalog & Menu, Bahan & Produksi) matching design mockups */
#subpage-catalog-menu-hub > .x-subhub-card-container,
#subpage-catalog-menu-hub > .x-owner-child-mobile-header,
#master-menu-editor-view > .x-owner-child-mobile-header,
#master-menu-editor-view > .x-product-editor-breadcrumb-row {
  display: none !important;
}

body.x-owner-mobile-app .x-subhub-card-container,
.x-subhub-card-container {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 18px !important;
  padding: 14px !important;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.02) !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
  margin-bottom: 24px !important;
}

body.x-owner-mobile-app .x-subhub-item-card,
.x-subhub-item-card {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 14px 16px !important;
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 12px !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
  text-decoration: none !important;
}

body.x-owner-mobile-app .x-subhub-item-card:hover,
body.x-owner-mobile-app .x-subhub-item-card:active,
.x-subhub-item-card:hover,
.x-subhub-item-card:active {
  background: #f8fafc !important;
  border-color: #cbd5e1 !important;
}

.x-subhub-item-left {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  flex: 1;
}

.x-subhub-item-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.x-subhub-item-icon img,
.x-subhub-item-icon svg {
  display: block;
  filter: brightness(0) invert(1);
}

.x-subhub-item-icon.bg-green { background: #22c55e !important; }
.x-subhub-item-icon.bg-blue { background: #3b82f6 !important; }
.x-subhub-item-icon.bg-red { background: #ef4444 !important; }

.x-subhub-item-text {
  min-width: 0;
  flex: 1;
}

.x-subhub-item-text h4 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.25;
}

.x-subhub-item-text p {
  margin: 3px 0 0 0;
  font-size: 11.5px;
  font-style: normal;
  color: #64748b;
  line-height: 1.35;
}

.x-subhub-item-arrow {
  color: #94a3b8;
  flex-shrink: 0;
  margin-left: 8px;
  display: flex;
  align-items: center;
}

/* Hide old desktop canonical sections and unnecessary sub-headers in mobile */
body.x-owner-mobile-app .x-desktop-hub-canonical-sections,
.x-desktop-hub-canonical-sections {
  display: none !important;
}

/* =========================================================================
   OWNER CATEGORY MOBILE PAGE (matching design reference)
   ========================================================================= */
#tab-catalog-categories .x-owner-mobile-page-sub,
body.x-owner-mobile-app #tab-catalog-categories .x-owner-child-mobile-header .x-owner-mobile-page-sub,
.x-owner-mobile-app #tab-catalog-categories .x-owner-child-mobile-header .x-owner-mobile-page-sub {
  display: none !important;
}

[data-master-reference-tab="item"] {
  display: none !important;
}

body.x-owner-mobile-app #master-reference-tabs,
.x-owner-mobile-app #master-reference-tabs {
  display: none !important;
}

body.x-owner-mobile-app #master-categories-page.x-card-panel,
.x-owner-mobile-app #master-categories-page.x-card-panel {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
}

body.x-owner-mobile-app #master-reference-category-panel,
.x-owner-mobile-app #master-reference-category-panel {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 20px !important;
  padding: 16px !important;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.02) !important;
}

.x-category-control-bar {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  margin-bottom: 16px !important;
}

.x-filter-pills {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
}

#product-list-view .x-master-products-head {
  margin-bottom: 18px !important;
}

#product-list-view .x-master-products-search-wrap {
  margin-top: 18px !important;
  margin-bottom: 14px !important;
  width: 100% !important;
}

#master-products-card-panel.x-master-reference-panel,
body.x-owner-mobile-app #master-products-card-panel,
.x-owner-mobile-app #master-products-card-panel {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 20px !important;
  padding: 16px !important;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.02) !important;
  margin-top: 16px !important;
  margin-bottom: 24px !important;
  box-sizing: border-box !important;
  width: 100% !important;
}

#master-products-card-panel .x-category-control-bar {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  margin-bottom: 16px !important;
  width: 100% !important;
}

#master-products-cards-container.x-master-reference-card-list,
body.x-owner-mobile-app #master-products-cards-container,
.x-owner-mobile-app #master-products-cards-container {
  display: flex !important;
  flex-direction: column !important;
  gap: 12px !important;
  margin: 0 !important;
  padding: 0 !important;
  width: 100% !important;
}

#master-products-cards-container .x-master-reference-card,
body.x-owner-mobile-app #master-products-cards-container .x-master-reference-card,
.x-owner-mobile-app #master-products-cards-container .x-master-reference-card {
  border: 1px solid #e2e8f0 !important;
  border-radius: 12px !important;
  background: #ffffff !important;
  padding: 12px 14px !important;
  box-shadow: none !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
  width: 100% !important;
  box-sizing: border-box !important;
  margin-bottom: 0 !important;
}

#master-products-cards-container .x-master-reference-card:hover,
#master-products-cards-container .x-master-reference-card:active,
body.x-owner-mobile-app #master-products-cards-container .x-master-reference-card:hover,
body.x-owner-mobile-app #master-products-cards-container .x-master-reference-card:active,
.x-owner-mobile-app #master-products-cards-container .x-master-reference-card:hover,
.x-owner-mobile-app #master-products-cards-container .x-master-reference-card:active {
  background: #f8fafc !important;
  border-color: #cbd5e1 !important;
}

#master-products-cards-container .x-master-reference-card-main,
body.x-owner-mobile-app #master-products-cards-container .x-master-reference-card-main,
.x-owner-mobile-app #master-products-cards-container .x-master-reference-card-main {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  min-width: 0 !important;
  flex: 1 !important;
}

#master-products-cards-container .x-master-reference-icon,
body.x-owner-mobile-app #master-products-cards-container .x-master-reference-icon,
.x-owner-mobile-app #master-products-cards-container .x-master-reference-icon {
  width: 44px !important;
  height: 44px !important;
  min-width: 44px !important;
  border-radius: 12px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
  overflow: hidden !important;
}

#master-products-cards-container .x-master-reference-icon img,
#master-products-cards-container .x-master-reference-icon svg,
body.x-owner-mobile-app #master-products-cards-container .x-master-reference-icon img,
body.x-owner-mobile-app #master-products-cards-container .x-master-reference-icon svg,
.x-owner-mobile-app #master-products-cards-container .x-master-reference-icon img,
.x-owner-mobile-app #master-products-cards-container .x-master-reference-icon svg {
  width: 22px !important;
  height: 22px !important;
  max-width: 22px !important;
  max-height: 22px !important;
  object-fit: contain !important;
  display: block !important;
  filter: brightness(0) invert(1) !important;
}

body.x-owner-mobile-app .x-filter-pill,
.x-owner-mobile-app .x-filter-pill {
  padding: 6px 18px !important;
  border-radius: 9999px !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  border: 1px solid #e2e8f0 !important;
  background: #ffffff !important;
  color: #64748b !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
}

body.x-owner-mobile-app .x-filter-pill.active,
.x-owner-mobile-app .x-filter-pill.active {
  background: #2b2d31 !important;
  border-color: #2b2d31 !important;
  color: #ffffff !important;
}

.x-master-add-round,
#btn-add-master-category-page,
body.x-owner-mobile-app #btn-add-master-category-page,
.x-owner-mobile-app #btn-add-master-category-page {
  width: 36px !important;
  height: 36px !important;
  min-width: 36px !important;
  max-width: 36px !important;
  min-height: 36px !important;
  max-height: 36px !important;
  aspect-ratio: 1 / 1 !important;
  padding: 0 !important;
  margin: 0 !important;
  border-radius: 50% !important;
  background: #2b2d31 !important;
  color: #ffffff !important;
  border: none !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex: 0 0 36px !important;
  box-sizing: border-box !important;
  line-height: 1 !important;
  box-shadow: none !important;
  cursor: pointer !important;
  transition: background 0.15s ease !important;
}

.x-master-add-round svg,
#btn-add-master-category-page svg,
body.x-owner-mobile-app #btn-add-master-category-page svg,
.x-owner-mobile-app #btn-add-master-category-page svg {
  width: 18px !important;
  height: 18px !important;
  min-width: 18px !important;
  max-width: 18px !important;
  min-height: 18px !important;
  max-height: 18px !important;
  display: block !important;
  margin: auto !important;
  flex-shrink: 0 !important;
}

.x-master-add-round:hover,
#btn-add-master-category-page:hover,
body.x-owner-mobile-app #btn-add-master-category-page:hover,
.x-owner-mobile-app #btn-add-master-category-page:hover {
  background: #1e293b !important;
}

body.x-owner-mobile-app #master-categories-page-list,
.x-owner-mobile-app #master-categories-page-list {
  display: flex !important;
  flex-direction: column !important;
  gap: 12px !important;
}

body.x-owner-mobile-app #master-categories-page-list .x-master-reference-card,
.x-owner-mobile-app #master-categories-page-list .x-master-reference-card {
  border: 1px solid #e2e8f0 !important;
  border-radius: 12px !important;
  background: #ffffff !important;
  padding: 12px 14px !important;
  box-shadow: none !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
}

body.x-owner-mobile-app #master-categories-page-list .x-master-reference-card:hover,
body.x-owner-mobile-app #master-categories-page-list .x-master-reference-card:active,
.x-owner-mobile-app #master-categories-page-list .x-master-reference-card:hover,
.x-owner-mobile-app #master-categories-page-list .x-master-reference-card:active {
  background: #f8fafc !important;
  border-color: #cbd5e1 !important;
}

body.x-owner-mobile-app #master-categories-page-list .x-master-reference-card-main,
.x-owner-mobile-app #master-categories-page-list .x-master-reference-card-main {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  min-width: 0 !important;
  flex: 1 !important;
}

body.x-owner-mobile-app #master-categories-page-list .x-master-reference-icon,
.x-owner-mobile-app #master-categories-page-list .x-master-reference-icon {
  width: 44px !important;
  height: 44px !important;
  min-width: 44px !important;
  border-radius: 12px !important;
  background: #22c55e !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
}

body.x-owner-mobile-app #master-categories-page-list .x-master-reference-icon img,
body.x-owner-mobile-app #master-categories-page-list .x-master-reference-icon svg,
.x-owner-mobile-app #master-categories-page-list .x-master-reference-icon img,
.x-owner-mobile-app #master-categories-page-list .x-master-reference-icon svg {
  display: block !important;
  filter: brightness(0) invert(1) !important;
}

body.x-owner-mobile-app #master-categories-page-list .x-master-reference-copy,
.x-owner-mobile-app #master-categories-page-list .x-master-reference-copy {
  min-width: 0 !important;
  flex: 1 !important;
}

body.x-owner-mobile-app #master-categories-page-list .x-master-reference-copy strong,
.x-owner-mobile-app #master-categories-page-list .x-master-reference-copy strong {
  font-size: 15px !important;
  font-weight: 700 !important;
  color: #0f172a !important;
  line-height: 1.25 !important;
  display: block !important;
}

body.x-owner-mobile-app #master-categories-page-list .x-master-category-menu-list,
.x-owner-mobile-app #master-categories-page-list .x-master-category-menu-list {
  font-size: 11.5px !important;
  font-style: normal !important;
  color: #64748b !important;
  margin-top: 3px !important;
  display: block !important;
  max-width: 175px !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  line-height: 1.35 !important;
}

#master-categories-page-list .x-toggle {
  width: 42px !important;
  height: 24px !important;
  position: relative !important;
  display: inline-block !important;
  cursor: pointer !important;
  flex-shrink: 0 !important;
}

#master-categories-page-list .x-toggle input {
  opacity: 0 !important;
  width: 0 !important;
  height: 0 !important;
  position: absolute !important;
}

#master-categories-page-list .x-toggle-slider {
  position: absolute !important;
  inset: 0 !important;
  background: #ef4444 !important;
  border-radius: 999px !important;
  transition: background 0.2s ease !important;
}

#master-categories-page-list .x-toggle-slider::before {
  content: '' !important;
  position: absolute !important;
  width: 18px !important;
  height: 18px !important;
  left: 3px !important;
  top: 3px !important;
  background: #ffffff !important;
  border-radius: 50% !important;
  transition: transform 0.2s ease !important;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.25) !important;
}

#master-categories-page-list .x-toggle input:checked + .x-toggle-slider,
#master-categories-page-list .x-toggle.x-toggle-on .x-toggle-slider {
  background: #22c55e !important;
}

#master-categories-page-list .x-toggle input:checked + .x-toggle-slider::before,
#master-categories-page-list .x-toggle.x-toggle-on .x-toggle-slider::before {
  transform: translateX(18px) !important;
}

/* Master Menu Page & Editor Normalization (Strictly Matching Item Editor Reference) */
body.x-owner-mobile-app #master-menu-editor-view,
body.x-owner-mobile-app #master-menu-list-view,
.x-owner-mobile-app #master-menu-editor-view,
.x-owner-mobile-app #master-menu-list-view {
  width: 100% !important;
  box-sizing: border-box !important;
}

body.x-owner-mobile-app #form-master-menu,
.x-owner-mobile-app #form-master-menu {
  max-width: 920px !important;
  width: 100% !important;
  margin: 0 auto !important;
  box-sizing: border-box !important;
}

body.x-owner-mobile-app #cm-items-container .x-composed-menu-component-row,
.x-owner-mobile-app #cm-items-container .x-composed-menu-component-row {
  display: flex !important;
  flex-direction: column !important;
  width: 100% !important;
  box-sizing: border-box !important;
  background: #FFFFFF !important;
  border: 1px solid #CBD5E1 !important;
  border-radius: 16px !important;
  padding: 14px 16px !important;
  gap: 12px !important;
  grid-template-columns: none !important;
  align-items: stretch !important;
}

body.x-owner-mobile-app #cm-items-container .x-cm-item-variant-block,
.x-owner-mobile-app #cm-items-container .x-cm-item-variant-block {
  display: flex !important;
  flex-direction: column !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

body.x-owner-mobile-app #master-menu-editor-view .x-card,
body.x-owner-mobile-app #master-menu-editor-view .x-item-editor-card,
.x-owner-mobile-app #master-menu-editor-view .x-card,
.x-owner-mobile-app #master-menu-editor-view .x-item-editor-card {
  width: 100% !important;
  background: #FFFFFF !important;
  border-radius: 18px !important;
  border: 1px solid #E2E8F0 !important;
  padding: 20px !important;
  margin-bottom: 14px !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02) !important;
  box-sizing: border-box !important;
}

body.x-owner-mobile-app #master-menu-editor-view .x-item-editor-actions,
.x-owner-mobile-app #master-menu-editor-view .x-item-editor-actions {
  display: flex !important;
  flex-direction: column !important;
  gap: 12px !important;
  width: 100% !important;
  margin-top: 20px !important;
  margin-bottom: 24px !important;
}

body.x-owner-mobile-app #master-menu-editor-view .x-item-editor-actions-row1,
.x-owner-mobile-app #master-menu-editor-view .x-item-editor-actions-row1 {
  display: flex !important;
  flex-direction: row !important;
  gap: 12px !important;
  width: 100% !important;
}

body.x-owner-mobile-app #master-menu-editor-view .x-item-editor-actions-row1 button,
.x-owner-mobile-app #master-menu-editor-view .x-item-editor-actions-row1 button {
  flex: 1 1 0 !important;
  height: 46px !important;
  min-height: 46px !important;
}

body.x-owner-mobile-app #btn-save-master-menu-active,
.x-owner-mobile-app #btn-save-master-menu-active {
  width: 100% !important;
  flex: none !important;
  height: 46px !important;
  min-height: 46px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: #00A637 !important;
  border: none !important;
  color: #FFFFFF !important;
  border-radius: 12px !important;
  font-weight: 700 !important;
  font-size: 15px !important;
}

@media (max-width: 768px) {
  body.x-owner-mobile-app #master-menu-editor-view.x-card-panel,
  body.x-owner-mobile-app #master-menu-editor-view,
  .x-owner-mobile-app #master-menu-editor-view.x-card-panel,
  .x-owner-mobile-app #master-menu-editor-view {
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  body.x-owner-mobile-app #form-master-menu,
  .x-owner-mobile-app #form-master-menu {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
  }

  body.x-owner-mobile-app #master-menu-editor-view .x-card,
  body.x-owner-mobile-app #master-menu-editor-view .x-item-editor-card,
  .x-owner-mobile-app #master-menu-editor-view .x-card,
  .x-owner-mobile-app #master-menu-editor-view .x-item-editor-card {
    width: 100% !important;
    max-width: 100% !important;
    padding: 16px !important;
    border-radius: 16px !important;
    margin-bottom: 12px !important;
    box-sizing: border-box !important;
  }

  body.x-owner-mobile-app .x-dash-main > .x-tab-content,
  .x-owner-command-center,
  #x-owner-command-center,
  #tab-overview,
  #tab-business,
  #owner-business-main-view,
  #modern-business-hub-mount,
  #subpage-catalog-menu-hub,
  #tab-materials,
  #modern-materials-page-mount,
  #modern-material-editor-page-mount,
  #tab-catalog-categories,
  #modern-categories-page-mount,
  #master-categories-page,
  #tab-catalog-products,
  #modern-item-master-page-mount,
  #modern-item-editor-page-mount,
  #product-editor-view,
  #category-editor-view {
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
}

/* 9. Anti-Flicker & Smooth Page Transition Rules for Owner Mobile */
body.x-owner-mobile-app .x-tab-content {
  animation: none !important;
  transform: none !important;
}

/* Business Hub: 70% reduced clearance between last card and bottom navigation bar */
body.x-owner-mobile-app #tab-business.x-tab-content {
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
}
body.x-owner-mobile-app #tab-business #modern-business-hub-root {
  padding-bottom: 0 !important;
  margin-bottom: 0 !important;
}

body.x-owner-mobile-app #legacy-business-main-content,
body.x-owner-mobile-app #master-categories-page,
body.x-owner-mobile-app #product-list-view,
body.x-owner-mobile-app #legacy-materials-content {
  display: none !important;
}

/* ==========================================================================
   DESKTOP RESPONSIVE PHONE FRAME (Centered 430px iPhone Simulator on PC/Mac)
   ========================================================================== */
@media (min-width: 640px) {
  body.x-owner-mobile-app {
    background: #0f172a !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    height: 100vh !important;
    height: 100dvh !important;
    min-height: 100vh !important;
    min-height: 100dvh !important;
    padding: 20px 0 !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
  }

  .x-owner-viewport-container {
    max-width: 430px !important;
    width: 100% !important;
    height: calc(100vh - 40px) !important;
    height: calc(100dvh - 40px) !important;
    min-height: 0 !important;
    max-height: calc(100vh - 40px) !important;
    max-height: calc(100dvh - 40px) !important;
    background: #f8fafc !important;
    border-radius: 36px !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7), 0 0 0 10px #1e293b, 0 0 0 12px #334155 !important;
    overflow-x: hidden !important;
    position: relative !important;
    display: flex !important;
    flex-direction: column !important;
  }

  #xentra-owner-app-mount,
  #xentra-owner-app-root {
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    flex: 1 1 auto !important;
    border-radius: 36px !important;
  }

  #xentra-owner-app-root {
    overflow: hidden !important;
  }

  #xentra-owner-app-root > main {
    min-height: 0 !important;
    overflow-y: auto !important;
    overscroll-behavior-y: contain;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
  }

  #xentra-owner-app-root > main::-webkit-scrollbar {
    width: 5px;
  }

  #xentra-owner-app-root > main::-webkit-scrollbar-track {
    background: transparent;
  }

  #xentra-owner-app-root > main::-webkit-scrollbar-thumb {
    background-color: #cbd5e1;
    border-radius: 9999px;
  }

  #clean-owner-bottom-nav {
    position: sticky !important;
    bottom: 0 !important;
    left: auto !important;
    right: auto !important;
    width: 100% !important;
    max-width: 430px !important;
    margin-top: auto !important;
    flex: 0 0 auto !important;
    border-bottom-left-radius: 36px !important;
    border-bottom-right-radius: 36px !important;
  }

  /* Body portals for mobile action bars must line up with the centered Owner frame on desktop. */
  body.x-owner-mobile-app [id^="modern-"][id$="-bottom-bar"] {
    left: 0 !important;
    right: 0 !important;
    margin: 0 auto !important;
    bottom: 20px !important;
    width: 100% !important;
    max-width: 430px !important;
    border-bottom-left-radius: 36px !important;
    border-bottom-right-radius: 36px !important;
  }

  body.x-owner-mobile-app [id^="modern-"][id$="-bottom-bar"] > div {
    border-bottom-left-radius: 36px !important;
    border-bottom-right-radius: 36px !important;
  }

  /* Desktop Owner profile button should use the same outlined avatar as mobile. */
  body.x-owner-mobile-app #dash-user-profile {
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
  }

  body.x-owner-mobile-app #dash-user-profile > .x-avatar.x-avatar-stroke-round {
    width: 38px !important;
    height: 38px !important;
    border-radius: 50% !important;
    border: 1.5px solid #cbd5e1 !important;
    background: #ffffff !important;
    color: #334155 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
    padding: 0 !important;
  }

  body.x-owner-mobile-app #dash-user-profile:hover > .x-avatar.x-avatar-stroke-round {
    border-color: #94a3b8 !important;
    background: #f8fafc !important;
  }
}

#clean-owner-bottom-nav button {
  background: transparent !important;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  padding: 12px 0 6px 0 !important;
  position: relative !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: flex-start !important;
}

@media (max-width: 639px) {
  body.x-owner-mobile-app {
    background: #f8fafc !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .x-owner-viewport-container {
    width: 100% !important;
    min-height: 100vh !important;
    background: #f8fafc !important;
  }
}



