/* ============================================================
   Require 1.0 – Brand Styles
   Colors: APS brand palette (navy #1A2A6C, royal #1E3A8A, blue #3B6CC5, light #6FA3E0, pale #A8C8F0)
   ============================================================ */

:root {
  --navy: #1A2A6C;
  --royal: #1E3A8A;
  --blue: #3B6CC5;
  --light: #6FA3E0;
  --pale: #A8C8F0;
  --ice: #E8F2FC;
  --gradient-main: linear-gradient(135deg, #1A2A6C 0%, #3B6CC5 100%);
}

/* ─── RESET & BASE ─── */
*, *::before, *::after { box-sizing: border-box; }

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ─── COLOR UTILITIES ─── */
.text-navy { color: var(--navy); }
.bg-navy { background-color: var(--navy); }
.bg-gradient-aps { background: var(--gradient-main); }
.border-navy { border-color: var(--navy); }

/* ─── APS LOGO CIRCLES ─── */
.aps-logo-circle {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--gradient-main);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(26, 42, 108, 0.4);
  flex-shrink: 0;
}

.aps-logo-circle-sm {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--gradient-main);
  display: flex;
  align-items: center;
  justify-content: center;
}

.aps-logo-circle-md {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--gradient-main);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ─── LANDING PAGE ─── */
.bg-gradient-to-br.from-navy {
  background: linear-gradient(135deg, #0f1c4d 0%, #1A2A6C 40%, #1E3A8A 70%, #2a5298 100%);
}

/* ─── FORM FIELDS ─── */
.field-input {
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field-input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(59, 108, 197, 0.15);
}
.field-input.error {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}
.field-input.valid {
  border-color: #22c55e;
}

/* ─── QUIZ OPTIONS ─── */
.quiz-option {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 2px solid #e5e7eb;
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.18s ease;
  background: white;
  user-select: none;
}

.quiz-option:hover {
  border-color: var(--light);
  background: var(--ice);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(59, 108, 197, 0.1);
}

.quiz-option.selected {
  border-color: var(--blue);
  background: var(--ice);
  box-shadow: 0 4px 16px rgba(59, 108, 197, 0.2);
}

.quiz-option-letter {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  flex-shrink: 0;
  background: #f3f4f6;
  color: #6b7280;
  transition: all 0.18s ease;
}

.quiz-option.selected .quiz-option-letter {
  background: var(--gradient-main);
  color: white;
}

.quiz-option-text {
  font-size: 15px;
  color: #374151;
  line-height: 1.4;
  font-weight: 500;
}

.quiz-option.selected .quiz-option-text {
  color: var(--navy);
  font-weight: 600;
}

/* ─── QUESTION TRANSITION ─── */
.question-enter {
  opacity: 0;
  transform: translateX(30px);
}
.question-enter-active {
  opacity: 1;
  transform: translateX(0);
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.question-exit {
  opacity: 1;
  transform: translateX(0);
}
.question-exit-active {
  opacity: 0;
  transform: translateX(-30px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

/* ─── DOT PROGRESS ─── */
.progress-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #d1d5db;
  transition: all 0.2s;
  flex-shrink: 0;
}
.progress-dot.answered {
  background: var(--blue);
}
.progress-dot.current {
  background: var(--navy);
  width: 20px;
  border-radius: 10px;
}

/* ─── RESULT SEGMENTS ─── */
.segment-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 20px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.05em;
}

.segment-LOW .segment-badge,
.badge-segment-LOW {
  background: rgba(254, 226, 226, 0.2);
  border: 1.5px solid rgba(254, 202, 202, 0.5);
  color: #fca5a5;
}

.segment-CONDITIONAL .segment-badge,
.badge-segment-CONDITIONAL {
  background: rgba(254, 249, 195, 0.2);
  border: 1.5px solid rgba(253, 224, 71, 0.5);
  color: #fde047;
}

.segment-REAL .segment-badge,
.badge-segment-REAL {
  background: rgba(220, 252, 231, 0.2);
  border: 1.5px solid rgba(134, 239, 172, 0.5);
  color: #86efac;
}

.segment-HIGH .segment-badge,
.badge-segment-HIGH {
  background: rgba(219, 234, 254, 0.2);
  border: 1.5px solid rgba(147, 197, 253, 0.5);
  color: #93c5fd;
}

/* ─── IMPROVEMENT AREA CARDS ─── */
.area-card {
  display: flex;
  gap: 16px;
  padding: 16px;
  background: #f8faff;
  border: 1.5px solid var(--ice);
  border-radius: 16px;
  transition: border-color 0.2s;
}

.area-card:hover {
  border-color: var(--pale);
}

.area-number {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--gradient-main);
  color: white;
  font-weight: 700;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.area-title {
  font-weight: 700;
  color: var(--navy);
  font-size: 15px;
  margin-bottom: 4px;
}

.area-desc {
  color: #6b7280;
  font-size: 13px;
  line-height: 1.5;
}

/* ─── ADMIN ─── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

/* ─── SCROLLBAR ─── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #f1f5f9; }
::-webkit-scrollbar-thumb { background: var(--pale); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--light); }

/* ─── ANIMATIONS ─── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in-up {
  animation: fadeInUp 0.5s ease forwards;
}

@keyframes countUp {
  from { opacity: 0; transform: scale(0.8); }
  to { opacity: 1; transform: scale(1); }
}

.animate-count-up {
  animation: countUp 0.6s ease forwards;
}

/* ─── GAUGE CANVAS ─── */
#gaugeCanvas {
  filter: drop-shadow(0 4px 20px rgba(59, 108, 197, 0.3));
}

/* ─── MOBILE ─── */
@media (max-width: 640px) {
  .quiz-option-text { font-size: 14px; }
  .quiz-option { padding: 12px 14px; gap: 10px; }
  .quiz-option-letter { width: 28px; height: 28px; font-size: 12px; }
}
