:root {
  --bg: #f4f0e8;
  --bg-strong: #efe9dd;
  --card: rgba(255, 255, 255, 0.76);
  --card-strong: rgba(255, 255, 255, 0.92);
  --text: #1f2b27;
  --muted: #6a756f;
  --line: rgba(31, 43, 39, 0.12);
  --accent: #213630;
  --accent-soft: #d6c29a;
  --success: #1d6a4b;
  --danger: #a94442;
  --shadow: 0 20px 60px rgba(37, 41, 38, 0.08);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
}

* {
  box-sizing: border-box;
}

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

body {
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(214, 194, 154, 0.35), transparent 28%),
    radial-gradient(circle at bottom right, rgba(33, 54, 48, 0.12), transparent 24%),
    linear-gradient(135deg, #f5f1e8 0%, #f0eadf 45%, #f6f2ea 100%);
  font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
}

.theme-shell {
  position: relative;
  overflow-x: hidden;
}

.ambient {
  position: fixed;
  width: 320px;
  height: 320px;
  border-radius: 999px;
  filter: blur(20px);
  pointer-events: none;
  z-index: 0;
}

.ambient-left {
  top: -120px;
  left: -120px;
  background: rgba(214, 194, 154, 0.25);
}

.ambient-right {
  right: -120px;
  bottom: -120px;
  background: rgba(33, 54, 48, 0.12);
}

.page {
  position: relative;
  z-index: 1;
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0 56px;
}

.page-form {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 28px;
  align-items: start;
}

.page-login {
  display: flex;
  justify-content: center;
}

.success-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
}

.login-shell {
  width: min(960px, 100%);
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 28px;
  align-items: stretch;
}

