/* 订单管理 V2.6：正式桌面工作台 */

html[data-theme="light"] {
  color-scheme: light;
  --bg: #f3f5f8;
  --card: #ffffff;
  --text: #172033;
  --muted: #697386;
  --panel: #ffffff;
  --panel-strong: #f8fafc;
  --line: #e3e8ef;
}

html[data-theme="dark"] {
  color-scheme: dark;
}

html[data-theme="light"] body {
  background: #f3f5f8;
  color: #172033;
}

html[data-theme="light"] main > section:not(.factory-orders-v26),
html[data-theme="light"] .workspace-welcome,
html[data-theme="light"] .overview-card {
  border-color: #e3e8ef;
  background: #ffffff;
  color: #172033;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
}

html[data-theme="light"] main input,
html[data-theme="light"] main select,
html[data-theme="light"] main textarea {
  border-color: #dbe2ea;
  background: #ffffff;
  color: #172033;
}

html[data-theme="light"] .app-sidebar {
  border-right-color: #e5e9f0;
  background: #ffffff;
  box-shadow: 6px 0 24px rgba(15, 23, 42, 0.035);
}

html[data-theme="light"] .sidebar-brand strong {
  color: #1f2937;
}

html[data-theme="light"] .sidebar-brand small,
html[data-theme="light"] .sidebar-label {
  color: #8a94a6;
}

html[data-theme="light"] .sidebar-collapse-button,
html[data-theme="light"] .sidebar-open-button {
  border-color: #dfe5ec;
  background: #ffffff;
  color: #64748b;
  box-shadow: none;
}

html[data-theme="light"] .sidebar-collapse-button:hover,
html[data-theme="light"] .sidebar-open-button:hover {
  border-color: #9edfd2;
  background: #f0fbf8;
  color: #13a88a;
}

html[data-theme="light"] .nav-item {
  color: #526071;
}

html[data-theme="light"] .nav-item:hover {
  border-color: #edf0f4;
  background: #f6f8fa;
  color: #172033;
}

html[data-theme="light"] .nav-item.active {
  border-color: #cceee7;
  background: #eaf8f5;
  color: #0f9278;
  box-shadow: inset 3px 0 #13a88a;
}

html[data-theme="light"] .nav-icon {
  background: #f2f5f8;
  color: #697386;
}

html[data-theme="light"] .nav-item.active .nav-icon {
  background: #d8f2ec;
  color: #0f9278;
}

html[data-theme="light"] .nav-badge.planned {
  border-color: #c9e7ff;
  background: #edf7ff;
  color: #1687e0;
}

html[data-theme="light"] .sidebar-foot {
  border-color: #e4e9ef;
  background: #f8fafc;
}

html[data-theme="light"] .sidebar-account {
  border-bottom-color: #e3e8ef;
}

html[data-theme="light"] .sidebar-account-avatar {
  background: #e9f4ff;
  color: #1687e0;
}

html[data-theme="light"] .sidebar-account-copy strong {
  color: #273244;
}

html[data-theme="light"] .sidebar-account-copy #status,
html[data-theme="light"] .sidebar-health {
  color: #7a8698;
}

html[data-theme="light"] .sidebar-account-actions .sidebar-install-button,
html[data-theme="light"] .sidebar-account-actions .settings-btn {
  border-color: #dce3eb;
  background: #ffffff;
  color: #526071;
}

html[data-theme="light"] .sidebar-account-actions .sidebar-install-button:hover,
html[data-theme="light"] .sidebar-account-actions .settings-btn:hover {
  border-color: #9edfd2;
  color: #0f9278;
}

html[data-theme="light"] .sidebar-theme-toggle {
  border-color: #dce3eb;
  background: #ffffff;
  color: #526071;
}

html[data-theme="light"] .sidebar-theme-toggle:hover {
  border-color: #9edfd2;
  background: #f0fbf8;
}

html[data-theme="light"] .sidebar-theme-icon {
  background: #e7f8f4;
  color: #13a88a;
}

html[data-theme="light"] .sidebar-theme-copy strong {
  color: #273244;
}

html[data-theme="light"] .sidebar-theme-copy small {
  color: #7a8698;
}

.sidebar-theme-toggle {
  width: 100%;
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 11px;
  padding: 8px 9px;
  border: 1px solid #203049;
  border-radius: 10px;
  background: #101c2f;
  color: #cbd5e1;
  text-align: left;
}

.sidebar-theme-toggle:hover {
  border-color: #315071;
  background: #132139;
}

.sidebar-theme-icon {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: rgba(45, 212, 191, 0.12);
  color: #5eead4;
  font-size: 17px;
}

.sidebar-theme-copy {
  min-width: 0;
}

.sidebar-theme-copy strong,
.sidebar-theme-copy small {
  display: block;
}

.sidebar-theme-copy strong {
  color: #dbeafe;
  font-size: 11px;
}

.sidebar-theme-copy small {
  margin-top: 3px;
  color: #64748b;
  font-size: 9px;
  white-space: nowrap;
}

@media (min-width: 901px) {
  html body.sidebar-collapsed .app-sidebar {
    width: 76px;
    padding: 16px 10px;
    overflow-x: hidden;
    transform: none;
  }

  html body.sidebar-collapsed main {
    margin-left: 76px;
    padding-left: 22px;
  }

  html body.sidebar-collapsed .sidebar-open-button {
    display: none;
  }

  body.sidebar-collapsed .sidebar-brand {
    flex-direction: column;
    gap: 9px;
    padding: 2px 0 14px;
  }

  body.sidebar-collapsed .sidebar-brand > div,
  body.sidebar-collapsed .sidebar-label,
  body.sidebar-collapsed .nav-item > span:not(.nav-icon),
  body.sidebar-collapsed .sidebar-theme-copy,
  body.sidebar-collapsed .sidebar-account-copy,
  body.sidebar-collapsed .sidebar-account-actions,
  body.sidebar-collapsed .sidebar-health {
    display: none !important;
  }

  body.sidebar-collapsed .sidebar-collapse-button {
    margin: 0;
    transform: rotate(180deg);
  }

  body.sidebar-collapsed .sidebar-group {
    margin-bottom: 9px;
  }

  body.sidebar-collapsed .nav-item {
    min-height: 44px;
    justify-content: center;
    padding: 9px;
  }

  body.sidebar-collapsed .nav-item.active {
    box-shadow: inset 2px 0 #10b981;
  }

  body.sidebar-collapsed .sidebar-foot {
    padding: 0;
    border: 0;
    background: transparent;
  }

  body.sidebar-collapsed .sidebar-theme-toggle {
    justify-content: center;
    padding: 8px;
  }

  body.sidebar-collapsed .sidebar-account {
    justify-items: center;
    padding: 9px 0 0;
    border-top: 1px solid #203049;
    border-bottom: 0;
  }

  html[data-theme="light"] body.sidebar-collapsed .sidebar-account {
    border-top-color: #e3e8ef;
  }
}

