/* Scheme A shell and the overview and product archive components. */
#app .ymg-shell {
  --bd-table-heading: var(--ymg-table-heading);
  --bd-content-inset: var(--ymg-content-inset);
  --sidebar: var(--ymg-w-sidebar);
  grid-template-columns: var(--ymg-w-sidebar) minmax(0,1fr);
  background: var(--ymg-page);
  color: var(--ymg-text);
  font-family: var(--ymg-font);
}
#app .ymg-shell .sidebar {
  width: var(--ymg-w-sidebar);
  padding: var(--ymg-space-4) var(--ymg-space-3);
  background: #1B1429;
  border: 0;
  color: var(--ymg-nav-text);
}
.ymg-switcher {
  display: flex;
  align-items: center;
  gap: var(--ymg-space-2);
  padding: var(--ymg-space-2);
  background: var(--ymg-nav-field);
  border: 1px solid var(--ymg-nav-border);
  border-radius: var(--ymg-radius-md);
  color: var(--ymg-nav-text);
  min-width: 0;
  font-size: var(--ymg-fs-sm);
}
.ymg-switcher select { min-width: 0; width: 100%; }
.ymg-switcher svg { flex: none; }
#app .ymg-shell .topbar {
  display: flex;
  align-items: center;
  gap: var(--ymg-space-2);
  height: var(--ymg-h-topbar);
  padding: 0 var(--ymg-page-pad);
  background: var(--ymg-surface);
  border-bottom: 1px solid var(--ymg-border);
  z-index: var(--ymg-z-nav);
}
#app .ymg-shell .topbar .workspace-account {
  margin-inline-start: auto;
  min-width: 0;
  gap: 2px;
  padding: 2px 8px 2px 4px;
  background: var(--light);
  border-radius: var(--ymg-radius-pill);
}
#app .topbar .workspace-account button {
  border: 0;
  background: transparent;
  color: var(--ink);
  box-shadow: none;
}
#app .topbar .workspace-identity {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: var(--ymg-space-2);
  padding: 2px 8px 2px 3px;
  border-inline-end: 1px solid var(--bd-control-border);
}
.workspace-identity .avatar {
  flex: none;
  width: 26px;
  height: 26px;
  overflow: hidden;
}
.workspace-identity .avatar img { width: 100%; height: 100%; object-fit: cover; }
.workspace-enterprise,.workspace-person { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.workspace-phone { flex: none; white-space: nowrap; color: var(--muted); }
#app .topbar .workspace-account-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 26px;
  height: 32px;
  padding: 0;
  color: var(--bd-primary);
  border-radius: var(--ymg-radius-pill);
}
#app .topbar .workspace-account-icon:hover { background: var(--bd-row-hover); }
#app .topbar .workspace-signout { color: var(--ymg-danger); }
.workspace-account-icon svg { width: 16px; height: 16px; }
.ymg-tool-row.ymg-tool-more {
  grid-template-columns: minmax(0,1fr) 18px;
  color: var(--ymg-primary);
}
.ymg-tool-more svg { width: 18px; height: 18px; }
.ymg-icon {
  display: inline-grid;
  place-items: center;
  min-width: var(--ymg-h-control);
  min-height: var(--ymg-h-control);
  padding: 0;
  border: 0;
  border-radius: var(--ymg-radius-sm);
  background: transparent;
  color: inherit;
  cursor: pointer;
}
.ymg-icon svg,.ymg-switcher svg,.ymg-menu svg { width: var(--ymg-fs-xl); height: var(--ymg-fs-xl); }
.ymg-icon:hover,.ymg-icon-accent { background: var(--ymg-primary-soft); color: var(--ymg-primary); }
.ymg-dropdown { position: relative; }
.ymg-dropdown > summary { display: flex; align-items: center; gap: var(--ymg-space-2); min-height: var(--ymg-h-control); }
#app .ymg-account .avatar { border-radius: var(--ymg-radius-pill); background: var(--ymg-primary-soft); color: var(--ymg-primary); }
.ymg-menu {
  display: grid;
  gap: var(--ymg-space-1);
  padding: var(--ymg-space-2);
  background: var(--ymg-surface);
  color: var(--ymg-text);
  border: 1px solid var(--ymg-border);
  border-radius: var(--ymg-radius-md);
  min-width: 10rem;
}
.ymg-account .ymg-menu { position: absolute; inset: 100% 0 auto auto; z-index: var(--ymg-z-overlay); min-width: 12rem; }
.ymg-menu-note { padding: var(--ymg-space-2); color: var(--ymg-text-secondary); white-space: nowrap; }
.ymg-menu button {
  display: flex;
  align-items: center;
  gap: var(--ymg-space-2);
  text-align: start;
  background: transparent;
  color: inherit;
  border: 0;
  border-radius: var(--ymg-radius-sm);
  padding: 0 var(--ymg-space-2);
  min-height: var(--ymg-h-control);
  cursor: pointer;
}
.ymg-menu button:hover { background: var(--ymg-primary-soft); color: var(--ymg-primary); }
.ymg-menu button.ymg-danger { color: var(--ymg-danger); }
.ymg-menu button.ymg-danger:hover { background: var(--ymg-danger-soft); }
.ymg-row-menu { position: fixed; inset: auto; margin: 0; }
.ymg-row-menu:not(:popover-open) { display: none; }
#app .ymg-shell .content { padding-inline: var(--ymg-page-pad); }
#app .ymg-shell .page-head .eyebrow { display: none; }
#app .ymg-shell .page-head h1 { font-size: var(--ymg-fs-2xl); color: var(--ymg-text); }
#app .ymg-shell :is(.dashboard-overview,.ymg-product-archive) .panel,
#app .ymg-shell .ymg-product-archive {
  border: 1px solid var(--ymg-border);
  border-radius: var(--ymg-radius-lg);
  background: var(--ymg-surface);
  box-shadow: var(--ymg-shadow-card);
}
#app .ymg-shell .dashboard-overview > .overview-finances {
  display: grid;
  grid-template-columns: minmax(0,1.25fr) minmax(0,4fr);
  gap: var(--ymg-card-gap);
}
.ymg-shell .overview-finance-details { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: var(--ymg-card-gap); }
#app .ymg-shell .overview-finances .stat {
  min-width: 0;
  padding: var(--ymg-space-4);
  background: var(--ymg-surface);
  border: 1px solid var(--ymg-border);
  border-radius: var(--ymg-radius-lg);
  box-shadow: var(--ymg-shadow-card);
}
#app .ymg-shell .overview-finances > .stat {
  order: -1;
  background: var(--ymg-hero-gradient);
  border-color: transparent;
}
#app .ymg-shell .overview-finances > .stat :is(.stat-label,.stat-value,svg) { color: var(--ymg-text-on-primary); }
#app .ymg-shell .overview-finances .stat-label { display: flex; align-items: center; gap: var(--ymg-space-2); font-size: var(--ymg-fs-sm); }
#app .ymg-shell .overview-finances .stat-value { font-size: var(--ymg-fs-num); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
#app .ymg-shell .dashboard-overview > .grid-main { grid-template-columns: minmax(0,1fr) minmax(16rem,21.25rem); gap: var(--ymg-card-gap); }
.ymg-progress { width: 100%; height: var(--ymg-radius-xs); appearance: none; color: var(--ymg-primary); }
.ymg-progress::-webkit-progress-bar { background: var(--ymg-primary-soft); border-radius: var(--ymg-radius-pill); }
.ymg-progress::-webkit-progress-value { background: var(--ymg-primary-gradient); border-radius: var(--ymg-radius-pill); }
.ymg-progress::-moz-progress-bar { background: var(--ymg-primary-gradient); border-radius: var(--ymg-radius-pill); }
.ymg-skeleton { min-height: 8rem; margin: var(--ymg-content-inset); border-radius: var(--ymg-radius-md); background: repeating-linear-gradient(var(--ymg-surface-alt) 0 var(--ymg-space-4), var(--ymg-surface) var(--ymg-space-4) var(--ymg-space-7)); }
.ymg-error { margin: var(--ymg-content-inset); padding: var(--ymg-space-2); background: var(--ymg-danger-soft); color: var(--ymg-danger); border-radius: var(--ymg-radius-md); }
.ymg-product-archive { position: relative; }
#app .ymg-product-archive .toolbar { padding-inline: var(--bd-content-inset); }
.ymg-product-count { padding: 0 var(--bd-content-inset) var(--ymg-space-3); color: var(--ymg-text-secondary); }
#app .ymg-product-archive table :is(th,td) { text-align: start; padding-inline: var(--ymg-space-3); }
#app .ymg-product-archive table :is(th,td):first-child { padding-inline-start: var(--bd-content-inset); }
#app .ymg-product-archive table :is(th,td):last-child { text-align: center; padding-inline-end: var(--bd-content-inset); }
#app .ymg-product-archive td { height: var(--ymg-h-row); }
.ymg-product-identity { display: flex; align-items: center; gap: var(--ymg-space-3); min-width: 0; text-align: start; }
.ymg-product-identity > div { min-width: 0; }
.ymg-product-identity small { display: block; color: var(--ymg-text-secondary); font-size: 11px; overflow-wrap: anywhere; }
.ymg-product-identity .product-thumb { width: var(--ymg-h-touch); height: var(--ymg-h-touch); flex: none; border-radius: var(--ymg-radius-sm); }
.ymg-pagination { display: flex; justify-content: flex-end; align-items: center; gap: var(--ymg-space-3); padding: var(--action-divider-gap) var(--bd-content-inset); }
#app .ymg-shell :is(.ymg-product-cards,.ymg-filter-trigger,.ymg-fab) { display: none; }
#modal-root .modal-overlay:has(:is(.ymg-drawer,.ymg-sheet,.ymg-features)) { background: var(--ymg-overlay); }
#modal-root .modal-overlay:has(.ymg-drawer) { align-items: stretch; justify-content: flex-end; padding: 0; }
#modal-root .modal.ymg-drawer {
  width: min(100%,var(--ymg-w-drawer));
  max-width: var(--ymg-w-drawer);
  height: 100%;
  max-height: none;
  border-radius: 0;
  background: var(--ymg-surface);
  box-shadow: var(--ymg-shadow-drawer);
  animation: ymg-slide var(--ymg-dur-sheet) var(--ymg-ease);
}
@keyframes ymg-slide { from { transform: translateX(100%); } }
#modal-root .ymg-drawer .modal-head { position: relative; display: block; background: var(--ymg-surface); }
.ymg-drawer .modal-head p { color: var(--ymg-text-secondary); margin: var(--ymg-space-1) 0 0; }
.ymg-drawer .modal-head > button { position: absolute; inset: var(--ymg-space-3) var(--ymg-space-3) auto auto; min-width: var(--ymg-h-control); }
.ymg-drawer .section-label { padding-inline-start: var(--ymg-space-2); border-inline-start: var(--ymg-space-1) solid var(--ymg-primary); }
.ymg-drawer .image-upload-row { background: var(--ymg-primary-soft); border: 1px dashed var(--ymg-primary-border); border-radius: var(--ymg-radius-md); padding: var(--ymg-space-3); }
.ymg-required-note { margin-inline-end: auto; color: var(--ymg-text-secondary); font-size: var(--ymg-fs-xs); }
.ymg-feature-group { --ymg-feature: var(--ymg-cat-1); --ymg-feature-soft: var(--ymg-cat-1-soft); }
.ymg-category-2 { --ymg-feature: var(--ymg-cat-2); --ymg-feature-soft: var(--ymg-cat-2-soft); }
.ymg-category-3 { --ymg-feature: var(--ymg-cat-3); --ymg-feature-soft: var(--ymg-cat-3-soft); }
.ymg-category-4 { --ymg-feature: var(--ymg-cat-4); --ymg-feature-soft: var(--ymg-cat-4-soft); }
.ymg-feature-group[hidden],.ymg-feature-group .mobile-app-grid button[hidden] { display: none !important; }

