/* Design Plan:
 * Subject: Event participant registration checkpoint desk (badge credentials, ID proof uploads, status checks).
 * Idea: An uncluttered, clear field registry desk where visitors sign in, submit their check status, and attach documents.
 * Palette: Ground: crisp slate white #f8fafc, Ink: dark slate #0f172a, Accent: bold navy/cobalt #1d4ed8, Soft field: #e2e8f0.
 * Type: Inter / system sans-serif, crisp and legible.
 * Corner: 4px crisp functional radius.
 */
:root {
  --color-ground: #f8fafc;
  --color-surface: #ffffff;
  --color-surface-muted: #f1f5f9;
  --color-ink: #0f172a;
  --color-ink-muted: #475569;
  --color-accent: #1d4ed8;
  --color-accent-hover: #1e40af;
  --color-error: #b91c1c;
  --color-error-bg: #fef2f2;
  --color-success: #15803d;
  --color-success-bg: #f0fdf4;
  --color-border: #cbd5e1;

  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-size-sm: 0.875rem;
  --font-size-base: 1rem;
  --font-size-md: 1.125rem;
  --font-size-lg: 1.5rem;
  --font-size-xl: 2rem;

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;

  --radius: 4px;
}

*, *::before, *::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-family);
  background-color: var(--color-ground);
  color: var(--color-ink);
  line-height: 1.5;
  font-size: var(--font-size-base);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p {
  margin-top: 0;
}

h1 {
  font-size: var(--font-size-xl);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-2);
}

h2 {
  font-size: var(--font-size-lg);
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin-bottom: var(--space-4);
}

p {
  color: var(--color-ink-muted);
  margin-bottom: var(--space-4);
  max-width: 65ch;
}

.layout-container {
  max-width: 860px;
  margin: 0 auto;
  padding: var(--space-8) var(--space-4);
}

.header-panel {
  margin-bottom: var(--space-8);
}

.panel-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: var(--space-6);
  margin-bottom: var(--space-8);
}

.auth-status-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-4);
  background: var(--color-surface-muted);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius);
  margin-bottom: var(--space-6);
  font-size: var(--font-size-sm);
}

.auth-status-text {
  font-weight: 500;
  color: var(--color-ink);
}

.form-grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

label {
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--color-ink);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="file"],
select {
  font-family: inherit;
  font-size: var(--font-size-base);
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background-color: var(--color-surface);
  color: var(--color-ink);
  min-height: 44px;
}

input:focus-visible,
select:focus-visible,
button:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  align-items: center;
}

.btn {
  font-family: inherit;
  font-size: var(--font-size-sm);
  font-weight: 600;
  padding: var(--space-2) var(--space-4);
  min-height: 44px;
  border-radius: var(--radius);
  cursor: pointer;
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-primary {
  background-color: var(--color-accent);
  color: #ffffff;
}

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

.btn-secondary {
  background-color: var(--color-surface);
  color: var(--color-ink);
  border-color: var(--color-border);
}

.btn-secondary:hover:not(:disabled) {
  background-color: var(--color-surface-muted);
}

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

.message-box {
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius);
  font-size: var(--font-size-sm);
  margin-top: var(--space-3);
  display: none;
}

.message-box.visible {
  display: block;
}

.message-box.error {
  background: var(--color-error-bg);
  color: var(--color-error);
  border: 1px solid var(--color-error);
}

.message-box.success {
  background: var(--color-success-bg);
  color: var(--color-success);
  border: 1px solid var(--color-success);
}

.item-list {
  list-style: none;
  padding: 0;
  margin: var(--space-4) 0 0 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.item-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-3) var(--space-4);
  background: var(--color-surface-muted);
  border-radius: var(--radius);
  font-size: var(--font-size-sm);
}

.item-id {
  font-family: monospace;
  color: var(--color-ink-muted);
}

.item-val {
  font-weight: 600;
}

.empty-state {
  color: var(--color-ink-muted);
  font-size: var(--font-size-sm);
  font-style: italic;
  padding: var(--space-2) 0;
}
