html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

.ui-mobile-theme-button {
  display: inline-flex;
  min-width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  padding: 0 9px;
  color: inherit;
  background: rgba(255, 255, 255, .16);
  border: 1px solid rgba(255, 255, 255, .3);
  border-radius: 17px;
  font-size: 12px;
}

.ui-mobile-theme-sheet {
  position: fixed;
  z-index: 3000;
  inset: 0;
  display: none;
  align-items: flex-end;
  background: rgba(17, 29, 48, .42);
}

.ui-mobile-theme-sheet.is-open {
  display: flex;
}

.ui-mobile-theme-panel {
  width: 100%;
  padding: 18px 16px calc(18px + env(safe-area-inset-bottom));
  background: #ffffff;
  border-radius: 18px 18px 0 0;
  box-sizing: border-box;
}

.ui-mobile-theme-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  color: #172033;
  font-size: 17px;
  font-weight: 600;
}

.ui-mobile-theme-close {
  width: 36px;
  height: 36px;
  color: #718096;
  background: #f3f6fa;
  border: 0;
  border-radius: 18px;
}

.ui-mobile-theme-option {
  display: flex;
  min-height: 60px;
  align-items: center;
  margin-top: 10px;
  padding: 0 14px;
  color: #2b3b52;
  background: #f7f9fc;
  border: 1px solid #e5eaf2;
  border-radius: 12px;
  box-sizing: border-box;
}

.ui-mobile-theme-option.is-selected {
  color: #2468e5;
  background: #edf4ff;
  border-color: #7aa8ff;
}

.ui-mobile-theme-option strong {
  display: block;
  font-size: 15px;
  font-weight: 600;
}

.ui-mobile-theme-option small {
  display: block;
  margin-top: 3px;
  color: #8895a8;
  font-size: 11px;
}

.ui-mobile-theme-swatch {
  width: 34px;
  height: 34px;
  margin-right: 12px;
  background: #ffffff;
  border: 7px solid #f1f3f6;
  border-radius: 10px;
  box-sizing: border-box;
}

.ui-mobile-theme-option[data-ui-theme-option="command"] .ui-mobile-theme-swatch {
  background: #3378f6;
  border-color: #eaf2ff;
}

.ui-mobile-theme-option[data-ui-theme-option="workspace"] .ui-mobile-theme-swatch {
  background: #13a88d;
  border-color: #eef5ff;
}

html[data-ui-theme="command"],
html[data-ui-theme="workspace"] {
  --mobile-primary: #3378f6;
  --mobile-primary-dark: #2868df;
  --mobile-primary-soft: #edf4ff;
  --mobile-page: #f5f7fb;
  --mobile-surface: #ffffff;
  --mobile-text: #172033;
  --mobile-muted: #718096;
  --mobile-border: #e4eaf2;
  background: var(--mobile-page);
}

html[data-ui-theme="workspace"] {
  --mobile-primary: #246fe5;
  --mobile-primary-dark: #1c5ec7;
  --mobile-primary-soft: #eef4ff;
}

html[data-ui-theme="command"] body,
html[data-ui-theme="workspace"] body {
  min-height: 100%;
  color: var(--mobile-text);
  background: var(--mobile-page) !important;
}

html[data-ui-theme="command"] .header-bar,
html[data-ui-theme="workspace"] .header-bar {
  display: flex !important;
  height: 54px;
  width: 100%;
  max-width: none;
  left: 0;
  right: 0;
  padding: 0 12px;
  background: var(--mobile-primary);
  border-radius: 0;
  box-shadow: 0 3px 14px rgba(38, 94, 190, .18);
  transform: none;
  box-sizing: border-box;
}

html[data-ui-theme="command"] .header-bar .back-button,
html[data-ui-theme="command"] .header-bar .ui-mobile-theme-button,
html[data-ui-theme="workspace"] .header-bar .back-button,
html[data-ui-theme="workspace"] .header-bar .ui-mobile-theme-button {
  width: 88px;
  white-space: nowrap;
}

