* {
  box-sizing: border-box;
}
body {
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  background: #f5f6fa;
  margin: 0;
  color: #333;
}
.container {
  max-width: 1020px;
  margin: 0 auto;
  padding: 20px 16px 40px;
}
.topnav {
  background: #1e2a3a;
  border-radius: 8px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.site-title {
  text-align: center;
  font-size: 22px;
  font-weight: 700;
  color: #1e2a3a;
  padding: 6px 0 14px;
}
.topnav a {
  color: #cfd8e3;
  text-decoration: none;
  padding: 14px 14px;
  font-size: 14px;
}
.topnav a:hover {
  color: #fff;
}
.topnav a.active {
  color: #fff;
  border-bottom: 3px solid #3b82f6;
}
h1 {
  font-size: 22px;
  margin: 6px 0 16px;
}
h2 {
  font-size: 17px;
  margin: 0 0 12px;
}
.card {
  background: #fff;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.form-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.form-item label {
  font-weight: 600;
  font-size: 13px;
}
.form-item input,
.form-item select,
.form-item textarea {
  padding: 9px 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 14px;
  width: 100%;
}
textarea {
  resize: vertical;
}
.hint {
  color: #777;
  font-size: 13px;
  margin: 0 0 14px;
}
.btn {
  background: #3b82f6;
  color: #fff;
  border: none;
  padding: 10px 24px;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
}
.btn:hover {
  background: #2f6fd6;
}
.btn:disabled {
  background: #a0aec0;
  cursor: not-allowed;
}
table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
}
th,
td {
  padding: 9px 12px;
  border-bottom: 1px solid #eef0f4;
  text-align: left;
  font-size: 14px;
  vertical-align: top;
}
th {
  background: #f0f3f8;
  font-weight: 600;
}
a {
  color: #3b82f6;
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
.channel-group {
  margin-bottom: 18px;
}
.channel-group h3 {
  font-size: 16px;
  margin: 0 0 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid #eef0f4;
}
.channel-table {
  margin-bottom: 8px;
}
.channel-table th,
.channel-table td {
  padding: 11px 12px;
}
.channel-table tr.channel-item {
  cursor: pointer;
}
.channel-table tr.channel-item:hover td {
  background: #f8faff;
}
.channel-table tr.channel-item.selected td {
  background: #eff6ff;
}
.channel-table tr.channel-item.selected td:first-child {
  border-left: 3px solid #3b82f6;
}
.channel-item input[type="radio"] {
  transform: scale(1.15);
  cursor: pointer;
}
.channel-item .price {
  font-size: 16px;
  font-weight: 700;
  color: #d35400;
}
.badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 10px;
  font-size: 12px;
}
.badge.green {
  background: #e6f7e6;
  color: #1a7f37;
}
.badge.red {
  background: #fdecea;
  color: #c0392b;
}
.badge.gray {
  background: #eef0f4;
  color: #555;
}
.json-block {
  margin: 0;
  padding: 6px 8px;
  background: #f7f8fa;
  border-radius: 4px;
  font-size: 12px;
  max-height: 160px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-all;
}

