/* =============================================
   Förderportal – Hauptstylesheet
   Design: Modern Government / Trustworthy
   Fonts: Outfit (display) + Source Serif 4 (body)
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&family=Source+Serif+4:ital,wght@0,300;0,400;0,600;1,300&display=swap');

:root {
  /* Brand Colors */
  --c-primary:     #1B4F8A;
  --c-primary-d:   #113660;
  --c-primary-l:   #2E6DB4;
  --c-accent:      #db4a2b;
  --c-accent-d:    #b83a1f;
  --c-success:     #1A7A4A;
  --c-warning:     #B45309;
  --c-danger:      #B91C1C;
  --c-info:        #0F6D8E;

  /* Neutrals */
  --c-bg:          #F7F8FA;
  --c-surface:     #FFFFFF;
  --c-border:      #E4E9F0;
  --c-line:        #EFF2F7;
  --c-text:        #1A2233;
  --c-text-muted:  #5B6880;
  --c-text-light:  #8C9AB0;

  /* Sidebar */
  --sidebar-w:     260px;
  --sidebar-bg:    #0E2D55;
  --sidebar-text:  #BFD1E8;
  --sidebar-hover: rgba(255,255,255,0.07);
  --sidebar-active: rgba(255,255,255,0.13);

  /* Spacing */
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 16px;
  --r-xl: 24px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.10), 0 2px 6px rgba(0,0,0,0.06);
  --shadow-lg: 0 12px 32px rgba(0,0,0,0.12);

  /* Transitions */
  --t-fast: 150ms ease;
  --t-med:  250ms ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: 'Outfit', system-ui, sans-serif;
  background: var(--c-bg);
  color: var(--c-text);
  line-height: 1.6;
  min-height: 100vh;
}

/* ─── Typography ─────────────────────────────────── */
h1, h2, h3, h4, h5 { font-family: 'Outfit', sans-serif; font-weight: 600; line-height: 1.3; }
h1 { font-size: 1.9rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.2rem; }
h4 { font-size: 1rem; }

a { color: var(--c-primary); text-decoration: none; transition: color var(--t-fast); }
a:hover { color: var(--c-primary-l); }

/* ─── App Layout ─────────────────────────────────── */
.app-layout {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  grid-template-rows: auto 1fr;
  min-height: 100vh;
}

