/* ===== 伟杰集团拖车系统 · 沿用集团蓝 #0066B1 ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  background: #F0F3F7;
  color: #1A1A1A;
  -webkit-font-smoothing: antialiased;
  font-size: 15px;
}
input, button, select, textarea { font-family: inherit; font-size: inherit; }
button { cursor: pointer; border: none; background: none; }
[v-cloak] { display: none; }

/* ===== 登录页 ===== */
.login-page {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(160deg, #004F7A 0%, #0066B1 50%, #0080CC 100%); padding: 20px;
}
.login-container { width: 100%; max-width: 400px; }
.login-logo { text-align: center; margin-bottom: 28px; }
.logo-circle {
  width: 76px; height: 76px; border-radius: 50%; background: #fff; border: 3px solid #fff;
  display: flex; align-items: center; justify-content: center; margin: 0 auto 14px;
  font-size: 22px; font-weight: 700; color: #0066B1; box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}
.login-logo h1 { color: #fff; font-size: 22px; font-weight: 600; letter-spacing: 2px; }
.login-logo p { color: rgba(255,255,255,0.85); font-size: 13px; margin-top: 4px; letter-spacing: 1px; }
.login-card { background: #fff; border-radius: 6px; padding: 24px; box-shadow: 0 8px 40px rgba(0,0,0,0.18); }
.login-notice { text-align: center; padding: 16px 0; color: #8C96A0; font-size: 13px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.login-error { color: #c62828; }
.btn-retry { margin-top: 8px; padding: 8px 24px; border-radius: 4px; background: #0066B1; color: #fff; font-size: 13px; }
.loading-spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid #E0E6EB; border-top-color: #0066B1; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.demo-title { font-size: 12px; color: #8C96A0; margin-bottom: 12px; letter-spacing: 1px; }
.user-list { display: flex; flex-direction: column; gap: 8px; }
.user-chip { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 4px; border: 1px solid #E0E6EB; background: #FAFBFC; }
.user-chip:hover { border-color: #0066B1; background: #F0F6FC; }
.user-avatar { width: 40px; height: 40px; border-radius: 50%; background: linear-gradient(135deg, #0066B1, #004F7A); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 16px; font-weight: 600; flex-shrink: 0; }
.user-info { flex: 1; display: flex; flex-direction: column; }
.user-name { font-size: 15px; font-weight: 600; }
.user-company { font-size: 12px; color: #8C96A0; }
.user-role { font-size: 11px; padding: 2px 10px; border-radius: 2px; font-weight: 600; }
.role-admin, .role-hq_admin { background: #F0F6FC; color: #0066B1; }
.role-store_admin { background: #FFF7E6; color: #B8860B; }
.role-employee { background: #F0F7F0; color: #2E7D32; }
.demo-add { display: flex; gap: 8px; margin-top: 12px; }
.demo-add input { flex: 1; }

/* ===== 框架 ===== */
.main-app, .driver-app { min-height: 100vh; display: flex; flex-direction: column; max-width: 620px; margin: 0 auto; background: #F0F3F7; }
.app-header { background: #fff; padding: 12px 16px; display: flex; align-items: center; justify-content: space-between; border-bottom: 2px solid #0066B1; position: sticky; top: 0; z-index: 100; }
.brand { font-size: 17px; font-weight: 600; color: #0066B1; }
.brand-sub { font-size: 12px; color: #8C96A0; margin-top: 2px; }
.driver-badge { background: #F0F6FC; color: #0066B1; padding: 4px 12px; border-radius: 12px; font-size: 12px; font-weight: 600; }
.tabs { display: flex; background: #fff; border-bottom: 1px solid #E4E9EE; position: sticky; top: 58px; z-index: 99; }
.tabs button { flex: 1; padding: 12px 0; font-size: 14px; color: #5A6672; border-bottom: 2px solid transparent; }
.tabs button.active { color: #0066B1; font-weight: 600; border-bottom-color: #0066B1; }
.page-body { flex: 1; padding: 14px; display: flex; flex-direction: column; gap: 14px; padding-bottom: 40px; }

/* ===== 卡片 ===== */
.card { background: #fff; border-radius: 6px; padding: 16px; box-shadow: 0 1px 3px rgba(0,0,0,0.06); }
.card.highlight { border-left: 4px solid #0066B1; }
.card-title { font-size: 15px; font-weight: 600; color: #1A1A1A; margin-bottom: 12px; }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; color: #5A6672; margin-bottom: 6px; }
.field input, .field textarea, .field select {
  width: 100%; padding: 10px 12px; border: 1px solid #D5DCE3; border-radius: 4px; background: #fff; font-size: 15px;
}
.field input:focus, .field textarea:focus { outline: none; border-color: #0066B1; }
.inline-field { display: flex; gap: 8px; }
.inline-field input { flex: 1; }
.req { color: #c62828; }
.err { color: #c62828; font-size: 12px; margin-top: 4px; }
.tip { font-size: 12px; color: #8C96A0; line-height: 1.6; margin: 8px 0; }
.muted { color: #8C96A0; }
.btn-row { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.coord-tip { font-size: 12px; color: #2E7D32; }
.small-input { flex: 1; padding: 8px 10px; border: 1px solid #D5DCE3; border-radius: 4px; }

/* ===== 按钮 ===== */
.btn { padding: 10px 16px; border-radius: 4px; font-size: 14px; text-align: center; transition: all .2s; }
.btn-primary { background: #0066B1; color: #fff; }
.btn-primary:hover { background: #004F7A; }
.btn-primary:disabled { background: #A8C4DC; }
.btn-ghost { background: #F0F6FC; color: #0066B1; border: 1px solid #B8D4EE; }
.btn-danger { background: #FFF0F0; color: #c62828; border: 1px solid #F5C6C6; }
.btn-small { padding: 6px 12px; font-size: 13px; background: #F0F6FC; color: #0066B1; border: 1px solid #B8D4EE; border-radius: 4px; }
.btn-block { display: block; width: 100%; margin-top: 8px; }

/* ===== 勾选项 ===== */
.option-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.option-item { display: flex; align-items: center; gap: 8px; padding: 10px; border: 1px solid #D5DCE3; border-radius: 4px; font-size: 14px; }
.option-item input { width: 18px; height: 18px; }

/* ===== 二维码/链接 ===== */
.qr-box { text-align: center; margin: 12px 0; }
.qr-box img { width: 200px; height: 200px; border: 1px solid #E4E9EE; border-radius: 6px; }
.link-box { display: flex; align-items: center; gap: 8px; background: #F5F8FA; padding: 10px; border-radius: 4px; }
.link-text { flex: 1; font-size: 12px; color: #5A6672; word-break: break-all; }

/* ===== 车牌与状态 ===== */
.plate-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.plate { font-size: 20px; font-weight: 700; letter-spacing: 1px; color: #1A1A1A; }
.plate.sm { font-size: 16px; }
.status-tag { font-size: 12px; padding: 3px 10px; border-radius: 12px; background: #F0F6FC; color: #0066B1; }
.st-picked { background: #FFF7E6; color: #B8860B; }
.st-delivered { background: #E8F5E9; color: #2E7D32; }
.st-settled { background: #E8F5E9; color: #2E7D32; }
.st-cancelled { background: #F0F0F0; color: #8C96A0; }
.warn-tag { font-size: 11px; padding: 2px 8px; border-radius: 10px; background: #FFEBEE; color: #c62828; }

/* ===== 路线 ===== */
.route { background: #F7FAFC; border-radius: 4px; padding: 12px; }
.route-point { display: flex; gap: 10px; align-items: flex-start; }
.rp-dot { width: 10px; height: 10px; border-radius: 50%; margin-top: 4px; flex-shrink: 0; }
.rp-dot.from { background: #0066B1; }
.rp-dot.to { background: #2E7D32; }
.rp-label { font-size: 11px; color: #8C96A0; }
.rp-addr { font-size: 14px; line-height: 1.5; }
.route-arrow { margin: 6px 0 6px 2px; color: #B0BAC4; font-size: 14px; }
.tag-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.tag { font-size: 12px; padding: 3px 10px; background: #F0F6FC; color: #0066B1; border-radius: 3px; }
.remark { font-size: 13px; color: #5A6672; margin-top: 10px; line-height: 1.6; }

/* ===== 步骤条 ===== */
.steps { display: flex; align-items: center; background: #fff; border-radius: 6px; padding: 16px 12px; }
.step { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 12px; color: #8C96A0; }
.step .dot { width: 26px; height: 26px; border-radius: 50%; background: #E4E9EE; color: #8C96A0; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 600; }
.step.done { color: #0066B1; }
.step.done .dot { background: #0066B1; color: #fff; }
.line { flex: 1; height: 2px; background: #E4E9EE; margin: 0 8px; }
.line.done { background: #0066B1; }

/* ===== 定位与照片 ===== */
.loc-box { background: #F7FAFC; border-radius: 4px; padding: 12px; margin-bottom: 12px; }
.loc-text { font-size: 14px; line-height: 1.5; margin-bottom: 4px; }
.loc-coord { font-size: 12px; color: #8C96A0; margin-bottom: 8px; }
.photo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.photo-item { position: relative; aspect-ratio: 1; border-radius: 4px; overflow: hidden; }
.photo-item img { width: 100%; height: 100%; object-fit: cover; }
.photo-del { position: absolute; top: 2px; right: 4px; background: rgba(0,0,0,.5); color: #fff; width: 20px; height: 20px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 14px; }
.photo-add { aspect-ratio: 1; border: 1px dashed #B8C4D0; border-radius: 4px; display: flex; align-items: center; justify-content: center; color: #8C96A0; font-size: 13px; background: #FAFBFC; }

/* ===== 时间线 ===== */
.timeline { display: flex; flex-direction: column; gap: 12px; }
.tl-item { display: flex; gap: 10px; }
.tl-dot { width: 8px; height: 8px; border-radius: 50%; background: #0066B1; margin-top: 5px; flex-shrink: 0; }
.tl-text { font-size: 13px; line-height: 1.5; }
.tl-time { font-size: 11px; color: #8C96A0; }

/* ===== 台账 ===== */
.filter-bar { display: flex; gap: 8px; background: #fff; padding: 12px; border-radius: 6px; }
.filter-bar select, .filter-bar input { padding: 8px 10px; border: 1px solid #D5DCE3; border-radius: 4px; font-size: 14px; }
.filter-bar input { flex: 1; min-width: 0; }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.stat-item { background: #fff; border-radius: 6px; padding: 12px 8px; text-align: center; }
.stat-item.warn .sv { color: #c62828; }
.sv { display: block; font-size: 18px; font-weight: 700; color: #0066B1; }
.sl { display: block; font-size: 11px; color: #8C96A0; margin-top: 2px; }
.order-card { background: #fff; border-radius: 6px; padding: 14px; box-shadow: 0 1px 3px rgba(0,0,0,0.06); }
.oc-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.oc-route { font-size: 14px; line-height: 1.5; color: #1A1A1A; }
.oc-meta { display: flex; justify-content: space-between; font-size: 12px; color: #8C96A0; margin-top: 8px; }
.oc-fee { display: flex; gap: 14px; font-size: 13px; color: #5A6672; margin-top: 8px; padding-top: 8px; border-top: 1px dashed #E4E9EE; }
.diff-over { color: #c62828; }
.diff-normal { color: #2E7D32; }
.empty-box { text-align: center; padding: 40px 0; color: #8C96A0; font-size: 14px; }
.loading-box { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 40px 0; color: #8C96A0; }
.error-text { color: #c62828; }
.done-box { text-align: center; padding: 20px 0; }
.done-icon { width: 48px; height: 48px; border-radius: 50%; background: #E8F5E9; color: #2E7D32; font-size: 24px; display: flex; align-items: center; justify-content: center; margin: 0 auto 12px; }

/* ===== 配置 ===== */
.rule-row { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.rule-row label { flex: 1; font-size: 14px; }
.rule-row input { width: 110px; padding: 8px 10px; border: 1px solid #D5DCE3; border-radius: 4px; }
.rule-key { font-size: 11px; color: #8C96A0; width: 120px; text-align: right; }
.add-option { display: flex; gap: 8px; margin-top: 12px; }
.add-option input { flex: 1; padding: 8px; border: 1px solid #D5DCE3; border-radius: 4px; }

/* ===== 弹窗 ===== */
.modal { position: fixed; inset: 0; background: rgba(0,0,0,.45); display: flex; align-items: flex-end; justify-content: center; z-index: 200; }
.modal-body { background: #fff; width: 100%; max-width: 620px; border-radius: 12px 12px 0 0; padding: 20px 16px 30px; max-height: 82vh; overflow-y: auto; }
.modal-head { display: flex; justify-content: space-between; align-items: center; font-size: 16px; font-weight: 600; margin-bottom: 14px; }
.modal-close { font-size: 24px; color: #8C96A0; line-height: 1; }
.detail-row { display: flex; gap: 12px; padding: 8px 0; border-bottom: 1px solid #F0F3F7; font-size: 14px; }
.detail-row span { width: 90px; color: #8C96A0; flex-shrink: 0; }
.detail-row b { flex: 1; font-weight: 500; line-height: 1.5; }
.detail-photos { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.detail-photos img { width: 76px; height: 76px; object-fit: cover; border-radius: 4px; }
.modal-actions { display: flex; gap: 10px; margin-top: 14px; }

.toast { position: fixed; left: 50%; bottom: 60px; transform: translateX(-50%); background: rgba(0,0,0,.8); color: #fff; padding: 10px 18px; border-radius: 20px; font-size: 14px; z-index: 300; max-width: 80%; text-align: center; }
