/* celox Portal — M3-Dark-Look passend zu celox.io */
:root {
  --bg: #111318;
  --surface: #1a1c22;
  --surface-hi: #22242c;
  --outline: #2e3038;
  --text: #e3e2e9;
  --text-mut: #a8aab3;
  --text-dim: #7a7d87;
  --primary: #adc6ff;
  --on-primary: #002e69;
  --ok: #7ee787;
  --mid: #ffd479;
  --warn: #ffab70;
  --crit: #ff7b72;
  --radius: 16px;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { color-scheme: dark; }
body {
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  background-image:
    radial-gradient(1000px 600px at 85% -10%, rgba(173, 198, 255, 0.10), transparent 60%),
    radial-gradient(800px 500px at -10% 100%, rgba(222, 188, 222, 0.07), transparent 55%);
  background-attachment: fixed;
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}
.wrap { max-width: 860px; margin: 0 auto; padding: 1.5rem 1.25rem 4rem; }
header.site {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 0.75rem 0 1.5rem;
}
.brand { font-weight: 700; font-size: 1.15rem; letter-spacing: -0.02em; text-decoration: none; color: var(--text); }
.brand span { color: var(--primary); }
.brand small { display: block; font-size: 0.68rem; font-weight: 500; color: var(--text-dim); letter-spacing: 0.12em; text-transform: uppercase; }
.userbox { display: flex; align-items: center; gap: 0.75rem; font-size: 0.85rem; color: var(--text-mut); }

.card {
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  border: 1px solid var(--outline);
  border-radius: var(--radius);
  padding: 1.5rem;
}
h1 { font-size: 1.6rem; letter-spacing: -0.02em; line-height: 1.25; }
h2 { font-size: 1.2rem; }
.sub { color: var(--text-mut); font-size: 0.95rem; }

button, .btn {
  font: inherit; cursor: pointer;
  border: 1px solid var(--outline); border-radius: 999px;
  background: var(--surface-hi); color: var(--text);
  padding: 0.6rem 1.2rem; font-size: 0.9rem; font-weight: 600;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}
button:hover { border-color: var(--primary); }
.btn-primary { background: var(--primary); color: var(--on-primary); border-color: var(--primary); }
.btn-primary:hover { filter: brightness(1.06); }
.btn-ghost { background: none; }
.btn-sm { padding: 0.35rem 0.8rem; font-size: 0.8rem; }
button:disabled { opacity: 0.5; cursor: not-allowed; }

input, select {
  font: inherit; width: 100%;
  background: var(--bg); color: var(--text);
  border: 1px solid var(--outline); border-radius: 10px;
  padding: 0.65rem 0.85rem;
}
input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(173, 198, 255, 0.18); }
label { display: block; font-size: 0.8rem; color: var(--text-mut); margin: 0.9rem 0 0.3rem; }
.error { color: var(--crit); font-size: 0.85rem; margin-top: 0.75rem; min-height: 1.2em; }

.hidden { display: none !important; }

/* Login */
.login-box { max-width: 400px; margin: 8vh auto 0; }
.login-box h1 { margin-bottom: 0.35rem; }

/* Dashboard */
.grid { display: grid; gap: 1rem; margin-top: 1.25rem; }
.audit-card { display: flex; flex-direction: column; gap: 0.5rem; cursor: pointer; transition: border-color 0.2s, transform 0.2s; }
.audit-card:hover { border-color: var(--primary); transform: translateY(-2px); }
.audit-card .icon { font-size: 1.6rem; }
.audit-card h2 { font-size: 1.05rem; }
.audit-card .meta { font-size: 0.78rem; color: var(--text-dim); }
.audit-card .tagline { font-size: 0.87rem; color: var(--text-mut); }
.badge { display: inline-flex; align-items: center; gap: 0.3rem; font-size: 0.72rem; font-weight: 600; color: var(--primary); background: rgba(173, 198, 255, 0.12); border: 1px solid rgba(173, 198, 255, 0.3); border-radius: 999px; padding: 0.15rem 0.6rem; }

