:root {
  --bg: #0d0d0f;
  --bg-soft: #16161a;
  --card: #1c1c21;
  --line: #2c2c33;
  --text: #e9e9ec;
  --muted: #9a9aa3;
  --red: #d51f28;
  --red-dark: #a8141b;
  --silver: #c7ccd1;
  --green: #2ecc71;
  --radius: 12px;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}
a { color: inherit; text-decoration: none; }
.container { width: min(1200px, 92%); margin: 0 auto; }
h1, h2, h3 { margin: 0 0 .4em; }
section { margin: 2.5rem 0; }
.lead { color: var(--muted); font-size: 1.05rem; }
.empty { color: var(--muted); }
.muted { color: var(--muted); }

/* Header */
.site-header {
  background: linear-gradient(180deg, #000 0%, #141416 100%);
  border-bottom: 2px solid var(--red);
  position: sticky; top: 0; z-index: 50;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: .5rem 0; }
.brand-logo { height: 64px; display: block; }
.main-nav { display: flex; align-items: center; gap: 1.25rem; }
.main-nav a { color: var(--silver); font-weight: 600; padding: .4rem 0; transition: color .15s; }
.main-nav a:hover, .main-nav a.active { color: var(--red); }
.nav-admin { border: 1px solid var(--line); padding: .4rem .9rem !important; border-radius: 8px; }
.nav-admin:hover { border-color: var(--red); }

/* Dropdown */
.dropdown { position: relative; }
.dropdown-menu {
  position: absolute; top: 100%; left: 0; background: var(--card);
  border: 1px solid var(--line); border-radius: 8px; min-width: 190px;
  display: none; flex-direction: column; padding: .4rem; box-shadow: 0 10px 30px rgba(0,0,0,.5);
}
.dropdown:hover .dropdown-menu { display: flex; }
.dropdown-menu a { padding: .5rem .7rem; border-radius: 6px; }
.dropdown-menu a:hover { background: var(--bg-soft); color: var(--red); }

/* Hero */
.hero { text-align: center; padding: 3rem 0 1rem; }
.hero-logo { max-width: 320px; width: 60%; }
.hero h1 { font-size: 2.4rem; letter-spacing: 1px; }
.hero-sub { color: var(--muted); font-size: 1.15rem; }
.hero-stats { display: flex; justify-content: center; gap: 2.5rem; margin-top: 1.8rem; flex-wrap: wrap; }
.hero-stat { display: flex; flex-direction: column; color: var(--muted); font-size: .9rem; text-transform: uppercase; letter-spacing: .5px; }
.hero-stat span { font-size: 2.2rem; color: var(--red); font-weight: 800; }

/* Page head */
.page-head h1 { font-size: 2rem; }
.back-link { color: var(--muted); font-size: .9rem; display: inline-block; margin-bottom: .6rem; }
.back-link:hover { color: var(--red); }

/* Category grid */
.category-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1.2rem; }
.category-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.4rem; transition: transform .15s, border-color .15s;
}
.category-card:hover { transform: translateY(-4px); border-color: var(--red); }
.category-card h3 { color: var(--silver); }
.category-card p { color: var(--muted); font-size: .9rem; min-height: 2.6em; }
.cat-count { color: var(--red); font-weight: 600; font-size: .9rem; }

