/* Entry presentation follows the existing shell lifecycle; it owns no business state. */
html body .dashboard-layout[data-dashboard-entry-shell-pending="true"][hidden] {
  /* Let existing column sizing measure the shell without exposing pending controls. */
  display: grid !important;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}
#dashboardEntryLoading {
  position: fixed;
  inset: 14px;
  box-sizing: border-box;
  padding: clamp(16px, 3vw, 32px);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.9);
  border-radius: 24px;
  background: rgba(250,250,252,.76);
  color: #1d1d1f;
  font: 13px/1.5 system-ui, sans-serif;
}
#dashboardEntryLoading .entry-loading-heading {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 24px;
}
#dashboardEntryLoading img { width: 22px; height: 22px; }
#dashboardEntryLoading .entry-loading-status {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #6e6e73;
  margin-bottom: 14px;
}
#dashboardEntryLoading .entry-loading-spinner {
  width: 12px;
  height: 12px;
  border: 2px solid #dedee2;
  border-top-color: #6e6e73;
  border-radius: 50%;
  animation: dashboard-entry-spin 1s linear infinite;
}
#dashboardEntryLoading .entry-loading-table {
  border: 1px solid #e3e3e7;
  border-radius: 12px;
  padding: 0 16px;
  background: rgba(255,255,255,.65);
}
#dashboardEntryLoading .entry-loading-row {
  height: 54px;
  display: flex;
  align-items: center;
  gap: 20px;
}
#dashboardEntryLoading .entry-loading-row + .entry-loading-row { border-top: 1px solid #ededf0; }
#dashboardEntryLoading .entry-loading-row i {
  height: 8px;
  border-radius: 4px;
  background: #ededf0;
  flex: 1;
}
#dashboardEntryLoading .entry-loading-row i:first-child { flex: .4; }
html body.is-dashboard-login-page #dashboardEntryLoading,
html body:has(.dashboard-layout:not([data-dashboard-entry-shell-pending])) #dashboardEntryLoading {
  display: none;
}
html body:has(.dashboard-layout[data-dashboard-entry-shell-pending]) #sidebarAccountDock,
html body:has(.dashboard-layout[data-dashboard-entry-shell-pending]) #sidebarAccountDock * {
  visibility: hidden !important;
}
/* Mounted scroll content must never override an order page's hidden lifecycle. */
html body.template-glass-shipping :is(#shippingOrdersPanel, #douyinOrdersSection)[hidden] {
  display: none !important;
}
/* The sidebar opens orders directly. Keep the legacy controller hook non-visible. */
html body #douyinOrdersSection [data-douyin-facts-action="open"] {
  display: none !important;
}
@keyframes dashboard-entry-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  #dashboardEntryLoading .entry-loading-spinner { animation: none; }
}
