/* 六米云枢共享主题层：经典主题只补充切换控件，简洁主题覆盖视觉令牌。 */

.theme-toggle {
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid rgba(148, 163, 184, 0.34);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.45);
  color: #e5edf5;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.02em;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease,
    transform 160ms ease;
}

.theme-toggle:hover {
  border-color: rgba(110, 231, 183, 0.7);
  background: rgba(16, 185, 129, 0.14);
}

.theme-toggle:active {
  transform: translateY(1px);
}

.theme-toggle:focus-visible {
  outline: 3px solid rgba(94, 234, 212, 0.42);
  outline-offset: 2px;
}

.login-card,
.brand-row {
  position: relative;
}

.theme-toggle-login {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 2;
}

.brand-row .theme-toggle-owner-bind {
  margin-left: auto;
}

html[data-theme="simple-light"] {
  color-scheme: light;
  --theme-bg: #f4f6f3;
  --theme-surface: #ffffff;
  --theme-surface-strong: #edf2ee;
  --theme-nav: #12332a;
  --theme-text: #17231f;
  --theme-muted: #66736e;
  --theme-border: #d7dfda;
  --theme-primary: #0d7a5f;
  --theme-primary-contrast: #ffffff;
  --theme-info: #2f6f9f;
  --theme-warning: #b56c16;
  --theme-danger: #b74435;
  --theme-shadow: 0 10px 28px rgba(27, 48, 39, 0.08);
  --theme-hover: #e5eee9;
  --theme-overlay: rgba(23, 35, 31, 0.48);
}

html[data-theme="simple-dark"] {
  color-scheme: dark;
  --theme-bg: #111815;
  --theme-surface: #18221e;
  --theme-surface-strong: #202d28;
  --theme-nav: #0c1310;
  --theme-text: #edf4f0;
  --theme-muted: #a5b2ac;
  --theme-border: #33423b;
  --theme-primary: #67c9aa;
  --theme-primary-contrast: #07130f;
  --theme-info: #75a9d3;
  --theme-warning: #d7a14c;
  --theme-danger: #e47466;
  --theme-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
  --theme-hover: #26372f;
  --theme-overlay: rgba(3, 8, 6, 0.66);
}

html[data-theme^="simple-"] {
  background: var(--theme-bg);
}

html[data-theme^="simple-"] body {
  overflow-x: clip;
  background: var(--theme-bg) !important;
  color: var(--theme-text) !important;
}

html[data-theme^="simple-"] body::before,
html[data-theme^="simple-"] body::after,
html[data-theme^="simple-"] .login-screen::before,
html[data-theme^="simple-"] .login-screen::after,
html[data-theme^="simple-"] .login-bg::before,
html[data-theme^="simple-"] .login-bg::after,
html[data-theme^="simple-"] .app-shell::before,
html[data-theme^="simple-"] .owner-shell::before {
  display: none !important;
}

html[data-theme^="simple-"] :where(h1, h2, h3, h4, strong, b) {
  color: var(--theme-text);
  text-shadow: none !important;
}

html[data-theme^="simple-"] :where(p, small, label, .muted, .helper, .topline) {
  color: var(--theme-muted);
}

html[data-theme^="simple-"] :where(a) {
  color: var(--theme-primary);
}

html[data-theme^="simple-"] .theme-toggle {
  min-height: 38px;
  border-color: var(--theme-border) !important;
  background: var(--theme-surface-strong) !important;
  color: var(--theme-text) !important;
  box-shadow: none !important;
}

html[data-theme^="simple-"] .theme-toggle:hover {
  border-color: var(--theme-primary) !important;
  background: var(--theme-hover) !important;
}

html[data-theme^="simple-"] :where(button, a, input, select, textarea):focus-visible {
  outline: 3px solid color-mix(in srgb, var(--theme-primary) 45%, transparent) !important;
  outline-offset: 2px !important;
}

/* 登录页 */
html[data-theme^="simple-"] .login-screen {
  background: var(--theme-bg) !important;
}

html[data-theme^="simple-"] .login-bg {
  opacity: 0.2;
  background: none !important;
}

html[data-theme^="simple-"] .login-copy {
  align-self: stretch !important;
  display: flex !important;
  flex-direction: column;
  justify-content: center !important;
  color: #eef8f3;
  background: var(--theme-nav) !important;
}

