* {
    box-sizing: border-box;
}

:root {
    --blue: #1769e0;
    --blue-dark: #174c9d;
    --blue-soft: #edf5ff;
    --green: #24a866;
    --red: #e15151;
    --gray: #8b96a8;
    --border: #dce4ee;
    --text: #172338;
    --muted: #6e7c91;
    --background: #f6f8fb;
}

body {
    margin: 0;
    font-family:
        Inter,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
    background: var(--background);
    color: var(--text);
}

button,
input,
select {
    font: inherit;
}

.topbar {
    height: 76px;
    padding: 0 5%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: white;
    border-bottom: 1px solid var(--border);
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-icon {
    width: 42px;
    height: 42px;
    border-radius: 13px;
    background: var(--blue);
    color: white;
    display: grid;
    place-items: center;
    font-size: 21px;
    font-weight: 800;
}

.brand strong {
    display: block;
    font-size: 20px;
}

.brand span {
    display: block;
    margin-top: 2px;
    font-size: 12px;
    color: var(--muted);
}

.top-actions {
    display: flex;
    gap: 8px;
}

.header-button {
    background: white;
    border: 1px solid var(--border);
    padding: 10px 15px;
    border-radius: 10px;
    cursor: pointer;
    color: #4d5c72;
}

main {
    width: min(1500px, 92%);
    margin: 0 auto 60px;
}

.hero {
    padding: 38px 0 23px;
}

.eyebrow,
.small-label {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.3px;
    color: var(--blue);
}

.hero h1 {
    margin: 8px 0 12px;
    font-size: clamp(32px, 4vw, 48px);
    line-height: 1.07;
}

.hero h1 span {
    color: var(--blue);
}

.hero p {
    max-width: 680px;
    color: var(--muted);
    font-size: 16px;
    line-height: 1.6;
}

.notice {
    display: flex;
    gap: 15px;
    align-items: flex-start;
    padding: 17px 20px;
    margin-bottom: 18px;
    border: 1px solid #b9d7ff;
    background: var(--blue-soft);
    border-radius: 14px;
}

.notice-icon {
    flex: 0 0 auto;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--blue);
    color: white;
    font-weight: 800;
}

.notice strong {
    color: var(--blue-dark);
}

.notice p {
    margin: 4px 0 0;
    color: #58708e;
    line-height: 1.5;
    font-size: 14px;
}

.search-panel {
    background: white;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 17px;
    display: grid;
    grid-template-columns: 1fr 1.3fr auto auto;
    gap: 12px;
    align-items: end;
    box-shadow: 0 8px 25px rgba(34, 58, 89, .05);
    margin-bottom: 20px;
}

.field label {
    display: block;
    font-size: 12px;
    color: var(--muted);
    margin: 0 0 7px 3px;
    font-weight: 700;
}

.input-wrap {
    position: relative;
}

.input-wrap span {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--blue);
}

input,
select {
    height: 48px;
    width: 100%;
    background: #fbfcfe;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0 14px;
    outline: none;
}

.input-wrap input {
    padding-left: 38px;
}

input:focus,
select:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(23, 105, 224, .1);
}

.search-button {
    height: 48px;
    border: 0;
    padding: 0 27px;
    border-radius: 10px;
    background: var(--blue);
    color: white;
    font-weight: 750;
    cursor: pointer;
}

.reset-button {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: white;
    cursor: pointer;
    font-size: 20px;
}

.content-grid {
    display: grid;
    grid-template-columns: minmax(390px, 42%) 1fr;
    gap: 18px;
    min-height: 650px;
}

.results-column,
.map-column {
    background: white;
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(34, 58, 89, .04);
}

.results-head,
.map-head {
    min-height: 74px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 18px;
    border-bottom: 1px solid var(--border);
}

.results-head h2 {
    margin: 3px 0 0;
    font-size: 19px;
}

.count-badge {
    background: var(--blue-soft);
    color: var(--blue);
    font-weight: 800;
    border-radius: 20px;
    padding: 5px 11px;
}

.doctor-list {
    padding: 12px;
    max-height: 720px;
    overflow-y: auto;
}

.doctor-card {
    border: 1px solid var(--border);
    border-radius: 13px;
    padding: 16px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: .18s ease;
}

.doctor-card:hover {
    border-color: #a8c9f4;
    box-shadow: 0 8px 22px rgba(50, 80, 120, .08);
    transform: translateY(-1px);
}

.doctor-card.active {
    border: 2px solid var(--blue);
}

.doctor-top {
    display: flex;
    justify-content: space-between;
    gap: 15px;
}

.doctor-name {
    margin: 0;
    font-size: 17px;
}

.specialty {
    color: var(--blue);
    font-size: 13px;
    font-weight: 700;
    margin: 4px 0 0;
}

.favorite {
    border: 0;
    background: transparent;
    font-size: 21px;
    color: #7f8a9b;
    cursor: pointer;
}

.address {
    margin: 14px 0 10px;
    color: #56657b;
    line-height: 1.45;
    font-size: 14px;
}

.opening {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 13px;
}

.status-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
}

.status-open {
    color: var(--green);
}

.status-closed {
    color: var(--red);
}

.doctor-actions {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 7px;
}

.action-button {
    height: 37px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fbfcfe;
    color: #42536b;
    cursor: pointer;
    font-size: 12px;
    font-weight: 700;
}

.action-button:hover {
    background: var(--blue-soft);
    border-color: #bdd8fa;
    color: var(--blue);
}

.map-head {
    gap: 10px;
}

.map-legend {
    display: flex;
    gap: 13px;
    color: var(--muted);
    font-size: 11px;
}

.dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 4px;
}

.green {
    background: var(--green);
}

.red {
    background: var(--red);
}

