:root {
  --surface: #ffffff;
  --surface-muted: #f4f7f5;
  --surface-soft: #edf3ef;
  --text: #1d2924;
  --text-muted: #697871;
  --line: #dbe5df;
  --primary: #176b57;
  --primary-strong: #105443;
  --accent: #d85b35;
  --warning: #a96618;
  --danger: #ad443c;
  --info: #2e6f9f;
  --shadow-sm: 0 3px 12px rgba(25, 48, 40, .06);
  --shadow-md: 0 10px 28px rgba(25, 48, 40, .10);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { min-width: 320px; background: var(--surface-muted); }
body {
  min-height: 100vh;
  background: var(--surface-muted);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Microsoft YaHei", sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid rgba(23, 107, 87, .18);
  outline-offset: 2px;
}

.container { width: 100%; max-width: 680px; margin: 0 auto; padding: 18px 16px 88px; }
.card {
  margin-bottom: 16px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.card-title { margin-bottom: 12px; color: #17362f; font-size: 19px; font-weight: 750; line-height: 1.35; }

.btn {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
  cursor: pointer;
  transition: background-color .16s ease, border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}
.btn:hover { box-shadow: 0 4px 12px rgba(25, 48, 40, .10); }
.btn:active { transform: translateY(1px); }
.btn-primary { border-color: var(--primary); background: var(--primary); color: #fff; }
.btn-primary:hover { border-color: var(--primary-strong); background: var(--primary-strong); }
.btn-block { width: 100%; }
.btn-small { min-height: 34px; padding: 6px 12px; font-size: 12px; }
.btn-disabled, .btn:disabled { border-color: #d8dfdb; background: #e8ecea; color: #89938e; box-shadow: none; cursor: not-allowed; }

.badge { display: inline-flex; align-items: center; min-height: 22px; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.badge-success { background: #e4f2ea; color: #176b51; }
.badge-warning { background: #fff1db; color: #9a5c13; }
.badge-info { background: #e6f0f8; color: #286792; }

.input {
  width: 100%;
  min-height: 44px;
  padding: 9px 12px;
  border: 1px solid #cbd8d1;
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  font-size: 14px;
  outline: none;
  transition: border-color .16s ease, box-shadow .16s ease;
}
.input::placeholder { color: #98a39e; }
.input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(23, 107, 87, .10); }

.toast {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 9999;
  display: none;
  max-width: min(86vw, 420px);
  padding: 12px 18px;
  border-radius: 7px;
  background: rgba(25, 35, 31, .92);
  box-shadow: 0 12px 32px rgba(0, 0, 0, .20);
  color: #fff;
  font-size: 14px;
  line-height: 1.5;
  text-align: center;
  transform: translate(-50%, -50%);
}

.bottom-nav {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 100;
  display: flex;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, .97);
  box-shadow: 0 -4px 18px rgba(25, 48, 40, .07);
}
.bottom-nav .nav-item { flex: 1; padding: 10px 4px; color: var(--text-muted); font-size: 12px; text-align: center; cursor: pointer; }
.bottom-nav .nav-item.active { color: var(--primary); font-weight: 750; }

.subpage { position: fixed; inset: 0; z-index: 200; display: none; overflow-y: auto; background: var(--surface-muted); }
.subpage .back-bar, .back-bar {
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, .97);
  color: #294b42;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}
.subpage .back-bar .arrow, .back-bar .arrow { font-size: 20px; line-height: 1; }

.skeleton { border-radius: 6px; background: linear-gradient(90deg, #edf1ef 25%, #dde5e1 50%, #edf1ef 75%); background-size: 200% 100%; animation: shimmer 1.5s infinite; }
@keyframes shimmer { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }
.empty-state {
  padding: 34px 18px;
  border: 1px dashed #cfdbd4;
  border-radius: 8px;
  background: rgba(255, 255, 255, .72);
  color: #78867f;
  font-size: 13px;
  line-height: 1.6;
  text-align: center;
}

@media (max-width: 420px) {
  .container { padding-right: 12px; padding-left: 12px; }
  .card { padding: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
