/* Startseite: Kachel-Übersicht (Stammtisch nur über Menü / eigene Route) */
.mieter-home-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(10.5rem, 1fr));
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.mieter-home-tile {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.25rem;
  min-height: 7rem;
  padding: 1rem 1rem 0.9rem;
  border-radius: 0.85rem;
  background: #fff;
  border: 2px solid #0f172a;
  color: #0f172a !important;
  text-decoration: none !important;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
  transition: background 0.15s ease, box-shadow 0.15s ease;
}

.mieter-home-tile:hover,
.mieter-home-tile:focus-visible {
  background: #ecfdf5;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.12);
  color: #0f172a !important;
}

.mieter-home-tile-icon {
  font-size: 1.5rem;
  line-height: 1;
}

.mieter-home-tile-label {
  font-size: 1.05rem;
  font-weight: 800;
  color: #0f172a !important;
}

.mieter-home-tile-hint {
  font-size: 0.82rem;
  font-weight: 600;
  color: #334155 !important;
}

/* Stammtisch-Buttons: Host darf st-btn nicht „grau“ überschreiben */
.bb-form-card .st-root button.st-btn-primary,
.bb-form-body .st-root button.st-btn-primary,
article.content .st-root button.st-btn-primary {
  background: #16a34a !important;
  background-color: #16a34a !important;
  color: #ffffff !important;
  border: none !important;
  border-radius: 20px !important;
  box-shadow: none !important;
}

.bb-form-card .st-root button.st-btn-secondary,
.bb-form-card .st-root button.st-btn-ghost,
.bb-form-body .st-root button.st-btn-secondary,
article.content .st-root button.st-btn-secondary {
  background: #dcfce7 !important;
  background-color: #dcfce7 !important;
  color: #14532d !important;
  border: none !important;
  border-radius: 20px !important;
  box-shadow: none !important;
}

/* Stammtisch-Baum: dunkle Schrift auf weiß (gegen bb-theme TreeView-Hell) */
.bb-form-card .st-root,
.bb-form-body .st-root,
article.content .st-root {
  color: #0f172a !important;
}

.bb-form-card .st-root .st-tree-shell,
.bb-form-card .st-root .st-tree-shell .k-treeview,
.bb-form-card .st-root .st-tree-shell .k-treeview-item,
.bb-form-card .st-root .st-tree-shell .k-treeview-leaf,
.bb-form-card .st-root .st-tree-shell .k-treeview-leaf-text,
.bb-form-card .st-root .st-tree-shell .k-treeview span,
.bb-form-card .st-root .st-tree-shell .k-treeview-toggle,
article.content .st-tree-shell .k-treeview-leaf {
  color: #0f172a !important;
  fill: #0f172a !important;
}

.bb-form-card .st-root .st-tree-shell,
article.content .st-tree-shell {
  background: #ffffff !important;
  border: 1px solid #94a3b8 !important;
}

.bb-form-card .st-root .st-tree-shell .k-treeview-leaf.k-selected,
.bb-form-card .st-root .st-tree-shell .k-treeview-leaf.k-selected span {
  background: #16a34a !important;
  color: #ffffff !important;
}

/* Host-Styles Mieterportal – hell, hoher Kontrast (Baustelle/Handy) */

