/* ─────────────────────────────────────────
   孔连英的账本 · H5 设计稿
   底色：瓷白  /  主色：釉蓝  /  资金色：砖红、赭黄
   结构语言：瓷砖缝线、色卡条、方角卡片
   ───────────────────────────────────────── */

:root {
  --paper: #f4f6f4;
  --card: #ffffff;
  --ink: #18211f;
  --ink-2: #3e4b47;
  --muted: #5f6b67;
  --line: #dfe5e2;
  --line-strong: #c9d2ce;

  --blue: #23566b;
  --blue-deep: #173f4f;
  --blue-soft: #e6eff1;

  --red: #a84632;
  --red-soft: #f7e8e4;

  --green: #2c6e55;
  --green-soft: #e6f0eb;

  --amber: #9a6b1f;
  --amber-soft: #fbf1de;

  --chip-blue: #2f5d7c;
  --chip-red: #b04a38;
  --chip-ochre: #c08a2e;
  --chip-sage: #6f8b72;
  --chip-porcelain: #e9e6dd;

  --radius: 10px;
  --font: "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei",
    "Noto Sans CJK SC", sans-serif;
  --num: "DIN Alternate", "Bahnschrift", "Helvetica Neue", Arial, sans-serif;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background: #e3e8e5;
  color: var(--ink);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  border: 0;
  background: none;
  padding: 0;
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

svg {
  display: block;
}

.num {
  font-family: var(--num);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

/* ── 手机外壳 ───────────────────────────── */

.phone {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 390px;
  height: 844px;
  margin: 0 auto;
  overflow: hidden;
  background: var(--paper);
}

@media (max-width: 430px) {
  body {
    background: var(--paper);
  }

  .phone {
    width: 100%;
    height: 100vh;
    height: 100dvh;
  }
}

/* ── 状态栏 ─────────────────────────────── */

.statusbar {
  display: flex;
  flex: 0 0 26px;
  align-items: center;
  justify-content: space-between;
  padding: 0 22px;
  color: var(--ink-2);
  font-size: 11px;
  font-weight: 600;
}

.sb-right {
  display: flex;
  align-items: center;
  gap: 6px;
}

.network {
  font-size: 9px;
  letter-spacing: 0.04em;
  opacity: 0.75;
}

.battery {
  position: relative;
  width: 22px;
  height: 11px;
  padding: 1px;
  border: 1px solid currentColor;
  border-radius: 3px;
  opacity: 0.75;
}

.battery::after {
  position: absolute;
  top: 3px;
  right: -3px;
  width: 2px;
  height: 5px;
  border-radius: 0 1px 1px 0;
  background: currentColor;
  content: "";
  opacity: 0.6;
}

.battery i {
  display: block;
  width: 72%;
  height: 100%;
  border-radius: 1px;
  background: currentColor;
}

/* ── 页头 ───────────────────────────────── */

.app-header {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 20px 14px;
}

.app-header.sub {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  padding-top: 2px;
}

.app-header.sub .header-title {
  font-size: 17px;
  text-align: center;
}

.header-title {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.header-sub {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.header-btn {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--card);
  color: var(--ink-2);
}

.header-text-btn {
  color: var(--blue);
  font-size: 12px;
  font-weight: 600;
}

.avatar {
  display: grid;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  place-items: center;
  border-radius: 9px;
  background: var(--blue-deep);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
}

/* ── 内容区 ─────────────────────────────── */

.content {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 0 20px 12px;
  scrollbar-width: none;
}

.content::-webkit-scrollbar {
  display: none;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 18px 0 9px;
}

.section-title {
  font-size: 14px;
  font-weight: 600;
}

.section-link {
  display: flex;
  align-items: center;
  gap: 1px;
  color: var(--muted);
  font-size: 11px;
}

.card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
}

.pad {
  padding: 16px;
}

/* ── 首页：现金卡 ───────────────────────── */

.balance {
  position: relative;
  overflow: hidden;
  border: 1px solid #12323e;
  border-radius: 12px;
  background: var(--blue-deep);
  color: #fff;
}

.balance::before {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(
      rgba(255, 255, 255, 0.045) 1px,
      transparent 1px
    ),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 28px 28px;
  content: "";
  pointer-events: none;
}

.paint-strip {
  position: relative;
  z-index: 1;
  display: flex;
  height: 6px;
}

.paint-strip i {
  flex: 1;
}

.paint-strip i:nth-child(1) {
  background: var(--chip-blue);
}
.paint-strip i:nth-child(2) {
  background: var(--chip-red);
}
.paint-strip i:nth-child(3) {
  background: var(--chip-ochre);
}
.paint-strip i:nth-child(4) {
  background: var(--chip-sage);
}
.paint-strip i:nth-child(5) {
  background: var(--chip-porcelain);
}

.balance-body {
  position: relative;
  z-index: 1;
  padding: 16px 18px 15px;
}

.balance-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: rgba(255, 255, 255, 0.68);
  font-size: 11px;
}

.balance-top .link {
  color: rgba(255, 255, 255, 0.82);
}

.balance-amount {
  margin-top: 4px;
  font-family: var(--num);
  font-size: 36px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.balance-amount .cny {
  margin-right: 2px;
  font-size: 18px;
  font-weight: 500;
  opacity: 0.72;
}

.balance-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 14px;
  padding-top: 11px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.72);
  font-size: 11px;
}

