/* ============================================================
   吴晓记原型 设计系统 base.css
   令牌 / 手机壳 / TabBar / 通用组件 —— 所有页面必须引用
   ============================================================ */
:root {
  --c-primary: #2F7E5E;
  --c-primary-dark: #226048;
  --c-primary-light: #E4F1EA;
  --c-gold: #C9A227;
  --c-bg: #F7F4EE;
  --c-card: #FFFFFF;
  --c-text: #26262B;
  --c-sub: #8A8A94;
  --c-line: #ECE9E2;
  --c-red: #C4453C;
  --c-red-bg: #FBEAE8;
  --c-blue: #3A6FB0;
  --c-blue-bg: #E8F0F9;
  --c-orange: #D97A2B;
  --c-orange-bg: #FDF1E5;
  --c-green: #2F8A52;
  --c-green-bg: #E7F5EC;
  --c-gray: #9A9AA2;
  --c-gray-bg: #EFEFEC;
  --r-card: 14px;
  --r-btn: 10px;
  --fs-12: 12px; --fs-14: 14px; --fs-16: 16px; --fs-20: 20px; --fs-28: 28px;
  --shadow: 0 2px 10px rgba(38, 38, 43, .06);
}
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
body {
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: #D8D5CE;
  display: flex; justify-content: center; align-items: flex-start;
  min-height: 100vh; padding: 24px 0; color: var(--c-text);
}

/* ---------- 手机壳 375x812 ---------- */
.phone {
  width: 375px; height: 812px; background: var(--c-bg);
  border-radius: 44px; border: 10px solid #1C1C1E; overflow: hidden;
  display: flex; flex-direction: column; position: relative;
  box-shadow: 0 24px 60px rgba(0,0,0,.28);
}
.statusbar {
  height: 44px; flex: none; display: flex; align-items: center;
  justify-content: space-between; padding: 0 24px 0 32px;
  font-size: var(--fs-12); font-weight: 600; background: var(--c-bg);
}
.statusbar .sb-icons { display: flex; gap: 5px; align-items: center; }
.app-header {
  flex: none; height: 44px; display: flex; align-items: center; gap: 10px;
  padding: 0 16px; background: var(--c-bg); position: relative;
}
.app-header .app-title { font-size: var(--fs-16); font-weight: 700; }
.back {
  width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center;
  justify-content: center; text-decoration: none; color: var(--c-text);
  font-size: 18px; background: transparent; flex: none;
}
.back:active { background: var(--c-gray-bg); }
.header-action { margin-left: auto; font-size: var(--fs-14); color: var(--c-primary); text-decoration: none; }
.screen {
  flex: 1; overflow-y: auto; padding: 0 16px 16px; background: var(--c-bg);
  scrollbar-width: none;
}
.screen::-webkit-scrollbar { display: none; }

/* ---------- TabBar（5 tab，中央凸起记账钮） ---------- */
.tabbar {
  flex: none; height: 78px; background: var(--c-card); border-top: 1px solid var(--c-line);
  display: flex; align-items: stretch; position: relative; padding-bottom: 14px;
}
.tab {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; text-decoration: none; color: var(--c-sub); font-size: var(--fs-12);
}
.tab .tab-ico { font-size: 21px; line-height: 1; }
.tab.active { color: var(--c-primary); font-weight: 600; }
.tab-center { flex: none; width: 64px; position: relative; }
.tab-center .tab-btn {
  position: absolute; top: -20px; left: 50%; transform: translateX(-50%);
  width: 52px; height: 52px; border-radius: 50%;
  background: linear-gradient(145deg, var(--c-primary), var(--c-primary-dark));
  color: #fff; font-size: 26px; font-weight: 300; display: flex; align-items: center;
  justify-content: center; text-decoration: none;
  box-shadow: 0 6px 16px rgba(47,126,94,.4); border: 4px solid var(--c-bg);
}
.tab-center .tab-label { position: absolute; bottom: 12px; width: 100%; text-align: center; font-size: var(--fs-12); color: var(--c-sub); }

