* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #f4f6f7;
  color: #18252b;
  font-family: Arial, "Microsoft YaHei", sans-serif;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 32px;
  background: #1f6f8b;
  color: #fff;
}

.topbar h1 {
  margin: 0 0 6px;
  font-size: 26px;
}

.topbar p {
  margin: 0;
  color: #d7edf3;
}

button {
  height: 38px;
  padding: 0 16px;
  border: 0;
  border-radius: 6px;
  background: #e8b44f;
  color: #172126;
  font-weight: 700;
  cursor: pointer;
}

.secondary-button {
  border: 1px solid #cbd7dc;
  background: #fff;
  color: #172126;
}

.layout {
  display: grid;
  grid-template-columns: minmax(420px, 1fr) minmax(360px, 0.8fr);
  gap: 20px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 24px;
}

.panel {
  padding: 20px;
  border: 1px solid #dbe3e7;
  border-radius: 8px;
  background: #fff;
}

.panel.wide {
  grid-column: 1 / -1;
}

.panel-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  border-bottom: 1px solid #edf1f3;
  padding-bottom: 14px;
}

.panel-header h2 {
  margin: 0;
  font-size: 20px;
}

.panel-header span {
  color: #64767d;
  font-size: 13px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

label {
  display: grid;
  gap: 8px;
  color: #475a62;
  font-size: 14px;
}

input,
select {
  width: 100%;
  height: 38px;
  border: 1px solid #cbd7dc;
  border-radius: 6px;
  padding: 0 10px;
  background: #fff;
  color: #172126;
  font-size: 14px;
}

input[readonly] {
  border-color: #dce4e6;
  background: #f1f4f5;
  color: #6d7c81;
  cursor: not-allowed;
}

table {
  width: 100%;
  border-collapse: collapse;
}

td {
  padding: 12px 8px;
  border-bottom: 1px solid #edf1f3;
}

td:last-child {
  text-align: right;
  font-weight: 700;
}

.empty {
  display: grid;
  min-height: 220px;
  place-items: center;
  border: 1px dashed #cbd7dc;
  border-radius: 8px;
  color: #64767d;
}

.order {
  padding: 14px;
  border: 1px solid #dbe3e7;
  border-radius: 8px;
  margin-bottom: 12px;
}

.order-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.order strong {
  display: inline-block;
  margin-bottom: 8px;
}

.order span {
  color: #64767d;
  font-size: 13px;
}

.order small {
  display: block;
  margin-top: 7px;
  color: #91a0a6;
  font-size: 12px;
}

.admin-order-status {
  display: inline-flex;
  flex: 0 0 auto;
  padding: 4px 8px;
  border-radius: 5px;
  background: #edf3f5;
  color: #5b6d74 !important;
  font-size: 11px !important;
  font-weight: 700;
}

.admin-order-status.unpaid {
  background: #fff3df;
  color: #a56318 !important;
}

.admin-order-status.ordered {
  background: #edf5ff;
  color: #3475b7 !important;
}

.admin-order-status.production {
  background: #f0edfb;
  color: #725ea8 !important;
}

.admin-order-status.awaiting-receipt {
  background: #e8f7ef;
  color: #168653 !important;
}

.admin-order-status.completed {
  background: #f0f3f4;
  color: #66777e !important;
}

.admin-order-status.refunded {
  background: #fff0ed;
  color: #b04b3d !important;
}

.order-status-action {
  height: 30px;
  margin-top: 12px;
  padding: 0 11px;
  border: 1px solid #b8d6c4;
  border-radius: 5px;
  background: #f1faf5;
  color: #1a7950;
  font-size: 12px;
  cursor: pointer;
}

.order-file-downloads {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.order-file-download {
  display: inline-flex;
  align-items: center;
  max-width: 260px;
  height: 30px;
  overflow: hidden;
  padding: 0 10px;
  border: 1px solid #bad0da;
  border-radius: 5px;
  background: #f4f9fb;
  color: #28667f;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
  box-sizing: border-box;
}

.config-form {
  display: grid;
  gap: 18px;
}

.config-group {
  padding-bottom: 18px;
  border-bottom: 1px solid #edf1f3;
}

.config-group:last-of-type {
  border-bottom: 0;
}

.config-group h3 {
  margin: 0 0 8px;
  font-size: 16px;
}

.config-tip {
  margin: 10px 0 0;
  color: #75858b;
  font-size: 12px;
  line-height: 1.5;
}

.config-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.config-actions {
  display: flex;
  gap: 12px;
}

.friend-help-config-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 16px;
}

.friend-help-rule-note {
  display: grid;
  gap: 7px;
  padding: 14px 16px;
  border: 1px solid #dbe5e8;
  border-left: 3px solid #3f8b6e;
  background: #f6f9f8;
  color: #64767d;
  font-size: 12px;
  line-height: 1.7;
}

.friend-help-rule-note strong {
  color: #29443d;
  font-size: 13px;
}

.friend-help-admin-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 28px;
  padding: 18px 0 12px;
  border-top: 1px solid #e5ecee;
}

.friend-help-admin-heading h3 {
  margin: 0 0 5px;
  color: #25383f;
  font-size: 16px;
}

.friend-help-admin-heading span {
  color: #718188;
  font-size: 12px;
}

.friend-help-admin-heading button {
  flex: 0 0 auto;
}

.friend-help-activity-table-wrap {
  overflow-x: auto;
  border: 1px solid #dbe3e6;
}

.friend-help-activity-table-wrap .empty {
  min-height: 150px;
  border: 0;
  border-radius: 0;
}

.friend-help-activity-table {
  min-width: 1320px;
  table-layout: fixed;
  font-size: 12px;
}

.friend-help-activity-table th,
.friend-help-activity-table td {
  padding: 11px 10px;
  border-bottom: 1px solid #e8edef;
  color: #40535a;
  text-align: left;
  vertical-align: middle;
}

.friend-help-activity-table th {
  background: #f3f6f7;
  color: #65767d;
  font-size: 11px;
}

.friend-help-activity-table td:last-child {
  text-align: left;
  font-weight: 400;
}

.friend-help-current-price {
  color: #d24f2f;
}

.friend-help-activity-table td strong,
.friend-help-activity-table td small {
  display: block;
}

.friend-help-activity-table td small {
  margin-top: 4px;
  color: #89969b;
  font-size: 10px;
}

.friend-help-admin-progress {
  width: 100%;
  height: 7px;
  overflow: hidden;
  border-radius: 4px;
  background: #e5ecee;
}

.friend-help-admin-progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #dba843;
}

.friend-help-status {
  display: inline-flex;
  padding: 4px 7px;
  border-radius: 5px;
  background: #eef3f4;
  color: #53666d;
  font-size: 10px;
  font-weight: 700;
}

