/* ============================================================
   管理后台样式
   品牌：亮蓝 (blue) + 柔和香槟金 (gold)，浅色通透风格，与小程序端一致
   ============================================================ */
:root {
  --ink: #33507e;
  --ink-2: #4a6b9e;
  --ink-3: #6d8bb8;
  --gold: #c9a063;
  --gold-deep: #a87f3e;
  --gold-light: #e6cb98;
  --gold-soft: #fdf6e9;

  --primary: #4a80c8;
  --primary-dark: #3a6aa8;
  --primary-light: #eef4fd;

  --success: #3aa585;
  --warning: #e0a13c;
  --danger: #e8675c;

  --text-1: #26395c;
  --text-2: #5e7295;
  --text-3: #94a5bf;
  --text-4: #c6d2e4;

  --border: #e4ebf5;
  --hair: #eef3fa;
  --bg: #f4f7fc;
  --white: #fff;

  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(70, 110, 170, 0.05), 0 6px 18px rgba(70, 110, 170, 0.07);
  --shadow-lg: 0 18px 48px rgba(38, 57, 92, 0.16);
  --sidebar-w: 226px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  color: var(--text-1);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--gold-deep); text-decoration: none; }
img { display: block; }
input, select, textarea, button { font-family: inherit; font-size: inherit; }

svg { display: block; }

/* ---------------- 登录页 ---------------- */
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: stretch;
  background: var(--bg);
}
.login-side {
  flex: 1;
  background: linear-gradient(155deg, #ffffff 0%, #eaf2fd 48%, #dfeafb 100%);
  color: var(--text-1);
  padding: 64px 56px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.login-side::before {
  content: '';
  position: absolute;
  right: -140px;
  top: -120px;
  width: 460px;
  height: 460px;
  border-radius: 50%;
  border: 1px solid rgba(201, 160, 99, 0.32);
}
.login-side::after {
  content: '';
  position: absolute;
  right: -80px;
  top: -60px;
  width: 340px;
  height: 340px;
  border-radius: 50%;
  border: 1px solid rgba(201, 160, 99, 0.2);
}
.login-side .mark {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: 2px solid var(--gold-light);
  background: #ffffff;
  color: var(--gold-deep);
  box-shadow: 0 8px 22px rgba(201, 160, 99, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 30px;
  position: relative;
  z-index: 1;
}
.login-side h2 {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: 2px;
  line-height: 1.4;
  color: var(--text-1);
  position: relative;
  z-index: 1;
}
.login-side p {
  margin-top: 14px;
  font-size: 13.5px;
  color: var(--text-3);
  letter-spacing: 1px;
  position: relative;
  z-index: 1;
}
.login-side ul {
  margin-top: 44px;
  list-style: none;
  position: relative;
  z-index: 1;
}
.login-side li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13.5px;
  color: var(--text-2);
  margin-bottom: 16px;
}
.login-side li .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
  flex: 0 0 auto;
}

.login-main {
  width: 480px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  background: var(--white);
}
.login-card {
  width: 100%;
  max-width: 330px;
}
.login-card h1 {
  font-size: 21px;
  font-weight: 600;
  letter-spacing: 1px;
}
.login-card .sub {
  color: var(--text-3);
  font-size: 13px;
  margin-top: 8px;
  margin-bottom: 34px;
  letter-spacing: 0.5px;
}
.login-tip {
  margin-top: 22px;
  padding: 12px 14px;
  background: var(--gold-soft);
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  color: #8a6524;
  line-height: 1.8;
  border-left: 3px solid var(--gold);
}
@media (max-width: 860px) {
  .login-side { display: none; }
  .login-main { width: 100%; }
}

/* ---------------- 布局 ---------------- */
.layout { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w);
  background: #ffffff;
  color: var(--text-2);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 20;
  overflow-y: auto;
}
.sidebar::-webkit-scrollbar { width: 0; }

