/* ── auth.css — unified login page styles ──────────────────────────────────
   Standalone: does not depend on Bootstrap or berlinfair.css.
   Colors match BRANDING.md: slate blue #426085, forest green #3a7459.
   System font stack only — no external CDN (fairground network may be slow).
   ───────────────────────────────────────────────────────────────────────── */

:root {
  --brand:        #426085;
  --action:       #3a7459;
  --action-hover: #2e5c46;
  --muted:        #6c757d;
  --border:       rgba(0, 0, 0, .125);
  --bg:           #ffffff;
  --bg-subtle:    #f8f9fa;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, sans-serif;
  font-size: 1rem;
  color: #212529;
  background-color: var(--bg-subtle);
  min-height: 100vh;
  padding-top: 0; /* override berlinfair.css body padding-top: 5rem */
}

/* ── Page wrapper ── */
.auth-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 48px 16px 64px;
  min-height: 100vh;
}

/* ── Brand header ── */
.auth-brand {
  text-align: center;
  margin-bottom: 24px;
}
.auth-brand img {
  width: 52px;
  height: 52px;
  display: block;
  margin: 0 auto 10px;
}
.auth-brand h1 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--brand);
  letter-spacing: -.01em;
  margin-bottom: 2px;
}
.auth-brand p {
  font-size: .875rem;
  color: var(--muted);
}

/* ── Card ── */
.auth-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .07);
  overflow: hidden;
}

/* ── Registration-closed banner ── */
.auth-closed-banner {
  background: #fff3cd;
  border-bottom: 1px solid #ffc107;
  padding: 10px 16px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: .875rem;
  color: #856404;
}
.auth-closed-banner strong {
  display: block;
  font-weight: 600;
  margin-bottom: 1px;
}

/* ── Tab bar ── */
.auth-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  background: var(--bg-subtle);
}
.auth-tab {
  flex: 1;
  padding: 12px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  font-family: inherit;
  font-size: .9rem;
  font-weight: 500;
  color: var(--muted);
  transition: color .15s, border-color .15s, background .15s;
}
.auth-tab:first-child { border-right: 1px solid var(--border); }
.auth-tab.active {
  color: var(--brand);
  font-weight: 600;
  background: var(--bg);
  border-bottom-color: var(--brand);
}
.auth-tab:hover:not(.active) {
  background: rgba(0, 0, 0, .03);
  color: #495057;
}

/* ── Tab panels ── */
.auth-panel { display: none; padding: 24px; }
.auth-panel.active { display: block; }

/* ── Alerts ── */
.auth-alert {
  padding: 10px 14px;
  border-radius: 4px;
  font-size: .875rem;
  margin-bottom: 18px;
  border: 1px solid transparent;
}
.auth-alert-danger  { background: #fdf2f2; border-color: #f5c6cb; color: #721c24; }
.auth-alert-info    { background: rgba(23, 162, 184, .10); border-color: rgba(23, 162, 184, .3); color: #0c5460; }
.auth-alert-warning { background: #fff3cd; border-color: #ffc107; color: #856404; }
.auth-alert.hidden  { display: none; }

/* ── Form groups ── */
.auth-form-group { margin-bottom: 16px; }

.auth-form-group label {
  display: block;
  font-size: .875rem;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 5px;
}

.auth-form-group input[type="text"],
.auth-form-group input[type="email"],
.auth-form-group input[type="password"] {
  display: block;
  width: 100%;
  padding: .4rem .75rem;
  font-size: 1rem;
  font-family: inherit;
  color: #495057;
  background: #fff;
  border: 1px solid #ced4da;
  border-radius: 4px;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
  -webkit-appearance: none;
}
.auth-form-group input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 .2rem rgba(66, 96, 133, .25);
}

.auth-form-text {
  font-size: .8rem;
  color: var(--muted);
  margin-top: 4px;
}

/* ── Name row ── */
.auth-name-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* ── Primary button ── */
.auth-btn {
  display: block;
  width: 100%;
  padding: .5rem 1rem;
  margin-top: 20px;
  background: var(--action);
  color: #fff;
  border: 1px solid var(--action);
  border-radius: 4px;
  font-size: 1rem;
  font-family: inherit;
  font-weight: 500;
  cursor: pointer;
  transition: background .15s, border-color .15s;
}
.auth-btn:hover { background: var(--action-hover); border-color: var(--action-hover); }
.auth-btn:disabled { opacity: .65; cursor: not-allowed; }

/* ── Footer row (links) ── */
.auth-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 14px;
  font-size: .8125rem;
  color: var(--muted);
}
.auth-link {
  background: none;
  border: none;
  color: var(--action);
  font-size: .8125rem;
  font-family: inherit;
  cursor: pointer;
  padding: 0;
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.auth-link:hover { color: var(--action-hover); }

/* ── Responsive ── */
@media (max-width: 460px) {
  .auth-panel { padding: 18px 16px; }
  .auth-name-row { grid-template-columns: 1fr; }
  .auth-page { padding: 28px 12px 48px; }
}
