/* CAO Antwerpen – Basis-Stylesheet. Keine externen Schriften (DSGVO). */

:root {
    /* Farbpalette „Himmel & Werft“ – abgeleitet vom Logo-Blau, Kontraste nach WCAG AA geprüft */
    --sky-600: #0066cc;       /* Himmelblau, direkt aus dem Logo */
    --sky-700: #0052a3;
    --sky-800: #003f7d;
    --navy-900: #0b2545;      /* Nachtblau: Text, Footer */
    --navy-700: #1c3a5e;
    --horizon-50: #eef5fc;    /* Horizont: helle Flächen */
    --horizon-100: #dceaf8;
    --cloud: #f5f8fb;         /* Wolke: Seitenkopf */
    --line-color: #d5dfea;
    --gray-600: #526477;
    --signal-400: #f5a524;    /* Signalorange (Tagesleuchtfarbe): nur Haupt-Call-to-Action */
    --signal-500: #e08e0b;
    --red-700: #b42318;

    /* Semantische Zuordnung */
    --blue: var(--sky-600);
    --blue-dark: var(--sky-700);
    --blue-tint: var(--horizon-50);
    --ink: var(--navy-900);
    --muted: var(--gray-600);
    --line: var(--line-color);
    --bg: #ffffff;
    --bg-soft: var(--cloud);
    --accent: var(--signal-400);
    --accent-dark: var(--signal-500);
    --radius: 6px;
    --max: 1320px;
    --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

/* Das hidden-Attribut gilt immer, auch wenn eine Klasse display setzt (z. B. QR-Code-Kasten). */
[hidden] {
    display: none !important;
}

body {
    margin: 0;
    font-family: var(--font);
    font-size: 1.0625rem;
    line-height: 1.6;
    color: var(--ink);
    background: var(--bg);
}

img {
    max-width: 100%;
    height: auto;
}

a {
    color: var(--blue);
}

a:hover {
    color: var(--blue-dark);
}

h1,
h2,
h3 {
    color: var(--navy-900);
    line-height: 1.2;
    margin: 0 0 0.6em;
}

h1 {
    font-size: clamp(1.9rem, 4vw, 2.75rem);
}

h2 {
    font-size: clamp(1.4rem, 2.6vw, 1.75rem);
}

h3 {
    font-size: 1.2rem;
}

.container {
    max-width: var(--max);
    margin: 0 auto;
    padding: 0 16px;
}

.skip-link {
    position: absolute;
    left: -9999px;
}

.skip-link:focus {
    left: 16px;
    top: 16px;
    z-index: 10;
    background: var(--bg);
    padding: 8px 12px;
}

/* Header */

.site-header {
    border-bottom: 1px solid var(--line);
    background: var(--bg);
}

.site-header__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 24px;
    padding-top: 12px;
    padding-bottom: 12px;
}

.brand {
    flex: none;
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--ink);
    margin-right: auto;
}

.brand img {
    display: block;
    width: 87px;
    height: auto;
}

.brand__text {
    display: flex;
    flex-direction: column;
    line-height: 1.25;
}

.brand__text strong {
    font-size: 1.25rem;
    white-space: nowrap;
}

.brand__text small {
    color: var(--muted);
}

/* Firmenname unter „CAO Antwerpen“ nur auf breiten Bildschirmen (steht sonst im Fuß der Seite) */
@media (max-width: 1399px) {
    .brand__text small {
        display: none;
    }
}

/* Navigation und Werfttermin-Button; auf dem Smartphone hinter dem Menü-Button */
.site-menu {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 24px;
}

/* Menü-Button: nur auf schmalen Bildschirmen und nur mit JavaScript (siehe unten, „Smartphone“) */
.nav-toggle {
    display: none;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding: 8px 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    color: var(--ink);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.nav-toggle__icon,
.nav-toggle__icon::before,
.nav-toggle__icon::after {
    display: block;
    width: 18px;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
    transition: transform 0.2s, background-color 0.2s;
}

.nav-toggle__icon {
    position: relative;
}

.nav-toggle__icon::before,
.nav-toggle__icon::after {
    content: "";
    position: absolute;
    left: 0;
}

.nav-toggle__icon::before {
    top: -6px;
}

.nav-toggle__icon::after {
    top: 6px;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__icon {
    background: transparent;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__icon::before {
    transform: translateY(6px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__icon::after {
    transform: translateY(-6px) rotate(-45deg);
}

.main-nav ul {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 18px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.main-nav a {
    color: var(--ink);
    text-decoration: none;
    font-weight: 500;
    padding: 6px 0;
    border-bottom: 2px solid transparent;
}

.main-nav a:hover,
.main-nav a[aria-current="page"] {
    color: var(--blue);
    border-bottom-color: var(--blue);
}

/* Leiste über dem Header: Telefon, Öffnungszeiten, Sprache */

.topbar {
    background: var(--navy-900);
    color: var(--horizon-100);
    font-size: 0.85rem;
}

.topbar__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 20px;
    min-height: 36px;
}

.topbar__item {
    color: var(--horizon-100);
    text-decoration: none;
}

a.topbar__item:hover {
    color: #fff;
    text-decoration: underline;
}

.lang-switch {
    display: flex;
    gap: 2px;
    margin-left: auto;
}

.lang-switch a {
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    color: var(--horizon-100);
    padding: 3px 8px;
    border-radius: var(--radius);
}

.lang-switch a:hover {
    color: #fff;
    background: var(--navy-700);
}

.lang-switch a[aria-current="true"] {
    background: var(--sky-600);
    color: #fff;
}

@media (max-width: 520px) {
    .topbar__hours {
        display: none;
    }
}

/* Hero & Seitenkopf */

.hero {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--sky-600) 0%, var(--sky-800) 100%);
    color: #fff;
    padding: clamp(48px, 7vw, 88px) 0;
}

/* Logo-Signatur als dezentes Wasserzeichen */
.hero::before {
    content: "";
    position: absolute;
    right: -6%;
    bottom: -18%;
    width: min(70vw, 760px);
    aspect-ratio: 164 / 88;
    background: url("../img/logo-mark-white.6ff238fdae2b.svg") no-repeat center / contain;
    opacity: 0.07;
    pointer-events: none;
}

.hero__inner {
    position: relative;
    display: grid;
    gap: 32px;
    align-items: center;
}

@media (min-width: 860px) {
    .hero__inner {
        grid-template-columns: 1.1fr 1fr;
    }
}

.hero h1 {
    color: #fff;
}

.hero__text {
    max-width: 46rem;
    font-size: 1.2rem;
    opacity: 0.95;
}

.page-header {
    background: var(--bg-soft);
    border-bottom: 1px solid var(--line);
    padding: 40px 0 28px;
}

.lead {
    font-size: 1.2rem;
    color: var(--muted);
    max-width: 46rem;
    margin: 0;
}

.body {
    padding-top: 40px;
    padding-bottom: 56px;
}

.body > h2,
.body > p,
.body > ul,
.body > ol,
.body > .rich-text {
    max-width: 46rem;
}

.block-heading {
    margin-top: 1.6em;
}

/* Buttons */

.button {
    display: inline-block;
    background: var(--blue);
    color: #fff;
    border: 0;
    border-radius: var(--radius);
    padding: 12px 22px;
    font: inherit;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}

.button:hover {
    background: var(--blue-dark);
    color: #fff;
}

.button--accent {
    background: var(--accent);
    color: var(--navy-900);
}

.button--accent:hover {
    background: var(--accent-dark);
    color: var(--navy-900);
}

.button--light {
    background: #fff;
    color: var(--blue);
}

.button--light:hover {
    background: var(--blue-tint);
    color: var(--blue-dark);
}

/* Blöcke */

.cards {
    margin: 32px 0;
}

.cards__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 24px;
    background: var(--bg);
}

.card p {
    color: var(--muted);
}

.card__link {
    font-weight: 600;
    text-decoration: none;
}

.facts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 20px;
    margin: 32px 0;
}

.fact {
    background: var(--blue-tint);
    border-radius: var(--radius);
    padding: 20px 24px;
    display: flex;
    flex-direction: column-reverse;
    justify-content: flex-end; /* Werte oben bündig, auch bei unterschiedlich langen Beschriftungen */
}

.fact dd {
    margin: 0;
    font-size: clamp(1.4rem, 2.6vw, 1.85rem);
    overflow-wrap: anywhere;
    font-weight: 700;
    color: var(--sky-700);
    line-height: 1.1;
}

.fact dt {
    color: var(--muted);
}

.cta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    background: var(--bg-soft);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 24px;
    margin: 40px 0;
}

