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

:root {
  --bg: #f4f5f7;
  --card: #ffffff;
  --line: #e8eaed;
  --line-soft: #f0f1f3;
  --primary: #014db2;
  --primary-dark: #013a87;
  --primary-soft: #eaf1fb;
  --text: #0a1628;
  --text-2: #6b7280;
  --text-3: #9aa1ac;
  --ok: #0e9f6e;
  --ok-soft: #e9f7f0;
  --warn: #b45309;
  --warn-soft: #fff8ec;
  --danger: #dc2626;
  --danger-soft: #fef2f2;
  --r: 16px;
  --r-sm: 10px;
  --r-lg: 20px;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei',
    'Noto Sans SC', sans-serif;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

#app {
  max-width: 430px;
  margin: 0 auto;
  min-height: 100vh;
  position: relative;
  padding-bottom: 12px;
}

.topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px 10px;
}

.topbar h1 {
  font-size: 19px;
  font-weight: 600;
  margin: 0;
  flex: 1;
  letter-spacing: -0.2px;
}

.back {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: transparent;
  border: none;
  padding: 0;
  flex: none;
  transition: background 0.15s;
}

.back:hover {
  background: #eceff3;
}

.back svg {
  display: block;
}

.page {
  padding: 4px 20px 96px;
}

.page-plain {
  padding-bottom: 24px;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 15px;
}

.card + .card {
  margin-top: 12px;
}

.stack > * + * {
  margin-top: 14px;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 22px 0 10px;
}

.section-head h2 {
  font-size: 15px;
  font-weight: 600;
  margin: 0;
}

.section-head .link {
  font-size: 13px;
  color: var(--primary);
  cursor: pointer;
}

.hero {
  border-radius: var(--r-lg);
  padding: 18px 20px;
  color: #fff;
  background: linear-gradient(135deg, #014db2 0%, #022e5e 100%);
}

.hero .label {
  font-size: 12.5px;
  opacity: 0.72;
}

.hero .value {
  display: flex;
  align-items: baseline;
  gap: 7px;
  margin: 4px 0 10px;
}

.hero .value b {
  font-size: 34px;
  font-weight: 600;
  line-height: 1.1;
}

.hero .value span {
  font-size: 13px;
  opacity: 0.72;
}

.track {
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.22);
  overflow: hidden;
}

.track i {
  display: block;
  height: 100%;
  border-radius: 3px;
  background: #fff;
  transition: width 0.4s ease;
}

.hero .meta {
  font-size: 11.5px;
  opacity: 0.62;
  margin-top: 10px;
}

.entry-row {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}

.entry {
  flex: 1;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 14px;
  cursor: pointer;
  transition: border-color 0.15s, transform 0.1s;
  text-align: left;
}

.entry:hover {
  border-color: #c9d3e0;
}

.entry:active {
  transform: scale(0.985);
}

.entry .ico {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: var(--primary-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 9px;
}

.entry .t {
  font-size: 14px;
  font-weight: 500;
}

.entry .s {
  font-size: 11.5px;
  color: var(--text-3);
  margin-top: 2px;
}

.notice {
  display: flex;
  gap: 9px;
  padding: 12px 13px;
  border-radius: 13px;
  font-size: 12.5px;
  line-height: 1.55;
  align-items: flex-start;
}

.notice svg {
  flex: none;
  margin-top: 2px;
}

.notice-info {
  background: var(--primary-soft);
  color: var(--primary);
}

.notice-warn {
  background: var(--warn-soft);
  color: var(--warn);
}

.notice-ok {
  background: var(--ok-soft);
  color: var(--ok);
}

.notice-danger {
  background: var(--danger-soft);
  color: var(--danger);
}

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

.list-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
  cursor: pointer;
  transition: background 0.15s;
}

.list-row:hover {
  background: #fafbfc;
}

.list-row + .list-row {
  border-top: 1px solid var(--line-soft);
}

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

