/* ============================================================
   迅辉 UI 设计模板 · 兼容映射层  (xh-bridge.css)
   ------------------------------------------------------------
   作用：把装柜照片系统(柜照系统)既有旧类名，映射到
        《迅辉 UI 设计模板》的视觉(颜色 / 圆角 / 阴影 / 字号)。
   原则：
     1) 只改"外观"，不重写任何布局结构(flex/grid/position 保持原样)；
     2) 不删除、不重命名任何 class / id / data-*；不改任何 JS 逻辑；
     3) 全部使用模板令牌 var(--xh-*)，尺寸对齐模板
        (字号 17/15/14/13/12，圆角 12/7，阴影 var(--xh-shd))；
     4) 选择器统一加 `body ` 前缀提升权重：确保覆盖 style.css 与
        页面内联 <style> 块里的同名单类选择器(.btn/.card/.nav-tab …)。
   版本：20260910
   ============================================================ */

/* ============================================================
   0. 基础 / 页面底色
   ============================================================ */
/* 页面底统一 #F0F2F5(覆盖 body 上的行内 background 属性) */
body{
  background:var(--xh-bg) !important;
  color:var(--xh-text);
  font-size:var(--xh-fs-base);
  -webkit-font-smoothing:antialiased;
}
body a{color:var(--xh-primary);}
body ::selection{background:var(--xh-primary-soft);}

/* ============================================================
   1. 顶栏（深蓝渐变 · 白 logo · 图标标签页）
   ============================================================ */
body .xh-topbar{
  position:sticky;top:0;z-index:60;color:#fff;
  background:linear-gradient(90deg,var(--xh-nav1),var(--xh-nav2));
  box-shadow:0 2px 8px rgba(30,58,138,.25);
}
/* 让顶栏通栏：admin 顶栏在 .admin-layout 内，用负 margin 抵消容器内边距；
   portal 顶栏已是 #portal-main 的直接子元素，天然通栏（见下） */
body .admin-layout > .xh-topbar{margin:-16px -20px 14px;}
body #portal-main > .xh-topbar{margin:0;}
body .xh-topbar + .portal-layout{padding-top:18px;}

body .xh-topbar-inner{
  min-height:54px;height:54px;display:flex;align-items:center;
  gap:10px;padding:0 18px;min-width:0;
}
body .xh-topbar-logo{display:flex;align-items:center;flex-shrink:0;text-decoration:none;}
body .xh-topbar-logo img{height:32px;width:auto;display:block;
  filter:drop-shadow(0 1px 3px rgba(0,0,0,.28));}
body .xh-topbar-name{
  display:inline-flex;align-items:center;gap:7px;
  font-size:16px;font-weight:600;color:#fff;white-space:nowrap;letter-spacing:.3px;
}
body .xh-topbar-sp{flex:1;min-width:0;}
body .xh-topbar-inner .nav-tabs{flex-shrink:1;min-width:0;}
/* 顶栏防溢出：标签条可收缩并在内部横向滚动，右侧「司机端/客户端 + 修改密码/退出」永不被挤出屏幕 */
body .xh-topbar-inner .admin-header{flex-shrink:0;}
body .xh-topbar-links{flex-shrink:0;}
/* 中等宽度(≤1560px)压缩标签内边距，让 8 个标签尽量全部可见 */
@media (max-width:1560px){
  body .nav-tab{padding:7px 11px;font-size:13.5px;gap:5px;}
  body .xh-topbar-name{font-size:15px;}
  body .xh-topbar-inner{gap:8px;padding:0 14px;}
}

