:root {
  --paper: #f3efe6;
  --white: #fffdf8;
  --ink: #171717;
  --muted: #625f59;
  --blue: #2546c7;
  --blue-dark: #18308d;
  --line: rgba(23, 23, 23, .18);
  --green: #216642;
  --amber: #8a541c;
  --red: #9b3434;
  --sans: Arial, Helvetica, sans-serif;
  --serif: Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: var(--sans); line-height: 1.45; }
button, input, select { font: inherit; }
button { cursor: pointer; }
.site-header { display: flex; justify-content: space-between; align-items: center; min-height: 4.6rem; padding: 0 clamp(1.1rem, 4vw, 4rem); border-bottom: 1px solid var(--line); }
.site-header p { margin: 0; color: var(--muted); font-size: .82rem; }
.wordmark { color: var(--ink); font-size: 1.35rem; font-weight: 800; letter-spacing: -.055em; text-decoration: none; }
.wordmark span { color: var(--blue); }
main { width: min(92rem, 100%); margin: 0 auto; padding: clamp(2rem, 5vw, 4.5rem) clamp(1rem, 4vw, 4rem); }
h1 { margin: 0; font-family: var(--serif); font-size: clamp(2.6rem, 5vw, 5.2rem); font-weight: 400; letter-spacing: -.055em; line-height: .95; }

.login-view { min-height: calc(100vh - 13rem); display: grid; place-items: center; }
.login-panel { width: min(32rem, 100%); padding: clamp(1.5rem, 4vw, 3rem); border: 1px solid var(--ink); border-radius: 24px; background: var(--white); box-shadow: 0 1.4rem 3.5rem rgba(23,23,23,.08); }
.login-panel h1 { font-size: clamp(2.4rem, 6vw, 4rem); }
.login-panel > p { margin: 1rem 0 2rem; color: var(--muted); }
.login-panel label, .toolbar span { display: block; margin-bottom: .45rem; font-size: .78rem; font-weight: 700; }
input, select { width: 100%; min-height: 3.1rem; padding: .75rem .9rem; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); background: #fff; }
input:focus, select:focus { border-color: var(--blue); outline: 3px solid rgba(37,70,199,.14); }
.login-panel button, .secondary { min-height: 3rem; padding: .7rem 1.15rem; border: 0; border-radius: 999px; color: #fff; background: var(--blue); font-weight: 700; }
.login-panel button { width: 100%; margin-top: 1rem; }
.login-panel button:hover, .secondary:hover { background: var(--blue-dark); }
.form-error { margin: .65rem 0 0; color: var(--red); font-size: .85rem; }

.dashboard-heading { display: flex; justify-content: space-between; gap: 2rem; align-items: flex-end; }
.dashboard-heading p { max-width: 42rem; margin: 1rem 0 0; color: var(--muted); }
.heading-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .65rem; }
.secondary { min-height: 2.75rem; font-size: .82rem; }
.text-button { min-height: 2.75rem; padding: .65rem .75rem; border: 0; background: transparent; font-size: .82rem; text-decoration: underline; text-underline-offset: .2rem; }
.updated { min-height: 1.4rem; margin: 1.2rem 0 0; color: var(--muted); font-size: .78rem; }
.summary { display: grid; grid-template-columns: repeat(5, 1fr); margin: 2rem 0 0; border: 1px solid var(--ink); border-radius: 20px; background: var(--white); overflow: hidden; }
.summary div { min-width: 0; padding: 1.15rem; border-right: 1px solid var(--line); }
.summary div:last-child { border: 0; }
.summary dt { color: var(--muted); font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; }
.summary dd { margin: .35rem 0 0; font-family: var(--serif); font-size: 2.25rem; line-height: 1; }
.toolbar { display: grid; grid-template-columns: minmax(16rem, 1fr) minmax(11rem, .25fr); gap: 1rem; margin: 2rem 0 1rem; }
.table-wrap { border: 1px solid var(--ink); border-radius: 20px; background: var(--white); overflow: auto; }
table { width: 100%; border-collapse: collapse; min-width: 68rem; }
th, td { padding: .95rem 1rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { position: sticky; top: 0; color: var(--muted); background: var(--white); font-size: .7rem; letter-spacing: .06em; text-transform: uppercase; }
td { font-size: .84rem; }
tbody tr:last-child td { border-bottom: 0; }
.participant-name { display: block; font-weight: 700; }
.participant-email { display: block; margin-top: .2rem; color: var(--blue-dark); font-size: .78rem; }
.status { display: inline-block; padding: .25rem .55rem; border-radius: 999px; font-size: .7rem; font-weight: 700; background: rgba(23,23,23,.08); }
.status-paid { color: var(--green); background: rgba(33,102,66,.12); }
.status-pending_payment { color: var(--amber); background: rgba(138,84,28,.12); }
.status-payment_failed { color: var(--red); background: rgba(155,52,52,.12); }
.empty { margin: 0; padding: 3rem 1rem; color: var(--muted); text-align: center; }

@media (max-width: 780px) {
  .site-header p { display: none; }
  main { padding-top: 2.5rem; }
  .dashboard-heading { display: block; }
  .heading-actions { justify-content: flex-start; margin-top: 1.5rem; }
  .summary { grid-template-columns: repeat(2, 1fr); }
  .summary div { border-bottom: 1px solid var(--line); }
  .summary div:nth-child(2n) { border-right: 0; }
  .summary div:last-child { border-bottom: 0; }
  .toolbar { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: no-preference) {
  .login-panel, .dashboard { animation: enter .35s ease both; }
  @keyframes enter { from { opacity: 0; transform: translateY(.5rem); } }
}
