/* =====================================================================
   DavyBarkmo Creator Academy – Design System
   Basiert auf dem Corporate Design 2025
   Mintgrün #93BF9A · Creme-Grau #F2F0EB · Montserrat
   ===================================================================== */

:root {
  /* CI-Farben */
  --mint: #93BF9A;
  --mint-80: #a9cbae;
  --mint-60: #bfd8c3;
  --mint-40: #d4e5d7;
  --mint-20: #eaf2eb;
  --mint-dark: #6fa078;     /* abgeleitet für Hover/Kontrast */
  --mint-darker: #4f7a58;
  --cream: #F2F0EB;
  --cream-dark: #e6e3da;
  --ink: #1d1f1d;           /* "Schwarz" weich */
  --ink-soft: #5a5f5a;
  --white: #ffffff;

  --ok: #5a9e6a;
  --warn: #d9a441;

  --radius: 16px;
  --radius-sm: 10px;
  --radius-lg: 24px;
  --shadow-sm: 0 2px 8px rgba(29,31,29,.06);
  --shadow: 0 8px 28px rgba(29,31,29,.10);
  --shadow-lg: 0 18px 50px rgba(29,31,29,.16);
  --sidebar-w: 250px;
  --maxw: 1180px;
  --font: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}
img { max-width: 100%; display: block; }
svg { width: 18px; height: 18px; flex-shrink: 0; }
.module-head .chev { width: 22px; height: 22px; }
.btn svg { width: 16px; height: 16px; }
.lesson-row .lcheck svg, .mini-lesson .d svg { width: 14px; height: 14px; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, textarea, select { font-family: inherit; font-size: 14px; }
a { color: var(--mint-darker); }
.hidden { display: none !important; }

/* ---------- Typo ---------- */
h1,h2,h3,h4 { font-weight: 700; letter-spacing: -.01em; color: var(--ink); }
h1 { font-size: 30px; }
h2 { font-size: 22px; }
h3 { font-size: 17px; }
.muted { color: var(--ink-soft); }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--mint-darker); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px; justify-content: center;
  padding: 11px 20px; border-radius: 999px; font-weight: 600; font-size: 14px;
  background: var(--mint); color: #163a1d; transition: .18s ease; white-space: nowrap;
}
.btn:hover { background: var(--mint-dark); color: var(--white); transform: translateY(-1px); }
.btn.block { width: 100%; }
.btn.ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--cream-dark); }
.btn.ghost:hover { background: var(--white); border-color: var(--mint); color: var(--mint-darker); transform: none; }
.btn.dark { background: var(--ink); color: var(--white); }
.btn.dark:hover { background: #000; }
.btn.sm { padding: 7px 14px; font-size: 13px; }
.btn.danger { background: #f3dede; color: #a23b3b; }
.btn.danger:hover { background: #eccaca; color: #842c2c; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

.icon-btn { width: 38px; height: 38px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: var(--ink-soft); transition: .15s; }
.icon-btn:hover { background: var(--mint-20); color: var(--mint-darker); }

/* ---------- Form ---------- */
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: var(--ink); }
.field input, .field textarea, .field select {
  width: 100%; padding: 12px 14px; border: 1.5px solid var(--cream-dark);
  border-radius: var(--radius-sm); background: var(--white); transition: .15s; color: var(--ink);
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-color: var(--mint); box-shadow: 0 0 0 3px var(--mint-20);
}
.field textarea { resize: vertical; min-height: 90px; }
.field .hint { font-size: 12px; color: var(--ink-soft); margin-top: 5px; }

/* =====================================================================
   LOGIN
   ===================================================================== */
.login-wrap {
  min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr;
}
.login-hero {
  background: linear-gradient(150deg, var(--mint) 0%, var(--mint-dark) 100%);
  color: var(--white); padding: 60px; display: flex; flex-direction: column; justify-content: space-between;
  position: relative; overflow: hidden;
}
.login-hero::after { display: none; }
.login-hero .logo-badge { width: 90px; height: 90px; display: flex; align-items: center; justify-content: center; }
.login-hero .logo-badge svg { width: 80px; height: 80px; filter: drop-shadow(0 2px 8px rgba(0,0,0,.15)); }
.hero-dogs { position: absolute; right: -60px; bottom: -40px; width: 380px; height: 380px; object-fit: cover; object-position: center top; border-radius: 50%; opacity: .18; pointer-events: none; }
.login-hero h1 { color: var(--white); font-size: 40px; line-height: 1.1; max-width: 12ch; }
.login-hero p { color: rgba(255,255,255,.92); max-width: 42ch; margin-top: 14px; font-size: 16px; }
.login-hero .hero-foot { font-size: 13px; color: rgba(255,255,255,.8); }

.login-form-side { display: flex; align-items: center; justify-content: center; padding: 40px; background: var(--cream); }
.login-card { width: 100%; max-width: 380px; }
.login-card h2 { font-size: 26px; margin-bottom: 6px; }
.login-card .sub { color: var(--ink-soft); margin-bottom: 28px; }
.demo-hint { margin-top: 22px; padding: 14px 16px; background: var(--mint-20); border-radius: var(--radius-sm); font-size: 12.5px; color: var(--mint-darker); line-height: 1.7; }
.demo-hint b { color: var(--ink); }
.demo-hint code { background: var(--white); padding: 1px 6px; border-radius: 5px; font-size: 12px; }
.login-error { background: #f9e4e4; color: #a23b3b; padding: 10px 14px; border-radius: var(--radius-sm); font-size: 13px; margin-bottom: 16px; }

/* =====================================================================
   APP SHELL
   ===================================================================== */
.app { display: grid; grid-template-columns: var(--sidebar-w) 1fr; min-height: 100vh; }

.sidebar {
  background: var(--white); border-right: 1px solid var(--cream-dark);
  display: flex; flex-direction: column; padding: 22px 16px; position: sticky; top: 0; height: 100vh;
}
.sidebar .brand { display: flex; align-items: center; gap: 11px; padding: 6px 8px 22px; }
.sidebar .brand img { width: 44px; height: 44px; }
.sidebar .brand .bt { font-weight: 700; font-size: 15px; line-height: 1.15; }
.sidebar .brand .bt span { display: block; font-size: 10.5px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--mint-darker); }
.nav { display: flex; flex-direction: column; gap: 3px; }
.nav-item {
  display: flex; align-items: center; gap: 12px; padding: 11px 13px; border-radius: var(--radius-sm);
  color: var(--ink-soft); font-weight: 600; font-size: 14px; transition: .14s; width: 100%; text-align: left;
}
.nav-item svg { width: 19px; height: 19px; flex-shrink: 0; }
.nav-item:hover { background: var(--cream); color: var(--ink); }
.nav-item.active { background: var(--mint-20); color: var(--mint-darker); }
.nav-sep { font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #b3b8b3; padding: 18px 13px 8px; }
.sidebar .spacer { flex: 1; }
.user-chip { display: flex; align-items: center; gap: 11px; padding: 10px; border-radius: var(--radius-sm); background: var(--cream); }
.avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--mint); color: #163a1d; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; flex-shrink: 0; }
.user-chip .ud { overflow: hidden; }
.user-chip .ud b { display: block; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-chip .ud span { font-size: 11px; color: var(--ink-soft); }

.main { min-width: 0; }
.topbar {
  display: flex; align-items: center; gap: 16px; padding: 18px 36px;
  background: rgba(242,240,235,.85); backdrop-filter: blur(8px); position: sticky; top: 0; z-index: 30;
  border-bottom: 1px solid var(--cream-dark);
}
.topbar .search { flex: 1; max-width: 460px; position: relative; }
.topbar .search input { width: 100%; padding: 10px 14px 10px 40px; border-radius: 999px; border: 1.5px solid var(--cream-dark); background: var(--white); }
.topbar .search input:focus { outline: none; border-color: var(--mint); box-shadow: 0 0 0 3px var(--mint-20); }
.topbar .search svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 17px; height: 17px; color: var(--ink-soft); }
.topbar .grow { flex: 1; }
.content { padding: 32px 36px 60px; max-width: var(--maxw); }

/* ---------- Page header ---------- */
.page-head { margin-bottom: 26px; }
.page-head h1 { margin-bottom: 4px; }

/* ---------- Cards / grid ---------- */
.grid { display: grid; gap: 20px; }
.grid.cards { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.card { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow-sm); overflow: hidden; transition: .18s; border: 1px solid rgba(0,0,0,.03); }
.card.click { cursor: pointer; }
.card.click:hover { transform: translateY(-3px); box-shadow: var(--shadow); }

.course-thumb { aspect-ratio: 16/9; position: relative; display: flex; align-items: flex-end; padding: 14px; color: var(--white); background-size: cover; background-position: center; }
.course-thumb::before { content:""; position:absolute; inset:0; background: linear-gradient(180deg, rgba(0,0,0,0) 35%, rgba(0,0,0,.55) 100%); }
.course-thumb .tag { position: relative; z-index: 1; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; background: rgba(255,255,255,.92); color: var(--mint-darker); padding: 4px 10px; border-radius: 999px; }
.course-body { padding: 16px 18px 20px; }
.course-body h3 { margin-bottom: 6px; }
.course-body p { font-size: 13px; color: var(--ink-soft); margin-bottom: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.course-meta { display: flex; align-items: center; justify-content: space-between; font-size: 12px; color: var(--ink-soft); margin-bottom: 12px; }

/* ---------- Progress ---------- */
.progress { height: 8px; border-radius: 999px; background: var(--cream-dark); overflow: hidden; }
.progress > i { display: block; height: 100%; background: var(--mint); border-radius: 999px; transition: width .4s ease; }
.progress-row { display: flex; align-items: center; gap: 10px; }
.progress-row .progress { flex: 1; }
.progress-row b { font-size: 12px; color: var(--mint-darker); min-width: 34px; text-align: right; }
.status-pill { font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.status-pill.not { background: var(--cream-dark); color: var(--ink-soft); }
.status-pill.prog { background: var(--mint-20); color: var(--mint-darker); }
.status-pill.done { background: #dcefe0; color: var(--ok); }

/* ---------- Welcome banner ---------- */
.welcome {
  background: linear-gradient(135deg, var(--mint) 0%, var(--mint-dark) 100%); color: var(--white);
  border-radius: var(--radius-lg); padding: 32px 34px; margin-bottom: 30px; position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
}
.welcome::after { content:""; position:absolute; right:-60px; top:-60px; width:230px; height:230px; border-radius:50%; border:46px solid rgba(255,255,255,.12); }
.welcome h1 { color: var(--white); font-size: 28px; }
.welcome p { color: rgba(255,255,255,.92); margin-top: 6px; max-width: 46ch; }
.welcome .wstats { display: flex; gap: 26px; position: relative; z-index: 1; }
.welcome .wstats .n { font-size: 30px; font-weight: 700; }
.welcome .wstats .l { font-size: 12px; color: rgba(255,255,255,.85); }

/* ---------- Section title ---------- */
.section-title { display: flex; align-items: center; justify-content: space-between; margin: 6px 0 16px; }

/* =====================================================================
   COURSE DETAIL (student)
   ===================================================================== */
.course-hero { border-radius: var(--radius-lg); overflow: hidden; position: relative; color: var(--white); padding: 40px; margin-bottom: 28px; background-size: cover; background-position: center; min-height: 220px; display: flex; flex-direction: column; justify-content: flex-end; }
.course-hero::before { content:""; position:absolute; inset:0; background: linear-gradient(180deg, rgba(0,0,0,.15), rgba(0,0,0,.65)); }
.course-hero > * { position: relative; z-index: 1; }
.course-hero h1 { color: var(--white); font-size: 32px; max-width: 22ch; }
.course-hero p { color: rgba(255,255,255,.92); max-width: 60ch; margin-top: 8px; }
.course-hero .hero-actions { margin-top: 20px; display: flex; gap: 12px; flex-wrap: wrap; }

.module { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow-sm); margin-bottom: 16px; overflow: hidden; }
.module-head { display: flex; align-items: center; gap: 16px; padding: 16px 20px; cursor: pointer; }
.module-head .mthumb { width: 56px; height: 56px; border-radius: 12px; background-size: cover; background-position: center; flex-shrink: 0; }
.module-head .mtitle { flex: 1; }
.module-head .mtitle b { font-size: 16px; }
.module-head .mtitle span { font-size: 12.5px; color: var(--ink-soft); }
.module-head .chev { transition: .2s; color: var(--ink-soft); }
.module.open .chev { transform: rotate(180deg); }
.lessons { border-top: 1px solid var(--cream); display: none; }
.module.open .lessons { display: block; }
.lesson-row { display: flex; align-items: center; gap: 14px; padding: 13px 20px 13px 24px; cursor: pointer; transition: .12s; border-bottom: 1px solid var(--cream); }
.lesson-row:last-child { border-bottom: none; }
.lesson-row:hover { background: var(--mint-20); }
.lesson-row .lcheck { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--cream-dark); display: flex; align-items: center; justify-content: center; flex-shrink: 0; color: transparent; }
.lesson-row.done .lcheck { background: var(--mint); border-color: var(--mint); color: var(--white); }
.lesson-row .lname { flex: 1; font-size: 14px; font-weight: 500; }
.lesson-row .ltype { font-size: 11px; color: var(--ink-soft); display: flex; align-items: center; gap: 5px; }
.lesson-row .bm { color: var(--cream-dark); }
.lesson-row .bm.on { color: var(--mint); }

/* ---------- Lesson player ---------- */
.player-grid { display: grid; grid-template-columns: 1fr 300px; gap: 26px; align-items: start; }
.video-frame { aspect-ratio: 16/9; border-radius: var(--radius); overflow: hidden; background: #000; box-shadow: var(--shadow); }
.video-frame iframe { width: 100%; height: 100%; border: 0; }
.video-frame.placeholder { background: var(--mint-20); border: 2px dashed var(--mint-60); box-shadow: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; color: var(--mint-darker); }
.video-frame.placeholder .ph-ic { width: 46px; height: 46px; opacity: .7; }
.video-frame.placeholder span { font-weight: 600; letter-spacing: .02em; }
.lesson-text.placeholder { background: repeating-linear-gradient(180deg, var(--white), var(--white) 10px); border: 1.5px dashed var(--cream-dark); box-shadow: none; }

/* Dokumente & Downloads in der Lektion */
.lesson-docs { margin-top: 22px; }
.ld-head { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 13px; letter-spacing: .04em; text-transform: uppercase; color: var(--mint-darker); margin-bottom: 12px; }
.ld-head svg { width: 18px; height: 18px; }
.doc-item { display: flex; align-items: center; gap: 14px; background: var(--white); border: 1.5px solid var(--cream-dark); border-radius: var(--radius-sm); padding: 14px 18px; margin-bottom: 10px; text-decoration: none; color: var(--ink); transition: .15s; }
a.doc-item:hover { border-color: var(--mint); box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.doc-item.placeholder { border-style: dashed; background: transparent; }
.doc-item .di-ic { width: 40px; height: 40px; flex-shrink: 0; border-radius: 10px; background: var(--mint-20); color: var(--mint-darker); display: flex; align-items: center; justify-content: center; }
.doc-item .di-ic svg { width: 20px; height: 20px; }
.doc-item .di-body { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.doc-item .di-body .muted { font-size: 12.5px; }
.doc-item .di-dl { font-weight: 700; color: var(--mint-darker); font-size: 13px; white-space: nowrap; }
.lesson-text { background: var(--white); border-radius: var(--radius); padding: 26px 30px; box-shadow: var(--shadow-sm); margin-top: 22px; }
.lesson-text h1,.lesson-text h2,.lesson-text h3 { margin: 18px 0 8px; }
.lesson-text p { margin-bottom: 12px; }
.lesson-text ul,.lesson-text ol { margin: 0 0 12px 22px; }
.lesson-text li { margin-bottom: 5px; }
.lesson-text a { color: var(--mint-darker); }
.lesson-text img { border-radius: 10px; margin: 12px 0; }
.player-side { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow-sm); overflow: hidden; position: sticky; top: 90px; }
.player-side .ph { padding: 16px 18px; border-bottom: 1px solid var(--cream); font-weight: 700; font-size: 14px; }
.player-side .pl { max-height: 60vh; overflow: auto; }
.mini-lesson { display: flex; align-items: center; gap: 10px; padding: 11px 16px; cursor: pointer; font-size: 13px; border-bottom: 1px solid var(--cream); }
.mini-lesson:hover { background: var(--mint-20); }
.mini-lesson.current { background: var(--mint-20); font-weight: 600; }
.mini-lesson .d { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--cream-dark); flex-shrink: 0; }
.mini-lesson.done .d { background: var(--mint); border-color: var(--mint); }
.lesson-nav { display: flex; justify-content: space-between; margin-top: 24px; gap: 12px; }

.breadcrumb { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-soft); margin-bottom: 16px; flex-wrap: wrap; }
.breadcrumb a { cursor: pointer; color: var(--ink-soft); }
.breadcrumb a:hover { color: var(--mint-darker); }
.breadcrumb .sep { color: var(--cream-dark); }

/* =====================================================================
   ADMIN
   ===================================================================== */
.table-wrap { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow-sm); overflow: hidden; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-soft); padding: 14px 18px; border-bottom: 1px solid var(--cream-dark); font-weight: 700; }
td { padding: 14px 18px; border-bottom: 1px solid var(--cream); font-size: 14px; vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tr.click { cursor: pointer; }
tr.click:hover td { background: var(--mint-20); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font-size: 11.5px; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: var(--mint-20); color: var(--mint-darker); }
.chip.gray { background: var(--cream-dark); color: var(--ink-soft); }
.role-badge { font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.role-badge.admin { background: #efe3f7; color: #7a4ba0; }
.role-badge.member { background: var(--mint-20); color: var(--mint-darker); }

.toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.toolbar .grow { flex: 1; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px,1fr)); gap: 16px; margin-bottom: 28px; }
.stat { background: var(--white); border-radius: var(--radius); padding: 20px 22px; box-shadow: var(--shadow-sm); }
.stat .n { font-size: 28px; font-weight: 700; color: var(--mint-darker); }
.stat .l { font-size: 13px; color: var(--ink-soft); margin-top: 2px; }

/* admin course builder */
.builder-module { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow-sm); margin-bottom: 14px; overflow: hidden; }
.builder-module .bm-head { display: flex; align-items: center; gap: 12px; padding: 14px 18px; background: var(--mint-20); }
.builder-module .bm-head b { flex: 1; }
.builder-lesson { display: flex; align-items: center; gap: 12px; padding: 12px 18px; border-bottom: 1px solid var(--cream); }
.builder-lesson:last-child { border-bottom: none; }
.builder-lesson .li { width: 30px; height: 30px; border-radius: 8px; background: var(--mint-20); color: var(--mint-darker); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.builder-lesson .ln { flex: 1; font-size: 14px; }
.builder-lesson .ln span { display: block; font-size: 11.5px; color: var(--ink-soft); }

/* =====================================================================
   MODAL
   ===================================================================== */
.modal-overlay { position: fixed; inset: 0; background: rgba(29,31,29,.45); backdrop-filter: blur(3px); display: flex; align-items: center; justify-content: center; padding: 24px; z-index: 100; }
.modal { background: var(--cream); border-radius: var(--radius-lg); width: 100%; max-width: 560px; max-height: 90vh; overflow: auto; box-shadow: var(--shadow-lg); }
.modal.wide { max-width: 760px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 22px 26px 6px; }
.modal-head h2 { font-size: 20px; }
.modal-body { padding: 14px 26px 26px; }
.modal-foot { display: flex; gap: 10px; justify-content: flex-end; padding: 16px 26px; border-top: 1px solid var(--cream-dark); position: sticky; bottom: 0; background: var(--cream); }

/* rich text toolbar */
.rt-toolbar { display: flex; gap: 4px; flex-wrap: wrap; padding: 8px; background: var(--white); border: 1.5px solid var(--cream-dark); border-bottom: none; border-radius: var(--radius-sm) var(--radius-sm) 0 0; }
.rt-toolbar button { width: 32px; height: 30px; border-radius: 7px; color: var(--ink-soft); font-size: 13px; font-weight: 700; }
.rt-toolbar button:hover { background: var(--mint-20); color: var(--mint-darker); }
.rt-editor { min-height: 160px; padding: 14px; background: var(--white); border: 1.5px solid var(--cream-dark); border-radius: 0 0 var(--radius-sm) var(--radius-sm); overflow: auto; }
.rt-editor:focus { outline: none; border-color: var(--mint); }
.rt-editor:empty::before { content: attr(data-ph); color: #b3b8b3; }

.access-list { display: flex; flex-direction: column; gap: 8px; max-height: 260px; overflow: auto; }
.access-item { display: flex; align-items: center; gap: 12px; padding: 11px 14px; background: var(--white); border-radius: var(--radius-sm); border: 1.5px solid var(--cream-dark); cursor: pointer; }
.access-item.on { border-color: var(--mint); background: var(--mint-20); }
.access-item .cx { width: 22px; height: 22px; border-radius: 6px; border: 2px solid var(--cream-dark); flex-shrink: 0; display: flex; align-items: center; justify-content: center; color: transparent; }
.access-item.on .cx { background: var(--mint); border-color: var(--mint); color: #fff; }
.access-item .ai { flex: 1; }
.access-item .ai b { font-size: 14px; display: block; }
.access-item .ai span { font-size: 12px; color: var(--ink-soft); }

/* thumbnail picker */
.thumb-pick { display: grid; grid-template-columns: repeat(6,1fr); gap: 8px; }
.thumb-pick .sw { aspect-ratio: 1; border-radius: 8px; cursor: pointer; border: 3px solid transparent; }
.thumb-pick .sw.on { border-color: var(--ink); }

/* ===== Dokumente-Editor (Lektion) ===== */
.tpl-row { display: flex; align-items: flex-start; gap: 12px; padding: 10px; background: var(--white); border: 1.5px solid var(--cream-dark); border-radius: var(--radius-sm); margin-bottom: 8px; }
.tpl-num { width: 28px; height: 28px; border-radius: 7px; background: var(--mint-20); color: var(--mint-darker); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 12px; flex-shrink: 0; margin-top: 4px; }
.tpl-row input { padding: 9px 12px; border: 1.5px solid var(--cream-dark); border-radius: 8px; background: var(--cream); width: 100%; }
.tpl-row input:focus { outline: none; border-color: var(--mint); background: var(--white); }

@media (max-width: 760px){ .up-summary { grid-template-columns: 1fr 1fr; } }

/* toast */
.toast { position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%) translateY(20px); background: var(--ink); color: var(--white); padding: 13px 22px; border-radius: 999px; font-size: 14px; font-weight: 600; box-shadow: var(--shadow-lg); opacity: 0; transition: .25s; z-index: 200; pointer-events: none; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.empty { text-align: center; padding: 60px 20px; color: var(--ink-soft); }
.empty svg { width: 56px; height: 56px; color: var(--mint-60); margin-bottom: 14px; }
.empty h3 { color: var(--ink); margin-bottom: 6px; }

/* mobile menu toggle */
.menu-toggle { display: none; }

/* =====================================================================
   RESPONSIVE
   ===================================================================== */
@media (max-width: 980px) {
  .player-grid { grid-template-columns: 1fr; }
  .player-side { position: static; }
  .login-wrap { grid-template-columns: 1fr; }
  .login-hero { display: none; }
}
@media (max-width: 760px) {
  .app { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed; left: 0; top: 0; z-index: 60; width: 270px;
    transform: translateX(-100%); transition: transform .25s ease; box-shadow: var(--shadow-lg);
  }
  .sidebar.open { transform: translateX(0); }
  .menu-toggle { display: inline-flex; }
  .topbar { padding: 14px 18px; }
  .content { padding: 22px 18px 50px; }
  .welcome { flex-direction: column; align-items: flex-start; }
  .welcome .wstats { gap: 20px; }
  .scrim { position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 55; }
  h1 { font-size: 24px; }
  .stat-grid { grid-template-columns: repeat(2,1fr); }
}

/* =====================================================================
   INFOBOARD (2 editierbare Kaesten im Dashboard)
   ===================================================================== */
.infoboard { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.infobox {
  background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow-sm);
  border: 1px solid rgba(0,0,0,.04); padding: 24px; display: flex; gap: 18px; align-items: flex-start;
}
.infobox .ib-photo {
  width: 76px; height: 76px; border-radius: 50%; flex-shrink: 0;
  background-size: cover; background-position: center;
  border: 3px solid var(--mint-20); box-shadow: var(--shadow-sm);
}
.infobox .ib-photo-ph {
  display: flex; align-items: center; justify-content: center;
  background: var(--mint-20); color: var(--mint-dark);
}
.infobox .ib-photo-ph svg { width: 34px; height: 34px; }
.infobox .ib-body h3 { font-size: 17px; margin-bottom: 6px; }
.infobox .ib-body p { font-size: 14px; color: var(--ink-soft); line-height: 1.65; }
.infobox.admin-edit { border-style: dashed; border-color: var(--cream-dark); }

/* =====================================================================
   WOCHEN-TO-DO (Posts dieser Woche)
   ===================================================================== */
.todo-card { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow-sm); border: 1px solid rgba(0,0,0,.04); padding: 22px 24px; }
.todo-head { display: flex; align-items: center; gap: 10px; font-size: 15px; margin-bottom: 16px; color: var(--ink); }
.todo-head svg { width: 18px; height: 18px; color: var(--mint-darker); }
.todo-list { display: flex; flex-direction: column; gap: 10px; }
.todo-item {
  display: flex; align-items: center; gap: 14px; padding: 13px 16px;
  border: 1.5px solid var(--cream-dark); border-radius: var(--radius-sm); background: var(--cream); transition: .15s;
}
.todo-item .todo-check {
  width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0;
  border: 2px solid var(--cream-dark); background: var(--white);
  display: flex; align-items: center; justify-content: center; color: transparent;
}
.todo-item .todo-check svg { width: 15px; height: 15px; }
.todo-item.done { border-color: var(--mint); background: var(--mint-20); }
.todo-item.done .todo-check { background: var(--mint); border-color: var(--mint); color: #fff; }
.todo-type { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.todo-type svg { width: 14px; height: 14px; }
.todo-type.story { background: #fbeede; color: #9a6a1c; }
.todo-type.reel { background: var(--mint-20); color: var(--mint-darker); }
.todo-label { font-weight: 600; font-size: 14px; flex: 1; }
.todo-status { font-size: 13px; color: var(--ink-soft); white-space: nowrap; }
.todo-status a { cursor: pointer; font-weight: 600; }
.todo-item.done .todo-status { color: var(--mint-darker); font-weight: 600; }
.todo-foot { font-size: 12.5px; margin-top: 14px; line-height: 1.6; }
.todo-foot a { cursor: pointer; }

/* Quota-Felder im Mitglied-Modal */
.quota-row { display: flex; flex-wrap: wrap; gap: 10px; }
.quota-opt { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border: 1.5px solid var(--cream-dark); border-radius: var(--radius-sm); cursor: pointer; font-size: 13.5px; font-weight: 600; flex: 1; min-width: 150px; }
.quota-opt span { display: inline-flex; align-items: center; gap: 6px; }
.quota-opt svg { width: 15px; height: 15px; color: var(--mint-darker); }
.quota-opt input { width: auto; }

/* =====================================================================
   KALENDER
   ===================================================================== */
.cal-toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; flex-wrap: wrap; }
.cal-range { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink); }
.cal-range svg { width: 17px; height: 17px; color: var(--mint-darker); }
.btn.cal-now { background: var(--mint-20); border-color: var(--mint); color: var(--mint-darker); }
.cal-note { background: var(--mint-20); color: var(--mint-darker); border-radius: var(--radius-sm); padding: 12px 16px; font-size: 13.5px; line-height: 1.6; margin-bottom: 18px; display: flex; gap: 10px; align-items: flex-start; }
.cal-note svg { width: 17px; height: 17px; flex-shrink: 0; margin-top: 2px; }

.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 10px; }
.cal-day { background: var(--white); border: 1px solid var(--cream-dark); border-radius: var(--radius-sm); overflow: hidden; min-height: 150px; display: flex; flex-direction: column; }
.cal-day.today { border-color: var(--mint); box-shadow: 0 0 0 2px var(--mint-20); }
.cal-day-head { display: flex; align-items: baseline; gap: 6px; padding: 10px 12px; border-bottom: 1px solid var(--cream); background: var(--cream); }
.cal-day-head b { font-size: 13px; }
.cal-day-head span { font-size: 11.5px; color: var(--ink-soft); }
.cal-day.today .cal-day-head { background: var(--mint-20); }
.cal-count { margin-left: auto; font-size: 11px; font-weight: 700; background: var(--mint); color: #163a1d; border-radius: 999px; padding: 1px 8px; font-style: normal; }
.cal-day-body { padding: 10px; display: flex; flex-direction: column; gap: 7px; flex: 1; }

.cal-chip { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; padding: 6px 9px; border-radius: 8px; }
.cal-chip span { display: inline-flex; align-items: center; gap: 5px; }
.cal-chip svg { width: 13px; height: 13px; }
.cal-chip.story { background: #fbeede; color: #9a6a1c; }
.cal-chip.reel { background: var(--mint-20); color: var(--mint-darker); }
.cal-x { margin-left: auto; width: 18px; height: 18px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: inherit; opacity: .55; flex-shrink: 0; }
.cal-x:hover { opacity: 1; background: rgba(0,0,0,.08); }
.cal-x svg { width: 12px; height: 12px; }

.cal-add { margin-top: auto; display: flex; flex-direction: column; gap: 6px; }
.cal-addbtn { font-size: 12px; font-weight: 700; padding: 7px 8px; border-radius: 8px; border: 1.5px dashed var(--cream-dark); color: var(--ink-soft); background: var(--white); transition: .14s; cursor: pointer; }
.cal-addbtn.story:not(:disabled):hover { border-color: #e3b873; color: #9a6a1c; background: #fbeede; }
.cal-addbtn.reel:not(:disabled):hover { border-color: var(--mint); color: var(--mint-darker); background: var(--mint-20); }
.cal-addbtn:disabled { opacity: .4; cursor: not-allowed; }

/* Admin-Kalender */
.cal-grid.admin .cal-day { min-height: 170px; }
.cal-chip.adm { background: var(--cream); color: var(--ink); padding: 5px 7px; border-left: 4px solid var(--mint); }
.cal-chip.adm.story { border-left-color: #d99a3c; }
.cal-chip.adm.reel { border-left-color: var(--mint-dark); }
.cal-ava { width: 22px; height: 22px; border-radius: 50%; background: var(--mint); color: #163a1d; font-size: 10px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.cal-ava.sm { width: 26px; height: 26px; font-size: 11px; }
.cal-chip.adm .cal-nm { font-size: 12px; font-weight: 700; }
.cal-chip.adm .cal-tt { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-soft); margin-left: 2px; }
.cal-empty { color: var(--cream-dark); font-size: 18px; text-align: center; margin: auto; }

.cal-legend { display: flex; gap: 18px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; font-size: 13px; }
.cal-legend span { display: inline-flex; align-items: center; gap: 7px; }
.cal-legend .lg { width: 14px; height: 14px; border-radius: 4px; }
.cal-legend .lg.story { background: #d99a3c; }
.cal-legend .lg.reel { background: var(--mint-dark); }

.cal-summary { display: flex; flex-direction: column; gap: 8px; }
.cal-sumrow { display: flex; align-items: center; gap: 12px; background: var(--white); border: 1px solid var(--cream-dark); border-radius: var(--radius-sm); padding: 10px 16px; }
.cal-sumrow b { font-size: 14px; flex: 1; }
.cal-badge { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.cal-badge svg { width: 13px; height: 13px; }
.cal-badge.ok { background: var(--mint-20); color: var(--mint-darker); }
.cal-badge.open { background: #faf0e0; color: #9a6a1c; }
.cal-badge.off { background: var(--cream); color: var(--ink-soft); }
.cal-prog { font-size: 13px; font-weight: 800; color: var(--ink-soft); min-width: 34px; text-align: right; }
.cal-prog.done { color: var(--mint-darker); }

.cal-embed-hint { margin-top: 28px; background: var(--cream); border: 1px dashed var(--cream-dark); border-radius: var(--radius-sm); padding: 14px 16px; font-size: 13px; line-height: 1.6; color: var(--ink-soft); display: flex; gap: 10px; align-items: flex-start; }
.cal-embed-hint svg { width: 17px; height: 17px; flex-shrink: 0; margin-top: 2px; color: var(--mint-darker); }
.cal-embed-hint code { background: var(--white); padding: 1px 6px; border-radius: 5px; font-size: 12px; }

/* Responsive Kalender */
@media (max-width: 860px) {
  .cal-grid, .cal-grid.admin { grid-template-columns: 1fr; }
  .cal-day { min-height: auto; }
  .cal-day-body { flex-direction: row; flex-wrap: wrap; align-items: center; }
  .cal-add { margin: 0; flex-direction: row; }
  .cal-sumrow { flex-wrap: wrap; }
}

/* =====================================================================
   ITERATION 2: Foto-Upload/Zoom · dynamische Quota · Kalender-Split
   ===================================================================== */
.welcome.welcome-simple { display: block; }

/* Infobox-Foto jetzt als Bild mit Zoom */
.infobox .ib-photo { overflow: hidden; }
.infobox .ib-photo img { width: 100%; height: 100%; object-fit: cover; display: block; transform-origin: center; }

/* Foto-Editor im Infobox-Modal */
.ifp-edit { display: flex; gap: 18px; align-items: center; }
.ifp-preview { width: 96px; height: 96px; border-radius: 50%; overflow: hidden; flex-shrink: 0; border: 3px solid var(--mint-20); background: var(--cream); display: flex; align-items: center; justify-content: center; }
.ifp-preview img { width: 100%; height: 100%; object-fit: cover; transform-origin: center; }
.ifp-preview.ph { color: var(--mint-dark); background: var(--mint-20); }
.ifp-preview.ph svg { width: 40px; height: 40px; }
.ifp-controls { display: flex; flex-direction: column; gap: 10px; flex: 1; }
.ifp-upload { position: relative; overflow: hidden; display: inline-flex; align-items: center; gap: 8px; width: fit-content; }
.ifp-upload input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.ifp-zoom { display: flex; align-items: center; gap: 10px; }
.ifp-zoom input[type=range] { flex: 1; accent-color: var(--mint); }

/* Dynamische Quota-Eingabe im Mitglied-Modal */
.quota-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.quota-block { border: 1.5px solid var(--cream-dark); border-radius: var(--radius-sm); padding: 12px 14px; }
.quota-title { display: flex; align-items: center; gap: 7px; font-weight: 700; font-size: 13.5px; margin-bottom: 10px; }
.quota-title svg { width: 15px; height: 15px; color: var(--mint-darker); }
.quota-controls { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.quota-controls input[type=number] { width: 58px; padding: 8px 8px; text-align: center; }
.quota-controls span { font-size: 12.5px; color: var(--ink-soft); }

/* Kalender-Streifen (Story / Reel getrennt, untereinander) */
.cal-strip { margin-bottom: 26px; }
.cal-strip-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; flex-wrap: wrap; }
.cal-strip-head .todo-type { font-size: 13px; }
.cal-strip-head em { font-style: normal; font-size: 13px; }
.cal-strip-prog { font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--mint-20); color: var(--mint-darker); }
.cal-strip-prog.done { background: var(--mint); color: #163a1d; }
.cal-strip .cal-day { min-height: 110px; }

@media (max-width: 860px) {
  .quota-grid { grid-template-columns: 1fr; }
  .ifp-edit { flex-direction: column; align-items: flex-start; }
}

/* Infobox: Hervorhebung (Call-Zeit) + Button */
.ib-highlight {
  display: inline-flex; align-items: center; gap: 7px;
  margin-top: 12px; padding: 8px 13px;
  background: var(--mint-20); color: var(--mint-darker);
  border-radius: var(--radius-sm); font-size: 13px; font-weight: 700;
  border-left: 3px solid var(--mint);
}
.ib-highlight svg { width: 15px; height: 15px; }
.ib-btn { margin-top: 14px; }
.infobox .ib-body { display: flex; flex-direction: column; align-items: flex-start; }
.ib-btnfields { display: flex; flex-direction: column; gap: 8px; }
