/* ======== 基础重置 ======== */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --primary: #FF6700;
  --primary-light: #FFF3E8;
  --primary-dark: #E55A00;
  --bg: #F5F5F5;
  --card: #FFFFFF;
  --text-1: #1A1A1A;
  --text-2: #666666;
  --text-3: #999999;
  --text-4: #CCCCCC;
  --border: #EAEAEA;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 2px 12px rgba(0,0,0,0.06);
  --shadow-hover: 0 4px 20px rgba(0,0,0,0.10);
  --green: #00B578;
  --green-light: #E8F8F0;
  --orange: #FF9500;
  --orange-light: #FFF4E5;
  --red: #FA5151;
  --red-light: #FEF0F0;
  --blue: #4A90D9;
  --blue-light: #EBF3FB;
  --gray: #999999;
  --gray-light: #F5F5F5;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", sans-serif;
  background: var(--bg);
  color: var(--text-1);
  line-height: 1.6;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

button { cursor: pointer; border: none; outline: none; font-family: inherit; font-size: inherit; }
input, select, textarea { font-family: inherit; font-size: inherit; outline: none; }

/* ======== 顶部导航 ======== */
.top-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
  padding: 0 32px;
  background: var(--card);
  border-bottom: 1px solid var(--border);
}
.nav-left { display: flex; align-items: center; }
.logo {
  font-size: 18px;
  font-weight: 600;
  color: var(--primary);
  letter-spacing: 1px;
}
.nav-tabs {
  display: flex;
  gap: 4px;
}
.nav-tab {
  padding: 8px 24px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  color: var(--text-2);
  background: transparent;
  transition: all 0.2s;
}
.nav-tab:hover { color: var(--text-1); background: var(--gray-light); }
.nav-tab.active {
  color: var(--primary);
  background: var(--primary-light);
  font-weight: 600;
}
.nav-right { display: flex; align-items: center; }
.user-badge {
  font-size: 13px;
  color: var(--text-2);
  padding: 6px 16px;
  background: var(--gray-light);
  border-radius: 20px;
}

/* ======== 视图容器 ======== */
.view { display: none; padding: 24px 32px; max-width: 1240px; margin: 0 auto; }
.view.active { display: block; }

/* ======== 页面头部 ======== */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}
.page-title {
  font-size: 22px;
  font-weight: 600;
  color: var(--text-1);
  margin-bottom: 4px;
}
.page-date {
  font-size: 13px;
  color: var(--text-3);
}

/* ======== 统计行 ======== */
.stat-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 28px;
}
.stat-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  text-align: center;
}
.stat-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-1);
  line-height: 1.2;
}
.stat-label {
  font-size: 13px;
  color: var(--text-3);
  margin-top: 6px;
}
.stat-card.warn .stat-value { color: var(--orange); }
.stat-card.danger .stat-value { color: var(--red); }
.stat-card.success .stat-value { color: var(--green); }
.stat-card.primary .stat-value { color: var(--primary); }

/* ======== 区块标签 ======== */
.section-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-1);
}
.section-count {
  font-size: 13px;
  color: var(--text-3);
  font-weight: 400;
}

/* ======== 任务卡片 ======== */
.task-list { display: flex; flex-direction: column; gap: 10px; }

.task-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--card);
  border-radius: var(--radius);
  padding: 16px 20px;
  box-shadow: var(--shadow);
  transition: box-shadow 0.2s, transform 0.15s;
  cursor: pointer;
  border-left: 4px solid transparent;
}
.task-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-1px); }
.task-card.overdue { border-left-color: var(--red); }
.task-card.priority-a { border-left-color: var(--red); }
.task-card.priority-b { border-left-color: var(--orange); }
.task-card.priority-c { border-left-color: var(--blue); }
.task-card.priority-d { border-left-color: var(--border); }

.task-info { display: flex; align-items: center; gap: 14px; flex: 1; }
.task-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-1);
}
.task-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text-3);
}
.task-tag {
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
}
.task-overdue-badge {
  color: var(--red);
  font-weight: 600;
  font-size: 13px;
}

