/* Gemeinsames Layout FOC-Memberbereich */
:root {
    --red-primary: #c70f2e;
    --portal-red: #c00;
    --portal-bg: #ececee;
    --portal-content-bg: #e8e8ea;
    --portal-sidebar: #e0e0e4;
    --portal-sidebar-border: #c4c4c8;
    --text-main: #111111;
    --text-muted: #6b7280;
    --border-subtle: rgba(15, 23, 42, 0.06);
    --card: #ffffff;
}

/* ——— Portal-Hülle (Einsatzzentrale-2-Stil: rote Leiste, linke Nav, mobil ausklappbar) ——— */

body.member-portal-body {
    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;
    font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
    color: var(--text-main);
    background: var(--portal-content-bg);
    display: flex;
    flex-direction: column;
    --red-primary: #c00;
}

body.member-portal-body .member-hero {
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.08);
}

body.member-portal-body .dash-card {
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.06);
    border-color: rgba(0, 0, 0, 0.06);
}

@media (max-width: 899px) {
    body.member-portal-body.member-portal-nav-open {
        overflow: hidden;
    }
}

.member-portal-root {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    min-height: 100dvh;
}

.member-portal-topbar {
    flex-shrink: 0;
    background: var(--portal-red);
    color: #fff;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
    z-index: 1100;
    position: relative;
}

.member-portal-topbar__inner {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    max-width: 100%;
}

.member-portal-menu-btn {
    display: none;
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    cursor: pointer;
    font: inherit;
    align-items: center;
    justify-content: center;
}

.member-portal-menu-btn:hover {
    background: rgba(255, 255, 255, 0.22);
}

.member-portal-menu-btn__icon {
    display: block;
    width: 18px;
    height: 12px;
    position: relative;
}

.member-portal-menu-btn__icon::before,
.member-portal-menu-btn__icon::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    height: 2px;
    background: currentColor;
    border-radius: 1px;
}

.member-portal-menu-btn__icon::before {
    top: 0;
    box-shadow: 0 5px 0 currentColor;
}

.member-portal-menu-btn__icon::after {
    bottom: 0;
}

.member-portal-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #fff;
    font-weight: 800;
    font-size: 15px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    min-width: 0;
}

.member-portal-brand img {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    flex-shrink: 0;
}

/* Malteser-Wappen (PNG mit transparentem Hintergrund) im Mitgliedsportal-Header */
.member-portal-brand--malteser img {
    width: 40px;
    height: 40px;
    max-width: 44px;
    max-height: 44px;
    border-radius: 0;
    object-fit: contain;
}

.member-portal-brand--malteser .member-portal-brand__title {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.member-portal-brand__text {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}

.member-portal-brand__subtitle {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    opacity: 0.9;
}

.member-portal-topbar__spacer {
    flex: 1;
    min-width: 8px;
}

.member-portal-logout {
    flex-shrink: 0;
    border: 1px solid rgba(255, 255, 255, 0.55);
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    padding: 8px 14px;
    border-radius: 8px;
    cursor: pointer;
    font-family: inherit;
}

.member-portal-logout:hover {
    background: rgba(255, 255, 255, 0.22);
}

.member-portal-workspace {
    flex: 1;
    display: flex;
    min-height: 0;
    position: relative;
}

.member-portal-sidebar {
    flex-shrink: 0;
    width: 230px;
    background: var(--portal-sidebar);
    border-right: 1px solid var(--portal-sidebar-border);
    display: flex;
    flex-direction: column;
    z-index: 1050;
    overflow: auto;
}

.member-portal-sidebar__nav {
    display: flex;
    flex-direction: column;
    padding: 12px 10px 20px;
    gap: 4px;
}

.member-portal-nav-link {
    display: block;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    text-decoration: none;
    border: 1px solid transparent;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.member-portal-nav-link:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #111;
}

.member-portal-nav-link.is-active {
    background: #fff;
    color: var(--portal-red);
    border-color: rgba(0, 0, 0, 0.08);
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.06);
}

button.member-portal-nav-link {
    width: 100%;
    text-align: left;
    font: inherit;
    cursor: pointer;
    background: transparent;
}

.member-portal-content {
    flex: 1 1 auto;
    min-width: 0;
    min-height: 0;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    background: var(--portal-content-bg);
}

.member-portal-content > .auth-gate,
.member-portal-content > #member-main {
    max-width: 920px;
    margin-left: auto;
    margin-right: auto;
}

/* Volle Breite + Höhe: Abrechnung im iframe (schlägt die 920px-Zeile, Spezifität) */
.member-portal-content:has(> #member-main.member-main--abrechnung) {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
}

.member-portal-content > #member-main.member-main--abrechnung {
    max-width: none;
    width: 100%;
    margin-left: 0;
    margin-right: 0;
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

.member-portal-content > #member-main.page-wrap--tickets {
    max-width: 1120px;
}

.member-portal-nav-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    z-index: 1040;
    border: none;
    padding: 0;
    margin: 0;
    cursor: pointer;
}

.member-portal-nav-backdrop:not([hidden]) {
    display: block;
}

@media (max-width: 899px) {
    .member-portal-menu-btn {
        display: inline-flex;
    }

    .member-portal-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: min(280px, 88vw);
        padding-top: 62px;
        box-shadow: 8px 0 32px rgba(0, 0, 0, 0.18);
        transform: translateX(-100%);
        transition: transform 0.22s ease;
    }

    .member-portal-sidebar.is-open {
        transform: translateX(0);
    }

    body.member-portal-nav-open .member-portal-nav-backdrop:not([hidden]) {
        display: block;
    }
}

@media (min-width: 900px) {
    .member-portal-nav-backdrop {
        display: none !important;
    }

    .member-portal-sidebar.is-open {
        /* Reset mobile transform if class stuck */
        transform: none;
    }
}

/* Einsatzzentrale 2: Portal-Nav links neben Mission-Rail */
.ez2-workspace--portal {
    position: relative;
}

@media (max-width: 899px) {
    .ez2-workspace--portal .member-portal-sidebar {
        padding-top: 0;
        z-index: 1060;
    }

    .ez2-command-center .member-portal-nav-backdrop {
        z-index: 1055;
    }
}

/* Menü-Button in roter EZ2-Topbar (Layout: einsatzzentrale2.css) */
.ez2-topbar .member-portal-menu-btn {
    display: none;
}

@media (max-width: 899px) {
    .ez2-topbar .member-portal-menu-btn {
        display: inline-flex;
    }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;
    font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
    color: var(--text-main);
    background: radial-gradient(ellipse 90% 70% at 50% 0%, #ffe4e8 0, #fce7e9 35%, transparent 70%),
                radial-gradient(ellipse 70% 60% at 100% 100%, #fecaca 0, #fef2f2 40%, transparent 65%),
                linear-gradient(180deg, #fff5f6 0%, #fef2f2 100%);
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-subtle);
}

.site-nav {
    max-width: 1080px;
    margin: 0 auto;
    padding: 12px 20px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 8px;
}

.site-nav .brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-right: auto;
    text-decoration: none;
    color: var(--red-primary);
    font-weight: 700;
    font-size: 1.1rem;
}

.site-nav .brand img {
    width: 36px;
    height: 36px;
    border-radius: 10px;
}

.nav-link {
    color: #374151;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    padding: 8px 12px;
    border-radius: 10px;
    border: 1px solid transparent;
    transition: background 0.15s, color 0.15s;
}

.nav-link:hover {
    background: rgba(199, 15, 46, 0.06);
    color: var(--red-primary);
}

.nav-link.is-active {
    background: rgba(199, 15, 46, 0.1);
    color: var(--red-primary);
    border-color: rgba(199, 15, 46, 0.15);
}

.page-wrap {
    max-width: 880px;
    margin: 0 auto;
    padding: 28px 20px 56px;
}

/* Abrechnungstool eingebettet: Rest siehe .member-portal-content > #member-main.member-main--abrechnung */
#member-main.member-main--abrechnung {
    margin: 0;
    padding: 0 0 16px;
}

.member-abrechnung-view {
    display: none;
    flex-direction: column;
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
    min-height: 0;
    box-sizing: border-box;
}

.member-abrechnung-iframe {
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
    min-height: min(70vh, 900px);
    border: 0;
    display: block;
    background: #f9fafb;
}

@media (min-width: 900px) {
    .member-abrechnung-iframe {
        min-height: calc(100dvh - 88px);
    }
}

.member-hero {
    margin-bottom: 28px;
    padding: 24px 22px;
    border-radius: 18px;
    background: linear-gradient(135deg, #fff 0%, #fff8f8 100%);
    border: 1px solid #e5e7eb;
    box-shadow: 0 10px 36px rgba(15, 23, 42, 0.06);
}

.member-hero h1 {
    margin: 0 0 10px;
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--red-primary);
}

.member-hero p {
    margin: 0;
    font-size: 15px;
    line-height: 1.55;
    color: var(--text-muted);
    overflow-wrap: anywhere;
    word-break: break-word;
}

.member-hero__eyebrow {
    margin: 0 0 8px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--red-primary);
}

.member-hero__lead {
    margin: 0 0 16px;
    font-size: 15px;
    line-height: 1.65;
    color: #374151;
    max-width: 720px;
}

.member-hero__bullets {
    margin: 0;
    padding-left: 1.15rem;
    font-size: 14px;
    line-height: 1.7;
    color: var(--text-muted);
}

.member-hero__bullets code {
    font-size: 12px;
    background: rgba(204, 0, 0, 0.08);
    padding: 2px 8px;
    border-radius: 6px;
    color: #9f1239;
}

.member-page-stack {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.member-page-footnote {
    margin: 20px 0 0;
    font-size: 14px;
    max-width: 560px;
    color: var(--text-muted);
    line-height: 1.55;
    overflow-wrap: anywhere;
}

.member-section-title {
    margin: 0 0 8px;
    font-size: 1.15rem;
    font-weight: 700;
}

body.member-portal-body .tickets-panel {
    border-radius: 14px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.06);
    padding: 20px 20px;
}

.impressum-portal-note {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.55;
    margin: 0 0 16px;
}

.impressum-portal-address {
    font-style: normal;
    line-height: 1.6;
    margin: 0 0 16px;
}

.member-portal-content--nebenkosten {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    min-width: 0;
    overflow: auto;
}

.member-portal-content--nebenkosten #root {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.dash-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
}

.dash-card {
    padding: 18px 18px;
    border-radius: 14px;
    background: var(--card);
    border: 1px solid #e5e7eb;
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.04);
}

.dash-card h3 {
    margin: 0 0 10px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #94a3b8;
}

.dash-card .value {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1f2937;
}

.dash-card .value.muted {
    font-weight: 500;
    font-size: 15px;
    color: var(--text-muted);
}

.dash-card-role-view {
    grid-column: 1 / -1;
}

.role-view-lead {
    margin: 0 0 12px;
    font-size: 14px;
    line-height: 1.55;
    color: var(--text-muted);
    max-width: 720px;
}