.balance-foot strong {
  color: #aedcc8;
  font-family: var(--num);
  font-size: 13px;
  font-weight: 600;
}

/* ── 今日三数 ───────────────────────────── */

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
}

.stat {
  padding: 11px 8px 10px;
  border-left: 1px solid var(--line);
  text-align: center;
}

.stat:first-child {
  border-left: 0;
}

.stat-label {
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.02em;
}

.stat-value {
  margin-top: 3px;
  font-family: var(--num);
  font-size: 15px;
  font-weight: 600;
}

.stat-value.pos {
  color: var(--green);
}

/* ── 记一笔 ─────────────────────────────── */

.actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.action {
  display: flex;
  min-height: 98px;
  flex-direction: column;
  gap: 9px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  text-align: left;
}

.action-icon {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 7px;
  background: var(--blue-soft);
  color: var(--blue);
}

.action:nth-child(2) .action-icon {
  background: var(--green-soft);
  color: var(--green);
}

.action:nth-child(3) .action-icon {
  background: var(--red-soft);
  color: var(--red);
}

.action-title {
  font-size: 14px;
  font-weight: 600;
}

.action-sub {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.35;
}

/* ── 库存提醒 ───────────────────────────── */

.alert {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--amber);
  border-radius: var(--radius);
  background: var(--card);
}

.alert-icon {
  display: grid;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  place-items: center;
  border-radius: 7px;
  background: var(--amber-soft);
  color: var(--amber);
}

.alert-body {
  min-width: 0;
  flex: 1;
}

.alert-title {
  font-size: 13px;
  font-weight: 600;
}