.task-actions { display: flex; gap: 8px; }

/* ======== 级别徽章 ======== */
.badge-level {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}
.badge-level-a { background: var(--red-light); color: var(--red); }
.badge-level-b { background: var(--orange-light); color: var(--orange); }
.badge-level-c { background: var(--blue-light); color: var(--blue); }
.badge-level-d { background: var(--gray-light); color: var(--gray); }

/* ======== 状态徽章 ======== */
.badge-status {
  display: inline-block;
  padding: 3px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
}
.badge-status-new { background: var(--green-light); color: var(--green); }
.badge-status-noshow { background: var(--orange-light); color: var(--orange); }
.badge-status-noclose { background: #fce7f3; color: #db2777; }
.badge-status-booked { background: #dbeafe; color: #2563eb; }
.badge-status-arrived { background: #ccfbf1; color: #0d9488; }
.badge-status-closed { background: var(--primary-light); color: var(--primary); }

/* ======== 状态流转步骤条 ======== */
.status-flow-card {
  margin-top: 16px;
  padding: 16px;
  background: var(--gray-light);
  border-radius: 12px;
}
.status-flow-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-3);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.status-steps { display: flex; align-items: flex-start; }
.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 56px;
}
.step-circle {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--card);
  border: 1.5px solid var(--border);
  color: var(--text-3);
  font-size: 13px;
  font-weight: 600;
  transition: all 0.2s;
}
.step.active .step-circle { background: var(--primary); border-color: var(--primary); color: #fff; }
.step.done .step-circle { background: var(--green); border-color: var(--green); color: #fff; }
.step-label { font-size: 12px; color: var(--text-3); white-space: nowrap; }
.step.active .step-label { color: var(--primary); font-weight: 600; }
.step.done .step-label { color: var(--green); }
.step-line {
  flex: 1;
  height: 2px;
  background: var(--border);
  margin: 13px 6px 0;
  min-width: 14px;
}
.step-line.done { background: var(--green); }
.status-flow-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  flex-wrap: wrap;
}
.statusflow-info { font-size: 13px; color: var(--text-2); font-weight: 500; }
.statusflow-branch { font-size: 12px; color: var(--orange); margin-left: 8px; }
.required-tip { font-size: 12px; color: var(--text-3); font-weight: 400; }

/* ======== 按钮 ======== */
.btn-primary {
  padding: 8px 20px;
  border-radius: var(--radius-sm);
  background: var(--primary);
  color: white;
  font-size: 14px;
  font-weight: 500;
  transition: background 0.2s;
}
.btn-primary:hover { background: var(--primary-dark); }

.btn-secondary {
  padding: 8px 20px;
  border-radius: var(--radius-sm);
  background: var(--gray-light);
  color: var(--text-2);
  font-size: 14px;
  font-weight: 500;
  transition: background 0.2s;
}
.btn-secondary:hover { background: var(--border); }

.btn-small {
  padding: 6px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.2s;
}
.btn-small.primary { background: var(--primary); color: white; }
.btn-small.primary:hover { background: var(--primary-dark); }
.btn-small.outline { background: transparent; border: 1px solid var(--border); color: var(--text-2); }
.btn-small.outline:hover { border-color: var(--primary); color: var(--primary); }

.btn-text {
  background: transparent;
  color: var(--text-2);
  font-size: 14px;
  padding: 4px 8px;
}
.btn-text:hover { color: var(--primary); }

/* ======== 筛选栏 ======== */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.search-box { flex: 0 0 280px; }
.search-box input {
  width: 100%;
  padding: 10px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  background: var(--card);
  transition: border-color 0.2s;
}
.search-box input:focus { border-color: var(--primary); }

.chip-group { display: flex; gap: 6px; }
.chip {
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 13px;
  color: var(--text-2);
  background: var(--card);
  border: 1px solid var(--border);
  transition: all 0.2s;
}
.chip:hover { border-color: var(--primary); color: var(--primary); }
.chip.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

/* ======== 客户列表 ======== */
.customer-list { display: flex; flex-direction: column; gap: 8px; }

.customer-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--card);
  border-radius: var(--radius);
  padding: 14px 20px;
  box-shadow: var(--shadow);
  transition: box-shadow 0.2s;
  cursor: pointer;
}
.customer-card:hover { box-shadow: var(--shadow-hover); }

