/* Mrs. Property Kursbereich
   Farben und Schriften aus kunden/maike-kipker/marke/design-system/colors_and_type.css */
:root {
  --altrosa: #f4e1d9;
  --saphir: #34517a;
  --hellgrau: #e3e3e3;
  --beere: #a33e6b;
  --kohle: #373c3c;
  --senf: #efdd4f;
  --creme: #fbf3ee;
  --papier: #fffaf7;
  --saphir-30: color-mix(in srgb, var(--saphir) 30%, white);
  --linie: color-mix(in srgb, var(--saphir) 28%, transparent);
  --linie-hell: color-mix(in srgb, var(--altrosa) 18%, transparent);
  --text-leise: color-mix(in srgb, var(--kohle) 68%, var(--altrosa));
  --erfolg: #4f7d5b;
  --font-display: 'Tenor Sans', Georgia, serif;
  --font-text: 'Raleway', 'Helvetica Neue', Arial, sans-serif;
  --easing: cubic-bezier(.2, .7, .2, 1);
  --sidebar: 300px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  /* Seitenhintergrund ist das helle Creme, Altrosa bleibt für Flächen und Akzente. */
  margin: 0; background: var(--creme); color: var(--kohle);
  font-family: var(--font-text); font-size: 16px; line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; }
a { color: var(--saphir); }
button, input { font: inherit; }
:focus-visible { outline: 2px solid var(--beere); outline-offset: 2px; }

.eyebrow {
  font-family: var(--font-text); font-weight: 500; font-size: 12px; text-transform: uppercase;
  letter-spacing: .2em; color: var(--beere); margin: 0 0 8px;
}
.h1 { font-family: var(--font-display); font-weight: 400; color: var(--saphir); font-size: clamp(30px, 4.6vw, 46px); line-height: 1.1; margin: 0 0 14px; letter-spacing: -.01em; }
.h2 { font-family: var(--font-display); font-weight: 400; color: var(--saphir); font-size: clamp(22px, 2.6vw, 28px); line-height: 1.2; margin: 0 0 12px; }
.lead { font-size: 18px; color: var(--kohle); margin: 0 0 8px; max-width: 60ch; }
.leise { color: var(--text-leise); font-size: 14px; }
.mark { background: linear-gradient(transparent 12%, var(--senf) 12%, var(--senf) 88%, transparent 88%); padding: 0 .2em; }

