:root {
  --primary: #0C3E34;
  --primary-dark: #072620;
  --primary-light: #165c4f;
  --emerald: #10B981;
  --emerald-light: #E6F7F2;
  --gold: #D4AF37;
  --gold-warm: #C59B6C;
  --gold-light: #FFF9E6;
  --bg-main: #F7FAF8;
  --bg-card: rgba(255, 255, 255, 0.95);
  --bg-glass: rgba(255, 255, 255, 0.85);
  --border-light: rgba(12, 62, 52, 0.1);
  --border-active: #10B981;
  --text-main: #1F2937;
  --text-muted: #6B7280;
  --text-light: #9CA3AF;
  --danger: #EF4444;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 8px;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 8px 24px rgba(12, 62, 52, 0.08);
  --shadow-lg: 0 16px 40px rgba(12, 62, 52, 0.12);
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  background-image: 
    radial-gradient(circle at 10% 15%, rgba(16, 185, 129, 0.07) 0%, transparent 40%),
    radial-gradient(circle at 90% 85%, rgba(212, 175, 55, 0.08) 0%, transparent 45%),
    radial-gradient(circle at 50% 50%, rgba(12, 62, 52, 0.03) 0%, transparent 60%);
  background-attachment: fixed;
}

/* Container */
.app-container {
  max-width: 760px;
  margin: 0 auto;
  padding: 16px 16px 100px 16px;
}

/* Header */
.app-header {
  text-align: center;
  padding: 24px 12px 16px;
  position: relative;
}

.brand-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, rgba(12, 62, 52, 0.08), rgba(212, 175, 55, 0.15));
  padding: 6px 16px;
  border-radius: 50px;
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 12px;
  border: 1px solid rgba(212, 175, 55, 0.3);
}

.brand-badge i {
  color: var(--gold-warm);
}

.portal-title {
  font-size: 26px;
  font-weight: 800;
  color: var(--primary);
  line-height: 1.25;
  margin-bottom: 8px;
  letter-spacing: -0.5px;
}

.portal-subtitle {
  font-size: 14px;
  color: var(--text-muted);
  max-width: 580px;
  margin: 0 auto;
  line-height: 1.5;
}

/* Sticky Progress Header */
.sticky-progress-wrap {
  position: sticky;
  top: 12px;
  z-index: 100;
  margin-bottom: 24px;
}

.progress-card {
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  box-shadow: var(--shadow-md);
}

.progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 8px;
}

.progress-label {
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.progress-pct {
  color: var(--emerald);
  background: var(--emerald-light);
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 12px;
}

.progress-bar-track {
  width: 100%;
  height: 8px;
  background: #E5E7EB;
  border-radius: 20px;
  overflow: hidden;
  position: relative;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #10B981, #D4AF37);
  border-radius: 20px;
  width: 0%;
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.5);
}

/* Section Breadcrumb Pills */
.section-pills-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-top: 10px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.section-pills-scroll::-webkit-scrollbar {
  display: none;
}

.sec-pill {
  flex-shrink: 0;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  background: #F3F4F6;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid transparent;
}
.sec-pill.active {
  background: var(--primary);
  color: #FFF;
  box-shadow: 0 2px 6px rgba(12, 62, 52, 0.3);
}
.sec-pill.completed {
  background: var(--emerald-light);
  color: var(--primary);
  border-color: rgba(16, 185, 129, 0.3);
}

/* Form Card */
.survey-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  box-shadow: var(--shadow-md);
  margin-bottom: 24px;
  transition: var(--transition);
  animation: fadeIn 0.35s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.section-hero {
  margin-bottom: 28px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(12, 62, 52, 0.08);
}

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--gold-warm);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.section-main-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--primary);
  line-height: 1.3;
  margin-bottom: 6px;
}

.section-desc {
  font-size: 13.5px;
  color: var(--text-muted);
}

/* Question Block */
.question-item {
  margin-bottom: 32px;
}
.question-item:last-child {
  margin-bottom: 8px;
}

.question-header {
  margin-bottom: 14px;
}

.question-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.45;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.q-num {
  background: var(--emerald-light);
  color: var(--primary);
  font-size: 13px;
  font-weight: 800;
  min-width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  flex-shrink: 0;
  margin-top: 1px;
}

.q-badge-type {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text-muted);
  margin-left: 34px;
  margin-top: 4px;
  display: block;
}

/* Options Grid */
.options-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-left: 0;
}

.option-card {
  position: relative;
  display: flex;
  align-items: center;
  padding: 13px 16px;
  background: #FAFCFB;
  border: 1.5px solid #E5E7EB;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition);
  user-select: none;
}

.option-card:hover {
  background: #F0FAF6;
  border-color: #A7F3D0;
  transform: translateY(-1px);
}

.option-card.selected {
  background: #F0FDF4;
  border-color: var(--emerald);
  box-shadow: 0 2px 10px rgba(16, 185, 129, 0.15);
}

.option-indicator {
  width: 20px;
  height: 20px;
  border-radius: 5px;
  border: 2px solid #D1D5DB;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 12px;
  flex-shrink: 0;
  transition: var(--transition);
  background: #FFF;
}