html[data-ui-theme="workspace"] .header-bar {
  color: #203047;
  background: #ffffff;
  border-bottom: 1px solid var(--mobile-border);
  box-shadow: 0 3px 14px rgba(29, 62, 110, .06);
}

html[data-ui-theme="workspace"] .back-button,
html[data-ui-theme="workspace"] .header-title,
html[data-ui-theme="workspace"] .ui-mobile-theme-button {
  color: #255fae;
}

html[data-ui-theme="workspace"] .ui-mobile-theme-button {
  background: var(--mobile-primary-soft);
  border-color: #dbe7fb;
}

html[data-ui-theme="command"] .weui-content,
html[data-ui-theme="workspace"] .weui-content {
  margin-top: 54px;
}

html[data-ui-theme="command"] .weui-btn_primary,
html[data-ui-theme="workspace"] .weui-btn_primary,
html[data-ui-theme="command"] .lgbtn,
html[data-ui-theme="workspace"] .lgbtn,
html[data-ui-theme="command"] .apply_btn,
html[data-ui-theme="workspace"] .apply_btn,
html[data-ui-theme="command"] .recharge_btn,
html[data-ui-theme="workspace"] .recharge_btn {
  background: var(--mobile-primary) !important;
  border-radius: 10px;
  box-shadow: 0 8px 18px rgba(51, 120, 246, .18);
}

html[data-ui-theme="command"] .color-primary,
html[data-ui-theme="workspace"] .color-primary,
html[data-ui-theme="command"] a,
html[data-ui-theme="workspace"] a {
  color: var(--mobile-primary);
}

html[data-ui-theme="command"] .weui-cells,
html[data-ui-theme="workspace"] .weui-cells,
html[data-ui-theme="command"] .basics_tabs,
html[data-ui-theme="workspace"] .basics_tabs,
html[data-ui-theme="command"] .orderitem,
html[data-ui-theme="workspace"] .orderitem {
  overflow: hidden;
  background: var(--mobile-surface);
  border-color: var(--mobile-border);
  border-radius: 12px;
  box-shadow: 0 7px 22px rgba(29, 62, 110, .055);
}

html[data-ui-theme="command"] .basics_tabs,
html[data-ui-theme="workspace"] .basics_tabs,
html[data-ui-theme="command"] .orderitem,
html[data-ui-theme="workspace"] .orderitem {
  margin: 12px;
}

html[data-ui-theme="command"] .weui-cell:before,
html[data-ui-theme="workspace"] .weui-cell:before {
  border-color: var(--mobile-border);
}

html[data-ui-theme="command"] .weui-input,
html[data-ui-theme="command"] .weui-textarea,
html[data-ui-theme="workspace"] .weui-input,
html[data-ui-theme="workspace"] .weui-textarea {
  color: var(--mobile-text);
}

html[data-ui-theme="command"] .weui-input::placeholder,
html[data-ui-theme="command"] .weui-textarea::placeholder,
html[data-ui-theme="workspace"] .weui-input::placeholder,
html[data-ui-theme="workspace"] .weui-textarea::placeholder {
  color: #9aa6b8;
  opacity: 1;
}

html[data-ui-theme="command"] .screen,
html[data-ui-theme="workspace"] .screen {
  top: 54px;
  background: #ffffff;
  box-shadow: 0 2px 10px rgba(29, 62, 110, .05);
}

html[data-ui-theme="command"] .screen .active,
html[data-ui-theme="workspace"] .screen .active {
  color: var(--mobile-primary);
  border-bottom-color: var(--mobile-primary);
}

html[data-ui-theme="command"] .basics_head {
  margin: 12px;
  overflow: hidden;
  border-radius: 16px;
  box-shadow: 0 12px 26px rgba(51, 120, 246, .2);
}

html[data-ui-theme="workspace"] .basics_head {
  margin: 12px;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid var(--mobile-border);
  border-radius: 14px;
  box-shadow: 0 8px 22px rgba(29, 62, 110, .06);
}

html[data-ui-theme="workspace"] .basics_head .bg {
  opacity: .08;
}

html[data-ui-theme="workspace"] .basics_head .name,
html[data-ui-theme="workspace"] .basics_head .desc,
html[data-ui-theme="workspace"] .basics_head .headimg {
  color: #203047 !important;
}