#ordersSection.factory-orders-v26 {
  --fo-page: #f3f5f8;
  --fo-panel: #ffffff;
  --fo-panel-soft: #f8fafc;
  --fo-border: #e3e8ef;
  --fo-border-strong: #d4dce6;
  --fo-text: #172033;
  --fo-muted: #697386;
  --fo-subtle: #8a94a6;
  --fo-primary: #1677ff;
  --fo-primary-hover: #0958d9;
  --fo-primary-soft: #e6f4ff;
  --fo-blue: #1687e0;
  --fo-blue-soft: #e9f4ff;
  --fo-progress-done: #13a88a;
  --fo-progress-current: #1687e0;
  --fo-progress-current-soft: #e9f4ff;
  --fo-danger: #e34955;
  --fo-danger-soft: #fff0f1;
  --fo-shadow: 0 10px 30px rgba(15, 23, 42, 0.055);
  min-width: 0;
  padding: 0;
  overflow: visible;
  border: 0;
  background: transparent;
  box-shadow: none;
  color: var(--fo-text);
}

html[data-theme="dark"] #ordersSection.factory-orders-v26 {
  --fo-page: #08111f;
  --fo-panel: #0d192a;
  --fo-panel-soft: #0a1525;
  --fo-border: #22344b;
  --fo-border-strong: #2b405b;
  --fo-text: #e5edf5;
  --fo-muted: #8fa0b4;
  --fo-subtle: #65788f;
  --fo-primary: #4096ff;
  --fo-primary-hover: #69b1ff;
  --fo-primary-soft: rgba(22, 119, 255, 0.18);
  --fo-blue: #4aa8f5;
  --fo-blue-soft: rgba(74, 168, 245, 0.13);
  --fo-progress-done: #21b494;
  --fo-progress-current: #4aa8f5;
  --fo-progress-current-soft: rgba(74, 168, 245, 0.13);
  --fo-danger: #ff7582;
  --fo-danger-soft: rgba(255, 117, 130, 0.12);
  --fo-shadow: 0 18px 50px rgba(0, 0, 0, 0.22);
}

.factory-orders-v26 .factory-page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin: 0 0 18px;
}

.factory-orders-v26 .factory-heading-copy h2 {
  display: block;
  margin: 0;
  color: var(--fo-text);
  font-size: 27px;
  line-height: 1.15;
  letter-spacing: -0.035em;
}

.factory-orders-v26 .factory-heading-copy p {
  margin: 8px 0 0;
  color: var(--fo-muted);
  font-size: 13px;
}

.factory-orders-v26 .factory-heading-actions,
.factory-orders-v26 .factory-action-group,
.factory-orders-v26 .factory-page-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.factory-orders-v26 .factory-updated {
  color: var(--fo-muted);
  font-size: 12px;
  white-space: nowrap;
}

.factory-orders-v26 .factory-updated strong {
  color: var(--fo-text);
}

.factory-orders-v26 .factory-button,
.factory-orders-v26 .factory-page-controls button,
.factory-orders-v26 .factory-batch-bar button,
.factory-orders-v26 .factory-result-line button {
  min-height: 38px;
  padding: 8px 13px;
  border: 1px solid var(--fo-border-strong);
  border-radius: 7px;
  background: var(--fo-panel);
  color: var(--fo-text);
  font-size: 12px;
  font-weight: 650;
  box-shadow: none;
}

.factory-orders-v26 .factory-button:hover,
.factory-orders-v26 .factory-page-controls button:hover,
.factory-orders-v26 .factory-batch-bar button:hover {
  border-color: var(--fo-primary);
  color: var(--fo-primary);
}

.factory-orders-v26 .factory-button.primary {
  border-color: var(--fo-primary);
  background: var(--fo-primary);
  color: #ffffff;
}

.factory-orders-v26 .factory-button.primary:hover {
  border-color: var(--fo-primary-hover);
  background: var(--fo-primary-hover);
  color: #ffffff;
}

.factory-orders-v26 .factory-button.danger {
  border-color: color-mix(in srgb, var(--fo-danger) 42%, transparent);
  background: var(--fo-danger-soft);
  color: var(--fo-danger);
}

.factory-orders-v26 .factory-orders-panel {
  min-width: 1000px;
  overflow: visible;
  border: 1px solid var(--fo-border);
  border-radius: 10px;
  background: var(--fo-panel);
  box-shadow: var(--fo-shadow);
}

.factory-orders-v26 .factory-panel-toolbar {
  padding: 17px 18px 15px;
  border-bottom: 1px solid var(--fo-border);
}

.factory-orders-v26 .factory-search-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.factory-orders-v26 .factory-search-box {
  position: relative;
  width: 440px;
  height: 48px;
  flex: 0 1 440px;
  min-width: 0;
  display: flex;
  align-items: center;
}

.factory-orders-v26 .factory-search-icon {
  position: absolute;
  left: 12px;
  z-index: 2;
  color: var(--fo-subtle);
  font-size: 17px;
  pointer-events: none;
}

.factory-orders-v26 .factory-advanced-filters label > span {
  display: block;
  margin: 0 0 7px 1px;
  color: var(--fo-muted);
  font-size: 11px;
  font-weight: 650;
}

.factory-orders-v26 #orderSearch {
  width: 100%;
  min-width: 0;
  max-width: 440px;
  height: 48px;
  min-height: 48px;
  padding: 12px 84px 12px 36px;
  resize: none;
  overflow: hidden;
  border: 1px solid var(--fo-border-strong);
  border-radius: 7px;
  background: var(--fo-panel);
  color: var(--fo-text);
  font-size: 13px;
  line-height: 22px;
}

.factory-orders-v26 #orderSearch::placeholder {
  color: var(--fo-subtle);
}

.factory-orders-v26 .factory-search-submit {
  position: absolute;
  inset: 0 0 0 auto;
  z-index: 3;
  width: 72px;
  padding: 0 14px;
  border: 1px solid var(--fo-primary);
  border-radius: 0 7px 7px 0;
  background: var(--fo-primary);
  color: #ffffff;
  font-size: 12px;
  font-weight: 650;
  box-shadow: none;
}

.factory-orders-v26 .factory-search-submit:hover {
  border-color: var(--fo-primary-hover);
  background: var(--fo-primary-hover);
}

