/* 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: 1200px;
    --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

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 {
    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;
}

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

@media (max-width: 1180px) {
    .brand__text small {
        display: none;
    }
}

.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;
}

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

.portal-nav {
    border-bottom: 1px solid var(--line);
    background: #fff;
}

.portal-nav__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 24px;
    padding-top: 10px;
    padding-bottom: 10px;
}

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

.portal-nav ul a {
    font-weight: 600;
    text-decoration: none;
}

.portal-nav__account {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 16px;
    font-size: 0.9rem;
}

.portal-nav__user {
    color: var(--muted);
}

.portal-nav__account form {
    margin: 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 .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;
}
