:root {
  --bg: #07070a;
  --card: #121218;
  --line: rgba(255,255,255,.10);
  --text: #f5f5f7;
  --muted: #9a9aa6;
  --gold: #e8c16a;
  --good: #3ccf7a;
  --close: #f1b640;
  --behind: #ef5a5a;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { background: var(--bg); color: var(--text); font-family: 'Inter', system-ui, sans-serif; }
a { color: inherit; }
.num { font-variant-numeric: tabular-nums; }

/* ── Übersicht (TV, 1920×1080, alles in vh) ── */
body.tv { height: 100vh; overflow: hidden; display: flex; flex-direction: column; padding: 3vh 3vw 2vh; gap: 2vh; }
.head { display: flex; align-items: flex-end; justify-content: space-between; gap: 2vw; }
.head h1 { font-size: 6vh; font-weight: 900; letter-spacing: .04em; line-height: 1; }
.head h1 span { color: var(--gold); }
.head .period { margin-top: .8vh; font-size: 2.2vh; color: var(--muted); letter-spacing: .12em; text-transform: uppercase; }
.chips { display: flex; gap: .8vw; flex-wrap: wrap; justify-content: flex-end; }
.chip { padding: 1vh 1.2vw; border: 1px solid var(--line); border-radius: 999px; font-size: 2vh; color: var(--muted); white-space: nowrap; }
.chip b { color: var(--text); font-weight: 800; }

.goals { flex: 1; min-height: 0; display: grid; grid-template-rows: repeat(5, 1fr); gap: 1.6vh; }
.goal { background: var(--card); border: 1px solid var(--line); border-radius: 1.6vh; padding: 1.6vh 1.6vw;
  display: grid; grid-template-columns: 19vw 1fr 27vw; align-items: center; gap: 2vw; border-left: .6vh solid var(--c); }
.goal .name { font-size: 3.3vh; font-weight: 800; line-height: 1.1; }
.goal .sub { font-size: 1.7vh; color: var(--muted); margin-top: .4vh; }
.goal .value { margin-top: .8vh; font-size: 4.6vh; font-weight: 900; line-height: 1; }
.goal .value small { font-size: 2.3vh; font-weight: 600; color: var(--muted); }

.bar { position: relative; height: 5.6vh; border-radius: 1vh; background: rgba(255,255,255,.06); overflow: visible; }
.bar .fill { position: absolute; inset: 0 auto 0 0; width: 0; border-radius: 1vh; background: var(--c);
  transition: width 1.8s cubic-bezier(.2,.8,.2,1); }
.bar .over { position: absolute; top: -1.2vh; right: 0; font-size: 1.7vh; font-weight: 800; color: var(--gold); }
.bar .soll { position: absolute; top: -.8vh; bottom: -.8vh; width: .35vh; background: #fff; opacity: .55; border-radius: .2vh; }
.bar .soll::after { content: 'Soll'; position: absolute; top: 100%; left: 50%; transform: translateX(-50%); margin-top: .2vh;
  font-size: 1.3vh; color: var(--muted); }
.bar .pct { position: absolute; inset: 0; display: flex; align-items: center; justify-content: flex-end; padding-right: 1.2vw; font-size: 2.6vh;
  font-weight: 900; text-shadow: 0 1px 4px rgba(0,0,0,.6); }

.metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1vw; text-align: center; }
.metric .k { font-size: 1.5vh; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.metric .v { font-size: 3.2vh; font-weight: 800; margin-top: .4vh; }
.metric .v small { font-size: 1.6vh; color: var(--muted); font-weight: 600; }
.status-good .forecast { color: var(--good); }
.status-close .forecast { color: var(--close); }
.status-behind .forecast { color: var(--behind); }
.status-done .forecast { color: var(--gold); }
.pill { display: inline-block; margin-top: .8vh; padding: .3vh .8vw; border-radius: 999px; font-size: 1.6vh; font-weight: 700; }
.status-good .pill { background: rgba(60,207,122,.15); color: var(--good); }
.status-close .pill { background: rgba(241,182,64,.15); color: var(--close); }
.status-behind .pill { background: rgba(239,90,90,.15); color: var(--behind); }
.status-done .pill { background: rgba(232,193,106,.18); color: var(--gold); }
.foot { display: flex; justify-content: space-between; font-size: 1.6vh; color: var(--muted); }

/* ── Agentenliste / Admin (normale Seite) ── */
body.page { padding: 24px 16px 48px; }
.wrap { max-width: 1280px; margin: 0 auto; display: grid; gap: 20px; }
.top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 12px; }
.top h1 { font-size: 28px; font-weight: 900; }
.top h1 span { color: var(--gold); }
.top .meta { color: var(--muted); font-size: 14px; }
nav { display: flex; gap: 8px; flex-wrap: wrap; }
.btn { display: inline-block; padding: 8px 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--card);
  color: var(--text); font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; }
.btn.primary { background: var(--gold); border-color: var(--gold); color: #111; }
.btn.danger { color: var(--behind); }
.grid2 { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 20px; align-items: start; }
@media (max-width: 900px) { .grid2 { grid-template-columns: minmax(0, 1fr); } }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 16px; overflow-x: auto; }
.panel h2 { font-size: 18px; margin-bottom: 12px; }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th { text-align: right; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .05em; padding: 6px 8px;
  border-bottom: 1px solid var(--line); white-space: nowrap; }
th:nth-child(-n+3) { text-align: left; }
td { padding: 7px 8px; border-bottom: 1px solid var(--line); text-align: right; white-space: nowrap; }
td:nth-child(-n+3) { text-align: left; }
td.zero { color: #55555f; }
td.sum { font-weight: 800; }
tr.top3 td:first-child { color: var(--gold); font-weight: 800; }
.team { font-size: 12px; color: var(--muted); }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; vertical-align: middle; }
.flash { padding: 10px 14px; border-radius: 8px; font-weight: 600; }
.flash.success { background: rgba(60,207,122,.15); color: var(--good); }
.flash.error { background: rgba(239,90,90,.15); color: var(--behind); }
form.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
input, select { padding: 8px 10px; border-radius: 8px; border: 1px solid var(--line); background: #0c0c11; color: var(--text); font: inherit; }
input[type=number] { width: 120px; }
.hint { color: var(--muted); font-size: 13px; }
.login { min-height: 80vh; display: grid; place-items: center; }
.login form { width: 100%; max-width: 360px; display: grid; gap: 12px; }