/* Vehicle grid */
.vehicle-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1.4rem; }
.vehicle-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; transition: transform .15s, border-color .15s;
}
.vehicle-card:hover { transform: translateY(-4px); border-color: var(--red); }
.vehicle-thumb { position: relative; aspect-ratio: 16/10; background: #000; }
.vehicle-thumb img { width: 100%; height: 100%; object-fit: cover; }
.no-image { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: var(--muted); background: #111; }
.no-image.large { aspect-ratio: 16/10; border-radius: var(--radius); }
.status { position: absolute; top: .6rem; right: .6rem; font-size: .75rem; font-weight: 700; padding: .25rem .6rem; border-radius: 99px; text-transform: uppercase; }
.status.free { background: rgba(46,204,113,.15); color: var(--green); border: 1px solid var(--green); }
.status.rented { background: rgba(213,31,40,.15); color: var(--red); border: 1px solid var(--red); }
.vehicle-info { padding: .9rem 1rem 1.1rem; }
.vehicle-info h3 { font-size: 1.1rem; color: var(--silver); }
.price { color: var(--red); font-weight: 800; font-size: 1.15rem; margin: 0; }
.price span { color: var(--muted); font-weight: 400; font-size: .85rem; }

/* Vehicle detail */
.vehicle-detail { display: grid; grid-template-columns: 1.2fr 1fr; gap: 2rem; align-items: start; }
.main-photo { width: 100%; border-radius: var(--radius); background: #000; }
.thumbs { display: flex; gap: .6rem; margin-top: .7rem; flex-wrap: wrap; }
.thumbs img { width: 80px; height: 60px; object-fit: cover; border-radius: 6px; cursor: pointer; border: 2px solid var(--line); }
.thumbs img:hover { border-color: var(--red); }
.badge { display: inline-block; background: var(--bg-soft); border: 1px solid var(--line); color: var(--silver); padding: .2rem .7rem; border-radius: 99px; font-size: .8rem; }
.detail-price { font-size: 1.8rem; color: var(--red); font-weight: 800; }
.detail-price span { font-size: 1rem; color: var(--muted); font-weight: 400; }
.detail-desc { color: var(--muted); }
.status-line { font-weight: 700; }
.status-line.free { color: var(--green); }
.status-line.rented { color: var(--red); }

/* Team */
.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1.4rem; }
.team-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.6rem; text-align: center; }
.avatar { width: 70px; height: 70px; border-radius: 50%; background: linear-gradient(135deg, var(--red), var(--red-dark)); color: #fff; font-size: 1.8rem; font-weight: 800; display: flex; align-items: center; justify-content: center; margin: 0 auto .8rem; }
.team-card h3 { margin-bottom: .1rem; }
.role { color: var(--muted); margin: 0 0 .6rem; }
.phone { color: var(--red); font-weight: 700; }

/* Buttons */
.btn { display: inline-block; background: var(--red); color: #fff; border: none; padding: .6rem 1.1rem; border-radius: 8px; font-weight: 600; cursor: pointer; font-size: .95rem; transition: background .15s; }
.btn:hover { background: var(--red-dark); }
.btn-ghost { background: transparent; border: 1px solid var(--line); color: var(--text); }
.btn-ghost:hover { background: var(--bg-soft); }
.btn-block { width: 100%; }
.btn-sm { padding: .35rem .7rem; font-size: .82rem; }
.btn-danger { background: #3a1416; color: #ff7b82; border: 1px solid var(--red-dark); }
.btn-danger:hover { background: var(--red-dark); color: #fff; }

/* Forms / Admin */
.admin-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; }
.admin-block { background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem 1.6rem; }
.block-head { display: flex; justify-content: space-between; align-items: center; }
label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: .9rem; }
input, select, textarea {
  width: 100%; margin-top: .3rem; padding: .55rem .7rem; background: var(--bg); color: var(--text);
  border: 1px solid var(--line); border-radius: 8px; font: inherit;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--red); }
.check { display: flex; align-items: center; gap: .5rem; }
.check input { width: auto; margin: 0; }
.inline-form { display: flex; gap: 1rem; align-items: flex-end; flex-wrap: wrap; margin-top: 1rem; }
.inline-form label { margin-bottom: 0; flex: 1; min-width: 160px; }
.stack-form .form-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.form-actions { display: flex; gap: .8rem; }
.form-error { background: #3a1416; color: #ff7b82; padding: .6rem .9rem; border-radius: 8px; }

/* Admin table */
.admin-table { width: 100%; border-collapse: collapse; margin-top: 1rem; }
.admin-table th, .admin-table td { text-align: left; padding: .6rem .5rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.admin-table th { color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .5px; }
.table-thumb { width: 56px; height: 40px; object-fit: cover; border-radius: 6px; }
.actions { display: flex; gap: .4rem; align-items: center; }
.actions form { margin: 0; }
.row-form { display: contents; }

/* Chips (Kategorien) */
.chip-list { display: flex; flex-wrap: wrap; gap: .6rem; margin: .6rem 0 1rem; }
.chip { display: inline-flex; align-items: center; gap: .4rem; background: var(--card); border: 1px solid var(--line); border-radius: 99px; padding: .35rem .8rem; }
.chip form { margin: 0; }
.chip button { background: none; border: none; color: var(--muted); cursor: pointer; font-size: 1.1rem; line-height: 1; padding: 0; width: auto; }
.chip button:hover { color: var(--red); }

/* Bild-Verwaltung */
.img-manage { display: flex; gap: 1rem; flex-wrap: wrap; }
.img-remove { display: inline-block; text-align: center; font-weight: 400; }
.img-remove img { width: 110px; height: 80px; object-fit: cover; border-radius: 8px; display: block; }
.img-remove span { font-size: .8rem; color: var(--muted); display: inline-flex; gap: .3rem; align-items: center; margin-top: .3rem; }
.img-remove input { width: auto; margin: 0; }
.current-images { background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 1rem; margin-bottom: .9rem; }

/* Login */
.login-wrap { display: flex; justify-content: center; padding: 3rem 0; }
.login-box { background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 2rem; width: min(420px, 100%); text-align: center; }
.login-logo { width: 160px; margin-bottom: 1rem; }

/* Footer */
.site-footer { background: #000; border-top: 2px solid var(--red); margin-top: 4rem; padding: 2rem 0; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.footer-logo { height: 50px; }
.site-footer p { color: var(--muted); font-size: .85rem; margin: .4rem 0 0; }
.footer-stats { text-align: right; }
.stat-number { display: block; font-size: 2rem; font-weight: 800; color: var(--red); }
.stat-label { color: var(--muted); font-size: .85rem; }
.footer-impressum {
  white-space: pre-line;
  color: var(--muted);
  font-size: .72rem;
  line-height: 1.5;
  margin-top: 1.5rem;
  padding-top: 1.2rem;
  border-top: 1px solid #222;
}

/* Admin-Kopf & Flash-Meldungen */
.admin-head-right { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.flash { padding: .8rem 1rem; border-radius: 6px; margin-bottom: 1rem; font-size: .9rem; }
.flash-ok { background: #11331b; border: 1px solid #1f7a3d; color: #aef0c4; }
.flash-err { background: #331111; border: 1px solid #7a1f1f; color: #f0aeae; }

@media (max-width: 760px) {
  .vehicle-detail { grid-template-columns: 1fr; }
  .stack-form .form-row { grid-template-columns: 1fr; }
  .brand-logo { height: 48px; }
  .main-nav { gap: .8rem; font-size: .9rem; }
  .admin-table { display: block; overflow-x: auto; }
}