/* ---------- 卡片 / 列表 ---------- */
.card {
  background: var(--c-card); border-radius: var(--r-card); box-shadow: var(--shadow);
  padding: 16px; margin-top: 12px;
}
.card-title { font-size: var(--fs-16); font-weight: 700; margin-bottom: 12px; display: flex; align-items: center; }
.card-title .more { margin-left: auto; font-size: var(--fs-12); color: var(--c-sub); text-decoration: none; font-weight: 400; }
.list { display: flex; flex-direction: column; }
.list-item {
  display: flex; align-items: center; gap: 12px; padding: 14px 2px;
  border-bottom: 1px solid var(--c-line); text-decoration: none; color: inherit;
}
.list-item:last-child { border-bottom: none; }
.li-main { flex: 1; min-width: 0; }
.li-title { font-size: var(--fs-16); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.li-sub { font-size: var(--fs-12); color: var(--c-sub); margin-top: 4px; }
.li-right { text-align: right; flex: none; }
.li-amount { font-size: var(--fs-16); font-weight: 700; font-variant-numeric: tabular-nums; }
.li-amount.income { color: var(--c-green); }
.li-amount.expense { color: var(--c-text); }
.li-amount.overdue { color: var(--c-red); }
.arrow::after { content: "›"; color: var(--c-sub); font-size: 18px; margin-left: 4px; }

/* ---------- 状态标签 ---------- */
.tag {
  display: inline-block; font-size: 11px; padding: 2px 8px; border-radius: 999px;
  font-weight: 600; line-height: 1.6;
}
.tag-draft      { background: var(--c-gray-bg);   color: var(--c-gray); }
.tag-reconciling{ background: var(--c-blue-bg);   color: var(--c-blue); }
.tag-disputed   { background: var(--c-orange-bg); color: var(--c-orange); }
.tag-confirmed  { background: var(--c-green-bg);  color: var(--c-green); }
.tag-red        { background: var(--c-red-bg);    color: var(--c-red); }
.tag-gold       { background: #F6EFDB;            color: var(--c-gold); }
.badge-dot { position: relative; }
.badge-dot::before {
  content: ""; position: absolute; top: -1px; right: -5px; width: 8px; height: 8px;
  border-radius: 50%; background: var(--c-red); border: 1.5px solid var(--c-bg);
}

/* ---------- 按钮 ---------- */
.btn {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  height: 44px; padding: 0 20px; border-radius: var(--r-btn); font-size: var(--fs-16);
  font-weight: 600; text-decoration: none; border: none; cursor: pointer;
}
.btn-primary { background: var(--c-primary); color: #fff; }
.btn-primary:active { background: var(--c-primary-dark); }
.btn-ghost { background: transparent; color: var(--c-primary); border: 1.5px solid var(--c-primary); }
.btn-danger { background: transparent; color: var(--c-red); border: 1.5px solid var(--c-red); }
.btn-block { width: 100%; }
.btn-sm { height: 32px; font-size: var(--fs-12); padding: 0 12px; border-radius: 8px; }
.btn-row { display: flex; gap: 10px; margin-top: 14px; }

/* ---------- 表单 / 分段 / 通用行 ---------- */
.seg {
  display: flex; background: var(--c-gray-bg); border-radius: 10px; padding: 3px; margin-top: 12px;
}
.seg-item {
  flex: 1; text-align: center; font-size: var(--fs-14); padding: 7px 0; border-radius: 8px;
  color: var(--c-sub); text-decoration: none;
}
.seg-item.active { background: var(--c-card); color: var(--c-text); font-weight: 600; box-shadow: 0 1px 4px rgba(0,0,0,.07); }
.field-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 13px 2px; border-bottom: 1px solid var(--c-line); font-size: var(--fs-14);
}
.field-row:last-child { border-bottom: none; }
.field-label { color: var(--c-sub); flex: none; }
.field-value { font-weight: 600; text-align: right; }
.field-value.low-conf {            /* AI 低置信字段：标黄强制过目 */
  background: #FCF3CF; box-shadow: inset 0 0 0 1.5px var(--c-gold); border-radius: 6px; padding: 3px 8px;
}
.avatar {
  width: 42px; height: 42px; border-radius: 50%; flex: none; display: flex; align-items: center;
  justify-content: center; color: #fff; font-weight: 700; font-size: var(--fs-16);
  background: linear-gradient(140deg, #6FAE8C, var(--c-primary));
}
.avatar.lg { width: 58px; height: 58px; font-size: var(--fs-20); }
.avatar.sm { width: 30px; height: 30px; font-size: var(--fs-12); }

/* ---------- 弹层 / 空态 / 提示条 ---------- */
.sheet-mask {
  position: absolute; inset: 0; background: rgba(28,28,30,.45); z-index: 40;
  display: flex; align-items: flex-end;
}
.sheet {
  width: 100%; background: var(--c-card); border-radius: 20px 20px 0 0; padding: 20px 16px 30px;
}
.sheet-handle { width: 36px; height: 4px; border-radius: 2px; background: var(--c-line); margin: 0 auto 16px; }
.notice {
  display: flex; gap: 8px; align-items: flex-start; font-size: var(--fs-12); line-height: 1.6;
  padding: 10px 12px; border-radius: 10px; margin-top: 12px;
}
.notice-info  { background: var(--c-blue-bg);   color: var(--c-blue); }
.notice-warn  { background: var(--c-orange-bg); color: var(--c-orange); }
.notice-charge{ background: #F6EFDB;            color: #7A6210; }      /* 计费提示条（3.6） */
.notice-lock  { background: var(--c-green-bg);  color: var(--c-green); }
.empty { text-align: center; color: var(--c-sub); font-size: var(--fs-14); padding: 48px 0; }
.empty .empty-ico { font-size: 40px; margin-bottom: 8px; }

/* ---------- 数字与排版辅助 ---------- */
.money { font-variant-numeric: tabular-nums; font-weight: 700; }
.num-lg { font-size: var(--fs-28); font-weight: 800; font-variant-numeric: tabular-nums; }
.sub { color: var(--c-sub); font-size: var(--fs-12); }
.row-between { display: flex; align-items: center; justify-content: space-between; }
.mt8 { margin-top: 8px; } .mt12 { margin-top: 12px; } .mt16 { margin-top: 16px; }
a { color: inherit; }
/* 原型内页面间跳转统一 .screen 内 a 无下划线 */
.screen a { text-decoration: none; }