/* ─── Sidebar ────────────────────────────────────── */
.sidebar {
  background: var(--sidebar-bg);
  grid-row: 1 / -1;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.sidebar-logo {
  padding: 1.5rem 1.25rem 1.25rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.sidebar-logo-icon {
  width: 38px; height: 38px;
  background: var(--c-accent);
  border-radius: var(--r-md);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-size: 1.2rem;
}

.sidebar-logo-text { color: #fff; font-weight: 600; font-size: 0.95rem; line-height: 1.2; }
.sidebar-logo-sub  { color: var(--sidebar-text); font-size: 0.75rem; font-weight: 300; }

.sidebar-nav { padding: 1rem 0.75rem; flex: 1; }
.sidebar-section-label {
  color: rgba(255,255,255,0.35);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.75rem 0.5rem 0.25rem;
}

.nav-item {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.62rem 0.75rem;
  border-radius: var(--r-md);
  color: var(--sidebar-text);
  font-size: 0.9rem;
  font-weight: 400;
  transition: all var(--t-fast);
  margin-bottom: 2px;
  text-decoration: none;
}

.nav-item:hover { background: var(--sidebar-hover); color: #fff; }
.nav-item.active { background: var(--sidebar-active); color: #fff; font-weight: 500; }
.nav-item.active .nav-icon { color: var(--c-accent); }
.nav-icon { font-size: 1.1rem; width: 20px; text-align: center; flex-shrink: 0; }
.nav-badge {
  margin-left: auto;
  background: var(--c-accent);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 1px 7px;
  border-radius: 20px;
}

.sidebar-footer {
  padding: 1rem;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.user-info {
  display: flex; align-items: center; gap: 0.6rem;
  padding: 0.5rem;
  border-radius: var(--r-md);
}
.user-avatar {
  width: 34px; height: 34px;
  background: var(--c-primary-l);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  font-weight: 600;
  font-size: 0.85rem;
  flex-shrink: 0;
}
.user-name  { color: #fff; font-size: 0.85rem; font-weight: 500; }
.user-email { color: var(--sidebar-text); font-size: 0.72rem; }

/* ─── Top Bar ────────────────────────────────────── */
.topbar {
  background: var(--c-surface);
  border-bottom: 1px solid var(--c-border);
  padding: 0 1.5rem;
  height: 60px;
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; z-index: 100;
  box-shadow: var(--shadow-sm);
}

.topbar-title { font-size: 1.05rem; font-weight: 600; color: var(--c-text); }
.topbar-actions { display: flex; align-items: center; gap: 0.75rem; }

/* ─── Main Content ───────────────────────────────── */
.main-content {
  padding: 1.75rem;
  overflow-y: auto;
}

/* ─── Cards ──────────────────────────────────────── */
.card {
  background: var(--c-surface);
  border-radius: var(--r-lg);
  border: 1px solid #CBD3E0;
  box-shadow: 0 1px 2px rgba(20,33,58,0.04), 0 2px 5px rgba(20,33,58,0.05);
  overflow: hidden;
}

.card-header {
  padding: 0.85rem 1.4rem;
  background: var(--c-bg);
  border-bottom: 1px solid var(--c-border);
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem;
}

.card-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--c-text);
  display: flex; align-items: center; gap: 0.5rem;
}

.card-body { padding: 1.4rem; }

/* ─── Stat Cards ─────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.stat-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  padding: 1.2rem 1.4rem;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--stat-color, var(--c-primary));
}

.stat-value { font-size: 2rem; font-weight: 700; color: var(--c-text); line-height: 1; }
.stat-label { font-size: 0.8rem; color: var(--c-text-muted); margin-top: 0.3rem; font-weight: 400; }
.stat-icon  {
  position: absolute; top: 1rem; right: 1.1rem;
  font-size: 1.6rem; opacity: 0.12;
}

/* ─── Buttons ────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.55rem 1.2rem;
  border-radius: var(--r-md);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: all var(--t-fast);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary   { background: var(--c-primary); color: #fff; }
.btn-primary:hover { background: var(--c-primary-d); color: #fff; }
/* btn-accent: kein Orange mehr – nutzt das Primärblau (passt zum Gesamtbild) */
.btn-accent    { background: var(--c-primary); color: #fff; }
.btn-accent:hover  { background: var(--c-primary-d); color: #fff; }
.btn-success   { background: var(--c-success); color: #fff; }
/* btn-danger: kein lautes Rot mehr – dezentes Outline, bleibt als „destruktiv" erkennbar */
.btn-danger    { background: #fff; color: var(--c-danger); border: 1px solid #E6C3C3; }
.btn-danger:hover  { background: #FCF1F1; color: var(--c-danger); border-color: #D89A9A; }
.btn-ghost     { background: transparent; color: var(--c-primary); border: 1px solid var(--c-border); }
.btn-ghost:hover   { background: var(--c-bg); color: var(--c-primary); }
.btn-sm { padding: 0.35rem 0.8rem; font-size: 0.82rem; }
.btn-lg { padding: 0.75rem 1.75rem; font-size: 1rem; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ─── Forms ──────────────────────────────────────── */
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}
.form-grid .full { grid-column: 1 / -1; }

.form-group { display: flex; flex-direction: column; gap: 0.3rem; }

label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--c-text-muted);
}

.required-star { color: var(--c-danger); margin-left: 2px; }

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
input[type="password"],
select,
textarea {
  padding: 0.6rem 0.85rem;
  border: 1.5px solid var(--c-border);
  border-radius: var(--r-md);
  font-family: inherit;
  font-size: 0.9rem;
  color: var(--c-text);
  background: #fff;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
  width: 100%;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--c-primary-l);
  box-shadow: 0 0 0 3px rgba(27,79,138,0.12);
}

input:disabled, select:disabled, textarea:disabled {
  background: var(--c-bg);
  color: var(--c-text-muted);
  cursor: default;
}

.hint-above {
  font-size: 0.78rem;
  color: var(--c-text-light);
  padding: 0.35rem 0.5rem;
  background: var(--c-bg);
  border-radius: var(--r-sm);
  margin-bottom: 0.2rem;
}

.file-upload-zone {
  border: 2px dashed var(--c-border);
  border-radius: var(--r-lg);
  padding: 2rem;
  text-align: center;
  cursor: pointer;
  transition: all var(--t-med);
  background: var(--c-bg);
}
.file-upload-zone:hover, .file-upload-zone.drag-over {
  border-color: var(--c-primary-l);
  background: rgba(27,79,138,0.04);
}
.file-upload-zone input[type="file"] { display: none; }
.file-upload-icon { font-size: 2.5rem; margin-bottom: 0.5rem; color: var(--c-text-light); }
.file-name-preview { font-weight: 500; color: var(--c-success); margin-top: 0.5rem; }

/* ─── Tables ─────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
thead th {
  padding: 0.75rem 1rem;
  background: var(--c-bg);
  border-bottom: 2px solid var(--c-border);
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--c-text-muted);
  white-space: nowrap;
  text-align: left;
}
tbody td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--c-border);
  vertical-align: middle;
}
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: rgba(27,79,138,0.025); }

/* ─── Status Badges ──────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 0.3rem;
  padding: 0.2rem 0.7rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}
.status-geprueft       { background: #EFF6FF; color: #1D4ED8; }
.status-positiv        { background: #F0FDF4; color: #15803D; }
.status-bearbeitung    { background: #FFF7ED; color: #C2410C; }
.status-gestellt       { background: #F5F3FF; color: #6D28D9; }
.status-genehmigt      { background: #F0FDF4; color: #15803D; }
.status-abgelehnt      { background: #FEF2F2; color: #B91C1C; }
.status-nachforderung  { background: #FEFCE8; color: #92400E; }

/* ─── Alerts ─────────────────────────────────────── */
.alert {
  padding: 0.85rem 1rem;
  border-radius: var(--r-md);
  font-size: 0.9rem;
  display: flex; align-items: flex-start; gap: 0.6rem;
  margin-bottom: 1rem;
}
.alert-success { background: #F0FDF4; border: 1px solid #BBF7D0; color: var(--c-success); }
.alert-error   { background: #FEF2F2; border: 1px solid #FECACA; color: var(--c-danger); }
.alert-info    { background: #EFF6FF; border: 1px solid #BFDBFE; color: #1E40AF; }
.alert-warning { background: #FFFBEB; border: 1px solid #FDE68A; color: #92400E; }

/* ─── Immobilien Cards ───────────────────────────── */
.immobilien-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.immobilie-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  padding: 1.2rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--t-med);
  display: flex; flex-direction: column; gap: 0.75rem;
}
.immobilie-card:hover { box-shadow: var(--shadow-md); }
.immobilie-address { font-weight: 600; font-size: 1rem; }
.immobilie-meta { font-size: 0.82rem; color: var(--c-text-muted); }
.immobilie-actions { display: flex; gap: 0.5rem; margin-top: auto; }

/* ─── Empty State ────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 3rem 2rem;
  color: var(--c-text-muted);
}
.empty-state-icon { font-size: 3rem; margin-bottom: 1rem; opacity: 0.4; }
.empty-state-title { font-size: 1.1rem; font-weight: 600; color: var(--c-text); margin-bottom: 0.5rem; }
.empty-state-text  { font-size: 0.9rem; margin-bottom: 1.5rem; }

/* ─── Modal ──────────────────────────────────────── */
.modal-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(10,20,40,0.5);
  z-index: 900;
  align-items: center; justify-content: center;
  backdrop-filter: blur(2px);
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--c-surface);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  margin: 1rem;
  animation: modalIn 0.2s ease;
}
@keyframes modalIn {
  from { opacity: 0; transform: translateY(-12px) scale(0.98); }
  to   { opacity: 1; transform: none; }
}
.modal-header {
  padding: 1.2rem 1.5rem;
  border-bottom: 1px solid var(--c-border);
  display: flex; align-items: center; justify-content: space-between;
}
.modal-body   { padding: 1.5rem; }
.modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--c-border);
  display: flex; justify-content: flex-end; gap: 0.75rem;
}
.modal-close {
  background: none; border: none; cursor: pointer;
  color: var(--c-text-muted); font-size: 1.4rem; line-height: 1;
  padding: 0.25rem;
}

/* ─── Login Page ─────────────────────────────────── */
.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  /*background: linear-gradient(135deg, #0E2D55 0%, #1B4F8A 50%, #2E6DB4 100%);*/
  background: radial-gradient(circle at 1% 3%, rgb(255 255 255) 0%, transparent 70%), radial-gradient(circle at 0% 100%, rgb(255 255 255 / 0.89) 0%, transparent 70%), radial-gradient(circle at 51% 100%, rgb(255 255 255 / 0.7) 0%, transparent 70%), radial-gradient(circle at 61% 0%, rgb(255 255 255) 0%, transparent 70%), radial-gradient(circle at 100% 100%, rgb(255 255 255) 0%, transparent 70%), radial-gradient(circle at 19% 47%, rgb(0 35 101 / 0.8) 0%, transparent 70%), radial-gradient(circle at 76% 44%, rgb(0 66 167 / 0.33) 0%, transparent 70%), radial-gradient(circle at 100% 28%, rgb(102 126 238 / 0.09) 0%, transparent 70%);
  padding: 2rem;
}

.login-card {
  background: #fff;
  border-radius: var(--r-xl);
  padding: 2.5rem;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow-lg);
}

.login-logo {
  display: flex; align-items: center; gap: 0.75rem;
  margin-bottom: 2rem;
}
.login-logo-badge {
  width: 46px; height: 46px;
  background: var(--c-primary);
  border-radius: var(--r-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; color: #fff;
}
.login-logo-title { font-size: 1.3rem; font-weight: 700; color: var(--c-text); }
.login-logo-sub   { font-size: 0.78rem; color: var(--c-text-muted); margin-top: -5px; }

/* ─── FAQ Accordion ──────────────────────────────── */
.faq-item {
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  margin-bottom: 0.6rem;
  overflow: hidden;
}
.faq-question {
  width: 100%;
  background: none; border: none; cursor: pointer;
  padding: 1rem 1.25rem;
  text-align: left;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--c-text);
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem;
  transition: background var(--t-fast);
}
.faq-question:hover { background: var(--c-bg); }
.faq-chevron { transition: transform var(--t-med); flex-shrink: 0; }
.faq-item.open .faq-chevron { transform: rotate(180deg); }
.faq-answer {
  max-height: 0; overflow: hidden;
  transition: max-height var(--t-med);
  font-size: 0.9rem;
  color: var(--c-text-muted);
  line-height: 1.7;
}
.faq-answer-inner { padding: 0 1.25rem 1rem; }

/* ─── Pagination ─────────────────────────────────── */
.pagination {
  display: flex; gap: 0.25rem; align-items: center;
  flex-wrap: wrap;
}
.page-btn {
  min-width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--r-md);
  font-size: 0.85rem;
  color: var(--c-text-muted);
  border: 1px solid var(--c-border);
  background: var(--c-surface);
  cursor: pointer;
  transition: all var(--t-fast);
  text-decoration: none;
}
.page-btn:hover  { background: var(--c-bg); color: var(--c-text); }
.page-btn.active { background: var(--c-primary); color: #fff; border-color: var(--c-primary); }
.page-btn:disabled { opacity: 0.4; cursor: default; }

/* ─── Responsive ─────────────────────────────────── */
/* Mobile Navigation */
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.4rem;
  color: var(--c-text);
  font-size: 1.4rem;
  line-height: 1;
}

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 199;
}

@media (max-width: 768px) {
  :root { --sidebar-w: 0px; }
  .app-layout { grid-template-columns: 1fr; }

  .sidebar {
    position: fixed;
    top: 0; left: 0;
    height: 100vh;
    width: 270px;
    z-index: 200;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
  }
  .sidebar.open { transform: translateX(0); }
  .sidebar-overlay.open { display: block; }

  .mobile-menu-btn { display: flex; align-items: center; }
  .main-content { padding: 1rem; }
  .topbar { padding: 0 1rem; }
  .form-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ─── Utilities ──────────────────────────────────── */
.flex   { display: flex; }
.gap-1  { gap: 0.5rem; }
.gap-2  { gap: 1rem; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.text-muted  { color: var(--c-text-muted); }
.text-small  { font-size: 0.82rem; }
.text-center { text-align: center; }
.font-bold   { font-weight: 700; }
.w-full { width: 100%; }

/* Legal Footer */
.portal-footer {
  padding: 1.25rem 1.75rem 1rem;
  text-align: center;
  font-size: 0.78rem;
  color: var(--c-text-light);
  border-top: 1px solid var(--c-border);
  margin-top: auto;
}
.portal-footer a {
  color: var(--c-text-light);
  text-decoration: none;
  margin: 0 0.5rem;
}
.portal-footer a:hover { color: var(--c-text-muted); text-decoration: underline; }

/* Accordion */
.accordion-header {
  width: 100%;
  background: none;
  border: none;
  cursor: pointer;
  padding: 1.1rem 1.4rem;
  text-align: left;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  color: var(--c-text);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  transition: background var(--t-fast);
  border-bottom: 1px solid transparent;
}
.accordion-header:hover { background: var(--c-bg); }
.accordion-header.open  { border-bottom-color: var(--c-border); }
.accordion-chevron {
  transition: transform 0.25s ease;
  flex-shrink: 0;
  color: var(--c-text-muted);
}
.accordion-header.open .accordion-chevron { transform: rotate(180deg); }
.accordion-body {
  display: none;
}
.accordion-body.open {
  display: block;
}

/* =================================================================
   Design-Refresh „Modern · Schlicht" (Variante C) – Komponenten
   ================================================================= */

/* ─── Seitenkopf ─────────────────────────────────── */
.page-head { margin-bottom: 1.6rem; }
.page-head .ph-top {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap;
}
.page-head .ph-title {
  font-size: 1.5rem; font-weight: 700; letter-spacing: -0.01em;
  display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap;
}
.page-head .ph-meta {
  display: flex; gap: 1.25rem; flex-wrap: wrap;
  color: var(--c-text-muted); font-size: 0.86rem; margin-top: 0.55rem;
}
.page-head .ph-meta b { color: var(--c-text); font-weight: 600; }
.page-head .ph-act { display: flex; gap: 0.5rem; flex-wrap: wrap; }

/* ─── Metrik-Kacheln (flach) ─────────────────────── */
.metrics {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(165px, 1fr));
  gap: 0.9rem; margin-bottom: 1.6rem;
}
.metric {
  background: var(--c-surface); border: 1px solid var(--c-border);
  border-radius: var(--r-lg); padding: 1.05rem 1.2rem;
}
.metric .v { font-size: 1.5rem; font-weight: 700; line-height: 1.1; }
.metric .l { font-size: 0.78rem; color: var(--c-text-muted); margin-top: 0.25rem; }
.metric .v.green { color: var(--c-success); }
.metric .v.accent { color: var(--c-accent); }

/* ─── Definition-Liste (ausgerichtete Label/Wert-Paare) ── */
.dl { display: grid; grid-template-columns: 130px 1fr; gap: 0.5rem 1rem; font-size: 0.9rem; }
.dl dt { color: var(--c-text-muted); }
.dl dd { font-weight: 500; }
.dl dd code { font-family: ui-monospace, monospace; font-size: 0.84rem; background: var(--c-bg); padding: 0.1rem 0.35rem; border-radius: 5px; }

/* ─── Sub-Spalten innerhalb einer Card ───────────── */
.subcols { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.subcol h4 {
  font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.07em;
  color: var(--c-text-light); font-weight: 600; margin-bottom: 0.7rem;
}

/* ─── 2-Spalten-Raster (responsiv) ───────────────── */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }

/* ─── Detail-Split (Hauptspalte + rechte Schiene) ── */
.detail-split { display: grid; grid-template-columns: 1fr 340px; gap: 1.25rem; align-items: start; }
@media (max-width: 1024px) { .detail-split { grid-template-columns: 1fr; } }

/* ─── Status-Pills (dezent, mit Punkt) ───────────── */
.pill {
  display: inline-flex; align-items: center; gap: 0.35rem;
  font-size: 0.76rem; font-weight: 600; padding: 0.25rem 0.65rem;
  border-radius: 20px; border: 1px solid transparent; white-space: nowrap;
}
.pill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill-blue  { color: var(--c-primary); background: rgba(27,79,138,0.08);  border-color: rgba(27,79,138,0.18); }
.pill-green { color: var(--c-success); background: rgba(26,122,74,0.08);  border-color: rgba(26,122,74,0.18); }
.pill-amber { color: var(--c-warning); background: rgba(180,83,9,0.08);   border-color: rgba(180,83,9,0.18); }
.pill-red   { color: var(--c-danger);  background: rgba(185,28,28,0.07);  border-color: rgba(185,28,28,0.18); }
.pill-grey  { color: var(--c-text-light); background: #F2F4F7; border-color: var(--c-border); }

/* ─── Einheitliches Section-Icon vor Card-Titeln (Admin + Portal + Fachbetrieb) ── */
body.admin .card-title::before,
body.portal .card-title::before,
body.fb .card-title::before,
.detail-split .card-title::before {
  content: '';
  width: 18px; height: 18px; border-radius: 6px; flex-shrink: 0;
  background-color: rgba(27,79,138,0.10);
  background-image: radial-gradient(circle, var(--c-primary) 0 3px, transparent 3.5px);
}

/* ─── Einstellungen: thematische Gruppierung via Flexbox-order ── */
.settings-page { display: flex; flex-direction: column; }
.settings-page > .alert { order: -2; }
.settings-tabs {
  order: -1; position: sticky; top: 60px; z-index: 40;
  display: flex; flex-wrap: wrap; gap: 0.4rem;
  background: var(--c-bg); padding: 0.7rem 0; margin-bottom: 1rem;
  border-bottom: 1px solid var(--c-border);
}
.settings-tab {
  font-size: 0.85rem; font-weight: 600; color: var(--c-text-muted);
  background: var(--c-surface); border: 1px solid var(--c-border);
  border-radius: 8px; padding: 0.45rem 0.9rem; cursor: pointer;
  transition: all var(--t-fast); font-family: inherit;
}
.settings-tab:hover { color: var(--c-text); border-color: var(--c-text-light); }
.settings-tab.active { background: var(--c-primary); color: #fff; border-color: var(--c-primary); }
/* Karten-Reihenfolge (passend zu den Gruppen-Überschriften) */
#set-zuordnung{order:101} #set-fristueberwachung{order:102} #set-fristen-standards{order:103}
#set-anf-doktypen{order:201} #set-doktypen{order:202} #set-merkblaetter{order:203} #set-vollmacht{order:204} #set-bevollmaechtigte{order:205}
#set-massnahmentypen{order:301} #set-status{order:302} #set-fb-leistungen{order:303}
#set-foerderrechner{order:401} #preise-section{order:402} #set-paketpreis{order:403}
#set-sevdesk{order:501}
#set-captcha{order:601} #set-health{order:602}

/* ─── Admin: floatender Mobile-Menü-Button ───────── */
.admin-burger {
  display: none; position: fixed; top: 11px; left: 13px; z-index: 250;
  background: var(--sidebar-bg); color: #fff; border: none;
  width: 40px; height: 40px; border-radius: var(--r-md);
  font-size: 1.25rem; line-height: 1; cursor: pointer; box-shadow: var(--shadow-sm);
}

/* ─── Responsive-Ergänzungen ─────────────────────── */
@media (max-width: 768px) {
  .grid-2, .subcols { grid-template-columns: 1fr; gap: 1.25rem; }
  .dl { grid-template-columns: 1fr; gap: 0.15rem 0.5rem; }
  .dl dt { margin-top: 0.5rem; }
  .page-head .ph-title { font-size: 1.25rem; }
  .admin-burger { display: flex; align-items: center; justify-content: center; }
  .topbar { padding-left: 4rem; }
}

/* ─── Ticket-Fortschritts-Timeline (TP10) ─────────── */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline-item { position: relative; padding: 0 0 1.1rem 1.85rem; }
.timeline-item::before { /* vertikale Linie */
  content: ""; position: absolute; left: 6px; top: 0.35rem; bottom: -0.35rem; width: 2px; background: var(--c-border, #e3e8ef);
}
.timeline-item:last-child::before { display: none; }
.tl-dot { position: absolute; left: 0; top: 0.15rem; width: 14px; height: 14px; border-radius: 50%;
  background: #fff; border: 2px solid var(--c-border, #cbd5e1); box-sizing: border-box; z-index: 1; }
.tl-body { line-height: 1.35; }
.tl-title { font-weight: 600; font-size: 0.92rem; color: var(--c-text, #1f2937); }
.tl-date { font-size: 0.76rem; color: var(--c-text-muted, #6b7280); margin-top: 0.1rem; }
.tl-now { display: inline-block; margin-left: 0.4rem; font-size: 0.68rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.03em; color: var(--c-primary, #1B4F8A); background: rgba(27,79,138,0.1); padding: 0.05rem 0.4rem; border-radius: 6px; vertical-align: middle; }
.tl-pause { font-size: 0.8rem; color: #92660a; background: #fdf3d8; border-radius: 6px; padding: 0.15rem 0.5rem; margin-top: 0.25rem; display: inline-block; }
.tl-next { margin: 0.4rem 0 0; font-size: 0.85rem; color: var(--c-text-muted, #6b7280); }
/* Zustände */
.timeline-item.tl-done .tl-dot { background: #1f9d57; border-color: #1f9d57; }
.timeline-item.tl-done .tl-dot::after { content: "✓"; position: absolute; inset: 0; color: #fff; font-size: 9px; line-height: 10px; text-align: center; font-weight: 700; }
.timeline-item.tl-done .tl-title { color: var(--c-text-muted, #6b7280); font-weight: 500; }
.timeline-item.tl-current .tl-dot { background: var(--c-primary, #1B4F8A); border-color: var(--c-primary, #1B4F8A); box-shadow: 0 0 0 4px rgba(27,79,138,0.15); }
.timeline-item.tl-upcoming .tl-dot { background: #fff; border-color: var(--c-border, #cbd5e1); }
.timeline-item.tl-upcoming .tl-title { color: var(--c-text-muted, #9aa3b2); font-weight: 500; }
.timeline-item.tl-abbruch .tl-dot { background: #d64545; border-color: #d64545; }
.timeline-item.tl-abbruch .tl-title { color: #d64545; }
