* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --accent: #00D4AA;
  --accent-dark: #00B894;
  --accent-glow: rgba(0, 212, 170, 0.15);
  --bg: #0A0E1A;
  --bg-card: #121829;
  --bg-card-hover: #1A2238;
  --bg-input: #0E1225;
  --text: #E8ECF4;
  --text-muted: #8892A8;
  --danger: #FF6B6B;
  --danger-bg: rgba(255, 107, 107, 0.1);
  --warning: #FFD93D;
  --success: #00D4AA;
  --success-bg: rgba(0, 212, 170, 0.1);
  --blue: #4EA8DE;
  --border: rgba(255, 255, 255, 0.06);
  --border-accent: rgba(0, 212, 170, 0.2);
}

body {
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
}

.grid-bg {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image:
    linear-gradient(rgba(0, 212, 170, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 212, 170, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  z-index: 0;
}

.content { position: relative; z-index: 1; min-height: 100vh; }

/* ── Nav ── */
.app-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
  border-bottom: 1px solid var(--border);
}

.app-nav .logo {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}

.app-nav .logo-icon {
  width: 32px; height: 32px;
  background: var(--accent);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-user {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.nav-user strong { color: var(--text); }

.nav-links {
  display: flex;
  gap: 0.5rem;
}

.nav-link {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-decoration: none;
  padding: 0.4rem 0.8rem;
  border-radius: 8px;
  transition: all 0.2s;
  cursor: pointer;
  background: none;
  border: none;
  font-family: inherit;
}

.nav-link:hover, .nav-link.active {
  color: var(--accent);
  background: var(--accent-glow);
}

.nav-link.danger { color: var(--danger); }
.nav-link.danger:hover { background: var(--danger-bg); }

/* ── Layouts ── */
.page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

.page-narrow {
  max-width: 480px;
  margin: 0 auto;
  padding: 4rem 2rem;
}

.page-header {
  margin-bottom: 2rem;
}

.page-header h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.page-header p {
  color: var(--text-muted);
  font-size: 1rem;
}

/* ── Cards ── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.5rem;
  transition: all 0.3s;
}

.card:hover {
  border-color: var(--border-accent);
  background: var(--bg-card-hover);
}

.card-clickable { cursor: pointer; }

/* ── Forms ── */
.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}

.form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
  transition: border-color 0.2s;
  outline: none;
}

.form-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-input::placeholder { color: var(--text-muted); opacity: 0.5; }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 10px;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  text-decoration: none;
}

.btn-primary {
  background: var(--accent);
  color: var(--bg);
}
.btn-primary:hover { background: var(--accent-dark); transform: translateY(-1px); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.btn-secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-secondary:hover { border-color: var(--border-accent); background: var(--accent-glow); }

.btn-danger {
  background: transparent;
  color: var(--danger);
  border: 1px solid rgba(255, 107, 107, 0.2);
}
.btn-danger:hover { background: var(--danger-bg); }

.btn-sm { padding: 0.4rem 0.8rem; font-size: 0.8rem; }
.btn-full { width: 100%; }

.btn-ghost {
  background: none;
  border: none;
  color: var(--accent);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.9rem;
  padding: 0.25rem;
}
.btn-ghost:hover { text-decoration: underline; }

/* ── Auth pages ── */
.auth-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2.5rem;
}

.auth-card h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 0.5rem;
}

.auth-card .subtitle {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 2rem;
}

.auth-footer {
  text-align: center;
  margin-top: 1.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.auth-logo {
  text-align: center;
  margin-bottom: 2rem;
}

.auth-logo .logo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--accent);
  text-decoration: none;
}

.auth-logo .logo-icon {
  width: 36px; height: 36px;
  background: var(--accent);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

/* ── Alert ── */
.alert {
  padding: 0.75rem 1rem;
  border-radius: 10px;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.alert-error {
  background: var(--danger-bg);
  color: var(--danger);
  border: 1px solid rgba(255, 107, 107, 0.2);
}

.alert-success {
  background: var(--success-bg);
  color: var(--success);
  border: 1px solid rgba(0, 212, 170, 0.2);
}

/* ── Module cards ── */
.modules-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}

.module-card {
  position: relative;
  overflow: hidden;
}

.module-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), transparent);
}

