/**
 * Dashboard - Trialog Intranet Design
 * Home-screen pieces ported from the intranet.html design prototype
 * (repo root): the stat row spacing, the Karriere/Bestenliste duo row,
 * the dark Karriere navigation card and the top-3 revenue podium.
 * Prototype classes are renamed with the `in-dash-` / `in-pod-` prefixes.
 * Design tokens (--in-*) live in intranet.css; this file only consumes them.
 */

/* ========================================
   STAT ROW
   ======================================== */

.in-dash-stats {
  margin-bottom: 22px;
}

.in-dash-stats .in-stat-val.is-pending {
  color: var(--in-ink-500);
}

.in-dash-scope-note {
  display: block;
}

.in-dash-scope-note:empty {
  display: none;
}

/* Quick-access tone missing from intranet.css (Tools card). */
.in-qa-ic.tone-amber {
  background: var(--in-amber-soft);
  color: var(--in-amber);
}

/* ========================================
   DUO ROW: KARRIERE CARD + PODIUM
   ======================================== */

.in-dash-duo {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: 20px;
  margin-bottom: 22px;
  align-items: stretch;
}

.in-dash-duo.is-single {
  grid-template-columns: 1fr;
}

@media (max-width: 900px) {
  .in-dash-duo {
    grid-template-columns: 1fr;
  }
}

/* ========================================
   KARRIERE NAVIGATION CARD (dark gradient)
   ======================================== */

.in-dash-career {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 22px;
  border-radius: var(--in-radius);
  background: linear-gradient(135deg, var(--in-navy-800), var(--in-navy-600));
  color: #fff;
  box-shadow: var(--in-shadow-sm);
}

/* Die Karte war frueher selbst der Absprung. Seit die Umsatzzahlen mit ihren
   Zeitraum-Schaltern darin sitzen, ist sie es nicht mehr - ein Anker mit
   Schaltflaechen darin ist nicht bedienbar. Zeiger und Hebe-Effekt haengen
   deshalb jetzt am Fusslink, nicht mehr an der ganzen Flaeche. */
.in-dash-career-cta {
  text-decoration: none;
  transition: 0.18s;
}

.in-dash-career-cta:hover {
  color: #fff;
  gap: 9px;
}

.in-dash-career-cta:focus-visible {
  outline: 2px solid var(--in-blue-400);
  outline-offset: 3px;
  border-radius: 6px;
}

.in-dash-career-eye {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #9db4dd;
}

.in-dash-career-title {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.3px;
  margin-top: 8px;
}

.in-dash-career-text {
  font-size: 13.5px;
  line-height: 1.55;
  color: #c7d4ec;
  margin-top: 8px;
}

.in-dash-career-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: auto;
  padding-top: 16px;
  font-size: 12.5px;
  font-weight: 600;
  color: #9db4dd;
}

/* ========================================
   BESTENLISTE PODIUM
   ======================================== */

.in-dash-podium-card {
  display: flex;
  flex-direction: column;
}

.in-dash-podium {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 14px;
  padding: 16px 6px 0;
}

.in-pod-col {
  flex: 1;
  max-width: 150px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  min-width: 0;
}

.in-pod-av {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
  font-size: 16px;
  position: relative;
  border: 3px solid var(--in-card);
  box-shadow: var(--in-shadow-sm);
  flex-shrink: 0;
}

.in-pod-medal {
  /* SVG-Muenze: dezent unten rechts am Avatar, kein Farb-Chip mehr */
  position: absolute;
  bottom: -3px;
  right: -5px;
  width: 23px;
  height: 23px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  line-height: 0;
  filter: drop-shadow(0 1.5px 3px rgba(16, 39, 76, 0.35));
}

.in-pod-name {
  font-weight: 700;
  font-size: 13px;
  margin-top: 10px;
  line-height: 1.25;
  color: var(--in-ink-900);
}

.in-pod-du {
  font-size: 10px;
  font-weight: 700;
  color: var(--in-blue-500);
  background: var(--in-blue-100);
  padding: 1px 7px;
  border-radius: 20px;
  margin-left: 4px;
  white-space: nowrap;
}

.in-pod-val {
  font-size: 12px;
  color: var(--in-ink-500);
  margin-top: 3px;
  font-weight: 600;
}

