:root {
  --brand: #0f766e;
  --brand-light: #e6f4f1;
  --brand-dark: #0b5a54;
  --nav-bg: #10222d;
  --nav-text: #b9c7d0;
  --bg: #f4f6f8;
  --text: #1f2d3d;
  --text-muted: #7b8794;
  --border: #e6ebf0;
  --danger: #d64545;
  --warning: #d98b1f;
  --success: #1f9d6b;
  --el-color-primary: #0f766e;
  --el-color-primary-light-3: #4a9c94;
  --el-color-primary-light-5: #87c1bb;
  --el-color-primary-light-7: #c2e0dc;
  --el-color-primary-light-9: #e6f4f1;
  --el-color-primary-dark-2: #0b5a54;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}
#app { height: 100%; }
a { color: var(--brand); text-decoration: none; }

/* ---------- 启动 ---------- */
.boot-loading { height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; }
.boot-logo { font-size: 22px; font-weight: 600; color: var(--brand); letter-spacing: 2px; }
.boot-text { color: var(--text-muted); font-size: 13px; }
.boot-error { padding: 80px; text-align: center; color: #8a3b3b; }

/* ---------- 登录 ---------- */
.login-wrap { height: 100vh; display: flex; background: #0c1b23; }
.login-aside {
  flex: 1.15; padding: 64px 72px; color: #fff; display: flex; flex-direction: column;
  justify-content: space-between;
  background: radial-gradient(circle at 20% 20%, #17564f 0%, #0c1b23 55%), #0c1b23;
  position: relative; overflow: hidden;
}
.login-aside::after {
  content: ""; position: absolute; width: 520px; height: 520px; right: -160px; bottom: -200px;
  border-radius: 50%; background: rgba(15,118,110,.25); filter: blur(10px);
}
.login-brand { font-size: 15px; letter-spacing: 2px; color: #9fd3cd; display: flex; align-items: center; gap: 10px; }
.login-brand img { width: 40px; height: 40px; border-radius: 8px; background: #fff; padding: 2px; object-fit: contain; }
.login-title { font-size: 40px; font-weight: 700; line-height: 1.35; margin: 26px 0 18px; }
.login-title span { color: #5fc3b8; }
.login-sub { color: #a9bcc6; font-size: 15px; line-height: 1.9; max-width: 520px; }
.login-points { margin-top: 38px; display: grid; gap: 18px; z-index: 1; }
.login-point { display: flex; gap: 14px; align-items: flex-start; }
.login-point .num {
  width: 26px; height: 26px; border-radius: 8px; background: rgba(95,195,184,.16);
  color: #7fd3c9; font-size: 12px; display: flex; align-items: center; justify-content: center;
  flex: none; margin-top: 2px;
}
.login-point b { display: block; font-size: 14px; margin-bottom: 4px; font-weight: 600; }
.login-point p { margin: 0; color: #93a7b2; font-size: 13px; }
.login-footer { color: #5c707c; font-size: 12px; z-index: 1; }
.login-panel { width: 480px; background: #fff; display: flex; flex-direction: column; justify-content: center; padding: 0 64px; }
.login-panel h2 { margin: 0 0 8px; font-size: 24px; }
.login-panel .hint { color: var(--text-muted); font-size: 13px; margin-bottom: 28px; }
.login-panel .el-form-item { margin-bottom: 20px; }
.login-panel .el-input__wrapper { padding: 4px 12px; }
.login-panel .login-btn { width: 100%; height: 44px; font-size: 15px; letter-spacing: 4px; margin-top: 6px; }
.demo-box { margin-top: 26px; border-top: 1px dashed var(--border); padding-top: 18px; }
.demo-box .demo-title { font-size: 12px; color: var(--text-muted); margin-bottom: 10px; }
.demo-accounts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.demo-account {
  border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; cursor: pointer;
  transition: all .15s; background: #fbfcfd;
}
.demo-account:hover { border-color: var(--brand); background: var(--brand-light); }
.demo-account b { display: block; font-size: 12px; font-weight: 600; }
.demo-account span { font-size: 11px; color: var(--text-muted); }
.login-tip { margin-top: 18px; font-size: 12px; color: #97a4af; line-height: 1.7; }

/* ---------- 主框架 ---------- */
.layout { display: flex; height: 100vh; overflow: hidden; }
.sidebar {
  width: 224px; background: var(--nav-bg); color: var(--nav-text);
  display: flex; flex-direction: column; flex: none;
}
.sidebar .brand { padding: 24px 22px 20px; display: flex; align-items: center; gap: 10px; }
.sidebar .brand-logo {
  width: 34px; height: 34px; border-radius: 8px; background: #fff;
  object-fit: contain; padding: 2px; flex: none;
}
.sidebar .brand-mark {
  width: 30px; height: 30px; border-radius: 9px; background: linear-gradient(135deg, #19a396, #0f766e);
  display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 700; font-size: 14px;
}
.sidebar .brand-name { font-size: 14px; font-weight: 600; color: #fff; letter-spacing: .5px; }
.sidebar .brand-en { font-size: 10px; color: #5d7481; letter-spacing: 1.6px; margin-top: 2px; }
.menu-group-label { padding: 16px 24px 8px; font-size: 11px; color: #566c78; letter-spacing: 1px; }
.menu-item {
  display: flex; align-items: center; gap: 10px; margin: 2px 12px; padding: 10px 12px;
  border-radius: 8px; cursor: pointer; color: var(--nav-text); font-size: 13.5px;
  transition: background .15s, color .15s; user-select: none;
}
.menu-item:hover { background: rgba(255,255,255,.05); color: #fff; }
.menu-item.active { background: var(--brand); color: #fff; box-shadow: 0 4px 12px rgba(15,118,110,.25); }
.menu-item .badge {
  margin-left: auto; background: #d64545; color: #fff; font-size: 11px;
  border-radius: 9px; padding: 0 6px; height: 18px; line-height: 18px; min-width: 18px; text-align: center;
}
.menu-item.active .badge { background: rgba(255,255,255,.24); }
.sidebar-footer { margin-top: auto; padding: 16px 18px; border-top: 1px solid rgba(255,255,255,.06); font-size: 11px; color: #566c78; }

.main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.topbar {
  height: 60px; background: #fff; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; padding: 0 26px; gap: 16px; flex: none;
}
.topbar .page-title { font-size: 16px; font-weight: 600; }
.topbar .page-desc { font-size: 12px; color: var(--text-muted); margin-left: 10px; }
.topbar .spacer { flex: 1; }
.topbar .quick-scan { font-size: 12px; color: var(--text-muted); }
.user-box { display: flex; align-items: center; gap: 10px; cursor: pointer; padding: 6px 8px; border-radius: 8px; }
.user-box:hover { background: #f5f7f9; }
.avatar {
  width: 32px; height: 32px; border-radius: 50%; background: var(--brand-light); color: var(--brand);
  display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 600;
}
.user-name { font-size: 13px; font-weight: 500; }
.user-role { font-size: 11px; color: var(--text-muted); }

.content { flex: 1; overflow: auto; padding: 22px 26px 40px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 18px; gap: 16px; flex-wrap: wrap; }
.page-head h1 { font-size: 20px; margin: 0; font-weight: 600; }
.page-head .sub { color: var(--text-muted); font-size: 13px; margin-top: 6px; }
.page-head .actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- 卡片 ---------- */
.card { background: #fff; border-radius: 12px; border: 1px solid var(--border); }
.card-pad { padding: 18px 20px; }
.card-title { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.card-title h3 { margin: 0; font-size: 14.5px; font-weight: 600; }
.card-title .more { font-size: 12px; color: var(--text-muted); cursor: pointer; }
.card-title .more:hover { color: var(--brand); }

.stat-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; margin-bottom: 18px; }
.stat-card { background: #fff; border-radius: 12px; border: 1px solid var(--border); padding: 16px 18px; position: relative; overflow: hidden; }
.stat-card .label { font-size: 12.5px; color: var(--text-muted); display: flex; align-items: center; gap: 6px; }
.stat-card .value { font-size: 26px; font-weight: 700; margin-top: 10px; letter-spacing: .5px; }
.stat-card .foot { font-size: 11.5px; color: #98a4af; margin-top: 6px; }
.stat-card.warn .value { color: var(--danger); }
.stat-card.ok .value { color: var(--success); }
.stat-card .corner { position: absolute; right: -18px; top: -18px; width: 64px; height: 64px; border-radius: 50%; background: var(--brand-light); opacity: .65; }
.stat-card.warn .corner { background: #fdecec; }

.dash-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; }
.dash-col { display: grid; gap: 16px; align-content: start; }

/* 简易条形图 */
.bar-row { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.bar-row .name { width: 130px; font-size: 12.5px; color: #4a5b68; flex: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-track { flex: 1; height: 22px; background: #f1f4f6; border-radius: 4px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 4px; background: linear-gradient(90deg, #1aa294, #0f766e); min-width: 2px; }
.bar-row .num { width: 46px; text-align: right; font-size: 12px; color: var(--text-muted); flex: none; }

/* 列表 */
.mini-list { display: grid; }
.mini-row { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px dashed #eef1f4; }
.mini-row:last-child { border-bottom: none; }
.mini-row .main-col { flex: 1; min-width: 0; }
.mini-row .t1 { font-size: 13px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-row .t2 { font-size: 11.5px; color: var(--text-muted); margin-top: 3px; }
.mini-row .time { font-size: 11.5px; color: #9aa6b1; flex: none; }
.empty { padding: 30px 0; text-align: center; color: #a3aeb8; font-size: 12.5px; }

/* 表格区 */
.table-card { background: #fff; border-radius: 12px; border: 1px solid var(--border); padding: 16px 18px 8px; }
.filter-bar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; align-items: center; }
.filter-bar .el-input, .filter-bar .el-select { width: 160px; }
.filter-bar .keyword { width: 240px; }
.filter-bar .spacer { flex: 1; }
.batch-bar {
  display: flex; align-items: center; gap: 12px; background: var(--brand-light);
  border: 1px solid #c9e5e1; border-radius: 8px; padding: 8px 14px; margin-bottom: 12px; font-size: 12.5px;
}

.company-cell { display: flex; flex-direction: column; gap: 2px; }
.company-cell b { font-weight: 600; font-size: 13px; }
.company-cell span { font-size: 11.5px; color: var(--text-muted); }
.risk-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 5px; vertical-align: 1px; }
.risk-high { background: #d64545; }
.risk-medium { background: #d98b1f; }
.risk-low { background: #4f9ad6; }
.risk-none { background: #c3ccd4; }
.progress-mini { display: flex; align-items: center; gap: 8px; min-width: 110px; }
.progress-mini .el-progress { flex: 1; }
.progress-mini span { font-size: 11px; color: var(--text-muted); width: 34px; text-align: right; }

.pager { display: flex; justify-content: flex-end; padding: 12px 0 8px; }

/* 客户详情 */
.detail-head { display: flex; gap: 16px; align-items: flex-start; }
.detail-head .avatar-lg {
  width: 52px; height: 52px; border-radius: 12px; background: var(--brand-light); color: var(--brand);
  display: flex; align-items: center; justify-content: center; font-size: 18px; font-weight: 700; flex: none;
}
.detail-head h2 { margin: 0; font-size: 18px; }
.detail-head .meta { color: var(--text-muted); font-size: 12.5px; margin-top: 6px; display: flex; gap: 14px; flex-wrap: wrap; }
.detail-tags { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.detail-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 18px 0 4px; }
.detail-stat { background: #f7f9fa; border-radius: 8px; padding: 10px 12px; }
.detail-stat .k { font-size: 11.5px; color: var(--text-muted); }
.detail-stat .v { font-size: 16px; font-weight: 600; margin-top: 4px; }

.step-list { padding-left: 4px; }
.step-item { display: flex; gap: 14px; position: relative; padding-bottom: 6px; }
.step-rail { width: 22px; flex: none; display: flex; flex-direction: column; align-items: center; }
.step-dot {
  width: 22px; height: 22px; border-radius: 50%; border: 2px solid #d7dee4; background: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 11px; color: #9aa6b1; flex: none;
}
.step-dot.done { background: #1f9d6b; border-color: #1f9d6b; color: #fff; }
.step-dot.doing { background: var(--brand); border-color: var(--brand); color: #fff; }
.step-dot.overdue { background: #fdecec; border-color: #d64545; color: #d64545; }
.step-line { width: 2px; flex: 1; background: #edf1f4; min-height: 26px; }
.step-body { flex: 1; padding: 0 0 18px; min-width: 0; }
.step-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.step-top b { font-size: 13.5px; font-weight: 600; }
.step-meta { font-size: 11.5px; color: var(--text-muted); margin-top: 5px; display: flex; gap: 14px; flex-wrap: wrap; }
.step-meta .over { color: var(--danger); }
.step-actions { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.step-remark { background: #f7f9fa; border-radius: 6px; padding: 8px 10px; margin-top: 8px; font-size: 12px; color: #556573; line-height: 1.6; }

.record-item { padding: 14px 0; border-bottom: 1px dashed #eef1f4; }
.record-item:last-child { border-bottom: none; }
.record-head { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--text-muted); }
.record-head b { font-size: 13px; color: var(--text); }
.record-content { font-size: 13px; line-height: 1.75; margin-top: 6px; }
.record-result { font-size: 12.5px; color: #4a5b68; background: #f7f9fa; border-radius: 6px; padding: 8px 10px; margin-top: 8px; }

.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 24px; }
.info-row { display: flex; padding: 10px 0; border-bottom: 1px dashed #eef1f4; font-size: 13px; }
.info-row .k { width: 96px; color: var(--text-muted); flex: none; }
.info-row .v { flex: 1; word-break: break-all; }

/* 工作台 */
.wb-grid { display: grid; grid-template-columns: 1.55fr 1fr; gap: 16px; align-items: start; }
.wb-stack { display: grid; gap: 16px; }
.follow-reason { font-size: 11.5px; color: var(--warning); }

/* 空状态 / 占位 */
.placeholder { background: #fff; border: 1px dashed #d9e1e7; border-radius: 14px; padding: 60px 40px; text-align: center; }
.placeholder .ph-label {
  display: inline-block; background: var(--brand-light); color: var(--brand); font-size: 12px;
  padding: 4px 10px; border-radius: 999px; margin-bottom: 16px;
}
.placeholder h2 { margin: 0 0 10px; font-size: 20px; }
.placeholder p { color: var(--text-muted); font-size: 13px; line-height: 1.9; max-width: 620px; margin: 0 auto; }
.placeholder .ph-list { display: inline-grid; gap: 10px; margin-top: 22px; text-align: left; }
.placeholder .ph-item { font-size: 13px; color: #4a5b68; display: flex; gap: 8px; }
.placeholder .ph-item i { width: 5px; height: 5px; border-radius: 50%; background: var(--brand); margin-top: 8px; flex: none; }

/* 响应式 */
@media (max-width: 1400px) {
  .stat-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 1180px) {
  .dash-grid, .wb-grid { grid-template-columns: 1fr; }
  .login-aside { display: none; }
  .login-panel { width: 100%; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
}

/* 交付物文件库 */
.file-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.file-card { border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: #fff; display: flex; flex-direction: column; }
.file-thumb { height: 130px; background: #f4f7f9; display: flex; align-items: center; justify-content: center; cursor: pointer; overflow: hidden; }
.file-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .2s; }
.file-thumb:hover img { transform: scale(1.04); }
.file-ic { width: 52px; height: 52px; border-radius: 12px; background: var(--brand-light); color: var(--brand); font-size: 12px; display: flex; align-items: center; justify-content: center; }
.file-name { padding: 8px 10px 0; font-size: 12.5px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-meta { padding: 2px 10px 0; font-size: 11px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-actions { padding: 4px 6px 6px; display: flex; justify-content: flex-end; }
@media (max-width: 1200px) { .file-grid { grid-template-columns: repeat(3, 1fr); } }