.module-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.module-card h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.module-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.module-meta {
  display: flex;
  gap: 1rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.module-meta span {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.module-score {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.3rem 0.7rem;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
}

.score-excellent { background: var(--success-bg); color: var(--success); }
.score-good { background: rgba(78, 168, 222, 0.1); color: var(--blue); }
.score-average { background: rgba(255, 217, 61, 0.1); color: var(--warning); }
.score-low { background: var(--danger-bg); color: var(--danger); }

/* ── Quiz UI ── */
.quiz-container {
  max-width: 700px;
  margin: 0 auto;
}

.quiz-progress {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

.quiz-progress-bar {
  flex: 1;
  height: 6px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 3px;
  overflow: hidden;
}

.quiz-progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 3px;
  transition: width 0.4s ease;
}

.quiz-progress-text {
  font-size: 0.85rem;
  color: var(--text-muted);
  white-space: nowrap;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
}

.quiz-score-indicator {
  font-size: 0.85rem;
  color: var(--accent);
  font-weight: 600;
}

/* Email card */
.email-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 1.5rem;
}

.email-card-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.email-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--accent-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
  color: var(--accent);
  font-weight: 700;
}

.email-avatar.phishing { background: var(--danger-bg); color: var(--danger); }

.email-header-info { flex: 1; min-width: 0; }

.email-from {
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.15rem;
  word-break: break-all;
}

.email-from .email-address {
  font-weight: 400;
  color: var(--text-muted);
  font-size: 0.8rem;
}

.email-subject {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
}

.email-card-body {
  padding: 1.25rem;
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--text);
}

.email-card-body p { margin-bottom: 0.75rem; }
.email-card-body ul { padding-left: 1.5rem; margin-bottom: 0.75rem; }
.email-card-body li { margin-bottom: 0.25rem; }

.email-card-body .email-cta-btn {
  display: inline-block;
  padding: 0.6rem 1.2rem;
  background: var(--accent);
  color: var(--bg);
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.85rem;
  text-decoration: none;
  margin: 0.5rem 0;
  pointer-events: none;
}

.email-card-body .email-cta-btn.danger { background: var(--danger); color: white; }

