:root {
  --primary: #1677FF;
  --bg: #F5F6FA;
  --text: #1A1A1A;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  background: #2B2F36;
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  display: flex;
  justify-content: center;
  padding: 16px;
}
.phone {
  width: 390px;
  max-width: 100%;
  height: min(840px, calc(100vh - 32px));
  background: var(--bg);
  border-radius: 28px;
  border: 10px solid #111;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: 0 20px 50px rgba(0,0,0,.45);
}
.nav {
  height: 48px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  border-bottom: 1px solid #EBEDF0;
  position: relative;
  flex-shrink: 0;
}
.nav-back {
  position: absolute;
  left: 8px;
  border: 0;
  background: none;
  font-size: 28px;
  width: 40px;
  cursor: pointer;
}
#app { flex: 1; overflow: auto; padding-bottom: 12px; }
.tabbar {
  height: 56px;
  background: #fff;
  border-top: 1px solid #EBEDF0;
  display: flex;
  flex-shrink: 0;
}
.tab {
  flex: 1;
  border: 0;
  background: none;
  color: #999;
  font-size: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  cursor: pointer;
}
.tab.on { color: var(--primary); }
.login-card {
  background: linear-gradient(160deg, #1677FF, #3E96FF);
  padding: 28px 20px 40px;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 14px;
}
.avatar {
  width: 56px; height: 56px; border-radius: 50%;
  background: rgba(255,255,255,.3);
  display: flex; align-items: center; justify-content: center; font-size: 26px;
}
.login-name { font-size: 17px; font-weight: 700; }
.login-sub { font-size: 11px; opacity: .85; margin-top: 4px; }
.login-card + .list-item { margin-top: 12px; }
.list-item {
  display: flex;
  align-items: center;
  background: #fff;
  margin: 0 16px 8px;
  border-radius: 12px;
  padding: 13px 14px;
  font-size: 14px;
  box-shadow: 0 1px 3px rgba(0,0,0,.04);
  cursor: pointer;
}
.list-item .li-ico {
  width: 34px; height: 34px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; color: #fff; margin-right: 12px; flex-shrink: 0;
}
.list-item .li-txt { flex: 1; }
.list-item .li-t { font-weight: 600; font-size: 15px; }
.list-item .li-d { font-size: 12px; color: #999; margin-top: 2px; }
.profile-disclaimer { font-size: 13px; }
.search {
  margin: 8px 16px 0;
  height: 32px;
  background: #fff;
  border-radius: 16px;
  border: 1px solid #EBEDF0;
  padding: 0 12px;
  width: calc(100% - 32px);
  font-size: 14px;
}
.section { font-size: 14px; color: #999; padding: 8px 16px 4px; }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 0 16px; }
.gitem {
  background: #fff;
  border-radius: 10px;
  padding: 8px 6px 8px;
  text-align: center;
  cursor: pointer;
  border: 0;
}
.gi {
  width: 32px; height: 32px; border-radius: 8px; margin: 0 auto 4px;
  display: flex; align-items: center; justify-content: center; color: #fff; font-size: 15px;
}
.gn { font-size: 13px; font-weight: 600; }
.gd { font-size: 11px; color: #999; margin-top: 2px; }
.input-panel { background: #fff; padding: 0 16px; }
.field {
  display: flex; align-items: center; justify-content: space-between;
  padding: 13px 4px; border-bottom: .5px solid #EBEDF0; cursor: default;
}
.field input.fv {
  border: 0;
  background: transparent;
  outline: none;
  cursor: text;
  min-width: 0;
}
.fl { width: 96px; font-size: 14px; flex-shrink: 0; }
.subsidy-form .fl { width: 128px; }
.fv { flex: 1; text-align: right; font-size: 15px; font-weight: 500; }
.fv.ph { color: #C0C4CC; font-weight: 400; }
.unit { font-size: 13px; color: #999; margin-left: 6px; }
.term-select {
  flex: 1;
  height: 32px;
  border: 0;
  background: transparent;
  text-align: right;
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  outline: none;
}
.fee-row .fl { width: auto; margin-right: 6px; }
.year-select {
  height: 32px;
  border: 0;
  background: transparent;
  font-size: 14px;
  font-weight: 600;
  color: var(--primary);
  outline: none;
  flex-shrink: 0;
  margin-right: auto;
}
.fenli-row { cursor: default; }
.fenli {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}
.fenli .mini {
  width: 56px;
  height: 28px;
  border: 0;
  background: transparent;
  text-align: right;
  font-size: 15px;
  font-weight: 500;
  cursor: text;
  outline: none;
}
.chips { display: flex; gap: 8px; padding: 10px 4px 8px; flex-wrap: wrap; }
.chip {
  height: 32px; padding: 0 10px; border-radius: 8px; border: 1px solid #EBEDF0;
  background: #fff; font-size: 12px; cursor: pointer;
}
.chip.on { background: #E8F1FF; border-color: var(--primary); color: var(--primary); font-weight: 700; }
.chips.method-fill {
  padding: 8px 4px 12px;
}
.chips.method-fill .chip {
  flex: 1;
  height: 36px;
  font-size: 14px;
}
.btn-row { display: flex; gap: 12px; padding: 14px 16px; }
.btn {
  flex: 1; height: 44px; border-radius: 22px; border: 0; font-size: 15px; font-weight: 600; cursor: pointer;
}
.btn-row.sm {
  padding: 10px 40px 8px;
  gap: 10px;
}
.btn-row.sm .btn {
  height: 34px;
  font-size: 13px;
  border-radius: 17px;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:disabled { opacity: .45; }
.btn-ghost { background: #fff; color: var(--primary); border: 1.5px solid var(--primary); }
.result {
  background: linear-gradient(160deg, #1677FF, #3E96FF);
  border-radius: 16px; margin: 12px 16px; padding: 18px 16px; color: #fff;
}
.result .rk { font-size: 12px; opacity: .85; }
.result .rv { font-size: 32px; font-weight: 700; margin: 4px 0 8px; }
.result.sm-value .rv { font-size: 31px; }
.rgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 8px; padding-top: 12px; border-top: 1px solid rgba(255,255,255,.25); }
.rgrid .v { font-size: 16px; font-weight: 700; margin-top: 2px; }
.year-fee-tbl {
  width: 100%;
  border-collapse: collapse;
  margin-top: 14px;
  color: #fff;
  font-size: 14px;
}
.year-fee-tbl th,
.year-fee-tbl td {
  padding: 8px 4px;
  text-align: center;
  color: #fff;
  border-top: 1px solid rgba(255,255,255,.25);
}
.year-fee-tbl th {
  font-size: 12px;
  font-weight: 600;
  opacity: .85;
}
.year-fee-tbl td:last-child { font-weight: 700; }
.result-caption {
  text-align: center;
  color: #C0C4CC;
  font-size: 13px;
  padding: 16px 16px 4px;
}
.disclaimer { font-size: 10px; color: #999; text-align: center; padding: 8px 20px 16px; }
.card { background: #fff; border-radius: 12px; margin: 10px 16px; padding: 12px; font-size: 12px; }
.tbl { width: 100%; border-collapse: collapse; font-size: 11px; }
.tbl th { background: #F0F4FF; color: var(--primary); padding: 8px 4px; }
.tbl td { padding: 8px 4px; text-align: center; border-top: .5px solid #EBEDF0; }
.tbl .hl { color: var(--primary); font-weight: 700; }
.kv-card { padding: 0; overflow: hidden; }
.kv-tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.kv-tbl th {
  background: #E8F1FF;
  color: var(--primary);
  font-weight: 600;
  padding: 10px 14px;
  text-align: left;
}
.kv-tbl th:last-child,
.kv-tbl td:last-child { text-align: right; }
.kv-tbl td {
  padding: 12px 14px;
  color: #333;
  border-top: .5px solid #EBEDF0;
}
.kv-tbl td:first-child { color: #666; width: 42%; }
.kv-tbl td:last-child { font-weight: 600; }
.kv-tbl tbody tr:nth-child(even) { background: #FAFAFA; }
.sum-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 8px;
  margin-bottom: 0;
}
.sum-grid .sk { font-size: 12px; color: #999; }
.sum-grid .sv { font-size: 16px; font-weight: 700; margin-top: 2px; }
.entry-list {
  display: flex;
  gap: 10px;
  background: transparent;
  margin: 4px 16px 10px;
  border-radius: 0;
  overflow: visible;
}
.entry {
  flex: 1;
  width: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 8px;
  border: 0;
  border-radius: 12px;
  background: #fff;
  font-size: 14px;
  cursor: pointer;
  text-align: center;
  color: var(--text);
  font-weight: 500;
}
.sched-card { padding: 0 0 8px; overflow: auto; }
.sched-title { font-size: 14px; font-weight: 700; padding: 12px 12px 4px; }
.sched-tbl { width: 100%; border-collapse: collapse; font-size: 12px; }
.sched-tbl.sched-lg { font-size: 14px; }
.sched-tbl th {
  background: #F3F4F6;
  color: #333;
  font-weight: 600;
  padding: 10px 4px;
  text-align: center;
}
.sched-tbl td {
  padding: 10px 4px;
  text-align: center;
  color: #333;
  border: 0;
}
.sched-tbl tbody tr:nth-child(even) { background: #FAFAFA; }
.sched-tbl tbody tr.hl { background: #FFF8E1; }
.stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 0 16px 10px;
}
.stat {
  background: #fff;
  border-radius: 8px;
  padding: 12px 10px;
  border-left: 3px solid var(--primary);
}
.stat .sk { font-size: 12px; color: #999; }
.stat .sv { font-size: 15px; font-weight: 700; color: var(--primary); margin-top: 4px; }
.hist {
  background: #fff; border-radius: 12px; margin: 0 16px 8px; padding: 12px 14px; cursor: pointer;
}
.hist .t { color: var(--primary); font-weight: 700; font-size: 15px; }
.hist .d { font-size: 14px; color: #666; margin-top: 6px; white-space: pre-wrap; }
.hist-empty { font-size: 13px; }
.kb-wrap { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: flex; justify-content: center; }
.kb-wrap[hidden] { display: none !important; }
.kb {
  width: 390px; max-width: 100%; background: #D8DBE0; padding: 8px 6px 16px;
}
.krow { display: flex; gap: 6px; margin-bottom: 6px; }
.kb button {
  flex: 1; height: 44px; border: 0; border-radius: 8px; background: #fff;
  font-size: 18px; box-shadow: 0 1px 0 #B9BEC6; cursor: pointer;
}
.kb button.ok { flex: 2; background: var(--primary); color: #fff; font-size: 15px; }
.toast {
  position: absolute; left: 50%; top: 40%; transform: translate(-50%, -50%);
  background: rgba(0,0,0,.75); color: #fff; padding: 10px 16px; border-radius: 8px;
  font-size: 13px; z-index: 30;
}
.flow { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.flow input, .flow select, textarea, .plain {
  flex: 1; height: 32px; border: 1px solid #EBEDF0; border-radius: 8px; padding: 0 8px; font-size: 12px;
}
.add {
  height: 32px; border: 1.5px dashed var(--primary); color: var(--primary);
  border-radius: 8px; background: #fff; width: 100%; cursor: pointer;
}
.xirr-card .xirr-head,
.xirr-card .flow {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) 40px 28px;
  gap: 6px;
  align-items: center;
}
.xirr-card .xirr-head {
  color: #969799;
  font-size: 12px;
  margin-bottom: 8px;
}
.xirr-card .flow { margin-bottom: 8px; }
.xirr-card .flow input {
  width: 100%;
  min-width: 0;
}
.side-tag {
  border: 0;
  background: transparent;
  font-size: 13px;
  font-weight: 600;
  padding: 0;
  text-align: center;
  pointer-events: none;
}
.side-tag.out { color: #FA5151; }
.side-tag.in { color: #07C160; }
.xirr-card .fdel {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 6px;
  background: #FDECEC;
  color: #FA5151;
  cursor: pointer;
  font-size: 12px;
}
