:root {
  --bg: #1a1a1a;
  --surface: #242424;
  --surface-hover: #2e2e2e;
  --border: #333;
  --text: #f0ece4;
  --text-muted: #9a9590;
  --accent: #e8722a;
  --accent-hover: #d4611f;
  --green: #4caf50;
  --green-bg: rgba(76, 175, 80, 0.15);
  --red: #e74c3c;
  --red-bg: rgba(231, 76, 60, 0.15);
  --radius: 12px;
  --radius-sm: 8px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100dvh;
  line-height: 1.5;
}

.container {
  max-width: 560px;
  margin: 0 auto;
  padding: 24px 16px;
}

/* Header */
.header {
  text-align: center;
  margin-bottom: 32px;
}

.header h1 {
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.header h1 span {
  color: var(--accent);
}

.header .subtitle {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-top: 4px;
}

/* Cards */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
}

.card-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.card-meta {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 16px;
}

.card-description {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 16px;
  line-height: 1.6;
}

/* Event info bar */
.event-info {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.info-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.info-chip .icon {
  font-size: 1rem;
}

/* Status badge */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-open { background: var(--green-bg); color: var(--green); }
.badge-closed { background: var(--red-bg); color: var(--red); }
.badge-completed { background: rgba(255,255,255,0.08); color: var(--text-muted); }

/* Price callout */
.price-callout {
  background: rgba(232, 114, 42, 0.1);
  border: 1px solid rgba(232, 114, 42, 0.25);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  text-align: center;
  margin-bottom: 16px;
  font-size: 0.95rem;
}

.price-callout strong {
  color: var(--accent);
  font-size: 1.2rem;
}

/* Forms */
input, textarea {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 1rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s;
}

input:focus, textarea:focus {
  border-color: var(--accent);
}

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

.form-group {
  margin-bottom: 12px;
}

.form-group label {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  border: none;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  text-decoration: none;
  color: white;
}

.btn:active { transform: scale(0.98); }

.btn-primary { background: var(--accent); }
.btn-primary:hover { background: var(--accent-hover); }

.btn-full { width: 100%; }

.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}
.btn-outline:hover { background: var(--surface-hover); }

.btn-sm {
  padding: 6px 14px;
  font-size: 0.85rem;
  border-radius: 6px;
}

.btn-danger { background: var(--red); }
.btn-danger:hover { background: #c0392b; }

.btn-green { background: var(--green); }
.btn-green:hover { background: #43a047; }

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Payment links */
.payment-links {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

.payment-links a {
  flex: 1;
  text-align: center;
  padding: 12px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  transition: opacity 0.15s;
}

.payment-links a:hover { opacity: 0.85; }

.venmo-btn {
  background: #3d95ce;
  color: white;
}

.applepay-btn {
  background: #333;
  color: white;
  border: 1px solid #555;
}

/* Signup list */
.signup-list {
  list-style: none;
}

.signup-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.signup-item:last-child { border-bottom: none; }

.signup-name {
  font-weight: 500;
}

.signup-note {
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-top: 2px;
}

.signup-number {
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-right: 10px;
  min-width: 20px;
}

/* Count badge */
.count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: white;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 0.85rem;
  font-weight: 700;
}

/* Admin styles */
.admin-signup-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  gap: 8px;
}

.admin-signup-item:last-child { border-bottom: none; }

.paid-badge {
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: 12px;
  font-weight: 600;
}

.paid-yes { background: var(--green-bg); color: var(--green); }
.paid-no { background: var(--red-bg); color: var(--red); }

/* Empty state */
.empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
}

.empty .icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
}

/* Login form */
.login-box {
  max-width: 360px;
  margin: 80px auto;
  padding: 24px;
}

/* Toast notifications */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  z-index: 1000;
  transition: transform 0.3s ease;
  white-space: nowrap;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
}

.toast.success { border-color: var(--green); }
.toast.error { border-color: var(--red); }

/* Responsive */
@media (max-width: 480px) {
  .container { padding: 16px 12px; }
  .header h1 { font-size: 1.5rem; }
  .payment-links { flex-direction: column; }
}

/* Section spacing */
.section-title {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Fade in animation */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-in {
  animation: fadeIn 0.3s ease forwards;
}

/* Toggle switch for admin paid status */
.toggle {
  position: relative;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.toggle input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--border);
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.2s;
}

.toggle-slider::before {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: white;
  top: 3px;
  left: 3px;
  transition: transform 0.2s;
}

.toggle input:checked + .toggle-slider {
  background: var(--green);
}

.toggle input:checked + .toggle-slider::before {
  transform: translateX(20px);
}

/* Admin event list */
.event-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  cursor: pointer;
  transition: background 0.15s;
  text-decoration: none;
  color: var(--text);
}

.event-list-item:hover { background: var(--surface-hover); }

/* Flex helpers */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mb-3 { margin-top: 12px; }
.text-center { text-align: center; }
.flex-1 { flex: 1; }
.text-sm { font-size: 0.85rem; }
.text-muted { color: var(--text-muted); }