html, body {
  background: #f1f5f9 !important;
  color: #0f172a !important;
  min-height: 100%;
  height: auto;
  overflow-y: auto;
  pointer-events: auto !important;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

.page,
.page .content,
article.content,
.bb-page {
  color: #0f172a !important;
  pointer-events: auto !important;
}

.page a:not(.bc-top-icon):not(.mieter-nav-link) {
  color: #0369a1 !important;
}

.loading-screen {
  position: relative;
  z-index: 1;
  pointer-events: auto;
  padding: 2rem;
  text-align: center;
  color: #0f172a !important;
}

/* Info-Karten / Listen */
.mieter-card {
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 0.75rem;
  padding: 1rem 1.15rem;
  margin-bottom: 0.85rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

.mieter-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
  font-weight: 700;
  color: #0f172a;
}

.mieter-card .meta {
  font-size: 0.85rem;
  color: #475569;
  margin-bottom: 0.4rem;
}

.mieter-saldo {
  font-size: 1.35rem;
  font-weight: 800;
  color: #0f172a;
  padding: 0.75rem 1rem;
  background: #ecfdf5;
  border: 1px solid #6ee7b7;
  border-radius: 0.6rem;
  margin-bottom: 1rem;
}

.mieter-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.mieter-table th,
.mieter-table td {
  padding: 0.65rem 0.5rem;
  border-bottom: 1px solid #e2e8f0;
  text-align: left;
  vertical-align: top;
}

.mieter-table th {
  font-weight: 700;
  background: #e2e8f0;
  color: #0f172a;
}

.mieter-table tr:nth-child(even) td {
  background: #f8fafc;
}

.mieter-table .betrag {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.mieter-alert {
  padding: 0.85rem 1rem;
  border-radius: 0.55rem;
  margin-bottom: 1rem;
  font-weight: 600;
}

.mieter-alert-error {
  background: #fef2f2;
  border: 1px solid #fca5a5;
  color: #991b1b;
}

.mieter-alert-ok {
  background: #ecfdf5;
  border: 1px solid #6ee7b7;
  color: #065f46;
}

.mieter-alert-info {
  background: #eff6ff;
  border: 1px solid #93c5fd;
  color: #1e3a8a;
}

.mieter-hint {
  color: #334155;
  line-height: 1.5;
  margin-bottom: 0.75rem;
}

/* Große Touch-Buttons */
.mieter-btn-primary {
  min-height: 48px;
  padding: 0.65rem 1.25rem;
  font-weight: 700;
}

/* Hinweise mit klarem Kontrast (nicht blassgrau) */
.mieter-hint-strong {
  color: #0f172a !important;
  font-size: 1rem;
  line-height: 1.55;
}

/* Preise-Kasten: dunkler Text auf hellem Grund, hoher Kontrast */
.mieter-preise-box {
  background: #ffffff;
  border: 2px solid #0f172a;
  border-radius: 0.75rem;
  padding: 1rem 1.15rem;
  margin: 0.75rem 0 1rem;
  color: #0f172a !important;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.12);
}

.mieter-preise-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: #0f172a !important;
  margin: 0 0 0.65rem;
  letter-spacing: 0.02em;
  border-bottom: 2px solid #0f172a;
  padding-bottom: 0.35rem;
}

.mieter-preise-body,
.mieter-preise-body p,
.mieter-preise-body li,
.mieter-preise-body strong,
.mieter-preise-body .bb-html-display {
  color: #0f172a !important;
  font-size: 1.05rem;
  line-height: 1.55;
  font-weight: 600;
}

.mieter-preise-body ul {
  margin: 0.35rem 0 0.25rem 1.15rem;
  padding: 0;
}

.mieter-preise-body li {
  margin: 0.2rem 0;
}

/* Preistabelle aus PREISTABELLE (hoher Kontrast) */
.mieter-preise-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0.25rem 0 0.5rem;
  color: #0f172a !important;
  font-size: 1.05rem;
}

.mieter-preise-table th,
.mieter-preise-table td {
  padding: 0.55rem 0.65rem;
  border-bottom: 1px solid #334155;
  text-align: left;
  color: #0f172a !important;
  font-weight: 600;
}

.mieter-preise-table th {
  background: #e2e8f0;
  font-weight: 800;
  border-bottom: 2px solid #0f172a;
}

.mieter-preise-table tr:nth-child(even) td {
  background: #f8fafc;
}

.mieter-preise-table .betrag {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.mieter-preise-quelle {
  font-size: 0.8rem;
  font-weight: 600;
  color: #334155 !important;
  margin-top: 0.35rem;
}

/* ── Beschwerde-Status: hoher Kontrast + Prio-Farben ─────────────────
   1 hellgrün (Anzeige) → 2 hellblau → 3 blau → 4 orange → 5 rot      */

.beschw-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.beschw-btn-neu {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.5rem 1rem;
  border-radius: 0.55rem;
  background: #15803d !important;
  color: #ffffff !important;
  font-weight: 700;
  text-decoration: none !important;
  border: 2px solid #14532d;
}

.beschw-btn-neu:hover,
.beschw-btn-neu:focus-visible {
  background: #166534 !important;
  color: #fff !important;
}

.beschw-legende {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1rem;
}

.beschw-leg-item {
  display: inline-block;
  padding: 0.35rem 0.55rem;
  border-radius: 0.4rem;
  font-size: 0.8rem;
  font-weight: 800;
  color: #0f172a !important;
  border: 2px solid #0f172a;
}

.beschw-liste {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.beschw-card {
  border-radius: 0.85rem;
  padding: 1rem 1.1rem 1.05rem;
  border: 2px solid #0f172a;
  color: #0f172a !important;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.12);
  border-left-width: 10px;
}

.beschw-card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.55rem;
}

.beschw-titel {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 800;
  color: #0f172a !important;
  line-height: 1.3;
  flex: 1 1 12rem;
}

.beschw-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.65rem;
}