.prot-role-view-bar {
    margin-bottom: 20px;
}

.role-view-switcher {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.role-view-btn {
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    padding: 8px 14px;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    background: #fff;
    color: #374151;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.role-view-btn:hover {
    background: rgba(199, 15, 46, 0.06);
    border-color: rgba(199, 15, 46, 0.2);
    color: var(--red-primary);
}

.role-view-btn.is-active {
    background: rgba(199, 15, 46, 0.12);
    border-color: rgba(199, 15, 46, 0.35);
    color: var(--red-primary);
    box-shadow: 0 0 0 1px rgba(199, 15, 46, 0.08);
}

.role-view-hint {
    margin-top: 12px;
    font-size: 14px;
    line-height: 1.5;
    color: #475569;
}

.member-role-pill {
    display: inline-block;
    font-size: 13px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 999px;
}
.member-role-pill.role-admin { background: #dbeafe; color: #1d4ed8; }
.member-role-pill.role-flugbegleiter { background: #dcfce7; color: #15803d; }
.member-role-pill.role-einsatzzentrale { background: #fef9c3; color: #a16207; }
.member-role-pill.role-fuehrungskraft { background: #ede9fe; color: #6d28d9; }
.member-role-pill.role-qualitaetsmanagement { background: #e0e7ff; color: #4338ca; }
.member-role-pill.role-member { background: #f1f5f9; color: #475569; }

.dash-actions {
    margin-top: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 18px;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    color: #fff;
    background: linear-gradient(180deg, var(--red-primary) 0%, #9f0d26 100%);
    border: none;
    border-radius: 12px;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(199, 15, 46, 0.25);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 18px;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    color: #374151;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    text-decoration: none;
    cursor: pointer;
}

.btn-primary:hover, .btn-secondary:hover {
    filter: brightness(1.03);
}

.auth-gate {
    text-align: center;
    padding: 40px 20px 56px;
}

.auth-gate p {
    color: var(--text-muted);
    max-width: 28rem;
    margin: 0 auto 20px;
    line-height: 1.55;
}

/* Protokolle: 2FA-Bestätigung (protocol-step-up) */
.auth-gate .prot-step-card p {
    max-width: none;
}

.prot-step-card {
    max-width: 420px;
    margin: 0 auto;
    text-align: left;
    padding: 32px 28px 28px;
    border-radius: 22px;
    background: linear-gradient(165deg, #ffffff 0%, #fff9f9 50%, #fff5f6 100%);
    border: 1px solid rgba(199, 15, 46, 0.14);
    box-shadow:
        0 20px 50px rgba(15, 23, 42, 0.07),
        0 0 0 1px rgba(255, 255, 255, 0.9) inset;
    display: flex;
    flex-direction: column;
    min-height: min(420px, calc(100dvh - 200px));
}

.prot-step-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 18px;
    border-radius: 16px;
    background: var(--red-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    line-height: 1;
    box-shadow: 0 10px 28px rgba(199, 15, 46, 0.28);
}

.prot-step-card .prot-step-title {
    text-align: center;
    margin-bottom: 12px;
    color: #0f172a;
    font-size: 1.4rem;
}

.prot-step-lead {
    text-align: center;
    font-size: 15px;
    line-height: 1.6;
    color: #64748b;
    margin: 0 0 22px;
}

.prot-step-error {
    display: none;
    margin: 0 0 14px;
    padding: 10px 12px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.45;
    color: #991b1b;
    background: #fef2f2;
    border: 1px solid #fecaca;
    text-align: center;
}

.prot-step-form {
    margin-top: 4px;
}

.prot-step-label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #94a3b8;
    margin-bottom: 8px;
}

.prot-step-row {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 10px;
}

.prot-step-input {
    flex: 1 1 160px;
    min-width: 0;
    padding: 14px 16px;
    font-size: 17px;
    font-family: ui-monospace, "SF Mono", Menlo, Monaco, Consolas, monospace;
    letter-spacing: 0.12em;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #fff;
    color: #0f172a;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.prot-step-input::placeholder {
    color: #cbd5e1;
    letter-spacing: normal;
}

.prot-step-input:focus {
    outline: none;
    border-color: var(--red-primary);
    box-shadow: 0 0 0 3px rgba(199, 15, 46, 0.14);
}

.prot-step-btn {
    flex: 0 0 auto;
    padding-left: 22px;
    padding-right: 22px;
    border-radius: 14px;
    white-space: nowrap;
}

.prot-step-back {
    margin: 0;
    margin-top: auto;
    padding-top: 24px;
    text-align: center;
}

.prot-step-back a {
    color: var(--red-primary);
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    border-bottom: 1px solid rgba(199, 15, 46, 0.35);
    transition: border-color 0.15s, color 0.15s;
}

.prot-step-back a:hover {
    border-bottom-color: var(--red-primary);
}

@media (max-width: 480px) {
    .prot-step-card {
        padding: 26px 20px 22px;
    }
    .prot-step-row {
        flex-direction: column;
    }
    .prot-step-btn {
        width: 100%;
    }
}

.page-title {
    margin: 0 0 10px;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

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

.prot-protokolle-main {
    margin-bottom: 24px;
}

.prot-toolbar {
    margin-bottom: 16px;
}

.prot-dispatch-list-wrap {
    margin-bottom: 20px;
}

.prot-list-loading,
.prot-list-empty {
    font-size: 15px;
    line-height: 1.55;
    color: var(--text-muted);
    margin: 0;
}

.prot-list-err {
    font-size: 15px;
    line-height: 1.55;
    color: #b91c1c;
    margin: 0;
}

.prot-dispatch-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 14px;
    border: 1px solid var(--border-subtle);
    background: #fff;
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.04);
}

.prot-dispatch-table {
    width: 100%;
    min-width: 720px;
    border-collapse: collapse;
    font-size: 14px;
}

.prot-dispatch-table thead th {
    text-align: left;
    padding: 10px 14px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
    background: #f8fafc;
    border-bottom: 1px solid var(--border-subtle);
}

.prot-dispatch-table tbody td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--border-subtle);
    vertical-align: top;
    color: #1e293b;
}

.prot-dispatch-table tbody tr:last-child td {
    border-bottom: none;
}

.prot-dispatch-table tbody tr:hover {
    background: rgba(199, 15, 46, 0.04);
}

.dash-card-active-einsatz {
    grid-column: 1 / -1;
    border-left: 4px solid #0ea5e9;
    background: linear-gradient(135deg, #f0f9ff 0%, #ffffff 55%, #ffffff 100%);
}

.dash-card-active-einsatz h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    text-transform: none;
    color: #0c4a6e;
}

.dash-card-active-einsatz h3::before {
    content: "";
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.35);
    flex-shrink: 0;
}

.dash-active-einsatz-body {
    margin-top: 4px;
}

.dash-active-einsatz-loading,
.dash-active-einsatz-empty,
.dash-active-einsatz-err,
.dash-active-einsatz-more {
    font-size: 15px;
    line-height: 1.55;
    margin: 0;
    color: var(--text-muted);
}

.dash-active-einsatz-err {
    color: #b91c1c;
}

.dash-active-einsatz-more {
    margin-top: 14px;
    font-size: 14px;
}

.dash-active-einsatz-nr {
    margin: 0 0 4px;
    font-size: 1.35rem;
    font-weight: 700;
    color: #0c4a6e;
    letter-spacing: -0.02em;
    line-height: 1.25;
}

.dash-einsatz-status-stack {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
    margin: 8px 0 4px;
}

.dash-einsatz-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.dash-einsatz-status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.dash-einsatz-status--active {
    color: #166534;
    background: #ecfdf5;
    border: 1px solid #bbf7d0;
}

.dash-einsatz-status-dot--active {
    background: #22c55e;
    box-shadow: 0 0 0 rgba(34, 197, 94, 0.65);
    animation: dash-online-pulse 1.5s ease-out infinite;
}

@keyframes dash-online-pulse {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.55);
    }
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 10px rgba(34, 197, 94, 0);
    }
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
    }
}

.dash-einsatz-status--inactive {
    color: #374151;
    background: #f3f4f6;
    border: 1px solid #d1d5db;
}

.dash-einsatz-status-dot--inactive {
    background: #6b7280;
}

.dash-einsatz-status--contact {
    color: #166534;
    background: #ecfdf5;
    border: 1px solid #bbf7d0;
}

.dash-einsatz-status-dot--contact {
    background: #22c55e;
    box-shadow: 0 0 0 rgba(34, 197, 94, 0.65);
    animation: dash-online-pulse 1.5s ease-out infinite;
}

.dash-einsatz-status--not-contact {
    font-size: 12px;
    color: #374151;
    background: #f3f4f6;
    border: 1px solid #d1d5db;
}

.dash-einsatz-status-dot--not-contact {
    background: #6b7280;
}

.dash-active-einsatz-meta {
    margin: 12px 0 16px;
    padding: 0;
}

.dash-active-einsatz-meta > div {
    display: grid;
    grid-template-columns: 7rem 1fr;
    gap: 8px 12px;
    align-items: baseline;
    margin-bottom: 8px;
}

.dash-active-einsatz-meta dt {
    margin: 0;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
}

.dash-active-einsatz-meta dd {
    margin: 0;
    font-size: 14px;
    color: #1e293b;
}

.dash-active-einsatz-airport-globe {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    align-self: flex-end;
    align-items: flex-end;
    gap: 6px;
}

.dash-active-einsatz-airport-globe .dash-airport-globe {
    width: 62px;
    height: 62px;
    display: block;
}

.dash-active-einsatz-airport-label {
    font-size: 12px;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: 0.02em;
}

.dash-einsatz-lead {
    margin: 0 0 14px;
    font-size: 15px;
    line-height: 1.55;
    color: #334155;
    max-width: 52rem;
}

.dash-laufende-einsaetze-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.dash-active-einsatz-item {
    margin: 0;
    padding: 0;
    border-radius: 14px;
    border: 1px solid rgba(14, 116, 188, 0.18);
    background: #ffffff;
    box-shadow: 0 4px 18px rgba(15, 23, 42, 0.06);
}

.dash-active-einsatz-item .dash-active-einsatz-main {
    padding: 18px 18px 16px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.dash-active-einsatz-item .dash-active-einsatz-meta {
    margin-bottom: 14px;
}

.dash-active-einsatz-item .dash-active-einsatz-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-top: 4px;
}

.dash-active-einsatz-item .dash-btn-bearbeiten {
    align-self: flex-start;
}

.dash-active-einsatz-item .dash-btn-loeschen {
    border-color: rgba(185, 28, 28, 0.45);
    color: #b91c1c;
}

.dash-active-einsatz-item .dash-btn-loeschen:hover {
    background: rgba(254, 226, 226, 0.6);
}