.cta p {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 500;
}

.figure {
    margin: 32px 0;
}

/* Hochformatigere Bilder in Textspaltenbreite, Breitbild über die volle Breite */
.figure:not(.figure--16-9) {
    max-width: 46rem;
}

/* Kontakt */

.contact {
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
}

@media (min-width: 800px) {
    .contact {
        grid-template-columns: 1fr 1.4fr;
    }
}

.contact address {
    font-style: normal;
    margin-top: 16px;
}

.form__field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 16px;
}

.form__field label {
    font-weight: 600;
}

.form input,
.form textarea,
.form select {
    font: inherit;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    width: 100%;
}

.form input:focus,
.form textarea:focus,
.form select:focus {
    outline: 2px solid var(--blue);
    outline-offset: 1px;
}

.form__field--error input,
.form__field--error textarea {
    border-color: var(--red-700);
}

.form__error {
    color: var(--red-700);
}

.form__privacy {
    font-size: 0.9rem;
    color: var(--muted);
    margin: 0 0 1rem;
}

.hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* Footer */

.site-footer {
    background: var(--navy-900);
    color: var(--horizon-100);
    padding: 40px 0;
    font-size: 0.95rem;
}

.site-footer a {
    color: #fff;
}

.site-footer__inner {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 24px;
}

.site-footer strong {
    color: #fff;
}

.site-footer__brand {
    display: block;
    width: 120px;
    margin-bottom: 12px;
}

.site-footer__approval strong {
    color: var(--accent);
}

.legal-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.button--small {
    padding: 8px 14px;
    font-size: 0.9rem;
}

/* FAQ */

.faq {
    max-width: 46rem;
    margin: 24px 0 32px;
    border-top: 1px solid var(--line);
}

.faq__item {
    border-bottom: 1px solid var(--line);
}

.faq__item summary {
    cursor: pointer;
    list-style: none;
    padding: 16px 32px 16px 0;
    font-weight: 600;
    position: relative;
}

.faq__item summary::-webkit-details-marker {
    display: none;
}

.faq__item summary::after {
    content: "+";
    position: absolute;
    right: 4px;
    top: 12px;
    font-size: 1.4rem;
    color: var(--blue);
}

.faq__item[open] summary::after {
    content: "–";
}

.faq__item summary:focus-visible {
    outline: 2px solid var(--blue);
    outline-offset: 2px;
}

.faq__answer {
    padding-bottom: 12px;
    color: var(--ink);
}

.faq__answer p:first-child {
    margin-top: 0;
}

/* Downloads */

.downloads {
    list-style: none;
    padding: 0;
    margin: 16px 0 32px;
    max-width: 46rem;
    display: grid;
    gap: 12px;
}

/* Mit Vorschau: Kacheln nebeneinander */
.downloads:has(.downloads__item--preview) {
    max-width: none;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}

.downloads__item--preview {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    background: #fff;
}

.downloads__preview {
    display: block;
    background: var(--cloud);
    border-bottom: 1px solid var(--line);
}

.downloads__preview img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 210 / 297; /* A4 */
    object-fit: cover;
    object-position: top;
    transition: opacity 0.15s;
}

.downloads__preview:hover img {
    opacity: 0.85;
}

.downloads__link {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    text-decoration: none;
    font-weight: 600;
}

.downloads__item--preview .downloads__link {
    flex: 1;
    flex-direction: column;
    gap: 4px;
    border: 0;
    border-radius: 0;
}

.downloads__link:hover {
    border-color: var(--blue);
    background: var(--blue-tint);
}

.downloads__meta {
    color: var(--muted);
    font-weight: 400;
    white-space: nowrap;
}

.opening-hours {
    margin-top: 16px;
}

/* Bilder und Bildplatzhalter */

.figure img,
.hero__media img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: var(--radius);
}

.figure figcaption {
    margin-top: 8px;
    font-size: 0.9rem;
    color: var(--muted);
}

.placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 24px;
    text-align: center;
    border: 2px dashed var(--sky-600);
    border-radius: var(--radius);
    color: var(--navy-700);
    background:
        url("../img/logo-mark.6ca5a0839342.svg") no-repeat right 16px bottom 16px / 96px auto,
        repeating-linear-gradient(135deg, var(--horizon-50) 0 14px, #fff 14px 28px);
}

.placeholder--3-2 { aspect-ratio: 3 / 2; }
.placeholder--16-9 { aspect-ratio: 16 / 9; }
.placeholder--4-3 { aspect-ratio: 4 / 3; }
.placeholder--1-1 { aspect-ratio: 1 / 1; }

.placeholder__icon {
    width: 40px;
    height: 40px;
    color: var(--sky-600);
}

.placeholder__label {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--sky-700);
}

.placeholder__text {
    margin: 0;
    max-width: 34rem;
    font-weight: 500;
    line-height: 1.45;
}

.placeholder__spec {
    font-size: 0.85rem;
    color: var(--muted);
}

/* Variante auf blauem Hintergrund (Hero) */
.placeholder--on-dark {
    border-color: rgba(255, 255, 255, 0.7);
    color: #fff;
    background:
        url("../img/logo-mark-white.6ff238fdae2b.svg") no-repeat right 16px bottom 16px / 96px auto,
        repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0 14px, rgba(255, 255, 255, 0.02) 14px 28px);
}

.placeholder--on-dark .placeholder__icon,
.placeholder--on-dark .placeholder__label,
.placeholder--on-dark .placeholder__spec {
    color: var(--horizon-100);
}

@media (max-width: 520px) {
    .placeholder {
        aspect-ratio: auto;
        min-height: 220px;
    }
}

/* ------------------------------------------------------------------------------------------ */
/* Kundenbereich                                                                              */
/* ------------------------------------------------------------------------------------------ */

.topbar__portal {
    margin-left: auto;
    font-weight: 600;
}

.topbar__portal + .lang-switch {
    margin-left: 0;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    border: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

/* Leiste des Kundenbereichs: Navigation (mit Zählern für das Team) und Kontomenü */

.portal-bar {
    background: var(--navy-900);
    color: #fff;
}

.portal-bar__inner {
    display: flex;
    align-items: center;
    gap: 16px;
    min-height: 56px;
}

.portal-bar__nav {
    flex: 1;
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: none;
}

.portal-bar__nav::-webkit-scrollbar {
    display: none;
}

.portal-bar__nav ul {
    display: flex;
    gap: 4px;
    margin: 0;
    padding: 0;
    list-style: none;
    white-space: nowrap;
}

.portal-bar__nav a {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 56px;
    padding: 0 12px;
    color: var(--horizon-100);
    font-weight: 600;
    text-decoration: none;
    border-bottom: 3px solid transparent;
}

.portal-bar__nav a:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
}

.portal-bar__nav a[aria-current="page"] {
    color: #fff;
    border-bottom-color: var(--signal-400);
}

.portal-bar__count {
    min-width: 1.6em;
    padding: 1px 7px;
    border-radius: 999px;
    background: var(--signal-400);
    color: var(--navy-900);
    font-size: 0.8rem;
    font-weight: 700;
    text-align: center;
}

.portal-bar__admin {
    margin-left: 12px;
    padding-left: 12px;
    border-left: 1px solid rgba(255, 255, 255, 0.18);
}

.portal-bar__admin a {
    font-weight: 400;
}

/* Kontomenü */

.account-menu {
    position: relative;
    flex: none;
}

.account-menu summary {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding: 4px 8px;
    border-radius: var(--radius);
    cursor: pointer;
    list-style: none;
}

.account-menu summary::-webkit-details-marker {
    display: none;
}

.account-menu summary:hover,
.account-menu[open] summary {
    background: rgba(255, 255, 255, 0.08);
}

.account-menu__initials {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--sky-600);
    color: #fff;
    font-size: 0.85rem;
    font-weight: 700;
}

.account-menu__name {
    max-width: 14rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.account-menu__panel {
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    z-index: 20;
    min-width: 230px;
    padding: 8px 0;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    color: var(--ink);
    box-shadow: 0 16px 32px -20px rgba(11, 37, 69, 0.5);
}

.account-menu__who {
    margin: 0 0 6px;
    padding: 8px 16px 10px;
    border-bottom: 1px solid var(--line);
    font-weight: 600;
}

.account-menu__who small {
    display: block;
    color: var(--muted);
    font-weight: 400;
}

.account-menu__panel a,
.account-menu__panel .link-button {
    display: block;
    width: 100%;
    padding: 10px 16px;
    text-align: left;
    color: var(--ink);
    text-decoration: none;
}

.account-menu__panel a:hover,
.account-menu__panel .link-button:hover {
    background: var(--horizon-50);
}

.account-menu__panel form {
    margin: 0;
}

/* Kopf einer Seite im Kundenbereich: Titel links, Aktionen rechts */

.portal-head {
    padding: 28px 0 8px;
}

.portal-head__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px 24px;
}

.portal-head h1 {
    margin: 0;
    font-size: clamp(1.6rem, 3vw, 2.1rem);
}

.portal-head .lead {
    margin-top: 6px;
    font-size: 1.05rem;
}

.portal-head__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.template-portal .body.portal {
    padding-top: 20px;
}

