/* 货代管理系统 - 原型样式
   主色：深蓝 #0b3d91 / #1e40af
   背景：浅灰 #f3f5f9
*/

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC",
    "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 14px;
  color: #1f2937;
  background: #f3f5f9;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

/* ========== 登录页 ========== */
.login-wrap {
  min-height: 100vh;
  background: linear-gradient(135deg, #0b3d91 0%, #1e40af 60%, #3b82f6 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.login-card {
  width: 920px;
  min-height: 520px;
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(11, 61, 145, 0.25);
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.login-left {
  background:
    linear-gradient(180deg, rgba(11, 61, 145, 0.92), rgba(30, 64, 175, 0.92)),
    repeating-linear-gradient(45deg, rgba(255,255,255,0.04) 0 20px, transparent 20px 40px);
  color: #fff;
  padding: 48px 40px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.login-left .brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 20px;
  font-weight: 600;
}

.login-left .brand-logo {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(255,255,255,0.18);
  display: grid;
  place-items: center;
  font-size: 20px;
}

.login-left .hero h2 { font-size: 18px; margin: 0 0 12px; line-height: 1.3; }
.login-left .hero p { opacity: .85; line-height: 1.7; }
.login-left .features { margin-top: 28px; }
.login-left .features li {
  list-style: none;
  padding: 8px 0;
  opacity: .9;
  display: flex;
  align-items: center;
  gap: 10px;
}
.login-left .features li::before {
  content: "";
  width: 6px; height: 6px; border-radius: 50%;
  background: #93c5fd;
}
.login-left .copy-desktop { font-size: 12px; opacity: .7; margin-top: auto; }
.copy-mobile { display: none; }

.login-right {
  padding: 56px 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.login-right h1 { font-size: 22px; margin: 0 0 8px; color: #0b3d91; }
.login-right .subtitle { color: #6b7280; margin-bottom: 32px; }

.field {
  margin-bottom: 16px;
  position: relative;
}
.field label {
  display: block;
  font-size: 13px;
  color: #374151;
  margin-bottom: 6px;
  font-weight: 500;
}
.field label .req { color: #dc2626; margin-left: 2px; }
.field input, .field select, .field textarea {
  width: 100%;
  min-height: 42px;
  padding: 11px 14px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #fff;
  font-size: 14px;
  line-height: 1.4;
  box-sizing: border-box;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color .15s, box-shadow .15s;
}
.field input::placeholder, .field textarea::placeholder { color: #9ca3af; line-height: 1.4; font-size: 14px; }
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: #1e40af;
  box-shadow: 0 0 0 3px rgba(30,64,175,0.15);
}
.field textarea { height: auto; min-height: 80px; padding: 10px 14px; font-family: inherit; }

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field-row-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.field-row-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }

.login-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 8px 0 24px;
  font-size: 13px;
  color: #4b5563;
}
.login-row a { color: #1e40af; }
.captcha-row { display: grid; grid-template-columns: 1fr 120px; gap: 10px; }
.captcha-box {
  height: 42px;
  border-radius: 8px;
  background: linear-gradient(135deg,#eff6ff,#dbeafe);
  color: #1e40af;
  font-family: "Courier New", monospace;
  font-weight: 700;
  letter-spacing: 4px;
  display: grid;
  place-items: center;
  cursor: pointer;
  user-select: none;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 16px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-size: 14px;
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
  white-space: nowrap;
  font-weight: 500;
}
.btn-primary { background: #0b3d91; color: #fff; }
.btn-primary:hover { background: #1e40af; }
.btn-primary-lg { height: 44px; font-size: 15px; }
.btn-secondary { background: #fff; color: #374151; border-color: #d1d5db; }
.btn-secondary:hover { background: #f9fafb; }
.btn-ghost { background: transparent; color: #374151; }
.btn-ghost:hover { background: #f3f4f6; }
.btn-danger { background: #fff; color: #dc2626; border-color: #fecaca; }
.btn-danger:hover { background: #fef2f2; }
.btn-danger-fill { background: #dc2626; color: #fff; }
.btn-w-full { width: 100%; }
.btn-sm { height: 30px; padding: 0 12px; font-size: 13px; }

/* ========== 通用布局 ========== */
.app-shell {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 230px;
  background: linear-gradient(180deg, #0f172a 0%, #111827 100%);
  color: #e2e8f0;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.sidebar .brand {
  height: 60px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
}
.sidebar .brand .logo {
  width: 32px; height: 32px; border-radius: 8px;
  background: linear-gradient(135deg,#3b82f6,#1e40af);
  display: grid; place-items: center;
  color: #fff; font-size: 16px;
}
.sidebar .nav { padding: 12px 0; }
.sidebar .nav-group-title {
  padding: 14px 20px 6px;
  font-size: 11px;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.sidebar .nav a.item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  font-size: 14px;
  color: #cbd5e1;
  cursor: pointer;
  border-left: 3px solid transparent;
  transition: background .15s, color .15s;
}
.sidebar .nav a.item:hover { background: rgba(255,255,255,0.05); color: #fff; }
.sidebar .nav a.item.active {
  background: rgba(59,130,246,0.15);
  color: #fff;
  border-left-color: #3b82f6;
}
.sidebar .nav a.item .icon { font-size: 15px; width: 18px; text-align: center; }
.sidebar .nav .sub {
  padding-left: 10px;
  background: rgba(0,0,0,0.15);
}

/* ====== 可折叠子菜单 ====== */
.nav-group {
  position: relative;
}
.nav-group-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px;
  font-size: 14px;
  color: #cbd5e1;
  cursor: pointer;
  border-left: 3px solid transparent;
  transition: background .15s, color .15s;
  gap: 10px;
}
.nav-group-toggle:hover { background: rgba(255,255,255,0.05); color: #fff; }
.nav-group-toggle.active {
  background: rgba(59,130,246,0.15);
  color: #fff;
  border-left-color: #3b82f6;
}
.nav-group-toggle .gt-label {
  display: flex; align-items: center; gap: 10px;
}
.nav-group-toggle .gt-label .icon { font-size: 15px; width: 18px; text-align: center; }
.nav-group-toggle .gt-arrow {
  font-size: 10px;
  color: #64748b;
  transition: transform .2s;
}
.nav-group-toggle.active .gt-arrow {
  transform: rotate(90deg);
  color: #93c5fd;
}
.nav-submenu {
  display: none;
  background: rgba(15,37,84,0.5);
  border-left: 1px solid rgba(59,130,246,0.2);
  margin-left: 20px;
}
.nav-submenu.open { display: block; }
.nav-submenu a.item {
  padding: 8px 20px 8px 20px;
  font-size: 12.5px;
  border-left: 3px solid transparent;
}
.nav-submenu a.item .icon {
  font-size: 12px;
  width: 16px;
  opacity: 0.85;
}

.main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.topbar {
  height: 60px;
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
}
.topbar .crumbs { color: #6b7280; font-size: 14px; }
.topbar .crumbs strong { color: #0b3d91; margin-right: 4px; }
.topbar .right { display: flex; align-items: center; gap: 18px; }
.topbar .bell {
  width: 36px; height: 36px; border-radius: 50%;
  background: #f3f4f6;
  display: grid; place-items: center;
  position: relative;
  cursor: pointer;
}
.topbar .bell .dot {
  position: absolute;
  top: 8px; right: 10px;
  width: 8px; height: 8px; border-radius: 50%;
  background: #dc2626;
  border: 2px solid #fff;
}
.topbar .user {
  display: flex; align-items: center; gap: 10px; cursor: pointer;
  padding: 4px 10px 4px 4px;
  border-radius: 999px;
}
.topbar .user:hover { background: #f9fafb; }
.topbar .avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(135deg,#1e40af,#3b82f6);
  color: #fff; display: grid; place-items: center;
  font-size: 13px; font-weight: 600;
}
.topbar .user .name { font-size: 14px; color: #111827; }
.topbar .user .role { font-size: 12px; color: #6b7280; }

.page {
  padding: 24px;
  flex: 1;
}
.page-title {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 18px;
}
.page-title h1 {
  font-size: 20px;
  margin: 0;
  color: #0b3d91;
}
.page-title .desc { color: #6b7280; margin-top: 4px; font-size: 13px; }
.page-title .actions { display: flex; gap: 10px; }

/* ========== 全局下拉框美化 ========== */
select,
select[class],
.field select,
.pk-wrap select,
.x-input-field,
.search-row select,
.config-row .cr-control select,
.toolbar .filters select,
#add-customer-modal select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 12px;
  padding-right: 30px !important;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s, background-color .15s;
}
select:hover:not(:disabled) {
  border-color: #94a3b8;
}
select:focus {
  outline: none;
  border-color: #1e40af;
  box-shadow: 0 0 0 3px rgba(30,64,175,0.12);
}
select:disabled {
  background-color: #f8fafc;
  cursor: not-allowed;
  opacity: 0.7;
}
select::-ms-expand { display: none; }

/* ========== 卡片 ========== */
.card {
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 1px 2px rgba(15,23,42,0.04), 0 1px 3px rgba(15,23,42,0.04);
  margin-bottom: 18px;
}
.card-title {
  font-size: 15px;
  color: #0b3d91;
  font-weight: 600;
  padding-bottom: 12px;
  border-bottom: 1px solid #f1f5f9;
  margin-bottom: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.card-title .more { color: #6b7280; font-weight: 400; font-size: 13px; cursor: pointer; }

/* ========== 统计卡片 ========== */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 18px; }
.stat-card {
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(15,23,42,0.04);
}
.stat-card .label { color: #6b7280; font-size: 13px; }
.stat-card .num {
  font-size: 26px;
  font-weight: 700;
  color: #0b3d91;
  margin-top: 10px;
}
.stat-card .trend { font-size: 12px; color: #16a34a; margin-top: 8px; }
.stat-card .trend.down { color: #dc2626; }
.stat-card .iconbox {
  position: absolute;
  right: 18px;
  top: 18px;
  width: 40px; height: 40px;
  border-radius: 10px;
  display: grid; place-items: center;
  font-size: 18px;
}
.stat-card.blue .iconbox { background: #eff6ff; color: #1e40af; }
.stat-card.green .iconbox { background: #ecfdf5; color: #059669; }
.stat-card.orange .iconbox { background: #fff7ed; color: #ea580c; }
.stat-card.red .iconbox { background: #fef2f2; color: #dc2626; }

/* ========== 图表占位 ========== */
.chart-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; margin-bottom: 18px; }
.chart-placeholder {
  height: 260px;
  display: flex;
  align-items: flex-end;
  gap: 12px;
  padding: 20px 0 0;
  position: relative;
}
.chart-placeholder svg { width: 100%; height: 100%; }
.chart-legend {
  display: flex;
  gap: 16px;
  margin-top: 12px;
  color: #6b7280;
  font-size: 13px;
}
.chart-legend span.dot {
  display: inline-block;
  width: 10px; height: 10px; border-radius: 2px;
  margin-right: 6px;
  vertical-align: middle;
}

/* ========== 表格 ========== */
.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  padding: 0 0 16px;
  border-bottom: 1px solid #f1f5f9;
  margin-bottom: 16px;
}
.toolbar .search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 0 12px;
  height: 36px;
  width: 260px;
}
.toolbar .search-box input {
  border: none;
  background: transparent;
  outline: none;
  width: 100%;
  height: 100%;
  font-size: 14px;
}
.toolbar .filters { display: flex; gap: 8px; }
.toolbar .filters select, .toolbar .filters input {
  height: 36px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  padding: 0 10px;
  font-size: 13px;
  background: #fff;
}
.toolbar .spacer { flex: 1; }

.table-wrap { overflow-x: auto; }
table.tbl {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
table.tbl thead th {
  text-align: left;
  padding: 12px 14px;
  background: #f8fafc;
  color: #475569;
  font-weight: 600;
  border-bottom: 1px solid #e5e7eb;
  white-space: nowrap;
}
table.tbl tbody td {
  padding: 14px;
  border-bottom: 1px solid #f1f5f9;
  color: #1f2937;
  vertical-align: middle;
}
table.tbl tbody tr:hover { background: #f9fafb; }
table.tbl .op { color: #1e40af; font-size: 13px; }
table.tbl .op a { margin-right: 10px; cursor: pointer; color: #1e40af; }
table.tbl .op a.del { color: #dc2626; }
table.tbl .op a:hover { text-decoration: underline; }

/* ========== 状态标签 ========== */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
}
.badge-green { background: #dcfce7; color: #166534; }
.badge-blue { background: #dbeafe; color: #1e40af; }
.badge-orange { background: #ffedd5; color: #9a3412; }
.badge-red { background: #fee2e2; color: #991b1b; }
.badge-gray { background: #f1f5f9; color: #475569; }
.badge-purple { background: #f3e8ff; color: #6b21a8; }

/* ========== 分页 ========== */
.pagination.page-nav {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.pagination.page-nav .page-item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  padding: 0 10px;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  font-size: 13px;
  color: #475569;
  background: #fff;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s;
}
.pagination.page-nav .page-item:hover {
  border-color: #3b82f6;
  color: #1e40af;
  background: #f0f7ff;
}
.pagination.page-nav .page-item.active {
  background: #0b3d91;
  color: #fff;
  border-color: #0b3d91;
  font-weight: 600;
}
.pagination.page-nav .page-item.disabled {
  color: #cbd5e1;
  background: #f8fafc;
  cursor: not-allowed;
  border-color: #e5e7eb;
}
.pagination.page-nav .page-dots {
  display: inline-flex;
  align-items: center;
  padding: 0 4px;
  color: #94a3b8;
  font-size: 13px;
}
/* 兼容旧分页结构 */
.pagination {
  display: flex;
  align-items: center;
  padding: 14px 0 0;
  color: #6b7280;
  font-size: 13px;
}
.pagination .pages { display: flex; gap: 4px; }
.pagination .pages a {
  min-width: 32px; height: 32px; padding: 0 10px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid #e5e7eb; border-radius: 6px; color: #374151;
  cursor: pointer; background: #fff;
}
.pagination .pages a.active { background: #0b3d91; color: #fff; border-color: #0b3d91; }

/* ========== 标签页 ========== */
.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 6px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  margin-bottom: 18px;
  box-shadow: inset 0 1px 2px rgba(15,23,42,0.04);
}
.tabs .tab,
.tabs a {
  flex: 1 1 auto;
  padding: 10px 16px;
  color: #475569;
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  border-radius: 10px;
  transition: all 0.2s ease;
  text-align: center;
  background: transparent;
  border: 1px solid transparent;
  line-height: 1.3;
  white-space: nowrap;
  user-select: none;
}
.tabs .tab:hover,
.tabs a:hover {
  background: #ffffff;
  color: #0b3d91;
  box-shadow: 0 1px 3px rgba(15,23,42,0.08);
}
.tabs .tab.on,
.tabs .tab.active,
.tabs a.on,
.tabs a.active {
  color: #ffffff;
  background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 100%);
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.28), 0 1px 2px rgba(15,23,42,0.05);
  border-color: rgba(255,255,255,0.35);
}
/* 手机端：选项卡改成可横向滚动，防止挤压成一行 */
@media (max-width: 768px) {
  .tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 4px;
    padding: 4px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .tabs::-webkit-scrollbar { display: none; }
  .tabs .tab,
  .tabs a {
    flex: 0 0 auto;
    padding: 9px 14px;
    font-size: 12.5px;
  }
}

/* ========== 进度节点条 ========== */
.node-progress {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 8px 0;
  min-width: 540px;
}
.node-progress .node {
  position: relative;
  text-align: center;
  flex: 1;
  z-index: 1;
}
.node-progress .node::before {
  content: "";
  display: block;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #e5e7eb;
  color: #fff;
  margin: 0 auto 6px;
  font-size: 12px;
  line-height: 22px;
  text-align: center;
}
.node-progress .node .title { font-size: 11px; color: #6b7280; }
.node-progress .node.done::before { background: #16a34a; }
.node-progress .node.done .title { color: #166534; }
.node-progress .node.active::before { background: #1e40af; box-shadow: 0 0 0 4px rgba(30,64,175,0.15); }
.node-progress .node.active .title { color: #0b3d91; font-weight: 600; }
.node-progress .node + .node::after {
  content: "";
  position: absolute;
  top: 11px;
  left: -50%;
  right: 50%;
  height: 2px;
  background: #e5e7eb;
  z-index: -1;
  width: 100%;
}
.node-progress .node.done + .node::after { background: #16a34a; }

/* ========== 左右分栏 ========== */
.split-2 { display: grid; grid-template-columns: 1fr 2fr; gap: 16px; }
.split-eq { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.split-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; }

/* ========== 侧边角色列表 ========== */
.role-list { background: #f8fafc; border-radius: 10px; padding: 10px; }
.role-list .role-item {
  padding: 12px 14px;
  border-radius: 8px;
  cursor: pointer;
  margin-bottom: 4px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.role-list .role-item:hover { background: #fff; }
.role-list .role-item.active { background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,0.05); }
.role-list .role-item .name { font-weight: 600; color: #111827; }
.role-list .role-item .desc { font-size: 12px; color: #6b7280; margin-top: 2px; }
.role-list .role-item .count { background: #e0e7ff; color: #3730a3; padding: 2px 8px; border-radius: 999px; font-size: 11px; }

.perm-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px 20px; }
.perm-group {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 14px;
}
.perm-group h4 { margin: 0 0 10px; font-size: 14px; color: #0b3d91; }
.perm-grid label { display: flex; align-items: center; gap: 8px; padding: 4px 0; font-size: 13px; cursor: pointer; }
.perm-grid label input { margin: 0; }

/* ========== 表单内联编辑 ========== */
.form-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 14px 20px; }
.form-grid.full { grid-template-columns: 1fr; }
.helper { font-size: 12px; color: #6b7280; margin-top: 4px; }

/* ========== 待办列表 ========== */
.todo-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid #f1f5f9;
}
.todo-item:last-child { border-bottom: none; }
.todo-item .dot-todo {
  width: 8px; height: 8px; border-radius: 50%; margin-top: 7px; flex-shrink: 0;
}
.todo-item .meta { display: flex; justify-content: space-between; width: 100%; }
.todo-item .title { color: #111827; font-size: 14px; }
.todo-item .sub { color: #6b7280; font-size: 12px; margin-top: 2px; }
.todo-item .time { color: #9ca3af; font-size: 12px; flex-shrink: 0; }

/* ========== 模态 ========== */
.modal-mask {
  position: fixed; inset: 0; background: rgba(15, 23, 42, 0.5);
  display: none; align-items: center; justify-content: center;
  z-index: 100;
}
.modal-mask.open { display: flex; }
.modal {
  background: #fff;
  border-radius: 12px;
  width: 640px;
  max-width: 92vw;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25);
}
.modal-lg { width: 880px; }
.modal-xl { width: 1080px; }
.modal-head {
  padding: 18px 24px;
  border-bottom: 1px solid #f1f5f9;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.modal-head h3 { margin: 0; font-size: 17px; color: #0b3d91; }
.modal-head .close { cursor: pointer; color: #6b7280; font-size: 20px; line-height: 1; }
.modal-body { padding: 24px; overflow-y: auto; }
.modal-foot {
  padding: 14px 24px;
  border-top: 1px solid #f1f5f9;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* ========== 价格明细 ========== */
.fee-table th, .fee-table td {
  padding: 10px 12px;
  text-align: right;
  font-size: 13px;
}
.fee-table th:first-child, .fee-table td:first-child { text-align: left; }
.fee-table tfoot td { font-weight: 700; border-top: 2px solid #e5e7eb; }

/* ========== 时间线 ========== */
.timeline { position: relative; padding-left: 24px; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 2px; background: #e5e7eb; }
.timeline .tl-item { position: relative; padding-bottom: 18px; }
.timeline .tl-item::before {
  content: "";
  position: absolute;
  left: -20px; top: 6px;
  width: 10px; height: 10px; border-radius: 50%;
  background: #1e40af;
}
.timeline .tl-item .tl-time { color: #6b7280; font-size: 12px; }
.timeline .tl-item .tl-title { font-weight: 600; color: #111827; margin: 2px 0; font-size: 14px; }
.timeline .tl-item .tl-content { color: #374151; font-size: 13px; line-height: 1.6; }

/* ========== 小工具 ========== */
.text-muted { color: #6b7280; }
.text-danger { color: #dc2626; }
.text-success { color: #16a34a; }
.text-primary { color: #0b3d91; }
.flex { display: flex; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.flex-1 { flex: 1; }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mb-8 { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.text-sm { font-size: 13px; }
.text-xs { font-size: 12px; }
.font-semibold { font-weight: 600; }
.text-right { text-align: right; }
.w-full { width: 100%; }
.nowrap { white-space: nowrap; }

/* ========== 占位圆饼 ========== */
.pie-wrap { display: flex; align-items: center; gap: 24px; height: 260px; }
.pie-svg { width: 220px; height: 220px; }
.pie-legend { flex: 1; }
.pie-legend div { padding: 6px 0; font-size: 13px; color: #374151; }
.pie-legend .bar {
  display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 8px; vertical-align: middle;
}

/* ========== 响应式 ========== */
@media (max-width: 1080px) {
  .stat-grid { grid-template-columns: repeat(2,1fr); }
  .chart-grid { grid-template-columns: 1fr; }
  .split-2, .split-eq, .split-3 { grid-template-columns: 1fr; }
  /* 中屏桌面：页面标题允许按钮换行，避免挤压标题 */
  .page-title .actions { flex-wrap: wrap; }
}
@media (max-width: 768px) {
  .sidebar { 
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    z-index: 1001;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    box-shadow: 2px 0 12px rgba(0,0,0,0.15);
    display: flex;
    flex-direction: column;
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .mobile-menu-btn {
    display: flex !important;
  }
  .mobile-nav-mask {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
  }
  .mobile-nav-mask.show {
    display: block;
    opacity: 1;
  }
  .login-card { grid-template-columns: 1fr; }
  .login-left { padding: 32px 28px; min-height: 180px; }
  .login-right { padding: 32px 28px; }
  .field-row, .field-row-3, .field-row-4 { grid-template-columns: 1fr; }
  .topbar {
    padding-left: 50px;
  }
  .main {
    min-width: 0;
  }
  /* ===== dashboard手机版优化 ===== */
  .page {
    padding: 12px 12px 24px;
  }
  /* 页面标题区：标题 + 操作按钮 同一行排列 */
  .page-title {
    flex-direction: row;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
  }
  .page-title > div:first-child {
    width: auto;
    flex: 0 1 auto;
  }
  .page-title h1 {
    font-size: 18px;
    margin-bottom: 2px;
  }
  .page-title .desc {
    font-size: 12px;
    line-height: 1.5;
  }
  .page-title .actions {
    width: auto;
    justify-content: flex-end;
    flex: 1 1 auto;
    flex-wrap: wrap;
  }
  .scope-indicator {
    display: inline-block;
    padding: 3px 8px;
    font-size: 11px;
    border-radius: 4px;
  }
  .stat-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px;
    margin-bottom: 14px;
  }
  .stat-card {
    padding: 12px;
  }
  .stat-card .iconbox {
    font-size: 18px;
  }
  .stat-card .num {
    font-size: 16px;
  }
  .stat-card .label {
    font-size: 11px;
  }
  .stat-card .trend {
    font-size: 10px;
  }
  .chart-grid {
    grid-template-columns: 1fr !important;
    gap: 12px;
    margin-bottom: 14px;
  }
  .split-eq {
    grid-template-columns: 1fr !important;
    gap: 12px;
  }
  .warn-banner {
    padding: 10px 12px;
    margin-bottom: 10px;
  }
  .warn-banner .ico {
    font-size: 16px;
  }
  .warn-banner .txt {
    font-size: 12px;
  }
  .card {
    padding: 14px;
    margin-bottom: 12px;
  }
  .card-title {
    font-size: 13px;
    margin-bottom: 10px;
  }
  .topbar {
    padding: 10px 12px 10px 50px;
    height: auto;
    min-height: 50px;
  }
  .topbar .crumbs {
    font-size: 12px;
  }
  .topbar .right {
    gap: 10px;
  }
  .topbar .avatar {
    width: 28px;
    height: 28px;
    font-size: 11px;
  }
  .topbar .user .name {
    font-size: 11px;
  }
  .topbar .user .role {
    font-size: 10px;
  }
  .bell {
    font-size: 18px;
  }
  .role-switch {
    gap: 4px;
  }
  .role-switch button {
    padding: 4px 8px;
    font-size: 11px;
  }
  .scope-indicator {
    font-size: 11px;
  }
  .todo-item {
    padding: 10px 0;
    gap: 8px;
  }
  .todo-item .dot-todo {
    margin-right: 6px;
    width: 6px;
    height: 6px;
    margin-top: 6px;
  }
  .todo-item .meta {
    flex-direction: column;
    gap: 4px;
  }
  .todo-item .meta .title {
    font-size: 12px;
    line-height: 1.4;
    word-break: break-all;
  }
  .todo-item .meta .title a {
    display: inline;
    word-break: break-all;
  }
  .todo-item .sub {
    font-size: 11px;
    line-height: 1.4;
  }
  .todo-item .time {
    font-size: 10px;
    padding: 2px 6px;
    background: #f1f5f9;
    border-radius: 4px;
    align-self: flex-start;
  }
  /* ===== split-eq区域（待办+业绩+货主）手机优化 ===== */
  .split-eq {
    grid-template-columns: 1fr !important;
    gap: 12px;
  }
  .split-eq .card {
    margin-bottom: 0;
  }
  /* 员工业绩表格改为卡片式 */
  .split-eq .tbl {
    display: none;
  }
  .split-eq .tbl-ranking {
    display: block;
  }
  .ranking-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid #f1f5f9;
  }
  .ranking-card:last-child {
    border-bottom: none;
  }
  .ranking-card .rank {
    font-size: 16px;
    width: 32px;
    text-align: center;
  }
  .ranking-card .info {
    flex: 1;
    min-width: 0;
  }
  .ranking-card .name {
    font-size: 13px;
    font-weight: 600;
    color: #111827;
  }
  .ranking-card .stats {
    font-size: 11px;
    color: #6b7280;
    margin-top: 2px;
  }
  .ranking-card .highlight {
    text-align: right;
    flex-shrink: 0;
  }
  .ranking-card .highlight .amount {
    font-size: 14px;
    font-weight: 700;
    color: #059669;
  }
  .ranking-card .highlight .rate {
    font-size: 11px;
    color: #6b7280;
  }
  /* 高贡献货主TOP3改为1列 */
  .split-eq .customer-top-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }
  .customer-top-item {
    padding: 10px 12px;
    border-radius: 8px;
    border-width: 1px;
    border-style: solid;
  }
  .customer-top-item .customer-name {
    font-size: 13px;
    font-weight: 600;
  }
  .customer-top-item .customer-amount {
    font-size: 16px;
    font-weight: 700;
    color: #0b3d91;
    margin-top: 4px;
  }
  .customer-top-item .customer-label {
    font-size: 11px;
    color: #64748b;
    margin-top: 2px;
  }
  .top-section-divider {
    display: block;
    padding-top: 12px;
    margin-top: 12px;
    border-top: 1px solid #f1f5f9;
  }
  .top-section-title {
    font-size: 13px;
    font-weight: 600;
    color: #0b3d91;
    margin-bottom: 10px;
  }
  .timeline .tl-item {
    padding: 10px 0;
  }
  .timeline .tl-time {
    font-size: 11px;
  }
  .timeline .tl-title {
    font-size: 12px;
  }
  .timeline .tl-content {
    font-size: 11px;
  }
  .tbl {
    font-size: 11px;
  }
  .tbl th, .tbl td {
    padding: 8px 6px;
  }
  .chart-placeholder {
    height: 180px !important;
  }
  /* ===== customers.html 手机端优化 ===== */
  /* 客户统计卡改为2列 */
  .stat-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px;
    margin-bottom: 14px;
  }
  .stat-card {
    padding: 12px;
  }
  .stat-card .iconbox {
    font-size: 18px;
  }
  .stat-card .num {
    font-size: 15px;
  }
  .stat-card .label {
    font-size: 11px;
  }
  .stat-card .trend {
    font-size: 10px;
  }
  /* 客户等级分布 & 信用额度改为纵向 */
  .page [style*="grid-template-columns:1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }
  /* 客户等级4格改为2列 */
  .page [style*="grid-template-columns:repeat(4,1fr)"] {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
  }
  /* 待审核申请区域 */
  .warn-banner {
    padding: 10px 12px;
    font-size: 12px;
    margin-bottom: 10px;
  }
  .warn-banner .ico {
    font-size: 16px;
  }
  .warn-banner .txt {
    font-size: 12px;
    line-height: 1.5;
  }
  /* 待审核申请卡片 */
  .page [style*="border:2px solid #f59e0b"] {
    padding: 12px;
  }
  .page [style*="grid-template-columns:repeat(4,1fr)"] {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  .page [style*="grid-template-columns:repeat(3,1fr)"] {
    grid-template-columns: 1fr !important;
  }
  .page [style*="display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end"] {
    justify-content: center !important;
    gap: 6px !important;
  }
  .page [style*="display:flex;align-items:center;gap:10px;margin-bottom:10px"] {
    flex-wrap: wrap;
    gap: 6px;
  }
  /* 筛选工具栏 */
  .toolbar {
    flex-direction: column;
    gap: 10px;
    align-items: stretch;
  }
  .toolbar .search-box {
    width: 100%;
  }
  .toolbar .search-box input {
    width: 100%;
  }
  .toolbar .filters {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
  }
  .toolbar .filters select {
    width: 100%;
  }
  .toolbar .scope-switcher {
    justify-content: center;
  }
  /* 客户列表3列改为1列 */
  .page [style*="grid-template-columns:repeat(3,1fr)"] {
    grid-template-columns: 1fr !important;
  }
  /* 客户卡片 */
  .customer-card {
    padding: 14px;
    margin-bottom: 12px;
  }
  .customer-card .cc-head {
    flex-wrap: wrap;
    gap: 8px;
  }
  .customer-card .cc-name {
    font-size: 14px;
  }
  .customer-card .cc-info {
    grid-template-columns: 1fr !important;
    gap: 4px;
  }
  .customer-card .cc-meta {
    flex-direction: column;
    gap: 6px;
    align-items: flex-start;
  }
  .customer-card .cc-meta .amount {
    font-size: 13px;
  }
  .customer-card [style*="margin-top:10px;display:flex;gap:6px"] {
    flex-wrap: wrap;
  }
  .customer-card [style*="margin-top:10px;display:flex;gap:6px"] button {
    flex: 1 1 auto;
    min-width: 80px;
  }
  /* 客户门户账号区域 */
  .cc-portal {
    padding: 10px;
  }
  .cc-portal-head {
    flex-direction: column;
    align-items: flex-start;
  }
  .cc-portal-actions {
    width: 100%;
    flex-wrap: wrap;
  }
  .cc-portal-actions button {
    flex: 1 1 auto;
    min-width: 70px;
  }
  .cc-portal-info {
    grid-template-columns: 1fr !important;
    gap: 2px;
  }
  /* ===== customers.html 新增客户弹窗手机优化 ===== */
  #add-customer-modal {
    padding: 10px !important;
    align-items: flex-start !important;
  }
  #add-customer-modal > div {
    max-width: 100% !important;
    border-radius: 12px !important;
  }
  #add-customer-modal form {
    padding: 16px !important;
  }
  #add-customer-modal form > div > div {
    padding: 14px 14px !important;
  }
  #add-customer-modal [style*="grid-template-columns:1fr 1fr"] {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }
  #add-customer-modal .field {
    grid-column: 1 / -1 !important;
  }
  #add-customer-modal input,
  #add-customer-modal select,
  #add-customer-modal textarea {
    font-size: 14px !important;
    padding: 10px 12px !important;
  }
  #add-customer-modal [style*="padding-top:16px;border-top"] {
    flex-direction: column !important;
    gap: 8px !important;
  }
  #add-customer-modal [style*="padding-top:16px;border-top"] button {
    width: 100% !important;
  }
  /* 额度管理弹窗手机优化 */
  #credit-limit-modal,
  #credit-limit-modal ~ [style*="position:fixed"] {
    padding: 10px !important;
  }
}

/* 移动端汉堡菜单按钮 */
.mobile-menu-btn {
  display: none;
  position: fixed;
  top: 10px;
  left: 12px;
  z-index: 999;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid #e5e7eb;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  align-items: center;
  justify-content: center;
  font-size: 18px;
  cursor: pointer;
  transition: all 0.2s;
}
.mobile-menu-btn:active {
  transform: scale(0.95);
  background: #f8fafc;
}

/* ========== 打印 ========== */
@media print {
  .sidebar, .topbar, .toolbar, .page-title, .modal-mask { display: none !important; }
  .page { padding: 0; }
}

/* ========== 国际快递 · 新增样式模块 ========== */

/* 搜索条的输入/下拉统一风格 */
.search-row input,
.search-row select,
.field-input {
  border: 1px solid #d1d5db;
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 13px;
  outline: none;
  background: #fff;
  color: #1f2937;
  transition: border-color .15s, box-shadow .15s;
  width: 100%;
  font-family: inherit;
}
.search-row input:focus,
.search-row select:focus,
.field-input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}
.search-row input[type=date] { cursor: pointer; }

/* 承运商卡片：总览数值 */
.courier-card { transition: transform .18s, box-shadow .18s; }
.courier-card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(15, 23, 42, .08); }

/* 开关 switch */
.switch { position: relative; display: inline-block; width: 42px; height: 24px; cursor: pointer; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span {
  position: absolute; inset: 0; background: #cbd5e1; border-radius: 999px;
  transition: background .2s;
}
.switch span::before {
  content: ""; position: absolute; top: 3px; left: 3px;
  width: 18px; height: 18px; background: #fff; border-radius: 50%;
  transition: transform .2s;
  box-shadow: 0 1px 3px rgba(15,23,42,.2);
}
.switch input:checked + span { background: linear-gradient(90deg, #2563eb, #1d4ed8); }
.switch input:checked + span::before { transform: translateX(18px); }

/* Tag 标签样式（统一） */
.tag {
  display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 11.5px;
  background: #eef2ff; color: #3730a3; margin: 2px 4px 2px 0;
}
.tag.green { background: #ecfdf5; color: #047857; }
.tag.red   { background: #fee2e2; color: #b91c1c; }
.tag.amber { background: #fef3c7; color: #b45309; }
.tag.sky   { background: #e0f2fe; color: #0369a1; }

/* 调试响应 JSON 美化 */
pre#dbg-response,
pre.debug-response {
  background: #0f172a; color: #e2e8f0; padding: 16px; border-radius: 10px;
  font-size: 12px; font-family: "SF Mono", Menlo, Consolas, "Courier New", monospace;
  line-height: 1.75; overflow: auto; max-height: 420px; white-space: pre-wrap;
  border: 1px solid #1e293b;
}

/* 子标签响应式（手机上横向滑动） */
@media (max-width: 768px) {
  .courier-card { margin-bottom: 10px; }
  .search-row input, .search-row select { width: 100%; }
}

/* 按钮 hover 反馈（在原有 btn 基础上增强） */
.btn-secondary:hover { background: #e2e8f0; color: #1e293b; border-color: #cbd5e1; }
.btn-primary:hover { background: #1e40af; }

/* ===================== 货代销售业务 · 专属样式模块 ===================== */

/* 1. 敏感数据隔离标签（成本/毛利对业务员隐藏） */
.sensitive {
  display: inline-block;
  position: relative;
  background: linear-gradient(135deg,#fff7ed,#ffedd5);
  color: #9a3412;
  padding: 2px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid #fed7aa;
}
.sensitive.profit { background: linear-gradient(135deg,#ecfdf5,#d1fae5); color: #065f46; border-color: #a7f3d0; }
.sensitive.cost { background: linear-gradient(135deg,#fee2e2,#fecaca); color: #991b1b; border-color: #fca5a5; }
.sensitive.locked::after {
  content: "🔒";
  margin-left: 4px;
  font-size: 11px;
}
/* 隐藏态（业务员视角模拟） */
.sensitive.hidden-value {
  background: #f1f5f9;
  color: #94a3b8;
  border-color: #e2e8f0;
  font-style: italic;
}
.sensitive.hidden-value::before { content: "— — —"; letter-spacing: 2px; }

/* 2. 销售订单 8 节点流转条（中介专属，剔除订舱/放舱等实操节点） */
.mediator-progress {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 8px 0;
  min-width: 580px;
}
.mediator-progress .mp-node {
  position: relative;
  text-align: center;
  flex: 1;
  z-index: 1;
  font-size: 11px;
}
.mediator-progress .mp-node::before {
  content: "";
  display: block;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #e5e7eb;
  margin: 0 auto 6px;
  font-size: 12px;
  line-height: 22px;
}
.mediator-progress .mp-node .mp-title { color: #6b7280; font-size: 11px; line-height: 1.4; }
.mediator-progress .mp-node.done::before { background: #16a34a; content: "✓"; color: #fff; font-weight: 700; }
.mediator-progress .mp-node.done .mp-title { color: #166534; }
.mediator-progress .mp-node.active::before {
  background: #1e40af;
  box-shadow: 0 0 0 4px rgba(30,64,175,0.15);
  content: "●"; color: #fff; font-size: 14px;
}
.mediator-progress .mp-node.active .mp-title { color: #0b3d91; font-weight: 600; }
.mediator-progress .mp-node.warn::before { background: #ea580c; content: "!"; color: #fff; font-weight: 700; }
.mediator-progress .mp-node.warn .mp-title { color: #9a3412; font-weight: 600; }
.mediator-progress .mp-node + .mp-node::after {
  content: "";
  position: absolute;
  top: 11px;
  left: -50%;
  right: 50%;
  height: 2px;
  background: #e5e7eb;
  z-index: -1;
  width: 100%;
}
.mediator-progress .mp-node.done + .mp-node::after { background: #16a34a; }

/* 3. 上游代理评分卡（上游代理履约评分体系） */
.channel-card {
  background: #fff;
  border-radius: 12px;
  padding: 18px;
  border: 1px solid #e5e7eb;
  transition: all .18s;
}
.channel-card:hover {
  box-shadow: 0 8px 24px rgba(11,61,145,0.08);
  transform: translateY(-2px);
  border-color: #bfdbfe;
}
.channel-card .cc-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 12px;
}
.channel-card .cc-name { font-size: 15px; font-weight: 700; color: #0b3d91; }
.channel-card .cc-sub { font-size: 12px; color: #64748b; margin-top: 2px; }
.score-bar {
  display: grid;
  grid-template-columns: 80px 1fr 40px;
  gap: 10px;
  align-items: center;
  font-size: 12px;
  padding: 4px 0;
  color: #475569;
}
.score-bar .bar {
  height: 6px;
  background: #f1f5f9;
  border-radius: 999px;
  overflow: hidden;
}
.score-bar .bar > span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg,#1e40af,#3b82f6);
  border-radius: 999px;
}
.score-bar .score { font-weight: 700; color: #0b3d91; text-align: right; }

/* 4. 价格库对比表（渠道比价功能） */
.price-compare {
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 14px;
}
.price-row {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr 1fr;
  gap: 10px;
  padding: 10px 6px;
  border-bottom: 1px dashed #e2e8f0;
  align-items: center;
  font-size: 13px;
}
.price-row:last-child { border-bottom: none; }
.price-row .ch-name { font-weight: 600; color: #0b3d91; }
.price-row .price-val { font-size: 14px; font-weight: 700; color: #1e293b; }
.price-row .price-val.best { color: #059669; }
.price-row .price-val.high { color: #dc2626; }
.price-row .tag-row { display: flex; flex-wrap: wrap; gap: 4px; }

/* 5. 报价单预览卡片（PDF 模拟） */
.quote-preview {
  background: #fff;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  padding: 28px 32px;
  font-family: "PingFang SC","Microsoft YaHei",sans-serif;
  position: relative;
}
.quote-preview.watermark::before {
  content: "XX 货代 · 报价预览";
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%,-50%) rotate(-22deg);
  font-size: 52px;
  color: rgba(11,61,145,0.06);
  font-weight: 700;
  pointer-events: none;
  letter-spacing: 6px;
}
.quote-preview .qp-head {
  border-bottom: 2px solid #0b3d91;
  padding-bottom: 14px;
  margin-bottom: 18px;
}
.quote-preview .qp-title {
  font-size: 22px;
  font-weight: 700;
  color: #0b3d91;
  text-align: center;
}
.quote-preview .qp-no { text-align: center; font-size: 12px; color: #64748b; margin-top: 6px; }
.quote-preview .qp-info {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 24px;
  font-size: 13px;
  color: #334155;
  margin-bottom: 16px;
}
.quote-preview .qp-info label { color: #64748b; font-weight: 600; margin-right: 6px; }
.quote-preview table { width: 100%; font-size: 13px; border-collapse: collapse; }
.quote-preview table th {
  background: #0b3d91;
  color: #fff;
  padding: 8px 10px;
  text-align: left;
  font-weight: 600;
}
.quote-preview table td {
  padding: 8px 10px;
  border-bottom: 1px solid #e5e7eb;
  color: #1e293b;
}
.quote-preview table td.right { text-align: right; font-weight: 600; }
.quote-preview table tfoot td {
  border-top: 2px solid #0b3d91;
  background: #f8fafc;
  font-weight: 700;
  color: #0b3d91;
}
.quote-preview .qp-foot {
  margin-top: 20px;
  font-size: 12px;
  color: #64748b;
  line-height: 1.8;
  border-top: 1px dashed #cbd5e1;
  padding-top: 12px;
}
.quote-preview .qp-expire {
  margin-top: 10px;
  padding: 8px 12px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 6px;
  color: #92400e;
  font-size: 12px;
  text-align: center;
}

/* 6. 三层费用合计面板（应收/应付/销售利润） */
.finance-triple {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 16px;
}
.finance-triple .ft-box {
  background: #fff;
  border-radius: 12px;
  padding: 18px 20px;
  border: 1px solid #e5e7eb;
  position: relative;
}
.finance-triple .ft-box .ft-label {
  font-size: 13px;
  color: #64748b;
  font-weight: 600;
}
.finance-triple .ft-box .ft-amount {
  font-size: 28px;
  font-weight: 700;
  margin-top: 8px;
  letter-spacing: 1px;
}
.finance-triple .ft-box.receivable .ft-amount { color: #0b3d91; }
.finance-triple .ft-box.payable .ft-amount { color: #b91c1c; }
.finance-triple .ft-box.profit .ft-amount { color: #047857; }
.finance-triple .ft-box .ft-sub {
  margin-top: 10px;
  font-size: 12px;
  color: #64748b;
  padding-top: 10px;
  border-top: 1px dashed #e2e8f0;
}
.finance-triple .ft-box .ft-sub div { padding: 2px 0; display: flex; justify-content: space-between; }

/* 7. 风控/预警横幅 */
.warn-banner {
  background: linear-gradient(135deg,#fffbeb,#fef3c7);
  border: 1px solid #fde68a;
  color: #92400e;
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.warn-banner.danger {
  background: linear-gradient(135deg,#fef2f2,#fee2e2);
  border-color: #fecaca;
  color: #991b1b;
}
.warn-banner.info {
  background: linear-gradient(135deg,#eff6ff,#dbeafe);
  border-color: #bfdbfe;
  color: #1e40af;
}
.warn-banner .ico { font-size: 18px; }
.warn-banner .txt { flex: 1; line-height: 1.6; }
.warn-banner a { color: inherit; text-decoration: underline; margin-right: 10px; cursor: pointer; }

/* 8. 跟进记录时间轴 */
.follow-timeline {
  position: relative;
  padding-left: 28px;
}
.follow-timeline::before {
  content: "";
  position: absolute;
  left: 10px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: #e5e7eb;
}
.follow-timeline .ft-item {
  position: relative;
  padding-bottom: 16px;
}
.follow-timeline .ft-item::before {
  content: "";
  position: absolute;
  left: -22px;
  top: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #3b82f6;
  border: 3px solid #dbeafe;
}
.follow-timeline .ft-item.urgent::before { background: #dc2626; border-color: #fee2e2; }
.follow-timeline .ft-item.done::before { background: #16a34a; border-color: #dcfce7; }
.follow-timeline .ft-item .ft-head {
  font-size: 12px;
  color: #64748b;
  margin-bottom: 4px;
  display: flex;
  gap: 10px;
  align-items: center;
}
.follow-timeline .ft-item .ft-head strong { color: #0b3d91; font-size: 13px; }
.follow-timeline .ft-item .ft-body {
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
  color: #1e293b;
  line-height: 1.7;
}
.follow-timeline .ft-item .ft-body .meta {
  display: flex;
  gap: 14px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed #e2e8f0;
  font-size: 12px;
  color: #64748b;
  flex-wrap: wrap;
}

/* 9. 数据权限标记（用于展示本人/部门/全公司数据范围） */
.scope-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}
.scope-indicator.self { background: #dbeafe; color: #1e40af; }
.scope-indicator.dept { background: #f3e8ff; color: #6b21a8; }
.scope-indicator.all  { background: #fee2e2; color: #991b1b; }

/* 10. 询价台账状态流 */
.inquiry-flow {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  flex-wrap: wrap;
}
.inquiry-flow .step {
  padding: 3px 10px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #64748b;
}
.inquiry-flow .step.active { background: #0b3d91; color: #fff; }
.inquiry-flow .step.done { background: #dcfce7; color: #166534; }
.inquiry-flow .arrow { color: #cbd5e1; }

/* 11. 数字汇总横条（用于报表页） */
.metric-row {
  display: grid;
  grid-template-columns: repeat(6,1fr);
  gap: 12px;
}
.metric-row .metric {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 14px 16px;
}
.metric-row .metric .ml { font-size: 12px; color: #64748b; }
.metric-row .metric .mv {
  font-size: 20px;
  font-weight: 700;
  color: #0b3d91;
  margin-top: 6px;
  letter-spacing: 0.5px;
}
.metric-row .metric .mt {
  margin-top: 6px;
  font-size: 11px;
  color: #64748b;
}
.metric-row .metric.green .mv { color: #047857; }
.metric-row .metric.red .mv { color: #b91c1c; }
.metric-row .metric.amber .mv { color: #b45309; }
@media (max-width: 1080px) {
  .metric-row { grid-template-columns: repeat(3,1fr); }
}
@media (max-width: 640px) {
  .metric-row { grid-template-columns: repeat(2,1fr); }
}

/* 12. 参数配置表单（开关+数字+文本混合） */
.config-group {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 18px 22px;
  margin-bottom: 14px;
}
.config-group h4 {
  margin: 0 0 12px;
  font-size: 14px;
  color: #0b3d91;
  font-weight: 700;
  padding-bottom: 10px;
  border-bottom: 1px solid #f1f5f9;
}
.config-row {
  display: grid;
  grid-template-columns: 200px 1fr 80px;
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px dashed #f1f5f9;
}
.config-row:last-child { border-bottom: none; }
.config-row .cr-label { font-size: 13px; color: #334155; font-weight: 500; }
.config-row .cr-label small { color: #94a3b8; font-weight: 400; display: block; margin-top: 2px; font-size: 11px; }
.config-row .cr-control input[type="text"],
.config-row .cr-control input[type="number"],
.config-row .cr-control select {
  height: 34px;
  padding: 0 10px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 13px;
  background: #fff;
  outline: none;
  width: 220px;
}
.config-row .cr-control input[type="text"]:focus,
.config-row .cr-control select:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37,99,235,0.12);
}
.config-row .cr-val { text-align: right; font-size: 12px; color: #64748b; }

/* 13. 权限矩阵表 */
.perm-matrix table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.perm-matrix table th {
  background: #0b3d91;
  color: #fff;
  padding: 10px 12px;
  font-weight: 600;
  text-align: left;
  white-space: nowrap;
}
.perm-matrix table th.module {
  background: #1e3a8a;
  font-size: 12px;
}
.perm-matrix table td {
  padding: 10px 12px;
  border-bottom: 1px solid #f1f5f9;
  text-align: center;
  color: #475569;
}
.perm-matrix table td.label {
  text-align: left;
  color: #0b3d91;
  font-weight: 600;
  background: #f8fafc;
}
.perm-matrix table td.check {
  font-size: 16px;
  font-weight: 700;
}
.perm-matrix table td.check.ok { color: #059669; }
.perm-matrix table td.check.no { color: #cbd5e1; }

/* 14. 员工交接对话框专属样式 */
.transfer-dialog {
  background: #fff;
  border-radius: 14px;
  padding: 24px 28px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}
.transfer-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  margin-bottom: 8px;
}
.transfer-item .ti-info { font-size: 13px; color: #1e293b; }
.transfer-item .ti-info small { color: #64748b; display: block; margin-top: 2px; font-size: 11px; }
.transfer-item .ti-count {
  background: #0b3d91;
  color: #fff;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

/* 15. 询价/报价 三种加价模式切换卡片 */
.pricing-mode {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 12px;
  margin-bottom: 16px;
}
.pricing-mode .pm-card {
  background: #fff;
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  padding: 14px 16px;
  cursor: pointer;
  transition: all .18s;
}
.pricing-mode .pm-card:hover { border-color: #93c5fd; background: #f8fafc; }
.pricing-mode .pm-card.active {
  border-color: #0b3d91;
  background: linear-gradient(135deg,#eff6ff,#fff);
  box-shadow: 0 4px 12px rgba(11,61,145,0.15);
}
.pricing-mode .pm-card .pm-title { font-size: 14px; font-weight: 700; color: #0b3d91; }
.pricing-mode .pm-card .pm-desc { font-size: 12px; color: #64748b; margin-top: 4px; line-height: 1.5; }
.pricing-mode .pm-card .pm-ico { font-size: 20px; margin-bottom: 4px; }

/* 16. 消息中心 - 气泡样式 */
.msg-item {
  display: flex;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid #f1f5f9;
  cursor: pointer;
  transition: background .15s;
}
.msg-item:hover { background: #f8fafc; }
.msg-item.unread { background: #f8fafc; }
.msg-item.unread::before {
  content: "";
  display: block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #dc2626;
  flex-shrink: 0;
  margin-top: 6px;
}
.msg-item .mi-ico {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 16px;
  background: #eff6ff;
  color: #1e40af;
  flex-shrink: 0;
}
.msg-item.warn .mi-ico { background: #fff7ed; color: #c2410c; }
.msg-item.danger .mi-ico { background: #fef2f2; color: #b91c1c; }
.msg-item.success .mi-ico { background: #ecfdf5; color: #047857; }
.msg-item .mi-body { flex: 1; }
.msg-item .mi-title { font-size: 14px; font-weight: 600; color: #0f172a; }
.msg-item .mi-content { font-size: 12.5px; color: #475569; margin-top: 4px; line-height: 1.6; }
.msg-item .mi-time { font-size: 11px; color: #94a3b8; margin-top: 6px; }

/* 17. 客户级别等级徽章 */
.level-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
}
.level-badge.L1 { background: #fee2e2; color: #991b1b; }
.level-badge.L2 { background: #fef3c7; color: #92400e; }
.level-badge.L3 { background: #dbeafe; color: #1e40af; }
.level-badge.L4 { background: #dcfce7; color: #166534; }

/* 18. 异常登记标记 */
.exception-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #fee2e2;
  color: #b91c1c;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 600;
  border: 1px solid #fecaca;
}

/* 19. 列表页工具栏扩展 —— 数据范围切换按钮组 */
.scope-switcher {
  display: inline-flex;
  background: #f1f5f9;
  padding: 3px;
  border-radius: 8px;
  gap: 2px;
}
.scope-switcher button {
  padding: 5px 12px;
  border: none;
  background: transparent;
  color: #64748b;
  font-size: 12px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
}
.scope-switcher button.active {
  background: #0b3d91;
  color: #fff;
}

/* 20. 简易价格走势 Sparkline 容器 */
.spark-box {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 10px 14px;
}
.spark-box .sp-title {
  font-size: 12px;
  color: #64748b;
  font-weight: 600;
  margin-bottom: 6px;
}
.spark-box svg { display: block; width: 100%; height: 50px; }

/* ==================== 21. 利润汇总条（订单详情专属） ==================== */
.profit-triad {
  display: grid;
  grid-template-columns: 1fr 40px 1fr 40px 1.15fr;
  gap: 10px;
  align-items: stretch;
}
@media (max-width: 960px) {
  .profit-triad { grid-template-columns: 1fr; gap: 12px; }
  .profit-triad .pt-minus, .profit-triad .pt-equal { display: none; }
}

.profit-triad .pt-box {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 14px 16px;
  position: relative;
  overflow: hidden;
  transition: all .18s;
}
.profit-triad .pt-box:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(15,23,42,.08); }
.profit-triad .pt-box::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 3px;
}
.profit-triad .pt-receivable { border:1px solid #bfdbfe; background:linear-gradient(180deg,#eff6ff,#fff); }
.profit-triad .pt-receivable::before { background: linear-gradient(90deg,#1e40af,#3b82f6); }
.profit-triad .pt-payable    { border:1px solid #fecaca; background:linear-gradient(180deg,#fef2f2,#fff); }
.profit-triad .pt-payable::before    { background: linear-gradient(90deg,#dc2626,#f87171); }
.profit-triad .pt-profit     { border:1px solid #bbf7d0; background:linear-gradient(180deg,#ecfdf5,#fff); }
.profit-triad .pt-profit::before     { background: linear-gradient(90deg,#059669,#34d399); }

.profit-triad .pt-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.profit-triad .pt-tag {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .3px;
}
.pt-receivable .pt-tag { color: #1e3a8a; }
.pt-payable    .pt-tag { color: #991b1b; }
.pt-profit     .pt-tag { color: #065f46; }

.profit-triad .pt-count {
  font-size: 11px;
  background: #fff;
  color: #64748b;
  border: 1px solid #e5e7eb;
  padding: 2px 10px;
  border-radius: 999px;
}

.profit-triad .pt-num {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: .5px;
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.2;
}
.pt-receivable .pt-num { color: #1e3a8a; }
.pt-payable    .pt-num { color: #991b1b; }
.pt-profit     .pt-num { color: #047857; font-size: 30px; }

.profit-triad .pt-bar {
  height: 6px;
  background: #f1f5f9;
  border-radius: 999px;
  margin: 10px 0 10px;
  overflow: hidden;
}
.profit-triad .pt-bar span {
  display: block;
  height: 100%;
  border-radius: 999px;
}
.pt-receivable .pt-bar span { background: linear-gradient(90deg,#1e40af,#3b82f6); }
.pt-payable    .pt-bar span { background: linear-gradient(90deg,#dc2626,#f87171); }
.pt-profit     .pt-bar span { background: linear-gradient(90deg,#047857,#34d399); }

.profit-triad .pt-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 10px;
  font-size: 11.5px;
  color: #64748b;
}
.profit-triad .pt-meta div {
  display: flex;
  justify-content: space-between;
  padding: 3px 0;
  border-top: 1px dashed #e5e7eb;
}
.profit-triad .pt-meta-k { opacity: .8; }
.profit-triad .pt-meta-v { color: #334155; font-weight: 600; }
.profit-triad .pt-meta-v.ok   { color: #047857; }
.profit-triad .pt-meta-v.warn { color: #92400e; }

/* 运算符（− / =） */
.profit-triad .pt-minus,
.profit-triad .pt-equal {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  align-self: center;
  border-radius: 50%;
  font-size: 18px;
  font-weight: 800;
  color: #64748b;
  background: #fff;
  border: 2px solid #e5e7eb;
}
.profit-triad .pt-equal { color: #0b3d91; border-color: #93c5fd; background: #eff6ff; }

/* 指标小条 */
.mini-metric {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.mini-metric .mm-ico { font-size: 18px; }
.mini-metric .mm-v { font-size: 14px; font-weight: 700; color: #0f172a; }
.mini-metric .mm-l { font-size: 11px; color: #64748b; margin-top: 2px; }

/* ================================================================
   全面移动端自适应增强 (≤768px)
   覆盖: 表格/表单/弹窗/网格/分页/顶栏/触摸目标等
   ================================================================ */
@media (max-width: 768px) {

  /* ===== 1. 表格优化 ===== */
  /* 表格容器横向滚动增强 */
  .table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 8px;
    border: 1px solid #f1f5f9;
  }
  .table-wrap::-webkit-scrollbar { height: 4px; }
  .table-wrap::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 2px; }

  table.tbl {
    font-size: 12px;
    min-width: 500px;
  }
  table.tbl thead th {
    padding: 8px 10px;
    font-size: 11px;
    white-space: nowrap;
    position: sticky;
    top: 0;
    z-index: 2;
  }
  table.tbl tbody td {
    padding: 8px 10px;
    white-space: nowrap;
  }
  /* 操作列不换行 */
  table.tbl .op a {
    margin-right: 6px;
    font-size: 12px;
  }
  /* 费用明细表 */
  .fee-table th, .fee-table td {
    padding: 6px 8px;
    font-size: 12px;
  }

  /* ===== 2. 表单/字段堆叠 ===== */
  .form-grid {
    grid-template-columns: 1fr !important;
    gap: 10px;
  }
  .field-row,
  .field-row-3,
  .field-row-4 {
    grid-template-columns: 1fr !important;
    gap: 10px;
  }
  /* 输入框触摸目标 ≥40px */
  .field input,
  .field select,
  .field textarea,
  .field-input,
  .search-row input,
  .search-row select {
    height: 40px;
    font-size: 14px !important; /* 防止 iOS 缩放 */
  }
  .field textarea {
    height: auto;
    min-height: 80px;
  }

  /* ===== 3. 弹窗全屏化 ===== */
  .modal-mask {
    align-items: stretch !important;
    padding: 0 !important;
  }
  .modal,
  .modal.modal-lg,
  .modal.modal-xl {
    width: 100% !important;
    max-width: 100% !important;
    max-height: 100vh !important;
    height: 100vh !important;
    border-radius: 0 !important;
  }
  .modal-head {
    padding: 12px 16px;
  }
  .modal-head h3 { font-size: 15px; }
  .modal-body {
    padding: 16px;
    flex: 1;
  }
  .modal-foot {
    padding: 10px 16px;
    gap: 8px;
  }
  .modal-foot .btn {
    flex: 1;
    height: 40px;
  }

  /* ===== 4. 网格布局堆叠 ===== */
  .finance-triple {
    grid-template-columns: 1fr !important;
    gap: 10px;
  }
  .finance-triple .ft-box {
    padding: 14px;
  }
  .finance-triple .ft-box .ft-amount {
    font-size: 22px;
  }
  .pricing-mode {
    grid-template-columns: 1fr !important;
    gap: 8px;
  }
  .perm-grid {
    grid-template-columns: 1fr !important;
    gap: 8px;
  }
  .perm-group {
    padding: 10px;
  }
  .split-2,
  .split-eq,
  .split-3 {
    grid-template-columns: 1fr !important;
    gap: 12px;
  }

  /* ===== 5. 配置行/价格行/评分条堆叠 ===== */
  .config-row {
    grid-template-columns: 1fr !important;
    gap: 4px;
    padding: 10px 0;
  }
  .config-row .cr-control input,
  .config-row .cr-control select {
    width: 100% !important;
  }
  .config-row .cr-val {
    text-align: left;
  }
  .price-row {
    grid-template-columns: 1fr 1fr !important;
    gap: 6px;
    padding: 8px 4px;
    font-size: 12px;
  }
  .price-row .ch-name { grid-column: 1 / -1; }
  .price-row .tag-row { grid-column: 1 / -1; }
  .score-bar {
    grid-template-columns: 60px 1fr 30px !important;
    gap: 6px;
    font-size: 11px;
  }

  /* ===== 6. 顶栏精简 ===== */
  .topbar .crumbs {
    font-size: 11px;
    max-width: 40vw;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .topbar .user .name {
    display: none; /* 小屏只显示头像 */
  }
  .topbar .user .role {
    font-size: 10px;
  }
  .topbar .right {
    gap: 8px;
  }

  /* ===== 7. 分页紧凑化 ===== */
  .pagination {
    flex-wrap: wrap;
    gap: 4px;
    justify-content: center;
  }
  .pagination .pages a,
  .pagination.page-nav .page-item {
    min-width: 36px;
    height: 36px;
    padding: 0 8px;
    font-size: 12px;
  }
  /* 分页信息文字 */
  .pagination::before {
    width: 100%;
    text-align: center;
    margin-bottom: 4px;
    font-size: 11px;
  }

  /* ===== 8. 按钮触摸目标 ===== */
  .btn {
    height: 38px;
    padding: 0 14px;
    font-size: 13px;
  }
  .btn-sm {
    height: 34px;
    padding: 0 10px;
    font-size: 12px;
  }
  .btn-primary-lg {
    height: 42px;
    font-size: 14px;
  }
  /* 页面标题按钮区 */
  .page-title .actions {
    width: 100%;
    flex-wrap: wrap;
    gap: 6px;
  }
  .page-title .actions .btn {
    flex: 1 1 auto;
    min-width: 80px;
  }

  /* ===== 9. 进度条/节点流横向滚动 ===== */
  .node-progress,
  .mediator-progress {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 6px;
  }
  .node-progress::-webkit-scrollbar,
  .mediator-progress::-webkit-scrollbar { display: none; }

  /* ===== 10. 卡片/配置组内边距缩减 ===== */
  .card {
    padding: 14px;
    margin-bottom: 12px;
    border-radius: 10px;
  }
  .card-title {
    font-size: 13px;
    padding-bottom: 8px;
    margin-bottom: 10px;
  }
  .config-group {
    padding: 14px;
    margin-bottom: 10px;
  }
  .config-group h4 {
    font-size: 13px;
    padding-bottom: 8px;
  }

  /* ===== 11. 报价预览/利润三联 ===== */
  .quote-preview {
    padding: 16px;
    border-radius: 10px;
  }
  .quote-preview .qp-title { font-size: 16px; }
  .quote-preview .qp-info {
    grid-template-columns: 1fr !important;
    gap: 4px;
    font-size: 12px;
  }
  .quote-preview table { font-size: 12px; }
  .quote-preview table th,
  .quote-preview table td {
    padding: 6px 8px;
  }

  /* ===== 12. 权限矩阵表横向滚动 ===== */
  .perm-matrix .table-wrap {
    overflow-x: auto;
  }
  .perm-matrix table {
    min-width: 500px;
  }
  .perm-matrix table th,
  .perm-matrix table td {
    padding: 6px 8px;
    font-size: 12px;
  }

  /* ===== 13. 工具栏增强 ===== */
  .toolbar {
    flex-direction: column;
    gap: 8px;
    align-items: stretch;
    padding-bottom: 10px;
  }
  .toolbar .search-box {
    width: 100% !important;
  }
  .toolbar .filters {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 6px;
  }
  .toolbar .filters select,
  .toolbar .filters input {
    width: 100%;
  }
  .toolbar .spacer { display: none; }
  .toolbar .scope-switcher {
    width: 100%;
    justify-content: center;
  }
  .toolbar .scope-switcher button {
    flex: 1;
    padding: 6px 8px;
    font-size: 11px;
  }

  /* ===== 14. 统计卡片紧凑 ===== */
  .stat-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px;
  }
  .stat-card {
    padding: 12px;
  }
  .stat-card .num { font-size: 16px; }
  .stat-card .label { font-size: 11px; }
  .stat-card .iconbox {
    width: 32px;
    height: 32px;
    font-size: 15px;
  }

  /* ===== 15. 消息/待办列表 ===== */
  .msg-item {
    padding: 10px 12px;
    gap: 8px;
  }
  .msg-item .mi-ico {
    width: 32px;
    height: 32px;
    font-size: 14px;
  }
  .msg-item .mi-title { font-size: 13px; }
  .msg-item .mi-content { font-size: 12px; }

  /* ===== 16. 内联样式覆盖(通用) ===== */
  .page [style*="grid-template-columns:1fr 1fr"],
  .page [style*="grid-template-columns: 1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }
  .page [style*="grid-template-columns:repeat(3,1fr)"],
  .page [style*="grid-template-columns: repeat(3, 1fr)"] {
    grid-template-columns: 1fr !important;
  }
  .page [style*="grid-template-columns:repeat(4,1fr)"],
  .page [style*="grid-template-columns: repeat(4, 1fr)"] {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
  }
  .page [style*="grid-template-columns:2fr 1fr"],
  .page [style*="grid-template-columns: 2fr 1fr"] {
    grid-template-columns: 1fr !important;
  }
  .page [style*="grid-template-columns:1fr 2fr"],
  .page [style*="grid-template-columns: 1fr 2fr"] {
    grid-template-columns: 1fr !important;
  }

  /* flex 布局换行 */
  .page [style*="display:flex"][style*="gap:10px"]:not([style*="flex-direction"]),
  .page [style*="display: flex"][style*="gap: 10px"]:not([style*="flex-direction"]) {
    flex-wrap: wrap;
  }

  /* ===== 17. 交接对话框 ===== */
  .transfer-dialog {
    padding: 16px;
    border-radius: 12px;
  }
  .transfer-item {
    padding: 10px;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  /* ===== 18. 跟进时间轴 ===== */
  .follow-timeline {
    padding-left: 20px;
  }
  .follow-timeline .ft-item .ft-body {
    padding: 8px 10px;
    font-size: 12px;
  }
  .follow-timeline .ft-item .ft-head {
    font-size: 11px;
    flex-wrap: wrap;
    gap: 4px;
  }

  /* ===== 19. 饼图/图表区 ===== */
  .pie-wrap {
    flex-direction: column;
    gap: 12px;
    height: auto;
  }
  .pie-svg {
    width: 160px;
    height: 160px;
  }
  .pie-legend div { font-size: 12px; padding: 4px 0; }
  .chart-placeholder {
    height: 160px !important;
  }

  /* ===== 20. 登录页 ===== */
  .login-wrap { flex-direction: column; align-items: center; gap: 0; }
  .login-card {
    width: 100%;
    max-width: 400px;
    grid-template-columns: 1fr !important;
  }
  .login-left {
    padding: 24px 20px;
    min-height: 120px;
    justify-content: flex-start;
  }
  .login-left .hero { flex: 1; }
  .login-left .hero h2 { font-size: 20px; }
  .login-left .features { display: none; }
  .login-left .copy-desktop { display: none; }
  .copy-mobile { display: block; margin-top: 12px; text-align: center; opacity: .65; font-size: 12px; color: rgba(255,255,255,.7); }
  .copy-mobile + .copy-mobile { margin-top: 2px; }
  .login-right {
    padding: 24px 20px;
  }
  .login-right h1 { font-size: 18px; }

  /* ===== 21. 客户/渠道卡片 ===== */
  .channel-card {
    padding: 14px;
    margin-bottom: 10px;
  }
  .customer-card {
    padding: 12px;
    margin-bottom: 10px;
  }

  /* ===== 22. metric-row 2列 ===== */
  .metric-row {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px;
  }
  .metric-row .metric {
    padding: 10px;
  }
  .metric-row .metric .mv { font-size: 16px; }
  .metric-row .metric .ml { font-size: 11px; }

  /* ===== 23. mini-metric 单列堆叠 ===== */
  .page [style*="display:grid"][style*="repeat(3"] .mini-metric,
  .page [style*="display: grid"][style*="repeat(3"] .mini-metric {
    width: 100%;
  }
}

/* ===== 超小屏(≤380px) 进一步优化 ===== */
@media (max-width: 380px) {
  .stat-grid {
    grid-template-columns: 1fr !important;
  }
  .metric-row {
    grid-template-columns: 1fr !important;
  }
  .toolbar .filters {
    grid-template-columns: 1fr !important;
  }
  .page-title h1 { font-size: 14px; }
  .topbar .crumbs { display: none; }
  .card { padding: 10px; }
  .modal-body { padding: 10px; }
}

/* ========== 移动端通用 Grid 工具类 ==========
   用法：在 Blade 中直接使用 class="m-grid m-grid-2" / "m-grid-3" / "m-grid-4"
   会自动在 ≤768px 时以网格布局排列子元素，≥769px 时正常流式布局
   支持响应式断点：m-grid-sm-2 (≤480px 2列), m-grid-sm-1 (≤480px 1列)
============================================================ */

/* PC 端默认正常流式 */
.m-grid { display: block; }

/* 平板/手机端：激活网格 */
@media (max-width: 768px) {
  .m-grid { display: grid; gap: 8px; }
  .m-grid-2 { grid-template-columns: repeat(2, 1fr); }
  .m-grid-3 { grid-template-columns: repeat(3, 1fr); }
  .m-grid-4 { grid-template-columns: repeat(4, 1fr); }
  .m-grid-5 { grid-template-columns: repeat(5, 1fr); }
  .m-grid-6 { grid-template-columns: repeat(6, 1fr); }

  /* gap 修饰符 */
  .m-grid-gap-sm { gap: 6px; }
  .m-grid-gap-md { gap: 8px; }
  .m-grid-gap-lg { gap: 12px; }
  .m-grid-gap-none { gap: 0; }

  /* 子元素跨列 */
  .m-col-span-2 { grid-column: span 2; }
  .m-col-span-3 { grid-column: span 3; }
  .m-col-full { grid-column: 1 / -1; }
}

/* 超窄屏断点（≤480px）覆盖 */
@media (max-width: 480px) {
  .m-grid-sm-1 { grid-template-columns: 1fr !important; }
  .m-grid-sm-2 { grid-template-columns: repeat(2, 1fr) !important; }
  .m-grid-sm-3 { grid-template-columns: repeat(3, 1fr) !important; }
}

/* ========== 保险模块美化样式 ========== */

/* 保险页面容器 */
.ins-page {
  padding: 0;
}

/* 页面标题 */
.ins-page-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding: 10px 0;
}

.ins-page-title .left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ins-page-title .page-icon {
  width: 36px;
  height: 36px;
  background: #f5f3ff;
  color: #6b21a8;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  border: 1px solid #ddd6fe;
}

.ins-page-title h1 {
  font-size: 17px;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
}

.ins-page-title .sub {
  font-size: 12px;
  color: #64748b;
  margin-top: 2px;
}

/* 统计卡片组 */
.ins-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 12px;
}

.ins-stat-card {
  background: #fff;
  border-radius: 8px;
  padding: 14px 16px;
  border: 1px solid #e5e7eb;
  position: relative;
  overflow: hidden;
  transition: border-color .15s ease;
  display: flex;
  align-items: center;
  gap: 12px;
}

.ins-stat-card:hover {
  border-color: #c4b5fd;
}

.ins-stat-card .ins-stat-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.ins-stat-card.purple .ins-stat-icon { background: #f5f3ff; color: #6b21a8; border: 1px solid #ddd6fe; }
.ins-stat-card.blue .ins-stat-icon   { background: #eff6ff; color: #1e40af; border: 1px solid #bfdbfe; }
.ins-stat-card.green .ins-stat-icon  { background: #ecfdf5; color: #059669; border: 1px solid #a7f3d0; }
.ins-stat-card.orange .ins-stat-icon { background: #fff7ed; color: #ea580c; border: 1px solid #fed7aa; }

.ins-stat-card .stat-body {
  flex: 1;
  min-width: 0;
  text-align: center;
}

.ins-stat-card .ins-stat-label {
  font-size: 12px;
  color: #64748b;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ins-stat-card .ins-stat-value {
  font-size: 22px;
  font-weight: 700;
  margin-top: 4px;
  letter-spacing: 0.3px;
  line-height: 1.2;
}

.ins-stat-card.purple .ins-stat-value { color: #6b21a8; }
.ins-stat-card.blue .ins-stat-value   { color: #1e40af; }
.ins-stat-card.green .ins-stat-value  { color: #059669; }
.ins-stat-card.orange .ins-stat-value { color: #ea580c; }

.ins-stat-card .ins-stat-sub {
  font-size: 11px;
  color: #94a3b8;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 工具栏 */
.ins-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 10px;
}

.ins-toolbar .filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.ins-toolbar input,
.ins-toolbar select {
  padding: 7px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 12.5px;
  font-family: inherit;
  background: #fff;
  transition: border-color .15s, box-shadow .15s;
}

.ins-toolbar input:focus,
.ins-toolbar select:focus {
  outline: none;
  border-color: #6b21a8;
  box-shadow: 0 0 0 2px rgba(107, 33, 168, .10);
}

.ins-toolbar input::placeholder {
  color: #94a3b8;
}

/* 卡片容器 */
.ins-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  overflow: hidden;
}

/* 表格：固定列宽布局，避免操作列乱拉伸 */
.ins-card .table {
  margin-bottom: 0;
  font-size: 12.5px;
  table-layout: fixed;
  width: 100%;
  border-collapse: collapse;
}

.ins-card thead th {
  background: #f5f3ff;
  color: #6b21a8;
  font-weight: 600;
  font-size: 12px;
  white-space: nowrap;
  text-align: center;
  border-bottom: 1px solid #ddd6fe;
  padding: 8px 10px !important;
  letter-spacing: 0.2px;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ins-card tbody td {
  color: #0f172a;
  padding: 8px 10px !important;
  border-bottom: 1px solid #f1f5f9;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.5;
  vertical-align: middle;
}

.ins-card tbody tr:hover {
  background: #faf9ff;
  transition: background .12s ease;
}

.ins-card tbody tr:last-child td {
  border-bottom: none;
}

/* 列对齐规则：首列(名称/单号)左对齐，操作列右对齐，金额列数字右对齐 */
.ins-card td:first-child,
.ins-card th:first-child {
  text-align: left;
}
.ins-card td.col-ops,
.ins-card th.col-ops {
  text-align: center;
  width: 170px;
}
.ins-card td.col-amt,
.ins-card th.col-amt {
  text-align: right;
  padding-right: 16px !important;
  width: 110px;
}

/* 操作列按钮更紧凑 */
.ins-card td.col-ops .ins-link,
.ins-card td.col-ops .ins-link-btn {
  font-size: 12px;
  margin-right: 4px;
}
.ins-card td.col-ops .ins-link:last-child,
.ins-card td.col-ops .ins-link-btn:last-child {
  margin-right: 0;
}
.ins-card td.col-ops form {
  display: inline;
}

/* 金额样式 */
.ins-amt {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.ins-amt.purple { color: #6b21a8; }
.ins-amt.green  { color: #059669; }
.ins-amt.orange { color: #ea580c; }
.ins-amt.blue   { color: #1e40af; }
.ins-amt.red    { color: #dc2626; }

.ins-mono {
  font-family: "SF Mono", Consolas, Menlo, monospace;
  font-size: 12px;
}

/* 按钮样式 */
.ins-btn {
  padding: 7px 14px;
  border-radius: 6px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all .12s ease;
  white-space: nowrap;
  line-height: 1.4;
}

.ins-btn-primary {
  background: #6b21a8;
  color: #fff;
  border-color: #6b21a8;
}

.ins-btn-primary:hover {
  background: #581c87;
  border-color: #581c87;
}

.ins-btn-secondary {
  background: #fff;
  color: #475569;
  border: 1px solid #cbd5e1;
}

.ins-btn-secondary:hover {
  background: #f8fafc;
  border-color: #94a3b8;
}

.ins-btn-outline {
  background: #fff;
  color: #6b21a8;
  border: 1px solid #ddd6fe;
}

.ins-btn-outline:hover {
  background: #faf5ff;
  border-color: #a78bfa;
}

.ins-btn-danger {
  background: #fff;
  color: #dc2626;
  border: 1px solid #fecaca;
}

.ins-btn-danger:hover {
  background: #fef2f2;
  border-color: #dc2626;
}

/* 链接样式 */
.ins-link {
  color: #6b21a8;
  text-decoration: none;
  font-size: 12.5px;
  font-weight: 600;
  margin-right: 8px;
  transition: color .12s;
}

.ins-link:hover {
  color: #581c87;
  text-decoration: underline;
}

.ins-link.danger { color: #dc2626; }
.ins-link.danger:hover { color: #b91c1c; }

.ins-link-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  font-size: 12.5px;
  font-weight: 600;
  color: #6b21a8;
  margin-right: 8px;
  font-family: inherit;
}

.ins-link-btn.danger { color: #dc2626; }
.ins-link-btn:hover { text-decoration: underline; }

/* 禁用状态（平台默认模板对代理商不可操作） */
.ins-link.disabled,
.ins-link-btn.disabled {
  color: #cbd5e1 !important;
  cursor: not-allowed;
  text-decoration: none;
  pointer-events: none;
}

/* 空状态 */
.ins-empty {
  padding: 48px 20px;
  text-align: center;
  color: #94a3b8;
  font-size: 13px;
}

.ins-empty .empty-icon {
  font-size: 40px;
  margin-bottom: 10px;
  opacity: 0.4;
}

.ins-empty .empty-text {
  font-size: 14px;
  color: #64748b;
  font-weight: 600;
  margin-bottom: 4px;
}

.ins-empty .empty-hint {
  font-size: 12.5px;
  color: #94a3b8;
}

/* 分页 */
.ins-pager {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
  font-size: 12.5px;
  color: #64748b;
  flex-wrap: wrap;
  gap: 10px;
}

.ins-pager .pager-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ins-pager .pager-total {
  font-weight: 600;
  color: #0f172a;
}

/* 标签样式 */
.tag {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  background: #eef2ff;
  color: #3730a3;
  margin: 1px 2px 1px 0;
  line-height: 1.5;
}
.tag.sky    { background: #e0f2fe; color: #0369a1; }
.tag.amber  { background: #fef3c7; color: #92400e; }
.tag.red    { background: #fee2e2; color: #991b1b; }
.tag.green  { background: #dcfce7; color: #166534; }
.tag.purple { background: #f3e8ff; color: #6b21a8; }
.tag.gray   { background: #f1f5f9; color: #475569; }

/* 状态徽章增强 */
.badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.5;
  white-space: nowrap;
}
.badge-bg-success   { background: #dcfce7 !important; color: #166534 !important; }
.badge-bg-secondary { background: #f1f5f9 !important; color: #475569 !important; }
.badge-bg-warning   { background: #fef3c7 !important; color: #92400e !important; }
.badge-bg-danger    { background: #fee2e2 !important; color: #991b1b !important; }
.badge-bg-info      { background: #dbeafe !important; color: #1e40af !important; }
.badge-bg-primary   { background: #e0e7ff !important; color: #3730a3 !important; }
.badge-bg-purple    { background: #f3e8ff !important; color: #6b21a8 !important; }

/* 详情页样式 */
.ins-detail {
  max-width: 1100px;
  margin: 0 auto;
}

.ins-block {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 16px 18px;
  margin-bottom: 10px;
}

.ins-block h3 {
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 10px;
  border-bottom: 1px solid #f1f5f9;
}

.ins-block h3 .bar {
  width: 3px;
  height: 15px;
  background: #6b21a8;
  border-radius: 2px;
  display: inline-block;
}

.ins-block h3 .icon {
  font-size: 16px;
}

.ins-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px 20px;
}

.ins-grid .item {
  font-size: 12.5px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.ins-grid .item .lbl {
  color: #64748b;
  font-size: 11.5px;
  font-weight: 500;
}

.ins-grid .item .val {
  color: #0f172a;
  font-weight: 600;
  word-break: break-all;
}

.ins-grid .item .val.mono {
  font-family: "SF Mono", Consolas, monospace;
  font-size: 12px;
}

.ins-grid .item .val.amt {
  color: #6b21a8;
  font-weight: 700;
}

.ins-evidence {
  grid-column: 1 / -1;
}

.ins-files {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 2px;
}

.ins-files .file {
  background: #f5f3ff;
  border: 1px solid #ddd6fe;
  color: #6b21a8;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  transition: all .12s;
  text-decoration: none;
}

.ins-files .file:hover {
  background: #ede9fe;
  border-color: #a78bfa;
}

.ins-files .empty {
  color: #94a3b8;
  font-size: 12px;
}

/* 时间线 */
.ins-timeline {
  position: relative;
  padding-left: 28px;
}

.ins-timeline::before {
  content: "";
  position: absolute;
  left: 9px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: #e5e7eb;
}

.ins-timeline .tl-item {
  position: relative;
  padding: 0 0 16px;
}

.ins-timeline .tl-item:last-child {
  padding-bottom: 0;
}

.ins-timeline .tl-dot {
  position: absolute;
  left: -23px;
  top: 1px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #6b21a8;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  border: 3px solid #fff;
  box-shadow: 0 0 0 1px #ddd6fe;
}

.ins-timeline .tl-item.done .tl-dot {
  background: #059669;
  box-shadow: 0 0 0 1px #a7f3d0;
}

.ins-timeline .tl-item.active .tl-dot {
  background: #ea580c;
  box-shadow: 0 0 0 1px #fed7aa;
  animation: pulse 2s infinite;
}

.ins-timeline .tl-label {
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
}

.ins-timeline .tl-meta {
  font-size: 11.5px;
  color: #94a3b8;
  margin-top: 2px;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 1px #fed7aa; }
  50%      { box-shadow: 0 0 0 4px rgba(254, 215, 170, 0.4); }
}

/* 操作表单 */
.ins-action-form {
  background: #faf9ff;
  border: 1px solid #ddd6fe;
  border-radius: 8px;
  padding: 14px 16px;
  margin-top: 10px;
}

.ins-action-form h4 {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 700;
  color: #6b21a8;
}

/* 操作表单（继续） */
.ins-action-form .field {
  margin-bottom: 10px;
}

.ins-action-form label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: #0f172a;
  margin-bottom: 4px;
}

.ins-action-form label .req {
  color: #dc2626;
}

.ins-action-form input[type=text],
.ins-action-form input[type=number],
.ins-action-form select,
.ins-action-form textarea {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 12.5px;
  font-family: inherit;
  box-sizing: border-box;
  background: #fff;
  transition: border-color .12s, box-shadow .12s;
}

.ins-action-form input:focus,
.ins-action-form select:focus,
.ins-action-form textarea:focus {
  outline: none;
  border-color: #6b21a8;
  box-shadow: 0 0 0 2px rgba(107, 33, 168, .10);
}

.ins-action-form textarea {
  min-height: 72px;
  resize: vertical;
}

.ins-radio-row {
  display: flex;
  gap: 18px;
  align-items: center;
}

.ins-radio-row label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 0;
  font-weight: 600;
  cursor: pointer;
  font-size: 12.5px;
}

.ins-radio-row input {
  accent-color: #6b21a8;
  width: 15px;
  height: 15px;
}

/* 状态显示 */
.ins-terminal {
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.ins-terminal.closed {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
}

.ins-terminal.rejected {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.ins-terminal.pending {
  background: #fffbeb;
  color: #92400e;
  border: 1px solid #fde68a;
}

.ins-terminal.success {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.ins-reject-row {
  margin-top: 10px;
  border-top: 1px dashed #cbd5e1;
  padding-top: 10px;
}

/* 表单页样式 */
.ins-form {
  max-width: 800px;
  margin: 0 auto;
}

.ins-form-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 20px 22px;
}

.ins-form-card h2 {
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #f1f5f9;
  display: flex;
  align-items: center;
  gap: 8px;
}

.ins-form-card h2::before {
  content: "";
  width: 3px;
  height: 18px;
  background: #6b21a8;
  border-radius: 2px;
}

.ins-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 16px;
}

.ins-field {
  margin-bottom: 12px;
}

.ins-field label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: #0f172a;
  margin-bottom: 4px;
}

.ins-field label .req {
  color: #dc2626;
}

.ins-field label .hint {
  font-size: 11px;
  color: #94a3b8;
  font-weight: 400;
  margin-left: 6px;
}

.ins-field input[type=text],
.ins-field input[type=number],
.ins-field select,
.ins-field textarea {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 12.5px;
  font-family: inherit;
  box-sizing: border-box;
  background: #fff;
  transition: border-color .12s, box-shadow .12s;
}

.ins-field input:focus,
.ins-field select:focus,
.ins-field textarea:focus {
  outline: none;
  border-color: #6b21a8;
  box-shadow: 0 0 0 2px rgba(107, 33, 168, .10);
}

.ins-field textarea {
  min-height: 80px;
  resize: vertical;
}

.ins-check {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
}

.ins-check input[type=checkbox] {
  width: 16px;
  height: 16px;
  accent-color: #6b21a8;
  cursor: pointer;
}

.ins-check span {
  font-size: 13px;
  color: #475569;
}

.ins-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid #f1f5f9;
}

/* 提示框 */
.ins-alert-success {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #166534;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 12.5px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.ins-alert-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 12.5px;
  margin-bottom: 10px;
}

/* 阶梯费率配置 */
.ins-tier-box {
  background: #faf9ff;
  border: 1px solid #ddd6fe;
  border-radius: 8px;
  padding: 14px;
  margin-top: 10px;
}

.ins-tier-box h4 {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 700;
  color: #6b21a8;
}

.ins-tier-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 5px;
}

.ins-tier-table th {
  text-align: left;
  padding: 6px 8px;
  color: #64748b;
  font-weight: 600;
  font-size: 11.5px;
  white-space: nowrap;
  background: transparent;
  border: none;
}

.ins-tier-table td {
  padding: 4px 8px;
  vertical-align: middle;
}

.ins-tier-table input {
  width: 100%;
  padding: 7px 9px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 12px;
  box-sizing: border-box;
  background: #fff;
}

.ins-tier-table input:focus {
  outline: none;
  border-color: #6b21a8;
  box-shadow: 0 0 0 2px rgba(107, 33, 168, .08);
}

.ins-tier-del {
  background: #fff;
  border: 1px solid #fecaca;
  color: #dc2626;
  cursor: pointer;
  font-size: 12px;
  padding: 5px 10px;
  border-radius: 6px;
  transition: all .12s;
  font-weight: 600;
}

.ins-tier-del:hover {
  background: #fef2f2;
  border-color: #dc2626;
}

.ins-add-tier {
  margin-top: 10px;
  background: #fff;
  color: #6b21a8;
  border: 1px dashed #a78bfa;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all .12s;
}

.ins-add-tier:hover {
  background: #faf5ff;
  border-color: #6b21a8;
}

/* ========== 保险模块响应式设计 ========== */
@media (max-width: 960px) {
  .ins-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  .ins-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .ins-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
  }
  .ins-stat-card {
    padding: 10px 12px;
    gap: 8px;
    flex-direction: column;
    text-align: center;
  }
  .ins-stat-card .ins-stat-icon {
    width: 36px;
    height: 36px;
    font-size: 16px;
  }
  .ins-stat-card .ins-stat-value {
    font-size: 18px;
  }
  .ins-stat-card .ins-stat-label {
    font-size: 11px;
  }
  .ins-stat-card .ins-stat-sub {
    font-size: 10px;
  }

  .ins-toolbar {
    padding: 8px 10px;
  }
  .ins-toolbar .filters {
    width: 100%;
  }
  .ins-toolbar input,
  .ins-toolbar select {
    flex: 1 1 100%;
  }
  .ins-toolbar .ins-btn {
    width: 100%;
    justify-content: center;
  }

  .ins-card {
    border-radius: 6px;
  }
  .ins-card thead th {
    padding: 8px 8px !important;
    font-size: 11px;
  }
  .ins-card tbody td {
    padding: 8px 6px !important;
    font-size: 11.5px;
    max-width: 110px;
  }

  .ins-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .ins-row {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .ins-form-card {
    padding: 14px;
  }

  .ins-block {
    padding: 12px 14px;
  }
  .ins-block h3 {
    font-size: 13px;
    margin-bottom: 10px;
    padding-bottom: 8px;
  }

  .ins-pager {
    flex-direction: column;
    align-items: stretch;
  }
  .ins-pager .pager-info {
    justify-content: center;
  }
  .ins-pager > div:last-child {
    text-align: center;
  }

  .ins-actions {
    flex-direction: column-reverse;
  }
  .ins-actions .ins-btn {
    width: 100%;
    justify-content: center;
  }
}

/* 表格内金额样式 */
.ins-mono {
  font-family: "SF Mono", Consolas, monospace;
  font-size: 12.5px;
  color: #475569;
}

.ins-amt {
  font-weight: 700;
  color: #0f172a;
}

.ins-amt.purple { color: #6b21a8; }
.ins-amt.green { color: #059669; }
.ins-amt.orange { color: #ea580c; }

/* 响应式 */
@media (max-width: 1080px) {
  .ins-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .ins-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .ins-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .ins-stat-card {
    padding: 14px 16px;
  }

  .ins-stat-card .ins-stat-value {
    font-size: 22px;
  }

  .ins-stat-card .ins-stat-icon {
    width: 36px;
    height: 36px;
    font-size: 18px;
  }

  .ins-toolbar {
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
  }

  .ins-toolbar .filters {
    flex-direction: column;
  }

  .ins-toolbar .filters select,
  .ins-toolbar .filters input {
    width: 100%;
  }

  .ins-grid {
    grid-template-columns: 1fr;
    gap: 12px 16px;
  }

  .ins-row {
    grid-template-columns: 1fr;
  }

  .ins-block {
    padding: 16px;
  }

  .ins-form-card {
    padding: 20px 16px;
  }

  .ins-timeline {
    padding-left: 28px;
  }

  .ins-timeline .tl-dot {
    left: -22px;
    width: 20px;
    height: 20px;
    font-size: 11px;
  }

  .ins-actions {
    flex-direction: column;
  }

  .ins-actions .ins-btn {
    width: 100%;
    justify-content: center;
  }

  .ins-card {
    overflow-x: auto;
  }

  .ins-card .table {
    min-width: 800px;
  }
}

@media (max-width: 480px) {
  .ins-stats {
    grid-template-columns: 1fr;
  }

  .ins-grid {
    grid-template-columns: 1fr;
  }
}

