/* ============================================
   APEX / AUTH / DASHBOARD STYLES
   Extends the design tokens from styles.css
   ============================================ */

.auth-body { background: var(--paper); min-height: 100vh; }

.auth-main {
  max-width: 640px;
  margin: 0 auto;
  padding: 3.5rem 1.5rem 5rem;
}

.auth-card, .exam-card {
  background: var(--white);
  border: 1px solid rgba(15,35,64,0.15);
  padding: 2.5rem 2rem;
}

.auth-title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  text-transform: uppercase;
  color: var(--ink);
  margin: 0.6rem 0 1rem;
  line-height: 1.25;
}
.auth-sub { color: var(--steel); line-height: 1.65; margin-bottom: 1rem; font-size: 0.98rem; }

.auth-tabs { display: flex; gap: 0; margin: 1.5rem 0; border-bottom: 2px solid var(--ink); }
.auth-tab {
  flex: 1;
  padding: 0.8rem;
  font-family: var(--font-display);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--steel);
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.auth-tab.is-active { color: var(--navy); border-bottom-color: var(--gold); }

.auth-form { display: flex; flex-direction: column; gap: 1rem; }
.auth-form label {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--steel);
}
.auth-form input, .auth-form select {
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid rgba(15,35,64,0.3);
  background: var(--paper);
  color: var(--ink);
}
.form-row-two { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.auth-submit { margin-top: 0.5rem; width: 100%; text-align: center; }
.btn-ghost-dark {
  border: 2px solid var(--ink);
  color: var(--ink);
  background: none;
  font-family: var(--font-display);
  text-transform: uppercase;
  font-size: 0.9rem;
  padding: 0.8rem 1.5rem;
  letter-spacing: 0.04em;
}
.btn-ghost-dark:hover { background: var(--ink); color: var(--white); }

.auth-message { font-size: 0.9rem; margin-top: 0.8rem; min-height: 1.2em; }
.auth-message-error { color: #a33; }
.auth-message-success { color: #2a7a4a; }

.auth-footnote {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(15,35,64,0.12);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: rgba(61,68,80,0.75);
  line-height: 1.6;
}

/* ============ EXAM ============ */
.exam-wrap { display: flex; flex-direction: column; gap: 1.5rem; }
.exam-wrap[hidden] { display: none; }

.exam-progress-bar {
  height: 4px;
  background: rgba(15,35,64,0.12);
  margin-bottom: 1.8rem;
}
.exam-progress-fill { height: 100%; background: var(--gold); transition: width 0.3s ease; }

.exam-section-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.4rem;
}
.exam-question-count { font-family: var(--font-mono); font-size: 0.78rem; color: var(--steel); margin-bottom: 1.2rem; }
.exam-prompt { font-size: 1.25rem; color: var(--ink); line-height: 1.4; margin-bottom: 1.5rem; }

.exam-options { display: flex; flex-direction: column; gap: 0.7rem; margin-bottom: 2rem; }
.exam-option {
  text-align: left;
  padding: 0.9rem 1.1rem;
  border: 1px solid rgba(15,35,64,0.25);
  background: var(--paper);
  font-family: var(--font-body);
  font-size: 0.98rem;
  color: var(--ink);
  transition: border-color 0.15s ease, background 0.15s ease;
}
.exam-option:hover { border-color: var(--navy); }
.exam-option.is-selected {
  border-color: var(--gold);
  background: rgba(200,160,55,0.12);
  font-weight: 600;
}

.exam-nav { display: flex; justify-content: space-between; gap: 1rem; }

/* ============ OBJECTION UI ============ */
.objection-toggle {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--steel);
  border: 1px dashed rgba(15,35,64,0.3);
  padding: 0.5rem 0.9rem;
  margin-bottom: 1.2rem;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.objection-toggle:hover { color: var(--navy); border-color: var(--navy); }
.objection-toggle.has-objection { color: #a3701f; border-color: var(--gold); border-style: solid; }

.objection-box {
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: rgba(200,160,55,0.08);
  border-left: 3px solid var(--gold);
}
.objection-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--steel);
  margin-bottom: 0.6rem;
  line-height: 1.5;
}
.objection-textarea { margin-bottom: 0; font-size: 0.92rem; }

/* ============ VOCAL RECORDER ============ */
.vocal-recorder {
  border: 1px solid rgba(15,35,64,0.2);
  padding: 1.8rem;
  text-align: center;
  margin-bottom: 1.5rem;
}
.vocal-status { color: var(--steel); font-size: 0.95rem; margin-bottom: 0.5rem; }
.vocal-timer { font-family: var(--font-mono); font-size: 1.8rem; color: var(--navy); margin-bottom: 1.2rem; }
.vocal-controls { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; margin-bottom: 1rem; }
#vocalPreview { width: 100%; margin-top: 1rem; }

.exam-textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 1rem;
  border: 1px solid rgba(15,35,64,0.3);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
  resize: vertical;
  margin-bottom: 0.5rem;
}
.exam-word-count { font-family: var(--font-mono); font-size: 0.8rem; color: var(--steel); margin-bottom: 1.2rem; }

.results-overall {
  text-align: center;
  padding: 1.5rem;
  background: var(--navy);
  color: var(--white);
  margin-bottom: 1px;
}
.results-overall .result-value { color: var(--gold-bright); font-size: 1.8rem; }
.results-overall .result-label { color: rgba(255,255,255,0.75); }

.results-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: rgba(15,35,64,0.15);
  border: 1px solid rgba(15,35,64,0.15);
  margin: 0 0 1.5rem;
}
.result-stat {
  background: var(--white);
  padding: 1.2rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  text-align: center;
}
.result-value { font-family: var(--font-mono); font-size: 1.3rem; color: var(--navy); font-weight: 600; }
.result-label { font-size: 0.78rem; color: var(--steel); line-height: 1.3; }

/* ============ DASHBOARD ============ */
.status-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.5rem 1rem;
  border: 1px solid var(--navy);
  color: var(--navy);
  margin-bottom: 1.5rem;
}
.status-gold { border-color: var(--gold); color: #8a6d1f; background: rgba(200,160,55,0.1); }
.status-success { border-color: #2a7a4a; color: #2a7a4a; background: rgba(42,122,74,0.08); }
.status-muted { border-color: var(--steel); color: var(--steel); }

.dash-subhead { font-size: 1.1rem; text-transform: uppercase; color: var(--ink); margin: 1.5rem 0 0.8rem; }
.next-steps p { color: var(--steel); line-height: 1.7; margin-bottom: 1rem; }
.dash-note {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  border-left: 3px solid var(--gold);
  padding-left: 1rem;
  margin-top: 1rem;
}

@media (max-width: 600px) {
  .form-row-two { grid-template-columns: 1fr; }
  .auth-card, .exam-card { padding: 1.8rem 1.4rem; }
}
