/* ============================================================
   NTT DATA Racing Experience — app.css
   Mobile-first, no build step required
   ============================================================ */

:root {
  --ntt-blue: #002d62;
  --ntt-blue-mid: #0052a5;
  --ntt-blue-light: #e8f0fb;
  --ntt-accent: #00b4d8;
  --ntt-red: #c0392b;
  --ntt-green: #27ae60;
  --ntt-yellow: #f39c12;
  --ntt-gray: #6c757d;
  --ntt-light: #f8f9fa;
  --text-primary: #111827;
  --text-secondary: #4b5563;
  --border: #e5e7eb;
  --radius: 12px;
  --radius-sm: 6px;
  --shadow: 0 2px 16px rgba(0,45,98,.10);
  --shadow-lg: 0 8px 32px rgba(0,45,98,.16);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
}

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

html { font-size: 16px; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: #f5f7fa;
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

/* ─── Public layout ─────────────────────────────────────── */
.public-page { background: var(--ntt-blue); min-height: 100vh; }

.public-container {
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 1.5rem 1rem 3rem;
}

.public-card {
  width: 100%;
  max-width: 440px;
  background: #fff;
  border-radius: var(--radius);
  padding: 2rem 1.5rem 2.5rem;
  box-shadow: var(--shadow-lg);
}

.logo-wrap { text-align: center; margin-bottom: 1.2rem; }
.logo { max-width: 180px; height: auto; }

.race-stripe {
  height: 5px;
  background: linear-gradient(90deg, var(--ntt-blue) 0%, var(--ntt-accent) 50%, var(--ntt-blue) 100%);
  border-radius: 3px;
  margin-bottom: 1.5rem;
}

.hero-title {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--ntt-blue);
  text-align: center;
  line-height: 1.2;
  letter-spacing: -.5px;
}
.hero-sub {
  font-size: 1rem;
  text-align: center;
  color: var(--text-secondary);
  margin-top: .4rem;
  margin-bottom: 1.2rem;
  font-weight: 500;
}
.hero-desc {
  font-size: .95rem;
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: 1.8rem;
  line-height: 1.6;
}
.footer-brand { text-align: center; margin-top: 2rem; font-size: 1.5rem; opacity: .5; }