.quick-addr {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 10px 12px;
  background: #f7f9fc;
  border: 1px dashed #cbd5e1;
  border-radius: 6px;
  margin-bottom: 16px;
}
.quick-label {
  font-weight: 600;
  font-size: 13px;
  color: #555;
}
.quick-search {
  position: relative;
  min-width: 220px;
  max-width: 100%;
}
.quick-search input {
  padding: 8px 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 14px;
  width: 100%;
}
.quick-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 2px;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 6px;
  max-height: 240px;
  overflow: auto;
  z-index: 60;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  display: none;
}
.quick-dropdown .qi {
  padding: 9px 12px;
  font-size: 14px;
  cursor: pointer;
  border-bottom: 1px solid #f0f2f5;
}
.quick-dropdown .qi:hover,
.quick-dropdown .qi.active {
  background: #eff6ff;
}
.quick-dropdown .qi.none {
  color: #999;
  cursor: default;
}
.btn-sm {
  padding: 7px 14px;
  font-size: 13px;
}
.btn-gray {
  background: #64748b;
}
.btn-gray:hover {
  background: #526074;
}
/* 可达性结果表（撑满卡片、等宽分列） */
.reachable-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}
.reachable-table th,
.reachable-table td {
  padding: 15px 12px;
  font-size: 16px;
  text-align: center;
  border-bottom: 1px solid #eef1f6;
  word-break: break-all;
}
.reachable-table th {
  background: #f5f7fa;
  font-weight: 600;
}
.reachable-table th:nth-child(1),
.reachable-table td:nth-child(1) {
  width: 32%;
}
.reachable-table th:nth-child(2),
.reachable-table td:nth-child(2) {
  width: 28%;
}
.reachable-table th:nth-child(3),
.reachable-table td:nth-child(3) {
  width: 40%;
}
.reachable-table td:first-child {
  font-weight: 600;
}
.reachable-table tbody tr:nth-child(even) {
  background: #fafbfc;
}
/* 居中 Toast 提示（成功 2.5s / 失败 4s，点击可立即关闭） */
.toast-wrap {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 9999;
}
.toast {
  pointer-events: auto;
  max-width: 84%;
  min-width: 200px;
  margin: 8px 0;
  padding: 14px 24px;
  border-radius: 10px;
  font-size: 15px;
  line-height: 1.65;
  text-align: center;
  color: #fff;
  background: rgba(30, 41, 59, 0.94);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.2);
  word-break: break-all;
  white-space: pre-wrap;
  cursor: pointer;
  animation: toast-in 0.2s ease;
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.toast.success {
  background: rgba(22, 163, 74, 0.95);
}
.toast.error {
  background: rgba(220, 38, 38, 0.95);
}
.toast-out {
  opacity: 0;
  transform: translateY(6px);
}
@keyframes toast-in {
  from {
    opacity: 0;
    transform: scale(0.92);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}
/* 客服电话表 */
.phone-table th,
.phone-table td {
  padding: 11px 14px;
  font-size: 15px;
}
.phone-table .phone-num {
  font-weight: 700;
  font-size: 17px;
  letter-spacing: 0.5px;
}
.phone-table tbody tr {
  cursor: pointer;
}
.phone-table tbody tr:hover td {
  background: #eff6ff;
}
.copy-toast {
  background: #e6f7e6;
  color: #1a7f37;
  border: 1px solid #b7e3b7;
  border-radius: 6px;
  padding: 9px 14px;
  font-size: 14px;
  margin-bottom: 12px;
}
/* 历史订单：整行可点击 */
.orders-table {
  table-layout: fixed;
}
.orders-table th,
.orders-table td {
  word-break: break-all;
}
.orders-table th:nth-child(1),
.orders-table td:nth-child(1) {
  width: 24%;
}
.orders-table th:nth-child(2),
.orders-table td:nth-child(2) {
  width: 46%;
}
.orders-table th:last-child,
.orders-table td:last-child {
  width: 128px;
  text-align: center;
}
.orders-table td:last-child .btn {
  padding: 7px 9px;
  font-size: 13px;
  margin: 2px;
}
.orders-table tbody tr {
  cursor: pointer;
}
.orders-table tbody tr:hover td {
  background: #f8faff;
}
/* 运单号列：单击可复制（下划线提示） */
.orders-table td:nth-child(2) {
  cursor: copy;
  color: #2563eb;
}
@media (max-width: 480px) {
  .orders-table th:nth-child(1),
  .orders-table td:nth-child(1) {
    width: 22%;
  }
  .orders-table th:nth-child(2),
  .orders-table td:nth-child(2) {
    width: 42%;
  }
  .orders-table th:last-child,
  .orders-table td:last-child {
    width: 124px;
  }
  .orders-table td:last-child .btn {
    padding: 5px 6px;
    font-size: 12px;
    margin: 1px;
  }
}
/* 搜索栏：输入框占满、搜索按钮固定大小 */
.search-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
  align-items: stretch;
}
.search-bar input[type="text"] {
  flex: 1;
  min-width: 0;
  height: 44px;
  padding: 0 14px;
  border: 1px solid #d0d5dd;
  border-radius: 8px;
  font-size: 15px;
  box-sizing: border-box;
  outline: none;
}
.search-bar input[type="text"]:focus {
  border-color: #2563eb;
}
.search-bar .btn {
  flex: none;
  width: 76px;
  height: 44px;
  padding: 0;
  border-radius: 8px;
  font-size: 14px;
  line-height: 44px;
}
/* 分页：胶囊按钮 + 当前页高亮 + 省略号 */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 16px;
  flex-wrap: wrap;
}
.pg-btn {
  min-width: 34px;
  padding: 7px 10px;
  border: 1px solid #d9dee7;
  border-radius: 8px;
  font-size: 13px;
  color: #4b5563;
  text-align: center;
  text-decoration: none;
  background: #fff;
  box-sizing: border-box;
}
.pg-btn:hover {
  border-color: #2563eb;
  color: #2563eb;
}
.pg-btn.disabled {
  color: #c0c6d0;
  border-color: #e9edf2;
  pointer-events: none;
}
.pg-btn.current {
  background: #2563eb;
  border-color: #2563eb;
  color: #fff;
  font-weight: 600;
  pointer-events: none;
}
.pg-dots {
  color: #9aa3b2;
  padding: 0 2px;
  font-size: 13px;
}
.pg-info {
  font-size: 12px;
  color: #9aa3b2;
  margin: 0 4px;
}
.top-btn {
  position: fixed;
  right: 20px;
  bottom: 24px;
  z-index: 999;
  display: none;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border: none;
  border-radius: 50%;
  background: #1a73e8;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 3px 10px rgba(26, 115, 232, 0.35);
  cursor: pointer;
  opacity: 0.95;
}
.top-btn:hover {
  opacity: 1;
}
/* 模态窗口 */
.modal-mask {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
}
.modal {
  background: #fff;
  border-radius: 10px;
  max-width: 420px;
  width: 100%;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.2);
  overflow: hidden;
}
.modal-title {
  font-size: 16px;
  font-weight: 700;
  padding: 16px 20px 0;
}
.modal-body {
  font-size: 14px;
  color: #444;
  padding: 12px 20px;
  line-height: 1.6;
  word-break: break-all;
  max-height: 60vh;
  overflow: auto;
}
.modal-footer {
  padding: 12px 20px 18px;
  text-align: right;
}

