/* ============================================================
   Digital Chandu Solutions — Assessment & Results Styles
   Brand: #1A3A8F (blue) + #E8401C (orange)
   ============================================================ */
:root {
  --primary:   #1A3A8F;
  --accent:    #E8401C;
  --gradient:  linear-gradient(135deg, #1A3A8F 0%, #E8401C 100%);
  --white:     #FFFFFF;
  --gray-50:   #F8F9FA;
  --gray-100:  #F1F3F5;
  --gray-200:  #E9ECEF;
  --gray-400:  #ADB5BD;
  --gray-600:  #6C757D;
  --gray-800:  #343A40;
  --success:   #22c55e;
  --warning:   #f59e0b;
  --info:      #3b82f6;
  --danger:    #ef4444;
  --radius:    14px;
  --shadow:    0 4px 24px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 40px rgba(26,58,143,0.15);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Inter', system-ui, sans-serif; background: var(--gray-50); color: var(--gray-800); }
.assessment-body { min-height: 100vh; }
.results-body    { min-height: 100vh; background: var(--gray-50); }

/* ── PROGRESS BAR ── */
.progress-wrap {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: 4px; background: var(--gray-200);
}
.progress-bar {
  height: 100%; background: var(--gradient);
  transition: width 0.4s ease; width: 0%;
}

/* ── ASSESSMENT HEADER ── */
.assess-header {
  position: fixed; top: 4px; left: 0; right: 0; z-index: 99;
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 24px;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--gray-200);
}
.assess-logo { display: flex; align-items: center; gap: 10px; }
.logo-dc {
  width: 34px; height: 34px; border-radius: 8px;
  background: var(--gradient); color: #fff;
  font-weight: 800; font-size: 13px;
  display: flex; align-items: center; justify-content: center;
}
.logo-text { font-weight: 700; font-size: 14px; color: var(--primary); }
.assess-step-count { font-size: 13px; color: var(--gray-600); font-weight: 500; }

/* ── STEP TRANSITIONS ── */
.step { display: none; }
.step.active { display: block; animation: fadeSlideIn 0.35s ease; }
.step.exit   { animation: fadeSlideOut 0.3s ease forwards; }

@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateX(30px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes fadeSlideOut {
  from { opacity: 1; transform: translateX(0); }
  to   { opacity: 0; transform: translateX(-30px); }
}

/* ── WELCOME SCREEN ── */
.welcome-screen {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(160deg, #EEF2FF 0%, #FFF5F2 100%);
  padding: 40px 20px;
}
.welcome-content { max-width: 600px; width: 100%; text-align: center; }
.welcome-badge {
  display: inline-block;
  background: var(--gradient); color: #fff;
  padding: 6px 18px; border-radius: 50px;
  font-size: 13px; font-weight: 600; margin-bottom: 28px;
  letter-spacing: 0.3px;
}
.big-logo {
  display: flex; align-items: center; justify-content: center;
  gap: 14px; margin-bottom: 28px;
}
.logo-dc-xl {
  width: 56px; height: 56px; border-radius: 14px;
  background: var(--gradient); color: #fff;
  font-weight: 900; font-size: 20px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 20px rgba(26,58,143,0.3);
}
.logo-company { font-size: 18px; font-weight: 800; color: var(--primary); text-align: left; }
.logo-tagline { font-size: 11px; color: var(--accent); font-weight: 600; text-align: left; text-transform: uppercase; letter-spacing: 1px; }

.welcome-title {
  font-size: clamp(28px, 5vw, 44px); font-weight: 800;
  line-height: 1.2; color: var(--gray-800); margin-bottom: 16px;
}
.highlight { background: var(--gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.welcome-sub { font-size: 16px; color: var(--gray-600); line-height: 1.7; margin-bottom: 28px; }
.welcome-pills {
  display: flex; flex-wrap: wrap; gap: 10px;
  justify-content: center; margin-bottom: 32px;
}
.welcome-pills span {
  background: var(--white); border: 1px solid var(--gray-200);
  padding: 7px 16px; border-radius: 50px; font-size: 13px;
  color: var(--gray-800); font-weight: 500;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.welcome-note { font-size: 13px; color: var(--gray-400); margin-top: 16px; }

/* ── STEP CONTAINER ── */
.step-container {
  max-width: 700px; margin: 0 auto;
  padding: 100px 20px 40px;
}
.step-header { text-align: center; margin-bottom: 32px; }
.step-icon { font-size: 40px; margin-bottom: 12px; }
.step-header h2 { font-size: clamp(20px, 4vw, 28px); font-weight: 800; color: var(--gray-800); margin-bottom: 8px; }
.step-header p  { font-size: 15px; color: var(--gray-600); }

/* ── FORM ── */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 28px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group-full { grid-column: 1 / -1; }
.form-group label { font-size: 13px; font-weight: 600; color: var(--gray-800); }
.form-group input {
  padding: 13px 16px; border-radius: 10px;
  border: 1.5px solid var(--gray-200); font-size: 15px;
  font-family: inherit; transition: border-color 0.2s, box-shadow 0.2s;
  background: var(--white);
}
.form-group input:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26,58,143,0.1);
}

/* ── ANSWER CARDS ── */
.card-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 14px; margin-bottom: 28px;
}
.card-grid-2    { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.card-grid-wide { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }

.answer-card {
  display: flex; flex-direction: column; align-items: center;
  gap: 10px; padding: 20px 16px; text-align: center;
  background: var(--white); border: 2px solid var(--gray-200);
  border-radius: var(--radius); cursor: pointer;
  transition: all 0.2s; user-select: none;
}
.answer-card:hover {
  border-color: var(--primary); background: #F0F4FF;
  transform: translateY(-2px); box-shadow: var(--shadow);
}
.answer-card.selected {
  border-color: var(--primary); background: #EEF2FF;
  box-shadow: 0 0 0 3px rgba(26,58,143,0.15);
}
.card-icon  { font-size: 28px; }
.card-label { font-size: 14px; font-weight: 600; color: var(--gray-800); line-height: 1.3; }
.card-sub   { font-size: 12px; color: var(--gray-600); font-weight: 400; margin-top: -4px; }

/* ── STEP ACTIONS ── */
.step-actions { display: flex; gap: 12px; justify-content: flex-end; margin-top: 8px; }

/* ── BUTTONS ── */
.btn-primary {
  padding: 14px 32px; border-radius: 10px; border: none; cursor: pointer;
  font-size: 15px; font-weight: 700; font-family: inherit;
  background: var(--gradient); color: #fff;
  transition: opacity 0.2s, transform 0.2s;
  box-shadow: 0 4px 16px rgba(26,58,143,0.3);
}
.btn-primary:hover:not(:disabled) { opacity: 0.9; transform: translateY(-1px); }
.btn-primary:disabled { opacity: 0.45; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-primary.btn-xl { padding: 16px 40px; font-size: 17px; }

.btn-back {
  padding: 14px 24px; border-radius: 10px;
  border: 1.5px solid var(--gray-200); background: var(--white);
  color: var(--gray-600); font-size: 15px; font-weight: 600;
  font-family: inherit; cursor: pointer; transition: all 0.2s;
}
.btn-back:hover { border-color: var(--gray-400); color: var(--gray-800); }

/* ── PROCESSING SCREEN ── */
.processing-screen {
  min-height: 100vh; display: flex;
  align-items: center; justify-content: center;
  background: linear-gradient(160deg, #EEF2FF 0%, #FFF5F2 100%);
}
.processing-content { text-align: center; padding: 40px 20px; }
.spinner-ring {
  width: 64px; height: 64px; border-radius: 50%;
  border: 5px solid var(--gray-200);
  border-top-color: var(--primary);
  animation: spin 0.9s linear infinite;
  margin: 0 auto 24px;
}
@keyframes spin { to { transform: rotate(360deg); } }
.processing-content h2 { font-size: 22px; font-weight: 700; color: var(--gray-800); margin-bottom: 24px; }
.processing-steps { display: flex; flex-direction: column; gap: 10px; text-align: left; max-width: 320px; margin: 0 auto; }
.proc-step {
  font-size: 14px; color: var(--gray-400); font-weight: 500;
  padding: 8px 0; transition: color 0.4s;
}
.proc-step.active { color: var(--primary); font-weight: 600; }

/* ══════════════════════════════════════
   RESULTS PAGE
══════════════════════════════════════ */
.results-header {
  background: var(--gradient); color: #fff;
  text-align: center; padding: 48px 20px 60px;
}
.results-header .r-logo {
  display: inline-flex; align-items: center; gap: 10px; margin-bottom: 28px;
}
.results-header .r-logo-dc {
  width: 40px; height: 40px; border-radius: 10px;
  background: rgba(255,255,255,0.2); font-weight: 900; font-size: 15px;
  display: flex; align-items: center; justify-content: center;
}
.results-header .r-logo-name { font-size: 16px; font-weight: 700; }
.results-header h1 { font-size: clamp(22px, 4vw, 36px); font-weight: 800; line-height: 1.3; margin-bottom: 8px; }
.results-header p  { font-size: 16px; opacity: 0.9; }

/* Score gauge */
.score-wrap {
  background: var(--white); border-radius: 20px 20px 0 0;
  margin-top: -24px; padding: 40px 20px 32px;
  max-width: 860px; margin-left: auto; margin-right: auto;
}
.score-block { text-align: center; margin-bottom: 32px; }
.score-circle {
  width: 140px; height: 140px; border-radius: 50%;
  border: 10px solid var(--gray-200); position: relative;
  margin: 0 auto 16px; display: flex; align-items: center;
  justify-content: center; flex-direction: column;
}
.score-num { font-size: 38px; font-weight: 900; color: var(--gray-800); line-height: 1; }
.score-denom { font-size: 14px; color: var(--gray-400); font-weight: 500; }
.score-badge {
  display: inline-block; padding: 6px 20px; border-radius: 50px;
  font-size: 14px; font-weight: 700; margin-bottom: 8px;
}
.badge-danger  { background: #FEE2E2; color: #DC2626; }
.badge-warning { background: #FEF3C7; color: #D97706; }
.badge-info    { background: #DBEAFE; color: #1D4ED8; }
.badge-success { background: #D1FAE5; color: #059669; }

.score-ring-danger  { border-color: #FCA5A5 #FCA5A5 #FCA5A5 #DC2626; }
.score-ring-warning { border-color: #FDE68A #FDE68A #FDE68A #D97706; }
.score-ring-info    { border-color: #BAE6FD #BAE6FD #BAE6FD #1D4ED8; }
.score-ring-success { border-color: #6EE7B7 #6EE7B7 #6EE7B7 #059669; }

/* Results body */
.results-body-wrap {
  max-width: 860px; margin: 0 auto; padding: 0 20px 60px;
}
.r-section { margin-bottom: 32px; }
.r-card {
  background: var(--white); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden;
}
.r-card-header {
  padding: 18px 24px; border-bottom: 1px solid var(--gray-100);
  display: flex; align-items: center; gap: 10px;
}
.r-card-header h3 { font-size: 17px; font-weight: 700; color: var(--gray-800); }
.r-card-body { padding: 24px; }

.insight-box {
  background: linear-gradient(135deg, #EEF2FF, #FFF5F2);
  border: 1.5px solid rgba(26,58,143,0.15);
  border-radius: var(--radius); padding: 20px 24px;
}
.insight-box .insight-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--primary); margin-bottom: 8px; }
.insight-box p { font-size: 15px; color: var(--gray-800); line-height: 1.65; font-weight: 500; }

.loss-box {
  background: #FFF5F2; border: 1.5px solid rgba(232,64,28,0.2);
  border-radius: var(--radius); padding: 20px 24px; text-align: center;
}
.loss-amount { font-size: 26px; font-weight: 900; color: var(--accent); }
.loss-label  { font-size: 13px; color: var(--gray-600); margin-top: 4px; }

/* Service cards */
.service-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
.service-row {
  display: flex; align-items: flex-start; gap: 16px;
  padding: 18px; background: var(--gray-50);
  border-radius: 10px; border: 1.5px solid var(--gray-200);
  transition: border-color 0.2s;
}
.service-row:hover { border-color: var(--primary); }
.service-icon { font-size: 28px; flex-shrink: 0; }
.service-info { flex: 1; }
.service-name { font-size: 15px; font-weight: 700; color: var(--gray-800); margin-bottom: 4px; }
.service-reason { font-size: 13px; color: var(--gray-600); line-height: 1.5; margin-bottom: 8px; }
.service-meta { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.service-price { font-size: 12px; color: var(--primary); font-weight: 600; background: #EEF2FF; padding: 3px 10px; border-radius: 50px; }
.service-outcome { font-size: 12px; color: var(--success); font-weight: 600; background: #D1FAE5; padding: 3px 10px; border-radius: 50px; }
.priority-high   { font-size: 11px; font-weight: 700; background: #FEE2E2; color: #DC2626; padding: 3px 10px; border-radius: 50px; }
.priority-medium { font-size: 11px; font-weight: 700; background: #FEF3C7; color: #D97706; padding: 3px 10px; border-radius: 50px; }
.priority-low    { font-size: 11px; font-weight: 700; background: #D1FAE5; color: #059669; padding: 3px 10px; border-radius: 50px; }

/* Quick wins */
.quick-wins-list { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.quick-wins-list li {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 14px 18px; background: var(--gray-50); border-radius: 10px;
  font-size: 14px; color: var(--gray-800); line-height: 1.5;
}
.quick-wins-list li::before {
  content: '✓'; color: var(--success); font-weight: 800;
  font-size: 16px; flex-shrink: 0;
}

/* Account created notice */
.account-notice {
  background: linear-gradient(135deg, #D1FAE5, #ECFDF5);
  border: 1.5px solid #6EE7B7; border-radius: var(--radius);
  padding: 20px 24px; display: flex; gap: 14px;
  align-items: flex-start; margin-bottom: 32px;
}
.account-notice .notice-icon { font-size: 24px; flex-shrink: 0; }
.account-notice h4 { font-size: 15px; font-weight: 700; color: #065F46; margin-bottom: 6px; }
.account-notice p  { font-size: 13px; color: #047857; line-height: 1.5; }
.account-notice code { background: #A7F3D0; padding: 1px 6px; border-radius: 4px; font-family: monospace; }

/* CTA Section */
.cta-section {
  background: var(--gradient); border-radius: var(--radius);
  padding: 40px 30px; text-align: center; color: #fff;
  margin-bottom: 32px;
}
.cta-section h2 { font-size: clamp(20px, 3vw, 28px); font-weight: 800; margin-bottom: 10px; }
.cta-section p  { font-size: 15px; opacity: 0.9; margin-bottom: 24px; line-height: 1.6; }
.btn-cta {
  display: inline-block; padding: 16px 36px;
  background: #fff; color: var(--primary);
  border-radius: 10px; text-decoration: none;
  font-size: 16px; font-weight: 800;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  transition: transform 0.2s, box-shadow 0.2s;
}
.btn-cta:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(0,0,0,0.2); }
.cta-note { font-size: 13px; opacity: 0.8; margin-top: 14px; }

/* ── RESPONSIVE ── */
@media (max-width: 640px) {
  .form-grid { grid-template-columns: 1fr; }
  .card-grid, .card-grid-2, .card-grid-wide { grid-template-columns: 1fr 1fr; }
  .step-actions { flex-direction: column-reverse; }
  .btn-primary, .btn-back { width: 100%; text-align: center; }
  .service-row { flex-direction: column; }
  .account-notice { flex-direction: column; }
  .assess-header { padding: 10px 16px; }
  .logo-text { display: none; }
  .step-container { padding: 80px 16px 40px; }
}
@media (max-width: 400px) {
  .card-grid, .card-grid-2, .card-grid-wide { grid-template-columns: 1fr; }
}
