/* Mitgliederbereich – ergänzt style.css (Farben, Buttons, Karten kommen von dort) */

.mb-main { min-height: 70vh; background: var(--surface-alt); }
.mb-view { padding: 56px 0 80px; }
.mb-center { text-align: center; }
.mb-loading { color: var(--text); font-weight: 600; padding: 80px 0; }
.mb .card:hover { transform: none; box-shadow: none; }
.mb-linkbtn { background: none; border: 0; padding: 4px 0; font: inherit; font-size: 15px; font-weight: 600; color: var(--navy); cursor: pointer; border-bottom: 2px solid transparent; }
.mb-linkbtn:hover { border-bottom-color: var(--red); }

/* ---------- Anmeldung ---------- */
.mb-auth__card { max-width: 480px; margin: 0 auto; padding: 40px 36px; text-align: left; }
.mb-auth__card .h2 { margin: 6px 0 14px; font-size: clamp(28px, 7vw, 36px); }
.mb-form { display: grid; gap: 8px; margin-top: 24px; }
.mb-form label { font-size: 15px; font-weight: 700; color: var(--ink); margin-top: 8px; }
.mb-form input { width: 100%; font: inherit; font-size: 17px; color: var(--ink); padding: 13px 16px; border: 1px solid var(--line); border-radius: 12px; background: #FFFFFF; }
.mb-form input:focus { outline: 3px solid rgba(0, 87, 225, .25); border-color: var(--hover-blue); }
.mb-form__submit { margin-top: 18px; justify-content: center; width: 100%; }
.mb-form__submit:disabled { opacity: .6; cursor: wait; }
.mb-msg { margin: 8px 0 0; font-size: 15px; padding: 10px 14px; border-radius: 10px; background: var(--surface-alt); color: var(--ink); }
.mb-msg--fehler { background: rgba(214, 40, 40, .08); color: #8E1B1B; }
.mb-msg--ok { background: rgba(46, 125, 50, .1); color: #1F5A23; }
.mb-auth__alt { margin: 20px 0 0; font-size: 15px; }
.mb-auth__note { margin: 16px 0 0; padding-top: 16px; border-top: 1px solid var(--line); font-size: 14px; }

/* ---------- Kursübersicht ---------- */
.mb-overview .h2 { margin: 8px 0 12px; font-size: clamp(28px, 6vw, 44px); }
.mb-overview .lead { max-width: 720px; }
.mb-courses { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; margin-top: 36px; }
.mb-coursecard { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.mb-coursecard .h3 { margin-top: 6px; }
.mb-coursecard__meta { margin: 0; font-size: 15px; }
.mb-coursecard .btn { margin-top: 10px; }
.mb-progress { width: 100%; height: 8px; border-radius: 999px; background: var(--line); overflow: hidden; }
.mb-progress span { display: block; height: 100%; width: 0; background: var(--red); border-radius: inherit; transition: width .3s ease; }
.mb-progress__text { margin: 0; font-size: 14px; }

/* ---------- Kurs + Lektion ---------- */
.mb-course { padding-top: 32px; }
.mb-course__grid { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 32px; align-items: start; }
.mb-sidebar { position: sticky; top: 104px; max-height: calc(100vh - 124px); overflow: auto; background: #FFFFFF; border: 1px solid var(--line); border-radius: var(--radius-card); padding: 20px; }
.mb-back { display: inline-block; font-size: 14px; font-weight: 700; color: var(--navy); text-decoration: none; margin-bottom: 12px; }
.mb-back:hover { color: var(--hover-blue); }
.mb-sidebar__title { margin: 0 0 12px; font-weight: 800; color: var(--ink); line-height: 1.3; }
.mb-sidebar .mb-progress__text { margin: 8px 0 12px; }
.mb-toc summary { cursor: pointer; font-weight: 700; color: var(--ink); padding: 8px 0; border-top: 1px solid var(--line); }
.mb-toc__module { margin-top: 14px; }
.mb-toc__modtitle { margin: 0 0 6px; font-size: 13px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--red); line-height: 1.35; }
.mb-toc ol { margin: 0; padding: 0; list-style: none; }
.mb-toc li a { display: grid; grid-template-columns: 18px 1fr auto; gap: 10px; align-items: start; padding: 8px 8px; border-radius: 10px; text-decoration: none; color: var(--text); font-size: 15px; line-height: 1.35; }
.mb-toc li a:hover { background: var(--surface-alt); color: var(--ink); }
.mb-toc li.is-active a { background: rgba(5, 58, 96, .08); color: var(--ink); font-weight: 700; }
.mb-toc__state { width: 18px; height: 18px; margin-top: 1px; border: 2px solid var(--line); border-radius: 50%; }
.mb-toc li.is-done .mb-toc__state { border-color: #2E7D32; background: #2E7D32; position: relative; }
.mb-toc li.is-done .mb-toc__state::after { content: ""; position: absolute; left: 4px; top: 1px; width: 5px; height: 9px; border: solid #FFFFFF; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.mb-toc__dur { font-size: 13px; color: var(--text); white-space: nowrap; }

.mb-lesson { background: #FFFFFF; border: 1px solid var(--line); border-radius: var(--radius-card); padding: 24px; min-width: 0; }
.mb-video { position: relative; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: var(--navy); }
.mb-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.mb-lesson__meta { margin: 20px 0 6px; font-size: 13px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--red); }
.mb-lesson__title { font-size: clamp(24px, 4vw, 34px); }
.mb-lesson__actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 20px 0 8px; }
.mb-block { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--line); }
.mb-block .h3 { margin-bottom: 14px; }
.mb-files { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.mb-files a { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; text-decoration: none; color: var(--ink); font-weight: 600; font-size: 15px; line-height: 1.35; transition: border-color .2s ease, background .2s ease; }
.mb-files a:hover { border-color: var(--red); background: rgba(255, 49, 49, .04); }
.mb-files__icon { flex: 0 0 36px; height: 36px; border-radius: 10px; background: var(--navy); position: relative; }
.mb-files__icon::before { content: ""; position: absolute; left: 50%; top: 9px; width: 2px; height: 12px; margin-left: -1px; background: #FFFFFF; }
.mb-files__icon::after { content: ""; position: absolute; left: 50%; top: 14px; width: 8px; height: 8px; margin-left: -4px; border: solid #FFFFFF; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.mb-links { display: grid; gap: 8px; }
.mb-links a { font-weight: 600; text-decoration: none; }
.mb-links a:hover { text-decoration: underline; }
.mb-text { color: var(--text); }
.mb-text h3 { font-size: 19px; margin: 24px 0 10px; color: var(--ink); }
.mb-text h3:first-child { margin-top: 0; }
.mb-text p { margin: 0 0 12px; }
.mb-text .platzhalter { color: var(--hover-blue); font-style: italic; }
.mb-pager { display: flex; justify-content: space-between; gap: 16px; margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 15px; font-weight: 600; }
.mb-pager a { text-decoration: none; max-width: 48%; }
.mb-pager a:last-child { text-align: right; }

@media (max-width: 900px) {
  .mb-course__grid { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .mb-sidebar { position: static; max-height: none; order: 2; }
  .mb-lesson { order: 1; }
  .mb-courses { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
  .mb-view { padding: 32px 0 56px; }
  .mb-auth__card { padding: 28px 20px; }
  .mb-lesson { padding: 14px; border-radius: 12px; }
  .mb-pager { flex-direction: column; }
  .mb-pager a { max-width: none; }
  .mb-pager a:last-child { text-align: left; }
}
