.em-account-dropdown {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding-bottom: 6px;
}

.em-account-trigger {
    background: var(--em-primary);
    color: #ffffff !important;
    border: none;
    border-radius: 999px;
    padding: 0 16px;
    height: 36px;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-sizing: border-box;
}

.em-account-trigger:hover {
    background: var(--em-primary-hover);
    color: #ffffff !important;
    text-decoration: none;
}

.em-account-menu {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    min-width: 220px;
    background: var(--em-white);
    border: 1px solid var(--em-border);
    border-radius: 14px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
    padding: 8px;
    z-index: 9999;
}

.em-account-dropdown:hover .em-account-menu,
.em-account-dropdown.is-open .em-account-menu {
    display: block;
}

.em-account-menu a {
    display: block;
    padding: 10px 12px;
    border-radius: 10px;
    color: var(--em-text);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
}

.em-account-menu a:hover {
    background: var(--em-soft-green);
    color: var(--em-primary-dark);
}

.em-account-menu a + a {
    margin-top: 4px;
}

/* ── Account trigger: avatar + badge ───────────────────────────────────── */

.em-account-trigger--has-avatar {
    padding: 4px 14px 4px 4px;
}

.em-account-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 6px;
    flex-shrink: 0;
}

.em-account-badge-outer {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    line-height: 0;
}

/* Badge-Bild: Durchmesser = Button-Höhe (36px) */
.em-account-badge-outer img {
    display: block !important;
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    min-height: 36px !important;
}

.em-account-name {
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ── Dashboard filter pills ─────────────────────────────────────────────── */

.em-dashboard-filter.em-filter-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 20px;
}

.em-filter-pill {
    display: inline-flex;
    align-items: center;
    padding: 7px 16px;
    border-radius: 999px;
    background: var(--em-white);
    border: 1px solid var(--em-border);
    color: var(--em-text);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.15s ease;
    cursor: pointer;
    white-space: nowrap;
}

.em-filter-pill:hover {
    border-color: var(--em-primary);
    color: var(--em-primary);
    text-decoration: none;
}

.em-filter-pill--active {
    background: var(--em-primary);
    border-color: var(--em-primary);
    color: #ffffff !important;
}

.em-filter-pill--active:hover {
    background: var(--em-primary-hover);
    border-color: var(--em-primary-hover);
    color: #ffffff !important;
}

/* ── Profileinstellungen ─────────────────────────────────────────────── */

.em-profile-settings {
    max-width: 640px;
}

.em-profile-section {
    background: var(--em-white);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 16px;
    border: 1px solid var(--em-border);
}

.em-profile-section h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--em-text);
    margin: 0 0 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--em-border);
}

.em-avatar-wrap {
    display: flex;
    align-items: center;
    gap: 20px;
}

.em-avatar-wrap img {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--em-border);
    flex-shrink: 0;
}

.em-profile-displayname {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--em-text);
    margin-bottom: 6px;
}

.em-supporter-status {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.em-supporter-status-label {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--em-text);
}

.em-entdecker-label {
    font-size: 0.9rem;
    color: #888;
    font-style: italic;
}

.em-supporter-upgrade-link {
    font-size: 13px;
    color: var(--em-primary);
    text-decoration: none;
    font-weight: 600;
}

.em-supporter-upgrade-link:hover {
    text-decoration: underline;
}

.em-avatar-upload {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.em-avatar-label {
    cursor: pointer;
}

.em-profile-field {
    margin-bottom: 16px;
}

.em-profile-field label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: #999;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.em-profile-field input[type="text"],
.em-profile-field input[type="password"] {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--em-border);
    border-radius: 10px;
    font-size: 15px;
    font-family: inherit;
    box-sizing: border-box;
    background: #fafafa;
    color: var(--em-text);
    transition: border-color 0.15s;
}

.em-profile-field input[type="text"]:focus,
.em-profile-field input[type="password"]:focus {
    outline: none;
    border-color: var(--em-primary);
    background: #fff;
}

.em-field-readonly {
    padding: 10px 14px;
    background: #f4f4f6;
    border-radius: 10px;
    font-size: 15px;
    color: #888;
}

.em-hint {
    font-size: 11px;
    color: #aaa;
    margin: 5px 0 0;
}

.em-geocode-row {
    display: flex;
    gap: 8px;
    align-items: stretch;
}

.em-geocode-row input {
    flex: 1;
    min-width: 0;
}

.em-strava-status {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.4;
}

.em-strava-status--connected {
    background: #f0faf4;
    color: #1a7a40;
}

.em-strava-status--disconnected {
    background: #fff8f5;
    color: #e84c1e;
}

.em-strava-status--disconnected a {
    color: #e84c1e;
    font-weight: 600;
}

.em-strava-status svg {
    flex-shrink: 0;
    margin-top: 2px;
}

.em-profile-message {
    padding: 10px 16px;
    border-radius: 10px;
    font-size: 13px;
    margin-bottom: 16px;
    display: none;
}

.em-profile-message--success {
    background: #f0faf4;
    color: #1a7a40;
    border: 1px solid #b7eac8;
    display: block;
}

.em-profile-message--error {
    background: #fff0f0;
    color: #c0392b;
    border: 1px solid #f5b7b1;
    display: block;
}

/* Supporter-Tile (large Badge) */
.em-supporter-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.em-supporter-tile-label {
    font-size: 11px;
    font-weight: 600;
    color: #666;
    text-align: center;
}

@media (max-width: 768px) {
    .em-avatar-wrap {
        flex-direction: column;
        align-items: flex-start;
    }

    .em-geocode-row {
        flex-direction: column;
    }

    .em-geocode-row .em-button--secondary {
        width: 100%;
        justify-content: center;
    }

    .em-avatar-upload {
        flex-direction: column;
        align-items: flex-start;
    }
}