html[data-theme^="simple-"] .login-copy::before,
html[data-theme^="simple-"] .login-copy::after {
  opacity: 0.08 !important;
}

html[data-theme^="simple-"] .login-copy :where(h1, p, span) {
  color: inherit !important;
  text-shadow: none !important;
}

html[data-theme^="simple-"] .login-card::after {
  display: none !important;
}

html[data-theme^="simple-"] .login-card h2 {
  color: var(--theme-text) !important;
  text-shadow: none !important;
}

html[data-theme^="simple-"] .login-card :where(.eyebrow, label) {
  color: var(--theme-primary) !important;
}

html[data-theme^="simple-"] .login-card :where(.login-link-button, .login-error) {
  color: var(--theme-muted) !important;
}

html[data-theme^="simple-"] :where(.login-card, .password-modal-card) {
  border: 1px solid var(--theme-border) !important;
  background: var(--theme-surface) !important;
  color: var(--theme-text) !important;
  box-shadow: var(--theme-shadow) !important;
  backdrop-filter: none !important;
}

html[data-theme^="simple-"] .password-modal {
  background: var(--theme-overlay) !important;
}

/* 主中台框架 */
html[data-theme^="simple-"] :where(.app-shell, .shell, .main, .workspace, .page-view) {
  background: var(--theme-bg) !important;
  color: var(--theme-text) !important;
}

html[data-theme^="simple-"] .global-command-header {
  border-bottom: 1px solid var(--theme-border) !important;
  background: var(--theme-surface) !important;
  color: var(--theme-text) !important;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.03) !important;
  backdrop-filter: none !important;
}

html[data-theme="simple-light"] .global-command-header .brand,
html[data-theme="simple-light"] :where(.side, .sidebar, .system-rail) {
  background: var(--theme-nav) !important;
  color: #eef8f3 !important;
}

html[data-theme="simple-dark"] .global-command-header .brand,
html[data-theme="simple-dark"] :where(.side, .sidebar, .system-rail) {
  background: var(--theme-nav) !important;
  color: var(--theme-text) !important;
}

html[data-theme^="simple-"] .global-command-header .brand :where(h1, p),
html[data-theme^="simple-"] :where(.side, .sidebar, .system-rail) :where(h1, h2, h3, p, span, small) {
  color: inherit !important;
}

html[data-theme^="simple-"] :where(.topbar, .top-actions, .session-strip, .sync-status-strip) {
  border-color: var(--theme-border) !important;
  background: var(--theme-surface) !important;
  color: var(--theme-text) !important;
  box-shadow: none !important;
}

html[data-theme^="simple-"] :where(.nav-item, .rail-item, .side button, .sidebar button) {
  border-color: transparent !important;
  background: transparent !important;
  color: inherit !important;
  box-shadow: none !important;
}

html[data-theme^="simple-"] :where(.nav-item, .rail-item, .side button, .sidebar button):hover,
html[data-theme^="simple-"] :where(.nav-item.active, .rail-item.active, .side button.active, .sidebar button.active) {
  border-color: rgba(126, 231, 196, 0.24) !important;
  background: rgba(126, 231, 196, 0.13) !important;
  color: #dffbef !important;
}

html[data-theme^="simple-"] .app-shell .side .system-rail button.active,
html[data-theme^="simple-"] .app-shell .side .system-rail button.active * {
  color: #f7fffb !important;
}

/* 简洁深色中台兼容层；清爽浅色的最终样式位于 theme-operating.css。 */
html[data-theme="simple-dark"] .app-shell .main {
  background: var(--theme-bg) !important;
  color: var(--theme-text) !important;
}

html[data-theme="simple-dark"] .app-shell .main section,
html[data-theme="simple-dark"] .app-shell .main article,
html[data-theme="simple-dark"] .app-shell .main .panel,
html[data-theme="simple-dark"] .app-shell .main .detail,
html[data-theme="simple-dark"] .app-shell .main .metric,
html[data-theme="simple-dark"] .app-shell .main .store-card,
html[data-theme="simple-dark"] .app-shell .main .recent-card,
html[data-theme="simple-dark"] .app-shell .main .playbook,
html[data-theme="simple-dark"] .app-shell .main .pk-rank-card,
html[data-theme="simple-dark"] .app-shell .main .cockpit-panel {
  border-color: var(--theme-border) !important;
  background: var(--theme-surface) !important;
  color: var(--theme-text) !important;
  box-shadow: var(--theme-shadow) !important;
  text-shadow: none !important;
}