.customer-info { display: flex; align-items: center; gap: 14px; }
.customer-name { font-size: 15px; font-weight: 600; color: var(--text-1); }
.customer-meta { display: flex; gap: 10px; font-size: 13px; color: var(--text-3); align-items: center; }

.customer-right { display: flex; align-items: center; gap: 12px; }
.customer-btns { display: flex; gap: 8px; }
.customer-next { font-size: 13px; color: var(--text-3); }
.customer-next.overdue { color: var(--red); font-weight: 600; }

/* ======== 客户详情 ======== */
.detail-back { margin-bottom: 16px; }

.detail-profile {
  background: var(--card);
  border-radius: var(--radius);
  padding: 28px 32px;
  box-shadow: var(--shadow);
  margin-bottom: 20px;
}
.detail-name-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}
.detail-name { font-size: 24px; font-weight: 700; color: var(--text-1); }

.detail-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.detail-field-label { font-size: 13px; color: var(--text-3); margin-bottom: 6px; }
.detail-field-value { font-size: 15px; color: var(--text-1); font-weight: 500; }

.detail-level-change {
  display: flex;
  gap: 6px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}
.level-btn {
  padding: 6px 18px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  border: 2px solid var(--border);
  background: var(--card);
  color: var(--text-2);
  transition: all 0.2s;
}
.level-btn:hover { border-color: var(--primary); color: var(--primary); }
.level-btn.active { background: var(--primary); border-color: var(--primary); color: white; }

/* ======== 详情页两栏布局 ======== */
.detail-layout {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}
.detail-left { flex: 1; min-width: 0; }
.detail-right { width: 360px; flex-shrink: 0; }

/* ======== 回访计划面板 ======== */
.plan-panel {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  position: sticky;
  top: 76px;
}
.plan-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}
.plan-panel-title { font-size: 16px; font-weight: 600; color: var(--text-1); }
.plan-progress {
  font-size: 12px;
  color: var(--primary);
  background: var(--primary-light);
  padding: 3px 12px;
  border-radius: 20px;
  font-weight: 600;
}
/* 节奏总览条：1/3/7/15/30/45/60 自动节点状态 */
.plan-rhythm {
  display: flex;
  gap: 2px;
  padding: 10px 16px 8px;
  border-bottom: 1px solid var(--border);
  background: var(--gray-light);
  flex-wrap: wrap;
  justify-content: space-between;
}
.rhythm-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  width: 30px;
  cursor: default;
  user-select: none;
}
.rhythm-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  line-height: 1;
}
.rhythm-txt { font-size: 10px; color: var(--text-3); }
.rhythm-done .rhythm-dot { background: var(--green); }
.rhythm-done .rhythm-txt { color: var(--green); font-weight: 600; }
.rhythm-overdue .rhythm-dot { background: var(--red); }
.rhythm-overdue .rhythm-txt { color: var(--red); font-weight: 600; }
.rhythm-today .rhythm-dot { background: var(--primary); }
.rhythm-today .rhythm-txt { color: var(--primary); font-weight: 600; }
.rhythm-future .rhythm-dot { background: #DCDCDC; }

.plan-list { max-height: 380px; overflow-y: auto; }

.plan-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
}
.plan-item:last-child { border-bottom: none; }
.plan-item.overdue { background: var(--red-light); }
.plan-item.today { background: var(--primary-light); }

.plan-date-col { width: 76px; flex-shrink: 0; }
.plan-date-day { font-size: 15px; font-weight: 700; color: var(--text-1); }
.plan-date-week { font-size: 11px; color: var(--text-3); }
.plan-item.overdue .plan-date-day { color: var(--red); }