/* Buttons: eckig, Versalien, gesperrt */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  border: 1.5px solid var(--saphir); background: transparent; color: var(--saphir);
  padding: 13px 22px; font-size: 13px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
  text-decoration: none; cursor: pointer; border-radius: 0; transition: background .2s var(--easing), color .2s var(--easing), transform .1s;
  min-height: 48px;
}
.btn:hover { background: var(--saphir); color: var(--altrosa); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .55; cursor: default; }
.btn-voll { background: var(--beere); border-color: var(--beere); color: var(--altrosa); }
.btn-voll:hover { background: color-mix(in srgb, var(--beere) 86%, black); border-color: color-mix(in srgb, var(--beere) 86%, black); color: var(--altrosa); }
.btn-senf { background: var(--senf); border-color: var(--senf); color: var(--saphir); }
.btn-senf:hover { background: color-mix(in srgb, var(--senf) 88%, black); border-color: color-mix(in srgb, var(--senf) 88%, black); color: var(--saphir); }
.btn-hell { border-color: var(--altrosa); color: var(--altrosa); }
.btn-hell:hover { background: var(--altrosa); color: var(--saphir); }
.btn-klein { min-height: 38px; padding: 8px 14px; font-size: 11.5px; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--saphir); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; font-size: 14px; }
.icon { width: 18px; height: 18px; flex-shrink: 0; stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

/* Laden */
.laden-voll { min-height: 100vh; display: grid; place-items: center; }
.laden-punkt { width: 36px; height: 36px; border: 1.5px solid var(--saphir); border-right-color: transparent; animation: dreh 0.9s linear infinite; }
@keyframes dreh { to { transform: rotate(360deg); } }
.skelett { background: linear-gradient(90deg, var(--creme), var(--papier), var(--creme)); background-size: 200% 100%; animation: glanz 1.4s infinite; height: 16px; margin: 10px 0; }
@keyframes glanz { to { background-position: -200% 0; } }

/* ---------- Anmeldung ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1fr; }
.auth-marke {
  background: var(--saphir); color: var(--altrosa); padding: 28px 20px 34px; position: relative; overflow: hidden;
}
.auth-marke::before, .auth-marke::after { content: ''; position: absolute; border: 1px solid var(--linie-hell); pointer-events: none; }
.auth-marke::before { width: 70%; height: 140%; right: -20%; top: -30%; }
.auth-marke::after { width: 40%; height: 60%; right: 8%; bottom: -25%; border-color: color-mix(in srgb, var(--senf) 35%, transparent); }
.marke { display: flex; align-items: center; gap: 12px; position: relative; }
.marke img { width: 34px; filter: brightness(0) invert(92%) sepia(12%) saturate(300%) hue-rotate(320deg); }
.marke-name { font-family: var(--font-display); font-size: 21px; line-height: 1; color: var(--altrosa); }
.marke-zusatz { font-size: 10px; letter-spacing: .24em; text-transform: uppercase; color: var(--senf); margin-top: 4px; }
.auth-claim { position: relative; margin-top: 30px; }
.auth-claim h1 { font-family: var(--font-display); font-weight: 400; font-size: clamp(28px, 5vw, 50px); line-height: 1.1; margin: 0 0 12px; color: var(--altrosa); max-width: 14ch; }
.auth-claim p { margin: 0; color: color-mix(in srgb, var(--altrosa) 80%, transparent); max-width: 36ch; }
.auth-form { padding: 34px 20px 48px; display: flex; align-items: flex-start; justify-content: center; }
.auth-karte { width: 100%; max-width: 420px; }
.feld { display: block; margin: 0 0 18px; }
.feld span { display: block; font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--saphir); margin-bottom: 6px; }
.feld input {
  width: 100%; min-height: 50px; padding: 12px 14px; border: 1.5px solid var(--linie); background: var(--papier);
  color: var(--kohle); border-radius: 0; font-size: 16px; transition: border-color .2s;
}
.feld input:focus, .feld select:focus, .feld textarea:focus { border-color: var(--saphir); outline: none; }
.feld select, .feld textarea {
  width: 100%; padding: 12px 14px; border: 1.5px solid var(--linie); background: var(--papier);
  color: var(--kohle); border-radius: 0; font-size: 16px; font-family: var(--font-text);
}
.feld select { min-height: 50px; appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--saphir) 50%), linear-gradient(135deg, var(--saphir) 50%, transparent 50%); background-position: calc(100% - 19px) 22px, calc(100% - 13px) 22px; background-size: 6px 6px; background-repeat: no-repeat; }
.feld textarea { min-height: 120px; line-height: 1.5; resize: vertical; }
.feld-reihe { display: grid; gap: 0 14px; grid-template-columns: 1fr; }
@media (min-width: 700px) { .feld-reihe { grid-template-columns: 1fr 1fr 1fr; } }
.hinweis { padding: 12px 14px; font-size: 14px; margin: 0 0 18px; border-left: 3px solid var(--beere); background: var(--papier); }
.hinweis.ok { border-left-color: var(--erfolg); }
.auth-links { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 18px; flex-wrap: wrap; }

@media (min-width: 900px) {
  .auth { grid-template-columns: minmax(360px, 46%) 1fr; }
  .auth-marke { padding: 48px 56px; display: flex; flex-direction: column; justify-content: space-between; }
  .auth-claim { margin-top: 0; padding-bottom: 40px; }
  .auth-form { align-items: center; padding: 48px; }
}

/* ---------- App-Rahmen ---------- */
.rahmen { min-height: 100vh; }
.topbar {
  position: sticky; top: 0; z-index: 30; background: var(--saphir); color: var(--altrosa);
  display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; padding-top: max(12px, env(safe-area-inset-top));
}
.topbar .marke img { width: 26px; }
.topbar .marke-name { font-size: 17px; }
.menu-btn { background: none; border: 1px solid var(--linie-hell); color: var(--altrosa); width: 44px; height: 44px; display: grid; place-items: center; cursor: pointer; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: min(86vw, var(--sidebar)); background: var(--saphir); color: var(--altrosa);
  z-index: 50; transform: translateX(-102%); transition: transform .28s var(--easing); display: flex; flex-direction: column;
  padding: 24px 20px; overflow-y: auto;
}
.sidebar.offen { transform: none; }
.schleier { position: fixed; inset: 0; background: rgba(31, 35, 38, .45); z-index: 40; opacity: 0; pointer-events: none; transition: opacity .25s; }
.schleier.offen { opacity: 1; pointer-events: auto; }
.sb-abschnitt { margin-top: 26px; }
.sb-titel { font-size: 10px; letter-spacing: .24em; text-transform: uppercase; color: var(--senf); margin: 0 0 10px; }
.sb-fortschritt-zahl { font-family: var(--font-display); font-size: 30px; line-height: 1; }
.balken { height: 4px; background: var(--linie-hell); margin: 10px 0 6px; overflow: hidden; }
.balken > div { height: 100%; background: var(--senf); transition: width .5s var(--easing); }
.balken.hell { background: color-mix(in srgb, var(--saphir) 14%, transparent); }
.balken.hell > div { background: var(--beere); }
.sb-nav { list-style: none; margin: 0; padding: 0; }
.sb-nav a, .sb-nav button {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; text-align: left; background: none; border: 0;
  border-left: 2px solid transparent; color: color-mix(in srgb, var(--altrosa) 82%, transparent); text-decoration: none; font-size: 13.5px; cursor: pointer; line-height: 1.35;
}
.sb-nav a:hover, .sb-nav button:hover { color: var(--altrosa); background: color-mix(in srgb, var(--altrosa) 7%, transparent); }
.sb-nav a.aktiv { border-left-color: var(--senf); color: var(--altrosa); background: color-mix(in srgb, var(--altrosa) 8%, transparent); }
.sb-nav .klein { margin-left: auto; font-size: 11px; color: color-mix(in srgb, var(--altrosa) 60%, transparent); white-space: nowrap; }
.sb-fuss { margin-top: auto; padding-top: 24px; border-top: 1px solid var(--linie-hell); }
.sb-person { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.avatar { width: 38px; height: 38px; border-radius: 999px; background: var(--altrosa); color: var(--saphir); display: grid; place-items: center; font-family: var(--font-display); font-size: 17px; flex-shrink: 0; }
.sb-person .name { font-size: 14px; }
.sb-person .kurs { font-size: 10px; letter-spacing: .18em; text-transform: uppercase; color: var(--senf); }

.inhalt { padding: 24px 16px 96px; max-width: 980px; margin: 0 auto; }

@media (min-width: 1000px) {
  .topbar, .schleier, #menu-zu { display: none; }
  .sidebar { transform: none; width: var(--sidebar); padding: 32px 26px; }
  .rahmen { padding-left: var(--sidebar); }
  .inhalt { padding: 48px 56px 96px; }
}

.admin-banner {
  background: var(--senf); color: var(--saphir); padding: 10px 16px; display: flex; gap: 12px; align-items: center; justify-content: space-between;
  font-size: 14px; position: sticky; top: 0; z-index: 25; flex-wrap: wrap;
}
@media (max-width: 999px) { .admin-banner { top: 68px; } }

/* ---------- Übersicht ---------- */
.kopf { margin-bottom: 28px; }
.kacheln { display: grid; grid-template-columns: 1fr; gap: 16px; margin: 0 0 36px; }
@media (min-width: 760px) { .kacheln { grid-template-columns: 1.35fr 1fr; } }
.kachel { background: var(--papier); border: 1px solid var(--linie); padding: 22px; position: relative; box-shadow: 0 1px 2px rgba(52, 81, 122, .05); }
.kachel.dunkel { background: var(--saphir); color: var(--altrosa); border-color: var(--saphir); }
.kachel.dunkel .eyebrow { color: var(--senf); }
.kachel.dunkel .h2 { color: var(--altrosa); }
.kachel .ecke { position: absolute; right: 14px; top: 14px; width: 26px; height: 26px; border-top: 1px solid currentColor; border-right: 1px solid currentColor; opacity: .35; }
.fortschritt-zahl { font-family: var(--font-display); font-size: 48px; line-height: 1; color: var(--saphir); }
.kachel .aktionen { margin-top: 18px; display: flex; gap: 10px; flex-wrap: wrap; }

.hinweis-karte { background: var(--papier); border: 1.5px solid var(--beere); padding: 18px 20px; margin: 0 0 28px; display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.hinweis-karte p { margin: 0; max-width: 60ch; }

.module { display: grid; gap: 12px; }
.modul { background: var(--papier); border: 1px solid var(--linie); box-shadow: 0 1px 2px rgba(52, 81, 122, .05); }
.modul > summary {
  list-style: none; cursor: pointer; padding: 18px 20px; display: grid; grid-template-columns: 1fr auto; gap: 6px 16px; align-items: center;
}
.modul > summary::-webkit-details-marker { display: none; }
.modul-titel { font-family: var(--font-display); font-size: 20px; color: var(--saphir); line-height: 1.25; }
.modul-meta { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--text-leise); white-space: nowrap; }
.modul-meta .pfeil { transition: transform .2s var(--easing); }
.modul[open] .modul-meta .pfeil { transform: rotate(180deg); }
.modul .balken { grid-column: 1 / -1; margin: 4px 0 0; }
.lektionen { list-style: none; margin: 0; padding: 0 0 8px; border-top: 1px solid var(--linie); }
.lektion-zeile { display: flex; gap: 14px; align-items: center; padding: 12px 20px; text-decoration: none; color: var(--kohle); border-bottom: 1px solid color-mix(in srgb, var(--saphir) 8%, transparent); }
.lektion-zeile:last-child { border-bottom: 0; }
a.lektion-zeile:hover { background: color-mix(in srgb, var(--altrosa) 60%, transparent); }
.lektion-zeile .status { width: 32px; height: 32px; border: 1.5px solid var(--linie); display: grid; place-items: center; color: var(--saphir); flex-shrink: 0; }
.lektion-zeile.erledigt .status { background: var(--beere); border-color: var(--beere); color: var(--altrosa); }
.lektion-zeile.gesperrt { color: var(--text-leise); }
.lektion-zeile.gesperrt .status { color: var(--text-leise); border-style: dashed; }
.lektion-zeile .titel { font-size: 15px; line-height: 1.35; }
.lektion-zeile .meta { font-size: 12.5px; color: var(--text-leise); margin-top: 2px; }

/* ---------- Lektion ---------- */
.zurueck { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; text-decoration: none; margin-bottom: 22px; color: var(--saphir); }
.video { position: relative; width: 100%; aspect-ratio: 16 / 9; background: var(--saphir); margin: 8px 0 26px; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.prosa { background: var(--papier); border: 1px solid var(--linie); box-shadow: 0 1px 2px rgba(52, 81, 122, .05); padding: 22px 20px; margin-bottom: 24px; font-size: 16.5px; line-height: 1.7; overflow-wrap: anywhere; }
@media (min-width: 760px) { .prosa { padding: 30px 34px; } }
.prosa p { margin: 0 0 12px; }
.prosa p:last-child { margin-bottom: 0; }
.prosa ul { margin: 0 0 14px; padding-left: 20px; }
.prosa li { margin: 4px 0; }
.prosa hr { border: 0; border-top: 1px solid var(--linie); margin: 20px 0; }
.prosa h3 { font-family: var(--font-display); font-weight: 400; color: var(--saphir); font-size: 22px; margin: 18px 0 8px; }
.prosa strong { color: var(--saphir); font-weight: 700; }
.prosa a { color: var(--beere); text-underline-offset: 3px; }
.prosa img { display: block; margin: 12px 0; max-width: 320px; }
.anhaenge { margin: 0 0 24px; }
.anhang { display: flex; align-items: center; gap: 14px; background: var(--papier); border: 1px solid var(--linie); padding: 14px 16px; text-decoration: none; color: var(--kohle); margin-bottom: 8px; }
.anhang:hover { border-color: var(--saphir); }
.anhang .typ { width: 44px; height: 44px; display: grid; place-items: center; background: var(--altrosa); color: var(--saphir); font-size: 11px; font-weight: 700; letter-spacing: .08em; flex-shrink: 0; }
.anhang .name { flex: 1; font-size: 15px; line-height: 1.35; }
.haftung-box { background: var(--saphir); color: var(--altrosa); padding: 22px 20px; margin: 0 0 24px; }
.haftung-box label { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; margin-bottom: 16px; font-size: 16px; }
.haftung-box input { width: 22px; height: 22px; margin-top: 2px; accent-color: var(--senf); flex-shrink: 0; }
.lektion-fuss { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; border-top: 1px solid var(--linie); padding-top: 22px; }
.lektion-fuss .nav { display: flex; gap: 10px; flex-wrap: wrap; }
.btn-erledigt.ist-erledigt { background: var(--beere); border-color: var(--beere); color: var(--altrosa); }

/* ---------- Admin ---------- */
.admin-werkzeuge { display: grid; gap: 16px; margin-bottom: 26px; }
@media (min-width: 760px) { .admin-werkzeuge { grid-template-columns: 1fr 1fr; } }
.admin-werkzeuge .zeile { display: flex; gap: 10px; }
.admin-werkzeuge .zeile input { flex: 1; min-height: 44px; padding: 8px 12px; border: 1.5px solid var(--linie); background: var(--papier); border-radius: 0; }
.tabelle { width: 100%; border-collapse: collapse; background: var(--papier); border: 1px solid var(--linie); font-size: 14px; }
.tabelle th { text-align: left; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--saphir); padding: 12px; border-bottom: 1px solid var(--linie); font-weight: 600; }
.tabelle td { padding: 12px; border-bottom: 1px solid color-mix(in srgb, var(--saphir) 8%, transparent); vertical-align: middle; }
.tabelle-wrap { overflow-x: auto; }
.pill { display: inline-block; padding: 2px 8px; font-size: 11px; letter-spacing: .08em; border: 1px solid var(--linie); border-radius: 2px; white-space: nowrap; }
.pill.aktiv { border-color: var(--erfolg); color: var(--erfolg); }
.leer-zustand { background: var(--papier); border: 1px solid var(--linie); padding: 28px 24px; }

.toast { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%) translateY(20px); background: var(--kohle); color: var(--altrosa); padding: 12px 18px; font-size: 14px; opacity: 0; transition: all .25s var(--easing); z-index: 90; max-width: calc(100vw - 32px); }
.toast.zeigen { opacity: 1; transform: translateX(-50%); }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* Fortschritt im Programm (Monate) und Kapazitäts-Cockpit */
.weg-kopf { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.weg-zahl { font-family: var(--font-display); font-size: 28px; color: var(--saphir); }
.monate { display: flex; gap: 6px; margin-top: 14px; }
.monate span { flex: 1; height: 6px; background: color-mix(in srgb, var(--saphir) 12%, transparent); }
.monate span.voll { background: var(--beere); }
.saeulen { display: flex; gap: 10px; align-items: flex-end; margin-top: 10px; }
.saeule { flex: 1; text-align: center; font-size: 11px; color: var(--text-leise); }
.saeulen-stab { height: 72px; display: flex; align-items: flex-end; background: color-mix(in srgb, var(--saphir) 8%, transparent); margin: 4px 0 6px; }
.saeulen-stab > div { width: 100%; background: var(--saphir); min-height: 2px; }
.balkenwert { font-family: var(--font-display); font-size: 16px; color: var(--saphir); }
.saeulen-monat { letter-spacing: .06em; text-transform: uppercase; }
.saeulen-fluss { color: var(--beere); min-height: 14px; }

/* Objekt-Check */
.rechner { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 820px) { .rechner { grid-template-columns: 1fr 1fr; } }
.feld-mit-einheit { display: flex; align-items: stretch; }
.feld-mit-einheit input { flex: 1; }
.feld-mit-einheit .einheit {
  display: flex; align-items: center; padding: 0 12px; border: 1.5px solid var(--linie); border-left: 0;
  background: var(--altrosa); color: var(--saphir); font-size: 14px; white-space: nowrap;
}
.kennzahlen { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 20px; margin-top: 6px; }
@media (min-width: 820px) { .kennzahlen { grid-template-columns: repeat(3, 1fr); } }
.kennzahl { display: flex; flex-direction: column; gap: 2px; padding: 10px 0; border-bottom: 1px solid var(--linie-hell); }
.kennzahl span { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; opacity: .75; }
.kennzahl strong { font-family: var(--font-display); font-weight: 400; font-size: 20px; }
.kennzahl.gross strong { font-size: 30px; color: var(--senf); }
