/**
 * Components — 统一组件样式
 * 卡片、按钮、状态标签、表单、空状态、抽屉、表格
 */

/* ========== 卡片 ========== */
.card {
  background: var(--color-bg-card);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  margin-bottom: var(--space-3);
  border: 1px solid var(--color-border-light);
  box-shadow: var(--shadow-sm);
}
.card-flat {
  box-shadow: none;
  border: 1px solid var(--color-border);
}
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-3);
}
.card-title {
  font-size: var(--font-md);
  font-weight: 700;
  color: var(--color-text-primary);
}
.card-subtitle {
  font-size: var(--font-sm);
  color: var(--color-text-secondary);
}

/* ========== 按钮 ========== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 0 var(--space-4);
  height: var(--btn-height);
  border: none;
  border-radius: var(--radius-md);
  font-size: var(--font-base);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  width: 100%;
  line-height: 1;
  white-space: nowrap;
}
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-primary { background: var(--color-primary-gradient); color: var(--color-text-inverse); box-shadow: 0 1px 2px rgba(37,99,235,.3); }
.btn-primary:active { background: var(--color-primary-dark); transform: translateY(1px); box-shadow: none; }

.btn-success { background: var(--color-success); color: var(--color-text-inverse); }
.btn-success:active { filter: brightness(0.9); }

.btn-danger { background: var(--color-danger); color: var(--color-text-inverse); }
.btn-danger:active { filter: brightness(0.9); }

.btn-ghost {
  background: var(--color-bg-subtle);
  color: var(--color-text-secondary);
  border: 1px solid var(--color-border);
}
.btn-ghost:active { background: var(--color-border-light); }

.btn-text {
  background: transparent;
  color: var(--color-primary);
  height: auto;
  padding: var(--space-2) var(--space-3);
  width: auto;
}

.btn-lg {
  height: var(--btn-height-lg);
  font-size: var(--font-lg);
  border-radius: var(--radius-lg);
}

.btn-sm {
  height: 36px;
  font-size: var(--font-sm);
  padding: 0 var(--space-3);
}

/* 悬浮按钮 */
.fab {
  position: fixed;
  bottom: 80px;
  right: var(--space-4);
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  border: none;
  font-size: var(--font-xl);
  box-shadow: var(--shadow-lg);
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.fab:active { transform: scale(0.95); background: var(--color-primary-dark); }

/* ========== 状态标签 ========== */
.badge {
  border-radius: var(--radius-full);
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: var(--font-xs);
  font-weight: 600;
  line-height: 1.4;
  white-space: nowrap;
}
.badge-success { background: var(--color-success-bg); color: var(--color-success); }
.badge-warning { background: var(--color-warning-bg); color: var(--color-warning); }
.badge-danger { background: var(--color-danger-bg); color: var(--color-danger); }
.badge-info { background: var(--color-info-bg); color: var(--color-info); }
.badge-neutral { background: var(--color-bg-subtle); color: var(--color-text-secondary); }

/* ========== 表单 ========== */
.form-group { margin-bottom: var(--space-4); }
.form-label {
  display: block;
  font-size: var(--font-sm);
  font-weight: 500;
  color: var(--color-text-secondary);
  margin-bottom: var(--space-1);
}
.form-input {
  width: 100%;
  height: var(--btn-height);
  padding: 0 var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: var(--font-base);
  background: var(--color-bg-subtle);
  transition: border-color 0.15s, background 0.15s;
}
.form-input:focus {
  outline: none;
  border-color: var(--color-primary);
  background: var(--color-bg-card);
}
.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

/* ========== 列表项 ========== */
.list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-3) var(--space-4);
  background: var(--color-bg-card);
  border-bottom: 1px solid var(--color-border-light);
  cursor: pointer;
  transition: background 0.15s;
  min-height: var(--touch-target);
}
.list-item:last-child { border-bottom: none; }
.list-item:active { background: var(--color-bg-subtle); }
.list-item-content { flex: 1; min-width: 0; }
.list-item-title {
  font-size: var(--font-base);
  font-weight: 600;
  color: var(--color-text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.list-item-desc {
  font-size: var(--font-sm);
  color: var(--color-text-secondary);
  margin-top: 2px;
}
.list-item-arrow {
  color: var(--color-text-tertiary);
  font-size: var(--font-sm);
  margin-left: var(--space-2);
  flex-shrink: 0;
}

/* ========== 空状态 ========== */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-8) var(--space-4);
  color: var(--color-text-secondary);
  text-align: center;
}
.empty-state-icon {
  font-size: 3rem;
  margin-bottom: var(--space-3);
  opacity: 0.35;
}
.empty-state-text {
  font-size: var(--font-base);
  color: var(--color-text-secondary);
}
.empty-state-hint {
  font-size: var(--font-sm);
  color: var(--color-text-tertiary);
  margin-top: var(--space-1);
}

