* { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 14px; -webkit-text-size-adjust: 100%; }
body {
  font-family: "PingFang TC", "Microsoft JhengHei", "Noto Sans TC", sans-serif;
  background: #f5f7fb;
  color: #222;
  min-height: 100vh;
  line-height: 1.5;
}
a { color: #1f5fd6; text-decoration: none; }
.clear { clear: both; }

/* 顶栏 */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: #fff;
  border-bottom: 1px solid #e6ebf2;
}
.site-header .brand {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #1a2b4a;
}
.site-header .brand small {
  display: block;
  font-size: 11px;
  font-weight: 400;
  color: #8a97ab;
  margin-top: 2px;
}
.btn-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 0 18px;
  border-radius: 999px;
  background: linear-gradient(180deg, #3d7dff 0%, #1f4fd6 100%);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  border: none;
  box-shadow: 0 4px 12px rgba(31, 79, 214, 0.25);
}

/* 标题横幅 */
.hero {
  background: linear-gradient(135deg, #2b6de0 0%, #1f54b8 100%);
  padding: 22px 16px 20px;
  text-align: center;
}
.hero h1 {
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 6px;
}
.hero p {
  font-size: 12px;
  color: rgba(255,255,255,0.9);
}

/* 滚动提醒 */
.notice {
  background: #fff;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 600;
  color: #c62828;
  border-bottom: 1px solid #f0f2f6;
}

/* 区块标题 */
.section-title {
  margin: 16px 12px 0;
  padding: 12px 14px;
  background: linear-gradient(90deg, #1f5fd6, #2f78ef);
  border-radius: 10px 10px 0 0;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
}
.section-title .icon {
  width: 22px;
  height: 22px;
  border-radius: 4px;
  background: rgba(255,255,255,0.2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}

.panel {
  margin: 0 12px 8px;
  background: #fff;
  border: 1px solid #e6ebf2;
  border-top: none;
  border-radius: 0 0 10px 10px;
  padding: 14px 14px 18px;
  box-shadow: 0 2px 8px rgba(20, 40, 80, 0.04);
}

.stats {
  text-align: center;
  color: #66788f;
  font-size: 13px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px dashed #dce3ee;
}
.stats .n { color: #1f5fd6; font-weight: 700; }
.stats .n.red { color: #e53935; }

.field {
  margin-bottom: 14px;
}
.field > label {
  display: block;
  color: #4a5b72;
  font-size: 13px;
  margin-bottom: 6px;
}
.field > label .req { color: #e53935; margin-right: 2px; }

.field input[type="text"],
.field input[type="date"],
.field input[type="number"],
.field input[type="file"],
.field select,
.field textarea {
  width: 100%;
  height: 44px;
  border-radius: 8px;
  border: 1px solid #cfd8e6;
  background: #fff;
  color: #1a1a1a;
  padding: 0 12px;
  font-size: 14px;
  outline: none;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: #3d7dff;
  box-shadow: 0 0 0 3px rgba(61, 125, 255, 0.12);
}
.field textarea {
  height: 80px;
  padding: 10px 12px;
  resize: vertical;
}
.field input[type="file"] {
  padding: 10px 12px;
  background: #f8fafc;
  color: #333;
}
.field select { appearance: auto; }
.field .hint {
  margin-top: 4px;
  font-size: 12px;
  color: #8a97ab;
}
.radios {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  padding-top: 4px;
  color: #333;
}
.radios label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.sub-head {
  margin: 6px 0 12px;
  padding: 8px 10px;
  background: #f0f5ff;
  border-left: 3px solid #1f5fd6;
  color: #1a3a6e;
  font-size: 13px;
  font-weight: 600;
}

.tip-red {
  color: #e53935;
  font-size: 13px;
  text-align: center;
  margin: 8px 0 14px;
}

.btn-submit {
  display: block;
  width: 100%;
  height: 48px;
  border: none;
  border-radius: 28px;
  background: linear-gradient(180deg, #3d8bff, #1f5fd6);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(31, 95, 214, 0.28);
}
.btn-submit:active { transform: scale(0.98); }

/* 名册表格 */
.list-head {
  display: flex;
  background: #f0f5ff;
  color: #4a5b72;
  font-size: 12px;
  font-weight: 600;
  padding: 10px 0;
  text-align: center;
  border-radius: 6px;
}
.list-head > div, .list-row > div {
  flex-shrink: 0;
  padding: 0 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.col-name { width: 28%; }
.col-ci { width: 24%; }
.col-date { width: 24%; }
.col-exp { width: 24%; }

.list-scroll {
  height: 280px;
  overflow: hidden;
  position: relative;
}
.list-row {
  display: flex;
  padding: 11px 0;
  font-size: 12px;
  text-align: center;
  color: #333;
  border-bottom: 1px solid #eef2f7;
}
.list-row:nth-child(even) { background: #f8fafc; }
.badge-ok {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  background: #e8f8ef;
  color: #1b7a45;
  font-size: 11px;
}
.badge-wait {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  background: #fff6e0;
  color: #9a6b00;
  font-size: 11px;
}
.empty-list {
  text-align: center;
  color: #8a97ab;
  padding: 40px 10px;
  font-size: 13px;
}

.footer {
  text-align: center;
  padding: 24px 12px 32px;
  color: #8a97ab;
  font-size: 12px;
}

/* 密码锁弹层 */
.lock-mask {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 9999;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 12vh;
}
.lock-box {
  width: 86%;
  max-width: 360px;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  color: #222;
  box-shadow: 0 12px 40px rgba(0,0,0,0.2);
}
.lock-box .hd {
  height: 50px;
  line-height: 50px;
  background: #efefef;
  padding: 0 5%;
  font-size: 16px;
  font-weight: 700;
}
.lock-box .bd {
  padding: 28px 5% 30px;
}
.lock-box input {
  width: 100%;
  height: 42px;
  border: 1px solid #ccc;
  padding: 0 12px;
  font-size: 14px;
  border-radius: 4px;
  margin-bottom: 22px;
}
.lock-box .ok {
  height: 48px;
  line-height: 48px;
  text-align: center;
  background: #52c5be;
  color: #fff;
  border-radius: 30px;
  font-size: 16px;
  cursor: pointer;
  user-select: none;
}
.lock-box .ok:active { opacity: 0.9; }

/* toast */
.toast {
  position: fixed;
  left: 50%;
  top: 40%;
  transform: translate(-50%, -50%);
  background: rgba(0,0,0,0.82);
  color: #fff;
  padding: 12px 18px;
  border-radius: 8px;
  font-size: 14px;
  z-index: 10000;
  max-width: 80%;
  text-align: center;
  display: none;
}

/* 后台 */
.admin-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 20px 14px 40px;
}
.admin-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
  gap: 10px;
  flex-wrap: wrap;
}
.admin-top h1 { font-size: 18px; color: #1a2b4a; }
.admin-card {
  background: #fff;
  border: 1px solid #e6ebf2;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(20, 40, 80, 0.04);
}
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.admin-table th, .admin-table td {
  padding: 10px 8px;
  border-bottom: 1px solid #eef2f7;
  text-align: left;
  vertical-align: top;
  color: #333;
}
.admin-table th {
  background: #f0f5ff;
  color: #4a5b72;
  white-space: nowrap;
}
.admin-table tr:hover td { background: #f8fafc; }
.btn-sm {
  display: inline-block;
  padding: 5px 10px;
  border-radius: 6px;
  border: none;
  font-size: 12px;
  cursor: pointer;
  margin: 2px;
}
.btn-show { background: #1f5fd6; color: #fff; }
.btn-hide { background: #6b7c93; color: #fff; }
.btn-del { background: #d64545; color: #fff; }
.login-box {
  width: 90%;
  max-width: 380px;
  margin: 12vh auto 0;
  background: #fff;
  border: 1px solid #e6ebf2;
  border-radius: 12px;
  padding: 28px 22px;
  box-shadow: 0 8px 24px rgba(20, 40, 80, 0.08);
}
.login-box h2 {
  text-align: center;
  margin-bottom: 20px;
  font-size: 18px;
  color: #1a2b4a;
}
.login-box label {
  display: block;
  margin-bottom: 6px;
  color: #4a5b72;
  font-size: 13px;
}
.login-box input {
  width: 100%;
  height: 42px;
  margin-bottom: 14px;
  border-radius: 8px;
  border: 1px solid #cfd8e6;
  padding: 0 12px;
  background: #fff;
  color: #222;
}
.err { color: #e53935; text-align: center; margin-bottom: 12px; font-size: 13px; }

@media (min-width: 768px) {
  .hero h1 { font-size: 28px; }
  .form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 16px;
  }
  .form-grid .full { grid-column: 1 / -1; }
}
