/* ============================================================
   China-Africa Public Health Summit — Registration & Admin
   Visual system: deep navy + gold, serif display, generous air
   ============================================================ */

:root {
  /* WHO 蓝主色系：WHO Blue #0093D5（Pantone 2925 / 801 系）
     金色保留为会议专属强调色，与 WHO 蓝搭配 */
  --who: #0093d5;
  --who-deep: #00456f;
  --navy: #0093d5;        /* 主色：WHO 蓝 */
  --navy-2: #0077ae;      /* 深一档：按钮 hover、渐变过渡 */
  --navy-3: #00639b;      /* 再深一档：白底上的蓝字，保证对比度 */
  --gold: #c8a45c;
  --gold-soft: #e3c77e;
  --ink: #17212e;
  --ink-2: #3d4a5a;
  --muted: #75808f;
  --line: #e2e7ee;
  --line-2: #eef1f5;
  --bg: #f2f8fc;
  --white: #ffffff;
  --danger: #b4392f;
  --ok: #1f7a5a;
  --shadow-sm: 0 1px 2px rgba(0, 60, 100, .06), 0 2px 8px rgba(0, 60, 100, .05);
  --shadow-md: 0 4px 14px rgba(0, 60, 100, .08), 0 18px 48px rgba(0, 60, 100, .10);
  --serif: "Source Han Serif SC", "Noto Serif SC", "Songti SC", "SimSun", Georgia, "Times New Roman", serif;
  --sans: "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
  font-size: 15px;
}

h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; margin: 0; letter-spacing: .01em; }

a { color: var(--navy-3); text-decoration: none; }

/* ---------------- Top bar ---------------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(0, 99, 155, .96);
  backdrop-filter: saturate(150%) blur(8px);
  border-bottom: 1px solid rgba(200, 164, 92, .28);
}

.topbar-inner {
  max-width: 1140px;
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  min-width: 0;
}

.brand-mark {
  width: 32px;
  height: 32px;
  flex: none;
  border: 1px solid rgba(200, 164, 92, .7);
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--gold-soft);
  font-family: var(--serif);
  font-size: 13px;
  letter-spacing: .04em;
}

.brand-text { min-width: 0; }

.brand-text strong {
  display: block;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: .04em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand-text span {
  display: block;
  font-size: 10px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .55);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar-spacer { flex: 1; }

.lang-switch {
  display: inline-flex;
  border: 1px solid rgba(200, 164, 92, .45);
  border-radius: 2px;
  overflow: hidden;
  flex: none;
}

.lang-switch button {
  appearance: none;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, .68);
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: .1em;
  padding: 6px 14px;
  cursor: pointer;
  transition: background .2s, color .2s;
}

.lang-switch button + button { border-left: 1px solid rgba(200, 164, 92, .45); }

.lang-switch button.on {
  background: var(--gold);
  color: #0a1e3c;
  font-weight: 600;
}

/* ---------------- Hero ---------------- */

.hero {
  position: relative;
  overflow: hidden;
  /* 背景图：中非元素插画（assets/img/hero-bg.jpg），上叠 WHO 蓝渐变保证白字可读 */
  background:
    radial-gradient(1100px 520px at 78% -8%, rgba(200, 164, 92, .18), transparent 60%),
    linear-gradient(150deg, rgba(0, 69, 111, .84) 0%, rgba(0, 99, 155, .68) 48%, rgba(0, 147, 213, .5) 100%),
    url("img/hero-bg.jpg") center / cover no-repeat;
  color: #fff;
  padding: 72px 24px 84px;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px);
  background-size: 62px 62px;
  mask-image: radial-gradient(760px 420px at 70% 20%, #000 0%, transparent 78%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 1140px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 40px;
  align-items: center;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: var(--gold-soft);
  margin-bottom: 20px;
}

.kicker::before {
  content: "";
  width: 34px;
  height: 1px;
  background: var(--gold);
}

.hero h1 {
  font-size: clamp(24px, 3.4vw, 40px);
  line-height: 1.34;
  font-weight: 600;
  max-width: 20em;
}