.alert-sub {
  margin-top: 1px;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── 流水行 ─────────────────────────────── */

.list {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
}

.row {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 13px;
  border-bottom: 1px solid var(--line);
}

.row:last-child {
  border-bottom: 0;
}

.row-icon {
  display: grid;
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  place-items: center;
  border-radius: 7px;
}

.row-icon.in {
  background: var(--red-soft);
  color: var(--red);
}

.row-icon.out {
  background: var(--green-soft);
  color: var(--green);
}

.row-icon.fee {
  background: var(--amber-soft);
  color: var(--amber);
}

.row-main {
  min-width: 0;
  flex: 1;
}

.row-title {
  overflow: hidden;
  font-size: 13px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.row-meta {
  margin-top: 1px;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.row-side {
  flex-shrink: 0;
  text-align: right;
}

.row-amount {
  font-family: var(--num);
  font-size: 14px;
  font-weight: 600;
}

.row-amount.pos {
  color: var(--green);
}

.row-amount.neg {
  color: var(--red);
}

.row-sub {
  margin-top: 1px;
  color: var(--muted);
  font-size: 10px;
}

.row-sub.pos {
  color: var(--green);
}

/* ── 底部导航 ───────────────────────────── */

.tabbar {
  display: grid;
  flex: 0 0 auto;
  grid-template-columns: repeat(6, 1fr);
  align-items: start;
  height: 70px;
  padding: 6px 4px 8px;
  border-top: 1px solid var(--line);
  background: var(--card);
}

.tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding-top: 3px;
  color: var(--muted);
  font-size: 10px;
}

.tab-icon {
  display: grid;
  width: 34px;
  height: 26px;
  place-items: center;
  border-radius: 7px;
}

.tab.active {
  color: var(--blue);
  font-weight: 600;
}

.tab.active .tab-icon {
  background: var(--blue-soft);
}

/* ── 表单 ───────────────────────────────── */

.form {
  margin-bottom: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
}

.form-row {
  display: flex;
  min-height: 52px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 15px;
  border-bottom: 1px solid var(--line);
}

.form-row:last-child {
  border-bottom: 0;
}

.form-label {
  flex-shrink: 0;
  color: var(--muted);
  font-size: 12px;
}

.form-value {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 500;
  text-align: right;
}

.form-value .num {
  font-size: 15px;
}

.form-input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 14px;
  font-weight: 500;
  text-align: right;
}

.form-input::placeholder {
  color: var(--line-strong);
  font-weight: 400;
}

.picked {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 13px 15px;
  border-bottom: 1px solid var(--line);
  background: #fbfcfc;
}

.picked-icon {
  display: grid;
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  place-items: center;
  border-radius: 8px;
  background: var(--blue-soft);
  color: var(--blue);
}

.picked-main {
  min-width: 0;
  flex: 1;
}

.picked-title {
  font-size: 14px;
  font-weight: 600;
}

.picked-sub {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.picked-change {
  flex-shrink: 0;
  color: var(--blue);
  font-size: 11px;
}

.stepper {
  display: flex;
  align-items: center;
  gap: 10px;
}

.step-btn {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink-2);
}

.step-value {
  min-width: 28px;
  font-family: var(--num);
  font-size: 17px;
  font-weight: 600;
  text-align: center;
}

.step-unit {
  color: var(--muted);
  font-size: 11px;
}

.total-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 15px;
  border-top: 1px solid var(--line);
  background: #f7f9f8;
}

.total-strip .k {
  color: var(--muted);
  font-size: 12px;
}

.total-strip .v {
  font-family: var(--num);
  font-size: 19px;
  font-weight: 600;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding: 0 15px 14px;
}

.chips.flush {
  padding: 0;
}

.chip {
  padding: 6px 11px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink-2);
  font-size: 11px;
}

.chip.active {
  border-color: var(--blue);
  background: var(--blue-soft);
  color: var(--blue);
  font-weight: 600;
}

.footer-cta {
  flex: 0 0 auto;
  padding: 10px 16px 16px;
  border-top: 1px solid var(--line);
  background: var(--paper);
}

.btn {
  display: flex;
  width: 100%;
  height: 50px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 9px;
  background: var(--blue);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
}

.btn.secondary {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink-2);
}

.btn.ghost {
  height: auto;
  padding: 8px;
  background: transparent;
  color: var(--blue);
  font-size: 12px;
}

.hint {
  padding: 0 2px 10px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

/* ── 毛利提示 ───────────────────────────── */

.profit-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 15px;
  border: 1px solid #cde0d5;
  border-radius: var(--radius);
  background: var(--green-soft);
}

.profit-label {
  color: var(--green);
  font-size: 11px;
}

.profit-note {
  margin-top: 2px;
  color: #5c7d6d;
  font-size: 10px;
}

.profit-amount {
  color: var(--green);
  font-family: var(--num);
  font-size: 24px;
  font-weight: 600;
}

/* ── 概览数字 ───────────────────────────── */

.summary {
  padding: 16px;
}

.summary-k {
  color: var(--muted);
  font-size: 10px;
}