.plan-info { flex: 1; min-width: 0; }
.plan-label { font-size: 13px; font-weight: 600; color: var(--text-1); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.plan-meta { font-size: 12px; margin-top: 2px; }
.plan-overdue-label { color: var(--red); font-weight: 600; font-size: 12px; }
.plan-today-label { color: var(--primary); font-weight: 600; font-size: 12px; }

.plan-tag {
  font-size: 11px;
  padding: 1px 8px;
  border-radius: 20px;
  font-weight: 500;
}
.plan-tag-auto { background: var(--gray-light); color: var(--text-3); }
.plan-tag-manual { background: var(--blue-light); color: var(--blue); }

.plan-actions { flex-shrink: 0; }
.plan-empty { text-align: center; padding: 24px 20px; color: var(--text-3); font-size: 13px; }

/* 已完成折叠区 */
.plan-collapse-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  font-size: 13px;
  color: var(--text-2);
  background: var(--gray-light);
  border-top: 1px solid var(--border);
  cursor: pointer;
  user-select: none;
  transition: color 0.15s;
}
.plan-collapse-header:hover { color: var(--primary); }
.plan-collapse-arrow { font-size: 14px; transition: transform 0.2s; }

.plan-done-list { max-height: 340px; overflow-y: auto; }
.plan-done-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 20px;
  border-bottom: 1px solid var(--border);
}
.plan-done-item:last-child { border-bottom: none; }
.plan-done-date { font-size: 12px; color: var(--text-3); flex-shrink: 0; width: 64px; padding-top: 2px; }
.plan-done-body { flex: 1; min-width: 0; }
.plan-done-label { font-size: 13px; font-weight: 600; color: var(--text-1); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.plan-done-notes {
  font-size: 12px;
  color: var(--text-2);
  margin-top: 3px;
  background: var(--gray-light);
  border-radius: 8px;
  padding: 5px 10px;
  line-height: 1.5;
}
.plan-done-operator { font-size: 11px; color: var(--text-3); margin-top: 3px; }

/* 已完成记录 · 结果徽章 + 回访方式 */
.plan-result-badge {
  font-size: 11px;
  padding: 1px 9px;
  border-radius: 20px;
  font-weight: 600;
  white-space: nowrap;
}
.plan-result-badge.effective { background: var(--green-light); color: var(--green); }
.plan-result-badge.ineffective { background: var(--orange-light); color: var(--orange); }
.plan-method-chip {
  font-size: 11px;
  padding: 1px 9px;
  border-radius: 20px;
  background: var(--blue-light);
  color: var(--blue);
  font-weight: 500;
  white-space: nowrap;
}

/* 手动添加计划 */
.plan-add-bar { padding: 14px 20px; border-top: 1px solid var(--border); }
.plan-add-btn {
  width: 100%;
  padding: 10px;
  border: 1.5px dashed var(--border);
  border-radius: var(--radius-sm);
  background: var(--card);
  color: var(--text-2);
  font-size: 14px;
  transition: all 0.2s;
}
.plan-add-btn:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }

/* 客户列表 · 计划进度标签 */
.plan-progress-tag {
  font-size: 12px;
  color: var(--blue);
  background: var(--blue-light);
  padding: 2px 10px;
  border-radius: 20px;
}

/* ======== 时间线 ======== */
.timeline-section {
  background: var(--card);
  border-radius: var(--radius);
  padding: 24px 32px;
  box-shadow: var(--shadow);
}
.timeline-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.timeline-item {
  display: flex;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.timeline-item:last-child { border-bottom: none; }

.timeline-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-top: 6px;
  flex-shrink: 0;
}
.timeline-dot.effective { background: var(--green); }
.timeline-dot.ineffective { background: var(--orange); }
.timeline-dot.noanswer { background: var(--text-4); }
.timeline-dot.rescheduled { background: var(--blue); }
.timeline-dot.closed { background: var(--primary); }
.timeline-dot.rejected { background: var(--red); }

.timeline-content { flex: 1; }
.timeline-date { font-size: 13px; color: var(--text-3); margin-bottom: 2px; }
.timeline-result { font-size: 14px; font-weight: 600; color: var(--text-1); margin-bottom: 2px; }
.timeline-method { font-size: 13px; color: var(--text-2); }
.timeline-notes { font-size: 13px; color: var(--text-2); margin-top: 4px; padding: 8px 12px; background: var(--gray-light); border-radius: 8px; }