.email-card-body .email-small {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.email-card-body .email-header-meta {
  margin-bottom: 0.75rem;
}

.email-card-body .email-date {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Quiz action buttons */
.quiz-actions {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.quiz-btn {
  flex: 1;
  padding: 1rem;
  border-radius: 12px;
  border: 2px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.quiz-btn:hover { transform: translateY(-2px); }

.quiz-btn.phishing:hover {
  border-color: var(--danger);
  background: var(--danger-bg);
  color: var(--danger);
}

.quiz-btn.legit:hover {
  border-color: var(--success);
  background: var(--success-bg);
  color: var(--success);
}

.quiz-btn.selected-correct {
  border-color: var(--success);
  background: var(--success-bg);
  color: var(--success);
}

.quiz-btn.selected-wrong {
  border-color: var(--danger);
  background: var(--danger-bg);
  color: var(--danger);
}

.quiz-btn:disabled { cursor: default; opacity: 0.6; transform: none; }

/* Quiz result */
.quiz-result {
  padding: 1.25rem;
  border-radius: 12px;
  margin-bottom: 1.5rem;
  animation: slideIn 0.3s ease;
}

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

.quiz-result.correct {
  background: var(--success-bg);
  border: 1px solid rgba(0, 212, 170, 0.2);
}

.quiz-result.wrong {
  background: var(--danger-bg);
  border: 1px solid rgba(255, 107, 107, 0.2);
}

.quiz-result h4 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.quiz-result.correct h4 { color: var(--success); }
.quiz-result.wrong h4 { color: var(--danger); }

.quiz-result p {
  font-size: 0.9rem;
  color: var(--text);
  margin-bottom: 0.75rem;
}

.red-flags {
  list-style: none;
  padding: 0;
}

.red-flags li {
  padding: 0.3rem 0;
  font-size: 0.85rem;
  color: var(--text-muted);
  display: flex;
  align-items: flex-start;
  gap: 0.4rem;
}

.red-flags li::before {
  content: '🚩';
  flex-shrink: 0;
}

.red-flags li.green::before { content: '✅'; }

/* Quiz complete */
.quiz-complete {
  text-align: center;
  padding: 3rem 1rem;
}

.quiz-complete-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
}

.quiz-complete h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.quiz-complete .score-big {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 4rem;
  font-weight: 700;
  margin: 1rem 0;
}

.quiz-complete .score-big.excellent { color: var(--success); }
.quiz-complete .score-big.good { color: var(--blue); }
.quiz-complete .score-big.average { color: var(--warning); }
.quiz-complete .score-big.low { color: var(--danger); }

.quiz-complete .score-label {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.quiz-complete-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ── Dashboard ── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.25rem;
  text-align: center;
}

.stat-card .stat-value {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
}

.stat-card .stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

/* Employee table */
.emp-table {
  width: 100%;
  border-collapse: collapse;
}

.emp-table th {
  text-align: left;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
}

.emp-table td {
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
  border-bottom: 1px solid var(--border);
}

.emp-table tr:hover td { background: rgba(255, 255, 255, 0.02); }

.emp-table .emp-name { font-weight: 600; }
.emp-table .emp-email { color: var(--text-muted); font-size: 0.8rem; }

.badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-admin { background: rgba(78, 168, 222, 0.1); color: var(--blue); }
.badge-employee { background: rgba(255, 255, 255, 0.05); color: var(--text-muted); }

/* ── Score bars ── */
.score-bar-container {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.score-bar {
  flex: 1;
  height: 8px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 4px;
  overflow: hidden;
  max-width: 100px;
}

.score-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.6s ease;
}

.score-bar-fill.excellent { background: var(--success); }
.score-bar-fill.good { background: var(--blue); }
.score-bar-fill.average { background: var(--warning); }
.score-bar-fill.low { background: var(--danger); }

.score-bar-text {
  font-size: 0.8rem;
  font-weight: 600;
  min-width: 35px;
}

/* ── Add employee modal ── */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2rem;
  width: 100%;
  max-width: 420px;
  animation: slideIn 0.2s ease;
}

.modal h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.3rem;
  margin-bottom: 1.5rem;
}

.modal-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

/* ── Results history ── */
.results-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.result-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
}

.result-card .result-icon { font-size: 1.5rem; }
.result-card .result-info { flex: 1; }
.result-card .result-title { font-weight: 600; font-size: 0.95rem; }
.result-card .result-date { font-size: 0.8rem; color: var(--text-muted); }
.result-card .result-score {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
}

/* ── Distribution bars ── */
.dist-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.dist-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem;
  text-align: center;
}

.dist-card .dist-count {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.8rem;
  font-weight: 700;
}

.dist-card .dist-label {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.dist-excellent .dist-count { color: var(--success); }
.dist-bon .dist-count { color: var(--blue); }
.dist-moyen .dist-count { color: var(--warning); }
.dist-faible .dist-count { color: var(--danger); }
.dist-non .dist-count { color: var(--text-muted); }

/* ── Empty states ── */
.empty-state {
  text-align: center;
  padding: 3rem;
  color: var(--text-muted);
}

.empty-state .empty-icon { font-size: 3rem; margin-bottom: 1rem; }
.empty-state h3 { font-family: 'Space Grotesk', sans-serif; font-size: 1.1rem; color: var(--text); margin-bottom: 0.5rem; }
.empty-state p { font-size: 0.9rem; }

/* ── Loading ── */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem;
  color: var(--text-muted);
  gap: 0.5rem;
}