/* ========== 加载/错误 ========== */
.loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-8);
  color: var(--color-text-secondary);
}
.loading-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--color-border);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: var(--space-3);
}
@keyframes spin { to { transform: rotate(360deg); } }

.error-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--space-8);
  color: var(--color-text-secondary);
  text-align: center;
}
.error-state .btn {
  margin-top: var(--space-3);
  width: auto;
  min-width: 120px;
}

/* ========== 抽屉（PC端） ========== */
.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 200;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
}
.drawer-overlay.active {
  opacity: 1;
  visibility: visible;
}
.drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 480px;
  max-width: 90vw;
  height: 100%;
  background: var(--color-bg-page);
  z-index: 201;
  transform: translateX(100%);
  transition: transform 0.25s ease;
  display: flex;
  flex-direction: column;
}
.drawer.active { transform: translateX(0); }
.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4);
  background: var(--color-panel-head-bg);
  border-bottom: 1px solid var(--color-border);
  flex-shrink: 0;
}
.drawer-header .drawer-title { color: var(--color-text-primary); }
.drawer-header .drawer-close { background: var(--color-bg-subtle); color: var(--color-text-secondary); }
.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-4);
}
.drawer-close {
  width: 36px;
  height: 36px;
  border: none;
  background: var(--color-bg-subtle);
  border-radius: 50%;
  font-size: var(--font-lg);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ========== 表格（PC端） ========== */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--font-sm);
}
.data-table thead th {
  text-align: left;
  padding: var(--space-3) var(--space-4);
  font-weight: 600;
  color: var(--color-text-secondary);
  border-bottom: 1px solid var(--color-border);
  background: var(--color-bg-subtle);
  white-space: nowrap;
}
.data-table tbody td {
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--color-border-light);
  color: var(--color-text-primary);
  vertical-align: middle;
}
.data-table tbody tr:hover td { background: var(--color-bg-subtle); }
.data-table tbody tr { cursor: pointer; }

/* ========== 顶部状态栏（PC端，CLEANITY 深色通栏） ========== */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--space-5);
  height: 56px;
  background: #1e293b;
  flex-shrink: 0;
}
.topbar-title {
  font-size: var(--font-lg);
  font-weight: 700;
  color: #fff;
}
.topbar-actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  color: rgba(255, 255, 255, 0.75);
}
.topbar-actions .text-secondary { color: rgba(255, 255, 255, 0.75); }

/* ========== 左侧导航（PC端，深色藏青） ========== */
.sidebar {
  width: 200px;
  background: var(--color-sidebar-bg);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}