.prot-arch-del-pending {
    display: inline-block;
    max-width: 11rem;
    font-size: 13px;
    line-height: 1.4;
    color: #92400e;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.dash-einsatz-toolbar {
    margin-top: 18px;
    padding-top: 4px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

/* Einsatz-Vorbereitung (Web): nur sichtbar für Einsatzzentrale / Führungskraft */
.einsatz-vorbereitung-card {
    margin: 0 0 24px;
    padding: 28px 24px;
    border-radius: 16px;
    background: linear-gradient(165deg, #f0f9ff 0%, #ffffff 45%, #fff 100%);
    border: 1px solid rgba(14, 116, 188, 0.2);
    box-shadow: 0 8px 32px rgba(15, 23, 42, 0.06);
    max-width: 720px;
}

.einsatz-vorbereitung-card h3 {
    margin: 0 0 12px;
    font-size: 1.25rem;
    font-weight: 700;
    color: #0c4a6e;
    letter-spacing: -0.02em;
}

.einsatz-lead {
    margin: 0 0 16px;
    font-size: 15px;
    line-height: 1.6;
    color: #334155;
}

.einsatz-steps {
    margin: 0 0 18px;
    padding-left: 1.25rem;
    color: #1e293b;
    font-size: 15px;
    line-height: 1.55;
}

.einsatz-steps li {
    margin-bottom: 10px;
}

.einsatz-note {
    margin: 0;
    font-size: 13px;
    line-height: 1.5;
    color: #64748b;
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(148, 163, 184, 0.35);
}

.prot-dispatch-msg {
    padding: 12px 14px;
    border-radius: 12px;
    font-size: 14px;
    margin: 0 0 16px;
    line-height: 1.45;
}
.prot-dispatch-msg.ok {
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
}
.prot-dispatch-msg.err {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.pd-form-title {
    margin: 0 0 8px;
    font-size: 1.05rem;
    color: #0c4a6e;
}
.pd-form-hint {
    margin: 0 0 10px;
    font-size: 14px;
    color: #475569;
}
.pd-recipients {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 18px;
}
.pd-rec-label {
    font-size: 14px;
    cursor: pointer;
    line-height: 1.4;
}
.pd-rec-meta {
    color: #64748b;
    font-size: 12px;
}
.pd-fieldset {
    border: 1px solid rgba(14, 116, 188, 0.2);
    border-radius: 12px;
    padding: 14px 16px;
    margin: 0 0 16px;
}
.pd-fieldset legend {
    font-weight: 600;
    font-size: 14px;
    padding: 0 6px;
    color: #334155;
}
.pd-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 10px;
}
@media (max-width: 560px) {
    .pd-row { grid-template-columns: 1fr; }
}
.pd-fieldset label {
    display: block;
    font-size: 13px;
    margin-bottom: 10px;
    color: #334155;
}
.pd-input, .pd-textarea {
    width: 100%;
    margin-top: 4px;
    padding: 10px 12px;
    font-size: 15px;
    font-family: inherit;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    box-sizing: border-box;
}
/* Von der App synchronisierte Felder (Web-Formular) */
.pd-input.pd-from-app,
select.pd-input.pd-from-app {
    color: #b91c1c;
}
.pd-textarea {
    resize: vertical;
    min-height: 80px;
}
.pd-check {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    font-size: 14px;
}
.pd-check input {
    width: 18px;
    height: 18px;
}
.pd-intern {
    display: block;
    font-size: 13px;
    margin-bottom: 16px;
    color: #475569;
}
.pd-submit {
    margin-top: 8px;
}
.pd-form-err {
    color: #b91c1c;
    font-size: 14px;
}

.pd-menu-title {
    margin: 20px 0 10px;
    font-size: 1.15rem;
    font-weight: 700;
    color: #0c4a6e;
    border-bottom: 1px solid rgba(14, 116, 188, 0.2);
    padding-bottom: 6px;
}
.pd-hint {
    font-size: 13px;
    color: #64748b;
    margin: 0 0 12px;
    line-height: 1.5;
}
.pd-hint code {
    font-size: 12px;
    background: #f1f5f9;
    padding: 2px 6px;
    border-radius: 6px;
}
.pd-member-sel {
    margin-bottom: 12px;
}
.pd-sug-panel {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 8px 0 12px;
    padding: 8px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    max-height: 200px;
    overflow-y: auto;
}
.pd-sug-item {
    font: inherit;
    font-size: 13px;
    padding: 6px 10px;
    border-radius: 8px;
    border: 1px solid #cbd5e1;
    background: #fff;
    cursor: pointer;
    text-align: left;
}
.pd-sug-item:hover {
    border-color: var(--red-primary);
    color: var(--red-primary);
}
.pd-leg-row {
    margin-bottom: 12px;
    padding: 12px 12px 14px;
    border: 1px solid #e4e4e7;
    border-radius: 10px;
    background: linear-gradient(180deg, #fff 0%, #fafafa 100%);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
.pd-leg-head {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #c00;
    margin-bottom: 8px;
}
.pd-leg-mit-patient {
    margin-bottom: 10px;
}
.pd-leg-mit-patient-lbl {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 600;
    color: #27272a;
    cursor: pointer;
    user-select: none;
}
.pd-leg-mit-patient-cb {
    width: 16px;
    height: 16px;
    accent-color: #b91c1c;
}
.pd-leg-block {
    margin-bottom: 12px;
}
.pd-leg-block:last-child {
    margin-bottom: 0;
}
.pd-leg-block-title {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #71717a;
    margin-bottom: 6px;
}
.pd-leg-grid {
    display: grid;
    grid-template-columns: minmax(3.5rem, 4.25rem) minmax(2.5rem, 3.25rem) minmax(0, 1fr) auto;
    gap: 8px 10px;
    align-items: end;
}
.pd-leg-field-label {
    display: block;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #71717a;
    margin-bottom: 3px;
}
.pd-leg-feld {
    margin: 0;
    min-width: 0;
}
.pd-leg-feld--iata .pd-input {
    width: 100%;
    max-width: 4.25rem;
    margin-top: 0;
    padding: 8px 6px;
    text-align: center;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-variant-numeric: tabular-nums;
}
.pd-leg-feld--land .pd-input {
    width: 100%;
    max-width: 3.25rem;
    margin-top: 0;
    padding: 8px 6px;
    text-align: center;
    text-transform: uppercase;
    font-variant-numeric: tabular-nums;
}
.pd-leg-dt-group {
    min-width: 0;
}
.pd-leg-dt-group-title {
    display: block;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #71717a;
    margin-bottom: 4px;
}
.pd-leg-dt-inner {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 10px;
    align-items: flex-end;
}
.pd-leg-dt-field {
    flex: 1 1 auto;
    min-width: 0;
    margin: 0;
}
.pd-leg-mini-label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: #3f3f46;
    margin-bottom: 2px;
}
.pd-leg-dt-field .pd-input--date {
    min-width: 8.75rem;
    max-width: 11rem;
    margin-top: 0;
}
.pd-leg-dt-field .pd-input--time {
    min-width: 5.25rem;
    max-width: 6.5rem;
    margin-top: 0;
    font-variant-numeric: tabular-nums;
}
.pd-leg-now-wrap {
    display: flex;
    align-items: flex-end;
    padding-bottom: 1px;
}
.pd-leg-now {
    font-size: 12px;
    font-weight: 600;
    padding: 8px 12px;
    white-space: nowrap;
    border-radius: 8px;
    border: 1px solid #d4d4d8;
    background: #fff;
    color: #18181b;
}
.pd-leg-now:hover {
    border-color: #c00;
    color: #c00;
}
@media (max-width: 720px) {
    .pd-leg-grid {
        grid-template-columns: 1fr 1fr;
    }
    .pd-leg-dt-group {
        grid-column: 1 / -1;
    }
    .pd-leg-dt-inner {
        flex-wrap: nowrap;
    }
    .pd-leg-now-wrap {
        grid-column: 1 / -1;
        justify-content: flex-start;
    }
    .pd-leg-feld--iata .pd-input {
        max-width: none;
    }
    .pd-leg-feld--land .pd-input {
        max-width: none;
    }
}

.prot-placeholder {
    padding: 32px 24px;
    border-radius: 16px;
    background: #f9fafb;
    border: 1px dashed #d1d5db;
    color: var(--text-muted);
    line-height: 1.6;
}

/* Benutzerverwaltung: Mitglieder-Tabelle */
.org-members-wrap {
    margin-top: 16px;
    border-radius: 14px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    background: #fff;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
}
.org-extra-roles {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 10px;
    max-width: 280px;
}
.org-extra-role-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 600;
    color: #334155;
    padding: 4px 8px;
    border-radius: 999px;
    border: 1px solid rgba(15, 23, 42, 0.1);
    background: #f8fafc;
    cursor: pointer;
    user-select: none;
}
.org-extra-role-chip input {
    margin: 0;
    accent-color: var(--member-accent, #c00);
}
.org-members-extra-readonly {
    font-size: 13px;
    color: var(--text-muted);
}
.org-members-table {
    width: 100%;
    min-width: 1100px;
    border-collapse: collapse;
    font-size: 14px;
}
.org-members-table thead th {
    text-align: left;
    padding: 10px 14px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
    background: #f8fafc;
    border-bottom: 1px solid var(--border-subtle);
}
.org-members-th-action {
    text-align: center;
    width: 9rem;
}
.org-members-table tbody td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--border-subtle);
    vertical-align: middle;
}
.org-members-table tbody tr:last-child td {
    border-bottom: none;
}
.org-members-table tbody tr:hover {
    background: rgba(199, 15, 46, 0.04);
}
.org-members-td-prot .org-member-protocol-app-role-select {
    max-width: 100%;
    font-size: 13px;
    padding: 6px 8px;
    border-radius: 8px;
    border: 1px solid var(--border-subtle);
    background: #fff;
}
.org-members-email {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, monospace;
    font-size: 12px;
    color: #334155;
    line-height: 1.4;
    word-break: break-word;
}
.org-members-td-name {
    font-weight: 500;
    color: #111827;
}
.org-member-role-select,
.org-member-crew-qual-select {
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
    font: inherit;
    font-size: 13px;
    padding: 6px 8px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    background: #fff;
    color: #111827;
}
.org-members-role-readonly,
.org-members-qual-readonly {
    font-size: 13px;
    color: #334155;
    line-height: 1.4;
}
.org-members-type-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}
.org-members-type-team {
    background: #ecfdf5;
    color: #047857;
}
.org-members-type-org {
    background: #f1f5f9;
    color: #475569;
}
.org-members-td-action {
    text-align: center;
}
.org-members-td-action .btn-secondary {
    padding: 8px 12px;
    font-size: 12px;
    border-radius: 10px;
}
.org-members-dash {
    color: #94a3b8;
    font-size: 1.15rem;
    line-height: 1;
}

/* --- Support-Tickets --- */
.page-wrap--tickets {
    max-width: 1120px;
}

.tickets-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
    gap: 24px;
    align-items: start;
}