@media (min-width:1101px) {
  #app .ymg-shell .dashboard-overview {
    --overview-columns: minmax(0,1.25fr) repeat(4,minmax(0,1fr));
  }
  #app .ymg-shell .dashboard-overview > :is(.overview-finances,.grid-main) {
    grid-template-columns: var(--overview-columns);
  }
  #app .ymg-shell .overview-finance-details {
    grid-column: 2 / -1;
    grid-row: 1;
    grid-template-columns: subgrid;
  }
  #app .ymg-shell .dashboard-overview > .grid-main > :first-child {
    grid-column: 1 / -2;
  }
  #app .ymg-shell .dashboard-overview > .grid-main > :last-child {
    grid-column: -2 / -1;
  }
}
@media (min-width:761px) and (max-width:1100px) {
  #app .ymg-shell .dashboard-overview > .overview-finances { grid-template-columns: minmax(0,1fr) minmax(0,2fr); }
  .ymg-shell .overview-finance-details { grid-template-columns: repeat(2,minmax(0,1fr)); }
  #app .ymg-shell .dashboard-overview > .grid-main { grid-template-columns: minmax(0,1fr); }
}
@media (max-width:760px) {
  #app .ymg-shell .topbar {
    display: grid;
    grid-template-columns: var(--ymg-h-touch) minmax(0,1fr) var(--ymg-h-touch);
    height: calc(var(--ymg-h-topbar-m) + env(safe-area-inset-top));
    padding: env(safe-area-inset-top) var(--ymg-space-2) 0;
    background: var(--ymg-nav-bg);
    color: var(--ymg-text-on-primary);
    border: 0;
  }
  #app .ymg-shell :is(.mobile-back,.mobile-page-name) { color: inherit; }
  .ymg-account-name { display: none; }
  #app .ymg-shell .content { padding-inline: var(--ymg-page-pad) !important; }
  #app .ymg-shell .page-head :is(h1,.subtitle) { display: none; }
  #app .ymg-shell .page-head:not(:has(.actions > *)) { display: none; }
  #app .ymg-shell.ymg-has-fab .page-head { display: none; }
  #app .ymg-shell .mobile-bottom-nav {
    min-height: calc(var(--ymg-h-tabbar-m) + env(safe-area-inset-bottom));
    background: var(--ymg-surface);
    border-color: var(--ymg-border);
    color: var(--ymg-text-secondary);
  }
  #app .ymg-shell .mobile-bottom-nav button.active { color: var(--ymg-primary); }
  #app .ymg-shell .dashboard-overview > .grid-main { display: block; }
  .ymg-home-hero {
    margin: calc(-1 * var(--ymg-space-3)) calc(-1 * var(--ymg-page-pad)) 0;
    padding: var(--ymg-space-2) var(--ymg-page-pad) var(--ymg-space-8);
    background: var(--ymg-nav-bg);
    color: var(--ymg-text-on-primary);
  }
  .ymg-home-hero strong { display: block; margin-top: var(--ymg-space-3); font-size: var(--ymg-fs-2xl); }
  .ymg-home-hero p { margin: var(--ymg-space-1) 0; color: var(--ymg-nav-text); }
  .ymg-home-tools { display: flex; align-items: center; gap: var(--ymg-space-1); }
  .ymg-home-tools .ymg-switcher { margin-inline-end: auto; }
  #app .ymg-shell .dashboard-overview:has(.ymg-home-hero) > .page-head { display: none; }
  #app .ymg-shell .dashboard-overview > .overview-finances {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0,1fr);
    margin-top: calc(-1 * var(--ymg-space-5));
    padding: var(--ymg-space-3);
    gap: var(--ymg-space-2);
    background: var(--ymg-hero-gradient-m);
    border-radius: var(--ymg-radius-xl);
    box-shadow: var(--ymg-shadow-hero);
  }
  #app .ymg-shell .overview-finance-details { grid-template-columns: repeat(2,minmax(0,1fr)); gap: var(--ymg-space-2); }
  #app .ymg-shell .overview-finances .stat {
    min-height: 0;
    padding: var(--ymg-space-2);
    background: transparent;
    border: 0;
    box-shadow: none;
  }
  #app .ymg-shell .overview-finances .stat :is(.stat-label,.stat-value,svg) { color: var(--ymg-text-on-primary); }
  #app .ymg-shell .overview-finances .stat-note { display: none; }
  #app .ymg-shell .overview-finance-details .stat-value { font-size: var(--ymg-fs-lg); }
  .ymg-feature-group {
    padding: var(--ymg-space-2);
    margin-bottom: var(--ymg-card-gap);
    border-radius: var(--ymg-radius-xl);
    border: 1px solid var(--ymg-border);
    background: var(--ymg-surface);
  }
  .ymg-home-shortcuts { margin-top: var(--ymg-space-4); }
  .ymg-feature-group h3 { margin: var(--ymg-space-2); font-size: var(--ymg-fs-lg); }
  :is(#app,#modal-root) .ymg-feature-group .mobile-app-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: var(--ymg-space-1); }
  :is(#app,#modal-root) .ymg-feature-group .mobile-app-grid button {
    position: relative;
    display: grid;
    justify-items: center;
    gap: var(--ymg-space-1);
    border: 0;
    background: transparent;
    color: var(--ymg-text);
    padding: var(--ymg-space-1) 0;
    font-size: var(--ymg-fs-xs);
  }
  .ymg-feature-group .mobile-app-grid button > span:first-child {
    display: grid;
    place-items: center;
    width: var(--ymg-h-touch);
    height: var(--ymg-h-touch);
    background: var(--ymg-feature-soft);
    color: var(--ymg-feature);
    border-radius: var(--ymg-radius-md);
  }
  #app .ymg-shell .ymg-product-archive { border: 0; background: transparent; }
  #app .ymg-product-archive :is(.ymg-product-table,.toolbar .filter-row) { display: none; }
  #app .ymg-shell :is(.ymg-product-cards,.ymg-filter-trigger,.ymg-fab) { display: flex; }
  .ymg-product-mobile-header {
    margin-inline: calc(-1 * var(--ymg-page-pad));
    margin-block-end: var(--ymg-space-3);
    padding-block-end: var(--ymg-space-3);
    background: var(--ymg-nav-bg);
  }
  #app .ymg-product-archive .toolbar-search-group { width: 100%; display: flex; gap: var(--ymg-space-2); }
  #app .ymg-product-archive .search { flex: 1; min-width: 0; background: var(--ymg-nav-field); color: var(--ymg-text-on-primary); border-color: var(--ymg-nav-border); }
  #app .ymg-product-archive .search input { color: inherit; }
  #app .ymg-product-archive .search input::placeholder { color: var(--ymg-nav-text); }
  #app .ymg-product-archive .ymg-filter-trigger { position: relative; min-width: var(--ymg-h-touch); }
  .ymg-filter-trigger i { position: absolute; inset: var(--ymg-space-1) var(--ymg-space-1) auto auto; width: var(--ymg-space-2); height: var(--ymg-space-2); border-radius: 50%; background: var(--ymg-primary); }
  .ymg-product-cards { flex-direction: column; gap: var(--ymg-card-gap); }
  .ymg-product-count { padding-inline: 0; }
  .ymg-object-card {
    display: grid;
    grid-template-columns: minmax(0,1fr) auto;
    align-items: center;
    gap: var(--ymg-space-2);
    padding: var(--ymg-space-3);
    background: var(--ymg-surface);
    border: 1px solid var(--ymg-border);
    border-radius: var(--ymg-radius-xl);
  }
  .ymg-object-card .product-thumb { width: var(--ymg-h-tabbar-m); height: var(--ymg-h-tabbar-m); }
  .ymg-object-card strong { font-variant-numeric: tabular-nums; }
  .ymg-object-meta { display: flex; align-items: center; gap: var(--ymg-space-2); grid-column: 1 / -1; color: var(--ymg-text-secondary); }
  .ymg-object-meta .ymg-icon { margin-inline-start: auto; }
  #app .ymg-shell .ymg-fab {
    position: fixed;
    right: var(--ymg-space-4);
    bottom: calc(var(--ymg-h-tabbar-m) + env(safe-area-inset-bottom) + var(--ymg-space-4));
    min-height: var(--ymg-h-topbar-m);
    z-index: calc(var(--ymg-z-nav) + 1);
    border-radius: var(--ymg-radius-pill);
    background: var(--ymg-primary);
    color: var(--ymg-text-on-primary);
    box-shadow: var(--ymg-shadow-float);
  }
  #modal-root .modal-overlay:has(.ymg-sheet) { align-items: end; }
  #modal-root .modal.ymg-sheet {
    width: 100%;
    height: auto;
    max-height: 86dvh;
    border-radius: var(--ymg-radius-2xl) var(--ymg-radius-2xl) 0 0;
    background: var(--ymg-surface);
  }
  .ymg-sheet::before { content: ''; display: block; width: var(--ymg-space-8); height: var(--ymg-space-1); margin: var(--ymg-space-2) auto 0; border-radius: var(--ymg-radius-pill); background: var(--ymg-border); }
  .ymg-sheet-actions { padding-inline: 0; border: 0; }
  .ymg-sheet-actions button { min-height: var(--ymg-h-tabbar-m); }
  #ymg-product-filters fieldset { padding: 0; border: 0; margin: 0 0 var(--ymg-space-4); }
  .ymg-pills { display: flex; flex-wrap: wrap; gap: var(--ymg-space-2); }
  .ymg-pills label { position: relative; cursor: pointer; }
  .ymg-pills input { position: absolute; opacity: 0; }
  .ymg-pills span { display: flex; align-items: center; padding-inline: var(--ymg-space-3); min-height: var(--ymg-h-touch); border: 1px solid var(--ymg-border); border-radius: var(--ymg-radius-md); background: var(--ymg-surface-alt); }
  .ymg-pills input:checked + span { background: var(--ymg-primary-soft); border-color: var(--ymg-primary-border); color: var(--ymg-primary); }
  .ymg-pills input:focus-visible + span { box-shadow: var(--ymg-focus-ring); }
  #modal-root :is(.ymg-drawer,.ymg-features) { width: 100%; max-width: none; height: 100%; max-height: none; border-radius: 0; }
  #modal-root .ymg-drawer .form-grid { grid-template-columns: minmax(0,1fr); }
  #modal-root .ymg-drawer .ymg-required-note { display: none; }
  #modal-root :is(.ymg-drawer,.ymg-sheet) .modal-foot .primary { flex: 2; }
  #modal-root :is(.ymg-drawer,.ymg-sheet) .modal-foot .btn:not(.primary) { flex: 1; }
  #modal-root .ymg-more-search { margin-bottom: var(--ymg-space-3); }
}
@media (prefers-reduced-motion:reduce) { #modal-root .modal.ymg-drawer { animation: none; } }
#app .ymg-shell {
  --bd-primary: var(--ymg-primary);
  --bd-link: var(--ymg-primary);
  --bd-hover: var(--ymg-primary-hover);
  --bd-control-border: var(--ymg-border);
  --bd-ring: var(--ymg-focus-ring);
  --bd-table-row-hover: var(--ymg-row-selected);
}
html body #app .ymg-shell .overview-finances .stat .stat-value { white-space: normal !important; }
#app .ymg-shell .ymg-product-table .row-actions { gap: var(--ymg-radius-md) !important; }
#app .ymg-shell .ymg-product-table .ymg-icon-accent { order: -1; }
#app .ymg-shell .ymg-product-identity .product-archive-name { color: var(--ymg-text); font-weight: var(--ymg-fw-heavy); text-align: start; }
#app .ymg-shell .ymg-product-identity .product-archive-name:hover { color: var(--ymg-primary); }
.ymg-data-state .mini-total > span::before {
  content: '';
  display: inline-block;
  margin-inline-end: var(--ymg-space-2);
  width: var(--ymg-space-2);
  height: var(--ymg-space-2);
  border-radius: 50%;
  background: var(--ymg-text-muted);
}
.ymg-data-state .mini-total.ymg-connected > span::before { background: var(--ymg-success); }
.ymg-startup { margin: var(--ymg-page-pad); }
.ymg-startup .ymg-skeleton { margin-inline: 0; }
.ymg-startup-header { margin-block: var(--ymg-space-5); }
@media (min-width:761px) {
  #app .ymg-product-archive .toolbar-search-group { flex: 0 1 19rem; }
  #app .ymg-product-archive .toolbar .search { width: 100%; }
  #app .ymg-product-archive .toolbar .filter-row { margin-inline-start: 0; }
  #app .ymg-product-archive .ymg-product-count { padding: 0; margin-inline-start: auto; }
}
@media (max-width:760px) {
  #app .ymg-shell .dashboard-overview:has(.ymg-home-hero) > .page-head { display: none !important; }
  #app .ymg-shell .ymg-object-card button { min-height: var(--ymg-h-touch); min-width: var(--ymg-h-touch); }
  #app .ymg-shell .ymg-product-archive .empty .btn { display: none; }
  #app .ymg-shell .ymg-product-archive .tabs {
    display: flex;
    gap: var(--ymg-space-2);
    padding: var(--ymg-space-2) var(--ymg-page-pad) 0;
    margin: 0;
    overflow-x: auto;
    background: var(--ymg-nav-bg);
    border: 0;
  }
  #app .ymg-shell .ymg-product-archive .tabs button {
    display: inline-flex;
    align-items: center;
    flex: none;
    min-height: var(--ymg-h-touch);
    padding: 0 var(--ymg-space-3);
    background: var(--ymg-nav-field);
    border: 0;
    border-radius: var(--ymg-radius-pill);
    color: var(--ymg-nav-text);
  }
  #app .ymg-shell .ymg-product-archive .tabs button.active { background: var(--ymg-surface); color: var(--ymg-primary); }
  #app .ymg-shell .mobile-bottom-nav button.active { background: transparent; }
}