@media (max-width: 1100px) {
    /* Navigation scrollt seitlich – rechts ausblenden, damit man sieht, dass es weitergeht */
    .portal-bar__nav {
        mask-image: linear-gradient(to right, #000 85%, transparent);
    }
}

@media (max-width: 640px) {

    .account-menu__name {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
    }
}

.link-button {
    padding: 0;
    border: 0;
    background: none;
    font: inherit;
    color: var(--blue);
    text-decoration: underline;
    cursor: pointer;
}

.link-button:hover {
    color: var(--blue-dark);
}

.inline-form {
    display: inline;
    margin: 0 0 0 12px;
}

.portal > * {
    max-width: none;
}

.messages {
    list-style: none;
    padding: 0;
    margin: 0 0 24px;
}

.message {
    padding: 12px 16px;
    border-radius: var(--radius);
    border-left: 4px solid var(--sky-600);
    background: var(--horizon-50);
}

.message + .message {
    margin-top: 8px;
}

.message--success {
    border-left-color: #1e7b4f;
    background: #ecf7f1;
}

.message--warning {
    border-left-color: var(--signal-500);
    background: #fff6e5;
}

.message--error {
    border-left-color: var(--red-700);
    background: #fdeceb;
}

.notice {
    padding: 20px 24px;
    border-radius: var(--radius);
    background: var(--horizon-50);
    border: 1px solid var(--horizon-100);
}

.notice h2 {
    font-size: 1.15rem;
}

.notice > :last-child {
    margin-bottom: 0;
}

.hint {
    font-size: 0.9rem;
    color: var(--muted);
}

.card--link {
    display: block;
    color: inherit;
    text-decoration: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.card--link:hover {
    border-color: var(--sky-600);
    box-shadow: 0 2px 10px rgba(11, 37, 69, 0.08);
    color: inherit;
}

.toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 24px;
}

.toolbar__sort,
.toolbar__search {
    display: flex;
    align-items: center;
    gap: 8px;
}

.toolbar select,
.toolbar input[type="search"] {
    font: inherit;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
}

.button--secondary {
    background: #fff;
    color: var(--sky-700);
    box-shadow: inset 0 0 0 1px var(--sky-600);
}

.button--secondary:hover {
    background: var(--horizon-50);
    color: var(--sky-800);
}

.button--danger {
    background: var(--red-700);
}

.button--danger:hover {
    background: #8f1b13;
}

/* Tabellen */

.table-wrap {
    position: relative; /* hält absolut positionierte Screenreader-Texte im Scrollbereich */
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.data-table th,
.data-table td {
    padding: 10px 14px;
    text-align: left;
    border-bottom: 1px solid var(--line);
    vertical-align: top;
}

.data-table thead th {
    background: var(--cloud);
    color: var(--navy-700);
    font-size: 0.85rem;
    font-weight: 700;
    white-space: nowrap;
}

.data-table tbody tr:last-child td {
    border-bottom: 0;
}

.data-table tbody tr:hover {
    background: var(--horizon-50);
}

.data-table tfoot td {
    font-weight: 700;
    background: var(--cloud);
    border-top: 2px solid var(--line);
    border-bottom: 0;
}

.data-table .num {
    text-align: right;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.data-table .col-check {
    width: 1%;
}

.data-table .col-actions {
    text-align: right;
    white-space: nowrap;
}

.data-table .col-actions > * + * {
    margin-left: 14px;
}

.data-table .is-inactive td {
    color: var(--muted);
}

.table-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
}

.status {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 700;
    white-space: nowrap;
    background: var(--horizon-100);
    color: var(--navy-700);
}

.status--open {
    background: #fff1d6;
    color: #8a4b00;
}

.status--done {
    background: #e2f3ea;
    color: #1e6b45;
}

.record-group + .record-group {
    margin-top: 40px;
}

.record-group h2 {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 12px;
    font-size: 1.3rem;
}

.record-group h2 small {
    font-size: 0.95rem;
    font-weight: 400;
    color: var(--muted);
}

/* Formulare */

.form--narrow {
    max-width: 34rem;
}

.form__group {
    margin: 0 0 16px;
    padding: 0;
    border: 0;
}

.form__group legend {
    font-weight: 600;
    margin-bottom: 4px;
}

.form__row {
    display: flex;
    gap: 16px;
}

.form__row label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 400;
}

.form__row input {
    width: 5.5rem !important;
}

.form__field--checkbox label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 400;
}

.form__field--checkbox input,
.checkbox-list input {
    width: auto !important;
}

.checkbox-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 4px 16px;
    margin-bottom: 8px;
}

.checkbox-list div,
.checkbox-list label {
    display: flex;
    align-items: center;
    gap: 6px;
}

.form__buttons {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 16px;
    margin-top: 24px;
}

.form__errors {
    margin-bottom: 16px;
    padding: 12px 16px;
    border-radius: var(--radius);
    background: #fdeceb;
    color: var(--red-700);
}

.form__errors ul {
    margin: 0;
    padding-left: 18px;
}

.summary {
    display: grid;
    grid-template-columns: max-content 1fr;
    max-width: 34rem;
    margin: 0;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
}

.summary div {
    display: contents;
}

.summary dt,
.summary dd {
    margin: 0;
    padding: 10px 16px;
    border-bottom: 1px solid var(--line);
}

.summary dt {
    background: var(--cloud);
    font-weight: 600;
}

.summary div:last-child dt,
.summary div:last-child dd {
    border-bottom: 0;
}

.login-layout {
    display: grid;
    gap: 32px;
    align-items: start;
}

@media (min-width: 860px) {
    .login-layout {
        grid-template-columns: 1fr 1fr;
    }
}

/* ------------------------------------------------------------------------------------------ */
/* Wartungsliste                                                                              */
/* ------------------------------------------------------------------------------------------ */

.tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 24px;
    border-bottom: 2px solid var(--line);
}

.tabs a {
    padding: 8px 14px;
    margin-bottom: -2px;
    border-bottom: 2px solid transparent;
    color: var(--navy-700);
    font-weight: 600;
    text-decoration: none;
}

.tabs a[aria-current="page"] {
    border-bottom-color: var(--sky-600);
    color: var(--sky-700);
}

.status--warn {
    background: #fdeceb;
    color: var(--red-700);
}

.choice-list {
    display: grid;
    gap: 6px;
}

.choice-list label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 400;
}

.choice-list input {
    width: auto !important;
}

.progress {
    position: sticky;
    top: 0;
    z-index: 5;
    padding: 10px 0;
    background: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid var(--line);
    margin-bottom: 20px;
}

.progress p {
    margin: 6px 0 0;
    font-size: 0.9rem;
    color: var(--muted);
}

.progress__bar {
    height: 8px;
    border-radius: 999px;
    background: var(--horizon-100);
    overflow: hidden;
}

.progress__bar span {
    display: block;
    height: 100%;
    background: var(--sky-600);
    transition: width 0.2s;
}

.panel {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    margin-bottom: 24px;
    background: #fff;
}

.panel > summary {
    cursor: pointer;
    padding: 14px 18px;
    font-weight: 600;
}

.panel__body {
    padding: 0 18px 18px;
}

.checklist-section {
    margin: 32px 0;
}

.checklist-section h2 {
    font-size: 1.25rem;
}

.checklist-group {
    margin: 24px 0 8px;
    font-size: 1rem;
    color: var(--sky-700);
}

.check-item {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 14px 16px;
    margin-bottom: 10px;
    border: 1px solid var(--line);
    border-left: 4px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
}