.sidebar-brand {
  padding: var(--space-4);
  font-size: var(--font-lg);
  font-weight: 700;
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-2);
}
.sidebar-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  font-size: var(--font-sm);
  font-weight: 500;
  color: var(--color-sidebar-text);
  cursor: pointer;
  transition: all 0.15s;
  margin-bottom: 2px;
  border-left: 3px solid transparent;
}
.sidebar-item:hover { background: var(--color-sidebar-active-bg); color: #fff; }
.sidebar-item.active {
  background: var(--color-sidebar-active-bg);
  color: #fff;
  font-weight: 600;
  border-left-color: #3b82f6;
}
.sidebar-icon { display: inline-flex; width: 20px; justify-content: center; }

/* ========== 工具类 ========== */
.text-primary { color: var(--color-text-primary); }
.text-secondary { color: var(--color-text-secondary); }
.text-tertiary { color: var(--color-text-tertiary); }
.text-success { color: var(--color-success); }
.text-warning { color: var(--color-warning); }
.text-danger { color: var(--color-danger); }
.text-center { text-align: center; }
.text-right { text-align: right; }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.hidden { display: none !important; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.mt-1 { margin-top: var(--space-1); }
.mt-2 { margin-top: var(--space-2); }
.mt-3 { margin-top: var(--space-3); }
.mb-2 { margin-bottom: var(--space-2); }
.mb-3 { margin-bottom: var(--space-3); }
.p-3 { padding: var(--space-3); }
.p-4 { padding: var(--space-4); }
.rounded-md { border-radius: var(--radius-md); }
.rounded-lg { border-radius: var(--radius-lg); }
.bg-subtle { background: var(--color-bg-subtle); }
.border-t { border-top: 1px solid var(--color-border-light); }
.w-full { width: 100%; }
.flex-1 { flex: 1; }
.min-w-0 { min-width: 0; }
.truncate {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ========== 页面切换动画 ========== */
.page {
  display: none;
  animation: fadeIn 0.2s ease;
}
.page.active { display: block; }
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ========== P8：SVG 图标基类 ========== */
.ic { display: inline-flex; vertical-align: -3px; color: inherit; flex-shrink: 0; }
.ic-host { display: inline-flex; }
.empty-state-icon .ic { opacity: 0.35; }

/* ========== P8：数字等宽 ========== */
.num, .wb-stat-num { font-variant-numeric: tabular-nums; }

/* ========== P8：状态圆点（替代 emoji 圆点） ========== */
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.dot-danger { background: var(--color-danger); }
.dot-warning { background: var(--color-warning); }
.dot-success { background: var(--color-success); }

/* ========== P8：大气详情模态（80vw 居中，替代右抽屉详情） ========== */
.modal-xl-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  z-index: 300;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
}
.modal-xl-overlay.active { opacity: 1; pointer-events: auto; }
.modal-xl {
  position: fixed;
  z-index: 301;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) scale(0.98);
  width: 80vw;
  max-width: 1100px;
  height: 85vh;
  background: var(--color-bg-page);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}
.modal-xl.active { opacity: 1; pointer-events: auto; transform: translate(-50%, -50%) scale(1); }
.modal-xl-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4) var(--space-5);
  background: var(--color-panel-head-bg);
  border-bottom: 1px solid var(--color-border);
}
.modal-xl-title { font-size: var(--font-lg); font-weight: 700; color: var(--color-text-primary); }
.modal-xl-head .drawer-close { background: var(--color-bg-subtle); color: var(--color-text-secondary); }
.modal-xl-body {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-5);
}
/* 详情内容假设窄宽（原 480px 抽屉），大模态内设内容栏居中 */
.modal-xl-body > * { max-width: 960px; margin-left: auto; margin-right: auto; }
@media (max-width: 1023px) {
  .modal-xl { width: 100vw; height: 100vh; border-radius: 0; }
}


