/* Shared admin theme control. Fixed cells prevent inherited heading styles
   from shifting the sun, track or moon out of the control. */
.admin-theme-toggle.ios-theme-switch {
  box-sizing: border-box;
  display: grid;
  grid-template-columns: 20px 44px 20px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 114px;
  min-width: 114px;
  height: 44px;
  min-height: 44px;
  padding: 7px 8px;
  border: 1px solid #d8bb8457;
  border-radius: 10px;
  background: #211f19;
  color: #d8bb84;
  cursor: pointer;
  flex: 0 0 auto;
}

.admin-theme-toggle.ios-theme-switch .theme-switch-icon,
.admin-theme-toggle.ios-theme-switch .theme-switch-track {
  box-sizing: border-box;
  min-height: 0;
  margin: 0;
  padding: 0;
  line-height: 1;
  letter-spacing: 0;
}

.admin-theme-toggle.ios-theme-switch .theme-switch-icon {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  color: inherit;
  opacity: .58;
  transform: none;
}

.admin-theme-toggle.ios-theme-switch .theme-switch-icon svg {
  display: block;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.admin-theme-toggle.ios-theme-switch .theme-switch-track {
  position: relative;
  display: block;
  width: 44px;
  height: 28px;
  flex-basis: 44px;
  border-radius: 7px;
  background: #34312a;
  box-shadow: inset 0 0 0 1px #ffffff24;
}

.admin-theme-toggle.ios-theme-switch .theme-switch-track i {
  position: absolute;
  top: 50%;
  left: 3px;
  width: 22px;
  height: 22px;
  margin: 0;
  border-radius: 5px;
  background: #fff;
  box-shadow: 0 1px 3px #0003;
  transform: translate(16px, -50%);
  transition: transform .16s ease;
}

.admin-theme-toggle.ios-theme-switch.is-light {
  border-color: #cdbfa6;
  background: #fffdf8;
  color: #77521c;
}

.admin-theme-toggle.ios-theme-switch.is-light .theme-switch-track {
  background: #ba8b37;
  box-shadow: inset 0 0 0 1px #70490d2e;
}

.admin-theme-toggle.ios-theme-switch.is-light .theme-switch-track i {
  transform: translate(0, -50%);
}

.admin-theme-toggle.ios-theme-switch.is-light .theme-switch-icon:first-child,
.admin-theme-toggle.ios-theme-switch.is-dark .theme-switch-icon:last-child {
  opacity: 1;
  transform: none;
}

.admin-theme-toggle.ios-theme-switch:focus-visible {
  outline: 3px solid #b9914f;
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  .admin-theme-toggle.ios-theme-switch .theme-switch-track i { transition: none; }
}

/* Scoped mobile layer for the recovered admin. Public storefront is untouched. */
.admin-mobile-menu-toggle { display: none; }
.admin-dashboard-sidebar { scrollbar-width: none; }
.admin-dashboard-sidebar::-webkit-scrollbar { display: none; }
.admin-app-shell input.visually-hidden-file { position: absolute; width: 1px !important; height: 1px !important; min-height: 0 !important; max-width: 1px; padding: 0; border: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

@media (max-width: 1100px) {
  .admin-app-shell :is(.customize-layout, .theme-layout, .compact-theme-layout) { grid-template-columns: minmax(0, 1fr); }
  .admin-app-shell :is(.form-grid-three, .form-grid-four, .discount-code-form) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-app-shell :is(.inventory-toolbar, .admin-review-filters) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-app-shell :is(.inventory-list-item, .invoice-list-item) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-app-shell :is(.inventory-list-item, .invoice-list-item) > :first-child,
  .admin-app-shell :is(.inventory-actions, .admin-action-buttons) { grid-column: 1 / -1; }
  .admin-app-shell :is(.inventory-product-main, .stock-list-item) strong { white-space: normal; overflow-wrap: anywhere; }
  .admin-app-shell .admin-user-list { grid-template-columns: minmax(0, 1fr); }
  .admin-app-shell .admin-user-create-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-app-shell .admin-users-page, .admin-app-shell .admin-users-page > * { min-width: 0; }
}

@media (max-width: 860px) {
  .admin-app-shell { min-width: 0; overflow-wrap: anywhere; }
  .admin-app-shell *, .admin-app-shell *::before, .admin-app-shell *::after { box-sizing: border-box; }
  .admin-app-shell :is(label, form, section, article, fieldset, .settings-field) { min-width: 0; }
  .admin-dashboard-page { display: block; padding: 0; min-height: 100dvh; }
  .admin-dashboard-sidebar.admin-mobile-ready {
    position: sticky; top: 0; z-index: 40; width: 100%; height: auto; min-height: 0;
    max-height: 100dvh; padding: env(safe-area-inset-top, 0px) max(16px, env(safe-area-inset-right, 0px)) 0 max(16px, env(safe-area-inset-left, 0px));
    border-bottom: 1px solid #d8bb842b; background: #080806; overflow: visible;
  }
  .admin-theme-light .admin-dashboard-sidebar.admin-mobile-ready { background: #fffdf8; }
  .admin-mobile-ready .admin-sidebar-top { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1px 12px; align-items: center; min-height: 68px; margin: 0; padding: 10px 0; border: 0; }
  .admin-mobile-ready .admin-sidebar-top > strong { font-size: 16px; grid-column: 1; }
  .admin-mobile-ready .admin-sidebar-top > span { grid-column: 1; font-size: 9px; letter-spacing: .1em; }
  .admin-app-shell .admin-mobile-menu-toggle {
    display: flex; align-items: center; justify-content: center; gap: 9px; grid-column: 2; grid-row: 1 / 3;
    min-width: 88px; min-height: 44px; padding: 10px 12px; margin: 0; border: 1px solid #d8bb8455;
    border-radius: 10px; background: #d8bb8414; color: inherit; font: inherit; font-size: 13px; cursor: pointer;
  }
  .admin-mobile-menu-icon { position: relative; width: 18px; height: 14px; border-block: 1.5px solid currentColor; }
  .admin-mobile-menu-icon::before { content: ''; position: absolute; top: 5px; left: 0; width: 18px; border-top: 1.5px solid currentColor; }
  .admin-mobile-menu-toggle[aria-expanded="true"] .admin-mobile-menu-icon { border: 0; }
  .admin-mobile-menu-toggle[aria-expanded="true"] .admin-mobile-menu-icon::before { transform: rotate(45deg); }
  .admin-mobile-menu-toggle[aria-expanded="true"] .admin-mobile-menu-icon::after { content: ''; position: absolute; top: 5px; left: 0; width: 18px; border-top: 1.5px solid currentColor; transform: rotate(-45deg); }
  .admin-mobile-ready:not(.is-mobile-menu-open) :is(.admin-nav-groups, .admin-logout-button) { display: none; }
  .admin-mobile-ready.is-mobile-menu-open .admin-nav-groups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 12px; max-height: calc(100dvh - 160px - env(safe-area-inset-top, 0px)); padding: 12px 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; }
  .admin-mobile-ready .admin-nav-group { align-content: start; }
  .admin-mobile-ready .admin-nav-group a { min-height: 48px; padding: 10px; border-radius: 9px; }
  .admin-mobile-ready .admin-logout-button { width: 100%; margin: 8px 0 12px; min-height: 44px; }
  .admin-dashboard-main { width: 100%; min-height: calc(100dvh - 68px); height: auto; margin: 0; padding: 0 max(16px, env(safe-area-inset-right, 0px)) max(32px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); overflow: visible; border: 0; border-radius: 0; }
  .admin-dashboard-heading { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; min-height: 0; margin: 0 -16px 20px; padding: 22px 16px 18px; }
  .admin-dashboard-heading > div:first-child { flex: 1 1 100%; min-width: 0; }
  .admin-dashboard-heading h1 { font-size: clamp(25px, 5.4vw, 32px); line-height: 1.2; }
  .admin-dashboard-heading span { font-size: 10px; }
  .admin-heading-actions { width: 100%; flex-wrap: nowrap; justify-content: space-between; gap: 12px; }
  .admin-dashboard-heading a { min-width: 110px; min-height: 44px; padding: 10px 16px; border-radius: 10px; }
  .admin-app-shell :is(input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]), select, textarea) { min-width: 0; max-width: 100%; min-height: 46px; font-size: 16px; line-height: 1.4; }
  .admin-app-shell input[type=file] { overflow: hidden; }
  .admin-app-shell input[type=range] { min-width: 0; width: 100%; min-height: 44px; padding-inline: 0; }
  .admin-app-shell :is(input[type=checkbox], input[type=radio]) { min-height: 0; width: 20px; height: 20px; flex: 0 0 20px; }
  .admin-app-shell :is(button, .admin-form-actions a, .admin-task-card) { touch-action: manipulation; }
  .admin-app-shell :is(button, a) { -webkit-tap-highlight-color: transparent; }
  .admin-app-shell :is(form label, .inventory-toolbar label, .admin-user-fields label, .admin-review-filters label, .admin-user-toolbar label) { font-size: 13px; }
  .admin-app-shell :is(.inventory-toolbar, .admin-action-buttons, .inventory-actions, .admin-user-actions, .admin-review-actions, .admin-form-actions) button { font-size: 13px; }
  .admin-app-shell button:not(.remove-product-image-button) { min-height: 44px; white-space: normal; line-height: 1.35; }
  .admin-app-shell button:focus-visible, .admin-app-shell a:focus-visible { outline: 2px solid var(--gold-light); outline-offset: 3px; }
  .admin-app-shell :is(.admin-dashboard-cards, .admin-user-summary, .admin-review-summary) { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .admin-app-shell .admin-dashboard-cards article { padding: 16px; min-height: 132px; border-radius: 15px; }
  .admin-app-shell .admin-dashboard-cards article strong { font-size: clamp(24px, 5vw, 32px); }
  .admin-app-shell .admin-dashboard-cards :is(span, p) { font-size: 12px; line-height: 1.4; }
  .admin-dashboard-actions { padding: 18px; border-radius: 16px; }
  .admin-dashboard-actions > .admin-task-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .admin-dashboard-actions .admin-task-card { min-height: 120px; padding: 16px; border-radius: 12px; }
  .admin-app-shell .admin-section-title { display: block; }
  .admin-app-shell .admin-section-title :is(h2, h3) { font-size: 23px; line-height: 1.25; }
  .admin-app-shell .admin-section-title span { white-space: normal; }
  .admin-app-shell :is(.rounded-admin-panel, .settings-card, .customize-card, .admin-user-card, .admin-review-card) { max-width: 100%; padding: 16px; border-radius: 14px; }
  .admin-app-shell :is(.customize-form, .theme-control-stack) { gap: 16px; }
  .admin-app-shell .customize-form { border: 0; padding: 0; background: transparent; }
  .admin-app-shell .customize-card-title-row { align-items: flex-start; flex-wrap: wrap; gap: 12px; }
  .admin-app-shell .customize-card-title-row h3 { margin-bottom: 0; }
  .admin-app-shell :is(.settings-panel-grid, .settings-card, .theme-control-stack, .payment-settings-grid) { grid-template-columns: minmax(0, 1fr); }
  .admin-app-shell .settings-card > * { min-width: 0; }
  .admin-app-shell :is(.theme-layout, .customize-layout) > * { grid-column: auto; }
  .admin-app-shell :is(.form-grid-two, .hero-button-position-grid, .admin-user-create-grid, .admin-user-fields, .theme-color-grid, .theme-range-grid) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-app-shell :is(.inventory-list, .invoice-list) { padding: 0; border: 0; background: transparent; gap: 12px; overflow: visible; }
  .admin-app-shell :is(.inventory-list-item, .invoice-list-item) { gap: 14px; padding: 16px; align-items: start; }
  .admin-app-shell :is(.inventory-list-item, .invoice-list-item) > * { min-width: 0; }
  .admin-app-shell :is(.inventory-list-item, .invoice-list-item) small { font-size: 10px; line-height: 1.4; letter-spacing: .06em; }
  .admin-app-shell :is(.inventory-product-main strong, .stock-list-item strong, .newsletter-list-item strong) { white-space: normal; overflow-wrap: anywhere; }
  .admin-app-shell :is(.admin-action-buttons, .inventory-actions, .admin-review-actions, .admin-user-actions, .admin-form-actions, .admin-workflow-actions) { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-start; }
  .admin-app-shell :is(.admin-action-buttons, .inventory-actions, .admin-review-actions, .admin-user-actions, .admin-form-actions, .admin-workflow-actions) > :is(button, a) { min-width: 0; flex: 1 1 130px; padding: 10px 12px; text-align: center; }
  .admin-app-shell :is(.admin-user-card-head, .admin-user-meta, .admin-review-card-head) { flex-wrap: wrap; gap: 10px; }
  .admin-app-shell .admin-user-identity > div { min-width: 0; }
  .admin-app-shell :is(.admin-user-self, .admin-status-pill, .status-pill) { max-width: 100%; height: auto; white-space: normal; line-height: 1.4; }
  .admin-app-shell .admin-tab-list { display: flex; flex-wrap: wrap; gap: 8px; }
  .admin-app-shell .admin-tab-list button { flex: 1 1 110px; }
  .admin-app-shell .movement-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .admin-app-shell .movement-row > :first-child, .admin-app-shell .movement-row > small { grid-column: 1 / -1; }
  .admin-app-shell .import-preview-table-wrap { width: 100%; max-width: 100%; overflow-x: auto; overscroll-behavior-x: contain; }
  .admin-app-shell .import-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-app-shell .selected-file-card { flex-wrap: wrap; gap: 16px; }
  .admin-app-shell .selected-file-info { min-width: 0; }
  .admin-app-shell .selected-file-info strong { white-space: normal; overflow-wrap: anywhere; }
  .admin-app-shell .import-file-actions { flex-wrap: wrap; }
  .admin-app-shell .real-preview-viewport { max-height: 60dvh; }
  .admin-app-shell .section-order-item { flex-wrap: wrap; gap: 8px; }
  .admin-app-shell .section-order-item > div { display: flex; gap: 8px; }
  .admin-app-shell .bestseller-product-picker { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  /* Dialogs fit the visible viewport and keep save/close controls reachable. */
  html.hdh-admin-dialog-open { overflow: hidden; }
  .admin-app-shell .admin-modal-backdrop { padding: max(8px, env(safe-area-inset-top, 0px)) 8px max(8px, env(safe-area-inset-bottom, 0px)); }
  .admin-app-shell .admin-modal, .admin-app-shell .admin-modal:has(.product-admin-form) { width: 100%; max-width: 680px; max-height: calc(100dvh - 16px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)); padding: 16px; border-radius: 16px; overscroll-behavior: contain; scroll-padding-block: 90px; }
  .admin-app-shell .admin-modal:has(.product-admin-form) { padding: 0; }
  .admin-app-shell .admin-modal-header { gap: 12px; align-items: flex-start; }
  .admin-app-shell .admin-modal-header > div { min-width: 0; }
  .admin-app-shell .admin-modal-header h3, .admin-app-shell .admin-modal:has(.product-admin-form) .admin-modal-header h3 { font-size: 23px; line-height: 1.25; overflow-wrap: anywhere; }
  .admin-app-shell .admin-modal-header > button { flex: 0 0 auto; min-width: 44px; padding: 8px 12px; }
  .admin-app-shell .admin-modal:has(.product-admin-form) .admin-modal-header { padding: 16px; }
  .admin-app-shell :is(.product-form-preview, .product-form-section) { padding: 14px; gap: 14px; }
  .admin-app-shell .product-form-section-grid { grid-template-columns: minmax(0, 1fr); }
  .admin-app-shell .product-form-section-grid .span-two { grid-column: auto; }
  .admin-app-shell .admin-modal:has(.product-admin-form) .admin-form-actions { padding: 12px 16px max(12px, env(safe-area-inset-bottom, 0px)); }
  .admin-app-shell :is(.order-detail-grid, .order-modal .utility-grid) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-app-shell .product-image-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .admin-app-shell .product-image-thumb { min-width: 0; }
  .admin-app-shell .product-image-thumb-actions { flex-wrap: wrap; }
  .admin-app-shell .remove-product-image-button { min-width: 44px; min-height: 44px; }
  .admin-app-shell .product-document-row { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .admin-app-shell .product-document-row :is(input, a, button) { max-width: 100%; min-width: 0; }
  .admin-app-shell .product-option-heading { flex-wrap: wrap; gap: 10px; }
  .admin-app-shell .product-category-checkboxes label { min-height: 44px; }
  .admin-app-shell .product-category-checkboxes input { width: 1px; height: 1px; min-height: 0; }
  .admin-app-shell .product-category-checkboxes label:focus-within { outline: 2px solid var(--gold-light); outline-offset: 2px; }
  .admin-app-shell .variant-stock-editor { min-width: 0; overflow-x: auto; overscroll-behavior-x: contain; }
  .admin-app-shell :is(.variant-stock-header, .variant-stock-row) { min-width: 580px; }
  .admin-app-shell .admin-login-panel { padding: 24px 20px; border-radius: 18px; }
  .admin-app-shell.admin-login-page { padding: 24px 16px; }
  .admin-login-panel h1 { font-size: 32px; }
}

@media (max-width: 560px) {
  .admin-app-shell :is(.form-grid-two, .form-grid-three, .form-grid-four, .inventory-toolbar, .admin-review-filters, .admin-user-toolbar, .admin-user-fields, .admin-user-create-grid, .discount-code-form, .hero-button-position-grid, .theme-color-grid, .theme-range-grid, .order-detail-grid, .order-modal .utility-grid, .toggle-grid) { grid-template-columns: minmax(0, 1fr); }
  .admin-dashboard-actions > .admin-task-grid { grid-template-columns: minmax(0, 1fr); }
  .admin-app-shell .admin-task-card { min-height: 100px; }
  .admin-app-shell .inventory-toolbar > button { width: 100%; }
  .admin-app-shell .form-grid-two > *, .admin-app-shell .form-grid-three > *, .admin-app-shell .form-grid-four > * { grid-column: auto; }
  .admin-app-shell .product-option-admin-row { grid-template-columns: minmax(0, 1fr); }
  .admin-app-shell .stripe-status-card { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .admin-app-shell .stripe-status-card .admin-toggle-card { min-width: 0; width: 100%; }
  .admin-app-shell .order-modal .summary-line { gap: 16px; align-items: flex-start; }
  .admin-app-shell .order-modal .summary-line > :first-child { min-width: 0; flex: 1; }
  .admin-app-shell .order-modal .summary-line > :last-child { flex-shrink: 0; }
  .admin-app-shell .admin-user-card-head > div { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
  .admin-app-shell .admin-user-card-head time { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .admin-mobile-menu-toggle, .admin-mobile-menu-icon { transition: none; }
}

/* Visual parity with the separate statistics dashboard. Scoped to the logged-in
   admin shell; existing React routes, forms and API behavior remain unchanged. */
.admin-dashboard-page {
  --admin-ui-bg: #030303;
  --admin-ui-main: #080808;
  --admin-ui-surface: #111111;
  --admin-ui-raised: #1a1a1c;
  --admin-ui-text: #f5f5f7;
  --admin-ui-muted: #92949e;
  --admin-ui-line: #242426;
  --admin-ui-active: #f3f4f6;
  --admin-ui-active-text: #111114;
  --admin-ui-focus: #53bdf5;
  --admin-ui-success: #35d5a0;
  --admin-ui-warning: #ff984e;
  --gold: var(--admin-ui-text);
  --gold-light: var(--admin-ui-text);
  --text-light: var(--admin-ui-text);
  --text-muted: var(--admin-ui-muted);
  --beige: var(--admin-ui-active);
  --admin-font: "SF Pro Text", "SF Pro", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  box-sizing: border-box;
  display: grid;
  grid-template-columns: 224px minmax(0, 1fr);
  gap: 12px;
  width: 100%;
  min-width: 0;
  min-height: 100dvh;
  height: 100dvh;
  padding: 12px 12px 12px 0;
  overflow: hidden;
  background: var(--admin-ui-bg);
  color: var(--admin-ui-text);
  font-family: var(--admin-font);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
.admin-dashboard-page.admin-theme-light {
  --admin-ui-bg: #f1f2f4;
  --admin-ui-main: #ffffff;
  --admin-ui-surface: #f5f6f8;
  --admin-ui-raised: #e9ebee;
  --admin-ui-text: #16181d;
  --admin-ui-muted: #636977;
  --admin-ui-line: #e0e3e8;
  --admin-ui-active: #17191e;
  --admin-ui-active-text: #ffffff;
  --admin-ui-focus: #077ba6;
  --admin-ui-success: #087f5b;
  --admin-ui-warning: #b95108;
  /* The recovered bundle uses these variables in !important light-mode rules. */
  --admin-light-bg: var(--admin-ui-bg);
  --admin-light-surface: var(--admin-ui-surface);
  --admin-light-surface-alt: var(--admin-ui-raised);
  --admin-light-text: var(--admin-ui-text);
  --admin-light-muted: var(--admin-ui-muted);
  --admin-light-border: var(--admin-ui-line);
  color-scheme: light;
  background: var(--admin-ui-bg) !important;
  color: var(--admin-ui-text);
}
.admin-dashboard-page.admin-theme-dark { color-scheme: dark; }
.admin-dashboard-page, .admin-dashboard-page * { font-family: var(--admin-font) !important; }
.admin-dashboard-page *, .admin-dashboard-page *::before, .admin-dashboard-page *::after { box-sizing: border-box; }
.admin-dashboard-page :is(h1, h2, h3, h4) { color: var(--admin-ui-text); letter-spacing: -.035em; }
.admin-dashboard-page :is(button, input, select, textarea) { font: inherit; }
.admin-dashboard-page :is(button, a, input, select, textarea):focus-visible {
  outline: 2px solid var(--admin-ui-focus);
  outline-offset: 2px;
}

/* The same fixed-height desktop frame and independently scrolling content card. */
.admin-dashboard-page .admin-dashboard-sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  align-self: start;
  width: 100%;
  height: calc(100dvh - 24px);
  min-height: 0;
  padding: 13px 12px 18px;
  overflow-x: hidden;
  overflow-y: auto;
  border: 0;
  border-radius: 0;
  background: var(--admin-ui-bg);
  color: var(--admin-ui-text);
  box-shadow: none;
  scrollbar-width: none;
}
.admin-dashboard-page.admin-theme-light .admin-dashboard-sidebar { background: var(--admin-ui-bg) !important; }
.admin-dashboard-page .admin-dashboard-sidebar::-webkit-scrollbar,
.admin-dashboard-page .admin-dashboard-main::-webkit-scrollbar { display: none; width: 0; height: 0; }
.admin-dashboard-page .admin-sidebar-top {
  display: grid;
  gap: 2px;
  margin: 0 8px 23px;
  padding: 0;
  border: 0;
}
.admin-dashboard-page .admin-sidebar-top > strong {
  color: var(--admin-ui-text);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -.04em;
}
.admin-dashboard-page .admin-sidebar-top > span {
  margin: 0;
  color: var(--admin-ui-muted);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .03em;
  text-transform: none;
}
.admin-dashboard-page .admin-nav-groups {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  gap: 5px;
}
.admin-dashboard-page .admin-nav-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.admin-dashboard-page .admin-nav-group h2 { display: none; }
.admin-dashboard-page .admin-dashboard-sidebar .admin-nav-group > a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 9px 10px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--admin-ui-muted);
  box-shadow: none;
  text-decoration: none;
}
.admin-dashboard-page .admin-dashboard-sidebar .admin-nav-group > a strong {
  color: inherit;
  font-size: 13px;
  font-weight: 550;
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.admin-dashboard-page .admin-dashboard-sidebar .admin-nav-group > a span { display: none; }
.admin-dashboard-page .admin-dashboard-sidebar .admin-nav-group > a:hover {
  border: 0;
  background: var(--admin-ui-surface);
  color: var(--admin-ui-text);
}
.admin-dashboard-page .admin-dashboard-sidebar .admin-nav-group > a.active {
  border: 0;
  background: var(--admin-ui-active);
  color: var(--admin-ui-active-text);
}
.admin-dashboard-page .admin-dashboard-sidebar .admin-nav-group > a.active strong { color: inherit; }
.admin-dashboard-page .admin-nav-direct { margin-bottom: 10px; }
.admin-dashboard-page .admin-nav-disclosure { border-top: 1px solid var(--admin-ui-line); padding-top: 6px; }
.admin-dashboard-page .admin-nav-disclosure:not(.is-open) > a { display: none; }
.admin-dashboard-page .admin-nav-disclosure-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  min-height: 38px;
  margin: 0;
  padding: 9px 10px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--admin-ui-muted);
  font-size: 12px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}
.admin-dashboard-page .admin-nav-disclosure-toggle:hover,
.admin-dashboard-page .admin-nav-disclosure.is-open .admin-nav-disclosure-toggle {
  background: var(--admin-ui-surface);
  color: var(--admin-ui-text);
}
.admin-dashboard-page .admin-nav-disclosure-toggle::after {
  content: "";
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  transition: transform .2s ease;
}
.admin-dashboard-page .admin-nav-disclosure.is-open .admin-nav-disclosure-toggle::after {
  transform: rotate(225deg) translateY(-1px);
}
.admin-dashboard-page .admin-logout-button {
  flex: 0 0 auto;
  width: calc(100% - 16px);
  min-height: 38px;
  margin: auto 8px 0;
  padding: 9px 10px;
  border: 1px solid var(--admin-ui-line);
  border-radius: 7px;
  background: transparent;
  color: var(--admin-ui-muted);
  font-size: 12px;
  font-weight: 550;
  text-align: left;
}
.admin-dashboard-page .admin-logout-button:hover { background: var(--admin-ui-surface); color: var(--admin-ui-text); }
.admin-dashboard-page .admin-dashboard-main {
  position: relative;
  align-self: start;
  justify-self: stretch;
  width: 100%;
  max-width: none;
  min-width: 0;
  min-height: 0;
  height: calc(100dvh - 24px);
  margin: 0;
  padding: 22px 28px 24px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  border: 0;
  border-radius: 24px;
  background: var(--admin-ui-main);
  box-shadow: none;
  scrollbar-width: none;
}
.admin-dashboard-page.admin-theme-light .admin-dashboard-main { background: var(--admin-ui-main) !important; }
.admin-dashboard-page .admin-dashboard-heading {
  position: static;
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: 36px;
  margin: 0 0 44px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
.admin-dashboard-page.admin-theme-light .admin-dashboard-heading { background: transparent !important; }
.admin-dashboard-page .admin-dashboard-heading > div:first-child { min-width: 0; }
.admin-dashboard-page .admin-dashboard-heading span {
  margin: 0 0 3px;
  color: var(--admin-ui-muted);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.4;
  text-transform: none;
}
.admin-dashboard-page .admin-dashboard-heading h1 {
  margin: 0;
  color: var(--admin-ui-text);
  font-size: 24px;
  font-weight: 650;
  line-height: 1.25;
  letter-spacing: -.045em;
}
.admin-dashboard-page .admin-heading-actions { margin-left: auto; gap: 12px; }
.admin-dashboard-page .admin-dashboard-heading a {
  min-width: 0;
  min-height: 36px;
  padding: 8px 12px;
  border: 1px solid var(--admin-ui-line);
  border-radius: 8px;
  background: transparent;
  color: var(--admin-ui-text);
  font-size: 12px;
  font-weight: 600;
}
.admin-dashboard-page .admin-dashboard-heading a:hover { background: var(--admin-ui-raised); }
.admin-dashboard-page .admin-theme-toggle.ios-theme-switch {
  grid-template-columns: 16px 34px 16px;
  gap: 5px;
  width: 94px;
  min-width: 94px;
  height: 36px;
  min-height: 36px;
  padding: 5px 7px;
  border: 1px solid var(--admin-ui-line);
  border-radius: 8px;
  background: var(--admin-ui-surface);
  color: var(--admin-ui-text);
}
.admin-dashboard-page .admin-theme-toggle.ios-theme-switch .theme-switch-icon,
.admin-dashboard-page .admin-theme-toggle.ios-theme-switch .theme-switch-icon svg { width: 16px; height: 16px; }
.admin-dashboard-page .admin-theme-toggle.ios-theme-switch .theme-switch-track {
  width: 34px;
  height: 24px;
  flex-basis: 34px;
  border-radius: 6px;
  background: var(--admin-ui-raised);
  box-shadow: inset 0 0 0 1px var(--admin-ui-line);
}
.admin-dashboard-page .admin-theme-toggle.ios-theme-switch .theme-switch-track i {
  width: 18px;
  height: 18px;
  transform: translate(10px, -50%);
}
.admin-dashboard-page .admin-theme-toggle.ios-theme-switch.is-light .theme-switch-track { background: #787e8a; }
.admin-dashboard-page .admin-theme-toggle.ios-theme-switch.is-light .theme-switch-track i { transform: translate(0, -50%); }
.admin-dashboard-page.admin-theme-light .admin-theme-toggle.ios-theme-switch {
  border-color: var(--admin-ui-line) !important;
  background: var(--admin-ui-surface) !important;
  color: var(--admin-ui-text) !important;
}

/* Neutral surfaces and SF-like scale throughout all existing admin views. */
.admin-dashboard-page .admin-dashboard-overview { max-width: none; gap: 18px; }
.admin-dashboard-page .admin-dashboard-cards { gap: 14px; margin: 0; }
.admin-dashboard-page .admin-dashboard-cards article,
.admin-dashboard-page .admin-dashboard-actions,
.admin-dashboard-page .admin-dashboard-actions .admin-task-card,
.admin-dashboard-page :is(.rounded-admin-panel, .settings-card, .customize-card, .admin-utility-page, .finance-tab-content, .invoice-list-item, .inventory-list, .inventory-list-item, .admin-user-card, .admin-review-card, .import-action-card, .category-card, .page-editor-card, .admin-modal) {
  border: 1px solid var(--admin-ui-line);
  border-radius: 14px;
  background: var(--admin-ui-surface);
  color: var(--admin-ui-text);
  box-shadow: none;
}
.admin-dashboard-page .admin-dashboard-cards article { min-height: 142px; padding: 20px; }
.admin-dashboard-page .admin-dashboard-cards article span,
.admin-dashboard-page .admin-dashboard-cards article p,
.admin-dashboard-page .admin-dashboard-actions .admin-task-card span { color: var(--admin-ui-muted); font-size: 12px; font-weight: 450; }
.admin-dashboard-page .admin-dashboard-cards article strong { color: var(--admin-ui-text); font-size: 30px; font-weight: 650; letter-spacing: -.04em; }
.admin-dashboard-page .admin-dashboard-actions { padding: 22px; }
.admin-dashboard-page .admin-dashboard-actions .admin-task-card { min-height: 108px; padding: 16px; }
.admin-dashboard-page .admin-dashboard-actions .admin-task-card:hover { background: var(--admin-ui-raised); }
.admin-dashboard-page .admin-dashboard-actions .admin-task-card strong { color: var(--admin-ui-text); font-size: 14px; font-weight: 600; }
.admin-dashboard-page .admin-dashboard-actions .admin-note { border: 1px solid var(--admin-ui-line); background: var(--admin-ui-main); color: var(--admin-ui-muted); }
.admin-dashboard-page .admin-section-title { gap: 5px; margin-bottom: 20px; }
.admin-dashboard-page .admin-section-title span { padding: 0; color: var(--admin-ui-muted); font-size: 11px; font-weight: 500; letter-spacing: 0; text-transform: none; }
.admin-dashboard-page .admin-section-title h2,
.admin-dashboard-page .admin-section-heading h2,
.admin-dashboard-page .admin-utility-page h2,
.admin-dashboard-page .admin-modal-header h3,
.admin-dashboard-page .settings-card h3,
.admin-dashboard-page .customize-card h3 {
  color: var(--admin-ui-text);
  font-size: clamp(18px, 2vw, 24px);
  font-weight: 650;
  line-height: 1.25;
  letter-spacing: -.035em;
}
.admin-dashboard-page :is(.admin-utility-page, .rounded-admin-panel, .settings-card, .customize-card) { min-width: 0; }
.admin-dashboard-page :is(.admin-utility-page, .rounded-admin-panel, .settings-card, .customize-card, .admin-dashboard-actions) :is(p, small) { color: var(--admin-ui-muted); }
.admin-dashboard-page .admin-modal { max-height: min(880px, calc(100dvh - 32px)); background: var(--admin-ui-main); }
.admin-dashboard-page .admin-modal-header p { color: var(--admin-ui-muted); font-weight: 500; letter-spacing: 0; }
.admin-dashboard-page :is(input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]), select, textarea) {
  max-width: 100%;
  border: 1px solid var(--admin-ui-line);
  border-radius: 8px;
  background: var(--admin-ui-main);
  color: var(--admin-ui-text);
}
.admin-dashboard-page :is(input, textarea)::placeholder { color: var(--admin-ui-muted); }
.admin-dashboard-page :is(input, select, textarea):focus { border-color: var(--admin-ui-focus); outline-color: var(--admin-ui-focus); }
.admin-dashboard-page.admin-theme-light :is(input, textarea, select) {
  border-color: var(--admin-ui-line) !important;
  background: var(--admin-ui-main) !important;
  color: var(--admin-ui-text) !important;
}
.admin-dashboard-page.admin-theme-light :is(input, textarea)::placeholder { color: var(--admin-ui-muted) !important; }
.admin-dashboard-page.admin-theme-light .admin-modal,
.admin-dashboard-page.admin-theme-light .admin-modal:has(.product-admin-form) .admin-form-actions {
  border-color: var(--admin-ui-line) !important;
  background: var(--admin-ui-main) !important;
  color: var(--admin-ui-text) !important;
}
.admin-dashboard-page :is(button:not(.admin-nav-disclosure-toggle):not(.admin-logout-button):not(.admin-theme-toggle):not(.admin-mobile-menu-toggle), .admin-action-buttons button, .admin-form-actions button) {
  border-color: var(--admin-ui-line);
  border-radius: 8px;
  background: var(--admin-ui-raised);
  color: var(--admin-ui-text);
  font-weight: 600;
}
.admin-dashboard-page :is(button:not(.admin-nav-disclosure-toggle):not(.admin-logout-button):not(.admin-theme-toggle):not(.admin-mobile-menu-toggle), .admin-action-buttons button, .admin-form-actions button):hover { background: var(--admin-ui-surface); }
.admin-dashboard-page :is(.admin-form-actions button[type=submit], .inventory-toolbar button, .stock-adjust-form button[type=submit], .admin-import-button.primary) {
  border-color: var(--admin-ui-active);
  background: var(--admin-ui-active);
  color: var(--admin-ui-active-text);
}
.admin-dashboard-page :is(.admin-form-actions button[type=submit], .inventory-toolbar button, .stock-adjust-form button[type=submit], .admin-import-button.primary):hover { opacity: .88; background: var(--admin-ui-active); }
.admin-dashboard-page button.danger-action { border-color: #fb718566; background: #fb71851a; color: #fb7185; }
.admin-dashboard-page :is(table, th, td, .admin-table, .admin-table-row) { border-color: var(--admin-ui-line); color: var(--admin-ui-text); }
.admin-dashboard-page :is(th, small, .inventory-list-item small) { color: var(--admin-ui-muted); }
.admin-dashboard-page :is(.admin-status-pill, .status-pill, .review-status-pill, .review-verified-pill) { border-radius: 7px; }
.admin-dashboard-page :is(.admin-status-pill, .status-pill, .review-status-pill, .review-verified-pill) {
  border-color: var(--admin-ui-line);
  background: var(--admin-ui-raised);
  color: var(--admin-ui-muted);
  font-size: 11px;
  font-weight: 550;
}
.admin-dashboard-page .status-pill.status-active { border-color: color-mix(in srgb, var(--admin-ui-success) 38%, transparent); color: var(--admin-ui-success); }
.admin-dashboard-page .status-pill.status-draft { border-color: color-mix(in srgb, var(--admin-ui-warning) 38%, transparent); color: var(--admin-ui-warning); }
.admin-dashboard-page .admin-toggle-card {
  border-color: var(--admin-ui-line);
  border-radius: 8px;
  background: var(--admin-ui-surface);
  color: var(--admin-ui-text);
}
.admin-dashboard-page .admin-toggle-card.active { border-color: var(--admin-ui-line); background: var(--admin-ui-raised); }
.admin-dashboard-page .admin-toggle-card small { color: var(--admin-ui-muted); }
.admin-dashboard-page .admin-toggle-card i { background: var(--admin-ui-main); box-shadow: inset 0 0 0 1px var(--admin-ui-line); }
.admin-dashboard-page .admin-toggle-card i::after { background: var(--admin-ui-muted); }
.admin-dashboard-page .admin-toggle-card.active i { background: var(--admin-ui-active); }
.admin-dashboard-page .admin-toggle-card.active i::after { background: var(--admin-ui-active-text); }
.admin-dashboard-page :is(.admin-user-summary article, .admin-user-create, .admin-user-toolbar, .admin-user-activate) {
  border: 1px solid var(--admin-ui-line);
  border-radius: 14px;
  background: var(--admin-ui-surface);
  color: var(--admin-ui-text);
}
.admin-dashboard-page .admin-user-summary article.attention { border-color: var(--admin-ui-line); background: var(--admin-ui-raised); }
.admin-dashboard-page .admin-user-summary span { color: var(--admin-ui-muted); font-size: 11px; font-weight: 550; letter-spacing: 0; text-transform: none; }
.admin-dashboard-page .admin-user-summary strong { color: var(--admin-ui-text); font-size: 30px; font-weight: 650; }
.admin-dashboard-page .admin-user-create .admin-section-title p { color: var(--admin-ui-muted); font-size: 11px; font-weight: 500; letter-spacing: 0; }
.admin-dashboard-page .admin-user-create .admin-section-title span,
.admin-dashboard-page :is(.admin-user-create, .admin-user-toolbar, .admin-user-fields) label,
.admin-dashboard-page :is(.admin-user-card-head time, .admin-user-meta, .admin-user-identity strong, .admin-user-identity a, .admin-user-activate small) { color: var(--admin-ui-muted); }
.admin-dashboard-page :is(.admin-user-self, .admin-user-avatar) { border-color: var(--admin-ui-line); background: var(--admin-ui-raised); color: var(--admin-ui-text); }
.admin-dashboard-page .admin-user-avatar { border-radius: 10px; }
.admin-dashboard-page .admin-user-card.status-invited::before { background: var(--admin-ui-warning); }
.admin-dashboard-page .admin-user-card.status-active::before { background: var(--admin-ui-success); }
.admin-dashboard-page :is(.admin-user-actions button.primary, .admin-user-create > button) { background: var(--admin-ui-active); color: var(--admin-ui-active-text); }
.admin-dashboard-page :is(.admin-user-actions button.primary, .admin-user-create > button):hover { background: var(--admin-ui-active); opacity: .88; }
.admin-dashboard-page .admin-user-activate input { accent-color: var(--admin-ui-active); }
.admin-dashboard-page :is(.inventory-list-item, .invoice-list-item, .admin-user-card, .admin-review-card) { min-width: 0; }

@media (max-width: 1200px) and (min-width: 861px) {
  .admin-dashboard-page { grid-template-columns: 190px minmax(0, 1fr); }
  .admin-dashboard-page .admin-dashboard-main { padding-inline: 22px; }
}
@media (max-width: 860px) {
  .admin-dashboard-page {
    display: block;
    min-height: 100dvh;
    height: auto;
    padding: 0;
    overflow: visible;
  }
  .admin-dashboard-page .admin-dashboard-sidebar.admin-mobile-ready {
    position: sticky;
    top: 0;
    z-index: 40;
    height: auto;
    max-height: 100dvh;
    min-height: 0;
    padding: env(safe-area-inset-top, 0px) max(16px, env(safe-area-inset-right, 0px)) 0 max(16px, env(safe-area-inset-left, 0px));
    border-bottom: 1px solid var(--admin-ui-line);
    background: var(--admin-ui-bg);
    overflow: visible;
  }
  .admin-dashboard-page .admin-mobile-ready .admin-sidebar-top { margin: 0; min-height: 60px; padding: 8px 0; }
  .admin-dashboard-page .admin-mobile-ready .admin-sidebar-top > strong { font-size: 18px; }
  .admin-dashboard-page .admin-mobile-ready .admin-sidebar-top > span { font-size: 10px; }
  .admin-dashboard-page .admin-mobile-menu-toggle {
    min-width: 82px;
    min-height: 40px;
    border-color: var(--admin-ui-line);
    border-radius: 8px;
    background: var(--admin-ui-surface);
    color: var(--admin-ui-text);
  }
  .admin-dashboard-page .admin-mobile-ready.is-mobile-menu-open .admin-nav-groups {
    display: flex;
    flex-direction: column;
    gap: 5px;
    max-height: calc(100dvh - 135px - env(safe-area-inset-top, 0px));
    padding: 8px 0;
    overflow-y: auto;
  }
  .admin-dashboard-page .admin-mobile-ready .admin-nav-group > a { min-height: 42px; }
  .admin-dashboard-page .admin-mobile-ready .admin-logout-button { width: 100%; margin: 8px 0 12px; text-align: center; }
  .admin-dashboard-page .admin-dashboard-main {
    width: 100%;
    height: auto;
    min-height: calc(100dvh - 60px);
    margin: 0;
    padding: 20px max(16px, env(safe-area-inset-right, 0px)) max(32px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
    overflow: visible;
    border: 0;
    border-radius: 0;
  }
  .admin-dashboard-page .admin-dashboard-heading { gap: 14px; margin: 0 0 25px; padding: 0; }
  .admin-dashboard-page .admin-dashboard-heading h1 { font-size: clamp(21px, 5vw, 24px); }
  .admin-dashboard-page .admin-heading-actions { gap: 8px; }
  .admin-dashboard-page .admin-theme-toggle.ios-theme-switch { width: 94px; min-width: 94px; min-height: 36px; height: 36px; }
}
@media (max-width: 560px) {
  .admin-dashboard-page .admin-dashboard-heading { align-items: flex-start; }
  .admin-dashboard-page .admin-dashboard-heading > div:first-child { flex: 1 1 100%; }
  .admin-dashboard-page .admin-heading-actions { margin-left: 0; justify-content: flex-start; }
  .admin-dashboard-page .admin-dashboard-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  .admin-dashboard-page .admin-nav-disclosure-toggle::after { transition: none; }
}

/* Read-only shop figures reuse the visual language of the statistics dashboard. */
.admin-dashboard-page {
  --admin-ui-blue: #53bdf5;
  --admin-ui-red: #fb7185;
  --admin-ui-grid: #ffffff0b;
}
.admin-dashboard-page.admin-theme-light {
  --admin-ui-blue: #077ba6;
  --admin-ui-red: #c43758;
  --admin-ui-grid: #1519220a;
}
.admin-dashboard-page .admin-dashboard-sidebar .admin-nav-icon {
  display: block;
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.admin-dashboard-page .admin-dashboard-sidebar .admin-nav-group > a { gap: 10px; }
.admin-dashboard-page .admin-nav-disclosure-toggle { justify-content: flex-start; gap: 10px; }
.admin-dashboard-page .admin-nav-disclosure-toggle > span { flex: 1; }
.admin-app-shell.has-admin-stats-nav .admin-heading-actions a[href="/admin/statistiken"] { display: none !important; }

/* Colour is a second cue beside the existing status text; no status is changed. */
.admin-dashboard-page .admin-status-pill[data-tone="success"] {
  color: var(--admin-ui-success);
  border-color: color-mix(in srgb, var(--admin-ui-success) 30%, transparent);
  background: color-mix(in srgb, var(--admin-ui-success) 11%, var(--admin-ui-surface));
}
.admin-dashboard-page .admin-status-pill[data-tone="warning"] {
  color: var(--admin-ui-warning);
  border-color: color-mix(in srgb, var(--admin-ui-warning) 30%, transparent);
  background: color-mix(in srgb, var(--admin-ui-warning) 11%, var(--admin-ui-surface));
}
.admin-dashboard-page .admin-status-pill[data-tone="danger"] {
  color: var(--admin-ui-red);
  border-color: color-mix(in srgb, var(--admin-ui-red) 30%, transparent);
  background: color-mix(in srgb, var(--admin-ui-red) 11%, var(--admin-ui-surface));
}
.admin-dashboard-page .admin-status-pill[data-tone="info"] {
  color: var(--admin-ui-blue);
  border-color: color-mix(in srgb, var(--admin-ui-blue) 30%, transparent);
  background: color-mix(in srgb, var(--admin-ui-blue) 11%, var(--admin-ui-surface));
}

.admin-dashboard-page .admin-stats-overview {
  min-width: 0;
  color: var(--admin-ui-text);
  font-variant-numeric: tabular-nums;
}
.admin-dashboard-page .admin-stats-overview [hidden] { display: none !important; }
.admin-dashboard-page .admin-stats-overview :is(h2, h3, p) { margin: 0; }
.admin-dashboard-page .admin-stats-revenue { margin-bottom: 24px; }
.admin-dashboard-page .admin-stats-revenue-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 58px;
}
.admin-dashboard-page .admin-stats-revenue-heading h2 { color: var(--admin-ui-muted); font-size: 13px; font-weight: 500; letter-spacing: 0; }
.admin-dashboard-page .admin-stats-total {
  display: block;
  margin: 4px 0 9px;
  font-size: clamp(40px, 3vw, 54px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -.05em;
  overflow-wrap: anywhere;
}
.admin-dashboard-page .admin-stats-caption { display: flex; align-items: center; gap: 7px; color: var(--admin-ui-muted); font-size: 12px; }
.admin-dashboard-page .admin-stats-dot { display: inline-block; width: 6px; height: 6px; flex: 0 0 6px; border-radius: 50%; background: currentColor; }
.admin-dashboard-page .admin-stats-caption .admin-stats-dot { color: var(--admin-ui-success); }
.admin-dashboard-page .admin-stats-dot-orange { color: var(--admin-ui-warning); }
.admin-dashboard-page .admin-stats-summary { display: flex; gap: clamp(18px, 3vw, 46px); padding-top: 8px; }
.admin-dashboard-page .admin-stats-summary > div { min-width: 0; text-align: right; }
.admin-dashboard-page .admin-stats-summary > div > span { display: inline-flex; align-items: center; gap: 7px; margin-bottom: 8px; color: var(--admin-ui-muted); font-size: 12px; }
.admin-dashboard-page .admin-stats-summary > div > span .admin-stats-dot { color: var(--admin-ui-success); }
.admin-dashboard-page .admin-stats-summary > div > span .admin-stats-dot-orange { color: var(--admin-ui-warning); }
.admin-dashboard-page .admin-stats-summary strong { display: block; font-size: 22px; font-weight: 650; letter-spacing: -.04em; white-space: nowrap; }
.admin-dashboard-page .admin-stats-green { color: var(--admin-ui-success); }
.admin-dashboard-page .admin-stats-orange { color: var(--admin-ui-warning); }
.admin-dashboard-page .admin-stats-blue { color: var(--admin-ui-blue); }
.admin-dashboard-page .admin-stats-red { color: var(--admin-ui-red); }
.admin-dashboard-page .admin-stats-chart { display: flex; gap: 16px; min-width: 0; }
.admin-dashboard-page .admin-stats-chart-scale { display: flex; flex-direction: column; align-items: flex-end; justify-content: space-between; flex: 0 0 80px; padding: 8px 0 36px; color: var(--admin-ui-muted); font-size: 11px; }
.admin-dashboard-page .admin-stats-chart-plot { position: relative; flex: 1; min-width: 0; }
.admin-dashboard-page .admin-stats-chart-plot > svg { display: block; width: 100%; height: 260px; overflow: visible; cursor: crosshair; }
.admin-dashboard-page .admin-stats-chart-plot > svg:focus-visible { outline: 2px solid var(--admin-ui-focus); outline-offset: 5px; border-radius: 4px; }
.admin-dashboard-page .admin-stats-chart-grid { fill: none; stroke: var(--admin-ui-grid); stroke-width: 1; vector-effect: non-scaling-stroke; }
.admin-dashboard-page .admin-stats-chart-line { fill: none; stroke: var(--admin-ui-success); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.admin-dashboard-page .admin-stats-chart-point { fill: var(--admin-ui-success); stroke: var(--admin-ui-main); stroke-width: 1; vector-effect: non-scaling-stroke; }
.admin-dashboard-page .admin-stats-gradient-top { stop-color: var(--admin-ui-success); stop-opacity: .18; }
.admin-dashboard-page .admin-stats-gradient-bottom { stop-color: var(--admin-ui-success); stop-opacity: 0; }
.admin-dashboard-page .admin-stats-chart-cursor path { fill: none; stroke: var(--admin-ui-muted); stroke-width: 1; stroke-dasharray: 4 5; vector-effect: non-scaling-stroke; }
.admin-dashboard-page .admin-stats-chart-cursor circle { fill: var(--admin-ui-success); stroke: var(--admin-ui-main); stroke-width: 2; vector-effect: non-scaling-stroke; }
.admin-dashboard-page .admin-stats-chart-dates { display: flex; justify-content: space-between; margin-top: 12px; color: var(--admin-ui-muted); font-size: 11px; }
.admin-dashboard-page .admin-stats-chart-tooltip { position: absolute; z-index: 1; top: 12px; width: 156px; max-width: 100%; padding: 10px 12px; border: 1px solid var(--admin-ui-line); border-radius: 9px; background: var(--admin-ui-raised); box-shadow: 0 8px 24px #0003; transform: translateX(-50%); pointer-events: none; }
.admin-dashboard-page .admin-stats-chart-tooltip span { display: block; margin-bottom: 4px; color: var(--admin-ui-muted); font-size: 10px; }
.admin-dashboard-page .admin-stats-chart-tooltip strong { color: var(--admin-ui-success); font-size: 13px; }
.admin-dashboard-page .admin-stats-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 275px; padding: 24px; border-bottom: 1px solid var(--admin-ui-grid); background: repeating-linear-gradient(to top, transparent 0, transparent 54px, var(--admin-ui-grid) 55px, transparent 56px); text-align: center; }
.admin-dashboard-page .admin-stats-empty h3 { margin-bottom: 8px; font-size: 14px; font-weight: 600; }
.admin-dashboard-page .admin-stats-empty p { max-width: 380px; color: var(--admin-ui-muted); font-size: 12px; }
.admin-dashboard-page .admin-stats-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin: 20px 0 0; padding-left: 96px; }
.admin-dashboard-page .admin-stats-periods { --period-index: 0; position: relative; isolation: isolate; display: inline-grid; grid-template-columns: repeat(4, minmax(72px, 1fr)); gap: 3px; flex: 0 0 auto; padding: 4px; border-radius: 8px; background: var(--admin-ui-surface); }
.admin-dashboard-page .admin-stats-periods[data-period="30"] { --period-index: 1; }
.admin-dashboard-page .admin-stats-periods[data-period="90"] { --period-index: 2; }
.admin-dashboard-page .admin-stats-periods[data-period="365"] { --period-index: 3; }
.admin-dashboard-page .admin-stats-period-indicator { position: absolute; z-index: 0; top: 4px; bottom: 4px; left: 4px; width: calc((100% - 17px) / 4); border-radius: 5px; background: var(--admin-ui-active); pointer-events: none; transform: translateX(calc(var(--period-index) * (100% + 3px))); transition: transform .36s cubic-bezier(.22, 1, .36, 1); }
.admin-dashboard-page .admin-stats-periods a { position: relative; z-index: 1; display: flex; align-items: center; justify-content: center; min-width: 72px; min-height: 33px; padding: 7px 11px; border-radius: 5px; color: var(--admin-ui-muted); font-size: 12px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.admin-dashboard-page .admin-stats-periods a:hover { color: var(--admin-ui-text); }
.admin-dashboard-page .admin-stats-periods a[aria-current] { color: var(--admin-ui-active-text); }
.admin-dashboard-page .admin-stats-context { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px 20px; color: var(--admin-ui-muted); font-size: 11px; }
.admin-dashboard-page .admin-stats-context a { color: var(--admin-ui-blue); text-decoration: none; white-space: nowrap; }
.admin-dashboard-page .admin-stats-context a:hover { text-decoration: underline; }
.admin-dashboard-page .admin-stats-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.admin-dashboard-page .admin-stats-metrics article { min-width: 0; min-height: 152px; padding: 20px; border-radius: 16px; background: var(--admin-ui-surface); }
.admin-dashboard-page .admin-stats-metric-label { display: flex; align-items: center; gap: 9px; margin-bottom: 16px; }
.admin-dashboard-page .admin-stats-metric-icon { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 31px; width: 31px; height: 31px; border-radius: 8px; background: var(--admin-ui-raised); }
.admin-dashboard-page .admin-stats-metric-icon svg { display: block; width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.admin-dashboard-page .admin-stats-metric-label h2 { font-size: 13px; font-weight: 550; }
.admin-dashboard-page .admin-stats-metrics article > strong { display: block; font-size: clamp(24px, 2vw, 30px); font-weight: 650; line-height: 1.3; letter-spacing: -.045em; overflow-wrap: anywhere; }
.admin-dashboard-page .admin-stats-metrics article > p { margin-top: 7px; color: var(--admin-ui-muted); font-size: 12px; }
.admin-dashboard-page .admin-stats-payments { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 22px; padding: 20px 6px; border-radius: 14px; background: var(--admin-ui-surface); }
.admin-dashboard-page .admin-stats-payments > div { min-width: 0; padding: 0 20px; border-right: 1px solid var(--admin-ui-line); }
.admin-dashboard-page .admin-stats-payments > div:last-child { border-right: 0; }
.admin-dashboard-page .admin-stats-payments h2 { margin-bottom: 7px; font-size: 12px; font-weight: 500; }
.admin-dashboard-page .admin-stats-payments p { display: flex; align-items: baseline; gap: 8px; }
.admin-dashboard-page .admin-stats-payments strong { font-size: 26px; font-weight: 650; line-height: 1.2; letter-spacing: -.04em; }
.admin-dashboard-page .admin-stats-payments p > span:last-child { color: var(--admin-ui-muted); font-size: 11px; }
.admin-dashboard-page .admin-stats-shop-heading { margin: 22px 0 15px; }
.admin-dashboard-page .admin-stats-shop-heading h2 { margin: 0; font-size: 16px; font-weight: 650; }
.admin-dashboard-page .admin-stats-shop-heading p { margin: 4px 0 0; color: var(--admin-ui-muted); font-size: 12px; }
.admin-dashboard-page .admin-stats-feedback { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; padding: 12px 14px; border: 1px solid var(--admin-ui-line); border-radius: 9px; background: var(--admin-ui-surface); color: var(--admin-ui-muted); font-size: 12px; }
.admin-dashboard-page .admin-stats-overview.has-error .admin-stats-feedback { border-color: var(--admin-ui-warning); color: var(--admin-ui-text); }
.admin-dashboard-page .admin-stats-feedback button { flex: 0 0 auto; padding: 6px 10px; border-radius: 6px; cursor: pointer; }

@media (max-width: 1200px) {
  .admin-dashboard-page .admin-stats-summary { gap: 18px; }
  .admin-dashboard-page .admin-stats-summary strong { font-size: 18px; }
  .admin-dashboard-page .admin-stats-metrics article { padding: 17px 15px; }
  .admin-dashboard-page .admin-stats-metric-label h2 { font-size: 12px; }
  .admin-dashboard-page .admin-stats-payments > div { padding-inline: 15px; }
  .admin-dashboard-page .admin-stats-toolbar { padding-left: 0; flex-wrap: wrap; }
}
@media (max-width: 980px) {
  .admin-dashboard-page .admin-stats-revenue-heading { flex-direction: column; gap: 15px; margin-bottom: 36px; }
  .admin-dashboard-page .admin-stats-summary { width: 100%; justify-content: space-between; }
  .admin-dashboard-page .admin-stats-summary > div { text-align: left; }
  .admin-dashboard-page .admin-stats-metrics, .admin-dashboard-page .admin-stats-payments { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-dashboard-page .admin-stats-payments { gap: 20px 0; }
  .admin-dashboard-page .admin-stats-payments > div:nth-child(2) { border-right: 0; }
}
@media (max-width: 760px) {
  .admin-dashboard-page .admin-stats-total { font-size: 42px; }
  .admin-dashboard-page .admin-stats-chart-plot > svg { height: 210px; }
  .admin-dashboard-page .admin-stats-chart-scale { flex-basis: 58px; font-size: 9px; }
  .admin-dashboard-page .admin-stats-chart-dates { font-size: 10px; }
  .admin-dashboard-page .admin-stats-periods a { min-height: 44px; }
}
@media (max-width: 520px) {
  .admin-dashboard-page .admin-stats-summary { flex-wrap: wrap; gap: 14px 20px; }
  .admin-dashboard-page .admin-stats-summary strong { font-size: 17px; }
  .admin-dashboard-page .admin-stats-toolbar { flex-direction: column; align-items: stretch; }
  .admin-dashboard-page .admin-stats-periods { width: 100%; grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .admin-dashboard-page .admin-stats-periods a { min-width: 0; padding-inline: 3px; font-size: 11px; }
  .admin-dashboard-page .admin-stats-context { justify-content: space-between; }
  .admin-dashboard-page .admin-stats-metrics article { min-height: 130px; padding: 14px; }
  .admin-dashboard-page .admin-stats-metric-label { gap: 6px; margin-bottom: 10px; }
  .admin-dashboard-page .admin-stats-metric-label h2 { font-size: 11px; }
  .admin-dashboard-page .admin-stats-metrics article > strong { font-size: 22px; }
  .admin-dashboard-page .admin-stats-metrics article > p { font-size: 10px; }
  .admin-dashboard-page .admin-stats-payments { padding: 16px 0; }
  .admin-dashboard-page .admin-stats-payments > div { padding-inline: 12px; }
  .admin-dashboard-page .admin-stats-payments strong { font-size: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  .admin-dashboard-page .admin-stats-period-indicator { transition: none; }
}

/* Compact main-image preview in the existing product rows. */
.admin-dashboard-page .inventory-product-main.has-admin-product-preview {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-content: center;
  align-items: center;
  column-gap: 12px;
  min-width: 0;
}
.admin-dashboard-page .inventory-product-main .admin-product-preview {
  display: flex;
  grid-column: 1;
  grid-row: 1 / 3;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  overflow: hidden;
  border: 1px solid var(--admin-ui-line);
  border-radius: 8px;
  background: var(--admin-ui-raised);
  color: var(--admin-ui-muted);
}
.admin-dashboard-page .inventory-product-main .admin-product-preview img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.admin-dashboard-page .inventory-product-main .admin-product-preview-icon {
  display: block;
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.admin-dashboard-page .inventory-product-main.has-admin-product-preview > strong,
.admin-dashboard-page .inventory-product-main.has-admin-product-preview > span:not(.admin-product-preview) {
  grid-column: 2;
  min-width: 0;
}
.admin-dashboard-page .inventory-product-main.has-admin-product-preview > strong {
  white-space: normal;
  overflow: visible;
  overflow-wrap: anywhere;
  text-overflow: clip;
  line-height: 1.3;
}
@media (max-width: 520px) {
  .admin-dashboard-page .inventory-product-main.has-admin-product-preview { grid-template-columns: 40px minmax(0, 1fr); column-gap: 10px; }
  .admin-dashboard-page .inventory-product-main .admin-product-preview { width: 40px; height: 40px; }
}