.spinner {
  width: 20px; height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ═══════════════════════════════════════════════════
   SCENARIO CARDS — Multi-type quiz rendering
   ═══════════════════════════════════════════════════ */

/* ── Scenario wrapper ── */
.scenario-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 1.5rem;
}

.scenario-context {
  padding: 0.75rem 1.25rem;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.scenario-context-icon { font-size: 1.2rem; }

.scenario-content {
  padding: 1.25rem;
}

.scenario-scam-revealed {
  border-color: rgba(255, 107, 107, 0.3) !important;
  box-shadow: 0 0 20px rgba(255, 107, 107, 0.05);
}

.scenario-legit-revealed {
  border-color: rgba(0, 212, 170, 0.3) !important;
  box-shadow: 0 0 20px rgba(0, 212, 170, 0.05);
}

/* ── Popup / System alert cards ── */
.popup-window {
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg);
}

.popup-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
}

.popup-header-system {
  background: rgba(0, 212, 170, 0.05);
}

.popup-header-danger {
  background: rgba(255, 107, 107, 0.08);
}

.popup-icon { font-size: 1.1rem; flex-shrink: 0; }

.popup-title {
  font-weight: 600;
  font-size: 0.85rem;
  flex: 1;
}

.popup-url {
  font-size: 0.75rem;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.03);
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-family: monospace;
}

.popup-body {
  padding: 1.25rem;
}

.popup-alert-banner {
  background: rgba(255, 107, 107, 0.12);
  color: var(--danger);
  padding: 0.6rem;
  border-radius: 6px;
  text-align: center;
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 1rem;
  animation: pulse-danger 2s infinite;
}

@keyframes pulse-danger {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

.popup-threat-list {
  margin: 0.75rem 0;
}

.popup-threat {
  padding: 0.4rem 0.75rem;
  margin-bottom: 0.4rem;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 6px;
  font-size: 0.9rem;
  border-left: 3px solid var(--danger);
}

.popup-fake-btn {
  display: inline-block;
  padding: 0.7rem 1.5rem;
  background: var(--danger);
  color: white;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: default;
  pointer-events: none;
}

.popup-fake-btn-green {
  background: var(--accent);
  color: var(--bg);
}

.popup-fine-print {
  font-size: 0.8rem;
  color: var(--danger);
  text-align: center;
  margin-top: 1rem;
  font-weight: 600;
}

.popup-update-item {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 0.75rem;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 8px;
  margin-bottom: 0.5rem;
}

.popup-chrome-btn {
  display: inline-block;
  padding: 0.5rem 1.2rem;
  background: var(--blue);
  color: white;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: default;
}

.popup-chrome-btn-secondary {
  display: inline-block;
  padding: 0.5rem 1.2rem;
  background: transparent;
  color: var(--blue);
  border: 1px solid rgba(78, 168, 222, 0.3);
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: default;
}

/* ── Website preview cards ── */
.website-preview {
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg);
}

.website-urlbar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid var(--border);
}

.website-lock { font-size: 0.9rem; flex-shrink: 0; }