html:has(.ymg-shell), body:has(.ymg-shell) { overflow-x: clip; }
@media (max-width:760px) {
  #app .ymg-product-archive .toolbar .filter-row { display: none !important; }
  #app .ymg-product-mobile-header .toolbar {
    background: transparent !important;
    border: 0;
    margin: 0;
    padding-inline: var(--ymg-page-pad) !important;
  }
  #app .ymg-product-archive .toolbar .search {
    background: var(--ymg-nav-field) !important;
    border-color: var(--ymg-nav-border);
  }
  #modal-root .modal-overlay:has(.ymg-sheet) { display: flex !important; align-items: flex-end; }
  #modal-root .modal.ymg-sheet { max-height: 86dvh !important; }
  #modal-root .modal-overlay:has(.ymg-drawer) { background: var(--ymg-surface); }
  #modal-root .modal.ymg-drawer { animation: none; }
  :is(#app,#modal-root) .ymg-feature-group .mobile-app-grid button > span:first-child svg { color: inherit; }
  #app .ymg-shell .overview-finances .stat .stat-value { margin-block: var(--ymg-space-2) 0; }
  #app .ymg-shell .overview-finances .stat .stat-label { min-height: 0; }
}
.ymg-tenant-avatar {
  display: grid;
  place-items: center;
  flex: none;
  width: var(--ymg-space-7);
  height: var(--ymg-space-7);
  border-radius: var(--ymg-radius-sm);
  background: var(--ymg-primary-gradient);
  color: var(--ymg-text-on-primary);
  font-weight: var(--ymg-fw-heavy);
}
.ymg-switcher div { min-width: 0; }
.ymg-switcher small { display: block; color: var(--ymg-nav-text); font-size: var(--ymg-fs-xs); }
@media (max-width:760px) {
  #app .ymg-shell[data-view=products] .content:has(.ymg-product-archive) { padding-top: 0 !important; }
  #app .ymg-shell .ymg-product-archive { overflow: visible; }
  #app .ymg-product-archive .toolbar .search input {
    background: transparent;
    border-color: transparent;
    color: var(--ymg-text-on-primary);
  }
  #app .ymg-product-archive .ymg-filter-trigger {
    background: var(--ymg-nav-field);
    border-color: var(--ymg-nav-border);
    color: var(--ymg-text-on-primary);
  }
  #app .ymg-product-archive .ymg-product-count strong { font-weight: var(--ymg-fw-heavy); }
}

.ymg-mobile-sort { display: none; }
@media (max-width:760px) {
  .ymg-mobile-sort { display: inline; float: inline-end; }
}

/* Keep the column resize target while suppressing its idle divider in these two tables. */
#app :is(.shop-pending-invoices,.ymg-product-table) .wb-column-grip:not(:hover,:focus-visible,.is-resizing)::after {
  background: transparent;
}
.ymg-drawer .section-label + .form-grid { margin-top: var(--ymg-space-3); }
.ymg-more-glyph,.ymg-action-glyph { display: inline-grid; place-items: center; }