.gray {
    background: var(--gray);
}

#map {
    height: 650px;
    width: 100%;
}

.doctor-marker {
    width: 27px;
    height: 27px;
    border-radius: 50% 50% 50% 8px;
    transform: rotate(-45deg);
    border: 3px solid white;
    box-shadow: 0 2px 7px rgba(0,0,0,.25);
}

.doctor-marker.open {
    background: var(--green);
}

.doctor-marker.closed {
    background: var(--red);
}

.doctor-marker.unknown {
    background: var(--gray);
}

.popup-name {
    font-weight: 800;
    font-size: 14px;
}

.popup-specialty {
    color: var(--blue);
    margin-top: 2px;
}

.popup-hours {
    margin-top: 7px;
    font-size: 12px;
}

.loading,
.empty {
    padding: 35px 15px;
    text-align: center;
    color: var(--muted);
}

@media (max-width: 950px) {
    .search-panel {
        grid-template-columns: 1fr 1fr;
    }

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

    #map {
        height: 500px;
    }

    .top-actions {
        display: none;
    }
}

@media (max-width: 600px) {
    main {
        width: 94%;
    }

    .search-panel {
        grid-template-columns: 1fr;
    }

    .hero {
        padding-top: 24px;
    }

    .doctor-actions {
        grid-template-columns: 1fr;
    }

    .map-legend {
        display: none;
    }
}
.compact-notice {
    margin: 0 16px 10px;
    padding: 10px 14px;
    background: #f3f7fd;
    border: 1px solid #dce8f8;
    border-radius: 10px;
    color: #607089;
    font-size: 12px;
    line-height: 1.45;
}

.compact-notice strong {
    color: #315c96;
    margin-right: 4px;
}

/* =========================================================
   MODERNER HEADER
   ========================================================= */

.topbar {
    height: 78px;
    padding: 0 42px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #ffffff;
    border-bottom: 1px solid #e4eaf2;
}

.top-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 100%;
    flex-shrink: 0;
}

.nav-button {
    height: 42px;
    padding: 0 15px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    border: 1px solid #dce4ee;
    border-radius: 10px;
    background: #ffffff;
    color: #44536a;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: 0.15s ease;
}

.nav-button:hover {
    background: #f4f8fe;
    border-color: #bcd3f1;
    color: #1769e0;
}

.nav-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    line-height: 1;
}


/* =========================================================
   ACCOUNT BUTTON
   ========================================================= */

.account-menu {
    position: relative;
    margin-left: 4px;
}

.account-menu > summary {
    list-style: none;
}

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

.account-menu > summary::marker {
    display: none;
    content: "";
}

.account-trigger {
    height: 50px;
    min-width: 215px;
    max-width: 270px;
    padding: 5px 10px 5px 6px;

    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;

    border: 1px solid #e0e7f0;
    border-radius: 13px;

    background: #f8fafd;
    cursor: pointer;
    user-select: none;
}

.account-trigger:hover,
.account-menu[open] .account-trigger {
    background: #f2f7fd;
    border-color: #c5d8ef;
}

.account-avatar {
    width: 38px;
    height: 38px;
    min-width: 38px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 11px;
    background: #1769e0;
    color: #ffffff;

    font-size: 15px;
    font-weight: 800;
    line-height: 1;
}

.account-summary {
    flex: 1;
    min-width: 0;

    display: flex;
    flex-direction: column;
    justify-content: center;

    text-align: left;
}

.account-summary strong {
    display: block;
    max-width: 155px;

    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;

    color: #172338;
    font-size: 13px;
    font-weight: 700;
}

.account-summary span {
    display: block;
    margin-top: 3px;

    color: #8794a6;
    font-size: 10px;
    font-weight: 600;
}

.account-chevron {
    width: 20px;

    display: flex;
    align-items: center;
    justify-content: center;

    color: #7f8da0;
    font-size: 17px;
    line-height: 1;

    transition: transform 0.15s ease;
}

.account-menu[open] .account-chevron {
    transform: rotate(180deg);
}


/* =========================================================
   ACCOUNT DROPDOWN
   ========================================================= */

.account-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    z-index: 99999;

    width: 285px;
    padding: 10px;

    background: #ffffff;
    border: 1px solid #dce4ee;
    border-radius: 15px;

    box-shadow:
        0 18px 50px rgba(30, 48, 75, 0.15),
        0 4px 12px rgba(30, 48, 75, 0.06);
}

.account-dropdown-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px;
}

.account-avatar.large {
    width: 44px;
    height: 44px;
    min-width: 44px;
    border-radius: 12px;
    font-size: 17px;
}

.account-dropdown-head strong {
    display: block;
    color: #172338;
    font-size: 13px;
    font-weight: 700;
}

.account-dropdown-head span {
    display: block;
    margin-top: 4px;
    color: #8a97a8;
    font-size: 11px;
}

.account-divider {
    height: 1px;
    margin: 7px 4px;
    background: #edf1f5;
}

.account-logout {
    display: flex;
    align-items: center;
    gap: 9px;

    padding: 11px 12px;
    border-radius: 9px;

    color: #c34747;
    text-decoration: none;
    font-size: 13px;
    font-weight: 650;
}

.account-logout:hover {
    background: #fff1f1;
}


/* Gewählter Arzt aus der Karte */
.doctor-card-selected {
    animation: doctorSelectedPulse .85s ease;
}

@keyframes doctorSelectedPulse {

    0% {
        box-shadow:
            0 0 0 0 rgba(23, 105, 224, .24);
    }

    45% {
        box-shadow:
            0 0 0 5px rgba(23, 105, 224, .11);
    }

    100% {
        box-shadow:
            0 0 0 0 rgba(23, 105, 224, 0);
    }
}