.website-url {
  font-family: monospace;
  font-size: 0.8rem;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.website-content {
  padding: 1.5rem;
}

.bsod-style .website-content {
  background: rgba(0, 120, 215, 0.08);
}

.scan-progress-bar {
  height: 8px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.scan-progress-fill {
  height: 100%;
  background: var(--danger);
  border-radius: 4px;
}

/* ── SMS conversation cards ── */
.sms-conversation {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.sms-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
}

.sms-contact-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.sms-contact-name {
  font-weight: 600;
  font-size: 0.95rem;
}

.sms-bubble {
  margin: 1rem;
  padding: 0.75rem 1rem;
  border-radius: 16px;
  font-size: 0.9rem;
  line-height: 1.6;
  max-width: 85%;
}

.sms-received {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-bottom-left-radius: 4px;
}

.sms-legit {
  border-color: rgba(0, 212, 170, 0.15);
  background: rgba(0, 212, 170, 0.05);
}

.sms-bubble p { margin-bottom: 0.4rem; }
.sms-bubble p:last-child { margin-bottom: 0; }

/* ── Phone call cards ── */
.phone-call-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.phone-call-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid var(--border);
}

.phone-call-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(78, 168, 222, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.phone-call-name {
  font-weight: 600;
  font-size: 0.95rem;
}

.phone-call-number {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-family: monospace;
}

.phone-call-status {
  margin-left: auto;
  font-size: 0.8rem;
  color: var(--success);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.phone-call-status::before {
  content: '';
  width: 8px;
  height: 8px;
  background: var(--success);
  border-radius: 50%;
  animation: pulse-call 1.5s infinite;
}

@keyframes pulse-call {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.phone-call-transcript {
  padding: 1rem;
}

.transcript-line {
  padding: 0.75rem;
  margin-bottom: 0.5rem;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 10px;
  font-size: 0.9rem;
  line-height: 1.6;
  border-left: 3px solid var(--blue);
}

.transcript-speaker {
  font-weight: 700;
  font-size: 0.8rem;
  color: var(--blue);
  display: block;
  margin-bottom: 0.25rem;
}

.deepfake-warning {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
  padding: 0.75rem 1rem;
  margin: 0 1rem 1rem;
  background: rgba(255, 217, 61, 0.08);
  border: 1px solid rgba(255, 217, 61, 0.15);
  border-radius: 8px;
  font-size: 0.8rem;
  color: var(--warning);
  line-height: 1.5;
}

/* ── QR code scenario cards ── */
.qr-scenario-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.qr-visual {
  padding: 1.5rem;
  text-align: center;
  border-bottom: 1px solid var(--border);
}

.qr-sticker {
  display: inline-block;
  padding: 1.25rem;
  background: rgba(255, 255, 255, 0.05);
  border: 2px dashed rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  margin-bottom: 0.75rem;
}

.qr-placeholder {
  width: 120px;
  height: 120px;
  background: white;
  border-radius: 8px;
  margin: 0 auto;
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qr-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 3px;
  width: 80px;
  height: 80px;
}

.qr-block {
  background: #1a1a2e;
  border-radius: 2px;
}

.qr-block.empty {
  background: white;
}

.qr-sticker-note {
  font-size: 0.85rem;
  color: var(--warning);
  background: rgba(255, 217, 61, 0.08);
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  display: inline-block;
}

.qr-scan-result {
  padding: 1rem 1.25rem;
}

.qr-url-preview {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-family: monospace;
  font-size: 0.8rem;
  color: var(--text-muted);
  word-break: break-all;
}

/* ═══════════════════════════════════════════════════
   EDUCATIONAL CARDS — Module pédagogique spoofing
   ═══════════════════════════════════════════════════ */

.edu-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
}

.edu-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
  background: rgba(0, 212, 170, 0.03);
}

.edu-step {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-glow);
  padding: 0.2rem 0.6rem;
  border-radius: 6px;
  margin-bottom: 0.5rem;
}

.edu-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.edu-subtitle {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.edu-body {
  padding: 1.5rem;
}

/* Analogy section */
.edu-analogy {
  margin-bottom: 1.5rem;
}

.edu-analogy-item {
  display: flex;
  gap: 1rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 12px;
  margin-bottom: 0.5rem;
}

.edu-analogy-icon {
  font-size: 2rem;
  flex-shrink: 0;
}

.edu-analogy-text strong {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.95rem;
}

.edu-analogy-text p {
  font-size: 0.9rem;
  color: var(--text);
  line-height: 1.6;
}

.edu-analogy-arrow {
  text-align: center;
  padding: 0.5rem;
  color: var(--accent);
  font-weight: 700;
  font-size: 0.85rem;
}

/* Key point box */
.edu-key-point {
  display: flex;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  background: var(--accent-glow);
  border: 1px solid rgba(0, 212, 170, 0.15);
  border-radius: 12px;
  margin-top: 1rem;
}

.edu-key-point.edu-key-warning {
  background: rgba(255, 217, 61, 0.06);
  border-color: rgba(255, 217, 61, 0.15);
}

.edu-key-icon {
  font-size: 1.3rem;
  flex-shrink: 0;
}

.edu-key-point strong {
  display: block;
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
}

.edu-key-point p {
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--text);
}

/* Timeline */
.edu-timeline {
  margin-bottom: 1.5rem;
}

.edu-timeline-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 0.75rem 0;
  border-left: 2px solid var(--accent);
  padding-left: 1rem;
  margin-left: 0.5rem;
  margin-bottom: 0.5rem;
}

