/* Sternwarte. Farben aus den Sternzeit Brand Guidelines: Rot, Navy, Gelb, Schwarz. */
@font-face { font-family: 'Jost'; src: url('/fonts/jost/files/jost-latin-wght-normal.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'Nunito Sans'; src: url('/fonts/nunito-sans/files/nunito-sans-latin-wght-normal.woff2') format('woff2'); font-weight: 200 1000; font-display: swap; }

:root {
  --ground: #F7F5F0; --card: #FFFFFF; --ink: #171616; --muted: #5E5B57;
  --navy: #264595; --navy-60: #808EBB; --navy-40: #AAB5D2; --navy-20: #D5DAE8;
  --red: #DF1E26; --red-text: #B3151C; --red-20: #F0D8D7;
  --yellow: #FCDE49; --yellow-20: #FDF8DE; --good: #1C6E4A;
  --display: 'Jost', system-ui, sans-serif; --body: 'Nunito Sans', system-ui, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--ground); color: var(--ink); font-family: var(--body); font-size: 15px; line-height: 1.45; }
a { color: var(--navy); } a:hover { color: var(--ink); }
h1, h2 { font-family: var(--display); font-weight: 600; margin: 0; }
h1 { font-size: 34px; } h2 { font-size: 20px; }
button, input, textarea, select { font: inherit; }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }

.shell { display: flex; flex-wrap: wrap; min-height: 100vh; }
.side { flex: 1 1 220px; max-width: 100%; background: var(--ink); color: #fff; padding: 28px 20px; display: flex; flex-direction: column; gap: 28px; }
.brand { font-family: var(--display); font-weight: 600; font-size: 24px; letter-spacing: .02em; }
.brand small { display: block; font-family: var(--body); font-weight: 400; font-size: 13px; letter-spacing: 0; color: var(--navy-20); }
.nav { display: flex; flex-direction: column; gap: 6px; }
.nav a, .nav span { display: flex; justify-content: space-between; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border-radius: 8px; font-weight: 600; text-decoration: none; color: #fff; }
.nav a:hover { background: #2B2A2A; color: #fff; }
.nav a[aria-current='page'] { background: var(--navy); }
.nav span { color: var(--navy-40); } .nav small { font-weight: 400; font-size: 12px; color: var(--navy-20); }
.who { margin-top: auto; display: flex; flex-direction: column; gap: 8px; font-size: 13px; color: var(--navy-20); }
.who strong { color: #fff; font-size: 14px; }

.main { flex: 999 1 560px; min-width: 0; padding: 32px clamp(16px, 4vw, 44px) 56px; }
.page { max-width: 1080px; margin: 0 auto; display: flex; flex-direction: column; gap: 24px; }
.head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px; }
.sub, .muted { color: var(--muted); } .small { font-size: 13px; }
.tools { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.btn { display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border: 1px solid var(--navy); border-radius: 8px; background: var(--card); color: var(--navy); font-weight: 700; font-size: 14px; text-decoration: none; cursor: pointer; }
.btn:hover { background: var(--navy-20); color: var(--navy); }
.btn.dark { background: transparent; color: #fff; border-color: var(--navy-60); } .btn.dark:hover { background: #2B2A2A; color: #fff; }

.range { gap: 16px; padding: 18px 24px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px; border-radius: 18px; background: var(--navy-20); color: var(--ink); font-size: 14px; font-weight: 600; text-decoration: none; }
.chip:hover { background: var(--navy-40); color: var(--ink); } .chip[aria-current='true'] { background: var(--navy); color: #fff; }
.pick { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; }
.pick label, form.add label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 700; }
input[type='date'], select { min-height: 44px; padding: 0 12px; border: 1px solid var(--navy-40); border-radius: 8px; background: var(--card); color: var(--ink); }

.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.kpis { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.stack { display: flex; flex-direction: column; gap: 16px; }
.card { background: var(--card); border-radius: 12px; padding: 24px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.kpi { padding: 20px; gap: 8px; }
.kpi .label { font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.kpi .value { font-family: var(--display); font-weight: 600; font-size: 34px; line-height: 1.1; }
.kpi .status { font-size: 13px; font-weight: 700; }
.tone-ok { color: var(--good); } .tone-warn { color: var(--muted); } .tone-bad { color: var(--red-text); }
.meter { height: 6px; border-radius: 3px; background: var(--navy-20); } .meter i { display: block; height: 6px; border-radius: 3px; background: var(--navy); }
.note { background: var(--yellow-20); border-radius: 12px; padding: 16px 20px; font-size: 14px; }

.bars { position: relative; display: flex; align-items: flex-end; justify-content: space-around; gap: 6px; border-bottom: 1px solid var(--navy-40); }
.bars .col { flex: 1 1 0; max-width: 96px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.bars .col b { position: relative; z-index: 1; align-self: center; padding: 0 3px; background: var(--card); font-size: 11px; white-space: nowrap; }
.bars .col i { display: block; border-radius: 3px 3px 0 0; background: var(--navy); }
.bars .col i.red { background: var(--red); } .bars .col i.yellow { background: var(--yellow); } .bars .col i + i { border-radius: 0; }
.bars.many .col b { display: none; }
.bars .goal { position: absolute; left: 0; right: 0; border-top: 2px dashed var(--ink); }
.axis { display: flex; justify-content: space-around; gap: 6px; font-size: 12px; color: var(--muted); } .axis span { flex: 1 1 0; max-width: 96px; text-align: center; }
.goal-key { font-size: 13px; font-weight: 700; } .goal-key i { display: inline-block; width: 22px; border-top: 2px dashed var(--ink); vertical-align: middle; margin-right: 8px; }
.legend { display: flex; flex-wrap: wrap; gap: 12px; font-size: 13px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; background: var(--navy); }
.legend i.red { background: var(--red); } .legend i.yellow { background: var(--yellow); }

.rows { display: flex; flex-direction: column; gap: 10px; font-size: 14px; }
.row { display: flex; align-items: center; gap: 12px; }
.row .name { flex: 0 0 160px; } .row .num { flex: 0 0 auto; min-width: 44px; text-align: right; font-weight: 700; }
.row .track { flex: 1 1 0; height: 14px; border-radius: 3px; background: var(--navy-20); }
.row .track i { display: block; height: 14px; border-radius: 3px; background: var(--navy); }
.row .track.red { background: var(--red-20); } .row .track.red i { background: var(--red); }

.scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 10px 0 10px 12px; text-align: right; } td { white-space: nowrap; } th:first-child, td:first-child { text-align: left; padding-left: 0; }
thead th { color: var(--muted); font-size: 13px; font-weight: 600; } tbody tr { border-top: 1px solid var(--navy-20); }
tbody th { font-weight: 700; } td.strong { font-weight: 700; }

.comment { display: flex; gap: 12px; align-items: flex-start; background: var(--yellow-20); border-radius: 8px; padding: 12px 14px; font-size: 14px; }
.comment p { margin: 0; white-space: pre-line; }
form.add { display: flex; flex-direction: column; gap: 8px; } form.add label { font-size: 14px; } form.add input[type='date'] { align-self: flex-start; }
textarea { width: 100%; min-height: 72px; padding: 10px 12px; border: 1px solid var(--navy-40); border-radius: 8px; resize: vertical; }
.center { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.center .card { max-width: 420px; width: 100%; gap: 18px; }