.summary-v {
  margin-top: 2px;
  font-family: var(--num);
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.summary-sub {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

/* ── 库存 ───────────────────────────────── */

.inv-row {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px 13px;
  border-bottom: 1px solid var(--line);
}

.inv-row:last-child {
  border-bottom: 0;
}

.inv-swatch {
  display: grid;
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  place-items: center;
  border-radius: 8px;
}

.inv-swatch.paint {
  background: var(--blue-soft);
  color: var(--blue);
}

.inv-swatch.tile {
  background: var(--amber-soft);
  color: var(--amber);
}

.inv-swatch.aux {
  background: var(--green-soft);
  color: var(--green);
}

.inv-main {
  min-width: 0;
  flex: 1;
}

.inv-title {
  font-size: 13px;
  font-weight: 500;
}

.inv-meta {
  margin-top: 1px;
  color: var(--muted);
  font-size: 10px;
}

.inv-side {
  text-align: right;
}

.inv-stock {
  font-family: var(--num);
  font-size: 15px;
  font-weight: 600;
}

.inv-stock small {
  margin-left: 2px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 400;
}

.inv-value {
  margin-top: 1px;
  color: var(--muted);
  font-size: 10px;
}

.badge-low {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-top: 2px;
  padding: 1px 4px;
  border-radius: 4px;
  background: var(--amber-soft);
  color: var(--amber);
  font-size: 9px;
}

/* ── 报表图表 ───────────────────────────── */

.chart {
  display: flex;
  height: 146px;
  align-items: stretch;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 2px 0;
}

.bar-col {
  display: flex;
  height: 100%;
  flex: 1;
  flex-direction: column;
  align-items: center;
}

.bar-val {
  margin-bottom: 4px;
  color: var(--muted);
  font-family: var(--num);
  font-size: 9px;
}

.bar-track {
  display: flex;
  width: 100%;
  flex: 1;
  align-items: flex-end;
  justify-content: center;
}

.bar {
  width: 22px;
  border-radius: 3px 3px 0 0;
  background: #cfdad6;
}

.bar.current {
  background: var(--blue);
}

.bar-label {
  margin-top: 6px;
  color: var(--muted);
  font-size: 10px;
}

.stack {
  display: flex;
  height: 10px;
  overflow: hidden;
  border-radius: 5px;
  background: var(--line);
}

.stack i {
  display: block;
  height: 100%;
}

.legend {
  display: grid;
  gap: 7px;
  margin-top: 12px;
}

.legend-row {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
}

.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 2px;
}

.legend-name {
  flex: 1;
  color: var(--ink-2);
}

.legend-amount {
  color: var(--ink);
  font-family: var(--num);
  font-weight: 600;
}

.legend-pct {
  width: 36px;
  color: var(--muted);
  text-align: right;
}

.calc {
  font-size: 12px;
}

.calc-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px dashed var(--line);
}

.calc-row:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.calc-row.total {
  margin-top: 2px;
  padding-top: 10px;
  border-top: 1px solid var(--line-strong);
  border-bottom: 0;
  font-weight: 600;
}

.calc-row .num {
  font-family: var(--num);
}

.calc-row .pos {
  color: var(--green);
}

/* ── 我的 ───────────────────────────────── */

.shop-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px;
}

.shop-avatar {
  display: grid;
  width: 46px;
  height: 46px;
  flex-shrink: 0;
  place-items: center;
  border-radius: 10px;
  background: var(--blue-deep);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
}

.shop-name {
  font-size: 16px;
  font-weight: 600;
}

.shop-meta {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.menu {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
}

.menu-item:last-child {
  border-bottom: 0;
}

.menu-icon {
  display: grid;
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  place-items: center;
  border-radius: 7px;
  background: var(--blue-soft);
  color: var(--blue);
}

.menu-title {
  flex: 1;
  font-size: 13px;
}

.menu-sub {
  color: var(--muted);
  font-size: 10px;
}

.chev {
  flex-shrink: 0;
  color: var(--muted);
}

.version {
  margin: 20px 0 4px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.6;
  text-align: center;
}

/* ── 登录 ───────────────────────────────── */

.login {
  position: relative;
  display: flex;
  flex: 1;
  flex-direction: column;
  overflow: hidden;
  padding: 0 28px 28px;
}

.login::before {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 34px 34px;
  content: "";
  opacity: 0.45;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.7), transparent 70%);
}

.login > * {
  position: relative;
  z-index: 1;
}

.logo-mark {
  display: grid;
  width: 52px;
  height: 52px;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
}

.logo-mark i {
  display: block;
  border-radius: 5px;
}

