/* ========================================
   NAV
   ======================================== */

.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 720px;
  margin: 0 auto;
  padding: var(--space-sm) var(--space-md);
}

.nav__brand {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-weight: 700;
  font-size: var(--text-base);
  color: var(--primary-900);
  text-decoration: none;
}
.nav__brand:hover { text-decoration: none; color: var(--primary-700); }

.nav__logo { color: var(--primary-700); }

.nav__right {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.nav__user {
  font-size: var(--text-sm);
  color: var(--muted);
}

/* ========================================
   CARDS
   ======================================== */

.card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: var(--space-lg);
  box-shadow: var(--shadow-sm);
}

.card--elevated {
  box-shadow: var(--shadow-md);
  border-color: transparent;
}

/* Step card (dashboard) */
.card--step {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-lg);
  text-decoration: none;
  color: var(--ink);
  transition: box-shadow var(--transition), border-color var(--transition), transform var(--transition);
  cursor: pointer;
}

.card--step:hover {
  text-decoration: none;
  color: var(--ink);
}

.card--step.is-current {
  border-left: 3px solid var(--primary-500);
  box-shadow: var(--shadow-md);
}
.card--step.is-current:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
}

.card--step.is-completed {
  opacity: 0.7;
  background: var(--bg-subtle);
}
.card--step.is-completed:hover {
  opacity: 0.85;
}

.card--step.is-locked {
  opacity: 0.45;
  cursor: not-allowed;
}

/* Step number circle */
.card__step-number {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-weight: 700;
  font-size: var(--text-sm);
}

.is-current .card__step-number {
  background: var(--primary-100);
  color: var(--primary-700);
  border: 2px solid var(--primary-500);
}

.is-completed .card__step-number {
  background: var(--success-bg);
  color: var(--success);
  border: 2px solid var(--success);
}

.is-locked .card__step-number {
  background: var(--bg-subtle);
  color: var(--muted);
  border: 2px solid var(--border);
}

/* Step body */
.card__step-body { flex: 1; min-width: 0; }

.card__step-title {
  font-weight: 600;
  font-size: var(--text-base);
  margin-bottom: 2px;
}

.card__step-desc {
  font-size: var(--text-sm);
  color: var(--muted);
}

/* Step arrow / icon */
.card__step-arrow {
  flex-shrink: 0;
  color: var(--muted);
  transition: transform var(--transition);
}
.is-current:hover .card__step-arrow {
  transform: translateX(2px);
}

/* ========================================
   BUTTONS
   ======================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 12px 24px;
  border: none;
  border-radius: var(--radius-button);
  font-family: var(--font-stack);
  font-size: var(--text-base);
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  transition: background var(--transition), color var(--transition), box-shadow var(--transition), transform var(--transition);
  min-height: 44px;
}

.btn--primary {
  background: linear-gradient(135deg, var(--green-dark), var(--green-mid));
  color: #fff;
}
.btn--primary:hover {
  background: linear-gradient(135deg, #00854E, var(--green-dark));
  color: #fff;
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn--secondary {
  background: transparent;
  border: 1px solid var(--primary-700);
  color: var(--primary-700);
}
.btn--secondary:hover {
  background: var(--primary-50);
  text-decoration: none;
}

.btn--ghost {
  background: transparent;
  color: var(--muted);
  padding: 8px 12px;
}
.btn--ghost:hover {
  color: var(--ink);
  background: var(--bg-subtle);
  text-decoration: none;
}

.btn--success {
  background: var(--success);
  color: #fff;
}
.btn--success:hover {
  color: #fff;
  text-decoration: none;
  opacity: 0.9;
}

.btn--full { width: 100%; }

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

.btn--loading {
  position: relative;
}

/* ========================================
   FORMS
   ======================================== */

.form-group {
  margin-bottom: var(--space-md);
}

.form-label {
  display: block;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--muted);
  margin-bottom: var(--space-xs);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.form-input {
  display: block;
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-input);
  font-family: var(--font-stack);
  font-size: var(--text-base);
  color: var(--ink);
  background: var(--bg);
  transition: border-color var(--transition), box-shadow var(--transition);
  min-height: 44px;
}
.form-input::placeholder { color: var(--muted); opacity: 0.6; }
.form-input:focus {
  border-color: var(--primary-500);
  box-shadow: 0 0 0 3px rgba(122, 79, 177, 0.18);
  outline: none;
}
.form-input--error {
  border-color: var(--error);
}
.form-input--error:focus {
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.15);
}

.form-error {
  display: block;
  font-size: var(--text-xs);
  color: var(--error);
  margin-top: var(--space-xs);
}
.form-error:empty { display: none; }

.form-checkbox {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  cursor: pointer;
  font-size: var(--text-sm);
  line-height: 1.5;
}
.form-checkbox input[type="checkbox"] {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  margin-top: 2px;
  accent-color: var(--primary-700);
  cursor: pointer;
}

