/* 鲜小傅品牌视觉 · 官网V2配色令牌（xianxiaofu-aesthetic） */
:root {
  --green: #007F3D;
  --bright: #00AC50;
  --ink: #143B36;
  --navy: #132B51;
  --blue: #0099DF;
  --orange: #FFA726;
  --orange-deep: #B25E09;
  --warm: #FAFBF7;
  --soft: #EFF7ED;
  --line: #D9E6DD;
  --muted: #5D736C;
  --yellow: #FFF8DC;
  --red: #B42318;
  --shadow: 0 8px 28px #143B3619;
}
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html { font-size: 16px; }
body {
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  background: var(--warm); color: var(--ink);
  padding-bottom: 68px; line-height: 1.8; font-size: 14px;
}
button { font-family: inherit; }
input, select, textarea {
  font-family: inherit; font-size: 15px; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: 10px; background: #fff;
  width: 100%; color: var(--ink);
}
input:focus, select:focus, textarea:focus { outline: 2px solid rgba(0,172,80,.22); border-color: var(--bright); }

.view { display: none; max-width: 720px; margin: 0 auto; padding: 14px; }
.view.active { display: block; }

.topbar {
  background: linear-gradient(135deg, var(--green), var(--bright));
  color: #fff; padding: 16px; position: sticky; top: 0; z-index: 10;
  box-shadow: var(--shadow);
}
.topbar h1 { font-size: 20px; font-weight: 700; letter-spacing: .5px; }
.topbar .sub { font-size: 12px; opacity: .85; margin-top: 2px; }

.card {
  background: #fff; border: 1px solid var(--line); border-radius: 16px;
  padding: 16px; margin-bottom: 12px; box-shadow: var(--shadow);
}
.card h2 { font-size: 16px; font-weight: 700; margin-bottom: 12px; color: var(--green); line-height: 1.4; }
.card h2 .right { float: right; font-weight: 500; font-size: 12px; color: var(--muted); }

.btn {
  display: inline-block; border: none; border-radius: 10px; padding: 10px 18px;
  font-size: 15px; font-weight: 700; background: var(--green); color: #fff; cursor: pointer;
}
.btn:active { opacity: .85; background: var(--bright); }
.btn.block { display: block; width: 100%; text-align: center; padding: 13px; font-size: 16px; }
.btn.secondary { background: #fff; color: var(--green); border: 1px solid var(--bright); }
.btn.ghost { background: transparent; color: var(--bright); padding: 6px 10px; }
.btn.danger { background: var(--red); }
.btn.small { padding: 7px 14px; font-size: 13px; border-radius: 8px; }
.btn:disabled { opacity: .5; }

.entry-row {
  display: grid; grid-template-columns: 1fr 96px 44px 34px; gap: 6px;
  margin-bottom: 6px; align-items: center;
}
.entry-row .note-cell { grid-column: 1 / -1; display: flex; gap: 6px; align-items: center; }
.entry-row .del { background: none; border: none; color: var(--red); font-size: 20px; line-height: 1; }
.voucher-btn {
  width: 44px; height: 42px; border: 1px dashed var(--bright); border-radius: 10px;
  background: var(--soft); color: var(--green); font-size: 18px;
}
.thumbs { display: flex; gap: 6px; flex-wrap: wrap; grid-column: 1 / -1; }
.thumbs img { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }

.totals { display: flex; justify-content: space-between; font-size: 14px; padding: 10px 4px; color: var(--muted); }
.totals b { color: var(--ink); font-size: 17px; font-weight: 700; }

.tabbar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 20;
  display: flex; background: #fff; border-top: 1px solid var(--line);
}
.tabbar button {
  flex: 1; border: none; background: none; padding: 8px 0 10px;
  font-size: 12px; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 2px;
}
.tabbar button .ico { font-size: 20px; }
.tabbar button.active { color: var(--green); font-weight: 700; }

.login-wrap { max-width: 420px; margin: 44px auto; padding: 0 16px; }
.login-wrap .logo { text-align: center; margin-bottom: 20px; }
.login-wrap .logo img { width: 76px; height: 76px; border-radius: 20px; box-shadow: var(--shadow); }
.login-wrap .logo h1 { font-size: 26px; color: var(--ink); margin-top: 10px; font-weight: 800; }
.login-tabs { display: flex; gap: 8px; margin-bottom: 14px; }
.login-tabs button {
  flex: 1; padding: 10px; border: 1px solid var(--line); background: #fff;
  border-radius: 10px; color: var(--muted); font-size: 14px;
}
.login-tabs button.active { border-color: var(--green); color: var(--green); font-weight: 700; background: var(--soft); }
.login-wrap .card > * + * { margin-top: 10px; }
.link-btn { background: none; border: none; color: var(--blue); font-size: 13px; text-align: center; width: 100%; }

