/* ─── BASE & HEADER (synchronized with ueber-uns.html) ──────────────────── */

:root {
    --primary-color: #255879;
    --primary-hover: rgba(40, 167, 69, 0.1);
    --font-main: 'Poppins', sans-serif;
    --font: 'Poppins', sans-serif;
    --background-gray: #f5f5f5;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
}

img, svg {
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    pointer-events: auto;
}

img, svg {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

* {
    cursor: default;
}

button, a, .menu-toggle, .user-profile, .dropdown-item, .menu-dropdown-item,
.login-button, .add-entry-header-btn, .footer-social-icon, .profile-name,
.profile-avatar, .menu-toggle svg, .footer-social-icon svg, h1[onclick],
.header-logo, .header-logo img, input, textarea, select {
    cursor: pointer !important;
}

html {
    scrollbar-width: none;
    overflow-x: hidden;
    scroll-behavior: smooth;
}
html::-webkit-scrollbar { display: none; }

body {
    font-family: var(--font-main);
    line-height: 1.6;
    color: #666;
    background-color: white;
    display: flex;
    flex-direction: column;
    padding-bottom: 0;
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: hidden;
    width: 100%;
}

button, input, select, textarea {
    font-family: var(--font-main);
}

/* ─── HEADER ─── */
header {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    height: 8vh;
    background-color: var(--primary-color);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-bottom: 0.1vh solid rgba(204, 204, 204, 0.3);
    color: white;
    padding: 0 2vw;
    margin: 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    width: 100%;
}

.header-left { justify-self: start; }
.header-right { justify-self: end; position: relative; display: flex; align-items: center; height: 100%; }

.menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    transition: background 0.18s ease;
}
.menu-toggle:hover { background: rgba(255, 255, 255, 0.12); }
.menu-toggle:active { background: rgba(255, 255, 255, 0.08); }
.menu-toggle svg {
    width: 22px;
    height: 22px;
    min-width: 22px;
    min-height: 22px;
}

.menu-dropdown {
    position: fixed;
    top: 8vh;
    left: 0;
    right: 0;
    width: 100%;
    background: white;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    z-index: 999;
    display: none;
    padding: 4vh 0;
}
.menu-dropdown.show {
    display: flex;
    justify-content: center;
}
.menu-dropdown-columns {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 11vw;
    padding: 0 2vw;
    position: relative;
}
.menu-dropdown-column { padding: 0; }
.menu-dropdown-column-title {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 18px;
    padding: 1.5vh 0 1vh 0;
    margin-bottom: 0.5vh;
}
.menu-dropdown-item {
    padding: 0.8vh 0;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    font-size: 16px;
    font-family: var(--font-main);
    transition: color 0.2s ease;
    color: #555;
    display: block;
    line-height: 1.4;
    font-weight: 500;
}
.menu-dropdown-item:hover { color: var(--primary-color); }
.menu-dropdown-item.active { color: var(--primary-color); font-weight: 600; }
.menu-dropdown-footer {
    position: absolute;
    bottom: 2vh;
    right: 2vw;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.8vh;
}
.menu-dropdown-social { display: flex; gap: 15px; }
.menu-dropdown-social-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #255879 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s ease;
    flex-shrink: 0;
}
.menu-dropdown-social-icon:hover { background-color: #1e4a5f !important; transform: scale(1.1); }
.menu-dropdown-social-icon svg { width: 20px; height: 20px; fill: white; }

.header-logo-container { justify-self: center; overflow: visible; height: 8vh; display: flex; align-items: center; }
.header-logo {
    display: flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    color: white !important;
    font-size: 0;
    font-weight: 700;
}
.header-logo img:not(.header-logo-wordmark) {
    height: 34px;
    width: auto;
    filter: brightness(0) invert(1);
    opacity: 0.95;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: smooth;
}
.header-logo-wordmark-wrap {
    height: 26px;
    width: 126px;
    background-image: url('/images/fillZone.svg');
    background-size: auto 76px;
    background-position: -14.5px -22.9px;
    background-repeat: no-repeat;
}
.header-logo-wordmark { display: none; }

.user-profile {
    display: flex;
    align-items: center;
    gap: 9px;
    cursor: pointer;
    padding: 8px 26px 8px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(20px) saturate(1.8);
    -webkit-backdrop-filter: blur(20px) saturate(1.8);
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
    position: relative;
}
.user-profile:hover {
    background: rgba(255, 255, 255, 1);
    border-color: rgba(255, 255, 255, 0.8);
}
.user-profile:active {
    background: rgba(245, 245, 247, 0.95);
    transform: scale(0.97);
}
.profile-avatar {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #255879;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 12px;
    letter-spacing: 0.01em;
    overflow: visible;
    position: relative;
    flex-shrink: 0;
    box-sizing: border-box;
    box-shadow: 0 0 0 2px #ffffff, 0 0 0 3.5px #255879;
}
.profile-avatar > * { border-radius: 50%; overflow: hidden; }
.profile-avatar.has-image {
    background: #e8eef2;
    font-size: 0;
    border: none;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
}
.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    border-radius: 50%;
    display: block;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}
.profile-avatar.wide-image img {
    max-width: 90%;
    max-height: 60%;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 0;
}
.profile-name {
    color: #255879 !important;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: -0.01em;
    max-width: 140px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
}
.dropdown-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: rgba(250, 250, 252, 0.88);
    backdrop-filter: blur(40px) saturate(1.8);
    -webkit-backdrop-filter: blur(40px) saturate(1.8);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 14px;
    box-shadow:
        0 4px 6px rgba(0, 0, 0, 0.04),
        0 12px 40px rgba(0, 0, 0, 0.16);
    min-width: 200px;
    z-index: 1000;
    display: none;
    overflow: hidden;
    padding: 6px 0;
}
.dropdown-menu.show { display: block; }
.dropdown-item {
    padding: 10px 18px;
    cursor: pointer;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    font-size: 13.5px;
    font-family: var(--font-main);
    color: #1d1d1f;
    font-weight: 400;
    letter-spacing: -0.01em;
    transition: background-color 0.15s ease;
    border-radius: 0;
}
.dropdown-item:hover { background-color: rgba(0, 0, 0, 0.05); }
.dropdown-item:not(:last-child) { border-bottom: 1px solid rgba(0, 0, 0, 0.06); }
.dropdown-item:last-child { color: #ff3b30; }

/* ─── FOOTER ─── */
.a-footer-section {
    background-color: var(--primary-color);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 0;
    width: 100vw;
    margin-left: calc(50% - 50vw);
}
.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background-color: var(--primary-color);
    width: 100%;
    padding: 60px 40px;
    box-sizing: border-box;
    position: relative;
}
.footer-links {
    display: flex;
    justify-content: space-between;
    gap: 2vw;
    margin-bottom: 40px;
    flex-wrap: nowrap;
    padding: 0 5vw;
    width: 100%;
}
.footer-column {
    text-align: left;
    min-width: 0;
    flex: 1;
    max-width: 250px;
    color: white;
}
.footer-column h3 {
    font-size: 20px;
    font-weight: 600;
    color: white;
    margin-bottom: 20px;
    border-bottom: 2px solid white;
    padding-bottom: 8px;
}
.footer-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.footer-column li {
    margin-bottom: 4px;
    color: white !important;
    font-size: 16px;
    opacity: 1 !important;
    line-height: 1.5;
}
.footer-column a {
    color: white !important;
    text-decoration: none;
    font-size: 16px;
    font-weight: 400;
    transition: all 0.3s ease;
    opacity: 1 !important;
}
.footer-column a:hover {
    opacity: 1;
    color: white;
    text-decoration: underline;
}
.social-icons {
    display: flex;
    gap: 15px;
    justify-content: flex-start;
    align-items: center;
}
.social-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: white !important;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    text-decoration: none;
    opacity: 1 !important;
    backdrop-filter: none !important;
    filter: none !important;
}
.social-icon:hover {
    background-color: rgba(255, 255, 255, 0.8) !important;
    transform: scale(1.1);
}
.social-icon svg {
    width: 20px;
    height: 20px;
    fill: var(--primary-color);
    opacity: 1;
}
.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 30px;
    margin-top: 20px;
    width: 100%;
}
.footer-bottom p {
    color: white;
    font-size: 14px;
    opacity: 0.8;
    margin: 0;
}