.check-item--done {
    border-left-color: #1e7b4f;
}

.check-item--na {
    border-left-color: var(--gray-600);
    background: var(--cloud);
}

.check-item__head {
    display: flex;
    align-items: baseline;
    gap: 12px;
}

.check-item__head h3 {
    margin: 0;
    font-size: 1.02rem;
}

.check-item__no {
    flex: 0 0 auto;
    min-width: 2.2rem;
    padding: 2px 6px;
    border-radius: var(--radius);
    background: var(--horizon-50);
    color: var(--sky-700);
    font-weight: 700;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.check-item__details summary {
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--sky-700);
}

.check-item__details p {
    margin: 6px 0 0;
    font-size: 0.93rem;
    color: var(--navy-700);
}

.segmented {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0;
    padding: 0;
    border: 0;
}

.segmented label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 44px; /* gut mit dem Finger zu treffen */
    padding: 6px 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    cursor: pointer;
    font-weight: 600;
}

.segmented label:has(input:checked) {
    border-color: var(--sky-600);
    background: var(--horizon-50);
    color: var(--sky-800);
}

.segmented__open {
    color: var(--muted);
    font-weight: 400 !important;
}

.check-item .form__field {
    margin-bottom: 0;
}

.check-item__value input {
    max-width: 22rem;
}

.action-bar {
    position: sticky;
    bottom: 0;
    z-index: 5;
    margin-top: 24px;
    padding: 12px 0;
    background: rgba(255, 255, 255, 0.97);
    border-top: 1px solid var(--line);
}

.action-bar__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 0;
}

.action-bar__buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.delete-draft {
    margin-top: 16px;
    font-size: 0.9rem;
}

.review-box {
    margin-bottom: 32px;
    padding: 20px 24px;
    border: 2px solid var(--sky-600);
    border-radius: var(--radius);
    background: var(--horizon-50);
    max-width: 46rem;
}

.review-box h2 {
    font-size: 1.2rem;
}

.summary--wide {
    max-width: 60rem;
    margin-bottom: 24px;
}

.summary code {
    font-size: 0.8rem;
    word-break: break-all;
}

.event-log {
    list-style: none;
    padding: 0;
    font-size: 0.93rem;
}

.event-log li + li {
    margin-top: 4px;
}

.event-log time {
    display: inline-block;
    min-width: 8.5rem;
    color: var(--muted);
    font-variant-numeric: tabular-nums;
}

.checklist input[type="text"],
.checklist input[type="date"],
.checklist textarea {
    width: 100%;
    font: inherit;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
}

.checklist input[type="text"]:focus,
.checklist input[type="date"]:focus,
.checklist textarea:focus {
    outline: 2px solid var(--blue);
    outline-offset: 1px;
}

.checklist .form__field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 12px;
}

.checklist .form__field label {
    font-weight: 600;
}

.notice + form,
.notice + .form {
    margin-top: 24px;
}

/* Unterschrift */

.signature-pad {
    position: relative;
    max-width: 34rem;
    height: 180px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    background-image: linear-gradient(to top, transparent 44px, var(--navy-700) 44px, var(--navy-700) 45px, transparent 45px);
    background-size: calc(100% - 48px) 100%;
    background-position: 24px 0;
    background-repeat: no-repeat;
}

.signature-pad canvas {
    position: relative;
    z-index: 1;
    display: block;
    width: 100%;
    height: 100%;
    touch-action: none; /* beim Unterschreiben auf dem Handy nicht scrollen */
    cursor: crosshair;
}

.signature-pad__line {
    position: absolute;
    left: 10px;
    bottom: 40px;
    color: var(--muted);
    font-size: 1.1rem;
}

.signature .link-button {
    margin-top: 6px;
    font-size: 0.9rem;
}

.signature-image {
    display: block;
    max-width: 260px;
    max-height: 80px;
    background: #fff;
}

/* Als erledigt markiert, aber Pflichtwerte fehlen */
.check-item--incomplete {
    border-left-color: var(--signal-500);
    background: #fffaf0;
}

.check-item__missing {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 600;
    color: #8a4b00;
}

.checklist input.is-missing {
    border-color: var(--signal-500);
    box-shadow: inset 0 0 0 1px var(--signal-500);
}

/* Unterschrift per Handy (QR-Code) */

.phone-signing {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    max-width: 34rem;
    margin-top: 16px;
    padding: 16px;
    border: 1px dashed var(--sky-600);
    border-radius: var(--radius);
    background: var(--horizon-50);
}

.phone-signing h3 {
    margin: 0 0 6px;
    font-size: 1rem;
}

.phone-signing p {
    margin: 0 0 6px;
    font-size: 0.9rem;
}

.phone-signing__qr {
    flex: 0 0 auto;
    width: 150px;
    min-height: 150px;
    background: #fff;
    border-radius: var(--radius);
}

.phone-signing__qr svg {
    display: block;
    width: 150px;
    height: 150px;
}

.phone-signing__qr.is-used {
    opacity: 0.25;
}

.phone-signing__status {
    font-weight: 600;
    color: var(--sky-700);
}

.phone-signing__status--done {
    color: #1e6b45;
}

.phone-signing__status--warn {
    color: #8a4b00;
}

.signature-pad--phone {
    height: 240px;
    max-width: none;
}

/* ------------------------------------------------------------------------------------------ */
/* Kennzeichen-Karte: das Kennzeichen eines Luftfahrzeugs in Rumpfbeschriftung, darunter die     */
/* Zierlinie (Cheatline) wie auf der Lackierung. Startseite (Vorschau) und Übersicht der Halter.  */
/* ------------------------------------------------------------------------------------------ */

.aircraft-plate {
    position: relative;
    padding: 22px 24px 20px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
}

.aircraft-plate__registration {
    margin: 0;
    font-size: clamp(2.4rem, 5vw, 3.4rem);
    font-weight: 800;
    line-height: 1;
    letter-spacing: 0.03em;
    color: var(--navy-900);
}