/* ========== 车辆概览卡片 ========== */
.fleet-overview { margin-bottom: 10px; padding-bottom: 10px; border-bottom: 1px solid var(--color-border-light); }
.fleet-ov-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; flex-wrap: wrap; gap: 4px; }
.fleet-ov-title { font-weight: 600; }
.fleet-ov-stats { font-size: var(--font-sm); color: var(--color-text-secondary); }
.fleet-section { margin-top: 8px; }
.fleet-label { font-size: 12px; color: var(--color-text-tertiary); margin-bottom: 5px; }
.fleet-grid { display: flex; flex-wrap: wrap; gap: 6px; }
.fleet-chip {
  min-width: 74px; padding: 5px 8px; border-radius: 8px; text-align: center;
  border: 1px solid transparent; flex-shrink: 0;
}
.fleet-chip-plate { font-weight: 600; font-size: 13px; line-height: 1.2; white-space: nowrap; }
.fleet-chip-sub { font-size: 11px; opacity: .8; line-height: 1.2; }
.fleet-chip-warn { font-size: 10px; margin-top: 2px; line-height: 1.2; color: var(--color-danger); }
.fleet-chip-busy { background: #e8f5ee; border-color: #bfe3cf; color: #17714a; }
.fleet-chip-idle { background: #e8f0fb; border-color: #c4d9f2; color: #1f5c9e; }
.fleet-chip-blocked { background: #f3f1ec; border-color: #ddd8cf; color: #6b6f76; }


/* ========== 订单调度流水表（sheet 专属，2026-07 改版） ========== */
/* 容器：内部滚动，表头吸顶；窄屏横向滚动不崩 */
/* 双类选择器提高优先级：覆盖 desktop.css 中 .order-table-wrapper 的 overflow:hidden */
.order-table-wrapper.sheet-table-wrapper {
  overflow: auto;
  max-height: calc(100vh - 240px);
}
#sheet-table { min-width: 980px; }
#sheet-table thead th {
  position: sticky;
  top: 0;
  z-index: 6;
  background: var(--color-bg-subtle);
  box-shadow: 0 1px 0 var(--color-border);
  padding: 10px 12px;
}
#sheet-table tbody tr { cursor: default; }
/* 斑马纹（草稿/脏行的行内高亮优先）+ hover 高亮 */
#sheet-table tbody tr:nth-child(even) { background: #fbfcfd; }
#sheet-table tbody tr:hover td { background: var(--color-bg-subtle); }
#sheet-table tbody tr.sh-draft-row { background: var(--color-info-bg); }
#sheet-table tbody tr.sh-dirty-row { background: var(--color-warning-bg); }

/* 日期格：输入框 + 小日历按钮 */
.sh-date-cell { display: flex; align-items: center; gap: 4px; }
.sh-date-input {
  height: 34px !important;
  font-size: var(--font-sm) !important;
  padding: 2px 8px !important;
  border-color: transparent !important;
  background: transparent !important;
}
.sh-date-input:focus {
  border-color: var(--color-primary) !important;
  background: var(--color-bg-card) !important;
}
.sh-date-input.sh-date-error {
  border-color: var(--color-danger) !important;
  animation: shDateFlash .5s ease 2;
}
@keyframes shDateFlash { 50% { background: var(--color-danger-bg) !important; } }

/* 日期分格 [年][月][日]—[月][日] / 时间分格 [时]:[分]—[时]:[分] */
.sh-dp, .sh-tp {
  width: 34px;
  height: 34px !important;
  font-size: var(--font-sm) !important;
  padding: 2px 2px !important;
  text-align: center;
  border-color: transparent !important;
  background: transparent !important;
  flex: 0 0 auto;
}
.sh-dp-y { width: 52px; }
.sh-tp { width: 30px; }
.sh-dp:focus, .sh-tp:focus {
  border-color: var(--color-primary) !important;
  background: var(--color-bg-card) !important;
}
.sh-dp.sh-date-error, .sh-tp.sh-date-error {
  border-color: var(--color-danger) !important;
  animation: shDateFlash .5s ease 2;
}
.sh-dp-sep { color: var(--color-text-tertiary); font-size: var(--font-xs); flex: 0 0 auto; }
.sh-time-cell { display: flex; align-items: center; gap: 2px; margin-top: 2px; }
.sh-time-cell .sh-tp {
  background: var(--color-bg-card) !important;
  border-color: var(--color-border) !important;
}
.sh-time-cell .sh-tp:focus { border-color: var(--color-primary) !important; }

/* 车牌/司机联想下拉 */
.sh-suggest-wrap { position: relative; }
.sh-suggest {
  position: fixed;
  z-index: 350;
  display: none;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  max-height: 224px;
  overflow-y: auto;
  padding: 4px;
}
.sh-suggest-item {
  padding: 6px 10px;
  font-size: var(--font-sm);
  color: var(--color-text-primary);
  border-radius: var(--radius-sm);
  cursor: pointer;
  white-space: nowrap;
}
.sh-suggest-item:hover, .sh-suggest-item.active {
  background: var(--color-primary-light);
  color: var(--color-primary-dark);
}
.sh-suggest-sub {
  margin-left: 8px;
  font-size: var(--font-xs);
  color: var(--color-text-tertiary);
}
.sh-cal-btn {
  flex: 0 0 auto;
  width: 28px; height: 28px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-bg-card);
  color: var(--color-text-tertiary);
  cursor: pointer;
  padding: 0;
}
.sh-cal-btn:hover { color: var(--color-primary); border-color: var(--color-primary); }
.sh-cal-btn:disabled { opacity: .45; cursor: default; }

/* 行「▸ 高级」折叠区 */
.sh-adv-btn {
  border: 1px solid var(--color-border);
  background: var(--color-bg-card);
  border-radius: var(--radius-sm);
  padding: 2px 8px;
  margin-right: 6px;
  font-size: var(--font-xs);
  color: var(--color-text-secondary);
  cursor: pointer;
  white-space: nowrap;
}
.sh-adv-btn:hover { color: var(--color-primary); border-color: var(--color-primary); }
.sh-adv-btn.open {
  background: var(--color-primary-light);
  color: var(--color-primary-dark);
  border-color: transparent;
}
#sheet-table tbody tr.sh-adv-row > td {
  background: var(--color-bg-subtle);
  padding: 10px 16px;
}
.sh-adv-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px 16px;
  max-width: 1080px;
}
.sh-adv-grid label {
  display: block;
  font-size: var(--font-xs);
  color: var(--color-text-tertiary);
}
.sh-adv-grid .form-input {
  margin-top: 2px;
  background: var(--color-bg-card) !important;
  border-color: var(--color-border) !important;
}