.list-row .t {
  font-size: 13.5px;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.list-row .s {
  font-size: 11.5px;
  color: var(--text-3);
  margin-top: 3px;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 7px;
  font-size: 10.5px;
  font-weight: 500;
  white-space: nowrap;
  flex: none;
}

.tag-blue {
  background: var(--primary-soft);
  color: var(--primary);
}

.tag-green {
  background: var(--ok-soft);
  color: var(--ok);
}

.tag-amber {
  background: var(--warn-soft);
  color: var(--warn);
}

.tag-gray {
  background: var(--line-soft);
  color: var(--text-2);
}

.tag-red {
  background: var(--danger-soft);
  color: var(--danger);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: none;
  border-radius: 13px;
  font-size: 15px;
  font-weight: 500;
  height: 48px;
  padding: 0 18px;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s, opacity 0.15s;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover {
  background: var(--primary-dark);
}

.btn-ghost {
  background: #eceff3;
  color: var(--text-2);
}

.btn-ghost:hover {
  background: #e2e6eb;
}

.btn-white {
  background: #fff;
  color: var(--text);
  border: 1px solid var(--line);
}

.btn-block {
  width: 100%;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-row {
  display: flex;
  gap: 10px;
}

.btn-row .btn {
  flex: 1;
}

.btn-row .btn.fixed {
  flex: none;
  width: 116px;
}

.field {
  margin-bottom: 14px;
}

.field label {
  display: block;
  font-size: 12.5px;
  color: var(--text-2);
  margin-bottom: 6px;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 13px;
  font-size: 15px;
  font-family: inherit;
  color: var(--text);
  background: #fff;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  line-height: 1.6;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(1, 77, 178, 0.1);
}

.field textarea {
  resize: vertical;
  min-height: 132px;
}

.field .hint {
  font-size: 11.5px;
  color: var(--text-3);
  margin-top: 6px;
}

.field-inline {
  display: flex;
  gap: 10px;
}

.field-inline > * {
  flex: 1;
}

.chip-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.chip {
  padding: 7px 12px;
  border-radius: 100px;
  border: 1px solid var(--line);
  background: #fff;
  font-size: 12.5px;
  color: var(--text-2);
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
}

.chip:hover {
  border-color: #c9d3e0;
}

.chip.on {
  background: var(--primary-soft);
  border-color: var(--primary);
  color: var(--primary);
  font-weight: 500;
}

.review-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 14px;
  transition: border-color 0.15s;
}

.review-card.on {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(1, 77, 178, 0.07);
}

.review-card + .review-card {
  margin-top: 12px;
}

.review-head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.check {
  width: 21px;
  height: 21px;
  border-radius: 7px;
  border: 1.5px solid #cfd6de;
  flex: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
  transition: all 0.15s;
  background: #fff;
}

.check.on {
  background: var(--primary);
  border-color: var(--primary);
}

.review-head .t {
  font-size: 13.5px;
  font-weight: 500;
  flex: 1;
}

.quote {
  background: var(--bg);
  border-radius: var(--r-sm);
  padding: 10px 12px;
  font-size: 12.5px;
  color: var(--text-2);
  margin-top: 10px;
  line-height: 1.6;
}

.quote em {
  font-style: normal;
  color: var(--text-3);
  font-size: 11px;
  display: block;
  margin-bottom: 3px;
}

.statement {
  font-size: 13.5px;
  line-height: 1.75;
  color: var(--text);
  margin-top: 10px;
  padding-left: 11px;
  border-left: 2.5px solid var(--primary-soft);
}

.dim-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.dim-row .lbl {
  font-size: 12px;
  color: var(--text-2);
}

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

.block + .block {
  margin-top: 12px;
}

.block-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 15px;
  cursor: pointer;
}

.block-head .t {
  font-size: 14px;
  font-weight: 500;
  flex: 1;
}

.block-head .s {
  font-size: 11.5px;
  color: var(--text-3);
  margin-top: 2px;
}

.block-body {
  padding: 0 15px 15px;
}

.block textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  font-size: 13.5px;
  line-height: 1.75;
  font-family: inherit;
  color: var(--text);
  resize: vertical;
  min-height: 120px;
  outline: none;
}