@media (max-width:760px) {
  #app .ymg-shell .topbar[hidden] { display: none; }
  #app .ymg-shell[data-view=dashboard]:has(.ymg-home-hero) .content { padding-top: 0 !important; }
  .ymg-home-hero { margin-top: 0; padding-top: max(env(safe-area-inset-top), var(--ymg-space-2)); }
  .ymg-home-tools .ymg-account > summary { min-width: var(--ymg-h-touch); justify-content: center; }
  #app .ymg-shell[data-view=dashboard] .topbar:not([hidden]) .ymg-account { grid-column: -2; }
  #app .dashboard-overview .overview-task-content {
    display: grid;
    grid-template-columns: minmax(0,1fr) auto;
    gap: var(--ymg-space-1) var(--ymg-space-2);
  }
  #app .dashboard-overview .overview-task :is(.task-text,.overview-task-side) { display: contents; }
  #app .dashboard-overview .overview-task-heading { grid-area: 1 / 1 / 2 / -1; align-items: center; }
  #app .dashboard-overview .overview-task-heading .task-title {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: start;
  }
  #app .dashboard-overview .overview-task .task-meta { grid-area: 2 / 1; align-self: start; min-width: 0; }
  #app .dashboard-overview .overview-task-due {
    grid-area: 2 / 2;
    justify-self: end;
    align-self: start;
    padding: var(--ymg-space-1) var(--ymg-space-2);
    border-radius: var(--ymg-radius-xs);
    background: var(--ymg-surface-alt);
    color: var(--ymg-text-secondary);
    white-space: nowrap;
  }
  #app .dashboard-overview .overview-task-due.has-due { background: var(--ymg-warning-soft); color: var(--ymg-warning); }
  #app .dashboard-overview .overview-task .task-quick-actions { grid-area: 3 / 1 / 4 / -1; border: 0; padding: 0; }
  #app .dashboard-overview .overview-task .task-quick-actions button {
    min-height: var(--ymg-h-touch);
    min-width: var(--ymg-h-touch);
  }
  #app .ymg-shell .ymg-product-archive .tabs {
    position: static;
    padding-block-start: var(--ymg-space-2);
    align-items: center;
  }
  #app .ymg-shell .ymg-product-archive .tabs button { line-height: 1.2; }
  #app .ymg-shell .ymg-object-meta button.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    background: transparent;
    color: var(--ymg-danger);
  }
  #app .ymg-shell .ymg-object-meta button.badge::after { content: none; }
  #app .ymg-shell .ymg-object-meta button.badge.green { color: var(--ymg-success); }
  #app .ymg-shell .ymg-object-meta button.badge > span {
    display: inline-flex;
    align-items: center;
    height: var(--ymg-fs-num);
    padding-inline: var(--ymg-space-2);
    border-radius: var(--ymg-radius-xs);
    background: var(--ymg-danger-soft);
  }
  #app .ymg-shell .ymg-object-meta button.badge.green > span { background: var(--ymg-success-soft); }
  .ymg-object-meta .ymg-more-glyph {
    width: calc(var(--ymg-h-touch) - var(--ymg-space-2));
    height: calc(var(--ymg-fs-num) + var(--ymg-space-2));
    border-radius: var(--ymg-radius-sm);
    background: var(--ymg-surface-alt);
    color: var(--ymg-text-secondary);
  }
  .ymg-sheet-actions .ymg-action-glyph {
    width: calc(var(--ymg-h-touch) - var(--ymg-space-2));
    height: calc(var(--ymg-h-touch) - var(--ymg-space-2));
    border-radius: var(--ymg-radius-md);
    background: var(--ymg-surface-alt);
    color: var(--ymg-text-secondary);
  }
  .ymg-sheet-actions .ymg-danger .ymg-action-glyph { background: var(--ymg-danger-soft); color: var(--ymg-danger); }
}

/* Shared list presentation for shop operations, development, assets and tasks. */
#app .ymg-batch-list {
  min-width: 0;
  font-variant-numeric: tabular-nums;
}
#app .ymg-batch-list :is(.panel,.asset-manager-card,.asset-folder-card) {
  background: var(--ymg-surface);
  border: 1px solid var(--ymg-border);
  border-radius: var(--ymg-radius-lg);
  box-shadow: var(--ymg-shadow-card);
}
#app .ymg-batch-list .panel-head {
  background: var(--ymg-surface);
  border-color: var(--ymg-border);
}
#app .ymg-batch-list .toolbar {
  background: var(--bd-table-heading);
  border-color: var(--ymg-border);
  gap: var(--action-divider-gap);
}
#app .ymg-batch-list :is(.table-wrap,.panel,.toolbar,.row-actions) { min-width: 0; max-width: 100%; }
#app .ymg-batch-list table { min-width: 0 !important; }
#app .ymg-batch-list :is(th,td) { overflow-wrap: anywhere; }
#app .ymg-batch-list .page-head > .actions { flex-wrap: wrap; }
#app .ymg-batch-list .panel .empty { margin: var(--action-divider-gap) 0; }
#app .ymg-batch-list .loading { min-height: var(--ymg-h-row); }
#app .ymg-batch-list .asset-folder-card { text-align: start; min-width: 0; }
#app .ymg-batch-list :is(.task-title,.asset-manager-name,.asset-folder-copy strong) {
  white-space: normal;
  overflow: visible;
  overflow-wrap: anywhere;
}
#app .ymg-batch-list .task-line { border-color: var(--ymg-divider); }
#app .ymg-batch-list .ymg-batch-header-more .ymg-menu {
  position: absolute;
  inset: 100% 0 auto auto;
  z-index: var(--ymg-z-overlay);
}
#app .ymg-batch-list .ymg-batch-header-more .ymg-menu :is(button,a) { white-space: normal; }
.ymg-record-summary { margin: 0 0 var(--ymg-space-3); font-weight: var(--ymg-fw-heavy); overflow-wrap: anywhere; }

@media (min-width:761px) {
  #app .ymg-batch-list table :is(th,td) { height: var(--ymg-h-row); }
  #app .ymg-batch-list .tabs { border-color: var(--ymg-border); }
  #app .ymg-batch-list .table-wrap td .row-actions { flex-wrap: wrap; }
}
@media (max-width:760px) {
  #app .ymg-batch-list .ymg-mobile-source { display: none !important; }
  #app .ymg-shell.ymg-has-fab .ymg-batch-list .page-head:has(.actions > :not(.ymg-mobile-source)) { display: flex; }
  #app .ymg-batch-list .page-head.shop-operations-head :is(h1,.subtitle) { display: none; }
  #app .ymg-batch-list .page-head.shop-operations-head:not(:has(.actions > :not(.ymg-mobile-source))) { display: none !important; }
  #app .ymg-batch-list .tabs { gap: var(--ymg-space-2); padding-block: var(--ymg-space-2); }
  #app .ymg-batch-list .tabs button {
    padding: 0 var(--ymg-space-3);
    min-height: var(--ymg-h-touch);
    border: 0;
    border-radius: var(--ymg-radius-pill);
    background: var(--ymg-surface-alt);
    color: var(--ymg-text-secondary);
  }
  #app .ymg-batch-list .tabs button.active { background: var(--ymg-primary-soft); color: var(--ymg-primary); }
  #app .ymg-batch-list .toolbar { flex-wrap: wrap; }
  #app .ymg-batch-list .toolbar :is(.search,.toolbar-search-group) { min-width: 0; flex: 1 1 10rem; }
  #app .ymg-batch-list .toolbar .search input { width: 100%; }
  #app .ymg-shell[data-view] .ymg-batch-list :is(button,a,input:not([type=checkbox]):not([type=radio]),select,.bd-select-trigger),
  #modal-root .ymg-batch-filter-fields :is(button,input:not([type=checkbox]):not([type=radio]),select,.bd-select-trigger) {
    min-height: var(--ymg-h-touch) !important;
    min-width: var(--ymg-h-touch);
  }
  #app .ymg-batch-list a { display: inline-flex; align-items: center; }
  #app .ymg-batch-list label:has(input:is([type=checkbox],[type=radio])) {
    min-height: var(--ymg-h-touch);
    min-width: var(--ymg-h-touch);
    display: inline-flex;
    align-items: center;
  }
  #app .ymg-batch-list .asset-folder-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: var(--ymg-card-gap); }
  #app .ymg-batch-list .asset-folder-card { display: flex; flex-wrap: wrap; }
  #app .ymg-batch-list .asset-manager-grid { grid-template-columns: 1fr; }
  #app .ymg-batch-list .asset-manager-preview { max-width: 100%; }
  #app .ymg-batch-list .table-wrap table.mobile-card-table > tbody > tr {
    border-color: var(--ymg-border);
    border-radius: var(--ymg-radius-xl);
    box-shadow: var(--ymg-shadow-card);
    background: var(--ymg-surface);
  }
  #app .ymg-batch-list .mobile-card-table td { background: transparent; }
  #app .ymg-batch-list .mobile-card-title :is(button,a) { white-space: normal; }
  #app .ymg-batch-list .mobile-card-actions:has(.ymg-record-more) { border-top: 0 !important; margin-top: 0; }
  #app .ymg-batch-list .ymg-record-more { margin-inline-start: auto; }
  #app .ymg-batch-list .ymg-record-more .ymg-more-glyph {
    width: calc(var(--ymg-h-touch) - var(--ymg-space-2));
    min-height: var(--ymg-space-7);
    border-radius: var(--ymg-radius-sm);
    background: var(--ymg-surface-alt);
  }
  #app .ymg-batch-list .task-line {
    margin-block: var(--ymg-card-gap);
    border: 1px solid var(--ymg-border);
    border-radius: var(--ymg-radius-xl);
    background: var(--ymg-surface);
  }
  #app .ymg-batch-list .overview-task-content { flex-wrap: wrap; }
  #app .ymg-batch-list .overview-task-side { min-width: 0; width: 100%; justify-content: space-between; }
  #app .ymg-batch-list .overview-task-side .ymg-record-more { flex: none; }
  #modal-root .ymg-batch-filter-fields { display: grid; gap: var(--ymg-space-3); }
  #modal-root .ymg-batch-filter-fields button[aria-pressed=true] {
    background: var(--ymg-primary-soft); color: var(--ymg-primary);
  }
}
@media (max-width:760px) {
  #app .ymg-batch-list .ymg-batch-filter-active::after {
    content: '';
    width: var(--ymg-space-2);
    height: var(--ymg-space-2);
    border-radius: 50%;
    background: var(--ymg-primary);
  }
  #app .ymg-batch-list .mobile-card-table > tbody > tr > td:is(.mobile-key-data,.mobile-card-counter) {
    background: transparent;
    box-shadow: none;
  }
}
@media (min-width:761px) {
  #app .ymg-batch-list .shop-assistant-table tr > th,
  #app .ymg-batch-list .shop-overview-table tr > th:not(:nth-child(n+7):nth-child(-n+12)),
  #app .ymg-batch-list .shop-overview-table .shop-contact-line { white-space: normal; }
}
@media (max-width:760px) {
  #modal-root .ymg-sheet:has(:is(.ymg-record-summary,.ymg-batch-filter-fields)) :is(.modal-head > button,.modal-foot > button) {
    min-width: var(--ymg-h-touch);
    min-height: var(--ymg-h-touch);
  }
  #app .ymg-batch-list .asset-card-select { min-width: var(--ymg-h-touch); min-height: var(--ymg-h-touch); }
}
@media (min-width:761px) {
  #app .ymg-batch-list .ymg-desktop-source { display: none !important; }
  #app .ymg-batch-list .table-wrap .row-actions :is(.ymg-record-more,.ymg-batch-edit) {
    min-width: var(--ymg-space-8);
    min-height: var(--ymg-space-8);
    border-radius: var(--ymg-radius-sm);
  }
  #app .ymg-batch-list .table-wrap .row-actions .ymg-batch-edit { background: var(--ymg-primary-soft); }
}
#app .ymg-batch-list :is(.asset-manager-card,.asset-folder-card):hover {
  background: var(--ymg-row-selected) !important;
  border-color: var(--ymg-primary-border);
}
@media (min-width:761px) {
  #app .ymg-batch-list :is(.shop-overview-table,.shop-assistant-table) {
    --shop-name-column: clamp(9rem,16vw,13rem);
    --shop-platform-column: clamp(3.5rem,6vw,5rem);
  }
  #app .ymg-batch-list .shop-overview-table :is(th,td):nth-child(5) {
    min-width: clamp(5rem,8vw,8rem);
    max-width: 8rem;
  }
}
@media (max-width:760px) {
  #app .ymg-batch-list .shop-identity-card { padding: 0; background: transparent; }
}

