:root {
  color-scheme: light;
  --primary: #1677ff;
  --primary-dark: #0958d9;
  --bg: #f5f7fb;
  --card: #ffffff;
  --text: #172033;
  --muted: #697386;
  --line: #e8edf5;
  --green: #16a34a;
  --orange: #f59e0b;
  --red: #ef4444;
  --shadow: 0 12px 30px rgba(31, 45, 61, .08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
}
button, input, select { font: inherit; }
button { cursor: pointer; border: 0; }

.app-shell {
  max-width: 760px;
  min-height: 100vh;
  margin: 0 auto;
  padding-bottom: calc(72px + env(safe-area-inset-bottom));
}

.hero {
  padding: 28px 18px 22px;
  color: white;
  background:
    radial-gradient(circle at 85% 10%, rgba(255,255,255,.24), transparent 28%),
    linear-gradient(135deg, #1677ff 0%, #0f4fd6 55%, #07318f 100%);
  border-radius: 0 0 28px 28px;
}
.eyebrow {
  display: inline-flex;
  padding: 6px 10px;
  border: 1px solid rgba(255,255,255,.34);
  border-radius: 999px;
  font-size: 12px;
  opacity: .92;
}
.hero h1 {
  margin: 16px 0 8px;
  font-size: clamp(25px, 7vw, 38px);
  line-height: 1.15;
  letter-spacing: -.5px;
}
.hero p {
  margin: 0 0 18px;
  color: rgba(255,255,255,.86);
  line-height: 1.6;
}
.search-box {
  display: flex;
  gap: 8px;
  padding: 8px;
  background: rgba(255,255,255,.16);
  border: 1px solid rgba(255,255,255,.24);
  border-radius: 18px;
  backdrop-filter: blur(12px);
}
.search-box input {
  min-width: 0;
  flex: 1;
  padding: 13px 12px;
  border: 0;
  border-radius: 13px;
  outline: none;
}
.search-box button, .form-card button, .toolbar button {
  padding: 0 16px;
  color: white;
  background: #102a62;
  border-radius: 13px;
  font-weight: 700;
}

main { padding: 14px; }
.notice-card {
  margin-top: -4px;
  padding: 14px;
  background: #fff7e6;
  border: 1px solid #ffe1a6;
  border-radius: 18px;
  color: #7a4b00;
  line-height: 1.55;
}
.quick-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0;
}
.quick {
  min-height: 58px;
  padding: 10px 8px;
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 6px 18px rgba(31,45,61,.05);
}
.quick.active { border-color: var(--primary); color: var(--primary); font-weight: 700; }

.panel { display: none; }
.panel.active { display: block; animation: fade .18s ease-out; }
@keyframes fade { from { opacity: .4; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.section-title { margin: 20px 2px 10px; }
.section-title h2 { margin: 0 0 4px; font-size: 21px; }
.section-title span { color: var(--muted); font-size: 13px; }
.card-list { display: grid; gap: 12px; }
.card {
  padding: 15px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow);
}
.card h3 { margin: 0 0 8px; font-size: 18px; }
.card p { margin: 8px 0; color: #344054; line-height: 1.65; }
.tags { display: flex; flex-wrap: wrap; gap: 7px; margin: 10px 0; }
.tag {
  padding: 4px 8px;
  color: var(--primary-dark);
  background: #eaf3ff;
  border-radius: 999px;
  font-size: 12px;
}
.meta { color: var(--muted); font-size: 13px; }
.actions { display: flex; gap: 8px; margin-top: 12px; }
.actions button {
  padding: 9px 11px;
  color: var(--primary-dark);
  background: #edf5ff;
  border-radius: 12px;
  font-weight: 700;
}
.actions .danger { color: #b42318; background: #fff0ee; }

.form-card {
  display: grid;
  gap: 12px;
  padding: 15px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow);
}
.form-card label { display: grid; gap: 6px; color: var(--muted); font-size: 13px; }
.form-card input, .form-card select {
  width: 100%;
  padding: 13px 12px;
  border: 1px solid var(--line);
  border-radius: 13px;
  outline: none;
  background: white;
  color: var(--text);
}
.form-card button { min-height: 46px; background: var(--primary); }
.compact-form { grid-template-columns: 1fr; }
.toolbar { display: flex; gap: 10px; margin: 12px 0; }
.toolbar button { min-height: 40px; background: var(--primary); }
.toolbar .ghost { color: var(--text); background: #e9eef7; }
.empty { color: var(--muted); text-align: center; padding: 22px 12px; }

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  width: min(760px, 100%);
  transform: translateX(-50%);
  padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
  background: rgba(255,255,255,.92);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(12px);
}
.bottom-nav button {
  padding: 9px 2px;
  background: transparent;
  color: var(--muted);
  border-radius: 12px;
  font-size: 13px;
}
.bottom-nav button.active { color: var(--primary); background: #eef6ff; font-weight: 800; }

@media (min-width: 680px) {
  .quick-grid { grid-template-columns: repeat(6, 1fr); }
  .compact-form { grid-template-columns: 1.1fr 1fr .55fr auto; align-items: end; }
}

@media (prefers-color-scheme: dark) {
  :root { color-scheme: dark; --bg: #101522; --card: #171d2b; --text: #eef3ff; --muted: #aab5c8; --line: #2b3448; --shadow: 0 12px 30px rgba(0,0,0,.22); }
  .notice-card { background: #2b210d; border-color: #5c4315; color: #ffd98a; }
  .form-card input, .form-card select { background: #111827; color: var(--text); }
  .bottom-nav { background: rgba(17,24,39,.92); }
  .card p { color: #d7deec; }
}