@media (max-width: 900px) {
    .tickets-layout {
        grid-template-columns: 1fr;
    }
}

.tickets-panel {
    background: var(--card);
    border-radius: 18px;
    border: 1px solid var(--border-subtle);
    padding: 22px 24px;
    box-shadow: 0 8px 30px rgba(15, 23, 42, 0.05);
}

.tickets-panel__title {
    margin: 0 0 8px;
    font-size: 1.15rem;
    font-weight: 700;
}

.tickets-panel__hint {
    margin: 0 0 20px;
    font-size: 14px;
    line-height: 1.55;
    color: var(--text-muted);
}

.ticket-field {
    margin-bottom: 16px;
}

.ticket-field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #334155;
    margin-bottom: 6px;
}

.ticket-field .req {
    color: var(--red-primary);
}

.ticket-field input[type="text"],
.ticket-field select,
.ticket-field textarea {
    width: 100%;
    padding: 11px 14px;
    font-size: 15px;
    font-family: inherit;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #fff;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.ticket-field textarea {
    resize: vertical;
    min-height: 140px;
    line-height: 1.5;
}

.ticket-field input:focus,
.ticket-field select:focus,
.ticket-field textarea:focus {
    outline: none;
    border-color: rgba(199, 15, 46, 0.45);
    box-shadow: 0 0 0 3px rgba(199, 15, 46, 0.12);
}

.ticket-field--row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

@media (max-width: 520px) {
    .ticket-field--row {
        grid-template-columns: 1fr;
    }
}

.ticket-form-msg {
    font-size: 14px;
    margin: 0 0 12px;
    padding: 10px 14px;
    border-radius: 10px;
}

.ticket-form-msg.is-ok {
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
}

.ticket-form-msg.is-err {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.ticket-submit {
    width: 100%;
    justify-content: center;
    padding: 14px 20px;
    font-size: 16px;
    border-radius: 14px;
}

.tickets-list-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.tickets-list-head .tickets-panel__title {
    margin: 0;
}

.btn-sm {
    padding: 8px 14px;
    font-size: 13px;
    border-radius: 10px;
}

.tickets-empty {
    font-size: 14px;
    color: var(--text-muted);
    margin: 0;
    padding: 16px;
    text-align: center;
    background: #f9fafb;
    border-radius: 12px;
    border: 1px dashed #e5e7eb;
}

.tickets-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ticket-card {
    border-radius: 14px;
    border: 1px solid var(--border-subtle);
    padding: 14px 16px;
    background: #ffffff;
    transition: box-shadow 0.15s, transform 0.12s;
}

.ticket-card:hover {
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.07);
    transform: translateY(-1px);
}

.ticket-card__top {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}

.ticket-card__refrow {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 10px;
    min-width: 0;
}

.ticket-card__ref {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, monospace;
    font-size: 13px;
    font-weight: 700;
    color: var(--red-primary);
    letter-spacing: 0.02em;
}

.ticket-card__meta {
    font-size: 12px;
    color: var(--text-muted);
}

.ticket-card__subject {
    margin: 0 0 8px;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.35;
    color: #111827;
}

.ticket-card__body {
    margin: 0;
    padding: 12px 14px;
    font-size: 14px;
    line-height: 1.55;
    color: #374151;
    white-space: pre-wrap;
    word-break: break-word;
    background: #f8fafc;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
}

