:root {
  --primary-color: #1e71d6;
  --primary-hover: #1a5eb8;
  --secondary-color: #64748b;
  --google-green: #34a853;
  --google-green-hover: #2d9248;
  --success-color: #15803d;
  --success-hover: #166534;
  --warning-color: #f97316;
  --error-color: #dc2626;
  --background: #f8fafc;
  --card-background: #ffffff;
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --border-color: #e2e8f0;
  --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

* {
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--background);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
}

.navbar {
  background: var(--card-background);
  border-bottom: 1px solid var(--border-color);
  box-shadow: var(--shadow);
}

.navbar-brand {
  color: var(--primary-color) !important;
  font-weight: 600;
  font-size: 1.25rem;
}

.nav-link {
  color: var(--text-primary) !important;
  font-weight: 500;
  transition: color 0.2s ease;
}

.nav-link:hover {
  color: var(--primary-color) !important;
}

main.container {
  max-width: 900px;
  padding-top: 2rem;
  padding-bottom: 3rem;
}

.card {
  background: var(--card-background);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
}

.card-body {
  padding: 2.5rem;
}

/* Page Headers */
.page-header {
  text-align: center;
  margin-bottom: 2rem;
}

.page-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  line-height: 1.2;
}

.eyebrow {
  letter-spacing: 0.1em;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
}

.status-pill {
  display: inline-block;
  padding: 0.625rem 1.25rem;
  border-radius: 999px;
  color: white;
  font-weight: 600;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.status-pill.bg-success {
  background: var(--success-color);
}

.status-pill.bg-warning {
  background: var(--warning-color);
}

.status-pill.bg-secondary {
  background: var(--secondary-color);
}

/* Forms */
.form-label {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
}

.form-control {
  border: 2px solid var(--border-color);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  transition: all 0.2s ease;
}

.form-control:focus {
  outline: none;
}

/* Disable Bootstrap validation styling */
.form-control.is-valid,
.form-control.is-invalid {
  border-color: var(--border-color);
  padding-right: 1rem;
  background-image: none;
}

.form-control.is-valid:focus,
.form-control.is-invalid:focus {
  border-color: var(--border-color);
  box-shadow: none;
}

.valid-feedback,
.invalid-feedback {
  display: none;
}

.form-text {
  color: var(--text-secondary);
  font-size: 0.8125rem;
  margin-top: 0.375rem;
}

/* Buttons */
.btn {
  font-weight: 600;
  border-radius: 8px;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  transition: all 0.2s ease;
  border: none;
}

.btn-primary {
  background: var(--primary-color);
  color: white;
  box-shadow: 0 4px 12px rgba(30, 113, 214, 0.25);
}

.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(26, 94, 184, 0.35);
}

.btn-primary:disabled {
  background: var(--secondary-color);
  transform: none;
  box-shadow: none;
  opacity: 0.6;
}

.btn-lg {
  padding: 0.875rem 1.75rem;
  font-size: 1.0625rem;
}

.highlight-add-me {
  color: var(--success-color);
  font-weight: 700;
}

/* Subtle styling for locked/disabled event code field */
.event-code-locked {
  background-color: #f8fafc !important;
  border-color: #e2e8f0 !important;
  color: #64748b !important;
  font-weight: 400;
}

.btn .highlight-add-me {
  color: #ffffff;
  font-weight: 700;
}

/* Flash Messages */
.flash-stack {
  margin-bottom: 1.5rem;
}

.flash-stack .alert {
  border-radius: 10px;
  border: none;
  box-shadow: var(--shadow-md);
  padding: 1rem 1.25rem;
}

.alert-success {
  background-color: #dcfce7;
  color: #166534;
}

.alert-danger {
  background-color: #fee2e2;
  color: #991b1b;
}

.alert-warning {
  background-color: #ffedd5;
  color: #9a3412;
}

.alert-info {
  background-color: #dbeafe;
  color: #1e40af;
}

/* Success Page */
.icon-circle {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  margin: 0 auto 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(22, 163, 74, 0.1);
  color: var(--success-color);
  font-size: 2.5rem;
}

.success-panel {
  background: var(--card-background);
  border-radius: 12px;
  padding: 3rem;
  box-shadow: var(--shadow-xl);
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
}

.success-panel h1 {
  color: var(--text-primary);
  font-weight: 700;
  margin-bottom: 1rem;
}

.success-panel p {
  color: var(--text-secondary);
  font-size: 1.125rem;
}

/* Error Page */
.error-hero {
  background: var(--card-background);
  border-radius: 12px;
  padding: 3rem;
  box-shadow: var(--shadow-xl);
  text-align: center;
  max-width: 600px;
  margin: 2rem auto;
}

.error-hero h1 {
  color: var(--text-primary);
  font-weight: 700;
  margin-bottom: 1rem;
}

.error-hero p {
  color: var(--text-secondary);
  font-size: 1.125rem;
}

/* Utility Classes */
.text-muted {
  color: var(--text-secondary) !important;
}

/* Responsive */
@media (max-width: 768px) {
  .page-title {
    font-size: 2rem;
  }

  .card-body {
    padding: 1.5rem;
  }

  .success-panel,
  .error-hero {
    padding: 2rem;
  }
}