.factory-orders-v26 .factory-search-row > #advancedFilterToggle {
  flex: 0 0 auto;
}

.factory-orders-v26 .factory-search-row > .factory-action-group {
  margin-left: auto;
}

.factory-orders-v26 #orderSearch:focus,
.factory-orders-v26 .factory-advanced-filters input:focus,
.factory-orders-v26 .factory-advanced-filters select:focus {
  border-color: var(--fo-primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--fo-primary) 13%, transparent);
}

.factory-orders-v26 .factory-more-wrap {
  position: relative;
}

.factory-orders-v26 .factory-more-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 30;
  width: 150px;
  display: none;
  padding: 5px;
  border: 1px solid var(--fo-border);
  border-radius: 8px;
  background: var(--fo-panel);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.16);
}

.factory-orders-v26 .factory-more-menu.show {
  display: block;
}

.factory-orders-v26 .factory-more-menu button {
  width: 100%;
  padding: 9px 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--fo-text);
  text-align: left;
  font-size: 12px;
}

.factory-orders-v26 .factory-more-menu button:hover {
  background: var(--fo-panel-soft);
}

.factory-orders-v26 .factory-advanced-filters {
  display: grid;
  grid-template-columns: repeat(5, minmax(145px, 1fr));
  gap: 10px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--fo-border);
}

body.filters-collapsed .factory-orders-v26 .factory-advanced-filters {
  display: none;
}

.factory-orders-v26 .factory-advanced-filters label {
  min-width: 0;
}

.factory-orders-v26 .factory-advanced-filter-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  padding-top: 2px;
}

.factory-orders-v26 .factory-advanced-filter-actions .factory-button {
  min-width: 76px;
}

.factory-orders-v26 .factory-advanced-filters input,
.factory-orders-v26 .factory-advanced-filters select,
.factory-orders-v26 .date-filter-btn {
  width: 100%;
  min-width: 0;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid var(--fo-border-strong);
  border-radius: 7px;
  background: var(--fo-panel);
  color: var(--fo-text);
  font-size: 12px;
}

.factory-orders-v26 .factory-date-filter-wrap {
  width: 100%;
}

.factory-orders-v26 .factory-date-filter-wrap .date-filter-btn {
  min-width: 0;
}

.factory-orders-v26 .factory-date-filter-wrap .date-clear-btn {
  flex: 0 0 36px;
  border-color: var(--fo-border-strong);
  background: var(--fo-panel-soft);
  color: var(--fo-muted);
}

.factory-orders-v26 .factory-active-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 11px;
}

.factory-orders-v26 .factory-active-filters[hidden] {
  display: none;
}

.factory-orders-v26 .factory-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 8px;
  border: 1px solid color-mix(in srgb, var(--fo-primary) 28%, var(--fo-border));
  border-radius: 999px;
  background: var(--fo-primary-soft);
  color: var(--fo-primary);
  font-size: 11px;
}

.factory-orders-v26 .factory-filter-chip button {
  width: 16px;
  height: 16px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font-size: 13px;
}

.factory-orders-v26 .factory-result-line {
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 18px;
  border-bottom: 1px solid var(--fo-border);
  color: var(--fo-muted);
  font-size: 12px;
}

.factory-orders-v26 .factory-result-line button {
  min-height: 28px;
  padding: 4px 8px;
  border: 0;
  background: transparent;
  color: var(--fo-primary);
}

.factory-orders-v26 .factory-list-head,
.factory-orders-v26 .factory-order-summary {
  min-width: 1000px;
  display: grid;
  grid-template-columns:
    36px minmax(180px, 1fr) minmax(100px, 0.55fr) 64px
    minmax(315px, 1.55fr) 90px 145px;
  gap: 12px;
  align-items: center;
}

.factory-orders-v26 .factory-list-head {
  min-height: 40px;
  padding: 8px 16px;
  border-bottom: 1px solid var(--fo-border);
  background: var(--fo-panel-soft);
  color: var(--fo-muted);
  font-size: 11px;
  font-weight: 650;
}

.factory-orders-v26 .factory-order-list {
  position: relative;
  min-height: 180px;
}

.factory-orders-v26 .factory-order-list.is-loading::after {
  content: "正在读取最新订单…";
  position: absolute;
  inset: 0;
  z-index: 15;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--fo-panel) 82%, transparent);
  color: var(--fo-primary);
  font-size: 13px;
  font-weight: 700;
  backdrop-filter: blur(1px);
}

.factory-orders-v26 .factory-order-card {
  position: relative;
  border-bottom: 1px solid var(--fo-border);
  background: var(--fo-panel);
}

.factory-orders-v26 .factory-order-card:last-child {
  border-bottom: 0;
}

.factory-orders-v26 .factory-order-card:hover {
  background: color-mix(in srgb, var(--fo-primary-soft) 28%, var(--fo-panel));
}

.factory-orders-v26 .factory-order-card.open {
  background: var(--fo-panel);
  box-shadow: inset 3px 0 var(--fo-primary);
}

.factory-orders-v26 .factory-order-summary {
  position: relative;
  min-height: 82px;
  padding: 12px 16px;
  cursor: pointer;
}

.factory-orders-v26 .factory-row-toggle {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  cursor: pointer;
}

.factory-orders-v26 .factory-order-summary > span {
  position: relative;
  z-index: 2;
  min-width: 0;
}

.factory-orders-v26 .factory-checkbox-cell {
  display: grid;
  place-items: center;
}

.factory-orders-v26 input[type="checkbox"] {
  width: 15px;
  height: 15px;
  margin: 0;
  accent-color: var(--fo-primary);
}