/* ─── RESPONSIVE HEADER & FOOTER ─── */
@media (max-width: 1024px) {
    header {
        grid-template-columns: 1fr auto 1fr;
        padding: 0 15px;
        z-index: 1000 !important;
    }
    .header-logo-wordmark-wrap { display: none; }
    .menu-toggle svg {
        width: 20px !important;
        height: 20px !important;
        min-width: 20px !important;
        min-height: 20px !important;
    }
    .menu-dropdown {
        top: 8vh !important;
        padding: 0 !important;
        height: auto !important;
        max-height: calc(100vh - 8vh) !important;
        overflow-y: auto !important;
        border-bottom: 1px solid rgba(204, 204, 204, 0.3) !important;
        box-shadow: 0 4px 10px rgba(0,0,0,0.1) !important;
        display: none;
        width: 100% !important;
        min-width: auto !important;
        left: 0 !important;
        right: 0 !important;
    }
    .menu-dropdown.show { display: flex !important; flex-direction: column !important; }
    .menu-dropdown-columns {
        display: flex !important;
        flex-direction: column !important;
        gap: 0 !important;
        padding: 0 !important;
        width: 100% !important;
    }
    .menu-dropdown-column {
        width: 100% !important;
        border-bottom: 1px solid rgba(37, 88, 121, 0.1);
        padding: 0 !important;
    }
    .menu-dropdown-column:last-child { border-bottom: none !important; }
    .menu-dropdown-column-title {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        cursor: pointer !important;
        padding: 15px 20px !important;
        margin: 0 !important;
        font-size: 16px !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    .menu-dropdown-column-title::after {
        content: '\25BC';
        font-size: 10px;
        transition: transform 0.3s ease;
        color: #255879;
    }
    .menu-dropdown-column.active .menu-dropdown-column-title::after { transform: rotate(180deg); }
    .menu-dropdown-item {
        display: none !important;
        padding: 12px 30px !important;
        font-size: 14px !important;
        text-align: left !important;
        width: 100% !important;
        background: transparent !important;
        border: none !important;
        color: #555 !important;
    }
    .menu-dropdown-column.active .menu-dropdown-item { display: block !important; }
    .menu-dropdown-column.active .menu-dropdown-item.auth-hidden { display: none !important; }
    .menu-dropdown-footer { display: none !important; }
    .profile-name { display: none !important; }
    .profile-avatar {
        width: 22px !important;
        height: 22px !important;
        font-size: 10px !important;
        box-shadow: 0 0 0 2px #ffffff, 0 0 0 3.5px #255879 !important;
    }
    .user-profile {
        padding: 3px !important;
        gap: 0 !important;
    }
    .user-profile:hover {
        background: rgba(255, 255, 255, 1) !important;
    }
    .dropdown-item {
        font-size: 14px !important;
        padding: 12px 18px;
    }
    .dropdown-menu {
        min-width: 190px !important;
    }
    .footer-links {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .footer-links {
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
        gap: 40px !important;
        padding: 0 20px;
    }
    .footer-content {
        padding: 40px 20px;
    }
    .footer-column {
        text-align: center !important;
        width: 100% !important;
        max-width: none !important;
    }
    .footer-column h3 {
        display: inline-block !important;
        width: auto !important;
        margin-bottom: 15px !important;
        font-size: 16px;
    }
    .footer-column li {
        font-size: 14px;
    }
    .footer-column a {
        font-size: 14px;
    }
    .social-icons {
        justify-content: center !important;
    }
}

@media (max-width: 480px) {
    .a-footer-section {
        margin-top: 0 !important;
    }
    .footer-content {
        padding: 30px 15px !important;
    }
    .footer-links {
        padding: 0 !important;
    }
}

/* ─── ANGEBOTE PAGE ─────────────────────────────────────────────────────── */

.angebote-main {
    min-height: calc(100vh - 8vh);
    /* identisch zu login.html: leichter blauer „Regenbogen“-Verlauf */
    background:
        radial-gradient(55% 45% at 90% 0%, rgba(90, 168, 208, 0.16) 0%, rgba(90, 168, 208, 0) 70%),
        radial-gradient(60% 50% at 8% 100%, rgba(37, 88, 121, 0.09) 0%, rgba(37, 88, 121, 0) 70%),
        linear-gradient(180deg, #f9fbfc 0%, #eef2f6 100%);
    padding-top: 8vh !important;
}

/* ─── FILTER BAR ─── */
.angebote-filter-section {
    background: white;
    border-bottom: 1px solid rgba(0,0,0,0.06);
    position: fixed;
    top: 8vh;
    left: 0;
    right: 0;
    z-index: 10;
}

.angebote-filter-inner {
    box-sizing: content-box;
    max-width: 1240px; /* identisch zu .angebote-cards-inner → Filter bündig mit dem Grid */
    margin: 0 auto;
    padding: 0 24px;
}

.angebote-filters {
    display: flex;
    gap: 6px;
    padding: 12px 0;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.angebote-filters::-webkit-scrollbar { display: none; }

.af-pill {
    display: inline-flex;
    align-items: center;
    height: 32px;
    padding: 0 14px;
    border-radius: 50px;
    font-family: var(--font, -apple-system, BlinkMacSystemFont, 'SF Pro Text', sans-serif);
    font-size: 13px;
    font-weight: 500;
    border: 1.5px solid rgba(0,0,0,0.12);
    background: white;
    color: #3c3c43;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.18s ease;
    -webkit-tap-highlight-color: transparent;
}

.af-pill:hover {
    border-color: #1d1d1f;
    color: #1d1d1f;
}

.af-pill.af-pill-active {
    background: #1d1d1f;
    border-color: #1d1d1f;
    color: white;
}

/* ─── CARDS SECTION ─── */
.angebote-cards-section {
    padding: 76px 24px 80px;
    min-height: calc(100vh - 8vh);
}

.angebote-cards-inner {
    max-width: 1240px;
    margin: 0 auto;
}

/* ─── LOADING ─── */
.angebote-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 80px 0;
    color: #6e6e73;
    font-size: 14px;
}

.angebote-spinner {
    width: 28px;
    height: 28px;
    border: 2.5px solid rgba(0,0,0,0.1);
    border-top-color: #1d1d1f;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

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

/* ─── LOGIN GATE ─── */
.angebote-gate {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 80px 24px;
    gap: 12px;
}

.gate-icon {
    width: 56px;
    height: 56px;
    color: #6e6e73;
    margin-bottom: 4px;
}

.gate-icon svg { width: 100%; height: 100%; }

.gate-title {
    font-size: 20px;
    font-weight: 600;
    color: #1d1d1f;
    letter-spacing: -0.02em;
    margin: 0;
}

.gate-text {
    font-size: 14px;
    color: #6e6e73;
    line-height: 1.5;
    margin: 0;
    max-width: 320px;
}

.gate-btn {
    margin-top: 8px;
    height: 44px;
    padding: 0 28px;
    border-radius: 50px;
    background: #1d1d1f;
    color: white;
    font-family: var(--font, -apple-system, BlinkMacSystemFont, 'SF Pro Text', sans-serif);
    font-size: 14px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: opacity 0.15s ease;
}

.gate-btn:hover { opacity: 0.82; }
.gate-btn:active { opacity: 0.7; }

/* ─── EMPTY STATE ─── */
.angebote-empty {
    text-align: center;
    padding: 80px 0;
    color: #6e6e73;
    font-size: 14px;
}

/* ─── GRID ─── */
.angebote-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

/* ─── CARD ─── */
.angebot-card {
    background: white;
    border-radius: 16px;
    border: 1px solid rgba(0,0,0,0.07);
    box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 4px 16px rgba(0,0,0,0.04);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding: 14px 16px;
    cursor: pointer;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
    -webkit-tap-highlight-color: transparent;
    gap: 12px;
}

.angebot-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.09), 0 1px 3px rgba(0,0,0,0.04);
    transform: translateY(-2px);
}

.angebot-card:active {
    transform: scale(0.98);
}

/* Card header: circle icon + label + date */
.card-header {
    display: flex;
    align-items: center;
    gap: 9px;
    flex-shrink: 0;
}

.card-ind-circle {
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}


.card-ind-label {
    font-size: 13px;
    font-weight: 600;
    color: #1d1d1f;
    letter-spacing: -0.01em;
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-date {
    font-size: 11px;
    color: #aeaeb2;
    font-weight: 500;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Card rows: 3 fixed data rows */
.card-rows {
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex: 1;
}

.card-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.card-row-lbl {
    font-size: 11px;
    color: #8e8e93;
    font-weight: 500;
    flex-shrink: 0;
}

.card-row-val {
    font-size: 11px;
    color: #1d1d1f;
    font-weight: 500;
    text-align: right;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 60%;
}

/* Legacy badge (used in popup) */
.card-industry-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    height: 22px;
    padding: 0 8px;
    border-radius: 50px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.card-badge-icon {
    width: 13px;
    height: 13px;
    object-fit: contain;
    flex-shrink: 0;
}

/* ─── POPUP CHIP STYLES (used in popup only) ─── */
.card-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    height: 28px;
    padding: 0 10px;
    border-radius: 8px;
    background: #f5f5f7;
    font-size: 12px;
    font-weight: 500;
    color: #3c3c43;
    white-space: nowrap;
}

.card-chip svg {
    width: 13px;
    height: 13px;
    color: #8e8e93;
    flex-shrink: 0;
}

/* ─── POPUP ─── */
.ag-popup-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.22s ease;
}

.ag-popup-backdrop.ag-popup-visible {
    opacity: 1;
}

.ag-popup {
    background: white;
    border-radius: 20px;
    width: 100%;
    max-width: 1120px;
    max-height: 94vh;
    overflow-y: auto;
    box-shadow: 0 24px 80px rgba(0,0,0,0.22), 0 4px 16px rgba(0,0,0,0.12);
    transform: scale(0.95) translateY(8px);
    transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
    scrollbar-width: none;
    -ms-overflow-style: none;
    position: relative;
}

.ag-popup::-webkit-scrollbar { display: none; }

.ag-popup-backdrop.ag-popup-visible .ag-popup {
    transform: scale(1) translateY(0);
}

/* Popup accent stripe */
.ag-popup-accent {
    height: 5px;
    width: 100%;
    border-radius: 20px 20px 0 0;
    flex-shrink: 0;
}

/* Close button */
.ag-popup-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(0,0,0,0.07);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease;
    z-index: 2;
}

.ag-popup-close:hover { background: rgba(0,0,0,0.12); }

.ag-popup-close svg {
    width: 12px;
    height: 12px;
    color: #3c3c43;
}

/* Popup header */
.ag-popup-header {
    padding: 24px 20px 18px;
    border-bottom: 1px solid rgba(0,0,0,0.06);
}

.ag-popup-meta {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ag-popup-meta-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ag-popup-ind-label {
    font-size: 18px;
    font-weight: 700;
    color: #1d1d1f;
    letter-spacing: -0.025em;
}

.ag-popup-ind-sub {
    font-size: 12px;
    color: #aeaeb2;
    font-weight: 500;
}

.ag-popup-date {
    font-size: 12px;
    color: #aeaeb2;
    font-weight: 500;
}

/* Detail rows */
.ag-detail-list {
    background: #f5f5f7;
    border-radius: 14px;
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.ag-detail-row {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1px;
    justify-content: center;
    flex: 1 0 auto;
    padding: 7px 14px 8px;
    box-sizing: border-box;
    flex-shrink: 0;
}

.ag-detail-icon {
    display: none;
}

.ag-detail-label {
    font-size: 11.5px;
    color: #8e8e93;
    font-weight: 400;
    flex-shrink: 0;
}

.ag-detail-value {
    font-size: 13.5px;
    color: #1d1d1f;
    font-weight: 500;
    text-align: left;
    width: 100%;
    min-width: 0;
    line-height: 1.4;
    overflow-wrap: anywhere;
}


.ag-detail-value a {
    color: #1d1d1f !important;
    text-decoration: none;
    font-weight: 500;
}

/* Locked contact */
.ag-contact-locked {
    flex-direction: row !important;
    align-items: center;
    gap: 12px;
    background: #f5f5f7;
    border-radius: 14px;
    padding: 14px 16px;
}

.ag-contact-locked svg {
    color: #8e8e93;
    flex-shrink: 0;
}

.ag-locked-title {
    font-size: 13px;
    font-weight: 600;
    color: #1d1d1f;
}

.ag-locked-sub {
    font-size: 11px;
    color: #8e8e93;
    margin-top: 1px;
}

.ag-popup-desc {
    font-size: 14px;
    color: #3c3c43;
    line-height: 1.55;
    margin: 0;
}

/* Popup body */
.ag-popup-body {
    padding: 20px 24px 24px;
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 28px;
    align-items: stretch;
}

.ag-popup-side {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
}

/* Dokument-Kasten */
.ag-doc {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    min-height: 68px;
    box-sizing: border-box;
    border-radius: 14px;
    background: #f5f5f7;
    text-decoration: none;
    color: inherit;
    transition: background 0.15s ease, transform 0.15s ease;
}

a.ag-doc:hover { background: #ececf0; }
a.ag-doc:active { transform: scale(0.985); }

.ag-doc-icon {
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(0,0,0,0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: #255879;
}

.ag-doc-icon svg { width: 18px; height: 18px; }

.ag-doc-text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.ag-doc-title {
    font-size: 13px;
    font-weight: 600;
    color: #1d1d1f;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ag-doc-sub {
    font-size: 11.5px;
    color: #8e8e93;
}

.ag-doc-action {
    width: 30px;
    height: 30px;
    flex-shrink: 0;
    border-radius: 50%;
    background: #255879;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ag-doc-action svg { width: 14px; height: 14px; }

.ag-doc.is-empty .ag-doc-icon { background: transparent; box-shadow: none; color: #c7c7cc; }
.ag-doc.is-empty .ag-doc-title { color: #aeaeb2; font-weight: 500; }

.ag-popup-media {
    position: relative;
    flex: 1;
    min-height: 180px;
    border-radius: 14px;
    background: #f5f5f7;
    overflow: hidden;
}

.ag-popup-media-empty {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: #aeaeb2;
    font-size: 12px;
    font-weight: 500;
}

.ag-popup-media-empty svg { width: 34px; height: 34px; }

.ag-popup-media img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.ag-popup-media img.is-loaded { opacity: 1; }

.ag-popup-cols {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-auto-rows: 1fr;
    gap: 18px 24px;
    align-items: stretch;
}

.ag-popup-section {
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.ag-popup-section-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #255879;
    margin-bottom: 8px;
}

.ag-popup-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

/* Popup contact */
.ag-popup-contact {
    background: #f5f5f7;
    border-radius: 14px;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ag-contact-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: #3c3c43;
}

.ag-contact-item svg {
    width: 15px;
    height: 15px;
    color: #8e8e93;
    flex-shrink: 0;
}

.ag-contact-item strong {
    font-weight: 600;
    color: #1d1d1f;
}

.ag-contact-item a {
    color: #0071e3;
    text-decoration: none;
    font-weight: 500;
}

.ag-contact-item a:hover { text-decoration: underline; }

/* ─── CONTACT FOOTER (legacy - kept for reference) ─── */
.contact-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #3c3c43;
}

.contact-item a {
    color: #0071e3;
    text-decoration: none;
    font-weight: 500;
}

.contact-item a:hover { text-decoration: underline; }

/* ─── RESPONSIVE ─── */
@media (max-width: 980px) {
    .ag-popup-body { grid-template-columns: minmax(0, 1fr); }
    .ag-popup-media { flex: none; min-height: 0; aspect-ratio: 16 / 9; }
}

@media (max-width: 900px) {
    .angebote-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .angebote-main {
        padding-top: calc(8vh + 52px) !important;
    }

    .angebote-filter-section {
        top: 8vh;
    }

    .angebote-filter-inner {
        padding: 0 14px;
    }

    .angebote-filters {
        justify-content: center;
        padding: 10px 0;
    }

    .af-pill[data-filter="all"] {
        display: none;
    }

    .angebote-cards-section {
        padding: 24px 14px 60px;
    }

    .angebote-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .ag-popup {
        max-width: 100%;
        border-radius: 20px 20px 0 0;
        max-height: 82vh;
    }

    .ag-popup-cols {
        grid-template-columns: minmax(0, 1fr);
    }

    .ag-popup-backdrop {
        align-items: flex-end;
        padding: 0;
    }

    .ag-popup-backdrop.ag-popup-visible .ag-popup {
        transform: scale(1) translateY(0);
    }

    .ag-popup-backdrop .ag-popup {
        transform: translateY(30px);
    }
}

.dropdown-item-with-percent {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.completeness-dropdown-percent {
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    flex-shrink: 0;
}

:root {
    --fz-sheet-bg: rgba(255, 255, 255, 0.78);
    --fz-sheet-border: rgba(255, 255, 255, 0.55);
    --fz-sheet-text: #1d1d1f;
    --fz-sheet-sub: #6e6e73;
    --fz-ring-track: rgba(37, 88, 121, 0.08);
    --fz-ring-inner-a: #ffffff;
    --fz-ring-inner-b: #f5f8fa;
    --fz-green: #34c759;
    --fz-red: #ff3b30;
    --fz-sf: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'SF Pro Display', 'Poppins', 'Helvetica Neue', Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
    :root {
        --fz-sheet-bg: rgba(44, 44, 46, 0.78);
        --fz-sheet-border: rgba(255, 255, 255, 0.10);
        --fz-sheet-text: #f5f5f7;
        --fz-sheet-sub: #a1a1a6;
        --fz-ring-track: rgba(255, 255, 255, 0.08);
        --fz-ring-inner-a: #3a3a3c;
        --fz-ring-inner-b: #2c2c2e;
    }
}
.fz-overlay {
    position: fixed; inset: 0; z-index: 10000; display: flex; align-items: center; justify-content: center;
    padding: 24px; background: rgba(0, 0, 0, 0.22);
    -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
    animation: fzFadeIn .35s ease both; pointer-events: auto;
}
.fz-overlay.is-leaving { animation: fzFadeOut .28s ease forwards; }
.fz-sheet {
    width: 100%; max-width: 300px; padding: 36px 28px 30px; text-align: center;
    font-family: var(--fz-sf); color: var(--fz-sheet-text); background: var(--fz-sheet-bg);
    -webkit-backdrop-filter: blur(40px) saturate(1.8); backdrop-filter: blur(40px) saturate(1.8);
    border: 1px solid var(--fz-sheet-border); border-radius: 28px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05), 0 24px 64px rgba(0, 0, 0, 0.22);
    animation: fzSheetIn .5s cubic-bezier(.32, .72, 0, 1) both;
}
.fz-overlay.is-leaving .fz-sheet { animation: fzSheetOut .28s cubic-bezier(.4, 0, 1, 1) forwards; }
.fz-sheet.is-error { animation: fzSheetIn .5s cubic-bezier(.32, .72, 0, 1) both, fzShake .5s cubic-bezier(.36, .07, .19, .97) .35s both; }
.fz-loader { position: relative; width: 88px; height: 88px; margin: 0 auto 24px; }
.fz-loader-glow, .fz-loader-ring { position: absolute; inset: 0; border-radius: 50%; overflow: hidden; }
.fz-loader-glow { filter: blur(16px); opacity: .55; transform: scale(1.04); transition: opacity .4s ease; }
.fz-loader-glow::before, .fz-loader-ring::before {
    content: ""; position: absolute; top: 50%; left: 50%; width: 200%; height: 200%; margin: -100% 0 0 -100%;
    background: conic-gradient(from 0deg, rgba(37,88,121,0) 0deg, rgba(37,88,121,0) 150deg, #6fb4d9 270deg, #255879 340deg, #1a3f57 360deg);
    animation: fzSpin 1.6s linear infinite;
}
.fz-loader-ring { background: var(--fz-ring-track); box-shadow: 0 12px 32px rgba(37,88,121,.14), 0 2px 6px rgba(0,0,0,.04); }
.fz-loader-ring::after {
    content: ""; position: absolute; inset: 3px; border-radius: 50%;
    background: linear-gradient(180deg, var(--fz-ring-inner-a), var(--fz-ring-inner-b));
}
.fz-loader-logo {
    position: absolute; top: 50%; left: 50%; width: 38px; height: 38px; margin: -19px 0 0 -19px;
    background-color: #255879; -webkit-mask: url(/logo.svg) center / contain no-repeat;
    mask: url(/logo.svg) center / contain no-repeat; animation: fzPulse 2.4s ease-in-out infinite;
    transition: opacity .25s ease, transform .35s cubic-bezier(.32, .72, 0, 1);
}
@media (prefers-color-scheme: dark) { .fz-loader-logo { background-color: #8cc4e4; } }
.fz-badge {
    position: absolute; inset: 0; border-radius: 50%; display: flex; align-items: center; justify-content: center;
    opacity: 0; transform: scale(.6); pointer-events: none;
}
.fz-badge svg { width: 46%; height: 46%; fill: none; stroke: #fff; stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; }
.fz-badge .fz-stroke { stroke-dasharray: 40; stroke-dashoffset: 40; }
.fz-loader.is-success .fz-badge, .fz-loader.is-error .fz-badge { animation: fzBadgeIn .55s cubic-bezier(.34, 1.56, .64, 1) forwards; }
.fz-loader.is-success .fz-badge { background: linear-gradient(180deg, #4cd964, var(--fz-green)); box-shadow: 0 10px 28px rgba(52,199,89,.38); }
.fz-loader.is-error .fz-badge { background: linear-gradient(180deg, #ff5f55, var(--fz-red)); box-shadow: 0 10px 28px rgba(255,59,48,.35); }
.fz-loader.is-success .fz-stroke, .fz-loader.is-error .fz-stroke { animation: fzDraw .45s cubic-bezier(.65, 0, .35, 1) .22s forwards; }
.fz-loader.is-error .fz-stroke + .fz-stroke { animation-delay: .34s; }
.fz-loader.is-success .fz-loader-ring, .fz-loader.is-error .fz-loader-ring,
.fz-loader.is-success .fz-loader-glow, .fz-loader.is-error .fz-loader-glow { opacity: 0; transition: opacity .3s ease; }
.fz-loader.is-success .fz-loader-logo, .fz-loader.is-error .fz-loader-logo { opacity: 0; transform: scale(.7); animation: none; }
.fz-title { font-size: 17px; font-weight: 600; line-height: 1.3; letter-spacing: -0.022em; margin: 0; transition: opacity .2s ease; }
.fz-subtitle { font-size: 13px; font-weight: 400; line-height: 1.45; letter-spacing: -0.008em; color: var(--fz-sheet-sub); margin: 6px 0 0; }
.fz-subtitle:empty { display: none; }
.fz-text-swap { animation: fzTextIn .35s ease both; }
@keyframes fzSpin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes fzPulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .6; transform: scale(.95); } }
@keyframes fzFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fzFadeOut { from { opacity: 1; } to { opacity: 0; } }
@keyframes fzSheetIn { from { opacity: 0; transform: scale(.9) translateY(8px); } to { opacity: 1; transform: scale(1) translateY(0); } }
@keyframes fzSheetOut { from { opacity: 1; transform: scale(1); } to { opacity: 0; transform: scale(.96); } }
@keyframes fzBadgeIn { from { opacity: 0; transform: scale(.6); } to { opacity: 1; transform: scale(1); } }
@keyframes fzDraw { to { stroke-dashoffset: 0; } }
@keyframes fzTextIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fzShake {
    10%, 90% { transform: translateX(-1px); }
    20%, 80% { transform: translateX(2px); }
    30%, 50%, 70% { transform: translateX(-4px); }
    40%, 60% { transform: translateX(4px); }
}
@media (prefers-reduced-motion: reduce) {
    .fz-loader-glow::before, .fz-loader-ring::before { animation-duration: 4s; }
    .fz-loader-logo, .fz-sheet.is-error { animation: none; }
    .fz-sheet, .fz-overlay { animation-duration: .01s; }
}
.fz-overlay, .fz-overlay * { box-sizing: border-box; }


/* ═══════════════════════════════════════════════════════════
   POPUP – Feinschliff (Zeilen bündig, Bild & Dokument)
   ═══════════════════════════════════════════════════════════ */
.ag-popup {
    border-radius: 24px;
    box-shadow: 0 32px 90px rgba(0,0,0,0.28), 0 2px 6px rgba(0,0,0,0.08);
}
.ag-popup-accent { border-radius: 24px 24px 0 0; }
.ag-popup-header { padding: 22px 28px 18px; }
.ag-popup-body {
    padding: 22px 28px 28px;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 32px;
}

/* Raster: Zeilen laufen über beide Kästen hinweg bündig (Subgrid) */
.ag-popup-cols {
    grid-auto-rows: auto;
    gap: 0 24px;
    align-items: stretch;
}
.ag-popup-section {
    display: flex;
    flex-direction: column;
    grid-row: span var(--rows, 5);
}
.ag-popup-section-label {
    margin-bottom: 0;
    padding: 0 4px 8px;
}
.ag-popup-section:nth-child(n+3) .ag-popup-section-label { padding-top: 22px; }

.ag-detail-list {
    border-radius: 18px;
    box-shadow: inset 0 0 0 0.5px rgba(60,60,67,0.08);
}
.ag-detail-row { position: relative; padding: 8px 16px 9px; min-height: 46px; }
.ag-detail-row + .ag-detail-row::before {
    content: '';
    position: absolute;
    top: 0; left: 16px; right: 0;
    height: 0.5px;
    background: rgba(60,60,67,0.22);
}
.ag-detail-label { letter-spacing: -0.005em; }
.ag-detail-value { letter-spacing: -0.012em; }

@supports (grid-template-rows: subgrid) {
    .ag-popup-section {
        display: grid;
        grid-template-rows: subgrid;
    }
    .ag-detail-list {
        display: grid;
        grid-row: 2 / span calc(var(--rows, 5) - 1);
        grid-template-rows: subgrid;
    }
}

/* Bild */
.ag-popup-media {
    border-radius: 18px;
    min-height: 160px;
    box-shadow: inset 0 0 0 0.5px rgba(60,60,67,0.10);
}
.ag-popup-media img { border-radius: inherit; }

/* Dokument-Kasten: höher, wie eine Karte in der Dateien-App */
.ag-doc {
    flex-direction: column;
    align-items: stretch;
    justify-content: space-between;
    gap: 14px;
    min-height: 132px;
    padding: 14px 16px 15px;
    border-radius: 18px;
    box-shadow: inset 0 0 0 0.5px rgba(60,60,67,0.08);
}
.ag-doc-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
}
.ag-doc-icon {
    width: 46px;
    height: 56px;
    border-radius: 9px;
    font-size: 11px;
    align-items: flex-end;
    padding-bottom: 9px;
    box-sizing: border-box;
}
.ag-doc-icon svg { width: 22px; height: 22px; align-self: center; margin-bottom: 8px; }
.ag-doc-action { width: 34px; height: 34px; box-shadow: 0 2px 6px rgba(37,88,121,0.35); }
.ag-doc-action svg { width: 15px; height: 15px; }
.ag-doc-title { font-size: 14px; letter-spacing: -0.012em; }
.ag-doc-sub { font-size: 12px; }
.ag-doc.is-empty .ag-doc-icon { align-items: center; padding-bottom: 0; background: rgba(60,60,67,0.06); }
.ag-doc.is-empty .ag-doc-icon svg { margin-bottom: 0; }

@media (max-width: 980px) {
    .ag-popup-body { grid-template-columns: minmax(0, 1fr); }
    .ag-popup-media { flex: none; min-height: 0; aspect-ratio: 16 / 9; }
}
@media (max-width: 600px) {
    .ag-popup-body { padding: 18px 18px 24px; gap: 22px; }
    .ag-popup-header { padding: 20px 18px 16px; }
    .ag-popup-cols { grid-template-columns: minmax(0, 1fr); }
}


/* ═══ Linke Spalte als Teil des Rasters: Überschriften „Bild“ / „Dokument“ ═══ */
.ag-popup-body { display: block; }
.ag-popup-cols {
    grid-template-columns: 280px minmax(0, 1fr) minmax(0, 1fr);
    column-gap: 24px;
}
.ag-popup-section.is-lower .ag-popup-section-label { padding-top: 22px; }
.ag-popup-section:nth-child(n+3):not(.is-lower) .ag-popup-section-label { padding-top: 0; }

.ag-side-box {
    display: flex;
    flex-direction: column;
    min-height: 0;
    flex: 1;
}
.ag-side-box .ag-popup-media { flex: 1; min-height: 0; }
.ag-side-box .ag-doc { flex: 1; min-height: 0; }

@supports (grid-template-rows: subgrid) {
    .ag-side-box {
        grid-row: 2 / span calc(var(--rows, 5) - 1);
    }
}

@media (max-width: 980px) {
    .ag-popup-cols { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
    .ag-side-section { grid-column: 1 / -1; }
    .ag-side-box .ag-popup-media { flex: none; aspect-ratio: 16 / 9; }
    .ag-side-box .ag-doc { min-height: 120px; }
}
@media (max-width: 640px) {
    .ag-popup-cols { grid-template-columns: minmax(0, 1fr); }
}


/* Inhalte immer oben ausrichten: Label und Wert beginnen in jeder Zeile
   auf derselben Höhe, egal ob der Nachbarwert ein- oder zweizeilig ist */
.ag-detail-row {
    justify-content: flex-start;
    padding: 10px 16px 10px;
}


/* ═══ Dokumente: Liste im Stil der iOS-Dateien-App ═══ */
.ag-doc-list {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    border-radius: 18px;
    background: #f5f5f7;
    box-shadow: inset 0 0 0 0.5px rgba(60,60,67,0.08);
    overflow-y: auto;
    scrollbar-width: none;
}
.ag-doc-list::-webkit-scrollbar { display: none; }

.ag-doc-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    min-height: 46px;
    flex-shrink: 0;
    text-decoration: none;
    color: inherit;
    transition: background 0.15s ease;
}
.ag-doc-item:hover { background: rgba(0,0,0,0.035); }
.ag-doc-item:active { background: rgba(0,0,0,0.06); }
.ag-doc-item + .ag-doc-item::before {
    content: '';
    position: absolute;
    top: 0; left: 64px; right: 0;
    height: 0.5px;
    background: rgba(60,60,67,0.22);
}

.ag-doc-item .ag-doc-icon {
    width: 36px;
    height: 44px;
    padding: 0 0 7px;
    border-radius: 7px;
    align-items: flex-end;
    justify-content: center;
    font-size: 9.5px;
    box-sizing: border-box;
}

.ag-doc-item .ag-doc-title {
    flex: 1;
    min-width: 0;
    font-size: 13.5px;
    font-weight: 500;
}

.ag-doc-dl {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    color: #255879;
}

.ag-doc-list.is-empty {
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #aeaeb2;
    font-size: 12px;
    font-weight: 500;
}
.ag-doc-list.is-empty svg { width: 30px; height: 30px; }


/* ═══ Dokumente: immer 4 gleich hohe Zeilen mit 3 Trennlinien ═══ */
.ag-doc-list { overflow: hidden; }
.ag-doc-item {
    flex: 1 1 0;
    min-height: 46px;
    padding-top: 6px;
    padding-bottom: 6px;
}
.ag-doc-item + .ag-doc-item::before { left: 16px; }
.ag-doc-item.is-blank { cursor: default; }
.ag-doc-item.is-blank:hover { background: none; }
.ag-doc-none {
    font-size: 13px;
    font-weight: 500;
    color: #aeaeb2;
}
.ag-doc-item .ag-doc-icon {
    height: 34px;
    width: 30px;
    border-radius: 6px;
    padding-bottom: 5px;
    font-size: 8.5px;
}


/* Zwei Felder nebeneinander (z. B. Firmenname | Webseite) */
.ag-detail-row.is-split {
    flex-direction: row;
    align-items: flex-start;
    gap: 16px;
}
.ag-detail-cell {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
}
.ag-detail-cell .ag-detail-value { overflow-wrap: anywhere; }
@media (max-width: 640px) {
    .ag-detail-row.is-split { flex-direction: column; gap: 8px; }
}


/* ═══ Kacheln: größer, mehrzeilig, nichts wird mehr abgeschnitten ═══ */
.angebot-card {
    border-radius: 24px;
    padding: 22px 22px 18px;
    gap: 18px;
    border: 0.5px solid rgba(60,60,67,0.10);
    box-shadow: 0 1px 2px rgba(0,0,0,0.04), 0 8px 28px rgba(0,0,0,0.05);
    transition: box-shadow 0.25s ease, transform 0.25s cubic-bezier(.2,.8,.2,1);
}
.angebot-card:hover {
    box-shadow: 0 2px 4px rgba(0,0,0,0.05), 0 16px 40px rgba(0,0,0,0.10);
    transform: translateY(-3px);
}
.angebot-card:active { transform: scale(0.985); }

.card-header { gap: 14px; align-items: center; }
.card-head-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    flex: 1;
}
.card-ind-label {
    font-size: 17px;
    font-weight: 600;
    letter-spacing: -0.022em;
    line-height: 1.22;
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow-wrap: anywhere;
}
.card-sub {
    font-size: 12.5px;
    color: #8e8e93;
    letter-spacing: -0.005em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Datenfelder: Label oben, Wert darunter – wie im Detail-Popup */
.card-rows {
    background: #f5f5f7;
    border-radius: 16px;
    gap: 0;
    flex: 1;
    box-shadow: inset 0 0 0 0.5px rgba(60,60,67,0.08);
}
.card-row {
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 2px;
    padding: 10px 14px 11px;
    position: relative;
}
.card-row + .card-row::before {
    content: '';
    position: absolute;
    top: 0; left: 14px; right: 0;
    height: 0.5px;
    background: rgba(60,60,67,0.22);
}
.card-row-lbl {
    font-size: 11.5px;
    font-weight: 400;
    letter-spacing: -0.005em;
}
.card-row-val {
    font-size: 14px;
    font-weight: 500;
    letter-spacing: -0.012em;
    line-height: 1.32;
    text-align: left;
    max-width: 100%;
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    overflow-wrap: anywhere;
    /* feste Höhe für 2 Zeilen: alle Kacheln einer Reihe bleiben bündig */
    min-height: calc(1.32em * 2);
}

.card-more {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 3px;
    font-size: 13px;
    font-weight: 500;
    color: #255879;
    letter-spacing: -0.01em;
}
.card-more svg { width: 13px; height: 13px; transition: transform 0.2s ease; }
.angebot-card:hover .card-more svg { transform: translateX(3px); }

@media (max-width: 600px) {
    .angebot-card { border-radius: 22px; padding: 18px 18px 16px; }
    .angebote-grid { gap: 14px; }
}


/* ═══ Kachel-Bild (gleiches Bild wie „Darstellung“ im Popup) ═══ */
.card-media {
    position: relative;
    aspect-ratio: 16 / 10;
    border-radius: 16px;
    overflow: hidden;
    background: linear-gradient(145deg, #f2f4f7, #e6eaf0);
    box-shadow: inset 0 0 0 0.5px rgba(60,60,67,0.10);
    flex-shrink: 0;
    isolation: isolate;
}
.card-media-empty {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.card-media-empty img { opacity: 0.28; }
.card-media-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transform: scale(1.001);
    transition: opacity 0.4s ease, transform 0.6s cubic-bezier(.2,.8,.2,1);
}
.card-media-img.is-loaded { opacity: 1; }
.angebot-card:hover .card-media-img.is-loaded { transform: scale(1.04); }
/* feine Innenkante, damit helle Bilder sauber im Rahmen sitzen */
.card-media::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    box-shadow: inset 0 0 0 0.5px rgba(0,0,0,0.08);
    pointer-events: none;
}


/* ═══ Karussell ═══ */
.angebote-carousel { --card-w: min(400px, 72vw); }

.carousel-viewport {
    overflow: hidden;
    padding: 28px 0 36px;      /* Platz für Schatten & Hover-Lift */
    touch-action: pan-y;
    user-select: none;
    -webkit-user-select: none;
}
.carousel-track {
    display: flex;
    align-items: stretch;
    gap: 24px;
    transition: transform 0.6s cubic-bezier(.22, .8, .2, 1);
    will-change: transform;
}
.carousel-track .angebot-card {
    flex: 0 0 var(--card-w);
    width: var(--card-w);
    box-sizing: border-box;
    transition: transform 0.6s cubic-bezier(.22,.8,.2,1), opacity 0.5s ease, box-shadow 0.25s ease;
}
.carousel-track .angebot-card.is-active { opacity: 1; transform: none; }
.carousel-track .angebot-card.is-active:hover { transform: translateY(-3px); }
.carousel-track .angebot-card.is-active:active { transform: scale(0.985); }
.carousel-track .angebot-card.is-side {
    opacity: 0.55;
    transform: scale(0.92);
    box-shadow: 0 1px 2px rgba(0,0,0,0.03), 0 6px 20px rgba(0,0,0,0.04);
}
.carousel-track .angebot-card.is-side:hover { opacity: 0.8; transform: scale(0.93); }
.carousel-track .angebot-card.is-far {
    opacity: 0;
    transform: scale(0.85);
    pointer-events: none;
}

/* Steuerung: zwei runde Pfeile + Zähler */
.carousel-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
}
.carousel-arrow {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 0.5px solid rgba(60,60,67,0.14);
    background: rgba(255,255,255,0.85);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
    backdrop-filter: saturate(180%) blur(12px);
    box-shadow: 0 1px 2px rgba(0,0,0,0.05), 0 4px 14px rgba(0,0,0,0.06);
    color: #1d1d1f;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}
.carousel-arrow svg { width: 18px; height: 18px; }
.carousel-arrow:hover:not(:disabled) { transform: scale(1.06); box-shadow: 0 2px 4px rgba(0,0,0,0.06), 0 8px 20px rgba(0,0,0,0.10); }
.carousel-arrow:active:not(:disabled) { transform: scale(0.94); }
.carousel-arrow:disabled { opacity: 0.35; cursor: default; }
.carousel-arrow:focus-visible { outline: 2px solid #255879; outline-offset: 2px; }
.carousel-count {
    min-width: 54px;
    text-align: center;
    font-size: 13px;
    font-weight: 500;
    color: #8e8e93;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.005em;
}

@media (max-width: 600px) {
    .angebote-carousel { --card-w: 78vw; }
    .angebote-carousel .carousel-viewport { margin: 0 -14px; }  /* Nachbarn bis zum Bildschirmrand sichtbar */
    .carousel-track { gap: 14px; }
}
@media (prefers-reduced-motion: reduce) {
    .carousel-track, .carousel-track .angebot-card { transition: none !important; }
}


/* ═══ Kompaktere Kacheln: Navigation bleibt im Blickfeld ═══ */
.carousel-track .angebot-card {
    padding: 18px 18px 14px;
    gap: 14px;
    border-radius: 22px;
}
.card-media {
    aspect-ratio: 2 / 1;          /* flacher: ca. 20 % weniger Höhe als 16:10 */
    border-radius: 14px;
}
.card-header { gap: 12px; }
.card-row { padding: 8px 14px 9px; }
.card-ind-label { font-size: 16px; }
.carousel-viewport { padding: 14px 0 20px; }
.angebote-cards-section { padding-top: 64px; padding-bottom: 48px; }

@media (max-width: 600px) {
    .carousel-track .angebot-card { padding: 16px 16px 13px; }
    .angebote-cards-section { padding-top: 24px; padding-bottom: 40px; }
}


/* ═══ Schatten ohne harte Kante + mehr Abstand zwischen den Kacheln ═══ */
.carousel-track { gap: 48px; }

/* Viewport bekommt unten genug Luft für den kompletten Schatten;
   die Steuerung rückt per negativem Margin trotzdem nah an die Kachel */
.carousel-viewport {
    padding: 24px 0 60px;
    margin-bottom: -36px;
}
.carousel-controls {
    position: relative;
    z-index: 1;
}
/* weichere, kürzere Schatten, die sicher innerhalb des Viewports auslaufen */
.carousel-track .angebot-card {
    box-shadow: 0 1px 2px rgba(0,0,0,0.04), 0 6px 22px rgba(0,0,0,0.06);
}
.carousel-track .angebot-card.is-active:hover {
    box-shadow: 0 2px 4px rgba(0,0,0,0.05), 0 10px 30px rgba(0,0,0,0.09);
}
.carousel-track .angebot-card.is-side {
    box-shadow: 0 1px 2px rgba(0,0,0,0.03), 0 4px 16px rgba(0,0,0,0.04);
}

@media (max-width: 600px) {
    .carousel-track { gap: 24px; }
}


/* ═══ Karussell über die volle Fensterbreite: Nachbarkacheln werden nicht mehr abgeschnitten ═══ */
.angebote-cards-section { overflow-x: clip; }
.carousel-viewport {
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
}
/* Kachelbreite passt sich dem Fenster an, sodass links und rechts je eine Nachbarkachel komplett Platz hat */
@media (min-width: 601px) {
    .angebote-carousel { --card-w: clamp(300px, calc((100vw - 96px) / 3.1), 400px); }
}
@media (max-width: 600px) {
    .angebote-carousel .carousel-viewport { margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw); }
}


/* ═══════════════════════════════════════════════════════════
   Kachel v2 – ruhig, bildstark, typografisch (Apple-Stil)
   ═══════════════════════════════════════════════════════════ */
.carousel-track .angebot-card {
    padding: 0;
    gap: 0;
    border: none;
    border-radius: 28px;
    background: #fff;
    overflow: hidden;
    box-shadow: 0 0 0 0.5px rgba(0,0,0,0.04), 0 8px 30px rgba(0,0,0,0.07);
}
.carousel-track .angebot-card.is-active:hover {
    transform: translateY(-4px);
    box-shadow: 0 0 0 0.5px rgba(0,0,0,0.04), 0 14px 38px rgba(0,0,0,0.11);
}

/* Bild: randlos oben, 16:9 */
.carousel-track .card-media {
    aspect-ratio: 16 / 9;
    border-radius: 0;
    box-shadow: none;
    background: linear-gradient(145deg,
        color-mix(in srgb, var(--ind, #255879) 9%, #fff),
        color-mix(in srgb, var(--ind, #255879) 20%, #fff));
}
.carousel-track .card-media::after { display: none; }
.card-media-empty img { opacity: 0.4; }

/* Branchen-Chip als Milchglas über dem Bild */
.card-chip-ind {
    position: absolute;
    left: 14px;
    bottom: 14px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 11px 6px 9px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: -0.005em;
    color: #1d1d1f;
    background: rgba(255,255,255,0.72);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    backdrop-filter: saturate(180%) blur(14px);
    box-shadow: 0 0 0 0.5px rgba(0,0,0,0.06);
}

/* Textbereich */
.card-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 20px 22px 18px;
}
.card-title {
    margin: 0 0 14px;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.03em;
    color: #1d1d1f;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    overflow-wrap: anywhere;
}

/* Fakten: ohne Kasten, nur feine Linien */
.card-facts { display: flex; flex-direction: column; }
.card-fact {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 11px 0 12px;
    border-top: 0.5px solid rgba(60,60,67,0.18);
}
.card-fact-lbl {
    font-size: 12px;
    color: #8e8e93;
    letter-spacing: -0.005em;
}
.card-fact-val {
    font-size: 15px;
    font-weight: 500;
    line-height: 1.3;
    letter-spacing: -0.015em;
    color: #1d1d1f;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    overflow-wrap: anywhere;
}

/* Fußzeile: Datum links, „Ansehen“-Pille rechts (wie „Laden“ im App Store) */
.card-foot {
    margin-top: auto;
    padding-top: 12px;
    border-top: 0.5px solid rgba(60,60,67,0.18);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.card-date2 {
    font-size: 12px;
    color: #8e8e93;
    font-variant-numeric: tabular-nums;
}
.card-cta {
    padding: 7px 16px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: #255879;
    background: rgba(37,88,121,0.10);
    transition: background 0.2s ease, color 0.2s ease;
}
.angebot-card.is-active:hover .card-cta { background: #255879; color: #fff; }

@media (max-width: 600px) {
    .carousel-track .angebot-card { border-radius: 24px; }
    .card-body { padding: 18px 18px 16px; }
    .card-title { font-size: 20px; }
}


/* „Details“-Button mit Pfeil-Icon */
.card-cta {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 7px 14px 7px 16px;
}
.card-cta svg {
    width: 12px;
    height: 12px;
    transition: transform 0.25s cubic-bezier(.2,.8,.2,1);
}
.angebot-card.is-active:hover .card-cta svg { transform: translate(1.5px, -1.5px); }


/* Horizontales Wischen im Karussell löst kein Browser-Zurück/Vor mehr aus */
.carousel-viewport,
.angebote-carousel { overscroll-behavior-x: none; }
html:has(.angebote-carousel), body:has(.angebote-carousel) { overscroll-behavior-x: none; }


/* ═══ Kachel-Höhe reduziert ═══ */
.carousel-track .card-media { aspect-ratio: 2 / 1; }          /* statt 16:9 */
.card-body { padding: 16px 20px 14px; }
.card-title { font-size: 21px; margin-bottom: 10px; }
.card-fact { padding: 8px 0 9px; gap: 1px; }
.card-fact-lbl { font-size: 11.5px; }
.card-fact-val { font-size: 14.5px; line-height: 1.28; }
.card-foot { padding-top: 10px; }
.card-cta { padding-top: 6px; padding-bottom: 6px; }
.card-chip-ind { left: 12px; bottom: 12px; padding: 5px 10px 5px 8px; }

@media (max-width: 600px) {
    .card-body { padding: 14px 16px 13px; }
    .card-title { font-size: 19px; }
}


/* ═══ Kachel-Höhe: Mittelweg zwischen kompakt und luftig ═══ */
.carousel-track .card-media { aspect-ratio: 1.88 / 1; }
.card-body { padding: 18px 21px 16px; }
.card-title { font-size: 21.5px; margin-bottom: 12px; }
.card-fact { padding: 10px 0 11px; gap: 2px; }
.card-fact-lbl { font-size: 11.75px; }
.card-fact-val { font-size: 14.75px; line-height: 1.3; }
.card-foot { padding-top: 11px; }
.card-cta { padding-top: 6.5px; padding-bottom: 6.5px; }
.card-chip-ind { left: 13px; bottom: 13px; padding: 5.5px 10.5px 5.5px 8.5px; }

@media (max-width: 600px) {
    .card-body { padding: 16px 17px 14px; }
    .card-title { font-size: 19.5px; }
}


/* ═══ Popup: passt sich niedrigen Fenstern an (Lesezeichenleiste, kleine Laptops) ═══ */
.ag-popup-backdrop { padding: 16px; }
.ag-popup {
    max-height: calc(100vh - 32px);
    max-height: calc(100dvh - 32px);
    scrollbar-width: thin;
    scrollbar-color: rgba(0,0,0,0.18) transparent;
}
.ag-popup::-webkit-scrollbar { display: block; width: 8px; }
.ag-popup::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.18); border-radius: 8px; }
.ag-popup::-webkit-scrollbar-track { background: transparent; }

/* Stufe 1: mittlere Höhe – Abstände straffen */
@media (min-width: 981px) and (max-height: 820px) {
    .ag-popup-header { padding: 16px 28px 13px; }
    .ag-popup-body { padding: 14px 28px 20px; }
    .ag-detail-row { padding: 7px 16px 8px; min-height: 40px; }
    .ag-popup-section-label { padding-bottom: 6px; }
    .ag-popup-section.is-lower .ag-popup-section-label { padding-top: 14px; }
}
/* Stufe 2: niedrige Fenster – noch enger */
@media (min-width: 981px) and (max-height: 700px) {
    .ag-popup-header { padding: 12px 28px 10px; }
    .ag-popup-body { padding: 10px 28px 16px; }
    .ag-detail-row { padding: 5px 16px 6px; min-height: 34px; }
    .ag-detail-label { font-size: 11px; }
    .ag-detail-value { font-size: 13px; }
    .ag-popup-section.is-lower .ag-popup-section-label { padding-top: 10px; }
}


/* Ladezustand: Ring + Glow + Logo (aus login.html übernommen) */
.angebote-loading { gap: 0; padding: 72px 0; }
.angebote-loading p {
    margin: 0;
    font-size: 15px;
    font-weight: 500;
    letter-spacing: -0.015em;
    color: #6e6e73;
}


/* Ladekreis: vertikal und horizontal mittig im sichtbaren Hauptbereich
   (zwischen Filterleiste und unterem Fensterrand) */
.angebote-loading {
    position: fixed;
    top: calc(8vh + 48px);        /* Header + Filterleiste */
    left: 0;
    right: 0;
    bottom: 0;
    padding: 0;
    justify-content: center;
    align-items: center;
    pointer-events: none;
    z-index: 1;
}
.angebote-loading .fz-loader { margin-bottom: 20px; }


/* Filterleiste: transparent, der Verlauf läuft durch (bei Scrollen dezent weichgezeichnet) */
.angebote-filter-section {
    background: transparent;
    border-bottom: none;
    -webkit-backdrop-filter: blur(14px) saturate(160%);
    backdrop-filter: blur(14px) saturate(160%);
}


/* Auftrags-ID im Popup-Kopf */
.ag-popup-title-row {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}
.ag-popup-id {
    flex-shrink: 0;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0;
    font-variant-numeric: tabular-nums;
    color: #255879;
    background: rgba(37, 88, 121, 0.10);
    user-select: text;
    -webkit-user-select: text;
    cursor: text;
}


/* ═══════════════════════════════════════════════════════════
   Popup mobil (≤ 640 px): einspaltig, gleichmäßige Abstände,
   sinnvolle Reihenfolge
   ═══════════════════════════════════════════════════════════ */
@media (max-width: 640px) {
    /* Raster/Subgrid aus: Abschnitte sind einfache Blöcke untereinander */
    .ag-popup-cols {
        display: flex !important;
        flex-direction: column;
        gap: 26px !important;
    }
    .ag-popup-section,
    .ag-popup-section.is-lower,
    .ag-side-section {
        display: flex !important;
        flex-direction: column;
        grid-row: auto !important;
        grid-column: auto !important;
        grid-template-rows: none !important;
    }
    .ag-detail-list,
    .ag-side-box {
        display: flex !important;
        flex-direction: column;
        grid-row: auto !important;
        grid-template-rows: none !important;
        flex: none;
    }
    .ag-detail-row { flex: none; min-height: 0; }

    /* einheitlich: Überschrift sitzt direkt über ihrem Kasten, kein Extra-Abstand oben */
    .ag-popup-section .ag-popup-section-label,
    .ag-popup-section.is-lower .ag-popup-section-label,
    .ag-popup-section:nth-child(n+3) .ag-popup-section-label,
    .ag-popup-section:nth-child(n+3):not(.is-lower) .ag-popup-section-label {
        padding: 0 4px 8px !important;
        margin: 0;
    }

    /* Reihenfolge: Bild → Auftrag → Verpackung → Anforderungen → Kontakt → Dokumente */
    .ag-popup-section[data-sec="media"]         { order: 1; }
    .ag-popup-section[data-sec="auftrag"]       { order: 2; }
    .ag-popup-section[data-sec="verpackung"]    { order: 3; }
    .ag-popup-section[data-sec="anforderungen"] { order: 4; }
    .ag-popup-section[data-sec="kontakt"]       { order: 5; }
    .ag-popup-section[data-sec="docs"]          { order: 6; }

    /* Bild: feste Proportion statt Höhe vom Nachbarkasten */
    .ag-side-box .ag-popup-media { flex: none; aspect-ratio: 16 / 9; min-height: 0; }

    /* Dokumente: nur echte Einträge, keine leeren Platzhalterzeilen */
    .ag-side-box .ag-doc-list { display: flex; flex-direction: column; flex: none; }
    .ag-doc-item.is-blank:not(:has(.ag-doc-none)) { display: none; }
    .ag-doc-item { min-height: 0; }

    /* Luft am Ende des Popups (Home-Indikator) */
    .ag-popup-body { padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px)); }
}


/* ═══ Popup mobil: Trennstrich zwischen untereinander stehenden Feldern + vollständig scrollbar ═══ */
@media (max-width: 640px) {
    /* Geteilte Zeilen (z. B. Firmenname | Webseite): jedes Feld ist mobil eine eigene Zeile mit Trennlinie */
    .ag-detail-row.is-split {
        flex-direction: column;
        gap: 0;
        padding: 0;
        min-height: 0;
    }
    .ag-detail-row.is-split .ag-detail-cell {
        position: relative;
        width: 100%;
        padding: 8px 16px 9px;
    }
    .ag-detail-row.is-split .ag-detail-cell + .ag-detail-cell::before {
        content: '';
        position: absolute;
        top: 0; left: 16px; right: 0;
        height: 0.5px;
        background: rgba(60,60,67,0.22);
    }

    /* Popup als schwebende Karte mit Rand rundherum (wie zuvor), Höhe = wirklich sichtbarer Bereich.
       Scrollen übernimmt der Inhaltsbereich, Kopf und Schließen-Button bleiben stehen. */
    .ag-popup-backdrop {
        padding: 16px !important;
        align-items: center;
        height: 100vh;                                   /* Fallback */
        height: calc(var(--ag-vh, 1vh) * 100);
        bottom: auto;
    }
    .ag-popup {
        display: flex;
        flex-direction: column;
        overflow: hidden !important;
        border-radius: 24px;
        max-height: calc(100vh - 32px) !important;       /* Fallback */
        max-height: calc(var(--ag-vh, 1vh) * 100 - 32px) !important;
    }
    .ag-popup-backdrop.ag-popup-visible .ag-popup { transform: none !important; }
    .ag-popup-header { flex: none; }
    .ag-popup-body {
        flex: 1 1 auto;
        min-height: 0;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
        padding-bottom: calc(32px + env(safe-area-inset-bottom, 0px)) !important;
    }
}


/* ═══ Kontaktdaten: geblurrt, per Button einblenden ═══ */
.ag-contact .ag-detail-list { position: relative; }

.ag-contact .ag-detail-row {
    transition: filter .7s cubic-bezier(.22, 1, .36, 1), opacity .7s cubic-bezier(.22, 1, .36, 1);
    will-change: filter;
}
.ag-contact.is-locked .ag-detail-row {
    filter: blur(8px);
    opacity: .85;
    pointer-events: none;
    -webkit-user-select: none; user-select: none;
}

.ag-reveal {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(245, 245, 247, 0.28);
    transition: opacity .4s cubic-bezier(.22, 1, .36, 1);
}
.ag-reveal.is-leaving { opacity: 0; pointer-events: none; }
.ag-reveal.is-leaving .ag-reveal-btn { transform: scale(.94); }

.ag-reveal-btn {
    -webkit-appearance: none; appearance: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 44px;
    padding: 0 20px 0 16px;
    border: 0.5px solid rgba(60, 60, 67, 0.18);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    backdrop-filter: saturate(180%) blur(20px);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06), 0 8px 24px rgba(0, 0, 0, 0.10);
    color: #1d1d1f;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Poppins', 'Helvetica Neue', Arial, sans-serif;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: -0.012em;
    cursor: pointer;
    transition: transform .25s cubic-bezier(.22, 1, .36, 1), background-color .25s ease, box-shadow .25s ease;
    -webkit-tap-highlight-color: transparent;
}
.ag-reveal-btn svg { width: 18px; height: 18px; color: #255879; flex-shrink: 0; }
.ag-reveal-btn:hover { background: rgba(255, 255, 255, 0.92); transform: scale(1.03); box-shadow: 0 1px 2px rgba(0,0,0,.06), 0 12px 28px rgba(0,0,0,.14); }
.ag-reveal-btn:active { transform: scale(.97); }
.ag-reveal-btn:focus-visible { outline: 3px solid rgba(37, 88, 121, 0.45); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
    .ag-contact .ag-detail-row,
    .ag-reveal,
    .ag-reveal-btn { transition: none; }
}