.sidebar-brand {
  padding: 20px 18px 18px;
  display: flex;
  align-items: center;
  gap: 11px;
  border-bottom: 1px solid var(--hair);
  position: sticky;
  top: 0;
  background: #ffffff;
  z-index: 2;
}
.sidebar-brand .logo {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid var(--gold-light);
  background: #ffffff;
  color: var(--gold-deep);
  box-shadow: 0 4px 12px rgba(201, 160, 99, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 600;
  flex: 0 0 auto;
}
.sidebar-brand .name { font-size: 13.5px; font-weight: 600; line-height: 1.35; letter-spacing: 0.5px; color: var(--text-1); }
.sidebar-brand .name small {
  display: block;
  font-size: 10.5px;
  color: var(--text-3);
  font-weight: 400;
  letter-spacing: 1px;
  margin-top: 2px;
}

.nav-group { padding: 16px 0 2px; }
.nav-group-title {
  padding: 0 20px 8px;
  font-size: 10.5px;
  color: var(--text-3);
  letter-spacing: 1.5px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 20px;
  color: var(--text-2);
  cursor: pointer;
  font-size: 13.5px;
  border-left: 2px solid transparent;
  transition: background 0.15s, color 0.15s;
  position: relative;
}
.nav-item:hover { background: var(--primary-light); color: var(--primary-dark); }
.nav-item.active {
  background: linear-gradient(90deg, rgba(74, 128, 200, 0.12), rgba(74, 128, 200, 0.01));
  color: var(--primary-dark);
  border-left-color: var(--primary);
  font-weight: 600;
}
.nav-item .ico {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  opacity: 0.9;
}
.nav-item.active .ico { opacity: 1; color: var(--primary); }
.nav-item .badge {
  margin-left: auto;
  background: var(--danger);
  color: #fff;
  font-size: 10.5px;
  padding: 1px 6px;
  border-radius: 9px;
  min-width: 18px;
  text-align: center;
  line-height: 1.5;
}

.main {
  flex: 1;
  margin-left: var(--sidebar-w);
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.topbar {
  height: 60px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 15;
}
.topbar .titles { min-width: 0; }
.topbar h2 { font-size: 16px; font-weight: 600; letter-spacing: 0.5px; }
.topbar .desc { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.topbar .spacer { flex: 1; }

.icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-2);
  position: relative;
  transition: all 0.15s;
}
.icon-btn:hover { background: var(--bg); color: var(--text-1); border-color: var(--border); }
.icon-btn .dot {
  position: absolute;
  top: 2px;
  right: 1px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  background: var(--danger);
  color: #fff;
  border-radius: 8px;
  font-size: 10px;
  line-height: 16px;
  text-align: center;
  font-weight: 600;
  border: 2px solid #fff;
  box-sizing: content-box;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 4px 12px 4px 4px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text-2);
  border: 1px solid transparent;
  transition: all 0.15s;
}
.user-chip:hover { background: var(--bg); border-color: var(--border); }
.avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6a9ad9, #4a80c8);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11.5px;
  font-weight: 600;
}

.content { padding: 22px 24px 60px; flex: 1; }

/* ---------------- 卡片 / 面板 ---------------- */
.panel {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.panel + .panel { margin-top: 18px; }
.panel-head {
  padding: 16px 20px;
  border-bottom: 1px solid var(--hair);
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.panel-head h3 {
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: 0.5px;
  position: relative;
  padding-left: 12px;
}
.panel-head h3::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 14px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--gold-light), var(--gold));
}
.panel-head .spacer { flex: 1; }
.panel-body { padding: 20px; }
.panel-body.no-pad { padding: 0; }