/* ---- 顶栏内标签页 ---- */
body .xh-topbar-inner .nav-tabs{
  display:flex;align-items:center;gap:4px;flex-wrap:nowrap;
  margin:0 0 0 6px;padding:0;background:transparent;border:none;
  overflow-x:auto;overflow-y:hidden;scrollbar-width:none;
}
body .xh-topbar-inner .nav-tabs::-webkit-scrollbar{display:none;}
body .nav-tab{
  display:flex;align-items:center;gap:7px;
  padding:7px 16px;margin-bottom:0;border-bottom:none !important;
  border-radius:6px;font-size:14px;font-weight:500;line-height:1.2;
  color:rgba(255,255,255,.82);background:transparent;cursor:pointer;
  white-space:nowrap;transition:background .15s ease,color .15s ease;
}
body .nav-tab:hover{background:rgba(255,255,255,.1);color:#fff;}
body .nav-tab.active{background:rgba(255,255,255,.16);color:#fff;font-weight:700;}
body .nav-tab:focus-visible{outline:2px solid rgba(255,255,255,.75);outline-offset:-2px;}

/* 标签页图标：白描边 */
body .xh-tab-ic{
  width:15px;height:15px;flex-shrink:0;display:inline-block;
  stroke:rgba(255,255,255,.85);fill:none;stroke-width:1.8;
  stroke-linecap:round;stroke-linejoin:round;
  vertical-align:middle;position:relative;top:-1px;
}
body .nav-tab.active .xh-tab-ic,
body .nav-tab:hover .xh-tab-ic{stroke:#fff;}

/* ---- 顶栏右侧：用户 / 退出 ---- */
body .xh-topbar-inner .admin-header{
  display:flex;align-items:center;margin:0 0 0 auto;padding:0;
  flex-shrink:0;gap:8px;
}
body .xh-topbar-inner .admin-header h1{display:none;}
body .xh-topbar-inner .admin-header > div{display:flex;align-items:center;gap:8px;}
body .xh-topbar-inner .admin-header span,
body .xh-topbar-inner #current-date{color:rgba(255,255,255,.85) !important;font-size:13px;}
body .xh-topbar .btn-outline{
  background:rgba(255,255,255,.14) !important;color:#fff;border:1px solid rgba(255,255,255,.34);
  padding:5px 14px;font-size:13px;
}
body .xh-topbar .btn-outline:hover{background:rgba(255,255,255,.26) !important;color:#fff;}

body .xh-topbar-inner .portal-header{
  display:flex;align-items:center;gap:16px;flex-wrap:nowrap;
  margin:0 0 0 auto;padding:0;
}
body .xh-topbar-inner .portal-header h2{display:none;}
body .xh-topbar-inner .portal-header .user-info{font-size:14px;color:rgba(255,255,255,.85);}
body .xh-topbar-inner .portal-header .user-info span{color:#fff;font-weight:600;}
body .xh-topbar .btn-logout{
  background:rgba(255,255,255,.16) !important;color:#fff;border:1px solid rgba(255,255,255,.32);
  padding:5px 14px;font-size:13px;
}
body .xh-topbar .btn-logout:hover{background:rgba(255,255,255,.26) !important;color:#fff;}

/* ============================================================
   2. 卡片 / 容器
   ============================================================ */
body .card,
body .category-section,
body .container-item,
body .table-card,
body .query-card,
body .fleet-card,
body .photo-modal,
body .search-popup,
body .modal,
body .panel,
body .bg-card{
  background:var(--xh-card);
  border-radius:var(--xh-radius);
  box-shadow:var(--xh-shd);
  border:1px solid var(--xh-line-soft);
}
body .card{padding:16px 18px;}
body .card:hover{box-shadow:var(--xh-shd-hover);}
body .table-card{overflow:hidden;}
body .search-bar,
body .filter-bar,
body .detail-toolbar{
  border-radius:var(--xh-radius);
  box-shadow:var(--xh-shd);
  border:1px solid var(--xh-line-soft);
  background:var(--xh-card);
}
body .search-bar{padding:12px 14px;}
body .filter-bar,body .detail-toolbar{box-shadow:none;background:transparent;border:none;padding:0;}

body .card-header{border-bottom:none;}
body .card-title,
body .import-section h3,
body .download-section h3,
body .bl-group-title,
body .photo-modal-header h3,
body .search-popup-header h3,
body .query-card h3,
body #login-page h2{
  font-size:var(--xh-fs-card);font-weight:700;color:var(--xh-text);
}
body .card-driver,
body .bl-group-subtitle,
body .bl-group-count,
body .bl-group-header .bl-group-count{
  font-size:var(--xh-fs-hint);color:var(--xh-muted);
}
body .bl-group{border-left:3px solid var(--xh-primary);padding-left:16px;}
body .bl-group-header{border-bottom:1px solid var(--xh-line-soft);padding-bottom:10px;margin-bottom:12px;}
body .summary-cards .card,
body .summary-cards > *{border-radius:var(--xh-radius);}

/* 司机端 H5 卡片 */
body .upload-info-bar{
  background:#f7f9fc;border:1px solid var(--xh-line-soft);
  border-radius:var(--xh-radius-sm);color:var(--xh-muted);
  font-size:var(--xh-fs-hint);
}
body .container-item:hover,body .category-section:hover{box-shadow:var(--xh-shd-hover);}
body .container-item{border-color:var(--xh-line-soft);}
body .container-no{color:var(--xh-text);}
body .category-note{font-size:var(--xh-fs-hint);color:var(--xh-muted);}
body .search-hint,body .login-hint{color:var(--xh-faint);font-size:var(--xh-fs-hint);}
body .record-count{font-size:var(--xh-fs-hint);color:var(--xh-muted);margin-left:auto;}
body .missing-list{color:var(--xh-err);font-size:var(--xh-fs-table);}
body .cu-dd{border-radius:var(--xh-radius-sm);box-shadow:var(--xh-shd-hover);border-color:var(--xh-line-soft);}
body .cu-dd-item:hover{background:#fafbff;}
body .cu-dd-empty{color:var(--xh-faint);font-size:var(--xh-fs-hint);}

/* ============================================================
   3. 按钮
   ============================================================ */
body .btn,
body .dl-btn,
body .download-btn,
body .btn-login,
body .btn-login-confirm,
body .btn-wecom-oauth,
body .btn-wecom-login,
body .btn-back,
body .btn-back-step,
body .btn-photo,
body .btn-confirm-upload,
body .btn-clear-staged,
body .bg-btn,
body .search-btn,
body .search-btn-icon,
body .col-filter-dropdown .filter-actions button{
  border-radius:var(--xh-radius-sm);
  font-weight:600;
  transition:background .15s ease,color .15s ease,box-shadow .15s ease,filter .15s ease;
}
body .btn{font-size:var(--xh-fs-base);padding:7px 16px;}

/* 主按钮：模板主色 #1890FF(平色) */
body .btn-primary,
body .download-btn,
body .search-btn,
body .search-btn-icon,
body .btn-login,
body .btn-login-confirm,
body .btn-wecom-oauth,
body .btn-wecom-login,
body .btn-photo.primary,
body .btn-confirm-upload,
body .bg-btn,
body .col-filter-dropdown .filter-actions .btn-ok,
body .col-filter-dropdown .filter-actions .btn-select-all{
  background:var(--xh-primary) !important;color:#fff;border:none;
}
body .btn-primary:hover,
body .download-btn:hover,
body .search-btn:hover,
body .search-btn-icon:hover,
body .btn-login:hover,
body .btn-login-confirm:hover,
body .btn-wecom-oauth:hover,
body .btn-wecom-login:hover,
body .btn-photo.primary:hover,
body .btn-confirm-upload:hover,
body .bg-btn:hover{
  background:var(--xh-primary-dark) !important;color:#fff;
  box-shadow:0 4px 14px rgba(24,144,255,.22);
}

/* 次要/描边按钮 */
body .btn-outline,
body .download-btn.secondary,
body .btn-photo.ghost,
body .btn-photo.preview,
body .btn-photo.replace,
body .btn-photo.retake{
  background:#fff;color:var(--xh-primary);border:1px solid var(--xh-primary);
}
/* .download-btn 同时命中主按钮分组，此处以同权重 !important 收回为"浅蓝次要" */
body .download-btn.secondary{
  background:var(--xh-primary-soft) !important;
  color:var(--xh-primary) !important;
  border:1px solid var(--xh-primary);
}
body .btn-outline:hover,
body .download-btn.secondary:hover,
body .btn-photo.ghost:hover,
body .btn-photo.preview:hover,
body .btn-photo.replace:hover,
body .btn-photo.retake:hover{background:var(--xh-primary-soft);}
body .download-btn.secondary:hover{background:#bfdbfe !important;color:var(--xh-primary) !important;}

/* 危险按钮 */
body .btn-danger{background:var(--xh-err) !important;color:#fff;border:none;}
body .btn-danger:hover{background:#b91c1c !important;color:#fff;}

/* 弱化/灰色按钮 */
body .btn-back,
body .btn-back-step,
body .btn-clear-staged{
  background:#eef1f6;color:#344054;border:none;
}
body .btn-clear-staged{background:var(--xh-err-soft);color:var(--xh-err);}
body .btn-back:hover,
body .btn-back-step:hover{background:#e2e8f0;color:#1d2939;}
body .dl-btn:hover,
body .dl-btn:active{transform:none;}

/* 小尺寸按钮（表格操作列等） */
body .dl-btn{
  padding:4px 10px;font-size:12px;font-weight:600;
  border:1px solid var(--xh-primary);color:var(--xh-primary);background:#fff;
  margin-right:4px;
}
body .dl-btn:hover{background:var(--xh-primary);color:#fff;box-shadow:none;}

/* 禁用态：灰底灰字，不可点 */
body .btn[disabled],
body .btn.disabled,
body .btn[disabled]:hover,
body .dt-btn[disabled],
body .dt-btn[disabled]:hover,
body .batch-btn.delete-disabled,
body .download-btn.secondary[disabled]{
  background:#f2f4f7 !important;color:#b6bdc9 !important;
  border:1px solid var(--xh-line) !important;box-shadow:none !important;
  cursor:not-allowed !important;opacity:1;
}

/* ============================================================
   4. 表格（表头 #F7F9FC / 行悬停 #FAFBFF / 边框 #EEF1F5）
   ============================================================ */
body .detail-table,
body .data-table{border-collapse:collapse;font-size:var(--xh-fs-table);}
body .detail-table th,
body .detail-table thead th,
body .data-table th,
body .data-table thead th{
  background:#f7f9fc !important;color:var(--xh-muted);font-weight:600;
  font-size:var(--xh-fs-table);padding:8px 10px;
  border:1px solid var(--xh-line-soft) !important;
  box-shadow:none !important;
}
body .detail-table td,
body .detail-table tbody td,
body .data-table td,
body .data-table tbody td{
  padding:7px 10px;font-size:var(--xh-fs-table);color:var(--xh-text);
  border:1px solid var(--xh-line-soft);
}
/* 去斑马纹，统一白底 + 悬停浅蓝 */
body .detail-table tbody tr:nth-child(even) td,
body .data-table tbody tr:nth-child(even) td{background:#fff !important;}
body .detail-table tbody tr:hover td,
body .detail-table tr:hover td,
body .data-table tbody tr:hover td,
body .data-table tr:hover td{background:#fafbff !important;}
body .detail-table tr.selected td,
body .detail-table tbody tr.selected td,
body .data-table tbody tr.selected td{background:var(--xh-primary-soft) !important;}
body .detail-table tbody tr:last-child td{border-bottom:1px solid var(--xh-line-soft);}
body .detail-table-wrap{
  border-radius:var(--xh-radius-sm);box-shadow:var(--xh-shd);background:#fff;overflow:auto;
}
body .container-no{font-size:var(--xh-fs-table);font-weight:700;color:var(--xh-text);}
body .detail-row-checkbox,
body table input[type="checkbox"]{accent-color:var(--xh-primary);}

/* 长文本 / 居中对齐 / 操作列 */
body .detail-table td.dt-wrap{white-space:normal;word-break:break-all;line-height:1.4;}
body .detail-table td.dt-center{text-align:center;}
body .detail-table td.dt-ops{white-space:nowrap;}
body .detail-table td.dt-ops > div{display:flex;flex-wrap:nowrap;gap:4px;justify-content:center;}
body .col-filter-dropdown{border-radius:var(--xh-radius);box-shadow:var(--xh-shd-hover);border-color:var(--xh-line-soft);}
body .col-filter-item:hover{background:#fafbff;}

/* 操作列小按钮：保持 22px 高小尺寸 + [disabled] 灰态 */
body .dt-btn,
body .detail-table .dt-btn{
  height:22px;padding:3px 8px;font-size:11.5px;line-height:1;
  border-radius:6px;white-space:nowrap;min-width:0;
  display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;
  font-weight:600;
}
body .dl-btn.dt-btn{margin-right:0;}

/* ============================================================
   5. 徽章 / 状态
   ============================================================ */
body .badge,
body .badge-status,
body .badge-confirmed,
body .badge-unconfirmed,
body .status-badge,
body .status-tag,
body .item-type,
body .bl-group-count{
  display:inline-block;border-radius:20px;font-size:11.5px;font-weight:600;
  padding:2px 9px;box-shadow:none !important;border:none;
  white-space:nowrap;
}
body .badge-status.complete,
body .status-badge.complete,
body .status-tag.complete,
body .badge-ok,
body .badge-confirmed{background:var(--xh-ok-soft) !important;color:#15803d !important;}
body .badge-status.incomplete,
body .status-badge.incomplete,
body .status-tag.incomplete,
body .badge-wait,
body .badge-unconfirmed{background:var(--xh-warn-soft) !important;color:var(--xh-warn) !important;}
body .item-type-bl_no{background:#f1f5f9;color:#475569;}
body .item-type-container_no{background:var(--xh-ok-soft);color:#15803d;}
body .item-type-customer{background:var(--xh-warn-soft);color:var(--xh-warn);}
body .pwd-badge-locked{color:var(--xh-muted);font-size:11px;font-weight:600;}
body .pwd-badge-none{color:var(--xh-faint);font-size:11px;}

/* ============================================================
   6. 表单控件（圆角 7px）
   ============================================================ */
body input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="button"]):not([type="submit"]),
body select,
body textarea,
body .search-input,
body .query-input,
body .form-group input,
body .input-group input{
  border:1px solid #d0d5dd;
  border-radius:var(--xh-radius-sm) !important;
  padding:7px 11px;font-size:var(--xh-fs-base);
  background:#fff;color:var(--xh-text);outline:none;font-family:inherit;
  transition:border-color .15s ease,box-shadow .15s ease;
}
body .search-input{font-size:16px;}
body input:focus,
body select:focus,
body textarea:focus,
body .search-input:focus,
body .query-input:focus{border-color:var(--xh-primary) !important;box-shadow:0 0 0 3px rgba(24,144,255,.12);}
body .form-group label,
body .input-group label{display:block;font-size:13px;font-weight:600;color:var(--xh-muted);margin-bottom:6px;}
body .form-group{margin-bottom:14px;}
body .cat-checks label{font-size:13px;color:var(--xh-muted);}

/* 登录卡片 */
body .login-form{
  background:#fff;border-radius:var(--xh-radius);
  box-shadow:var(--xh-shd);border:1px solid var(--xh-line-soft);
  padding:36px 32px;
}
body .login-form h2{font-size:20px;color:var(--xh-text);}
body .login-card{
  background:#fff;border-radius:var(--xh-radius);
  box-shadow:0 12px 44px rgba(2,6,23,.35);
}
body .login-card h2{color:var(--xh-text);}
body .login-error{color:var(--xh-err);font-size:13px;}

/* ============================================================
   7. 空状态
   ============================================================ */
body .empty-state,
body .search-popup-empty{
  text-align:center;color:var(--xh-faint);font-size:var(--xh-fs-table);
  padding:40px 20px;
}
body .empty-state .icon{opacity:.45;font-size:44px;margin-bottom:10px;}

/* ============================================================
   8. 弹窗 / 抽屉 / 灯箱
   ============================================================ */
body .photo-modal-overlay,
body .search-popup-overlay,
body .modal-overlay,
body .browser-guide,
body .photo-lightbox,
body .lightbox{background:rgba(15,23,42,.45);}
body .browser-guide,
body .photo-lightbox,
body .lightbox{background:rgba(2,6,23,.9);}
body .photo-modal,
body .search-popup,
body .modal,
body .panel,
body .bg-card{
  border-radius:var(--xh-radius);
  box-shadow:0 12px 44px rgba(2,6,23,.35);
  background:#fff;
}
body .photo-modal-header{border-color:var(--xh-line-soft);}
body .photo-modal-header h3{font-size:var(--xh-fs-card);}
body .photo-card-modal{
  background:#fff;border:1px solid var(--xh-line-soft);
  border-radius:var(--xh-radius-sm);
}
body .photo-card-modal:hover{box-shadow:var(--xh-shd);}
body .photo-card-modal .photo-meta{font-size:var(--xh-fs-hint);color:var(--xh-muted);}
body .photo-card-modal .photo-meta-title{color:var(--xh-text);}
body .photo-batch-bar{border-bottom:1px solid var(--xh-line-soft);}
body .search-popup-header,
body .search-popup-footer{border-color:var(--xh-line-soft);}
body .search-popup-item{border-bottom:1px solid var(--xh-line-soft);}
body .search-popup-item:hover{background:#fafbff;}
body .search-popup-item .item-label{color:var(--xh-text);}
body .search-popup-item .item-sub{font-size:var(--xh-fs-hint);color:var(--xh-muted);}
body .bg-tip{color:var(--xh-faint);}
body .lightbox-info{font-size:var(--xh-fs-hint);}

/* ============================================================
   9. 进度条 / 文件上传区
   ============================================================ */
body .progress-bar,
body .progress-mini-bar{height:7px;background:#eef1f5;border-radius:4px;overflow:hidden;}
body .progress-fill,
body .progress-mini-fill{border-radius:4px;}
body .progress-fill.complete,
body .progress-mini-fill.complete{background:var(--xh-primary) !important;}
body .progress-fill.incomplete,
body .progress-mini-fill.incomplete{background:#f59e0b !important;}
body .progress-fill.empty{background:#e2e8f0 !important;}
body .progress-label,
body .progress-value,
body .progress-item-label{font-size:var(--xh-fs-hint);color:var(--xh-muted);}
body .progress-value{font-weight:700;color:var(--xh-text);}

body .file-upload-area{
  border:1.5px dashed #c9d3df;border-radius:var(--xh-radius);
  background:#f7f9fc;color:var(--xh-muted);transition:.15s ease;
}
body .file-upload-area:hover{border-color:var(--xh-primary);background:var(--xh-primary-soft);}

/* ============================================================
   10. Toast / 提示
   ============================================================ */
body .toast{
  background:#0f172a;color:#fff;border-radius:8px;
  font-size:13.5px;box-shadow:0 8px 24px rgba(2,6,23,.2);
}
body .toast.ok{background:#065f46;}
body .toast.err{background:#991b1b;}

/* ============================================================
   11. 分页（模板规范，保留给后续页面复用）
   ============================================================ */
body .pagination,
body .pager,
body .xh-pager{
  display:flex;gap:6px;align-items:center;justify-content:flex-end;
  padding-top:10px;font-size:var(--xh-fs-table);color:var(--xh-muted);
}
body .pagination button,
body .pagination a,
body .pager button,
body .pager a{
  min-width:28px;height:28px;border-radius:6px;border:1px solid var(--xh-line);
  background:#fff;display:inline-flex;align-items:center;justify-content:center;
  cursor:pointer;padding:0 7px;color:var(--xh-text);font-size:var(--xh-fs-table);
}
body .pagination .active,
body .pagination .on,
body .pager .active,
body .pager .on{background:var(--xh-primary);border-color:var(--xh-primary);color:#fff;font-weight:700;}

/* ============================================================
   12. 司机端 H5（index.html）
   ============================================================ */
body .header{
  background:linear-gradient(90deg,var(--xh-nav1),var(--xh-nav2)) !important;
  height:54px;padding:0 18px;
  box-shadow:0 2px 8px rgba(30,58,138,.25);
}
body .header h1{font-size:17px;font-weight:600;letter-spacing:.3px;}
body .header .btn-logout{
  background:rgba(255,255,255,.16) !important;border:1px solid rgba(255,255,255,.32);
  color:#fff;border-radius:var(--xh-radius-sm);padding:5px 14px;font-size:13px;
}
body .header .btn-logout:hover{background:rgba(255,255,255,.26) !important;color:#fff;}
body .search-btn{padding:9px 22px;font-size:var(--xh-fs-base);}
body .btn-photo{border-radius:var(--xh-radius-sm);font-weight:600;}
body .status-badge{font-size:11.5px;}
body .site-footer,
body .footer{color:var(--xh-faint);font-size:var(--xh-fs-hint);background:transparent;}
body .loading-spinner{border-color:rgba(24,144,255,.25);border-top-color:var(--xh-primary);}
body .spinner{border-color:rgba(24,144,255,.25);border-top-color:var(--xh-primary);}

/* ============================================================
   13. 首页/入口页（home.html）
   ============================================================ */
body .home-wrap{background:var(--xh-bg);}
body .home-divider{background:var(--xh-primary);opacity:.7;}
body .portal-card{
  background:var(--xh-card);border:1px solid var(--xh-line-soft);
  border-radius:var(--xh-radius);box-shadow:var(--xh-shd);
}
body .portal-card:hover{box-shadow:var(--xh-shd-hover);}
body .portal-icon{border-radius:var(--xh-radius);}
body .portal-card h3{font-size:var(--xh-fs-page);color:var(--xh-text);}
body .portal-card .desc{font-size:var(--xh-fs-table);color:var(--xh-muted);}
body .portal-btn{
  border:1px solid var(--xh-primary);border-radius:var(--xh-radius-sm);
  color:var(--xh-primary);font-weight:600;
}
body .portal-card:hover .portal-btn{background:var(--xh-primary);color:#fff;}
body .home-footer{color:var(--xh-faint);font-size:var(--xh-fs-hint);}

/* ============================================================
   14. 响应式（顶栏在小屏内换行 / 标签页横滑）
   ============================================================ */
@media (max-width:768px){
  body .admin-layout > .xh-topbar{margin:-16px -16px 14px;}
  body .xh-topbar-inner{
    height:auto;min-height:54px;flex-wrap:wrap;
    padding:8px 14px;gap:8px;
  }
  body .xh-topbar-logo img{height:28px;}
  body .xh-topbar-name{font-size:15px;}
  body .xh-topbar-inner .nav-tabs{
    order:9;width:100%;margin:0;padding-bottom:2px;
  }
  body .xh-topbar-inner .admin-header{margin-left:auto;}
  body .nav-tab{padding:6px 12px;font-size:13px;}
  body .xh-topbar-inner .portal-header .user-info{font-size:13px;}
  body .card{padding:14px;}
  body .login-form{padding:28px 22px;}
}

/* ============================================================
   15. 固定备案页脚（admin / portal / index / home 四端统一，不随滚动）
   ------------------------------------------------------------
   实测四端备案块所在位置：
     admin.html:2616  body > footer.site-footer
     portal.html:345  body > footer.site-footer
     index.html:146   body > footer.site-footer
     home.html:134    body > .home-wrap > div.home-footer
   以上祖先链上都没有 transform / filter / perspective / contain
   （body / .home-wrap 均无），因此 position:fixed 相对视口生效，
   随滚动保持不动，无需用 JS 搬移节点。
   注意：admin/portal/index 的 .site-footer 内含两行 .sf-line，
   若两行各自 fixed 会互相重叠 —— 故固定在**外层容器**上，两行用
   flex 横排（窄屏自动换行），高度可控、留白好算。
   页面内 modal / lightbox / loading 的 z-index 均 ≥ 9000，不受 60 影响。
   ============================================================ */
body{padding-bottom:42px;}

body .site-footer,
body .home-footer{
  position:fixed;
  left:0;right:0;bottom:0;z-index:60;
  display:flex;flex-wrap:wrap;align-items:center;justify-content:center;
  gap:2px 10px;
  background:rgba(255,255,255,.94);
  -webkit-backdrop-filter:blur(6px);
  backdrop-filter:blur(6px);
  border-top:1px solid var(--xh-line-soft);
  text-align:center;
  font-size:11.5px;
  line-height:1.5;
  color:var(--xh-faint);
  padding:7px 12px calc(7px + env(safe-area-inset-bottom));
  margin:0;
  box-shadow:0 -1px 3px rgba(16,24,40,.04);
}
body .site-footer .sf-line,
body .home-footer .sf-line{margin:0;line-height:1.5;}

/* ============================================================
   16. 顶栏快捷入口（司机端 / 客户端）· 下载中心「分享入口」卡片
   ============================================================ */
body .xh-topbar-links{display:flex;align-items:center;gap:8px;flex-shrink:0;margin-left:4px;}
body .xh-toplink{
  display:inline-flex;align-items:center;gap:6px;
  padding:5px 12px;border-radius:var(--xh-radius-sm);
  background:rgba(255,255,255,.14);border:1px solid rgba(255,255,255,.32);
  color:rgba(255,255,255,.82);font-size:13px;font-weight:600;
  white-space:nowrap;text-decoration:none;
  transition:background .15s ease,color .15s ease;
}
body .xh-toplink:hover{background:rgba(255,255,255,.26);color:#fff;}
body .xh-toplink .xh-tab-ic{stroke:rgba(255,255,255,.85);}
body .xh-toplink:hover .xh-tab-ic{stroke:#fff;}

body .share-row{
  display:flex;align-items:center;gap:10px;flex-wrap:wrap;
  padding:9px 12px;margin-bottom:8px;
  background:#f7f9fc;border:1px solid var(--xh-line-soft);
  border-radius:var(--xh-radius-sm);
}
body .share-row:last-child{margin-bottom:0;}
body .share-row-label{
  display:inline-flex;align-items:center;gap:6px;flex-shrink:0;
  min-width:76px;font-size:13.5px;font-weight:700;color:var(--xh-text);
}
body .share-ic{
  width:15px;height:15px;flex-shrink:0;vertical-align:middle;
  fill:none;stroke:var(--xh-icon-strong);stroke-width:1.8;
  stroke-linecap:round;stroke-linejoin:round;
}
body .share-link{
  flex:1;min-width:180px;padding:6px 9px;
  font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
  font-size:12.5px;color:var(--xh-muted);background:#fff;
  border:1px solid var(--xh-line);border-radius:6px;
  white-space:nowrap;overflow-x:auto;
}
body .share-copy-btn{flex-shrink:0;min-height:34px;padding:6px 16px;font-size:13px;}

/* ============================================================
   17. 手机端适配（≤760px）
   ------------------------------------------------------------
   Portal：修掉 #table-wrap 无 overflow 的根因（叠加 xh-bridge 的
   body .table-card{overflow:hidden} 会把 10 列宽表的右半裁掉，导致
   最右侧「操作」列的 ZIP下载/直接下载/查看 在手机上点不到）。
   Admin：顶栏标签横滑、筛选条堆叠、明细表横滑、弹窗 92vw。
   司机端：底部留白避开固定页脚。
   ============================================================ */
body .table-swipe-hint{display:none;}

@media (max-width:760px){

  /* 固定页脚在窄屏会换行成 2~3 行，底部留白同步加大，避免遮挡末行内容 */
  body{padding-bottom:72px;}

  /* ---- 通用：触控按钮高度 ≥36px ---- */
  body .btn,
  body .dl-btn,
  body .download-btn,
  body .search-btn,
  body .search-btn-icon{min-height:36px;}
  body .dl-btn{
    display:inline-flex;align-items:center;justify-content:center;text-align:center;
  }

  /* ---- Portal：表格横向滑动（根因修复 + 外壳仍裁圆角） ---- */
  body #table-wrap{
    overflow-x:auto;overflow-y:visible;
    -webkit-overflow-scrolling:touch;
    overscroll-behavior-x:contain;
    padding-bottom:4px;
  }
  body #table-wrap .data-table{min-width:860px;}
  body .table-card{overflow:hidden;}
  body .table-swipe-hint{
    display:block;padding:6px 10px;text-align:center;
    background:#f7f9fc;border-bottom:1px solid var(--xh-line-soft);
    color:var(--xh-faint);font-size:11.5px;
  }
  /* 空状态下不提示滑动（:has 不支持的旧浏览器退回“始终显示”，不影响功能） */
  body .table-card:has(.empty-state) .table-swipe-hint{display:none;}

  /* ---- Portal：表格密度 / 操作列按钮不溢出 ---- */
  body .data-table{font-size:12.5px;}
  body .data-table thead th,
  body .data-table tbody td{padding:6px 8px;}
  body .data-table td{white-space:nowrap;}
  body .data-table td:last-child{white-space:normal;min-width:104px;}
  body .data-table td:last-child .dl-btn{
    display:flex;width:100%;margin:2px 0;padding:7px 10px;font-size:12.5px;
  }

  /* ---- Portal：筛选条控件全宽堆叠 ---- */
  body .portal-layout{padding:12px;}
  body .portal-layout .search-bar{
    flex-direction:column;align-items:stretch;gap:8px;padding:12px;
  }
  body .portal-layout .search-bar input[type="text"],
  body .portal-layout .search-bar input[type="date"]{
    width:100%;min-width:0;font-size:16px;padding:11px 12px;
  }
  body .portal-layout .search-bar .cat-checks{width:100%;}
  body .portal-layout .search-bar .btn{width:100%;}
  body .portal-layout .search-bar .record-count{margin-left:0;}

  /* ---- Admin：顶栏（标签横滑 / 只留 logo / 快捷入口只留图标） ---- */
  body #admin-main.admin-layout{padding:12px;}
  body .admin-layout > .xh-topbar{margin:-12px -12px 12px;}
  body .admin-layout .xh-topbar-inner{
    overflow-x:auto;overflow-y:hidden;-webkit-overflow-scrolling:touch;
  }
  body .admin-layout .xh-topbar-name{display:none;}
  body .admin-layout .xh-topbar-inner .nav-tabs{
    overflow-x:auto;-webkit-overflow-scrolling:touch;
  }
  body .xh-topbar-links{gap:6px;margin-left:4px;}
  body .admin-layout .xh-toplink{padding:5px 9px;}
  body .admin-layout .xh-toplink-t{display:none;}

  /* ---- Admin：KPI / 卡片栅格（.xh-kpis 为模板 KPI 容器，本页暂无则留作规范） ---- */
  body .xh-kpis{grid-template-columns:repeat(2,1fr);}
  body .xh-kpi{padding:10px 12px;}
  body .bl-group-cards{grid-template-columns:1fr;}
  body .fleet-grid{grid-template-columns:1fr;}
  /* JS 内联生成的司机卡片栅格 minmax(460px,1fr) 在窄屏会撑破容器 */
  body .driver-fleet-group-body > div{grid-template-columns:1fr !important;}

  /* ---- Admin：手动录入表（列内联 min-width:140px 会横向溢出） ---- */
  body #manual-table{font-size:12px;}
  body #manual-table th{min-width:96px !important;padding:5px 6px !important;}

  /* ---- Admin：筛选条 / 批量工具条纵向堆叠 ---- */
  body .filter-bar,
  body .detail-toolbar{flex-direction:column;align-items:stretch;gap:8px;}
  body .filter-bar input,
  body .filter-bar select,
  body .detail-toolbar input{width:100%;min-width:0;}

  /* ---- Admin：明细表横滑 + 密度 + 操作列换行 ---- */
  body .detail-table-wrap{-webkit-overflow-scrolling:touch;}
  body .detail-table{font-size:12px;}
  body .detail-table thead th{padding:7px 8px;}
  body .detail-table tbody td{padding:6px 8px;}
  body .detail-table td.dt-ops{white-space:normal;min-width:104px;}
  body .detail-table td.dt-ops > div{flex-wrap:wrap;gap:4px;}
  body .detail-table .dt-btn{min-height:34px;}

  /* ---- Admin：弹窗宽度 ---- */
  body .xh-modal,
  body .photo-modal{width:92vw;max-width:92vw;padding:16px;}
  body .photo-modal-overlay{padding:12px;}

  /* ---- Admin：分享入口卡片 ---- */
  body .share-row{flex-direction:column;align-items:stretch;gap:6px;}
  body .share-link{min-width:0;white-space:normal;overflow-wrap:anywhere;}
  body .share-copy-btn{width:100%;}

  /* ---- 司机端 H5：卡片与按钮尺寸、避开固定页脚 ---- */
  body .main-content{padding-bottom:88px;}
  body .btn-photo,
  body .search-btn{min-height:42px;}
  body .container-item{padding:14px;}
  body .login-card .btn-login{min-height:44px;}
}

/* ============================================================
   18. 柜照清单：浮层不再被裁切 + 行内字段纵向空间（王总反馈修复）
   ------------------------------------------------------------
   反馈现象：清单里字段高度不够、下拉会「漏」、面板无法完全遮挡后面的行。
   排查结论：
     a) `.detail-table-wrap{overflow:auto}`(style.css:1881) 与
        `body .table-card{overflow:hidden}`(xh-bridge.css:134) 会裁切**任何
        在表格/卡片内的绝对定位浮层** —— 列筛选浮层 .col-filter-dropdown
        原为 position:absolute 且无 JS 定位，属于典型受害者，已改为 fixed。
     b) 客户名称下拉 .cu-dd 已是「挂 body + position:fixed + getBoundingClientRect」
        定位，不受裁切；此处仅限制其高度，降低超出视口底部的概率。
     c) 行高/内边距偏紧，中文与徽章被压扁，下面统一抬高并保持垂直居中。
   ============================================================ */

/* ---- ① 浮层不被任何祖先裁切（兜底：即使 style.css:1928 的 absolute 规则仍在，
        本规则以 !important 强制 fixed + 最高层级） ---- */
body .col-filter-dropdown{
  position:fixed !important;
  z-index:2147483646 !important;
  max-height:min(340px,70vh);
}
body .cu-dd{max-height:min(280px,50vh);}

/* ---- ② 表头 / 单元格纵向空间：上下 ≥8px / ≥9px，行高 1.45 ---- */
body .detail-table thead th{
  padding:8px 10px;line-height:1.45;vertical-align:middle;
}
body .detail-table tbody td{
  padding:9px 10px;line-height:1.45;vertical-align:middle;
}
body .detail-table tbody td.dt-wrap{line-height:1.45;}

/* ---- ③ 行内按钮 / 徽章：垂直居中、不换行错位 ---- */
body .detail-table td.dt-ops > div{
  display:flex;align-items:center;flex-wrap:nowrap;gap:4px;justify-content:center;
}
body .detail-table td.dt-center{
  text-align:center;vertical-align:middle;
}
body .detail-table .dt-btn,
body .detail-table .dl-btn.dt-btn{
  display:inline-flex;align-items:center;justify-content:center;
  vertical-align:middle;line-height:1;white-space:nowrap;flex:0 0 auto;
}
body .detail-table td input[type="checkbox"]{vertical-align:middle;margin:0;}
body .detail-table .badge-status,
body .detail-table .badge{
  display:inline-block;vertical-align:middle;line-height:1.35;white-space:nowrap;
}
body .detail-table .badge-status svg{vertical-align:-1px;}

/* 窄屏：操作列按钮允许换行，避免撑破单元格（放在最后以覆盖上面的 nowrap） */
@media (max-width:760px){
  body .detail-table td.dt-ops > div{flex-wrap:wrap;gap:4px;}
}

/* ===== 表头"防漏"加固（2026-09-10 王总反馈：清单下拉滚动时行内容从表头边缘漏出） =====
   实测（真实页面像素级复现）：sticky 表头定位在整数像素上，表头盒顶与滚动容器
   可视顶之间会残留 1px 缝隙，滚动经过的行内容（如红色按钮顶边）正好从这条缝漏出。
   修法：①表头 sticky 偏移上移 2px（top:-2px），用表头自身底色盖住缝隙；
        ②再用外层 box-shadow 在表头盒子外侧各铺 3px 同色护罩（不进入盒内，不影响网格线）；
        ③表头层级抬高到行内容之上。 */
body .detail-table thead th{
  position:sticky;top:-2px;z-index:8;
  background:#f7f9fc !important;
  box-shadow:0 -3px 0 0 #f7f9fc, 0 3px 0 0 #f7f9fc !important;
}
/* 表头整行再兜一层：行级 z-index，避免个别单元格内的定位元素顶穿 */
body .detail-table thead{position:relative;z-index:8;}
/* 滚动容器白底，避免圆角处透出页面底色 */
body .detail-table-wrap{background:#fff;}
