/* 华远人力营销与销售管理系统 · 全局样式 */
:root {
  --brand-950: #08182e;
  --brand-900: #0d2140;
  --brand-800: #142d52;
  --brand-700: #1b3d6b;
  --primary: #1a5fd0;
  --primary-soft: #eaf1fd;
  --page-bg: #f4f6fa;
  --text-main: #1f2a3d;
  --text-sub: #6b7a90;
  --border-soft: #e6ebf2;
  --success: #17a673;
  --warning: #e6a23c;
  --danger: #e05252;

  --el-color-primary: #1a5fd0;
  --el-color-primary-light-3: #5a8ce0;
  --el-color-primary-light-5: #8fb2ea;
  --el-color-primary-light-7: #c2d5f4;
  --el-color-primary-light-8: #d8e4f8;
  --el-color-primary-light-9: #edf3fc;
  --el-color-primary-dark-2: #154ca6;
  --el-border-radius-base: 6px;
}

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

/* 启动占位 */
.boot-loading {
  height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 12px; background: linear-gradient(160deg, #0d2140, #1b3d6b);
}
.boot-logo { color: #fff; font-size: 30px; font-weight: 700; letter-spacing: 4px; }
.boot-text { color: #9fb4d4; font-size: 13px; letter-spacing: 1px; }

/* 布局 */
.layout { height: 100vh; }
.sidebar {
  width: 232px; background: linear-gradient(180deg, var(--brand-900), var(--brand-950));
  display: flex; flex-direction: column; color: #cfdcef; overflow: hidden;
  transition: width .2s ease;
}
.sidebar.collapsed { width: 64px; }
.brand-block {
  padding: 20px 20px 16px; border-bottom: 1px solid rgba(255, 255, 255, .08);
  display: flex; align-items: center; gap: 10px; min-height: 72px;
}
.brand-mark {
  width: 34px; height: 34px; border-radius: 9px; flex: 0 0 34px;
  background: linear-gradient(135deg, #3b7cf0, #1a5fd0);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: 15px; letter-spacing: 1px;
}
.brand-text { line-height: 1.25; white-space: nowrap; }
.brand-text strong { color: #fff; font-size: 16px; letter-spacing: 2px; }
.brand-text span { display: block; color: #7f95b8; font-size: 11px; margin-top: 3px; letter-spacing: .5px; }
.sidebar.collapsed .brand-text { display: none; }

.menu-scroll { flex: 1; overflow-y: auto; padding: 10px 0 16px; }
.menu-scroll::-webkit-scrollbar { width: 6px; }
.menu-scroll::-webkit-scrollbar-thumb { background: rgba(255,255,255,.14); border-radius: 3px; }
.menu-group-title {
  padding: 14px 22px 6px; font-size: 11px; color: #6f86a8; letter-spacing: 1px; white-space: nowrap;
}
.sidebar.collapsed .menu-group-title { text-align: center; padding-left: 0; padding-right: 0; font-size: 9px; }
.menu-item {
  display: flex; align-items: center; gap: 10px; padding: 10px 22px; margin: 2px 10px;
  border-radius: 7px; color: #b9c9df; text-decoration: none; font-size: 13.5px;
  cursor: pointer; white-space: nowrap; transition: all .16s ease;
}
.menu-item:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.menu-item.active { background: linear-gradient(90deg, rgba(59,124,240,.95), rgba(26,95,208,.85)); color: #fff; box-shadow: 0 4px 14px rgba(26, 95, 208, .35); }
.menu-item .el-icon { font-size: 16px; flex: 0 0 16px; }
.sidebar.collapsed .menu-item { justify-content: center; padding: 11px 0; }
.sidebar.collapsed .menu-item span { display: none; }

.sidebar-foot { padding: 12px 16px; border-top: 1px solid rgba(255,255,255,.08); font-size: 11px; color: #64789a; }
.sidebar.collapsed .sidebar-foot { display: none; }

.main-wrap { display: flex; flex-direction: column; min-width: 0; }
.topbar {
  height: 62px; background: #fff; border-bottom: 1px solid var(--border-soft);
  display: flex; align-items: center; padding: 0 22px; gap: 14px; flex: 0 0 62px;
}
.topbar .page-title { font-size: 16.5px; font-weight: 600; letter-spacing: .5px; }
.topbar .page-sub { font-size: 12px; color: var(--text-sub); margin-left: 4px; }
.topbar-spacer { flex: 1; }
.user-chip { display: flex; align-items: center; gap: 9px; cursor: pointer; padding: 6px 10px; border-radius: 8px; }
.user-chip:hover { background: #f4f6fa; }
.avatar {
  width: 32px; height: 32px; border-radius: 50%; color: #fff; font-size: 13px;
  background: linear-gradient(135deg, #3b7cf0, #1a5fd0);
  display: flex; align-items: center; justify-content: center; font-weight: 600;
}
.user-meta { line-height: 1.25; }
.user-meta strong { display: block; font-size: 13px; }
.user-meta span { font-size: 11px; color: var(--text-sub); }

.content { padding: 20px 22px 30px; overflow-y: auto; flex: 1; }

/* 通用卡片/工具条 */
.panel {
  background: #fff; border-radius: 10px; border: 1px solid var(--border-soft);
  box-shadow: 0 2px 10px rgba(23, 43, 77, .04);
}
.panel-pad { padding: 18px 20px; }
.panel-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 16px 20px; border-bottom: 1px solid var(--border-soft);
}
.panel-head h3 { margin: 0; font-size: 14.5px; font-weight: 600; }
.panel-head .sub { font-size: 12px; color: var(--text-sub); margin-top: 3px; }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.toolbar .spacer { flex: 1; }
.section-gap { margin-top: 16px; }
.muted { color: var(--text-sub); font-size: 12px; }
.mono { font-variant-numeric: tabular-nums; font-family: "SFMono-Regular", Consolas, monospace; }

/* 统计卡 */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.stat-card {
  background: #fff; border: 1px solid var(--border-soft); border-radius: 10px;
  padding: 16px 18px; display: flex; gap: 14px; align-items: flex-start;
  box-shadow: 0 2px 10px rgba(23, 43, 77, .04);
}
.stat-icon {
  width: 40px; height: 40px; border-radius: 10px; flex: 0 0 40px;
  display: flex; align-items: center; justify-content: center; font-size: 19px;
}
.tone-blue { background: #eaf1fd; color: #1a5fd0; }
.tone-green { background: #e7f7f1; color: #12936a; }
.tone-orange { background: #fdf3e3; color: #cf8a1e; }
.tone-purple { background: #f1ecfd; color: #6f4bd8; }
.stat-body { min-width: 0; }
.stat-label { font-size: 12.5px; color: var(--text-sub); }
.stat-value { font-size: 25px; font-weight: 700; line-height: 1.25; margin-top: 2px; font-variant-numeric: tabular-nums; }
.stat-value small { font-size: 12px; font-weight: 400; color: var(--text-sub); margin-left: 3px; }
.stat-hint { font-size: 11.5px; color: #93a1b5; margin-top: 4px; }

.chart-grid { display: grid; gap: 16px; }
.chart-grid.two { grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); }

/* 登录页 */
.login-wrap { min-height: 100vh; display: flex; background: #f4f6fa; }
.login-left {
  flex: 1.1; background: linear-gradient(150deg, #0d2140 0%, #173a67 55%, #1d4b86 100%);
  color: #fff; padding: 56px 60px; display: flex; flex-direction: column; justify-content: space-between;
  position: relative; overflow: hidden;
}
.login-left::after {
  content: ""; position: absolute; right: -120px; bottom: -160px; width: 460px; height: 460px;
  border-radius: 50%; background: radial-gradient(circle, rgba(76, 137, 240, .38), transparent 62%);
}
.login-brand { display: flex; align-items: center; gap: 12px; }
.login-brand .brand-mark { width: 42px; height: 42px; flex-basis: 42px; font-size: 17px; border-radius: 11px; }
.login-brand strong { font-size: 20px; letter-spacing: 3px; }
.login-brand span { display: block; font-size: 12px; color: #93aad0; margin-top: 2px; letter-spacing: 1px; }
.login-copy h1 { font-size: 30px; line-height: 1.45; margin: 0 0 16px; font-weight: 600; letter-spacing: 1px; }
.login-copy p { color: #a5bbd9; font-size: 13.5px; line-height: 1.9; margin: 0; max-width: 420px; }
.login-points { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.login-point {
  border: 1px solid rgba(255,255,255,.18); background: rgba(255,255,255,.06);
  border-radius: 999px; padding: 5px 13px; font-size: 12px; color: #d8e4f5;
}
.login-foot { font-size: 11.5px; color: #7d94b5; line-height: 1.8; }
.login-right { flex: 1; display: flex; align-items: center; justify-content: center; padding: 30px; }
.login-card { width: 100%; max-width: 386px; background: #fff; border-radius: 14px; padding: 34px 34px 28px; box-shadow: 0 18px 50px rgba(16, 38, 74, .1); }
.login-card h2 { margin: 0 0 6px; font-size: 21px; letter-spacing: 1px; }
.login-card .login-sub { color: var(--text-sub); font-size: 12.5px; margin-bottom: 24px; }
.login-card .el-button { width: 100%; height: 42px; font-size: 14px; letter-spacing: 2px; }
.login-tip { margin-top: 18px; background: #f7f9fc; border: 1px dashed #dbe3ee; border-radius: 8px; padding: 10px 12px; font-size: 11.5px; color: #6b7a90; line-height: 1.8; }

/* 表格与详情 */
.table-batch-bar {
  display: flex; align-items: center; gap: 10px; padding: 10px 16px;
  background: var(--primary-soft); border-radius: 8px; margin-bottom: 12px; font-size: 12.5px;
}
.detail-hero { display: flex; flex-wrap: wrap; gap: 18px; align-items: flex-start; }
.detail-hero h2 { margin: 0 0 6px; font-size: 20px; }
.tag-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.kv-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px 22px; margin-top: 14px; }
.kv label { display: block; font-size: 11.5px; color: var(--text-sub); margin-bottom: 3px; }
.kv div { font-size: 13.5px; }
.timeline-item { padding-bottom: 18px; }
.timeline-item .tl-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.timeline-item .tl-time { font-size: 11.5px; color: var(--text-sub); }
.timeline-item .tl-body { margin-top: 5px; font-size: 13px; line-height: 1.7; color: #33415a; }

.stage-flow { display: flex; flex-wrap: wrap; gap: 6px; }
.stage-chip {
  padding: 3px 10px; border-radius: 999px; font-size: 12px;
  background: #f1f4f9; color: #7688a2; border: 1px solid transparent;
}
.stage-chip.done { background: #eaf1fd; color: #1a5fd0; }
.stage-chip.current { background: #1a5fd0; color: #fff; }

.empty-block { padding: 46px 20px; text-align: center; color: #94a3b8; }
.empty-block .el-icon { font-size: 40px; margin-bottom: 10px; color: #c3cede; }
.empty-block p { margin: 0; font-size: 13px; }
.empty-block .sub { font-size: 12px; color: #a9b5c6; margin-top: 6px; }

.dev-placeholder {
  min-height: 420px; display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; gap: 12px; background: #fff; border: 1px dashed #d8e1ee; border-radius: 12px;
}
.dev-placeholder .badge {
  width: 72px; height: 72px; border-radius: 22px; background: #eef3fb; color: #1a5fd0;
  display: flex; align-items: center; justify-content: center; font-size: 32px;
}
.dev-placeholder h2 { margin: 6px 0 0; font-size: 20px; }
.dev-placeholder p { margin: 0; color: var(--text-sub); font-size: 13px; line-height: 1.9; max-width: 560px; }
.dev-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; width: min(860px, 100%); margin-top: 14px; }
.dev-cell { border: 1px solid var(--border-soft); border-radius: 9px; padding: 13px 15px; text-align: left; background: #fbfcfe; }
.dev-cell strong { display: block; font-size: 13px; margin-bottom: 4px; }
.dev-cell span { font-size: 11.5px; color: var(--text-sub); line-height: 1.7; }

.form-tip { font-size: 11.5px; color: #93a1b5; margin-top: 4px; line-height: 1.7; }
.pagination-bar { display: flex; justify-content: flex-end; padding: 14px 20px 6px; }
.el-table th.el-table__cell { background: #f8fafd; color: #4a5a72; font-weight: 600; font-size: 12.5px; }
.el-table .cell { font-size: 13px; }
.el-dialog__header { border-bottom: 1px solid var(--border-soft); margin-right: 0; padding-bottom: 14px; }
.el-dialog__body { padding-top: 18px; }

@media (max-width: 900px) {
  .login-left { display: none; }
  .sidebar { width: 64px; }
  .brand-text, .menu-group-title, .menu-item span, .sidebar-foot { display: none; }
  .menu-item { justify-content: center; padding: 11px 0; }
  .content { padding: 14px; }
  .chart-grid.two { grid-template-columns: 1fr; }
}