/* ======== 弹窗 ======== */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}
.modal-box {
  background: var(--card);
  border-radius: var(--radius);
  width: 480px;
  max-height: 85vh;
  overflow-y: auto;
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}
.modal-header h3 { font-size: 18px; font-weight: 600; }
.btn-close {
  background: transparent;
  font-size: 24px;
  color: var(--text-3);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.btn-close:hover { background: var(--gray-light); color: var(--text-1); }

.modal-body { padding: 20px 24px; }
.modal-customer-name {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-1);
  margin-bottom: 20px;
  padding: 12px 16px;
  background: var(--primary-light);
  border-radius: var(--radius-sm);
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 24px;
  border-top: 1px solid var(--border);
}

/* ======== 表单 ======== */
.form-label {
  font-size: 14px;
  color: var(--text-2);
  margin-bottom: 8px;
  margin-top: 16px;
}
.form-label:first-child { margin-top: 0; }

.form-input, .form-select {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  background: var(--card);
  color: var(--text-1);
  transition: border-color 0.2s;
}
.form-input:focus, .form-select:focus { border-color: var(--primary); }

.form-textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  resize: none;
  background: var(--card);
  color: var(--text-1);
  transition: border-color 0.2s;
}
.form-textarea:focus { border-color: var(--primary); }

.option-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.option-btn {
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text-2);
  font-size: 13px;
  transition: all 0.2s;
}
.option-btn:hover { border-color: var(--primary); color: var(--primary); }
.option-btn.selected {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

/* ======== 统计页 ======== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
.stat-block {
  background: var(--card);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}
.stat-block-title { font-size: 14px; color: var(--text-3); margin-bottom: 12px; }
.stat-block-value { font-size: 36px; font-weight: 700; color: var(--text-1); }
.stat-block-unit { font-size: 16px; color: var(--text-3); font-weight: 400; margin-left: 4px; }

.progress-bar {
  height: 8px;
  background: var(--gray-light);
  border-radius: 4px;
  overflow: hidden;
  margin-top: 12px;
}
.progress-fill {
  height: 100%;
  background: var(--primary);
  border-radius: 4px;
  transition: width 0.3s;
}

/* ======== 空状态 ======== */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-3);
}
.empty-state-icon { font-size: 40px; margin-bottom: 12px; }
.empty-state-text { font-size: 15px; }

/* ======== 登录页 ======== */
#login-screen {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}
.login-card {
  width: 400px;
  background: var(--card);
  border-radius: var(--radius);
  padding: 40px 36px 28px;
  box-shadow: var(--shadow);
  text-align: center;
}
.login-logo {
  font-size: 26px;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 2px;
}
.login-sub {
  font-size: 13px;
  color: var(--text-3);
  margin: 6px 0 28px;
}
.login-card .form-label { text-align: left; }
.login-btn {
  width: 100%;
  padding: 12px;
  font-size: 16px;
  border-radius: var(--radius-sm);
  margin-top: 24px;
}
.login-error {
  color: var(--red);
  font-size: 13px;
  min-height: 20px;
  margin-top: 10px;
  text-align: left;
}
.login-demo-toggle {
  margin-top: 18px;
  font-size: 13px;
  color: var(--text-3);
  cursor: pointer;
  padding: 8px;
  border-top: 1px solid var(--border);
}
.login-demo-toggle:hover { color: var(--primary); }
.login-demo-panel { margin-top: 12px; text-align: left; }
.demo-account-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s;
}
.demo-account-item:hover { background: var(--primary-light); }
.demo-account-name { font-size: 13px; color: var(--text-1); font-weight: 500; }
.demo-account-info { font-size: 12px; color: var(--text-3); }
.login-demo-tip {
  margin-top: 10px;
  font-size: 12px;
  color: var(--text-4);
  text-align: center;
}
.btn-logout {
  margin-left: 10px;
  font-size: 13px;
  color: var(--text-3);
  background: transparent;
  padding: 4px 8px;
  border-radius: 6px;
  transition: all 0.2s;
}
.btn-logout:hover { color: var(--red); background: var(--red-light); }