#app .ymg-batch-list .asset-browser .asset-folder-grid {
  background: transparent;
  border: 0;
  padding: 0;
  gap: var(--ymg-card-gap);
}
#app .ymg-shell[data-view=shops] .ymg-batch-list .tabs {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  gap: var(--ymg-space-4);
}
#app .ymg-shell[data-view=shops] .ymg-batch-list .tabs > button {
  flex: none;
  white-space: nowrap;
}
#app .ymg-shell[data-view=shops] .ymg-batch-list .tabs > .shop-management-tabs-start {
  margin-inline-start: 0;
}
@media (min-width:761px) {
  #app .ymg-batch-list .shop-overview-table {
    width: 100%;
    overflow-x: auto;
    isolation: isolate;
  }
  #app .ymg-batch-list .shop-overview-table table {
    table-layout: auto !important;
    width: max-content !important;
    min-width: 100% !important;
  }
  #app .ymg-batch-list .shop-overview-table table:not(.workspace-auto-width) tr > :is(th,td) {
    width: auto !important;
    min-width: calc(var(--ymg-h-touch) + var(--ymg-space-6)) !important;
    max-width: none;
    white-space: nowrap !important;
    overflow-wrap: normal !important;
    word-break: normal !important;
    overflow: visible;
  }
  #app .ymg-batch-list .shop-overview-table tr > :first-child {
    position: sticky;
    inset-inline-start: 0;
    min-width: var(--shop-name-column) !important;
    z-index: 1;
    box-shadow: 1px 0 var(--ymg-border);
  }
  #app .ymg-batch-list .shop-overview-table thead tr > :first-child {
    z-index: 2;
    background: var(--bd-table-heading);
  }
  #app .ymg-batch-list .shop-overview-table tbody tr > :first-child {
    background:var(--bd-table-row-surface,var(--ymg-surface));
  }
  #app .ymg-batch-list .shop-overview-table .row-actions {
    flex-wrap: nowrap !important;
    justify-content: center;
  }
  #app .ymg-batch-list .shop-overview-table .ymg-batch-edit { order: -1; }
}

@media (max-width:760px) {
  #app .ymg-shell[data-view] .ymg-batch-list {
    padding-bottom: calc(var(--ymg-h-tabbar-m) + var(--ymg-h-topbar-m) + var(--ymg-space-8) + env(safe-area-inset-bottom)) !important;
    scroll-margin-bottom: var(--ymg-h-tabbar-m);
  }
  #app .ymg-batch-list .ymg-compact-list {
    display: grid;
    gap: var(--ymg-card-gap);
    padding: var(--ymg-space-2);
  }
  #app .ymg-batch-list .ymg-compact-count {
    color: var(--ymg-text-secondary);
    margin-inline: var(--ymg-space-1);
  }
  #app .ymg-batch-list .ymg-compact-record {
    display: grid;
    grid-template-columns: auto minmax(0,1fr) auto;
    align-items: center;
    gap: var(--ymg-space-1) var(--ymg-space-3);
    min-width: 0;
    padding: var(--ymg-space-3);
    border: 1px solid var(--ymg-border);
    border-radius: var(--ymg-radius-xl);
    background: var(--ymg-surface);
  }
  .ymg-compact-media {
    display: grid;
    place-items: center;
    width: var(--ymg-h-tabbar-m);
    height: var(--ymg-h-tabbar-m);
    overflow: hidden;
    border-radius: var(--ymg-radius-md);
    background: var(--ymg-primary-soft);
    color: var(--ymg-primary);
    font-weight: var(--ymg-fw-heavy);
  }
  .ymg-compact-media :is(.product-thumb,.dev-candidate-image,.asset-folder-icon,.inline-image-preview,.asset-manager-preview) {
    width: 100%;
    height: 100%;
    object-fit: contain;
  }
  .ymg-compact-media > svg, .ymg-compact-media .asset-folder-icon svg { width: 24px; height: 24px; }
  .ymg-compact-identity { min-width: 0; overflow-wrap: anywhere; }
  .ymg-compact-identity strong { display: block; }
  #app .ymg-batch-list .ymg-compact-identity button { text-align: start; white-space: normal; padding: 0; }
  .ymg-compact-record small { display: block; color: var(--ymg-text-secondary); font-size: 11px; }
  .ymg-compact-identity small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .ymg-compact-value { text-align: end; max-width: 8rem; overflow-wrap: anywhere; }
  .ymg-compact-meta {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: var(--ymg-space-2);
    min-height: var(--ymg-h-touch);
  }
  .ymg-compact-meta .ymg-record-more { margin-inline-start: auto; }
  .ymg-compact-count-tag {
    color: var(--ymg-text-secondary);
    font-size: var(--ymg-fs-sm);
  }
  #app .ymg-batch-list .ymg-compact-choice { grid-column: 1 / -1; }
  #app .ymg-batch-list :is(.ymg-compact-choice,.ymg-task-choice,.asset-selection-bar,.task-bulk-toolbar)[hidden] { display: none !important; }
  #app .ymg-batch-list .ymg-batch-pills {
    display: flex;
    flex-wrap: wrap;
    gap: var(--ymg-space-2);
    padding: var(--ymg-space-2) var(--bd-content-inset);
    border-bottom: 1px solid var(--ymg-divider);
  }
  #app .ymg-batch-list .ymg-batch-pills button {
    border-radius: var(--ymg-radius-pill);
    padding-inline: var(--ymg-space-3);
    background: var(--ymg-surface-alt);
    color: var(--ymg-text-secondary);
    text-decoration: none;
  }
  #app .ymg-batch-list .ymg-batch-pills button:is(.active,.is-active) { background: var(--ymg-primary-soft); color: var(--ymg-primary); }
  #app .ymg-shell[data-view=development] .ymg-batch-list .toolbar .search { flex: 1 1 100%; width: 100%; }
  #app .ymg-batch-list .ymg-assets-mobile-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  #app .ymg-batch-list .ymg-assets-mobile-head > .actions { display: none; }
  #app .ymg-batch-list.ymg-selection-active :is(.asset-selection-bar,.task-bulk-toolbar) {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--ymg-space-2);
    position: fixed;
    inset: auto 0 calc(var(--ymg-h-tabbar-m) + env(safe-area-inset-bottom)) 0;
    z-index: calc(var(--ymg-z-nav) + 2);
    padding: var(--ymg-space-2) var(--ymg-page-pad);
    background: var(--ymg-surface);
    border-top: 1px solid var(--ymg-border);
  }
  #app .ymg-batch-list.ymg-selection-active .ymg-fab { display: none; }
  #app .ymg-batch-list .overview-task-due {
    padding: var(--ymg-space-1) var(--ymg-space-2);
    border-radius: var(--ymg-radius-xs);
    background: var(--ymg-surface-alt);
  }
  #app .ymg-batch-list .overview-task-due.has-due { background: var(--ymg-warning-soft); color: var(--ymg-warning); }
  .ymg-card-detail-list > div {
    display: grid;
    grid-template-columns: minmax(0,1fr) minmax(0,2fr);
    gap: var(--ymg-space-2);
    padding: var(--ymg-space-2) 0;
    border-bottom: 1px solid var(--ymg-divider);
  }
  .ymg-card-detail-list dd { margin: 0; overflow-wrap: anywhere; }
}