html[data-theme="simple-dark"] .app-shell .main :where(h1, h2, h3, h4, strong, b) {
  color: var(--theme-text) !important;
  text-shadow: none !important;
}

html[data-theme="simple-dark"] .app-shell .main :where(p, small, span, label) {
  color: var(--theme-muted) !important;
  text-shadow: none !important;
}

html[data-theme="simple-dark"] .app-shell .main .eyebrow {
  color: var(--theme-primary) !important;
}

html[data-theme="simple-dark"] .app-shell .command-cockpit {
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

html[data-theme="simple-dark"] .app-shell .cockpit-hero,
html[data-theme="simple-dark"] .app-shell .cockpit-kpis article,
html[data-theme="simple-dark"] .app-shell .operation-daily-board,
html[data-theme="simple-dark"] .app-shell .daily-board-card,
html[data-theme="simple-dark"] .app-shell .daily-mini-row,
html[data-theme="simple-dark"] .app-shell .cockpit-panel {
  border: 1px solid var(--theme-border) !important;
  background: var(--theme-surface) !important;
  color: var(--theme-text) !important;
  box-shadow: var(--theme-shadow) !important;
}

html[data-theme="simple-dark"] .app-shell .cockpit-hero {
  padding: 16px !important;
}

html[data-theme="simple-dark"] .app-shell :where(.daily-board-card, .daily-mini-row, .daily-empty) {
  background: var(--theme-surface-strong) !important;
  box-shadow: none !important;
}

html[data-theme="simple-dark"] .app-shell .cockpit-cycle {
  border-color: var(--theme-border) !important;
  background: var(--theme-surface-strong) !important;
  box-shadow: none !important;
}

html[data-theme="simple-dark"] .app-shell .cockpit-cycle span {
  border-color: var(--theme-border) !important;
  background: var(--theme-surface) !important;
  color: var(--theme-muted) !important;
}

html[data-theme="simple-dark"] .app-shell .cockpit-cycle span.active,
html[data-theme="simple-dark"] .app-shell .tabs button.active {
  border-color: var(--theme-primary) !important;
  background: var(--theme-primary) !important;
  color: var(--theme-primary-contrast) !important;
}

html[data-theme="simple-dark"] .app-shell .cockpit-kpis strong,
html[data-theme="simple-dark"] .app-shell .metric strong,
html[data-theme="simple-dark"] .app-shell .daily-board-card strong,
html[data-theme="simple-dark"] .app-shell .daily-mini-row em {
  color: var(--theme-text) !important;
  font-family: inherit !important;
  text-shadow: none !important;
}

html[data-theme="simple-dark"] .app-shell .daily-mini-row > b {
  color: var(--theme-text) !important;
}

html[data-theme="simple-dark"] .app-shell .daily-mini-row.bad > b,
html[data-theme="simple-dark"] .app-shell .daily-mini-row.alert > b {
  color: var(--theme-danger) !important;
}

html[data-theme="simple-dark"] .app-shell .daily-mini-row.flat > b,
html[data-theme="simple-dark"] .app-shell .daily-mini-row.follow > b {
  color: var(--theme-warning) !important;
}

html[data-theme="simple-dark"] .app-shell .main :where(.status.success, .badge.success, .pill.success, .is-success) {
  color: var(--theme-primary) !important;
}

html[data-theme="simple-dark"] .app-shell .main :where(.status.warning, .badge.warning, .pill.warning, .is-warning) {
  color: var(--theme-warning) !important;
}

html[data-theme="simple-dark"] .app-shell .main :where(.status.error, .badge.error, .pill.error, .is-error) {
  color: var(--theme-danger) !important;
}

html[data-theme="simple-dark"] .app-shell .main :where(button, .ghost, .secondary) {
  border-color: var(--theme-border) !important;
  background: var(--theme-surface-strong) !important;
  color: var(--theme-text) !important;
  box-shadow: none !important;
  text-shadow: none !important;
}

html[data-theme="simple-dark"] .app-shell .main :where(button.primary, .primary) {
  border-color: var(--theme-primary) !important;
  background: var(--theme-primary) !important;
  color: var(--theme-primary-contrast) !important;
}

html[data-theme="simple-dark"] .app-shell .main :where(input, select, textarea, .pill, .detail-badges span) {
  border-color: var(--theme-border) !important;
  background: var(--theme-surface) !important;
  color: var(--theme-text) !important;
}

/* 桌面命令栏：状态可收缩滚动，动作与账号区始终完整显示。 */
@media (min-width: 1181px) {
  html[data-theme="simple-dark"] .global-command-header .topbar {
    padding: 0 16px !important;
    overflow: hidden !important;
  }

  html[data-theme="simple-dark"] .global-command-header .top-actions {
    width: 100% !important;
    max-width: none !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto auto !important;
    align-items: center !important;
    gap: 8px !important;
    overflow: visible !important;
  }

  html[data-theme="simple-dark"] .global-command-header .sync-status-strip {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    display: flex !important;
    justify-content: flex-start !important;
    gap: 6px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    scrollbar-width: none;
  }

  html[data-theme="simple-dark"] .global-command-header .sync-status-strip::-webkit-scrollbar {
    display: none;
  }

  html[data-theme="simple-dark"] .global-command-header :where(.action-buttons, .session-strip) {
    overflow: visible !important;
  }

  html[data-theme="simple-dark"] .global-command-header .sync-status-strip .sync-store-count,
  html[data-theme="simple-dark"] .global-command-header .sync-status-strip .sync-time-pill,
  html[data-theme="simple-dark"] .global-command-header .session-strip span {
    border-color: var(--theme-border) !important;
    background: var(--theme-surface-strong) !important;
    color: var(--theme-text) !important;
    box-shadow: none !important;
  }

  html[data-theme="simple-dark"] .global-command-header .sync-status-strip .sync-time-pill small,
  html[data-theme="simple-dark"] .global-command-header .session-strip small {
    color: var(--theme-muted) !important;
  }

  html[data-theme="simple-dark"] .global-command-header .sync-status-strip .sync-time-pill strong,
  html[data-theme="simple-dark"] .global-command-header .session-strip strong {
    color: var(--theme-text) !important;
  }

  html[data-theme="simple-dark"] .global-command-header .sync-status-strip .sync-time-pill.stale {
    border-color: color-mix(in srgb, var(--theme-warning) 42%, var(--theme-border)) !important;
    background: color-mix(in srgb, var(--theme-warning) 10%, var(--theme-surface)) !important;
  }

  html[data-theme="simple-dark"] .global-command-header .sync-status-strip .sync-time-pill.stale strong {
    color: var(--theme-warning) !important;
  }

  html[data-theme="simple-dark"] .global-command-header .action-buttons #shareBtn,
  html[data-theme="simple-dark"] .global-command-header .session-strip button,
  html[data-theme="simple-dark"] .global-command-header .theme-toggle {
    border-color: var(--theme-border) !important;
    background: var(--theme-surface-strong) !important;
    color: var(--theme-text) !important;
  }

  html[data-theme="simple-dark"] .global-command-header .action-buttons #topReloadBtn {
    border-color: var(--theme-primary) !important;
    background: var(--theme-primary) !important;
    color: var(--theme-primary-contrast) !important;
  }

  html[data-theme="simple-dark"] .global-command-header .session-strip #topLogoutBtn {
    border-color: var(--theme-border) !important;
    background: var(--theme-surface-strong) !important;
    color: var(--theme-text) !important;
  }
}

