:root {
  --ink: #0B3E63;
  --paper: #FFFFFF;
  --paper-2: #EAF5FB;
  --line: #CFE3EE;
  --muted: #5C7688;
  --board: #04487A;
  --board-row: #0A5490;
  --board-row-alt: #0E5D9C;
  --flap-amber: #FFD53D;
  --flap-cream: #F3F8FC;
  --flap-line: #1C6BA8;
  --accent-today: #E2574C;
  --accent-soon: #498300;
  --brand-blue: #007BBE;
  --brand-gold-deep: #F9B901;
  --radius: 10px;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  /* Alias-Mapping auf die bisherigen Variablennamen, damit alle bestehenden
     Regeln unten weiterhin funktionieren, jetzt aber die Geburtstagskalender-
     Farben tragen (gleiche Bezeichner wie in der Vorlage "Geburtstagskalender"). */
  --bg: var(--paper-2);
  --bg-elevated: var(--paper);
  --card: var(--paper);
  --accent: var(--brand-gold-deep);
  --accent-dark: #d99e00;
  --text: var(--ink);
  --text-muted: var(--muted);
  --success: var(--accent-soon);
  --danger: var(--accent-today);
  --gold: var(--flap-amber);
  --silver: #c9d3de;
  --bronze: #d99c5f;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  min-height: 100vh;
}

#app {
  max-width: 720px;
  margin: 0 auto;
  padding: 16px 16px 90px;
  min-height: 100vh;
}

a { color: var(--brand-blue); }

h1, h2, h3 { line-height: 1.25; margin: 0 0 8px; }
h1 { font-size: 1.5rem; color: var(--ink); }
h2 { font-size: 1.2rem; color: var(--ink); }
h3 { font-size: .82rem; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  margin: -16px -16px 16px;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 5;
}
.header .eyebrow { margin-bottom: 2px; }

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand .badge {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--paper);
  border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}
.brand .badge img { width: 100%; height: 100%; object-fit: cover; display: block; }

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 14px;
  box-shadow: 0 2px 10px rgba(11,62,99,.06);
  transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease;
}
@media (hover: hover) {
  .card:hover {
    box-shadow: 0 8px 24px rgba(11,62,99,.12);
    border-color: rgba(0,123,190,.25);
  }
}

.muted { color: var(--muted); }
.small { font-size: .85rem; }

/* Aufklappbare Karten (Accordion) - v.a. im Admin-Bereich "Mehr", damit viele
   Einstellungskarten übersichtlich bleiben statt alle gleichzeitig aufgeklappt
   untereinander zu stehen. */
details.card { padding: 0; }
details.card > summary {
  list-style: none;
  cursor: pointer;
  padding: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  user-select: none;
}
details.card > summary::-webkit-details-marker { display: none; }
details.card > summary::marker { content: ''; }
details.card > summary h3 { margin: 0; }
details.card > summary::after {
  content: '';
  width: 9px;
  height: 9px;
  flex-shrink: 0;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(-45deg);
  transition: transform .2s ease;
}
details.card[open] > summary::after { transform: rotate(45deg); }
details.card > summary:hover h3 { color: var(--brand-blue); }
details.card > .accordion-body { padding: 0 18px 18px; }
details.card > .accordion-body > *:first-child { margin-top: 0; }

.fs-subhead {
  margin: 18px 0 8px;
  font-size: .78rem;
  font-weight: 700;
  color: var(--brand-blue);
  text-transform: uppercase;
  letter-spacing: .06em;
}
.fs-subhead:first-of-type { margin-top: 4px; }
.fs-list { margin: 4px 0 12px 20px; font-size: .88rem; line-height: 1.5; }
.fs-list li { margin-bottom: 6px; }

