/* OM Consulting Prozessassessment – Stylesheet */

/* Lokale Fonts (kein Google CDN – Datenschutz) */
@font-face {
    font-family: 'Roboto';
    font-weight: 300;
    font-style: normal;
    src: url('/static/fonts/Roboto-Light.ttf') format('truetype');
    font-display: swap;
}
@font-face {
    font-family: 'Roboto';
    font-weight: 400;
    font-style: normal;
    src: url('/static/fonts/Roboto-Regular.ttf') format('truetype');
    font-display: swap;
}
@font-face {
    font-family: 'Roboto';
    font-weight: 500;
    font-style: normal;
    src: url('/static/fonts/Roboto-Medium.ttf') format('truetype');
    font-display: swap;
}
@font-face {
    font-family: 'Roboto';
    font-weight: 700;
    font-style: normal;
    src: url('/static/fonts/Roboto-Bold.ttf') format('truetype');
    font-display: swap;
}
@font-face {
    font-family: 'Roboto Condensed';
    font-weight: 400;
    font-style: normal;
    src: url('/static/fonts/Roboto_Condensed-Regular.ttf') format('truetype');
    font-display: swap;
}
@font-face {
    font-family: 'Roboto Condensed';
    font-weight: 700;
    font-style: normal;
    src: url('/static/fonts/Roboto_Condensed-Bold.ttf') format('truetype');
    font-display: swap;
}

:root {
    --color-primary: #340059;
    --color-accent: #BC903D;
    --color-bg: #f8f7fc;
    --color-white: #ffffff;
    --color-text: #1a1a1a;
    --color-muted: #666;
    --color-border: #ddd;
    --color-success: #2E7D32;
    --color-error: #C62828;
    --color-opt: #2B3A3F;
    --color-nut: #6A1B9A;
}

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

body {
    font-family: 'Roboto', 'Segoe UI', Arial, sans-serif;
    background: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    font-weight: 400;
}

/* ── Typografie ── */
h1 { font-family: 'Roboto Condensed', 'Roboto', sans-serif; font-weight: 700; color: var(--color-primary); font-size: 24px; }
h2 { font-family: 'Roboto Condensed', 'Roboto', sans-serif; font-weight: 700; color: var(--color-primary); font-size: 18px; }
h3 { font-family: 'Roboto', sans-serif; font-weight: 700; color: var(--color-accent); font-size: 15px; }

/* ── Layout ── */
.container { max-width: 960px; margin: 0 auto; padding: 20px; }
.header {
    background: var(--color-white);
    padding: 12px 0;
    margin-bottom: 30px;
    border-bottom: 2px solid var(--color-accent);
}
.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.header-brand {
    display: flex;
    align-items: center;
    text-decoration: none;
}
.header-brand:hover { opacity: 0.85; }
.header-logo {
    height: 48px;
    width: auto;
}
.header a { color: var(--color-accent); text-decoration: none; font-size: 14px; font-weight: 500; }
.header a:hover { color: var(--color-primary); text-decoration: underline; }
.nav-links { display: flex; gap: 18px; align-items: center; }

/* ── Footer ── */
.footer {
    background: var(--color-primary);
    color: rgba(255,255,255,0.7);
    padding: 12px 0;
    margin-top: 40px;
    font-size: 13px;
}
.footer .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 0;
    padding-bottom: 0;
}
.footer a { color: var(--color-accent); text-decoration: none; }
.footer a:hover { color: white; }

