/* ─── kathar.io Design-System (nach Vorlage) ─────────────── */
:root {
  --blanc:      #F7F8FA;
  --cool-grey:  #EEF1F5;
  --mist:       #D4D7DB;
  --pale-blue:  #B8C5D1;
  --dusty-blue: #9EAFC1;
  --steel:      #7A99B8;
  --deep-blue:  #5A7A9E;
  --navy:       #2D3A47;
  --gold:       #C9A84C;
  --gold-light: #F5E4A8;
  --gold-dark:  #8A6A1A;
  --text-main:  #2D3A47;
  --text-muted: #6A7A8A;
  --text-hint:  #8A99AA;
  --ok:         #1D9E75;
  --ok-soft:    #E1F5EE;
  --err:        #C0492F;
  --err-soft:   #FBE9E5;
  --border:     rgba(45,58,71,0.1);
  --serif: 'Lora', Georgia, serif;
  --sans:  'Inter', system-ui, sans-serif;
  --mono:  'JetBrains Mono', monospace;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  background: var(--blanc);
  color: var(--text-main);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }

/* ─── Nav ─────────────────────────────────────────────── */
nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(247,248,250,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 0.5px solid var(--border);
  padding: 0 2rem; height: 60px;
  display: flex; align-items: center; gap: 2rem;
}
.nav-logo { display: flex; align-items: center; gap: 10px; }
.nav-logo-mark {
  width: 32px; height: 32px; border-radius: 8px;
  background: var(--deep-blue);
  display: flex; align-items: center; justify-content: center;
  color: var(--blanc); font-family: var(--serif);
  font-size: 15px; font-weight: 500; flex-shrink: 0;
}
.nav-logo-text { font-family: var(--serif); font-size: 16px; color: var(--text-main); font-weight: 500; }
.nav-logo-sub { font-size: 11px; color: var(--text-hint); font-style: italic; }
.nav-links { display: flex; gap: 1.5rem; margin-left: auto; align-items: center; }
.nav-link { font-size: 14px; color: var(--text-muted); transition: color 0.15s; }
.nav-link:hover { color: var(--text-main); }
.nav-link.active { color: var(--deep-blue); font-weight: 500; border-bottom: 1.5px solid var(--dusty-blue); padding-bottom: 2px; }
.nav-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--dusty-blue);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 500; color: var(--blanc);
  margin-left: 0.5rem; cursor: pointer;
}

/* ─── Hero ────────────────────────────────────────────── */
.hero {
  background: linear-gradient(160deg, var(--cool-grey) 0%, var(--blanc) 60%);
  padding: 4rem 2rem 3rem; border-bottom: 0.5px solid var(--border);
}
.hero-inner {
  max-width: 900px; margin: 0 auto;
  display: grid; grid-template-columns: 1fr auto; gap: 2rem; align-items: center;
}
.hero-greeting { font-size: 13px; color: var(--text-hint); letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 0.5rem; }
.hero-title { font-family: var(--serif); font-size: 2.2rem; font-weight: 400; color: var(--text-main); line-height: 1.25; margin-bottom: 0.75rem; }
.hero-title em { color: var(--deep-blue); font-style: italic; }
.hero-sub { font-size: 15px; color: var(--text-muted); max-width: 480px; line-height: 1.65; margin-bottom: 1.5rem; }
.hero-actions { display: flex; gap: 0.75rem; align-items: center; flex-wrap: wrap; }

/* ─── Buttons ─────────────────────────────────────────── */
.btn {
  font-family: var(--sans); font-size: 14px; font-weight: 500;
  padding: 10px 20px; border-radius: var(--radius-sm); border: none;
  cursor: pointer; transition: opacity 0.15s, transform 0.1s;
  display: inline-flex; align-items: center; gap: 6px;
}
.btn:hover { opacity: 0.88; }
.btn:active { transform: scale(0.98); }
.btn-gold  { background: var(--gold); color: var(--navy); }
.btn-blue  { background: var(--deep-blue); color: var(--blanc); }
.btn-ghost { background: transparent; color: var(--deep-blue); border: 1.5px solid var(--dusty-blue); }
.btn-sm    { font-size: 12px; padding: 6px 14px; }
.btn-block { width: 100%; justify-content: center; }

