/* Bootsfahrschule Moser — maritim, freundlich, mobile-first */

:root {
  --navy: #0b3954;
  --navy-dark: #072a40;
  --teal: #087e8b;
  --sand: #f6f2ea;
  --white: #ffffff;
  --ink: #1c2b36;
  --muted: #5f7382;
  --ok: #2e7d32;
  --ok-bg: #e8f5e9;
  --bad: #c62828;
  --bad-bg: #fdecea;
  --radius: 12px;
  --shadow: 0 2px 10px rgba(11, 57, 84, .08);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--sand);
  line-height: 1.55;
}
main {
  max-width: 780px;
  margin: 0 auto;
  padding: 1.25rem 1rem 4rem;
}
h1 { font-size: 1.7rem; line-height: 1.25; }
h2 { font-size: 1.25rem; margin-top: 2rem; }
a { color: var(--teal); }
code { background: #eee; padding: 0 .3em; border-radius: 4px; }
.muted { color: var(--muted); font-weight: normal; font-size: .92em; }
.lead { font-size: 1.08rem; color: var(--muted); }
.crumbs { margin: .2rem 0 0; font-size: .9rem; }
.crumbs a { text-decoration: none; }

/* Topbar */
.topbar {
  background: var(--navy);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: .6rem 1rem;
  flex-wrap: wrap;
  position: sticky;
  top: 0;
  z-index: 10;
}
.brand { color: var(--white); text-decoration: none; font-size: 1.05rem; display: inline-flex; align-items: center; gap: .5rem; }
.brand-logo { background: var(--white); border-radius: 50%; padding: 2px; vertical-align: middle; }
.brand strong { letter-spacing: .02em; }
.topbar nav { display: flex; align-items: center; gap: .9rem; flex-wrap: wrap; }
.topbar nav a { color: #cfe3ee; text-decoration: none; font-size: .95rem; }
.topbar nav a:hover { color: var(--white); }
.nav-admin { border: 1px solid #cfe3ee55; padding: .1rem .5rem; border-radius: 6px; }
.footer { text-align: center; color: var(--muted); font-size: .85rem; padding: 1.5rem 1rem 2.5rem; }
.footer-links { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; margin-top: .5rem; }
.footer-links a { color: var(--muted); }
.konto-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.prose { max-width: 640px; }
.prose h2 { font-size: 1.15rem; margin-top: 1.6rem; }
.prose ul { padding-left: 1.2rem; }
.prose li { margin: .3rem 0; }

/* Buttons & Formulare */
.btn {
  display: inline-block;
  background: var(--teal);
  color: var(--white);
  border: 0;
  border-radius: var(--radius);
  padding: .65rem 1.2rem;
  font-size: 1rem;
  text-decoration: none;
  cursor: pointer;
}
.btn:hover { background: #066a75; }
.btn:disabled { opacity: .4; cursor: default; }
.btn-big { padding: .85rem 1.5rem; font-size: 1.05rem; }
.btn-small { padding: .4rem .8rem; font-size: .9rem; }
.btn-ghost { background: transparent; color: var(--teal); border: 2px solid var(--teal); }
.btn-ghost:hover { background: #087e8b14; }
.linklike { background: none; border: 0; color: var(--teal); cursor: pointer; font-size: .95rem; padding: 0; text-decoration: underline; }
.linklike.danger { color: var(--bad); }
.inline-form { display: inline; }
.danger-zone { margin-top: 3rem; padding-top: 1rem; border-top: 1px dashed #cbb; }

.form-page { max-width: 420px; margin: 2rem auto; background: var(--white); padding: 1.5rem; border-radius: var(--radius); box-shadow: var(--shadow); }
.form-wide { max-width: 640px; }
.stack { display: flex; flex-direction: column; gap: .9rem; }
.stack label { display: flex; flex-direction: column; gap: .3rem; font-weight: 600; font-size: .95rem; }
.stack input[type="text"], .stack input[type="email"], .stack input[type="password"],
.stack input[type="number"], .stack textarea {
  font: inherit; font-weight: normal;
  padding: .55rem .7rem;
  border: 1px solid #c8d2da;
  border-radius: 8px;
  background: var(--white);
}
.form-row { display: flex; gap: 1rem; flex-wrap: wrap; }
.check-label { flex-direction: row !important; align-items: center; gap: .5rem !important; }
.alert { background: var(--bad-bg); color: var(--bad); padding: .6rem .9rem; border-radius: 8px; }
.answers-fieldset { border: 1px solid #c8d2da; border-radius: 8px; display: flex; flex-direction: column; gap: .6rem; padding: .9rem; }
.answer-edit { display: flex; gap: .7rem; align-items: center; }
.answer-edit input[type="text"] { flex: 1; font: inherit; padding: .5rem .7rem; border: 1px solid #c8d2da; border-radius: 8px; }

/* Startseite */
.hero { text-align: center; padding: 2.5rem 0 1.5rem; }
.hero h1 { font-size: 2.1rem; }
.hero .lead { max-width: 34em; margin: 0 auto 1.5rem; }
.hero .btn { margin: .25rem; }
.hero-secondary { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.5rem; margin-top: 2rem; }
.steps { padding-left: 1.2rem; }
.steps li { margin: .5rem 0; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 1rem; margin-top: 2rem; }
.card { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.1rem; }
.card h3 { margin: .4rem 0 .3rem; font-size: 1.05rem; }
.card p { margin: 0; color: var(--muted); font-size: .92rem; }
.card-icon { font-size: 1.6rem; }

/* Themenliste */
.topic-list { display: flex; flex-direction: column; gap: .75rem; margin-top: 1rem; }
.topic-row {
  display: flex; gap: .9rem; align-items: center;
  background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: .9rem 1rem; text-decoration: none; color: var(--ink);
}
.topic-row:hover { outline: 2px solid var(--teal); }
.topic-icon { font-size: 1.7rem; }
.topic-main { flex: 1; display: flex; flex-direction: column; gap: .2rem; min-width: 0; }
.topic-title { font-weight: 700; }
.topic-desc { color: var(--muted); font-size: .88rem; }
.topic-meta { color: var(--muted); font-size: .8rem; text-align: right; white-space: nowrap; }
.bar { height: 6px; background: #e4ded2; border-radius: 3px; overflow: hidden; margin-top: .3rem; }
.bar-fill { display: block; height: 100%; background: var(--teal); border-radius: 3px; }

/* Lektionen */
.lesson-list { display: flex; flex-direction: column; gap: .5rem; margin-top: .75rem; }
.lesson-row {
  display: flex; gap: .7rem; align-items: center;
  background: var(--white); border-radius: 10px; box-shadow: var(--shadow);
  padding: .7rem .9rem; text-decoration: none; color: var(--ink);
}
.lesson-row .check { color: var(--muted); }
.lesson-row.is-done .check { color: var(--ok); font-weight: 700; }
.lesson { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.5rem; margin-top: 1rem; }
.lesson-body ul, .lesson-body ol { padding-left: 1.3rem; }
.lesson-done { margin-top: 1.5rem; }

/* Thomas-Tipp */
.thomas-tip {
  display: flex; gap: .8rem; align-items: flex-start;
  background: #fff8e8; border: 1px solid #f0dfae; border-radius: var(--radius);
  padding: .9rem 1rem; margin: 1.25rem 0;
}
.thomas-tip p { margin: .25rem 0 0; }
.thomas-avatar { font-size: 1.8rem; line-height: 1; }

/* Quiz */
.quiz-card { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.25rem; margin-top: 1rem; }
.quiz-count { color: var(--muted); font-size: .85rem; margin: 0; }
.quiz-text { font-size: 1.15rem; margin: .4rem 0 1rem; }
.quiz-answers { display: flex; flex-direction: column; gap: .6rem; }
.quiz-answer {
  display: flex; gap: .7rem; align-items: center;
  border: 1.5px solid #c8d2da; border-radius: 10px; padding: .7rem .8rem; cursor: pointer;
}
.quiz-answer:has(input:checked) { border-color: var(--teal); background: #087e8b0d; }
.quiz-answer.is-correct { border-color: var(--ok); background: var(--ok-bg); }
.quiz-answer.is-wrong { border-color: var(--bad); background: var(--bad-bg); }
.quiz-letter {
  background: var(--navy); color: var(--white); border-radius: 6px;
  width: 1.6rem; height: 1.6rem; display: inline-flex; align-items: center; justify-content: center;
  font-size: .85rem; font-weight: 700; flex-shrink: 0;
}
.quiz-actions { margin-top: 1rem; }
.quiz-feedback { margin-top: 1rem; padding-top: .75rem; border-top: 1px solid #eee; }
.quiz-feedback.ok > p:first-child strong { color: var(--ok); }
.quiz-feedback.nope > p:first-child strong { color: var(--bad); }
.quiz-result { text-align: center; }
.big-score { font-size: 2rem; font-weight: 800; color: var(--navy); margin: .5rem 0; }
.quiz-review h3 { margin-top: 0; font-size: 1.02rem; }
.img-placeholder {
  margin: .5rem 0 1rem; padding: 1rem;
  border: 2px dashed #b9c6d1; border-radius: 10px; background: #eef3f6;
  display: flex; gap: .7rem; align-items: center;
}
.img-placeholder .img-icon { font-size: 1.6rem; }
.img-placeholder figcaption { font-size: .9rem; color: #4a5a67; }
.qbadges { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: .5rem; }
.qbadge { font-size: .75rem; font-weight: 700; padding: .15rem .55rem; border-radius: 999px; }
.qbadge.beliebt { background: #fff2cc; color: #8a6d00; }
.qbadge.lvl-gut { background: #e3f0ff; color: #1a5fb4; }
.qbadge.lvl-kuer { background: #efe3ff; color: #6a2fb4; }

/* CTA-Box & Tabellen */
.cta-box { background: var(--navy); color: var(--white); border-radius: var(--radius); padding: 1.25rem 1.5rem; margin-top: 2rem; }
.cta-box h2 { margin-top: 0; }
.cta-box .btn { background: var(--white); color: var(--navy); font-weight: 700; }
.table { width: 100%; border-collapse: collapse; background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.table th, .table td { text-align: left; padding: .6rem .8rem; border-bottom: 1px solid #eee; font-size: .95rem; }
.table th { background: #f0ebe0; }

/* Fahrstunden & Konto */
.flash { background: var(--ok-bg); color: var(--ok); padding: .6rem .9rem; border-radius: 8px; }
.slot-list { display: flex; flex-direction: column; gap: .5rem; margin-top: .75rem; }
.slot-row {
  display: flex; gap: .8rem; align-items: center; flex-wrap: wrap;
  background: var(--white); border-radius: 10px; box-shadow: var(--shadow);
  padding: .7rem .9rem;
}
.slot-row.is-booked { border-left: 4px solid var(--teal); }
.slot-row.is-pending { border-left: 4px solid #e6a817; }
.slot-row.is-off { opacity: .55; }
.slot-when { font-weight: 700; white-space: nowrap; }
.slot-meta { color: var(--muted); font-size: .92rem; flex: 1; min-width: 12em; }
.lesson-report { flex-basis: 100%; margin: .3rem 0 0; font-size: .92rem; background: #fff8e8; border-radius: 8px; padding: .5rem .7rem; }
.request-card { background: var(--white); border-radius: 10px; box-shadow: var(--shadow); padding: .9rem 1rem; }
.request-card p { margin-top: 0; }
.slot-form { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; margin: .5rem 0 1rem; }
.slot-form input, .slot-form select { font: inherit; padding: .45rem .6rem; border: 1px solid #c8d2da; border-radius: 8px; background: var(--white); }
.cta-box textarea { width: 100%; font: inherit; padding: .55rem .7rem; border: 0; border-radius: 8px; }
.stat-row { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: 1rem; }
.stat {
  flex: 1; min-width: 130px; background: var(--white); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: .9rem 1rem; display: flex; flex-direction: column; gap: .15rem;
  text-decoration: none; color: var(--ink);
}
a.stat:hover { outline: 2px solid var(--teal); }
.stat-num { font-size: 1.35rem; font-weight: 800; color: var(--navy); }
.stat-label { color: var(--muted); font-size: .85rem; }
.stat-ok .stat-num { color: var(--ok); }
.stat-bad .stat-num { color: var(--bad); }
.saldo-ok { color: var(--ok); font-weight: 700; }
.saldo-bad { color: var(--bad); font-weight: 700; }
.check-list { list-style: none; padding: 0; display: flex; flex-direction: column; gap: .4rem; }
.check-item { display: flex; gap: .7rem; align-items: center; background: var(--white); border-radius: 10px; box-shadow: var(--shadow); padding: .6rem .9rem; }
.check-item .check-label-text { margin-left: auto; font-size: .8rem; color: var(--muted); }
.check-item.is-reif { border-left: 4px solid var(--ok); }
.check-item.is-geuebt { border-left: 4px solid var(--teal); }
.praxis-form { display: flex; gap: .3rem; flex-wrap: wrap; }
.praxis-btn { font: inherit; font-size: .82rem; padding: .25rem .6rem; border: 1px solid #c8d2da; border-radius: 999px; background: var(--white); cursor: pointer; }
.praxis-btn.active { background: var(--navy); color: var(--white); border-color: var(--navy); }
.admin-nav { display: flex; gap: .4rem; margin: 1rem 0 0; flex-wrap: wrap; }
.admin-nav a {
  text-decoration: none; color: var(--ink); background: var(--white);
  border-radius: 999px; padding: .35rem .9rem; box-shadow: var(--shadow); font-size: .95rem;
}
.admin-nav a.active { background: var(--navy); color: var(--white); }

@media (max-width: 560px) {
  .topic-meta { display: none; }
  h1 { font-size: 1.45rem; }
  .hero h1 { font-size: 1.7rem; }
}