/* Runner */
.progress { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: blur(10px); padding: 0.75rem 0; margin-bottom: 1rem; }
.progress-track { height: 6px; background: var(--surface-hi); border-radius: 999px; overflow: hidden; }
.progress-fill { height: 100%; width: 0%; background: var(--primary); border-radius: 999px; transition: width 0.3s ease; }
.progress-label { display: flex; justify-content: space-between; font-size: 0.75rem; color: var(--text-dim); margin-top: 0.4rem; }
.domain-head-block { margin: 2rem 0 0.9rem; }
.domain-head { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--primary); }
.domain-intro { font-size: 0.85rem; color: var(--text-mut); margin-top: 0.3rem; }
.question { margin-bottom: 1rem; }
.question .q-text { font-weight: 600; margin-bottom: 0.6rem; }
.question .q-help { font-size: 0.82rem; color: var(--text-dim); margin-bottom: 0.55rem; padding-left: 0.7rem; border-left: 2px solid var(--outline); }
.standards { font-size: 0.75rem; color: var(--text-dim); margin-top: 0.3rem; line-height: 1.4; }
.standards-line { font-size: 0.78rem; color: var(--text-dim); margin-top: 0.6rem; }
.crit-box { border: 1px solid var(--crit); background: color-mix(in srgb, var(--crit) 10%, transparent); border-radius: var(--radius); padding: 1.25rem; margin-bottom: 1.25rem; }
.crit-box h3 { color: var(--crit); font-size: 1.05rem; margin-bottom: 0.4rem; }
.crit-box ul { padding-left: 1.1rem; margin-top: 0.6rem; font-size: 0.88rem; }
.crit-box li { margin: 0.35rem 0; }
.bridge { border-left: 3px solid var(--primary); background: var(--surface-hi); border-radius: 0 10px 10px 0; padding: 1rem 1.25rem; margin-top: 1.25rem; }
.bridge h3 { font-size: 0.98rem; margin-bottom: 0.35rem; }
.bridge p { font-size: 0.88rem; color: var(--text-mut); margin-bottom: 0.7rem; }
.q-options { display: grid; gap: 0.45rem; }
.q-opt {
  display: flex; align-items: flex-start; gap: 0.6rem;
  border: 1px solid var(--outline); border-radius: 12px;
  padding: 0.6rem 0.85rem; cursor: pointer; font-size: 0.88rem; color: var(--text-mut);
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.q-opt:hover { border-color: var(--primary); }
.q-opt.sel { border-color: var(--primary); background: rgba(173, 198, 255, 0.1); color: var(--text); }
.q-opt input { width: auto; margin-top: 0.25rem; accent-color: var(--primary); }
.runner-actions { display: flex; gap: 0.75rem; justify-content: space-between; align-items: center; margin-top: 2rem; }

/* Ergebnis */
.score-hero { display: flex; gap: 1.5rem; align-items: center; flex-wrap: wrap; }
.score-ring { position: relative; width: 130px; height: 130px; flex-shrink: 0; }
.score-ring svg { transform: rotate(-90deg); }
.score-ring .val { position: absolute; inset: 0; display: grid; place-items: center; font-size: 1.6rem; font-weight: 700; }
.maturity { font-size: 1.25rem; font-weight: 700; }
.tone-ok { color: var(--ok); } .tone-mid { color: var(--mid); } .tone-warn { color: var(--warn); } .tone-crit { color: var(--crit); }
.domain-bars { display: grid; gap: 0.7rem; margin-top: 1.25rem; }
.dbar .lbl { display: flex; justify-content: space-between; font-size: 0.82rem; margin-bottom: 0.25rem; }
.dbar .track { height: 8px; background: var(--surface-hi); border-radius: 999px; overflow: hidden; }
.dbar .fill { height: 100%; border-radius: 999px; }
.rec { border-left: 3px solid var(--warn); padding: 0.75rem 1rem; background: var(--surface-hi); border-radius: 0 10px 10px 0; margin-top: 0.9rem; }
.rec h3 { font-size: 0.95rem; margin-bottom: 0.35rem; }
.rec ul { padding-left: 1.1rem; font-size: 0.87rem; color: var(--text-mut); }
.rec li { margin: 0.25rem 0; }

/* Ergänzendes Angebot (Schulungs-Brücke) */
.companion { display: flex; gap: 1.1rem; align-items: flex-start; border-left: 3px solid var(--primary); }
.companion-icon { font-size: 1.8rem; flex-shrink: 0; line-height: 1.2; }
.companion h2 { font-size: 1.1rem; margin-bottom: 0.4rem; }

/* Ergebnis-Historie */
.hist-item { display: flex; align-items: center; gap: 0.85rem; padding: 0.7rem 0; border-bottom: 1px solid var(--outline); font-size: 0.88rem; }
.hist-item:last-child { border-bottom: none; }
.hist-item .pct { margin-left: auto; font-weight: 700; }

table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
th, td { text-align: left; padding: 0.55rem 0.6rem; border-bottom: 1px solid var(--outline); vertical-align: top; }
th { color: var(--text-dim); font-weight: 600; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; }

footer.site { margin-top: 3rem; font-size: 0.75rem; color: var(--text-dim); text-align: center; }
footer.site a { color: var(--text-dim); }

@media print {
  body { background: #fff; color: #111; }
  header.site, .runner-actions, .no-print, footer.site { display: none !important; }
  .card { border-color: #ccc; background: #fff; }
}
@media (max-width: 560px) {
  .wrap { padding-inline: 1rem; }
  .score-hero { gap: 1rem; }
}

/* ═══ Portal-Ergänzungen ═══ */
.login-tabs { display: flex; gap: 0.4rem; margin: 0.5rem 0 1.25rem; }
.login-tab { flex: 1; padding: 0.55rem; font-size: 0.9rem; border-radius: 10px; }
.login-tab.active { background: color-mix(in srgb, var(--primary) 16%, transparent); color: var(--primary); border-color: color-mix(in srgb, var(--primary) 40%, transparent); }
.section-h { margin: 2rem 0 1rem; font-size: 1.1rem; }
#trainings-section { margin-top: 2.5rem; }

/* Schulungs-Module */
.tr-module { margin-bottom: 1.1rem; }
.tr-module h2 { font-size: 1.1rem; margin-bottom: 0.6rem; }
.tr-module p { margin: 0.7rem 0; color: var(--text-mut); }
.tr-module ul { margin: 0.7rem 0 0.7rem 1.2rem; color: var(--text-mut); }
.tr-module li { margin: 0.3rem 0; }
.tr-note { border-radius: 0 10px 10px 0; padding: 0.7rem 1rem; margin: 0.9rem 0; font-size: 0.9rem; }
.tr-note.tip { border-left: 3px solid var(--primary); background: color-mix(in srgb, var(--primary) 8%, transparent); }
.tr-note.warn { border-left: 3px solid var(--crit); background: color-mix(in srgb, var(--crit) 8%, transparent); }
.tr-note.task { border-left: 3px solid var(--ok); background: color-mix(in srgb, var(--ok) 8%, transparent); }
.tr-note.case { border-left: 3px solid var(--mid); background: color-mix(in srgb, var(--mid) 8%, transparent); }

/* Zertifikat */
.cert { text-align: center; padding: 2.5rem 1.5rem; border: 1px solid var(--outline); }
.cert.passed { border-color: var(--ok); box-shadow: 0 0 0 1px color-mix(in srgb, var(--ok) 30%, transparent); }
.cert-badge { font-size: 3rem; }
.cert h1 { font-size: 1.5rem; margin: 0.5rem 0; }
.cert-score { font-size: 1.4rem; font-weight: 700; margin: 0.75rem 0; }

/* Security-Schulung: reiche Block-Typen */
.tr-summary { color: var(--text); font-weight: 500; margin-bottom: 0.8rem; }
.tr-adv, .tr-reveal { border: 1px solid var(--outline); border-radius: 10px; padding: 0.6rem 0.9rem; margin: 0.8rem 0; }
.tr-adv summary, .tr-reveal summary { cursor: pointer; font-weight: 600; font-size: 0.9rem; color: var(--primary); }
.tr-adv p, .tr-reveal p { margin-top: 0.6rem; color: var(--text-mut); font-size: 0.9rem; }
.tr-choice { margin: 1rem 0; }
.tr-choice-opts { display: grid; gap: 0.45rem; margin-top: 0.5rem; }
.tr-choice-opt { text-align: left; border: 1px solid var(--outline); border-radius: 12px; padding: 0.6rem 0.85rem; font-size: 0.88rem; color: var(--text-mut); background: var(--surface); }
.tr-choice-opt:hover:not(:disabled) { border-color: var(--primary); }
.tr-choice-opt.correct { border-color: var(--ok); }
.tr-choice-opt.chosen-ok { background: color-mix(in srgb, var(--ok) 15%, transparent); color: var(--text); }
.tr-choice-opt.chosen-bad { background: color-mix(in srgb, var(--crit) 15%, transparent); border-color: var(--crit); color: var(--text); }
.tr-choice-why, .tr-phish-why { margin-top: 0.7rem; font-size: 0.85rem; color: var(--text-mut); border-left: 2px solid var(--primary); padding-left: 0.7rem; }
.tr-pw { margin: 1rem 0; }
.tr-pw-bar { height: 8px; background: var(--surface-hi); border-radius: 999px; overflow: hidden; margin: 0.5rem 0 0.35rem; }
.tr-pw-fill { height: 100%; width: 0; border-radius: 999px; transition: width 0.2s, background 0.2s; }
.tr-pw-label { font-size: 0.82rem; min-height: 1.1em; }
.tr-phish-set { display: grid; gap: 1rem; margin: 1rem 0; }
.tr-phish { border: 1px solid var(--outline); border-radius: 12px; padding: 0.9rem; }
.pv { background: var(--bg); border: 1px solid var(--outline); border-radius: 8px; padding: 0.8rem; font-size: 0.85rem; }
.pv-head { border-bottom: 1px solid var(--outline); padding-bottom: 0.5rem; margin-bottom: 0.5rem; color: var(--text-mut); }
.pv-sub { display: block; color: var(--text); font-weight: 600; margin-top: 0.2rem; }
.pv-time { font-size: 0.72rem; color: var(--text-dim); }
.pv-body p { margin: 0.4rem 0; color: var(--text-mut); }
.pv-caller { font-weight: 700; color: var(--text); }
.tr-phish-actions { display: flex; gap: 0.5rem; margin-top: 0.7rem; }
.tr-phish-btn { font-size: 0.82rem; padding: 0.4rem 0.9rem; }
.tr-phish-btn.chosen-ok { background: color-mix(in srgb, var(--ok) 18%, transparent); border-color: var(--ok); }
.tr-phish-btn.chosen-bad { background: color-mix(in srgb, var(--crit) 18%, transparent); border-color: var(--crit); }
.tr-voice { border: 1px solid var(--primary); border-radius: 12px; padding: 1rem; margin: 1rem 0; background: color-mix(in srgb, var(--primary) 5%, transparent); }
.tr-voice-row { display: flex; align-items: center; gap: 0.75rem; margin: 0.7rem 0; flex-wrap: wrap; }
.tr-voice-text { margin-top: 0.5rem; }
.tr-voice-audio { width: 100%; margin-top: 0.8rem; }
