:root {
  --bg: #f6f8fa;
  --surface: #ffffff;
  --border: #d0d7de;
  --text: #1f2328;
  --muted: #656d76;
  --primary: #008071;
  --primary-ink: #ffffff;
  --danger: #cf222e;
  --radius: 8px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1.5rem;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.site-header .brand {
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--primary);
  text-decoration: none;
}

.site-header nav {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.container {
  max-width: 880px;
  margin: 0 auto;
  padding: 1.5rem;
}

h1 { font-size: 1.6rem; }
h2 { font-size: 1.2rem; margin-top: 1.5rem; }

a { color: var(--primary); }

.muted { color: var(--muted); }

.messages {
  list-style: none;
  margin: 1rem auto;
  padding: 0 1.5rem;
  max-width: 880px;
}
.messages li {
  padding: 0.6rem 0.9rem;
  border-radius: var(--radius);
  background: #fff8e6;
  border: 1px solid #e3d3a0;
  margin-bottom: 0.5rem;
}
.messages li.error { background: #ffebe9; border-color: #f0b3b3; }
.messages li.success { background: #e6f6ec; border-color: #a7d7b8; }

.btn {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: var(--primary);
  color: var(--primary-ink);
  border: none;
  border-radius: var(--radius);
  text-decoration: none;
  font-size: 0.95rem;
  cursor: pointer;
}
.btn.secondary {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn.danger { background: var(--danger); }

.link {
  background: none;
  border: none;
  color: var(--primary);
  cursor: pointer;
  padding: 0;
  font-size: inherit;
}
.inline { display: inline; }

.event-list { list-style: none; padding: 0; display: grid; gap: 1rem; }
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
}
.card h2 { margin: 0.25rem 0; }

table.tickets {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin: 1rem 0;
}
table.tickets td, table.tickets th {
  padding: 0.6rem 0.9rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: middle;
}
table.tickets tfoot td { font-weight: 700; border-bottom: none; }

.add-form { display: inline-flex; gap: 0.4rem; align-items: center; }
.add-form input[type="number"] { width: 4rem; padding: 0.4rem; }

.soldout { color: var(--danger); font-weight: 600; }

.stack { display: grid; gap: 0.9rem; max-width: 360px; margin-top: 1rem; }
.stack label { display: grid; gap: 0.3rem; }
.stack input {
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 1rem;
}

.actions { display: flex; gap: 0.75rem; margin-top: 1rem; }

.gateway {
  max-width: 420px;
  margin: 2rem auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
}
.gateway .amount { font-size: 2rem; font-weight: 700; }
.gateway-actions { display: flex; gap: 0.75rem; justify-content: center; margin: 1rem 0; }

.back { display: inline-block; margin-bottom: 0.5rem; text-decoration: none; }

/* Sign in with Google: the mark keeps its own colours on a neutral button, which is
   how Google's branding requires it to appear. */
.btn.google {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  font-weight: 500;
}

.or {
  max-width: 360px;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--muted);
  font-size: 0.9rem;
  margin: 1.1rem 0 0;
}
.or::before,
.or::after {
  content: "";
  flex: 1;
  border-top: 1px solid var(--border);
}
