:root {
  color-scheme: dark;
  --page: #0b1220;
  --surface: #121c2c;
  --surface-raised: #172338;
  --text: #e8eef7;
  --muted: #aab6c8;
  --subtle: #7d8ba0;
  --line: rgba(167, 187, 211, .15);
  --line-strong: rgba(167, 187, 211, .25);
  --accent: #0bafb5;
  --accent-soft: rgba(11, 175, 181, .12);
  --link: #55d0d2;
  --logo: url("assets/logo-fuer-dunklen-hintergrund.png");
  --shadow: 0 12px 30px rgba(0, 0, 0, .13);
  --wrap: 1160px;
  font-synthesis: none;
}

:root[data-theme="light"] {
  color-scheme: light;
  --page: #f5f8fa;
  --surface: #fff;
  --surface-raised: #edf3f6;
  --text: #092d50;
  --muted: #425c74;
  --subtle: #627891;
  --line: rgba(9, 45, 80, .12);
  --line-strong: rgba(9, 45, 80, .21);
  --accent: #0bafb5;
  --accent-soft: rgba(11, 175, 181, .1);
  --link: #08747a;
  --logo: url("assets/logo-ohne-hintergrund.png");
  --shadow: 0 12px 28px rgba(9, 45, 80, .07);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html { scroll-padding-top: 100px; }

body {
  margin: 0;
  background: var(--page);
  color: var(--text);
  font-family: system-ui, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  transition: background-color 200ms ease, color 200ms ease;
}

a { color: inherit; }
button { font: inherit; }
a, button { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }

.wrap { width: min(100% - 48px, var(--wrap)); margin-inline: auto; }

.skip-link {
  position: fixed;
  z-index: 20;
  top: 12px;
  left: 12px;
  padding: 8px 14px;
  transform: translateY(-160%);
  border-radius: 4px;
  background: var(--text);
  color: var(--page);
}
.skip-link:focus { transform: translateY(0); }

.site-header {
  position: sticky;
  z-index: 10;
  top: 0;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--page) 88%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.header-inner {
  display: flex;
  width: min(100% - 48px, var(--wrap));
  min-height: 76px;
  margin: auto;
  align-items: center;
  gap: 30px;
}
.brand, .footer-brand {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-size: 14px;
  font-weight: 680;
  letter-spacing: -.025em;
  text-decoration: none;
}
.brand-logo { display: block; width: 34px; height: 34px; flex: 0 0 auto; background: var(--logo) center / contain no-repeat; }
.main-nav { display: flex; margin-left: auto; align-items: center; gap: clamp(18px, 2.7vw, 34px); }
.main-nav a { color: var(--muted); font-size: 13px; font-weight: 550; text-decoration: none; transition: color 180ms ease; }
.main-nav a:hover { color: var(--text); }
.theme-toggle {
  display: grid;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  transition: border-color 180ms ease, color 180ms ease, background-color 180ms ease;
}
.theme-toggle:hover { border-color: var(--accent); color: var(--link); }
.theme-toggle svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.icon-moon { display: none; }
:root[data-theme="light"] .icon-sun { display: none; }
:root[data-theme="light"] .icon-moon { display: block; }
.theme-status { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { letter-spacing: -.045em; }
h1 { font-size: clamp(42px, 5vw, 62px); font-weight: 730; line-height: 1.08; }
h2 { margin-bottom: 0; font-size: clamp(29px, 3.2vw, 38px); font-weight: 690; line-height: 1.2; }
h3 { font-size: 18px; font-weight: 650; line-height: 1.3; }

.hero {
  display: grid;
  min-height: 600px;
  padding-top: 78px;
  padding-bottom: 76px;
  grid-template-columns: minmax(0, 1fr) minmax(390px, .92fr);
  align-items: center;
  gap: clamp(46px, 7vw, 90px);
  background: radial-gradient(ellipse at 86% 30%, rgba(11, 175, 181, .075), transparent 34rem);
}
.hero-copy { max-width: 560px; }
.hero h1 { margin-bottom: 22px; }
.hero h1 span { color: var(--link); }
.hero-intro { max-width: 500px; margin-bottom: 28px; color: var(--muted); font-size: 17px; line-height: 1.75; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.button {
  display: inline-flex;
  min-height: 46px;
  padding: 0 18px;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 650;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease, transform 180ms ease;
}
.button:hover { transform: translateY(-2px); }
.button-primary { border-color: var(--accent); background: var(--accent); color: #062b36; }
.button-primary:hover { background: #20c1c5; }
.button-quiet { border-color: var(--line-strong); background: var(--surface); color: var(--text); }
.button-quiet:hover { border-color: var(--accent); }
.hero-phone { display: inline-block; margin-top: 24px; color: var(--muted); font-size: 14px; font-weight: 600; text-decoration: none; }
.hero-phone:hover { color: var(--link); }

.hero-preview { min-width: 0; }
.browser-bar { display: flex; height: 40px; padding: 0 13px; align-items: center; gap: 6px; border: 1px solid var(--line-strong); border-bottom: 0; border-radius: 11px 11px 0 0; background: var(--surface-raised); }
.browser-bar > span { width: 7px; height: 7px; border-radius: 50%; background: var(--subtle); opacity: .75; }
.browser-bar small { overflow: hidden; width: 55%; margin: 0 auto; padding: 3px 12px; border: 1px solid var(--line); border-radius: 4px; color: var(--subtle); font-size: 9px; text-align: center; text-overflow: ellipsis; white-space: nowrap; }
.preview-screen { position: relative; aspect-ratio: 1.52; overflow: hidden; border: 1px solid var(--line-strong); border-radius: 0 0 11px 11px; background: var(--surface-raised); }
.preview-image { position: absolute; z-index: 1; width: 100%; height: 100%; object-fit: cover; }
.preview-caption { margin: 11px 0 0; color: var(--subtle); font-size: 11px; }
.preview-caption a { margin-left: 5px; color: var(--link); text-underline-offset: 3px; }

.section { padding-top: 88px; padding-bottom: 88px; border-top: 1px solid var(--line); }
.section-heading { display: flex; margin-bottom: 30px; align-items: end; justify-content: space-between; gap: 30px; }
.section-heading > p { max-width: 380px; margin: 0 0 4px; color: var(--muted); font-size: 14px; }

.offer-band {
  display: flex;
  min-height: 46px;
  padding: 8px 24px;
  align-items: center;
  justify-content: center;
  gap: 20px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.offer-band[hidden], .offer-note[hidden] { display: none; }
.offer-band p { margin: 0; color: var(--muted); font-size: 13px; text-align: center; }
.offer-band strong { color: var(--text); font-weight: 700; }
.offer-close { padding: 3px 7px; border: 0; border-radius: 4px; background: transparent; color: var(--subtle); cursor: pointer; font-size: 11px; }
.offer-close:hover { background: var(--surface-raised); color: var(--text); }

.service-grid { display: grid; grid-template-columns: 1.25fr 1fr; grid-template-rows: repeat(2, minmax(150px, auto)); gap: 16px; }
.service-card {
  display: flex;
  min-width: 0;
  padding: 25px;
  flex-direction: column;
  align-items: flex-start;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow);
  transition: transform 180ms ease, border-color 180ms ease, background-color 180ms ease;
}
.service-card:hover, .price-card:hover { transform: translateY(-3px); border-color: rgba(11, 175, 181, .55); }
.service-main { grid-row: span 2; justify-content: space-between; padding: 30px; }
.service-icon { display: grid; width: 42px; height: 42px; margin-bottom: 19px; place-items: center; border: 1px solid rgba(11, 175, 181, .25); border-radius: 9px; background: var(--accent-soft); color: var(--link); }
.service-icon svg, .maintenance-icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.service-card h3 { margin-bottom: 9px; }
.service-card p { max-width: 540px; margin-bottom: 0; color: var(--muted); font-size: 14px; line-height: 1.7; }
.service-detail { display: block; margin-top: 25px; padding-top: 14px; border-top: 1px solid var(--line); color: var(--subtle); font-size: 12px; }

.price-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: stretch; gap: 16px; }
.price-card {
  position: relative;
  display: flex;
  min-height: 330px;
  padding: 25px;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow);
  transition: transform 180ms ease, border-color 180ms ease, background-color 180ms ease;
}
.price-featured { margin-top: -8px; border-top: 2px solid var(--accent); }
.price-card h3 { margin-bottom: 5px; font-size: 19px; }
.price-description { min-height: 22px; margin-bottom: 18px; color: var(--muted); font-size: 12px; }
.price { margin-bottom: 18px; font-size: 34px; font-weight: 720; letter-spacing: -.055em; font-variant-numeric: tabular-nums; }
.price-card ul { display: grid; margin: 0 0 24px; padding: 0; gap: 9px; list-style: none; }
.price-card li { color: var(--muted); font-size: 13px; }
.price-card li::before { margin-right: 9px; color: var(--accent); content: "•"; }
.price-link { width: fit-content; margin-top: auto; color: var(--link); font-size: 13px; font-weight: 620; text-decoration: none; text-underline-offset: 4px; }
.price-link:hover { text-decoration: underline; }
.offer-note { margin: 18px 0 0; padding: 12px 15px; border-left: 2px solid var(--accent); background: var(--accent-soft); color: var(--muted); font-size: 12px; }
.offer-note time { color: var(--text); font-weight: 600; }
.maintenance-card { display: flex; margin-top: 16px; padding: 19px 23px; align-items: center; gap: 15px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.maintenance-icon { display: grid; width: 40px; height: 40px; flex: 0 0 auto; place-items: center; border-radius: 9px; background: var(--accent-soft); color: var(--link); }
.maintenance-card h3 { margin: 0 0 2px; font-size: 15px; }
.maintenance-card div p { margin: 0; color: var(--muted); font-size: 12px; }
.maintenance-price { display: flex; margin: 0 0 0 auto; align-items: baseline; gap: 7px; white-space: nowrap; }
.maintenance-price strong { font-size: 20px; font-variant-numeric: tabular-nums; }
.maintenance-price span { color: var(--muted); font-size: 12px; }

.reference-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.reference-card { overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: var(--shadow); text-decoration: none; transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease; }
.reference-card:hover { transform: translateY(-2px); border-color: var(--accent); }
.reference-card:focus-visible { border-color: var(--accent); }
.reference-preview { position: relative; aspect-ratio: 1.62; overflow: hidden; border-bottom: 1px solid var(--line); background: var(--surface-raised); }
.preview-fallback { position: absolute; z-index: 0; inset: 0; display: none; place-items: center; background: var(--surface-raised); color: var(--text); font-size: 15px; font-weight: 650; }
.taxi-preview.image-error .preview-fallback { display: grid; }
.taxi-preview.image-error .preview-image { display: none; }
.reference-info { display: flex; min-height: 96px; padding: 17px 19px; align-items: center; justify-content: space-between; gap: 14px; }
.reference-info h3 { margin-bottom: 3px; font-size: 16px; }
.reference-info p { margin: 0; color: var(--muted); font-size: 12px; }
.reference-url { max-width: 45%; color: var(--subtle); font-size: 10px; text-align: right; overflow-wrap: anywhere; }

.process-section { padding-top: 80px; padding-bottom: 88px; }
.steps-grid { display: grid; margin: 0; padding: 0; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; list-style: none; }
.steps-grid li { display: flex; padding: 18px 0; align-items: flex-start; gap: 16px; border-top: 1px solid var(--line); }
.steps-grid li > span { color: var(--accent); font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.steps-grid h3 { margin: -2px 0 6px; font-size: 15px; letter-spacing: -.02em; }
.steps-grid p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.65; }
.payment-card { margin-top: 25px; padding: 22px 24px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.payment-heading { display: flex; margin-bottom: 12px; align-items: center; gap: 12px; }
.payment-heading h3 { margin: 0; font-size: 16px; }
.payment-icon, .availability-icon { display: grid; width: 38px; height: 38px; flex: 0 0 auto; place-items: center; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-raised); color: var(--link); }
.payment-icon svg, .availability-icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.payment-card ul { display: grid; margin: 0; padding-left: 19px; gap: 7px; color: var(--muted); font-size: 13px; }
.payment-card li::marker { color: var(--accent); }

.about-section { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, .75fr); align-items: center; gap: clamp(32px, 7vw, 88px); }
.about-copy { max-width: 620px; }
.about-copy h2 { margin-bottom: 22px; }
.about-copy p { margin: 0 0 12px; color: var(--muted); font-size: 14px; line-height: 1.8; }
.about-copy p:last-child { margin-bottom: 0; }
.portrait { position: relative; overflow: hidden; width: 100%; min-width: 0; aspect-ratio: 4 / 3; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--surface-raised); }
.portrait picture { position: absolute; z-index: 1; inset: 0; display: block; }
.portrait img { display: block; width: 100%; height: 100%; position: absolute; inset: 0; object-fit: cover; object-position: 25% 65%; }
.portrait-fallback { display: none; position: absolute; z-index: 0; inset: 0; align-items: center; justify-content: center; background: var(--surface-raised); }
.portrait.image-error .portrait-fallback { display: flex; }
.portrait.image-error picture { opacity: 0; }
.portrait-logo { display: block; width: 92px; height: 92px; background: var(--logo) center / contain no-repeat; }

.availability-section { padding-top: 0; border-top: 0; }
.availability-card { max-width: 570px; padding: 22px 24px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.availability-title { display: flex; margin-bottom: 13px; align-items: center; gap: 12px; }
.availability-title h2 { font-size: 20px; }
.availability-phone { display: inline-block; margin-bottom: 4px; color: var(--text); font-size: 21px; font-weight: 700; text-decoration: none; }
.availability-phone:hover { color: var(--link); }
.availability-hours { margin-bottom: 5px; font-size: 13px; font-weight: 650; }
.availability-note { margin: 0; color: var(--muted); font-size: 12px; }
.availability-status { display: flex; margin: 0 0 7px; align-items: center; gap: 7px; color: var(--subtle); font-size: 12px; }
.availability-status::before { width: 7px; height: 7px; border-radius: 50%; background: var(--subtle); content: ""; }
.availability-status.is-available { color: #43bf82; }
.availability-status.is-available::before { background: #43bf82; }

.faq-section { padding-top: 80px; padding-bottom: 96px; }
.faq-list { border-top: 1px solid var(--line); }
.faq-list details { border-bottom: 1px solid var(--line); }
.faq-list summary { position: relative; padding: 17px 38px 17px 0; font-size: 14px; font-weight: 620; cursor: pointer; list-style: none; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { position: absolute; top: 16px; right: 3px; color: var(--link); font-size: 20px; font-weight: 400; content: "+"; }
.faq-list details[open] summary::after { content: "−"; }
.faq-list details p { max-width: 760px; margin: -4px 35px 17px 0; color: var(--muted); font-size: 13px; line-height: 1.75; }
.faq-list summary:hover { color: var(--link); }

.contact-wrap { padding-top: 8px; padding-bottom: 88px; }
.contact-panel { display: grid; padding: 36px 40px; grid-template-columns: .8fr 1fr; gap: 30px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--surface); box-shadow: var(--shadow); }
.contact-copy h2 { margin-bottom: 8px; }
.contact-copy p { margin: 0; color: var(--muted); font-size: 14px; }
.contact-details { display: flex; flex-direction: column; align-items: flex-start; }
.contact-name { margin-bottom: 4px; font-size: 15px; font-weight: 650; }
.contact-name span { margin-left: 6px; color: var(--muted); font-size: 12px; font-weight: 450; }
.contact-phone { margin-bottom: 7px; color: var(--text); font-size: clamp(27px, 3.8vw, 36px); font-weight: 720; letter-spacing: -.04em; font-variant-numeric: tabular-nums; text-decoration: none; }
.contact-phone:hover { color: var(--link); }
.contact-details address { margin-bottom: 15px; color: var(--muted); font-size: 13px; font-style: normal; }
.contact-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.copy-button { color: var(--text); }
.copy-status { min-height: 20px; margin-top: 6px; color: var(--muted); font-size: 11px; }
.phone-copy-group { display: inline-flex; align-items: center; gap: 5px; }
.phone-number { unicode-bidi: isolate; }
.phone-copy-button { display: inline-grid; width: 30px; height: 30px; place-items: center; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--muted); cursor: pointer; }
.phone-copy-button:hover { border-color: var(--accent); color: var(--link); }
.phone-copy-button svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.phone-copy-status:not(:empty) { position: static; width: auto; height: auto; overflow: visible; clip: auto; clip-path: none; color: var(--muted); font-size: 11px; white-space: nowrap; }

.site-footer { border-top: 1px solid var(--line); }
.footer-inner { display: flex; width: min(100% - 48px, var(--wrap)); min-height: 76px; margin: auto; align-items: center; justify-content: space-between; gap: 20px; color: var(--muted); font-size: 12px; }
.footer-brand { color: var(--text); font-size: 13px; }
.footer-brand .brand-logo { width: 28px; height: 28px; }
.footer-inner > a:last-child { color: var(--muted); text-decoration: none; }
.footer-inner > a:last-child:hover { color: var(--link); }
.footer-inner .footer-admin { padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); text-decoration: none; transition: border-color .2s, color .2s, background .2s; }
.footer-inner .footer-admin:hover { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); color: var(--link); }

.imprint { display: flex; min-height: 100vh; flex-direction: column; }
.imprint-content { flex: 1; padding-top: clamp(90px, 14vw, 150px); padding-bottom: 90px; }
.imprint-content h1 { margin-bottom: 25px; font-size: clamp(40px, 5vw, 54px); }
.imprint-content address { margin-bottom: 25px; color: var(--muted); font-size: 15px; font-style: normal; line-height: 1.9; }
.imprint-content address strong { color: var(--text); }
.text-link { color: var(--link); font-size: 13px; text-underline-offset: 4px; }

.offer-page .site-header { position: sticky; }
.error-content { display: flex; min-height: calc(100vh - 77px); padding-top: 80px; padding-bottom: 100px; flex-direction: column; align-items: flex-start; justify-content: center; }
.error-code { margin-bottom: 5px; color: var(--link); font-size: clamp(100px, 20vw, 190px); font-weight: 760; letter-spacing: -.09em; line-height: .95; }
.error-content h1 { margin-bottom: 28px; font-size: clamp(28px, 5vw, 40px); }

@media (max-width: 860px) {
  .header-inner { gap: 20px; }
  .hero { min-height: auto; padding-top: 68px; padding-bottom: 68px; grid-template-columns: minmax(0, 1fr) minmax(290px, .85fr); gap: 32px; }
  .hero h1 { font-size: clamp(40px, 5.7vw, 53px); }
  .service-grid { grid-template-columns: 1.08fr 1fr; }
  .section { padding-top: 70px; padding-bottom: 70px; }
  .contact-panel { padding: 30px; }
  .steps-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .about-section { grid-template-columns: minmax(0, 1fr) minmax(220px, .75fr); }
}

@media (max-width: 640px) {
  html { scroll-padding-top: 115px; }
  .wrap { width: min(100% - 36px, var(--wrap)); }
  .agb-content h1 { font-size: clamp(28px, 8vw, 32px); }
  .header-inner { width: calc(100% - 32px); min-height: 66px; flex-wrap: wrap; gap: 0 15px; }
  .brand { margin-right: auto; }
  .brand-logo { width: 30px; height: 30px; }
  .theme-toggle { width: 36px; height: 36px; }
  .main-nav { order: 3; width: 100%; margin: 0; padding: 0 0 10px; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; overflow: visible; }
  .main-nav a { flex: 0 0 auto; font-size: 11px; }
  .hero { padding-top: 55px; padding-bottom: 54px; grid-template-columns: 1fr; gap: 35px; }
  .hero h1 { max-width: 500px; font-size: clamp(40px, 11vw, 55px); }
  .hero-intro { font-size: 15px; }
  .hero-preview { max-width: 520px; }
  .section { padding-top: 56px; padding-bottom: 56px; }
  .section-heading { margin-bottom: 23px; flex-direction: column; align-items: flex-start; gap: 10px; }
  .section-heading > p { max-width: 440px; }
  .service-grid { grid-template-columns: 1fr; grid-template-rows: auto; gap: 12px; }
  .service-main { grid-row: auto; min-height: 205px; }
  .service-card { min-height: 165px; padding: 21px; }
  .service-main { padding: 23px; }
  .price-grid { grid-template-columns: 1fr; gap: 12px; }
  .price-card { min-height: 0; padding: 22px; }
  .price-featured { margin-top: 0; }
  .price-description { min-height: auto; }
  .price { margin-bottom: 13px; font-size: 31px; }
  .price-card ul { margin-bottom: 20px; }
  .maintenance-card { padding: 16px; gap: 11px; }
  .maintenance-card div p { max-width: 210px; font-size: 11px; }
  .maintenance-price { flex-direction: column; align-items: flex-end; gap: 0; }
  .maintenance-price strong { font-size: 17px; }
  .maintenance-price span { font-size: 10px; }
  .reference-grid { grid-template-columns: 1fr; gap: 13px; }
  .reference-preview { aspect-ratio: 1.58; }
  .reference-info { min-height: 85px; padding: 15px; flex-direction: column; align-items: flex-start; gap: 7px; }
  .reference-url { max-width: 100%; font-size: 10px; text-align: left; }
  .steps-grid { grid-template-columns: 1fr; gap: 0; }
  .steps-grid li { padding: 16px 0; }
  .contact-wrap { padding-top: 0; padding-bottom: 62px; }
  .contact-panel { padding: 24px 21px 20px; grid-template-columns: 1fr; gap: 22px; }
  .contact-phone { font-size: 31px; }
  .footer-inner { width: calc(100% - 36px); min-height: 68px; }
  .offer-band { padding: 8px 12px; gap: 8px; }
  .offer-band p { font-size: 11px; }
  .offer-close { flex: 0 0 auto; }
  .about-section { grid-template-columns: 1fr; gap: 24px; }
  .portrait { width: 100%; justify-self: stretch; }
  .availability-card { padding: 19px; }
  .steps-grid { grid-template-columns: 1fr; }
  .payment-card { padding: 19px; }
  .faq-section { padding-top: 58px; }
}

.global-search { position: relative; width: min(36vw, 360px); margin-left: auto; }
.global-search input { min-height: 40px; }
.global-search-results { position: absolute; z-index: 55; top: calc(100% + 7px); right: 0; width: min(440px, calc(100vw - 32px)); max-height: min(65vh, 560px); overflow: auto; padding: 8px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface-raised); box-shadow: var(--shadow); }
.global-search-group { display: block; padding: 9px 10px 4px; color: var(--subtle); font-size: 10px; letter-spacing: .05em; text-transform: uppercase; }
.global-search-result { display: flex; width: 100%; padding: 9px 10px; flex-direction: column; gap: 3px; border: 0; border-radius: 6px; background: transparent; color: var(--text); text-align: left; cursor: pointer; }
.global-search-result:hover { background: var(--accent-soft); }
.global-search-result small, .global-search-empty { color: var(--muted); font-size: 11px; }
.global-search-empty { display: block; padding: 12px; }
.density-toggle { width: auto; padding-inline: 9px; font-size: 11px; }
.view-toggle[aria-pressed="true"] { border-color: var(--accent); color: var(--link); }
.status-chip { padding: 2px 0; border: 0; background: transparent; font: inherit; cursor: pointer; }
.status-select { min-width: 120px; min-height: 30px; border: 1px solid var(--line-strong); border-radius: 6px; background: var(--surface); color: var(--text); }
.compact-tables .admin-table th, .compact-tables .admin-table td { padding-block: 6px; }
.bulk-bar { position: sticky; z-index: 8; top: 8px; display: flex; margin: 0 0 12px; padding: 8px; align-items: center; flex-wrap: wrap; gap: 7px; border: 1px solid var(--line-strong); border-radius: 9px; background: var(--surface-raised); box-shadow: var(--shadow); }
.bulk-bar > span { margin-right: auto; padding-inline: 6px; color: var(--muted); font-size: 12px; }
.bulk-bar .field-label { margin: 0; }
.bulk-bar select { min-height: 34px; }
.bulk-bar .icon-button { width: auto; padding-inline: 9px; font-size: 11px; }
.inquiry-board { display: grid; grid-auto-columns: minmax(210px, 1fr); grid-auto-flow: column; gap: 12px; overflow: auto; padding: 2px 2px 14px; scroll-snap-type: x proximity; }
.board-column { min-height: 240px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); scroll-snap-align: start; }
.board-column h2 { margin: 2px 2px 10px; color: var(--muted); font-size: 12px; }
.board-card { display: grid; margin-bottom: 8px; padding: 12px; gap: 6px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-raised); cursor: grab; touch-action: pan-y; }
.board-card:active { cursor: grabbing; }
.board-card.is-touch-dragging { opacity: .58; cursor: grabbing; }
.board-column.is-touch-drop-target { outline: 2px solid var(--accent); outline-offset: -2px; }
.board-card small { color: var(--muted); }
.board-card select { min-height: 34px; padding: 4px 7px; border: 1px solid var(--line); border-radius: 6px; background: var(--page); color: var(--text); }
.payment-totals { display: flex; margin-bottom: 16px; flex-wrap: wrap; gap: 10px; }
.payment-total { padding: 12px 15px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); font-size: 13px; font-weight: 650; }
.settings-form { display: grid; max-width: 680px; margin: 0 0 24px; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.settings-form > button { justify-self: start; }
.export-actions { display: flex; margin-top: 30px; padding: 16px; flex-wrap: wrap; align-items: center; gap: 9px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); }
.export-actions p { width: 100%; margin: 0; color: var(--muted); font-size: 12px; }
.back-link { display: inline-block; margin-bottom: 16px; color: var(--link); font-size: 13px; }
.dossier-record { display: flex; width: 100%; margin: 5px 0; padding: 11px; flex-direction: column; gap: 4px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--text); text-align: left; cursor: pointer; }
.dossier-record:hover { border-color: var(--accent); }
.dossier-record small { color: var(--muted); }
.event-timeline { display: grid; margin: 8px 0 24px; padding-left: 22px; gap: 13px; }
.event-timeline li::marker { color: var(--accent); }
.event-timeline time { color: var(--muted); font-size: 11px; }
.event-timeline p { margin: 3px 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.toast-undo { margin-left: 7px; padding: 2px 5px; border: 0; background: transparent; color: var(--link); font: inherit; font-weight: 700; text-decoration: underline; cursor: pointer; }
.admin-page [data-page="anfragen"] tr[ data-due="true"] td { box-shadow: inset 0 0 0 999px rgba(226, 174, 90, .07); }
.contract-progress { display: grid; margin: 0 0 18px; grid-template-columns: repeat(3, 1fr); gap: 5px; }
.contract-progress-step { padding: 8px 5px; border-bottom: 3px solid var(--line); color: var(--muted); font-size: 11px; text-align: center; }
.contract-progress-step[data-complete="true"] { border-color: var(--accent); color: var(--text); }
.contract-progress-step[data-current="true"] { font-weight: 750; }
.admin-page-panel[data-page="kundenakte"] > .admin-page-intro h2 { margin: 0; font-size: 22px; }
.admin-table th:not(:first-child) { cursor: pointer; }
.admin-table th:last-child { cursor: default; }
.admin-page-panel[data-page="zahlungen"] .admin-table input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--accent); vertical-align: middle; }