/* 卡片、容器和业务工作区 */
html[data-theme^="simple-"] :where(
  .panel,
  .card,
  .metric-card,
  .kpi-card,
  .stat-card,
  .overview-card,
  .command-card,
  .queue-card,
  .store-card,
  .action-card,
  .campaign-card,
  .product-card,
  .supply-card,
  .replenishment-card,
  .location-sync-card,
  .location-sync-panel,
  .drawer-card,
  .sync-drawer-card,
  .modal-card,
  .detail-card,
  .table-card,
  .filter-bar,
  .toolbar
) {
  border-color: var(--theme-border) !important;
  background: var(--theme-surface) !important;
  color: var(--theme-text) !important;
  box-shadow: var(--theme-shadow) !important;
  backdrop-filter: none !important;
}

html[data-theme^="simple-"] :where(
  .overview-grid,
  .campaign-workspace,
  .recovery-workspace,
  .supply-workspace,
  .location-sync-workspace,
  .product-workspace,
  .user-workspace,
  .international-workspace
) {
  color: var(--theme-text) !important;
}

html[data-theme^="simple-"] :where(.panel-header, .card-header, .section-header, .drawer-card header) {
  border-color: var(--theme-border) !important;
  background: var(--theme-surface) !important;
  color: var(--theme-text) !important;
}

