/* 镜我系统 v2.0 — 全站样式（深色调，移动端优先） */

* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #16181d;
  --card-bg: #1f232b;
  --card-border: #2e3440;
  --text: #e6e6e6;
  --text-dim: #9aa3b2;
  --accent: #4a9eff;
  --green: #2e8b57;
  --yellow: #b8860b;
  --red: #b03030;
}

body {
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 18px;
  line-height: 1.6;
  padding: 16px;
  padding-bottom: 140px; /* 给底部输入区留空间 */
}

a { color: var(--accent); text-decoration: none; }
a.back-link { display: inline-block; margin-bottom: 16px; font-size: 18px; padding: 8px 0; }

/* ---------- 顶部导航栏（四页统一） ---------- */
.top-nav {
  display: flex;
  justify-content: center;
  gap: 8px;               /* 5 个入口在手机端也能一行放下 */
  margin: 6px 0 18px;
}
.top-nav a {
  font-size: 16px;
  color: var(--text-dim);
  padding: 10px 6px;      /* 扩大手指点按区域 */
  border-radius: 8px;
}
.top-nav a:active { background: #2a3038; }

h1 { font-size: 26px; margin-bottom: 4px; }
.subtitle { color: var(--text-dim); font-size: 15px; margin-bottom: 20px; }

/* ---------- 首页：状态区 ---------- */
.status-block {
  width: 100%;
  min-height: 90px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  font-size: 40px;
  font-weight: bold;
  border: 2px solid transparent;
  margin-bottom: 8px;
}
.status-绿 { background: var(--green); color: #eafff2; }
.status-黄 { background: var(--yellow); color: #fff8e1; }
.status-红 { background: var(--red); color: #ffeaea; }
.status-未知 { background: var(--card-bg); color: var(--text-dim); }

.salary-line { color: var(--text-dim); font-size: 15px; text-align: center; margin-bottom: 20px; }

.stats-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-bottom: 24px;
}
.stat-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 16px 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}
.stat-label { color: var(--text-dim); font-size: 15px; }
.stat-value { font-size: 30px; font-weight: bold; margin-top: 4px; }

/* ---------- 首页：AI 每日洞察（合伙人建议卡片） ---------- */
.insight-card {
  background: #0f1620;                 /* 深色底 */
  border: 1px solid #1d3550;
  border-left: 4px solid var(--accent);
  border-radius: 12px;
  padding: 16px 18px;
  margin-bottom: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
}
.insight-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.insight-label { color: #7fb6e8; font-size: 14px; letter-spacing: 1px; }
.insight-day { color: #4f6a86; font-size: 12px; }
.insight-text { color: #a9d3f5; font-size: 17px; line-height: 1.7; }

/* ---------- 卡片通用 ---------- */
.card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 18px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  margin-bottom: 16px;
}
.card-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.card-title { font-size: 22px; font-weight: bold; }
.status-badge {
  font-size: 14px;
  padding: 4px 12px;
  border-radius: 999px;
  background: #2a3038;
  color: var(--text-dim);
}
.status-badge.活跃 { background: rgba(46, 139, 87, 0.25); color: #7fd6a4; }
.status-badge.维护中 { background: rgba(184, 134, 11, 0.25); color: #e5c36a; }
.status-badge.暂停, .status-badge.卡住 { background: rgba(176, 48, 48, 0.25); color: #e58a8a; }

.kv-row { display: flex; justify-content: space-between; font-size: 17px; padding: 4px 0; }
.kv-key { color: var(--text-dim); }
.kv-value { font-weight: bold; }

.checkins-highlight {
  font-size: 28px;
  font-weight: bold;
  color: var(--accent);
  text-align: center;
  padding: 10px 0 4px;
}
.checkins-label { color: var(--text-dim); font-size: 14px; text-align: center; }

/* ---------- 债务还款进度 ---------- */
.repay-remaining {
  font-size: 32px;
  font-weight: bold;
  color: #e5c36a;   /* 醒目的黄，一眼看到压力在变小 */
  text-align: center;
  padding: 10px 0 6px;
}
.progress-wrap {
  height: 14px;
  background: #12141a;
  border: 1px solid var(--card-border);
  border-radius: 999px;
  overflow: hidden;
  margin: 6px 0 12px;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #2e8b57, #7fd6a4);
  border-radius: 999px;
}

/* ---------- 多笔债务：总卡片 + 明细小卡片 ---------- */
.debt-total-card { border-left: 4px solid #e5c36a; }
.debt-total-card .repay-remaining { color: #f0d489; font-size: 38px; }
.debt-mini-card { padding: 14px 16px; }
.debt-mini-name { font-size: 19px; font-weight: bold; }
.debt-mini-remaining {
  font-size: 24px;
  font-weight: bold;
  color: #e5c36a;
  margin: 4px 0 6px;
}
.debt-mini-bar { height: 10px; margin: 4px 0 8px; }
.debt-mini-meta { color: var(--text-dim); font-size: 14px; }

/* ---------- 表单控件（手指友好） ---------- */
input[type="text"], input[type="date"] {
  width: 100%;
  background: #12141a;
  border: 1px solid var(--card-border);
  border-radius: 10px;
  color: var(--text);
  font-size: 18px;
  padding: 14px;
  outline: none;
}
input:focus { border-color: var(--accent); }

.btn {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 18px;
  font-weight: bold;
  padding: 14px 26px;
  cursor: pointer;
  min-height: 52px;
}
.btn:active { opacity: 0.8; }
.btn:disabled { opacity: 0.5; cursor: wait; }
.btn-secondary { background: #2a3038; }

/* ---------- 首页底部输入区 ---------- */
.chat-bar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  background: #12141a;
  border-top: 1px solid var(--card-border);
  padding: 12px 16px 16px;
}
.chat-row { display: flex; gap: 8px; margin-bottom: 8px; }
.chat-row input[type="text"] { flex: 1; }
.date-row { display: flex; align-items: center; gap: 8px; }
.date-row label { color: var(--text-dim); font-size: 14px; white-space: nowrap; }
.date-row input[type="date"] { flex: 1; font-size: 16px; padding: 8px 10px; }
.hint-line { color: var(--text-dim); font-size: 13px; margin-top: 6px; }

.loading { color: var(--text-dim); text-align: center; padding: 30px 0; }

/* ---------- 每周战报 ---------- */
.week-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  font-size: 15px;
  color: var(--text-dim);
}
.week-stats b { color: var(--text); }
.week-project-line {
  width: 100%;
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid var(--card-border);
  font-size: 14px;
}

.week-days { margin-top: 10px; }
.week-day {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--card-border);
  font-size: 14px;
}
.week-day:last-child { border-bottom: none; }
.week-day.future { opacity: 0.35; }
.week-day.today .week-day-name { color: var(--accent); font-weight: bold; }
.week-day-name { min-width: 78px; white-space: nowrap; color: var(--text-dim); }
.week-day-detail { flex: 1; text-align: right; color: var(--text); }

.report-label {
  color: var(--text-dim);
  font-size: 14px;
  letter-spacing: 1px;
  margin-bottom: 8px;
}
.report-value { font-size: 18px; line-height: 1.7; }
.report-placeholder { color: var(--text-dim); font-size: 16px; line-height: 1.7; }
.report-good { border-left: 4px solid var(--green); }
.report-warn {
  background: rgba(176, 48, 48, 0.12);
  border-left: 4px solid var(--red);
}
.report-warn .report-value { color: #ff9b9b; font-weight: bold; }
.report-plan { padding-left: 22px; font-size: 17px; line-height: 1.8; }
.report-plan li { margin-bottom: 6px; }

.sim-hint {
  color: #e5c36a;
  font-size: 16px;
  line-height: 1.7;
  padding: 8px 0;
}
