/* =====================================================
   Soussi Automobile – Design System
   ===================================================== */

/* --- Tokens --- */
:root {
  --bg:           #FFFFFF;
  --surface:      #F4F6F8;
  --ink:          #16191D;
  --ink-soft:     #5B626B;
  --line:         #E2E6EA;
  --accent:       #1E5FCC;
  --accent-ink:   #0E3C8A;
  --signal:       #E8A317;
  --radius:       8px;
  --radius-lg:    12px;
  --shadow-sm:    0 1px 3px rgba(22,25,29,.08);
  --shadow-md:    0 4px 16px rgba(22,25,29,.1);
  --max-w:        1200px;
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-ink); text-decoration: underline; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 2px; }

/* --- Typography Scale --- */
h1, h2, h3, h4 {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--ink);
}
h1 { font-size: clamp(2rem, 5vw, 3.25rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.25rem); }
h3 { font-size: clamp(1.1rem, 2.5vw, 1.5rem); }
h4 { font-size: 1.1rem; }
p  { color: var(--ink-soft); }
p + p { margin-top: .75rem; }

.text-sm  { font-size: .875rem; }
.text-xs  { font-size: .75rem; }
.text-ink { color: var(--ink); }

/* Tabular numerals for data */
.num { font-variant-numeric: tabular-nums; font-weight: 500; letter-spacing: .01em; }

/* --- Layout Helpers --- */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 1.25rem; }
@media (min-width: 768px) { .container { padding: 0 2rem; } }

.section { padding: 4rem 0; }
.section--surface { background: var(--surface); }
.section--ink { background: var(--ink); color: #fff; }
.section--ink h2, .section--ink h3, .section--ink p { color: #fff; }

.section__header { text-align: center; margin-bottom: 3rem; }
.section__header p { max-width: 600px; margin: .75rem auto 0; }

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .75rem 1.5rem;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: background .15s, color .15s, box-shadow .15s;
  text-decoration: none;
  min-height: 44px;
  white-space: nowrap;
}
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-ink); color: #fff; text-decoration: none; }

.btn-secondary { background: var(--bg); color: var(--ink); border: 2px solid var(--line); }
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }

.btn-ghost { background: transparent; color: var(--accent); border: 2px solid var(--accent); }
.btn-ghost:hover { background: var(--accent); color: #fff; text-decoration: none; }

.btn-ghost-sm {
  background: transparent;
  color: var(--ink-soft);
  border: 1px solid var(--line);
  font-size: .875rem;
  padding: .5rem 1rem;
  border-radius: var(--radius);
  cursor: pointer;
  font-family: inherit;
  font-weight: 500;
}
.btn-ghost-sm:hover { border-color: var(--ink); color: var(--ink); }

/* --- Cards --- */
.card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

/* --- Badge --- */
.badge {
  display: inline-block;
  font-size: .75rem;
  font-weight: 600;
  padding: .2rem .6rem;
  border-radius: 99px;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.badge--new     { background: #EEF4FF; color: #1E5FCC; }
.badge--signal  { background: #FEF3DC; color: #B57B0D; }
.badge--ok      { background: #EDFAF1; color: #1A7A40; }
.badge--neutral { background: var(--surface); color: var(--ink-soft); border: 1px solid var(--line); }
/* Admin-Status-Badges */
.badge--warning { background: #FEF3DC; color: #B57B0D; }
.badge--info    { background: #EEF4FF; color: #1E5FCC; }
.badge--success { background: #EDFAF1; color: #1A7A40; }
.badge--danger  { background: #FEF0F0; color: #C0392B; }

/* --- Detail-List (Admin) --- */
.detail-list {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: .35rem .75rem;
  margin: 0;
  font-size: .875rem;
}
.detail-list dt { color: var(--ink-soft); font-weight: 500; }
.detail-list dd { margin: 0; color: var(--ink); }

/* --- Stat-Tile --- */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}
.stat-tile {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: .25rem;
}
.stat-tile__label { font-size: .8rem; color: var(--ink-soft); font-weight: 500; }
.stat-tile__value { font-size: 2rem; font-weight: 800; font-family: var(--font-display); color: var(--ink); }
.stat-tile__link  { font-size: .8rem; color: var(--accent); margin-top: .25rem; }

/* --- Forms --- */
.form-group { display: flex; flex-direction: column; gap: .375rem; margin-bottom: 1.25rem; }
label { font-size: .875rem; font-weight: 600; color: var(--ink); }
.form-hint { font-size: .8rem; color: var(--ink-soft); }

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="date"],
input[type="number"],
select,
textarea {
  width: 100%;
  padding: .6875rem .875rem;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 1rem;
  color: var(--ink);
  background: var(--bg);
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  transition: border-color .15s;
  min-height: 44px;
  appearance: none;
  -webkit-appearance: none;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(30,95,204,.12);
}
input.invalid, select.invalid, textarea.invalid {
  border-color: #C93434;
}
.validation-message { font-size: .8rem; color: #C93434; margin-top: .25rem; }

textarea { min-height: 120px; resize: vertical; line-height: 1.5; }

.form-check { display: flex; align-items: flex-start; gap: .625rem; }
.form-check input[type="checkbox"] {
  width: 1.125rem; height: 1.125rem;
  min-height: 1.125rem;
  flex-shrink: 0;
  margin-top: .2rem;
  accent-color: var(--accent);
}
.form-check label { font-weight: 400; font-size: .9rem; }

/* --- Header --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: 64px;
}
.site-header__logo {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-weight: 800;
  font-size: 1.125rem;
  color: var(--ink);
  text-decoration: none;
  flex-shrink: 0;
}
.site-header__logo:hover { color: var(--accent); text-decoration: none; }

.site-header__nav { display: none; }
@media (min-width: 900px) {
  .site-header__nav { display: flex; align-items: center; gap: 1.75rem; list-style: none; }
  .site-header__nav a { font-size: .9rem; font-weight: 500; color: var(--ink); }
  .site-header__nav a:hover { color: var(--accent); text-decoration: none; }
}

.site-header__actions { display: flex; align-items: center; gap: .75rem; }
.header-tel {
  display: none;
  font-weight: 600;
  font-size: .9rem;
  color: var(--ink);
  text-decoration: none;
}
@media (min-width: 640px) { .header-tel { display: flex; align-items: center; gap: .375rem; } }
.header-tel:hover { color: var(--accent); text-decoration: none; }

/* Hamburger-Button */
.nav-burger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  flex-shrink: 0;
}
.nav-burger span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform .25s, opacity .25s;
}
.nav-burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-burger.open span:nth-child(2) { opacity: 0; }
.nav-burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
@media (min-width: 900px) { .nav-burger { display: none; } }
@media (min-width: 900px) { .nav-cta { display: flex; } }

/* Mobile-Overlay-Nav */
.mobile-nav {
  display: none;
  position: fixed;
  inset: 0;
  top: 60px;
  background: #fff;
  z-index: 200;
  padding: 1.5rem 1.25rem;
  overflow-y: auto;
}
.mobile-nav.open { display: block; }
.mobile-nav ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .25rem; }
.mobile-nav a { display: block; padding: .875rem .5rem; font-size: 1.1rem; font-weight: 500; color: var(--ink); border-bottom: 1px solid var(--line); text-decoration: none; }
.mobile-nav a:hover { color: var(--accent); }
@media (min-width: 900px) { .mobile-nav { display: none !important; } }

/* --- Footer --- */
.site-footer {
  background: var(--ink);
  color: rgba(255,255,255,.7);
  padding: 3rem 0 1.5rem;
  font-size: .875rem;
}
.site-footer__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(255,255,255,.1);
  margin-bottom: 1.5rem;
}
@media (min-width: 640px) { .site-footer__grid { grid-template-columns: repeat(2,1fr); } }
@media (min-width: 900px) { .site-footer__grid { grid-template-columns: 2fr 1fr 1fr; } }

.site-footer__brand { font-family: 'Plus Jakarta Sans',system-ui,sans-serif; font-weight: 800; font-size: 1.1rem; color:#fff; margin-bottom: .75rem; }
.site-footer h4 { font-family: 'Plus Jakarta Sans',system-ui,sans-serif; font-size: .875rem; color:#fff; margin-bottom: .75rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.site-footer ul { list-style: none; display: flex; flex-direction: column; gap: .5rem; }
.site-footer a { color: rgba(255,255,255,.7); }
.site-footer a:hover { color: #fff; text-decoration: none; }
.site-footer__bottom { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; }

/* --- Hero --- */
.hero {
  padding: 4rem 0 3rem;
  background: var(--bg);
}
@media (min-width: 768px) { .hero { padding: 5.5rem 0 4rem; } }

.hero__inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  align-items: center;
}
@media (min-width: 768px) { .hero__inner { grid-template-columns: 1fr 1fr; } }

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}
.hero__title { margin-bottom: 1.25rem; }
.hero__subtitle { font-size: 1.1rem; margin-bottom: 2rem; max-width: 480px; }

.hero__ctas { display: flex; flex-wrap: wrap; gap: .75rem; }

.trust-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
  font-size: .875rem;
}
.trust-item { display: flex; align-items: center; gap: .375rem; color: var(--ink-soft); font-weight: 500; }
.trust-item strong { color: var(--ink); }

.hero__image {
  aspect-ratio: 4/3;
  background: var(--surface);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-soft);
  font-size: .875rem;
  border: 2px dashed var(--line);
  text-align: center;
  padding: 1rem;
}

/* --- Leistungs-Kacheln --- */
.leistung-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}
.leistung-card {
  padding: 1.75rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--bg);
  transition: box-shadow .2s, border-color .2s;
  text-decoration: none;
  display: block;
  color: inherit;
}
.leistung-card:hover { box-shadow: var(--shadow-md); border-color: var(--accent); text-decoration: none; }
.leistung-card__icon { font-size: 2rem; margin-bottom: 1rem; line-height: 1; }
.leistung-card__title { font-family: 'Plus Jakarta Sans',system-ui,sans-serif; font-weight: 700; font-size: 1.1rem; color: var(--ink); margin-bottom: .5rem; }
.leistung-card__desc { font-size: .9rem; color: var(--ink-soft); line-height: 1.5; }
.leistung-card__link { font-size: .875rem; font-weight: 600; color: var(--accent); margin-top: 1rem; display: inline-block; }

/* --- Fahrzeug-Cards --- */
.fahrzeug-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}
.fahrzeug-card { text-decoration: none; color: inherit; display: block; }
.fahrzeug-card:hover .fahrzeug-card__img img { transform: scale(1.03); }
.fahrzeug-card__img {
  aspect-ratio: 16/9;
  background: var(--surface);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  overflow: hidden;
}
.fahrzeug-card__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.fahrzeug-card__img--placeholder {
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-soft); font-size: .875rem;
}
.fahrzeug-card__body { padding: 1.25rem; border: 1px solid var(--line); border-top: none; border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
.fahrzeug-card__title { font-family: 'Plus Jakarta Sans',system-ui,sans-serif; font-weight: 700; font-size: 1.05rem; color: var(--ink); margin-bottom: .625rem; }
.fahrzeug-card__specs { display: flex; flex-wrap: wrap; gap: .5rem .875rem; font-size: .8rem; color: var(--ink-soft); margin-bottom: .875rem; }
.fahrzeug-card__spec { display: flex; align-items: center; gap: .25rem; }
.fahrzeug-card__price { font-family: 'Plus Jakarta Sans',system-ui,sans-serif; font-size: 1.375rem; font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; }

/* --- Formular-Seite --- */
.form-page { max-width: 700px; margin: 0 auto; padding: 3rem 1.25rem; }
.form-page__title { margin-bottom: .5rem; }
.form-page__subtitle { font-size: 1.05rem; margin-bottom: 2.5rem; }
.form-section-title { font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); margin: 2rem 0 1rem; padding-bottom: .5rem; border-bottom: 1px solid var(--line); }
.form-row { display: grid; grid-template-columns: 1fr; gap: 0; }
@media (min-width: 600px) { .form-row { grid-template-columns: 1fr 1fr; gap: 0 1rem; } }
.form-success { background: #EDFAF1; border: 1px solid #8ED9AB; border-radius: var(--radius-lg); padding: 2rem; text-align: center; }
.form-success h2 { color: #1A7A40; }

/* --- Öffnungszeiten --- */
.oeffnungszeiten { display: grid; gap: .375rem; font-size: .9rem; }
.oz-row { display: flex; justify-content: space-between; gap: 1rem; }
.oz-tag { color: var(--ink); font-weight: 500; }
.oz-zeit { color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.oz-heute { font-weight: 700; color: var(--accent); }

/* --- Admin Shell --- */
.admin-shell { display: flex; min-height: 100vh; }
.admin-nav {
  width: 240px;
  flex-shrink: 0;
  background: var(--ink);
  display: flex;
  flex-direction: column;
  padding: 1.5rem 1rem;
  gap: 2rem;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}
.admin-nav__brand a { font-family: 'Plus Jakarta Sans',system-ui,sans-serif; font-weight: 800; color: #fff; font-size: 1rem; text-decoration: none; }
.admin-nav__links { list-style: none; display: flex; flex-direction: column; gap: .25rem; flex: 1; }
.admin-nav__links a { display: block; padding: .5rem .75rem; color: rgba(255,255,255,.7); font-size: .9rem; font-weight: 500; border-radius: var(--radius); text-decoration: none; transition: background .15s, color .15s; }
.admin-nav__links a:hover, .admin-nav__links a.active { background: rgba(255,255,255,.1); color: #fff; }
.admin-main { flex: 1; padding: 2rem; max-width: 100%; overflow-x: hidden; }
.admin-page-title { margin-bottom: 1.5rem; }

/* Admin table */
.data-table { width: 100%; border-collapse: collapse; font-size: .875rem; }
.data-table th { text-align: left; padding: .75rem 1rem; font-weight: 600; color: var(--ink-soft); border-bottom: 2px solid var(--line); background: var(--surface); }
.data-table td { padding: .75rem 1rem; border-bottom: 1px solid var(--line); color: var(--ink); vertical-align: middle; }
.data-table tr:hover td { background: var(--surface); }
.data-table__wrapper { overflow-x: auto; border-radius: var(--radius-lg); border: 1px solid var(--line); }

/* Admin Kacheln */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 1rem; margin-bottom: 2rem; }
.stat-tile { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1.25rem; }
.stat-tile__label { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-soft); margin-bottom: .25rem; }
.stat-tile__value { font-family: 'Plus Jakarta Sans',system-ui,sans-serif; font-size: 2rem; font-weight: 800; color: var(--ink); line-height: 1; }
.stat-tile--accent .stat-tile__value { color: var(--accent); }

/* Turnstile container */
.cf-turnstile { margin: 1rem 0; }

/* =====================================================
   Admin Dark Mode Design System
   ===================================================== */

.admin-shell {
  --adm-bg:        #0F1117;
  --adm-surface:   #161B27;
  --adm-surface2:  #1E2536;
  --adm-border:    rgba(255,255,255,.08);
  --adm-text:      #E8EBF0;
  --adm-muted:     #6B7280;
  --adm-accent:    #3B82F6;
  --adm-accent-h:  #2563EB;
  --adm-green:     #22C55E;
  --adm-yellow:    #F59E0B;
  --adm-red:       #EF4444;
  --adm-purple:    #A855F7;
  --adm-radius:    10px;
  --adm-radius-lg: 14px;
  display: flex;
  min-height: 100vh;
  background: var(--adm-bg);
  color: var(--adm-text);
  font-family: 'Inter', system-ui, sans-serif;
}

/* Sidebar */
.admin-nav {
  width: 220px;
  flex-shrink: 0;
  background: var(--adm-surface);
  border-right: 1px solid var(--adm-border);
  display: flex;
  flex-direction: column;
  padding: 0;
  gap: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.admin-nav__brand {
  padding: 1.25rem 1rem 1rem;
  border-bottom: 1px solid var(--adm-border);
}
.admin-nav__brand a {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-weight: 800;
  color: var(--adm-text);
  font-size: .95rem;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: .5rem;
}
.admin-nav__brand a::before {
  content: '';
  display: block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--adm-green);
  flex-shrink: 0;
}

.admin-nav__section {
  padding: 1.25rem 1rem .5rem;
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--adm-muted);
}

.admin-nav__links {
  list-style: none;
  padding: 0 .5rem;
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}
.admin-nav__links a {
  display: flex;
  align-items: center;
  gap: .625rem;
  padding: .5rem .75rem;
  color: var(--adm-muted);
  font-size: .875rem;
  font-weight: 500;
  border-radius: var(--adm-radius);
  text-decoration: none;
  transition: background .12s, color .12s;
}
.admin-nav__links a:hover { background: var(--adm-surface2); color: var(--adm-text); text-decoration: none; }
.admin-nav__links a.active { background: rgba(59,130,246,.15); color: var(--adm-accent); }
.admin-nav__links .nav-icon { font-size: 1rem; flex-shrink: 0; opacity: .8; }

.admin-nav__actions {
  padding: 1rem .5rem;
  border-top: 1px solid var(--adm-border);
}

.admin-main {
  flex: 1;
  padding: 1.75rem 2rem;
  max-width: 100%;
  overflow-x: hidden;
  min-width: 0;
}

/* Admin Page Header */
.admin-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.75rem;
}
.admin-page-header h1 {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--adm-text);
  margin: 0;
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
}