button, .btn {
  font: inherit;
  cursor: pointer;
  border: none;
  border-radius: 10px;
  padding: 12px 18px;
  background: var(--brand-blue);
  color: #fff;
  font-weight: 700;
  transition: transform .05s ease, background .15s ease;
}
button:hover { background: var(--ink); }
button:active { transform: scale(.98); }
button.secondary {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
  font-weight: 600;
}
button.secondary:hover { background: var(--paper-2); }
button.danger { background: var(--accent-today); color: #fff; }
button.small-btn { padding: 6px 10px; font-size: .8rem; }
button:disabled { opacity: .5; cursor: not-allowed; }

input, select, textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  margin-bottom: 12px;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--brand-blue);
  box-shadow: 0 0 0 3px rgba(0,123,190,.15);
}
label { display: block; font-size: .85rem; color: var(--muted); margin-bottom: 4px; }

.field { margin-bottom: 12px; }

.row { display: flex; gap: 10px; }
.row > * { flex: 1; }

/* Kleines Icon links im Eingabefeld, z.B. Stern beim Punkte-Feld - rein visuelle
   Orientierungshilfe, damit auf einen Blick klar ist, welches Feld die Punktzahl ist. */
.input-icon-group { position: relative; flex: 1; }
.input-icon-group svg {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px; height: 16px;
  color: var(--brand-gold-deep, var(--brand-blue));
  pointer-events: none;
}
.input-icon-group input { padding-left: 32px; margin-bottom: 0; }

.tabbar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: rgba(255,255,255,.86);
  backdrop-filter: blur(14px) saturate(180%);
  -webkit-backdrop-filter: blur(14px) saturate(180%);
  display: flex;
  justify-content: space-around;
  gap: 2px;
  padding: 7px 6px calc(7px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  max-width: 720px;
  margin: 0 auto;
  box-shadow: 0 -8px 24px rgba(11,62,99,.08);
  overflow-x: auto;
  scrollbar-width: none;
}
.tabbar::-webkit-scrollbar { display: none; }
.tabbar button {
  background: none;
  border: none;
  color: var(--muted);
  font-weight: 600;
  font-size: .64rem;
  line-height: 1;
  padding: 7px 4px 6px;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex: 1 1 0;
  min-width: 0;
  transition: background .18s ease, color .18s ease, transform .12s ease;
}
.tabbar button svg {
  width: 20px; height: 20px;
  flex-shrink: 0;
  transition: transform .18s ease;
}
.tabbar button .tab-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}
@media (hover: hover) {
  .tabbar button:hover { background: var(--paper-2); color: var(--ink); }
}
.tabbar button:active { transform: scale(.92); background: var(--paper-2); }
.tabbar button.active {
  color: var(--brand-blue);
  background: rgba(0,123,190,.12);
}
.tabbar button.active svg { transform: translateY(-1px); }

/* ---------- Rangliste im "Abflugtafel"-Look ---------- */

#employee-content .card:has(.leaderboard-row),
#lead-content .card:has(.leaderboard-row),
#admin-content .card:has(.leaderboard-row) {
  background: var(--board);
  border: none;
  border-radius: var(--radius);
  padding: 6px;
  box-shadow: 0 6px 20px rgba(4,72,122,.25);
}
.card:has(.leaderboard-row) h3,
.card:has(.leaderboard-row) h2 {
  color: var(--flap-cream);
  padding: 10px 12px 6px;
}

.leaderboard-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--flap-line);
  background: var(--board-row);
  border-radius: 6px;
  margin-bottom: 3px;
  color: var(--flap-cream);
  animation: flapIn .35s ease;
  transition: transform .15s ease, background .15s ease, color .15s ease;
}
.leaderboard-row:nth-child(even) { background: var(--board-row-alt); }
.leaderboard-row.is-me { background: rgba(255,213,61,.16); border-radius: 10px; padding-left: 8px; padding-right: 8px; }
@media (hover: hover) {
  .leaderboard-row:hover {
    transform: translateX(3px);
    background: var(--flap-amber);
    color: var(--ink);
  }
  .leaderboard-row:hover .lb-meta { color: rgba(11,62,99,.68); }
  .leaderboard-row:hover .rank { background: rgba(11,62,99,.12); color: var(--ink); }
  .leaderboard-row:hover .rank.r1,
  .leaderboard-row:hover .rank.r2,
  .leaderboard-row:hover .rank.r3 { background: var(--paper); }
  .leaderboard-row:hover .lb-points { color: var(--ink); }
  .leaderboard-row:hover .tier-pill { background: rgba(11,62,99,.12); color: var(--ink); }
}
.leaderboard-row:last-child { border-bottom: none; margin-bottom: 0; }