/* ─── Stats bar ───────────────────────────────────────── */
.hero-stats {
  background: var(--deep-blue); border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem; display: flex; flex-direction: column; gap: 0.75rem; min-width: 180px;
}
.hero-stat-item { display: flex; flex-direction: column; }
.hero-stat-val { font-size: 22px; font-weight: 500; color: var(--blanc); font-family: var(--serif); }
.hero-stat-label { font-size: 11px; color: rgba(247,248,250,0.6); }
.hero-stat-divider { height: 0.5px; background: rgba(247,248,250,0.15); }

/* ─── Progress bar global ─────────────────────────────── */
.progress-section { background: var(--blanc); padding: 1.5rem 2rem; border-bottom: 0.5px solid var(--border); }
.progress-inner { max-width: 900px; margin: 0 auto; display: flex; align-items: center; gap: 1.5rem; }
.progress-label { font-size: 13px; color: var(--text-muted); white-space: nowrap; }
.progress-bar-wrap { flex: 1; height: 6px; background: var(--mist); border-radius: 10px; overflow: hidden; }
.progress-bar-fill { height: 100%; border-radius: 10px; background: linear-gradient(90deg, var(--dusty-blue), var(--gold)); }
.progress-pct { font-size: 13px; font-weight: 500; color: var(--deep-blue); white-space: nowrap; }
.progress-chips { display: flex; gap: 8px; }
.chip { font-size: 11px; padding: 3px 10px; border-radius: 20px; }
.chip-blue { background: var(--cool-grey); color: var(--deep-blue); }
.chip-gold { background: var(--gold-light); color: var(--gold-dark); }
.chip-mist { background: var(--mist); color: var(--text-muted); }

/* ─── Main layout ─────────────────────────────────────── */
main { max-width: 900px; margin: 0 auto; padding: 2.5rem 2rem; }
.section-header { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 1.25rem; }
.section-title { font-family: var(--serif); font-size: 1.25rem; font-weight: 400; color: var(--text-main); }
.section-link { font-size: 13px; color: var(--deep-blue); }
.section-link:hover { text-decoration: underline; }

/* ─── Course grid ─────────────────────────────────────── */
.course-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; margin-bottom: 3rem; }
.course-card { background: var(--blanc); border: 0.5px solid var(--border); border-radius: var(--radius-md); overflow: hidden; transition: box-shadow 0.2s, transform 0.15s; cursor: pointer; }
.course-card:hover { box-shadow: 0 4px 20px rgba(45,58,71,0.08); transform: translateY(-2px); }
.card-color-bar { height: 4px; }
.bar-blue { background: var(--dusty-blue); }
.bar-gold { background: var(--gold); }
.bar-steel { background: var(--steel); }
.bar-pale { background: var(--pale-blue); }
.card-body { padding: 1rem 1.1rem 1.1rem; }
.card-tag { display: inline-block; font-size: 10px; padding: 3px 8px; border-radius: 20px; margin-bottom: 0.6rem; font-weight: 500; }
.tag-psych { background: var(--cool-grey); color: var(--deep-blue); }
.tag-law   { background: var(--gold-light); color: var(--gold-dark); }
.tag-med   { background: var(--mist); color: var(--text-muted); }
.tag-exam  { background: var(--navy); color: var(--blanc); }
.card-title { font-family: var(--serif); font-size: 15px; color: var(--text-main); line-height: 1.35; margin-bottom: 0.4rem; }
.card-desc { font-size: 12px; color: var(--text-muted); line-height: 1.55; margin-bottom: 0.9rem; }
.card-meta { display: flex; align-items: center; gap: 0.75rem; font-size: 11px; color: var(--text-hint); margin-bottom: 0.75rem; }
.card-meta-item { display: flex; align-items: center; gap: 4px; }
.card-progress-wrap { height: 4px; background: var(--cool-grey); border-radius: 10px; overflow: hidden; margin-bottom: 0.6rem; }
.card-progress-fill { height: 100%; border-radius: 10px; }
.fill-blue { background: var(--dusty-blue); }
.fill-gold { background: var(--gold); }
.card-progress-label { font-size: 10px; color: var(--text-hint); }

