/* ── CONTENT CARDS ────────────────────────────────────── */
.content-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  border: 1px solid var(--grey-border);
  overflow: hidden;
  margin-bottom: 20px;
  transition: transform 0.2s ease, box-shadow 0.3s ease, background 0.3s ease, border-color 0.3s ease;
}
[data-theme="dark"] .content-card {
  background: linear-gradient(135deg, #0F1520 0%, #111827 100%);
  border: 1px solid rgba(255,255,255,0.06);
}
[data-theme="dark"] .content-card:hover {
  border-color: rgba(255,255,255,0.1);
}
.content-card-header {
  background: var(--bg-card-alt);
  border-bottom: 1px solid var(--grey-border);
  padding: 14px 22px;
}
[data-theme="dark"] .content-card-header {
  background: linear-gradient(135deg, rgba(255,255,255,0.02), rgba(255,255,255,0.04));
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.content-card-header h3 {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  color: var(--navy);
}
.content-card-body { padding: 22px 24px; }

/* ── PROSE ────────────────────────────────────────────── */
.prose p { margin-bottom: 14px; line-height: 1.78; }
.prose p:last-child { margin-bottom: 0; }
.prose strong, .prose b { color: var(--navy); font-weight: 600; }
.prose em { color: var(--text-secondary); font-style: italic; }

/* ── COMPANY CARD ─────────────────────────────────────── */
.company-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px 28px;
  font-size: 13px;
}
.company-grid > div { color: var(--text-primary); line-height: 1.5; }
.company-grid span { color: var(--text-muted); }

/* ── OBJECTIVES ───────────────────────────────────────── */
.obj-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.obj-item {
  background: var(--success-bg);
  border: 1px solid var(--success-border);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: var(--success-text);
  font-weight: 500;
  line-height: 1.45;
}
.obj-item::before { content: "✓"; color: var(--green); font-weight: 800; flex-shrink: 0; }

/* ── CONCEPT TABLE ────────────────────────────────────── */
.concept-table {
  width: 100%;
  border-collapse: collapse;
  margin: 14px 0;
  font-size: 13.5px;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.concept-table th {
  background: #1B3A5C;
  color: white;
  padding: 11px 16px;
  text-align: left;
  font-weight: 600;
  font-size: 12.5px;
}
.concept-table td {
  padding: 11px 16px;
  border-bottom: 1px solid var(--grey-border);
  color: var(--text-primary);
}
.concept-table tr:last-child td { border-bottom: none; }
.concept-table tr:nth-child(even) td { background: var(--bg-code); }
.concept-table td:first-child { font-weight: 600; color: var(--navy); width: 34%; }
[data-theme="dark"] .concept-table th { background: #1E293B; }
[data-theme="dark"] .concept-table td:first-child { color: #93C5FD; }

/* ── INFO BOXES ───────────────────────────────────────── */
.tip-box, .warn-box, .note-box {
  border-radius: var(--radius);
  padding: 18px 22px;
  margin: 20px 0;
  font-size: 13.5px;
  line-height: 1.7;
  transition: background 0.3s ease;
}
.tip-box  { background: var(--blue-light);  border-left: 4px solid var(--blue);  color: #1E3A5F; }
.warn-box { background: var(--amber-light); border-left: 4px solid var(--amber); color: #78350F; }
.note-box { background: var(--green-light); border-left: 4px solid var(--green); color: #14532D; }
[data-theme="dark"] .tip-box  { color: #93C5FD; }
[data-theme="dark"] .warn-box { color: #FDE68A; }
[data-theme="dark"] .note-box { color: #86EFAC; }

/* ── TASK CARD ────────────────────────────────────────── */
.task-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  border: 1px solid var(--grey-border);
  overflow: hidden;
  margin-bottom: 20px;
  transition: background 0.3s ease;
}
.task-header {
  background: linear-gradient(135deg, #0F2340 0%, #1B3A5C 100%);
  color: white;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 22px 26px;
  transition: background 0.6s ease;
}
.task-num {
  background: rgba(255,255,255,0.12);
  border-radius: 50%;
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-size: 17px; font-weight: 800;
  flex-shrink: 0;
  border: 1.5px solid rgba(255,255,255,0.2);
}
.task-title {
  font-family: var(--font-display);
  font-size: 15.5px; font-weight: 700; flex: 1; letter-spacing: -0.2px;
}
.task-time {
  background: rgba(255,255,255,0.1);
  border-radius: var(--radius-sm);
  padding: 5px 12px;
  font-size: 11.5px;
  color: #93C5FD;
  white-space: nowrap;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.task-done-badge {
  display: none;
  background: #16A34A;
  border-radius: var(--radius-sm);
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 700;
  color: white;
}
.task-card.completed .task-done-badge { display: block; }
.task-card.completed .task-header { background: linear-gradient(135deg, #14532D 0%, #16A34A 100%); }

.task-body { padding: 28px 30px; }
.task-objective {
  background: linear-gradient(135deg, var(--blue-light) 0%, #F0F9FF 100%);
  border: 1px solid #BFDBFE;
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 24px;
  font-size: 13.5px;
  color: #1E3A5F;
  line-height: 1.7;
}
[data-theme="dark"] .task-objective {
  background: rgba(59, 130, 246, 0.08);
  border-color: rgba(59, 130, 246, 0.2);
  color: #93C5FD;
}
.task-objective strong {
  display: block;
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: var(--blue);
  margin-bottom: 5px;
  font-weight: 700;
}

/* ── STEPS ────────────────────────────────────────────── */
.steps { list-style: none; counter-reset: step-counter; margin: 0 0 22px; }
.step-item {
  counter-increment: step-counter;
  display: flex;
  gap: 14px;
  margin-bottom: 10px;
  padding: 14px 18px;
  background: var(--bg-code);
  border-radius: var(--radius);
  border: 1px solid var(--grey-border);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.step-item:hover {
  transform: translateX(3px);
  box-shadow: var(--shadow-sm);
}
.step-item::before {
  content: counter(step-counter);
  background: #1B3A5C;
  color: white;
  width: 26px; height: 26px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700;
  flex-shrink: 0; margin-top: 1px;
}
[data-theme="dark"] .step-item::before { background: #3B82F6; }
.step-content { flex: 1; font-size: 13.5px; color: var(--text-primary); }
.step-hint { font-size: 12px; color: var(--text-muted); margin-top: 5px; font-style: italic; }
.step-hint::before { content: "→ "; }

/* ── ANSWER BLOCKS ────────────────────────────────────── */
.answer-block {
  background: var(--bg-card);
  border: 1.5px solid #C7D7FF;
  border-radius: 12px;
  padding: 20px 22px;
  margin: 14px 0;
  transition: border-color 0.3s ease, background 0.3s ease, box-shadow 0.2s ease;
}
[data-theme="dark"] .answer-block {
  border-color: rgba(99, 102, 241, 0.15);
  background: linear-gradient(135deg, #0F1520, #111827);
}
[data-theme="dark"] .ans-input:focus {
  border-color: #3B82F6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12), 0 0 20px rgba(59, 130, 246, 0.06);
}
.answer-block.correct { border-color: var(--green); background: var(--success-bg); }
.answer-block.partial { border-color: var(--amber); background: var(--warning-bg); }
.answer-block.wrong   { border-color: var(--red);   background: var(--error-bg); }

.answer-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--blue);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
  display: flex; align-items: center; gap: 7px;
}
.badge { font-size: 10.5px; padding: 2px 8px; border-radius: 99px; font-weight: 700; }
.badge-platform  { background: #DBEAFE; color: #1D4ED8; }
.badge-knowledge { background: #E0E7FF; color: #4338CA; }
.badge-soa       { background: #FCE7F3; color: #9D174D; }
[data-theme="dark"] .badge-platform  { background: rgba(59,130,246,0.15); color: #93C5FD; }
[data-theme="dark"] .badge-knowledge { background: rgba(99,102,241,0.15); color: #A5B4FC; }
[data-theme="dark"] .badge-soa       { background: rgba(168,85,247,0.15); color: #C084FC; }

.answer-question { font-size: 14px; color: var(--text); margin-bottom: 12px; line-height: 1.65; }

.input-row { display: flex; gap: 8px; }
.ans-input {
  flex: 1;
  padding: 11px 14px;
  border-radius: 8px;
  border: 1.5px solid var(--grey-border);
  font-size: 14px;
  font-family: var(--font-body);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  background: var(--bg-input);
  color: var(--text);
}
.ans-input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(37,99,235,0.1); }
.ans-input:disabled { background: var(--bg-code); color: var(--text-muted); cursor: not-allowed; }
textarea.ans-input { resize: vertical; min-height: 100px; line-height: 1.65; }

.check-btn {
  padding: 11px 22px;
  background: var(--blue);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font-body);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.22, 1, 0.36, 1);
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(37,99,235,0.25);
}
.check-btn:hover { background: #1D4ED8; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(37,99,235,0.35); }
.check-btn:disabled { background: #94A3B8; cursor: not-allowed; box-shadow: none; transform: none; }
[data-theme="dark"] .check-btn {
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3), 0 0 20px rgba(37, 99, 235, 0.1);
}
[data-theme="dark"] .check-btn:hover {
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.4), 0 0 30px rgba(37, 99, 235, 0.15);
}
[data-theme="dark"] .check-btn:disabled { background: #334155; color: #64748B; box-shadow: none; }

.check-btn.retry-btn {
  background: #F59E0B;
  box-shadow: 0 2px 6px rgba(245, 158, 11, 0.25);
}
.check-btn.retry-btn:hover {
  background: #D97706;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.35);
}
[data-theme="dark"] .check-btn.retry-btn {
  background: #F59E0B;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3), 0 0 20px rgba(245, 158, 11, 0.1);
}
[data-theme="dark"] .check-btn.retry-btn:hover {
  background: #D97706;
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.4), 0 0 30px rgba(245, 158, 11, 0.15);
}

.feedback-msg {
  margin-top: 12px;
  font-size: 13px;
  display: none;
  padding: 10px 14px;
  border-radius: 8px;
  align-items: flex-start;
  gap: 9px;
}
.feedback-msg.show { display: flex; }
.feedback-msg.correct { background: var(--success-bg); color: var(--success-text); border: 1px solid var(--success-border); }
.feedback-msg.partial { background: var(--warning-bg); color: var(--warning-text); border: 1px solid var(--warning-border); }
.feedback-msg.wrong   { background: var(--error-bg);   color: var(--error-text);   border: 1px solid var(--error-border); }
.feedback-icon { font-size: 15px; flex-shrink: 0; margin-top: 1px; }

/* ── Answer explanation (shown after correct answer) ─── */
.answer-explanation {
  margin-top: 10px;
  padding: 12px 16px;
  background: rgba(59, 130, 246, 0.06);
  border-left: 3px solid var(--blue, #2563EB);
  border-radius: 0 8px 8px 0;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-secondary, #64748B);
  animation: fadeUp 0.3s ease forwards;
}
[data-theme="dark"] .answer-explanation {
  background: rgba(59, 130, 246, 0.08);
  color: #94A3B8;
}
.explanation-label {
  font-weight: 700;
  color: var(--blue, #2563EB);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: block;
  margin-bottom: 4px;
}
.keyword-chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; }
.chip { font-size: 11px; padding: 2px 9px; border-radius: 99px; font-weight: 600; }
.chip.found   { background: #DCFCE7; color: #15803D; border: 1px solid #86EFAC; }
.chip.missing { background: #FEE2E2; color: #B91C1C; border: 1px solid #FCA5A5; }
[data-theme="dark"] .chip.found   { background: rgba(34,197,94,0.12); color: #86EFAC; border-color: rgba(34,197,94,0.25); }
[data-theme="dark"] .chip.missing { background: rgba(239,68,68,0.12); color: #FCA5A5; border-color: rgba(239,68,68,0.25); }


/* ── SoA TASK ─────────────────────────────────────────── */
.task-card.soa .task-header { background: linear-gradient(135deg, #3B0764 0%, #6D28D9 100%); }

/* ── COMPLETION SCREEN ────────────────────────────────── */
#completion-screen {
  display: none;
  text-align: center;
  padding: 72px 40px;
  background: linear-gradient(135deg, #0A2010 0%, #0C1D40 100%);
  border-radius: 16px;
  margin: 24px 0 0;
  border: 1px solid rgba(52,211,153,0.2);
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
  position: relative;
  overflow: hidden;
}
#completion-screen::before {
  content: '';
  position: absolute;
  top: -50%; left: -50%;
  width: 200%; height: 200%;
  background: radial-gradient(circle at 30% 30%, rgba(52,211,153,0.08) 0%, transparent 50%),
              radial-gradient(circle at 70% 70%, rgba(59,130,246,0.06) 0%, transparent 50%);
  pointer-events: none;
}
#completion-screen.show { display: block; }
.completion-icon { font-size: 72px; margin-bottom: 20px; position: relative; }
.completion-title {
  font-family: var(--font-display);
  font-size: 34px;
  font-weight: 800;
  color: white;
  margin-bottom: 12px;
  letter-spacing: -0.6px;
  position: relative;
}
.completion-sub {
  font-size: 15px;
  color: #86EFAC;
  max-width: 480px;
  margin: 0 auto 36px;
  line-height: 1.7;
  position: relative;
}
.completion-stats {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  position: relative;
}
.stat-box {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 14px;
  padding: 20px 32px;
  color: white;
  min-width: 130px;
  backdrop-filter: blur(8px);
  transition: transform 0.2s ease, background 0.2s ease;
}
.stat-box:hover {
  transform: translateY(-2px);
  background: rgba(255,255,255,0.08);
}
.stat-num {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 800;
  color: #34D399;
  font-variant-numeric: tabular-nums;
}
.stat-lbl { font-size: 12px; color: #64748B; margin-top: 4px; text-transform: uppercase; letter-spacing: 0.5px; font-weight: 600; }

/* Completion actions */
.completion-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 36px;
  position: relative;
}
.completion-btn {
  padding: 12px 28px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font-body);
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
}
.completion-btn-primary {
  background: #34D399;
  color: #052E16;
  box-shadow: 0 2px 12px rgba(52, 211, 153, 0.3);
}
.completion-btn-primary:hover {
  background: #4ADE80;
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(52, 211, 153, 0.4);
}
.completion-btn-secondary {
  background: rgba(255,255,255,0.08);
  color: #94A3B8;
  border: 1px solid rgba(255,255,255,0.12);
}
.completion-btn-secondary:hover {
  background: rgba(255,255,255,0.12);
  color: #E2E8F0;
}

/* Next module nudge */
.next-module-nudge {
  margin-top: 32px;
  text-align: center;
}
.next-module-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted, #94A3B8);
  margin-bottom: 12px;
}
.next-module-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: rgba(59, 130, 246, 0.06);
  border: 1px solid rgba(59, 130, 246, 0.15);
  border-radius: 12px;
  padding: 16px 20px;
  text-decoration: none;
  color: inherit;
  transition: all 0.2s ease;
  max-width: 400px;
  margin: 0 auto;
}
.next-module-card:hover {
  background: rgba(59, 130, 246, 0.1);
  border-color: rgba(59, 130, 246, 0.3);
  transform: translateY(-2px);
}
[data-theme="dark"] .next-module-card {
  background: rgba(59, 130, 246, 0.08);
  border-color: rgba(59, 130, 246, 0.2);
}
.next-module-info { flex: 1; text-align: left; }
.next-module-name {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  color: var(--text, #0F172A);
}
.next-module-meta {
  font-size: 12px;
  color: var(--text-secondary, #64748B);
  margin-top: 2px;
}
.next-module-arrow {
  font-size: 20px;
  color: var(--blue, #2563EB);
  font-weight: 700;
}

/* ── WHAT'S NEXT SECTION ──────────────────────────────── */
.whats-next {
  margin-top: 36px;
  position: relative;
}
.whats-next-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: #E2E8F0;
  margin-bottom: 20px;
  text-align: center;
}
[data-theme="light"] .whats-next-title { color: var(--text, #0F172A); }
.whats-next-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  max-width: 560px;
  margin: 0 auto;
}
@media (max-width: 600px) {
  .whats-next-grid { grid-template-columns: 1fr; }
}
.whats-next .next-module-nudge {
  margin-top: 0;
  text-align: left;
}
.whats-next .next-module-card {
  max-width: none;
}
.cyberday-cta {
  border-color: rgba(52, 211, 153, 0.25);
  background: rgba(52, 211, 153, 0.06);
}
.cyberday-cta:hover {
  border-color: rgba(52, 211, 153, 0.4);
  background: rgba(52, 211, 153, 0.12);
}
.cyberday-cta .next-module-arrow {
  color: #34D399;
}
[data-theme="dark"] .cyberday-cta {
  background: rgba(52, 211, 153, 0.06);
  border-color: rgba(52, 211, 153, 0.2);
}

/* Welcome back styles moved to dashboard.css */

/* ── TASK TAKEAWAYS CARD ─────────────────────────────── */
.task-takeaways {
  margin-top: 32px;
  padding: 20px 24px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.05) 0%, rgba(59, 130, 246, 0.05) 100%);
  border: 1px solid rgba(99, 102, 241, 0.15);
  border-radius: var(--radius, 12px);
}
[data-theme="dark"] .task-takeaways {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.08) 0%, rgba(59, 130, 246, 0.06) 100%);
  border-color: rgba(99, 102, 241, 0.2);
}
.task-takeaways-title {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #6366F1;
  margin-bottom: 12px;
}
.task-takeaways ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.task-takeaways li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 8px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-secondary, #475569);
}
.task-takeaways li:last-child { margin-bottom: 0; }
.task-takeaways li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 7px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #6366F1;
  opacity: 0.6;
}

/* ── RESET CONFIRM DIALOG ────────────────────────────── */
.reset-dialog-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
}
.reset-dialog {
  background: var(--bg-card);
  border: 1px solid var(--grey-border);
  border-radius: 16px;
  padding: 28px 32px;
  max-width: 380px;
  width: 90%;
  box-shadow: 0 16px 48px rgba(0,0,0,0.2);
  text-align: center;
}
.reset-dialog-title {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 8px;
}
.reset-dialog-text {
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0 0 24px;
}
.reset-dialog-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
}
.reset-dialog-cancel,
.reset-dialog-confirm {
  padding: 10px 24px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font-body);
  border: none;
  transition: all 0.15s ease;
}
.reset-dialog-cancel {
  background: var(--grey-light);
  color: var(--text-secondary);
  border: 1px solid var(--grey-border);
}
.reset-dialog-cancel:hover {
  background: var(--bg-card-alt);
}
.reset-dialog-confirm {
  background: #DC2626;
  color: white;
}
.reset-dialog-confirm:hover {
  background: #B91C1C;
}
