/* ============================================================
   FUMOT — Unternehmens-, Service- und Kontoseiten
   Rechtliches, Kontakt, Über uns, Login, Konto, Kasse, Bestellung
   ============================================================ */

/* ============================================================
   Legal page
   ============================================================ */
.legal { padding-top: 140px; }
.legal__grid { display: grid; grid-template-columns: 250px minmax(0,1fr); gap: clamp(30px,5vw,72px); align-items: start; }
.legal__nav { position: sticky; top: 116px; display: grid; gap: 3px; }
.legal__nav a {
  padding: 11px 16px; border-radius: 12px; font-size: .9rem; color: var(--muted);
  transition: all var(--dur-fast) var(--ease); display: flex; justify-content: space-between; gap: 10px;
}
.legal__nav a span { font-family: var(--font-mono); font-size: 10px; color: var(--muted-2); }
.legal__nav a:hover, .legal__nav a.is-active { background: var(--blue-tint); color: var(--blue); }
.legal__nav a.is-active span { color: var(--blue); }
.legal__doc h2 { font-size: clamp(1.5rem,2.6vw,2.1rem); margin-bottom: 8px; }
.legal__doc .upd { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .13em; text-transform: uppercase; color: var(--muted-2); margin-bottom: 28px; }
.legal__doc section { padding-block: 34px; border-top: 1px solid var(--line); }
.legal__doc h3 { font-size: 1.12rem; margin-bottom: 12px; }
.legal__doc p, .legal__doc li { color: var(--ink-2); font-weight: 300; font-size: .95rem; }
.legal__doc ul { display: grid; gap: 9px; margin-top: 12px; }
.legal__doc li { padding-left: 20px; position: relative; }
.legal__doc li::before { content: ""; position: absolute; left: 4px; top: 10px; width: 5px; height: 5px; border-radius: 50%; background: var(--blue); }

/* ============================================================
   Contact
   ============================================================ */
.contact__grid { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1.05fr); gap: clamp(32px,5vw,72px); align-items: start; }
.field { display: grid; gap: 8px; margin-bottom: 18px; }
.field label { font-family: var(--font-mono); font-size: 10px; letter-spacing: .15em; text-transform: uppercase; color: var(--muted-2); }
.field input, .field textarea, .field select {
  font: inherit; font-size: .95rem;
  padding: 15px 18px; border-radius: var(--r-inner);
  border: 1px solid var(--line-2); background: #fff; color: var(--ink);
  transition: border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
  font-family: var(--font-body);
  /* Gitterraster-Kinder dürfen schmaler als ihr Inhalt werden. Ein
     Auswahlfeld richtet sich sonst nach dem längsten Eintrag und reißt
     das Panel auf — auf dem Telefon gute 40px zu breit. */
  min-width: 0;
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px rgba(25,100,173,.1);
}
.field textarea { min-height: 140px; resize: vertical; }
/* ============================================================
   About
   ============================================================ */
.timeline { display: grid; gap: 0; }
.timeline__row { display: grid; grid-template-columns: 120px 1fr; gap: clamp(18px,3vw,42px); padding-block: 26px; border-top: 1px solid var(--line); }
.timeline__y { font-family: var(--font-mono); font-size: .95rem; color: var(--blue); letter-spacing: .04em; }
.timeline__b h4 { font-family: var(--font-display); font-size: 1.06rem; font-weight: 600; margin-bottom: 7px; }
.timeline__b p { color: var(--muted); font-weight: 300; font-size: .94rem; }

/* --- Kopfbereich: Text + Belegbild --- */
.about-head { padding-bottom: clamp(22px, 3vw, 40px); }
.about-head__grid { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,.62fr); gap: clamp(26px,4vw,60px); align-items: center; }
.about-head__text { max-width: 780px; }
.about-meta {
  display: flex; flex-wrap: wrap; gap: 6px 20px; margin-top: 26px;
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .1em;
  text-transform: uppercase; color: var(--muted-2);
}
.about-fig { margin: 0; }
.about-fig img {
  display: block; width: 100%; height: auto;
  border-radius: var(--r-shell); background: var(--surface-2); object-fit: cover;
}
.about-fig--hero img { aspect-ratio: 3 / 2; }
.about-fig figcaption { margin-top: 12px; font-size: .8rem; color: var(--muted); font-weight: 300; line-height: 1.5; }

/* --- Fließtext (Über uns) --- */
.prose { max-width: 900px; }
.prose p { color: var(--ink-2); font-weight: 300; font-size: 1rem; line-height: 1.72; }
.prose p + p { margin-top: 16px; }
.prose strong { font-weight: 600; color: var(--ink); }
.prose a { color: var(--blue); text-decoration: none; border-bottom: 1px solid rgba(25,100,173,.28); }
.prose a:hover { border-bottom-color: var(--blue); }
.prose em { font-style: italic; }
.about-sub { margin: clamp(30px,4vw,46px) 0 18px; }

