/* © 2026 Claude Hecker — NIS2 Quick-Check — AGPL-3.0 */

:root {
  --bg: #f4f5f7;
  --surface: #ffffff;
  --text: #1a1d23;
  --text-muted: #6b7280;
  --border: #e2e4e9;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --danger: #dc2626;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.04);
}

body.dark {
  --bg: #10131a;
  --surface: #1a1e27;
  --text: #e6e8ec;
  --text-muted: #9096a3;
  --border: #2a2f3a;
  --accent: #3b82f6;
  --accent-hover: #60a5fa;
  --shadow: 0 1px 3px rgba(0,0,0,.4);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.topbar-brand { font-weight: 700; font-size: 18px; display: flex; align-items: center; gap: 8px; }
.brand-icon { width: 28px; height: 28px; border-radius: 7px; object-fit: cover; }
.topbar-right { display: flex; align-items: center; gap: 10px; }

.icon-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 10px;
  cursor: pointer;
  font-size: 16px;
}

.lang-select {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 14px;
}

.lang-hint {
  background: #fef3c7;
  color: #92400e;
  padding: 8px 20px;
  font-size: 13px;
  text-align: center;
}
body.dark .lang-hint { background: #451a03; color: #fbbf24; }

.progress-wrap {
  height: 4px;
  background: var(--border);
}
.progress-bar {
  height: 100%;
  background: var(--accent);
  transition: width .3s ease;
}

main#app {
  max-width: 780px;
  margin: 32px auto;
  padding: 0 20px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 32px;
}

.welcome h1 { margin-top: 0; display: flex; align-items: center; gap: 12px; }
.welcome-icon { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; }
.lead { color: var(--text-muted); font-size: 16px; }

.notice {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: var(--radius);
  padding: 14px 16px;
  font-size: 13px;
  color: #1e3a5f;
  margin: 16px 0;
}
body.dark .notice { background: #0c2340; border-color: #1e3a5f; color: #93c5fd; }

.feature-list { padding-left: 20px; color: var(--text); }
.feature-list li { margin-bottom: 6px; }

.btn-row {
  display: flex;
  gap: 10px;
  margin-top: 24px;
  flex-wrap: wrap;
}

.btn {
  padding: 10px 20px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn-secondary:hover { background: var(--bg); }
.btn-danger { background: #fee2e2; color: var(--danger); border-color: #fecaca; }
body.dark .btn-danger { background: #450a0a; color: #fca5a5; border-color: #7f1d1d; }
.file-btn input { display: none; }

.field-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin: 16px 0 6px;
  color: var(--text-muted);
}

.input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
}

.muted { color: var(--text-muted); font-size: 13px; }
.small { font-size: 12px; }

.classification-badge {
  margin-top: 20px;
  padding: 12px 16px;
  border: 1.5px solid;
  border-radius: var(--radius);
  font-size: 14px;
}

.domain-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 4px;
}
.domain-icon { font-size: 36px; }
.domain-article { font-size: 12px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .05em; }
.domain-header h2 { margin: 2px 0 0; }

.question-block {
  border-top: 1px solid var(--border);
  padding: 20px 0;
}
.question-text { font-weight: 600; margin-bottom: 4px; }
.question-help { color: var(--text-muted); font-size: 13px; margin-bottom: 12px; }

.maturity-scale {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}
.maturity-btn {
  flex: 1 1 auto;
  min-width: 100px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 12px;
  cursor: pointer;
  text-align: center;
}
.maturity-btn:hover { border-color: var(--mc); }
.maturity-btn.active { background: var(--mc); border-color: var(--mc); color: #fff; font-weight: 700; }

.note-input { margin-top: 4px; }

/* ── Results ── */
.result-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
  margin: 20px 0;
}
.stat-box {
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
}
.stat-value { font-size: 26px; font-weight: 800; }
.stat-label { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

.bar-chart { display: flex; flex-direction: column; gap: 10px; margin: 16px 0 28px; }
.bar-row { display: grid; grid-template-columns: 160px 1fr 40px; align-items: center; gap: 10px; }
.bar-label { font-size: 13px; }
.bar-track { height: 14px; background: var(--border); border-radius: 7px; overflow: hidden; }
.bar-fill { height: 100%; background: var(--accent); border-radius: 7px; }
.bar-value { font-size: 13px; font-weight: 700; text-align: right; }

.radar-svg { width: 100%; max-width: 340px; display: block; margin: 0 auto 28px; }
.radar-grid { fill: none; stroke: var(--border); stroke-width: 1; }
.radar-data { fill: rgba(37,99,235,.25); stroke: var(--accent); stroke-width: 2; }
.radar-label { font-size: 14px; fill: var(--text); }

.gap-table, .country-info-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin: 12px 0 24px;
}
.gap-table th, .gap-table td,
.country-info-table th, .country-info-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  text-align: left;
}
.gap-table th { color: var(--text-muted); font-weight: 600; }
.country-info-table th { color: var(--text-muted); font-weight: 600; width: 220px; vertical-align: top; }
.country-info-table.wide th:first-child { width: auto; }

.prio-badge, .status-badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}

.highlight-row { background: rgba(37,99,235,.08); }

.country-panel { margin-bottom: 8px; }

.footer {
  text-align: center;
  color: var(--text-muted);
  font-size: 12px;
  padding: 24px 20px 40px;
}
.footer a { color: var(--text-muted); }

@media (max-width: 640px) {
  .bar-row { grid-template-columns: 110px 1fr 36px; }
  .card { padding: 20px; }
}

/* ── Print / PDF ── */
@media print {
  .topbar, .progress-wrap, .lang-hint, .footer, .no-print { display: none !important; }
  body { background: #fff; color: #000; }
  .card { box-shadow: none; border: none; padding: 0; }
  main#app { margin: 0; max-width: 100%; }
  .maturity-btn { display: none; }
}
