* { box-sizing: border-box; }
body { margin: 0; font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
       background: #f3f5f7; color: #1c2733; font-size: 15px; }
header { display: flex; align-items: center; gap: 24px; background: #16324f;
         color: #fff; padding: 10px 24px; flex-wrap: wrap; }
.marke { font-weight: 700; font-size: 18px; color: #fff; text-decoration: none; }
.marke span { font-weight: 400; font-size: 13px; opacity: .7; margin-left: 6px; }
header nav { display: flex; gap: 4px; flex-wrap: wrap; }
header nav a { color: #dbe6f1; text-decoration: none; padding: 6px 12px; border-radius: 6px; }
header nav a:hover { background: rgba(255,255,255,.12); }
header nav a.knopf { background: #2e7d32; color: #fff; font-weight: 600; }
.kopf-rechts { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.kopf-rechts a { color: #fff; text-decoration: none; font-weight: 600; }
main { max-width: 1200px; margin: 24px auto; padding: 0 16px 60px; }
h1 { font-size: 22px; margin: 8px 0 16px; }
h2 { font-size: 17px; margin: 26px 0 10px; }
.hinweis { background: #e6f4ea; border: 1px solid #b7dfc2; color: #1e4620;
           padding: 10px 14px; border-radius: 8px; margin-bottom: 16px; }
.hinweis.fehler { background: #fdeaea; border-color: #f2b8b5; color: #8c1d18; }
.karte { background: #fff; border: 1px solid #dfe5ec; border-radius: 10px;
         padding: 16px 18px; margin-bottom: 16px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px,1fr));
        gap: 12px; margin-bottom: 20px; }
.kpi { background: #fff; border: 1px solid #dfe5ec; border-radius: 10px;
       padding: 14px; text-align: center; }
.kpi .zahl { font-size: 28px; font-weight: 700; }
.kpi.warn .zahl { color: #b3261e; }
table { width: 100%; border-collapse: collapse; background: #fff;
        border: 1px solid #dfe5ec; border-radius: 10px; overflow: hidden; }
th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .04em;
     color: #5b6b7b; background: #f7f9fb; padding: 8px 10px; border-bottom: 1px solid #dfe5ec; }
td { padding: 9px 10px; border-bottom: 1px solid #eef1f5; vertical-align: top; }
tr:last-child td { border-bottom: none; }
a { color: #16548f; }
.status { display: inline-block; padding: 2px 9px; border-radius: 999px;
          font-size: 12px; font-weight: 600; white-space: nowrap; }
.status.grau { background: #e8ebee; color: #444; }
.status.blau { background: #dbe9fb; color: #174e8c; }
.status.tuerkis { background: #d5f0ef; color: #0e5a56; }
.status.gelb { background: #fdf3d0; color: #7a5a00; }
.status.rot { background: #fadada; color: #8c1d18; }
.status.gruen { background: #d9efdc; color: #1e5c26; }
.kat { font-weight: 700; }
.kat.K5 { color: #b3261e; } .kat.K3 { color: #7a3ba3; } .kat.K4 { color: #a05a00; }
.kat.K1 { color: #16548f; } .kat.K2 { color: #3c6a3f; } .kat.K0 { color: #666; }
form.zeile { display: flex; gap: 8px; flex-wrap: wrap; align-items: end; }
label { display: block; font-size: 12px; color: #5b6b7b; margin-bottom: 3px; font-weight: 600; }
input, select, textarea { font: inherit; padding: 7px 9px; border: 1px solid #c3ccd6;
                          border-radius: 7px; background: #fff; width: 100%; }
textarea { min-height: 70px; }
.feld { margin-bottom: 12px; }
.formular-gitter { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px,1fr)); gap: 12px; }
button, .aktion { font: inherit; font-weight: 600; background: #16548f; color: #fff;
                  border: none; border-radius: 7px; padding: 8px 16px; cursor: pointer; }
button:hover { filter: brightness(1.1); }
button.gruen { background: #2e7d32; } button.rot { background: #b3261e; }
button.grau { background: #5b6b7b; } button.leise { background: transparent;
              color: inherit; font-weight: 400; padding: 4px 8px; opacity: .8; }
.aktionen { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0; }
.aktionen form { display: inline; }
.meta { color: #5b6b7b; font-size: 13px; }
.ueberfaellig { color: #b3261e; font-weight: 700; }
.login-box { max-width: 380px; margin: 8vh auto; }
.protokoll td { font-size: 13px; }
.abschnitt-kopf { display: flex; align-items: baseline; justify-content: space-between; }
details { margin: 10px 0; }
details summary { cursor: pointer; font-weight: 600; color: #16548f; }
.klein { font-size: 12px; color: #5b6b7b; }
.dispo td, .dispo th { text-align: center; }
.dispo td:first-child, .dispo th:first-child { text-align: left; }
.dispo .d-frei { background: #fff; color: #aab4be; }
.dispo .d-gruen { background: #d9efdc; font-weight: 600; }
.dispo .d-gelb { background: #fdf3d0; font-weight: 600; }
.dispo .d-rot { background: #fadada; font-weight: 700; color: #8c1d18; }
.dispo .d-abw { background: #e8ebee; color: #8a949e; }
.status.orange { background: #ffe2c2; color: #8a4b00; }
.status.blaub { background: #dfe7f5; color: #2f4a7c; }
.triage { display: inline-block; padding: 2px 9px; border-radius: 6px; font-size: 12px;
          font-weight: 700; white-space: nowrap; }
.triage.ROT { background: #b3261e; color: #fff; }
.triage.ORANGE { background: #e8730c; color: #fff; }
.triage.GELB { background: #fdd835; color: #4a3b00; }
.triage.GRUEN { background: #2e7d32; color: #fff; }
.triage.BLAU { background: #3c6ab0; color: #fff; }
.ep-badge { display: inline-block; min-width: 26px; text-align: center; padding: 1px 6px;
            border-radius: 6px; background: #16324f; color: #fff; font-weight: 700; font-size: 12px; }
.score-bar { display: flex; height: 22px; border-radius: 6px; overflow: hidden; font-size: 11px;
             font-weight: 700; color: #fff; min-width: 200px; }
.score-bar span { display: flex; align-items: center; justify-content: center; }
.score-k { background: #2f6fc0; } .score-a { background: #e8730c; } .score-s { background: #7c8186; }
.score-e { background: #7a3ba3; } .score-f { background: #b3261e; }
.frog { color: #2e7d32; font-weight: 700; }
.frog5 { color: #b3261e; }
.p1 { color: #b3261e; font-weight: 700; } .p2 { color: #e8730c; font-weight: 700; }
.p3 { color: #2f6fc0; } .p4 { color: #7c8186; }

.nav-zaehler { display: inline-block; background: rgba(255,255,255,.22); color: #fff;
               border-radius: 999px; font-size: 11px; font-weight: 700; padding: 1px 7px;
               margin-left: 6px; vertical-align: 1px; font-family: ui-monospace, Consolas, monospace; }
header nav a:hover .nav-zaehler { background: rgba(255,255,255,.32); }

/* ---------- Benachrichtigungen: Glocke + Pop-up ---------- */
.glocke { position: relative; }
.glocke summary { list-style: none; cursor: pointer; font-size: 18px; padding: 4px 6px;
                  border-radius: 8px; position: relative; }
.glocke summary::-webkit-details-marker { display: none; }
.glocke summary:hover { background: rgba(255,255,255,.12); }
.glocke-zahl { position: absolute; top: -2px; right: -4px; background: #e8410c; color: #fff;
               font-size: 11px; font-weight: 700; border-radius: 999px; min-width: 17px;
               height: 17px; line-height: 17px; text-align: center; padding: 0 4px; }
.glocke-liste { position: absolute; right: 0; top: 34px; width: 340px; max-height: 420px;
                overflow-y: auto; background: #fff; color: #1c2733; border: 1px solid #c9d3de;
                border-radius: 12px; box-shadow: 0 10px 30px rgba(22,50,79,.25); z-index: 100; }
.glocke-eintrag { display: block; padding: 10px 12px; border-bottom: 1px solid #eef1f5;
                  text-decoration: none; color: #1c2733; font-size: 13px; line-height: 1.4; }
.glocke-eintrag .klein { display: block; margin-top: 2px; }
.glocke-eintrag:hover { background: #f3f7fc; }
.glocke-eintrag.neu { background: #eaf2fd; border-left: 3px solid #2f6fc0; font-weight: 600; }
.glocke-eintrag.neu:hover { background: #dbe9fb; }
.toast { position: fixed; right: 18px; bottom: 18px; max-width: 380px; background: #16324f;
         color: #fff; padding: 14px 18px; border-radius: 12px; font-size: 14px;
         box-shadow: 0 10px 30px rgba(0,0,0,.35); cursor: pointer; z-index: 200;
         transform: translateY(20px); opacity: 0; transition: all .35s ease; }
.toast.sichtbar { transform: translateY(0); opacity: 1; }

/* ---------- Das Eingangstor (Claude-artige Startseite) ---------- */
.tor-buehne { max-width: 720px; margin: 6vh auto 0; text-align: center; }
.tor-marke { width: 64px; height: 64px; margin: 0 auto 18px; border-radius: 16px;
             background: #2f6fc0; color: #fff; font-size: 34px; font-weight: 800;
             display: flex; align-items: center; justify-content: center;
             box-shadow: 0 4px 14px rgba(47,111,192,.35); }
.tor-marke.klein-marke { width: 44px; height: 44px; font-size: 24px; border-radius: 12px; }
.tor-frage { font-size: 28px; margin: 0 0 6px; }
.tor-unter { color: #5b6b7b; margin: 0 auto 22px; max-width: 540px; }
.tor-box { background: #fff; border: 1px solid #c9d3de; border-radius: 16px;
           box-shadow: 0 6px 24px rgba(22,50,79,.08); padding: 14px 14px 10px; text-align: left; }
.tor-box textarea { border: none; outline: none; resize: vertical; width: 100%;
                    font-size: 16px; min-height: 64px; padding: 4px 6px; }
.tor-box textarea:focus { box-shadow: none; }
.tor-leiste { display: flex; align-items: center; gap: 10px; border-top: 1px solid #eef1f5;
              padding-top: 8px; margin-top: 6px; }
.tor-werkzeug { background: #f3f5f7; border: 1px solid #dfe5ec; border-radius: 10px;
                padding: 7px 12px; cursor: pointer; font-size: 16px; color: #1c2733; }
.tor-werkzeug:hover { background: #e8edf3; }
.tor-werkzeug.aufnahme { background: #fadada; border-color: #b3261e; animation: puls 1.2s infinite; }
@keyframes puls { 50% { opacity: .55; } }
.tor-senden { margin-left: auto; background: #2f6fc0; border-radius: 10px; padding: 9px 20px;
              font-size: 15px; }
.tor-letzte { margin-top: 34px; text-align: left; }
.tor-letzte h2 { font-size: 14px; color: #5b6b7b; text-transform: uppercase;
                 letter-spacing: .05em; }
.tor-karte { display: flex; gap: 14px; align-items: baseline; background: #fff;
             border: 1px solid #dfe5ec; border-radius: 10px; padding: 11px 14px;
             margin-bottom: 8px; text-decoration: none; color: inherit; }
.tor-karte:hover { border-color: #2f6fc0; box-shadow: 0 2px 10px rgba(22,50,79,.08); }
.tor-karte-titel { font-weight: 600; flex: 1; min-width: 0; }
.mono-klein { font-family: ui-monospace, Consolas, monospace; font-size: 12px; color: #5b6b7b; }
.tor-faden { text-align: left; margin: 10px 0 4px; }
.tor-blase { border-radius: 14px; padding: 12px 16px; margin: 10px 0; max-width: 85%;
             line-height: 1.5; white-space: pre-line; }
.tor-blase.nutzer { background: #16324f; color: #fff; margin-left: auto;
                    border-bottom-right-radius: 4px; }
.tor-blase.system { background: #fff; border: 1px solid #dfe5ec; margin-right: auto;
                    border-bottom-left-radius: 4px; }
.tor-optionen { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-start;
                text-align: left; margin: 6px 0; }
.tor-option { background: #fff; color: #16548f; border: 1.5px solid #2f6fc0;
              border-radius: 999px; padding: 8px 18px; font-size: 14px; }
.tor-option:hover { background: #dbe9fb; }