/* 迷你日历浮层 */
.sh-calendar {
  position: fixed;
  z-index: 400;
  width: 264px;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 10px 12px;
  font-size: var(--font-sm);
  user-select: none;
}
.sh-cal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
  font-weight: 600;
}
.sh-cal-head button {
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  color: var(--color-text-secondary);
}
.sh-cal-head button:hover { background: var(--color-bg-subtle); }
.sh-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.sh-cal-w {
  text-align: center;
  color: var(--color-text-tertiary);
  font-size: var(--font-xs);
  padding: 3px 0;
}
.sh-cal-d {
  text-align: center;
  padding: 5px 0;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: 1px solid transparent;
}
.sh-cal-d:hover { background: var(--color-primary-light); }
.sh-cal-d.today { border-color: var(--color-primary); }
.sh-cal-d.in-range { background: var(--color-primary-light); }
.sh-cal-d.sel { background: var(--color-primary); color: var(--color-text-inverse); }
.sh-cal-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
  gap: 8px;
}
.sh-cal-foot button {
  border: 1px solid var(--color-border);
  background: var(--color-bg-card);
  border-radius: var(--radius-sm);
  padding: 3px 12px;
  cursor: pointer;
  font-size: var(--font-xs);
  color: var(--color-text-secondary);
}
.sh-cal-foot button:hover { color: var(--color-primary); border-color: var(--color-primary); }
.sh-cal-tip { color: var(--color-text-tertiary); font-size: var(--font-xs); }

/* 三角下拉按钮(用车人/车牌/司机联想框右侧,点击展开全部候选) */
.sh-suggest-wrap input { padding-right: 20px !important; }
.sh-sug-caret {
  position: absolute; right: 3px; top: 50%; transform: translateY(-50%);
  border: none; background: transparent; cursor: pointer;
  color: var(--color-text-tertiary); font-size: 11px; padding: 2px 4px; line-height: 1;
}
.sh-sug-caret:hover { color: var(--color-primary); }
/* 整行点击展开高级区:空白区指针提示(input 内仍为文本光标) */
tr.sh-row-toggle > td { cursor: pointer; }