/* Admin Cards */
.adm-card {
  background: var(--adm-surface);
  border: 1px solid var(--adm-border);
  border-radius: var(--adm-radius-lg);
  overflow: hidden;
}
.adm-card__header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--adm-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
}
.adm-card__title {
  font-size: .875rem;
  font-weight: 700;
  color: var(--adm-text);
  margin: 0;
}
.adm-card__body { padding: 1.25rem; }

/* Admin Stat Tiles */
.adm-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: .875rem;
  margin-bottom: 1.75rem;
}
.adm-stat {
  background: var(--adm-surface);
  border: 1px solid var(--adm-border);
  border-radius: var(--adm-radius-lg);
  padding: 1.125rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: .25rem;
}
.adm-stat__label { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--adm-muted); }
.adm-stat__value { font-family: 'Plus Jakarta Sans', system-ui, sans-serif; font-size: 1.875rem; font-weight: 800; color: var(--adm-text); line-height: 1.1; }
.adm-stat__sub { font-size: .75rem; color: var(--adm-muted); }
.adm-stat--accent .adm-stat__value { color: var(--adm-accent); }
.adm-stat--green  .adm-stat__value { color: var(--adm-green); }
.adm-stat--yellow .adm-stat__value { color: var(--adm-yellow); }
.adm-stat--red    .adm-stat__value { color: var(--adm-red); }

