/* 真实订单、人工客服、管理工作台与付款倒计时的展示样式。所有状态类来自 API 返回，业务状态转换由 Java 后端执行。 */
/* 接口错误提示：用于表单保留输入后的重试说明。 */
.api-error {
  padding: 12px 14px;
  background: #fff0ed;
  border: 1px solid #f4c6bd;
  color: #a63b25;
  font-size: 14px;
  border-radius: 6px;
  line-height: 1.7;
}
.loading-state,
.chat-empty {
  padding: 24px;
  color: #777;
  text-align: center;
}
.chat-bubble p,
.order-help-record p,
.order-timeline p {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
/* 订单处理记录时间轴；状态颜色与 pending/processing/completed 等接口状态对应。 */
.order-timeline {
  list-style: none;
  padding: 0 0 0 15px;
  border-left: 2px solid #ffe0c3;
  margin: 20px 0;
}
.order-timeline li {
  padding: 0 0 18px 15px;
  position: relative;
}
.order-timeline li:before {
  content: "";
  position: absolute;
  left: -21px;
  top: 5px;
  background: #ff7a00;
  border: 3px solid #fff;
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.order-timeline small {
  display: block;
  font-size: 12px;
  color: #999;
  margin-top: 3px;
}
.order-timeline p {
  margin: 7px 0;
  font-size: 14px;
  line-height: 1.7;
}
.status-pending {
  background: #fff2df;
  color: #a9691c;
}
.status-accepted,
.status-processing {
  background: #e9f2ff;
  color: #366899;
}
.status-completed {
  background: #e8f4eb;
  color: #358153;
}
.status-declined,
.status-cancelled {
  background: #f1f2f3;
  color: #777;
}
/* 访客客服历史列表及聊天消息附加信息。 */
.conversation-row {
  width: 100%;
  padding: 17px;
  border: 1px solid #e8e8e8;
  background: white;
  text-align: left;
  margin-bottom: 10px;
  border-radius: 6px;
}
.conversation-row strong,
.conversation-row span {
  display: block;
}
.conversation-row span {
  font-size: 12px;
  color: #888;
  margin-top: 8px;
}
.chat-form .api-error {
  grid-column: 1/-1;
  width: 100%;
}
.chat-meta {
  font-size: 11px;
}
.chat-system-note {
  line-height: 1.7;
}
.chat-log {
  overflow-anchor: auto;
}
button:disabled {
  cursor: wait;
  opacity: 0.6;
}
.form-field small {
  font-size: 12px;
  color: #888;
}
/* 后台页面整体容器、页头和管理身份展示。 */
.admin-body {
  background: #f5f6f7;
  color: #333;
}
.admin-header {
  height: 78px;
  background: #fff;
  border-bottom: 1px solid #e3e6e8;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 max(24px, calc((100vw - 1320px) / 2));
  gap: 20px;
}
.admin-header > div {
  display: flex;
  gap: 25px;
  align-items: center;
  font-size: 13px;
  color: #888;
}
.admin-brand {
  display: flex;
  gap: 12px;
  align-items: center;
  text-decoration: none;
  color: #333;
}
.admin-brand strong {
  font-size: 21px;
}
.admin-brand small {
  font-size: 13px;
  color: #999;
  margin-left: 8px;
}
.admin-shell {
  max-width: 1320px;
  margin: 32px auto;
  padding: 0 24px 30px;
}
.admin-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
}
.admin-title h1 {
  font-size: 26px;
  margin: 0 0 8px;
}
.admin-title p {
  font-size: 13px;
  color: #888;
  margin: 0;
}
/* 后台订单和待回复统计卡片。 */
.admin-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-bottom: 24px;
}
.admin-stats > div {
  padding: 20px 24px;
  background: #fff;
  border: 1px solid #e4e6e8;
  border-radius: 6px;
}
.admin-stats span {
  font-size: 13px;
  color: #888;
  display: block;
}
.admin-stats strong {
  font-size: 30px;
  display: block;
  margin-top: 6px;
}
.admin-stats .stat-closed {
  font-size: 22px;
  color: #999;
  margin-top: 13px;
}
/* 商品、订单、客服栏目按钮；active 与面板 hidden 由 selectAdminTab 切换。 */
.admin-tabs {
  display: flex;
  background: #fff;
  border: 1px solid #e4e6e8;
  border-bottom: 0;
  border-radius: 6px 6px 0 0;
}
.admin-tabs button {
  padding: 17px 24px;
  border: 0;
  background: #fff;
  color: #666;
  font-size: 15px;
}
.admin-tabs button.active {
  color: #e97312;
  border-bottom: 3px solid #ff7a00;
  font-weight: 700;
}
.admin-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  padding: 17px 20px;
  background: #fff;
  border: 1px solid #e4e6e8;
  font-size: 12px;
  color: #888;
}
.admin-toolbar label {
  color: #555;
  font-size: 13px;
  white-space: nowrap;
}
.admin-toolbar select {
  padding: 6px 30px 6px 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: white;
  margin-left: 8px;
}
/* 后台列表与详情双栏，窄屏通过响应式规则纵向堆叠。 */
.admin-split {
  display: grid;
  grid-template-columns: 390px minmax(0, 1fr);
  border: 1px solid #e4e6e8;
  border-top: 0;
  background: #fff;
  min-height: 480px;
}
.admin-list {
  max-height: 650px;
  overflow: auto;
}
.admin-record {
  width: 100%;
  display: block;
  text-align: left;
  padding: 17px 18px;
  border: 0;
  border-bottom: 1px solid #eceff1;
  background: #fff;
}
.admin-record:hover,
.admin-record.selected {
  background: #fff8f1;
}
.admin-record > span {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}
.admin-record strong {
  font-size: 14px;
  line-height: 1.6;
}
.admin-record small {
  font-size: 11px;
  color: #999;
  display: block;
  margin-top: 8px;
  overflow-wrap: anywhere;
}
.admin-record b {
  font-size: 12px;
  white-space: nowrap;
}
.admin-record .order-status {
  font-weight: 400;
  padding: 4px 7px;
}
.reply-badge {
  padding: 3px 7px;
  background: #fff0e1;
  color: #de791f;
  border-radius: 3px;
}
/* 后台订单/客服详情、消息历史和人工处理表单。 */
.admin-detail {
  border-left: 1px solid #e5e8ea;
  padding: 25px 28px;
  min-width: 0;
}
.admin-detail h2 {
  font-size: 18px;
  overflow-wrap: anywhere;
  margin: 6px 0 15px;
}
.admin-detail h3 {
  font-size: 15px;
  margin: 25px 0 10px;
}
.admin-detail p {
  font-size: 13px;
  line-height: 1.8;
}
.admin-placeholder {
  text-align: center;
  padding: 55px 12px;
  color: #999;
  font-size: 14px;
}
.detail-kicker {
  font-size: 12px;
  color: #999;
}
.admin-items > div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid #f0f0f0;
  font-size: 13px;
}
.admin-chat-heading {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}
.admin-chat-heading .button {
  padding: 7px 12px;
  font-size: 12px;
}
.admin-detail .chat-log {
  height: 350px;
  margin: 12px 0;
}
.admin-footnote {
  font-size: 12px;
  color: #aaa;
  margin: 20px 0;
}
.reply-result {
  color: #428157;
  font-size: 12px;
}
.admin-header [href="/"] {
  white-space: nowrap;
}
.admin-header #admin-identity {
  overflow-wrap: anywhere;
}
.admin-split [hidden],
.admin-shell [hidden] {
  display: none !important;
}
/* 屏幕宽度不超过 850px 时的布局调整；媒体规则的包含关系是合法 CSS 语法。 */
@media (max-width: 850px) {
  .admin-split {
    grid-template-columns: 300px minmax(0, 1fr);
  }
  .admin-detail {
    padding: 20px;
  }
  .admin-header #admin-identity {
    display: none;
  }
  .admin-shell {
    padding: 0 14px;
    margin-top: 20px;
  }
  .admin-toolbar {
    flex-wrap: wrap;
  }
  .admin-record strong {
    font-size: 13px;
  }
}
/* 屏幕宽度不超过 620px 时的布局调整；媒体规则的包含关系是合法 CSS 语法。 */
@media (max-width: 620px) {
  .admin-split {
    display: block;
  }
  .admin-list {
    max-height: 260px;
    border-bottom: 1px solid #ddd;
  }
  .admin-detail {
    border-left: 0;
    border-top: 1px solid #ddd;
  }
  .admin-stats {
    gap: 8px;
  }
  .admin-stats > div {
    padding: 14px 11px;
  }
  .admin-stats strong {
    font-size: 24px;
  }
  .admin-stats .stat-closed {
    font-size: 18px;
  }
  .admin-stats span {
    font-size: 11px;
  }
  .admin-title {
    gap: 10px;
  }
  .admin-title h1 {
    font-size: 22px;
  }
  .admin-header {
    padding: 0 14px;
  }
  .admin-brand strong {
    font-size: 17px;
  }
  .admin-brand small {
    display: block;
    margin: 2px 0;
  }
  .admin-title .button {
    font-size: 12px;
    padding: 9px 12px;
  }
  .admin-toolbar > span {
    line-height: 1.7;
  }
  .admin-detail .chat-log {
    height: 300px;
  }
}
/* 订单付款与人工审核卡片，含二维码和收款网络说明。 */
.order-payment-panel {
  padding: 18px;
  margin: 20px 0;
  border: 1px solid #f4d8b3;
  border-radius: 10px;
  background: #fff8ee;
  min-width: 0;
  overflow-wrap: anywhere;
}
.wallet-receive {
  display: grid;
  grid-template-columns: minmax(0, 260px) minmax(0, 1fr);
  align-items: center;
  gap: 20px;
  margin-top: 16px;
}
.wallet-qr {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
  background: #fff;
}
.wallet-receive-details {
  min-width: 0;
}
.wallet-receive-details p {
  font-size: 14px;
  line-height: 1.7;
  margin: 0;
}
.wallet-receive-details .button {
  margin-top: 14px;
  min-height: 44px;
}
/* 屏幕宽度不超过 600px 时的布局调整；媒体规则的包含关系是合法 CSS 语法。 */
@media (max-width: 600px) {
  .wallet-receive {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }
  .wallet-qr {
    width: min(100%, 300px);
    justify-self: center;
  }
  .wallet-receive-details .button {
    width: 100%;
  }
}
/* 付款结果、查询次数、两分钟倒计时和下次查询间隔。 */
.payment-state-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.payment-state-heading h3 {
  margin: 0;
  font-size: 18px;
}
.payment-state-heading span,
.payment-retry {
  font-size: 14px;
  color: #70543b;
}
.payment-query-message {
  font-size: 16px;
  line-height: 1.7;
  margin: 12px 0;
}
.payment-countdown {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 0;
  font-size: 16px;
}
.payment-countdown strong {
  font-size: 32px;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
  color: #ad4b00;
}
.payment-retry strong {
  font-variant-numeric: tabular-nums;
}
.order-payment-panel .button {
  white-space: normal;
  min-height: 44px;
}
/* 屏幕宽度不超过 480px 时的布局调整；媒体规则的包含关系是合法 CSS 语法。 */
@media (max-width: 480px) {
  .order-payment-panel {
    padding: 14px;
  }
  .payment-state-heading {
    gap: 6px;
  }
  .payment-countdown strong {
    font-size: 28px;
  }
}