/* --- Entitätstabelle (Marke, Rollen, Prüfschritte) --- */
.tblwrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin-top: clamp(26px,3.4vw,40px); }
.entable { width: 100%; min-width: 640px; border-collapse: collapse; font-size: .92rem; }
.entable__cap {
  caption-side: top; text-align: left; padding-bottom: 14px;
  font-family: var(--font-mono); font-size: 10px; letter-spacing: .16em;
  text-transform: uppercase; color: var(--muted-2);
}
.entable th, .entable td { text-align: left; padding: 16px 18px; vertical-align: top; line-height: 1.6; }
.entable thead th {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--muted-2); font-weight: 500; border-bottom: 1px solid var(--line-2); white-space: nowrap;
}
.entable tbody th { font-family: var(--font-display); font-weight: 600; font-size: .95rem; color: var(--ink); width: 24%; }
.entable tbody th em { font-weight: 400; }
.entable tbody td { color: var(--muted); font-weight: 300; }
.entable tbody td a { color: var(--blue); text-decoration: none; }
.entable tbody td a:hover { text-decoration: underline; }
.entable tbody tr { border-bottom: 1px solid var(--line); transition: background-color var(--dur-fast) var(--ease); }
.entable tbody tr:hover { background: var(--blue-tint-2); }

/* --- Unternehmensdaten --- */
.datagrid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 0 clamp(20px,3vw,48px); margin-top: clamp(26px,3.4vw,40px); }
.datarow { display: grid; grid-template-columns: 168px minmax(0,1fr); gap: 14px; padding: 15px 0; border-top: 1px solid var(--line); }
.datarow dt { font-family: var(--font-mono); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted-2); padding-top: 3px; }
.datarow dd { margin: 0; font-size: .94rem; color: var(--ink-2); font-weight: 400; line-height: 1.55; }
.datarow dd a { color: var(--blue); text-decoration: none; }
.datarow dd a:hover { text-decoration: underline; }

/* --- Bildergalerie (Lager & Großhandel) --- */
.gallery { display: grid; grid-template-columns: repeat(6, minmax(0,1fr)); gap: clamp(10px,1.4vw,18px); }
.gallery__item { grid-column: span 2; margin: 0; }
.gallery__item:nth-child(4), .gallery__item:nth-child(5) { grid-column: span 3; }
/* height:auto nötig — sonst gewinnt das height-Attribut gegen aspect-ratio */
.gallery__item img {
  display: block; width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: cover;
  border-radius: var(--r-card); background: var(--surface-2);
}
.gallery__item figcaption { margin-top: 10px; font-size: .8rem; color: var(--muted); font-weight: 300; line-height: 1.5; }

/* --- Zertifikatskarten --- */
.certgrid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: clamp(14px,2vw,24px); }
.certcard { margin: 0; display: flex; flex-direction: column; }
/* Komplette Bescheinigung zeigen: 3:4 entspricht dem Scan-Format (750×1000).
   Kein border-radius — die Bescheinigungen sind gescannte Dokumente, eine
   Rundung würde den Rand/Text des Schriftstücks abschneiden (alle Viewports).
   Der sehr weiche Schatten ersetzt die Rundung: das weiße Blatt bleibt so
   auch auf weißem Seitenhintergrund als Blatt erkennbar. */
.certcard__img {
  display: block; overflow: hidden;
  background: #fff;
  box-shadow: 0 6px 18px rgba(15,23,42,.10);
  transition: box-shadow var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
}
.certcard__img img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 4; object-fit: contain; object-position: center; }
.certcard__img:hover { transform: translateY(-3px); box-shadow: 0 16px 36px rgba(15,23,42,.13); }
.certcard figcaption { padding-top: 16px; }
.certcard figcaption .h-3 { margin-bottom: 6px; }
.certcard__no { font-family: var(--font-mono); font-size: 10px; letter-spacing: .1em; color: var(--blue); margin-bottom: 8px; }
.certcard figcaption .muted { font-size: .82rem; font-weight: 300; line-height: 1.55; }

