/* Prozessheld CRM -- Design-Tokens uebernommen von mein-prozessheld.de */
:root {
  --petrol: #0E3F3D;
  --teal: #2BBFB6;
  --signal: #7C3AED;
  --ink: #0B1F1E;
  --paper: #F7FAF9;
  --line: #E5EEEC;
  --muted: #5b716e;
  --danger: #c0392b;
  --ok: #1e7d6b;
  --radius: 12px;
  --shadow: 0 4px 18px rgba(11, 31, 30, 0.08);
  --font-body: 'Inter', system-ui, sans-serif;
  --font-display: 'Space Grotesk', 'Inter', sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.55;
}

h1, h2, h3 { font-family: var(--font-display); line-height: 1.2; }
a { color: var(--petrol); }
.muted { color: var(--muted); }
.small { font-size: .85rem; }

/* --- Topbar --- */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap;
  background: var(--petrol); color: #fff;
  padding: .7rem 1.1rem;
}
.brand { font-family: var(--font-display); font-weight: 700; color: #fff; text-decoration: none; font-size: 1.15rem; }
.brand span { color: var(--teal); }
.brand-lg { font-size: 1.6rem; }
.topbar nav { display: flex; gap: .3rem; flex-wrap: wrap; }
.topbar nav a {
  color: #fff; text-decoration: none; padding: .35rem .7rem;
  border-radius: 8px; font-size: .92rem; font-weight: 500;
}
.topbar nav a:hover { background: rgba(255,255,255,.12); }
.topbar nav a.logout { color: var(--teal); }

/* --- Layout --- */
.wrap { max-width: 880px; margin: 0 auto; padding: 1.4rem 1.1rem 3rem; }
.full { padding: 1.4rem 1.1rem 3rem; }
.public-wrap { max-width: 720px; margin: 0 auto; padding: 2rem 1.1rem 4rem; }
.auth-wrap { max-width: 400px; margin: 0 auto; padding: 3rem 1.1rem; }

.page-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.2rem; }
.page-head h1 { margin: 0; font-size: 1.7rem; }

/* --- Buttons --- */
.btn {
  display: inline-block; border: 0; border-radius: 999px; cursor: pointer;
  padding: .6rem 1.2rem; font-family: var(--font-body); font-weight: 600;
  font-size: .95rem; text-decoration: none; text-align: center; transition: filter .15s, transform .05s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--signal); color: #fff; }