html[data-ui-theme="workspace"] .basics_tabs {
  border-left: 3px solid var(--mobile-primary);
  border-radius: 10px;
}

html[data-ui-theme="workspace"] .orderitem {
  border-left: 3px solid var(--mobile-primary);
  border-radius: 10px;
}

html[data-ui-theme="command"] .regform,
html[data-ui-theme="workspace"] .regform {
  width: auto;
  max-width: 390px;
  margin: 0 auto;
  padding: 24px 18px;
  box-sizing: border-box;
}

html[data-ui-theme="command"] .regform .logo,
html[data-ui-theme="workspace"] .regform .logo {
  color: var(--mobile-text);
  font-size: 26px;
  font-weight: 700;
}

.order-detail-hero {
  display: none;
}

html[data-ui-theme="command"] body.page-order-detail,
html[data-ui-theme="workspace"] body.page-order-detail {
  min-height: 100vh;
  padding-bottom: calc(78px + env(safe-area-inset-bottom));
  box-sizing: border-box;
}

html[data-ui-theme="command"] .page-order-detail .weui-content,
html[data-ui-theme="workspace"] .page-order-detail .weui-content {
  width: 100%;
  margin-top: 54px;
  padding: 14px;
  box-sizing: border-box;
}

html[data-ui-theme="command"] .page-order-detail .custom_info,
html[data-ui-theme="workspace"] .page-order-detail .custom_info {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 0;
  line-height: 1.45;
}

html[data-ui-theme="command"] .page-order-detail .order-detail-hero,
html[data-ui-theme="workspace"] .page-order-detail .order-detail-hero {
  display: block;
  grid-column: 1 / -1;
  padding: 18px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--mobile-primary), var(--mobile-primary-dark));
  border-radius: 16px;
  box-shadow: 0 12px 28px rgba(38, 94, 190, .2);
}

html[data-ui-theme="workspace"] .page-order-detail .order-detail-hero {
  color: var(--mobile-text);
  background: #ffffff;
  border: 1px solid var(--mobile-border);
  box-shadow: 0 10px 24px rgba(29, 62, 110, .07);
}

.page-order-detail .order-detail-eyebrow {
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .08em;
  opacity: .72;
}

.page-order-detail .order-detail-title {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.45;
  word-break: break-word;
}

.page-order-detail .order-detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
  font-size: 11px;
}

.page-order-detail .order-detail-meta span {
  padding: 5px 9px;
  background: rgba(255, 255, 255, .16);
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 999px;
}

html[data-ui-theme="workspace"] .page-order-detail .order-detail-meta span {
  color: #496078;
  background: var(--mobile-primary-soft);
  border-color: #dbe7fb;
}

html[data-ui-theme="command"] .page-order-detail .info-order-name,
html[data-ui-theme="command"] .page-order-detail .info-order-number,
html[data-ui-theme="workspace"] .page-order-detail .info-order-name,
html[data-ui-theme="workspace"] .page-order-detail .info-order-number {
  display: none !important;
}

html[data-ui-theme="command"] .page-order-detail .info_item,
html[data-ui-theme="workspace"] .page-order-detail .info_item {
  display: block;
  min-width: 0;
  padding: 12px 14px;
  color: var(--mobile-text);
  background: var(--mobile-surface);
  border: 1px solid var(--mobile-border);
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(29, 62, 110, .045);
  box-sizing: border-box;
}

html[data-ui-theme="workspace"] .page-order-detail .info_item {
  border-radius: 9px;
  box-shadow: none;
}

html[data-ui-theme="command"] .page-order-detail .info_item .label,
html[data-ui-theme="workspace"] .page-order-detail .info_item .label {
  width: auto;
  margin-bottom: 6px;
  color: var(--mobile-muted);
  font-size: 11px;
  font-weight: 500;
}

html[data-ui-theme="command"] .page-order-detail .info_item .flex-sub,
html[data-ui-theme="workspace"] .page-order-detail .info_item .flex-sub {
  min-width: 0;
  color: var(--mobile-text);
  font-size: 14px;
  font-weight: 650;
  overflow-wrap: anywhere;
}

