/* ============================================================
   CyberMaturity Assessment — Main Stylesheet
   Mobile-first, responsive
   ============================================================ */

:root {
  --bg: #f5f7fa;
  --nav-bg: #1a2332;
  --accent: #0066cc;
  --accent-hover: #0052a3;
  --card-bg: #ffffff;
  --border: #e2e8f0;
  --text: #1e293b;
  --text-muted: #64748b;
  --success: #28a745;
  --warning: #ffc107;
  --danger: #dc3545;
  --orange: #fd7e14;
  --radius: 8px;
  --shadow: 0 1px 6px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.12);
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { max-width: 1100px; margin: 0 auto; padding: 0 16px; }
.container.narrow { max-width: 560px; }

/* ===== NAVBAR ===== */
.navbar {
  background: var(--nav-bg);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
  gap: 16px;
}
.navbar-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  font-weight: 700;
  font-size: 1.1rem;
  text-decoration: none;
}
.navbar-brand:hover { text-decoration: none; }
.navbar-brand i { color: #60a5fa; font-size: 1.3rem; }
.navbar-toggle {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 4px 8px;
}
.navbar-menu {
  display: flex;
  align-items: center;
  gap: 8px;
}
.nav-link {
  color: #cbd5e1;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 0.9rem;
  transition: background 0.15s;
}
.nav-link:hover { background: rgba(255,255,255,0.08); color: #fff; text-decoration: none; }
.lang-switcher { display: flex; gap: 4px; margin-left: 8px; }
.lang-btn {
  padding: 4px 10px;
  border-radius: 4px;
  color: #94a3b8;
  font-size: 0.85rem;
  transition: all 0.15s;
}
.lang-btn:hover, .lang-btn.active {
  background: rgba(255,255,255,0.12);
  color: #fff;
  text-decoration: none;
}
.lang-btn.active { font-weight: 600; }

/* ===== FLASH MESSAGES ===== */
.flash-container { margin: 16px auto; }
.flash {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: var(--radius);
  margin-bottom: 8px;
  font-size: 0.9rem;
}
.flash-error { background: #fef2f2; color: #991b1b; border-left: 3px solid var(--danger); }
.flash-success { background: #f0fdf4; color: #166534; border-left: 3px solid var(--success); }
.flash-warning { background: #fffbeb; color: #92400e; border-left: 3px solid var(--warning); }
.flash-info { background: #eff6ff; color: #1e40af; border-left: 3px solid var(--accent); }

/* ===== ANONYMOUS BANNER ===== */
.anon-banner {
  background: #fff7ed;
  border-bottom: 1px solid #fed7aa;
  color: #9a3412;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.875rem;
  flex-wrap: wrap;
}
.anon-banner code { background: rgba(0,0,0,0.06); padding: 2px 6px; border-radius: 4px; font-size: 0.8rem; }
.btn-copy-inline {
  background: none;
  border: 1px solid #f97316;
  color: #f97316;
  border-radius: 4px;
  padding: 2px 8px;
  cursor: pointer;
  font-size: 0.8rem;
}

/* ===== CARDS ===== */
.card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  margin-bottom: 20px;
}
.section-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--nav-bg);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: all 0.15s;
  text-decoration: none;
  white-space: nowrap;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); color: #fff; text-decoration: none; }
.btn-secondary { background: #475569; color: #fff; }
.btn-secondary:hover { background: #334155; color: #fff; text-decoration: none; }
.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { background: #1e7e34; color: #fff; text-decoration: none; }
.btn-outline { background: transparent; color: var(--accent); border: 1px solid var(--accent); }
.btn-outline:hover { background: var(--accent); color: #fff; text-decoration: none; }
.btn-lg { padding: 12px 28px; font-size: 1rem; }
.btn-sm { padding: 4px 10px; font-size: 0.8rem; }

/* ===== FORMS ===== */
.form-group { margin-bottom: 18px; }
.form-group label { display: block; margin-bottom: 6px; font-weight: 500; font-size: 0.9rem; }
.form-control {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.9rem;
  background: #fff;
  color: var(--text);
  transition: border 0.15s, box-shadow 0.15s;
}
.form-control:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0,102,204,0.12);
}
.form-hint { font-size: 0.8rem; color: var(--text-muted); margin-top: 5px; display: flex; align-items: center; gap: 5px; }
.form-check { display: flex; align-items: flex-start; gap: 10px; flex-wrap: wrap; }
.form-check input[type="checkbox"] { margin-top: 3px; width: 16px; height: 16px; cursor: pointer; }
.form-check label { cursor: pointer; font-size: 0.9rem; }
.anon-warning { width: 100%; font-size: 0.8rem; color: #9a3412; padding: 6px 10px; background: #fff7ed; border-radius: 4px; display: none; }
.form-check input:checked ~ .anon-warning { display: flex; align-items: center; gap: 6px; }
.form-actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 24px; }

.divider { position: relative; text-align: center; margin: 16px 0; color: var(--text-muted); font-size: 0.85rem; }
.divider::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0; right: 0;
  border-top: 1px solid var(--border);
}
.divider span { background: #fff; padding: 0 12px; position: relative; z-index: 1; }

/* ===== HERO ===== */
.hero { text-align: center; padding: 40px 0 32px; }
.hero h1 { font-size: 2rem; color: var(--nav-bg); margin-bottom: 12px; display: flex; align-items: center; justify-content: center; gap: 12px; }
.hero h1 i { color: var(--accent); }
.hero-subtitle { color: var(--text-muted); font-size: 1.05rem; max-width: 600px; margin: 0 auto; }

/* ===== ORG GRID ===== */
.org-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 600px) { .org-grid { grid-template-columns: 1fr 1fr; } }

/* ===== FRAMEWORK GRID ===== */
.framework-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 600px) { .framework-grid { grid-template-columns: repeat(2, 1fr); } }
.framework-card { cursor: pointer; }
.framework-card input[type="radio"] { display: none; }
.framework-card-body {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: all 0.15s;
  position: relative;
}
.framework-card:hover .framework-card-body { border-color: var(--accent); box-shadow: var(--shadow-md); }
.framework-card input:checked + .framework-card-body {
  border-color: var(--accent);
  background: #eff6ff;
}
.framework-card .framework-check { display: none; color: var(--accent); margin-left: auto; font-size: 1.2rem; }
.framework-card input:checked + .framework-card-body .framework-check { display: block; }
.framework-icon { font-size: 2rem; color: var(--accent); min-width: 40px; }
.framework-info strong { font-size: 1rem; color: var(--nav-bg); }
.framework-info p { font-size: 0.85rem; color: var(--text-muted); margin: 4px 0 8px; }

/* ===== BADGES ===== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 9px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}
.badge-primary { background: #dbeafe; color: #1d4ed8; }
.badge-secondary { background: #f1f5f9; color: #475569; }
.badge-success { background: #dcfce7; color: #15803d; }
.badge-warning { background: #fef9c3; color: #854d0e; }
.badge-danger { background: #fee2e2; color: #991b1b; }
.badge-article { background: #e0f2fe; color: #0369a1; }
.badge-shared { background: #faf5ff; color: #6d28d9; }
.badge-domain { background: #f3e8ff; color: #7c3aed; }

/* ===== HOW IT WORKS ===== */
.how-it-works { margin: 24px 0; }
.how-it-works h2 { font-size: 1.3rem; color: var(--nav-bg); margin-bottom: 20px; text-align: center; }
.steps-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (min-width: 768px) { .steps-grid { grid-template-columns: repeat(4, 1fr); } }
.step { text-align: center; padding: 20px 12px; background: var(--card-bg); border-radius: var(--radius); box-shadow: var(--shadow); }
.step-number { width: 40px; height: 40px; background: var(--accent); color: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 1.1rem; margin: 0 auto 12px; }
.step h3 { font-size: 0.95rem; color: var(--nav-bg); margin-bottom: 6px; }
.step p { font-size: 0.82rem; color: var(--text-muted); }

/* ===== ASSESSMENT ===== */
.assessment-header { padding: 24px 0 16px; }
.assessment-header h1 { font-size: 1.5rem; color: var(--nav-bg); margin-bottom: 12px; }
.progress-bar-wrap { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.progress-bar-track { flex: 1; background: #e2e8f0; border-radius: 20px; height: 10px; min-width: 120px; }
.progress-bar-fill { background: var(--accent); height: 100%; border-radius: 20px; transition: width 0.3s; }
.progress-label { font-size: 0.82rem; color: var(--text-muted); white-space: nowrap; }

/* Stepper */
.stepper {
  display: flex;
  gap: 0;
  overflow-x: auto;
  margin-bottom: 20px;
  padding: 4px 0;
  scrollbar-width: none;
}
.stepper::-webkit-scrollbar { display: none; }
.step-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex: 1;
  min-width: 60px;
  cursor: pointer;
  padding: 8px 4px;
  border-radius: 6px;
  transition: background 0.15s;
  position: relative;
}
.step-item + .step-item::before {
  content: '';
  position: absolute;
  top: 20px;
  left: -50%;
  right: 50%;
  height: 2px;
  background: var(--border);
}
.step-item.active .step-dot { background: var(--accent); color: #fff; }
.step-item.done .step-dot { background: var(--success); color: #fff; }
.step-dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #e2e8f0;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.85rem;
  position: relative;
  z-index: 1;
  transition: all 0.2s;
}
.step-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-align: center;
  max-width: 70px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.step-item.active .step-label { color: var(--accent); font-weight: 600; }
.step-item.done .step-label { color: var(--success); }

/* Domain card */
.domain-header { margin-bottom: 20px; padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.domain-header h2 { font-size: 1.2rem; color: var(--nav-bg); margin-bottom: 6px; }
.domain-desc { color: var(--text-muted); font-size: 0.9rem; }

/* Questions */
.question-item {
  padding: 18px 0;
  border-bottom: 1px solid #f1f5f9;
  transition: background 0.15s;
}
.question-item:last-child { border-bottom: none; }
.question-item.answered { background: linear-gradient(90deg, #f0fdf4 0%, transparent 30%); }
.question-meta { margin-bottom: 8px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.question-text { font-weight: 500; color: var(--text); margin-bottom: 14px; display: flex; align-items: flex-start; gap: 8px; }

/* Tooltip */
.tooltip-wrap { position: relative; display: inline-flex; }
.tooltip-icon { color: var(--text-muted); cursor: help; font-size: 0.9rem; margin-top: 2px; }
.tooltip-content {
  display: none;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(100% + 6px);
  background: #1e293b;
  color: #fff;
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 0.8rem;
  width: 240px;
  line-height: 1.4;
  z-index: 50;
  font-weight: 400;
  box-shadow: var(--shadow-md);
}
.tooltip-wrap:hover .tooltip-content { display: block; }

/* Maturity options */
.maturity-options { display: flex; gap: 6px; flex-wrap: wrap; }
.maturity-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 10px 12px;
  border: 2px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s;
  flex: 1;
  min-width: 70px;
  max-width: 140px;
  text-align: center;
}
.maturity-option:hover { border-color: var(--accent); background: #eff6ff; }
.maturity-option.selected { border-color: var(--accent); background: #eff6ff; }
.maturity-option input[type="radio"] { display: none; }
.maturity-score {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text-muted);
  transition: all 0.15s;
}
.maturity-option.selected .maturity-score,
.maturity-option:hover .maturity-score {
  background: var(--accent);
  color: #fff;
}
.maturity-label { font-size: 0.72rem; color: var(--text-muted); line-height: 1.3; }

/* Save indicators */
.save-indicator, .saved-indicator {
  display: none;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  font-size: 0.82rem;
}
.save-indicator { color: var(--text-muted); }
.saved-indicator { color: var(--success); }

/* Domain navigation */
.domain-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
  gap: 10px;
}

/* ===== MODAL ===== */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.modal-overlay.open {
  display: flex;
}
.modal {
  background: var(--card-bg);
  border-radius: var(--radius);
  width: 100%;
  max-width: 500px;
  box-shadow: var(--shadow-md);
}
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}
.modal-header h3 { display: flex; align-items: center; gap: 8px; font-size: 1rem; }
.modal-close { background: none; border: none; font-size: 1.4rem; cursor: pointer; color: var(--text-muted); padding: 0 4px; }
.modal-body { padding: 20px; }
.copy-group { display: flex; gap: 8px; margin-top: 10px; }
.copy-group .form-control { flex: 1; }
.copy-success { display: flex; align-items: center; gap: 6px; color: var(--success); font-size: 0.85rem; margin-top: 8px; }

/* ===== RESULTS ===== */
.results-header { padding: 28px 0 16px; }
.results-header h1 { font-size: 1.6rem; color: var(--nav-bg); display: flex; align-items: center; gap: 10px; }
.results-header p { color: var(--text-muted); margin-top: 4px; }

.score-hero-card {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 28px 32px;
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.score-value { font-size: 4rem; font-weight: 800; line-height: 1; }
.score-info { flex: 1; }
.score-label { font-size: 1.4rem; font-weight: 600; }
.score-sub { color: var(--text-muted); font-size: 0.9rem; margin-top: 4px; }
.score-icon { margin-left: auto; opacity: 0.15; }

.org-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.results-grid { display: grid; grid-template-columns: 1fr; gap: 20px; margin-bottom: 20px; }
@media (min-width: 768px) { .results-grid { grid-template-columns: 1fr 1fr; } }

.chart-card { min-height: 320px; }
.chart-container { position: relative; height: 280px; display: flex; align-items: center; justify-content: center; }

.score-table { width: 100%; border-collapse: collapse; }
.score-table th { background: #f8fafc; padding: 10px 12px; text-align: left; font-size: 0.82rem; color: var(--text-muted); border-bottom: 2px solid var(--border); }
.score-table td { padding: 10px 12px; border-bottom: 1px solid #f1f5f9; font-size: 0.9rem; }
.score-bar-wrap { display: flex; align-items: center; gap: 8px; }
.score-bar { height: 8px; border-radius: 4px; min-width: 2px; transition: width 0.4s; }
.maturity-badge { display: inline-block; padding: 3px 10px; border-radius: 12px; color: #fff; font-size: 0.75rem; font-weight: 600; }

.recommendations-section .section-desc { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 16px; }
.recommendations-list { display: flex; flex-direction: column; gap: 12px; }
.rec-card { padding: 14px 16px; border-radius: 0 6px 6px 0; background: #fafafa; }
.rec-header { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.rec-meta { display: flex; gap: 6px; flex-wrap: wrap; }
.rec-scores { display: flex; gap: 12px; font-size: 0.85rem; }
.rec-text { font-size: 0.88rem; color: var(--text); line-height: 1.5; margin: 0; }

.export-actions h2 { margin-bottom: 16px; }
.export-buttons { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.share-section label { display: flex; align-items: center; gap: 6px; font-weight: 500; margin-bottom: 8px; }

/* ===== ADMIN ===== */
.admin-header { display: flex; justify-content: space-between; align-items: center; padding: 24px 0 16px; flex-wrap: wrap; gap: 12px; }
.admin-header h1 { font-size: 1.5rem; color: var(--nav-bg); display: flex; align-items: center; gap: 10px; }

.admin-tabs { display: flex; border-bottom: 2px solid var(--border); margin-bottom: 1.5rem; gap: 0; }
.admin-tab { padding: 0.65rem 1.4rem; text-decoration: none; color: var(--text-muted); border-bottom: 2px solid transparent; margin-bottom: -2px; font-weight: 500; font-size: 0.9rem; display: flex; align-items: center; gap: 7px; transition: color 0.15s; }
.admin-tab:hover { color: var(--accent); text-decoration: none; }
.admin-tab.active { color: var(--accent); border-bottom-color: var(--accent); }

.fw-table .col-center { text-align: center; }
.fw-table td.col-center { text-align: center; }
.fw-table code { font-size: 0.82rem; background: #f1f5f9; padding: 2px 6px; border-radius: 4px; }

.fw-upload-card { margin-top: 1.5rem; }
.fw-upload-card .section-desc { color: var(--text-muted); font-size: 0.88rem; margin-bottom: 1rem; }
.fw-upload-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.fw-file-label { display: flex; align-items: center; gap: 10px; padding: 0.6rem 1.1rem; border: 2px dashed var(--border); border-radius: var(--radius); cursor: pointer; font-size: 0.9rem; color: var(--text-muted); background: #f8fafc; flex: 1; min-width: 240px; transition: border-color 0.15s; }
.fw-file-label:hover { border-color: var(--accent); color: var(--accent); }
.fw-file-label input[type="file"] { display: none; }

.btn-danger { background: var(--danger); color: #fff; border: none; }
.btn-danger:hover { background: #b02a37; color: #fff; text-decoration: none; }

.alert { padding: 0.75rem 1rem; border-radius: var(--radius); margin-bottom: 1rem; font-size: 0.9rem; }
.alert-success { background: #d1fae5; color: #065f46; border-left: 4px solid var(--success); }
.alert-error { background: #fee2e2; color: #991b1b; border-left: 4px solid var(--danger); }

.stats-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-bottom: 20px; }
@media (min-width: 768px) { .stats-grid { grid-template-columns: repeat(4, 1fr); } }
.stat-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  text-align: center;
}
.stat-icon { color: var(--accent); margin-bottom: 8px; }
.stat-value { font-size: 1.8rem; font-weight: 700; color: var(--nav-bg); }
.stat-label { font-size: 0.82rem; color: var(--text-muted); margin-top: 4px; }

.filter-card { padding: 16px 24px; }
.filter-form { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.filter-group { display: flex; flex-direction: column; gap: 4px; min-width: 140px; }
.filter-group label { font-size: 0.8rem; font-weight: 500; color: var(--text-muted); }
.filter-group .form-control { padding: 6px 10px; font-size: 0.85rem; }

.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th { background: #f8fafc; padding: 10px 12px; text-align: left; font-size: 0.82rem; color: var(--text-muted); border-bottom: 2px solid var(--border); white-space: nowrap; }
.admin-table th a { color: var(--text-muted); display: flex; align-items: center; gap: 4px; }
.admin-table th a:hover { color: var(--accent); text-decoration: none; }
.admin-table td { padding: 10px 12px; border-bottom: 1px solid #f1f5f9; font-size: 0.88rem; vertical-align: middle; }
.admin-table tr:hover td { background: #f8fafc; }
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }

.pagination { display: flex; align-items: center; gap: 10px; justify-content: center; padding: 16px; border-top: 1px solid var(--border); }
.page-info { font-size: 0.85rem; color: var(--text-muted); }

.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; font-size: 0.9rem; }
@media (min-width: 600px) { .detail-grid { grid-template-columns: repeat(3, 1fr); } }
.detail-grid > div { padding: 8px 0; }

/* ===== MAIN / FOOTER ===== */
.main-content { flex: 1; padding: 0 0 40px; }

.footer {
  background: var(--nav-bg);
  color: #94a3b8;
  padding: 16px 0;
  font-size: 0.82rem;
}
.footer-inner { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }

/* ===== RESPONSIVE ===== */
@media (max-width: 600px) {
  .navbar-toggle { display: block; }
  .navbar-menu {
    display: none;
    position: absolute;
    top: 56px;
    left: 0; right: 0;
    background: var(--nav-bg);
    flex-direction: column;
    padding: 12px 16px;
    gap: 4px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  }
  .navbar-menu.open { display: flex; }
  .navbar { position: relative; }
  .maturity-options { gap: 4px; }
  .maturity-option { min-width: 55px; padding: 8px 6px; }
  .score-hero-card { flex-direction: column; text-align: center; }
  .score-icon { display: none; }
  .domain-nav { justify-content: center; }
}

@media (max-width: 400px) {
  .maturity-label { display: none; }
  .stepper { gap: 0; }
  .step-label { display: none; }
}

/* ===== TRANSITIONS ===== */
.domain-card { animation: fadeSlideIn 0.25s ease; }
@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Benchmark ── */
.benchmark-note { font-size: 0.8rem; color: #fd7e14; margin-bottom: 8px; font-style: italic; }
.benchmark-card { padding: 10px 14px; }
.benchmark-insufficient { font-size: 0.85rem; color: #64748b; font-style: italic; margin: 0; }
.fw-overwrite-row { margin-top: 10px; }
.fw-overwrite-label { font-size: 0.85rem; color: #64748b; display: flex; align-items: center; gap: 6px; cursor: pointer; }
.fw-overwrite-label input[type="checkbox"] { width: 15px; height: 15px; accent-color: var(--danger); }

/* ── Framework enable/disable toggle ─────────────────────────────────────── */
.fw-toggle { position: relative; display: inline-block; width: 36px; height: 20px; cursor: pointer; }
.fw-toggle input { opacity: 0; width: 0; height: 0; }
.fw-toggle-slider {
  position: absolute; inset: 0;
  background: #cbd5e1; border-radius: 20px;
  transition: background 0.2s;
}
.fw-toggle-slider::before {
  content: ""; position: absolute;
  width: 14px; height: 14px; left: 3px; top: 3px;
  background: #fff; border-radius: 50%;
  transition: transform 0.2s;
}
.fw-toggle input:checked + .fw-toggle-slider { background: #22c55e; }
.fw-toggle input:checked + .fw-toggle-slider::before { transform: translateX(16px); }
.fw-row-disabled td { opacity: 0.45; }
.fw-row-disabled td:nth-child(6) { opacity: 1; }

/* ── Admin login page ────────────────────────────────────────────────────── */
.admin-login-page { background: #f1f5f9; display: flex; align-items: center; justify-content: center; min-height: 100vh; }
.login-wrap { width: 100%; max-width: 400px; padding: 24px; }
.login-card { background: #fff; border-radius: var(--radius); box-shadow: 0 4px 24px rgba(0,0,0,0.10); padding: 36px 32px; }
.login-header { text-align: center; margin-bottom: 24px; }
.login-header h1 { font-size: 1.4rem; margin: 10px 0 4px; }
.login-header p { color: #64748b; font-size: 0.85rem; }

/* ── Admin header actions ────────────────────────────────────────────────── */
.admin-header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }
.admin-header-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.admin-user-badge { font-size: 0.85rem; color: #475569; display: flex; align-items: center; gap: 6px; }

/* ── User management ────────────────────────────────────────────────────── */
.user-form-row { display: flex; gap: 14px; flex-wrap: wrap; align-items: flex-end; }
.user-form-row .form-group { flex: 1; min-width: 160px; margin-bottom: 0; }

/* ── Admin modal (users.html) — separate class to avoid conflict ─────────── */
.modal-box { background: #fff; border-radius: var(--radius); padding: 28px 32px; width: 100%; max-width: 460px; box-shadow: 0 8px 32px rgba(0,0,0,0.18); }
.modal-box h3 { margin-bottom: 18px; font-size: 1.1rem; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }

/* ── Audit log ───────────────────────────────────────────────────────────── */
.audit-action { font-size: 0.8rem; font-weight: 600; padding: 2px 7px; border-radius: 4px; background: #f1f5f9; color: #475569; }
.audit-action--login  { background: #dcfce7; color: #166534; }
.audit-action--logout { background: #f1f5f9; color: #475569; }
.audit-action--session { background: #fee2e2; color: #991b1b; }
.audit-action--framework { background: #e0f2fe; color: #0369a1; }
.audit-action--user { background: #fef9c3; color: #854d0e; }

/* ── About button & modal ────────────────────────────────────────────────── */
.about-btn {
  background: none; border: none; cursor: pointer;
  color: var(--nav-link, #cbd5e1); font-size: 1.1rem;
  padding: 4px 6px; border-radius: 50%;
  transition: color 0.2s, background 0.2s;
  display: flex; align-items: center;
}
.about-btn:hover { color: #fff; background: rgba(255,255,255,0.1); }

.about-box {
  background: #fff; border-radius: var(--radius);
  padding: 36px 32px 28px; width: 100%; max-width: 400px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.2);
  text-align: center; position: relative;
}
.about-close {
  position: absolute; top: 12px; right: 16px;
  background: none; border: none; font-size: 1.4rem;
  color: #94a3b8; cursor: pointer; line-height: 1;
}
.about-close:hover { color: #1e293b; }
.about-logo { margin-bottom: 14px; }
.about-title { font-size: 1.25rem; font-weight: 700; margin-bottom: 4px; }
.about-subtitle { font-size: 0.85rem; color: #64748b; margin-bottom: 20px; }
.about-author {
  display: flex; align-items: center; gap: 12px;
  background: #f8fafc; border-radius: var(--radius);
  padding: 12px 16px; margin-bottom: 16px; text-align: left;
}
.about-author i { font-size: 1.4rem; color: #0066cc; }
.about-author strong { display: block; font-size: 0.95rem; }
.about-author span { font-size: 0.82rem; color: #64748b; }
.about-github {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.85rem; color: #1e293b; text-decoration: none;
  background: #f1f5f9; padding: 8px 14px; border-radius: 20px;
  transition: background 0.2s;
}
.about-github:hover { background: #e2e8f0; }
.about-github i { font-size: 1rem; }
