/* Sales Team Monitor – internes Dashboard
   Palette: Ink #1F2D3A · Fläche #F2F5F7 · Karte #FFFFFF
   Fokus-KPIs: Workable Rate Petrol #0F6B5C · Hitrate Violett #8A4FBE
   Warnung Amber #B45309 · Negativ #B3372B */

:root {
  --bg: #F2F5F7;
  --card: #FFFFFF;
  --ink: #1F2D3A;
  --muted: #64748B;
  --line: #E3E8ED;
  --wr: #0F6B5C;
  --hr: #8A4FBE;
  --warn: #B45309;
  --bad: #B3372B;
  --good: #15803D;
}

* { box-sizing: border-box; }
html { font-size: 16px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  line-height: 1.45;
}
main { max-width: 1180px; margin: 0 auto; padding: 24px 20px 60px; }
a { color: var(--wr); }
h1 { font-size: 1.7rem; margin: 0 0 4px; letter-spacing: -0.01em; }
h2 { font-size: 1.05rem; margin: 0 0 14px; text-transform: uppercase;
     letter-spacing: 0.06em; color: var(--muted); font-weight: 600; }
h3 { font-size: 0.95rem; margin: 22px 0 10px; }
.muted { color: var(--muted); }

/* Kopfzeile */
.topbar {
  background: var(--ink); color: #fff;
  display: flex; align-items: center; gap: 32px;
  padding: 0 24px; height: 56px; position: sticky; top: 0; z-index: 10;
}
.brand { color: #fff; text-decoration: none; font-weight: 700; display: flex;
         align-items: center; gap: 10px; letter-spacing: 0.01em; }
.brand-mark { background: var(--wr); border-radius: 6px; width: 28px; height: 28px;
              display: grid; place-items: center; font-size: 0.75rem; }
.topbar nav { display: flex; gap: 4px; }
.topbar nav a {
  color: #C7D2DC; text-decoration: none; padding: 8px 14px; border-radius: 8px;
  font-size: 0.95rem;
}
.topbar nav a:hover { color: #fff; background: rgba(255,255,255,.08); }
.topbar nav a.active { color: #fff; background: rgba(255,255,255,.14); }
.topbar nav a:focus-visible, a:focus-visible, button:focus-visible,
select:focus-visible, input:focus-visible {
  outline: 2px solid var(--hr); outline-offset: 2px;
}

.page-head { display: flex; justify-content: space-between; align-items: flex-end;
             gap: 20px; margin: 8px 0 22px; flex-wrap: wrap; }
.breadcrumb { margin: 0; font-size: 0.85rem; }
.month-picker { display: flex; align-items: center; gap: 8px; }
.month-picker label { font-size: 0.85rem; color: var(--muted); }
.month-picker select {
  padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--card); font: inherit; color: var(--ink);
}

/* Hero-KPIs */
.hero-kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.hero-card {
  background: var(--card); border-radius: 14px; padding: 22px 24px;
  border: 1px solid var(--line); border-top: 4px solid var(--ink);
  display: flex; flex-direction: column; gap: 4px;
}
.hero-card.wr { border-top-color: var(--wr); }
.hero-card.hr { border-top-color: var(--hr); }
.hero-label { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.08em;
              color: var(--muted); font-weight: 600; }
.hero-label small { text-transform: none; letter-spacing: 0; font-weight: 400; }
.hero-value { font-size: 2.6rem; font-weight: 750; letter-spacing: -0.02em;
              font-variant-numeric: tabular-nums; }
.wr .hero-value { color: var(--wr); }
.hr .hero-value { color: var(--hr); }
.hero-sub { font-size: 0.9rem; color: var(--muted); }
.delta { font-size: 0.85rem; font-weight: 600; margin-top: 4px; }
.delta.up { color: var(--good); }
.delta.down { color: var(--bad); }

/* KPI-Raster */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
            gap: 12px; margin-bottom: 16px; }
.kpi-grid.tight { margin-bottom: 0; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: 12px;
       padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; }