/* ─── Themen-Übersicht ────────────────────────────────── */
.topics-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 0.75rem; margin-bottom: 3rem; }
.topic-item { background: var(--cool-grey); border-radius: var(--radius-sm); padding: 0.9rem 1rem; display: flex; align-items: center; gap: 0.75rem; cursor: pointer; border: 0.5px solid transparent; transition: border-color 0.15s, background 0.15s; }
.topic-item:hover { background: var(--blanc); border-color: var(--dusty-blue); }
.topic-icon { width: 32px; height: 32px; border-radius: 8px; background: var(--dusty-blue); display: flex; align-items: center; justify-content: center; font-size: 15px; flex-shrink: 0; }
.topic-icon.gold-bg { background: var(--gold-light); }
.topic-icon.navy-bg { background: var(--navy); }
.topic-icon.pale-bg { background: var(--pale-blue); }
.topic-name { font-size: 13px; color: var(--text-main); font-weight: 500; line-height: 1.3; }
.topic-count { font-size: 11px; color: var(--text-hint); }

/* ─── Prüfungssimulation banner ───────────────────────── */
.exam-banner { background: var(--navy); border-radius: var(--radius-md); padding: 1.5rem 2rem; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; margin-bottom: 3rem; flex-wrap: wrap; }
.exam-banner-title { font-family: var(--serif); font-size: 18px; color: var(--blanc); margin-bottom: 0.3rem; font-weight: 400; }
.exam-banner-sub { font-size: 13px; color: rgba(247,248,250,0.6); }
.exam-banner-meta { display: flex; gap: 1.5rem; margin-top: 0.75rem; }
.exam-meta-item { text-align: center; }
.exam-meta-val { font-size: 20px; font-weight: 500; color: var(--dusty-blue); }
.exam-meta-label { font-size: 10px; color: rgba(247,248,250,0.5); }

/* ─── Footer ──────────────────────────────────────────── */
footer { border-top: 0.5px solid var(--border); padding: 2rem; text-align: center; }
.footer-inner { max-width: 900px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem; }
.footer-logo { font-family: var(--serif); font-size: 15px; color: var(--text-main); font-style: italic; }
.footer-links { display: flex; gap: 1.5rem; }
.footer-link { font-size: 13px; color: var(--text-hint); }
.footer-link:hover { color: var(--deep-blue); }
.footer-note { font-size: 12px; color: var(--text-hint); }

code { font-family: var(--mono); font-size: 12px; background: var(--cool-grey); color: var(--deep-blue); padding: 2px 6px; border-radius: 4px; }

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--blanc); }
::-webkit-scrollbar-thumb { background: var(--mist); border-radius: 10px; }