.beschw-badge {
  display: inline-block;
  padding: 0.35rem 0.65rem;
  border-radius: 0.4rem;
  font-size: 0.85rem;
  font-weight: 800;
  line-height: 1.25;
  border: 2px solid #0f172a;
  color: #0f172a !important;
}

.beschw-badge-kat {
  background: #f8fafc;
  border-color: #334155;
}

.beschw-badge-status.is-open {
  background: #fef9c3;
  border-color: #a16207;
  color: #713f12 !important;
}

.beschw-badge-status.is-progress {
  background: #dbeafe;
  border-color: #1d4ed8;
  color: #1e3a8a !important;
}

.beschw-badge-status.is-done {
  background: #dcfce7;
  border-color: #15803d;
  color: #14532d !important;
}

/* Priorität: Hintergrund Karte + Badge */
.beschw-card.prio-0,
.beschw-card.prio-1 {
  background: #dcfce7; /* helles Grün – Nur Anzeige */
  border-left-color: #16a34a;
}

.beschw-card.prio-2 {
  background: #e0f2fe; /* helles Blau – Auszug */
  border-left-color: #0284c7;
}

.beschw-card.prio-3 {
  background: #bfdbfe; /* stärkeres Blau – Bald */
  border-left-color: #1d4ed8;
}

.beschw-card.prio-4 {
  background: #ffedd5; /* orange – Schnell */
  border-left-color: #ea580c;
}

.beschw-card.prio-5 {
  background: #fecaca; /* rot – Sofort */
  border-left-color: #dc2626;
}

.beschw-badge-prio.prio-0,
.beschw-badge-prio.prio-1 {
  background: #86efac;
  border-color: #166534;
  color: #14532d !important;
}

.beschw-badge-prio.prio-2 {
  background: #7dd3fc;
  border-color: #0369a1;
  color: #0c4a6e !important;
}

.beschw-badge-prio.prio-3 {
  background: #60a5fa;
  border-color: #1e3a8a;
  color: #0f172a !important;
}

.beschw-badge-prio.prio-4 {
  background: #fb923c;
  border-color: #9a3412;
  color: #0f172a !important;
}

.beschw-badge-prio.prio-5 {
  background: #ef4444;
  border-color: #7f1d1d;
  color: #ffffff !important;
}

.beschw-leg-item.prio-1 { background: #86efac; }
.beschw-leg-item.prio-2 { background: #7dd3fc; }
.beschw-leg-item.prio-3 { background: #60a5fa; }
.beschw-leg-item.prio-4 { background: #fb923c; }
.beschw-leg-item.prio-5 { background: #ef4444; color: #fff !important; }

.beschw-body {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(15, 23, 42, 0.2);
  border-radius: 0.55rem;
  padding: 0.7rem 0.85rem;
  margin-top: 0.35rem;
  color: #0f172a !important;
}

.beschw-body-label {
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #0f172a !important;
  margin-bottom: 0.35rem;
  opacity: 0.85;
}

.beschw-body .bb-html-display,
.beschw-body p,
.beschw-body li {
  color: #0f172a !important;
  font-weight: 600;
  line-height: 1.5;
}

.beschw-updates {
  margin-top: 0.65rem;
  padding-top: 0.5rem;
  border-top: 2px dashed rgba(15, 23, 42, 0.25);
}

.beschw-update-line {
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(15, 23, 42, 0.18);
  border-radius: 0.4rem;
  padding: 0.45rem 0.65rem;
  margin-top: 0.35rem;
  font-weight: 600;
  color: #0f172a !important;
  font-size: 0.95rem;
}
