@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;450;500;550;600;650;700;750;800&display=swap');

:root {
  --navy: #0b2440;
  --navy-dark: #081a30;
  --navy-light: #143459;
  --gold: #c9a227;
  --gold-deep: #a8861d;
  --gold-light: #e8c96a;
  --bg: #f6f7f9;
  --card: #ffffff;
  --border: #e7eaf0;
  --border-strong: #d9dee8;
  --text: #16212e;
  --text-muted: #69758a;
  --text-soft: #93a0b4;
  --green: #148a4d;
  --green-bg: #e7f7ee;
  --yellow: #9a6d00;
  --yellow-bg: #fcf3d9;
  --red: #d13c3c;
  --red-bg: #fceded;
  --blue: #2b62d9;
  --blue-bg: #ecf2fd;
  --gray: #8a97a6;
  --gray-bg: #eff2f6;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow-xs: 0 1px 2px rgba(16, 24, 40, 0.05);
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.05), 0 2px 8px rgba(16, 24, 40, 0.04);
  --shadow-md: 0 4px 12px rgba(16, 24, 40, 0.06), 0 12px 32px rgba(16, 24, 40, 0.07);
  --shadow-lg: 0 24px 64px rgba(8, 26, 48, 0.35);
  --ring: 0 0 0 3px rgba(43, 98, 217, 0.14);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14.5px;
  line-height: 1.55;
}

::selection { background: rgba(201, 162, 39, 0.25); }

a { color: var(--navy); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }

h1 { font-size: 1.45rem; font-weight: 750; letter-spacing: -0.022em; margin: 0 0 4px; }
h2 { font-size: 0.98rem; font-weight: 700; letter-spacing: -0.012em; margin: 0 0 14px; }
h3 { font-size: 0.88rem; font-weight: 700; letter-spacing: -0.008em; margin: 0 0 8px; }

/* dezente Scrollbars */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cdd4e0; border-radius: 10px; border: 3px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: #b3bccc; }

/* ---------- App-Gerüst ---------- */
.app-shell { display: flex; min-height: 100vh; }

.sidebar {
  width: 250px;
  min-width: 250px;
  background: linear-gradient(180deg, var(--navy-dark) 0%, var(--navy) 45%, #0d2a4b 100%);
  color: #c3cede;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  scrollbar-width: thin;
}
.sidebar::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.14); border: 3px solid var(--navy-dark); }

.sidebar-logo {
  padding: 22px 20px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}
