/* Löwi-Statusseite — Layout nach dem LÖWI-AI-Thema (loewi.steuersoft.ai):
   kühles Hellgrau mit Gelb-Glow, weiße Schatten-Karten, gelbe Pill-Wortmarke,
   Gelb-Gradient-Buttons, Status-Punkte mit Glow-Ring. */
:root {
  --bg: #f1f3f6;
  --card: #ffffff;
  --line: #d7dce3;
  --text: #2f3238;
  --muted: #666f7b;
  --yellow: #ffe100;
  --ok: #138a45;
  --wartung: #8a6d00;
  --beeintraechtigt: #b45309;
  --ausfall: #c43d3d;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: "Poppins", "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 8%, rgba(255, 225, 0, 0.2), transparent 32%),
    linear-gradient(180deg, #f7f8fa 0%, var(--bg) 100%);
  min-height: 100vh;
  font-size: 15.5px;
  line-height: 1.5;
}

.wrap { width: min(1180px, calc(100% - 28px)); margin: 14px auto 20px; display: grid; gap: 12px; }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 10px 24px rgba(47, 50, 56, 0.08);
}
.block { padding: 16px 18px; }

/* ---------- Hero (Wortmarke + Maskottchen) ---------- */
.hero { padding: 14px 22px; }
.hero-inner { display: flex; align-items: center; gap: 18px; }
.hero-text { flex: 1; min-width: 0; }
.wordmark { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.wm-pill {
  background: var(--yellow);
  border: 1px solid #e1c600;
  border-radius: 16px;
  padding: 4px 18px 7px;
  font-size: 2.1rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  color: #23262b;
  line-height: 1.15;
}
.wm-rest { font-size: 2.1rem; font-weight: 700; color: #3a3f47; }
.hero-claim { margin-top: 8px; font-size: 1.02rem; color: #4b5563; font-weight: 600; }
.hero-sub { margin-top: 3px; font-size: 0.84rem; color: var(--muted); }
.hero-mascot { width: 120px; height: auto; flex: none; }

/* ---------- Titel in Karten ---------- */
.title {
  margin: 0 0 10px;
  font-size: 0.92rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #4b5563;
  font-weight: 600;
}
.title .sub {
  text-transform: none;
  letter-spacing: 0;
  font-weight: 400;
  color: var(--muted);
  font-size: 0.8rem;
  margin-left: 8px;
}

/* ---------- Status-Punkte mit Glow-Ring ---------- */
.dot { display: inline-block; width: 11px; height: 11px; border-radius: 999px; flex: none; }
.dot.ok { background: var(--ok); box-shadow: 0 0 0 5px rgba(19, 138, 69, 0.16); }
.dot.wartung { background: #e1c600; box-shadow: 0 0 0 5px rgba(225, 198, 0, 0.22); }
.dot.beeintraechtigt { background: #e07f10; box-shadow: 0 0 0 5px rgba(224, 127, 16, 0.18); }
.dot.ausfall { background: var(--ausfall); box-shadow: 0 0 0 5px rgba(196, 61, 61, 0.14); }
.dot.gross { width: 15px; height: 15px; }
.dot.puls { animation: puls 1.7s ease-in-out infinite; }
@keyframes puls { 50% { opacity: 0.5; } }

/* ---------- Gesamt-Banner ---------- */
.banner {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  border-radius: 16px; padding: 15px 20px;
}
.banner-text { font-size: 1.1rem; font-weight: 700; }
.banner-meta { margin-left: auto; text-align: right; font-size: 0.78rem; color: var(--muted); }
.banner.s-ok { background: #fafbfc; }
.banner.s-wartung { background: #fff8d8; }
.banner.s-beeintraechtigt { background: #fdeeda; }
.banner.s-ausfall { background: #fff2f2; }
.banner.s-wartung .banner-text { color: var(--wartung); }
.banner.s-beeintraechtigt .banner-text { color: var(--beeintraechtigt); }
.banner.s-ausfall .banner-text { color: #9f2d2d; }

/* ---------- Badges (Pill-Stil wie LÖWI AI) ---------- */
.badge {
  border: 1px solid #d7dce4; border-radius: 999px; padding: 2px 10px;
  font-size: 0.74rem; color: #56606f; background: #fff; font-weight: 600;
}
.badge.k-info { border-color: #cbd8ff; background: #e8efff; color: #103a86; }
.badge.k-update { border-color: #eedf77; background: #fff8d8; color: #6b5d00; }
.badge.k-wartung { border-color: #eedf77; background: #fff8d8; color: var(--wartung); }
.badge.k-stoerung { border-color: #f0cccc; background: #fff2f2; color: #9f2d2d; }

/* ---------- Nachrichten (Karten im Chat-Nachrichten-Stil) ---------- */
.nachricht {
  border: 1px solid #dbe1e8; border-radius: 12px;
  padding: 11px 14px; margin-bottom: 9px; background: #fff;
}
.nachricht.pin { background: #fff8d8; border-color: #eedf77; }
.nachricht-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.nachricht-titel { font-weight: 700; font-size: 0.98rem; }
.nachricht-datum { margin-left: auto; font-size: 0.75rem; color: var(--muted); white-space: nowrap; }
.nachricht-text { margin-top: 6px; font-size: 0.89rem; color: #414750; white-space: pre-wrap; line-height: 1.45; }
.nachricht-zeitraum { margin-top: 6px; font-size: 0.8rem; color: var(--wartung); font-weight: 600; }
.leer-hinweis { color: var(--muted); font-size: 0.88rem; padding: 2px 1px; }

/* ---------- Server-Kacheln (Status-Widget-Stil) ---------- */
.server-gruppe { margin-bottom: 12px; }
.server-gruppe:last-child { margin-bottom: 0; }
.gruppe-label {
  font-size: 0.74rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--muted); margin-bottom: 7px;
}
.kachel-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.kachel {
  display: flex; align-items: center; gap: 10px;
  border: 1px solid #e4e8ee; border-radius: 12px;
  padding: 10px 12px; background: #fafbfc;
}
.kachel .name { font-weight: 600; font-size: 0.9rem; }
.kachel .status-label { margin-left: auto; font-size: 0.76rem; color: var(--muted); white-space: nowrap; }
.kachel.s-wartung { background: #fff8d8; border-color: #eedf77; }
.kachel.s-wartung .status-label { color: var(--wartung); font-weight: 600; }
.kachel.s-beeintraechtigt { background: #fdeeda; border-color: #f0cf9d; }
.kachel.s-beeintraechtigt .status-label { color: var(--beeintraechtigt); font-weight: 600; }
.kachel.s-ausfall { background: #fff2f2; border-color: #f0cccc; }
.kachel.s-ausfall .status-label { color: #9f2d2d; font-weight: 600; }
.kachel-notiz { font-size: 0.75rem; color: var(--muted); flex-basis: 100%; margin-top: 2px; }
.kachel.mit-notiz { flex-wrap: wrap; }

/* ---------- Beratungsstellen ---------- */
.bst-summary {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  border: 1px solid #e4e8ee; border-radius: 12px; background: #fafbfc;
  padding: 11px 14px; margin-bottom: 10px; font-weight: 600; font-size: 0.95rem;
}
.bst-such {
  width: 100%; max-width: 400px; margin-left: auto;
  font: inherit; font-size: 0.88rem;
  border: 1px solid #cfd5de; border-radius: 10px; padding: 8px 11px;
  outline: none; background: #fff; color: var(--text);
}
.bst-such:focus { border-color: #d6bc00; box-shadow: 0 0 0 3px rgba(255, 225, 0, 0.3); }
.betroffen-block {
  background: #fff2f2; border: 1px solid #f0cccc; border-radius: 12px;
  padding: 12px 14px; margin-bottom: 10px;
}
.betroffen-block h3 { font-size: 0.9rem; color: #9f2d2d; margin-bottom: 8px; }
.bst-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); gap: 7px; }
.bst-item {
  display: flex; align-items: center; gap: 8px; font-size: 0.84rem;
  border: 1px solid #d9dee6; border-radius: 10px;
  padding: 7px 10px; background: #fff;
}
.bst-item:hover { border-color: #d6bc00; background: #fffde8; }
.bst-item .nr { font-weight: 700; font-variant-numeric: tabular-nums; }
.bst-item .ort { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bst-item .grund { margin-left: auto; font-size: 0.71rem; color: var(--muted); white-space: nowrap; }
.bst-item.s-wartung { background: #fff8d8; border-color: #eedf77; }
.bst-item.s-beeintraechtigt { background: #fdeeda; border-color: #f0cf9d; }
.bst-item.s-ausfall { background: #fff2f2; border-color: #f0cccc; }
.bst-item.s-ausfall:hover, .bst-item.s-wartung:hover, .bst-item.s-beeintraechtigt:hover { background-color: inherit; }

/* ---------- ELSTER ---------- */
.elster-head {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  border: 1px solid #e4e8ee; border-radius: 12px; background: #fafbfc;
  padding: 11px 14px; margin-bottom: 10px;
}
.elster-gesamt { font-weight: 700; font-size: 0.98rem; }
.elster-stand { margin-left: auto; font-size: 0.75rem; color: var(--muted); }
.elster-hinweis {
  background: #fff8d8; border: 1px solid #eedf77; border-radius: 10px;
  padding: 9px 12px; font-size: 0.84rem; margin-bottom: 8px; color: #5a4a00; line-height: 1.45;
}
.elster-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 6px; }
.elster-item {
  display: flex; align-items: center; gap: 8px; font-size: 0.84rem;
  padding: 6px 10px; border-radius: 10px; border: 1px solid transparent;
}
.elster-item .dienst { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.elster-item .zustand { margin-left: auto; font-size: 0.74rem; font-weight: 700; }
.elster-item.z-ok .zustand { color: var(--ok); }
.elster-item.z-hinweis { background: #fff8d8; border-color: #eedf77; }
.elster-item.z-hinweis .zustand { color: var(--wartung); }
.elster-item.z-stoerung { background: #fff2f2; border-color: #f0cccc; }
.elster-item.z-stoerung .zustand { color: #9f2d2d; }
.elster-quelle { margin-top: 10px; font-size: 0.72rem; color: var(--muted); }
.elster-fehler { color: var(--muted); font-size: 0.88rem; }

/* ---------- Fusszeile ---------- */
.fuss {
  text-align: center; font-size: 0.78rem; color: var(--muted);
  padding: 4px 14px 18px; line-height: 1.8;
}
.fuss a { color: var(--muted); }
.fuss a:hover { color: var(--text); }

/* ---------- Buttons & Eingaben (LÖWI-AI-Stil) ---------- */
.btn {
  border: 1px solid #ccd2db; border-radius: 10px; padding: 8px 12px;
  background: #fff; cursor: pointer; font: inherit; font-size: 0.86rem; color: var(--text);
}
.btn:hover { border-color: #d6bc00; background: #fffde8; }
.btn.primaer {
  border-color: #e1c600;
  background: linear-gradient(180deg, #ffea2e, #f7d900);
  font-weight: 700;
}
.btn.primaer:hover { background: linear-gradient(180deg, #ffee55, #ffe100); }
.btn.gefahr { color: var(--ausfall); }
.btn.gefahr:hover { border-color: var(--ausfall); background: #fff2f2; }
.btn.klein { padding: 5px 10px; font-size: 0.78rem; border-radius: 9px; }
.eingabe {
  font: inherit; font-size: 0.88rem;
  border: 1px solid #cfd5de; border-radius: 10px; padding: 8px 11px;
  outline: none; background: #fff; color: var(--text);
}
.eingabe:focus { border-color: #d6bc00; box-shadow: 0 0 0 3px rgba(255, 225, 0, 0.3); }

/* ---------- Verwaltung ---------- */
.admin-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 16px; }
.tabs { display: flex; gap: 7px; flex-wrap: wrap; }
.tab {
  border: 1px solid #d9dee6; border-radius: 999px; padding: 7px 16px;
  font: inherit; font-size: 0.86rem; font-weight: 600; cursor: pointer;
  background: #fff; color: #374151;
}
.tab:hover { border-color: #d6bc00; background: #fffde8; }
.tab.aktiv {
  border-color: #e1c600;
  background: linear-gradient(180deg, #ffea2e, #f7d900);
  color: #23262b;
}
.tab-abstand { margin-left: auto; }
.panel { display: none; }
.panel.aktiv { display: block; }

.status-segment { display: inline-flex; border: 1px solid #ccd2db; border-radius: 10px; overflow: hidden; background: #fff; }
.status-segment button {
  border: none; background: transparent; padding: 6px 10px; font: inherit; font-size: 0.76rem;
  font-weight: 600; cursor: pointer; color: var(--muted); border-right: 1px solid #e4e8ee;
}
.status-segment button:last-child { border-right: none; }
.status-segment button:hover { background: #fffde8; }
.status-segment button.aktiv.w-ok { background: var(--ok); color: #fff; }
.status-segment button.aktiv.w-wartung { background: linear-gradient(180deg, #ffea2e, #f7d900); color: #23262b; }
.status-segment button.aktiv.w-beeintraechtigt { background: #e07f10; color: #fff; }
.status-segment button.aktiv.w-ausfall { background: var(--ausfall); color: #fff; }
.status-segment button.aktiv.w-auto { background: #3a3f47; color: #fff; }

.admin-kachel {
  border: 1px solid #e4e8ee; border-radius: 12px; background: #fafbfc;
  padding: 12px 14px; display: flex; flex-direction: column; gap: 9px;
}
.admin-kachel .kopf { display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: 0.92rem; }
.admin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 9px; }
.admin-tabelle {
  width: 100%; border-collapse: collapse; background: #fff;
  border: 1px solid var(--line); border-radius: 12px; overflow: hidden;
}
.admin-tabelle th {
  text-align: left; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--muted); padding: 9px 11px; border-bottom: 1px solid var(--line); background: #fafbfc;
}
.admin-tabelle td { padding: 7px 11px; border-bottom: 1px solid #eceff3; font-size: 0.85rem; vertical-align: middle; }
.admin-tabelle tr:last-child td { border-bottom: none; }
.formzeile { display: flex; gap: 9px; flex-wrap: wrap; align-items: center; margin-bottom: 8px; }
.formzeile label { font-size: 0.82rem; color: #5b6472; }
.n-breit { width: 100%; resize: vertical; }
.hinweis-box {
  background: #fff8d8; border: 1px solid #eedf77; border-radius: 12px;
  padding: 10px 14px; font-size: 0.84rem; margin-bottom: 12px; color: #5a4a00; line-height: 1.5;
}
.toast {
  position: sticky; bottom: 14px; margin: 12px auto 0; width: fit-content; max-width: 90%;
  background: #2f3238; color: #fff; border-radius: 999px; padding: 8px 18px;
  font-size: 0.85rem; opacity: 0; pointer-events: none; transition: opacity 0.25s;
  box-shadow: 0 10px 24px rgba(47, 50, 56, 0.2);
}
.toast.sichtbar { opacity: 1; }
.admin-hero .hero-mascot { width: 74px; }
.admin-hero .wm-pill { font-size: 1.4rem; padding: 3px 14px 5px; border-radius: 12px; }
.admin-hero .wm-rest { font-size: 1.4rem; }
.admin-wer { margin-left: auto; text-align: right; font-size: 0.8rem; color: var(--muted); line-height: 1.5; }
.admin-wer a { color: var(--muted); }

/* ---------- Login ---------- */
.login-wrap { min-height: 92vh; display: flex; align-items: center; justify-content: center; padding: 20px 14px; }
.login-card { max-width: 440px; width: 100%; text-align: center; padding: 30px 28px; }
.login-card .hero-mascot { width: 130px; margin: 0 auto 6px; display: block; }
.login-card h1 { font-size: 1.2rem; margin: 10px 0 6px; }
.login-card p { font-size: 0.87rem; color: var(--muted); margin-bottom: 16px; line-height: 1.5; }
.login-card form { display: flex; flex-direction: column; gap: 9px; }
.login-card .wordmark { justify-content: center; }
.login-card .wm-pill { font-size: 1.5rem; padding: 3px 15px 5px; border-radius: 12px; }
.login-card .wm-rest { font-size: 1.5rem; }
.login-fehler { background: #fff2f2; border: 1px solid #f0cccc; color: #9f2d2d; border-radius: 10px; padding: 9px 12px; font-size: 0.84rem; margin-bottom: 10px; }
.login-ok { background: #e9f6ef; border: 1px solid #bfe3cf; color: var(--ok); border-radius: 10px; padding: 9px 12px; font-size: 0.84rem; margin-bottom: 10px; }
.login-zurueck { margin-top: 16px; }
.login-zurueck a { color: var(--muted); }

@media (max-width: 700px) {
  .hero-mascot { width: 88px; }
  .wm-pill, .wm-rest { font-size: 1.55rem; }
  .banner-meta { flex-basis: 100%; text-align: left; margin-left: 0; }
  .bst-such { max-width: 100%; margin-left: 0; }
  .admin-wer { flex-basis: 100%; text-align: left; margin-left: 0; }
  .tab-abstand { margin-left: 0; }
}