.hero h2 {
  margin-top: 18px;
  font-family: var(--sans);
  font-size: clamp(11px, 1.15vw, 13.5px);
  font-weight: 500;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .7);
  max-width: 46em;
  line-height: 1.9;
}

.hero-rule {
  width: 74px;
  height: 2px;
  background: linear-gradient(90deg, var(--gold), transparent);
  margin: 26px 0;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, .2);
  background: rgba(255, 255, 255, .05);
  padding: 7px 15px;
  border-radius: 2px;
  font-size: 12.5px;
  letter-spacing: .06em;
  color: rgba(255, 255, 255, .88);
}

.chip svg { width: 14px; height: 14px; stroke: var(--gold-soft); fill: none; stroke-width: 1.6; }

.emblem { justify-self: end; opacity: .95; }

/* ---------------- Layout ---------------- */

.wrap {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
}

.sheet {
  position: relative;
  margin-top: -46px;
  background: var(--white);
  border-radius: 3px;
  box-shadow: var(--shadow-md);
  border-top: 3px solid var(--gold);
  padding: 44px 56px 52px;
  margin-bottom: 56px;
}

.sheet-head { max-width: 62em; }

.sheet-head h3 {
  font-size: 22px;
  letter-spacing: .02em;
}

.sheet-head .en {
  display: block;
  margin-top: 6px;
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--muted);
}

.note {
  margin-top: 18px;
  padding: 14px 18px;
  background: #f7f9fb;
  border-left: 2px solid var(--gold);
  font-size: 13px;
  color: var(--ink-2);
  line-height: 1.75;
}

.note .req-tip {
  margin-top: 6px;
  font-weight: 700;
  color: var(--navy-3);
}

.section { margin-top: 40px; }

.section-title {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 26px;
}

.section-title h4 {
  font-size: 16.5px;
  letter-spacing: .04em;
}

.section-title .en {
  font-size: 10.5px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted);
}

.section-title .idx {
  font-family: var(--serif);
  color: var(--gold);
  font-size: 14px;
  margin-right: -4px;
}

/* ---------------- Form ---------------- */

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px 28px;
}

.field { display: flex; flex-direction: column; min-width: 0; }
.field.span2 { grid-column: 1 / -1; }

.field label {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 8px;
  letter-spacing: .02em;
}

.field label .en {
  font-weight: 400;
  color: var(--muted);
  font-size: 11.5px;
  letter-spacing: .06em;
  margin-left: 4px;
}

.req { color: var(--gold); margin-left: 3px; font-weight: 700; }

.field input,
.field select,
.field textarea {
  appearance: none;
  font-family: var(--sans);
  font-size: 14.5px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 11px 13px;
  transition: border-color .18s, box-shadow .18s, background .18s;
  width: 100%;
}

.field select {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path d='M1 1l5 5 5-5' fill='none' stroke='%2375808f' stroke-width='1.6'/></svg>");
  background-repeat: no-repeat;
  background-position: right 13px center;
  padding-right: 34px;
}

.field input:hover,
.field select:hover,
.field textarea:hover { border-color: #c9d2dc; }

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(200, 164, 92, .16);
}