.option-card.radio .option-indicator {
  border-radius: 50%;
}

.option-card.selected .option-indicator {
  background: var(--emerald);
  border-color: var(--emerald);
  color: #FFF;
}

.option-card.selected.radio .option-indicator::after {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #FFF;
}

.option-card.selected.checkbox .option-indicator::after {
  content: '✓';
  font-size: 13px;
  font-weight: 900;
}

.option-text {
  font-size: 14.5px;
  font-weight: 500;
  color: var(--text-main);
  flex-grow: 1;
}

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

/* Other text input expansion */
.other-input-wrap {
  margin-top: 8px;
  padding: 10px 14px;
  background: #F9FAFB;
  border-radius: var(--radius-sm);
  border: 1px dashed #D1D5DB;
  display: none;
  animation: fadeIn 0.2s ease;
}

.other-input-wrap.active {
  display: block;
}

.other-input {
  width: 100%;
  border: none;
  background: transparent;
  font-size: 14px;
  font-family: inherit;
  color: var(--text-main);
  outline: none;
  padding: 4px 0;
}

.other-input::placeholder {
  color: var(--text-light);
  font-style: italic;
}

/* Form Inputs for Step 0 & Final Step */
.form-group {
  margin-bottom: 18px;
}

.form-label {
  display: block;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 6px;
}

.form-label .req {
  color: var(--danger);
  margin-left: 2px;
}

.form-control {
  width: 100%;
  padding: 13px 16px;
  font-size: 14.5px;
  font-family: inherit;
  border: 1.5px solid #E5E7EB;
  border-radius: var(--radius-md);
  background: #FAFCFB;
  color: var(--text-main);
  transition: var(--transition);
  outline: none;
}

.form-control:focus {
  border-color: var(--emerald);
  background: #FFF;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

textarea.form-control {
  min-height: 110px;
  resize: vertical;
}

/* Bottom Navigation Bar */
.bottom-nav-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--border-light);
  padding: 12px 16px;
  z-index: 999;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.06);
}

.nav-inner {
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 24px;
  font-size: 15px;
  font-weight: 700;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition);
  border: none;
  font-family: inherit;
  text-decoration: none;
}

.btn-secondary {
  background: #F3F4F6;
  color: var(--text-muted);
}
.btn-secondary:hover {
  background: #E5E7EB;
  color: var(--text-main);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #FFF;
  box-shadow: 0 4px 14px rgba(12, 62, 52, 0.25);
  flex-grow: 1;
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  box-shadow: 0 6px 18px rgba(12, 62, 52, 0.35);
  transform: translateY(-1px);
}

.btn-gold {
  background: linear-gradient(135deg, #D4AF37, #B8860B);
  color: #FFF;
  box-shadow: 0 4px 14px rgba(212, 175, 55, 0.35);
}

.btn-gold:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(212, 175, 55, 0.45);
}

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

/* Success & Diagnostic Report View */
.report-modal {
  text-align: center;
}

.report-badge-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, #E6F7F2, #FFF9E6);
  color: var(--emerald);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  margin-bottom: 16px;
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.2);
}

.radar-chart-wrap {
  position: relative;
  max-width: 480px;
  margin: 20px auto;
  background: #FFF;
  padding: 16px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
}

.pillar-scores-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin: 20px 0;
  text-align: left;
}

.pillar-score-item {
  background: #FAFCFB;
  border: 1px solid #E5E7EB;
  border-radius: var(--radius-md);
  padding: 12px;
}

.pillar-score-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
}

.pillar-score-num {
  font-size: 20px;
  font-weight: 800;
  color: var(--primary);
}

.consultation-cta-card {
  background: linear-gradient(135deg, #072620, #0C3E34);
  color: #FFF;
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-top: 24px;
  text-align: left;
  border: 1px solid rgba(212, 175, 55, 0.4);
}

.cta-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--gold);
  margin-bottom: 8px;
}

.cta-desc {
  font-size: 13.5px;
  color: #D1D5DB;
  margin-bottom: 16px;
  line-height: 1.5;
}

/* Toast Notifications */
.toast-msg {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(-30px);
  background: #1F2937;
  color: #FFF;
  padding: 10px 20px;
  border-radius: 50px;
  font-size: 13.5px;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  gap: 8px;
}
.toast-msg.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Draft resume alert */
.draft-alert {
  background: var(--gold-light);
  border: 1px solid rgba(212, 175, 55, 0.4);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  color: #92400E;
}

.draft-alert button {
  background: none;
  border: none;
  color: #B45309;
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
  font-family: inherit;
}

/* Responsive queries */
@media (max-width: 600px) {
  .portal-title {
    font-size: 21px;
  }
  .survey-card {
    padding: 20px 16px;
  }
  .section-main-title {
    font-size: 19px;
  }
  .pillar-scores-grid {
    grid-template-columns: 1fr;
  }
  .btn {
    padding: 12px 18px;
    font-size: 14px;
  }
}