/* Mobile navigation and list controls share the product archive's dark treatment. */
@media (max-width:760px) {
  #app :is(.ymg-batch-list,.ymg-financial-account) > .tabs {
    position: static;
    margin-inline: calc(-1 * var(--ymg-page-pad));
    padding: var(--ymg-space-2) var(--ymg-page-pad) var(--ymg-space-3);
    max-width: none;
    background: var(--ymg-nav-bg);
    border: 0;
  }
  #app :is(.ymg-batch-list,.ymg-financial-account) > .tabs button,
  #app .ymg-batch-list .ymg-batch-pills button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    margin: 0;
    min-height: var(--ymg-h-touch);
    border: 0;
    border-radius: var(--ymg-radius-pill);
    background: var(--ymg-nav-field);
    background-image: none;
    color: var(--ymg-nav-text);
    text-decoration: none;
  }
  #app :is(.ymg-batch-list,.ymg-financial-account) > .tabs button.active,
  #app .ymg-batch-list .ymg-batch-pills button:is(.active,.is-active) {
    background: var(--ymg-surface);
    color: var(--ymg-primary);
  }
  #app .ymg-batch-list .ymg-batch-pills {
    align-items: center;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    background: var(--ymg-nav-bg);
    border: 0;
    padding: var(--ymg-space-1) var(--bd-content-inset) var(--ymg-space-3);
  }
  #app .ymg-batch-list .ymg-batch-pills .ymg-select-toggle {
    margin-inline-start: auto;
  }
  #app .ymg-shell[data-view] .ymg-batch-list .toolbar:has(.ymg-batch-filter) {
    flex-wrap: nowrap;
  }
  #app .ymg-shell[data-view] .ymg-batch-list .toolbar:has(.ymg-batch-filter) .search {
    flex: 1 1 0;
    width: auto;
  }
  #app .ymg-batch-list .toolbar .ymg-batch-filter { flex: none; }
  #app .ymg-batch-list.ymg-selection-active {
    --dev-bulk-bottom-offset:var(--ymg-h-tabbar-m);
  }
  #app .ymg-batch-list.ymg-selection-active .dev-bulk-bar {
    z-index:calc(var(--ymg-z-nav) + 2);
  }
  #app .ymg-shell[data-view=assets] .ymg-batch-list .ymg-compact-identity button {
    min-height: var(--ymg-h-touch) !important;
    line-height: 1;
    align-content: end;
  }
  #app .ymg-shell[data-view=assets] .ymg-batch-list .ymg-compact-identity small {
    margin-top: var(--ymg-space-1);
  }
}

/* Wide fulfillment tables scroll within their panels. */
@media (min-width:761px) {
  #app .ymg-fulfillment .ymg-fulfillment-scroll {
    width: 100%;
    overflow-x: auto;
    isolation: isolate;
  }
  #app .ymg-fulfillment .ymg-fulfillment-scroll table {
    table-layout: auto !important;
    width: max-content !important;
    min-width: 100% !important;
  }
  #app .ymg-fulfillment .ymg-fulfillment-scroll table:not(.workspace-auto-width) tr > :is(th,td) {
    min-width: calc(var(--ymg-h-touch) + var(--ymg-space-6));
    white-space: nowrap !important;
    overflow-wrap: normal !important;
    word-break: normal !important;
  }
  #app .ymg-fulfillment .ymg-fulfillment-scroll tr > :first-child {
    position: sticky;
    inset-inline-start: 0;
    background:var(--bd-table-row-surface,var(--ymg-surface));
    box-shadow: 1px 0 var(--ymg-border);
    z-index: 1;
  }
  #app .ymg-fulfillment .ymg-fulfillment-scroll thead tr > :first-child {
    background: var(--bd-table-heading);
    z-index: 2;
  }
  #app .ymg-fulfillment .ymg-fulfillment-scroll .row-actions {
    flex-wrap: nowrap !important;
    justify-content: center;
  }
  #app .ymg-fulfillment .ymg-fulfillment-scroll .ymg-batch-edit { order: -1; }
}
@media (max-width:760px) {
  #app .ymg-fulfillment .ymg-fulfillment-selection:not([hidden]) {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--ymg-space-2);
    position: fixed;
    inset: auto 0 calc(var(--ymg-h-tabbar-m) + env(safe-area-inset-bottom)) 0;
    z-index: calc(var(--ymg-z-nav) + 2);
    padding: var(--ymg-space-2) var(--ymg-page-pad);
    background: var(--ymg-surface);
    border-top: 1px solid var(--ymg-border);
  }
}
@media (max-width:760px) {
  #app .ymg-shell[data-view] .content.ymg-list-has-tabs { padding-top: 0 !important; }
  #app .ymg-list-has-tabs > .tabs { margin-top: 0; }
  #app .ymg-batch-list .toolbar,
  #app .ymg-batch-list .ymg-batch-pills {
    background: var(--ymg-surface);
    border-color: var(--ymg-border);
  }
  #app .ymg-batch-list .toolbar .search input {
    background: var(--ymg-surface);
    color: var(--ymg-text);
    border-color: var(--ymg-border);
  }
  #app .ymg-batch-list .toolbar .search input::placeholder { color: var(--ymg-text-secondary); }
  #app .ymg-batch-list .ymg-batch-pills button {
    background: var(--ymg-surface-alt);
    color: var(--ymg-text-secondary);
  }
  #app .ymg-batch-list .ymg-batch-pills button:is(.active,.is-active) {
    background: var(--ymg-primary-soft);
    color: var(--ymg-primary);
  }
  #app .ymg-shell[data-view] .ymg-batch-list .toolbar:has(> .ymg-select-icon) { flex-wrap: nowrap; }
  #app .ymg-batch-list .toolbar:has(> .ymg-select-icon) .search { flex: 1 1 0; min-width: 0; }
  #app .ymg-batch-list .toolbar .ymg-select-icon {
    flex: none;
    width: var(--ymg-h-touch);
    padding: 0;
  }
  #app .ymg-shell .topbar:has(.ymg-page-tools) {
    grid-template-columns: calc(2 * var(--ymg-h-touch) + 8px) minmax(0,1fr) calc(2 * var(--ymg-h-touch) + 8px);
  }
  #app .ymg-page-tools { display: flex; align-items: center; gap: 8px; }
  #app .ymg-page-tools > .ymg-record-more {
    min-width: var(--ymg-h-touch);
    min-height: var(--ymg-h-touch);
    color: var(--ymg-text-on-primary);
  }
  #app .ymg-page-tools > .ymg-record-more svg { width: 24px; height: 24px; }
  #app .ymg-page-tools > .ymg-record-more:hover { color: var(--ymg-primary); }
  #app .ymg-batch-list .ymg-fulfillment-summary {
    display: flex;
    flex-wrap: nowrap;
    justify-content: flex-start;
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: none;
    margin: 0;
    padding: var(--ymg-space-2) var(--bd-content-inset);
    gap: var(--ymg-space-2);
  }
  #app .ymg-batch-list .ymg-fulfillment-summary::-webkit-scrollbar { display: none; }
  #app .ymg-batch-list .ymg-fulfillment-summary > .stat {
    flex: 1 0 auto;
    min-width: 120px;
    width: max-content;
    min-height: 0;
    height: 60px;
    display: flex;
    align-items: baseline;
    justify-content: center;
    flex-direction: column;
    gap: 2px;
    padding: var(--ymg-space-1) var(--ymg-space-2);
    white-space: nowrap;
    box-shadow: none;
  }
  #app .ymg-batch-list .ymg-fulfillment-summary :is(.stat-note, .stat svg) { display: none; }
  #app .ymg-batch-list .ymg-fulfillment-summary :is(strong,.stat-value) { margin: 0; font-size: 1rem; }
  #app .ymg-batch-list .ymg-fulfillment-help {
    margin-block: var(--ymg-space-3);
    color: var(--ymg-text-secondary);
  }
  #app .ymg-batch-list .ymg-fulfillment-help summary {
    display: list-item;
    padding: var(--ymg-space-3);
    min-height: var(--ymg-h-touch);
    cursor: pointer;
  }
}

@media (min-width:761px) {
  #app .ymg-fulfillment-scroll button[data-action^="materialcount:"] {
    display: inline-flex;
    flex-flow: row nowrap;
    align-items: baseline;
    gap: .25em;
    white-space: nowrap;
  }
  #app .ymg-fulfillment-scroll button[data-action^="materialcount:"] > .warehouse-stock-quantity { display: inline; }
}

#app .ymg-financial :is(.stat-value,.ymg-amount,td,.mini-total b) { font-variant-numeric: tabular-nums; }
#app .ymg-financial .ymg-amount-out { color: var(--ymg-danger); }
#app .ymg-financial .ymg-amount-in { color: var(--ymg-success); }
#app .ymg-financial .ymg-compact-record[hidden] { display: none !important; }