.kpi-label { font-size: 0.78rem; color: var(--muted); }
.kpi-value { font-size: 1.5rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.kpi.warn .kpi-value { color: var(--warn); }
.kpi-value a { color: inherit; text-decoration: none; border-bottom: 2px dotted currentColor; }
.kpi-value a:hover { opacity: .75; }
.kpi-deltas, .hero-deltas { font-size: 0.78rem; color: var(--muted); margin-top: 4px;
                            font-variant-numeric: tabular-nums; }
.kpi-deltas i { font-style: normal; color: var(--line); }
.d { font-weight: 700; }
.d.good { color: var(--good); }
.d.bad { color: var(--bad); }
.d.neutral { color: var(--muted); font-weight: 500; }
.small { font-size: 0.8rem; }

/* Panels & Tabellen */
.panel { background: var(--card); border: 1px solid var(--line); border-radius: 14px;
         padding: 20px 22px; margin-bottom: 16px; }
.chart-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.chart-row .panel { margin-bottom: 16px; }
.chart { width: 100%; height: auto; }
.chart .tick { font-size: 11px; fill: var(--muted); }
.chart .val { font-size: 11px; fill: var(--ink); font-weight: 600; }
.chart .legend { font-size: 11px; }

.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
table.data th { text-align: left; font-size: 0.75rem; text-transform: uppercase;
                letter-spacing: 0.05em; color: var(--muted); padding: 8px 10px;
                border-bottom: 2px solid var(--line); white-space: nowrap; }
table.data td { padding: 9px 10px; border-bottom: 1px solid var(--line);
                font-variant-numeric: tabular-nums; }
table.data tr:hover td { background: #F7FAFB; }
th.hl, td.hl { background: #F0F6F4; font-weight: 600; }

/* Unqualified Reasons */
table.reasons { width: 100%; border-collapse: collapse; }
table.reasons td { padding: 6px 8px; }
.reason-name { width: 32%; }
.reason-bar { width: 58%; }
.reason-bar span { display: block; height: 12px; border-radius: 6px;
                   background: linear-gradient(90deg, var(--ink), #46607A); min-width: 4px; }
.reason-count { width: 10%; text-align: right; font-weight: 600;
                font-variant-numeric: tabular-nums; }

/* Mitarbeiter-Karten */
.emp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 16px; }
.emp-card { background: var(--card); border: 1px solid var(--line); border-radius: 14px;
            padding: 18px 20px; text-decoration: none; color: var(--ink);
            transition: box-shadow .15s ease, transform .15s ease; }
.emp-card:hover { box-shadow: 0 6px 18px rgba(31,45,58,.10); transform: translateY(-2px); }
@media (prefers-reduced-motion: reduce) {
  .emp-card, .emp-card:hover { transition: none; transform: none; }
}
.emp-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--ink);
          color: #fff; display: grid; place-items: center; font-weight: 700; }
.emp-name { font-weight: 700; flex: 1; }
.emp-date { font-size: 0.78rem; }
.emp-hero { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.mini { border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; }
.mini span { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; }
.mini strong { font-size: 1.4rem; font-variant-numeric: tabular-nums; }
.mini.wr { background: #EAF4F1; color: var(--wr); }
.mini.hr { background: #F3ECFA; color: var(--hr); }
.emp-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 16px; margin: 0; }
.emp-stats div { display: flex; justify-content: space-between; font-size: 0.85rem;
                 border-bottom: 1px dashed var(--line); padding: 3px 0; }
.emp-stats dt { color: var(--muted); }
.emp-stats dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.emp-stats dd.bad { color: var(--bad); }

/* Upload */
.upload-form { display: flex; flex-direction: column; gap: 14px; }
.dropzone { border: 2px dashed #B9C6D1; border-radius: 12px; padding: 34px 20px;
            text-align: center; cursor: pointer; background: #FAFCFD; display: block; }
.dropzone:hover { border-color: var(--wr); }
.dropzone input { display: block; margin: 0 auto 10px; }
.btn { background: var(--ink); color: #fff; border: 0; border-radius: 10px;
       padding: 11px 20px; font: inherit; font-weight: 600; cursor: pointer;
       align-self: flex-start; text-decoration: none; display: inline-block; }
.btn:hover { background: #33465A; }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn.ghost:hover { background: #fff; }
.hint { margin-top: 16px; font-size: 0.9rem; }
.hint summary { cursor: pointer; font-weight: 600; }

/* Meldungen */
.flash { border-radius: 10px; padding: 12px 16px; margin-bottom: 14px; font-size: 0.95rem; }
.flash.success { background: #E7F4EA; color: var(--good); border: 1px solid #BBDFC4; }
.flash.error { background: #FBEAE8; color: var(--bad); border: 1px solid #EFC4BE; }
.empty { background: var(--card); border: 1px dashed var(--line); border-radius: 14px;
         padding: 40px; text-align: center; color: var(--muted); }
.footer { text-align: center; color: var(--muted); font-size: 0.8rem; padding: 20px; }

@media (max-width: 760px) {
  .hero-kpis, .chart-row { grid-template-columns: 1fr; }
  .topbar { gap: 12px; overflow-x: auto; }
}

/* Customer Number: monospaced für gute Lesbarkeit langer Nummern */
td.mono { font-family: "SF Mono", "Consolas", "Liberation Mono", monospace;
          font-size: 0.88rem; letter-spacing: 0.02em; }

/* Forecast Closed Won */
.forecast { display: grid; grid-template-columns: minmax(240px, 1fr) 2fr; gap: 16px;
            margin-bottom: 16px; }
.fc-main { background: var(--ink); color: #fff; border-radius: 14px; padding: 20px 22px;
           display: flex; flex-direction: column; gap: 3px; }
.fc-main.is-actual { background: #33465A; }
.fc-label { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.07em;
            color: #A9BCCB; font-weight: 600; }
.fc-value { font-size: 2.6rem; font-weight: 750; letter-spacing: -0.02em;
            font-variant-numeric: tabular-nums; line-height: 1.1; }
.fc-sub { font-size: 0.85rem; color: #C7D2DC; }
.fc-main .kpi-deltas { color: #A9BCCB; }
.fc-main .d.neutral { color: #A9BCCB; }
.fc-main .d.good { color: #6EE7A8; }
.fc-main .d.bad { color: #FCA5A5; }
.fc-parts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.fc-part { background: var(--card); border: 1px solid var(--line); border-radius: 12px;
           padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; }
.fc-part-label { font-size: 0.78rem; color: var(--muted); }
.fc-part-value { font-size: 1.6rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.fc-of { font-size: 1rem; color: var(--muted); font-weight: 500; }
.fc-part-sub { font-size: 0.75rem; color: var(--muted); }
.fc-bar { height: 8px; border-radius: 4px; background: var(--line); margin-top: 8px;
          overflow: hidden; }
.fc-bar span { display: block; height: 100%; background: var(--wr); border-radius: 4px; }
th.fc-col, td.fc-col { background: #FFF8EF; }
td.fc-col { font-variant-numeric: tabular-nums; }
.ist { font-size: 0.65rem; background: var(--line); color: var(--muted); border-radius: 4px;
       padding: 1px 4px; margin-left: 5px; vertical-align: middle; }
@media (max-width: 900px) {
  .forecast { grid-template-columns: 1fr; }
  .fc-parts { grid-template-columns: 1fr; }
}

/* Alerts & Highlights */
.signals { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 6px; }
.signal-col { background: var(--card); border: 1px solid var(--line); border-radius: 14px;
              padding: 18px 20px; border-left: 4px solid var(--line); }
.signal-col.alerts { border-left-color: var(--bad); }
.signal-col.highlights { border-left-color: var(--good); }
.signal-head { display: flex; align-items: center; gap: 8px; margin-bottom: 12px;
               font-size: 0.82rem; }
.signal-head .dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.alerts .signal-head .dot { background: var(--bad); }
.highlights .signal-head .dot { background: var(--good); }
.signal-list { list-style: none; margin: 0; padding: 0; display: flex;
               flex-direction: column; gap: 10px; }
.signal-list li { display: flex; gap: 12px; align-items: flex-start;
                  padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.signal-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.s-rank { flex: none; width: 22px; height: 22px; border-radius: 6px; font-size: 0.72rem;
          font-weight: 700; display: grid; place-items: center; margin-top: 2px; }
.alerts .s-rank { background: #FBEAE8; color: var(--bad); }
.highlights .s-rank { background: #E7F4EA; color: var(--good); }
.s-body { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.s-label { font-weight: 700; font-size: 0.92rem; }
.s-value { font-size: 1.25rem; font-weight: 700; font-variant-numeric: tabular-nums;
           line-height: 1.2; }
.alerts .s-value { color: var(--bad); }
.highlights .s-value { color: var(--good); }
.s-cmp { font-size: 0.8rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.s-trend { font-size: 0.78rem; font-weight: 600; margin-top: 2px; }
.s-trend.good { color: var(--good); }
.s-trend.bad { color: var(--bad); }
.signal-none { color: var(--muted); font-size: 0.9rem; margin: 0; }
.signal-note { margin: 0 0 16px; }
@media (max-width: 760px) { .signals { grid-template-columns: 1fr; } }

/* ---------- Login ---------- */
.login-page { background: linear-gradient(160deg, #1F2D3A 0%, #2C4257 100%);
              min-height: 100vh; display: grid; place-items: center; }
.login-wrap { width: 100%; max-width: 420px; padding: 24px; }
.login-card { background: var(--card); border-radius: 16px; padding: 32px;
              box-shadow: 0 18px 50px rgba(15,25,35,.35); }
.login-brand { display: flex; align-items: center; gap: 10px; font-weight: 700;
               color: var(--ink); margin-bottom: 22px; }
.login-card h1 { font-size: 1.4rem; margin-bottom: 4px; }
.login-form { display: flex; flex-direction: column; gap: 6px; margin-top: 18px; }
.login-form label { font-size: 0.82rem; color: var(--muted); font-weight: 600;
                    margin-top: 8px; }
.login-form input { padding: 11px 13px; border: 1px solid var(--line); border-radius: 9px;
                    font: inherit; }
.login-form input:focus { border-color: var(--wr); }
.login-form .btn { margin-top: 18px; align-self: stretch; text-align: center; }
.login-note { margin-top: 16px; text-align: center; }
.panel.narrow { max-width: 460px; }

/* ---------- Topbar: Benutzer ---------- */
.topbar-user { margin-left: auto; display: flex; align-items: center; gap: 14px;
               font-size: 0.85rem; }
.who { color: #fff; display: flex; align-items: center; gap: 8px; }
.role-tag { background: rgba(255,255,255,.16); color: #D7E2EA; border-radius: 5px;
            padding: 2px 6px; font-size: 0.68rem; text-transform: uppercase;
            letter-spacing: 0.05em; }
.user-link { color: #A9BCCB; text-decoration: none; }
.user-link:hover { color: #fff; text-decoration: underline; }

/* ---------- Kopfbereich-Werkzeuge ---------- */
.head-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* ---------- Offene Topics ---------- */
.open-topics { display: inline-flex; align-items: center; gap: 8px; margin-top: 10px;
               background: #FFF4E3; border: 1px solid #F3D9AE; color: #92400E;
               border-radius: 999px; padding: 6px 14px 6px 6px; font-size: 0.88rem;
               font-weight: 600; text-decoration: none; }
.open-topics:hover { background: #FDE9C8; }
.ot-badge { background: var(--warn); color: #fff; border-radius: 50%; width: 22px;
            height: 22px; display: grid; place-items: center; font-size: 0.78rem; }
.ot-arrow { font-size: 0.9rem; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
#topics { scroll-margin-top: 70px; }

/* ---------- Topics-Tabelle ---------- */
table.topics td { vertical-align: top; }
.todo-cell { max-width: 380px; white-space: pre-wrap; }
.by { display: block; font-size: 0.72rem; color: var(--muted); font-weight: 400; }
.topic-erreicht td:first-child strong { color: var(--good); }
.topic-nicht_erreicht td:first-child strong { color: var(--bad); }
.ueberfaellig { background: #FBEAE8; color: var(--bad); border-radius: 4px;
                padding: 1px 5px; font-size: 0.7rem; font-weight: 700; margin-left: 5px; }
.status-select { padding: 5px 8px; border-radius: 7px; border: 1px solid var(--line);
                 font: inherit; font-size: 0.82rem; font-weight: 600; background: #fff; }
.status-select.offen { color: var(--warn); border-color: #F3D9AE; background: #FFF8EF; }
.status-select.erreicht { color: var(--good); border-color: #BBDFC4; background: #F1F9F3; }
.status-select.nicht_erreicht { color: var(--bad); border-color: #EFC4BE; background: #FDF3F2; }
.inline-form { display: inline-flex; gap: 6px; align-items: center; margin: 0; }
td.actions { display: flex; gap: 6px; flex-wrap: wrap; align-items: flex-start; }
.btn.tiny { padding: 5px 10px; font-size: 0.78rem; border-radius: 7px; }
.topic-form { display: flex; flex-direction: column; gap: 8px; padding: 14px;
              background: #F7FAFB; border: 1px solid var(--line); border-radius: 10px;
              margin-top: 10px; }
.topic-form label { font-size: 0.8rem; color: var(--muted); font-weight: 600;
                    display: flex; flex-direction: column; gap: 4px; }
.topic-form input, .topic-form textarea, .topic-form select {
  padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; font: inherit;
  font-weight: 400; color: var(--ink); }
.tf-row { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 10px; }
.topic-form .btn { align-self: flex-start; }
details.new-topic > summary, details.edit-topic > summary { cursor: pointer;
  list-style: none; display: inline-block; }
details > summary::-webkit-details-marker { display: none; }

/* ---------- Benutzerverwaltung ---------- */
.user-form { display: flex; flex-direction: column; gap: 12px; }
.uf-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.uf-row label { display: flex; flex-direction: column; gap: 4px; font-size: 0.8rem;
                color: var(--muted); font-weight: 600; }
.uf-row input, .uf-row select { padding: 9px 11px; border: 1px solid var(--line);
                                border-radius: 8px; font: inherit; font-weight: 400;
                                color: var(--ink); }
.user-form .btn { align-self: flex-start; }
.pw-input { padding: 5px 8px; border: 1px solid var(--line); border-radius: 7px;
            font: inherit; font-size: 0.8rem; width: 140px; }
.role-badge { border-radius: 5px; padding: 2px 7px; font-size: 0.72rem; font-weight: 700; }
.role-badge.admin { background: #EDE4F8; color: var(--hr); }
.role-badge.mitarbeiter { background: #E6EEF3; color: #46607A; }
.inactive-row { opacity: .55; }
.ok { color: var(--good); font-weight: 600; }
td .bad { color: var(--bad); font-weight: 600; }
.chart .tick.sel { fill: var(--ink); font-weight: 700; }
@media (max-width: 760px) {
  .uf-row, .tf-row { grid-template-columns: 1fr; }
  .topbar-user .who { display: none; }
}

/* ---------- Calls: Tagesansicht ---------- */
.panel.calls { padding-bottom: 16px; }
.calls-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); margin-bottom: 18px; }
.call-kpi .kpi-value { font-size: 1.35rem; }
.day-charts { display: flex; flex-direction: column; gap: 18px; }
.day-chart h3 { font-size: 0.85rem; margin: 0 0 6px; color: var(--muted);
                text-transform: uppercase; letter-spacing: 0.05em; }
.daychart { width: 100%; height: auto; }
.daychart .tick.frei { fill: #B9C6D1; }
.daychart rect { transition: opacity .1s; }
.daychart rect:hover { opacity: .75; }

/* Vergleich zum Teamdurchschnitt */
.vs-team { border-left: 1px solid var(--line); padding-left: 8px; margin-left: 2px; }
.fc-main .vs-team { border-left-color: rgba(255,255,255,.2); }
.kpi-deltas { line-height: 1.7; }

/* Hinweis bei unvollständigen Call-Daten */
.fc-warn { display: block; margin-top: 8px; font-size: 0.75rem; color: var(--warn);
           background: #FFF8EF; border: 1px solid #F3D9AE; border-radius: 6px;
           padding: 5px 8px; line-height: 1.35; }

/* Neutrale Hinweismeldung */
.flash.info { background: #EEF4F8; color: #46607A; border: 1px solid #D3E0E9; }

/* ---------- Badges ---------- */
:root { --b-hitrate: #8A4FBE; --b-won: #B8860B; --b-calls: #B45309; }
.b-hitrate { color: var(--b-hitrate); }
.b-won { color: var(--b-won); }
.b-calls { color: var(--b-calls); }

.badge-pill { display: inline-flex; align-items: center; gap: 3px; border-radius: 999px;
              padding: 2px 7px 2px 5px; font-size: 0.75rem; font-weight: 700;
              border: 1px solid currentColor; margin-right: 3px; line-height: 1.4; }
.badge-pill.b-hitrate { background: #F5EFFB; }
.badge-pill.b-won { background: #FBF4E2; }
.badge-pill.b-calls { background: #FDF1E4; }
.badge-pill.empty { color: #C3CDD6; background: transparent; border-color: #E3E8ED; }
.bp-icon { font-size: 0.85rem; line-height: 1; }
.bp-count { font-variant-numeric: tabular-nums; }
.badge-pill.tiny { padding: 1px 6px 1px 4px; font-size: 0.72rem; }
td.badge-col, th.badge-col { white-space: nowrap; }

/* Badge-Sammlung auf der Mitarbeiterseite */
.badge-box { background: var(--card); border: 1px solid var(--line); border-radius: 14px;
             padding: 16px 20px; margin-bottom: 16px; }
.bb-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 12px; }
.bb-title { font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.06em;
            color: var(--muted); font-weight: 600; }
.bb-total { font-size: 1.5rem; font-weight: 750; font-variant-numeric: tabular-nums; }
.bb-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.bb-item { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line);
           border-radius: 10px; padding: 10px 12px; }
.bb-item.none { opacity: .5; }
.bb-icon { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
           font-size: 1.05rem; flex: none; border: 1.5px solid currentColor; }
.bb-icon.b-hitrate { background: #F5EFFB; }
.bb-icon.b-won { background: #FBF4E2; }
.bb-icon.b-calls { background: #FDF1E4; }
.bb-item.none .bb-icon { background: #F4F7F9; color: #9DB2C4; }
.bb-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.bb-label { font-weight: 700; font-size: 0.88rem; }
.bb-months { font-size: 0.72rem; color: var(--muted); overflow: hidden;
             text-overflow: ellipsis; white-space: nowrap; }
.bb-count { font-size: 1.3rem; font-weight: 750; font-variant-numeric: tabular-nums; }

/* Badges des Monats */
.mb-list { display: flex; gap: 12px; flex-wrap: wrap; }
.mb-item { display: flex; align-items: center; gap: 10px; border-radius: 10px;
           padding: 12px 16px; border: 1px solid currentColor; }
.mb-item.b-hitrate { background: #F5EFFB; }
.mb-item.b-won { background: #FBF4E2; }
.mb-item.b-calls { background: #FDF1E4; }
.mb-icon { font-size: 1.4rem; }
.mb-text { display: flex; flex-direction: column; }
.mb-label { font-weight: 700; font-size: 0.85rem; color: var(--ink); }
.mb-value { font-size: 1.1rem; font-weight: 700; font-variant-numeric: tabular-nums; }

/* ---------- High-/Low-Performer ---------- */
tr.perf-high td { background: #F1F9F3; }
tr.perf-high:hover td { background: #E7F4EA; }
tr.perf-low td { background: #FDF3F2; }
tr.perf-low:hover td { background: #FBEAE8; }
tr.perf-high td:first-child { box-shadow: inset 3px 0 0 var(--good); }
tr.perf-low td:first-child { box-shadow: inset 3px 0 0 var(--bad); }
td.name-cell { display: flex; align-items: center; gap: 7px; }
.perf-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; }
.perf-dot.high { background: var(--good); }
.perf-dot.low { background: var(--bad); }
.table-legend { margin: 12px 0 0; display: flex; align-items: center; gap: 4px;
                flex-wrap: wrap; line-height: 1.7; }
.legend-ico { font-weight: 700; }
@media (max-width: 900px) { .bb-list { grid-template-columns: 1fr; } }

/* Von der Badge-Vergabe ausgenommen */
.badge-box.not-eligible { border-style: dashed; }
.bb-note { margin: 0; font-size: 0.9rem; }

/* ---------- Reiter innerhalb einer Seite ---------- */
.tabs { display: flex; gap: 2px; background: #E6ECF1; border-radius: 11px; padding: 3px;
        margin: 0 0 18px; overflow-x: auto; }
.tab { flex: 1; border: 0; background: transparent; font: inherit; font-size: 0.9rem;
       font-weight: 600; color: #5B7186; padding: 9px 16px; border-radius: 8px;
       cursor: pointer; white-space: nowrap; display: flex; align-items: center;
       justify-content: center; gap: 7px; transition: background .12s, color .12s; }
.tab:hover { color: var(--ink); background: rgba(255,255,255,.6); }
.tab.active { background: var(--card); color: var(--ink);
              box-shadow: 0 1px 3px rgba(31,45,58,.12); }
.tab:focus-visible { outline: 2px solid var(--hr); outline-offset: -2px; }
.tab-count { background: #CFDAE3; color: #3D5568; border-radius: 999px; min-width: 20px;
             height: 19px; padding: 0 6px; display: inline-flex; align-items: center;
             justify-content: center; font-size: 0.72rem; font-weight: 700; }
.tab.active .tab-count { background: #E2E9EF; }
.tab-count.warn { background: var(--warn); color: #fff; }
@media (prefers-reduced-motion: reduce) { .tab { transition: none; } }
@media (max-width: 640px) { .tab { padding: 9px 12px; font-size: 0.85rem; } }

/* ---------- Vier Haupt-KPIs mit Daumen ---------- */
.hero-kpis.four { grid-template-columns: repeat(4, 1fr); }
.hero-card.won { border-top-color: var(--ink); }
.hero-card.perday { border-top-color: var(--warn); }
.won .hero-value { color: var(--ink); }
.perday .hero-value { color: var(--warn); }
.hero-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.thumb { flex: none; width: 38px; height: 38px; display: grid; place-items: center;
         border-radius: 50%; }
.thumb svg { width: 26px; height: 26px; }
.thumb.up { background: #E7F4EA; }
.thumb.up svg { fill: var(--good); }
.thumb.down { background: #FBEAE8; }
.thumb.down svg { fill: var(--bad); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
           overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Roter Topics-Reiter bei offenen Punkten */
.tab.danger { color: var(--bad); }
.tab.danger:hover { color: var(--bad); }
.tab.danger.active { color: var(--bad); }
.tab-count.danger { background: var(--bad); color: #fff; }

@media (max-width: 1100px) { .hero-kpis.four { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .hero-kpis.four { grid-template-columns: 1fr; } }

/* Hochrechnung in der KPI-Karte */
.kpi-fc { font-size: 0.78rem; color: var(--warn); font-variant-numeric: tabular-nums;
          margin-top: 2px; }
.kpi-fc strong { background: #FFF4E3; border: 1px solid #F3D9AE; border-radius: 4px;
                 padding: 0 4px; font-size: 0.7rem; letter-spacing: 0.03em; }
.kpi-note { margin: -6px 0 16px; }
.fc-parts.single { grid-template-columns: 1fr; }

/* ---------- Rollen & Einladungen (Verwaltung) ---------- */
.role-select { padding: 5px 8px; border-radius: 7px; border: 1px solid var(--line);
               font: inherit; font-size: 0.82rem; font-weight: 600; background: #fff; }
.role-select.admin { color: var(--hr); border-color: #D9C4EC; background: #F5EFFB; }
.role-select.teamleiter { color: #0F6B5C; border-color: #B9Ddd0; background: #EAF4F1; }
.role-select.mitarbeiter { color: #46607A; }
.badge-status { border-radius: 5px; padding: 2px 8px; font-size: 0.72rem; font-weight: 700; }
.badge-status.offen { background: #FFF4E3; color: var(--warn); border: 1px solid #F3D9AE; }