/* 移动端竖屏适配 */
@media (max-width: 720px) {
  .container {
    padding: 12px 10px 32px;
  }
  h1 {
    font-size: 18px;
    margin: 4px 0 12px;
  }
  .card {
    padding: 14px;
    margin-bottom: 12px;
  }
  .form-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .form-item label {
    font-size: 13px;
  }
  .btn {
    width: 100%;
    padding: 12px 16px;
  }
  .topnav {
    padding: 0 6px;
    border-radius: 6px;
  }
  .site-title {
    font-size: 18px;
    padding: 4px 0 10px;
  }
  .topnav a {
    padding: 12px 8px;
    font-size: 13px;
  }
  table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }
  th,
  td {
    padding: 8px 10px;
    font-size: 13px;
  }
  .channel-item .price {
    font-size: 15px;
  }
  .quick-search {
    min-width: 0;
    width: 100%;
  }
  .btn-sm {
    flex: 1;
    min-width: 90px;
  }
  /* 客服电话表：两列同屏显示，不横向滚动 */
  .phone-table {
    display: table;
    width: 100%;
    table-layout: fixed;
    overflow: visible;
    white-space: normal;
  }
  .phone-table th,
  .phone-table td {
    padding: 11px 8px;
    font-size: 13px;
  }
  .phone-table th:nth-child(2),
  .phone-table td:nth-child(2) {
    width: 40%;
    text-align: right;
  }
  .phone-table .phone-num {
    font-size: 15px;
  }
  /* 历史订单表：恢复表格布局（覆盖 table{display:block}），操作列固定宽度、按钮紧凑不拉长 */
  .orders-table {
    display: table;
    width: 100%;
    table-layout: fixed;
    overflow: visible;
    white-space: normal;
  }
  .orders-table th,
  .orders-table td {
    white-space: normal;
    word-break: break-all;
  }
  .orders-table th:nth-child(1),
  .orders-table td:nth-child(1) {
    width: 22%;
  }
  .orders-table th:nth-child(2),
  .orders-table td:nth-child(2) {
    width: 42%;
  }
  .orders-table th:last-child,
  .orders-table td:last-child {
    width: 112px;
    text-align: center;
  }
  .orders-table td:last-child .btn {
    width: auto;
    flex: none;
    min-width: 0;
    padding: 6px 8px;
    font-size: 12px;
    margin: 1px;
  }
  .search-bar .btn-sm {
    width: 76px;
    height: 44px;
    flex: none;
    min-width: 0;
    padding: 0;
  }
  .modal {
    max-width: 92%;
  }
  .modal-title {
    font-size: 15px;
    padding: 14px 16px 0;
  }
  .modal-body {
    padding: 10px 16px;
  }
  .modal-footer {
    padding: 10px 16px 14px;
  }
}
/* 移动端锁定竖屏：手机横屏时旋转为竖屏展示 */
@media screen and (orientation: landscape) and (max-width: 920px) {
  html {
    transform: rotate(-90deg);
    transform-origin: left top;
    width: 100vh;
    height: 100vw;
    position: absolute;
    top: 100%;
    left: 0;
    overflow-x: hidden;
  }
}