@media (max-width:760px) {
  #app .ymg-shell[data-view] .ymg-financial:has(.ymg-financial-account) { padding-top: 0 !important; }
  #app .ymg-financial-account > .panel { margin-top: var(--ymg-space-2); }
  #app .ymg-financial-account > .tabs { display: flex; flex-wrap: nowrap; overflow-x: auto; }
  #app .ymg-financial-account > .tabs button { padding-inline: var(--ymg-space-3); }
  #app .ymg-financial .ymg-compact-value strong { white-space: nowrap; }
  #app .ymg-financial .ymg-fees-toolbar { padding-inline: 0; flex-wrap: nowrap; }
  #app .ymg-fees-range { flex: 1; min-width: 0; font-variant-numeric: tabular-nums; }
  #app .ymg-financial .ymg-fees-toolbar .ymg-batch-filter { min-height: var(--ymg-h-touch); }
  #app .ymg-financial :is([data-usage-pages],.pager) .btn { min-height: var(--ymg-h-touch); }
}


#app .ymg-enterprise :is(.panel, .panel-body, .invitation-controls, .assistant-settings-slot) { min-width: 0; }
#app .ymg-enterprise :is(pre,.api-code,code) { white-space: pre-wrap; overflow-wrap: anywhere; }
#app .ymg-enterprise .panel:has(form:not(.toolbar)) { overflow: clip; }
#app .ymg-enterprise :is(enterprise-contact,workbench-wecom,express-config-panel) { display: block; }
#app .ymg-enterprise form:not(.toolbar) :is(.form-actions,.actions):has(> button[type=submit]) {
  position: sticky;
  bottom: 0;
  z-index: 1;
  background: var(--ymg-surface);
  border-top: 1px solid var(--ymg-divider);
  padding-block: var(--ymg-space-3);
  margin-top: var(--ymg-space-3);
}
#app .ymg-enterprise [data-agency-setting] {
  border: 1px solid var(--ymg-border);
  border-radius: var(--ymg-radius-md);
  padding: var(--ymg-space-3);
}
#app .ymg-enterprise .ymg-compact-record[hidden],
#app .ymg-enterprise .ymg-member-details tr[hidden],
#app .ymg-enterprise .ymg-member-details:not(:has(tr:not([hidden]))) { display: none !important; }
#app .ymg-member-details { grid-column: 1 / -1; width: 100%; }
#app .ymg-member-details td { padding: 0; white-space: normal; }
#app .ymg-member-details .member-detail-content { padding: var(--ymg-space-2) 0; }

.ymg-embedded-settings { color-scheme: light; }
.ymg-embedded-settings .bd-select-option + .bd-select-option { margin-block-start: 2px; }
.ymg-embedded-settings body { color: var(--ymg-text); background: var(--ymg-page); }
.ymg-embedded-settings main :is(section,.panel,.card) { border-color: var(--ymg-border); }
.ymg-embedded-settings :is(thead tr > th, thead tr > td, .panel-head) {
  background:var(--ymg-table-heading);
}
.ymg-embedded-settings .toolbar button, .ymg-embedded-settings dialog :is(.primary,button[type=submit]) {
  border-radius: var(--ymg-radius-sm);
}
.ymg-embedded-settings .table-wrap { overflow-x: auto; max-width: 100%; }
.ymg-embedded-settings .table-wrap :is(th,td) { white-space: nowrap; }
.ymg-embedded-settings .table-wrap :is(th,td):first-child {
  position: sticky;
  inset-inline-start: 0;
  z-index: 1;
  background:var(--bd-table-row-surface,var(--ymg-surface));
}
.ymg-embedded-settings .table-wrap thead th:first-child { background:var(--ymg-table-heading); }
.ymg-embedded-settings :is(.actions,.form-actions,footer):has(> button:is([type=submit],.primary)) {
  position: sticky;
  bottom: 0;
  z-index: 1;
  background: var(--ymg-surface);
}

@media (max-width:760px) {
  #app .ymg-enterprise .trial-kinds.tabs {
    margin: 0 calc(-1 * var(--ymg-page-pad)) var(--ymg-space-3);
    padding: var(--ymg-space-2) var(--ymg-page-pad) var(--ymg-space-3);
    max-width: none;
    border: 0;
    background: var(--ymg-nav-bg);
  }
  #app .ymg-enterprise .trial-kinds.tabs button { background: var(--ymg-nav-field); color: var(--ymg-nav-text); }
  #app .ymg-enterprise .trial-kinds.tabs button.active { background: var(--ymg-surface); color: var(--ymg-primary); }
  #app .ymg-enterprise :is(.form-grid,.permission-matrix,.invitation-layout,.split),
  #modal-root .ymg-enterprise-dialog :is(.form-grid,.permission-matrix,.trial-detail) {
    grid-template-columns: minmax(0,1fr);
  }
  #app .ymg-enterprise form:not(.toolbar) :is(.form-actions,.actions):has(> button[type=submit]) {
    bottom: calc(var(--ymg-h-tabbar-m) + env(safe-area-inset-bottom));
  }
  #modal-root .ymg-enterprise-dialog .modal-foot { position: sticky; bottom: 0; z-index: 2; }
  #app .ymg-enterprise .ymg-compact-media > img { width: 100%; height: 100%; object-fit: cover; }
  #app .ymg-enterprise .ymg-member-details .checkbox-grid { grid-template-columns: minmax(0, 1fr); }
  .ymg-embedded-settings :is(.form-grid,.fields,.grid) { grid-template-columns: minmax(0,1fr) !important; }
  .ymg-embedded-settings :is(button,input:not([type=checkbox]):not([type=radio]),select) { min-height: 44px; }
}

@media (min-width:761px) {
  #app .ymg-enterprise :is(.agency-list,.agency-founders,.agency-company-list) .ymg-fulfillment-scroll :is(th,td) {
    display: table-cell;
  }
  #app .ymg-enterprise .ymg-fulfillment-scroll :is(.row-actions,.row-actions .inline-links) {
    align-items: center;
    flex-wrap: nowrap;
    justify-content: center;
  }
}

body:has(.ymg-tool-panel[open]) { overflow: hidden; }
.ymg-tool-panel {
  color: var(--ymg-text);
  background: var(--ymg-surface);
  border: 1px solid var(--ymg-border);
  border-radius: var(--ymg-radius-xl);
  box-shadow: var(--ymg-shadow-drawer);
  padding: 0;
  max-height: 85dvh;
  overflow: auto;
  width: min(640px,calc(100vw - 32px));
  animation: ymg-tool-in 160ms ease-out;
}
.ymg-tool-panel::backdrop { background: rgb(27 18 45 / .46); }
@keyframes ymg-tool-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .ymg-tool-panel { animation: none; }
}
.ymg-tool-header {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--ymg-space-2);
  padding: var(--ymg-space-2) var(--ymg-space-4);
  background: var(--ymg-surface);
  border-bottom: 1px solid var(--ymg-border);
}
.ymg-tool-header .ymg-icon { min-width: 44px; min-height: 44px; font-size: 24px; }
.ymg-tool-body { padding: var(--ymg-space-3) var(--ymg-space-4) var(--ymg-space-4); }
.ymg-tool-body section + section { margin-top: var(--ymg-space-4); }
.ymg-tool-body h3 { margin: var(--ymg-space-2) 0; color: var(--ymg-text-secondary); }
.ymg-tool-search-field {
  display: flex;
  align-items: center;
  gap: var(--ymg-space-2);
  position: sticky;
  top: calc(44px + 2 * var(--ymg-space-2) + 1px);
  z-index: 1;
  padding: var(--ymg-space-2);
  background: var(--ymg-surface);
}
.ymg-tool-search-field svg,.ymg-tool-glyph svg { width: 20px; height: 20px; flex: none; color: var(--ymg-primary); }
.ymg-tool-search-field input {
  min-width: 0;
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--ymg-border);
  border-radius: var(--ymg-radius-md);
  padding: 0 var(--ymg-space-2);
  color: var(--ymg-text);
  background: var(--ymg-surface-alt);
}
.ymg-tool-row {
  display: grid;
  grid-template-columns: 36px minmax(0,1fr);
  align-items: center;
  width: 100%;
  min-height: 48px;
  gap: var(--ymg-space-3);
  padding: var(--ymg-space-2);
  border-radius: var(--ymg-radius-md);
  text-align: start;
  scroll-margin-block-start: 128px;
}
.ymg-tool-glyph {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  background: var(--ymg-primary-soft);
  border-radius: var(--ymg-radius-sm);
}
.ymg-tool-row :is(strong,small) { display: block; overflow-wrap: anywhere; }
.ymg-tool-row small { color: var(--ymg-text-secondary); }
.ymg-tool-row:is(:hover,[aria-selected=true]) { background: var(--ymg-primary-soft); }
.ymg-tool-row[data-unread=true] strong::after {
  display: inline-block;
  content: '';
  width: 6px;
  height: 6px;
  margin-inline-start: 8px;
  border-radius: 50%;
  vertical-align: middle;
  background: var(--ymg-danger);
}
.ymg-tool-empty { text-align: center; padding-block: var(--ymg-space-7); color: var(--ymg-text-secondary); }
.ymg-tool-notifications[popover] {
  position: fixed;
  inset: var(--ymg-tool-top) var(--ymg-tool-right) auto auto;
  width: min(380px,calc(100vw - 24px));
  max-height: min(72dvh,calc(100dvh - var(--ymg-tool-top) - 12px));
  margin: 0;
}
.ymg-notice-controls { display: flex; justify-content: flex-end; }
.ymg-notice-controls button { min-height: 44px; }
[data-action="ymgnotifications"] { position: relative; }
.ymg-notice-badge {
  position: absolute;
  inset: 0 -3px auto auto;
  min-width: 16px;
  border-radius: var(--ymg-radius-pill);
  background: var(--ymg-danger);
  color: var(--ymg-text-on-primary);
  padding: 1px 4px;
  font-size: 10px;
  line-height: 14px;
  font-variant-numeric: tabular-nums;
}
.ymg-tool-help {
  inset: 0 0 0 auto;
  margin: 0;
  width: min(432px,100vw);
  max-height: 100dvh;
  height: 100dvh;
  border-radius: var(--ymg-radius-xl) 0 0 var(--ymg-radius-xl);
}
.ymg-help-steps { margin: 0; padding-inline-start: 1.5rem; }
.ymg-help-steps li { padding-block: var(--ymg-space-2); }
.ymg-help-steps p,.ymg-help-version { color: var(--ymg-text-secondary); }
.ymg-help-shortcuts { margin: 0; }
.ymg-help-shortcuts div { display: flex; gap: var(--ymg-space-2); justify-content: space-between; padding-block: var(--ymg-space-2); }
.ymg-help-shortcuts dd { margin: 0; }
.ymg-help-shortcuts kbd { background: var(--ymg-surface-alt); padding: 3px 5px; border-radius: var(--ymg-radius-sm); }
.ymg-help-version { margin-top: var(--ymg-space-4); }