/* --- Über uns: responsive --- */
@media (max-width: 1080px) {
  .about-head__grid { grid-template-columns: 1fr; gap: 30px; }
  .about-fig--hero { max-width: 520px; }
  .certgrid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 900px) {
  .datagrid { grid-template-columns: 1fr; }
  .datarow { grid-template-columns: 140px minmax(0,1fr); }
  .entable { min-width: 560px; }
  .entable th, .entable td { padding: 13px 14px; }
}
@media (max-width: 720px) {
  .gallery__item, .gallery__item:nth-child(4), .gallery__item:nth-child(5) { grid-column: span 3; }
  .about-fig--hero img { aspect-ratio: 4 / 3; }
  .entable { min-width: 520px; }
}
@media (max-width: 520px) {
  .datarow { grid-template-columns: 1fr; gap: 5px; }
  .gallery__item, .gallery__item:nth-child(4), .gallery__item:nth-child(5) { grid-column: span 6; }
  .about-meta { font-size: 10px; }
}

/* ============================================================
   Mobile: Werte-Bento, Großhandel-Galerie und Zertifikate
   als horizontale Rail (statt vertikalem Stapel)
   — identische Mechanik wie .pgrid--rail, damit sich die
     Tracks überall gleich anfühlen (siehe components.css)
   ============================================================ */
@media (max-width: 900px) {
  .bento--rail, .gallery, .certgrid {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    overflow-y: hidden;          /* Y-Achse sperren: sonst schluckt der Track vertikale Gesten */
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
    scroll-padding-left: var(--gutter);   /* erste Karte bleibt auf dem gutter (10px) stehen */
    padding: 3px var(--gutter) 18px;
    margin-inline: calc(var(--gutter) * -1);
    scrollbar-width: none;
    touch-action: pan-x;
  }
  .bento--rail::-webkit-scrollbar, .gallery::-webkit-scrollbar, .certgrid::-webkit-scrollbar { display: none; }
  .bento--rail > *, .gallery > *, .certgrid > * { flex: 0 0 min(74%, 288px); min-width: 0; scroll-snap-align: start; }
  /* Bescheinigungen sind Hochformat-Dokumente: gleiche Kartenbreite wie die
     übrigen Rails, aber festes 3:4-Verhältnis — sonst wird der Scan beschnitten */
  .certgrid .certcard__img { border-radius: 0; }
  .certgrid .certcard__img img { aspect-ratio: 3 / 4; }
  /* Rail-Karten dürfen nicht unterschiedlich hoch enden */
  .bento--rail > *, .gallery > *, .certgrid > * { align-self: stretch; }
  .bento--rail .tile { height: 100%; }
  /* reveal ohne Y-Versatz: der Track ist auf overflow-y:hidden, ein nach unten
     verschobener Karte-Start würde also abgeschnitten ("Bild verdeckt") */
  .bento--rail .reveal, .gallery .reveal, .certgrid .reveal { transform: none; }
  .section--ink .railhint { color: rgba(255,255,255,.55); }
}
@media (max-width: 520px) {
  .bento--rail > *, .gallery > * { flex-basis: min(84%, 272px); }
}

/* ============================================================
   Auth (Login / Registrieren / Passwort) + Konto-Dashboard
   ============================================================ */