.sidebar-logo .brand {
  font-size: 1.22rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
}
.sidebar-logo .brand span {
  background: linear-gradient(120deg, var(--gold-light), var(--gold));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.sidebar-logo .slogan {
  font-size: 0.66rem;
  color: #7d90aa;
  margin-top: 3px;
  letter-spacing: 0.02em;
}

.sidebar nav { flex: 1; padding: 10px 12px 24px; }
.nav-group-label {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #64789482;
  color: #64789e;
  padding: 18px 12px 6px;
}
.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 12px;
  margin: 1px 0;
  color: #b7c4d6;
  font-size: 0.84rem;
  font-weight: 500;
  border-radius: 9px;
  border-left: none;
  position: relative;
  transition: background 0.15s ease, color 0.15s ease;
}
.nav-link:hover { background: rgba(255, 255, 255, 0.06); color: #fff; text-decoration: none; }
.nav-link.active {
  background: rgba(255, 255, 255, 0.09);
  color: #fff;
  font-weight: 650;
}
.nav-link.active::before {
  content: "";
  position: absolute;
  left: -12px;
  top: 6px;
  bottom: 6px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: linear-gradient(180deg, var(--gold-light), var(--gold));
}
.nav-link .icon { width: 20px; text-align: center; font-size: 0.9rem; opacity: 0.92; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  padding: 10px 28px;
  min-height: 60px;
  display: flex;
  align-items: center;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 20;
}
.topbar form.search { flex: 1; max-width: 440px; }
.topbar input[type="search"] {
  width: 100%;
  padding: 8px 14px 8px 36px;
  border: 1px solid var(--border);
  border-radius: 99px;
  background: var(--bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2393a0b4' stroke-width='2.4' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") no-repeat 13px center;
  font-size: 0.84rem;
  font-family: var(--font);
  color: var(--text);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}
.topbar input[type="search"]:focus { outline: none; background-color: #fff; border-color: var(--border-strong); box-shadow: var(--ring); }
.topbar input[type="search"]::placeholder { color: var(--text-soft); }

.topbar select {
  padding: 7px 12px;
  border: 1px solid var(--border);
  border-radius: 9px;
  font-size: 0.82rem;
  font-weight: 550;
  font-family: var(--font);
  background: #fff;
  color: var(--text);
  max-width: 210px;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.topbar select:focus { outline: none; box-shadow: var(--ring); border-color: var(--border-strong); }

.topbar .user-chip { margin-left: auto; display: flex; align-items: center; gap: 12px; font-size: 0.84rem; }
.topbar .user-name { font-weight: 600; letter-spacing: -0.01em; }
.topbar .avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--navy-light), var(--navy));
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  letter-spacing: 0.03em;
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.18);
}
.topbar .role-badge {
  background: var(--gray-bg);
  color: var(--text-muted);
  border-radius: 99px;
  padding: 3px 11px;
  font-size: 0.68rem;
  font-weight: 650;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.content { padding: 30px 32px 48px; max-width: 1320px; width: 100%; margin: 0 auto; }

.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.page-head .sub { color: var(--text-muted); font-size: 0.84rem; margin-top: 2px; }

/* ---------- Karten & Kacheln ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 22px;
  margin-bottom: 20px;
}
.card h2 { display: flex; align-items: center; gap: 8px; color: var(--text); }

.grid { display: grid; gap: 18px; margin-bottom: 20px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 1000px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 700px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

.kpi-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  padding: 7px 0;
  border-bottom: 1px solid #f0f2f6;
  font-size: 0.86rem;
}
.kpi-row:last-child { border-bottom: none; }
.kpi-row .label { color: var(--text-muted); font-weight: 450; }
.kpi-row .value { font-weight: 650; font-variant-numeric: tabular-nums; text-align: right; letter-spacing: -0.01em; }

/* ---------- Ampeln & Badges ---------- */
.dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 7px;
  vertical-align: middle;
  box-shadow: 0 0 0 3px transparent;
}
.dot.green { background: #1fae63; box-shadow: 0 0 0 3px rgba(31, 174, 99, 0.16); }
.dot.yellow { background: #e0a80c; box-shadow: 0 0 0 3px rgba(224, 168, 12, 0.18); }
.dot.red { background: #e14d4d; box-shadow: 0 0 0 3px rgba(225, 77, 77, 0.16); }
.dot.gray { background: var(--gray); box-shadow: 0 0 0 3px rgba(138, 151, 166, 0.15); }
.dot.blue { background: #3b74e8; box-shadow: 0 0 0 3px rgba(59, 116, 232, 0.15); }

.badge {
  display: inline-block;
  padding: 2.5px 10px;
  border-radius: 99px;
  font-size: 0.7rem;
  font-weight: 650;
  letter-spacing: 0.005em;
  white-space: nowrap;
}
.badge.green { background: var(--green-bg); color: var(--green); box-shadow: inset 0 0 0 1px rgba(20, 138, 77, 0.14); }
.badge.yellow { background: var(--yellow-bg); color: var(--yellow); box-shadow: inset 0 0 0 1px rgba(154, 109, 0, 0.14); }
.badge.red { background: var(--red-bg); color: var(--red); box-shadow: inset 0 0 0 1px rgba(209, 60, 60, 0.14); }
.badge.gray { background: var(--gray-bg); color: var(--text-muted); box-shadow: inset 0 0 0 1px rgba(138, 151, 166, 0.18); }
.badge.blue { background: var(--blue-bg); color: var(--blue); box-shadow: inset 0 0 0 1px rgba(43, 98, 217, 0.14); }

.warn-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 9px 13px;
  border-radius: var(--radius-sm);
  margin-bottom: 7px;
  font-size: 0.84rem;
  line-height: 1.45;
}
.warn-item.red { background: var(--red-bg); box-shadow: inset 0 0 0 1px rgba(209, 60, 60, 0.1); }
.warn-item.yellow { background: var(--yellow-bg); box-shadow: inset 0 0 0 1px rgba(154, 109, 0, 0.1); }
.warn-item a { font-weight: 550; }

/* ---------- Tabellen ---------- */
.table-wrap { overflow-x: auto; border-radius: calc(var(--radius) - 1px); }
table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
  background: var(--card);
}
table.data th {
  text-align: left;
  padding: 11px 14px;
  background: #fafbfd;
  border-bottom: 1px solid var(--border);
  color: var(--text-soft);
  font-size: 0.66rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  white-space: nowrap;
}
table.data td { padding: 11px 14px; border-bottom: 1px solid #f0f2f6; vertical-align: top; }
table.data tbody tr { transition: background 0.12s ease; }
table.data tbody tr:hover td { background: #f8fafd; }
table.data tbody tr:last-child td { border-bottom: none; }
table.data td.num, table.data th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.data tr.total td {
  font-weight: 750;
  border-top: 2px solid var(--navy);
  border-bottom: none;
  background: #fafbfd;
  letter-spacing: -0.01em;
}

/* ---------- Formulare ---------- */
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px 20px; }
@media (max-width: 700px) { .form-grid { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: 5px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 0.74rem; font-weight: 650; color: var(--text-muted); letter-spacing: 0.01em; }
.field label .req { color: var(--red); }
.field input, .field select, .field textarea {
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-family: var(--font);
  background: #fff;
  color: var(--text);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.field textarea { min-height: 82px; resize: vertical; line-height: 1.5; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: #b9c8e6;
  box-shadow: var(--ring);
}
.field input::placeholder, .field textarea::placeholder { color: var(--text-soft); }
.field .help { font-size: 0.72rem; color: var(--text-soft); line-height: 1.4; }

.form-section-title {
  grid-column: 1 / -1;
  font-size: 0.7rem;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--navy);
  border-bottom: 1px solid var(--border);
  padding-bottom: 6px;
  margin-top: 12px;
}

.checklist-box {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  background: #fbfcfe;
}
.checklist-box label {
  display: flex;
  gap: 9px;
  align-items: center;
  font-size: 0.85rem;
  font-weight: 450;
  color: var(--text);
  cursor: pointer;
}
.checklist-box input[type="checkbox"] { accent-color: var(--navy); width: 15px; height: 15px; cursor: pointer; }
input[type="checkbox"] { accent-color: var(--navy); }

.form-footer {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}
.autosave-note { font-size: 0.76rem; color: var(--text-soft); }
.autosave-note.saved { color: var(--green); font-weight: 550; }

.draft-banner {
  background: var(--blue-bg);
  border: 1px solid rgba(43, 98, 217, 0.18);
  border-radius: var(--radius-sm);
  padding: 11px 16px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.84rem;
  flex-wrap: wrap;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8.5px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-size: 0.84rem;
  font-weight: 650;
  font-family: var(--font);
  letter-spacing: -0.005em;
  cursor: pointer;
  background: var(--navy);
  color: #fff;
  box-shadow: var(--shadow-xs);
  transition: background 0.15s ease, transform 0.12s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.btn:hover { background: var(--navy-light); text-decoration: none; transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.btn:active { transform: translateY(0); }
.btn.gold {
  background: linear-gradient(135deg, #d6b23e, var(--gold) 55%, var(--gold-deep));
  color: #241b04;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.18);
}
.btn.gold:hover { background: linear-gradient(135deg, #e0bd4e, #d0ab30 55%, #b3921f); }
.btn.secondary { background: #fff; color: var(--navy); border-color: var(--border-strong); box-shadow: var(--shadow-xs); }
.btn.secondary:hover { background: #f8fafc; border-color: #c8d0dd; }
.btn.danger { background: #fff; color: var(--red); border-color: rgba(209, 60, 60, 0.35); }
.btn.danger:hover { background: var(--red-bg); border-color: var(--red); }
.btn.small { padding: 4.5px 12px; font-size: 0.76rem; border-radius: 8px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.btn:focus-visible { outline: none; box-shadow: var(--ring); }

.error-box {
  background: var(--red-bg);
  color: var(--red);
  border: 1px solid rgba(209, 60, 60, 0.18);
  border-radius: var(--radius-sm);
  padding: 11px 16px;
  margin-bottom: 14px;
  font-size: 0.86rem;
  font-weight: 500;
}

/* ---------- Login ---------- */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(900px 500px at 85% -10%, rgba(201, 162, 39, 0.16), transparent 60%),
    radial-gradient(700px 500px at -10% 110%, rgba(43, 98, 217, 0.14), transparent 55%),
    linear-gradient(150deg, var(--navy-dark) 0%, var(--navy) 55%, #0f2c50 100%);
  padding: 20px;
}
.login-card {
  background: #fff;
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
  padding: 42px 40px;
  width: 100%;
  max-width: 410px;
}
.login-card .brand { font-size: 1.7rem; font-weight: 800; letter-spacing: -0.03em; color: var(--navy); }
.login-card .brand span {
  background: linear-gradient(120deg, var(--gold), var(--gold-deep));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.login-card .slogan { color: var(--text-muted); font-size: 0.8rem; margin-bottom: 28px; }

/* ---------- Filterleiste ---------- */
.filter-bar { display: flex; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; align-items: center; }
.filter-bar select, .filter-bar input {
  padding: 7px 12px;
  border: 1px solid var(--border);
  border-radius: 9px;
  font-size: 0.82rem;
  font-family: var(--font);
  background: #fff;
  color: var(--text);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.filter-bar select:focus, .filter-bar input:focus { outline: none; box-shadow: var(--ring); border-color: var(--border-strong); }

/* ---------- Fortschrittsbalken ---------- */
.progress-track { background: var(--gray-bg); border-radius: 99px; height: 7px; overflow: hidden; }
.progress-fill {
  background: linear-gradient(90deg, var(--gold-deep), var(--gold) 60%, var(--gold-light));
  height: 100%;
  border-radius: 99px;
  transition: width 0.4s ease;
}

/* ---------- Mobil ---------- */
.menu-toggle { display: none; background: none; border: none; font-size: 1.3rem; cursor: pointer; color: var(--navy); }
@media (max-width: 860px) {
  .menu-toggle { display: block; }
  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    z-index: 50;
    transform: translateX(-100%);
    transition: transform 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  }
  .sidebar.open { transform: translateX(0); box-shadow: 0 0 60px rgba(0, 0, 0, 0.45); }
  .content { padding: 18px 16px 40px; }
  .topbar { padding: 10px 14px 10px 52px; }
  .topbar .user-chip .user-name, .topbar .role-badge { display: none; }
  .page-head { margin-bottom: 16px; }
  .card { padding: 16px; }
}

/* ---------- Druck (PDF-Export über Drucken) ---------- */
@media print {
  .sidebar, .topbar, .no-print, .btn, .filter-bar { display: none !important; }
  .content { padding: 0; max-width: none; }
  .card { box-shadow: none; border: 1px solid #ccc; break-inside: avoid; }
  body { background: #fff; font-size: 12px; }
}

/* ---------- Icon-Chips & Überschriften mit Icon ---------- */
.icon-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: var(--blue-bg);
  color: var(--navy);
  flex-shrink: 0;
}
.icon-chip.lg { width: 38px; height: 38px; border-radius: 11px; }
.icon-chip.gold { background: linear-gradient(135deg, rgba(201, 162, 39, 0.18), rgba(201, 162, 39, 0.1)); color: var(--gold-deep); }
.icon-chip.green { background: var(--green-bg); color: var(--green); }
.icon-chip.red { background: var(--red-bg); color: var(--red); }
.icon-chip.yellow { background: var(--yellow-bg); color: var(--yellow); }

h1.with-icon { display: flex; align-items: center; gap: 12px; }
.card h2 .icon-chip { margin-right: 2px; }
.nav-link .icon { opacity: 0.8; }
.nav-link.active .icon, .nav-link:hover .icon { opacity: 1; }

.reco-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  border-left: 3px solid var(--gold);
  padding: 16px 20px;
}

/* ---------- Animationen ---------- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.content > * { animation: fadeUp 0.5s cubic-bezier(0.22, 0.68, 0.32, 1) both; }
.content > *:nth-child(2) { animation-delay: 0.06s; }
.content > *:nth-child(3) { animation-delay: 0.12s; }
.content > *:nth-child(4) { animation-delay: 0.18s; }
.content > *:nth-child(5) { animation-delay: 0.24s; }
.content > *:nth-child(n + 6) { animation-delay: 0.3s; }
.grid > .card { animation: fadeUp 0.55s cubic-bezier(0.22, 0.68, 0.32, 1) both; }
.grid > .card:nth-child(2) { animation-delay: 0.08s; }
.grid > .card:nth-child(3) { animation-delay: 0.16s; }

.card { transition: box-shadow 0.25s ease, transform 0.25s ease; }
.grid > .card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

table.data tbody tr td:first-child a { transition: color 0.15s ease; }
table.data tbody tr:hover td:first-child a { color: var(--blue); }

/* ---------- Login: Split-Layout ---------- */
.login-split {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  width: 100%;
  max-width: 1020px;
  min-height: 600px;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  animation: fadeUp 0.6s cubic-bezier(0.22, 0.68, 0.32, 1) both;
}
.login-hero {
  position: relative;
  background:
    radial-gradient(600px 400px at 110% -20%, rgba(201, 162, 39, 0.22), transparent 55%),
    radial-gradient(500px 400px at -20% 120%, rgba(43, 98, 217, 0.25), transparent 55%),
    linear-gradient(160deg, var(--navy-dark) 0%, var(--navy) 60%, #10315b 100%);
  color: #dce5f0;
  padding: 52px 48px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
}
.login-hero::after {
  content: "";
  position: absolute;
  inset: -50%;
  background: radial-gradient(400px 300px at 70% 30%, rgba(201, 162, 39, 0.1), transparent 60%);
  animation: heroGlow 9s ease-in-out infinite alternate;
  pointer-events: none;
}
@keyframes heroGlow {
  from { transform: translate(0, 0); }
  to { transform: translate(-6%, 8%); }
}
.login-hero .brand { font-size: 1.9rem; font-weight: 800; letter-spacing: -0.03em; color: #fff; }
.login-hero .brand span {
  background: linear-gradient(120deg, var(--gold-light), var(--gold));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.login-hero .slogan { color: #93a7c2; font-size: 0.86rem; margin-top: 4px; }
.login-hero-features { display: flex; flex-direction: column; gap: 22px; margin: 40px 0; position: relative; }
.login-feature { display: flex; gap: 14px; align-items: flex-start; animation: fadeUp 0.6s cubic-bezier(0.22, 0.68, 0.32, 1) both; }
.login-feature:nth-child(1) { animation-delay: 0.15s; }
.login-feature:nth-child(2) { animation-delay: 0.28s; }
.login-feature:nth-child(3) { animation-delay: 0.41s; }
.login-feature .icon-chip {
  background: rgba(255, 255, 255, 0.08);
  color: var(--gold-light);
  width: 38px;
  height: 38px;
  border-radius: 11px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.09);
}
.login-feature strong { color: #fff; display: block; font-size: 0.9rem; letter-spacing: -0.01em; }
.login-feature p { margin: 2px 0 0; font-size: 0.78rem; color: #93a7c2; line-height: 1.5; }
.login-hero .hero-foot { font-size: 0.7rem; color: #64789e; position: relative; }

.login-form-panel { background: #fff; padding: 52px 48px; display: flex; flex-direction: column; justify-content: center; }
.login-form-panel h2 { font-size: 1.25rem; letter-spacing: -0.02em; margin-bottom: 4px; }
.login-form-panel .form-sub { color: var(--text-muted); font-size: 0.84rem; margin-bottom: 28px; }

@media (max-width: 860px) {
  .login-split { grid-template-columns: 1fr; min-height: 0; max-width: 440px; }
  .login-hero { padding: 32px 30px; }
  .login-hero-features { display: none; }
  .login-form-panel { padding: 34px 30px; }
}

/* ---------- Reduzierte Bewegung respektieren ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

/* ---------- Dashboard: KPI-Kacheln & Cockpit ---------- */
.dash-head-right { display: flex; align-items: center; gap: 10px; }
.date-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 13px;
  border-radius: 99px;
  background: #fff;
  border: 1px solid var(--border);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
}

.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 20px; }
@media (max-width: 1100px) { .stat-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .stat-grid { grid-template-columns: 1fr; } }

.stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 18px 20px 16px;
  animation: fadeUp 0.55s cubic-bezier(0.22, 0.68, 0.32, 1) both;
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}
.stat-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.stat-grid .stat-card:nth-child(2) { animation-delay: 0.07s; }
.stat-grid .stat-card:nth-child(3) { animation-delay: 0.14s; }
.stat-grid .stat-card:nth-child(4) { animation-delay: 0.21s; }

.stat-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.stat-label { font-size: 0.74rem; font-weight: 650; color: var(--text-muted); letter-spacing: 0.01em; }
.stat-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: var(--blue-bg);
  color: var(--navy);
}
.stat-value { font-size: 1.5rem; font-weight: 750; letter-spacing: -0.03em; line-height: 1.15; }
.stat-sub { font-size: 0.76rem; color: var(--text-muted); margin-top: 6px; }
.delta { font-weight: 700; }
.delta.good { color: var(--green); }
.delta.up-bad { color: var(--red); }

.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.card-head h2 { margin: 0; }
.count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  border-radius: 99px;
  background: var(--gray-bg);
  color: var(--text-muted);
  font-size: 0.7rem;
  font-weight: 700;
  margin-left: 8px;
}
.link-more { font-size: 0.76rem; font-weight: 650; color: var(--blue); white-space: nowrap; }
.link-more:hover { color: var(--navy); }

.donut-row { display: flex; align-items: center; gap: 18px; padding: 4px 0 14px; border-bottom: 1px solid #f0f2f6; margin-bottom: 8px; }
.donut-caption { display: flex; flex-direction: column; gap: 3px; }
.donut-caption strong { font-size: 0.88rem; letter-spacing: -0.01em; }
.donut-caption span { font-size: 0.76rem; color: var(--text-muted); }

.mini-note { font-size: 0.72rem; color: var(--text-soft); margin: 12px 0 0; line-height: 1.5; }

.risk-list { display: flex; flex-direction: column; }
.risk-row { padding: 11px 0; border-bottom: 1px solid #f0f2f6; }
.risk-row:last-child { border-bottom: none; }
.risk-name { display: flex; align-items: center; font-size: 0.85rem; font-weight: 650; letter-spacing: -0.005em; }
.risk-text { font-size: 0.8rem; color: var(--text); margin-top: 3px; padding-left: 15px; }
.risk-hint { font-size: 0.74rem; color: var(--text-muted); margin-top: 1px; padding-left: 15px; }

.quick-bar {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
  padding: 14px 18px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.quick-label { font-size: 0.76rem; font-weight: 650; color: var(--text-muted); margin-right: 4px; }
.quick-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 13px;
  border-radius: 99px;
  border: 1px solid var(--border-strong);
  background: #fff;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--navy);
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.12s ease;
}
.quick-btn:hover { background: var(--blue-bg); border-color: #c3d3f2; text-decoration: none; transform: translateY(-1px); }

table.data.slim th { padding: 8px 12px; }
table.data.slim td { padding: 8px 12px; }

.btn svg { flex-shrink: 0; }

/* ================= Bauablauf-Module (Zeitplan / Ausschreibung / Schreiben) ================= */

/* Unter-Navigation (Tabs) */
.subnav { display: flex; gap: 6px; flex-wrap: wrap; margin: 14px 0 18px; }
.subnav a {
  padding: 6px 14px; border-radius: 9px; font-size: 0.82rem; font-weight: 600;
  color: var(--text-muted); background: #fff; border: 1px solid var(--border);
}
.subnav a:hover { text-decoration: none; color: var(--navy); border-color: var(--border-strong); }
.subnav a.active { background: var(--navy); color: #fff; border-color: var(--navy); }

/* KPI-Zeile */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 18px; }
.kpi { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow-xs); }
.kpi .kpi-label { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-soft); }
.kpi .kpi-value { font-size: 1.35rem; font-weight: 750; letter-spacing: -0.02em; margin-top: 2px; }
.kpi .kpi-sub { font-size: 0.72rem; color: var(--text-muted); margin-top: 2px; }
.kpi.gold .kpi-value { color: var(--gold-deep); }
.kpi.red .kpi-value { color: var(--red); }
.kpi.green .kpi-value { color: var(--green); }

/* Gantt */
.gantt-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; }
.gantt { display: grid; min-width: 900px; font-size: 0.78rem; }
.gantt .g-head { position: sticky; top: 0; background: #f8fafc; border-bottom: 1px solid var(--border-strong); font-weight: 700; color: var(--text-muted); z-index: 2; }
.gantt .g-left {
  position: sticky; left: 0; background: #fff; border-right: 1px solid var(--border-strong);
  padding: 8px 12px; z-index: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.gantt .g-head.g-left { background: #f8fafc; z-index: 3; }
.gantt .g-row { display: contents; }
.gantt .g-cells { position: relative; border-bottom: 1px solid #f0f2f6; }
.gantt .g-weekcol { position: absolute; top: 0; bottom: 0; border-left: 1px solid #f0f2f6; }
.gantt .g-weekcol.weekend { background: #fafbfd; }
.gantt .g-today { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--gold); z-index: 1; }
.g-bar { position: absolute; height: 16px; top: 50%; margin-top: -8px; border-radius: 5px; overflow: hidden; }
.g-bar .g-fill { position: absolute; inset: 0; width: var(--p, 0%); background: rgba(11, 36, 64, 0.45); }
.g-bar.blue { background: var(--blue-bg); box-shadow: inset 0 0 0 1.5px var(--blue); }
.g-bar.green { background: var(--green-bg); box-shadow: inset 0 0 0 1.5px var(--green); }
.g-bar.red { background: var(--red-bg); box-shadow: inset 0 0 0 1.5px var(--red); }
.g-bar.gray { background: var(--gray-bg); box-shadow: inset 0 0 0 1.5px var(--gray); }
.g-bar.yellow { background: var(--yellow-bg); box-shadow: inset 0 0 0 1.5px var(--yellow); }
.g-baseline { position: absolute; height: 4px; top: 50%; margin-top: 10px; border-radius: 2px; background: #c9d2e0; }
.g-overrun { position: absolute; height: 16px; top: 50%; margin-top: -8px; background: repeating-linear-gradient(45deg, rgba(209,60,60,.25) 0 4px, rgba(209,60,60,.45) 4px 8px); border-radius: 0 5px 5px 0; }
.g-milestone { position: absolute; width: 12px; height: 12px; top: 50%; margin-top: -6px; transform: rotate(45deg); background: var(--gold); border: 1.5px solid var(--gold-deep); border-radius: 2px; }
.g-kritisch { color: var(--red); font-weight: 700; }

/* Kanban */
.kanban { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 10px; align-items: flex-start; }
.kanban-col { min-width: 240px; width: 240px; flex-shrink: 0; background: #eef1f6; border: 1px solid var(--border); border-radius: var(--radius); }
.kanban-col.drag-over { outline: 2px dashed var(--navy); outline-offset: -2px; background: var(--blue-bg); }
.kanban-col-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; font-size: 0.78rem; font-weight: 700; }
.kanban-col-head .count { background: #fff; border: 1px solid var(--border); border-radius: 99px; padding: 0 8px; font-size: 0.7rem; color: var(--text-muted); }
.kanban-cards { display: flex; flex-direction: column; gap: 8px; padding: 0 8px 10px; min-height: 60px; }
.kanban-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 12px; box-shadow: var(--shadow-xs); cursor: grab; }
.kanban-card:active { cursor: grabbing; }
.kanban-card:hover { box-shadow: var(--shadow-sm); border-color: var(--border-strong); }
.kanban-card .kc-nr { font-size: 0.68rem; font-weight: 700; color: var(--text-soft); }
.kanban-card .kc-title { font-size: 0.82rem; font-weight: 650; margin: 1px 0 4px; }
.kanban-card .kc-meta { font-size: 0.72rem; color: var(--text-muted); display: flex; flex-wrap: wrap; gap: 4px 10px; }
.kanban-card .kc-progress { height: 5px; border-radius: 3px; background: #eef1f6; margin-top: 8px; overflow: hidden; }
.kanban-card .kc-progress i { display: block; height: 100%; background: var(--navy); border-radius: 3px; }

/* Fortschrittsbalken generisch */
.mini-progress { height: 7px; border-radius: 4px; background: #edf0f5; overflow: hidden; }
.mini-progress i { display: block; height: 100%; border-radius: 4px; background: var(--navy); }
.mini-progress i.green { background: var(--green); }
.mini-progress i.gold { background: var(--gold); }
.mini-progress i.red { background: var(--red); }

/* Eskalationsstufen */
.stufe-dots { display: inline-flex; gap: 3px; vertical-align: middle; }
.stufe-dots i { width: 8px; height: 8px; border-radius: 50%; background: #dde3ec; }
.stufe-dots i.on { background: var(--red); }
.stufe-dots i.on.low { background: var(--yellow); }

/* Brief-Layout (Druck) */
.letter-sheet { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 42px 48px; max-width: 820px; }
.letter-sheet .letter-head { display: flex; justify-content: space-between; border-bottom: 2px solid var(--navy); padding-bottom: 14px; margin-bottom: 26px; }
.letter-sheet pre { font-family: var(--font); white-space: pre-wrap; font-size: 0.9rem; line-height: 1.65; margin: 0; }
.letter-sheet .letter-foot { margin-top: 30px; padding-top: 12px; border-top: 1px solid var(--border); font-size: 0.7rem; color: var(--text-muted); }
@media print {
  .letter-sheet { border: none; padding: 0; }
  .subnav, .kpi-grid { display: none !important; }
}

/* Positions-/Vergleichstabellen */
.pos-note { font-size: 0.72rem; color: var(--text-muted); }
.cell-missing { color: var(--red); font-weight: 650; }
.cell-best { background: var(--green-bg) !important; font-weight: 700; }

/* Checklisten */
.checklist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.checklist li { display: flex; align-items: flex-start; gap: 9px; font-size: 0.85rem; }
.checklist input[type="checkbox"] { width: 16px; height: 16px; margin-top: 2px; accent-color: var(--navy); }
.checklist li.done span { color: var(--text-soft); text-decoration: line-through; }

/* Zeitleiste Kommunikationsakte */
.timeline { position: relative; margin: 0; padding: 0 0 0 22px; list-style: none; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 4px; bottom: 4px; width: 2px; background: #e3e8f0; border-radius: 2px; }
.timeline li { position: relative; padding: 0 0 16px; }
.timeline li::before { content: ""; position: absolute; left: -20px; top: 4px; width: 10px; height: 10px; border-radius: 50%; background: #fff; border: 2.5px solid var(--navy); }
.timeline li.in::before { border-color: var(--gold); }
.timeline .tl-date { font-size: 0.7rem; color: var(--text-soft); font-weight: 600; }
.timeline .tl-title { font-size: 0.85rem; font-weight: 650; }
.timeline .tl-body { font-size: 0.8rem; color: var(--text-muted); margin-top: 2px; }

/* ---------- Google-Maps-Adresslink ---------- */
.maps-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--blue);
  margin-top: 3px;
}
.maps-link:hover { color: var(--navy); text-decoration: none; }
.maps-link svg { flex-shrink: 0; }
td .maps-link { font-size: inherit; font-weight: 500; margin-top: 0; }

/* ---------- Assistent ---------- */
.quick-btn.active {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
}
.quick-btn.active:hover { background: var(--navy-light); }

.answer-card { padding: 24px; }
.answer-head { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 18px; }
.answer-head h2 { font-size: 1.12rem; letter-spacing: -0.02em; }
.answer-summary { margin: 4px 0 0; font-size: 0.86rem; color: var(--text-muted); line-height: 1.55; }

.answer-lines { display: flex; flex-direction: column; border-top: 1px solid var(--border); }
.answer-line {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 2px;
  border-bottom: 1px solid #f0f2f6;
  font-size: 0.88rem;
}
.answer-line:last-child { border-bottom: none; }
.answer-line .dot { margin-top: 7px; }
.answer-detail { font-size: 0.8rem; color: var(--text-muted); margin-top: 2px; line-height: 1.5; }
.answer-amount {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  margin-left: auto;
  padding-left: 12px;
}
.answer-line.critical .answer-amount { color: var(--red); }
.answer-line.good .answer-amount { color: var(--green); }

/* ---------- Priorisierte Empfehlungen (Dashboard) ---------- */
.insight-list { display: flex; flex-direction: column; }
.insight-row {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  padding: 12px 0;
  border-bottom: 1px solid #f0f2f6;
}
.insight-row:last-child { border-bottom: none; }
.insight-rank {
  width: 22px;
  height: 22px;
  border-radius: 7px;
  background: var(--gray-bg);
  color: var(--text-muted);
  font-size: 0.7rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}
.insight-row.critical .insight-rank { background: var(--red-bg); color: var(--red); }
.insight-row.opportunity .insight-rank { background: var(--green-bg); color: var(--green); }
.insight-row.warning .insight-rank { background: var(--yellow-bg); color: var(--yellow); }
.insight-title { font-weight: 650; font-size: 0.87rem; letter-spacing: -0.005em; }
.insight-action { font-size: 0.79rem; color: var(--text-muted); margin-top: 2px; line-height: 1.5; }
.insight-amount {
  font-weight: 700;
  font-size: 0.87rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  margin-left: auto;
  padding-left: 10px;
  text-align: right;
}
.insight-amount small { display: block; font-size: 0.68rem; font-weight: 600; color: var(--text-soft); }
.insight-row.critical .insight-amount { color: var(--red); }
.insight-row.opportunity .insight-amount { color: var(--green); }

/* ---------- Adress-Autovervollständigung ---------- */
.address-input { position: relative; display: flex; flex-direction: column; gap: 4px; }
.address-field { position: relative; display: flex; flex-wrap: wrap; }
.address-field input { width: 100%; }

.address-spinner {
  position: absolute;
  right: 11px;
  top: 50%;
  width: 14px;
  height: 14px;
  margin-top: -7px;
  border: 2px solid var(--border-strong);
  border-top-color: var(--navy);
  border-radius: 50%;
  animation: addrSpin 0.7s linear infinite;
  pointer-events: none;
}
@keyframes addrSpin { to { transform: rotate(360deg); } }

.address-suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 60;
  margin: 4px 0 0;
  padding: 4px;
  list-style: none;
  background: #fff;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  max-height: 280px;
  overflow-y: auto;
}
.address-suggestions li {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.86rem;
  color: var(--text-muted);
}
.address-suggestions li.active { background: var(--blue-bg); color: var(--navy); }
.address-suggestions li svg { margin-top: 2px; flex-shrink: 0; opacity: 0.7; }
.addr-text { display: flex; flex-direction: column; min-width: 0; }
.addr-main { font-weight: 600; color: var(--text); }
.addr-secondary { font-size: 0.78rem; color: var(--text-muted); }

/* ---------- Rechte-Matrix ---------- */
.success-box {
  background: var(--green-bg);
  color: var(--green);
  border: 1px solid rgba(20, 138, 77, 0.2);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  margin-bottom: 14px;
  font-size: 0.86rem;
  font-weight: 550;
}

.perm-legend { display: flex; gap: 22px; flex-wrap: wrap; margin-bottom: 14px; font-size: 0.78rem; color: var(--text-muted); }
.perm-legend span { display: inline-flex; align-items: center; gap: 7px; }
.perm-chip {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 2px 9px; border-radius: 99px; font-size: 0.7rem; font-weight: 700;
}
.perm-chip.view { background: var(--blue-bg); color: var(--blue); }
.perm-chip.edit { background: var(--green-bg); color: var(--green); }

.perm-table th.perm-role-head { text-align: center; min-width: 104px; }
.perm-table td.perm-area { font-weight: 600; white-space: nowrap; }
.perm-table td.perm-cell { text-align: center; white-space: nowrap; }
.perm-group-row td {
  background: #f3f5f9;
  font-size: 0.68rem;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--text-muted);
  padding: 7px 14px;
}

.perm-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 27px;
  height: 27px;
  margin: 0 2px;
  border-radius: 7px;
  border: 1px solid var(--border-strong);
  background: #fff;
  color: var(--text-soft);
  font-size: 0.7rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease, border-color 0.12s ease;
}
.perm-box input { position: absolute; opacity: 0; width: 0; height: 0; }
.perm-box:hover { border-color: var(--navy); }
.perm-box.on { background: var(--blue-bg); border-color: #b9cdf2; color: var(--blue); }
.perm-box.on.edit { background: var(--green-bg); border-color: #a9dcc0; color: var(--green); }

/* ---------- Einrichtungsassistent ---------- */
.setup-shell {
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 20px;
  background:
    radial-gradient(800px 500px at 90% -10%, rgba(201, 162, 39, 0.14), transparent 60%),
    radial-gradient(700px 500px at -10% 110%, rgba(43, 98, 217, 0.12), transparent 55%),
    linear-gradient(160deg, var(--navy-dark) 0%, var(--navy) 55%, #10315b 100%);
}
.setup-card {
  width: 100%;
  max-width: 940px;
  background: #fff;
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: fadeUp 0.5s cubic-bezier(0.22, 0.68, 0.32, 1) both;
}

.setup-head { padding: 26px 32px 18px; border-bottom: 1px solid var(--border); }
.setup-head .brand { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.03em; color: var(--navy); }
.setup-head .brand span {
  background: linear-gradient(120deg, var(--gold), var(--gold-deep));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.setup-head .setup-sub { font-size: 0.8rem; color: var(--text-muted); margin-top: 2px; }

.setup-steps {
  display: flex; list-style: none; margin: 0; padding: 16px 32px;
  gap: 6px; border-bottom: 1px solid var(--border); background: #fafbfd; flex-wrap: wrap;
}
.setup-steps li { display: flex; align-items: center; gap: 7px; font-size: 0.76rem; color: var(--text-soft); flex: 1; min-width: 92px; }
.setup-steps .dot-num {
  width: 22px; height: 22px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  background: var(--gray-bg); color: var(--text-soft); font-size: 0.68rem; font-weight: 700; flex-shrink: 0;
}
.setup-steps li.active { color: var(--navy); font-weight: 650; }
.setup-steps li.active .dot-num { background: var(--navy); color: #fff; }
.setup-steps li.done { color: var(--green); }
.setup-steps li.done .dot-num { background: var(--green-bg); color: var(--green); }

.setup-body { padding: 28px 32px 32px; }
.setup-body h2 { font-size: 1.2rem; letter-spacing: -0.02em; margin-bottom: 8px; }
.setup-text { font-size: 0.88rem; color: var(--text-muted); line-height: 1.6; margin: 0 0 18px; }
.setup-empty { font-size: 0.86rem; color: var(--text-soft); font-style: italic; margin: 0 0 12px; }
.setup-actions { display: flex; align-items: center; gap: 12px; margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--border); flex-wrap: wrap; }

.gewerk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px 18px; }
.gewerk-row { display: flex; align-items: center; gap: 10px; padding: 4px 0; }
.gewerk-row.off { opacity: 0.45; }
.gewerk-check { display: flex; align-items: center; gap: 8px; font-size: 0.84rem; flex: 1; cursor: pointer; }
.gewerk-row input[type="number"] {
  width: 108px; padding: 5px 9px; border: 1px solid var(--border); border-radius: 8px;
  font-size: 0.82rem; font-family: var(--font); text-align: right;
}
.gewerk-summe { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--border); font-size: 0.86rem; color: var(--text-muted); }

.team-row { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px 16px; margin-bottom: 12px; background: #fbfcfe; }
.setup-body table.data input {
  width: 100%; padding: 6px 9px; border: 1px solid var(--border); border-radius: 7px;
  font-size: 0.84rem; font-family: var(--font);
}

.setup-done { text-align: center; padding: 12px 0; }
.done-badge {
  width: 64px; height: 64px; border-radius: 50%; background: var(--green-bg); color: var(--green);
  display: inline-flex; align-items: center; justify-content: center; margin-bottom: 14px;
}
.setup-done .setup-text { max-width: 520px; margin-left: auto; margin-right: auto; }
.setup-done .setup-actions { justify-content: center; border-top: none; }

@media (max-width: 700px) {
  .setup-shell { padding: 16px 12px; }
  .setup-head, .setup-steps, .setup-body { padding-left: 18px; padding-right: 18px; }
  .setup-steps li .lbl { display: none; }
  .setup-steps li { min-width: 0; flex: 0; }
}

/* ---------- E-Mail schreiben ---------- */
.warn-banner {
  display: flex; align-items: flex-start; gap: 14px;
  border-left: 3px solid var(--yellow); padding: 16px 20px;
}

.tpl-list { display: flex; flex-direction: column; gap: 4px; max-height: 460px; overflow-y: auto; }
.tpl-item {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 10px 12px; border-radius: var(--radius-sm); cursor: pointer;
  border: 1px solid transparent; transition: background 0.12s ease, border-color 0.12s ease;
}
.tpl-item:hover { background: #f8fafd; }
.tpl-item.active { background: var(--blue-bg); border-color: #c3d5f6; }
.tpl-item input { margin-top: 3px; accent-color: var(--navy); flex-shrink: 0; }
.tpl-item > span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tpl-label { display: flex; align-items: center; gap: 8px; font-weight: 650; font-size: 0.86rem; flex-wrap: wrap; }
.tpl-desc { font-size: 0.78rem; color: var(--text-muted); line-height: 1.45; }

.mail-done { text-align: center; padding: 20px 0; }
.mail-done .done-badge {
  width: 58px; height: 58px; border-radius: 50%; background: var(--green-bg); color: var(--green);
  display: inline-flex; align-items: center; justify-content: center; margin-bottom: 12px;
}

.mail-help { margin-top: 16px; font-size: 0.84rem; color: var(--text-muted); }
.mail-help summary { cursor: pointer; font-weight: 600; color: var(--navy); }
.mail-help pre {
  background: #f6f8fb; border: 1px solid var(--border); border-radius: 8px;
  padding: 12px 14px; font-size: 0.78rem; overflow-x: auto; line-height: 1.6;
}
.mail-help code { background: #f0f3f8; padding: 1px 5px; border-radius: 4px; font-size: 0.82em; }
