/* 招标线索监控后台样式：中性灰 + 深青蓝主色，克制简洁 */
:root {
  --bg: #f3f5f7;
  --panel: #ffffff;
  --border: #e2e7ec;
  --text: #1f2a33;
  --text-muted: #6b7a86;
  --primary: #1f6f78;
  --primary-dark: #175a62;
  --danger: #b23b3b;
  --success: #2c7a52;
  --warning: #9a6a1f;
  --shadow: 0 1px 3px rgba(20, 40, 50, 0.08);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.6;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------------- 布局 ---------------- */
.layout { display: flex; min-height: 100vh; }

.sidebar {
  width: 224px;
  background: #22303a;
  color: #d8e1e6;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}
.brand { padding: 22px 20px 16px; border-bottom: 1px solid #33454f; }
.brand-title { font-size: 16px; font-weight: 700; color: #fff; }
.brand-sub { font-size: 12px; color: #93a7b1; margin-top: 2px; }

.nav { padding: 12px 0; flex: 1; }
.nav-item {
  display: block;
  padding: 10px 20px;
  color: #c3d2d9;
  border-left: 3px solid transparent;
}
.nav-item:hover { background: #2b3d47; text-decoration: none; color: #fff; }
.nav-item.active { background: #2b3d47; border-left-color: var(--primary); color: #fff; }

.sidebar-footer { padding: 14px 20px; border-top: 1px solid #33454f; }
.user-name { color: #fff; font-weight: 600; margin-bottom: 4px; }
.link-muted { color: #93a7b1; font-size: 12px; }
.inline-form { margin: 4px 0 0; }
.btn-link {
  background: none; border: none; color: #93a7b1; cursor: pointer;
  padding: 0; font-size: 12px;
}
.btn-link:hover { color: #fff; }

.main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.topbar {
  background: var(--panel);
  border-bottom: 1px solid var(--border);
  padding: 16px 28px;
  display: flex; align-items: center; justify-content: space-between;
}
.page-title { font-size: 18px; margin: 0; font-weight: 700; }
.content { padding: 24px 28px; }

/* ---------------- 卡片与栅格 ---------------- */
.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 20px;
  margin-bottom: 20px;
}
.card.narrow { max-width: 520px; }
.card-title { font-size: 15px; margin: 0 0 14px; font-weight: 700; }

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}
.stat-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 18px;
  box-shadow: var(--shadow);
}
.stat-label { color: var(--text-muted); font-size: 13px; }
.stat-value { font-size: 28px; font-weight: 700; margin-top: 6px; }

/* ---------------- 表格 ---------------- */
.table { width: 100%; border-collapse: collapse; }
.table th, .table td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.table th { color: var(--text-muted); font-weight: 600; background: #f8fafb; }
.table tr:last-child td { border-bottom: none; }
.nowrap { white-space: nowrap; }

/* ---------------- 表单 ---------------- */
.form-stack { display: flex; flex-direction: column; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field span { font-size: 13px; color: var(--text-muted); }
.field input, .field select, .field textarea {
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 9px 10px;
  font-size: 14px;
  font-family: inherit;
  background: #fff;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--primary);
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-actions { display: flex; gap: 10px; margin-top: 6px; }
.checkbox-inline { flex-direction: row; align-items: center; gap: 8px; }
.checkbox-inline input { width: auto; }

.btn-primary, .btn-secondary {
  border: none; border-radius: 6px; padding: 9px 18px;
  font-size: 14px; cursor: pointer; font-family: inherit;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-secondary {
  background: #fff; color: var(--text);
  border: 1px solid var(--border);
}
.btn-secondary:hover { border-color: var(--primary); color: var(--primary); }
.btn-block { width: 100%; }
.btn-danger { background: var(--danger); color: #fff; border: none; border-radius: 6px; padding: 8px 14px; cursor: pointer; }

/* ---------------- 提示 ---------------- */
.flash-stack { padding: 0 28px; }
.flash {
  padding: 10px 14px; border-radius: 6px; margin: 12px 0; font-size: 13px;
}
.flash-success { background: #e9f4ee; color: var(--success); border: 1px solid #c6e3d3; }
.flash-error { background: #fbeeee; color: var(--danger); border: 1px solid #f0cfcf; }

.badge {
  display: inline-block; padding: 2px 10px; border-radius: 12px; font-size: 12px;
}
.badge-success, .badge-active, .badge-sent { background: #e9f4ee; color: var(--success); }
.badge-running, .badge-pending_review, .badge-normal { background: #fdf3e3; color: var(--warning); }
.badge-failed, .badge-archived { background: #f1f3f5; color: var(--text-muted); }
.badge-high { background: #fbeeee; color: var(--danger); }

.muted { color: var(--text-muted); }
.text-error { color: var(--danger); }

/* ---------------- 登录页 ---------------- */
.login-body {
  background: linear-gradient(160deg, #22303a, #2f4650);
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
}
.login-card {
  background: #fff; border-radius: 10px; padding: 34px 30px;
  width: 360px; box-shadow: 0 10px 30px rgba(0,0,0,0.25);
}
.brand-center { text-align: center; margin-bottom: 22px; }
.brand-center .brand-title { color: var(--text); font-size: 20px; }
.login-form { display: flex; flex-direction: column; gap: 14px; margin-top: 16px; }
.login-hint { margin-top: 16px; font-size: 12px; color: var(--text-muted); text-align: center; }
.error-message { font-size: 15px; margin-bottom: 18px; }

/* ---------------- 工具条 ---------------- */
.filter-bar {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: end;
  margin-bottom: 16px;
}
.filter-bar .field { min-width: 150px; }
.pagination { margin-top: 16px; display: flex; gap: 8px; align-items: center; }