/* ─── Login / Auth ────────────────────────────────────── */
.auth-wrap { min-height: calc(100vh - 60px); display: flex; align-items: center; justify-content: center; padding: 2rem; background: linear-gradient(160deg, var(--cool-grey) 0%, var(--blanc) 60%); }
.auth-card { background: var(--blanc); border: 0.5px solid var(--border); border-radius: var(--radius-lg); padding: 2.25rem 2rem; width: 100%; max-width: 380px; box-shadow: 0 8px 40px rgba(45,58,71,0.07); }
.auth-mark { width: 44px; height: 44px; border-radius: 10px; background: var(--deep-blue); display: flex; align-items: center; justify-content: center; color: var(--blanc); font-family: var(--serif); font-size: 20px; margin-bottom: 1.25rem; }
.auth-title { font-family: var(--serif); font-size: 1.5rem; font-weight: 400; margin-bottom: 0.3rem; }
.auth-sub { font-size: 13px; color: var(--text-muted); margin-bottom: 1.5rem; }
.field { margin-bottom: 1rem; }
.field label { display: block; font-size: 12px; color: var(--text-muted); margin-bottom: 0.35rem; }
.field input { width: 100%; font-family: var(--sans); font-size: 14px; padding: 11px 13px; border: 1px solid var(--mist); border-radius: var(--radius-sm); background: #fff; color: var(--text-main); transition: border-color 0.15s; }
.field input:focus { outline: none; border-color: var(--deep-blue); }
.auth-foot { font-size: 12px; color: var(--text-hint); text-align: center; margin-top: 1.25rem; }

/* ─── Meldungen ───────────────────────────────────────── */
.alert { font-size: 13px; padding: 10px 14px; border-radius: var(--radius-sm); margin-bottom: 1rem; }
.alert-err { background: var(--err-soft); color: var(--err); }
.alert-ok  { background: var(--ok-soft);  color: var(--ok); }
.badge { align-self: flex-start; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.badge.ok  { background: var(--ok-soft);  color: var(--ok); }
.badge.err { background: var(--err-soft); color: var(--err); }

/* ─── Mobile ──────────────────────────────────────────── */
@media (max-width: 720px) {
  nav { padding: 0 1rem; gap: 1rem; }
  .nav-links { gap: 1rem; }
  .nav-link { display: none; }
  .nav-link.active { display: inline; }
  .hero { padding: 2.5rem 1.25rem 2rem; }
  .hero-inner { grid-template-columns: 1fr; }
  .hero-title { font-size: 1.7rem; }
  .hero-stats { flex-direction: row; flex-wrap: wrap; justify-content: space-between; }
  .hero-stat-divider { display: none; }
  .progress-section { padding: 1.25rem; }
  .progress-inner { flex-wrap: wrap; gap: 0.75rem; }
  .progress-chips { width: 100%; }
  main { padding: 1.75rem 1.25rem; }
  .exam-banner { padding: 1.25rem; }
  .footer-inner { flex-direction: column; text-align: center; }
}

/* ─── Admin ───────────────────────────────────────────── */
.admin-bar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 1.5rem; }
.filter-chip { font-size: 12px; padding: 5px 12px; border-radius: 20px; background: var(--cool-grey); color: var(--text-muted); border: 0.5px solid transparent; }
.filter-chip:hover { border-color: var(--dusty-blue); }
.filter-chip.active { background: var(--deep-blue); color: var(--blanc); }
.qrow { display: flex; align-items: center; gap: 12px; padding: 0.8rem 1rem; background: var(--blanc); border: 0.5px solid var(--border); border-radius: var(--radius-sm); margin-bottom: 0.5rem; }
.qrow:hover { border-color: var(--dusty-blue); }
.qrow .q-stem { flex: 1; font-size: 13px; color: var(--text-main); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qrow .q-type { font-size: 10px; padding: 2px 8px; border-radius: 20px; background: var(--cool-grey); color: var(--deep-blue); white-space: nowrap; }
.qrow .q-mod { font-size: 11px; color: var(--text-hint); font-family: var(--mono); white-space: nowrap; }
.q-inactive { opacity: 0.5; }
.field textarea { width: 100%; font-family: var(--sans); font-size: 14px; padding: 11px 13px; border: 1px solid var(--mist); border-radius: var(--radius-sm); background: #fff; color: var(--text-main); line-height: 1.5; resize: vertical; }
.field textarea:focus, .field select:focus { outline: none; border-color: var(--deep-blue); }
.field select { width: 100%; font-family: var(--sans); font-size: 14px; padding: 11px 13px; border: 1px solid var(--mist); border-radius: var(--radius-sm); background: #fff; }
.opt-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.opt-row .opt-label { width: 24px; height: 24px; border-radius: 6px; background: var(--cool-grey); display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600; color: var(--deep-blue); flex-shrink: 0; }
.opt-row input[type=text] { flex: 1; font-size: 13px; padding: 8px 10px; border: 1px solid var(--mist); border-radius: var(--radius-sm); }
.opt-row label.corr { font-size: 11px; color: var(--text-muted); display: flex; align-items: center; gap: 4px; white-space: nowrap; }
.form-row { display: flex; gap: 1rem; flex-wrap: wrap; }
.form-row .field { flex: 1; min-width: 160px; }
.check-line { display: flex; gap: 1.5rem; align-items: center; margin: 0.5rem 0 1rem; font-size: 13px; color: var(--text-muted); }