/* ─── Forms ─────────────────────────────────────────────── */
.form-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--ntt-blue);
  margin-bottom: 1.4rem;
  text-align: center;
}
.form-group {
  margin-bottom: 1.1rem;
}
.form-group label {
  display: block;
  font-size: .875rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: .35rem;
}
.form-group input[type="text"],
.form-group input[type="tel"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="number"],
.form-group input[type="datetime-local"],
.form-group select,
.form-group textarea {
  width: 100%;
  padding: .75rem 1rem;
  font-size: 1rem;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--text-primary);
  transition: border-color .15s;
  -webkit-appearance: none;
  appearance: none;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--ntt-blue-mid);
  box-shadow: 0 0 0 3px rgba(0,82,165,.12);
}
.form-group.has-error input,
.form-group.has-error select {
  border-color: var(--ntt-red);
}
.field-error {
  display: block;
  font-size: .8rem;
  color: var(--ntt-red);
  margin-top: .25rem;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
@media (max-width: 500px) { .form-row { grid-template-columns: 1fr; } }

/* Consent */
.consent-group { margin-top: .5rem; }
.consent-label {
  display: flex;
  gap: .75rem;
  align-items: flex-start;
  cursor: pointer;
}
.consent-label input[type="checkbox"] {
  width: 20px;
  height: 20px;
  min-width: 20px;
  margin-top: .1rem;
  cursor: pointer;
  accent-color: var(--ntt-blue);
}
.consent-text {
  font-size: .82rem;
  color: var(--text-secondary);
  line-height: 1.5;
}
.consent-text a { color: var(--ntt-blue-mid); }

/* ─── Buttons ───────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  padding: .65rem 1.25rem;
  font-size: .9rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: all .15s;
  white-space: nowrap;
}
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--ntt-blue); color: #fff; }
.btn-primary:hover { background: var(--ntt-blue-mid); }
.btn-secondary { background: #e9ecef; color: var(--text-primary); }
.btn-secondary:hover { background: #d1d5db; }
.btn-success { background: var(--ntt-green); color: #fff; }
.btn-warning { background: var(--ntt-yellow); color: #fff; }
.btn-danger { background: var(--ntt-red); color: #fff; }
.btn-vip { background: #7c3aed; color: #fff; }
.btn-vip:hover { background: #6d28d9; }
.btn-lg { padding: .9rem 1.75rem; font-size: 1rem; border-radius: var(--radius-sm); }
.btn-full { width: 100%; }
.btn-sm { padding: .35rem .7rem; font-size: .8rem; }
.btn-calendar { margin-top: 1rem; background: var(--ntt-blue-light); color: var(--ntt-blue); border: 1.5px solid var(--ntt-blue); }

/* ─── Alerts ────────────────────────────────────────────── */
.alert {
  padding: 1rem 1.2rem;
  border-radius: var(--radius-sm);
  font-size: .9rem;
  line-height: 1.5;
}
.alert-warning { background: #fff3cd; color: #664d03; border-left: 4px solid var(--ntt-yellow); }
.alert-info { background: #cff4fc; color: #055160; border-left: 4px solid var(--ntt-accent); }
.alert-danger { background: #f8d7da; color: #842029; border-left: 4px solid var(--ntt-red); }
.alert-success { background: #d1e7dd; color: #0a3622; border-left: 4px solid var(--ntt-green); }

/* ─── Back link ─────────────────────────────────────────── */
.back-link { text-align: center; margin-top: 1.2rem; }
.back-link a { color: var(--text-secondary); font-size: .875rem; text-decoration: none; }
.back-link a:hover { color: var(--ntt-blue); }

/* ─── Booking page ──────────────────────────────────────── */
.booking-card { text-align: center; }
.booking-status {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--ntt-blue);
  margin: 1.2rem 0;
}
.booking-time-block {
  background: var(--ntt-blue);
  color: #fff;
  border-radius: var(--radius);
  padding: 1.5rem;
  margin: 1rem 0;
}
.booking-label { font-size: .85rem; opacity: .8; text-transform: uppercase; letter-spacing: .05em; }
.booking-time { font-size: 3.5rem; font-weight: 900; line-height: 1; letter-spacing: -2px; }
.booking-date { font-size: .9rem; opacity: .8; margin-top: .3rem; }
.booking-instruction {
  display: flex;
  align-items: center;
  gap: .75rem;
  background: var(--ntt-blue-light);
  border-radius: var(--radius-sm);
  padding: 1rem;
  margin: 1rem 0;
  text-align: left;
  font-size: .95rem;
}
.instruction-icon { font-size: 1.4rem; }
.booking-tip {
  font-size: .875rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: .8rem 0;
}
.booking-name-info {
  font-size: .8rem;
  color: var(--text-secondary);
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

/* ─── Login admin ───────────────────────────────────────── */
.admin-login-page { background: var(--ntt-blue); min-height: 100vh; }
.login-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.login-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 2.5rem 2rem;
  width: 100%;
  max-width: 400px;
  box-shadow: var(--shadow-lg);
}
.login-title { font-size: 1.3rem; font-weight: 700; color: var(--ntt-blue); text-align: center; margin-bottom: .3rem; }
.login-sub { font-size: .875rem; color: var(--text-secondary); text-align: center; margin-bottom: 1.5rem; }

/* ─── Booking urgente / janela passada ──────────────────── */
.booking-urgent {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  background: #dc2626;
  color: #fff;
  border-radius: var(--radius-sm);
  padding: 1.1rem;
  margin: 1rem 0;
  animation: pulse-urgent 1.5s ease-in-out infinite;
}
@keyframes pulse-urgent {
  0%, 100% { opacity: 1; }
  50% { opacity: .85; }
}
.urgent-icon { font-size: 1.6rem; line-height: 1; }
.booking-urgent strong { font-size: 1rem; }

.booking-alert-window-passed {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  background: #fff7ed;
  border: 2px solid #f97316;
  border-radius: var(--radius-sm);
  padding: 1rem;
  margin: 1rem 0;
  color: #7c2d12;
}
.alert-icon { font-size: 1.5rem; line-height: 1; }

/* ─── Cancel section ────────────────────────────────────── */
.cancel-wrap { margin-top: 1.5rem; text-align: center; }
.btn-cancel-link {
  background: none;
  border: none;
  color: #9ca3af;
  font-size: .8rem;
  cursor: pointer;
  text-decoration: underline;
  padding: .25rem;
}
.btn-cancel-link:hover { color: var(--ntt-red); }
.cancel-confirm {
  background: #fff5f5;
  border: 1px solid #fecaca;
  border-radius: var(--radius-sm);
  padding: 1rem;
  margin-top: .75rem;
  text-align: left;
}
.cancel-confirm p { font-size: .88rem; color: #6b7280; margin-bottom: .75rem; }
.cancel-actions { display: flex; flex-direction: column; gap: .5rem; }
.badge {
  display: inline-block;
  padding: .2rem .55rem;
  border-radius: 99px;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .02em;
  text-transform: uppercase;
  white-space: nowrap;
}
.badge-regular { background: #e0f2fe; color: #0369a1; }
.badge-vip { background: #ede9fe; color: #5b21b6; }
.badge-vip-tag { background: #7c3aed; color: #fff; }
.badge-time { background: #f0fdf4; color: #15803d; }
.badge-danger { background: #fee2e2; color: #b91c1c; }
.badge-open { background: #dcfce7; color: #15803d; }
.badge-racing { background: #1e40af; color: #fff; padding: .3rem .8rem; }

.badge-status--booked { background: #e0f2fe; color: #0369a1; }
.badge-status--checked_in { background: #dcfce7; color: #15803d; }
.badge-status--waiting { background: #fef9c3; color: #a16207; }
.badge-status--called { background: #fed7aa; color: #c2410c; }
.badge-status--racing { background: #1e40af; color: #fff; }
.badge-status--completed { background: #d1fae5; color: #065f46; }
.badge-status--no_show { background: #fee2e2; color: #991b1b; }
.badge-status--cancelled { background: #f1f5f9; color: #64748b; }
