:root {
  --primary: #C62828;
  --primary-dark: #8E1B1B;
  --border: #e0e0e0;
  --bg: #f5f5f5;
  --muted: #888;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: #333;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}
.topbar {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: #fff;
  padding: 14px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 10;
}
.brand { font-size: 18px; font-weight: 700; }
.sub { font-size: 12px; opacity: 0.85; }
.searchbar {
  background: #fff;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 50px;
  z-index: 9;
}
.container {
  max-width: 640px;
  margin: 0 auto;
  padding: 14px 12px 80px;
}
.card {
  background: #fff;
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.section-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 10px;
}
.tag {
  display: inline-block;
  background: #f0e0e0;
  color: var(--primary-dark);
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 10px;
}
.chip {
  display: inline-block;
  background: #f5f5f5;
  border: 1px solid var(--border);
  color: #555;
  font-size: 13px;
  padding: 6px 12px;
  border-radius: 16px;
  text-decoration: none;
}
.spin {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid #e0e0e0;
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  flex-shrink: 0;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
.btn {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 10px 18px;
  font-size: 15px;
  text-decoration: none;
  cursor: pointer;
  margin-top: 8px;
}
.btn:active { opacity: 0.85; }
.muted { color: var(--muted); font-size: 13px; }
.flash {
  background: #fff3cd;
  color: #856404;
  padding: 10px 14px;
  border-radius: 8px;
  margin-bottom: 12px;
  font-size: 14px;
}
.flash div { margin: 2px 0; }
.login-wrap {
  max-width: 360px;
  margin: 60px auto 0;
  padding: 24px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}
input[type="text"], input[type="password"], input[type="date"], select, textarea {
  font-family: inherit;
  color: #333;
}
.bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: #fff;
  border-top: 1px solid var(--border);
  display: flex;
  padding: 8px 0 6px;
  z-index: 10;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.04);
  max-width: 640px;
  margin: 0 auto;
}
.bottom-nav a {
  text-decoration: none;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
  flex: 1;
}
.bottom-nav a .icon { font-size: 22px; display: block; margin-bottom: 2px; }
.bottom-nav a.active { color: var(--primary); font-weight: 600; }
.topbar .logo { font-size: 26px; }
.page-title { font-size: 20px; font-weight: 700; margin-bottom: 14px; }
.btn-block { display: block; width: 100%; }
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: 14px; margin-bottom: 7px; color: #555; font-weight: 500; }
.form-group input, .form-group select {
  width: 100%;
  padding: 13px;
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 16px;
  box-sizing: border-box;
}
.timeline {
  position: relative;
  padding-left: 20px;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 4px; bottom: 4px;
  width: 2px;
  background: var(--border);
}
.timeline-item {
  position: relative;
}
.timeline-item::before {
  content: '';
  position: absolute;
  left: -20px;
  top: 7px;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--primary);
}
.timeline-date {
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 4px;
}
.timeline-content {
  background: #fff;
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 14px;
  white-space: pre-wrap;
  line-height: 1.6;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  margin-bottom: 14px;
}
.checkin-tag {
  display: inline-block;
  font-size: 12px;
  color: #C62828;
  background: #fdf0f0;
  border-radius: 6px;
  padding: 3px 8px;
  margin: 6px 0 14px 0;
}
.checkin-tag.rest {
  color: #B26A00;
  background: #FDF3E7;
}