/* Cheatline: blaue Bahn mit schmaler grauer Linie */
.aircraft-plate__registration::after {
    content: "";
    display: block;
    width: 100%;
    max-width: 16rem;
    height: 9px;
    margin-top: 12px;
    background:
        linear-gradient(#9aa8b8, #9aa8b8) left bottom / 100% 2px no-repeat,
        linear-gradient(var(--sky-600), var(--sky-600)) left top / 100% 5px no-repeat;
}

.aircraft-plate__type {
    margin: 10px 0 0;
    color: var(--muted);
}

.aircraft-plate__facts {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 28px;
    margin: 18px 0 0;
}

.aircraft-plate__facts div {
    display: flex;
    flex-direction: column-reverse;
}

.aircraft-plate__facts dt {
    font-size: 0.85rem;
    color: var(--muted);
}

.aircraft-plate__facts dd {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.aircraft-plate__task {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
}

.aircraft-plate__task p {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 6px 12px;
    margin: 0 0 8px;
}

.aircraft-plate__task .status {
    margin: 0;
}

.aircraft-plate__meta {
    margin: 6px 0 0 !important;
    font-size: 0.9rem;
    color: var(--muted);
}

.aircraft-plate__signature {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 14px;
    color: var(--sky-800);
    font-size: 0.9rem;
}

.aircraft-plate__signature svg {
    width: 132px;
    height: 36px;
    flex: none;
}

/* Startseite: Kundenbereich */

.portal-teaser {
    padding: clamp(40px, 6vw, 72px) 0;
    background: var(--horizon-50);
    border-bottom: 1px solid var(--line);
}

.portal-teaser__inner {
    display: grid;
    gap: 36px;
    align-items: center;
}

@media (min-width: 900px) {
    .portal-teaser__inner {
        grid-template-columns: 1.15fr 1fr;
        gap: 56px;
    }
}

.portal-teaser h2 {
    margin-top: 0;
}

.portal-teaser__lead {
    max-width: 38rem;
    font-size: 1.15rem;
}

.portal-teaser__voluntary {
    max-width: 38rem;
    margin: 0;
    padding: 10px 14px;
    border-radius: var(--radius);
    background: #fff;
    color: var(--navy-700);
}

.portal-teaser__list {
    display: grid;
    gap: 12px;
    max-width: 38rem;
    margin: 20px 0 28px;
    padding: 0;
    list-style: none;
}

.portal-teaser__list li {
    padding-left: 18px;
    border-left: 3px solid var(--sky-600);
}

.portal-teaser__list strong {
    display: block;
}

.portal-teaser__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 20px;
}

.portal-teaser__note {
    margin: 0;
    color: var(--muted);
}

.portal-teaser__note a {
    white-space: nowrap;
}

.portal-teaser__preview .aircraft-plate {
    max-width: 26rem;
    margin-left: auto;
    box-shadow: 0 18px 40px -24px rgba(11, 37, 69, 0.45);
    transform: rotate(-1.5deg);
}

@media (prefers-reduced-motion: no-preference) {
    .portal-teaser__preview .aircraft-plate {
        transition: transform 0.3s ease;
    }

    .portal-teaser__preview:hover .aircraft-plate {
        transform: rotate(0);
    }
}

@media (max-width: 899px) {
    .portal-teaser__preview .aircraft-plate {
        margin: 0;
        transform: none;
    }
}

/* Übersicht der Halter: je Luftfahrzeug eine Zeile – Kennzeichen | Betriebsstunden | Wartungsliste */

.aircraft-row {
    display: grid;
    margin-bottom: 20px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
}

@media (min-width: 900px) {
    .aircraft-row {
        grid-template-columns: minmax(220px, 0.8fr) 1fr 1fr;
    }

    .aircraft-row__part {
        border-left: 1px solid var(--line);
    }
}

@media (max-width: 899px) {
    .aircraft-row__part {
        border-top: 1px solid var(--line);
    }
}

.aircraft-row__plate {
    border: 0;
    background: none;
}

.aircraft-row__part {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 20px 24px;
}

.aircraft-row__part h2 {
    margin: 0;
    font-size: 1.05rem;
}

.aircraft-row__part .aircraft-plate__facts {
    margin: 0;
}

.aircraft-row__status {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 12px;
    margin: 0;
}

.aircraft-row__status .status {
    margin: 0;
}

.aircraft-row__status small {
    color: var(--muted);
}

.aircraft-row__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 18px;
    margin-top: auto;
    padding-top: 6px;
}

.portal-help {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 24px;
    margin-top: 28px;
    padding: 16px 20px;
    border-radius: var(--radius);
    background: var(--horizon-50);
}

.portal-help p {
    margin: 0;
}

.portal-help strong {
    margin-right: 8px;
}

/* Luftfahrzeuge (Team): Erinnerung an die jährliche Wartung */

.toolbar__check {
    display: flex;
    align-items: center;
    gap: 8px;
}

.toolbar__check input {
    width: auto;
}

.maintenance-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 2px 14px;
    margin-top: 8px;
    font-size: 0.9rem;
}

.copy-field {
    width: 100%;
    margin-top: 4px;
    padding: 6px 8px;
    border: 1px solid var(--sky-600);
    border-radius: var(--radius);
    font: inherit;
    font-size: 0.85rem;
}

.maintenance-actions .link-button {
    text-align: left;
}

.reminder-bulk {
    display: grid;
    gap: 8px;
    max-width: 40rem;
    margin-top: 20px;
    padding: 16px 20px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--cloud);
}

.reminder-bulk label {
    font-weight: 600;
}

