:root {
  --primary: #2563eb;
  --bg-page: #f8f9fa;
  --bg-card: #ffffff;
  --text-main: #1f2937;
  --text-muted: #6b7280;
  --border: #e5e7eb;
  --primary-green: #10b981;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
  color: #1f2937;
  background: #f5f6f8;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

button, input, select, textarea {
  font: inherit;
}

.page {
  min-height: 100vh;
  padding: 16px 16px 80px;
}

.container {
  max-width: 1000px;
  margin: 0 auto;
}

.card {
  background: #fff;
  border-radius: 10px;
  padding: 16px;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
}

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

.section-title {
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 12px;
}

.row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.row.space-between {
  justify-content: space-between;
}

.muted {
  color: #6b7280;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  background: #eef2f7;
  color: #475569;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 12px;
  background: #f1f5f9;
  color: #475569;
}

.list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.list-item {
  padding: 12px 0;
  border-bottom: 1px solid #e5e7eb;
}

.list-item:last-child {
  border-bottom: none;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: #e5e7eb;
  color: #1f2937;
  cursor: pointer;
}

.btn-primary {
  background: #2563eb;
  color: #fff;
}

.btn-danger {
  background: #ef4444;
  color: #fff;
}

.btn-outline {
  background: #fff;
  border-color: #e5e7eb;
}

.input, .select, .textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  background: #fff;
  color: #111827;
}

.field {
  margin-bottom: 12px;
}

.label {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  color: #374151;
}

.error {
  color: #dc2626;
  font-size: 13px;
}

.empty {
  text-align: center;
  color: #9ca3af;
  padding: 20px 0;
}

.progress {
  position: relative;
  height: 8px;
  border-radius: 999px;
  background: #e5e7eb;
  overflow: hidden;
}

.progress-bar {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  background: #ef4444;
}

.progress-bg {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  background: #16a34a;
  opacity: 0.3;
}

.app-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  padding: 10px 12px;
  background: #fff;
  border-top: 1px solid var(--border);
  z-index: 100;
  box-shadow: 0 -1px 3px rgba(0,0,0,0.02);
}

.app-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--text-muted);
  text-decoration: none;
  padding: 8px 4px;
  transition: color 0.2s;
}

.app-nav-item.active {
  color: var(--primary);
  font-weight: 500;
}

.image-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  color: #fff;
  font-size: 32px;
  cursor: pointer;
  z-index: 10001;
}

.image-modal-container {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  touch-action: none;
}

.image-modal img {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
  transition: transform 0.2s;
  user-select: none;
  -webkit-user-drag: none;
}

.image-modal-indicator {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.8);
  background: rgba(0, 0, 0, 0.5);
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 14px;
  pointer-events: none;
}