html[data-theme^="simple-"] :where(.metric-value, .kpi-value, .stat-value, .number, .amount) {
  color: var(--theme-text) !important;
  text-shadow: none !important;
}

html[data-theme^="simple-"] :where(.metric-label, .kpi-label, .stat-label, .meta, .caption, .hint) {
  color: var(--theme-muted) !important;
}

/* 表单、按钮和状态 */
html[data-theme^="simple-"] :where(input, select, textarea) {
  border: 1px solid var(--theme-border) !important;
  background: var(--theme-surface) !important;
  color: var(--theme-text) !important;
  box-shadow: none !important;
}

html[data-theme^="simple-"] :where(input, textarea)::placeholder {
  color: var(--theme-muted) !important;
  opacity: 0.8;
}

html[data-theme^="simple-"] :where(button.primary, .primary, button[type="submit"], .location-sync-start) {
  border-color: var(--theme-primary) !important;
  background: var(--theme-primary) !important;
  color: var(--theme-primary-contrast) !important;
  box-shadow: none !important;
  text-shadow: none !important;
}

html[data-theme^="simple-"] :where(button.ghost, .ghost-button, .secondary, .top-link, .owner-logout) {
  border-color: var(--theme-border) !important;
  background: var(--theme-surface-strong) !important;
  color: var(--theme-text) !important;
  box-shadow: none !important;
}

html[data-theme^="simple-"] :where(button.danger, .danger, .danger-button) {
  border-color: color-mix(in srgb, var(--theme-danger) 48%, var(--theme-border)) !important;
  background: color-mix(in srgb, var(--theme-danger) 12%, var(--theme-surface)) !important;
  color: var(--theme-danger) !important;
}

html[data-theme^="simple-"] :where(.status, .badge, .pill, .tag, .chip, .sync-time-pill) {
  border-color: var(--theme-border) !important;
  background: var(--theme-surface-strong) !important;
  color: var(--theme-text) !important;
  box-shadow: none !important;
}

html[data-theme^="simple-"] :where(.status.success, .badge.success, .pill.success, .is-success) {
  color: var(--theme-primary) !important;
}

html[data-theme^="simple-"] :where(.status.warning, .badge.warning, .pill.warning, .is-warning) {
  color: var(--theme-warning) !important;
}

html[data-theme^="simple-"] :where(.status.error, .badge.error, .pill.error, .is-error) {
  color: var(--theme-danger) !important;
}

/* 表格和列表 */
html[data-theme^="simple-"] :where(table, .data-table, .list, .queue-list) {
  border-color: var(--theme-border) !important;
  background: var(--theme-surface) !important;
  color: var(--theme-text) !important;
}

html[data-theme^="simple-"] :where(th, .table-head, .list-head) {
  border-color: var(--theme-border) !important;
  background: var(--theme-surface-strong) !important;
  color: var(--theme-muted) !important;
}

html[data-theme^="simple-"] :where(td, .table-row, .list-row, .queue-row) {
  border-color: var(--theme-border) !important;
  color: var(--theme-text) !important;
}

html[data-theme^="simple-"] :where(tbody tr, .table-row, .list-row, .queue-row):hover {
  background: var(--theme-hover) !important;
}

html[data-theme^="simple-"] :where(.pagination, .pager, .tabs, .tab-list) {
  border-color: var(--theme-border) !important;
  background: var(--theme-surface) !important;
}

html[data-theme^="simple-"] :where(.tab, .tabs button, .pagination button, .pager button) {
  border-color: transparent !important;
  background: transparent !important;
  color: var(--theme-muted) !important;
  box-shadow: none !important;
}