/* ---------------- 统计卡 ---------------- */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(196px, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}
.stat-card {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 18px 20px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
  transition: transform 0.16s, box-shadow 0.16s;
}
.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(70, 110, 170, 0.1);
}
.stat-card .label {
  font-size: 12.5px;
  color: var(--text-3);
  margin-bottom: 10px;
  letter-spacing: 0.5px;
}
.stat-card .value {
  font-size: 27px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.5px;
  color: var(--ink);
}
.stat-card .unit {
  font-size: 12.5px;
  color: var(--text-3);
  font-weight: 400;
  margin-left: 4px;
}
.stat-card .ico-wrap {
  position: absolute;
  right: 16px;
  top: 16px;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gold-soft);
  color: var(--gold-deep);
}
.stat-card.success .ico-wrap { background: #e9f4ef; color: var(--success); }
.stat-card.warning .ico-wrap { background: #fbf1e2; color: var(--gold-deep); }
.stat-card.danger .ico-wrap { background: #fbeceb; color: var(--danger); }
.stat-card.purple .ico-wrap { background: #f2eef7; color: #6b4f8a; }
.stat-card.blue .ico-wrap { background: #eef1f6; color: var(--ink-3); }

/* ---------------- 按钮 ---------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 34px;
  padding: 0 15px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--text-1);
  cursor: pointer;
  font-size: 13.5px;
  transition: all 0.15s;
  white-space: nowrap;
  letter-spacing: 0.3px;
}
.btn:hover { border-color: var(--primary); color: var(--primary-dark); background: #f7faff; }
.btn-primary {
  background: linear-gradient(135deg, #6a9ad9, #4a80c8);
  border-color: #4a80c8;
  color: #fff;
  box-shadow: 0 4px 12px rgba(74, 128, 200, 0.26);
}
.btn-primary:hover {
  background: linear-gradient(135deg, #5d8fd2, #3a6aa8);
  border-color: #3a6aa8;
  color: #fff;
}
.btn-gold {
  background: linear-gradient(135deg, #e2c391, #c9a063);
  border-color: #c9a063;
  color: #fff;
  box-shadow: 0 4px 12px rgba(201, 160, 99, 0.26);
}
.btn-gold:hover { background: linear-gradient(135deg, #d8b884, #b98f52); border-color: #b98f52; color: #fff; }
.btn-danger { color: var(--danger); border-color: #f8d9d5; background: #fff; }
.btn-danger:hover { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-sm { height: 29px; padding: 0 11px; font-size: 13px; }
.btn-text {
  border: none;
  background: transparent;
  color: var(--primary-dark);
  padding: 0 7px;
  height: 28px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13.5px;
  transition: background 0.15s;
}
.btn-text:hover { background: var(--primary-light); }
.btn-text.danger { color: var(--danger); }
.btn-text.danger:hover { background: #fdeeec; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn .ico { width: 15px; height: 15px; }

/* ---------------- 表单 ---------------- */
.field { margin-bottom: 18px; }
/* 注意：这里必须排除 .switch —— 开关本身就是一个 <label>，
   否则 display:block 会盖掉开关的 inline-flex，滑轨宽度塌成 0，圆钮压到文字上 */
.field > label:not(.switch) {
  display: block;
  margin-bottom: 7px;
  font-size: 13px;
  color: var(--text-2);
  font-weight: 500;
  letter-spacing: 0.3px;
}
.field > label .req { color: var(--danger); margin-left: 3px; }
.field .tip { font-size: 12px; color: var(--text-3); margin-top: 6px; line-height: 1.6; }
.input, .select, .textarea {
  width: 100%;
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  outline: none;
  background: #fbfdff;
  color: var(--text-1);
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}
.textarea { height: auto; min-height: 88px; padding: 10px 12px; resize: vertical; line-height: 1.65; }
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--primary);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(74, 128, 200, 0.14);
}
.input::placeholder, .textarea::placeholder { color: var(--text-4); }
.input[type="color"] { padding: 3px; height: 38px; cursor: pointer; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 720px) { .form-grid { grid-template-columns: 1fr; } }

/* 开关
   注意：.switch 本身是 <label>，必须用 !important 级别的选择器保证它是 flex，
   否则 .field > label 的 display:block 会把滑轨压扁（历史 bug） */
label.switch,
.field > label.switch {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
  margin-bottom: 0;
  font-weight: 400;
  height: 38px;
}
.switch input { display: none; }
.switch .track {
  display: inline-block;
  width: 42px;
  height: 24px;
  border-radius: 12px;
  background: #dbe3ef;
  position: relative;
  transition: background 0.22s ease;
  flex: 0 0 auto;
  border: 1px solid rgba(112, 148, 200, 0.14);
}
.switch .track::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.22s ease;
  box-shadow: 0 1px 3px rgba(38, 57, 92, 0.24);
}
.switch input:checked + .track {
  background: linear-gradient(135deg, #6a9ad9, #4a80c8);
  border-color: #4a80c8;
}
.switch input:checked + .track::after { transform: translateX(18px); }
.switch:hover .track { box-shadow: 0 0 0 3px rgba(74, 128, 200, 0.14); }

/* 状态文字：开启时用金色加重，一眼能看出状态 */
.switch .txt {
  font-size: 13px;
  color: var(--text-3);
  transition: color 0.2s;
  white-space: nowrap;
}
.switch input:checked ~ .txt {
  color: var(--primary-dark);
  font-weight: 600;
}

/* 图片上传 */
.uploader { display: flex; flex-wrap: wrap; gap: 10px; }
.uploader .thumb {
  width: 92px;
  height: 92px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  overflow: hidden;
  position: relative;
  background: var(--bg);
}
.uploader .thumb img { width: 100%; height: 100%; object-fit: cover; }
.uploader .thumb .del {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(38, 57, 92, 0.55);
  color: #fff;
  border: none;
  cursor: pointer;
  font-size: 12px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.uploader .add {
  width: 92px;
  height: 92px;
  border-radius: var(--radius-sm);
  border: 1px dashed var(--text-4);
  background: #f8fbff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
  color: var(--text-3);
  font-size: 12px;
  transition: all 0.15s;
}
.uploader .add:hover { border-color: var(--primary); color: var(--primary-dark); background: var(--primary-light); }
.uploader .add .plus { font-size: 19px; line-height: 1; }
.uploader.busy { opacity: 0.6; pointer-events: none; }

/* ---------------- 表格 ---------------- */
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.data th {
  text-align: left;
  padding: 12px 16px;
  background: #f6f9fe;
  color: var(--text-2);
  font-weight: 500;
  font-size: 12.5px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  letter-spacing: 0.5px;
}
table.data td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--hair);
  vertical-align: middle;
}
table.data tbody tr { transition: background 0.12s; }
table.data tbody tr:hover { background: #f8fbff; }
table.data tbody tr:last-child td { border-bottom: none; }
table.data .col-actions { white-space: nowrap; width: 1%; }
table.data img.thumb-sm {
  width: 44px;
  height: 44px;
  border-radius: 6px;
  object-fit: cover;
  border: 1px solid var(--border);
}
.cell-main { font-weight: 500; }
.cell-sub { font-size: 12px; color: var(--text-3); margin-top: 3px; }

.empty { text-align: center; padding: 64px 20px; color: var(--text-3); font-size: 13.5px; }
.empty .ico { margin: 0 auto 14px; width: 44px; height: 44px; color: var(--text-4); }
.empty .ico svg { width: 100%; height: 100%; }

/* 状态徽章 */
.tag {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  line-height: 1.75;
  letter-spacing: 0.3px;
}
.tag-gray { background: #eff3fa; color: var(--text-2); }
.tag-blue { background: var(--primary-light); color: var(--primary-dark); }
.tag-green { background: #e8f6f1; color: var(--success); }
.tag-orange { background: var(--gold-soft); color: var(--gold-deep); }
.tag-red { background: #fdeeec; color: var(--danger); }
.tag-purple { background: #f2eefa; color: #7a5aa8; }
.tag-cyan { background: #e6f5f6; color: #12939a; }

/* 送评页：寄件快递规则提示条 */
.ship-rule {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  padding: 11px 16px;
  border-radius: var(--radius-sm);
  background: linear-gradient(100deg, #fff5e8, #fffaf3);
  border: 1px solid rgba(201, 160, 99, 0.45);
  font-size: 13px;
  color: #8a6524;
}
.ship-rule .sr-badge {
  flex: 0 0 auto;
  padding: 2px 10px;
  border-radius: 6px;
  background: linear-gradient(135deg, #e2c391, #c9a063);
  color: #fff;
  font-weight: 600;
  font-size: 12px;
  white-space: nowrap;
}
.ship-rule .sr-txt { flex: 1; min-width: 0; line-height: 1.5; }
.ship-rule .sr-link { flex: 0 0 auto; color: var(--primary-dark); font-size: 12.5px; }

/* ---------------- 工具栏 ---------------- */
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.toolbar .search { position: relative; flex: 0 0 auto; }
.toolbar .search input { width: 250px; padding-left: 36px; }
.toolbar .search .ico {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-3);
  width: 15px;
  height: 15px;
  pointer-events: none;
}
.toolbar select.filter { width: auto; min-width: 132px; height: 38px; }

/* ---------------- 分页 ---------------- */
.pager {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding: 15px 20px;
  border-top: 1px solid var(--hair);
  font-size: 13px;
  color: var(--text-3);
}
.pager .pages { display: flex; gap: 5px; }
.pager button {
  min-width: 31px;
  height: 31px;
  padding: 0 9px;
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 7px;
  cursor: pointer;
  color: var(--text-2);
  transition: all 0.15s;
}
.pager button:hover:not(:disabled) { border-color: var(--primary); color: var(--primary-dark); }
.pager button.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.pager button:disabled { opacity: 0.4; cursor: not-allowed; }

/* ---------------- 弹窗 ---------------- */
.modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(38, 57, 92, 0.4);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  z-index: 100;
  padding: 44px 20px;
  overflow-y: auto;
  animation: fadeIn 0.16s ease;
  backdrop-filter: blur(2px);
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal {
  background: var(--white);
  border-radius: 14px;
  width: 100%;
  max-width: 640px;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.2s ease;
  margin: auto 0;
}
@keyframes slideUp { from { transform: translateY(16px); opacity: 0.6; } to { transform: none; opacity: 1; } }
.modal.wide { max-width: 840px; }
.modal.narrow { max-width: 440px; }
.modal-head {
  padding: 18px 22px;
  border-bottom: 1px solid var(--hair);
  display: flex;
  align-items: center;
}
.modal-head h3 { font-size: 15.5px; font-weight: 600; letter-spacing: 0.5px; }
.modal-head .close {
  margin-left: auto;
  border: none;
  background: transparent;
  color: var(--text-3);
  cursor: pointer;
  line-height: 1;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}
.modal-head .close:hover { background: var(--bg); color: var(--text-1); }
.modal-body { padding: 22px; max-height: calc(100vh - 230px); overflow-y: auto; }
.modal-foot {
  padding: 16px 22px;
  border-top: 1px solid var(--hair);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  background: #f8fbff;
  border-radius: 0 0 14px 14px;
}

/* ---------------- Toast ---------------- */
.toast-wrap {
  position: fixed;
  top: 22px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 11px 18px;
  border-radius: 10px;
  background: #3d5680;
  color: #fff;
  font-size: 13.5px;
  box-shadow: var(--shadow-lg);
  animation: toastIn 0.2s ease;
  max-width: 80vw;
  letter-spacing: 0.3px;
}
.toast .ico { width: 16px; height: 16px; flex: 0 0 auto; }
.toast.success { background: #3aa585; }
.toast.error { background: #e8675c; }
.toast.warning { background: #e0a13c; }
@keyframes toastIn { from { transform: translateY(-12px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------------- 通知下拉 ---------------- */
.dropdown {
  position: absolute;
  top: 52px;
  right: 0;
  width: 350px;
  background: #fff;
  border-radius: 12px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  z-index: 60;
  overflow: hidden;
}
.dropdown-head {
  padding: 13px 16px;
  border-bottom: 1px solid var(--hair);
  display: flex;
  align-items: center;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.5px;
}
.dropdown-head .link {
  margin-left: auto;
  font-size: 12.5px;
  font-weight: 400;
  cursor: pointer;
  color: var(--gold-deep);
}
.dropdown-list { max-height: 370px; overflow-y: auto; }
.noti-item { padding: 12px 16px; border-bottom: 1px solid var(--hair); }
.noti-item:hover { background: #f8fbff; }
.noti-item .t { font-size: 13px; font-weight: 500; margin-bottom: 4px; }
.noti-item .c { font-size: 12.5px; color: var(--text-3); line-height: 1.55; }
.noti-item .time { font-size: 11.5px; color: var(--text-4); margin-top: 5px; }

/* ---------------- 详情列表 ---------------- */
.kv { display: grid; grid-template-columns: 100px 1fr; gap: 11px 16px; font-size: 13.5px; }
.kv dt { color: var(--text-3); }
.kv dd { color: var(--text-1); word-break: break-all; }

.section-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
  margin: 22px 0 13px;
  padding-left: 10px;
  border-left: 3px solid var(--gold);
  line-height: 1.1;
  letter-spacing: 0.5px;
}
.section-title:first-child { margin-top: 0; }

/* 订单商品行 */
.order-item-row { display: flex; gap: 13px; padding: 11px 0; border-bottom: 1px solid var(--hair); }
.order-item-row:last-child { border-bottom: none; }
.order-item-row img {
  width: 54px;
  height: 54px;
  border-radius: 7px;
  object-fit: cover;
  border: 1px solid var(--border);
  flex: 0 0 auto;
}
.order-item-row .info { flex: 1; min-width: 0; }
.order-item-row .info .t { font-size: 13.5px; margin-bottom: 4px; }
.order-item-row .info .m { font-size: 12.5px; color: var(--text-3); }
.order-item-row .price { font-weight: 600; white-space: nowrap; }

.boot-loading { padding: 64px; text-align: center; color: var(--text-3); font-size: 13.5px; }

.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; }
.text-3 { color: var(--text-3); }
.text-danger { color: var(--danger); }
.mt-16 { margin-top: 16px; }
.row { display: flex; gap: 10px; align-items: center; }
.wrap { flex-wrap: wrap; }

/* 快捷操作按钮组 */
.quick-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.quick-actions .btn { height: 38px; }

/* 图片灯箱（预览图片时用） */
.img-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(38, 57, 92, 0.82);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
}
.img-lightbox img { max-width: 90%; max-height: 90%; border-radius: 8px; }

/* 送评照片网格（后台详情弹窗里） */
.sub-photos {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.sub-photo-cell {
  margin: 0;
  width: 116px;
}
.sub-photo {
  width: 116px;
  height: 116px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--border);
  cursor: zoom-in;
  transition: transform 0.15s, box-shadow 0.15s;
  display: block;
}
.sub-photo-cell figcaption {
  text-align: center;
  font-size: 12px;
  color: var(--text-3);
  margin-top: 5px;
}
.sub-photo:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(22, 119, 255, 0.18);
}

/* 灯箱翻页 */
.img-lightbox .lb-nav {
  position: absolute;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 14px;
  color: #fff;
  font-size: 13px;
}
.img-lightbox .lb-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}
.img-lightbox .lb-btn:hover { background: rgba(255, 255, 255, 0.3); }
.img-lightbox .lb-idx { letter-spacing: 1px; }
/* ---------------- 售后工单 ---------------- */
.unread-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--danger);
  margin-right: 6px;
  vertical-align: middle;
}
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.tk-thread {
  max-height: 330px;
  overflow-y: auto;
  padding: 4px 2px 8px;
  background: #f6f9fe;
  border-radius: var(--radius-sm);
  border: 1px solid var(--hair);
  margin-bottom: 4px;
}
.tk-msg {
  display: flex;
  gap: 10px;
  padding: 10px 12px;
}
.tk-msg.tk-admin { flex-direction: row-reverse; }
.tk-avatar {
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  background: #e8f1ff;
  color: var(--primary-dark);
}
.tk-msg.tk-admin .tk-avatar { background: linear-gradient(135deg, #6a9ad9, #1677ff); color: #fff; }
.tk-body {
  max-width: 78%;
  min-width: 0;
  background: #fff;
  border-radius: 10px;
  padding: 9px 12px;
  border: 1px solid var(--hair);
}
.tk-msg.tk-admin .tk-body { background: #eef5ff; border-color: rgba(22, 119, 255, 0.18); }
.tk-meta { font-size: 11.5px; color: var(--text-3); margin-bottom: 5px; }
.tk-text { font-size: 13.5px; color: var(--text-1); line-height: 1.65; white-space: pre-wrap; word-break: break-word; }
.tk-imgs { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.tk-img { width: 84px; height: 84px; object-fit: cover; border-radius: 7px; border: 1px solid var(--border); cursor: zoom-in; }
.tk-video { width: 220px; max-width: 100%; border-radius: 8px; margin-top: 8px; background: #000; }

.tk-reply-tools { display: flex; align-items: center; gap: 12px; margin-top: 10px; }
.tk-pending-imgs { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.tk-pending { position: relative; display: inline-block; }
.tk-pending img { width: 62px; height: 62px; object-fit: cover; border-radius: 7px; border: 1px solid var(--border); display: block; }
.tk-pending i {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: rgba(38, 57, 92, 0.75);
  color: #fff;
  font-size: 11px;
  font-style: normal;
  line-height: 17px;
  text-align: center;
  cursor: pointer;
}
/* 送评订单表格：列多，收紧内边距避免横向滚动 */
table.data.data-tight th,
table.data.data-tight td {
  padding-left: 10px;
  padding-right: 10px;
}
/* 横版缩略图（品牌图等）：完整显示，不裁切 */
table.data img.thumb-sm.thumb-wide {
  width: 92px;
  height: 40px;
  object-fit: contain;
  background: #f4f8fe;
  border: 1px solid var(--hair);
  padding: 2px;
}
/* 送评记录：日期区间筛选 */
.toolbar .date-range {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
}
.toolbar .date-range .date-input {
  width: 148px;
  padding: 0 8px;
  height: 34px;
}
.toolbar .date-range .dr-sep {
  font-size: 12.5px;
  color: var(--text-3);
}