.edu-timeline-year {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--accent);
  flex-shrink: 0;
  min-width: 45px;
}

.edu-timeline-item p {
  font-size: 0.9rem;
  line-height: 1.6;
}

/* Comparison */
.edu-comparison {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.edu-comparison-left, .edu-comparison-right {
  padding: 1rem;
  border-radius: 12px;
  text-align: center;
}

.edu-comparison-left {
  background: rgba(255, 107, 107, 0.06);
  border: 1px solid rgba(255, 107, 107, 0.15);
}

.edu-comparison-right {
  background: var(--success-bg);
  border: 1px solid rgba(0, 212, 170, 0.15);
}

.edu-comparison-left span, .edu-comparison-right span {
  font-size: 1.5rem;
  display: block;
  margin-bottom: 0.5rem;
}

.edu-comparison-left p, .edu-comparison-right p {
  font-size: 0.85rem;
}

.edu-muted {
  color: var(--text-muted) !important;
  font-size: 0.85rem !important;
  margin-top: 0.25rem;
}

/* Shield / protection badges */
.edu-shield {
  margin-bottom: 1rem;
}

.edu-shield-item {
  display: flex;
  gap: 1rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 12px;
  margin-bottom: 0.75rem;
}

.edu-shield-badge {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 0.8rem;
  padding: 0.3rem 0.6rem;
  border-radius: 6px;
  flex-shrink: 0;
  height: fit-content;
}

.edu-shield-badge.spf {
  background: rgba(78, 168, 222, 0.15);
  color: var(--blue);
}

.edu-shield-badge.dkim {
  background: rgba(0, 212, 170, 0.15);
  color: var(--accent);
}

.edu-shield-badge.dmarc {
  background: rgba(255, 217, 61, 0.15);
  color: var(--warning);
}

.edu-shield-item strong {
  display: block;
  font-size: 0.95rem;
  margin-bottom: 0.25rem;
}

.edu-shield-item p {
  font-size: 0.88rem;
  line-height: 1.6;
}

/* Reflex list */
.edu-reflex-list {
  margin-bottom: 1rem;
}

.edu-reflex {
  display: flex;
  gap: 1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}

.edu-reflex:last-child {
  border-bottom: none;
}

.edu-reflex-num {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--accent);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-glow);
  border-radius: 50%;
  flex-shrink: 0;
}

.edu-reflex strong {
  display: block;
  font-size: 0.95rem;
  margin-bottom: 0.15rem;
}

.edu-reflex p {
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--text);
}

.edu-reflex code {
  font-family: monospace;
  background: rgba(255, 255, 255, 0.06);
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  font-size: 0.85em;
  color: var(--accent);
}

/* ── Email headers badge (SPF/DKIM indicators) ── */
.email-headers-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  padding: 0.5rem 0.75rem;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 8px;
  margin-bottom: 0.75rem;
  font-size: 0.8rem;
}