/* ========== 订单详情：只保留行程 / 出发时间 / 客户 / 状态，一车一程卡片 ========== */
.od-detail-header { margin-bottom: 12px; }
.od-summary-card {
  background: linear-gradient(145deg, #f8fbff 0%, #ffffff 70%);
  border: 1px solid #dbe8f5;
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: 0 3px 14px rgba(31, 78, 121, .06);
}
.od-summary-route > span,
.od-summary-item > span {
  display: block;
  color: var(--color-text-tertiary);
  font-size: 11px;
  margin-bottom: 4px;
}
.od-summary-route > strong {
  display: block;
  color: var(--color-text-primary);
  font-size: 18px;
  line-height: 1.45;
}
.od-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--color-border-light);
}
.od-summary-item { min-width: 0; }
.od-summary-item strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: var(--font-sm);
}
.od-order-actions,
.od-form-actions {
  display: flex;
  gap: 8px;
  margin-top: 14px;
}
.od-order-actions .btn,
.od-form-actions .btn { width: auto; }
.od-trips-section { padding-top: 14px; }
.od-trip-form {
  border: 1px solid var(--color-primary);
  margin-top: 12px;
  box-shadow: 0 4px 16px rgba(31, 78, 121, .07);
}
.od-form-no { color: var(--color-primary); font-size: var(--font-sm); }
.form-hint {
  margin-top: 5px;
  color: var(--color-text-tertiary);
  font-size: 11px;
  line-height: 1.4;
}
.trip-card {
  border: 1px solid var(--color-border-light);
  border-left: 4px solid #8fb3d1;
  border-radius: 12px;
  padding: 13px 14px;
  margin: 10px 0;
  background: #fff;
  box-shadow: 0 2px 10px rgba(15, 23, 42, .045);
  min-width: 0;
  overflow: hidden;
}
.trip-card[data-status="pending_vehicle"],
.trip-card[data-status="pending_driver"] { border-left-color: var(--color-warning); }
.trip-card[data-status="ready"] { border-left-color: var(--color-primary); }
.trip-card[data-status="in_progress"] { border-left-color: var(--color-success); }
.trip-card[data-status="completed"] { border-left-color: #94a3b8; background: #fbfcfd; }
.trip-card[data-status="cancelled"] { opacity: .6; border-left-color: #cbd5e1; }
.trip-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.trip-route-wrap {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  min-width: 0;
}
.trip-no {
  flex: 0 0 auto;
  font-size: 10px;
  font-weight: 700;
  color: var(--color-primary);
  background: #edf5fb;
  border-radius: 5px;
  padding: 2px 5px;
  margin-top: 2px;
}
.trip-route {
  min-width: 0;
  font-size: 16px;
  line-height: 1.45;
  font-weight: 700;
  color: var(--color-text-primary);
  overflow-wrap: anywhere;
}
.trip-card-head .badge { flex-shrink: 0; }
.trip-timeline {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 9px;
  background: var(--color-bg-secondary, #f7f9fb);
}
.trip-time-point span {
  display: block;
  color: var(--color-text-tertiary);
  font-size: 10px;
  margin-bottom: 2px;
}
.trip-time-point strong {
  display: block;
  font-size: var(--font-sm);
  white-space: nowrap;
}
.trip-time-arrow { color: #94a3b8; }
.trip-assignment-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.trip-veh { font-size: var(--font-sm); font-weight: 600; color: var(--color-text-secondary); }
.trip-veh::before { content: '车辆 / 司机  '; color: var(--color-text-tertiary); font-weight: 400; }
.trip-veh.is-ext { color: #b7791f; }
.trip-veh-pending { color: var(--color-danger); }
.trip-card-remark {
  margin-top: 9px;
  padding: 7px 9px;
  border-radius: 7px;
  background: #fff8e8;
  color: #7c5b17;
  font-size: var(--font-sm);
}
.trip-card-remark::before { content: '备注：'; font-weight: 600; }
.trip-card-actions { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 11px; }
.trip-card-actions .btn { width: auto; }
@media (max-width: 520px) {
  .od-summary-grid { grid-template-columns: 1fr 1fr; }
  .od-summary-item:last-child { grid-column: span 2; }
  .trip-timeline { gap: 5px; padding: 9px; }
  .trip-time-point strong { font-size: 12px; }
}