html[data-theme^="simple-"] :where(.tab.active, .tabs button.active, .pagination button.active, .pager button.active) {
  border-color: var(--theme-primary) !important;
  background: color-mix(in srgb, var(--theme-primary) 12%, var(--theme-surface)) !important;
  color: var(--theme-primary) !important;
}

/* 微信店主端：只调整外围容器，不改 UE 原始报表色块。 */
html[data-theme^="simple-"] .owner-shell {
  max-width: none;
  background: var(--theme-bg) !important;
  color: var(--theme-text) !important;
}

html[data-theme^="simple-"] :where(.owner-hero, .dashboard) {
  background: var(--theme-bg) !important;
  color: var(--theme-text) !important;
}

html[data-theme^="simple-"] :where(
  .brand-row,
  .hero-copy,
  .service-picker,
  .service-card,
  .bind-card,
  .dash-header,
  .owner-overview,
  .store-switch,
  .store-card,
  .owner-tabs,
  .task-card,
  .diagnosis-card,
  .evidence-card,
  .location-sync-card,
  .next-card
) {
  border-color: var(--theme-border) !important;
  background: var(--theme-surface) !important;
  color: var(--theme-text) !important;
  box-shadow: var(--theme-shadow) !important;
  backdrop-filter: none !important;
}

html[data-theme^="simple-"] .dash-header {
  position: sticky;
  top: 0;
  z-index: 20;
}

html[data-theme^="simple-"] :where(.brand-row, .dash-header) :where(p, span, strong, h1) {
  color: var(--theme-text) !important;
}

html[data-theme^="simple-"] .hero-copy {
  background: var(--theme-surface-strong) !important;
}

html[data-theme^="simple-"] .status-dot {
  background: var(--theme-primary) !important;
  box-shadow: none !important;
}

html[data-theme^="simple-"] .owner-tabs {
  overflow-x: auto;
  scrollbar-width: thin;
}

html[data-theme^="simple-"] .owner-tabs button {
  border-color: transparent !important;
  background: transparent !important;
  color: var(--theme-muted) !important;
  box-shadow: none !important;
}

html[data-theme^="simple-"] .owner-tabs button.active {
  border-color: var(--theme-primary) !important;
  background: color-mix(in srgb, var(--theme-primary) 12%, var(--theme-surface)) !important;
  color: var(--theme-primary) !important;
}

html[data-theme^="simple-"] :where(.owner-header-actions, .store-switch) {
  gap: 8px;
}

html[data-theme^="simple-"] :where(.mobile-session-bar, .bottom-action-bar) {
  border-color: var(--theme-border) !important;
  background: var(--theme-surface) !important;
  color: var(--theme-text) !important;
  box-shadow: 0 -6px 20px rgba(0, 0, 0, 0.08) !important;
}

/* 简洁主题不使用高亮发光和复杂背景。 */
html[data-theme^="simple-"] :where(
  .panel,
  .card,
  .metric-card,
  .global-command-header,
  .dash-header,
  .owner-tabs,
  .location-sync-card
)::before,
html[data-theme^="simple-"] :where(
  .panel,
  .card,
  .metric-card,
  .global-command-header,
  .dash-header,
  .owner-tabs,
  .location-sync-card
)::after {
  opacity: 0 !important;
  box-shadow: none !important;
}

@media (max-width: 920px) {
  html[data-theme^="simple-"] :where(.topbar, .top-actions, .session-strip, .owner-header-actions) {
    flex-wrap: wrap;
  }

  html[data-theme^="simple-"] .theme-toggle {
    min-height: 40px;
  }
}

@media (max-width: 420px) {
  html[data-theme^="simple-"] body {
    overflow-x: clip;
  }

  .theme-toggle-login {
    top: 12px;
    right: 12px;
  }

  html[data-theme^="simple-"] .theme-toggle {
    max-width: 112px;
    min-height: 40px;
    padding-inline: 10px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  html[data-theme^="simple-"] .owner-header-actions {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  html[data-theme^="simple-"] .owner-header-actions button {
    width: 100%;
    min-width: 0;
    padding-inline: 8px;
  }

  html[data-theme^="simple-"] :where(.owner-shell, .owner-hero, .dashboard, .dash-header) {
    max-width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .theme-toggle,
  html[data-theme^="simple-"] *,
  html[data-theme^="simple-"] *::before,
  html[data-theme^="simple-"] *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