@keyframes flapIn {
  from { transform: rotateX(-90deg); opacity: 0; }
  to { transform: rotateX(0deg); opacity: 1; }
}

.rank {
  width: 34px; height: 34px;
  border-radius: 6px;
  background: rgba(255,255,255,.12);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800;
  font-family: var(--mono);
  flex-shrink: 0;
  color: var(--flap-cream);
}
.rank.r1 { background: var(--flap-amber); color: var(--ink); }
.rank.r2 { background: var(--silver); color: var(--ink); }
.rank.r3 { background: var(--bronze); color: var(--ink); }
.lb-name { font-weight: 700; }
.lb-meta { color: rgba(243,248,252,.7); font-size: .8rem; }
.lb-points { font-weight: 800; font-size: 1.1rem; text-align: right; min-width: 64px; font-family: var(--mono); color: var(--flap-amber); }
.tier-pill {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 700;
  background: rgba(249,185,1,.16);
  color: var(--brand-gold-deep);
  margin-top: 4px;
}
.leaderboard-row .tier-pill { background: rgba(255,213,61,.2); color: var(--flap-amber); }

.entry-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 10px 8px;
  margin: 0 -8px;
  border-radius: 8px;
  border-bottom: 1px solid var(--line);
  gap: 10px;
  transition: background .15s ease;
}
.entry-item:last-child { border-bottom: none; }
@media (hover: hover) {
  .entry-item:hover { background: var(--paper-2); }
}
.entry-points {
  font-weight: 800;
  color: var(--accent-soon);
  white-space: nowrap;
  font-family: var(--mono);
}

.toast {
  position: fixed;
  top: 16px; left: 50%; transform: translateX(-50%);
  background: var(--ink);
  color: #fff;
  border: 1px solid var(--brand-blue);
  padding: 10px 18px;
  border-radius: 10px;
  z-index: 999;
  max-width: 90vw;
  box-shadow: 0 6px 18px rgba(11,62,99,.3);
}
.toast.error { border-color: var(--accent-today); background: #7a2620; }

/* Ersatz für window.prompt() (in Electron nicht verfügbar) */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(11, 62, 99, .55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 16px;
}
.modal-box {
  background: var(--paper);
  border-radius: var(--radius);
  padding: 20px;
  width: 100%;
  max-width: 360px;
  box-shadow: 0 12px 30px rgba(0,0,0,.25);
}
.modal-box h3 {
  margin: 0 0 12px;
  color: var(--ink);
}
.modal-label {
  display: block;
  font-size: .85rem;
  color: var(--muted);
  margin-bottom: 6px;
}
.modal-input {
  width: 100%;
  box-sizing: border-box;
  margin-bottom: 16px;
}
.modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}
.modal-actions button { width: auto; padding: 10px 18px; }
.modal-info-body { color: var(--ink); line-height: 1.5; }
.modal-info-body p { margin: 0 0 10px; }
.modal-steps { margin: 0 0 10px; padding-left: 20px; }
.modal-steps li { margin-bottom: 6px; }

/* ---------- "App installieren"-Button (Header + Login-Screen) ---------- */
.header-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.install-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--paper-2);
  color: var(--brand-blue);
  border: 1px solid rgba(0,123,190,.3);
}
.install-btn svg { width: 16px; height: 16px; flex-shrink: 0; }
.install-btn span { white-space: nowrap; }
@media (hover: hover) {
  .install-btn:hover { background: rgba(0,123,190,.14); }
}
.install-btn-wrap { margin: 4px 0 18px; }
.install-btn-wrap .install-btn { padding: 9px 16px; font-size: .85rem; }

@media (max-width: 380px) {
  .header-actions .install-btn span { display: none; }
  .header-actions .install-btn { padding: 7px 9px; }
}