.reminder-bulk textarea {
    width: 100%;
    font: inherit;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.reminder-bulk .button {
    justify-self: start;
}

.reminder-bulk .hint {
    margin: 0;
}

/* Luftfahrzeug anlegen/bearbeiten (Team): Kennzeichen-Vorschau links, Halter rechts */

.aircraft-form__layout {
    display: grid;
    gap: 28px;
    align-items: start;
}

@media (min-width: 960px) {
    .aircraft-form__layout {
        grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
        gap: 40px;
    }
}

.aircraft-form__plate {
    margin-bottom: 24px;
    background: var(--horizon-50);
}

.aircraft-form__plate .aircraft-plate__registration {
    min-height: 1em;
    overflow-wrap: anywhere;
}

.aircraft-form__plate .aircraft-plate__type:empty {
    display: none;
}

.aircraft-form [data-plate-registration] {
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.aircraft-form__owners {
    margin: 0;
}

.aircraft-form__owners .owner-picker {
    margin-top: 4px;
}

/* Vorschläge beim Tippen (Muster) */

.suggest {
    position: relative;
}

.suggest-list {
    position: absolute;
    z-index: 15;
    top: 100%;
    left: 0;
    right: 0;
    max-height: 18rem;
    overflow-y: auto;
    margin: 4px 0 0;
    padding: 4px 0;
    list-style: none;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    box-shadow: 0 16px 32px -20px rgba(11, 37, 69, 0.5);
}

.suggest-list li {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 12px;
    cursor: pointer;
}

.suggest-list li:hover,
.suggest-list li[aria-selected="true"] {
    background: var(--horizon-50);
}

.suggest-list small {
    color: var(--muted);
    white-space: nowrap;
}

.suggest-hint {
    margin: 6px 0 0;
    font-size: 0.9rem;
    color: var(--muted);
}

.suggest-hint .link-button {
    font-weight: 600;
}

/* Übersicht des Teams: Aufgaben mit Zahl und den neuesten Vorgängen */

.task-board {
    display: grid;
    gap: 20px;
}

@media (min-width: 900px) {
    .task-board {
        grid-template-columns: 1fr 1fr;
    }

    .task-board .task:last-child {
        grid-column: 1 / -1;
    }
}

.task {
    padding: 20px 24px;
    border: 1px solid var(--line);
    border-left: 4px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
}

.task--due {
    border-left-color: var(--signal-400);
}

.task__head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 6px 16px;
}

.task__head h2 {
    margin: 0;
    font-size: 1.15rem;
}

.task__count {
    margin-right: 4px;
    font-size: 1.6rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

.task--due .task__count {
    color: var(--sky-800);
}

.task__list {
    margin: 14px 0 0;
    padding: 0;
    list-style: none;
}

.task__list li {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 2px 12px;
    padding: 8px 0;
    border-top: 1px solid var(--line);
}

.task__list a {
    text-decoration: none;
}

.task__list a:hover {
    text-decoration: underline;
}

.task__list strong {
    margin-right: 6px;
    letter-spacing: 0.02em;
}

.task__list small,
.task__empty {
    color: var(--muted);
}

.task__empty {
    margin: 12px 0 0;
}

.task__more {
    margin: 8px 0 0;
    font-size: 0.93rem;
}

.team-links {
    margin-top: 36px;
}

.team-links h2 {
    font-size: 1.15rem;
}

.team-links ul {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.team-links a {
    display: block;
    height: 100%;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    color: var(--ink);
    text-decoration: none;
}

.team-links a:hover {
    border-color: var(--sky-600);
    background: var(--horizon-50);
}

.team-links small {
    display: block;
    margin-top: 2px;
    color: var(--muted);
}

/* Wartungsliste: Ablauf für Halter – ausführlich (aufklappbar) und als Schrittleiste */

.process {
    margin: 0 0 24px;
    padding: 0 20px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--horizon-50);
}

.process summary {
    padding: 14px 0;
    font-weight: 700;
    cursor: pointer;
}

.process__steps {
    display: grid;
    gap: 16px;
    margin: 0 0 12px;
    padding: 0;
    list-style: none;
    counter-reset: step;
}

@media (min-width: 900px) {
    .process__steps {
        grid-template-columns: repeat(4, 1fr);
    }
}

.process__steps li {
    position: relative;
    padding: 14px 16px 14px 56px;
    border-radius: var(--radius);
    background: #fff;
    counter-increment: step;
}

.process__steps li::before {
    content: counter(step);
    position: absolute;
    left: 14px;
    top: 14px;
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--sky-600);
    color: #fff;
    font-weight: 700;
}

.process__steps p {
    margin: 4px 0 0;
    font-size: 0.93rem;
    color: var(--muted);
}

.process__help {
    margin: 0 0 16px;
    font-size: 0.93rem;
}

.process-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 4px;
    margin: 0 0 20px;
    padding: 0;
    list-style: none;
    font-size: 0.9rem;
    color: var(--muted);
}

.process-bar li {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px 6px 6px;
    border-radius: 999px;
    background: var(--cloud);
}

.process-bar li span {
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid var(--line);
    font-weight: 700;
}

.process-bar li.is-done span {
    background: var(--sky-600);
    border-color: var(--sky-600);
    color: #fff;
}

.process-bar li.is-current {
    background: var(--horizon-100);
    color: var(--sky-800);
    font-weight: 700;
}

.process-bar li.is-current span {
    border-color: var(--sky-600);
    color: var(--sky-800);
}

/* ------------------------------------------------------------------------------------------ */
/* Rundmails                                                                                  */
/* ------------------------------------------------------------------------------------------ */

.circular-form textarea {
    min-height: 16rem;
}

.owner-picker {
    margin-top: 12px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--cloud);
}

.owner-picker__filters {
    display: grid;
    gap: 8px;
}

.owner-picker__types {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin: 10px 0 0;
    padding: 0;
    border: 0;
}

.owner-picker__types legend {
    margin-bottom: 6px;
    font-size: 0.9rem;
    font-weight: 600;
}

.owner-picker__types legend small {
    color: var(--muted);
    font-weight: 400;
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 36px;
    padding: 4px 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    font-size: 0.93rem;
    font-weight: 400;
    cursor: pointer;
}

.chip input {
    width: auto !important;
    margin: 0;
}

.chip small {
    color: var(--muted);
}

.chip:has(input:checked) {
    border-color: var(--sky-600);
    background: var(--horizon-50);
    color: var(--sky-800);
}

.owner-picker__filters input,
.owner-picker__filters select {
    width: 100%;
    font: inherit;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
}

.owner-picker__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 16px;
    margin: 10px 0;
    font-size: 0.93rem;
}

.owner-picker__count {
    margin-left: auto;
    color: var(--muted);
}

.owner-picker__list {
    max-height: 24rem;
    overflow-y: auto;
    margin: 0;
    padding: 0;
    list-style: none;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.owner-picker__list li + li {
    border-top: 1px solid var(--line);
}

.owner-picker__list label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 8px 12px;
    font-weight: 400;
    cursor: pointer;
}

.owner-picker__list input {
    width: auto !important;
    margin-top: 4px;
}

.owner-picker__list small {
    display: block;
    color: var(--muted);
}



.circular-preview__mail {
    max-width: 46rem;
    margin-bottom: 32px;
    padding: 16px 20px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
}

.circular-preview__subject,
.circular-preview__attachments {
    margin: 0 0 8px;
}