/* ========================================
   CODE INPUT (verification)
   ======================================== */

.code-inputs {
  display: flex;
  gap: var(--space-sm);
  justify-content: center;
}

.code-inputs__digit {
  width: 48px;
  height: 56px;
  text-align: center;
  font-size: 1.5rem;
  font-weight: 700;
  border: 2px solid var(--border);
  border-radius: var(--radius-input);
  background: var(--bg);
  color: var(--ink);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.code-inputs__digit:focus {
  border-color: var(--primary-700);
  box-shadow: 0 0 0 3px rgba(122, 79, 177, 0.18);
  outline: none;
}
.code-inputs__digit.shake {
  animation: shake 0.4s ease;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-4px); }
  40%, 80% { transform: translateX(4px); }
}

/* ========================================
   ALERTS
   ======================================== */

.alert {
  padding: 12px 16px;
  border-radius: var(--radius-input);
  font-size: var(--text-sm);
  margin-bottom: var(--space-md);
}

.alert--error {
  background: var(--error-bg);
  border: 1px solid rgba(220, 38, 38, 0.2);
  color: var(--error);
}

.alert--success {
  background: var(--success-bg);
  border: 1px solid rgba(13, 148, 136, 0.2);
  color: var(--success);
}

.alert--info {
  background: var(--primary-100);
  border: 1px solid rgba(122, 79, 177, 0.22);
  color: var(--primary-700);
}

/* ========================================
   BADGES / PILLS
   ======================================== */

.badge {
  display: inline-block;
  padding: 4px 14px;
  border-radius: var(--radius-pill);
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge--positive {
  background: var(--primary-100);
  color: var(--primary-700);
}

.badge--negative {
  background: var(--success-bg);
  color: var(--success);
}

.badge--pending {
  background: var(--warning-bg);
  color: var(--warning);
}

/* Large result badge */
.badge--lg {
  padding: 10px 28px;
  font-size: var(--text-lg);
}

/* ========================================
   PROGRESS BAR
   ======================================== */

.progress {
  margin-bottom: var(--space-lg);
}

.progress__label {
  display: flex;
  justify-content: space-between;
  font-size: var(--text-sm);
  color: var(--muted);
  margin-bottom: var(--space-sm);
}

.progress__bar {
  height: 6px;
  background: var(--border);
  border-radius: var(--radius-pill);
  overflow: hidden;
}

.progress__fill {
  height: 100%;
  background: var(--primary-500);
  border-radius: var(--radius-pill);
  transition: width 0.4s ease;
}

/* ========================================
   VIDEO PLACEHOLDER
   ======================================== */

.video-placeholder {
  aspect-ratio: 16 / 9;
  background: var(--bg-subtle);
  border: 2px dashed var(--border);
  border-radius: var(--radius-card);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  color: var(--muted);
}

.video-placeholder__icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--primary-100);
  color: var(--primary-700);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ========================================
   WAIVER TEXT
   ======================================== */

.waiver-text {
  max-height: 400px;
  overflow-y: auto;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-input);
  padding: var(--space-lg);
  font-size: var(--text-sm);
  line-height: 1.7;
  margin-bottom: var(--space-lg);
}

/* ========================================
   DISCLAIMER
   ======================================== */

.disclaimer {
  background: var(--primary-50);
  border-left: 3px solid var(--primary-300);
  padding: var(--space-md);
  font-size: var(--text-sm);
  color: var(--muted);
  border-radius: 0 var(--radius-input) var(--radius-input) 0;
}

/* ========================================
   INFO SECTION (result educational)
   ======================================== */

.info-section {
  background: var(--primary-50);
  border-radius: var(--radius-card);
  padding: var(--space-lg);
  margin-bottom: var(--space-lg);
}

.info-section h3 {
  font-size: var(--text-base);
  margin-bottom: var(--space-sm);
  color: var(--primary-900);
}

.info-section p {
  font-size: var(--text-sm);
  color: var(--muted);
}

/* ========================================
   STEP PAGE LAYOUT
   ======================================== */

.step-page {
  padding-top: var(--space-lg);
  padding-bottom: var(--space-2xl);
}

.step-page__breadcrumb {
  font-size: var(--text-sm);
  color: var(--muted);
  margin-bottom: var(--space-lg);
}
.step-page__breadcrumb a {
  color: var(--primary-500);
}

.step-page__title {
  font-size: var(--text-xl);
  margin-bottom: var(--space-sm);
}

.step-page__subtitle {
  color: var(--muted);
  margin-bottom: var(--space-xl);
}

.step-page__actions {
  display: flex;
  gap: var(--space-md);
  margin-top: var(--space-xl);
}

/* ========================================
   BOOKING INFO CARD
   ======================================== */