.login-screen {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  text-align: center;
  background:
    radial-gradient(circle at 50% -10%, rgba(0,123,190,.12), transparent 55%),
    var(--paper);
}
.login-card { width: 100%; max-width: 380px; }
.logo-circle {
  width: 96px; height: 96px; border-radius: 50%;
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: 0 4px 14px rgba(11,62,99,.12);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  margin: 0 auto 16px;
  transition: transform .25s ease, box-shadow .25s ease;
}
.logo-circle img { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (hover: hover) {
  .logo-circle:hover { transform: scale(1.04); box-shadow: 0 8px 22px rgba(11,62,99,.2); }
}
.link-btn {
  background: none; border: none; color: var(--brand-blue);
  text-decoration: underline; font-weight: 600; padding: 6px;
}

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); font-size: .88rem; }
th { color: var(--muted); font-weight: 600; }

.empty-state { text-align: center; padding: 30px 10px; color: var(--muted); }

.status-pill {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: .7rem;
  font-weight: 700;
  margin-top: 4px;
}
.status-pill.status-approved { background: rgba(73,131,0,.14); color: var(--accent-soon); }
.status-pill.status-pending { background: rgba(249,185,1,.16); color: var(--brand-gold-deep); }
.status-pill.status-rejected { background: rgba(226,87,76,.14); color: var(--accent-today); }

.pill-list { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.pill-list .pill {
  padding: 6px 12px; border-radius: 999px; background: var(--paper-2);
  border: 1px solid var(--line);
  font-size: .8rem; display: flex; align-items: center; gap: 6px;
  color: var(--ink);
}
.pill button { padding: 2px 8px; font-size: .7rem; }

/* Kleine Kopfzeile im Stil des Geburtstagskalenders (eyebrow + Titel) */
.eyebrow {
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: .72rem;
  color: var(--muted);
  font-weight: 700;
}

/* ---------- Schieberegler (Segment-Switch) €/Punkte für VA-Prämienwert ---------- */
.unit-toggle {
  display: inline-flex;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px;
  gap: 2px;
  flex-shrink: 0;
}
.unit-toggle-option {
  border: none;
  background: none;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: .8rem;
  font-weight: 700;
  color: var(--muted);
  cursor: pointer;
  transition: background .2s ease, color .2s ease;
}
.unit-toggle-option.active {
  background: var(--brand-blue);
  color: #fff;
}

/* ---------- Fortschritts-Kreisdiagramm (z.B. "bis zur nächsten Stufe") ---------- */
.progress-card-row {
  display: flex;
  align-items: center;
  gap: 16px;
}
.progress-ring-track { stroke: var(--line); }
.progress-ring-value {
  stroke: var(--brand-blue);
  stroke-linecap: round;
  transition: stroke-dashoffset .7s ease;
}
.progress-ring-label {
  font-family: var(--mono);
  font-weight: 700;
  font-size: .85rem;
  fill: var(--ink);
}

/* ---------- Fortschrittsbalken beim Eintragen einer Aktion ---------- */
.submit-progress {
  height: 8px;
  border-radius: 999px;
  background: var(--paper-2);
  border: 1px solid var(--line);
  overflow: hidden;
  margin-top: 10px;
}
.submit-progress-fill {
  height: 100%;
  width: 0%;
  background: var(--brand-blue);
  border-radius: 999px;
  transition: width .5s ease;
}

/* ---------- Versionsanzeige ----------
   In den eingeloggten Ansichten fix über der Tabbar (dort ist unten Platz
   reserviert, siehe #app padding-bottom). Auf dem Login-Screen läuft die
   Versionsanzeige stattdessen im normalen Textfluss mit (.app-version-inline
   weiter unten) - der Screen kann höher als der Bildschirm werden, und eine
   fix positionierte Anzeige würde dort beim Scrollen Inhalte überdecken. */
.app-version {
  position: fixed;
  left: 0; right: 0;
  bottom: calc(60px + env(safe-area-inset-bottom));
  text-align: center;
  font-size: .68rem;
  color: var(--muted);
  pointer-events: none;
  z-index: 4;
}
.app-version-inline {
  text-align: center;
  margin: 18px 0 0;
}

@media (max-width: 640px) {
  #app { padding: 14px 12px 90px; }
}

/* Enger Bildschirm (kleinere Handys): Tabbar-Beschriftung etwas kompakter,
   damit auch bei 8 Tabs (Admin) nichts abgeschnitten wird. */
/* ---------- Aktions-Kacheln ("Neue Aktion eintragen") ----------
   Ersetzt das alte <select>-Dropdown: jede Aktion bekommt eine eigene
   Kachel mit Icon, Name und Punktzahl, damit keine Aktion in einer Liste
   untergeht. Veranstalter-Aktionen (vaSponsor gesetzt) laufen in einer
   eigenen, farblich abgesetzten Sektion oberhalb der normalen Aktionen. */
.action-tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(136px, 1fr));
  gap: 10px;
}
.action-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  text-align: left;
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 12px 10px;
  cursor: pointer;
  font-family: inherit;
  transition: border-color .18s ease, box-shadow .18s ease, transform .12s ease;
}
.action-tile .action-tile-icon {
  width: 26px; height: 26px;
  display: flex; align-items: center; justify-content: center;
  color: var(--brand-blue);
}
.action-tile .action-tile-icon svg { width: 22px; height: 22px; }
.action-tile-name {
  font-weight: 700;
  font-size: .86rem;
  line-height: 1.25;
  color: var(--ink);
}
.action-tile-points {
  margin-top: auto;
  font-family: var(--mono);
  font-weight: 700;
  font-size: .95rem;
  color: var(--brand-blue);
}
.action-tile-points span { font-family: var(--sans); font-weight: 600; font-size: .68rem; color: var(--muted); margin-left: 2px; }
@media (hover: hover) {
  .action-tile:hover { background: var(--paper-2); border-color: rgba(0,123,190,.4); box-shadow: 0 6px 18px rgba(11,62,99,.1); transform: translateY(-1px); }
}
.action-tile:active { transform: scale(.97); }
.action-tile.selected {
  border-color: var(--brand-blue);
  box-shadow: 0 0 0 3px rgba(0,123,190,.16);
}
.action-tile.selected::after {
  content: '✓';
  position: absolute;
  top: 8px; right: 10px;
  color: var(--brand-blue);
  font-weight: 700;
  font-size: .85rem;
}