@media (max-width:760px) {
  .ymg-tool-panel { max-width: 100vw; }
  .ymg-tool-panel:is(.ymg-tool-search,.ymg-tool-help) {
    inset: 0;
    margin: 0;
    width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
    border: 0;
    border-radius: 0;
  }
  .ymg-tool-panel:is(.ymg-tool-search,.ymg-tool-help) .ymg-tool-header { padding-top: max(var(--ymg-space-2),env(safe-area-inset-top)); }
  .ymg-tool-panel:is(.ymg-tool-search,.ymg-tool-help) .ymg-tool-body { padding-bottom: max(var(--ymg-space-4),env(safe-area-inset-bottom)); }
  .ymg-tool-notifications {
    inset: auto 0 0;
    width: 100%;
    margin: 0;
    max-height: 80dvh;
    border-radius: var(--ymg-radius-xl) var(--ymg-radius-xl) 0 0;
    padding-bottom: env(safe-area-inset-bottom);
  }
  .ymg-help-shortcuts + section a,.ymg-tool-help a[href^="tel:"] { display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; }
  .ymg-home-tools .ymg-icon { min-width: 44px; min-height: 44px; }
  .ymg-home-tools .ymg-switcher { min-width: 0; }
  .ymg-home-tools .ymg-switcher :is(select,div) { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}

.sidebar-group > summary,
.ymg-dropdown > summary { list-style: none; cursor: pointer; }
:is(.sidebar-group,.ymg-dropdown) > summary::-webkit-details-marker { display: none; }

#app .ymg-auth {
  display: grid;
  grid-template-columns: minmax(260px,.85fr) minmax(0,1.15fr);
  min-height: 100dvh;
  background: var(--ymg-surface);
  color: var(--ymg-text);
}
#app .ymg-auth-brand {
  display: grid;
  place-items: center;
  padding: clamp(24px,5vw,80px);
  background: var(--ymg-nav-bg);
  color: var(--ymg-text-on-primary);
}
#app .ymg-auth-brand-copy { display: none; }
@media (min-width:761px) {
  #app .ymg-auth-brand {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    justify-items: start;
    padding-inline: clamp(32px,7.5vw,120px);
    background:
      radial-gradient(ellipse at 12% 36%, rgb(119 60 201 / .30), transparent 64%),
      radial-gradient(ellipse at 90% 86%, rgb(94 52 171 / .18), transparent 55%),
      var(--ymg-nav-bg);
  }
  #app .ymg-auth-brand::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
      linear-gradient(to right, rgb(233 219 255 / .07) 1px, transparent 1px),
      linear-gradient(to bottom, rgb(233 219 255 / .07) 1px, transparent 1px);
    background-size: 32px 32px;
    mask-image: radial-gradient(ellipse at 32% 46%, black, transparent 75%);
  }
  #app .ymg-auth-brand-content { max-width: 25rem; }
  #app .ymg-auth-brand-copy { display: block; margin-block-start: clamp(24px,4vw,56px); }
  #app .ymg-auth-tagline {
    margin: 0;
    font-size: clamp(28px,3.1vw,46px);
    line-height: 1.35;
    font-weight: var(--ymg-fw-heavy);
  }
  #app .ymg-auth-brand-description {
    margin-block-start: var(--ymg-space-4);
    font-size: var(--ymg-fs-md);
    line-height: 1.85;
    color: var(--ymg-nav-text);
  }
}
#app .ymg-auth-brand .brand {
  padding: 0;
  font-size: var(--ymg-fs-2xl);
  gap: var(--ymg-space-4);
}
#app .ymg-auth-brand img.brand-symbol {
  width: 64px;
  height: 64px;
  flex-basis: 64px;
  border-radius: var(--ymg-radius-lg);
}
#app .ymg-auth-brand small {
  color: var(--ymg-nav-text);
  font-size: var(--ymg-fs-md);
  letter-spacing: 0;
}
#app .ymg-auth-main {
  display: grid;
  align-items: center;
  justify-items: center;
  padding: clamp(24px,5vw,72px);
}
#app .ymg-auth-form {
  display: grid;
  gap: var(--ymg-space-3);
  width: min(100%,400px);
  min-width: 0;
}
#app .ymg-auth-form h1 { font-size: var(--ymg-fs-2xl); line-height: 1.3; }
#app .ymg-auth-description,#app .ymg-auth-note { color: var(--ymg-text-secondary); }
#app .ymg-auth-description { margin-block-end: var(--ymg-space-2); }
#app .ymg-auth-note { font-size: var(--ymg-fs-xs); line-height: 1.7; }
#app .ymg-auth-form :is(.field,.notice,.sms-code-row) { margin: 0; }
#app .ymg-auth-form .field { color: var(--ymg-text); font-size: var(--ymg-fs-md); }
#app .ymg-auth-form :is(.field input,.btn) { min-height: var(--ymg-h-touch); border-radius: var(--ymg-radius-md); }
#app .ymg-auth-form .field input { min-width: 0; border-color: var(--ymg-border); }
#app .ymg-auth-form .btn { margin: 0; }
#app .ymg-auth-form .ymg-auth-secondary { color: var(--ymg-primary); }
#app .ymg-auth-form .sms-code-row {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  align-items: end;
  gap: var(--ymg-space-2);
}
#app .ymg-auth-form .sms-code-row .btn { white-space: nowrap; }
#app .ymg-auth-form [hidden],#app #member-management-list tr[hidden] { display: none !important; }

#app .ymg-shell .ymg-batch-list table thead th {
  background-color: var(--bd-table-heading);
}
#app .ymg-shell .ymg-batch-list :is(.stat-value,.ymg-compact-value,.number,.stock-value-amount) {
  font-variant-numeric: tabular-nums;
}
#app .ymg-shell .ymg-batch-list .empty .empty-icon {
  background: var(--ymg-primary-soft);
  color: var(--ymg-primary);
}
#modal-root :is(.ymg-sheet,.ymg-drawer) .modal-foot { background: var(--ymg-surface); }

@media(max-width:760px) {
  #app .ymg-auth { display: block; }
  #app .ymg-auth-brand {
    place-items: start;
    padding: calc(var(--ymg-space-4) + env(safe-area-inset-top)) var(--ymg-space-4) var(--ymg-space-4);
  }
  #app .ymg-auth-brand .brand { font-size: var(--ymg-fs-xl); gap: var(--ymg-space-3); }
  #app .ymg-auth-brand img.brand-symbol { width: 44px; height: 44px; flex-basis: 44px; }
  #app .ymg-auth-main { padding: var(--ymg-space-5) var(--ymg-space-4) max(var(--ymg-space-5),env(safe-area-inset-bottom)); }
  #app .ymg-auth-form button[type=submit] { min-height: var(--ymg-h-touch-lg); }
}

#app .ymg-shell .ymg-batch-list .page-head .btn { border-radius: var(--ymg-radius-md); }
#app .ymg-shell .ymg-batch-list .ymg-compact-meta .badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  border-radius: var(--ymg-radius-xs);
}

/* Business list thumbnails share the SKU table image treatment. */
:is(#app,#modal-root) :is(table, .ymg-product-cards, .ymg-compact-media)
  :is(.product-thumb, .dev-candidate-image, .shop-shipment-image, .member-avatar),
#app .ymg-enterprise .ymg-compact-media:has(> img) {
  box-sizing: border-box;
  width: 50px;
  height: 50px;
  min-width: 50px;
  max-width: none;
  flex: none;
  object-fit: contain;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--bd-surface);
}

#app .ymg-compact-media:has(> :is(.product-thumb, .dev-candidate-image, .shop-shipment-image)) {
  width: 50px;
  height: 50px;
  border-radius: 7px;
}

:is(#app,#modal-root) table .member-avatar img,
#app .ymg-enterprise .ymg-compact-media > img {
  height: 100%;
  object-fit: contain;
}

#app .dashboard-platform :is(.shop-platform-logo,.shop-platform-generic) {
  width: 25px;
  height: 25px;
  flex: none;
  padding: 0;
  border: 0;
  background: transparent;
}
