/* ========================================
   TrailCrew Pitch Deck — App-Matched Styles
   Light theme matching LoginScreen.tsx
   ======================================== */

:root {
  --geo-neon: #00ff9a;
  --geo-neon-hover: #00e68b;
  --nav-teal: #009F88;
  --deep-forest: #0F1A14;
  --trail-blaze: #FF5E2F;
  --ash-grey: #6B7280;
  --summit-white: #FAFBF9;
  --cloud: #E5E7EB;
  --mist: #E3E5DF;
}

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

html, body {
  width: 100%;
  min-height: 100%;
  font-family: 'Poppins', sans-serif;
  background: var(--summit-white);
  color: var(--deep-forest);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── App Header ── */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #ffffff;
  border-bottom: 1px solid rgba(15,26,20,0.1);
}

.header-inner {
  max-width: 560px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ── Logo Mark ── */
.logomark {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.logomark svg {
  width: 36px;
  height: auto;
  flex-shrink: 0;
}

.logo-text {
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.03em;
  color: var(--deep-forest);
}

.header-badge {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ash-grey);
  background: var(--mist);
  padding: 4px 10px;
  border-radius: 20px;
}

/* ── Header with back button ── */
.header-back {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-back {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--mist);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s;
  color: var(--deep-forest);
  text-decoration: none;
  flex-shrink: 0;
}

.btn-back:hover {
  background: #D3D5CF;
}

.btn-back svg {
  width: 20px;
  height: 20px;
  stroke-width: 2;
}

.header-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--deep-forest);
}

/* ── Main Content ── */
.page-main {
  padding: 32px 24px 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ── Auth Card ── */
.auth-card {
  width: 100%;
  max-width: 440px;
  background: #ffffff;
  border-radius: 20px;
  padding: 36px 32px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 4px 16px rgba(0,0,0,0.06);
}

/* ── Section Header (inside card) ── */
.card-eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--nav-teal);
  margin-bottom: 8px;
}

.card-title {
  font-size: 26px;
  font-weight: 800;
  line-height: 1.2;
  color: var(--deep-forest);
  margin-bottom: 8px;
}

.card-title .neon {
  color: var(--geo-neon);
  /* slight dark background for readability on white */
  background: linear-gradient(135deg, #00cc7a, var(--nav-teal));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.card-subtitle {
  font-size: 14px;
  color: var(--ash-grey);
  line-height: 1.6;
  margin-bottom: 28px;
}

/* ── Error Box ── */
.error-box {
  display: none;
  align-items: flex-start;
  gap: 10px;
  background: rgba(255,94,47,0.08);
  border: 1px solid rgba(255,94,47,0.2);
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 20px;
  color: var(--trail-blaze);
  font-size: 13px;
  line-height: 1.5;
}

.error-box.visible {
  display: flex;
}

.error-box svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 1px;
  stroke-width: 2;
}

/* ── Form Styles ── */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--deep-forest);
  margin-bottom: 8px;
}

.form-group label .optional {
  color: var(--ash-grey);
  font-weight: 400;
  font-size: 12px;
}

/* Input wrapper for icon prefix */
.input-wrap {
  position: relative;
}

.input-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--ash-grey);
  stroke-width: 2;
  pointer-events: none;
}

.input-icon-top {
  top: 16px;
  transform: none;
}

.form-input {
  width: 100%;
  padding: 14px 16px;
  background: #ffffff;
  border: 1px solid rgba(15,26,20,0.2);
  border-radius: 12px;
  color: var(--deep-forest);
  font-family: 'Poppins', sans-serif;
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input.has-icon {
  padding-left: 48px;
}

.form-input::placeholder {
  color: rgba(107,114,128,0.6);
}

.form-input:focus {
  border-color: var(--nav-teal);
  box-shadow: 0 0 0 3px rgba(0,159,136,0.12);
}

textarea.form-input {
  resize: vertical;
  min-height: 80px;
  line-height: 1.6;
}

.char-count {
  text-align: right;
  font-size: 11px;
  color: var(--ash-grey);
  margin-top: 4px;
}

/* ── Code Input ── */
.code-input {
  width: 100%;
  padding: 20px 16px;
  background: #ffffff;
  border: 1px solid rgba(15,26,20,0.2);
  border-radius: 14px;
  color: var(--deep-forest);
  font-family: 'Poppins', sans-serif;
  font-size: 36px;
  font-weight: 700;
  text-align: center;
  letter-spacing: 0.35em;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.code-input:focus {
  border-color: var(--nav-teal);
  box-shadow: 0 0 0 3px rgba(0,159,136,0.12);
}

.code-input::placeholder {
  color: rgba(107,114,128,0.35);
  letter-spacing: 0.3em;
  font-weight: 400;
  font-size: 28px;
}

/* ── Primary Button — gradient (matches app CTA) ── */
.btn-primary {
  width: 100%;
  padding: 16px 24px;
  background: linear-gradient(135deg, var(--geo-neon), var(--nav-teal));
  border: none;
  border-radius: 100px;
  color: var(--deep-forest);
  font-family: 'Poppins', sans-serif;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 8px;
  transition: box-shadow 0.25s, transform 0.15s;
  letter-spacing: -0.01em;
}

.btn-primary:hover {
  box-shadow: 0 8px 24px rgba(0,255,154,0.3);
  transform: scale(1.02);
}

.btn-primary:active {
  transform: scale(0.98);
}

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

/* ── Spinner ── */
.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(15,26,20,0.2);
  border-top-color: var(--deep-forest);
  border-radius: 50%;
  animation: spin 0.65s linear infinite;
  flex-shrink: 0;
}

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

/* ── Links ── */
.page-link {
  display: block;
  text-align: center;
  margin-top: 24px;
  font-size: 13px;
  color: var(--ash-grey);
}

.page-link a {
  color: var(--nav-teal);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.page-link a:hover {
  color: #007a68;
  text-decoration: underline;
}

/* ── Success State ── */
.success-state {
  text-align: center;
  padding: 16px 0;
}

.success-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(0,255,154,0.15), rgba(0,159,136,0.15));
  border: 2px solid rgba(0,255,154,0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  color: var(--nav-teal);
}

.success-icon svg {
  width: 28px;
  height: 28px;
  stroke-width: 2.5;
}

.success-state h3 {
  font-size: 20px;
  font-weight: 700;
  color: var(--deep-forest);
  margin-bottom: 12px;
}

.success-state p {
  font-size: 14px;
  color: var(--ash-grey);
  line-height: 1.6;
}

.success-state .email-highlight {
  color: var(--nav-teal);
  font-weight: 500;
}

/* ── Shake Animation (verify page) ── */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-6px); }
  20%, 40%, 60%, 80% { transform: translateX(6px); }
}

.shake {
  animation: shake 0.45s ease-in-out;
}

/* ── Confidential Footer ── */
.confidential-note {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 10px;
  color: rgba(15,26,20,0.25);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  pointer-events: none;
  z-index: 10;
}

/* ── Responsive ── */
@media (max-width: 540px) {
  .auth-card {
    padding: 28px 20px;
    border-radius: 16px;
    box-shadow: none;
  }

  .page-main {
    padding-top: 20px;
  }

  .card-title {
    font-size: 22px;
  }

  .header-inner {
    padding: 12px 16px;
  }
}