html[data-ui-theme="command"] .page-order-detail .info-control,
html[data-ui-theme="workspace"] .page-order-detail .info-control,
html[data-ui-theme="command"] .page-order-detail .detail-remark,
html[data-ui-theme="workspace"] .page-order-detail .detail-remark,
html[data-ui-theme="command"] .page-order-detail .detail-history,
html[data-ui-theme="workspace"] .page-order-detail .detail-history {
  grid-column: 1 / -1;
}

html[data-ui-theme="command"] .page-order-detail select,
html[data-ui-theme="workspace"] .page-order-detail select {
  min-height: 42px;
  padding: 0 36px 0 12px;
  color: var(--mobile-text);
  background: var(--mobile-primary-soft);
  border: 1px solid #dbe7fb;
  border-radius: 9px;
  box-shadow: none;
}

html[data-ui-theme="command"] .page-order-detail .detail-remark label,
html[data-ui-theme="workspace"] .page-order-detail .detail-remark label {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 68px;
  gap: 8px;
}

html[data-ui-theme="command"] .page-order-detail textarea,
html[data-ui-theme="workspace"] .page-order-detail textarea {
  min-height: 96px;
  padding: 12px;
  color: var(--mobile-text);
  background: #ffffff !important;
  border: 1px solid var(--mobile-border);
  border-radius: 9px;
  box-shadow: none;
  box-sizing: border-box;
}

html[data-ui-theme="command"] .page-order-detail .save_btn,
html[data-ui-theme="workspace"] .page-order-detail .save_btn {
  width: 68px;
  color: #ffffff;
  background: var(--mobile-primary);
  border-radius: 9px;
  font-size: 14px;
  font-weight: 600;
}

html[data-ui-theme="command"] .page-order-detail .remark-history,
html[data-ui-theme="workspace"] .page-order-detail .remark-history {
  max-height: 360px !important;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
}

html[data-ui-theme="command"] .page-order-detail .remark-entry,
html[data-ui-theme="workspace"] .page-order-detail .remark-entry {
  margin: 0 0 8px !important;
  padding: 12px !important;
  background: #f8fafc !important;
  border-top: 1px solid var(--mobile-border) !important;
  border-right: 1px solid var(--mobile-border) !important;
  border-bottom: 1px solid var(--mobile-border) !important;
  border-radius: 9px !important;
  box-shadow: none !important;
}

html[data-ui-theme="command"] .page-order-detail .remark-entry-content,
html[data-ui-theme="workspace"] .page-order-detail .remark-entry-content {
  padding: 10px !important;
  background: #ffffff !important;
  border-color: var(--mobile-border) !important;
}

html[data-ui-theme="command"] .page-order-detail .custom_contact,
html[data-ui-theme="workspace"] .page-order-detail .custom_contact {
  right: 14px;
  bottom: calc(12px + env(safe-area-inset-bottom));
  left: 14px;
  width: auto;
  height: 52px;
  line-height: 52px;
  background: var(--mobile-primary);
  border-radius: 12px;
  box-shadow: 0 10px 24px rgba(38, 94, 190, .24);
  font-weight: 600;
}

html[data-ui-theme="command"] .page-order-detail .custom_contact_disabled,
html[data-ui-theme="workspace"] .page-order-detail .custom_contact_disabled {
  color: #7b8797 !important;
  background: #e2e7ee !important;
  border: 1px solid #d3dae4 !important;
}

@media screen and (min-width: 720px) {
  html[data-ui-theme="command"] .page-order-detail .custom_info,
  html[data-ui-theme="workspace"] .page-order-detail .custom_info {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    padding: 8px 10px 24px;
  }

  html[data-ui-theme="command"] .page-order-detail .info-control,
  html[data-ui-theme="workspace"] .page-order-detail .info-control {
    grid-column: span 2;
  }

  html[data-ui-theme="command"] .page-order-detail .custom_contact,
  html[data-ui-theme="workspace"] .page-order-detail .custom_contact {
    right: 22px;
    left: auto;
    width: 220px;
  }
}