.in-pod-bar {
  width: 100%;
  border-radius: 12px 12px 0 0;
  margin-top: 12px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 12px;
  font-weight: 800;
  font-size: 24px;
  color: rgba(255, 255, 255, 0.95);
  overflow: hidden;
  animation: in-pod-grow 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Rank colors: gold / silver / bronze, avatar tinted to match the app. */
.in-pod-1 .in-pod-bar {
  height: 112px;
  background: linear-gradient(180deg, #d9b44a, #c9a24b);
}

.in-pod-2 .in-pod-bar {
  height: 84px;
  background: linear-gradient(180deg, #c6cfdc, #aab5c5);
}

.in-pod-3 .in-pod-bar {
  height: 64px;
  background: linear-gradient(180deg, #d99e6f, #c17f4e);
}

.in-pod-1 .in-pod-av {
  background: var(--in-navy-600);
}

.in-pod-2 .in-pod-av {
  background: var(--in-blue-500);
}

.in-pod-3 .in-pod-av {
  background: var(--in-teal);
}

.in-pod-1 .in-pod-medal,
.in-pod-2 .in-pod-medal,
.in-pod-3 .in-pod-medal {
  /* Metallfarben kommen jetzt aus dem Medaillen-SVG selbst */
  background: transparent;
}

@keyframes in-pod-grow {
  from {
    height: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .in-pod-bar {
    animation: none;
  }

  .in-dash-career,
  .in-dash-career:hover {
    transform: none;
    transition: none;
  }
}

.in-dash-podium-empty {
  width: 100%;
  text-align: center;
  font-size: 13.5px;
  color: var(--in-ink-500);
  padding: 28px 0 12px;
}

.in-dash-podium-note {
  text-align: center;
  font-size: 12px;
  color: var(--in-ink-500);
  margin-top: 14px;
}

/* ========================================
   FEINSCHLIFF: STAT-KACHELN & SCHNELLZUGRIFF
   ======================================== */

/* KPI tiles: tabular digits so values align, plus a quiet hover response. */
.in-dash-stats .in-stat {
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.in-dash-stats .in-stat:hover {
  transform: translateY(-2px);
  box-shadow: var(--in-shadow-md);
}

.in-dash-stats .in-stat-val,
.in-pod-val,
.in-pod-bar,
.in-dash-podium-note {
  font-variant-numeric: tabular-nums;
}

/* Quick-access cards: the icon answers the hover, nothing else moves extra. */
.in-qa .in-qa-ic {
  transition: transform 0.18s ease;
}

.in-qa:hover .in-qa-ic {
  transform: scale(1.06);
}

/* Career card: CTA brightens to close the hover feedback loop. */
.in-dash-career-cta {
  transition: color 0.18s ease;
}

.in-dash-career:hover .in-dash-career-cta {
  color: #fff;
}

/* Empty podium: a friendly, quiet star instead of bare text. */
.in-dash-podium-empty::before {
  content: '\2605';
  display: block;
  font-size: 20px;
  line-height: 1;
  color: var(--in-ink-500);
  opacity: 0.55;
  margin-bottom: 8px;
}

@media (prefers-reduced-motion: reduce) {
  .in-dash-stats .in-stat,
  .in-dash-stats .in-stat:hover {
    transform: none;
    transition: none;
  }

  .in-qa .in-qa-ic,
  .in-qa:hover .in-qa-ic {
    transform: none;
    transition: none;
  }
}

@media (max-width: 640px) {
  .in-dash-podium {
    gap: 8px;
  }

  .in-pod-av {
    width: 46px;
    height: 46px;
    font-size: 14px;
  }

  .in-pod-bar {
    font-size: 20px;
  }

  .in-pod-name {
    font-size: 12px;
  }
}

/* ---------------------------------------------------------------------------
   Umsatzzahlen in der Karriere-Karte auf der Uebersicht.

   Vier Zeilen untereinander statt nebeneinander: Sie werden verglichen, und
   Betraege vergleicht man in einer Spalte, nicht in einer Reihe. Die Werte
   stehen deshalb rechtsbuendig auf einer Kante und in Tabellenziffern -
   sonst tanzen die Stellen und der Vergleich wird zur Sucharbeit.
   --------------------------------------------------------------------------- */

.in-dash-umsatz {
  margin: 16px 0 18px;
}

.in-dash-umsatz-kopf {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.in-dash-umsatz-titel {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1.1px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
}

.in-dash-umsatz-schalter {
  display: inline-flex;
  gap: 3px;
  padding: 3px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.1);
}

.in-dash-umsatz-btn {
  padding: 4px 10px;
  border: none;
  border-radius: 7px;
  background: none;
  color: rgba(255, 255, 255, 0.72);
  font: inherit;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  transition: 0.16s;
}

.in-dash-umsatz-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.in-dash-umsatz-btn.active {
  background: #fff;
  color: var(--in-navy-800);
}

.in-dash-umsatz-zeile {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

/* Die Summe - kraeftiger und mit Abschlussstrich darueber.
   An der Klasse und nicht an :last-child: Darunter kann die Lizenzzeile
   stehen (Geschaeftsfuehrung und Muttergesellschaft), und die haette der
   Summe sonst ihren Strich weggenommen. */
.in-dash-umsatz-zeile.is-summe {
  border-bottom: none;
  margin-top: 2px;
  padding-top: 11px;
  border-top: 1px solid rgba(255, 255, 255, 0.28);
}

/* Lizenzeinnahmen: gehoeren nicht zu den Provisionen darueber und stehen
   deshalb sichtbar abgesetzt - eigener Abstand, gold statt weiss. Wer die
   Karte ueberfliegt, soll die beiden Groessen nicht addieren. */
.in-dash-umsatz-zeile.is-lizenz {
  border-bottom: none;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed rgba(233, 205, 128, 0.45);
}

.in-dash-umsatz-zeile.is-lizenz .in-dash-umsatz-lab,
.in-dash-umsatz-zeile.is-lizenz .in-dash-umsatz-wert {
  color: var(--in-gold-soft, #f3ead4);
}

.in-dash-umsatz-zeile.is-lizenz .in-dash-umsatz-lab em {
  color: rgba(233, 205, 128, 0.75);
}

.in-dash-umsatz-lab {
  display: flex;
  flex-direction: column;
  font-size: 13.5px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.92);
}

.in-dash-umsatz-lab em {
  font-style: normal;
  font-size: 11px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.55);
  margin-top: 1px;
}

.in-dash-umsatz-wert {
  font-size: 15px;
  font-weight: 800;
  color: #fff;
  white-space: nowrap;
  /* Tabellenziffern: gleiche Breite je Stelle, damit die Betraege
     untereinander auf einer Kante stehen. */
  font-variant-numeric: tabular-nums;
}

.in-dash-umsatz-zeile:last-child .in-dash-umsatz-wert {
  font-size: 19px;
}