.logo-mark i:nth-child(1) {
  background: var(--chip-blue);
}
.logo-mark i:nth-child(2) {
  background: var(--chip-red);
}
.logo-mark i:nth-child(3) {
  background: var(--chip-ochre);
}
.logo-mark i:nth-child(4) {
  background: var(--chip-sage);
}

.login-title {
  margin-top: 22px;
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.login-sub {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}

.login-card {
  margin-top: auto;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
}

.login-foot {
  margin-top: 16px;
  color: var(--muted);
  font-size: 10px;
  text-align: center;
}

/* ── 表单补充 ───────────────────────────── */

.form-row.head {
  min-height: 38px;
  padding-bottom: 0;
  border-bottom: 0;
}

.form-row.head + .chips {
  padding-top: 4px;
}

.textarea {
  width: 100%;
  min-height: 54px;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 13px;
  line-height: 1.6;
  resize: none;
}

.attach {
  display: flex;
  gap: 8px;
  padding: 0 15px 14px;
}

.attach-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink-2);
  font-size: 11px;
}

.mt-6 {
  margin-top: 6px;
}

.mt-10 {
  margin-top: 10px;
}

.mt-14 {
  margin-top: 14px;
}

.mb-10 {
  margin-bottom: 10px;
}

.expense-amount {
  width: 100%;
  margin-top: 2px;
  border: 0;
  outline: 0;
  background: transparent;
  font-family: var(--num);
  font-size: 40px;
  font-weight: 600;
  letter-spacing: -0.02em;
  text-align: center;
}

.expense-amount::placeholder {
  color: var(--line-strong);
}

.bar-track {
  border-bottom: 1px solid var(--line);
}

.bar-val.current {
  color: var(--blue);
  font-weight: 600;
}

.stack {
  gap: 2px;
  background: transparent;
}

.search-input {
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 12px;
}

.search-input::placeholder {
  color: var(--muted);
}

.row-title,
.row-meta,
.picked-title,
.picked-sub,
.inv-title,
.inv-meta,
.alert-title,
.alert-sub,
.shop-name,
.shop-meta {
  display: block;
}

.row-amount,
.row-sub,
.inv-stock,
.inv-value {
  display: block;
}

.inv-row {
  padding: 10px 13px;
}

.bar {
  position: relative;
}

.bar-val {
  position: absolute;
  bottom: 100%;
  left: 50%;
  margin: 0 0 4px;
  transform: translateX(-50%);
  white-space: nowrap;
}
.chart { padding-top: 20px; }

.day-total {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
}

.day-total .pos {
  color: var(--green);
}

.row-amount.due {
  color: var(--amber);
}

.mini-btn {
  display: inline-flex;
  min-width: 44px;
  height: 28px;
  align-items: center;
  justify-content: center;
  margin-top: 3px;
  padding: 0 10px;
  border-radius: 6px;
  background: var(--blue);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
}

.stats.two {
  grid-template-columns: repeat(2, 1fr);
}

.stats.two .stat {
  border-top: 1px solid var(--line);
}

.stats.two .stat:nth-child(1),
.stats.two .stat:nth-child(2) {
  border-top: 0;
}

.stats.two .stat:nth-child(odd) {
  border-left: 0;
}

.balance-foot .receivable {
  display: flex;
  align-items: center;
  gap: 1px;
  color: #f0c27a;
  font-family: var(--num);
  font-size: 12px;
  font-weight: 600;
}

.balance-foot .receivable svg {
  opacity: 0.8;
}

.row-icon.cash {
  background: var(--blue-soft);
  color: var(--blue);
}

/* ── 分页 ───────────────────────────────── */

.pager {
  margin: 16px 0 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
}

.pager-pages {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.pager-btn,
.pager-num {
  display: inline-flex;
  min-width: 30px;
  height: 30px;
  align-items: center;
  justify-content: center;
  padding: 0 7px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink-2);
  font-family: var(--num);
  font-size: 11px;
}

.pager-num.active {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
  font-weight: 600;
}

.pager-btn.disabled {
  background: #f7f9f8;
  color: var(--line-strong);
}

.pager-gap {
  padding: 0 2px;
  color: var(--muted);
  font-size: 11px;
}

.pager-jump {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  margin-top: 9px;
  color: var(--muted);
  font-size: 10px;
}