/* Admin Buttons */
.adm-btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .5rem 1rem;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: .875rem;
  font-weight: 600;
  border-radius: var(--adm-radius);
  border: none;
  cursor: pointer;
  transition: background .12s, color .12s, opacity .12s;
  text-decoration: none;
  white-space: nowrap;
  min-height: 38px;
}
.adm-btn:focus-visible { outline: 2px solid var(--adm-accent); outline-offset: 2px; }
.adm-btn--primary { background: var(--adm-accent); color: #fff; }
.adm-btn--primary:hover { background: var(--adm-accent-h); color: #fff; text-decoration: none; }
.adm-btn--ghost { background: transparent; color: var(--adm-muted); border: 1px solid var(--adm-border); }
.adm-btn--ghost:hover { background: var(--adm-surface2); color: var(--adm-text); text-decoration: none; }
.adm-btn--secondary { background: var(--adm-surface2); color: var(--adm-text); border: 1px solid var(--adm-border); }
.adm-btn--secondary:hover { background: var(--adm-surface2); border-color: var(--adm-accent); text-decoration: none; }
.adm-btn--danger { background: rgba(239,68,68,.15); color: var(--adm-red); border: 1px solid rgba(239,68,68,.25); }
.adm-btn--danger:hover { background: rgba(239,68,68,.25); text-decoration: none; }
.adm-btn--sm { padding: .3rem .7rem; font-size: .8rem; min-height: 30px; }
.adm-btn[disabled] { opacity: .4; cursor: not-allowed; }

/* Admin Table */
.adm-table-wrap { overflow-x: auto; }
.adm-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .875rem;
}
.adm-table th {
  text-align: left;
  padding: .625rem 1rem;
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--adm-muted);
  border-bottom: 1px solid var(--adm-border);
  white-space: nowrap;
}
.adm-table td {
  padding: .75rem 1rem;
  border-bottom: 1px solid var(--adm-border);
  color: var(--adm-text);
  vertical-align: middle;
}
.adm-table tr:last-child td { border-bottom: none; }
.adm-table tr:hover td { background: var(--adm-surface2); }
.adm-table--clickable tr { cursor: pointer; }