/* ── Cards ── */
.card {
    background: var(--color-white);
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.card h2 { margin-bottom: 15px; }

/* ── Buttons ── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-family: 'Roboto', sans-serif;
    font-size: 14px;
    text-decoration: none;
    transition: opacity 0.2s;
    line-height: 1.2;
    box-sizing: border-box;
}
.btn:hover { opacity: 0.85; }
.btn-primary { background: var(--color-primary); color: white; }
.btn-accent { background: var(--color-accent); color: white; }
.btn-outline { background: transparent; border: 1px solid var(--color-border); color: var(--color-text); }
.btn-sm { padding: 4px 12px; font-size: 13px; white-space: nowrap; }
.btn-danger { background: var(--color-error); color: white; }

/* ── Forms ── */
.form-group { margin-bottom: 15px; }
.form-group label { display: block; margin-bottom: 5px; font-weight: 500; font-size: 14px; }
.form-group input, .form-group textarea, .form-group select {
    width: 100%; padding: 8px 12px;
    border: 1px solid var(--color-border);
    border-radius: 5px; font-size: 14px;
    font-family: 'Roboto', sans-serif;
}
.form-group textarea { height: 80px; resize: vertical; }
.form-group .help-text { font-size: 13px; color: var(--color-muted); margin-top: 4px; }
.form-row { display: flex; gap: 15px; }
.form-row .form-group { flex: 1; }

/* ── Flash Messages ── */
.flash { padding: 10px 15px; border-radius: 5px; margin-bottom: 15px; font-size: 14px; }
.flash-success { background: #E8F5E9; color: var(--color-success); border: 1px solid #A5D6A7; }
.flash-error { background: #FFEBEE; color: var(--color-error); border: 1px solid #EF9A9A; }
.flash-warning { background: #FFF8E1; color: #E65100; border: 1px solid #FFE082; }

/* ── Tables ── */
table { width: 100%; border-collapse: collapse; margin: 10px 0; }
th { background: var(--color-primary); color: white; padding: 8px 12px; text-align: left; font-size: 14px; font-weight: 500; }
td { border-bottom: 1px solid var(--color-border); padding: 8px 12px; font-size: 14px; }
tr:hover { background: #f5f3f8; }

/* ── Scores ── */
.score-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 500;
    color: white;
}
.score-opt { background: var(--color-opt); }
.score-nut { background: var(--color-nut); }

/* ── Assessment Form ── */
.question-card {
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
}
.question-card h3 { font-size: 15px; color: var(--color-primary); margin-bottom: 5px; }
.question-card .dimension-label {
    font-size: 12px; color: var(--color-muted);
    text-transform: uppercase; letter-spacing: 0.5px;
    margin-bottom: 8px;
}
.question-card .question-text { font-size: 15px; margin-bottom: 12px; }
.question-card .help-toggle {
    font-size: 13px; color: var(--color-accent);
    cursor: pointer; margin-bottom: 8px;
}
.question-card .help-content {
    font-size: 13px; color: var(--color-muted);
    background: #f9f7fc; padding: 10px; border-radius: 5px;
    margin-bottom: 10px;
}
.radio-group { display: flex; flex-direction: column; gap: 6px; }
.radio-group label {
    display: flex; align-items: flex-start; gap: 8px;
    padding: 6px 10px; border-radius: 5px; cursor: pointer;
    font-size: 14px; font-weight: normal;
}
.radio-group label:hover { background: #f5f3f8; }
.radio-group input[type="radio"] { margin-top: 3px; }
.comment-field { margin-top: 8px; display: flex; gap: 10px; align-items: flex-start; }
.comment-field label { font-size: 13px; color: #999; white-space: nowrap; padding-top: 8px; }
.comment-field textarea { height: 50px; font-size: 13px; flex: 1; }

/* ── Steckbrief ── */
.steckbrief-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 20px;
}

/* ── Login ── */
.login-container {
    max-width: 400px;
    margin: 80px auto;
}
.login-container h1 {
    text-align: center;
    margin-bottom: 30px;
}

/* ── Progress ── */
.progress-bar {
    background: var(--color-border);
    border-radius: 10px;
    height: 8px;
    margin-bottom: 20px;
}
.progress-bar-fill {
    background: var(--color-accent);
    height: 100%;
    border-radius: 10px;
    transition: width 0.3s;
}

/* ── Assessment View ── */
.answer-display {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}
.answer-display .q-text { flex: 1; font-size: 14px; }
.answer-display .a-value {
    font-weight: 500;
    min-width: 40px;
    text-align: center;
}

/* ── Sprach-Switcher ── */
.lang-switcher {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-left: 8px;
    font-size: 13px;
}
.lang-switcher .lang-btn {
    color: var(--color-accent);
    text-decoration: none;
    padding: 2px 6px;
    border-radius: 3px;
    opacity: 0.6;
    transition: opacity 0.15s, color 0.15s;
    font-weight: 500;
}
.lang-switcher .lang-btn:hover {
    opacity: 1;
    color: var(--color-primary);
    text-decoration: none;
}
.lang-switcher .lang-btn.active {
    opacity: 1;
    color: var(--color-primary);
    font-weight: 700;
    cursor: default;
}
.lang-switcher .lang-sep {
    color: var(--color-muted);
    opacity: 0.5;
}
/* Im Footer: an Footer-Farben angepasst */
.lang-switcher-footer .lang-btn {
    color: var(--color-accent);
}
.lang-switcher-footer .lang-btn:hover {
    color: white;
}
.lang-switcher-footer .lang-btn.active {
    color: white;
}

/* ── Superadmin-Dropdown ── */
.nav-dropdown {
    position: relative;
    display: inline-block;
}
.nav-dropdown-toggle {
    cursor: pointer;
    user-select: none;
}
.nav-dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: 5px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    min-width: 200px;
    z-index: 100;
    padding: 4px 0;
}
.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu {
    display: block;
}
.nav-dropdown-menu a {
    display: block;
    padding: 8px 14px;
    color: var(--color-text);
    text-decoration: none;
    font-size: 14px;
}
.nav-dropdown-menu a:hover {
    background: #f5f3f8;
    color: var(--color-primary);
    text-decoration: none;
}

/* ── Übersetzungs-Status-Badges ── */
.i18n-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.4;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.i18n-badge-translated {
    background: #E8F5E9;
    color: var(--color-success);
}
.i18n-badge-stale {
    background: #FFF8E1;
    color: #E65100;
}
.i18n-badge-missing {
    background: #FFEBEE;
    color: var(--color-error);
}

/* ── Übersetzungs-Block in Edit-Maske ── */
.translation-block {
    border-left: 3px solid var(--color-border);
    padding-left: 12px;
    margin-top: 12px;
}
.translation-block.translation-de {
    border-left-color: var(--color-primary);
}
.translation-block.translation-loc {
    border-left-color: var(--color-accent);
}
.translation-locale-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--color-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
}
/* ============================================================
   KI-EIGNUNG (Stufe 1: Kandidat / Stufe 2: Eignungsprüfung)
   ============================================================ */

/* KI-Kandidat-Badge (im Score-Header neben Optimierbarkeit/Nutzen) */
.score-badge.score-ki {
    background: var(--color-accent);
    color: white;
}

/* KI-Eignungs-Ampel (Tabellenspalten und Block-Header)
   Farb-Konvention: konsistent mit OM Consulting Farbpalette
   Grün = Gold (#BC903D), Gelb = Lila-Hellton (#C4AABD), Rot = Petrol (#2B3A3F) */
.ki-status-circle {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 1px solid rgba(0, 0, 0, 0.1);
    vertical-align: middle;
    flex-shrink: 0;
}
.ki-status-circle.green { background: #BC903D; }
.ki-status-circle.yellow { background: #C4AABD; }
.ki-status-circle.red { background: #2B3A3F; }

/* KI-Eignungs-Pfeile (Detail-Ansicht der einzelnen Fragen)
   Bewusst alle in Grau: keine Bewertung pro Frage suggerieren,
   nur Antwort-Richtung visualisieren. */
.ki-arrow {
    display: inline-block;
    color: #666;
    font-size: 18px;
    font-weight: 600;
    line-height: 1;
    width: 14px;
    text-align: center;
    flex-shrink: 0;
}

/* KI-Kandidat-Marker: leerer Kreis mit goldenem Rand
   (konsistent mit Bubble-Chart-Symbolik:
    Rand = Kandidat, Füllung = Eignung) */
.ki-candidate-mark {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid var(--color-accent);
    background: transparent;
    vertical-align: middle;
    flex-shrink: 0;
    /* Bisheriger Inhalt (Häkchen-Glyphe) wird ausgeblendet — der Kreis selbst ist das Symbol */
    font-size: 0;
    color: transparent;
}

/* Legende unter Tabellen mit KI-Spalte */
.ki-legend {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid #f0f0f0;
}
.ki-legend-title {
    font-size: 12px;
    color: #666;
    font-weight: 600;
    margin-bottom: 6px;
}
.ki-legend-items {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    font-size: 12px;
    color: #666;
}
.ki-legend-items span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
/* Zentrierte Variante (z.B. unter dem Bubble-Chart) */
.ki-legend-centered .ki-legend-items {
    justify-content: center;
}


/* KI-Eignungs-Block auf der Assessment-Detail-Seite */
.ki-block-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}
.ki-status-banner {
    padding: 8px 12px;
    border-radius: 5px;
    font-weight: 500;
    font-size: 14px;
    margin-top: 8px;
}
.ki-status-banner.good {
    background: transparent;
    border-left: 4px solid #BC903D;
    color: #BC903D;
}
.ki-status-banner.caveats {
    background: transparent;
    border-left: 4px solid #C4AABD;
    color: #C4AABD;
}
.ki-status-banner.not_recommended {
    background: transparent;
    border-left: 4px solid #2B3A3F;
    color: #2B3A3F;
}

/* Ampel-Buttons (Edit-Form für KI-Eignung) */
.ki-ampel-group {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
    margin-top: 8px;
}
.ki-ampel-option {
    display: block;
    padding: 12px;
    border: 2px solid var(--color-border);
    border-radius: 6px;
    cursor: pointer;
    background: white;
    transition: all 0.15s ease;
}
.ki-ampel-option input[type="radio"] {
    position: absolute;
    opacity: 0;
}
.ki-ampel-option:hover {
    border-color: var(--color-accent);
}
.ki-ampel-option.selected.green {
    border-color: #2E7D32;
    background: #E8F5E9;
}
.ki-ampel-option.selected.yellow {
    border-color: #FFA726;
    background: #FFF8E1;
}
.ki-ampel-option.selected.red {
    border-color: #C62828;
    background: #FFEBEE;
}
.ki-ampel-label {
    font-weight: 600;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.ki-ampel-example {
    font-size: 12px;
    color: var(--color-muted);
    line-height: 1.4;
}
.ki-ampel-hint {
    font-size: 12px;
    color: #BF6F00;
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    font-style: italic;
}

/* KI-Frage-Block im Edit-Form */
.ki-question-block {
    margin-bottom: 24px;
    padding: 16px;
    background: var(--color-white);
    border-radius: 6px;
    border: 1px solid var(--color-border);
}
.ki-question-text {
    font-weight: 500;
    margin-bottom: 4px;
    color: var(--color-primary);
}
.ki-question-hint {
    font-size: 13px;
    color: var(--color-muted);
    margin-bottom: 8px;
}
.ki-question-category {
    display: inline-block;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 2px 6px;
    border-radius: 3px;
    margin-right: 8px;
    color: white;
}
.ki-question-category.filter { background: #C62828; }
.ki-question-category.core { background: var(--color-primary); }
.ki-question-category.risk { background: #FFA726; color: #5C3F00; }

/* Read-only KI-Eignungsblock auf Assessment-Detail */
.ki-readonly-row {
    display: grid;
    grid-template-columns: 32px 1fr;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
    align-items: start;
}
.ki-readonly-row:last-child {
    border-bottom: none;
}
.ki-readonly-icon {
    padding-top: 2px;  /* Pfeil mit Frage-Top aligned */
}
.ki-readonly-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.ki-readonly-question {
    font-size: 14px;
    /*font-style: italic;*/
}
.ki-readonly-answer {
    font-size: 14px;
    font-weight: bold;
    color: var(--color-primary);
}
.ki-readonly-hint {
    font-size: 13px;
    color: var(--color-error);
    margin-top: 2px;

}