.friend-help-status.active { background: #fff3d9; color: #916313; }
.friend-help-status.completed { background: #e7f5ed; color: #147248; }
.friend-help-status.expired { background: #eef1f2; color: #718087; }
.friend-help-status.paid { background: #e7f1f8; color: #25627a; }
.friend-help-status.pending { background: #fff5df; color: #916313; }

.status {
  max-width: 420px;
  text-align: right;
}

.status.ok {
  color: #2d7a46;
}

.status.error {
  color: #c7472a;
}

.auth-box {
  min-height: 96px;
  padding: 18px;
  line-height: 1.6;
  text-align: left;
}

.auth-box.ok {
  border-color: #a8ddbc;
  background: #f0fbf4;
  color: #2d7a46;
}

.auth-box.error {
  border-color: #edc0b4;
  background: #fff7f3;
  color: #c7472a;
}

.auth-actions {
  margin-top: 14px;
}

.wechat-pay-status-box {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid #dbe3e6;
  background: #dbe3e6;
}

.wechat-pay-status-box.ok {
  border-color: #b8dbc5;
  background: #b8dbc5;
}

.wechat-pay-status-box.error {
  border-color: #ead4cd;
  background: #ead4cd;
}

.wechat-pay-status-item {
  display: grid;
  min-height: 74px;
  align-content: center;
  gap: 7px;
  min-width: 0;
  padding: 12px 14px;
  background: #fff;
}

.wechat-pay-status-item span {
  color: #718188;
  font-size: 11px;
}

.wechat-pay-status-item strong {
  overflow: hidden;
  color: #26383e;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wechat-pay-status-item strong.configured {
  color: #23754a;
}

.wechat-pay-status-item strong.missing {
  color: #bc4b37;
}

.wechat-pay-status-loading,
.wechat-pay-status-message {
  grid-column: 1 / -1;
  min-height: 92px;
  padding: 24px;
  background: #fff;
  color: #718188;
  font-size: 13px;
  text-align: center;
}

.wechat-pay-status-box.error .wechat-pay-status-message {
  color: #bc4b37;
}

.wechat-pay-hint {
  max-width: 900px;
  margin-top: 12px;
  color: #718188;
  font-size: 12px;
  line-height: 1.6;
}

@media (max-width: 860px) {
  .topbar,
  .layout,
  .panel-header {
    display: block;
  }

  .layout,
  .config-actions,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .config-actions {
    display: grid;
  }

  .topbar button {
    margin-top: 16px;
  }

}

/* Admin shell */
body {
  min-width: 320px;
  background: #f3f5f6;
  color: #1d292e;
}

.login-screen {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
  background: #f3f5f6;
}

.login-panel {
  width: min(100%, 420px);
  padding: 34px;
  border: 1px solid #dbe3e6;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 14px 36px rgba(30, 52, 60, 0.08);
}

.login-screen[hidden],
#adminApp[hidden] {
  display: none !important;
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 24px;
  border-bottom: 1px solid #edf1f2;
}

.login-brand > div:last-child {
  display: grid;
  gap: 4px;
}

.login-brand strong {
  color: #193640;
  font-size: 18px;
}

.login-brand span {
  color: #7a8b91;
  font-size: 12px;
}

.login-heading {
  margin: 28px 0 22px;
}

.login-heading h1 {
  margin: 8px 0 6px;
  color: #1d2e34;
  font-size: 26px;
}

.login-heading p {
  margin: 0;
  color: #73848a;
  font-size: 13px;
}

.login-form {
  display: grid;
  gap: 16px;
}

.login-form label {
  gap: 7px;
}

.login-form input {
  height: 44px;
}

.login-button {
  width: 100%;
  height: 44px;
  margin-top: 2px;
}

.login-error {
  padding: 10px 12px;
  border: 1px solid #edc0b4;
  border-radius: 5px;
  background: #fff7f3;
  color: #c7472a;
  font-size: 13px;
}

.app-shell {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 20;
  display: flex;
  width: 240px;
  flex-direction: column;
  padding: 24px 16px 18px;
  background: #18343c;
  color: #fff;
  overflow-y: auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 8px 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 6px;
  background: #e8b44f;
  color: #17262b;
  font-size: 21px;
  font-weight: 800;
}

.brand-copy {
  display: grid;
  gap: 4px;
}

.brand-copy strong {
  font-size: 17px;
}

.brand-copy span {
  color: #a9c1c8;
  font-size: 12px;
}

.store-status {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 18px 8px 12px;
  color: #b9ccd1;
  font-size: 12px;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #48be78;
  box-shadow: 0 0 0 4px rgba(72, 190, 120, 0.12);
}

.side-nav {
  display: grid;
  gap: 6px;
  margin-top: 8px;
}

.side-nav .nav-item {
  display: flex;
  width: 100%;
  height: 46px;
  align-items: center;
  gap: 12px;
  padding: 0 12px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #bfd0d5;
  font-size: 14px;
  font-weight: 600;
  text-align: left;
}

.side-nav .nav-item:hover {
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
}

.side-nav .nav-item.active {
  background: #f4f7f7;
  color: #17333b;
}

.nav-group {
  display: grid;
  gap: 4px;
}

.nav-parent .nav-chevron {
  margin-left: auto;
  color: currentColor;
  font-size: 18px;
  transition: transform 160ms ease;
}

.nav-group.active .nav-chevron {
  transform: rotate(90deg);
}

.nav-submenu {
  display: none;
  gap: 3px;
  padding: 2px 0 4px 38px;
}

.nav-group.active .nav-submenu {
  display: grid;
}

.side-nav .nav-subitem {
  width: 100%;
  height: 35px;
  padding: 0 10px;
  border-left: 2px solid rgba(255, 255, 255, 0.18);
  border-radius: 0;
  background: transparent;
  color: #a9c1c8;
  font-size: 13px;
  font-weight: 500;
  text-align: left;
}

.side-nav .nav-subitem:hover {
  border-left-color: #e8b44f;
  color: #fff;
}

.side-nav .nav-subitem.active {
  border-left-color: #e8b44f;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-weight: 700;
}

.nav-icon {
  display: grid;
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 5px;
  font-size: 12px;
}

.sidebar-footer {
  display: flex;
  justify-content: space-between;
  margin-top: auto;
  padding: 16px 8px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  color: #809ca4;
  font-size: 11px;
}

.main-shell {
  width: calc(100% - 240px);
  min-width: 0;
  margin-left: 240px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  min-height: 76px;
  padding: 14px 28px;
  border-bottom: 1px solid #dde4e6;
  background: #fff;
  color: #1c292e;
}

.topbar-copy {
  display: grid;
  gap: 3px;
}

.topbar-kicker {
  color: #7b8c92;
  font-size: 11px;
}

.topbar h1 {
  margin: 0;
  font-size: 21px;
  letter-spacing: 0;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.topbar-description {
  max-width: 340px;
  color: #72838a;
  font-size: 13px;
}

.button,
.topbar button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 38px;
  padding: 0 14px;
  border: 1px solid #d5dfe2;
  border-radius: 6px;
  background: #fff;
  color: #26383e;
}

.button:not(.secondary-button) {
  border-color: #1f6f8b;
  background: #1f6f8b;
  color: #fff;
}

.button-glyph {
  font-size: 18px;
  line-height: 1;
}

.admin-user {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-left: 14px;
  border-left: 1px solid #e0e6e8;
  color: #44565d;
  font-size: 13px;
}

.admin-avatar {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 50%;
  background: #e6eff1;
  color: #1f6f8b;
  font-weight: 700;
}

.logout-button {
  height: auto;
  padding: 3px 0 3px 8px;
  border: 0;
  border-left: 1px solid #dce5e7;
  border-radius: 0;
  background: transparent;
  color: #718188;
  font-size: 12px;
  font-weight: 400;
}

.logout-button:hover {
  color: #c7472a;
}

.content {
  display: grid;
  grid-template-columns: minmax(480px, 1fr) minmax(340px, 0.72fr);
  gap: 18px;
  width: 100%;
  max-width: 1500px;
  margin: 0 auto;
  padding: 24px 28px 40px;
}

.admin-panel[hidden] {
  display: none !important;
}

.admin-panel[data-section-panel="orders"],
.admin-panel[data-section-panel="users"],
.admin-panel[data-section-panel="classes"],
.admin-panel[data-section-panel="parent-committees"],
.admin-panel[data-section-panel="staff"],
.admin-panel[data-section-panel="finance"],
.admin-panel[data-section-panel^="system-"] {
  grid-column: 1 / -1;
}

.class-panel-header {
  align-items: center;
}

.class-application-filter {
  display: flex;
  align-items: center;
  gap: 8px;
}

.class-application-filter select,
.class-application-filter input {
  height: 36px;
  padding: 0 10px;
  border: 1px solid #cbd7dc;
  border-radius: 6px;
  background: #fff;
  color: #26383e;
}

.class-application-filter input {
  width: 250px;
}

.class-application-table-wrap {
  overflow-x: auto;
}

.class-application-table {
  width: 100%;
  min-width: 1120px;
  border-collapse: collapse;
  font-size: 13px;
}

.class-application-table th,
.class-application-table td {
  padding: 12px 10px;
  border-bottom: 1px solid #e8edef;
  text-align: left;
  vertical-align: middle;
}

.class-application-table th {
  background: #f6f8f9;
  color: #64757d;
  font-size: 12px;
  font-weight: 700;
}

.class-application-table td:first-child strong,
.class-application-table td:first-child span,
.review-remark {
  display: block;
}

.class-application-table td:first-child span,
.review-remark {
  margin-top: 4px;
  color: #7c8a90;
  font-size: 11px;
}

.class-status {
  display: inline-flex;
  padding: 4px 8px;
  border-radius: 5px;
  background: #fff4d9;
  color: #946718;
  font-size: 11px;
  font-weight: 700;
}

.class-status.approved {
  background: #e8f6ef;
  color: #147648;
}

.class-status.rejected {
  background: #fbeceb;
  color: #ac4039;
}

.class-review-actions {
  display: flex;
  gap: 6px;
}

.class-review-actions button {
  height: 30px;
  padding: 0 10px;
  background: #1f7d59;
  color: #fff;
  font-size: 12px;
}

.class-review-actions button.reject {
  border: 1px solid #dfbeb9;
  background: #fff;
  color: #b34239;
}

.class-row-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.parent-price-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(110px, 1fr));
  gap: 5px;
  min-width: 300px;
}

.parent-price-groups {
  display: grid;
  gap: 10px;
  min-width: 320px;
}

.parent-price-groups section {
  padding: 8px;
  border: 1px solid #dbe5e2;
  border-radius: 5px;
  background: #f8faf9;
}

.parent-price-groups section > strong {
  display: block;
  margin-bottom: 7px;
  color: #30483f;
  font-size: 12px;
}

.parent-price-grid label {
  display: flex;
  align-items: center;
  gap: 4px;
  color: #60747a;
  font-size: 11px;
  white-space: nowrap;
}

.parent-price-grid input {
  width: 72px;
  height: 26px;
  padding: 0 4px;
  border: 1px solid #cbd7dc;
  border-radius: 4px;
  box-sizing: border-box;
  color: #22353b;
  font-size: 12px;
  text-align: right;
}

.parent-committee-table {
  min-width: 1260px;
}

.parent-committee-orders {
  position: fixed;
  z-index: 80;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 28px;
  box-sizing: border-box;
  overflow: auto;
  background: rgba(18, 36, 42, 0.42);
}

.parent-committee-orders[hidden] {
  display: none;
}

.parent-committee-orders > .parent-orders-dialog {
  width: min(1120px, 100%);
  max-height: min(760px, calc(100vh - 56px));
  overflow: auto;
  box-sizing: border-box;
  border: 1px solid #d9e5e2;
  border-radius: 8px;
  background: #fbfdfc;
  box-shadow: 0 20px 60px rgba(19, 42, 49, 0.24);
}

.parent-orders-dialog > .class-detail-loading,
.parent-orders-dialog > .empty {
  margin: 0;
  width: auto;
  max-height: none;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.parent-committee-orders > .class-detail-loading,
.parent-committee-orders > .empty {
  padding: 48px 24px;
  text-align: center;
}

.save-success-popup {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  pointer-events: none;
  background: rgba(18, 36, 31, 0.08);
  opacity: 0;
  transition: opacity 160ms ease;
}

.save-success-popup[hidden] {
  display: none;
}

.save-success-popup.visible {
  opacity: 1;
}

.save-success-dialog {
  display: flex;
  min-width: 168px;
  min-height: 64px;
  padding: 0 24px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid #d7e5df;
  border-radius: 6px;
  box-sizing: border-box;
  background: #fff;
  box-shadow: 0 12px 30px rgba(21, 50, 41, 0.16);
  color: #1d4034;
  transform: translateY(5px) scale(0.98);
  transition: transform 160ms ease;
}

.save-success-popup.visible .save-success-dialog {
  transform: translateY(0) scale(1);
}

.save-success-icon {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  background: #17785c;
  color: #fff;
  font-size: 17px;
  font-weight: 800;
}

.save-success-dialog strong {
  font-size: 16px;
}

.parent-orders-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid #e1ebe8;
  color: #24534b;
}

.parent-orders-head strong,
.parent-orders-kicker {
  display: block;
}

.parent-orders-head strong {
  margin-top: 4px;
  font-size: 15px;
}

.parent-orders-kicker {
  color: #71858a;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
}

.parent-order-list {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.parent-order-card {
  overflow: hidden;
  border: 1px solid #dce8e5;
  border-radius: 6px;
  background: #fff;
}

.parent-order-top,
.parent-order-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
}

.parent-order-top {
  border-bottom: 1px solid #edf2f0;
}

.parent-order-id,
.parent-order-meta {
  min-width: 0;
}

.parent-order-id span,
.parent-order-meta time,
.parent-order-total span {
  display: block;
  color: #7b8b90;
  font-size: 11px;
}

.parent-order-id strong {
  display: block;
  margin-top: 4px;
  overflow: hidden;
  color: #1d4f5e;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.parent-order-meta {
  display: flex;
  align-items: flex-end;
  flex: 0 0 auto;
  gap: 10px;
}

.parent-order-meta time {
  text-align: right;
  white-space: nowrap;
}

.parent-order-status {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 4px;
  background: #f1f4f4;
  color: #617176;
  font-size: 11px;
  font-weight: 700;
}

.parent-order-status.paid { background: #e7f6ee; color: #17754b; }
.parent-order-status.pending { background: #fff4d9; color: #946718; }
.parent-order-status.refunded { background: #fbeceb; color: #ac4039; }
.parent-order-status.processing { background: #eaf3f5; color: #28687a; }

.parent-order-files {
  padding: 12px 14px 10px;
}

.parent-order-section-title {
  color: #445b61;
  font-size: 12px;
  font-weight: 700;
}

.parent-order-section-title span {
  margin-left: 6px;
  color: #8a999d;
  font-size: 11px;
  font-weight: 400;
}

.parent-order-file-list {
  display: grid;
  gap: 7px;
  margin-top: 9px;
}

.parent-order-file {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(260px, 1.1fr);
  align-items: center;
  gap: 18px;
  min-width: 0;
  padding: 8px 10px;
  border-left: 3px solid #9bcbb9;
  background: #f6faf8;
}

.parent-order-file-name,
.parent-order-file-settings {
  min-width: 0;
}

.parent-order-file-name > span,
.parent-order-file-settings > span {
  display: block;
  margin-bottom: 3px;
  color: #8a999d;
  font-size: 10px;
  font-weight: 700;
}

.parent-order-file strong {
  display: block;
  overflow-wrap: anywhere;
}

.parent-order-file-name strong {
  color: #25434a;
  font-size: 12px;
  line-height: 1.45;
}

.parent-order-file-settings strong {
  color: #6b7e83;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.45;
}

.parent-order-total {
  border-top: 1px solid #edf2f0;
  background: #fbfdfc;
}

.parent-order-total strong { color: #b26322; font-size: 16px; }
.parent-order-empty { color: #8a999d; font-size: 12px; }

@media (max-width: 760px) {
  .parent-order-file {
    grid-template-columns: minmax(0, 1fr) minmax(190px, 1fr);
    gap: 10px;
  }
}

.parent-orders-head button {
  height: 28px;
  padding: 0 10px;
  border: 1px solid #b8cbd2;
  background: #fff;
  color: #285a6c;
  font-size: 12px;
}

.class-view-button {
  height: 30px;
  padding: 0 10px;
  border: 1px solid #b8cbd2;
  background: #fff;
  color: #285a6c;
  font-size: 12px;
}

body.class-detail-open {
  overflow: hidden;
}

.class-detail-mask {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(21, 32, 37, 0.42);
}

.class-detail-mask[hidden],
.class-detail-drawer[hidden],
.class-detail-pane[hidden] {
  display: none !important;
}

.class-detail-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 81;
  display: flex;
  width: min(780px, 92vw);
  flex-direction: column;
  border-left: 1px solid #cbd8dc;
  background: #f5f7f8;
  box-shadow: -12px 0 34px rgba(22, 38, 44, 0.16);
}

.class-detail-header {
  display: flex;
  min-height: 92px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 22px;
  border-bottom: 1px solid #d8e1e4;
  background: #173f46;
  color: #fff;
  box-sizing: border-box;
}

.class-detail-kicker {
  display: block;
  margin-bottom: 3px;
  color: #9ed2c2;
  font-size: 11px;
  font-weight: 700;
}

.class-detail-header h2 {
  margin: 0;
  font-size: 19px;
}

.class-detail-header p {
  margin: 5px 0 0;
  color: #d4e6e3;
  font-size: 12px;
}

.class-detail-close {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: transparent;
  color: #fff;
  font-size: 25px;
  font-weight: 400;
  line-height: 1;
}

.class-detail-content {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 18px 20px 30px;
}

.class-detail-loading,
.class-detail-empty {
  display: grid;
  min-height: 150px;
  place-items: center;
  border: 1px dashed #c8d5d9;
  background: #fff;
  color: #718188;
  font-size: 13px;
  text-align: center;
}

.class-detail-empty.error {
  border-color: #e4c6c1;
  color: #ad433a;
}

.class-detail-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid #d9e2e5;
  background: #d9e2e5;
}

.class-detail-meta > span {
  display: grid;
  min-width: 0;
  gap: 5px;
  padding: 12px 14px;
  background: #fff;
}

.class-detail-meta small {
  color: #76868d;
  font-size: 11px;
}

.class-detail-meta strong {
  overflow: hidden;
  color: #273a41;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.class-detail-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0 16px;
}

.class-detail-summary > div {
  display: grid;
  min-height: 78px;
  align-content: center;
  gap: 6px;
  padding: 10px 13px;
  border: 1px solid #d9e2e5;
  background: #fff;
  box-sizing: border-box;
}

.class-detail-summary span {
  color: #718188;
  font-size: 11px;
}

.class-detail-summary strong {
  color: #173f46;
  font-size: 23px;
}

.class-detail-summary > div:nth-child(2) strong {
  color: #a16d0a;
}

.class-detail-tabs {
  display: flex;
  gap: 2px;
  border-bottom: 1px solid #cfdadd;
}

.class-detail-tabs button {
  height: 38px;
  padding: 0 16px;
  border: 0;
  border-bottom: 3px solid transparent;
  border-radius: 0;
  background: transparent;
  color: #63747b;
  font-size: 13px;
}

.class-detail-tabs button.active {
  border-bottom-color: #1f7d59;
  color: #1f624d;
  font-weight: 700;
}

.class-detail-tabs button span {
  display: inline-block;
  min-width: 20px;
  margin-left: 4px;
  padding: 2px 5px;
  border-radius: 8px;
  background: #e8eff1;
  font-size: 10px;
  line-height: 1;
}

.class-detail-pane {
  padding-top: 12px;
}

.class-detail-table-wrap {
  overflow: auto;
  border: 1px solid #d9e2e5;
  background: #fff;
}

.class-detail-table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 12px;
}

.class-detail-table th,
.class-detail-table td {
  padding: 10px 9px;
  border-bottom: 1px solid #e8edef;
  color: #40535a;
  text-align: left;
  vertical-align: middle;
}

.class-detail-table th {
  background: #f3f6f7;
  color: #65767d;
  font-size: 11px;
  font-weight: 700;
}

.class-detail-table tbody tr:last-child td {
  border-bottom: 0;
}

.class-detail-table td strong,
.class-detail-table td small {
  display: block;
}

.class-detail-table td strong,
.class-order-files {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.class-detail-table td small {
  margin-top: 4px;
  color: #87949a;
  font-size: 10px;
}

.class-member-role,
.class-order-status {
  display: inline-flex;
  padding: 4px 7px;
  border-radius: 5px;
  background: #eef3f4;
  color: #53666d;
  font-size: 10px;
  font-weight: 700;
}

.class-member-role.owner,
.class-order-status.paid {
  background: #e7f5ed;
  color: #147248;
}

.class-member-role.admin,
.class-order-status.pending {
  background: #fff2d6;
  color: #936412;
}

.class-order-status.cancelled {
  background: #f5e9e7;
  color: #a0443b;
}

.class-file-download {
  color: #226a84;
  font-weight: 700;
  text-decoration: none;
}

@media (max-width: 760px) {
  .class-detail-drawer {
    width: 100vw;
  }

  .class-detail-meta {
    grid-template-columns: 1fr;
  }

  .class-detail-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.panel,
.placeholder-panel {
  padding: 20px;
  border: 1px solid #dbe3e6;
  border-radius: 7px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(32, 51, 58, 0.035);
}

.panel-header {
  align-items: center;
}

.panel-header h2,
.panel-header h3 {
  margin: 0 0 5px;
  font-size: 18px;
}

.panel-tag {
  flex: 0 0 auto;
  padding: 5px 8px;
  border: 1px solid #d6e1e4;
  border-radius: 5px;
  background: #f6f9f9;
  color: #718188;
  font-size: 11px;
}

.standalone-config-form {
  max-width: 980px;
}

.store-config-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.address-detail-field {
  grid-column: span 2;
}

.store-navigation-hint {
  margin: 14px 0 0;
  color: #718188;
  font-size: 13px;
}

.standalone-config-form textarea {
  width: 100%;
  min-height: 120px;
  resize: vertical;
  padding: 10px;
  border: 1px solid #cbd7dc;
  border-radius: 6px;
  background: #fff;
  color: #172126;
  font: inherit;
  line-height: 1.6;
}

.standalone-config-form textarea:focus {
  border-color: #1f6f8b;
  outline: 2px solid rgba(31, 111, 139, 0.12);
}

.activity-material-admin {
  max-width: 980px;
  padding: 16px;
  border: 1px solid #dce8e2;
  border-radius: 6px;
  background: #f8fbf9;
}

.activity-material-admin-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.activity-material-admin-head > div {
  display: grid;
  gap: 4px;
}

.activity-material-admin-head strong {
  color: #29443a;
  font-size: 14px;
}

.activity-material-admin-head span {
  color: #6d7d78;
  font-size: 12px;
  line-height: 1.5;
}

.activity-material-picker {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 14px;
  cursor: pointer;
}

.activity-material-admin-list {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.activity-material-admin-row {
  display: flex;
  min-height: 52px;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid #e1ebe5;
  border-radius: 5px;
  background: #fff;
  box-sizing: border-box;
}

.activity-material-admin-icon {
  display: flex;
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  background: #e3f1e9;
  color: #176f51;
  font-size: 12px;
  font-weight: 700;
}

.activity-material-admin-copy {
  display: grid;
  min-width: 0;
  flex: 1;
  gap: 3px;
}

.activity-material-admin-copy strong,
.activity-material-admin-copy span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.activity-material-admin-copy strong {
  color: #263b32;
  font-size: 13px;
}

.activity-material-admin-copy span {
  color: #82918b;
  font-size: 11px;
}

.activity-material-remove {
  display: flex;
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: #fff1ef;
  color: #c34d3c;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.publish-switch {
  display: flex;
  align-items: center;
  gap: 9px;
  width: fit-content;
  cursor: pointer;
}

.publish-switch input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: #1f6f8b;
}

.customer-service-master-switch {
  min-height: 42px;
  padding-bottom: 16px;
  border-bottom: 1px solid #edf1f3;
  color: #24373e;
  font-weight: 700;
}

.customer-service-basic-grid,
.customer-service-message-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.customer-service-message-grid textarea {
  min-height: 92px;
}

.customer-service-robot-section {
  display: grid;
  gap: 16px;
  padding: 18px 0;
  border-top: 1px solid #edf1f3;
}

.customer-service-section-heading,
.faq-editor-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.customer-service-section-heading h3 {
  margin: 0 0 5px;
  font-size: 15px;
}

.customer-service-section-heading > div,
.faq-editor-heading > div {
  display: grid;
  gap: 4px;
}

.customer-service-section-heading span,
.faq-editor-heading span {
  color: #718188;
  font-size: 12px;
}

.faq-editor-heading strong {
  color: #25383f;
  font-size: 14px;
}

.faq-editor-heading button {
  flex: 0 0 auto;
}

.faq-column-labels,
.customer-service-faq-row {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) minmax(170px, 1.1fr) minmax(260px, 1.8fr) 72px 38px;
  gap: 10px;
  align-items: center;
}

.faq-column-labels {
  padding: 0 10px;
  color: #718188;
  font-size: 12px;
}

.customer-service-faq-list {
  display: grid;
  gap: 8px;
}

.customer-service-faq-row {
  padding: 10px;
  border: 1px solid #dbe3e6;
  border-radius: 7px;
  background: #f8fafb;
}

.customer-service-faq-row textarea {
  min-height: 62px;
  resize: vertical;
}

.faq-quick-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: #52656c;
  cursor: pointer;
}

.faq-quick-toggle input {
  width: 17px;
  height: 17px;
  margin: 0;
  accent-color: #1f6f8b;
}

.faq-delete-button {
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid #e5c4bc;
  background: #fff;
  color: #bd4b32;
  font-size: 22px;
  font-weight: 400;
}

.faq-empty {
  display: grid;
  min-height: 74px;
  place-items: center;
  border: 1px dashed #cbd7dc;
  border-radius: 7px;
  color: #718188;
  font-size: 13px;
}

.customer-service-channel-section {
  padding: 16px 0;
  border-top: 1px solid #edf1f3;
  border-bottom: 1px solid #edf1f3;
}

.customer-service-channel-section h3 {
  margin: 0 0 12px;
  font-size: 15px;
}

.customer-service-channel-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.channel-toggle {
  display: flex;
  min-height: 70px;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
  border: 1px solid #dbe3e6;
  border-radius: 7px;
  background: #f8fafb;
  cursor: pointer;
}

.channel-toggle input {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  margin: 0;
  accent-color: #1f6f8b;
}

.channel-toggle span {
  display: grid;
  gap: 4px;
}

.channel-toggle strong {
  color: #25383f;
  font-size: 14px;
}

.channel-toggle small {
  color: #718188;
  font-size: 12px;
}

.customer-service-qr-layout {
  display: grid;
  grid-template-columns: minmax(300px, 1fr) 172px;
  align-items: start;
  gap: 24px;
}

.customer-service-qr-preview {
  display: grid;
  width: 172px;
  min-height: 172px;
  place-items: center;
  overflow: hidden;
  border: 1px solid #dbe3e6;
  border-radius: 7px;
  background: #f8fafb;
  color: #718188;
  font-size: 12px;
  text-align: center;
}

.customer-service-qr-preview img {
  display: block;
  width: 100%;
  height: 172px;
  object-fit: contain;
  background: #fff;
}

.user-panel-header {
  display: grid;
  grid-template-columns: auto minmax(320px, 520px) auto;
  align-items: center;
  gap: 24px;
}

.user-search-form {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 68px 36px;
  gap: 8px;
  width: 100%;
  margin: 0 auto;
}

.user-search-form input {
  height: 36px;
}

.user-search-submit,
.user-search-clear {
  height: 36px;
  padding: 0;
  background: #1f6f8b;
  color: #fff;
}

.user-search-clear {
  width: 36px;
  border: 1px solid #cbd7dc;
  background: #fff;
  color: #52656c;
  font-size: 20px;
  font-weight: 400;
}

.user-search-clear[hidden] {
  display: none;
}

.empty {
  min-height: 260px;
  border-color: #d7e0e3;
  background: #fbfcfc;
}

.data-list {
  display: grid;
}

.data-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 62px;
  padding: 12px 4px;
  border-bottom: 1px solid #edf1f2;
}

.data-row span {
  color: #718188;
  font-size: 13px;
}

.list-pagination {
  display: flex;
  min-height: 44px;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  margin-top: 12px;
  padding: 8px 2px 0;
  color: #62747b;
  font-size: 12px;
}

.list-pagination[hidden] {
  display: none !important;
}

.list-pagination-summary {
  margin-right: auto;
  white-space: nowrap;
}

.list-pagination-size {
  display: inline-flex;
  height: 32px;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.list-pagination-size select {
  width: 66px;
  height: 32px;
  padding: 0 22px 0 8px;
  border: 1px solid #cbd7dc;
  border-radius: 5px;
  background-color: #fff;
  color: #2d4148;
  font-size: 12px;
}

.list-pagination-pages {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.list-pagination-pages button {
  display: inline-flex;
  min-width: 32px;
  height: 32px;
  align-items: center;
  justify-content: center;
  padding: 0 9px;
  border: 1px solid #cbd7dc;
  border-radius: 5px;
  background: #fff;
  color: #435960;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  text-align: center;
}

.list-pagination-pages button:hover:not(:disabled) {
  border-color: #78a995;
  color: #176446;
}

.list-pagination-pages button.active {
  border-color: #1f7554;
  background: #1f7554;
  color: #fff;
}

.list-pagination-pages button:disabled {
  cursor: default;
  opacity: 0.45;
}

.list-pagination-ellipsis {
  display: inline-flex;
  width: 24px;
  height: 32px;
  align-items: center;
  justify-content: center;
  color: #8a989d;
}

.class-detail-pagination {
  margin-top: 8px;
  padding-right: 0;
  padding-left: 0;
}

.user-table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid #dce5e7;
  border-radius: 6px;
  background: #fff;
}

.user-table {
  min-width: 1120px;
  table-layout: fixed;
}

.user-table th,
.user-table td {
  padding: 14px 16px;
  border-bottom: 1px solid #e8edef;
  text-align: left;
  vertical-align: middle;
}

.user-table th {
  background: #f4f7f8;
  color: #52656c;
  font-size: 12px;
  font-weight: 700;
}

.user-table td {
  color: #26383e;
  font-size: 13px;
  font-weight: 400;
}

.user-table td:last-child {
  text-align: left;
  font-weight: 400;
}

.user-table th:nth-child(1),
.user-table td:nth-child(1) {
  width: 29%;
}

.user-table th:nth-child(2),
.user-table td:nth-child(2) {
  width: 18%;
}

.user-table th:nth-child(3),
.user-table td:nth-child(3) {
  width: 16%;
}

.user-table th:nth-child(4),
.user-table td:nth-child(4) {
  width: 12%;
}

.user-table th:nth-child(5),
.user-table td:nth-child(5) {
  width: 29%;
}

.user-table th:nth-child(6),
.user-table td:nth-child(6) {
  width: 12%;
}

.user-table tbody tr:last-child td {
  border-bottom: 0;
}

.wechat-id {
  display: block;
  overflow: hidden;
  color: #1f596d;
  font-family: Consolas, "Courier New", monospace;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-created-at {
  white-space: nowrap;
}

.user-remark-editor {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) 64px;
  gap: 8px;
}

.user-remark-input {
  width: 100%;
  min-width: 0;
  height: 36px;
  padding: 0 10px;
  border: 1px solid #cbd7dc;
  border-radius: 4px;
  background: #fff;
  color: #26383e;
}

.user-remark-input:focus {
  border-color: #1f6f8b;
  outline: 2px solid rgba(31, 111, 139, 0.12);
}

.user-remark-save {
  width: 64px;
  height: 36px;
  padding: 0;
  background: #1f6f8b;
  color: #fff;
}

.user-remark-save:disabled {
  cursor: wait;
  opacity: 0.65;
}

.user-wallet-balance {
  color: #bb5b12;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.user-wallet-recharge {
  width: 76px;
  height: 32px;
  padding: 0;
  border: 1px solid #2c7a68;
  background: #fff;
  color: #1d6757;
  font-size: 12px;
  text-align: center;
}

.user-wallet-recharge:hover {
  background: #eef8f4;
}

.user-remark-status {
  display: block;
  min-height: 18px;
  margin-top: 3px;
  color: #718188;
  font-size: 11px;
}

.user-remark-status.saved {
  color: #16845b;
}

.user-remark-status.failed {
  color: #c7472a;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.finance-toolbar {
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
  padding: 10px 12px;
  border: 1px solid #dbe3e6;
  border-radius: 6px;
  background: #f7f9fa;
}

.finance-dimension {
  display: grid;
  grid-template-columns: repeat(3, 68px);
  gap: 2px;
  padding: 3px;
  border: 1px solid #ccd8dc;
  border-radius: 6px;
  background: #fff;
}

.finance-dimension button {
  height: 30px;
  padding: 0 10px;
  border-radius: 4px;
  background: transparent;
  color: #5f7279;
  font-size: 12px;
}

.finance-dimension button.active {
  background: #1f6f8b;
  color: #fff;
}

.finance-filter-fields {
  display: flex;
  align-items: flex-end;
  gap: 8px;
}

.finance-date-field {
  display: flex;
  align-items: center;
  gap: 8px;
}

.finance-date-field[hidden] {
  display: none;
}

.finance-date-field span {
  color: #64767d;
  font-size: 12px;
  white-space: nowrap;
}

.finance-date-field input {
  width: 150px;
  height: 34px;
  font-size: 13px;
}

.finance-refresh-button {
  display: inline-flex;
  height: 34px;
  align-items: center;
  gap: 6px;
  padding: 0 12px;
  border: 1px solid #b9cbd1;
  background: #fff;
  color: #315963;
  font-size: 12px;
}

.finance-refresh-button:disabled {
  cursor: wait;
  opacity: 0.6;
}

.finance-stat-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.stat-card {
  display: grid;
  min-height: 132px;
  align-content: space-between;
  padding: 20px;
  border: 1px solid #dbe3e6;
  border-top: 3px solid #1f6f8b;
  border-radius: 7px;
  background: #fff;
}

.stat-card-accent {
  border-top-color: #36a36b;
}

.stat-card-paid {
  border-top-color: #5f73a8;
}

.stat-card-warm {
  border-top-color: #d29a31;
}

.stat-card span {
  color: #687b82;
  font-size: 13px;
}

.stat-card strong {
  font-size: 30px;
}

.stat-card small {
  color: #91a0a6;
  font-size: 11px;
}

.finance-detail-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-top: 22px;
  padding-bottom: 10px;
}

.finance-detail-heading h3 {
  margin: 0 0 4px;
  font-size: 15px;
}

.finance-detail-heading span {
  color: #718188;
  font-size: 12px;
}

.finance-accounting-note {
  white-space: nowrap;
}

.finance-table-wrap {
  overflow-x: auto;
  border: 1px solid #dce5e7;
  border-radius: 6px;
  background: #fff;
}

.finance-table {
  min-width: 720px;
  table-layout: fixed;
}

.finance-table th,
.finance-table td {
  height: 52px;
  padding: 10px 16px;
  border-bottom: 1px solid #e8edef;
  color: #40535a;
  font-size: 13px;
  text-align: right;
}

.finance-table th {
  height: 42px;
  background: #f4f7f8;
  color: #64767d;
  font-size: 12px;
  font-weight: 700;
}

.finance-table th:first-child,
.finance-table td:first-child {
  width: 25%;
  text-align: left;
}

.finance-table tbody tr:last-child td {
  border-bottom: 0;
}

.finance-table td:first-child strong,
.finance-table td:first-child small {
  display: block;
}

.finance-table td:first-child small {
  margin-top: 3px;
  color: #91a0a6;
  font-size: 10px;
  font-weight: 400;
}

.finance-table .finance-amount {
  color: #18714b;
  font-weight: 700;
}

.finance-table .finance-zero-row td {
  color: #9aa7ac;
}

.finance-table .finance-zero-row .finance-amount {
  color: #9aa7ac;
  font-weight: 400;
}

.finance-table .finance-loading-row td {
  height: 150px;
  color: #718188;
  text-align: center;
  font-weight: 400;
}

.finance-table .finance-error-row td {
  color: #b24636;
}

.order-panel-header > div > span {
  display: block;
  margin-top: 3px;
  color: #718188;
  font-size: 12px;
}

.order-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
  gap: 16px;
  align-items: center;
  margin-bottom: 10px;
}

.order-status-filters {
  display: flex;
  min-width: 0;
  gap: 4px;
  overflow-x: auto;
  padding: 2px;
  scrollbar-width: thin;
}

.order-status-filters button {
  display: inline-flex;
  height: 34px;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
  padding: 0 11px;
  border: 1px solid transparent;
  border-radius: 5px;
  background: transparent;
  color: #52656d;
  font-size: 12px;
  font-weight: 600;
}

.order-status-filters button:hover {
  background: #f1f5f6;
}

.order-status-filters button.active {
  border-color: #b9d4c8;
  background: #eaf5ef;
  color: #176446;
}

.order-status-filters button span {
  display: inline-grid;
  min-width: 20px;
  height: 20px;
  place-items: center;
  padding: 0 5px;
  border-radius: 10px;
  background: #e8edef;
  color: #61747b;
  font-size: 10px;
}

.order-status-filters button.active span {
  background: #cfe8dc;
  color: #176446;
}

.order-search-field {
  position: relative;
  display: block;
}

.order-search-field input {
  height: 38px;
  padding: 0 12px 0 36px;
  border-color: #cdd9dd;
  background: #fbfcfc;
  font-size: 13px;
}

.order-search-field input:focus {
  border-color: #5b9b83;
  outline: 2px solid rgba(53, 135, 101, 0.12);
}

.order-search-glyph {
  position: absolute;
  top: 50%;
  left: 12px;
  z-index: 1;
  color: #718188;
  font-size: 18px;
  line-height: 1;
  transform: translateY(-50%);
  pointer-events: none;
}

.order-filter-summary {
  display: flex;
  min-height: 30px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  padding: 0 2px;
  color: #718188;
  font-size: 12px;
}

.order-filter-summary button {
  height: 28px;
  padding: 0 8px;
  border: 0;
  background: transparent;
  color: #28667f;
  font-size: 12px;
  font-weight: 600;
}

.order-list {
  display: grid;
  gap: 12px;
}

.order-record {
  overflow: hidden;
  border: 1px solid #d8e1e4;
  border-radius: 7px;
  background: #fff;
}

.order-record-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  min-height: 62px;
  padding: 11px 15px;
  border-bottom: 1px solid #e7edef;
  background: #f8fafb;
}

.order-record-title {
  display: grid;
  min-width: 0;
  grid-template-columns: auto minmax(150px, auto) 1fr;
  align-items: center;
  gap: 10px;
}

.order-record-title > div {
  display: flex;
  align-items: center;
  gap: 5px;
}

.order-record-title > strong {
  overflow: hidden;
  color: #20343b;
  font-family: Consolas, "Microsoft YaHei", sans-serif;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-record-title time {
  color: #829197;
  font-size: 11px;
  white-space: nowrap;
}

.order-test-tag {
  display: inline-flex;
  height: 22px;
  align-items: center;
  padding: 0 6px;
  border: 1px solid #e0cfa2;
  border-radius: 4px;
  background: #fff9e8;
  color: #8a6820;
  font-size: 10px;
  font-weight: 700;
}

.order-total {
  display: grid;
  min-width: 100px;
  justify-items: end;
  gap: 2px;
}

.order-total span {
  color: #7a898f;
  font-size: 10px;
}

.order-total strong {
  color: #c7462e;
  font-size: 19px;
}

.order-record-body {
  display: grid;
  grid-template-columns: minmax(210px, 0.72fr) minmax(380px, 1.6fr) minmax(150px, 0.52fr);
  min-width: 0;
}

.order-record-body > * {
  min-width: 0;
  padding: 14px 15px;
}

.order-record-body > * + * {
  border-left: 1px solid #e8edef;
}

.order-record-body h3 {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 10px;
  color: #5c6f77;
  font-size: 11px;
  font-weight: 700;
}

.order-record-body h3 span {
  display: inline-grid;
  min-width: 18px;
  height: 18px;
  place-items: center;
  border-radius: 9px;
  background: #edf2f3;
  color: #61747b;
  font-size: 9px;
}

.order-customer-block dl,
.order-fee-block dl {
  display: grid;
  gap: 7px;
  margin: 0;
}

.order-customer-block dl > div,
.order-fee-block dl > div {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  font-size: 12px;
}

.order-customer-block dt,
.order-fee-block dt {
  color: #8a989d;
}

.order-customer-block dd,
.order-fee-block dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
  color: #2d4047;
  font-weight: 600;
}

.order-fee-block dl > div {
  grid-template-columns: 1fr auto;
}

.order-fee-block dd {
  text-align: right;
}

.order-file-list {
  display: grid;
  gap: 7px;
}

.order-file-row {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 46px;
}

.order-file-row + .order-file-row {
  padding-top: 7px;
  border-top: 1px solid #eef2f3;
}

.order-file-type {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 5px;
  background: #f8ece8;
  color: #b64c36;
  font-size: 9px;
  font-weight: 800;
}

.order-file-copy {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.order-file-copy strong {
  overflow: hidden;
  color: #263a41;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-file-copy small {
  overflow: hidden;
  color: #7f8e94;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-file-download {
  width: auto;
  max-width: none;
  height: 28px;
  padding: 0 9px;
  border-color: #bcd0d7;
  background: #f8fbfc;
  color: #2a667b;
  font-size: 11px;
}

.order-file-pending {
  color: #9a772e;
  font-size: 10px;
  white-space: nowrap;
}

.order-no-files {
  padding: 10px 0;
  color: #8a989d;
  font-size: 11px;
}

.order-record-actions {
  margin-top: 13px;
  padding-top: 12px;
  border-top: 1px solid #e8edef;
}

.order-status-action {
  width: 100%;
  height: 32px;
  margin: 0;
  border: 1px solid #9fcab5;
  background: #eaf7f0;
  color: #176b48;
  font-size: 11px;
}

.order-status-action:hover {
  background: #dff1e8;
}

.order-remark {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 8px;
  padding: 9px 15px;
  border-top: 1px solid #e7edef;
  background: #fffaf0;
  font-size: 11px;
}

.order-remark span {
  color: #9a8151;
}

.order-remark strong {
  color: #5d4a29;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.order-empty {
  min-height: 180px;
}

@media (max-width: 980px) {
  .sidebar {
    width: 200px;
  }

  .main-shell {
    width: calc(100% - 200px);
    margin-left: 200px;
  }

  .content {
    grid-template-columns: 1fr;
    padding: 20px;
  }

  .topbar-description,
  .admin-user span:last-child {
    display: none;
  }

  .user-panel-header {
    grid-template-columns: 1fr auto;
  }

  .store-config-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .customer-service-qr-layout {
    grid-template-columns: minmax(0, 1fr) 150px;
  }

  .customer-service-qr-preview,
  .customer-service-qr-preview img {
    width: 150px;
    height: 150px;
    min-height: 150px;
  }

  .faq-column-labels {
    display: none;
  }

  .customer-service-faq-row {
    grid-template-columns: repeat(2, minmax(0, 1fr)) 72px 38px;
  }

  .customer-service-faq-row textarea {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .user-search-form {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .finance-stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .wechat-pay-status-box {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .order-toolbar {
    grid-template-columns: 1fr;
  }

  .order-record-body {
    grid-template-columns: minmax(200px, 0.75fr) minmax(360px, 1.5fr);
  }

  .order-fee-block {
    grid-column: 1 / -1;
    border-top: 1px solid #e8edef;
    border-left: 0 !important;
  }

  .order-fee-block dl {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
  }
}

@media (max-width: 680px) {
  .app-shell {
    display: block;
  }

  .sidebar {
    position: static;
    width: 100%;
    padding: 14px;
  }

  .brand {
    padding-bottom: 12px;
  }

  .store-status,
  .sidebar-footer {
    display: none;
  }

  .side-nav {
    grid-auto-columns: minmax(96px, max-content);
    grid-auto-flow: column;
    grid-template-columns: none;
    overflow-x: auto;
  }

  .nav-group {
    display: block;
  }

  .side-nav .nav-item {
    justify-content: center;
    padding: 0 8px;
    white-space: nowrap;
  }

  .nav-icon {
    display: none;
  }

  .main-shell {
    width: 100%;
    margin-left: 0;
  }

  .topbar {
    display: flex;
    padding: 12px 16px;
  }

  .topbar-actions {
    margin-top: 0;
  }

  .topbar button {
    margin-top: 0;
  }

  .admin-user {
    display: none;
  }

  .content {
    display: grid;
    padding: 16px;
  }

  .form-grid,
  .config-grid,
  .stat-grid {
    grid-template-columns: 1fr;
  }

  .finance-toolbar,
  .finance-filter-fields {
    align-items: stretch;
    flex-direction: column;
  }

  .finance-dimension {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .finance-date-field {
    justify-content: space-between;
  }

  .finance-date-field input {
    width: min(190px, 64vw);
  }

  .finance-refresh-button {
    justify-content: center;
  }

  .finance-detail-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }

  .wechat-pay-status-box {
    grid-template-columns: 1fr;
  }

  .order-record-header,
  .order-record-title {
    grid-template-columns: 1fr;
    justify-items: start;
  }

  .order-record-header {
    position: relative;
    padding-right: 108px;
  }

  .order-total {
    position: absolute;
    top: 12px;
    right: 14px;
  }

  .order-record-body {
    grid-template-columns: 1fr;
  }

  .order-record-body > * + * {
    border-top: 1px solid #e8edef;
    border-left: 0;
  }

  .order-fee-block {
    grid-column: auto;
  }

  .order-fee-block dl {
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .order-file-row {
    grid-template-columns: 34px minmax(0, 1fr) auto;
  }

  .order-file-type {
    width: 34px;
    height: 34px;
  }

  .customer-service-channel-list,
  .customer-service-qr-layout {
    grid-template-columns: 1fr;
  }

  .customer-service-section-heading,
  .faq-editor-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .customer-service-faq-row {
    grid-template-columns: minmax(0, 1fr) 72px 38px;
  }

  .customer-service-faq-row > input:first-child,
  .customer-service-faq-row > input:nth-child(2),
  .customer-service-faq-row textarea {
    grid-column: 1 / -1;
  }

  .customer-service-faq-row textarea {
    grid-row: auto;
  }

  .customer-service-qr-preview,
  .customer-service-qr-preview img {
    width: 172px;
    height: 172px;
    min-height: 172px;
  }

  .address-detail-field {
    grid-column: auto;
  }

  .data-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }
}

/* Order management uses a scan-friendly table; the drawer carries the dense detail. */
body.order-detail-open {
  overflow: hidden;
}

.order-table-wrap {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow: auto;
  border: 1px solid #d8e1e4;
  background: #fff;
}

.order-table {
  width: 100%;
  min-width: 1150px;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 12px;
}

.order-table th,
.order-table td {
  height: 52px;
  padding: 8px 12px;
  border-bottom: 1px solid #e8edef;
  color: #40535a;
  text-align: left;
  vertical-align: middle;
}

.order-table th {
  height: 40px;
  background: #f3f6f7;
  color: #65767d;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.order-table tbody tr:last-child td {
  border-bottom: 0;
}

.order-table tbody tr:hover {
  background: #f8fbfa;
}

.order-table th:nth-child(1),
.order-table td:nth-child(1) {
  width: 135px;
}

.order-table th:nth-child(2),
.order-table td:nth-child(2) {
  width: 125px;
}

.order-table th:nth-child(3),
.order-table td:nth-child(3) {
  width: 105px;
}

.order-table th:nth-child(4),
.order-table td:nth-child(4) {
  width: 82px;
}

.order-table th:nth-child(5),
.order-table td:nth-child(5) {
  width: 120px;
}

.order-table th:nth-child(6),
.order-table td:nth-child(6) {
  width: 90px;
}

.order-table th:nth-child(7),
.order-table td:nth-child(7) {
  width: 92px;
}

.order-table th:nth-child(8),
.order-table td:nth-child(8) {
  width: 135px;
}

.order-table th:nth-child(11),
.order-table td:nth-child(11) {
  width: 68px;
  text-align: center;
}

.order-payment-cell {
  color: #1d6757 !important;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.order-stage-cell {
  white-space: nowrap;
}

.order-stage-cell .admin-order-status {
  padding: 3px 7px;
  font-size: 10px !important;
}

.order-number-cell strong {
  display: block;
  overflow: hidden;
  color: #203f47;
  font-family: Consolas, "Microsoft YaHei", sans-serif;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-table time,
.order-customer-cell,
.order-remark-cell {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-table time {
  color: #718188;
  font-size: 11px;
}

.order-customer-cell {
  color: #2d4047;
  font-weight: 600;
}

.order-amount-cell {
  color: #c7462e !important;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}

.order-remark-cell {
  color: #64767d;
}

.order-express-cell,
.order-tracking-cell {
  overflow: hidden;
  color: #40535a;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-express-cell.pending,
.order-tracking-cell.pending {
  color: #a17a2d;
}

.order-detail-button {
  width: auto;
  min-width: 46px;
  height: 28px;
  padding: 0 9px;
  border: 1px solid #b8cbd2;
  border-radius: 4px;
  background: #fff;
  color: #28667f;
  font-size: 11px;
  font-weight: 700;
}

.order-detail-button:hover {
  border-color: #7da4b2;
  background: #f0f7f8;
}

.order-detail-mask {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(21, 32, 37, 0.42);
}

.order-detail-mask[hidden],
.order-detail-drawer[hidden] {
  display: none !important;
}

.order-detail-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 81;
  display: flex;
  width: min(1120px, 96vw);
  flex-direction: column;
  border-left: 1px solid #cbd8dc;
  background: #f5f7f8;
  box-shadow: -12px 0 34px rgba(22, 38, 44, 0.16);
}

.order-detail-header {
  display: flex;
  min-height: 92px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 22px;
  border-bottom: 1px solid #d8e1e4;
  background: #173f46;
  color: #fff;
  box-sizing: border-box;
}

.order-detail-kicker {
  display: block;
  margin-bottom: 3px;
  color: #9ed2c2;
  font-size: 11px;
  font-weight: 700;
}

.order-detail-header h2 {
  max-width: 470px;
  margin: 0;
  overflow: hidden;
  font-family: Consolas, "Microsoft YaHei", sans-serif;
  font-size: 18px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-detail-header p {
  margin: 5px 0 0;
  color: #d4e6e3;
  font-size: 12px;
}

.order-detail-close {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 4px;
  background: transparent;
  color: #fff;
  font-size: 25px;
  font-weight: 400;
  line-height: 1;
}

.order-detail-content {
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.order-detail-columns {
  display: grid;
  height: 100%;
  min-height: 0;
  grid-template-columns: minmax(0, 3fr) minmax(330px, 2fr);
}

.order-detail-main {
  min-width: 0;
  min-height: 0;
  overflow-y: auto;
  padding: 18px 20px 30px;
}

.order-detail-overview {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  overflow: hidden;
  border: 1px solid #d9e2e5;
  background: #d9e2e5;
}

.order-detail-overview > div {
  display: grid;
  min-width: 0;
  gap: 6px;
  padding: 12px 14px;
  background: #fff;
}

.order-detail-overview > div.order-detail-address {
  grid-column: 1 / -1;
}

.order-detail-overview span:not(.admin-order-status) {
  color: #76868d;
  font-size: 11px;
}

.order-detail-overview strong {
  min-width: 0;
  overflow-wrap: anywhere;
  color: #273a41;
  font-size: 13px;
}

.order-detail-overview .admin-order-status {
  vertical-align: middle;
}

.order-detail-section {
  margin-top: 14px;
  border: 1px solid #d9e2e5;
  background: #fff;
}

.order-detail-section-title {
  display: flex;
  min-height: 44px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 14px;
  border-bottom: 1px solid #e8edef;
  background: #f8fafb;
}

.order-detail-section-title h3 {
  margin: 0;
  color: #4d626a;
  font-size: 12px;
}

.order-detail-section-title span {
  color: #87949a;
  font-size: 11px;
}

.order-detail-file-list {
  display: grid;
  gap: 0;
  padding: 6px 14px;
}

.order-detail-file-list .order-file-row {
  min-height: 56px;
}

.order-detail-file-list .order-file-row + .order-file-row {
  padding-top: 8px;
}

.order-file-unavailable {
  color: #a94c42;
  font-size: 10px;
  white-space: nowrap;
}

.order-detail-actions {
  margin-top: 14px;
}

.order-detail-actions .order-status-action {
  width: 100%;
  height: 36px;
}

.order-management-panel {
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 14px;
  padding: 10px 12px;
  border: 1px solid #d9e2e5;
  background: #fff;
  box-sizing: border-box;
}

.order-management-copy {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.order-management-copy strong {
  color: #33484f;
  font-size: 12px;
}

.order-management-copy span {
  color: #7a8a90;
  font-size: 10px;
}

.order-management-buttons {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 8px;
}

.order-management-button {
  width: auto;
  min-width: 72px;
  height: 30px;
  padding: 0 11px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.order-management-button.reset {
  border: 1px solid #d7bd7a;
  background: #fff9e9;
  color: #8a6417;
}

.order-management-button.refund {
  border: 1px solid #e0a89f;
  background: #fff2ef;
  color: #b34738;
}

.order-management-button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.order-refunded-label {
  color: #b04b3d;
  font-size: 11px;
  font-weight: 700;
}

.refund-password-modal[hidden] {
  display: none !important;
}

.refund-password-modal {
  position: fixed;
  z-index: 60;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
}

.refund-password-mask {
  position: absolute;
  inset: 0;
  background: rgba(18, 34, 40, 0.46);
}

.refund-password-dialog {
  position: relative;
  width: min(100%, 360px);
  padding: 22px;
  border: 1px solid #dbe3e6;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 50px rgba(20, 42, 51, 0.22);
}

.refund-password-heading h2 {
  margin: 6px 0 5px;
  color: #25383f;
  font-size: 18px;
}

.refund-password-heading p {
  margin: 0 0 18px;
  color: #72838a;
  font-size: 12px;
}

.refund-password-form {
  display: grid;
  gap: 12px;
}

.refund-password-form input {
  height: 42px;
}

.refund-password-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.refund-password-actions button {
  min-width: 76px;
  height: 34px;
  padding: 0 12px;
  font-size: 12px;
}

.order-shipment-editor {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
  padding: 14px;
  border: 1px solid #d9e2e5;
  background: #fff;
}

.order-shipment-field {
  display: grid;
  min-width: 0;
  gap: 6px;
}

.order-shipment-field span {
  color: #65777e;
  font-size: 11px;
  font-weight: 700;
}

.order-shipment-field input {
  width: 100%;
  height: 36px;
  padding: 0 10px;
  border: 1px solid #c4d2d7;
  border-radius: 4px;
  background: #fff;
  color: #263a41;
  font-size: 12px;
  box-sizing: border-box;
}

.order-shipment-field input:focus {
  border-color: #3b8e6b;
  outline: 2px solid rgba(59, 142, 107, 0.12);
}

.order-shipment-editor .order-status-action {
  grid-column: 1 / -1;
  width: 100%;
  height: 36px;
  margin: 0;
}

.order-detail-logistics-column {
  min-width: 0;
  min-height: 0;
  overflow-y: auto;
  border-left: 1px solid #d5e0e3;
  background: #fff;
}

.order-logistics-header {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  min-height: 68px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 18px;
  border-bottom: 1px solid #dce5e7;
  background: #f7faf9;
  box-sizing: border-box;
}

.order-logistics-header > div:first-child {
  min-width: 0;
}

.order-logistics-header span {
  display: block;
  margin-bottom: 2px;
  color: #829198;
  font-size: 10px;
}

.order-logistics-header h3 {
  margin: 0;
  color: #31464e;
  font-size: 15px;
}

.order-logistics-header-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 9px;
}

.order-logistics-header-actions strong {
  color: #197455;
  font-size: 11px;
}

.order-logistics-header-actions button {
  width: auto;
  height: 27px;
  padding: 0 9px;
  border: 1px solid #b9cfc7;
  border-radius: 4px;
  background: #fff;
  color: #27745a;
  font-size: 10px;
  font-weight: 700;
}

.order-logistics-header-actions button:disabled {
  cursor: default;
  opacity: 0.55;
}

.order-logistics-shipment {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
  gap: 14px;
  padding: 15px 18px;
  border-bottom: 1px solid #e7edef;
}

.order-logistics-shipment > div {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.order-logistics-shipment span {
  color: #87969c;
  font-size: 10px;
}

.order-logistics-shipment strong {
  overflow: hidden;
  color: #344850;
  font-family: Consolas, "Microsoft YaHei", sans-serif;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-logistics-shipment small {
  position: absolute;
  right: 18px;
  bottom: -20px;
  color: #98a5aa;
  font-size: 9px;
}

.order-logistics-content {
  padding: 26px 18px 24px;
}

.order-logistics-notice {
  margin-bottom: 14px;
  padding: 8px 10px;
  border-left: 3px solid #d19a4c;
  background: #fff9ef;
  color: #92692d;
  font-size: 10px;
  line-height: 16px;
}

.order-logistics-latest {
  display: grid;
  gap: 6px;
  padding: 13px 14px;
  border: 1px solid #dce9e4;
  background: #f4faf7;
}

.order-logistics-latest span {
  color: #729083;
  font-size: 10px;
}

.order-logistics-latest strong {
  color: #28664f;
  font-size: 11px;
  line-height: 18px;
}

.order-logistics-timeline {
  padding: 18px 4px 0;
}

.order-logistics-trace {
  position: relative;
  display: flex;
  min-height: 52px;
  padding: 0 0 16px 24px;
  box-sizing: border-box;
}

.order-logistics-trace::before {
  position: absolute;
  top: 10px;
  bottom: -2px;
  left: 5px;
  width: 1px;
  background: #dbe5e1;
  content: '';
}

.order-logistics-trace:last-child::before {
  display: none;
}

.order-logistics-trace > i {
  position: absolute;
  top: 3px;
  left: 0;
  width: 11px;
  height: 11px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: #a9b7b2;
  box-shadow: 0 0 0 1px #c7d3cf;
  box-sizing: border-box;
}

.order-logistics-trace.latest > i {
  background: #168f5b;
  box-shadow: 0 0 0 1px #63aa8b;
}

.order-logistics-trace > div {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.order-logistics-trace strong {
  color: #52646b;
  font-size: 11px;
  line-height: 17px;
}

.order-logistics-trace.latest strong {
  color: #216b4e;
}

.order-logistics-trace span,
.order-logistics-no-traces {
  color: #97a3a8;
  font-size: 10px;
  line-height: 15px;
}

.order-logistics-empty,
.order-logistics-loading {
  display: grid;
  min-height: 220px;
  place-content: center;
  gap: 8px;
  padding: 20px;
  color: #8b999e;
  text-align: center;
  box-sizing: border-box;
}

.order-logistics-empty strong {
  color: #52656c;
  font-size: 12px;
}

.order-logistics-empty span,
.order-logistics-loading span {
  max-width: 270px;
  font-size: 10px;
  line-height: 17px;
}

.order-logistics-empty.error strong {
  color: #a45447;
}

.order-logistics-loading i {
  display: block;
  width: 180px;
  height: 3px;
  overflow: hidden;
  border-radius: 2px;
  background: #e2ebe7;
}

.order-logistics-loading b {
  display: block;
  width: 42%;
  height: 100%;
  background: #3c9270;
  animation: order-logistics-progress 1.1s ease-in-out infinite alternate;
}

@keyframes order-logistics-progress {
  from { transform: translateX(0); }
  to { transform: translateX(140%); }
}

@media (max-width: 680px) {
  .order-detail-drawer {
    width: 100vw;
  }

  .order-detail-header {
    padding: 16px;
  }

  .order-detail-content {
    overflow-y: auto;
  }

  .order-detail-columns {
    display: block;
    height: auto;
  }

  .order-detail-main {
    overflow: visible;
    padding: 14px 12px 24px;
  }

  .order-detail-logistics-column {
    overflow: visible;
    border-top: 1px solid #d5e0e3;
    border-left: 0;
  }

  .order-logistics-header {
    position: static;
  }

  .order-shipment-editor {
    grid-template-columns: 1fr;
  }

  .order-shipment-editor .order-status-action {
    grid-column: auto;
  }

}

@media (max-width: 980px) {
  .content,
  .admin-panel[data-section-panel="orders"],
  .order-toolbar,
  .order-status-filters {
    min-width: 0;
  }

  .list-pagination {
    flex-wrap: wrap;
    justify-content: space-between;
  }

  .list-pagination-summary {
    width: 100%;
    margin-right: 0;
  }

  .list-pagination-pages {
    max-width: 100%;
    overflow-x: auto;
    padding-bottom: 2px;
  }
}

@media (max-width: 620px) {
  .friend-help-config-grid {
    grid-template-columns: 1fr;
  }

  .friend-help-admin-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .list-pagination {
    align-items: flex-start;
    gap: 8px;
  }

  .list-pagination-size,
  .list-pagination-pages {
    width: 100%;
  }

  .list-pagination-pages {
    justify-content: flex-start;
  }
}