.factory-orders-v26 .factory-order-main,
.factory-orders-v26 .factory-customer-cell,
.factory-orders-v26 .factory-time-cell {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.factory-orders-v26 .factory-tracking-line,
.factory-orders-v26 .factory-order-number-line {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.factory-orders-v26 .factory-tracking-number {
  overflow: hidden;
  color: var(--fo-text);
  font-size: 13px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.factory-orders-v26 .factory-copy-button {
  min-height: 22px;
  padding: 2px 6px;
  border: 0;
  border-radius: 4px;
  background: var(--fo-primary-soft);
  color: var(--fo-primary);
  font-size: 10px;
  font-weight: 650;
  box-shadow: none;
}

.factory-orders-v26 .factory-order-subline {
  display: block;
  overflow: hidden;
  color: var(--fo-text);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.factory-orders-v26 .factory-order-number-line,
.factory-orders-v26 .factory-order-meta,
.factory-orders-v26 .factory-customer-cell small,
.factory-orders-v26 .factory-time-cell small {
  color: var(--fo-muted);
  font-size: 10px;
}

.factory-orders-v26 .factory-order-number-line > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.factory-orders-v26 .factory-customer-cell strong {
  overflow: hidden;
  color: var(--fo-text);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.factory-orders-v26 .factory-sheet-cell {
  display: flex;
  justify-content: flex-start;
}

.factory-orders-v26 .factory-sheet-badge {
  min-height: 25px;
  padding: 4px 8px;
  border: 1px solid #e2c46a;
  border-radius: 999px;
  background: #fff9e7;
  color: #9a6b00;
  font-size: 10px;
  font-weight: 700;
  box-shadow: none;
}

html[data-theme="dark"] .factory-orders-v26 .factory-sheet-badge {
  border-color: rgba(251, 191, 36, 0.28);
  background: rgba(251, 191, 36, 0.1);
  color: #f8c95d;
}

.factory-orders-v26 .factory-sheet-badge.has {
  border-color: color-mix(in srgb, var(--fo-primary) 34%, var(--fo-border));
  background: var(--fo-primary-soft);
  color: var(--fo-primary);
}

.factory-orders-v26 .factory-process-cell {
  display: block;
  min-width: 0;
}

.factory-orders-v26 .factory-steps {
  display: grid;
  grid-template-columns: repeat(6, minmax(48px, 1fr));
  align-items: start;
}

.factory-orders-v26 .factory-step {
  position: relative;
  min-width: 0;
  display: grid;
  justify-items: center;
  gap: 3px;
  color: var(--fo-subtle);
  text-align: center;
}

.factory-orders-v26 .factory-step::after {
  content: "";
  position: absolute;
  top: 8px;
  left: calc(50% + 9px);
  z-index: 0;
  width: calc(100% - 18px);
  height: 2px;
  background: var(--fo-border-strong);
}

.factory-orders-v26 .factory-step:last-child::after {
  display: none;
}

.factory-orders-v26 .factory-step-dot {
  position: relative;
  z-index: 1;
  width: 17px;
  height: 17px;
  display: grid;
  place-items: center;
  border: 2px solid var(--fo-border-strong);
  border-radius: 50%;
  background: var(--fo-panel);
}

.factory-orders-v26 .factory-step.done {
  color: var(--fo-progress-done);
}

.factory-orders-v26 .factory-step.done::after {
  background: var(--fo-progress-done);
}

.factory-orders-v26 .factory-step.done .factory-step-dot {
  border-color: var(--fo-progress-done);
  background: var(--fo-progress-done);
  color: #ffffff;
}

.factory-orders-v26 .factory-step.done .factory-step-dot::before {
  content: "✓";
  font-size: 9px;
  font-weight: 900;
}

.factory-orders-v26 .factory-step.current {
  color: var(--fo-progress-current);
}

.factory-orders-v26 .factory-step.current .factory-step-dot {
  border-color: var(--fo-progress-current);
  background: var(--fo-progress-current-soft);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--fo-progress-current) 13%, transparent);
}

.factory-orders-v26 .factory-step-label {
  overflow: hidden;
  max-width: 100%;
  font-size: 9px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.factory-orders-v26 .factory-step-time {
  min-height: 28px;
  display: grid;
  align-content: start;
  justify-items: center;
  gap: 1px;
  color: currentColor;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  line-height: 1.12;
  white-space: normal;
}

.factory-orders-v26 .factory-step-date {
  font-size: 10px;
  font-weight: 650;
}

.factory-orders-v26 .factory-step-clock {
  font-size: 11px;
  font-weight: 750;
}

.factory-orders-v26 .factory-time-cell {
  color: var(--fo-text);
  font-size: 11px;
  line-height: 1.4;
}

.factory-orders-v26 .factory-operation-cell {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
}

.factory-orders-v26 .factory-inline-button,
.factory-orders-v26 .factory-expand-button,
.factory-orders-v26 .factory-detail-action {
  min-height: 30px;
  padding: 6px 7px;
  border: 1px solid var(--fo-border-strong);
  border-radius: 6px;
  background: var(--fo-panel);
  color: var(--fo-text);
  font-size: 10px;
  font-weight: 650;
  box-shadow: none;
  white-space: nowrap;
}

.factory-orders-v26 .factory-inline-button {
  border-color: var(--fo-primary);
  background: var(--fo-primary);
  color: #fff;
}

.factory-orders-v26 .factory-order-details {
  display: none;
  padding: 0 16px 16px 56px;
}

.factory-orders-v26 .factory-order-card.open .factory-order-details {
  display: block;
}

.factory-orders-v26 .factory-detail-layout {
  display: grid;
  grid-template-columns: minmax(330px, 1.15fr) minmax(210px, 0.68fr) minmax(330px, 1.17fr);
  border: 1px solid var(--fo-border);
  border-radius: 8px;
  background: var(--fo-panel-soft);
}

.factory-orders-v26 .factory-detail-panel {
  min-width: 0;
  padding: 15px;
  border: 0;
  border-right: 1px solid var(--fo-border);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.factory-orders-v26 .factory-detail-panel:last-child {
  border-right: 0;
}

.factory-orders-v26 .factory-detail-panel-head {
  min-height: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.factory-orders-v26 .factory-detail-panel-head > strong {
  color: var(--fo-text);
  font-size: 12px;
}

.factory-orders-v26 .factory-info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px 16px;
}

.factory-orders-v26 .factory-info-item {
  min-width: 0;
}

.factory-orders-v26 .factory-info-item.full {
  grid-column: 1 / -1;
}

.factory-orders-v26 .factory-info-item span,
.factory-orders-v26 .factory-logistics-meta span {
  display: block;
  margin-bottom: 4px;
  color: var(--fo-subtle);
  font-size: 9px;
}

.factory-orders-v26 .factory-info-item strong,
.factory-orders-v26 .factory-logistics-meta strong {
  display: block;
  color: var(--fo-text);
  font-size: 11px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.factory-orders-v26 .factory-sheet-state {
  color: var(--fo-muted);
  font-size: 10px;
}

.factory-orders-v26 .factory-sheet-state.ready {
  color: var(--fo-primary);
}

.factory-orders-v26 .factory-order-image-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  margin: 0;
}

.factory-orders-v26 .order-image-thumb {
  position: relative;
  min-width: 0;
  overflow: hidden;
  padding: 0;
  border: 1px solid var(--fo-border);
  border-radius: 6px;
  background: var(--fo-panel);
  box-shadow: none;
  cursor: zoom-in;
}

.factory-orders-v26 .order-image-thumb img {
  width: 100%;
  aspect-ratio: 1 / 1;
  display: block;
  object-fit: cover;
}

.factory-orders-v26 .order-image-thumb span {
  display: block;
  padding: 5px;
  overflow: hidden;
  color: var(--fo-muted);
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.factory-orders-v26 .factory-sheet-empty,
.factory-orders-v26 .factory-logistics-empty {
  min-height: 98px;
  display: grid;
  place-items: center;
  padding: 14px;
  border: 1px dashed var(--fo-border-strong);
  border-radius: 7px;
  color: var(--fo-muted);
  font-size: 10px;
  text-align: center;
}

.factory-orders-v26 .factory-logistics-meta {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr 0.9fr;
  gap: 10px;
}

.factory-orders-v26 .factory-logistics-state {
  flex: 0 0 auto;
  padding: 4px 7px;
  border-radius: 999px;
  background: var(--fo-panel);
  color: var(--fo-muted);
  font-size: 9px;
}

.factory-orders-v26 .factory-logistics-state.moving {
  background: var(--fo-blue-soft);
  color: var(--fo-blue);
}

.factory-orders-v26 .factory-logistics-state.delivered {
  background: var(--fo-primary-soft);
  color: var(--fo-primary);
}

.factory-orders-v26 .factory-logistics-events {
  max-height: 150px;
  overflow: hidden;
  display: grid;
  gap: 0;
  margin-top: 10px;
}

.factory-orders-v26 .factory-logistics-event {
  display: grid;
  grid-template-columns: 78px 1fr;
  gap: 9px;
  padding: 7px 0;
  border-top: 1px solid var(--fo-border);
}

.factory-orders-v26 .factory-logistics-event time {
  color: var(--fo-subtle);
  font-size: 9px;
}

.factory-orders-v26 .factory-logistics-event strong {
  color: var(--fo-muted);
  font-size: 10px;
  font-weight: 500;
  line-height: 1.45;
}

.factory-orders-v26 .factory-logistics-event.current strong {
  color: var(--fo-text);
}

.factory-orders-v26 .factory-logistics-footer {
  display: flex;
  justify-content: flex-end;
  gap: 7px;
  margin-top: 10px;
}

.factory-orders-v26 .factory-order-empty {
  min-height: 260px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 36px;
  color: var(--fo-muted);
  text-align: center;
  font-size: 12px;
}

.factory-orders-v26 .factory-order-empty strong {
  color: var(--fo-text);
  font-size: 14px;
}

.factory-orders-v26 .factory-empty-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  margin-bottom: 3px;
  border-radius: 50%;
  background: var(--fo-primary-soft);
  color: var(--fo-primary);
  font-size: 24px;
}

.factory-orders-v26 .factory-batch-bar {
  min-height: 50px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-top: 1px solid var(--fo-border);
  background: var(--fo-primary-soft);
  color: var(--fo-text);
  font-size: 12px;
}

.factory-orders-v26 .factory-batch-bar[hidden] {
  display: none;
}

.factory-orders-v26 .factory-batch-bar #factoryBatchText {
  margin-right: auto;
  font-weight: 700;
}

.factory-orders-v26 .factory-pagination {
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 16px;
  border-top: 1px solid var(--fo-border);
}

.factory-orders-v26 .factory-pagination[hidden] {
  display: none;
}

.factory-orders-v26 .factory-pagination .page-info {
  color: var(--fo-muted);
  font-size: 11px;
}

.factory-orders-v26 .factory-page-controls select,
.factory-orders-v26 .factory-page-controls input {
  width: auto;
  min-width: 68px;
  height: 34px;
  min-height: 34px;
  padding: 6px 8px;
  border: 1px solid var(--fo-border-strong);
  border-radius: 6px;
  background: var(--fo-panel);
  color: var(--fo-text);
  font-size: 11px;
}

.factory-orders-v26 .factory-page-controls input {
  width: 64px;
}

.factory-drawer-backdrop,
.factory-dialog-mask {
  position: fixed;
  inset: 0;
  z-index: 260;
  visibility: hidden;
  background: rgba(15, 23, 42, 0.42);
  opacity: 0;
  transition: opacity 0.18s ease, visibility 0.18s ease;
}

.factory-drawer-backdrop.show,
.factory-dialog-mask.show {
  visibility: visible;
  opacity: 1;
}

.factory-utility-drawer {
  position: fixed;
  inset: 0 0 0 auto;
  z-index: 270;
  width: min(760px, 92vw);
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--fo-border, #e3e8ef);
  background: var(--fo-panel, #ffffff);
  color: var(--fo-text, #172033);
  box-shadow: -18px 0 50px rgba(15, 23, 42, 0.2);
  transform: translateX(102%);
  transition: transform 0.22s ease;
}

html[data-theme="dark"] .factory-utility-drawer {
  --fo-panel: #0d192a;
  --fo-text: #e5edf5;
  --fo-muted: #8fa0b4;
  --fo-border: #22344b;
  background: var(--fo-panel);
}

.factory-utility-drawer.show {
  transform: translateX(0);
}

.factory-drawer-head,
.factory-dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--fo-border, #e3e8ef);
}

.factory-drawer-head small,
.factory-dialog-head small {
  display: block;
  color: var(--fo-muted, #697386);
  font-size: 10px;
}

.factory-drawer-head h3,
.factory-dialog-head h3 {
  margin: 4px 0 0;
  color: var(--fo-text, #172033);
  font-size: 16px;
}

.factory-drawer-head > button,
.factory-dialog-head > button {
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid var(--fo-border, #e3e8ef);
  border-radius: 7px;
  background: transparent;
  color: var(--fo-text, #172033);
  font-size: 20px;
}

.factory-drawer-body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 18px;
}

.factory-drawer-body.factory-drawer-iframe-wrap {
  padding: 0;
  overflow: hidden;
}

.factory-drawer-body iframe {
  width: 100%;
  height: 100%;
  border: 0;
  background: #ffffff;
}

.factory-full-track {
  position: relative;
  display: grid;
  grid-template-columns: 120px 16px 1fr;
  gap: 10px;
  padding: 0 0 22px;
}

.factory-full-track time {
  color: var(--fo-muted, #697386);
  font-size: 11px;
}

.factory-full-track-marker {
  position: relative;
  width: 10px;
  height: 10px;
  margin-top: 3px;
  border: 2px solid var(--fo-primary, #1677ff);
  border-radius: 50%;
  background: var(--fo-panel, #ffffff);
}

.factory-full-track-marker::after {
  content: "";
  position: absolute;
  top: 10px;
  left: 2px;
  width: 2px;
  height: 28px;
  background: var(--fo-border, #e3e8ef);
}

.factory-full-track:last-child .factory-full-track-marker::after {
  display: none;
}

.factory-full-track p {
  margin: 0;
  color: var(--fo-text, #172033);
  font-size: 12px;
  line-height: 1.55;
}

.factory-lightbox {
  position: fixed;
  inset: 0;
  z-index: 300;
  visibility: hidden;
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) 54px;
  align-items: center;
  gap: 14px;
  padding: 54px 28px 28px;
  background: rgba(3, 8, 18, 0.92);
  opacity: 0;
  transition: opacity 0.18s ease, visibility 0.18s ease;
}

.factory-lightbox.show {
  visibility: visible;
  opacity: 1;
}

.factory-lightbox figure {
  grid-column: 2;
  grid-row: 1;
  width: 100%;
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 10px;
  margin: 0;
}

.factory-lightbox img {
  max-width: 100%;
  max-height: 100%;
  place-self: center;
  object-fit: contain;
}

.factory-lightbox figcaption {
  color: #cbd5e1;
  font-size: 12px;
  text-align: center;
}

.factory-lightbox button {
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  font-size: 30px;
}

.factory-lightbox-close {
  position: absolute;
  top: 16px;
  right: 18px;
}

.factory-lightbox-prev {
  grid-column: 1;
  grid-row: 1;
}

.factory-lightbox-next {
  grid-column: 3;
  grid-row: 1;
}

.factory-dialog-mask {
  display: grid;
  place-items: center;
}

.factory-dialog {
  width: min(500px, 92vw);
  border: 1px solid #e3e8ef;
  border-radius: 10px;
  background: #ffffff;
  color: #172033;
  box-shadow: 0 22px 70px rgba(15, 23, 42, 0.24);
}

html[data-theme="dark"] .factory-dialog {
  border-color: #22344b;
  background: #0d192a;
  color: #e5edf5;
}

.factory-dialog > p {
  margin: 0;
  padding: 16px 18px 5px;
  color: #697386;
  font-size: 12px;
  line-height: 1.65;
}

.factory-dialog-field {
  display: grid;
  gap: 7px;
  padding: 12px 18px;
  color: inherit;
  font-size: 11px;
}

.factory-dialog-field input {
  width: 100%;
  border-color: #d4dce6;
  background: transparent;
  color: inherit;
}

.factory-cleanup-estimate {
  margin: 0 18px;
  padding: 10px 12px;
  border-radius: 7px;
  background: #f8fafc;
  color: #697386;
  font-size: 11px;
}

html[data-theme="dark"] .factory-cleanup-estimate {
  background: #0a1525;
  color: #8fa0b4;
}

.factory-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 16px 18px 18px;
}

.factory-dialog-actions button {
  min-height: 36px;
  padding: 7px 12px;
  border: 1px solid #d4dce6;
  border-radius: 7px;
  background: transparent;
  color: inherit;
  font-size: 12px;
}

.factory-dialog-actions .factory-button.danger {
  border-color: rgba(227, 73, 85, 0.36);
  background: #fff0f1;
  color: #d93745;
}

html[data-theme="dark"] .factory-dialog-actions button {
  border-color: #2b405b;
}

html[data-theme="dark"] .factory-dialog-actions .factory-button.danger {
  border-color: rgba(255, 117, 130, 0.3);
  background: rgba(255, 117, 130, 0.12);
  color: #ff8d98;
}

.factory-date-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 14px;
}

.factory-date-presets button {
  min-height: 32px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  font-size: 11px;
}

@media (max-width: 1260px) {
  .factory-orders-v26 .factory-orders-panel {
    overflow-x: auto;
  }

  .factory-orders-v26 .factory-page-heading {
    min-width: 1000px;
  }
}

/* Light theme: preserve the original card layout; blue sidebar only */
html[data-theme="light"] .app-sidebar {
  border-right-color: #2f9cf4;
  background: #2f9cf4;
  box-shadow: 6px 0 24px rgba(22, 119, 255, 0.16);
}

html[data-theme="light"] .brand-mark {
  background: #ffffff;
  color: #1687e0;
  box-shadow: none;
}

html[data-theme="light"] .sidebar-brand strong {
  color: #ffffff;
}

html[data-theme="light"] .sidebar-brand small,
html[data-theme="light"] .sidebar-label {
  color: rgba(255, 255, 255, 0.66);
}

html[data-theme="light"] .sidebar-collapse-button,
html[data-theme="light"] .sidebar-open-button {
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

html[data-theme="light"] .sidebar-collapse-button:hover,
html[data-theme="light"] .sidebar-open-button:hover {
  border-color: rgba(255, 255, 255, 0.38);
  background: rgba(255, 255, 255, 0.22);
  color: #ffffff;
}

html[data-theme="light"] .nav-item {
  color: rgba(255, 255, 255, 0.9);
}

html[data-theme="light"] .nav-item:hover {
  border-color: transparent;
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

html[data-theme="light"] .nav-item.active {
  border-color: transparent;
  background: rgba(255, 255, 255, 0.24);
  color: #ffffff;
  box-shadow: inset 3px 0 #ffffff;
}

html[data-theme="light"] .nav-icon,
html[data-theme="light"] .nav-item.active .nav-icon {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

html[data-theme="light"] .nav-badge.planned {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
}

html[data-theme="light"] .sidebar-foot {
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.08);
}

html[data-theme="light"] .sidebar-account {
  border-bottom-color: rgba(255, 255, 255, 0.2);
}

html[data-theme="light"] .sidebar-account-avatar {
  background: #ffffff;
  color: #1687e0;
}

html[data-theme="light"] .sidebar-account-copy strong {
  color: #ffffff;
}

html[data-theme="light"] .sidebar-account-copy #status,
html[data-theme="light"] .sidebar-health {
  color: rgba(255, 255, 255, 0.7);
}

html[data-theme="light"] .sidebar-account-actions .header-logout,
html[data-theme="light"] .sidebar-account-actions .sidebar-install-button,
html[data-theme="light"] .sidebar-account-actions .settings-btn {
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

html[data-theme="light"] .sidebar-account-actions .header-logout:hover,
html[data-theme="light"] .sidebar-account-actions .sidebar-install-button:hover,
html[data-theme="light"] .sidebar-account-actions .settings-btn:hover {
  border-color: rgba(255, 255, 255, 0.38);
  background: rgba(255, 255, 255, 0.22);
  color: #ffffff;
}

html[data-theme="light"] .sidebar-theme-toggle {
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

html[data-theme="light"] .sidebar-theme-toggle:hover {
  border-color: rgba(255, 255, 255, 0.38);
  background: rgba(255, 255, 255, 0.22);
}

html[data-theme="light"] .sidebar-theme-icon {
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
}

html[data-theme="light"] .sidebar-theme-copy strong {
  color: #ffffff;
}

html[data-theme="light"] .sidebar-theme-copy small {
  color: rgba(255, 255, 255, 0.66);
}

html[data-theme="light"] .sidebar-health {
  border-top-color: rgba(255, 255, 255, 0.18);
}

@media (min-width: 901px) {
  html[data-theme="light"] body.sidebar-collapsed .nav-item.active {
    box-shadow: inset 2px 0 #ffffff;
  }

  html[data-theme="light"] body.sidebar-collapsed .sidebar-account {
    border-top-color: rgba(255, 255, 255, 0.22);
  }
}

/* Ant Design Pro inspired order search */
.factory-orders-v26 .factory-search-row {
  display: grid;
  grid-template-columns:
    minmax(140px, 1fr) minmax(360px, 480px) auto
    minmax(140px, 1fr);
  align-items: center;
  gap: 10px;
}

.factory-orders-v26 .factory-search-box {
  grid-column: 2;
  width: 480px;
  max-width: 100%;
  flex: none;
}

.factory-orders-v26 .factory-search-icon {
  display: none;
}

.factory-orders-v26 #orderSearch {
  max-width: none;
  padding: 12px 76px 12px 12px;
  border-color: #1677ff;
  border-radius: 7px;
  box-shadow: 0 0 0 1px rgba(22, 119, 255, 0.1);
}

.factory-orders-v26 .factory-search-submit {
  width: 64px;
  padding: 0;
  border-color: #1677ff;
  border-radius: 0 7px 7px 0;
  background: #1677ff;
  white-space: nowrap;
}

.factory-orders-v26 .factory-search-submit:hover {
  border-color: #0958d9;
  background: #0958d9;
}

.factory-orders-v26 .factory-search-row > #orderFilterClearButton {
  grid-column: 3;
  min-height: 48px;
}

.factory-orders-v26 .factory-search-row > .factory-action-group {
  grid-column: 4;
  justify-self: end;
  margin-left: 0;
}

#localReviewNotice {
  border-color: rgba(22, 119, 255, 0.32) !important;
  background: rgba(22, 119, 255, 0.07) !important;
}

#localReviewNotice strong {
  color: #1677ff !important;
}

html[data-theme="light"] .online-dot {
  background: #1677ff;
  box-shadow: 0 0 0 4px rgba(22, 119, 255, 0.14);
}

/* Order list readability */
.factory-orders-v26 .factory-list-head,
.factory-orders-v26 .factory-order-summary {
  min-width: 1080px;
  grid-template-columns:
    38px minmax(190px, 1fr) minmax(110px, 0.55fr) 68px
    minmax(335px, 1.55fr) 100px 168px;
}

.factory-orders-v26 .factory-list-head {
  min-height: 44px;
  font-size: 12px;
}

.factory-orders-v26 .factory-order-summary {
  min-height: 100px;
  padding-top: 14px;
  padding-bottom: 14px;
}

.factory-orders-v26 input[type="checkbox"] {
  width: 17px;
  height: 17px;
}

.factory-orders-v26 .factory-tracking-number {
  font-size: 14px;
}

.factory-orders-v26 .factory-order-subline,
.factory-orders-v26 .factory-customer-cell strong {
  font-size: 13px;
}

.factory-orders-v26 .factory-order-number-line,
.factory-orders-v26 .factory-order-meta,
.factory-orders-v26 .factory-customer-cell small,
.factory-orders-v26 .factory-time-cell small {
  font-size: 11px;
}

.factory-orders-v26 .factory-copy-button,
.factory-orders-v26 .factory-sheet-badge {
  font-size: 11px;
}

.factory-orders-v26 .factory-copy-button {
  padding-right: 3px;
  padding-left: 3px;
  background: transparent;
  color: var(--fo-muted);
  font-size: 10px;
  font-weight: 500;
}

.factory-orders-v26 .factory-copy-button:hover {
  background: var(--fo-panel-soft);
  color: var(--fo-text);
}

.factory-orders-v26 .factory-steps {
  width: 100%;
  max-width: 360px;
  margin: 0 auto;
}

.factory-orders-v26 .factory-list-head > span:nth-child(5) {
  text-align: center;
}

.factory-orders-v26 .factory-process-cell {
  display: flex;
  align-items: center;
  justify-content: center;
}

.factory-orders-v26 .factory-step::after {
  top: 9px;
  left: calc(50% + 14px);
  width: calc(100% - 28px);
}

.factory-orders-v26 .factory-step-dot {
  width: 19px;
  height: 19px;
}

.factory-orders-v26 .factory-step-label {
  font-size: 10px;
}

.factory-orders-v26 .factory-step-time {
  font-size: 10px;
}

.factory-orders-v26 .factory-time-cell {
  font-size: 12px;
}

.factory-orders-v26 .factory-inline-button,
.factory-orders-v26 .factory-expand-button,
.factory-orders-v26 .factory-detail-action {
  min-height: 32px;
  padding: 6px 8px;
  font-size: 11px;
}

/*
 * 工厂工作台侧栏与客户工作台统一。
 * 仅覆盖外壳尺寸、配色和账号区排布，不改变菜单、权限或页面内容。
 */
html:root {
  --sidebar-width: 224px;
}

html body .app-sidebar {
  width: var(--sidebar-width);
  padding: 18px 14px;
  border-right-color: #203049;
  background: linear-gradient(180deg, #081625 0%, #07111e 100%);
}

html body .sidebar-brand {
  padding-right: 44px;
}

html body .brand-mark {
  overflow: hidden;
  background: transparent;
  box-shadow: none;
}

html body .brand-mark img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

html body .nav-item.active {
  border-color: rgba(33, 197, 232, 0.28);
  background: rgba(33, 197, 232, 0.11);
  color: #76e5f4;
  box-shadow: inset 3px 0 #21c5e8;
}

html body .nav-item.active .nav-icon {
  background: rgba(33, 197, 232, 0.16);
  color: #52ddf6;
}

html body .sidebar-collapse-button,
html body .app-sidebar .sidebar-theme-toggle {
  position: absolute;
  top: 21px;
  z-index: 2;
  width: 32px;
  min-width: 32px;
  height: 32px;
  min-height: 32px;
  margin: 0;
  padding: 0;
  border: 1px solid #2a3c55;
  border-radius: 8px;
  background: #101b2d;
  color: #cbd5e1;
  box-shadow: none;
}

html body .sidebar-collapse-button {
  top: 61px;
  right: 16px;
  width: 24px;
  min-width: 24px;
}

html body .app-sidebar .sidebar-theme-toggle {
  top: 21px;
  right: 16px;
  display: grid;
  place-items: center;
  text-align: center;
}

html body .sidebar-collapse-button:hover,
html body .app-sidebar .sidebar-theme-toggle:hover {
  border-color: #3a526f;
  background: #142238;
  color: #f1f5f9;
}

html body .sidebar-theme-copy {
  display: none;
}

html body .sidebar-theme-icon {
  position: relative;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: #17263b;
  color: #bfdbfe;
}

html body .sidebar-theme-icon i {
  position: absolute;
  font-style: normal;
  line-height: 1;
  transition:
    opacity 0.18s ease,
    transform 0.18s ease;
}

html body .sidebar-theme-icon .theme-icon-moon {
  color: #bfdbfe;
  opacity: 1;
  transform: scale(1);
}

html body .sidebar-theme-icon .theme-icon-sun {
  color: #facc15;
  opacity: 0;
  transform: scale(0.65) rotate(-35deg);
}

html[data-theme="light"] body .sidebar-theme-icon .theme-icon-moon {
  opacity: 0;
  transform: scale(0.65) rotate(35deg);
}

html[data-theme="light"] body .sidebar-theme-icon .theme-icon-sun {
  opacity: 1;
  transform: scale(1) rotate(0);
}

html body .sidebar-foot {
  padding: 12px;
  border-color: #1c2b40;
  border-radius: 12px;
  background: #0d192a;
}

html body .sidebar-account {
  gap: 0;
  padding-bottom: 11px;
  border-bottom-color: #203049;
}

html body .sidebar-account-head {
  gap: 9px;
}

html body .sidebar-account-avatar {
  width: 24px;
  height: 24px;
  flex-basis: 24px;
  border-radius: 7px;
  background: rgba(14, 165, 233, 0.14);
  color: #7dd3fc;
}

html body .sidebar-account-copy strong {
  color: #e2e8f0;
  font-size: 12px;
}

html body .sidebar-account-copy #status {
  max-width: 132px;
  color: #71829a;
  font-size: 10px;
}

html body .sidebar-account-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 7px;
  margin-top: 11px;
}

html body .sidebar-account-actions .sidebar-install-button {
  grid-column: 1 / -1;
}

html body .sidebar-account-actions .sidebar-install-button,
html body .sidebar-account-actions .header-logout,
html body .sidebar-account-actions .settings-btn {
  width: 100%;
  min-height: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 7px 8px;
  border: 1px solid #2a3c55;
  border-radius: 8px;
  background: #101b2d;
  color: #cbd5e1;
  font-size: 11px;
  font-weight: 700;
}

html body .sidebar-account-actions #sidebarSettingsSlot,
html body .sidebar-account-actions .settings-wrap {
  width: 100%;
  min-width: 0;
}

html body .sidebar-account-actions .sidebar-install-button:hover,
html body .sidebar-account-actions .header-logout:hover,
html body .sidebar-account-actions .settings-btn:hover {
  border-color: #3a526f;
  background: #142238;
  color: #f1f5f9;
}

html body .sidebar-health {
  padding-top: 10px;
  color: #cbd5e1;
}

html body .sidebar-health small {
  display: none;
}

html[data-theme="light"] body .app-sidebar {
  border-right-color: rgba(255, 255, 255, 0.18);
  background: linear-gradient(180deg, #1769d2 0%, #0f4fa7 58%, #0b3d82 100%);
  box-shadow: 12px 0 32px rgba(19, 70, 140, 0.14);
}

html[data-theme="light"] body .sidebar-brand strong,
html[data-theme="light"] body .sidebar-account-copy strong,
html[data-theme="light"] body .sidebar-health {
  color: #ffffff;
}

html[data-theme="light"] body .sidebar-brand small,
html[data-theme="light"] body .sidebar-label,
html[data-theme="light"] body .sidebar-account-copy #status {
  color: rgba(229, 241, 255, 0.7);
}

html[data-theme="light"] body .brand-mark {
  background: transparent;
  box-shadow: none;
}

html[data-theme="light"] body .nav-item {
  color: rgba(239, 247, 255, 0.82);
}

html[data-theme="light"] body .nav-item:hover {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

html[data-theme="light"] body .nav-item.active {
  border-color: rgba(255, 255, 255, 0.34);
  background: #ffffff;
  color: #1459b8;
  box-shadow: 0 8px 22px rgba(5, 44, 101, 0.2);
}

html[data-theme="light"] body .nav-icon {
  background: rgba(255, 255, 255, 0.13);
  color: #e5f2ff;
}

html[data-theme="light"] body .nav-item.active .nav-icon {
  background: #e8f2ff;
  color: #1677ff;
}

html[data-theme="light"] body .nav-badge.planned {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.13);
  color: #ffffff;
}

html[data-theme="light"] body .sidebar-foot {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(3, 39, 91, 0.28);
}

html[data-theme="light"] body .sidebar-account {
  border-bottom-color: rgba(255, 255, 255, 0.18);
}

html[data-theme="light"] body .sidebar-account-avatar {
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
}

html[data-theme="light"] body .sidebar-collapse-button,
html[data-theme="light"] body .app-sidebar .sidebar-theme-toggle,
html[data-theme="light"] body .sidebar-account-actions .sidebar-install-button,
html[data-theme="light"] body .sidebar-account-actions .header-logout,
html[data-theme="light"] body .sidebar-account-actions .settings-btn {
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

html[data-theme="light"] body .sidebar-collapse-button:hover,
html[data-theme="light"] body .app-sidebar .sidebar-theme-toggle:hover,
html[data-theme="light"] body .sidebar-account-actions .sidebar-install-button:hover,
html[data-theme="light"] body .sidebar-account-actions .header-logout:hover,
html[data-theme="light"] body .sidebar-account-actions .settings-btn:hover {
  border-color: rgba(255, 255, 255, 0.38);
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
}

html[data-theme="light"] body .sidebar-theme-icon {
  background: rgba(255, 255, 255, 0.14);
  color: #facc15;
}

html[data-theme="light"] body .sidebar-theme-icon::before {
  content: none;
}

@media (min-width: 901px) {
  html body.sidebar-collapsed .sidebar-brand {
    padding-right: 0;
  }

  html body.sidebar-collapsed .sidebar-collapse-button,
  html body.sidebar-collapsed .app-sidebar .sidebar-theme-toggle {
    position: static;
  }

  html body.sidebar-collapsed .sidebar-collapse-button {
    margin: 0;
  }

  html body.sidebar-collapsed .app-sidebar .sidebar-theme-toggle {
    width: 100%;
    margin: 0;
  }
}