.ticket-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.ticket-pill {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.ticket-pill--cat {
    background: #f1f5f9;
    color: #475569;
}

.ticket-pill--pri-low {
    background: #f1f5f9;
    color: #64748b;
}

.ticket-pill--pri-normal {
    background: #eff6ff;
    color: #1d4ed8;
}

.ticket-pill--pri-high {
    background: #fef3c7;
    color: #b45309;
}

.ticket-pill--st-open {
    background: #fef2f2;
    color: #b91c1c;
}

.ticket-pill--st-progress {
    background: #e0f2fe;
    color: #0369a1;
}

.ticket-pill--st-wait {
    background: #fef9c3;
    color: #a16207;
}

.ticket-pill--st-resolved {
    background: #dcfce7;
    color: #166534;
}

.ticket-pill--st-closed {
    background: #f3f4f6;
    color: #6b7280;
}

.ticket-card__thread-actions {
    margin-top: 12px;
}

.ticket-thread-panel {
    margin-top: 12px;
    padding: 14px;
    border-radius: 12px;
    border: 1px solid var(--border-subtle);
    background: #fafafa;
}

.ticket-thread-panel.hidden {
    display: none;
}

.ticket-thread-msgs {
    max-height: 280px;
    overflow-y: auto;
    margin-bottom: 12px;
}

.ticket-thread-entry {
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e5e7eb;
}

.ticket-thread-entry:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.ticket-thread-entry--staff {
    border-left: 3px solid #2563eb;
    padding-left: 10px;
}

.ticket-thread-entry:not(.ticket-thread-entry--staff) {
    border-left: 3px solid #94a3b8;
    padding-left: 10px;
}

.ticket-thread-entry__meta {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.ticket-thread-entry__body {
    font-size: 13px;
    line-height: 1.55;
    color: #374151;
    white-space: pre-wrap;
    word-break: break-word;
}

.ticket-thread-reply-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
    color: #111827;
}

.ticket-thread-reply-ta {
    width: 100%;
    max-width: 100%;
    padding: 10px 12px;
    font-size: 14px;
    font-family: inherit;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    margin-bottom: 8px;
    resize: vertical;
    min-height: 72px;
}

.ticket-thread-loading,
.ticket-thread-err {
    font-size: 13px;
    color: var(--text-muted);
    margin: 0;
}

.ticket-thread-err {
    color: #b91c1c;
}

.ticket-thread-entry--orgadmin {
    border-left: 3px solid #0d9488;
    padding-left: 10px;
}

.ticket-thread-entry--internal {
    background: rgba(124, 58, 237, 0.06);
    border-radius: 8px;
    padding: 10px 10px 10px 12px;
    margin-left: -2px;
}

.org-support-thread {
    margin-top: 8px;
    padding: 12px 14px;
    background: #f8fafc;
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    max-height: 320px;
    overflow-y: auto;
}

.btn-org-support-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.member-portal-nav-link--with-badge {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.org-support-nav-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.03em;
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.org-support-new-banner {
    margin-bottom: 14px;
    padding: 12px 14px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.45;
    background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
    border: 1px solid #fed7aa;
    color: #9a3412;
}

.org-support-table {
    width: 100%;
    table-layout: fixed;
    min-width: 100%;
}

.org-support-table tbody tr.org-support-row td:first-child {
    box-shadow: inset 4px 0 0 var(--org-support-row-status, #cbd5e1);
}

.org-support-table .td-subject {
    overflow-wrap: anywhere;
    word-break: break-word;
    font-size: 13px;
    line-height: 1.4;
}

.org-support-pill {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.02em;
    white-space: nowrap;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}

.org-support-pill--cat {
    border: 1px solid #e2e8f0;
}

.org-support-pill--cat-general { background: #f1f5f9; color: #475569; border-color: #e2e8f0; }
.org-support-pill--cat-protocol-delete { background: #fce7f3; color: #9d174d; border-color: #fbcfe8; }
.org-support-pill--cat-technical { background: #e0e7ff; color: #3730a3; border-color: #c7d2fe; }
.org-support-pill--cat-account { background: #dbeafe; color: #1e40af; border-color: #93c5fd; }
.org-support-pill--cat-billing { background: #fef3c7; color: #92400e; border-color: #fcd34d; }
.org-support-pill--cat-other { background: #f3e8ff; color: #6b21a8; border-color: #e9d5ff; }

.org-support-pill--status-open { background: #fef2f2; color: #b91c1c; }
.org-support-pill--status-in-progress { background: #e0f2fe; color: #0369a1; }
.org-support-pill--status-waiting-customer { background: #fef9c3; color: #a16207; }
.org-support-pill--status-resolved { background: #dcfce7; color: #166534; }
.org-support-pill--status-closed { background: #e2e8f0; color: #475569; }

.org-support-pill--prio-low { background: #f8fafc; color: #64748b; border: 1px solid #e2e8f0; }
.org-support-pill--prio-normal { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }
.org-support-pill--prio-high { background: #ffedd5; color: #c2410c; border: 1px solid #fed7aa; }

.org-support-new-badge {
    display: inline-block;
    margin-left: 6px;
    padding: 2px 7px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
    vertical-align: middle;
}

@media (max-width: 720px) {
    .org-support-edit-grid {
        grid-template-columns: 1fr !important;
    }
}

/* Archivierte Protokolle (FOC / demo-org — /member/protokolle.html) */
.dash-card.dash-card--prot-archives {
    min-width: 0;
    padding: 20px 20px 22px;
    border-radius: 18px;
    border: 1px solid rgba(226, 232, 240, 0.95);
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 1) 0%, rgba(248, 250, 252, 0.92) 55%, rgba(254, 242, 242, 0.35) 100%),
        var(--card);
    box-shadow: 0 4px 24px rgba(15, 23, 42, 0.07), 0 1px 0 rgba(255, 255, 255, 0.8) inset;
}

.prot-archives-section-head {
    display: flex;
    align-items: flex-start;
    gap: 14px 18px;
    margin-bottom: 6px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(226, 232, 240, 0.85);
}

.prot-archives-section-head__badge {
    flex: 0 0 auto;
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: #b91c1c;
    background: linear-gradient(160deg, #fff 0%, #fecaca 140%);
    border: 1px solid rgba(254, 202, 202, 0.75);
    box-shadow: 0 6px 16px rgba(185, 28, 28, 0.12);
}

.prot-archives-section-head__text {
    min-width: 0;
}

.prot-archives-section-title {
    margin-bottom: 4px !important;
    font-size: 1.35rem;
    letter-spacing: -0.02em;
    background: linear-gradient(115deg, #0f172a 0%, #334155 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.prot-archives-section-deck {
    margin: 0;
    font-size: 14px;
    line-height: 1.55;
    color: #64748b;
    max-width: 52rem;
}

#prot-archives-table-wrap {
    margin-top: 8px;
    min-width: 0;
    width: 100%;
    max-width: 100%;
    overflow: visible;
}

.prot-archives-hint {
    font-size: 14px;
    line-height: 1.55;
    color: var(--text-muted);
    margin: 10px 0 0;
    max-width: 720px;
    overflow-wrap: anywhere;
}

.prot-archives-loading-shell {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 16px;
    border-radius: 14px;
    border: 1px dashed rgba(203, 213, 225, 0.9);
    background: rgba(248, 250, 252, 0.65);
}

.prot-archives-loading-spinner {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 3px solid #e2e8f0;
    border-top-color: var(--red-primary);
    animation: prot-arch-spin 0.85s linear infinite;
}

@keyframes prot-arch-spin {
    to {
        transform: rotate(360deg);
    }
}

@media (prefers-reduced-motion: reduce) {
    .prot-arch-card {
        transition: none;
    }
    .prot-arch-card:hover {
        transform: none;
    }
    .prot-archives-loading-spinner {
        animation: none;
        border-top-color: #cbd5e1;
    }
}

.prot-archives-loading {
    margin: 0;
    font-size: 15px;
    color: #475569;
    font-weight: 500;
}

.prot-archives-empty {
    text-align: center;
    padding: 28px 20px 32px;
    border-radius: 16px;
    border: 1px solid rgba(226, 232, 240, 0.95);
    background: linear-gradient(180deg, rgba(248, 250, 252, 0.5), rgba(255, 255, 255, 0.92));
}

.prot-archives-empty__icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 16px;
    border-radius: 16px;
    background: radial-gradient(circle at 30% 30%, rgba(254, 242, 242, 1), rgba(241, 245, 249, 1));
    border: 1px solid #e2e8f0;
    position: relative;
}

.prot-archives-empty__icon::after {
    content: "";
    position: absolute;
    inset: 12px;
    border: 2px dashed #cbd5e1;
    border-radius: 8px;
    opacity: 0.85;
}

.prot-archives-empty__title {
    margin: 0 0 8px;
    font-size: 1.1rem;
    font-weight: 700;
    color: #1e293b;
    letter-spacing: -0.02em;
}

.prot-archives-empty__text {
    margin: 0 auto;
    max-width: 36rem;
    font-size: 14px;
    line-height: 1.65;
    color: #64748b;
}

.prot-arch-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.prot-arch-meta-k {
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: #94a3b8;
    margin-right: 6px;
}

.prot-arch-card {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    border: 1px solid rgba(226, 232, 240, 0.95);
    background: linear-gradient(125deg, #fff 0%, #fafafa 52%, #f8fafc 100%);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.9) inset,
        0 8px 28px rgba(15, 23, 42, 0.07);
    padding: 0;
    min-width: 0;
    transition:
        transform 0.18s ease,
        box-shadow 0.18s ease;
}

.prot-arch-card:hover {
    transform: translateY(-2px);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.9) inset,
        0 14px 36px rgba(15, 23, 42, 0.1);
}

.prot-arch-card__details {
    margin: 0;
    border: 0;
    min-width: 0;
}

.prot-arch-card__sum-row {
    display: grid;
    grid-template-columns: 3rem minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 12px 14px;
    padding: 12px 14px;
    list-style: none;
    cursor: pointer;
    user-select: none;
    margin: 0;
    width: 100%;
    box-sizing: border-box;
}

/* Feste Spalte: TP/AK-Patches aller Karten liegen auf derselben Senkrechten */
.prot-arch-card__tp-slot {
    display: flex;
    align-items: center;
    justify-content: center;
    justify-self: center;
    width: 100%;
    min-width: 0;
    flex-shrink: 0;
}

.prot-arch-card__lead {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: nowrap;
    min-width: 0;
}

.prot-arch-tp-patch {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.125rem;
    height: 2.125rem;
    padding: 0;
    border-radius: 50%;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.04em;
    flex-shrink: 0;
    box-sizing: border-box;
    border: 1.5px solid transparent;
}

.prot-arch-tp-patch__abbr {
    line-height: 1;
}

.prot-arch-tp-patch__corner {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 8px;
    font-weight: 900;
    line-height: 1;
    border: 2px solid #fff;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.18);
}

.prot-arch-tp-patch--tp-ok {
    color: #065f46;
    background: linear-gradient(145deg, #ecfdf5, #d1fae5);
    border-color: #34d399;
}

.prot-arch-tp-patch--tp-ok .prot-arch-tp-patch__corner {
    background: #059669;
    color: #fff;
}

.prot-arch-tp-patch--ak-ok {
    color: #1e40af;
    background: linear-gradient(145deg, #eff6ff, #dbeafe);
    border-color: #60a5fa;
}

.prot-arch-tp-patch--ak-ok .prot-arch-tp-patch__corner {
    background: #2563eb;
    color: #fff;
}

.prot-arch-tp-patch--tp-muted {
    color: #475569;
    background: linear-gradient(145deg, #f8fafc, #e2e8f0);
    border-color: #cbd5e1;
}

.prot-arch-tp-patch--tp-muted .prot-arch-tp-patch__corner {
    background: #64748b;
    color: #fff;
}

.prot-arch-tp-patch--tp-alert {
    color: #991b1b;
    background: linear-gradient(145deg, #fef2f2, #fecaca);
    border-color: #f87171;
}

.prot-arch-tp-patch--tp-alert .prot-arch-tp-patch__corner {
    background: #dc2626;
    color: #fff;
}

/* Organisatorisches Protokoll: QM-Patches (eigene Reihe über der Pille) */
.prot-arch-orga-stack {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    max-width: 100%;
    flex-shrink: 0;
}

.prot-arch-orga-patches {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 5px;
    max-width: 17rem;
    line-height: 0;
}

.prot-arch-op {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.42rem;
    height: 1.42rem;
    flex-shrink: 0;
    border-radius: 50%;
    box-sizing: border-box;
    border: 1px solid rgba(15, 23, 42, 0.14);
    vertical-align: middle;
}

.prot-arch-op__svg {
    width: 0.78rem;
    height: 0.78rem;
}

.prot-arch-op__svg--fill {
    width: 0.72rem;
    height: 0.72rem;
}

.prot-arch-op__svg--amb {
    width: 0.82rem;
    height: 0.82rem;
}

.prot-arch-op__abbr {
    font-size: 7px;
    font-weight: 900;
    letter-spacing: 0.02em;
    line-height: 1;
    color: inherit;
}

.prot-arch-op__glyph {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    filter: drop-shadow(0 1px 1px rgba(15, 23, 42, 0.35));
}

.prot-arch-op--cm-muted {
    color: #475569;
    background: linear-gradient(145deg, #f8fafc, #e2e8f0);
    border-color: #cbd5e1;
}
.prot-arch-op--cm-muted .prot-arch-op__glyph {
    color: #475569;
    filter: none;
}

.prot-arch-op--cm-ok {
    background: linear-gradient(145deg, #ecfdf5, #a7f3d0);
    border-color: #34d399;
}
.prot-arch-op--cm-yellow {
    background: linear-gradient(145deg, #fefce8, #fde047);
    border-color: #ca8a04;
}
.prot-arch-op--cm-orange {
    background: linear-gradient(145deg, #fff7ed, #fdba74);
    border-color: #ea580c;
}
.prot-arch-op--cm-red {
    background: linear-gradient(145deg, #fef2f2, #fca5a5);
    border-color: #dc2626;
}

.prot-arch-op--kh-muted {
    background: linear-gradient(145deg, #f8fafc, #e2e8f0);
    border-color: #cbd5e1;
}
.prot-arch-op--kh-muted .prot-arch-op__glyph {
    color: #64748b;
    filter: none;
}

.prot-arch-op--kh-neutral {
    background: linear-gradient(145deg, #f1f5f9, #cbd5e1);
    border-color: #94a3b8;
}
.prot-arch-op--kh-neutral .prot-arch-op__glyph {
    color: #475569;
    filter: none;
}

.prot-arch-op--kh-ok {
    background: linear-gradient(145deg, #ecfdf5, #a7f3d0);
    border-color: #34d399;
}
.prot-arch-op--kh-warn {
    background: linear-gradient(145deg, #fefce8, #fde047);
    border-color: #ca8a04;
}
.prot-arch-op--kh-bad {
    background: linear-gradient(145deg, #fef2f2, #fca5a5);
    border-color: #dc2626;
}

.prot-arch-op--amb .prot-arch-op__amb-fill {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    overflow: hidden;
    z-index: 1;
}

/* Äußere Pillenfläche (wie CM/KH): Farbe unabhängig vom inneren Fill — robuster in allen Browsern */
.prot-arch-op--amb.prot-arch-op--amb-unset {
    background: linear-gradient(145deg, #cbd5e1, #94a3b8);
    border-color: #64748b;
}
.prot-arch-op--amb.prot-arch-op--amb-tier-ok {
    background: linear-gradient(145deg, #d1fae5, #34d399);
    border-color: #059669;
}
.prot-arch-op--amb.prot-arch-op--amb-tier-partial {
    background: linear-gradient(145deg, #fef9c3, #eab308);
    border-color: #ca8a04;
}
.prot-arch-op--amb.prot-arch-op--amb-tier-bad {
    background: linear-gradient(145deg, #fee2e2, #ef4444);
    border-color: #b91c1c;
}
.prot-arch-op--amb.prot-arch-op--amb-tier-ok .prot-arch-op__glyph,
.prot-arch-op--amb.prot-arch-op--amb-tier-partial .prot-arch-op__glyph,
.prot-arch-op--amb.prot-arch-op--amb-tier-bad .prot-arch-op__glyph {
    color: #fff;
    filter: drop-shadow(0 1px 1px rgba(15, 23, 42, 0.35));
}

.prot-arch-op__amb-fill--split {
    display: flex;
    flex-direction: row;
}

.prot-arch-op__amb-left--full {
    width: 100%;
    height: 100%;
}

.prot-arch-op--amb-split .prot-arch-op__amb-left {
    flex: 1;
    height: 100%;
}
.prot-arch-op--amb-split .prot-arch-op__amb-right {
    flex: 1;
    height: 100%;
    background: #2563eb;
}

.prot-arch-op__amb-left--ok {
    background: linear-gradient(180deg, #6ee7b7, #059669);
}
.prot-arch-op__amb-left--partial {
    background: linear-gradient(180deg, #fde047, #ca8a04);
}
.prot-arch-op__amb-left--bad {
    background: linear-gradient(180deg, #fca5a5, #b91c1c);
}
.prot-arch-op__amb-left--muted {
    background: linear-gradient(180deg, #e2e8f0, #94a3b8);
}

/* Ambulanz-Patch ohne auswertbare Checkboxen: dunkleres Slate + dunkles Icon (kein „weiß auf weiß“) */
.prot-arch-op--amb-unset .prot-arch-op__amb-left--muted {
    background: linear-gradient(180deg, #cbd5e1, #64748b);
}
.prot-arch-op--amb-unset .prot-arch-op__glyph {
    color: #0f172a;
    filter: none;
}

/* Fallback (ältere CSS-Caches): muted-Hälfte = dunkles Slate + dunkles Icon */
.prot-arch-op--amb:has(.prot-arch-op__amb-left--muted) .prot-arch-op__glyph {
    color: #0f172a;
    filter: none;
}
.prot-arch-op--amb:has(.prot-arch-op__amb-left--muted) .prot-arch-op__amb-left--muted {
    background: linear-gradient(180deg, #cbd5e1, #64748b);
}

.prot-arch-op--star-muted {
    background: linear-gradient(145deg, #f8fafc, #e2e8f0);
    border-color: #cbd5e1;
}
.prot-arch-op--star-muted .prot-arch-op__glyph {
    color: #64748b;
    filter: none;
}

.prot-arch-op--star-ok {
    background: linear-gradient(145deg, #ecfdf5, #34d399);
    border-color: #059669;
}

.prot-arch-op--star-warn {
    background: linear-gradient(145deg, #fef9c3, #eab308);
    border-color: #ca8a04;
}

.prot-arch-op--star-bad {
    background: linear-gradient(145deg, #fee2e2, #ef4444);
    border-color: #b91c1c;
}

.prot-arch-op--txt-empty {
    background: linear-gradient(145deg, #f8fafc, #e2e8f0);
    border-color: #cbd5e1;
    color: #64748b;
}

.prot-arch-op--txt-filled {
    background: linear-gradient(145deg, #fefce8, #fde047);
    border-color: #ca8a04;
    color: #713f12;
}

.prot-arch-op--txt-empty .prot-arch-op__abbr,
.prot-arch-op--txt-filled .prot-arch-op__abbr {
    filter: none;
}

.prot-arch-einsatz-nr {
    font-size: clamp(1.05rem, 2.4vw, 1.28rem);
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.03em;
    color: #0f172a;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.prot-arch-card__docs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: flex-end;
    justify-content: flex-end;
    min-width: 0;
}

.prot-arch-card__docs--empty {
    min-height: 1rem;
}

button.prot-arch-doc-pill {
    appearance: none;
    margin: 0;
    font: inherit;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2rem;
    padding: 0 13px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 780;
    letter-spacing: 0.03em;
    border: 1px solid #34d399;
    color: #047857;
    background: linear-gradient(155deg, #ecfdf5 0%, #d1fae5 55%, #a7f3d0 120%);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.75) inset,
        0 2px 8px rgba(16, 185, 129, 0.18);
    transition:
        transform 0.14s ease,
        box-shadow 0.14s ease,
        filter 0.14s ease;
}

button.prot-arch-doc-pill:hover {
    filter: brightness(0.98);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.75) inset,
        0 4px 14px rgba(5, 150, 105, 0.28);
}

button.prot-arch-doc-pill:active {
    transform: translateY(1px) scale(0.99);
}

button.prot-arch-doc-pill:focus-visible {
    outline: 2px solid var(--red-primary);
    outline-offset: 2px;
}

button.prot-arch-doc-pill--orga {
    max-width: 11.5rem;
    white-space: normal;
    text-align: center;
    line-height: 1.2;
    padding: 6px 11px;
    min-height: auto;
}

button.prot-arch-doc-pill:disabled,
button.prot-arch-doc-pill.prot-arch-doc-pill--missing:disabled {
    cursor: not-allowed;
    opacity: 0.72;
    filter: grayscale(0.55);
    border-color: #cbd5e1 !important;
    color: #64748b !important;
    background: linear-gradient(145deg, #f8fafc, #e2e8f0) !important;
    box-shadow: none !important;
}

button.prot-arch-doc-pill:disabled:hover,
button.prot-arch-doc-pill:disabled:active {
    transform: none;
    filter: grayscale(0.55);
}

.prot-arch-card__meta .prot-arch-card__datetime {
    align-items: center;
    margin-bottom: 8px;
}

.prot-arch-card__panel .prot-arch-card__fb-wrap {
    margin-top: 6px;
    padding-top: 12px;
    border-top: 1px solid rgba(226, 232, 240, 0.85);
    background: transparent;
}

.prot-arch-card__full-open {
    margin-top: 14px;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 8px;
}

.prot-arch-card__cta-wide.btn-primary {
    width: fit-content;
    max-width: 100%;
    justify-content: center;
    box-sizing: border-box;
    padding: 11px 20px;
    font-size: 14px;
    border-radius: 12px;
    box-shadow: 0 6px 18px rgba(199, 15, 46, 0.26);
}

.prot-arch-card__header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px 16px;
    padding: 16px 16px 14px calc(14px + 4px);
}

.prot-arch-card__header-main {
    flex: 1 1 14rem;
    min-width: 0;
}

.prot-arch-card__datetime {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 6px 10px;
    margin-bottom: 6px;
}

.prot-arch-card__date-line {
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: -0.015em;
    color: #0f172a;
}

.prot-arch-card__time-line {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #64748b;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(241, 245, 249, 0.9);
    border: 1px solid #e2e8f0;
}

.prot-arch-card__test-slot {
    display: inline-flex;
    align-items: center;
}

.prot-arch-card__patient {
    margin: 0 0 10px;
    font-size: 0.9375rem;
    line-height: 1.4;
}

.prot-arch-card__patient-name {
    font-weight: 600;
    color: #1e293b;
}

.prot-arch-card__toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 10px;
}

.prot-arch-pill {
    display: inline-flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 4px 6px;
    padding: 6px 10px 7px;
    border-radius: 10px;
    font-size: 0.875rem;
    font-weight: 600;
    color: #334155;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.prot-arch-card__pdf-strip {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}

.prot-arch-pdf-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 1.85rem;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 750;
    letter-spacing: 0.02em;
    border: 1px solid transparent;
}

.prot-arch-pdf-chip--muted {
    font-weight: 700;
    color: #64748b;
    background: #f8fafc;
    border-color: #e2e8f0;
}

.prot-arch-pdf-chip--yes {
    color: #065f46;
    background: linear-gradient(165deg, #ecfdf5, #d1fae5);
    border-color: #6ee7b7;
}

.prot-arch-pdf-chip--no {
    color: #64748b;
    background: #f1f5f9;
    border-color: #e2e8f0;
    opacity: 0.92;
}

.prot-arch-card__cta.btn-primary {
    padding: 11px 18px;
    font-size: 14px;
    border-radius: 12px;
    box-shadow: 0 6px 18px rgba(199, 15, 46, 0.28);
    flex: 0 0 auto;
    align-self: flex-start;
}

.prot-arch-card__fb-wrap {
    padding: 0 16px 12px calc(14px + 4px);
    border-top: 1px solid rgba(241, 245, 249, 0.95);
    background: linear-gradient(180deg, rgba(248, 250, 252, 0.5), transparent);
}

.prot-arch-card__fb-wrap > .prot-arch-meta-k {
    display: block;
    margin-bottom: 4px;
}

.prot-arch-card__fb {
    display: block;
    margin: 0;
    font-size: 13px;
    line-height: 1.55;
    color: #475569;
    padding: 11px 12px;
    background: rgba(255, 255, 255, 0.85);
    border-radius: 10px;
    border: 1px solid rgba(226, 232, 240, 0.98);
}

.prot-arch-prev-versions {
    margin: 0 16px 12px calc(14px + 4px);
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(226, 232, 240, 0.95);
    border-radius: 10px;
}

.prot-arch-prev-versions__sum {
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: #334155;
    list-style: none;
}

.prot-arch-prev-versions__sum::-webkit-details-marker {
    display: none;
}

.prot-arch-prev-versions__body {
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid rgba(226, 232, 240, 0.9);
}

.prot-arch-rev-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.prot-arch-rev-li {
    padding: 10px 12px;
    background: rgba(248, 250, 252, 0.95);
    border-radius: 9px;
    border: 1px solid rgba(226, 232, 240, 0.85);
}

.prot-arch-rev-li__head {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 12px;
    align-items: baseline;
    margin-bottom: 8px;
    font-size: 12px;
    color: #64748b;
}

.prot-arch-rev-li__who {
    color: #334155;
    font-weight: 500;
}

.prot-arch-rev-li__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.prot-arch-rev-li__docs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.prot-arch-rev-li .prot-arch-doc-pill {
    font-size: 11px;
    padding: 4px 8px;
}

@media (max-width: 620px) {
    .prot-arch-card__cta.btn-primary {
        width: 100%;
        justify-content: center;
    }
}

.prot-arch-card__sum-row::-webkit-details-marker {
    display: none;
}

.prot-arch-card__sum-row::marker {
    content: none;
}

.prot-arch-card__chev-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    margin: -6px -4px -6px 0;
    border-radius: 10px;
    flex-shrink: 0;
}

.prot-arch-card__sum-row:focus-visible .prot-arch-card__chev-wrap {
    outline: 2px solid var(--red-primary);
    outline-offset: 2px;
}

.prot-arch-card__chev {
    display: block;
    width: 0.55rem;
    height: 0.55rem;
    border-right: 2px solid #64748b;
    border-bottom: 2px solid #64748b;
    transform: rotate(45deg);
    transition: transform 0.16s ease, border-color 0.16s ease;
}

.prot-arch-card__details[open] .prot-arch-card__chev {
    transform: rotate(225deg);
    border-color: #64748b;
}

.prot-arch-card__details[open] .prot-arch-card__panel {
    border-radius: 0 0 14px 14px;
    background: linear-gradient(180deg, rgba(254, 242, 242, 0.25), rgba(248, 250, 252, 0.4));
}

.prot-arch-card__panel {
    padding: 0 14px 14px;
    border-top: 1px solid rgba(226, 232, 240, 0.92);
}

.prot-arch-card__grid {
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px 20px;
    margin-top: 4px;
}

@media (min-width: 560px) {
    .prot-arch-card__grid {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        align-items: start;
    }

    .prot-arch-card__cell--full {
        grid-column: 1 / -1;
    }
}

.prot-arch-card__field-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    display: block;
    line-height: 1.35;
    margin-bottom: 2px;
}

.prot-arch-card__cell {
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
}

.prot-arch-card__grid .btn-secondary,
.prot-arch-card__grid .prot-arch-pdf-na,
.prot-arch-card__grid .prot-arch-del-pending {
    width: fit-content;
    max-width: 100%;
    box-sizing: border-box;
}

.prot-arch-card__grid .btn-secondary {
    text-align: center;
}

.prot-arch-card__grid .prot-arch-pdf-na {
    text-align: left;
}

.prot-arch-card__grid .prot-arch-del-pending {
    display: block;
    padding: 8px 10px;
    border-radius: 10px;
    background: #fffbeb;
    border: 1px solid #fde68a;
}
.prot-pdf-share-code {
    font-family: ui-monospace, Menlo, monospace;
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    margin: 8px 0 12px;
    word-break: break-all;
    line-height: 1.45;
}

.prot-pdf-share-meta {
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-muted);
    margin: 8px 0 0;
}

.prot-pdf-share-actions {
    margin-top: 16px;
}

.prot-arch-fb-lines {
    line-height: 1.45;
    overflow-wrap: anywhere;
    word-break: break-word;
    hyphens: auto;
}

.prot-arch-pdf-na {
    font-size: 12px;
    color: var(--text-muted);
    display: block;
    padding: 7px 8px;
    line-height: 1.3;
    border-radius: 10px;
    background: rgba(248, 250, 252, 0.6);
    border: 1px dashed rgba(203, 213, 225, 0.85);
    box-sizing: border-box;
}

.prot-arch-card__grid .btn-secondary {
    font-size: 12px;
    font-weight: 600;
    padding: 9px 16px;
    min-height: 2.35rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1.2;
    border-radius: 10px;
    white-space: nowrap;
}

@media (max-width: 559px) {
    .prot-arch-card__cta-wide.btn-primary {
        width: 100%;
        max-width: none;
    }

    .prot-arch-card__grid .btn-secondary,
    .prot-arch-card__grid .prot-arch-pdf-na,
    .prot-arch-card__grid .prot-arch-del-pending {
        width: 100%;
    }

    .prot-arch-card__grid .btn-secondary {
        white-space: normal;
    }
}
.prot-arch-test {
    display: inline-block;
    padding: 2px 7px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    background: linear-gradient(145deg, #fef3c7, #fde68a);
    color: #92400e;
    border: 1px solid #fcd34d;
}
.prot-archive-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 24px;
    box-sizing: border-box;
}
.prot-archive-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
}
.prot-archive-modal-panel {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: min(960px, 100vw - 32px);
    max-height: min(85vh, 900px);
    background: var(--card);
    border-radius: 16px;
    border: 1px solid var(--border-subtle);
    box-shadow: 0 24px 48px rgba(15, 23, 42, 0.15);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.prot-archive-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-subtle);
}
.prot-archive-modal-header h3 {
    margin: 0;
    font-size: 1.05rem;
    flex: 1 1 200px;
    min-width: 0;
    line-height: 1.35;
    overflow-wrap: anywhere;
}
.prot-archive-modal-header .btn-secondary {
    flex-shrink: 0;
}
.prot-archive-modal-body {
    padding: 0;
    overflow: auto;
    flex: 1;
    -webkit-overflow-scrolling: touch;
}

#prot-pdf-share-modal .prot-archive-modal-body {
    padding: 16px 20px 22px;
    box-sizing: border-box;
}

#prot-pdf-share-modal .prot-pdf-share-meta a {
    word-break: break-all;
}
.prot-archive-layout {
    padding: 0 0 8px;
}
.prot-archive-doc {
    padding: 8px 20px 24px;
    max-width: 880px;
    margin: 0 auto;
}
.prot-archive-doc-head {
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-subtle);
}
.prot-archive-doc-title {
    margin: 0 0 8px;
    font-size: clamp(1.25rem, 2.5vw, 1.5rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-main);
}
.prot-archive-doc-meta {
    margin: 0;
    font-size: 14px;
    color: var(--text-muted);
}
.prot-archive-qm-note {
    margin: 0 0 18px;
    padding: 12px 14px;
    font-size: 13px;
    line-height: 1.55;
    color: #334155;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 10px;
}
.prot-archive-doc--qm .prot-archive-section-title {
    color: #0f766e;
}
    margin-bottom: 22px;
    padding: 16px 18px;
    background: rgba(255, 255, 255, 0.75);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
}
.prot-archive-section-title {
    margin: 0 0 14px;
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--red-primary);
}
.prot-archive-dl {
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
    font-size: 14px;
}
.prot-archive-kv {
    display: grid;
    grid-template-columns: minmax(110px, 190px) 1fr;
    gap: 4px 14px;
    align-items: start;
}
.prot-archive-kv--full {
    grid-template-columns: 1fr;
}
.prot-archive-dl dt {
    margin: 0;
    color: var(--text-muted);
    font-weight: 500;
    font-size: 13px;
    line-height: 1.4;
}
.prot-archive-dl dd {
    margin: 0;
    color: var(--text-main);
    line-height: 1.45;
    min-width: 0;
}
.prot-archive-textblock {
    white-space: pre-wrap;
    word-break: break-word;
    line-height: 1.5;
    font-size: 14px;
}
.prot-archive-pill {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
}
.prot-archive-line {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
}
.prot-archive-material-head {
    margin: 12px 0 8px;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-main);
}
.prot-archive-section .prot-archive-material-head:first-of-type {
    margin-top: 0;
}
.prot-archive-material-sig {
    display: block;
    max-width: 280px;
    max-height: 140px;
    width: auto;
    height: auto;
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    background: #fff;
}
.prot-archive-table-wrap {
    overflow-x: auto;
    margin: 0 -4px;
    border-radius: 8px;
    border: 1px solid var(--border-subtle);
}
.prot-archive-data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    min-width: 480px;
}
.prot-archive-data-table th,
.prot-archive-data-table td {
    padding: 8px 10px;
    text-align: left;
    border-bottom: 1px solid var(--border-subtle);
    vertical-align: top;
}
.prot-archive-data-table thead th {
    background: rgba(199, 15, 46, 0.06);
    font-weight: 600;
    color: #334155;
    white-space: nowrap;
}
.prot-archive-data-table tbody tr:hover td {
    background: rgba(255, 255, 255, 0.6);
}
.prot-archive-data-table tbody tr:last-child td {
    border-bottom: none;
}
.prot-archive-err {
    margin: 16px 20px;
    color: #b91c1c;
    font-size: 14px;
}
.prot-archive-testnote {
    margin: 16px 20px;
    padding: 12px 14px;
    background: #fef9c3;
    border-radius: 10px;
    border: 1px solid #fde047;
    font-size: 14px;
}
.prot-archive-raw {
    margin: 20px;
    padding: 0 4px 16px;
}
.prot-archive-raw summary {
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 8px;
}
.prot-archive-raw summary:hover {
    color: var(--red-primary);
}
.prot-archive-pre {
    margin: 0;
    padding: 14px 16px;
    font-size: 11px;
    line-height: 1.45;
    white-space: pre-wrap;
    word-break: break-word;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    max-height: 280px;
    overflow: auto;
}
.prot-archive-modal-body .prot-archives-loading {
    padding: 24px 20px;
    text-align: center;
    color: var(--text-muted);
}

@media (max-width: 640px) {
    .site-nav { padding: 10px 14px; }
    .org-members-table {
        font-size: 13px;
    }
    .org-members-table thead th,
    .org-members-table tbody td {
        padding: 10px 12px;
    }
}

/* Einsatzzentrale eingebettet (EZ2 / Med-Evac): Rot-Weiß wie einsatzzentrale2, Module im Raster */
body.ez2-map-embed .member-portal-topbar,
body.ez2-map-embed .member-portal-sidebar,
body.ez2-map-embed .member-portal-nav-backdrop {
    display: none !important;
}

body.ez2-map-embed .member-portal-workspace {
    display: block;
}

body.ez2-map-embed .member-portal-content > .auth-gate,
body.ez2-map-embed .member-portal-content > #member-main {
    max-width: none;
    margin-left: 0;
    margin-right: 0;
}

body.ez2-map-embed .dash-actions {
    display: none !important;
}

body.ez2-map-embed .site-header,
body.ez2-map-embed .member-hero {
    display: none !important;
}

body.ez2-map-embed #member-main.page-wrap {
    padding: 8px 10px 14px;
    max-width: none;
    background: #ececee;
    color: #111;
    box-sizing: border-box;
}

body.ez2-map-embed .dash-grid {
    display: block;
}

body.ez2-map-embed .dash-card:not(.dash-card-active-einsatz) {
    display: none !important;
}

body.ez2-map-embed .dash-card-active-einsatz {
    padding: 0;
    background: transparent;
    border: none;
    box-shadow: none;
}

body.ez2-map-embed .dash-card-active-einsatz > h3:first-of-type,
body.ez2-map-embed .dash-einsatz-lead,
body.ez2-map-embed #dash-laufende-einsaetze-body,
body.ez2-map-embed .dash-einsatz-toolbar {
    display: none !important;
}

body.ez2-map-embed #dash-einsatz-form-heading {
    display: none !important;
}

body.ez2-map-embed .einsatz-vorbereitung-card.dash-einsatz-form-card,
body.ez2-map-embed .einsatz-vorbereitung-card {
    max-width: none;
    width: 100%;
    padding: 0;
    margin: 0;
    border: none;
    box-shadow: none;
    background: transparent;
}

body.ez2-map-embed .prot-dispatch-form-inner--ez2-embed {
    background: #fff;
    border-radius: 12px;
    padding: 12px 14px 14px;
    border: 1px solid #d8d8dc;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
    border-top: 4px solid #c00;
    color: #111;
    font-size: 14px;
    line-height: 1.45;
}

body.ez2-map-embed .prot-dispatch-form-inner--ez2-embed .pd-form-title {
    margin: 0 0 4px;
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #c00;
}

body.ez2-map-embed .prot-dispatch-form-inner--ez2-embed .pd-form-hint {
    margin: 0 0 8px;
    font-size: 12px;
    line-height: 1.45;
    color: #444;
}

body.ez2-map-embed .prot-dispatch-form-inner--ez2-embed .pd-recipients {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 8px 12px;
    margin-bottom: 10px;
    padding: 10px 12px;
    background: #fafafa;
    border: 1px solid #e8e8ec;
    border-radius: 10px;
    border-left: 3px solid #c00;
}

body.ez2-map-embed .prot-dispatch-form-inner--ez2-embed .pd-rec-label {
    font-size: 13px;
    margin: 0;
}

body.ez2-map-embed .prot-dispatch-form-inner--ez2-embed .pd-rec-meta {
    color: #666;
}

body.ez2-map-embed .pd-embed-section-nav {
    display: flex;
    gap: 6px;
    margin: 4px 0 0;
    padding: 6px 6px 0;
    background: #d8d8dc;
    border-radius: 10px 10px 0 0;
    border: 1px solid #c4c4c8;
    border-bottom: none;
}

body.ez2-map-embed .pd-embed-tab {
    flex: 1;
    margin: 0;
    padding: 10px 12px;
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    border-radius: 8px 8px 0 0;
    background: transparent;
    color: #333;
}

body.ez2-map-embed .pd-embed-tab:hover {
    background: rgba(255, 255, 255, 0.55);
    color: #000;
}

body.ez2-map-embed .pd-embed-tab.is-active {
    background: #c00;
    color: #fff;
    font-weight: 800;
    box-shadow: 0 2px 8px rgba(204, 0, 0, 0.35);
}

body.ez2-map-embed .prot-dispatch-form-inner--ez2-embed .pd-embed-panels {
    margin: 0 -2px;
    padding: 10px 2px 0;
    border-top: 1px solid #c4c4c8;
    background: #fff;
}

body.ez2-map-embed .prot-dispatch-form-inner--ez2-embed .pd-embed-panel {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 12px;
    align-items: start;
}

body.ez2-map-embed .pd-embed-panel[hidden] {
    display: none !important;
}

body.ez2-map-embed .prot-dispatch-form-inner--ez2-embed .pd-embed-panel[data-pd-embed-panel="patient"] > .pd-fieldset:last-child {
    grid-column: 1 / -1;
}

body.ez2-map-embed .prot-dispatch-form-inner--ez2-embed .pd-embed-panel[data-pd-embed-panel="transport"] > datalist {
    grid-column: 1 / -1;
    height: 0;
    margin: 0;
    padding: 0;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
}

body.ez2-map-embed .prot-dispatch-form-inner--ez2-embed .pd-embed-panel[data-pd-embed-panel="transport"] > fieldset:first-of-type {
    grid-column: 1 / -1;
}

body.ez2-map-embed .prot-dispatch-form-inner--ez2-embed .pd-fieldset {
    margin: 0;
    padding: 10px 12px 12px;
    border: 1px solid #d8d8dc;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    border-left: 3px solid #c00;
}

body.ez2-map-embed .prot-dispatch-form-inner--ez2-embed .pd-fieldset legend {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #c00;
    padding: 0 4px 0 0;
}

body.ez2-map-embed .prot-dispatch-form-inner--ez2-embed .pd-fieldset > label {
    font-size: 12px;
    margin-bottom: 6px;
    color: #222;
    max-width: min(100%, 22rem);
}

body.ez2-map-embed .prot-dispatch-form-inner--ez2-embed .pd-fieldset > label:has(#pd-adr),
body.ez2-map-embed .prot-dispatch-form-inner--ez2-embed .pd-fieldset > label:has(#pd-tel),
body.ez2-map-embed .prot-dispatch-form-inner--ez2-embed .pd-fieldset > label:has(#pd-ab-search),
body.ez2-map-embed .prot-dispatch-form-inner--ez2-embed .pd-fieldset > label:has(#pd-ab-adr),
body.ez2-map-embed .prot-dispatch-form-inner--ez2-embed .pd-fieldset > label:has(#pd-zk-search),
body.ez2-map-embed .prot-dispatch-form-inner--ez2-embed .pd-fieldset > label:has(#pd-zk-adr) {
    max-width: min(100%, 40rem);
}

body.ez2-map-embed .prot-dispatch-form-inner--ez2-embed .pd-fieldset .pd-sug-panel {
    max-width: 100%;
}

body.ez2-map-embed .prot-dispatch-form-inner--ez2-embed #pd-add-leg {
    border: 1px solid #c4c4c8;
    background: #fff;
    color: #111;
    font-weight: 600;
}

body.ez2-map-embed .prot-dispatch-form-inner--ez2-embed #pd-add-leg:hover {
    border-color: #c00;
    color: #c00;
}

body.ez2-map-embed .prot-dispatch-form-inner--ez2-embed .pd-input,
body.ez2-map-embed .prot-dispatch-form-inner--ez2-embed .pd-textarea {
    margin-top: 2px;
    padding: 7px 10px;
    font-size: 14px;
    border: 1px solid #c4c4c8;
    border-radius: 8px;
    background: #fff;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

body.ez2-map-embed .prot-dispatch-form-inner--ez2-embed .pd-input:hover,
body.ez2-map-embed .prot-dispatch-form-inner--ez2-embed .pd-textarea:hover {
    border-color: #a1a1aa;
}

body.ez2-map-embed .prot-dispatch-form-inner--ez2-embed .pd-input:focus,
body.ez2-map-embed .prot-dispatch-form-inner--ez2-embed .pd-textarea:focus {
    outline: none;
    border-color: #c00;
    box-shadow: 0 0 0 3px rgba(204, 0, 0, 0.18);
}

body.ez2-map-embed .prot-dispatch-form-inner--ez2-embed #pd-einsatz,
body.ez2-map-embed .prot-dispatch-form-inner--ez2-embed #pd-geb,
body.ez2-map-embed .prot-dispatch-form-inner--ez2-embed #pd-transportdatum {
    max-width: 11rem;
}

body.ez2-map-embed .prot-dispatch-form-inner--ez2-embed #pd-geschlecht,
body.ez2-map-embed .prot-dispatch-form-inner--ez2-embed #pd-transportscore {
    max-width: 16rem;
}

body.ez2-map-embed .prot-dispatch-form-inner--ez2-embed .pd-member-sel {
    max-width: min(100%, 22rem);
    width: 100%;
    margin-bottom: 6px;
}

body.ez2-map-embed .prot-dispatch-form-inner--ez2-embed .pd-input--date,
body.ez2-map-embed .prot-dispatch-form-inner--ez2-embed .pd-input--time,
body.ez2-map-embed .prot-dispatch-form-inner--ez2-embed input[type="date"],
body.ez2-map-embed .prot-dispatch-form-inner--ez2-embed input[type="time"] {
    font-variant-numeric: tabular-nums;
    min-height: 2.4rem;
}

body.ez2-map-embed .prot-dispatch-form-inner--ez2-embed .pd-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, max-content));
    gap: 8px 14px;
    margin-bottom: 6px;
    width: fit-content;
    max-width: 100%;
}

body.ez2-map-embed .prot-dispatch-form-inner--ez2-embed .pd-row > label {
    margin-bottom: 0;
    width: max-content;
    max-width: min(100%, 17rem);
}

body.ez2-map-embed .prot-dispatch-form-inner--ez2-embed .pd-row > label .pd-input,
body.ez2-map-embed .prot-dispatch-form-inner--ez2-embed .pd-row > label select {
    width: 100%;
    min-width: 6.5rem;
}

body.ez2-map-embed .prot-dispatch-form-inner--ez2-embed .pd-row--transport-meta,
body.ez2-map-embed .prot-dispatch-form-inner--ez2-embed .pd-row--dob-sex {
    grid-template-columns: minmax(0, max-content) minmax(0, max-content);
}

body.ez2-map-embed .prot-dispatch-form-inner--ez2-embed .pd-row--street-hn {
    grid-template-columns: minmax(8rem, 20rem) minmax(3.5rem, 5rem);
}

body.ez2-map-embed .prot-dispatch-form-inner--ez2-embed .pd-input--hn {
    max-width: 100%;
    text-align: center;
}

body.ez2-map-embed .prot-dispatch-form-inner--ez2-embed .pd-hint {
    font-size: 12px;
    color: #555;
}

body.ez2-map-embed .prot-dispatch-form-inner--ez2-embed .pd-check {
    margin-bottom: 6px;
    font-size: 13px;
}

body.ez2-map-embed .prot-dispatch-form-inner--ez2-embed .pd-submit,
body.ez2-map-embed .prot-dispatch-form-inner--ez2-embed #prot-dispatch-submit,
body.ez2-map-embed .prot-dispatch-form-inner--ez2-embed #prot-dispatch-push {
    margin-top: 12px;
    width: 100%;
    padding: 11px 16px;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border-radius: 10px;
    border: none;
    background: #c00;
    color: #fff;
    box-shadow: 0 2px 10px rgba(204, 0, 0, 0.35);
    cursor: pointer;
}

body.ez2-map-embed .prot-dispatch-form-inner--ez2-embed #prot-dispatch-submit:hover,
body.ez2-map-embed .prot-dispatch-form-inner--ez2-embed #prot-dispatch-push:hover {
    background: #a00;
}

body.ez2-map-embed .prot-dispatch-form-inner--ez2-embed .pd-embed-actions {
    margin-top: 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

body.ez2-map-embed .prot-dispatch-form-inner--ez2-embed #prot-dispatch-push {
    margin-top: 0;
}

body.ez2-map-embed .prot-dispatch-form-inner--ez2-embed #prot-dispatch-save {
    margin-top: 0;
    background: #fff;
    color: #18181b;
    border: 1px solid #d4d4d8;
    box-shadow: none;
    font-weight: 700;
}

body.ez2-map-embed .prot-dispatch-form-inner--ez2-embed #prot-dispatch-save:hover {
    background: #f4f4f5;
    border-color: #a1a1aa;
    color: #18181b;
}

body.ez2-map-embed .prot-dispatch-form-inner--ez2-embed .pd-embed-sync-status {
    margin: 0;
    font-size: 12px;
    color: #4b5563;
    min-height: 1.2em;
}

body.ez2-map-embed .prot-dispatch-form-inner--ez2-embed .pd-embed-sync-status.is-err {
    color: #b91c1c;
    font-weight: 600;
}

body.ez2-map-embed .prot-dispatch-form-inner--ez2-embed .pd-embed-hint {
    margin-top: 10px;
    font-size: 12px;
    color: #6b7280;
}

body.ez2-map-embed .prot-dispatch-msg {
    border-radius: 10px;
    margin-bottom: 10px;
    font-size: 13px;
    border-width: 1px;
}

body.ez2-map-embed .prot-dispatch-msg.ok {
    background: #f0fdf4;
    color: #166534;
    border-color: #bbf7d0;
}

body.ez2-map-embed .prot-dispatch-msg.err {
    background: #fff5f5;
    color: #c00;
    border-color: #fecaca;
}

@media (max-width: 720px) {
    body.ez2-map-embed .prot-dispatch-form-inner--ez2-embed .pd-embed-panel {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    body.ez2-map-embed .prot-dispatch-form-inner--ez2-embed .pd-embed-panel[data-pd-embed-panel="patient"] > .pd-fieldset:last-child {
        grid-column: 1;
    }

    body.ez2-map-embed .prot-dispatch-form-inner--ez2-embed .pd-embed-panel[data-pd-embed-panel="transport"] > fieldset:first-of-type {
        grid-column: 1;
    }

    body.ez2-map-embed .prot-dispatch-form-inner--ez2-embed .pd-fieldset > label {
        max-width: none;
    }

    body.ez2-map-embed .prot-dispatch-form-inner--ez2-embed .pd-fieldset > label:has(#pd-adr),
    body.ez2-map-embed .prot-dispatch-form-inner--ez2-embed .pd-fieldset > label:has(#pd-tel),
    body.ez2-map-embed .prot-dispatch-form-inner--ez2-embed .pd-fieldset > label:has(#pd-ab-search),
    body.ez2-map-embed .prot-dispatch-form-inner--ez2-embed .pd-fieldset > label:has(#pd-ab-adr),
    body.ez2-map-embed .prot-dispatch-form-inner--ez2-embed .pd-fieldset > label:has(#pd-zk-search),
    body.ez2-map-embed .prot-dispatch-form-inner--ez2-embed .pd-fieldset > label:has(#pd-zk-adr) {
        max-width: none;
    }
}

@media (max-width: 560px) {
    body.ez2-map-embed .prot-dispatch-form-inner--ez2-embed .pd-recipients {
        grid-template-columns: 1fr;
    }

    body.ez2-map-embed .prot-dispatch-form-inner--ez2-embed .pd-row,
    body.ez2-map-embed .prot-dispatch-form-inner--ez2-embed .pd-row--transport-meta,
    body.ez2-map-embed .prot-dispatch-form-inner--ez2-embed .pd-row--dob-sex,
    body.ez2-map-embed .prot-dispatch-form-inner--ez2-embed .pd-row--street-hn {
        grid-template-columns: 1fr;
        width: 100%;
    }

    body.ez2-map-embed .prot-dispatch-form-inner--ez2-embed .pd-row > label {
        width: 100%;
        max-width: none;
    }
}

body.ez2-map-embed .prot-dispatch-form-inner--ez2-embed .pd-leg-row {
    background: #fff;
    border: 1px solid #d8d8dc;
    border-left: 3px solid #c00;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}
