/* =========================================================================
   iBE Security Awareness – Corporate Design
   Hausfarben: Dunkelblau #00324B · Blaugrau #9AAEB7
   Produktfarben: Blau #5985C2 · Orange #E0822D · Grün #9DC042
   Konsistent zum iBE Portal (CT201)
   ========================================================================= */

:root {
    --ibe-dark:        #00324B;
    --ibe-dark-hover:  #004a6e;
    --ibe-gray:        #9AAEB7;
    --ibe-blue:        #5985C2;
    --ibe-blue-hover:  #4a73b0;
    --ibe-orange:      #E0822D;
    --ibe-green:       #9DC042;
    --ibe-green-dark:  #5a7a1f;
    --ibe-red:         #C0392B;

    --ibe-light-bg:    #f4f7f9;
    --ibe-border:      #e0e7eb;
    --ibe-card-shadow: 0 2px 8px rgba(0, 50, 75, 0.08);
    --ibe-card-shadow-hover: 0 8px 26px rgba(0, 50, 75, 0.14);

    --sidebar-width: 250px;
    --radius:   8px;
    --radius-lg: 14px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: 'Roboto', sans-serif;
    font-weight: 300;
    background: var(--ibe-light-bg);
    color: #2b3a42;
    margin: 0;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { font-weight: 700; color: var(--ibe-dark); margin: 0; }
a { color: var(--ibe-blue); }

/* ============ SIDEBAR ============ */
.sidebar {
    position: fixed;
    top: 0; left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--ibe-dark);
    color: #fff;
    display: flex;
    flex-direction: column;
    z-index: 100;
    transition: transform 0.3s;
}
.sidebar-logo {
    padding: 22px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: inherit;
}
.sidebar-logo img { height: 34px; width: auto; }
.sidebar-logo .app-title {
    font-size: 12.5px; font-weight: 500;
    color: var(--ibe-gray); line-height: 1.35;
}
.sidebar-logo .app-title strong { color: #fff; font-weight: 700; display: block; font-size: 13.5px; }

.sidebar-nav { flex: 1; padding: 14px 0; overflow-y: auto; }
.sidebar-nav a {
    display: flex; align-items: center; gap: 12px;
    padding: 11px 24px;
    color: rgba(255,255,255,0.75);
    text-decoration: none; font-size: 14px; font-weight: 400;
    transition: all 0.18s;
    border-left: 3px solid transparent;
}
.sidebar-nav a:hover { background: rgba(255,255,255,0.08); color: #fff; }
.sidebar-nav a.active {
    background: rgba(255,255,255,0.1); color: #fff;
    border-left-color: var(--ibe-orange); font-weight: 500;
}
.sidebar-nav a .nav-icon { width: 20px; text-align: center; font-size: 16px; flex-shrink: 0; }
.sidebar-nav .nav-section {
    padding: 18px 24px 8px;
    font-size: 11px; text-transform: uppercase;
    letter-spacing: 1px; color: rgba(255,255,255,0.4); font-weight: 500;
}

.sidebar-footer {
    padding: 14px 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 12px; color: rgba(255,255,255,0.5);
}
.sidebar-footer .user-info {
    display: flex; align-items: center; gap: 10px;
    margin-bottom: 10px; color: rgba(255,255,255,0.85); font-size: 13px;
}
.sidebar-footer .user-avatar {
    width: 34px; height: 34px; border-radius: 50%;
    background: var(--ibe-blue);
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 14px; color: #fff; flex-shrink: 0;
}
.sidebar-footer .footer-user { color: rgba(255,255,255,0.9); }
.sidebar-footer .logout-link { color: rgba(255,255,255,0.55); font-size: 13px; text-decoration: none; }
.sidebar-footer .logout-link:hover { color: #fff; }

/* ============ MAIN LAYOUT ============ */
.main-content { margin-left: var(--sidebar-width); min-height: 100vh; }

.topbar {
    background: #fff;
    border-bottom: 1px solid var(--ibe-border);
    padding: 14px 32px;
    display: flex; align-items: center; justify-content: space-between;
    position: sticky; top: 0; z-index: 50;
}
.topbar h1 { font-size: 20px; font-weight: 500; color: var(--ibe-dark); margin: 0; }
.topbar-actions { display: flex; gap: 12px; align-items: center; }

.page-body { padding: 28px 32px; max-width: 1180px; margin: 0 auto; }

.menu-toggle {
    display: none; background: none; border: none;
    color: var(--ibe-dark); cursor: pointer; padding: 4px;
}

.sidebar-backdrop { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.45); z-index: 99; }
body.sidebar-open .sidebar-backdrop { display: block; }
body.sidebar-open { overflow: hidden; }

/* ============ FLASH ============ */
.flash-messages { max-width: 1180px; margin: 16px auto 0; padding: 0 32px; }
.alert {
    padding: 12px 18px; border-radius: var(--radius); font-size: 14px;
    margin-bottom: 12px; display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.alert-success { background: rgba(157,192,66,0.12); color: #4a6a1a; border: 1px solid rgba(157,192,66,0.35); }
.alert-danger  { background: rgba(192,57,43,0.08); color: #a5311f; border: 1px solid rgba(192,57,43,0.25); }
.alert-warning { background: rgba(224,130,45,0.1); color: #8a5a1e; border: 1px solid rgba(224,130,45,0.3); }
.alert-info    { background: rgba(89,133,194,0.1); color: #3a5a8a; border: 1px solid rgba(89,133,194,0.28); }
.alert-close { background: none; border: none; font-size: 20px; line-height: 1; cursor: pointer; color: inherit; opacity: 0.6; }
.alert-close:hover { opacity: 1; }

/* ============ CARDS ============ */
.card {
    background: #fff; border-radius: var(--radius);
    box-shadow: var(--ibe-card-shadow);
    border: 1px solid var(--ibe-border);
    margin-bottom: 22px; padding: 24px;
}
.card-title { font-size: 16px; font-weight: 700; color: var(--ibe-dark); margin: 0 0 16px; }

/* ============ BUTTONS ============ */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 11px 22px; border-radius: var(--radius);
    font-size: 14.5px; font-weight: 500;
    font-family: 'Roboto', sans-serif; cursor: pointer;
    border: none; text-decoration: none;
    transition: all 0.18s; white-space: nowrap;
}
.btn-primary   { background: var(--ibe-blue); color: #fff; box-shadow: 0 2px 8px rgba(89,133,194,0.32); }
.btn-primary:hover { background: var(--ibe-blue-hover); box-shadow: 0 4px 14px rgba(89,133,194,0.42); }
.btn-dark      { background: var(--ibe-dark); color: #fff; }
.btn-dark:hover { background: var(--ibe-dark-hover); }
.btn-success   { background: var(--ibe-green); color: #fff; box-shadow: 0 2px 8px rgba(157,192,66,0.35); }
.btn-success:hover { background: #87a836; }
.btn-secondary { background: #fff; color: var(--ibe-dark); border: 1px solid var(--ibe-border); }
.btn-secondary:hover { background: var(--ibe-light-bg); border-color: var(--ibe-gray); }
.btn-lg { padding: 14px 30px; font-size: 16px; }
.btn-sm { padding: 7px 14px; font-size: 13px; }
.btn-block { width: 100%; }

/* ============ BADGES ============ */
.badge {
    display: inline-block; padding: 3px 11px;
    border-radius: 12px; font-size: 12px; font-weight: 500;
}
.badge-success   { background: rgba(157,192,66,0.16); color: var(--ibe-green-dark); }
.badge-info      { background: rgba(89,133,194,0.14); color: #3a5a8a; }
.badge-available { background: rgba(224,130,45,0.14); color: #b3631c; }
.badge-locked    { background: rgba(154,174,183,0.22); color: #5a6b73; }
.badge-gray      { background: rgba(154,174,183,0.22); color: #5a6b73; }

/* ============ FORMS ============ */
.form-group { margin-bottom: 16px; }
.form-label, .form-group label {
    display: block; font-size: 13px; font-weight: 500;
    color: var(--ibe-dark); margin-bottom: 6px;
}
.form-control, .form-input {
    width: 100%; padding: 10px 14px;
    border: 1px solid var(--ibe-border); border-radius: 6px;
    font-size: 14px; font-family: 'Roboto', sans-serif;
    background: #fff; color: #333; transition: border-color 0.2s, box-shadow 0.2s;
}
.form-control:focus, .form-input:focus {
    outline: none; border-color: var(--ibe-blue);
    box-shadow: 0 0 0 3px rgba(89,133,194,0.15);
}

/* =========================================================================
   DASHBOARD
   ========================================================================= */
.hero {
    background: linear-gradient(120deg, var(--ibe-dark) 0%, #014a6e 100%);
    border-radius: var(--radius-lg);
    padding: 34px 36px;
    color: #fff;
    position: relative;
    overflow: hidden;
    margin-bottom: 24px;
}
.hero::after {
    content: '';
    position: absolute; right: -40px; top: -40px;
    width: 240px; height: 240px;
    background: radial-gradient(circle, rgba(157,192,66,0.22), transparent 70%);
    pointer-events: none;
}
.hero h1 { color: #fff; font-size: 26px; margin: 0 0 8px; position: relative; }
.hero p { margin: 0; font-size: 15px; color: rgba(255,255,255,0.82); font-weight: 300; max-width: 640px; position: relative; }
.hero-shield { position: absolute; right: 30px; bottom: -14px; font-size: 110px; opacity: 0.13; }

.stats-grid {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 24px;
}
.stat-card {
    background: #fff; border: 1px solid var(--ibe-border); border-radius: var(--radius);
    box-shadow: var(--ibe-card-shadow); padding: 20px;
    display: flex; flex-direction: column; align-items: flex-start; gap: 4px;
    position: relative; overflow: hidden;
}
.stat-card::before {
    content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--ibe-blue);
}
.stat-card.sc-green::before  { background: var(--ibe-green); }
.stat-card.sc-orange::before { background: var(--ibe-orange); }
.stat-card.sc-dark::before   { background: var(--ibe-dark); }
.stat-icon { font-size: 22px; }
.stat-value { font-size: 30px; font-weight: 700; color: var(--ibe-dark); line-height: 1.1; }
.stat-label { font-size: 13px; color: #7a8a92; font-weight: 400; }

/* Nächstes-Modul-Karte */
.next-module-card {
    display: flex; align-items: center; gap: 24px;
    background: #fff; border: 1px solid var(--ibe-border);
    border-left: 5px solid var(--ibe-orange);
    border-radius: var(--radius); box-shadow: var(--ibe-card-shadow);
    padding: 24px 28px; margin-bottom: 24px;
}
.next-module-icon {
    width: 76px; height: 76px; border-radius: 16px; flex-shrink: 0;
    background: rgba(224,130,45,0.12);
    display: flex; align-items: center; justify-content: center; font-size: 38px;
}
.next-module-info { flex: 1; min-width: 0; }
.next-module-kicker { font-size: 12px; text-transform: uppercase; letter-spacing: 1px; color: var(--ibe-orange); font-weight: 700; }
.next-module-title { font-size: 19px; font-weight: 700; color: var(--ibe-dark); margin: 4px 0 6px; }
.next-module-desc { font-size: 14px; color: #6b7a82; margin: 0 0 14px; line-height: 1.5; }

/* =========================================================================
   MODUL-GRID (Lernmodule)
   ========================================================================= */
.module-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 20px;
}
.module-card {
    display: flex; flex-direction: column;
    background: #fff; border: 1px solid var(--ibe-border); border-radius: var(--radius-lg);
    box-shadow: var(--ibe-card-shadow); overflow: hidden;
    text-decoration: none; color: inherit; transition: all 0.2s; position: relative;
}
.module-card:hover { transform: translateY(-3px); box-shadow: var(--ibe-card-shadow-hover); border-color: var(--ibe-blue); }
.module-card-banner {
    height: 88px; display: flex; align-items: center; justify-content: center;
    font-size: 44px; position: relative;
    background: linear-gradient(135deg, var(--ibe-dark), #014a6e);
}
.module-card.mc-passed   .module-card-banner { background: linear-gradient(135deg, #6f9a1e, var(--ibe-green)); }
.module-card.mc-locked   .module-card-banner { background: linear-gradient(135deg, #7a8a92, var(--ibe-gray)); filter: grayscale(0.3); }
.module-card-num {
    position: absolute; top: 10px; left: 12px;
    font-size: 12px; font-weight: 700; color: rgba(255,255,255,0.85);
    background: rgba(0,0,0,0.18); padding: 2px 9px; border-radius: 10px;
}
.module-card-status { position: absolute; top: 10px; right: 12px; }
.module-card-body { padding: 18px 20px; flex: 1; display: flex; flex-direction: column; }
.module-card-body h3 { font-size: 16px; font-weight: 700; color: var(--ibe-dark); margin: 0 0 6px; }
.module-card-body p { font-size: 13px; color: #6b7a82; margin: 0 0 14px; line-height: 1.5; flex: 1; }
.module-card-meta {
    display: flex; align-items: center; justify-content: space-between;
    font-size: 12.5px; color: #7a8a92; border-top: 1px solid var(--ibe-border); padding-top: 12px;
}
.module-progress-track { height: 6px; background: var(--ibe-light-bg); border-radius: 4px; overflow: hidden; margin-top: 4px; width: 100%; }
.module-progress-fill { height: 100%; background: var(--ibe-green); border-radius: 4px; }

/* =========================================================================
   LERNSEITE (Modul-Detail)
   ========================================================================= */
.learn-hero {
    background: linear-gradient(120deg, var(--ibe-dark) 0%, #014a6e 100%);
    color: #fff; border-radius: var(--radius-lg);
    padding: 30px 34px; margin-bottom: 24px; position: relative; overflow: hidden;
}
.learn-hero .lh-icon { font-size: 50px; margin-bottom: 10px; display: block; }
.learn-hero h1 { color: #fff; font-size: 25px; margin: 0 0 8px; }
.learn-hero p { color: rgba(255,255,255,0.85); font-size: 15px; margin: 0; max-width: 680px; line-height: 1.55; }
.learn-hero-meta { display: flex; gap: 22px; margin-top: 18px; flex-wrap: wrap; }
.learn-hero-meta span { font-size: 13px; color: rgba(255,255,255,0.8); display: flex; align-items: center; gap: 6px; }

.back-link { display: inline-flex; align-items: center; gap: 6px; color: var(--ibe-blue); text-decoration: none; font-size: 14px; margin-bottom: 16px; }
.back-link:hover { text-decoration: underline; }

/* Lektion */
.lesson {
    background: #fff; border: 1px solid var(--ibe-border); border-radius: var(--radius-lg);
    box-shadow: var(--ibe-card-shadow); padding: 28px 32px; margin-bottom: 22px;
}
.lesson-head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.lesson-num {
    width: 38px; height: 38px; flex-shrink: 0; border-radius: 50%;
    background: var(--ibe-blue); color: #fff; font-weight: 700; font-size: 16px;
    display: flex; align-items: center; justify-content: center;
}
.lesson-head h2 { font-size: 20px; font-weight: 700; color: var(--ibe-dark); margin: 0; }
.lesson-body { font-size: 15px; line-height: 1.72; color: #3a4a52; font-weight: 300; }
.lesson-body p { margin: 0 0 14px; }
.lesson-body strong { font-weight: 700; color: var(--ibe-dark); }
.lesson-body ul { margin: 0 0 14px; padding-left: 0; list-style: none; }
.lesson-body ul li { position: relative; padding: 6px 0 6px 30px; line-height: 1.6; }
.lesson-body ul li::before {
    content: '✓'; position: absolute; left: 0; top: 6px;
    color: var(--ibe-green); font-weight: 700;
    background: rgba(157,192,66,0.15); width: 20px; height: 20px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; font-size: 12px;
}

/* Info-/Warn-/Tipp-Boxen */
.callout { border-radius: var(--radius); padding: 16px 20px 16px 18px; margin: 18px 0; display: flex; gap: 14px; font-size: 14px; line-height: 1.6; }
.callout .co-icon { font-size: 22px; flex-shrink: 0; line-height: 1.3; }
.callout strong { display: block; margin-bottom: 3px; }
.callout-warning { background: rgba(224,130,45,0.09); border-left: 4px solid var(--ibe-orange); color: #7a4a16; }
.callout-danger  { background: rgba(192,57,43,0.07);  border-left: 4px solid var(--ibe-red); color: #8c2b1f; }
.callout-tip     { background: rgba(157,192,66,0.1);  border-left: 4px solid var(--ibe-green); color: #46640f; }
.callout-info    { background: rgba(89,133,194,0.09); border-left: 4px solid var(--ibe-blue); color: #2f4f80; }

/* Beispielbild-Figur */
.example-figure { margin: 20px 0; border: 1px solid var(--ibe-border); border-radius: var(--radius); overflow: hidden; background: var(--ibe-light-bg); }
.example-figure .ef-media { display: block; width: 100%; }
.example-figure svg { display: block; width: 100%; height: auto; }
.example-figure figcaption {
    font-size: 12.5px; color: #6b7a82; padding: 10px 16px; background: #fff;
    border-top: 1px solid var(--ibe-border); display: flex; align-items: center; gap: 8px;
}
.example-figure figcaption::before { content: '🖼'; }

/* Erklärvideo-Bereich */
.video-block { margin: 20px 0; }
.video-frame {
    position: relative; border-radius: var(--radius-lg); overflow: hidden;
    background: #00141f; aspect-ratio: 16 / 9; border: 1px solid var(--ibe-border);
}
.video-frame iframe, .video-frame video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-poster {
    position: absolute; inset: 0; display: flex; flex-direction: column;
    align-items: center; justify-content: center; gap: 14px; cursor: pointer;
    background: linear-gradient(135deg, rgba(0,50,75,0.92), rgba(1,74,110,0.92)); color: #fff; text-align: center; padding: 20px;
}
.video-play {
    width: 70px; height: 70px; border-radius: 50%;
    background: var(--ibe-orange); display: flex; align-items: center; justify-content: center;
    box-shadow: 0 6px 20px rgba(224,130,45,0.5); transition: transform 0.2s;
}
.video-play::before { content: ''; border-style: solid; border-width: 12px 0 12px 20px; border-color: transparent transparent transparent #fff; margin-left: 5px; }
.video-poster:hover .video-play { transform: scale(1.08); }
.video-poster .vp-title { font-size: 16px; font-weight: 700; }
.video-poster .vp-sub { font-size: 13px; color: rgba(255,255,255,0.75); }
.video-caption { font-size: 12.5px; color: #6b7a82; margin-top: 8px; display: flex; align-items: center; gap: 8px; }
.video-caption::before { content: '🎬'; }

/* Quiz-CTA am Ende der Lernseite */
.quiz-cta {
    background: linear-gradient(120deg, #f0f6e8, #fff);
    border: 1px solid rgba(157,192,66,0.4); border-radius: var(--radius-lg);
    padding: 28px 32px; text-align: center; margin-top: 8px;
}
.quiz-cta h2 { font-size: 21px; margin: 0 0 8px; }
.quiz-cta p { color: #5a6b73; font-size: 14.5px; margin: 0 0 18px; }

/* =========================================================================
   QUIZ
   ========================================================================= */
.quiz-wrap { max-width: 760px; margin: 0 auto; }
.quiz-progress-bar { height: 8px; background: #e3eaef; border-radius: 6px; overflow: hidden; margin-bottom: 6px; }
.quiz-progress-fill { height: 100%; background: linear-gradient(90deg, var(--ibe-blue), var(--ibe-green)); border-radius: 6px; transition: width 0.3s; }
.quiz-meta { display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px; font-size: 13px; color: #6b7a82; }
.quiz-meta-title { font-weight: 700; color: var(--ibe-dark); }

.question-card {
    background: #fff; border: 1px solid var(--ibe-border); border-radius: var(--radius-lg);
    box-shadow: var(--ibe-card-shadow); padding: 30px 32px;
}
.question-num { font-size: 12.5px; text-transform: uppercase; letter-spacing: 1px; color: var(--ibe-blue); font-weight: 700; margin: 0 0 8px; }
.question-text { font-size: 20px; font-weight: 700; color: var(--ibe-dark); line-height: 1.45; margin: 0 0 24px; }

.answers-grid { display: grid; gap: 12px; }
.answers-grid form { margin: 0; }
.answer-btn {
    width: 100%; display: flex; align-items: center; gap: 16px;
    padding: 16px 18px; background: #fff;
    border: 2px solid var(--ibe-border); border-radius: var(--radius);
    font-family: 'Roboto', sans-serif; font-size: 15px; color: #2b3a42;
    text-align: left; cursor: pointer; transition: all 0.15s;
}
.answer-btn:hover { border-color: var(--ibe-blue); background: rgba(89,133,194,0.05); transform: translateX(2px); }
.answer-btn:active { transform: scale(0.995); }
.answer-letter {
    width: 34px; height: 34px; flex-shrink: 0; border-radius: 8px;
    background: var(--ibe-light-bg); color: var(--ibe-dark);
    display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 15px;
    transition: all 0.15s;
}
.answer-btn:hover .answer-letter { background: var(--ibe-blue); color: #fff; }
.answer-text { flex: 1; line-height: 1.45; }

/* =========================================================================
   ERGEBNIS
   ========================================================================= */
.result-wrap { max-width: 620px; margin: 0 auto; text-align: center; }
.result-card { background: #fff; border: 1px solid var(--ibe-border); border-radius: var(--radius-lg); box-shadow: var(--ibe-card-shadow); padding: 40px 36px; }
.score-ring {
    width: 160px; height: 160px; border-radius: 50%; margin: 0 auto 22px;
    display: flex; align-items: center; justify-content: center; position: relative;
}
.score-ring .score-inner {
    width: 128px; height: 128px; border-radius: 50%; background: #fff;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.score-inner .score-pct { font-size: 38px; font-weight: 700; color: var(--ibe-dark); line-height: 1; }
.score-inner .score-cap { font-size: 12px; color: #7a8a92; text-transform: uppercase; letter-spacing: 1px; }
.result-headline { font-size: 24px; margin: 0 0 8px; }
.result-headline.passed { color: var(--ibe-green-dark); }
.result-headline.failed { color: var(--ibe-orange); }
.result-sub { font-size: 15px; color: #6b7a82; margin: 0 0 24px; }
.result-stats { display: flex; justify-content: center; gap: 32px; margin-bottom: 26px; }
.result-stat .rs-val { font-size: 24px; font-weight: 700; color: var(--ibe-dark); }
.result-stat .rs-lab { font-size: 12px; color: #7a8a92; }
.result-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.new-badge-banner { background: rgba(157,192,66,0.12); border: 1px dashed var(--ibe-green); border-radius: var(--radius); padding: 16px; margin-bottom: 22px; }
.new-badge-banner .nb-icons { font-size: 34px; }

/* =========================================================================
   RANGLISTE
   ========================================================================= */
.podium { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; align-items: end; margin-bottom: 26px; }
.podium-spot { background: #fff; border: 1px solid var(--ibe-border); border-radius: var(--radius-lg); box-shadow: var(--ibe-card-shadow); padding: 22px 16px; text-align: center; }
.podium-1 { border-top: 4px solid #f1c40f; transform: translateY(-12px); }
.podium-2 { border-top: 4px solid #b8c2c9; }
.podium-3 { border-top: 4px solid #cd7f32; }
.podium-medal { font-size: 34px; }
.podium-avatar { width: 54px; height: 54px; border-radius: 50%; background: var(--ibe-blue); color: #fff; font-weight: 700; font-size: 20px; display: flex; align-items: center; justify-content: center; margin: 6px auto 10px; }
.podium-name { font-weight: 700; color: var(--ibe-dark); font-size: 15px; }
.podium-pts { font-size: 22px; font-weight: 700; color: var(--ibe-blue); margin-top: 4px; }
.podium-sub { font-size: 12px; color: #7a8a92; }

/* =========================================================================
   BADGES / ABZEICHEN
   ========================================================================= */
.badges-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 14px; }
.badge-tile { background: #fff; border: 1px solid var(--ibe-border); border-radius: var(--radius); padding: 18px 12px; text-align: center; box-shadow: var(--ibe-card-shadow); }
.badge-tile .badge-icon { font-size: 36px; }
.badge-tile .badge-name { font-size: 12.5px; font-weight: 500; color: var(--ibe-dark); margin-top: 8px; line-height: 1.3; }

/* Aktivität / Modul-Liste (Dashboard) */
.module-list, .activity-list { list-style: none; margin: 0; padding: 0; }
.module-list-item, .activity-item {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 0; border-bottom: 1px solid var(--ibe-border); font-size: 14px;
}
.module-list-item:last-child, .activity-item:last-child { border-bottom: none; }
.module-list-item .module-icon { font-size: 20px; }
.module-list-item .module-title, .activity-item .activity-module { flex: 1; color: var(--ibe-dark); }
.module-score, .activity-score { font-weight: 700; color: var(--ibe-blue); }
.activity-date { font-size: 12px; color: #9aaeb7; }

/* =========================================================================
   ADMIN-TABELLEN (Bootstrap-Kompat-Layer)
   ========================================================================= */
.table, .data-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th, .data-table th {
    padding: 11px 14px; text-align: left; font-weight: 500; font-size: 12px;
    color: var(--ibe-dark); text-transform: uppercase; letter-spacing: 0.5px;
    border-bottom: 2px solid var(--ibe-border); background: var(--ibe-light-bg); white-space: nowrap;
}
.table td, .data-table td { padding: 11px 14px; border-bottom: 1px solid var(--ibe-border); vertical-align: middle; }
.table tbody tr:hover, .data-table tbody tr:hover { background: rgba(89,133,194,0.04); }

/* Bootstrap-ähnliche Hilfsklassen, damit Admin-Templates sauber aussehen */
.shadow-sm { box-shadow: var(--ibe-card-shadow) !important; }
.text-muted { color: #8a99a1 !important; }
.text-danger { color: var(--ibe-red) !important; }
.text-white { color: #fff !important; }
.fw-semibold { font-weight: 500; }
.fw-bold { font-weight: 700; }
.mb-0 { margin-bottom: 0 !important; }
.mb-2 { margin-bottom: 8px !important; }
.mb-3 { margin-bottom: 16px !important; }
.mb-4 { margin-bottom: 22px !important; }
.me-1 { margin-right: 4px; }
.me-2 { margin-right: 8px; }
.ms-1 { margin-left: 4px; }
.ms-2 { margin-left: 8px; }
.mt-2 { margin-top: 8px; }
.p-0 { padding: 0 !important; }
.py-2 { padding-top: 8px; padding-bottom: 8px; }
.py-3 { padding-top: 16px; padding-bottom: 16px; }
.p-4 { padding: 22px; }
.d-flex { display: flex; }
.d-inline { display: inline; }
.flex-grow-1 { flex: 1; }
.justify-content-between { justify-content: space-between; }
.align-items-center { align-items: center; }
.align-items-end { align-items: flex-end; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 16px; }
.text-center { text-align: center; }
.text-end { text-align: right; }
.h3 { font-size: 22px; font-weight: 700; }
.h5 { font-size: 17px; font-weight: 700; }
.fs-5 { font-size: 18px; }
.fs-6 { font-size: 15px; }
.small { font-size: 12.5px; }
.w-100 { width: 100%; }
.row { display: flex; flex-wrap: wrap; margin: 0 -8px; }
.row > [class*="col"] { padding: 0 8px; }
.g-3 > [class*="col"] { margin-bottom: 16px; }
.col { flex: 1; min-width: 0; }
.col-sm-4 { flex: 0 0 33.333%; max-width: 33.333%; }
.col-sm-6, .col-md-6 { flex: 0 0 50%; max-width: 50%; }
.col-md-3 { flex: 0 0 25%; max-width: 25%; }
.col-md-4 { flex: 0 0 33.333%; max-width: 33.333%; }
.card-header { padding: 16px 20px; border-bottom: 1px solid var(--ibe-border); margin: -24px -24px 18px; border-radius: var(--radius) var(--radius) 0 0; }
.card-body { padding: 0; }
.card-footer { padding: 14px 20px; border-top: 1px solid var(--ibe-border); margin: 18px -24px -24px; color: #8a99a1; }
.bg-secondary { background: var(--ibe-gray) !important; color: #fff; }
.bg-danger { background: var(--ibe-red) !important; color: #fff; }
.btn-outline-secondary { background: #fff; color: var(--ibe-dark); border: 1px solid var(--ibe-border); padding: 7px 14px; border-radius: 6px; font-size: 13px; text-decoration: none; display: inline-flex; align-items: center; cursor: pointer; }
.btn-outline-secondary:hover { background: var(--ibe-light-bg); }
.btn-outline-danger { background: #fff; color: var(--ibe-red); border: 1px solid rgba(192,57,43,0.4); padding: 7px 14px; border-radius: 6px; font-size: 13px; cursor: pointer; }
.btn-outline-danger:hover { background: rgba(192,57,43,0.06); }
.btn-outline-success { background: #fff; color: var(--ibe-green-dark); border: 1px solid rgba(157,192,66,0.5); padding: 7px 14px; border-radius: 6px; font-size: 13px; cursor: pointer; }
.btn-xs { padding: 4px 10px; font-size: 12px; }
.form-select, textarea.form-control { width: 100%; padding: 10px 14px; border: 1px solid var(--ibe-border); border-radius: 6px; font-size: 14px; font-family: 'Roboto', sans-serif; }
.form-check { display: flex; align-items: center; gap: 8px; }
.form-check-input { width: 16px; height: 16px; }
.form-check-label { font-weight: 500; }
.input-group { display: flex; align-items: stretch; margin-bottom: 8px; }
.input-group-text { display: flex; align-items: center; padding: 0 12px; background: var(--ibe-gray); color: #fff; border-radius: 6px 0 0 6px; font-weight: 700; }
.input-group .form-control { border-radius: 0 6px 6px 0; }
.progress { background: var(--ibe-light-bg); border-radius: 6px; overflow: hidden; }
.progress-bar { height: 100%; background: var(--ibe-green); }

/* KPI-Karten (Admin-Dashboard) */
.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 24px; }
.kpi { background: #fff; border: 1px solid var(--ibe-border); border-radius: var(--radius); box-shadow: var(--ibe-card-shadow); padding: 20px; position: relative; overflow: hidden; }
.kpi::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--ibe-blue); }
.kpi.k-green::before { background: var(--ibe-green); }
.kpi.k-orange::before { background: var(--ibe-orange); }
.kpi.k-dark::before { background: var(--ibe-dark); }
.kpi .kpi-val { font-size: 30px; font-weight: 700; color: var(--ibe-dark); }
.kpi .kpi-lab { font-size: 13px; color: #7a8a92; }

/* =========================================================================
   RESPONSIVE
   ========================================================================= */
@media (max-width: 980px) {
    .stats-grid, .kpi-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
    .sidebar { transform: translateX(-100%); width: 280px; box-shadow: 4px 0 20px rgba(0,0,0,0.25); }
    .sidebar.open { transform: translateX(0); }
    .main-content { margin-left: 0; }
    .menu-toggle { display: block; }
    .topbar { padding: 12px 16px; }
    .topbar h1 { font-size: 17px; }
    .page-body { padding: 16px 14px; }
    .flash-messages { padding: 0 14px; }
    .podium { grid-template-columns: 1fr; }
    .podium-1 { transform: none; }
    .next-module-card { flex-direction: column; text-align: center; }
    .lesson { padding: 20px 18px; }
    .learn-hero, .hero { padding: 24px 20px; }
    .result-stats { gap: 20px; }
    .col-sm-4, .col-sm-6, .col-md-3, .col-md-4, .col-md-6 { flex: 0 0 100%; max-width: 100%; }
}
@media (max-width: 520px) {
    .stats-grid, .kpi-grid { grid-template-columns: 1fr 1fr; }
    .module-grid { grid-template-columns: 1fr; }
    .question-text { font-size: 18px; }
    .question-card { padding: 22px 18px; }
}

@media print {
    .sidebar, .topbar, .menu-toggle, .sidebar-backdrop { display: none !important; }
    .main-content { margin-left: 0; }
}
