:root {
    --card-bg: #f0f0f0;
    --card-padding: 20px;
    --card-radius: 10px;
    --card-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    --accent: #ffd700;
    --text-main: #222;
}

/* Container für die gesamte Startseite */
.home-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
    padding: 30px;
}

/* Allgemeine Card-Struktur */
.card {
    background-color: var(--card-bg);
    border-radius: var(--card-radius);
    box-shadow: var(--card-shadow);
    padding: var(--card-padding);
    color: var(--text-main);
	position: relative;
}

/* Zweispaltiger Layoutblock */
.row-2col {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    margin: -15px; /* Negiert äußere card-Margins */
}

/* Linke & rechte Spalte innerhalb eines 2er-Layouts */
.row-2col .card {
    flex: 1 1 500px;
    margin: 15px; /* Abstand nach allen Seiten */
}

/* Video-Karte: padding raus, randloser Player */
.card.video-card {
    padding: 0;
    overflow: hidden;
}

/* Video-Wrapper mit 16:9 */
.video-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    height: 0;
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Karten-Block (für spätere Bereiche wie Geld/LKW/Aktien) */
.karten {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.karte {
    flex: 1 1 calc(33.333% - 10px);
    background-color: var(--accent);
    color: #000;
    font-weight: bold;
    text-align: center;
    padding: 15px;
    border-radius: var(--card-radius);
    min-width: 120px;
}

/* Responsive fallback */
@media screen and (max-width: 768px) {
    .row-2col {
        flex-direction: column;
    }

    .karte {
        flex: 1 1 100%;
    }
}



/*-------------------------------------------------------+
| Aktive Fahrer Card Layout
+--------------------------------------------------------*/

/* === Container & Layout === */
.driver-compact {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  border-radius: 4px;
  margin-bottom: 4px;
  font-family: sans-serif;
  font-size: 14px;
  flex-wrap: wrap;
}

.driver-green {
  background: #a5f3a1;
}
.driver-orange {
  background: #ffe08c;
}
.driver-red {
  background: #f59898;
}

/* === Avatar & Name === */
.driver-head {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.driver-head .avatar {
  width: 32px;
  height: 32px;
  border-radius: 50% 0 0 50%;
  border: 1px solid #888;
  object-fit: cover;
  flex-shrink: 0;
}

.driver-head .name-box {
  width: 140px;
  padding: 5px 4px;
  font-weight: bold;
  height: 32px;
  display: flex;
  align-items: center;
  border-top-right-radius: 6px;
  border-bottom-right-radius: 6px;
  margin-left: -1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.driver-green .name-box {
  background-color: #b3e6b3;
  border: 1px solid #7ac87a;
}
.driver-orange .name-box {
  background-color: #ffe3a3;
  border: 1px solid #e1b75c;
}
.driver-red .name-box {
  background-color: #f4b6b6;
  border: 1px solid #cc7a7a;
}

/* === Standard-Flexbereich für Datenzeile === */
.driver-data {
  display: flex;
  flex: 1;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.driver-data span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* === Truck-Icon === */
.truck-icon {
  width: 32px;
  height: 32px;
  margin-left: 5px;
}

/* === LKW-Schaden-Kreis === */
.truck-damage-circle {
  width: 30px;
  height: 30px;
  padding: 1px;
  margin-left: -5px;
  border-radius: 50%;
  overflow: visible;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #444;
}
.truck-damage-circle.green { background-color: #3c9140; }
.truck-damage-circle.orange { background-color: #e89a22; }
.truck-damage-circle.red { background-color: #c62828; }
.truck-damage-circle.zero .circle {
  stroke: white;
  stroke-dasharray: 0, 100;
}

/* === Fuel-Kreis === */
.fuel-circle {
  width: 30px;
  height: 30px;
  padding: 1px;
  margin-left: -5px;
  border-radius: 50%;
  overflow: hidden;
  background-color: #0d47a1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* === SVG Kreise allgemein === */
.circular-chart {
  width: 100%;
  height: 100%;
}
.circular-chart .circle-bg {
  fill: none;
  stroke: #222;
  stroke-width: 3;
}
.circular-chart .circle {
  fill: none;
  stroke: #ff4c4c;
  stroke-width: 4;
  stroke-linecap: round;
  transition: stroke-dasharray 0.3s ease;
}
.circular-chart.fuel .circle {
  stroke: #2196f3;
}
.circular-chart image {
  transform: rotate(0deg);
  transform-origin: center;
}

/* === Prozenttext im Kreis === */
.percentage {
  font-size: 10px;
  fill: #fff;
  text-anchor: middle;
  dominant-baseline: middle;
  transform: rotate(0deg);
  transform-origin: center;
}

/* === Geschwindigkeit-Box === */
.velocity-box {
  margin-left: 4px;
  font-size: 12px;
  color: white;
  background: rgba(0,0,0,0.4);
  padding: 2px 6px;
  border-radius: 6px;
  width: 65px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* === Truckinfo: Modell + Ort === */
.truck-info-box {
  display: flex;
  flex-direction: column;
  justify-content: center;
  margin-left: 3px;
  font-size: 12px;
  line-height: 1.2;
  max-width: 140px;
}
.truck-info-box .truck-name {
  font-weight: bold;
  color: black;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.truck-info-box .truck-location {
  font-size: 10px;
  color: #404040;
}

/* === Kilometeranzeige Fahrt === */
.drive-info-box {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: 5px;
  min-width: 80px;
}
.drive-icon {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}
.drive-info-text {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  font-size: 11px;
  line-height: 1.2;
}
.drive-info-text .driven-km {
  font-weight: bold;
  font-size: 12px;
  color: #000;
}
.drive-info-text .total-km {
  font-size: 10px;
  color: #555;
}

/* === Fracht-Icon === */
.freight-icon-box {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 4px;
}
.freight-icon {
  width: 32px;
  height: 32px;
}

/* === Frachtinformationen === */
.freight-box {
  margin-left: 4px;
  background: rgba(0,0,0,0.4);
  border-radius: 6px;
  width: 300px;
  height: 32px;
  padding: 2px 6px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
  line-height: 1.1;
}
.freight-box .freight-title {
  font-size: 12px;
  font-weight: bold;
  color: #fff;
  white-space: nowrap;
}
.freight-box .freight-route {
  font-size: 10px;
  color: #ccc;
  white-space: nowrap;
}

/* ================================================
   Kompakte Fahreranzeige: Name + Ort untereinander
   ================================================ */
.name-box-compact {
  width: 180px;
  height: 32px;
  padding: 2px 6px;
  display: flex;
  flex-direction: column;
  justify-content: left;
  border-top-right-radius: 6px;
  border-bottom-right-radius: 6px;
  overflow: hidden;
  background-color: #e5ffe5;
  border: 1px solid #b0d4b0;
  line-height: 1.1;
}

.driver-green .name-box-compact {
  background-color: #b3e6b3;
  border-color: #7ac87a;
}
.driver-orange .name-box-compact {
  background-color: #ffe3a3;
  border-color: #e1b75c;
}
.driver-red .name-box-compact {
  background-color: #f4b6b6;
  border-color: #cc7a7a;
}

.name-box-compact .driver-name {
  font-weight: bold;
  font-size: 13px;
  color: #000;
  text-align: left;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.name-box-compact .driver-location {
  font-size: 10px;
  color: #444;
  text-align: left;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ===================================
   Refresh-Icon oben rechts in Card
   =================================== */
.refresh-icon-box {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 10;
  background-color: #e0e0e0;
  padding: 8px;
  border-top-right-radius: var(--card-radius);
  border-bottom-left-radius: 10px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  transition: background-color 0.3s ease, transform 0.3s ease;
}

.refresh-icon-box:hover {
  background-color: #d5d5d5;
}

.refresh-icon {
  width: 22px;
  height: 22px;
  cursor: pointer;
  transition: transform 0.4s ease;
}

.refresh-icon-box:hover .refresh-icon {
  transform: rotate(360deg);
}