/* ======== 主管端：团队卡片 ======== */
.team-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
.team-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 20px 24px;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: box-shadow 0.2s, transform 0.15s;
  border: 1px solid transparent;
}
.team-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-1px); }
.team-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.team-card-name { font-size: 17px; font-weight: 600; color: var(--text-1); }
.team-card-group { font-size: 12px; color: var(--text-3); background: var(--gray-light); padding: 3px 10px; border-radius: 20px; }
.team-card-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  text-align: center;
}
.tcs-value { font-size: 22px; font-weight: 700; color: var(--text-1); line-height: 1.2; }
.tcs-label { font-size: 12px; color: var(--text-3); margin-top: 3px; }
.tcs-value.danger { color: var(--red); }
.tcs-value.success { color: var(--green); }
.tcs-value.primary { color: var(--primary); }
.team-card-alert {
  margin-top: 14px;
  font-size: 12px;
  color: var(--red);
  background: var(--red-light);
  padding: 6px 12px;
  border-radius: 8px;
}
.team-card-ok {
  margin-top: 14px;
  font-size: 12px;
  color: var(--green);
}

/* ======== 主管端：下钻视图 ======== */
.drill-header {
  background: var(--card);
  border-radius: var(--radius);
  padding: 24px 32px;
  box-shadow: var(--shadow);
  margin-bottom: 20px;
}
.drill-name-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}
.drill-name { font-size: 22px; font-weight: 700; }
.drill-stats-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}
.drill-section-title {
  font-size: 15px;
  font-weight: 600;
  margin: 24px 0 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.owner-tag {
  font-size: 12px;
  color: var(--primary);
  background: var(--primary-light);
  padding: 2px 10px;
  border-radius: 20px;
  font-weight: 500;
}

/* ======== 主管端：预警列表 ======== */
.alert-list { display: flex; flex-direction: column; gap: 10px; }
.alert-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--card);
  border-radius: var(--radius);
  padding: 14px 20px;
  box-shadow: var(--shadow);
  cursor: pointer;
  border-left: 4px solid var(--red);
  transition: box-shadow 0.2s;
}
.alert-card:hover { box-shadow: var(--shadow-hover); }
.alert-days {
  font-size: 18px;
  font-weight: 700;
  color: var(--red);
  flex-shrink: 0;
  width: 90px;
  text-align: center;
}

/* ======== 调配弹窗 ======== */
.form-static {
  padding: 10px 14px;
  background: var(--gray-light);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--text-1);
  font-weight: 500;
}

/* ======== 工具类 ======== */
.text-green { color: var(--green); }
.text-red { color: var(--red); }
.text-orange { color: var(--orange); }
.flex-row { display: flex; align-items: center; gap: 10px; }

/* ======== 月份选择器 ======== */
.month-picker {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}
.month-nav-btn {
  width: 32px; height: 32px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--card-bg);
  color: var(--text-1);
  font-size: 14px;
  cursor: pointer;
  line-height: 1;
}
.month-nav-btn:hover { border-color: var(--primary); color: var(--primary); }
.month-display {
  font-size: 18px; font-weight: 700;
  color: var(--text-1);
  min-width: 110px;
  text-align: center;
}
.month-now-btn {
  height: 32px; padding: 0 14px;
  border-radius: 8px;
  border: 1px solid var(--primary);
  color: var(--primary);
  background: transparent;
  font-size: 13px;
  cursor: pointer;
}
.month-now-btn:hover { background: rgba(255, 103, 0, 0.08); }