/* (i)-Info-Icon auf jeder Kachel: öffnet einen Dialog mit dem Beschreibungstext
   (max. 200 Zeichen), ohne die Kachel selbst auszuwählen (stopPropagation im JS). */
.action-tile-info {
  position: absolute;
  top: 8px; right: 10px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--paper-2);
  border: 1px solid var(--line);
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--sans);
  font-style: italic;
  font-weight: 700;
  font-size: .68rem;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
}
@media (hover: hover) {
  .action-tile-info:hover { background: var(--brand-blue); border-color: var(--brand-blue); color: #fff; }
}
.action-tile.selected .action-tile-info,
.action-tile-va .action-tile-info { right: 32px; }
.action-tile-va .action-tile-info:hover { background: var(--brand-gold-deep); border-color: var(--brand-gold-deep); }

/* Veranstalter-Kacheln: eigene, goldene Optik + eigene Kartensektion, damit
   sie nie in der normalen Aktionsliste untergehen. */
.action-va-section {
  background: linear-gradient(155deg, rgba(249,185,1,.14), var(--paper) 55%);
  border: 1.5px solid rgba(249,185,1,.55);
}
.action-category-heading { display: flex; align-items: center; gap: 8px; }
.action-category-heading svg { width: 20px; height: 20px; flex-shrink: 0; }
.action-va-section h3.action-category-heading { color: #8a6500; }
.action-tile-va {
  background: linear-gradient(160deg, rgba(249,185,1,.16), var(--paper) 60%);
  border-color: rgba(249,185,1,.6);
}
.action-tile-va .action-tile-icon { color: var(--brand-gold-deep); }
.action-tile-va.selected {
  border-color: var(--brand-gold-deep);
  box-shadow: 0 0 0 3px rgba(249,185,1,.28);
}
.action-tile-va.selected::after { color: #8a6500; }
@media (hover: hover) {
  .action-tile-va:hover { background: linear-gradient(160deg, rgba(249,185,1,.26), var(--paper-2) 60%); border-color: var(--brand-gold-deep); box-shadow: 0 6px 18px rgba(217,158,0,.2); }
}
.action-tile-sponsor {
  font-size: .72rem;
  color: #8a6500;
  line-height: 1.3;
}

/* Kategorie 1 "Tägliche Arbeit": himmelblau hinterlegte Sektion + Kacheln. */
.action-cat-1 {
  background: linear-gradient(155deg, rgba(0,123,190,.12), var(--paper) 55%);
  border: 1.5px solid rgba(0,123,190,.4);
}
.action-cat-1 h3.action-category-heading { color: #045a86; }
.action-tile-cat1 {
  background: linear-gradient(160deg, rgba(0,123,190,.13), var(--paper) 60%);
  border-color: rgba(0,123,190,.45);
}
@media (hover: hover) {
  .action-tile-cat1:hover { background: linear-gradient(160deg, rgba(0,123,190,.22), var(--paper-2) 60%); border-color: rgba(0,123,190,.6); box-shadow: 0 6px 18px rgba(0,123,190,.2); }
}

/* Kategorie 2 "Darüber hinaus": pastellgrün hinterlegte Sektion + Kacheln. */
.action-cat-2 {
  background: linear-gradient(155deg, rgba(46,139,87,.13), var(--paper) 55%);
  border: 1.5px solid rgba(46,139,87,.4);
}
.action-cat-2 h3.action-category-heading { color: #1f7a4d; }
.action-tile-cat2 {
  background: linear-gradient(160deg, rgba(46,139,87,.14), var(--paper) 60%);
  border-color: rgba(46,139,87,.45);
}
@media (hover: hover) {
  .action-tile-cat2:hover { background: linear-gradient(160deg, rgba(46,139,87,.24), var(--paper-2) 60%); border-color: rgba(46,139,87,.6); box-shadow: 0 6px 18px rgba(46,139,87,.2); }
}

/* "Ziel"-Dashboard: 3 Hochrechnungs-Kacheln (Gesamt / Mitarbeiter / Team), je
   mit einem 2-Ring-Diagramm - äußerer Ring = Maximum (immer voll = 100%),
   innerer Ring = Ist-Anteil davon, beide zeichnen sich beim Laden animiert
   ein, die Mittelzahl zählt gleichzeitig von 0 auf den Ist-Wert hoch. */
.forecast-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 12px;
}
.forecast-tile {
  position: relative;
  border-radius: var(--radius);
  padding: 14px 6px 12px;
  text-align: center;
  background: var(--paper);
  border: 1.5px solid var(--line);
}
.forecast-tile-label {
  font-size: .66rem;
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .02em;
  line-height: 1.25;
  margin-bottom: 8px;
  min-height: 2.4em;
  display: flex;
  align-items: center;
  justify-content: center;
}
.forecast-ring-wrap {
  position: relative;
  width: 100px;
  height: 100px;
  margin: 0 auto;
}
.forecast-ring-svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.forecast-ring-svg .ring-track { fill: none; stroke: rgba(11,62,99,.09); stroke-width: 9; }
.forecast-ring-svg .ring-max,
.forecast-ring-svg .ring-ist {
  fill: none;
  stroke-width: 9;
  stroke-linecap: round;
  transition: stroke-dashoffset 1s cubic-bezier(.22,.9,.28,1);
}
.forecast-ring-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.forecast-ring-value {
  font-family: var(--mono);
  font-weight: 800;
  font-size: 1.5rem;
  color: var(--ink);
  line-height: 1;
}
.forecast-ring-unit { font-size: .62rem; font-weight: 700; color: var(--muted); margin-top: 2px; }
.forecast-tile-sub { font-size: .68rem; color: var(--muted); line-height: 1.3; margin-top: 8px; }
.forecast-tile-sub strong { color: var(--ink); font-family: var(--mono); }

/* Kachel 1 "Was kannst du erreichen": orange, damit sie als Hauptkennzahl
   sofort heraussticht. */
.forecast-gesamt {
  background: linear-gradient(155deg, rgba(230,126,34,.16), var(--paper) 62%);
  border-color: rgba(230,126,34,.55);
}
.forecast-gesamt .forecast-tile-label { color: #a85400; }
.forecast-gesamt .ring-max { stroke: rgba(230,126,34,.45); }
.forecast-gesamt .ring-ist { stroke: #e67e22; }

.forecast-mitarbeiter {
  background: linear-gradient(155deg, rgba(0,123,190,.1), var(--paper) 62%);
  border-color: rgba(0,123,190,.35);
}
.forecast-mitarbeiter .ring-max { stroke: rgba(0,123,190,.4); }
.forecast-mitarbeiter .ring-ist { stroke: #045a86; }

.forecast-team {
  background: linear-gradient(155deg, rgba(124,58,171,.14), var(--paper) 62%);
  border-color: rgba(124,58,171,.4);
}
.forecast-team .ring-max { stroke: rgba(124,58,171,.4); }
.forecast-team .ring-ist { stroke: #7c3aab; }

@media (max-width: 380px) {
  .forecast-ring-wrap { width: 82px; height: 82px; }
  .forecast-ring-value { font-size: 1.2rem; }
  .forecast-tile-label { font-size: .6rem; }
}

.action-form-selected {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.action-form-selected .action-tile-icon {
  width: 34px; height: 34px;
  background: var(--paper-2);
  border-radius: 9px;
  flex-shrink: 0;
}

@media (max-width: 400px) {
  .tabbar button { font-size: .58rem; padding: 6px 2px 5px; gap: 3px; }
  .tabbar button svg { width: 18px; height: 18px; }
}

/* ---------- Admin-Dashboard (Nutzungs-Auswertung) ----------
   Braucht deutlich mehr Breite als der Rest der App (Diagramme, Tabellen) -
   #app.wide durchbricht bewusst die sonst überall gültige 720px-Grenze,
   während Header/Tabbar zentriert bleiben (die haben ihre eigene max-width). */
#app.wide { max-width: 1240px; }

.dash-range {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}
.dash-range-btn {
  background: var(--paper);
  color: var(--muted);
  border: 1px solid var(--line);
  font-weight: 600;
  font-size: .8rem;
  padding: 7px 14px;
  border-radius: 999px;
}
.dash-range-btn:hover { background: var(--paper-2); }
.dash-range-btn.active { background: var(--brand-blue); color: #fff; border-color: var(--brand-blue); }

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}
.kpi-card { padding: 16px; margin-bottom: 0; text-align: center; }
.kpi-value { font-family: var(--mono); font-weight: 800; font-size: 1.8rem; color: var(--brand-blue); line-height: 1; }
.kpi-label { margin-top: 6px; font-size: .74rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }

.chart-line { display: block; overflow: visible; }

.dash-grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}
.dash-grid-2 .card { margin-bottom: 0; }

.bar-list { display: flex; flex-direction: column; gap: 10px; }
.bar-list-row { display: grid; grid-template-columns: 84px 1fr 32px; align-items: center; gap: 10px; }
.bar-list-label { font-size: .82rem; color: var(--ink); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-list-track { height: 10px; border-radius: 999px; background: var(--paper-2); overflow: hidden; }
.bar-list-fill { height: 100%; border-radius: 999px; transition: width .4s ease; }
.bar-list-value { font-family: var(--mono); font-weight: 700; font-size: .82rem; text-align: right; color: var(--ink); }

.table-scroll { overflow-x: auto; margin: 0 -18px; padding: 0 18px; }
.table-scroll table { min-width: 520px; }
.activity-log { max-height: 420px; overflow-y: auto; }
.activity-log table { min-width: 680px; }
.activity-log thead th { position: sticky; top: 0; background: var(--paper); }

@media (max-width: 640px) {
  #app.wide { max-width: none; }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .bar-list-label { width: 70px; }
}
