:root {
  --bg: #f4f6fb;
  --card: #ffffff;
  --text: #1d2330;
  --muted: #6b7280;
  --line: #e5e8ef;
  --primary: #2f6bff;
  --primary-dark: #1f4fd0;
  --pass: #16a34a;
  --fail: #dc2626;
  --radius: 16px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", system-ui, -apple-system, sans-serif;
  background: linear-gradient(180deg, #eef2ff 0%, var(--bg) 45%);
  color: var(--text);
  line-height: 1.6;
  padding: 32px 16px 56px;
  display: flex;
  justify-content: center;
}

main.card {
  width: 100%;
  max-width: 720px;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: 0 12px 40px rgba(23, 37, 84, 0.08);
  padding: 32px 28px 28px;
}

h1 {
  margin: 0 0 12px;
  font-size: 26px;
  letter-spacing: 0.5px;
}

p.desc {
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 15px;
}

p.desc b { color: var(--text); }

.shots {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 28px;
}

.shots figure {
  margin: 0;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}

.shots img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background: #e9edf5;
}

.shots figcaption {
  font-size: 13px;
  color: var(--muted);
  padding: 8px 12px;
  text-align: center;
  border-top: 1px solid var(--line);
}

label {
  display: block;
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 8px;
}

input[type="text"],
input[type="password"] {
  width: 100%;
  padding: 13px 14px;
  font-size: 16px;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: none;
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
}

input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(47, 107, 255, 0.14);
}

.hint {
  min-height: 20px;
  margin: 8px 0 4px;
  font-size: 13px;
  color: var(--fail);
}

button {
  font: inherit;
  border: 0;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s, opacity 0.15s, transform 0.05s;
}

button:active { transform: translateY(1px); }
button:disabled { opacity: 0.6; cursor: not-allowed; }

button.primary {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 13px 16px;
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  background: var(--primary);
}

button.primary:hover:not(:disabled) { background: var(--primary-dark); }

button.ghost {
  padding: 7px 14px;
  font-size: 14px;
  color: var(--text);
  background: #f1f3f8;
}

button.ghost:hover { background: #e6e9f2; }

button.ghost.danger { color: var(--fail); }

.section { display: none; }
.section.active { display: block; }

.status-text {
  margin: 12px 0 0;
  font-size: 15px;
  color: var(--muted);
  text-align: center;
}

.spinner {
  width: 38px;
  height: 38px;
  margin: 8px auto 0;
  border: 4px solid #e6eaf3;
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

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

.badge {
  margin: 8px auto 0;
  padding: 22px 0;
  border-radius: 12px;
  font-size: 30px;
  font-weight: 700;
  letter-spacing: 2px;
  text-align: center;
}

.badge.pass {
  color: var(--pass);
  background: #eafaf0;
  border: 1px solid #bfeacb;
}

.badge.fail {
  color: var(--fail);
  background: #fdeeee;
  border: 1px solid #f4caca;
}

button.primary.outline {
  width: auto;
  min-width: 160px;
  margin: 20px auto 0;
  color: var(--primary);
  background: #fff;
  border: 1px solid var(--primary);
}

button.primary.outline:hover { background: #f2f6ff; }

/* 通过后展示用户提交的内容 */
.submitted {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 18px auto 0;
  padding: 12px 16px;
  border-radius: 10px;
  background: #f5f8ff;
  border: 1px dashed #cfdcf7;
}

.submitted-label {
  font-size: 13px;
  color: var(--muted);
}

.submitted-value {
  font-size: 16px;
  font-weight: 700;
  word-break: break-all;
}

/* ---------- 后台页 ---------- */
.toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.toolbar .grow { flex: 1; }

.stats {
  display: flex;
  gap: 16px;
  font-size: 13px;
  color: var(--muted);
  margin-left: auto;
}

.stats b { color: var(--text); }

.login-box {
  max-width: 380px;
  margin: 0 auto;
  padding: 40px 0 20px;
  text-align: center;
}

.login-box h2 {
  margin: 0 0 8px;
  font-size: 20px;
}

.login-box input { margin-bottom: 12px; }

.list { display: grid; gap: 12px; }

.item {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
  background: #fff;
}

.item.pending { border-left: 4px solid var(--primary); }
.item.approved { border-left: 4px solid var(--pass); opacity: 0.75; }
.item.rejected { border-left: 4px solid var(--fail); opacity: 0.75; }

.item-head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.item-name {
  font-size: 18px;
  font-weight: 700;
  word-break: break-all;
}

.tag {
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #eef2ff;
  color: var(--primary);
}

.tag.approved { background: #eafaf0; color: var(--pass); }
.tag.rejected { background: #fdeeee; color: var(--fail); }

.item-meta {
  margin-top: 6px;
  font-size: 13px;
  color: var(--muted);
  word-break: break-all;
}

.item-actions {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}

.empty {
  padding: 40px 0;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

@media (max-width: 560px) {
  body { padding: 16px 10px 40px; }
  main.card { padding: 22px 18px 20px; }
  h1 { font-size: 22px; }
  .shots { gap: 10px; }
  .badge { font-size: 24px; }
  .stats { width: 100%; margin-left: 0; }
}