.badge { display: inline-block; font-size: 12px; padding: 2px 10px; border-radius: 12px; font-weight: 600; }
.badge.pending { background: var(--yellow); color: var(--orange-deep); }
.badge.done { background: var(--soft); color: var(--green); }

.report-item {
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  padding: 14px; margin-bottom: 8px; box-shadow: var(--shadow);
}
.report-item .line1 { display: flex; justify-content: space-between; align-items: center; }
.report-item .date { font-weight: 700; font-size: 15px; }
.report-item .nums { display: flex; gap: 14px; font-size: 13px; color: var(--muted); margin-top: 6px; }
.report-item .nums b { color: var(--ink); }

.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 14px; box-shadow: var(--shadow); }
.stat .label { font-size: 12px; color: var(--muted); }
.stat .value { font-size: 22px; font-weight: 700; margin-top: 4px; }
.value.pos { color: var(--green); }
.value.neg { color: var(--red); }

.progress-wrap { background: var(--soft); border-radius: 10px; height: 24px; overflow: hidden; position: relative; }
.progress-bar { background: linear-gradient(90deg, var(--green), var(--bright)); height: 100%; border-radius: 10px; transition: width .4s; }
.progress-text { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600; color: var(--ink); }

table.daily { width: 100%; border-collapse: collapse; font-size: 13px; }
table.daily th, table.daily td { padding: 8px 6px; text-align: right; border-bottom: 1px solid var(--line); }
table.daily th:first-child, table.daily td:first-child { text-align: left; }
table.daily th { color: #fff; font-weight: 600; background: var(--navy); }
table.daily th:first-child { border-radius: 8px 0 0 0; }
table.daily th:last-child { border-radius: 0 8px 0 0; }

.modal-mask {
  position: fixed; inset: 0; background: rgba(20,59,54,.45); z-index: 30;
  display: none; align-items: flex-end; justify-content: center;
}
.modal-mask.show { display: flex; }
.modal {
  background: #fff; width: 100%; max-width: 720px; max-height: 85vh; overflow-y: auto;
  border-radius: 20px 20px 0 0; padding: 18px;
}
.modal h3 { font-size: 17px; margin-bottom: 10px; font-weight: 700; color: var(--ink); }
.kv { display: flex; justify-content: space-between; font-size: 14px; padding: 7px 0; border-bottom: 1px dashed var(--line); }
.kv .k { color: var(--muted); }

.set-row { display: grid; grid-template-columns: 1fr 110px 34px; gap: 6px; margin-bottom: 6px; align-items: center; }
.src-row { display: grid; grid-template-columns: 1fr auto 34px; gap: 6px; margin-bottom: 6px; align-items: center; }
.src-row label { font-size: 13px; color: var(--muted); display: flex; gap: 4px; align-items: center; }
.src-row input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--green); }
.form-label { font-size: 13px; color: var(--muted); margin: 12px 0 4px; font-weight: 500; }

.toast {
  position: fixed; top: 60px; left: 50%; transform: translateX(-50%);
  background: rgba(20,59,54,.92); color: #fff; padding: 10px 18px; border-radius: 10px;
  font-size: 14px; z-index: 50; display: none; max-width: 86vw; text-align: center;
}
.toast.show { display: block; }
.empty { text-align: center; color: var(--muted); font-size: 14px; padding: 26px 0; }
.meter-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.meter-box { border: 1px solid var(--line); border-radius: 12px; padding: 12px; background: var(--warm); }
.meter-box .t { font-size: 13px; color: var(--muted); margin-bottom: 6px; font-weight: 500; }

.miss-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: var(--yellow); border: 1px solid var(--orange); border-radius: 14px;
  padding: 12px 14px; margin-bottom: 12px; font-size: 14px; color: var(--orange-deep);
}
.miss-banner .btn { flex-shrink: 0; background: var(--orange); color: #fff; }
#aiCard h2 { color: var(--navy); }
#aiText { white-space: pre-wrap; }

.login-sys {
  display: inline-block; margin-top: 10px; padding: 3px 16px 3px 20px;
  border-radius: 999px; background: var(--soft); border: 1px solid var(--line);
  color: var(--green); font-size: 13px; font-weight: 700; letter-spacing: 4px;
}

/* 快捷点选 chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.chip {
  padding: 8px 16px; border-radius: 999px; border: 1px solid var(--bright);
  background: var(--soft); color: var(--green); font-size: 14px; font-weight: 600;
  cursor: pointer; font-family: inherit;
}
.chip:active { background: var(--green); color: #fff; }

/* 设置页收纳面板 */
details.card summary {
  list-style: none; cursor: pointer; font-size: 16px; font-weight: 700;
  color: var(--green); display: flex; align-items: center; justify-content: space-between;
}
details.card summary::-webkit-details-marker { display: none; }
details.card summary::after {
  content: "＋"; color: var(--muted); font-weight: 400; font-size: 18px;
}
details.card[open] summary::after { content: "－"; }
details.card[open] summary { margin-bottom: 12px; }