.field input::placeholder { color: #a9b3bf; }

.field .err {
  display: none;
  margin-top: 6px;
  font-size: 12px;
  color: var(--danger);
}

.field.invalid input,
.field.invalid select { border-color: var(--danger); background: #fdf6f5; }
.field.invalid .err { display: block; }

.field .hint {
  margin-top: 6px;
  font-size: 11.5px;
  color: var(--muted);
}

/* ---------------- Submit ---------------- */

.actions {
  margin-top: 40px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.btn {
  appearance: none;
  border: 0;
  cursor: pointer;
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .06em;
  padding: 15px 44px;
  border-radius: 2px;
  background: var(--navy);
  color: #fff;
  transition: background .2s, transform .12s, box-shadow .2s;
  box-shadow: 0 6px 18px rgba(0, 80, 130, .22);
}

.btn:hover { background: var(--navy-2); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .6; cursor: not-allowed; }

.btn-gold { background: var(--gold); color: #08213d; }
.btn-gold:hover { background: var(--gold-soft); }

.btn-ghost {
  background: transparent;
  color: var(--navy-3);
  border: 1px solid var(--line);
  box-shadow: none;
  padding: 13px 26px;
  font-weight: 500;
}
.btn-ghost:hover { background: #f2f5f8; border-color: #cfd8e2; }

.btn-sm { padding: 9px 18px; font-size: 13px; }

.actions .foot-note { font-size: 12.5px; color: var(--muted); max-width: 30em; }

.form-alert {
  display: none;
  margin-top: 24px;
  padding: 13px 16px;
  border-radius: 2px;
  font-size: 13.5px;
  border-left: 3px solid var(--danger);
  background: #fdf5f4;
  color: #8d2f26;
}
.form-alert.show { display: block; }

/* ---------------- Success ---------------- */

.success { text-align: center; padding: 34px 10px 10px; display: none; }
.success.show { display: block; }

.success-mark {
  width: 66px;
  height: 66px;
  margin: 0 auto 22px;
  border-radius: 50%;
  border: 1.5px solid var(--gold);
  display: grid;
  place-items: center;
}
.success-mark svg { width: 26px; height: 26px; fill: none; stroke: var(--gold); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.success h3 { font-size: 23px; }
.success .en { font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); margin-top: 8px; }

.ticket {
  margin: 30px auto 0;
  max-width: 460px;
  border: 1px solid var(--line);
  border-top: 2px solid var(--gold);
  text-align: left;
  padding: 22px 26px;
  background: #fbfcfd;
}

.ticket dl { margin: 0; display: grid; grid-template-columns: 108px 1fr; gap: 10px 14px; font-size: 13.5px; }
.ticket dt { color: var(--muted); }
.ticket dd { margin: 0; color: var(--ink); word-break: break-word; }
.ticket .num { font-family: var(--mono); font-size: 15px; color: var(--navy-3); font-weight: 600; }

/* ---------------- Admin ---------------- */

.admin-body { background: #e9f2f9; min-height: 100vh; }

.login-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 40px 20px;
  /* 登录页淡淡透出同一张背景图，白色蒙版保证卡片清晰 */
  background:
    linear-gradient(rgba(242, 248, 252, .88), rgba(242, 248, 252, .93)),
    url("img/hero-bg.jpg") center / cover no-repeat;
}

.login-card {
  width: 100%;
  max-width: 400px;
  background: #fff;
  border-radius: 3px;
  border-top: 3px solid var(--gold);
  box-shadow: var(--shadow-md);
  padding: 40px 38px 34px;
}

.login-card h3 { font-size: 20px; text-align: center; }
.login-card .en { text-align: center; font-size: 10.5px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); margin-top: 6px; }

.login-seal {
  width: 46px; height: 46px; margin: 0 auto 18px;
  border-radius: 50%; border: 1px solid rgba(200,164,92,.6);
  display: grid; place-items: center; color: var(--gold);
  font-family: var(--serif); font-size: 15px;
}

.admin-head {
  background:
    linear-gradient(150deg, rgba(0, 69, 111, .9) 0%, rgba(0, 99, 155, .8) 55%, rgba(0, 147, 213, .62) 100%),
    url("img/hero-bg.jpg") center / cover no-repeat;
  color: #fff;
  padding: 26px 0;
}

.admin-head .wrap { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.admin-head h3 { font-size: 18px; letter-spacing: .03em; }
.admin-head .en { font-size: 10px; letter-spacing: .2em; text-transform: uppercase; color: rgba(255,255,255,.55); margin-top: 4px; }
.admin-head .spacer { flex: 1; }

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin: 26px 0; }

.stat {
  background: #fff; border: 1px solid var(--line); border-radius: 3px;
  padding: 18px 20px; box-shadow: var(--shadow-sm);
}
.stat .k { font-size: 11.5px; color: var(--muted); letter-spacing: .08em; }
.stat .v { font-family: var(--serif); font-size: 27px; margin-top: 6px; color: var(--navy-3); line-height: 1.2; }
.stat .s { font-size: 11.5px; color: var(--muted); margin-top: 4px; }

.panel { background: #fff; border: 1px solid var(--line); border-radius: 3px; box-shadow: var(--shadow-sm); margin-bottom: 40px; }
.panel-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 16px 20px; border-bottom: 1px solid var(--line-2); }
.panel-head h4 { font-size: 15.5px; }
.panel-head .spacer { flex: 1; }

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

.toolbar input, .toolbar select {
  font-family: var(--sans); font-size: 13.5px; color: var(--ink);
  border: 1px solid var(--line); border-radius: 2px; padding: 9px 12px; background: #fff; min-width: 150px;
}
.toolbar input:focus, .toolbar select:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(200,164,92,.15); }

.table-scroll { overflow-x: auto; }

table.data { width: 100%; border-collapse: collapse; font-size: 13px; }
table.data th, table.data td { padding: 11px 14px; border-bottom: 1px solid var(--line-2); text-align: left; vertical-align: top; white-space: nowrap; }
table.data thead th {
  position: sticky; top: 0; background: #f6f8fa; color: var(--ink-2);
  font-weight: 600; font-size: 12px; letter-spacing: .04em; border-bottom: 1px solid var(--line);
  z-index: 1;
}
table.data tbody tr:hover { background: #fafbfd; }
table.data td.wrap-cell { white-space: normal; min-width: 210px; }
table.data td.idx { font-family: var(--mono); color: var(--muted); }
table.data .empty { padding: 46px 14px; text-align: center; color: var(--muted); white-space: normal; }

.link-del { color: var(--danger); cursor: pointer; font-size: 12.5px; background: none; border: 0; padding: 0; font-family: var(--sans); }
.link-del:hover { text-decoration: underline; }

.badge { display: inline-block; padding: 2px 8px; border-radius: 2px; font-size: 11.5px; background: #eef2f7; color: var(--ink-2); border: 1px solid var(--line); }

.bars { padding: 6px 20px 20px; }
.bar-row { display: grid; grid-template-columns: minmax(0, 1fr) 46px; gap: 12px; align-items: center; padding: 7px 0; }
.bar-label { font-size: 12.5px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-track { grid-column: 1 / -1; height: 6px; background: #eef1f5; border-radius: 3px; overflow: hidden; }
.bar-fill { height: 100%; background: linear-gradient(90deg, var(--navy-2), var(--gold)); }
.bar-count { font-family: var(--mono); font-size: 12px; color: var(--muted); text-align: right; }
.bar-block { padding: 10px 0; border-bottom: 1px dashed var(--line-2); }
.bar-block:last-child { border-bottom: 0; }

.toast {
  position: fixed; left: 50%; bottom: 34px; transform: translate(-50%, 20px);
  background: #00639b; color: #fff; padding: 12px 22px; border-radius: 2px;
  font-size: 13.5px; box-shadow: var(--shadow-md); opacity: 0; pointer-events: none;
  transition: opacity .22s, transform .22s; z-index: 90; max-width: 90vw; text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.err { background: #8d2f26; }

.spinner {
  width: 15px; height: 15px; border: 2px solid rgba(255,255,255,.35); border-top-color: #fff;
  border-radius: 50%; display: inline-block; vertical-align: -2px; margin-right: 8px;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.loading-box { padding: 40px; text-align: center; color: var(--muted); font-size: 13.5px; }

/* ---------------- Footer ---------------- */

.footer {
  border-top: 1px solid var(--line);
  padding: 26px 0 40px;
  color: var(--muted);
  font-size: 12.5px;
}
.footer .wrap { display: flex; gap: 14px; flex-wrap: wrap; justify-content: space-between; }

/* ---------------- Responsive ---------------- */

@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; gap: 24px; }
  .emblem { display: none; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .hero { padding: 52px 20px 68px; }
  .wrap { padding: 0 16px; }
  .sheet { padding: 30px 20px 36px; margin-top: -34px; }
  .grid { grid-template-columns: 1fr; gap: 18px; }
  .topbar-inner { padding: 10px 16px; }
  .brand-text span { display: none; }
  .btn { width: 100%; padding: 15px 20px; }
  .actions { flex-direction: column; align-items: stretch; }
  .actions .foot-note { text-align: center; }
}