.headers-label {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.header-tag {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-family: monospace;
  font-size: 0.75rem;
  font-weight: 600;
}

.header-tag.pass {
  background: rgba(0, 212, 170, 0.1);
  color: var(--success);
}

.header-tag.fail {
  background: rgba(255, 107, 107, 0.1);
  color: var(--danger);
}

/* ── Educational acknowledge button ── */
.quiz-edu-actions {
  text-align: center;
  margin: 1.5rem 0;
}

.quiz-edu-btn {
  padding: 0.9rem 2rem;
  border-radius: 12px;
  border: 2px solid var(--accent);
  background: var(--accent-glow);
  color: var(--accent);
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s;
}

.quiz-edu-btn:hover {
  background: var(--accent);
  color: var(--bg);
  transform: translateY(-2px);
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .app-nav { padding: 0.75rem 1rem; flex-wrap: wrap; gap: 0.5rem; }
  .page { padding: 1.5rem 1rem; }
  .page-narrow { padding: 2rem 1rem; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .modules-grid { grid-template-columns: 1fr; }
  .quiz-actions { flex-direction: column; }
  .emp-table { font-size: 0.8rem; }
  .emp-table th, .emp-table td { padding: 0.5rem; }
  .nav-links { flex-wrap: wrap; }
  .modal { margin: 1rem; }
  .edu-comparison { grid-template-columns: 1fr; }
  .edu-analogy-item { flex-direction: column; gap: 0.5rem; }
  .edu-shield-item { flex-direction: column; gap: 0.5rem; }
  .edu-header { padding: 1rem; }
  .edu-body { padding: 1rem; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .dist-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ── Trial Banner ─────────────────────────────────────────────────────────── */
.trial-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.875rem 1.25rem;
  border-radius: 10px;
  margin-bottom: 1.5rem;
  border: 1px solid;
  flex-wrap: wrap;
}

.trial-banner-info {
  background: rgba(0, 212, 170, 0.06);
  border-color: rgba(0, 212, 170, 0.25);
  color: var(--text-secondary);
}

.trial-banner-warning {
  background: rgba(234, 179, 8, 0.06);
  border-color: rgba(234, 179, 8, 0.3);
  color: var(--text-secondary);
}

.trial-banner-expired {
  background: rgba(239, 68, 68, 0.06);
  border-color: rgba(239, 68, 68, 0.3);
  color: var(--text-secondary);
}

.trial-banner-content {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
  min-width: 0;
}

.trial-banner-icon {
  font-size: 1.25rem;
  flex-shrink: 0;
}

.trial-banner-content strong {
  color: var(--text-primary);
}

.trial-banner-cta {
  display: inline;
  margin-left: 0.35rem;
  font-size: 0.9rem;
}

.trial-banner-btn {
  flex-shrink: 0;
  padding: 0.45rem 1rem;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.trial-banner-btn-warning {
  background: rgba(234, 179, 8, 0.15);
  color: #eab308;
  border: 1px solid rgba(234, 179, 8, 0.4);
}

.trial-banner-btn-danger {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.4);
}

.trial-banner-btn:hover {
  opacity: 0.85;
}

/* ── Locked State (employees) ─────────────────────────────────────────────── */
.trial-locked-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4rem 2rem;
  max-width: 480px;
  margin: 0 auto;
}

.locked-icon {
  font-size: 4rem;
  margin-bottom: 1.5rem;
  opacity: 0.7;
}

.trial-locked-state h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.6rem;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

.trial-locked-state p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.locked-info {
  background: rgba(0, 212, 170, 0.08);
  border: 1px solid rgba(0, 212, 170, 0.2);
  border-radius: 8px;
  padding: 0.75rem 1.5rem;
  color: var(--primary);
  font-weight: 600;
  font-size: 0.95rem;
}

/* ── Billing / Subscription UI ── */

.active-tier {
  background: rgba(0, 212, 170, 0.05);
  outline: 1px solid rgba(0, 212, 170, 0.2);
}

.active-tier td {
  color: var(--primary) !important;
}

textarea.form-input {
  resize: vertical;
  min-height: 80px;
  font-family: inherit;
}

.btn-danger {
  background: transparent;
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #ef4444;
}

.btn-danger:hover {
  background: rgba(239, 68, 68, 0.1);
}