.pager-input {
  width: 36px;
  height: 26px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fff;
  font-family: var(--num);
  font-size: 11px;
  text-align: center;
}

.pager-go {
  height: 26px;
  padding: 0 10px;
  border-radius: 5px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 10px;
  font-weight: 600;
}

.mini-btn.secondary {
  margin-top: 0;
  background: var(--blue-soft);
  color: var(--blue);
}

.row-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
  flex-shrink: 0;
}

.section-actions {
  display: flex;
  align-items: center;
  gap: 7px;
}

.section-btn {
  display: inline-flex;
  height: 32px;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 0 12px;
  border: 1px solid var(--blue-soft);
  border-radius: 7px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 12px;
  font-weight: 600;
}

.section-btn.amber {
  border-color: var(--amber-soft);
  background: var(--amber-soft);
  color: var(--amber);
}

.section-btn svg {
  color: currentColor;
  opacity: 0.75;
}

/* ── 运行态补充 ─────────────────────────── */

.form-error {
  margin-top: 8px;
  color: var(--red);
  font-size: 11px;
}

.remember {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 11px;
}

.remember input {
  accent-color: var(--green);
}

.login-field {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.login-field.readonly {
  background: #fbfcfc;
}

.login-help {
  margin-top: 12px;
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}

.flash {
  margin-bottom: 12px;
  padding: 10px 12px;
  border: 1px solid #cde0d5;
  border-radius: 8px;
  background: var(--green-soft);
  color: var(--green);
  font-size: 12px;
}

.empty {
  padding: 26px 12px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.row-icon.paint {
  background: var(--blue-soft);
  color: var(--blue);
}

.row-icon.tile {
  background: var(--amber-soft);
  color: var(--amber);
}

.row-icon.aux {
  background: var(--green-soft);
  color: var(--green);
}

/* ── View aliases added during implementation ─────────────── */
.stat-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  overflow: hidden;
}

.stat-strip .stat {
  border-left: 1px solid var(--line);
}

.stat-strip .stat:first-child {
  border-left: 0;
}

.stat-k {
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.02em;
}

.stat-v {
  margin-top: 3px;
  font-family: var(--num);
  font-size: 15px;
  font-weight: 600;
}

.quick-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.quick {
  display: flex;
  min-height: 104px;
  flex-direction: column;
  align-items: flex-start;
  gap: 7px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  text-decoration: none;
  color: inherit;
}

.quick-icon {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 7px;
}

.quick-title {
  font-size: 14px;
  font-weight: 600;
}

.quick-sub {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.35;
}

.chevron {
  display: inline-flex;
  align-items: center;
  color: var(--muted);
  flex-shrink: 0;
}

.report-line {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}

.report-line:last-child {
  border-bottom: 0;
}

.report-line.strong {
  font-weight: 650;
}

.report-line .num {
  font-family: var(--num);
  font-weight: 600;
}

.num.neg,
.neg {
  color: var(--red);
}

.num.pos,
.pos {
  color: var(--green);
}

.bars {
  display: flex;
  height: 150px;
  align-items: stretch;
  justify-content: space-between;
  gap: 8px;
  padding-top: 6px;
}

.bar-wrap {
  display: flex;
  width: 100%;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
}

.bar-value {
  margin-bottom: 4px;
  color: var(--muted);
  font-family: var(--num);
  font-size: 9px;
  white-space: nowrap;
}

.bars .bar {
  background: var(--blue);
}

.bars .bar.neg {
  background: var(--red);
}

.day-head {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 14px;
  padding: 8px 2px 7px;
  border-bottom: 1px solid var(--line);
}

.day-title {
  font-size: 14px;
  font-weight: 650;
}

.day-week {
  margin-left: 6px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 400;
}

.day-stats {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.file-name {
  max-width: 90px;
  overflow: hidden;
  color: var(--blue);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stat-strip.two-col {
  grid-template-columns: repeat(2, 1fr);
}

.stat-strip.two-col .stat:nth-child(3) {
  border-left: 0;
  border-top: 1px solid var(--line);
}

.stat-strip.two-col .stat:nth-child(4) {
  border-top: 1px solid var(--line);
}