.auth {
  display: grid; grid-template-columns: 1.05fr 1fr;
  min-height: 100vh;
}
.auth__aside {
  position: relative; overflow: hidden;
  background: radial-gradient(120% 120% at 20% 0%, #1C4F86 0%, var(--ink) 60%);
  color: #fff; padding: clamp(36px, 5vw, 64px);
  display: flex; flex-direction: column; justify-content: space-between;
}
.auth__aside::after {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(40% 30% at 80% 20%, rgba(255,105,0,.35), transparent 70%),
    radial-gradient(50% 40% at 10% 90%, rgba(25,100,173,.45), transparent 70%);
  mix-blend-mode: screen; pointer-events: none;
}
.auth__aside > * { position: relative; z-index: 1; }
.auth__brand { display: flex; align-items: center; gap: 12px; font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; }
.auth__brand img { height: 38px; width: auto; filter: brightness(0) invert(1); }
.auth__illu { max-width: 360px; }
.auth__illu h2 { font-size: clamp(1.6rem, 2.6vw, 2.3rem); line-height: 1.15; letter-spacing: -.02em; margin-bottom: 16px; }
.auth__illu p { color: rgba(255,255,255,.72); font-weight: 300; font-size: .98rem; line-height: 1.6; }
.auth__points { list-style: none; display: grid; gap: 14px; margin-top: 28px; }
.auth__points li { display: grid; grid-template-columns: 24px 1fr; gap: 12px; align-items: center; color: rgba(255,255,255,.86); font-size: .92rem; }
.auth__points svg { width: 18px; height: 18px; color: var(--accent); }
.auth__foot { font-size: .8rem; color: rgba(255,255,255,.5); }

.auth__main { display: grid; place-items: safe center; align-items: safe center; padding: clamp(28px, 4vw, 56px); background: var(--surface); }
.auth__card { width: min(440px, 100%); }
.auth__card .eyebrow { margin-bottom: 12px; }
.auth__title { font-family: var(--font-display); font-size: clamp(1.7rem, 3vw, 2.1rem); font-weight: 600; letter-spacing: -.02em; margin-bottom: 8px; }
.auth__sub { color: var(--muted); font-weight: 300; font-size: .96rem; margin-bottom: 28px; line-height: 1.55; }
.auth__sub a { color: var(--blue); text-decoration: none; }
.auth__sub a:hover { text-decoration: underline; }
.auth__back { display: inline-flex; align-items: center; gap: 7px; font-size: .85rem; color: var(--muted); text-decoration: none; margin-bottom: 22px; }
.auth__back svg { width: 15px; height: 15px; }
.auth__back:hover { color: var(--blue); }
.auth__switch { text-align: center; margin-top: 22px; font-size: .9rem; color: var(--muted); }
.auth__switch a { color: var(--blue); text-decoration: none; font-weight: 500; }
.auth__switch a:hover { text-decoration: underline; }
.auth__or { display: flex; align-items: center; gap: 14px; color: var(--muted-2); font-size: .78rem; margin: 22px 0; }
.auth__or::before, .auth__or::after { content: ""; height: 1px; background: var(--line); flex: 1; }
.checkrow { display: flex; align-items: flex-start; gap: 11px; margin: 4px 0 18px; font-size: .88rem; color: var(--muted); line-height: 1.5; }
.checkrow input { margin-top: 3px; width: 17px; height: 17px; accent-color: var(--blue); flex: none; }
.checkrow a { color: var(--blue); text-decoration: none; }
.checkrow a:hover { text-decoration: underline; }
.pwbar { height: 6px; border-radius: 99px; background: var(--line); overflow: hidden; margin-top: 6px; }
.pwbar > i { display: block; height: 100%; width: 0; border-radius: 99px; transition: width .3s var(--ease), background-color .3s var(--ease); }
.pwbar[data-lvl="1"] > i { width: 30%; background: #E5484D; }
.pwbar[data-lvl="2"] > i { width: 60%; background: #F5A623; }
.pwbar[data-lvl="3"] > i { width: 100%; background: var(--success); }
.pwhint { font-size: .76rem; color: var(--muted-2); margin-top: 6px; }
.note { font-size: .85rem; border-radius: var(--r-inner); padding: 12px 14px; line-height: 1.45; margin-bottom: 16px; }
.note--err { color: #C0392B; background: #FCEBEA; border: 1px solid rgba(192,57,43,.25); }
.note--ok { color: var(--success); background: var(--success-tint); border: 1px solid rgba(18,128,92,.25); }
.note--info { color: var(--blue-700); background: var(--blue-tint); border: 1px solid rgba(25,100,173,.22); }
.dob-row { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 12px; }

/* ---------------- Konto-Dashboard ---------------- */
.dash { display: grid; grid-template-columns: 268px 1fr; gap: clamp(20px, 2.6vw, 38px); align-items: start; }
.dash__side {
  position: sticky; top: 100px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-shell);
  padding: 12px; box-shadow: var(--sh-2);
  /* Pflicht: Gitterraster-Kinder sind standardmäßig mindestens so breit wie
     ihr Inhalt. Ohne dieses min-width riss die unten zur Wischleiste
     umgebaute Navigation die ganze Seite auf über 1000px auf. */
  min-width: 0;
}
.dash__profile { display: grid; grid-template-columns: 46px 1fr; gap: 12px; align-items: center; padding: 14px; border-bottom: 1px solid var(--line); margin-bottom: 10px; }
.dash__av { width: 46px; height: 46px; border-radius: 50%; background: var(--blue); color: #fff; display: grid; place-items: center; font-family: var(--font-display); font-weight: 600; font-size: 1rem; }
.dash__name { font-family: var(--font-display); font-weight: 600; font-size: .98rem; color: var(--ink); }
.dash__mail { font-size: .76rem; color: var(--muted); margin-top: 2px; word-break: break-all; }
.dash__nav { display: grid; gap: 3px; }
.dash__nav a { display: flex; align-items: center; gap: 11px; padding: 11px 13px; border-radius: var(--r-inner); color: var(--ink-2); font-size: .9rem; text-decoration: none; transition: background-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease); }
.dash__nav a svg { width: 17px; height: 17px; opacity: .75; }
.dash__nav a:hover { background: var(--surface); }
.dash__nav a.is-active { background: var(--blue-tint); color: var(--blue-700); font-weight: 500; }
.dash__nav a.is-active svg { opacity: 1; color: var(--blue); }
.dash__nav .dash__out { color: var(--muted); border-top: 1px solid var(--line); margin-top: 8px; padding-top: 14px; }

.dash__main { min-width: 0; }
.dash__panel { display: none; }
.dash__panel.is-active { display: block; animation: fadeUp .35s var(--ease) both; }
.dash__h { font-family: var(--font-display); font-size: clamp(1.4rem, 2.4vw, 1.85rem); font-weight: 600; letter-spacing: -.02em; margin-bottom: 4px; }
.dash__lead { color: var(--muted); font-weight: 300; font-size: .94rem; margin-bottom: 26px; }

.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 28px; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: var(--r-core); padding: 20px; }
.kpi .n { font-family: var(--font-display); font-size: 1.8rem; font-weight: 600; color: var(--blue); letter-spacing: -.02em; }
.kpi .l { font-size: .82rem; color: var(--muted); margin-top: 4px; }
.kpi .ico { width: 34px; height: 34px; border-radius: 11px; background: var(--blue-tint); color: var(--blue); display: grid; place-items: center; margin-bottom: 14px; }
.kpi .ico svg { width: 18px; height: 18px; }

.card-box { background: #fff; border: 1px solid var(--line); border-radius: var(--r-core); padding: clamp(20px, 2.4vw, 30px); margin-bottom: 20px; }
.card-box__h { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 18px; }
.card-box__h h3 { font-family: var(--font-display); font-size: 1.1rem; font-weight: 600; }
.card-box__h .muted { font-size: .82rem; }

/* Bestellkarten */
.ordercard { border: 1px solid var(--line); border-radius: var(--r-core); padding: 20px; margin-bottom: 16px; transition: border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease); }
.ordercard:hover { border-color: var(--blue-200, #Bcd); box-shadow: var(--sh-2); }
.ordercard__top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.ordercard__nr { font-family: var(--font-mono); font-size: .95rem; color: var(--ink); }
.ordercard__date { font-size: .8rem; color: var(--muted); margin-top: 3px; }
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: .76rem; font-weight: 500; padding: 5px 11px; border-radius: var(--r-pill); background: var(--blue-tint); color: var(--blue-700); }
.badge--ok { background: var(--success-tint); color: var(--success); }
.badge--warn { background: var(--accent-tint); color: var(--accent-ink); }
.badge--off { background: var(--surface-2); color: var(--muted); }
.order-items { display: grid; gap: 12px; }
.order-item { display: grid; grid-template-columns: 52px 1fr auto; gap: 14px; align-items: center; }
.order-item img { width: 52px; height: 52px; border-radius: 12px; object-fit: contain; background: var(--surface); border: 1px solid var(--line); }
.order-item .t { font-weight: 500; font-size: .92rem; color: var(--ink); }
.order-item .s { font-size: .8rem; color: var(--muted); margin-top: 2px; }
.order-item .p { font-weight: 600; font-size: .9rem; color: var(--ink); }
.ordercard__foot { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.ordercard__total { font-size: .82rem; color: var(--muted); }
.ordercard__total b { color: var(--ink); font-family: var(--font-display); font-size: 1.05rem; }

/* Tracking-Timeline */
.track { list-style: none; display: grid; gap: 0; margin: 6px 0 4px; }
.track__row { display: grid; grid-template-columns: 34px 1fr; gap: 16px; position: relative; padding-bottom: 26px; }
.track__row:last-child { padding-bottom: 0; }
.track__row::before { content: ""; position: absolute; left: 16px; top: 26px; bottom: -2px; width: 2px; background: var(--line); }
.track__row:last-child::before { display: none; }
.track__dot { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: var(--muted); position: relative; z-index: 1; }
.track__dot svg { width: 17px; height: 17px; }
.track__row.is-done .track__dot { background: var(--blue); color: #fff; }
.track__row.is-done::before { background: var(--blue); }
.track__row.is-last.is-done .track__dot { background: var(--success); }
.track__lbl { font-weight: 500; font-size: .92rem; color: var(--ink); }
.track__row:not(.is-done) .track__lbl { color: var(--muted); }
.track__date { font-size: .78rem; color: var(--muted); margin-top: 3px; }

/* Adresskarten */
.addr-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 14px; }
.addr { border: 1px solid var(--line); border-radius: var(--r-core); padding: 18px; position: relative; }
.addr--add { border-style: dashed; display: grid; place-items: center; color: var(--muted); text-decoration: none; min-height: 120px; font-size: .9rem; gap: 8px; text-align: center; }
.addr--add:hover { border-color: var(--blue); color: var(--blue); }
.addr--add svg { width: 22px; height: 22px; }
.addr .nm { font-weight: 600; font-size: .95rem; color: var(--ink); }
.addr .ln { font-size: .86rem; color: var(--muted); line-height: 1.5; margin-top: 6px; }
.addr__edit { position: absolute; top: 14px; right: 14px; font-size: .8rem; color: var(--blue); text-decoration: none; }
.addr__edit:hover { text-decoration: underline; }
/* Typ-Label (Rechnungsadresse / Lieferadresse) als ruhiger Tag oben links */
.addr__kind {
  display: inline-block; font-size: .72rem; font-weight: 600; letter-spacing: .03em;
  text-transform: uppercase; color: var(--blue-700); background: var(--blue-tint);
  padding: 4px 10px; border-radius: var(--r-pill); margin-bottom: 12px;
}
.addr__acts { margin-top: 14px; }

/* Werkzeugleiste über der Bestellliste: Suche + Statusfilter */
.dtools { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 20px; }
.dtools__search { position: relative; flex: 1 1 220px; min-width: 170px; }
.dtools__search input {
  width: 100%; padding: 10px 14px 10px 38px;
  border: 1px solid var(--line-2); border-radius: var(--r-inner);
  font-family: inherit; font-size: .88rem; color: var(--ink); background: #fff;
}
.dtools__search input:focus { outline: none; border-color: var(--blue); }
.dtools__search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--muted); pointer-events: none; }
.dtools__count { font-size: .82rem; color: var(--muted); }

/* Segment-Umschalter */
.seg { display: flex; gap: 3px; padding: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-pill); }
.seg__btn {
  border: 0; background: none; font-family: inherit; font-size: .82rem; color: var(--muted);
  padding: 7px 14px; border-radius: var(--r-pill); cursor: pointer;
  transition: background-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.seg__btn:hover { color: var(--ink); }
.seg__btn.is-on { background: #fff; color: var(--blue); font-weight: 500; box-shadow: var(--sh-1); }

/* Aktionsleiste einer Bestellkarte */
.ordercard__acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.ordercard__acts .btn { border-color: var(--line-3); }

/* Bestätigungs-Karte (E-Mail) */
.verify { display: grid; grid-template-columns: 44px 1fr; gap: 16px; align-items: start; }
.verify__ic { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; background: var(--blue-tint); color: var(--blue); }
.verify__ic svg { width: 22px; height: 22px; }
.verify--warn .verify__ic { background: var(--accent-tint); color: var(--accent-ink); }
.verify--ok .verify__ic { background: var(--success-tint); color: var(--success); }
.verify__t { font-family: var(--font-display); font-weight: 600; font-size: 1.02rem; color: var(--ink); }
.verify__d { font-size: .86rem; color: var(--muted); line-height: 1.55; margin-top: 5px; }
.verify__act { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.verify__form { display: grid; gap: 14px; margin-top: 16px; }

/* Sechsstelliger Code: weite Laufweite, damit man ihn gut abliest */
.codein { letter-spacing: .4em; text-align: center; font-family: var(--font-mono); font-size: 1.05rem; }
.codein::placeholder { letter-spacing: normal; }

/* Schlüssel-Wert-Liste (Kontodaten) */
.kv { display: grid; }
.kv__row { display: flex; justify-content: space-between; gap: 14px; padding: 11px 0; border-top: 1px solid var(--line); font-size: .88rem; }
.kv__row:first-child { border-top: 0; }
.kv__row .k { color: var(--muted); flex: none; }
.kv__row .v { color: var(--ink); font-weight: 500; text-align: right; word-break: break-all; }

/* Leerzustand im Panel */
.dempty { text-align: center; padding: 30px 20px; color: var(--muted); font-size: .9rem; }
.dempty svg { width: 34px; height: 34px; color: var(--line-3); margin-bottom: 12px; }

/* Panel-Hinweis (z. B. „E-Mail noch nicht bestätigt“) */
.dnote { display: flex; gap: 12px; align-items: flex-start; padding: 13px 16px; border-radius: var(--r-inner); font-size: .87rem; line-height: 1.5; margin-bottom: 20px; }
.dnote svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.dnote--warn { background: var(--accent-tint); color: var(--accent-ink); border: 1px solid rgba(194,65,12,.2); }
.dnote--ok { background: var(--success-tint); color: var(--success); border: 1px solid rgba(15,110,78,.22); }
.dnote--info { background: var(--blue-tint); color: var(--blue-700); border: 1px solid rgba(25,100,173,.2); }
.dnote a { color: inherit; font-weight: 500; }

/* Prefs */
.pref-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; border-top: 1px solid var(--line); }
.pref-row:first-of-type { border-top: 0; }
.pref-row .t { font-weight: 500; font-size: .92rem; color: var(--ink); }
.pref-row .d { font-size: .82rem; color: var(--muted); margin-top: 3px; }
.switch { position: relative; width: 46px; height: 26px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: var(--line-2); border-radius: 99px; transition: background-color var(--dur) var(--ease); cursor: pointer; }
.switch span::before { content: ""; position: absolute; width: 20px; height: 20px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: transform var(--dur) var(--ease); box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.switch input:checked + span { background: var(--blue); }
.switch input:checked + span::before { transform: translateX(20px); }

/* Checkout */
.checkout { display: grid; grid-template-columns: 1fr 380px; gap: clamp(22px, 3vw, 46px); align-items: start; }
.checkout__main { min-width: 0; }
.co-step { background: #fff; border: 1px solid var(--line); border-radius: var(--r-core); padding: clamp(20px, 2.4vw, 30px); margin-bottom: 18px; }
.co-step__h { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.co-step__n { width: 28px; height: 28px; border-radius: 9px; background: var(--blue-tint); color: var(--blue); display: grid; place-items: center; font-family: var(--font-mono); font-size: .82rem; font-weight: 600; }
.co-step__h h3 { font-family: var(--font-display); font-size: 1.12rem; font-weight: 600; }
.co-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.co-grid .field.full { grid-column: 1 / -1; }
.radio-card { display: grid; grid-template-columns: 18px 1fr auto; gap: 13px; align-items: center; padding: 16px 18px; border: 1px solid var(--line-2); border-radius: var(--r-inner); cursor: pointer; transition: border-color var(--dur-fast) var(--ease), background-color var(--dur-fast) var(--ease); }
.radio-card:hover { border-color: var(--blue); }
.radio-card input { accent-color: var(--blue); width: 17px; height: 17px; }
.radio-card.is-sel { border-color: var(--blue); background: var(--blue-tint); }
.radio-card .t { font-weight: 500; font-size: .92rem; color: var(--ink); }
.radio-card .d { font-size: .8rem; color: var(--muted); margin-top: 2px; }
.radio-card .p { font-weight: 600; font-size: .9rem; color: var(--ink); }
.co-summary { position: sticky; top: 100px; }
.co-summary__box { background: #fff; border: 1px solid var(--line); border-radius: var(--r-shell); padding: 24px; box-shadow: var(--sh-2); }
.co-summary__h { font-family: var(--font-display); font-size: 1.15rem; font-weight: 600; margin-bottom: 18px; }
.co-line { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.co-line img { width: 44px; height: 44px; border-radius: 10px; object-fit: contain; background: var(--surface); border: 1px solid var(--line); flex: none; }
.co-line .t { font-size: .86rem; font-weight: 500; color: var(--ink); }
.co-line .s { font-size: .76rem; color: var(--muted); }
.co-line .p { margin-left: auto; font-weight: 600; font-size: .88rem; }
.co-row { display: flex; justify-content: space-between; font-size: .9rem; margin-top: 12px; }
.co-row.muted { color: var(--muted); }
.co-row.total { font-size: 1.05rem; font-weight: 600; color: var(--ink); border-top: 1px solid var(--line); padding-top: 14px; margin-top: 14px; font-family: var(--font-display); }

/* Bestellbestätigung */
.confirm { text-align: center; max-width: 560px; margin: 0 auto; }
.confirm__badge { width: 76px; height: 76px; border-radius: 50%; background: var(--success-tint); color: var(--success); display: grid; place-items: center; margin: 0 auto 22px; }
.confirm__badge svg { width: 36px; height: 36px; }
.confirm__nr { font-family: var(--font-mono); font-size: 1.2rem; color: var(--ink); margin: 6px 0 4px; }
.confirm__lines { display: grid; gap: 12px; max-width: 420px; margin: 28px auto; text-align: left; }
.confirm__line { display: flex; justify-content: space-between; padding: 14px 18px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-inner); font-size: .9rem; }
.confirm__line .muted { color: var(--muted); }

@media (max-width: 900px) {
  .auth { grid-template-columns: 1fr; }
  .auth__aside { display: none; }
  .dash { grid-template-columns: 1fr; }
  .dash__side { position: static; }
  /* Aus der Spaltenleiste wird eine Wischleiste.
     overflow-y muss explizit stehen: bei overflow-x:auto wird es sonst
     implizit zu auto und die Leiste lässt sich auch senkrecht schieben. */
  .dash__nav {
    grid-auto-flow: column; grid-auto-columns: max-content; gap: 6px;
    overflow-x: auto; overflow-y: hidden;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    touch-action: pan-x;
  }
  .dash__nav::-webkit-scrollbar { display: none; }
  .dash__nav a { padding: 9px 14px; }
  .dash__nav .dash__out { border-top: 0; margin-top: 0; }
  .dash__nav a.is-active { border-radius: var(--r-inner); }
  .checkout { grid-template-columns: 1fr; }
  .co-summary { position: static; }
  /* Drei Kennzahlen bleiben nebeneinander — untereinander fräßen sie den
     halben ersten Bildschirm. Dafür kleiner setzen. */
  .kpis { grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 22px; }
  .kpi { padding: 15px 13px; }
  .kpi .ico { width: 30px; height: 30px; border-radius: 10px; margin-bottom: 10px; }
  .kpi .ico svg { width: 16px; height: 16px; }
  .kpi .n { font-size: 1.5rem; }
  .kpi .n--money { font-size: 1.1rem; }
  .kpi .l { font-size: .76rem; }
  .addr-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .co-grid { grid-template-columns: 1fr; }
  .dash__h { font-size: 1.32rem; }
  .dash__lead { font-size: .88rem; margin-bottom: 18px; }
  .card-box { padding: 16px; border-radius: var(--r-inner); }
  .card-box__h { margin-bottom: 14px; }

  /* Werkzeugleiste: Suche auf volle Breite, Filter als Wischleiste.
     Auch das Filterband braucht min-width:0 — sonst dehnt sein Inhalt
     die Flex-Zeile und damit die Seite. */
  .dtools { gap: 10px; }
  .dtools__search { flex: 1 1 100%; min-width: 0; }
  .seg {
    flex: 1 1 auto; min-width: 0;
    overflow-x: auto; overflow-y: hidden;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    touch-action: pan-x;
  }
  .seg::-webkit-scrollbar { display: none; }
  .seg__btn { flex: none; white-space: nowrap; min-height: 40px; }

  /* Bestellkarten */
  .ordercard { padding: 15px; border-radius: var(--r-inner); }
  .ordercard__top { gap: 10px; margin-bottom: 13px; padding-bottom: 11px; }
  .ordercard__foot { margin-top: 13px; padding-top: 11px; }
  .order-item { grid-template-columns: 44px 1fr auto; gap: 11px; }
  .order-item img { width: 44px; height: 44px; border-radius: 10px; }
  .ordercard__acts { gap: 7px; }
  .ordercard__acts .btn { flex: 1 1 auto; min-height: 42px; padding-inline: 10px; }
  .ordercard__acts .btn--sm { min-height: 40px; }

  /* Zeitachse: schmalere Spur, damit mehr Text neben die Punkte passt */
  .track__row { grid-template-columns: 28px 1fr; gap: 12px; padding-bottom: 22px; }
  .track__row::before { left: 13px; top: 22px; }
  .track__dot { width: 28px; height: 28px; }
  .track__dot svg { width: 15px; height: 15px; }

  /* Bestätigungskarten im Sicherheitspanel */
  .verify { grid-template-columns: 36px 1fr; gap: 12px; }
  .verify__ic { width: 36px; height: 36px; border-radius: 11px; }
  .verify__ic svg { width: 18px; height: 18px; }

  .kv__row { font-size: .84rem; padding: 10px 0; }
  .btn--sm { min-height: 40px; }
  .dempty { padding: 24px 14px; }
  /* iOS zoomt beim Antippen, wenn Eingabefelder kleiner als 16px sind.
     Darum hier 1rem statt .95rem — die Seite bleibt beim Tippen stabil. */
  .field input, .field textarea, .field select { font-size: 1rem; padding: 13px 14px; }
  .field select { padding-right: 34px; }
}
@media (max-width: 420px) {
  .kpis { gap: 7px; }
  .kpi { padding: 12px 9px; }
  .kpi .ico { width: 26px; height: 26px; border-radius: 9px; margin-bottom: 8px; }
  .kpi .ico svg { width: 14px; height: 14px; }
  .kpi .n { font-size: 1.3rem; }
  .kpi .n--money { font-size: 1rem; }
  .kpi .l { font-size: .7rem; }
}

/* ============================================================
   Responsiv — Unternehmens-, Service- und Kontoseiten
   ============================================================ */
@media (max-width: 1080px) {
  .legal__grid { grid-template-columns: 1fr; }
  .legal__nav { position: static; flex-direction: row; display: flex; flex-wrap: wrap; gap: 6px; }
}
@media (max-width: 900px) {
  .contact__grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .timeline__row { grid-template-columns: 1fr; gap: 8px; }
}
