:root {
  --farbe-primaer: #1f3a5f;
  --farbe-primaer-hell: #2c5183;
  --farbe-akzent: #e8a33d;
  --farbe-erfolg: #2f9e5c;
  --farbe-warnung: #c98a00;
  --farbe-gefahr: #c94b3f;
  --farbe-hintergrund: #f4f6f9;
  --farbe-karte: #ffffff;
  --farbe-text: #24303f;
  --farbe-text-schwach: #667085;
  --radius: 10px;
  --schatten: 0 2px 10px rgba(31, 58, 95, 0.08);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--farbe-hintergrund);
  color: var(--farbe-text);
  line-height: 1.5;
}

a { color: var(--farbe-primaer-hell); text-decoration: none; }
a:hover { text-decoration: underline; }

.navbar {
  background: var(--farbe-primaer);
  color: #fff;
  padding: 14px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.navbar .brand { font-size: 1.25rem; font-weight: 700; color: #fff; }
.navbar .brand span { color: var(--farbe-akzent); }

.navbar nav a {
  color: #dbe4f0;
  margin-left: 18px;
  font-weight: 500;
}
.navbar nav a:hover { color: #fff; text-decoration: none; }

.badge-role {
  background: rgba(255,255,255,0.15);
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.8rem;
  margin-left: 18px;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 28px 20px 60px;
}

.hero {
  background: linear-gradient(135deg, var(--farbe-primaer) 0%, var(--farbe-primaer-hell) 100%);
  color: #fff;
  padding: 46px 28px;
  border-radius: var(--radius);
  margin-bottom: 30px;
}
.hero h1 { margin: 0 0 8px; font-size: 1.9rem; color: #fff; }
.hero p { margin: 0; color: #dbe4f0; max-width: 620px; }

h1, h2, h3 { color: var(--farbe-primaer); }

.grid-fahrzeuge {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
}

.karte {
  background: var(--farbe-karte);
  border-radius: var(--radius);
  box-shadow: var(--schatten);
  padding: 20px;
}

.fahrzeug-karte .icon { font-size: 2.4rem; }
.fahrzeug-karte h3 { margin: 8px 0 2px; }
.fahrzeug-karte .kategorie { color: var(--farbe-text-schwach); font-size: 0.9rem; margin-bottom: 10px; }
.fahrzeug-karte .preis { font-size: 1.3rem; font-weight: 700; color: var(--farbe-primaer); }
.fahrzeug-karte .preis small { font-size: 0.85rem; font-weight: 400; color: var(--farbe-text-schwach); }

.btn {
  display: inline-block;
  background: var(--farbe-primaer);
  color: #fff;
  border: none;
  padding: 10px 18px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 600;
}
.btn:hover { background: var(--farbe-primaer-hell); text-decoration: none; color: #fff; }
.btn-akzent { background: var(--farbe-akzent); color: #2b2200; }
.btn-akzent:hover { background: #f0b355; color: #2b2200; }
.btn-erfolg { background: var(--farbe-erfolg); }
.btn-erfolg:hover { background: #38b56a; }
.btn-gefahr { background: var(--farbe-gefahr); }
.btn-gefahr:hover { background: #d85f52; }
.btn-outline { background: transparent; color: var(--farbe-primaer); border: 1.5px solid var(--farbe-primaer); }
.btn-outline:hover { background: var(--farbe-primaer); color: #fff; }
.btn-klein { padding: 6px 12px; font-size: 0.85rem; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }

form .feld { margin-bottom: 16px; }
form label { display: block; font-weight: 600; margin-bottom: 5px; font-size: 0.92rem; }
form input, form select, form textarea {
  width: 100%;
  padding: 9px 11px;
  border-radius: 7px;
  border: 1.5px solid #d5dce6;
  font-size: 0.95rem;
  font-family: inherit;
}
form input:focus, form select:focus, form textarea:focus {
  outline: none;
  border-color: var(--farbe-primaer-hell);
}
.feld-reihe { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 640px) { .feld-reihe { grid-template-columns: 1fr; } }

.flash-liste { list-style: none; padding: 0; margin: 0 0 20px; }
.flash {
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 8px;
  font-size: 0.92rem;
}
.flash-success { background: #e3f6ea; color: #1c6b41; border: 1px solid #b9e6c9; }
.flash-danger { background: #fbe9e7; color: #9c3327; border: 1px solid #f3c2ba; }
.flash-warning { background: #fdf1da; color: #8a5a00; border: 1px solid #f2d69b; }

table.tabelle { width: 100%; border-collapse: collapse; background: var(--farbe-karte); border-radius: var(--radius); overflow: hidden; box-shadow: var(--schatten); }
table.tabelle th, table.tabelle td { padding: 11px 14px; text-align: left; border-bottom: 1px solid #eef1f5; font-size: 0.92rem; }
table.tabelle th { background: #eef2f7; color: var(--farbe-text-schwach); font-weight: 600; text-transform: uppercase; font-size: 0.75rem; letter-spacing: 0.03em; }
table.tabelle tr:last-child td { border-bottom: none; }
table.tabelle tr:hover td { background: #f7f9fc; }

.status-pille {
  display: inline-block;
  padding: 3px 11px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 700;
}
.status-angefragt { background: #fdf1da; color: #8a5a00; }
.status-bestaetigt { background: #dce9fb; color: #1f4f8b; }
.status-aktiv { background: #e3f6ea; color: #1c6b41; }
.status-abgeschlossen { background: #e6e8ec; color: #4a5568; }
.status-storniert { background: #fbe9e7; color: #9c3327; }

.status-verfuegbar { background: #e3f6ea; color: #1c6b41; }
.status-vermietet { background: #fdf1da; color: #8a5a00; }
.status-wartung { background: #fbe9e7; color: #9c3327; }

.kacheln-kennzahlen { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-bottom: 30px; }
.kachel { background: var(--farbe-karte); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--schatten); }
.kachel .zahl { font-size: 2rem; font-weight: 700; color: var(--farbe-primaer); }
.kachel .label { color: var(--farbe-text-schwach); font-size: 0.85rem; }

.detail-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 24px; }
@media (max-width: 800px) { .detail-grid { grid-template-columns: 1fr; } }

.info-liste { list-style: none; padding: 0; margin: 0; }
.info-liste li { padding: 7px 0; border-bottom: 1px dashed #e3e8ef; font-size: 0.93rem; }
.info-liste li:last-child { border-bottom: none; }
.info-liste b { color: var(--farbe-text-schwach); font-weight: 600; display: inline-block; min-width: 150px; }

.aktionen { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }

.signature-wrap { background: #fff; border: 2px dashed #c7d1de; border-radius: var(--radius); padding: 12px; text-align: center; }
.signature-wrap canvas { touch-action: none; border-radius: 6px; background: #fbfcfe; width: 100%; max-width: 560px; height: 220px; border: 1px solid #dfe5ee; }

footer { text-align: center; color: var(--farbe-text-schwach); font-size: 0.85rem; padding: 24px; }

/* Hinweis mit Bild-Vorschau (Tooltip), z. B. für bekannte Fahrzeug-Vorschäden */
.vs-tooltip { position: relative; display: inline-block; cursor: help; }
.vs-tooltip-inhalt {
  display: none;
  position: absolute;
  z-index: 20;
  bottom: calc(100% + 8px);
  left: 0;
  background: #fff;
  border: 1px solid #dfe5ee;
  border-radius: var(--radius);
  box-shadow: var(--schatten);
  padding: 10px;
  width: 220px;
}
.vs-tooltip:hover .vs-tooltip-inhalt,
.vs-tooltip:focus .vs-tooltip-inhalt { display: block; }
.vs-tooltip-inhalt p { margin: 0 0 8px; font-size: 0.85rem; color: var(--farbe-text); white-space: pre-line; }
.vs-tooltip-inhalt img { width: 100%; height: 110px; object-fit: cover; border-radius: 6px; border: 1px solid #dfe5ee; display: block; margin-bottom: 4px; }
.vs-tooltip-inhalt .kein-foto { color: var(--farbe-text-schwach); font-size: 0.8rem; }

.foto-galerie { display: flex; flex-wrap: wrap; gap: 10px; }
.foto-galerie img {
  width: 110px; height: 110px; object-fit: cover; border-radius: 8px; border: 1px solid #dfe5ee;
}