.hero-card,
.form-card,
.admin-header-card,
.admin-panel,
.success-card {
  background: var(--card);
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.hero-card {
  min-height: 100%;
  padding: 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background:
    linear-gradient(145deg, rgba(33, 54, 48, 0.96), rgba(35, 48, 44, 0.86)),
    rgba(33, 54, 48, 0.94);
  color: #f7f4ee;
}

.compact-hero {
  min-height: 520px;
}

.hero-kicker {
  margin: 0 0 18px;
  color: #d8c49c;
  letter-spacing: 0.2em;
  font-size: 12px;
  text-transform: uppercase;
}

.hero-card h1,
.admin-header-card h1 {
  margin: 0;
  font-family: "Noto Serif SC", "Source Han Serif SC", "Songti SC", serif;
  font-size: clamp(32px, 4vw, 48px);
  line-height: 1.15;
  letter-spacing: 0.04em;
}

.hero-copy {
  margin: 20px 0 0;
  max-width: 520px;
  color: rgba(247, 244, 238, 0.8);
  font-size: 15px;
  line-height: 1.8;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 36px;
}

.hero-badges span,
.ghost-link,
.section-head a {
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  padding: 10px 16px;
  color: inherit;
  text-decoration: none;
  font-size: 13px;
}

.form-card,
.admin-panel {
  padding: 28px;
  background: var(--card-strong);
}

.section-head,
.toolbar,
.stats-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.section-head {
  margin-bottom: 22px;
}

.section-head p,
.admin-header-card .hero-kicker {
  margin: 0;
}

.section-head p {
  font-family: "Noto Serif SC", "Source Han Serif SC", "Songti SC", serif;
  font-size: 22px;
}

.section-head a {
  color: var(--accent);
  border-color: rgba(33, 54, 48, 0.12);
}

.registration-form {
  display: grid;
  gap: 18px;
}

.field {
  display: grid;
  gap: 10px;
}

.field-label {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.field input,
.field textarea,
.search-box input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #fffdfa;
  color: var(--text);
  padding: 16px 18px;
  font: inherit;
  outline: none;
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
}

.field input:focus,
.field textarea:focus,
.search-box input:focus {
  border-color: rgba(33, 54, 48, 0.35);
  box-shadow: 0 0 0 5px rgba(214, 194, 154, 0.18);
  transform: translateY(-1px);
}

.field textarea {
  min-height: 120px;
  resize: vertical;
}

.submit-button,
.secondary-button {
  border: 0;
  border-radius: 999px;
  padding: 16px 22px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition:
    transform 180ms ease,
    opacity 180ms ease,
    box-shadow 180ms ease;
}

.submit-button {
  background: linear-gradient(135deg, #233a33 0%, #1d2f2a 100%);
  color: #f7f4ee;
  box-shadow: 0 16px 32px rgba(33, 54, 48, 0.16);
}

.secondary-button {
  background: rgba(33, 54, 48, 0.08);
  color: var(--accent);
}

.submit-button:hover,
.secondary-button:hover,
.ghost-link:hover,
.section-head a:hover {
  transform: translateY(-1px);
}

.submit-button:disabled,
.secondary-button:disabled {
  cursor: wait;
  opacity: 0.7;
}

.form-message {
  min-height: 24px;
  margin: 0;
  font-size: 14px;
  color: var(--muted);
}

.form-message.is-success {
  color: var(--success);
}

.form-message.is-error {
  color: var(--danger);
}

.success-card {
  width: min(560px, 100%);
  padding: 46px 40px;
  text-align: center;
  background: var(--card-strong);
  animation: successRise 520ms ease both;
}

.success-card h1 {
  margin: 14px 0 0;
  font-family: "Noto Serif SC", "Source Han Serif SC", "Songti SC", serif;
  font-size: 34px;
  line-height: 1.25;
}

.success-card .hero-kicker {
  margin-top: 24px;
  color: #b39152;
}

.success-copy {
  margin: 18px auto 0;
  max-width: 430px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.8;
}

.success-mark {
  position: relative;
  width: 96px;
  height: 96px;
  margin: 0 auto;
  display: grid;
  place-items: center;
}

.success-ring {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background:
    radial-gradient(circle at center, #ffffff 52%, transparent 54%),
    conic-gradient(from -50deg, #d6c29a, #213630, #d6c29a);
  box-shadow: 0 14px 32px rgba(33, 54, 48, 0.14);
  animation: ringIn 720ms cubic-bezier(0.2, 0.9, 0.2, 1) both;
}

.success-ring::after {
  content: "";
  position: absolute;
  inset: -10px;
  border-radius: inherit;
  border: 1px solid rgba(33, 54, 48, 0.12);
  animation: rippleOut 1000ms ease-out both;
}

.success-check {
  position: relative;
  width: 34px;
  height: 18px;
  border-left: 5px solid var(--accent);
  border-bottom: 5px solid var(--accent);
  transform: rotate(-45deg) scale(0.8);
  transform-origin: center;
  animation: checkIn 540ms 240ms cubic-bezier(0.2, 0.9, 0.2, 1) both;
}

.return-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 180px;
  margin-top: 30px;
  text-decoration: none;
}

@keyframes successRise {
  from {
    transform: translateY(18px) scale(0.98);
  }

  to {
    transform: translateY(0) scale(1);
  }
}

@keyframes ringIn {
  from {
    opacity: 0;
    transform: rotate(-90deg) scale(0.72);
  }

  to {
    opacity: 1;
    transform: rotate(0deg) scale(1);
  }
}

@keyframes checkIn {
  from {
    opacity: 0;
    transform: rotate(-45deg) scale(0.4);
  }

  to {
    opacity: 1;
    transform: rotate(-45deg) scale(1);
  }
}

@keyframes rippleOut {
  from {
    opacity: 0.7;
    transform: scale(0.82);
  }

  to {
    opacity: 0;
    transform: scale(1.4);
  }
}

.admin-body .page-admin {
  display: grid;
  gap: 24px;
}

.admin-header-card {
  padding: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.admin-header-card .hero-copy {
  color: var(--muted);
  max-width: 720px;
}

.ghost-link {
  color: var(--accent);
  border-color: rgba(33, 54, 48, 0.12);
  white-space: nowrap;
}

.header-actions,
.toolbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ghost-button {
  border: 1px solid rgba(33, 54, 48, 0.12);
  border-radius: 999px;
  padding: 10px 16px;
  background: transparent;
  color: var(--accent);
  font: inherit;
  cursor: pointer;
}

.session-badge {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(33, 54, 48, 0.08);
  color: var(--accent);
  font-size: 13px;
  white-space: nowrap;
}

.search-box {
  flex: 1;
}

.slim-button {
  padding-left: 18px;
  padding-right: 18px;
  box-shadow: none;
}

.stats-row {
  margin: 18px 0 20px;
}

.stat-card {
  min-width: 160px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #fffcf7;
}

.stat-card span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.stat-card strong {
  display: block;
  margin-top: 8px;
  font-size: 30px;
  font-family: "Noto Serif SC", "Source Han Serif SC", "Songti SC", serif;
}

.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #fffdfa;
}

.data-table {
  width: 100%;
  min-width: 920px;
  border-collapse: collapse;
}

.data-table th,
.data-table td {
  padding: 16px 18px;
  border-bottom: 1px solid rgba(31, 43, 39, 0.08);
  text-align: left;
  vertical-align: top;
  font-size: 14px;
  line-height: 1.65;
}

.data-table th {
  position: sticky;
  top: 0;
  background: #f8f3e9;
  font-weight: 700;
  color: var(--accent);
}

.data-table tbody tr:hover {
  background: rgba(214, 194, 154, 0.08);
}

.empty-state {
  text-align: center;
  color: var(--muted);
  padding: 28px 16px;
}

@media (max-width: 960px) {
  .page-form {
    grid-template-columns: 1fr;
  }

  .login-shell {
    grid-template-columns: 1fr;
  }

  .hero-card,
  .form-card,
  .admin-header-card,
  .admin-panel {
    padding: 24px;
  }

  .admin-header-card,
  .toolbar,
  .header-actions,
  .toolbar-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .session-badge {
    justify-content: center;
  }
}

@media (max-width: 640px) {
  .page {
    width: min(100% - 20px, 1120px);
    padding: 20px 0 28px;
  }

  .hero-card h1,
  .admin-header-card h1 {
    font-size: 30px;
  }

  .hero-copy {
    font-size: 14px;
  }

  .submit-button,
  .secondary-button {
    width: 100%;
  }
}
