/* 蓝点数据恢复管理系统 */
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body, #app { height: 100%; font-family: "Microsoft YaHei", sans-serif; }

/* 登录页 */
.login-wrap { height: 100%; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #185FA5 0%, #0C447C 100%); }
.login-card { background: #fff; border-radius: 12px; padding: 40px 44px; width: 380px;
  box-shadow: 0 12px 40px rgba(0,0,0,.25); }
.login-card h1 { font-size: 20px; text-align: center; margin-bottom: 6px; color: #1a1a1a; }
.login-card .sub { text-align: center; color: #999; font-size: 13px; margin-bottom: 26px; }

/* 主布局 */
.layout { display: flex; height: 100%; }
.sidebar { width: 210px; background: #0C2B45; color: #cfd8e3; flex-shrink: 0;
  display: flex; flex-direction: column; }
.sidebar .logo { padding: 20px 16px; font-size: 16px; font-weight: 600; color: #fff;
  border-bottom: 1px solid rgba(255,255,255,.08); }
.sidebar .logo small { display: block; font-size: 11px; font-weight: 400; color: #7d94ab; margin-top: 2px; }
.menu-item { padding: 12px 18px; cursor: pointer; font-size: 14px; display: flex;
  align-items: center; gap: 8px; transition: background .15s; }
.menu-item:hover { background: rgba(255,255,255,.06); }
.menu-item.active { background: #185FA5; color: #fff; }
.sidebar .spacer { flex: 1; }
.sidebar .user-box { padding: 14px 16px; border-top: 1px solid rgba(255,255,255,.08);
  font-size: 13px; }
.sidebar .user-box .role-tag { color: #8FB8DF; }
.main { flex: 1; overflow-y: auto; background: #f5f6f8; padding: 20px 24px; }

/* 通用 */
.page-title { font-size: 18px; font-weight: 600; margin-bottom: 16px; color: #1a1a1a; }
.card { background: #fff; border-radius: 10px; padding: 18px 20px; margin-bottom: 16px;
  border: 1px solid #ebeef2; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }

/* 状态彩色标签 */
.st-pill { display: inline-block; padding: 3px 12px; border-radius: 14px; font-size: 12px; font-weight: 500; }
.st-inspecting { background: #E6F1FB; color: #185FA5; }
.st-pending_recovery { background: #FAEEDA; color: #854F0B; }
.st-awaiting_parts { background: #FAECE7; color: #993C1D; }
.st-recovering { background: #E1F5EE; color: #0F6E56; }
.st-recovered { background: #EAF3DE; color: #3B6D11; }
.st-unrecoverable { background: #FCEBEB; color: #A32D2D; }
.st-delivered { background: #EEEDFE; color: #534AB7; }

/* 看板状态卡片 */
.status-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 12px; margin-bottom: 16px; }
.status-card { border-radius: 10px; padding: 14px 12px; text-align: center; cursor: pointer;
  border: 2px solid transparent; transition: transform .12s, border-color .12s; }
.status-card:hover { transform: translateY(-2px); }
.status-card .num { font-size: 26px; font-weight: 700; }
.status-card .txt { font-size: 13px; margin-top: 2px; }
.status-card.selected { border-color: #185FA5; }

.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
.stat-card { background: #fff; border-radius: 10px; padding: 16px; border: 1px solid #ebeef2; }
.stat-card .label { font-size: 13px; color: #888; }
.stat-card .value { font-size: 22px; font-weight: 700; margin-top: 4px; color: #1a1a1a; }
.stat-card.warn .value { color: #A32D2D; }

.audit-tag-pending { background: #FAEEDA; color: #854F0B; padding: 2px 10px; border-radius: 12px; font-size: 12px; }
.audit-tag-approved { background: #EAF3DE; color: #3B6D11; padding: 2px 10px; border-radius: 12px; font-size: 12px; }
.audit-tag-rejected { background: #FCEBEB; color: #A32D2D; padding: 2px 10px; border-radius: 12px; font-size: 12px; }
.review-tag-none { background: #f4f6f8; color: #9aa1a8; padding: 2px 10px; border-radius: 12px; font-size: 12px; }
.review-tag-pending { background: #FAEEDA; color: #854F0B; padding: 2px 10px; border-radius: 12px; font-size: 12px; }
.review-tag-approved { background: #EAF3DE; color: #3B6D11; padding: 2px 10px; border-radius: 12px; font-size: 12px; }
.review-tag-rejected { background: #FCEBEB; color: #A32D2D; padding: 2px 10px; border-radius: 12px; font-size: 12px; }
.store-switch { padding: 8px 14px; border-bottom: 1px solid #eef2f6; }
.store-switch-label { display: block; font-size: 11px; color: #9aa1a8; margin-bottom: 4px; }
.store-current { font-size: 13px; color: #3b4a5a; font-weight: 600; padding: 2px 0; }

/* 文档预览弹窗 */
.doc-preview { width: 100%; height: 70vh; border: 1px solid #ddd; border-radius: 6px; background: #fff; }
.form-section { font-weight: 600; margin: 14px 0 8px; color: #185FA5; font-size: 14px; }

/* 返利统计弹窗小卡片 */
.stat-box { background: #fff; border: 1px solid #ebeef2; border-radius: 10px;
  padding: 14px 12px; text-align: center; }
.stat-box .stat-num { font-size: 20px; font-weight: 700; color: #1a1a1a; }
.stat-box .stat-label { font-size: 12px; color: #888; margin-top: 3px; }

/* 费用流程步骤条 */
.fee-flow { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; margin: 6px 0 2px; }
.fee-flow .step { padding: 4px 10px; border-radius: 14px; font-size: 12px;
  background: #f0f2f5; color: #909399; }
.fee-flow .step.on { background: #e1f0ff; color: #185FA5; font-weight: 600; }
.fee-flow .arrow { color: #c0c4cc; font-size: 12px; }
.fee-flow .step .sub { font-size: 11px; font-weight: 400; color: #a0a6ad; }
.fee-flow .step.on .sub { color: #5a8bbd; }

/* 工单流程进度（彩色箭头连接） */
.wf-flow { display: flex; align-items: center; flex-wrap: wrap; gap: 2px; margin: 6px 0 2px; }
.wf-step { padding: 4px 12px; border-radius: 14px; font-size: 12px; border: 1px solid transparent; white-space: nowrap; }
.wf-step.done { background: #EAF3DE; color: #3B6D11; }
.wf-step.active { background: #e1f0ff; color: #185FA5; font-weight: 600; border-color: #185FA5; }
.wf-step.wait { background: #f4f6f8; color: #9aa1a8; }
.wf-arrow { color: #c0c4cc; font-size: 13px; margin: 0 1px; }
.wf-arrow.on { color: #3B6D11; }
.wf-next { color: #185FA5; font-size: 13px; }
.wf-next.done { color: #3B6D11; }

/* ============ 移动端适配（v0.23，全站响应式） ============ */
.m-header { display: none; }
.mask { display: none; }

@media (max-width: 900px) {
  .layout { position: relative; }
  /* 侧边栏收成抽屉 */
  .sidebar {
    position: fixed; left: 0; top: 0; bottom: 0; width: 240px; z-index: 1001;
    transform: translateX(-100%); transition: transform .25s ease;
    box-shadow: 4px 0 20px rgba(0,0,0,.2);
  }
  .sidebar.open { transform: translateX(0); }
  .mask { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 1000; }
  /* 移动端顶栏 */
  .m-header {
    display: flex; align-items: center; gap: 4px; padding: 6px 4px 10px;
    position: sticky; top: 0; z-index: 50; background: #f5f6f8;
  }
  .m-burger { font-size: 20px; color: #185FA5; }
  .m-title { font-size: 15px; font-weight: 600; color: #185FA5; }
  .m-user { font-size: 12px; color: #7d94ab; }
  .main { padding: 8px 12px 40px; overflow-y: auto; -webkit-overflow-scrolling: touch; }
  .page-title { font-size: 16px; margin-bottom: 12px; }

  /* 卡片降列 */
  .status-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .status-card { padding: 10px 6px; }
  .status-card .num { font-size: 20px; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .stat-card { padding: 12px; }
  .stat-card .value { font-size: 18px; }
  .card { padding: 14px 12px; }
  .toolbar { gap: 6px; margin-bottom: 10px; }
  .toolbar .el-select, .toolbar .el-date-editor { width: auto !important; min-width: 0; }
  .toolbar .el-button { margin-left: 0 !important; }

  /* 弹窗接近全屏（el-dialog width 是内联样式，需 !important） */
  .el-dialog { width: calc(100% - 16px) !important; max-width: calc(100% - 16px) !important; }
  .el-message-box { width: calc(100% - 40px) !important; }
  .doc-preview { height: 60vh; }

  /* 表格/表单窄屏观感 */
  .el-table { font-size: 12px; min-width: 640px; }
  .el-table .el-button { padding: 4px 6px; font-size: 12px; }
  .login-card { width: calc(100% - 32px); padding: 28px 20px; }
  .wf-flow, .fee-flow { gap: 1px; }
  .wf-step { padding: 3px 8px; font-size: 11px; }
  .fee-flow .step { padding: 3px 8px; font-size: 11px; }

  /* v0.23-3 各页面微调：表格横向滚动、次要列隐藏、抽屉全宽、搜索框占满 */
  .card { overflow-x: auto; }
  .hide-sm { display: none !important; }
  .el-drawer { width: 100% !important; }
  .toolbar .el-input { flex: 1 1 100%; width: 100% !important; }
}

/* v0.23 工程师工作台：负载排行 */
.load-list { display: flex; flex-direction: column; gap: 12px; }
.load-row { display: flex; align-items: center; }
.load-name { width: 120px; font-size: 14px; color: #1a1a1a; white-space: nowrap; }
.load-num { width: 56px; text-align: right; font-size: 14px; font-weight: 600; white-space: nowrap; }
@media (max-width: 480px) {
  .load-name { width: 90px; font-size: 13px; }
  .load-num { width: 48px; font-size: 13px; }
}

/* v0.23 月度经营对比 */
.mc-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 12px; }
.mc-card { background: #f8fafc; border: 1px solid #ebeef2; border-radius: 10px; padding: 14px 16px; }
.mc-label { font-size: 13px; color: #7d94ab; }
.mc-value { font-size: 22px; font-weight: 700; margin-top: 4px; color: #1a1a1a; }
.mc-diff { display: flex; gap: 14px; margin-top: 8px; font-size: 12px; }
.mc-diff-item { color: #7d94ab; }
.mc-diff-item b { color: #888; font-weight: 500; margin-right: 2px; }
.mc-diff-item.up { color: #1E9E63; }
.mc-diff-item.down { color: #C0392B; }
@media (max-width: 900px) {
  .mc-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .mc-card { padding: 12px; }
  .mc-value { font-size: 18px; }
  .mc-diff { flex-direction: column; gap: 4px; }
}