/* ======== 定金标识 ======== */
.deposit-badge {
  display: inline-flex; align-items: center; gap: 4px;
  background: #FFF3E6;
  color: #C2410C;
  border: 1px solid #FFD8B0;
  border-radius: 20px;
  padding: 2px 10px;
  font-size: 12px; font-weight: 600;
  white-space: nowrap;
}
.deposit-tag {
  display: inline-block;
  background: #FFF3E6;
  color: #C2410C;
  border-radius: 6px;
  padding: 1px 8px;
  font-size: 12px; font-weight: 600;
  white-space: nowrap;
}
.deposit-btn { border-color: #FFB36B !important; color: #C2410C !important; }
.deposit-danger { border-color: #F0B4B6 !important; color: var(--red) !important; }
.deposit-clear-btn { color: var(--red) !important; border-color: #F0B4B6 !important; }
.status-flow-deposit-row {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--border);
}
.status-flow-deposit-title {
  font-size: 12px;
  color: var(--text-3);
  margin-bottom: 8px;
}
.statusflow-deposit {
  display: flex; align-items: center; gap: 8px;
  flex-wrap: wrap;
}
.statusflow-info-inline { font-size: 12px; color: var(--text-3); }

/* ======== 统计：本月重点关注四大板块 ======== */
.focus-section-title {
  font-size: 15px; font-weight: 700;
  color: var(--text-1);
  margin: 24px 0 12px;
}
.focus-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.focus-block {
  background: var(--card-bg);
  border-radius: 14px;
  border: 1px solid var(--border);
  overflow: hidden;
  display: flex; flex-direction: column;
}
.focus-block.blue { border-top: 3px solid #4A90E2; }
.focus-block.green { border-top: 3px solid #34A853; }
.focus-block.orange { border-top: 3px solid #FF8A00; }
.focus-block.red { border-top: 3px solid #E5484D; }
.focus-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}
.focus-title { font-size: 14px; font-weight: 700; color: var(--text-1); }
.focus-num { font-size: 24px; font-weight: 800; }
.focus-num span { font-size: 12px; font-weight: 400; color: var(--text-3); margin-left: 2px; }
.focus-block.blue .focus-num { color: #4A90E2; }
.focus-block.green .focus-num { color: #34A853; }
.focus-block.orange .focus-num { color: #FF8A00; }
.focus-block.red .focus-num { color: #E5484D; }
.focus-list { max-height: 264px; overflow-y: auto; padding: 6px 0; }
.focus-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 16px;
  cursor: pointer;
  font-size: 13px;
}
.focus-item:hover { background: var(--gray-light); }
.focus-item-name {
  font-weight: 600; color: var(--text-1);
  white-space: nowrap;
  display: flex; align-items: center;
}
.focus-item-tag {
  display: inline-block;
  border-radius: 4px;
  padding: 0 5px;
  font-size: 11px; font-weight: 700;
  margin-left: 5px;
  line-height: 16px;
}
.focus-item-sub {
  color: var(--text-3); font-size: 12px;
  flex: 1;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.focus-item-warn { color: #E5484D; font-size: 12px; font-weight: 600; flex-shrink: 0; }
.focus-item-today { color: var(--primary); font-size: 12px; font-weight: 600; flex-shrink: 0; }
.focus-item-follow {
  flex-shrink: 0;
  border: 1px solid var(--primary);
  color: var(--primary);
  background: transparent;
  border-radius: 6px;
  padding: 2px 10px;
  font-size: 12px;
  cursor: pointer;
}
.focus-item-follow:hover { background: rgba(255, 103, 0, 0.08); }
.focus-empty { padding: 24px; text-align: center; color: var(--text-3); font-size: 13px; }

/* ======== 正式版：同步状态 / 修改密码 / 模式标识 ======== */
.sync-status {
  font-size: 12px;
  color: var(--green);
  background: rgba(52, 168, 83, 0.08);
  border-radius: 12px;
  padding: 3px 10px;
  white-space: nowrap;
}
.sync-status.sync-error {
  color: var(--red);
  background: rgba(229, 72, 77, 0.08);
}
.btn-changepw {
  height: 30px;
  padding: 0 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-2);
  font-size: 13px;
  cursor: pointer;
}
.btn-changepw:hover { border-color: var(--primary); color: var(--primary); }
.login-mode-tag {
  margin-top: 14px;
  font-size: 12px;
  color: var(--text-3);
  text-align: center;
}