.booking-info {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.booking-info__item {
  display: flex;
  gap: var(--space-md);
  align-items: flex-start;
}

.booking-info__icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary-100);
  color: var(--primary-700);
  display: flex;
  align-items: center;
  justify-content: center;
}

.booking-info__text h4 {
  font-size: var(--text-sm);
  font-weight: 600;
  margin-bottom: 2px;
}

.booking-info__text p {
  font-size: var(--text-sm);
  color: var(--muted);
  margin-bottom: 0;
}

/* ========================================
   TESTING WINDOWS
   ======================================== */

.testing-windows {
  display: grid;
  gap: var(--space-sm);
}

.testing-window {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md);
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-input);
}

.testing-window__date {
  font-weight: 700;
  font-size: var(--text-sm);
  min-width: 100px;
}

.testing-window__time {
  font-size: var(--text-sm);
  color: var(--muted);
}

/* ========================================
   RESULT DISPLAY
   ======================================== */

.result-display {
  text-align: center;
  padding: var(--space-xl) 0;
}

.result-display__label {
  font-size: var(--text-sm);
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: var(--space-sm);
}

.result-display__gene {
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--primary-900);
  margin-bottom: var(--space-md);
}

.result-display__date {
  font-size: var(--text-sm);
  color: var(--muted);
}

/* Pending state */
.result-pending {
  text-align: center;
  padding: var(--space-2xl) var(--space-lg);
}

.result-pending__icon {
  width: 64px;
  height: 64px;
  margin: 0 auto var(--space-lg);
  border-radius: 50%;
  background: var(--warning-bg);
  color: var(--warning);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ========================================
   STEP LIST (dashboard)
   ======================================== */

.step-list {
  display: grid;
  gap: var(--space-md);
}

/* ========================================
   AUTH PAGE
   ======================================== */

.auth-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(900px circle at 50% -10%, rgba(0, 240, 210, 0.30), transparent 60%),
    linear-gradient(160deg, var(--primary-900) 0%, var(--primary-700) 55%, var(--primary-500) 100%);
  padding: var(--space-lg);
}

.auth-page__card {
  width: 100%;
  max-width: 440px;
  background: var(--bg);
  border-radius: 20px;
  padding: calc(var(--space-xl) + 6px) var(--space-xl) var(--space-lg);
  box-shadow: 0 24px 60px -12px rgba(12, 45, 72, 0.5), 0 6px 16px rgba(12, 45, 72, 0.12);
  position: relative;
  overflow: hidden;
}

/* Gradient accent bar across the top of the card */
.auth-page__card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 5px;
  background: linear-gradient(90deg, var(--green-dark), var(--green-mid));
}

.auth-page__header {
  text-align: center;
  margin-bottom: var(--space-xl);
}

.auth-page__logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
  color: var(--primary-700);
}

/* Icon becomes a circular gradient badge */
.auth-page__logo svg {
  box-sizing: content-box;
  width: 26px;
  height: 26px;
  color: #fff;
  padding: 15px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--green-dark), var(--green-mid));
  box-shadow: 0 10px 24px -6px rgba(0, 163, 96, 0.6);
}

.auth-page__logo span {
  font-size: var(--text-lg);
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--primary-900);
}

.auth-page__title {
  font-size: var(--text-xl);
  margin-bottom: var(--space-sm);
}

.auth-page__subtitle {
  color: var(--muted);
  font-size: var(--text-sm);
}

/* Gradient CTA on the auth screens for a bit more polish */
.auth-page .btn--primary {
  background: linear-gradient(135deg, var(--green-dark), var(--green-mid));
  border: none;
  box-shadow: 0 10px 22px -8px rgba(0, 163, 96, 0.55);
}
.auth-page .btn--primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #00854E, var(--green-dark));
}

.auth-page__footer {
  text-align: center;
  margin-top: var(--space-lg);
  font-size: var(--text-sm);
  color: var(--muted);
}

/* ========================================
   RESEND LINK
   ======================================== */

.resend {
  text-align: center;
  margin-top: var(--space-lg);
  font-size: var(--text-sm);
  color: var(--muted);
}

.resend__link {
  color: var(--primary-500);
  cursor: pointer;
  background: none;
  border: none;
  font-family: var(--font-stack);
  font-size: var(--text-sm);
  text-decoration: underline;
}
.resend__link:disabled {
  color: var(--muted);
  cursor: not-allowed;
  text-decoration: none;
}

/* ── Powered-by Footer ── */
.abt-footer {
  text-align: center;
  padding: 2rem 1.5rem 1.5rem;
  font-size: 0.75rem;
  color: var(--muted, #94a3b8);
  opacity: 0.6;
}
.abt-footer a {
  color: inherit;
  text-decoration: none;
}
.abt-footer a:hover {
  text-decoration: underline;
  opacity: 1;
}