.circular-preview__body {
    margin: 16px 0 0;
    padding-top: 16px;
    border-top: 1px solid var(--line);
    font: inherit;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.circular-send__buttons form {
    margin: 0;
}

.recipient-list {
    margin: 0;
    padding-left: 1.2rem;
    columns: 2 22rem;
}

.site-menu__portal[aria-current="page"] {
    background: var(--horizon-50);
}

/* Kopf der Website: ab 1280 px alles in einer Zeile, darunter Menü-Button. Der Link „Kundenbereich“ in der
   oberen Leiste ist nur nötig, solange der Button im aufklappbaren Menü steckt. */

@media (min-width: 1280px) {
    .site-header__inner,
    .site-menu,
    .main-nav ul {
        flex-wrap: nowrap;
    }

    .site-menu {
        gap: 12px 16px;
    }

    .main-nav ul {
        gap: 4px 16px;
    }

    .main-nav a {
        white-space: nowrap;
    }

    .brand img {
        width: 72px;
    }

    .site-menu .button {
        white-space: nowrap;
    }

    .topbar__portal {
        display: none;
    }

    .topbar__portal + .lang-switch {
        margin-left: auto;
    }
}

@media (max-width: 1279px) {
    .site-header__inner {
        padding-top: 8px;
        padding-bottom: 8px;
    }

    .brand img {
        width: 64px;
    }

    .brand__text strong {
        font-size: 1.1rem;
    }

    .js .nav-toggle {
        display: inline-flex;
    }

    .js .site-menu {
        display: none;
    }

    .site-menu {
        flex-basis: 100%;
        padding-bottom: 8px;
    }

    .js .site-menu.is-open {
        display: block;
    }

    .main-nav ul {
        flex-direction: column;
        gap: 0;
    }

    .main-nav a {
        display: block;
        padding: 12px 4px;
        border-bottom: 1px solid var(--line);
    }

    .main-nav a:hover,
    .main-nav a[aria-current="page"] {
        border-bottom-color: var(--line);
        background: var(--horizon-50);
    }

    .site-menu .button {
        display: block;
        margin-top: 14px;
        padding: 12px 18px;
        text-align: center;
    }
}

/* ------------------------------------------------------------------------------------------ */
/* Smartphone                                                                                 */
/* ------------------------------------------------------------------------------------------ */

@media (max-width: 899px) {
    /* Tabellen als Karten: je Zeile eine Karte mit „Spalte: Wert“ (Beschriftung setzt site.js) */
    .table-wrap:has(> .data-table:not(.data-table--keep)) {
        overflow: visible;
        border: 0;
    }

    .data-table:not(.data-table--keep) thead {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        white-space: nowrap;
    }

    .data-table:not(.data-table--keep),
    .data-table:not(.data-table--keep) tbody,
    .data-table:not(.data-table--keep) tfoot,
    .data-table:not(.data-table--keep) tr,
    .data-table:not(.data-table--keep) td {
        display: block;
        width: 100%;
    }

    .data-table:not(.data-table--keep) tr {
        position: relative;
        margin-bottom: 12px;
        padding: 6px 14px;
        border: 1px solid var(--line);
        border-radius: var(--radius);
        background: #fff;
    }

    .data-table:not(.data-table--keep) tr:has(> .col-check) {
        padding-right: 48px;
    }

    .data-table:not(.data-table--keep) tbody tr:hover {
        background: #fff;
    }

    .data-table:not(.data-table--keep) td,
    .data-table:not(.data-table--keep) tfoot td {
        padding: 8px 0;
        border-bottom: 1px solid var(--line);
        border-top: 0;
        text-align: left;
        white-space: normal;
        background: none;
    }

    .data-table:not(.data-table--keep) td[data-label] {
        overflow-wrap: anywhere;
        display: grid;
        grid-template-columns: minmax(7rem, 40%) 1fr;
        gap: 12px;
    }

    .data-table:not(.data-table--keep) td.num {
        text-align: left;
    }

    .data-table:not(.data-table--keep) td[data-label] > * {
        justify-self: start;
    }

    .data-table:not(.data-table--keep) td[data-label]::before {
        content: attr(data-label);
        color: var(--muted);
        font-size: 0.85rem;
        font-weight: 600;
    }

    .data-table:not(.data-table--keep) tr > td:last-child {
        border-bottom: 0;
    }

    .data-table:not(.data-table--keep) td:empty {
        display: none;
    }

    .data-table:not(.data-table--keep) td:has(+ td:empty:last-child) {
        border-bottom: 0;
    }

    .data-table:not(.data-table--keep) td.col-check {
        position: absolute;
        top: 12px;
        right: 14px;
        width: auto;
        padding: 0;
        border: 0;
    }

    .data-table:not(.data-table--keep) td.col-check input {
        width: 22px;
        height: 22px;
    }

    .data-table:not(.data-table--keep) td.col-actions {
        display: flex;
        flex-wrap: wrap;
        gap: 8px 16px;
        padding-top: 12px;
    }

    .data-table:not(.data-table--keep) tfoot tr {
        background: var(--cloud);
    }

    .data-table--keep th,
    .data-table--keep td {
        padding: 8px 10px;
    }

    /* Wartungsliste: Auswahl in einer Zeile, kompakte Leiste unten */
    .segmented {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        width: 100%;
    }

    .segmented label {
        justify-content: center;
        padding: 6px 8px;
    }

    .action-bar {
        padding: 8px 0;
    }

    .action-bar__inner {
        gap: 6px;
    }

    .action-bar__inner > a {
        font-size: 0.9rem;
    }

    .action-bar__buttons {
        display: grid;
        grid-template-columns: 1fr 1fr;
        width: 100%;
    }

    .action-bar__buttons .button {
        padding: 10px 8px;
        font-size: 0.95rem;
        line-height: 1.25;
    }

}

@media (max-width: 520px) {
    .topbar__label {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        white-space: nowrap;
    }

    .topbar {
        font-size: 0.8rem;
    }

    .topbar__inner {
        min-height: 44px;
        gap: 4px 10px;
    }

    .lang-switch {
        gap: 0;
    }

    .lang-switch a {
        padding: 8px 7px;
    }

    .page-header {
        padding: 28px 0 20px;
    }

    .summary {
        grid-template-columns: 1fr;
    }

    .summary dt {
        padding-bottom: 2px;
        border-bottom: 0;
    }

    .summary dd {
        overflow-wrap: anywhere;
    }

    .body {
        padding-top: 28px;
        padding-bottom: 40px;
    }
}
