:root {
  --bg: #eef1f5;
  --surface: #ffffff;
  --ink: #16202a;
  --muted: #5b6675;
  --line: #dbe1e8;
  --navy: #1f3a5f;
  --navy-dark: #162b47;
  --teal: #2f7a6d;
  --teal-dark: #24605570 ;
  --teal-solid: #24594f;
  --amber: #d98e2b;
  --danger: #b3432f;
  --radius: 10px;
  font-size: 16px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
}

h1, h2, h3 {
  font-family: "Space Grotesk", "Inter", sans-serif;
  font-weight: 600;
  line-height: 1.25;
  margin: 0 0 0.4em;
  color: var(--navy-dark);
}

a { color: var(--teal-solid); text-decoration: none; }
a:hover { text-decoration: underline; }

p { margin: 0 0 1em; color: var(--ink); max-width: 640px; }
.muted { color: var(--muted); }

.page {
  max-width: 880px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}

.page-narrow { max-width: 560px; }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.brand-mark {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  background: var(--teal-solid);
  transform: rotate(45deg);
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
}

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

.section-title {
  font-size: 0.95rem;
  color: var(--muted);
  margin: 40px 0 12px;
  font-family: "Inter", sans-serif;
  font-weight: 500;
}

/* ---------- forms ---------- */

label {
  display: block;
  font-size: 0.92rem;
  font-weight: 500;
  margin-bottom: 6px;
  color: var(--ink);
}

.hint { font-size: 0.82rem; color: var(--muted); margin-top: 4px; }

input[type="text"],
input[type="date"],
input[type="time"],
input[type="url"],
input[type="password"],
textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 0.98rem;
  font-family: inherit;
  color: var(--ink);
  background: #fff;
}

input:focus, textarea:focus {
  outline: 2px solid var(--teal-solid);
  outline-offset: 1px;
  border-color: var(--teal-solid);
}

textarea { resize: vertical; min-height: 84px; }

.field { margin-bottom: 18px; }
.hidden {display: none}
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 560px) {
  .field-row { grid-template-columns: 1fr; }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: 8px;
  border: none;
  font-size: 0.98rem;
  font-weight: 600;
  font-family: "Inter", sans-serif;
  cursor: pointer;
  text-decoration: none;
}

.btn-primary { background: var(--teal-solid); color: #fff; }
.btn-primary:hover { background: #1c463d; }

.btn-secondary {
  background: transparent;
  color: var(--navy);
  border: 1px solid var(--line);
}
.btn-secondary:hover { border-color: var(--navy); }

.btn-block { width: 100%; }

.btn-danger { background: transparent; color: var(--danger); border: 1px solid #e3c3bb; }

/* 提交类按钮的 loading 状态：显示转圈、禁用点击，避免重复提交 */
.btn.is-loading {
  pointer-events: none;
  opacity: 0.75;
}
.btn.is-loading::before {
  content: "";
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: btn-spin 0.7s linear infinite;
}
.btn[disabled] { cursor: progress; }

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

.error-banner {
  background: #fbeae6;
  border: 1px solid #e3b3a6;
  color: #8a3a26;
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 20px;
  font-size: 0.92rem;
}

.success-banner {
  background: #e7f2ee;
  border: 1px solid #b9d9cd;
  color: var(--teal-solid);
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 20px;
  font-size: 0.92rem;
}

/* ---------- login ---------- */

.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-card { width: 360px; }

/* ---------- meeting list ---------- */

.meeting-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.meeting-row:last-child { border-bottom: none; }

.meeting-topic {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--navy-dark);
  margin-bottom: 4px;
}

.meeting-meta { font-size: 0.88rem; color: var(--muted); }

.meeting-actions { display: flex; gap: 8px; flex-shrink: 0; }

.pill {
  display: inline-block;
  font-size: 0.78rem;
  padding: 3px 10px;
  border-radius: 100px;
  background: #e7f0f7;
  color: var(--navy);
  margin-left: 8px;
}

/* ---------- meeting detail ---------- */

.link-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f4f6f8;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 0.86rem;
  color: var(--navy-dark);
  word-break: break-all;
}

.link-box code { flex: 1; word-break: break-all; }

table.roster {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  margin-top: 12px;
}

table.roster th, table.roster td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}

table.roster th {
  color: var(--muted);
  font-weight: 500;
  font-size: 0.82rem;
}

/* ---------- registration page ---------- */

.event-banner {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-dark) 100%);
  color: #eef3f7;
  border-radius: var(--radius) var(--radius) 0 0;
  padding: 28px 28px 24px;
}

.event-banner h1 { color: #fff; font-size: 1.4rem; margin-bottom: 10px; }
.event-banner .meta-line { font-size: 0.92rem; color: #cfe0ec; }
.event-banner .meta-line + .meta-line { margin-top: 4px; }
.event-banner .warn {color: yellow}

.form-body { padding: 28px; border: 1px solid var(--line); border-top: none; border-radius: 0 0 var(--radius) var(--radius); background: var(--surface); }

/* ---------- boarding-pass style confirmation ---------- */

.pass {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 190px;
}

@media (max-width: 560px) {
  .pass { grid-template-columns: 1fr; }
  .pass-stub { border-left: none; border-top: 1px dashed var(--line); }
}

.pass-main {
  padding: 30px 28px;
  background: linear-gradient(160deg, var(--navy) 0%, var(--navy-dark) 100%);
  color: #eef3f7;
}

.pass-main .eyebrow-plain { font-size: 0.85rem; color: #b9cfe0; margin-bottom: 6px; }
.pass-main h1 { color: #fff; font-size: 1.3rem; margin-bottom: 18px; }

.pass-field { margin-bottom: 12px; }
.pass-field .k { font-size: 0.78rem; color: #a9c2d6; }
.pass-field .v { font-size: 1rem; color: #fff; font-weight: 500; }

.pass-stub {
  padding: 26px 20px;
  border-left: 1px dashed var(--line);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
  background: #f8fafb;
}

.pass-stub .stub-label { font-size: 0.8rem; color: var(--muted); }

.personal-link-box {
  font-size: 0.78rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px;
  word-break: break-all;
  color: var(--navy);
}

.footer-note {
  margin-top: 20px;
  font-size: 0.85rem;
  color: var(--muted);
}

.not-found-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
}