@media (max-width: 680px) {
  .admin-topbar { flex-wrap: wrap; }
  .global-search { order: 4; width: 100%; margin-left: 0; }
  .density-toggle { margin-left: auto; }
  .inquiry-board { grid-auto-columns: minmax(75vw, 1fr); }
  .settings-form { grid-template-columns: 1fr; }
  .export-actions .button { width: 100%; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

@font-face {
  font-family: "Great Vibes";
  src: url("/assets/fonts/great-vibes-latin-400-normal.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

.signature-script { font-family: "Great Vibes", cursive; font-weight: 400; }
.signature-preview {
  min-height: 84px;
  margin: 8px 0 18px;
  padding: 8px 12px;
  overflow: hidden;
  border-bottom: 1px solid var(--line-strong);
  color: #172338;
  font-size: clamp(32px, 6vw, 48px);
  line-height: 1.25;
  white-space: nowrap;
}
.signature-preview.is-empty::before { color: #8793a3; content: "Deine Unterschrift erscheint hier"; }
.signature-consent { display: flex; margin: 14px 0 18px; align-items: flex-start; gap: 9px; color: var(--muted); font-size: 13px; }
.signature-consent input { margin-top: 5px; }

.icon-library, .visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; clip-path: inset(50%); }
.admin-document { overflow-x: clip; }
.admin-page { min-height: 100vh; overflow-x: clip; background: var(--page); }
.admin-login { width: min(440px, calc(100% - 36px)); margin: min(15vh, 130px) auto; padding: 34px; }
.admin-reauth-required::before { position: fixed; z-index: 49; inset: 0; background: rgba(3, 8, 16, .72); content: ""; }
.admin-reauth-required .admin-login:not([hidden]) { position: fixed; z-index: 50; top: 50%; left: 50%; max-height: calc(100vh - 24px); overflow: auto; margin: 0; transform: translate(-50%, -50%); }
.admin-login .brand { margin-bottom: 36px; }
.admin-login h1 { margin-bottom: 9px; font-size: 34px; }
.admin-login > p { color: var(--muted); }
.admin-login form { display: grid; gap: 18px; }
.admin-shell { min-height: 100vh; }
.admin-shell:not([hidden]) { display: block; }
.admin-sidebar {
  position: fixed;
  z-index: 31;
  inset: 0 auto 0 0;
  display: flex;
  width: 252px;
  padding: 22px 14px 18px;
  flex-direction: column;
  border-right: 1px solid var(--line);
  background: var(--surface);
}
.admin-brand { display: flex; min-height: 54px; margin: 0 8px 27px; align-items: center; gap: 11px; color: var(--text); font-size: 14px; font-weight: 700; text-decoration: none; }
.admin-brand .brand-logo { width: 34px; height: 34px; }
.admin-nav { display: grid; gap: 5px; }
.admin-nav a, .admin-nav-action {
  display: flex;
  min-height: 46px;
  padding: 0 12px;
  align-items: center;
  gap: 12px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}
.admin-nav a:hover, .admin-nav-action:hover { border-color: var(--line); background: var(--surface-raised); color: var(--text); }
.admin-nav a[aria-current="page"] { border-color: var(--line); background: var(--accent-soft); color: var(--text); }
.admin-nav svg, .admin-nav-action svg, .admin-menu-toggle svg, .icon-button svg, .action-button svg { width: 19px; height: 19px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.admin-nav a span, .admin-nav-action span { flex: 1; }
.admin-nav a b { min-width: 21px; padding: 1px 6px; border-radius: 999px; background: var(--surface-raised); color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; text-align: center; }
.admin-sidebar-bottom { display: grid; margin-top: auto; gap: 4px; }
.admin-sidebar-bottom .theme-toggle { display: flex; width: 100%; height: auto; min-height: 46px; padding: 0 12px; place-items: initial; justify-content: flex-start; border: 1px solid transparent; border-radius: 9px; background: transparent; color: var(--muted); font: inherit; font-size: 13px; }
.admin-sidebar-bottom .theme-toggle:hover { border-color: var(--line); background: var(--surface-raised); color: var(--text); transform: none; }
.admin-sidebar-bottom .icon-sun { display: block; }
.admin-sidebar-bottom .icon-moon { display: none; }
:root[data-theme="light"] .admin-sidebar-bottom .icon-sun { display: none; }
:root[data-theme="light"] .admin-sidebar-bottom .icon-moon { display: block; }
.admin-main { min-height: 100vh; margin-left: 252px; padding: 34px clamp(24px, 4vw, 56px) 70px; }
.admin-topbar { display: flex; min-height: 62px; margin-bottom: 22px; align-items: center; gap: 16px; }
.admin-topbar h1 { margin: 0; font-size: clamp(28px, 3vw, 38px); }
.admin-kicker { margin: 0 0 3px; color: var(--subtle); font-size: 11px; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; }
.admin-page-intro { display: flex; min-height: 47px; margin-bottom: 21px; align-items: center; justify-content: space-between; gap: 20px; }
.admin-page-intro p { margin: 0; color: var(--muted); font-size: 13px; }
.admin-page-intro > button, .admin-toolbar-actions { flex: 0 0 auto; }
.admin-toolbar-actions { display: flex; gap: 8px; }
.admin-toolbar { display: flex; min-height: 52px; margin-bottom: 18px; align-items: center; justify-content: space-between; gap: 16px; }
.status-tabs { display: flex; max-width: 100%; gap: 5px; overflow-x: auto; scrollbar-width: thin; }
.status-tab { display: inline-flex; min-height: 37px; padding: 0 12px; align-items: center; gap: 7px; border: 1px solid transparent; border-radius: 8px; background: transparent; color: var(--muted); font: inherit; font-size: 12px; white-space: nowrap; cursor: pointer; }
.status-tab:hover { background: var(--surface); color: var(--text); }
.status-tab[aria-pressed="true"] { border-color: var(--line-strong); background: var(--surface); color: var(--text); }
.status-tab b { color: var(--subtle); font-size: 10px; font-variant-numeric: tabular-nums; }
.admin-search { display: block; width: min(100%, 300px); }
.admin-search input { width: 100%; min-height: 40px; padding: 0 13px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface); color: var(--text); font: inherit; font-size: 13px; }
.admin-table-wrap { max-height: calc(100vh - 260px); min-height: 180px; overflow: auto; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.admin-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 12px; text-align: left; }
.admin-table th { position: sticky; z-index: 2; top: 0; padding: 12px 14px; border-bottom: 1px solid var(--line-strong); background: var(--surface-raised); color: var(--muted); font-size: 10px; font-weight: 680; letter-spacing: .045em; text-transform: uppercase; white-space: nowrap; }
.admin-table td { min-width: 72px; padding: 11px 14px; border-bottom: 1px solid var(--line); color: var(--text); vertical-align: middle; }
.admin-table tbody tr:last-child td { border-bottom: 0; }
.admin-table tbody tr:hover td { background: var(--accent-soft); }
.admin-table tbody tr[data-clickable] { cursor: pointer; }
.admin-table td:first-child { font-weight: 650; }
.admin-table td:nth-child(2) { min-width: 130px; }
.admin-table td:nth-child(3) { max-width: 270px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-table .table-actions { display: flex; min-width: 118px; align-items: center; gap: 5px; }
.icon-button, .action-button {
  display: inline-grid;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.icon-button { border-color: var(--line-strong); background: var(--surface); }
.icon-button:hover, .action-button:hover { border-color: var(--accent); color: var(--link); }
.action-button { width: 32px; height: 32px; }
.action-button svg { width: 17px; height: 17px; }
.action-button.danger:hover { border-color: #b65b67; color: #e48a94; }
.delete-confirm { display: flex; align-items: center; gap: 6px; color: var(--muted); white-space: nowrap; }
.delete-confirm p { max-width: 240px; margin: 0 5px 0 0; font-size: 11px; white-space: normal; }
.status-chip { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); white-space: nowrap; }
.status-chip::before { width: 7px; height: 7px; border-radius: 50%; background: #8491a3; content: ""; }
.status-chip[data-status="neu"]::before, .status-chip[data-status="vom_auftragnehmer_unterschrieben"]::before { background: #0bafb5; }
.status-chip[data-status="in_arbeit"]::before { background: #e2ae5a; }
.status-chip[data-status="gueltig"]::before, .status-chip[data-status="fertig"]::before { background: #48ad7a; }
.status-chip[data-status="abgelehnt"]::before { background: #bd5662; }
.blacklist-warning { display: inline-flex; margin-left: 7px; align-items: center; gap: 5px; color: #e1848c; font-size: 10px; font-weight: 650; }
.blacklist-warning svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.customer-id-small { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; font-weight: 500; }
.duplicate-notice { display: grid; gap: 8px; }
.duplicate-notice .drawer-warning { margin: 0; }
.contact-contract-list { display: grid; gap: 8px; }
.contact-contract-list .button { justify-content: flex-start; text-align: left; }
.table-empty { padding: 34px 18px; color: var(--muted); font-size: 13px; text-align: center; }
.admin-drawer {
  position: fixed;
  z-index: 35;
  inset: 0 0 0 auto;
  display: flex;
  width: min(600px, calc(100vw - 252px));
  flex-direction: column;
  border-left: 1px solid var(--line-strong);
  background: var(--page);
  box-shadow: -20px 0 55px rgba(0, 0, 0, .24);
}
.admin-drawer-head { display: flex; min-height: 82px; padding: 14px 20px; align-items: center; gap: 8px; border-bottom: 1px solid var(--line); background: var(--surface); }
.admin-drawer-head > div:first-child { min-width: 0; flex: 1; }
.admin-drawer-head h2 { overflow: hidden; margin: 0; font-size: 21px; text-overflow: ellipsis; white-space: nowrap; }
.drawer-head-actions { display: flex; gap: 4px; }
.admin-drawer-body { overflow: auto; padding: 23px 24px 44px; }
.drawer-data { display: grid; margin: 0 0 25px; grid-template-columns: minmax(110px, .7fr) minmax(0, 1.3fr); gap: 0; }
.drawer-data dt, .drawer-data dd { margin: 0; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 12px; overflow-wrap: anywhere; }
.drawer-data dt { color: var(--muted); }
.drawer-data dd { color: var(--text); white-space: pre-wrap; }
.drawer-form { display: grid; gap: 14px; }
.drawer-section-title { margin: 25px 0 11px; font-size: 15px; }
.drawer-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.drawer-warning { display: flex; margin: 0 0 16px; padding: 12px; align-items: flex-start; gap: 8px; border: 1px solid rgba(195, 72, 81, .38); border-radius: 8px; background: rgba(195, 72, 81, .1); color: #e58b93; font-size: 12px; }
.drawer-warning svg { width: 18px; height: 18px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.8; }
.drawer-link { display: inline-flex; margin: 0 0 17px; align-items: center; gap: 7px; color: var(--link); font-size: 12px; }
.drawer-link svg { width: 16px; height: 16px; }
.drawer-delete-confirm { display: flex; margin-top: 15px; padding: 11px; align-items: center; gap: 8px; border-radius: 8px; background: rgba(189, 86, 98, .12); color: #e58b93; font-size: 12px; }
.admin-toast { position: fixed; z-index: 60; right: 24px; bottom: 24px; max-width: min(440px, calc(100vw - 36px)); padding: 13px 17px; border: 1px solid var(--line-strong); border-radius: 9px; background: var(--surface-raised); color: var(--text); box-shadow: var(--shadow); font-size: 13px; }
.admin-toast[data-kind="error"] { border-color: rgba(189, 86, 98, .65); color: #e58b93; }
.admin-toast[data-kind="success"] { border-color: rgba(72, 173, 122, .5); color: #70ce9b; }
.template-list { display: grid; gap: 10px; }
.template-row { padding: 17px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.template-row-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.template-row h2 { margin: 0; font-size: 16px; }
.template-row p { margin: 12px 0 0; color: var(--muted); font-size: 12px; white-space: pre-wrap; }
.template-row-edit { display: grid; margin-top: 14px; gap: 11px; }
.template-placeholder-list { margin: 18px 0 0; color: var(--muted); font-size: 12px; }
.admin-mobile-shade { display: none; }
.admin-menu-toggle { display: none; }
.copy-value { cursor: copy; text-decoration: underline dotted var(--line-strong); text-underline-offset: 3px; }
.inline-editor { display: grid; min-width: 160px; gap: 6px; }
.inline-editor input { width: 100%; min-width: 120px; min-height: 34px; padding: 5px 8px; border: 1px solid var(--line-strong); border-radius: 6px; background: var(--page); color: var(--text); font: inherit; font-size: 12px; }
.contract-document { color: var(--text); }
.contract-document-heading { display: flex; margin: 0 0 22px; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); padding: 0 0 10px; }
.contract-document-heading img { width: 120px; max-height: 60px; object-fit: contain; }
.contract-document-heading { display: flex; margin: 0 0 22px; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); padding: 0 0 10px; }
.contract-document-heading img { width: 120px; max-height: 60px; object-fit: contain; }
.contract-document .contract-body { margin: 0 0 20px; padding: 15px; border-radius: 8px; background: var(--surface); white-space: pre-wrap; font: inherit; font-size: 13px; line-height: 1.7; }
.contract-document h3 { margin: 20px 0 8px; font-size: 15px; }
.contract-document .contract-terms { color: var(--muted); font-size: 12px; }
.contract-document .contract-terms details { margin-top: 12px; }
.contract-document .contract-terms pre { max-height: 260px; overflow: auto; white-space: pre-wrap; }
.contract-reference-form { display: flex; margin-top: 12px; align-items: center; flex-wrap: wrap; gap: 10px; }
.contract-reference-form .payment-checks { margin: 0; }
.contract-document .signature-grid { margin-top: 28px; }
.contract-phone-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.proof-link-controls { display: flex; margin-top: 24px; padding: 16px; flex-wrap: wrap; align-items: center; gap: 9px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); }
.proof-link-controls h3, .proof-link-controls p { width: 100%; margin: 0; }
.proof-link-controls .drawer-warning { width: 100%; }
.customer-pdf { margin-top: 20px; }
.proof-check { margin-top: 26px; padding: 20px; }
.proof-check code { display: block; overflow-wrap: anywhere; color: var(--text); font-size: 11px; }
.signature-block { min-width: 0; break-inside: avoid; page-break-inside: avoid; }
.signature-block strong { display: block; }
.signature-image { display: flex; height: 65px; margin-bottom: 6px; align-items: flex-end; border-bottom: 1px solid var(--line-strong); background: transparent; }
.signature-script { display: block; padding: 0 5px; color: #172338; font-family: "Great Vibes", cursive; font-size: 36px; line-height: 1.25; }
.signature-grid { break-inside: avoid; page-break-inside: avoid; }
.counter-sign-preview { margin: 15px 0; padding: 15px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.counter-sign-preview .signature-script { font-size: 42px; }
.admin-menu-toggle svg { width: 21px; height: 21px; }

@media (max-width: 900px) {
  .admin-main { padding-inline: 23px; }
  .admin-sidebar { width: 220px; }
  .admin-main { margin-left: 220px; }
  .admin-drawer { width: min(570px, calc(100vw - 220px)); }
  .status-tabs { width: 100%; }
  .admin-toolbar { align-items: flex-start; flex-direction: column; }
}
@media (max-width: 680px) {
  .admin-sidebar { width: 280px; max-width: calc(100vw - 54px); transform: translateX(-105%); transition: transform 180ms ease; box-shadow: none; }
  .admin-sidebar.is-open { transform: translateX(0); box-shadow: 15px 0 35px rgba(0, 0, 0, .24); }
  .admin-mobile-shade:not([hidden]) { position: fixed; z-index: 30; inset: 0; display: block; background: rgba(0, 0, 0, .45); }
  .admin-main { margin-left: 0; padding: 17px 16px 48px; }
  .admin-topbar { min-height: 55px; margin-bottom: 19px; }
  .admin-menu-toggle { position: relative; z-index: 32; display: grid; width: 40px; height: 40px; flex: 0 0 auto; place-items: center; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--text); cursor: pointer; }
  .admin-toolbar { gap: 10px; }
  .status-tabs { margin-right: -16px; padding-right: 16px; }
  .admin-search { width: 100%; }
  .admin-table-wrap { max-height: calc(100vh - 300px); }
  .admin-table { min-width: 680px; }
  .admin-drawer { z-index: 42; inset: 0; width: 100%; border-left: 0; }
  .admin-drawer-head { min-height: 72px; padding-inline: 15px; }
  .admin-drawer-body { padding: 18px 16px 38px; }
  .admin-page-intro { align-items: flex-start; }
  .admin-toast { right: 12px; bottom: 12px; }
  .admin-page input, .admin-page textarea, .admin-page select { font-size: 16px; }
  .footer-inner { min-height: 0; padding-block: 14px; flex-wrap: wrap; justify-content: center; gap: 12px 16px; }
  .footer-inner .footer-brand { margin-right: auto; }
}

.request-page { max-width: 860px; min-height: calc(100vh - 155px); padding-top: 68px; padding-bottom: 90px; }
.request-intro { max-width: 650px; margin-bottom: 30px; }
.request-intro h1 { margin-bottom: 12px; font-size: clamp(36px, 5vw, 52px); }
.request-intro p { margin: 0; color: var(--muted); }
.request-panel, .admin-login, .admin-detail { padding: clamp(22px, 4vw, 38px); border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: var(--shadow); }
.request-progress { margin-bottom: 30px; }
.progress-label { display: flex; margin-bottom: 9px; justify-content: space-between; color: var(--muted); font-size: 12px; }
.progress-track { height: 5px; overflow: hidden; border-radius: 4px; background: var(--surface-raised); }
.progress-track > span { display: block; width: 20%; height: 100%; border-radius: inherit; background: var(--accent); transition: width 180ms ease; }
.progress-track[data-progress="25"] > span { width: 25%; }
.progress-track[data-progress="50"] > span { width: 50%; }
.progress-track[data-progress="75"] > span { width: 75%; }
.progress-track[data-progress="100"] > span { width: 100%; }
.request-step { min-width: 0; margin: 0; padding: 0; border: 0; }
.request-step legend { margin-bottom: 20px; font-size: 23px; font-weight: 680; letter-spacing: -.035em; }
.choice-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.choice, .package-option { display: flex; min-height: 55px; padding: 13px 15px; align-items: center; gap: 11px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-raised); cursor: pointer; transition: border-color 160ms ease, background-color 160ms ease; }
.choice:has(input:checked), .package-option:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.choice input, .package-option input { width: 17px; height: 17px; flex: 0 0 auto; accent-color: var(--accent); }
.choice span { font-size: 14px; }
.package-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.package-option { min-height: 82px; align-items: flex-start; }
.package-option > span { display: grid; gap: 3px; }
.package-option strong { font-size: 14px; }
.package-option small { color: var(--muted); font-size: 11px; }
.package-option b { color: var(--link); font-size: 13px; }
.request-page .offer-note { margin: 16px 0 0; padding: 12px 14px; border-left: 2px solid var(--accent); background: var(--surface-raised); color: var(--muted); font-size: 12px; }
.field-label { display: grid; margin: 0 0 17px; gap: 7px; color: var(--text); font-size: 13px; font-weight: 620; }
.field-label input, .field-label textarea, .field-label select {
  display: block; width: 100%; min-width: 0; min-height: 44px; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: 6px;
  background: var(--page); color: var(--text); font: inherit; font-size: 14px; font-weight: 400;
}
.field-label textarea { min-height: 100px; resize: vertical; }
.field-label input::placeholder, .field-label textarea::placeholder { color: var(--subtle); opacity: 1; }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.field-grid > :last-child:nth-child(odd) { grid-column: 1 / -1; }
.required-mark, .optional-mark { color: var(--subtle); font-size: 11px; font-weight: 450; }
.form-field-error { color: #e58b93; font-size: 12px; font-weight: 500; }
.form-field-error[hidden] { display: none; }
.request-actions { display: flex; margin-top: 24px; justify-content: space-between; gap: 12px; }
.request-actions [hidden] { display: none; }
.form-message { margin: 0 0 18px; padding: 12px 14px; border: 1px solid #c96565; border-radius: 6px; background: color-mix(in srgb, #c96565 12%, var(--surface)); color: var(--text); font-size: 13px; }
.request-summary { display: grid; grid-template-columns: minmax(120px, .35fr) minmax(0, 1fr); margin: 0; gap: 0; }
.request-summary dt, .request-summary dd { margin: 0; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 13px; overflow-wrap: anywhere; }
.request-summary dt { color: var(--muted); }
.request-summary dd { white-space: pre-wrap; }
.request-terms { margin: 20px 0 0; color: var(--muted); font-size: 12px; }
.request-terms strong { color: var(--text); }
.honeypot { position: absolute !important; width: 1px !important; height: 1px !important; overflow: hidden !important; clip-path: inset(50%) !important; white-space: nowrap !important; }
.request-success { text-align: left; }
.request-success h2 { margin: 12px 0; }
.request-success p { margin-bottom: 22px; color: var(--muted); }
.success-mark { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 50%; background: var(--accent-soft); color: var(--link); font-size: 22px; }
.button:disabled { opacity: .65; cursor: wait; transform: none; }

.admin-content { min-height: calc(100vh - 155px); padding-top: 52px; padding-bottom: 80px; }
.admin-login { width: min(100%, 470px); margin: 45px auto; }
.admin-login h1, .admin-heading h1 { margin-bottom: 8px; font-size: clamp(31px, 4vw, 42px); }
.admin-login > p, .admin-heading p { margin: 0; color: var(--muted); font-size: 14px; }
.admin-login form { margin-top: 25px; }
.admin-heading { display: flex; margin-bottom: 26px; align-items: center; justify-content: space-between; gap: 18px; }
.admin-heading > div { min-width: 0; }
.admin-workspace[hidden] { display: none; }
.stat-grid { display: grid; margin-bottom: 28px; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.stat-card { display: grid; min-height: 90px; padding: 16px 18px; align-content: space-between; gap: 10px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); }
.stat-card span { color: var(--muted); font-size: 12px; }
.stat-card strong { font-size: 25px; line-height: 1.15; font-variant-numeric: tabular-nums; }
.admin-tabs { display: flex; margin-bottom: 20px; gap: 20px; border-bottom: 1px solid var(--line); }
.admin-tabs button { padding: 11px 2px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--muted); font: inherit; font-size: 14px; cursor: pointer; }
.admin-tabs button[aria-selected="true"] { border-color: var(--accent); color: var(--text); font-weight: 650; }
.admin-filters { display: grid; margin-bottom: 18px; grid-template-columns: minmax(150px, .55fr) minmax(240px, 1fr); gap: 16px; }
.admin-filters .field-label { margin-bottom: 0; }
.admin-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); }
.admin-table { width: 100%; border-collapse: collapse; text-align: left; }
.admin-table th, .admin-table td { padding: 13px 15px; border-bottom: 1px solid var(--line); font-size: 12px; vertical-align: middle; }
.admin-table th { color: var(--muted); font-weight: 600; white-space: nowrap; }
.admin-table td { max-width: 300px; overflow-wrap: anywhere; }
.admin-table tbody tr:last-child td { border-bottom: 0; }
.table-button { padding: 5px 9px; border: 1px solid var(--line-strong); border-radius: 5px; background: transparent; color: var(--link); font: inherit; font-size: 11px; cursor: pointer; }
.table-empty { margin: 0; padding: 20px; color: var(--muted); font-size: 13px; }
.admin-detail { margin-top: 24px; }
.detail-heading { display: flex; margin-bottom: 22px; align-items: flex-start; justify-content: space-between; gap: 15px; }
.detail-heading h2 { font-size: clamp(23px, 3vw, 30px); overflow-wrap: anywhere; }
.detail-number { margin: 0 0 5px; color: var(--link); font-size: 12px; font-weight: 650; }
.detail-data { display: grid; margin: 0 0 25px; grid-template-columns: minmax(140px, .3fr) minmax(0, 1fr); }
.detail-data dt, .detail-data dd { margin: 0; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 13px; overflow-wrap: anywhere; white-space: pre-wrap; }
.detail-data dt { color: var(--muted); }
.detail-data dd { color: var(--text); }
.admin-edit-form { max-width: 780px; }
.payment-checks { display: flex; margin: 3px 0 20px; flex-wrap: wrap; gap: 18px; color: var(--muted); font-size: 13px; }
.payment-checks input { accent-color: var(--accent); }
.admin-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.button-danger { border-color: #b94a48; background: transparent; color: #ef9995; }
.button-danger:hover { border-color: #ef7771; background: rgba(185, 74, 72, .12); }
.contract-config-note { color: var(--muted); font-size: 12px; }
.signed-date { margin: 16px 0; color: var(--muted); font-size: 12px; }
.consent-fields { display: grid; margin-top: 22px; gap: 12px; }
.consent-fields label { display: flex; align-items: flex-start; gap: 10px; color: var(--muted); font-size: 13px; cursor: pointer; }
.consent-fields input { width: 17px; height: 17px; flex: 0 0 auto; margin-top: 2px; accent-color: var(--accent); }
.consent-fields a { color: var(--link); text-underline-offset: 3px; }
.agb-content { max-width: 930px; }
.agb-content h1 { margin-bottom: 8px; }
.agb-version { color: var(--muted); font-size: 13px; }
.agb-content pre { margin: 25px 0 0; padding: 24px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--text); font: inherit; font-size: 14px; line-height: 1.85; white-space: pre-wrap; overflow-wrap: anywhere; }
.contract-page { min-height: 100vh; }
.customer-contract { max-width: 920px; padding-top: 45px; padding-bottom: 80px; }
.customer-contract-paper { padding: clamp(20px, 5vw, 48px); border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: var(--shadow); }
.customer-contract-paper h1 { margin-bottom: 12px; font-size: clamp(30px, 4vw, 42px); overflow-wrap: anywhere; }
.customer-contract-paper > p { color: var(--muted); font-size: 13px; }
.customer-contract-text { margin: 20px 0 0; padding: 20px 0; border-block: 1px solid var(--line); color: var(--text); font: inherit; font-size: 13px; line-height: 1.8; white-space: pre-wrap; overflow-wrap: anywhere; }
.customer-terms { padding: 22px 0; border-bottom: 1px solid var(--line); }
.customer-terms h2, .customer-signatures h2, .customer-sign-form h2 { margin-bottom: 12px; font-size: 21px; }
.customer-terms p { margin: 8px 0; color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.customer-terms details { margin-top: 14px; }
.customer-terms summary { color: var(--link); cursor: pointer; font-size: 13px; }
.customer-terms details pre { max-height: 430px; margin: 10px 0 0; padding: 14px; overflow: auto; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-raised); color: var(--text); font: inherit; font-size: 11px; line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; }
.customer-signatures { padding: 22px 0; }
.customer-signatures > p { margin: 5px 0; color: var(--muted); font-size: 13px; }
.signature-grid { display: grid; margin-top: 18px; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
.signature-block { min-width: 0; }
.signature-image { display: flex; height: 100px; margin-bottom: 9px; align-items: center; border-bottom: 1px solid var(--line-strong); background: #fff; }
.signature-block strong, .signature-block > span { display: block; overflow-wrap: anywhere; }
.signature-block strong { font-size: 13px; }
.signature-block > span { margin-top: 3px; color: var(--muted); font-size: 11px; }
.signature-blank { display: block; width: 100%; height: 90px; }
.customer-sign-form { padding-top: 24px; border-top: 1px solid var(--line); }
.customer-sign-form > p { color: var(--muted); font-size: 13px; }
.customer-sign-form > label { display: block; margin: 18px 0 7px; font-size: 13px; font-weight: 650; }
.customer-valid { margin-top: 20px; padding: 13px 15px; border: 1px solid #43bf82; border-radius: 6px; background: rgba(67, 191, 130, .1); color: var(--text); font-size: 13px; }
.customer-neutral { max-width: 650px; margin: 100px auto; padding: 35px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.customer-neutral h1 { font-size: clamp(28px, 5vw, 42px); }
.customer-neutral p { color: var(--muted); }

@media (max-width: 860px) {
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .request-page { padding-top: 45px; padding-bottom: 55px; }
  .request-panel, .admin-login, .admin-detail { padding: 20px 17px; }
  .choice-grid, .package-options, .field-grid { grid-template-columns: 1fr; }
  .field-grid > :last-child:nth-child(odd) { grid-column: auto; }
  .request-step legend { font-size: 20px; }
  .request-summary { grid-template-columns: 1fr; }
  .request-summary dt { padding-bottom: 2px; border-bottom: 0; }
  .request-summary dd { padding-top: 2px; }
  .admin-content { padding-top: 35px; }
  .admin-heading { align-items: flex-start; }
  .admin-heading .button { min-height: 38px; padding-inline: 11px; }
  .stat-card { min-height: 80px; padding: 13px; }
  .stat-card span { font-size: 11px; }
  .stat-card strong { font-size: 22px; }
  .admin-filters { grid-template-columns: 1fr; gap: 7px; }
  .admin-table { min-width: 600px; }
  .detail-data { grid-template-columns: 1fr; }
  .detail-data dt { padding-bottom: 2px; border-bottom: 0; }
  .detail-data dd { padding-top: 2px; }
  .detail-heading { flex-direction: column; }
  .admin-actions .button { width: 100%; }
  .signature-grid { grid-template-columns: 1fr; gap: 22px; }
  .agb-content pre { padding: 17px; font-size: 12px; }
  .customer-contract { padding-top: 25px; padding-bottom: 55px; }
  .customer-contract-paper { padding: 19px 16px; }
  .customer-neutral { margin: 45px auto; padding: 24px 18px; }
}

/* Dashboard visual refresh */
.admin-page {
  --admin-radius: 10px;
  --admin-space: 8px;
  font-size: 15px;
}
.admin-sidebar {
  width: 248px;
  padding: 24px 14px 18px;
  background: var(--surface);
}
.admin-brand { margin: 0 8px 26px; font-size: 15px; }
.admin-nav { gap: 18px; }
.admin-nav-group { display: grid; gap: 3px; }
.admin-nav-heading {
  padding: 0 12px 4px;
  color: var(--subtle);
  font-size: 11px;
  font-weight: 600;
}
.admin-nav a, .admin-nav-action {
  min-height: 42px;
  padding-inline: 12px;
  gap: 11px;
  border-radius: 8px;
  font-size: 14px;
}
.admin-nav a[aria-current="page"] {
  position: relative;
  border-color: transparent;
  background: var(--surface-raised);
  color: var(--text);
}
.admin-nav a[aria-current="page"]::before {
  position: absolute;
  inset: 7px auto 7px -1px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--accent);
  content: "";
}
.admin-nav a b, .admin-nav a small {
  min-width: 22px;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--surface-raised);
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  text-align: center;
}
.admin-nav a b[data-count="anfragen"]:empty,
.admin-nav a b[data-count="vertraege"]:empty,
.admin-nav a b[data-count="anfragen"][data-zero="true"],
.admin-nav a b[data-count="vertraege"][data-zero="true"] { display: none; }
.admin-main {
  margin-left: 248px;
  padding: 30px clamp(24px, 3.4vw, 52px) 64px;
}
.admin-topbar {
  min-height: 58px;
  margin-bottom: 20px;
  gap: 18px;
}
.admin-page-heading { display: flex; min-width: 0; align-items: baseline; gap: 10px; }
.admin-page-heading [data-page-count] { color: var(--muted); font-size: 13px; white-space: nowrap; }
.admin-primary-actions { display: flex; flex: 0 0 auto; align-items: center; }
.admin-primary-actions .button { display: inline-flex; min-height: 40px; padding: 0 14px; align-items: center; gap: 7px; border-radius: 9px; font-size: 14px; }
.admin-primary-actions svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.admin-topbar h1 {
  margin: 0;
  font-size: clamp(26px, 2.4vw, 32px);
  font-weight: 680;
  letter-spacing: -.025em;
  line-height: 1.2;
}
.admin-kicker { display: none; }
.global-search { width: min(310px, 34vw); }
.global-search input, .admin-search input {
  min-height: 42px;
  border-color: var(--line);
  border-radius: var(--admin-radius);
  background: var(--surface);
  font-size: 14px;
}
.global-search input:focus, .admin-search input:focus {
  border-color: var(--accent);
  outline: 3px solid var(--accent-soft);
  outline-offset: 1px;
}
.density-toggle { width: 40px; height: 40px; }
.density-toggle svg { width: 18px; height: 18px; }
.admin-page-intro {
  min-height: 0;
  margin: 0 0 10px;
  justify-content: flex-end;
}
.admin-page-intro:empty { display: none; }
.admin-page-intro p { display: none; }
.admin-page-intro > button {
  border-color: var(--accent);
  background: var(--accent);
  color: #04282b;
}
.admin-page-intro > button:hover { border-color: #16c4c9; background: #16c4c9; color: #04282b; }
.admin-toolbar {
  min-height: 48px;
  margin-bottom: 12px;
  gap: 12px;
}
.admin-toolbar-actions { gap: 6px; }
.view-toggle, .status-tab { min-height: 38px; border-radius: 8px; font-size: 13px; }
.view-toggle[aria-pressed="true"] {
  border-color: var(--line-strong);
  background: var(--surface-raised);
  color: var(--text);
}
.admin-table-wrap {
  max-height: calc(100vh - 230px);
  min-height: 160px;
  border-color: var(--line);
  border-radius: var(--admin-radius);
  box-shadow: 0 2px 8px rgba(0, 0, 0, .04);
}
.admin-table { font-size: 14px; }
.admin-table th {
  padding: 13px 15px;
  background: var(--surface-raised);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}
.admin-table td {
  min-height: 56px;
  padding: 17px 15px;
  font-size: 14px;
  line-height: 1.45;
}
.admin-table td:first-child { font-weight: 600; }
.admin-table td:nth-child(2) { min-width: 0; }
.admin-table tbody tr { transition: background-color 160ms ease; }
.admin-table tbody tr:hover td { background: color-mix(in srgb, var(--accent-soft) 64%, transparent); }
.admin-table td:nth-last-child(1),
.admin-table td[data-numeric="true"] { font-variant-numeric: tabular-nums; }
.admin-page-panel[data-page="vertraege"] .admin-table td:nth-child(5),
.admin-page-panel[data-page="zahlungen"] .admin-table td:nth-child(3),
.admin-page-panel[data-page="zahlungen"] .admin-table td:nth-child(4),
.admin-page-panel[data-page="zahlungen"] .admin-table td:nth-child(5) {
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.admin-table .table-actions { justify-content: flex-end; }
.action-button { opacity: .68; transition: opacity 160ms ease, color 160ms ease, background 160ms ease; }
.admin-table tr:hover .action-button,
.admin-table tr:focus-within .action-button { opacity: 1; }
.admin-table .action-button.danger { color: var(--muted); }
.admin-table tr:hover .action-button.danger,
.admin-table tr:focus-within .action-button.danger { color: #d47d86; }
.status-chip {
  min-height: 25px;
  padding: 3px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-raised);
  color: var(--text);
  font-size: 12px;
  font-weight: 550;
}
.status-chip::before { width: 7px; height: 7px; flex: 0 0 auto; }
.status-chip[data-status="neu"] { border-color: rgba(91, 157, 224, .3); background: rgba(91, 157, 224, .12); }
.status-chip[data-status="neu"]::before { background: #6ea9e3; }
.status-chip[data-status="im_gespraech"] { border-color: rgba(220, 179, 84, .3); background: rgba(220, 179, 84, .12); }
.status-chip[data-status="im_gespraech"]::before { background: #dcb354; }
.status-chip[data-status="angebot"] { border-color: rgba(164, 129, 218, .32); background: rgba(164, 129, 218, .13); }
.status-chip[data-status="angebot"]::before { background: #a481da; }
.status-chip[data-status="vertrag"] { border-color: rgba(11, 175, 181, .3); background: var(--accent-soft); }
.status-chip[data-status="vertrag"]::before,
.status-chip[data-status="vom_auftragnehmer_unterschrieben"]::before { background: var(--accent); }
.status-chip[data-status="in_arbeit"] { border-color: rgba(218, 145, 75, .32); background: rgba(218, 145, 75, .13); }
.status-chip[data-status="in_arbeit"]::before { background: #da914b; }
.status-chip[data-status="fertig"], .status-chip[data-status="gueltig"] { border-color: rgba(75, 171, 120, .32); background: rgba(75, 171, 120, .13); }
.status-chip[data-status="fertig"]::before, .status-chip[data-status="gueltig"]::before { background: #4bab78; }
.status-chip[data-status="abgelehnt"] { border-color: var(--line-strong); background: var(--surface-raised); }
.status-chip[data-status="abgelehnt"]::before { background: #8793a3; }
.admin-page-panel[data-page="zahlungen"] .status-chip[data-status="offen"] { border-color: rgba(220, 179, 84, .3); background: rgba(220, 179, 84, .12); }
.admin-page-panel[data-page="zahlungen"] .status-chip[data-status="offen"]::before { background: #dcb354; }
.admin-page-panel[data-page="zahlungen"] .status-chip[data-status="anzahlung_erhalten"] { border-color: rgba(91, 157, 224, .3); background: rgba(91, 157, 224, .12); }
.admin-page-panel[data-page="zahlungen"] .status-chip[data-status="anzahlung_erhalten"]::before { background: #6ea9e3; }
.admin-page-panel[data-page="zahlungen"] .status-chip[data-status="bezahlt"] { border-color: rgba(75, 171, 120, .32); background: rgba(75, 171, 120, .13); }
.admin-page-panel[data-page="zahlungen"] .status-chip[data-status="bezahlt"]::before { background: #4bab78; }
.table-empty { padding: 40px 18px; font-size: 14px; }
.admin-drawer {
  width: min(560px, calc(100vw - 248px));
  background: var(--surface-raised);
  box-shadow: -16px 0 42px rgba(0, 0, 0, .2);
  transition: transform 180ms ease;
}
.admin-drawer-head {
  min-height: 78px;
  padding: 16px 20px;
  background: var(--surface);
}
.admin-drawer-head h2 { font-size: 21px; }
.admin-drawer-body { padding: 22px 24px 40px; }
.drawer-data dt, .drawer-data dd { font-size: 14px; }
.drawer-section-title { margin-top: 24px; font-size: 13px; font-weight: 650; }
.drawer-actions { position: sticky; bottom: -40px; z-index: 3; margin: 20px -24px -40px; padding: 13px 24px; border-top: 1px solid var(--line); background: var(--surface); }
.field-label { font-size: 13px; }
.field-label input, .field-label select, .field-label textarea,
.drawer-form input, .drawer-form select, .drawer-form textarea {
  min-height: 44px;
  border-radius: 8px;
  font-size: 15px;
}
.payment-totals { display: grid; margin: 0 0 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.payment-totals > * {
  min-height: 82px;
  padding: 17px 19px;
  align-content: center;
  border: 1px solid var(--line);
  border-radius: var(--admin-radius);
  background: var(--surface);
  color: var(--muted);
  font-size: 13px;
}
.payment-totals strong { color: var(--text); font-size: 21px; font-variant-numeric: tabular-nums; }
.template-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.template-row { padding: 18px; border-radius: var(--admin-radius); background: var(--surface); transition: border-color 160ms ease, box-shadow 160ms ease; }
.template-row:hover { border-color: var(--line-strong); box-shadow: 0 5px 16px rgba(0, 0, 0, .08); }
.template-row p { font-size: 14px; }
.settings-form {
  max-width: 900px;
  padding: 0;
  border: 0;
  background: transparent;
  gap: 12px;
}
.settings-section {
  display: grid;
  padding: 18px;
  grid-column: 1 / -1;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 16px;
  border: 1px solid var(--line);
  border-radius: var(--admin-radius);
  background: var(--surface);
}
.settings-section > h2 {
  margin: 0 0 2px;
  grid-column: 1 / -1;
  color: var(--text);
  font-size: 15px;
}
.export-actions { max-width: 900px; margin-top: 18px; padding: 20px; border: 1px solid var(--line); border-radius: var(--admin-radius); background: var(--surface); }
.admin-sidebar-bottom .theme-toggle, .admin-nav-action { font-size: 14px; }
.admin-page :is(button, a, input, select, textarea):focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 70%, white);
  outline-offset: 3px;
}
@media (max-width: 900px) {
  .admin-main { margin-left: 220px; padding-inline: 22px; }
  .admin-sidebar { width: 220px; }
  .admin-drawer { width: min(560px, calc(100vw - 220px)); }
  .template-list { grid-template-columns: 1fr; }
  .global-search { width: min(260px, 29vw); }
}
@media (max-width: 680px) {
  .admin-sidebar { width: 280px; max-width: calc(100vw - 54px); }
  .admin-main { margin-left: 0; padding: 14px 16px 42px; }
  .admin-topbar {
    display: grid;
    min-height: 0;
    margin-bottom: 16px;
    grid-template-columns: 40px minmax(0, 1fr) auto 40px;
    grid-template-areas: "menu title action density" "menu search search search";
    align-items: center;
    gap: 8px;
  }
  .admin-menu-toggle { display: inline-grid; width: 40px; height: 40px; flex: 0 0 auto; place-items: center; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); color: var(--text); }
  .admin-menu-toggle { grid-area: menu; }
  .admin-page-heading { flex: 1; }
  .admin-page-heading { grid-area: title; align-items: flex-start; flex-direction: column; gap: 1px; }
  .admin-page-heading [data-page-count] { font-size: 11px; }
  .admin-topbar h1 { font-size: 23px; }
  .admin-primary-actions { grid-area: action; }
  .admin-primary-actions .button { min-height: 38px; padding-inline: 10px; }
  .global-search { width: 100%; grid-area: search; }
  .global-search input { width: 100%; padding-inline: 11px; font-size: 13px; }
  .density-toggle { width: 38px; height: 38px; grid-area: density; }
  .admin-page-intro { margin-bottom: 8px; }
  .admin-toolbar { min-height: 0; align-items: stretch; flex-direction: column; gap: 9px; }
  .admin-toolbar > .admin-search { width: 100%; }
  .admin-toolbar-actions { align-self: flex-end; }
  .status-tabs { width: 100%; }
  .admin-table-wrap {
    max-height: none;
    min-height: 0;
    overflow: visible;
    border: 0;
    background: transparent;
    box-shadow: none;
  }
  .admin-table { display: block; min-width: 0; }
  .admin-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); clip-path: inset(50%); }
  .admin-table tbody { display: grid; gap: 10px; }
  .admin-table tbody tr {
    display: grid;
    padding: 8px 12px;
    border: 1px solid var(--line);
    border-radius: var(--admin-radius);
    background: var(--surface);
    box-shadow: 0 2px 6px rgba(0, 0, 0, .035);
  }
  .admin-table td {
    display: flex;
    min-width: 0;
    min-height: 0;
    padding: 7px 2px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid var(--line);
    font-size: 14px;
    text-align: right;
  }
  .admin-table td::before {
    flex: 0 0 auto;
    color: var(--muted);
    font-size: 12px;
    font-weight: 500;
    text-align: left;
  }
  .admin-table td:last-child { border-bottom: 0; }
  .admin-table td:nth-child(1)::before { content: "Auswahl"; }
  .admin-page-panel[data-page="anfragen"] .admin-table td:nth-child(2)::before,
  .admin-page-panel[data-page="vertraege"] .admin-table td:nth-child(2)::before,
  .admin-page-panel[data-page="kontaktbuch"] .admin-table td:nth-child(2)::before { content: "Nummer"; }
  .admin-page-panel[data-page="anfragen"] .admin-table td:nth-child(3)::before,
  .admin-page-panel[data-page="vertraege"] .admin-table td:nth-child(3)::before,
  .admin-page-panel[data-page="kontaktbuch"] .admin-table td:nth-child(4)::before { content: "Name"; }
  .admin-page-panel[data-page="anfragen"] .admin-table td:nth-child(4)::before { content: "Paket"; }
  .admin-page-panel[data-page="anfragen"] .admin-table td:nth-child(5)::before { content: "Datum"; }
  .admin-page-panel[data-page="anfragen"] .admin-table td:nth-child(6)::before { content: "Status"; }
  .admin-page-panel[data-page="vertraege"] .admin-table td:nth-child(4)::before { content: "Gegenstand"; }
  .admin-page-panel[data-page="vertraege"] .admin-table td:nth-child(5)::before { content: "Preis"; }
  .admin-page-panel[data-page="vertraege"] .admin-table td:nth-child(6)::before { content: "Status"; }
  .admin-page-panel[data-page="vertraege"] .admin-table td:nth-child(7)::before { content: "Datum"; }
  .admin-page-panel[data-page="kontaktbuch"] .admin-table td:nth-child(1)::before { content: "Auswahl"; }
  .admin-page-panel[data-page="kontaktbuch"] .admin-table td:nth-child(2)::before { content: "Kunden-ID"; }
  .admin-page-panel[data-page="kontaktbuch"] .admin-table td:nth-child(3)::before { content: "Verträge"; }
  .admin-page-panel[data-page="kontaktbuch"] .admin-table td:nth-child(5)::before { content: "Telefon"; }
  .admin-page-panel[data-page="kontaktbuch"] .admin-table td:nth-child(6)::before { content: "Personalausweisnummer"; }
  .admin-page-panel[data-page="kontaktbuch"] .admin-table td:nth-child(7)::before { content: "Kontonummer"; }
  .admin-page-panel[data-page="zahlungen"] .admin-table td:nth-child(1)::before { content: "Vertrag"; }
  .admin-page-panel[data-page="zahlungen"] .admin-table td:nth-child(2)::before { content: "Kunde"; }
  .admin-page-panel[data-page="zahlungen"] .admin-table td:nth-child(3)::before { content: "Preis"; }
  .admin-page-panel[data-page="zahlungen"] .admin-table td:nth-child(4)::before { content: "Anzahlung"; }
  .admin-page-panel[data-page="zahlungen"] .admin-table td:nth-child(5)::before { content: "Rest"; }
  .admin-page-panel[data-page="zahlungen"] .admin-table td:nth-child(6)::before { content: "Status"; }
  .admin-page-panel[data-page="schwarze-liste"] .admin-table td:nth-child(1)::before { content: "ID"; }
  .admin-page-panel[data-page="schwarze-liste"] .admin-table td:nth-child(2)::before { content: "Name"; }
  .admin-page-panel[data-page="schwarze-liste"] .admin-table td:nth-child(3)::before { content: "Telefon"; }
  .admin-page-panel[data-page="schwarze-liste"] .admin-table td:nth-child(4)::before { content: "Personalausweisnummer"; }
  .admin-page-panel[data-page="schwarze-liste"] .admin-table td:nth-child(5)::before { content: "Grund"; }
  .admin-page-panel[data-page="schwarze-liste"] .admin-table td:nth-child(6)::before { content: "Datum"; }
  .admin-page-panel[data-page="papierkorb"] .admin-table td:nth-child(1)::before { content: "Bereich"; }
  .admin-page-panel[data-page="papierkorb"] .admin-table td:nth-child(2)::before { content: "Eintrag"; }
  .admin-page-panel[data-page="papierkorb"] .admin-table td:nth-child(3)::before { content: "Zusatz"; }
  .admin-page-panel[data-page="papierkorb"] .admin-table td:nth-child(4)::before { content: "Gelöscht am"; }
  .admin-table .table-actions { min-width: 0; justify-content: flex-end; }
  .action-button { opacity: 1; }
  .admin-drawer { z-index: 42; inset: 0; width: 100%; border-left: 0; }
  .admin-drawer-head { min-height: 70px; padding-inline: 15px; }
  .admin-drawer-body { padding: 18px 16px 36px; }
  .drawer-actions { bottom: -36px; margin: 20px -16px -36px; padding: 12px 16px; }
  .drawer-data { grid-template-columns: minmax(92px, .7fr) minmax(0, 1.3fr); }
  .payment-totals { gap: 8px; }
  .payment-totals > * { min-height: 74px; padding: 12px; }
  .settings-form { grid-template-columns: 1fr; }
  .settings-section { grid-template-columns: 1fr; padding: 14px; }
  .settings-section > h2 { grid-column: auto; }
  .export-actions { display: grid; gap: 8px; padding: 15px; }
}
@media (prefers-reduced-motion: reduce) {
  .admin-page *, .admin-page *::before, .admin-page *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