.block textarea:focus {
  border-color: var(--primary);
}

.block-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
  font-size: 11.5px;
  color: var(--text-3);
}

.count-ok {
  color: var(--ok);
}

.count-over {
  color: var(--danger);
  font-weight: 500;
}

.mini-btn {
  background: none;
  border: none;
  color: var(--primary);
  font-size: 12px;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 7px;
  font-family: inherit;
}

.mini-btn:hover {
  background: var(--primary-soft);
}

.tabbar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 430px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
  display: flex;
  padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
  z-index: 30;
}

.tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 6px 0;
  cursor: pointer;
  color: var(--text-3);
  font-size: 10.5px;
  border-radius: 12px;
  transition: color 0.15s;
  background: none;
  border: none;
  font-family: inherit;
}

.tab.on {
  color: var(--primary);
  font-weight: 500;
}

.tab svg {
  display: block;
}

.toast-wrap {
  position: fixed;
  left: 50%;
  bottom: 96px;
  transform: translateX(-50%);
  z-index: 90;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  pointer-events: none;
  width: 100%;
  max-width: 400px;
  padding: 0 20px;
}

.toast {
  background: rgba(10, 22, 40, 0.92);
  color: #fff;
  font-size: 13px;
  padding: 10px 16px;
  border-radius: 12px;
  animation: slideUp 0.24s ease;
  max-width: 100%;
  text-align: center;
  line-height: 1.5;
}

.toast.err {
  background: rgba(190, 30, 30, 0.94);
}

.toast.ok {
  background: rgba(8, 120, 80, 0.94);
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.sheet-mask {
  position: fixed;
  inset: 0;
  background: rgba(10, 22, 40, 0.42);
  z-index: 100;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  animation: fade 0.2s ease;
}

@keyframes fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.sheet {
  background: #fff;
  width: 100%;
  max-width: 430px;
  border-radius: 22px 22px 0 0;
  padding: 20px 20px calc(24px + env(safe-area-inset-bottom));
  animation: slideUp 0.26s cubic-bezier(0.2, 0.8, 0.2, 1);
  max-height: 86vh;
  overflow-y: auto;
}

.sheet h3 {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 16px;
}

.empty {
  text-align: center;
  padding: 44px 20px;
  color: var(--text-3);
}

.empty .t {
  font-size: 14px;
  color: var(--text-2);
  margin-bottom: 5px;
}

.empty .s {
  font-size: 12.5px;
}

.spin {
  width: 15px;
  height: 15px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.skeleton {
  background: linear-gradient(90deg, #eef0f3 25%, #f6f7f9 50%, #eef0f3 75%);
  background-size: 200% 100%;
  animation: shimmer 1.3s infinite;
  border-radius: 8px;
  height: 14px;
}

@keyframes shimmer {
  to {
    background-position: -200% 0;
  }
}

.muted {
  color: var(--text-3);
  font-size: 12.5px;
}

.center {
  text-align: center;
}

.stack-8 > * + * {
  margin-top: 8px;
}

.stack-10 > * + * {
  margin-top: 10px;
}

.stack-12 > * + * {
  margin-top: 12px;
}

.avatar {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  background: var(--primary-soft);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 600;
  flex: none;
}

.divider {
  height: 1px;
  background: var(--line-soft);
  margin: 14px 0;
}

.stat-grid {
  display: flex;
  gap: 10px;
}

.stat {
  flex: 1;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 13px;
  text-align: center;
}

.stat b {
  display: block;
  font-size: 21px;
  font-weight: 600;
  line-height: 1.3;
}

.stat span {
  font-size: 11.5px;
  color: var(--text-3);
}