/* Admin Badges */
.adm-badge {
  display: inline-block;
  font-size: .7rem;
  font-weight: 700;
  padding: .2rem .55rem;
  border-radius: 99px;
  text-transform: uppercase;
  letter-spacing: .05em;
  white-space: nowrap;
}
.adm-badge--blue   { background: rgba(59,130,246,.15);  color: #60A5FA; }
.adm-badge--green  { background: rgba(34,197,94,.15);   color: #4ADE80; }
.adm-badge--yellow { background: rgba(245,158,11,.15);  color: #FCD34D; }
.adm-badge--red    { background: rgba(239,68,68,.15);   color: #F87171; }
.adm-badge--purple { background: rgba(168,85,247,.15);  color: #C084FC; }
.adm-badge--gray   { background: rgba(107,114,128,.15); color: #9CA3AF; }

/* Admin Forms */
.adm-form-group { display: flex; flex-direction: column; gap: .35rem; margin-bottom: 1.125rem; }
.adm-label { font-size: .8rem; font-weight: 600; color: var(--adm-text); }
.adm-input, .adm-select, .adm-textarea {
  width: 100%;
  padding: .55rem .875rem;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: .875rem;
  color: var(--adm-text);
  background: var(--adm-surface2);
  border: 1px solid var(--adm-border);
  border-radius: var(--adm-radius);
  transition: border-color .12s;
  min-height: 38px;
}
.adm-input:focus, .adm-select:focus, .adm-textarea:focus {
  outline: none;
  border-color: var(--adm-accent);
  box-shadow: 0 0 0 3px rgba(59,130,246,.15);
}
.adm-textarea { min-height: 100px; resize: vertical; }
.adm-select { appearance: none; }

/* Search Bar */
.adm-search {
  display: flex;
  align-items: center;
  gap: .5rem;
  background: var(--adm-surface2);
  border: 1px solid var(--adm-border);
  border-radius: var(--adm-radius);
  padding: 0 .75rem;
  min-width: 220px;
}
.adm-search input {
  background: transparent;
  border: none;
  color: var(--adm-text);
  font-size: .875rem;
  padding: .5rem 0;
  flex: 1;
  min-width: 0;
}
.adm-search input:focus { outline: none; }
.adm-search input::placeholder { color: var(--adm-muted); }

/* Filter Chips */
.adm-filters { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.adm-chip {
  padding: .3rem .875rem;
  border-radius: 99px;
  border: 1px solid var(--adm-border);
  background: transparent;
  color: var(--adm-muted);
  font-size: .8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .12s;
  font-family: inherit;
}
.adm-chip:hover { border-color: var(--adm-accent); color: var(--adm-accent); }
.adm-chip.active { background: rgba(59,130,246,.15); border-color: var(--adm-accent); color: var(--adm-accent); }

/* Kanban */
.kanban-board {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  padding-bottom: 1rem;
  align-items: flex-start;
}
.kanban-col {
  flex-shrink: 0;
  width: 240px;
  background: var(--adm-surface);
  border: 1px solid var(--adm-border);
  border-radius: var(--adm-radius-lg);
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 200px);
}
.kanban-col__header {
  padding: .875rem 1rem;
  border-bottom: 1px solid var(--adm-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.kanban-col__title { font-size: .8rem; font-weight: 700; color: var(--adm-text); }
.kanban-col__count {
  font-size: .7rem;
  font-weight: 700;
  background: var(--adm-surface2);
  color: var(--adm-muted);
  padding: .1rem .45rem;
  border-radius: 99px;
}
.kanban-col__body {
  padding: .625rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: .5rem;
  flex: 1;
}
.kanban-card {
  background: var(--adm-surface2);
  border: 1px solid var(--adm-border);
  border-radius: var(--adm-radius);
  padding: .875rem;
  cursor: pointer;
  transition: border-color .12s, box-shadow .12s;
}
.kanban-card:hover { border-color: var(--adm-accent); box-shadow: 0 0 0 1px var(--adm-accent); }
.kanban-card__title { font-size: .875rem; font-weight: 600; color: var(--adm-text); margin-bottom: .25rem; }
.kanban-card__sub { font-size: .75rem; color: var(--adm-muted); margin-bottom: .5rem; }
.kanban-card__meta { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.kanban-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.kanban-dot--service  { background: #3B82F6; }
.kanban-dot--mfk      { background: #F59E0B; }
.kanban-dot--reifen   { background: #22C55E; }
.kanban-dot--klima    { background: #A855F7; }
.kanban-dot--sonstiges { background: #6B7280; }

/* Werkstattauftrag-Akte */
.auftrag-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 1.5rem;
  align-items: start;
}
@media (max-width: 900px) { .auftrag-grid { grid-template-columns: 1fr; } }

.auftrag-status-bar {
  display: flex;
  gap: .25rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}
.auftrag-status-step {
  display: flex;
  align-items: center;
  gap: .25rem;
  font-size: .7rem;
  font-weight: 600;
  color: var(--adm-muted);
}
.auftrag-status-step.done { color: var(--adm-green); }
.auftrag-status-step.active { color: var(--adm-accent); }
.auftrag-status-step::after {
  content: '›';
  color: var(--adm-border);
  margin-left: .25rem;
}
.auftrag-status-step:last-child::after { content: ''; }

/* Toolbar */
.adm-toolbar {
  display: flex;
  align-items: center;
  gap: .75rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}

/* Alert / Info box */
.adm-alert {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  padding: .875rem 1rem;
  border-radius: var(--adm-radius);
  font-size: .875rem;
  margin-bottom: 1rem;
}
.adm-alert--info  { background: rgba(59,130,246,.1);  border: 1px solid rgba(59,130,246,.2);  color: #93C5FD; }
.adm-alert--warn  { background: rgba(245,158,11,.1);  border: 1px solid rgba(245,158,11,.2);  color: #FCD34D; }
.adm-alert--error { background: rgba(239,68,68,.1);   border: 1px solid rgba(239,68,68,.2);   color: #FCA5A5; }

/* Mobile sidebar toggle */
.adm-mobile-toggle {
  display: none;
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  z-index: 999;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--adm-accent);
  border: none;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: #fff;
  box-shadow: 0 4px 16px rgba(0,0,0,.4);
}
@media (max-width: 768px) {
  .adm-mobile-toggle { display: flex; }
  .admin-nav { position: fixed; left: -220px; top: 0; z-index: 998; transition: left .2s; height: 100vh; }
  .admin-nav.open { left: 0; }
  .admin-main { padding: 1rem; }
  .adm-stat-grid { grid-template-columns: repeat(2, 1fr); }
  .kanban-board { flex-direction: column; }
  .kanban-col { width: 100%; max-height: none; }
}

/* Logout btn override in dark mode */
.admin-nav .btn-ghost-sm {
  background: transparent;
  color: var(--adm-muted);
  border: 1px solid var(--adm-border);
  width: 100%;
  text-align: center;
  justify-content: center;
}
.admin-nav .btn-ghost-sm:hover { background: var(--adm-surface2); color: var(--adm-text); }

/* =====================================================
   Werkstattplaner – Phase 3
   ===================================================== */

.planer-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.planer-woche-label {
  font-size: .875rem;
  font-weight: 600;
  color: var(--adm-text);
  white-space: nowrap;
}

.planer-legende {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: .75rem;
}

.planer-leg-item {
  display: flex;
  align-items: center;
  gap: .35rem;
  font-size: .75rem;
  color: var(--adm-muted);
}

.planer-leg-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.leg--yellow { background: #F59E0B; }
.leg--blue   { background: #3B82F6; }
.leg--indigo { background: #6366F1; }
.leg--green  { background: #22C55E; }
.leg--gray   { background: #6B7280; }
.leg--red    { background: #EF4444; }
.leg--purple { background: #A855F7; }

/* Grid-Layout */
.planer-wrap {
  display: flex;
  gap: 0;
  overflow-x: auto;
  background: var(--adm-surface);
  border: 1px solid var(--adm-border);
  border-radius: 10px;
}

.planer-zeitachse {
  flex-shrink: 0;
  width: 48px;
  border-right: 1px solid var(--adm-border);
}

.planer-zeitachse__header {
  height: 40px;
  border-bottom: 1px solid var(--adm-border);
}

.planer-zeit-label {
  height: 60px; /* 2 × SlotPx=30 */
  display: flex;
  align-items: flex-start;
  padding-top: 2px;
  padding-right: 4px;
  justify-content: flex-end;
  font-size: .65rem;
  color: var(--adm-muted);
  border-bottom: 1px solid var(--adm-border);
}

/* Woche */
.planer-grid-woche {
  display: grid;
  grid-template-columns: repeat(7, minmax(120px, 1fr));
  flex: 1;
  min-width: 0;
}

/* Tag */
.planer-grid-tag {
  flex: 1;
}

.planer-col--tag .planer-slots {
  height: 780px; /* (19-7+1)*60px */
}

/* Hebebühne */
.planer-grid-hebebuehne {
  display: grid;
  grid-template-columns: repeat(3, minmax(160px, 1fr));
  flex: 1;
}

/* Spalte */
.planer-col {
  border-right: 1px solid var(--adm-border);
  min-width: 0;
}

.planer-col--heute > .planer-col__header {
  background: rgba(59,130,246,.12);
}

.planer-col__header {
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  border-bottom: 1px solid var(--adm-border);
  position: sticky;
  top: 0;
  background: var(--adm-surface);
  z-index: 2;
}

.planer-wt {
  font-size: .7rem;
  color: var(--adm-muted);
  text-transform: uppercase;
  letter-spacing: .05em;
}

.planer-datum {
  font-size: .85rem;
  font-weight: 700;
  color: var(--adm-text);
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.planer-datum--heute {
  background: var(--adm-accent);
  color: #fff;
}

/* Slot-Container */
.planer-slots {
  position: relative;
  height: 780px; /* (EndStunde-StartStunde+1)*60px = 13*60 */
}

/* Einzelner 30-Min-Slot (unsichtbar, klickbar) */
.planer-slot {
  position: absolute;
  left: 0;
  right: 0;
  cursor: pointer;
  border-bottom: 1px dashed rgba(255,255,255,.04);
  transition: background .1s;
  z-index: 0;
}

.planer-slot:hover {
  background: rgba(59,130,246,.07);
}

.planer-slot.drag-over {
  background: rgba(59,130,246,.18);
  border: 1px dashed var(--adm-accent);
}

/* Auftrag-Event */
.planer-event {
  position: absolute;
  left: 2px;
  right: 2px;
  border-radius: 5px;
  padding: .25rem .4rem;
  cursor: pointer;
  z-index: 1;
  overflow: hidden;
  transition: filter .15s, transform .1s;
  border-left: 3px solid transparent;
}

.planer-event:hover {
  filter: brightness(1.15);
  transform: scale(1.01);
  z-index: 3;
}

.planer-event--tag {
  left: 4px;
  right: 4px;
}

.planer-event__title {
  font-size: .7rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.planer-event__sub {
  font-size: .62rem;
  opacity: .8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.planer-event__time {
  font-size: .6rem;
  opacity: .7;
  margin-top: 1px;
}

.planer-event__kz {
  font-size: .62rem;
  font-weight: 600;
  opacity: .85;
  margin-top: 2px;
}

/* Farben */
.ev--yellow { background: rgba(245,158,11,.25); border-left-color: #F59E0B; color: #FDE68A; }
.ev--blue   { background: rgba(59,130,246,.25);  border-left-color: #3B82F6; color: #BFDBFE; }
.ev--indigo { background: rgba(99,102,241,.28);  border-left-color: #6366F1; color: #C7D2FE; }
.ev--green  { background: rgba(34,197,94,.22);   border-left-color: #22C55E; color: #BBF7D0; }
.ev--gray   { background: rgba(107,114,128,.2);  border-left-color: #6B7280; color: #D1D5DB; }
.ev--red    { background: rgba(239,68,68,.22);   border-left-color: #EF4444; color: #FECACA; }
.ev--purple { background: rgba(168,85,247,.22);  border-left-color: #A855F7; color: #E9D5FF; }

@media (max-width: 768px) {
  .planer-grid-woche { grid-template-columns: repeat(7, minmax(80px, 1fr)); }
  .planer-event__sub { display: none; }
}

/* =====================================================
   Modal, DL, Form-Grid – Phase 4/5
   ===================================================== */

.adm-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.adm-modal {
  background: var(--adm-surface);
  border: 1px solid var(--adm-border);
  border-radius: 12px;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
}

.adm-modal--wide { max-width: 680px; }

.adm-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--adm-border);
  font-weight: 700;
  font-size: .9rem;
}

.adm-modal__body { padding: 1.25rem; }

.adm-dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: .4rem 1rem;
}

.adm-dl dt {
  font-size: .75rem;
  color: var(--adm-muted);
  padding-top: 2px;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.adm-dl dd {
  font-size: .875rem;
  color: var(--adm-text);
}

.adm-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .75rem;
}

@media (max-width: 600px) {
  .adm-form-grid { grid-template-columns: 1fr; }
  .adm-modal { max-width: 100%; }
}