.btn-primary:hover { filter: brightness(1.07); }
.btn-secondary { background: var(--petrol); color: #fff; }
.btn-secondary:hover { filter: brightness(1.12); }
.btn-ghost { background: transparent; color: var(--petrol); border: 1px solid var(--line); }
.btn-ghost:hover { background: var(--line); }
.btn-block { display: block; width: 100%; }
.btn-sm { padding: .35rem .8rem; font-size: .85rem; }

/* --- Alerts --- */
.alert { padding: .8rem 1rem; border-radius: var(--radius); margin-bottom: 1rem; font-weight: 500; }
.alert-success { background: #e3f6f1; color: var(--ok); }
.alert-error { background: #fbe6e3; color: var(--danger); }

/* --- Cards --- */
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.2rem 1.3rem; margin-bottom: 1.2rem; }
.card h2 { margin-top: 0; font-size: 1.15rem; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; }
.card-wide { grid-column: 1 / -1; }
.center-card { max-width: 460px; margin: 1.5rem auto; text-align: center; }

dl { display: grid; grid-template-columns: auto 1fr; gap: .3rem .8rem; margin: 0; }
dl dt { color: var(--muted); font-size: .85rem; }
dl dd { margin: 0; font-weight: 500; }

/* --- Forms --- */
label { display: block; margin-bottom: .8rem; font-weight: 500; font-size: .92rem; }
input[type=text], input[type=email], input[type=password], input[type=number],
input[type=date], input[type=time], select, textarea {
  width: 100%; padding: .55rem .7rem; margin-top: .25rem;
  border: 1px solid var(--line); border-radius: 9px; font-family: var(--font-body); font-size: .95rem;
  background: #fff; color: var(--ink);
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--teal); border-color: var(--teal); }
.check { display: flex; align-items: center; gap: .5rem; font-weight: 500; }
.check input { width: auto; margin: 0; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
.grid2 .span2 { grid-column: 1 / -1; }
.form-actions { display: flex; gap: .6rem; margin-top: .5rem; }

/* --- Auth --- */
.auth-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 2rem 1.6rem; text-align: center; }
.auth-card form { text-align: left; margin-top: 1rem; }

/* --- Kanban --- */
.kanban { display: flex; gap: .9rem; overflow-x: auto; padding-bottom: 1rem; }
.kanban-col { flex: 0 0 250px; background: #eef4f3; border-radius: var(--radius); padding: .6rem; }
.kanban-col > header { font-family: var(--font-display); font-weight: 600; font-size: .9rem; display: flex; justify-content: space-between; align-items: center; margin-bottom: .6rem; padding: 0 .2rem; }
.count { background: var(--petrol); color: #fff; border-radius: 999px; font-size: .72rem; padding: .05rem .5rem; }
.kanban-cards { display: flex; flex-direction: column; gap: .5rem; min-height: 30px; }
.lead-card { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: .6rem .7rem; }
.lead-card-main { display: block; text-decoration: none; color: var(--ink); }
.lead-card-main strong { display: block; }
.lead-card-main .muted { font-size: .82rem; }
.lead-card .quelle { display: block; font-size: .72rem; color: var(--muted); margin-top: .2rem; }
.stufe-form select { font-size: .78rem; padding: .25rem .3rem; margin-top: .45rem; }
.leer { color: var(--muted); text-align: center; margin: .3rem 0; }

.badge { display: inline-block; background: var(--teal); color: #073b37; border-radius: 999px; font-size: .72rem; font-weight: 600; padding: .1rem .55rem; margin-top: .25rem; }

/* --- Stufen-Leiste Detail --- */
.stufe-bar { display: flex; align-items: center; gap: .6rem; margin-bottom: 1.2rem; }
.stufe-bar label { margin: 0; }
.stufe-bar select { width: auto; min-width: 200px; margin: 0; }

.termin-liste { list-style: none; padding: 0; margin: 0; }
.termin-liste li { padding: .5rem 0; border-bottom: 1px solid var(--line); }
.termin-liste li.abgesagt { opacity: .55; text-decoration: line-through; }
.notizen { white-space: pre-wrap; }
.back { margin-top: 1.4rem; }

/* --- Einstellungen --- */
.typ-zeile { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; padding: .6rem 0; border-bottom: 1px solid var(--line); }
.typ-zeile input { width: auto; flex: 1 1 120px; margin: 0; }
.typ-zeile code { background: #eef4f3; padding: .2rem .4rem; border-radius: 6px; font-size: .8rem; }
.neu-block { margin-top: 1rem; }
.neu-block summary { cursor: pointer; font-weight: 600; }
.neu-block form { margin-top: .8rem; }
.verf-liste { list-style: none; padding: 0; }
.verf-liste li { display: flex; justify-content: space-between; align-items: center; padding: .4rem 0; border-bottom: 1px solid var(--line); }
.verf-liste form { margin: 0; }
.verf-neu { display: flex; gap: .5rem; align-items: center; margin-top: .9rem; flex-wrap: wrap; }
.verf-neu select, .verf-neu input { width: auto; margin: 0; }

/* --- Oeffentliche Buchung --- */
.public-head { margin-bottom: 1.6rem; }
.public-head.center { text-align: center; }
.public-head h1 { font-size: 2rem; margin: .4rem 0 .2rem; }
.typ-liste { display: grid; gap: 1rem; }
.typ-karte { display: block; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.2rem 1.3rem; text-decoration: none; color: var(--ink); transition: transform .08s, box-shadow .15s; }
.typ-karte:hover { transform: translateY(-2px); box-shadow: 0 8px 26px rgba(11,31,30,.12); }
.typ-karte strong { font-family: var(--font-display); font-size: 1.2rem; display: block; }
.typ-karte .dauer { display: inline-block; background: #eef4f3; color: var(--petrol); border-radius: 999px; font-size: .78rem; padding: .1rem .6rem; margin: .3rem 0; }
.typ-karte p { color: var(--muted); margin: .4rem 0; }
.typ-karte .weiter { color: var(--signal); font-weight: 600; }

.buchung-form h2 { font-size: 1.2rem; margin-top: 1.6rem; }
.slot-tag { margin-bottom: 1.2rem; }
.slot-tag h3 { font-size: 1rem; margin: .4rem 0; }
.slot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(82px, 1fr)); gap: .5rem; }
.slot { background: #fff; border: 1px solid var(--line); border-radius: 9px; padding: .55rem 0; font-family: var(--font-body); font-weight: 600; cursor: pointer; font-size: .95rem; }
.slot:hover { border-color: var(--teal); }
.slot.aktiv { background: var(--signal); color: #fff; border-color: var(--signal); }
.kontaktblock { margin-top: 1.6rem; border-top: 2px solid var(--line); padding-top: 1.2rem; }
.gewaehlt { background: #eef4f3; border-radius: 9px; padding: .5rem .8rem; }

.erfolg-haken { width: 64px; height: 64px; margin: 0 auto 1rem; border-radius: 50%; background: var(--teal); color: #fff; font-size: 2rem; display: flex; align-items: center; justify-content: center; }
.termin-zeit { font-family: var(--font-display); font-size: 1.2rem; font-weight: 600; }
.termin-aktionen { display: flex; gap: .6rem; justify-content: center; margin: 1rem 0 .4rem; }
.termin-aktionen form { margin: 0; }

/* --- Dashboard --- */
.funnel { display: flex; flex-direction: column; gap: .5rem; }
.funnel-row { display: grid; grid-template-columns: 160px 1fr 36px; align-items: center; gap: .6rem; }
.funnel-label { font-size: .85rem; color: var(--muted); }
.funnel-bar-track { background: #eef4f3; border-radius: 999px; height: 18px; overflow: hidden; }
.funnel-bar { background: var(--teal); height: 100%; min-width: 2px; border-radius: 999px; transition: width .3s; }
.funnel-count { font-family: var(--font-display); font-weight: 600; text-align: right; }
.quellen-liste { list-style: none; padding: 0; margin: 0; }
.quellen-liste li { display: flex; justify-content: space-between; align-items: center; padding: .35rem 0; border-bottom: 1px solid var(--line); }
.abo-link { display: block; background: #eef4f3; padding: .55rem .7rem; border-radius: 9px; font-size: .82rem; word-break: break-all; }

/* --- Realitaetscheck --- */
.frage { border: 0; border-top: 1px solid var(--line); padding: .8rem 0 .3rem; margin: 0; }
.frage legend { font-weight: 600; padding: 0; font-size: .95rem; }
.option { display: flex; align-items: flex-start; gap: .5rem; font-weight: 400; margin-bottom: .35rem; cursor: pointer; }
.option input { width: auto; margin: .25rem 0 0; }
.funnel-bar.schwach { background: #e8a13a; }
.check-score { display: flex; gap: 1.2rem; align-items: center; flex-wrap: wrap; }
.score-zahl { font-family: var(--font-display); font-size: 2.6rem; font-weight: 700; color: var(--petrol); line-height: 1; }
.score-zahl span { font-size: 1rem; color: var(--muted); }
.score-bereiche { flex: 1 1 280px; display: flex; flex-direction: column; gap: .4rem; }
.hebel-titel { font-size: 1rem; margin: 1rem 0 .3rem; }
.hebel-liste { margin: 0; padding-left: 1.2rem; }

/* --- Aufgaben --- */
.aufgaben-liste { list-style: none; padding: 0; margin: 0 0 .8rem; }
.aufgaben-liste li { display: flex; align-items: center; gap: .6rem; padding: .4rem 0; border-bottom: 1px solid var(--line); }
.aufgaben-liste li.erledigt .aufgabe-text { text-decoration: line-through; color: var(--muted); }
.aufgabe-text { flex: 1; display: flex; flex-direction: column; }
.check-form-inline { margin: 0; }
.kasten { background: none; border: 0; font-size: 1.2rem; cursor: pointer; line-height: 1; color: var(--petrol); }
.aufgabe-neu { display: flex; gap: .5rem; align-items: center; }
.aufgabe-neu input[type=text] { flex: 1; margin: 0; }
.aufgabe-neu input[type=date] { width: auto; margin: 0; }

/* --- Warteliste --- */
.warteliste-block { margin-top: 1.8rem; border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.2rem; background: #fff; }
.warteliste-block summary { cursor: pointer; font-weight: 600; font-family: var(--font-display); }
.warteliste-block form { margin-top: .8rem; }
.wl-tabelle { width: 100%; border-collapse: collapse; }
.wl-tabelle th, .wl-tabelle td { text-align: left; padding: .5rem .4rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.wl-tabelle th { font-size: .8rem; color: var(--muted); font-weight: 600; }
.wl-tabelle tr.benachrichtigt { opacity: .6; }
.wl-tabelle form { margin: 0; }

/* --- Termin-Liste (CRM) --- */
.termin-zeile { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .6rem 0; border-bottom: 1px solid var(--line); }
.termin-zeile.abgesagt { opacity: .55; text-decoration: line-through; }
.termin-zeile form { margin: 0; }

/* --- Verlauf / Aktivitaeten --- */
.notiz-neu { display: flex; gap: .5rem; margin-bottom: 1rem; }
.notiz-neu input { flex: 1; margin: 0; }
.verlauf { list-style: none; padding: 0; margin: 0; }
.verlauf li { display: flex; gap: .8rem; padding: .45rem 0; border-bottom: 1px solid var(--line); font-size: .92rem; }
.verlauf-zeit { color: var(--muted); font-size: .78rem; font-family: var(--font-mono, monospace); white-space: nowrap; min-width: 108px; }
.verlauf-notiz .verlauf-text { font-weight: 600; }
.verlauf-notiz::before { content: "✎ "; color: var(--signal); }

/* --- Responsive --- */
@media (max-width: 640px) {
  .grid2 { grid-template-columns: 1fr; }
  .stufe-bar { flex-direction: column; align-items: stretch; }
  .stufe-bar select { width: 100%; }
  .page-head h1 { font-size: 1.4rem; }
}
