/* Placeholder palette — mirrors the "seed color TBD" note in
   docs/DESIGN_SYSTEM.md. Swap --accent the moment a brand color is
   picked; nothing else here depends on its value. */
:root {
  --accent: #00695c;
  --accent-on: #ffffff;
  --bg: #fafafa;
  --surface: #ffffff;
  --surface-variant: #eceff1;
  --text: #1a1c1c;
  --text-variant: #49454f;
  --success: #2e7d32;
  --warning: #b26a00;
  --error: #b3261e;
  --radius: 16px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121212;
    --surface: #1d1f1f;
    --surface-variant: #2a2d2d;
    --text: #e3e3e3;
    --text-variant: #c4c7c5;
    --accent: #4db6ac;
    --accent-on: #00251f;
  }
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
  padding: max(16px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom));
  display: flex;
  justify-content: center;
}

#app {
  width: 100%;
  max-width: 480px;
}

.loading {
  display: flex;
  justify-content: center;
  padding: 64px 0;
}

.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--surface-variant);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.identity-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  font-weight: 600;
  color: var(--text-variant);
}

.identity-strip .mark {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: var(--accent);
  color: var(--accent-on);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 800;
}

.card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.12);
  margin-bottom: 16px;
}

.match-title {
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 4px;
}

.match-meta {
  color: var(--text-variant);
  font-size: 15px;
  margin: 2px 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.price {
  font-size: 15px;
  margin-top: 8px;
  color: var(--text-variant);
}

.capacity-bar {
  height: 8px;
  border-radius: 4px;
  background: var(--surface-variant);
  overflow: hidden;
  margin-top: 16px;
}

.capacity-bar > div {
  height: 100%;
  background: var(--success);
  transition: width 0.3s ease;
}

.capacity-bar.full > div { background: var(--warning); }

.capacity-label {
  font-size: 14px;
  color: var(--text-variant);
  margin-top: 6px;
}

.status-banner {
  font-size: 18px;
  font-weight: 700;
  margin-top: 16px;
  letter-spacing: 0.02em;
}

.status-banner.urgent { color: var(--warning); }
.status-banner.full { color: var(--success); }

.actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 20px;
}

button {
  font: inherit;
  font-weight: 700;
  font-size: 16px;
  border-radius: 999px;
  padding: 14px 20px;
  border: none;
  cursor: pointer;
  min-height: 48px;
  letter-spacing: 0.02em;
}

button:disabled { opacity: 0.5; cursor: default; }

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

.btn-secondary {
  background: transparent;
  color: var(--text-variant);
  border: 1.5px solid var(--surface-variant);
}

.name-input {
  width: 100%;
  font: inherit;
  font-size: 16px;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1.5px solid var(--surface-variant);
  background: var(--surface);
  color: var(--text);
  margin-bottom: 12px;
}

.name-input:focus { outline: 2px solid var(--accent); }

/* Doc 38: optional phone (prefix + number) and the app banner. */
.phone-row { display: flex; gap: 8px; }
.phone-row .phone-prefix { width: 96px; flex: none; }
.phone-label { margin-top: 4px; }
.app-banner { margin-top: 12px; }

.footer-note {
  font-size: 12px;
  color: var(--text-variant);
  text-align: center;
  margin-top: 20px;
  line-height: 1.5;
}

.error-state, .empty-state {
  text-align: center;
  padding: 48px 16px;
}

.error-state h1, .empty-state h1 {
  font-size: 18px;
  margin-bottom: 8px;
}

.error-state p, .empty-state p {
  color: var(--text-variant);
  font-size: 15px;
}

.success-state {
  text-align: center;
  padding: 32px 16px;
}

.success-state .headline {
  font-size: 28px;
  font-weight: 800;
  color: var(--success);
  margin-bottom: 4px;
}

.success-state .subheadline {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 20px;
}

.success-state .details {
  color: var(--text-variant);
  font-size: 15px;
  line-height: 1.6;
}

.duplicate-notice {
  color: var(--warning);
  font-weight: 600;
}

.btn-danger-text {
  background: transparent;
  color: var(--error);
  border: none;
  text-decoration: underline;
  padding: 8px;
  min-height: auto;
}

.confirm-dialog p {
  color: var(--text-variant);
  font-size: 15px;
  margin: 0 0 20px;
}

/* Brand header: the lockup (white TEN + lime UP) is drawn for dark
   backgrounds, so the bar is always #0B0D0F in both color schemes. */
.brand-header {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 10px 16px;
  background: #0B0D0F;
}
.brand-header img { height: 28px; width: auto; display: block; }
