/* Zdravotní dokumentace — přehledy klubu a týmu (HealthClubPanel, HealthTeamPanel,
   HealthOverviewTile, HealthStateBadge). Vychází ze stylu karet Přehledu (em-ov-*). */

.em-hp {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
    margin-top: 0.5rem;
}

.em-hp-card {
    background: #fff;
    border: 1px solid #e4e4e9;
    border-radius: 14px;
}

.em-hp-card-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.9rem 1.1rem;
    border-bottom: 1px solid #ececf0;
}

    .em-hp-card-head h3 {
        margin: 0;
        font-size: 1rem;
        font-weight: 700;
        color: #141416;
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }

.em-hp-hint {
    font-size: 0.75rem;
    color: #5d5d66;
}

.em-hp-count {
    background: #ff007f;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.05rem 0.5rem;
    border-radius: 999px;
}

/* ── Podzáložky ── */
.em-hp-subtabs {
    display: flex;
    gap: 0.25rem;
    background: #f1f3f5;
    border-radius: 0.6rem;
    padding: 0.25rem;
    flex-wrap: wrap;
}

.em-hp-subtab {
    flex: 1 1 auto;
    min-width: 140px;
    border: none;
    background: transparent;
    border-radius: 0.45rem;
    padding: 0.5rem 0.9rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: #6c757d;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
}

    .em-hp-subtab:hover {
        color: #1a1a1a;
    }

    .em-hp-subtab.active {
        background: #fff;
        color: #1a1a1a;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
    }

    .em-hp-subtab .em-hp-subtab-count {
        font-size: 0.75rem;
        color: #adb5bd;
        font-weight: 500;
    }

    .em-hp-subtab.active .em-hp-subtab-count {
        color: #ff007f;
    }

/* ── Filtrovací pilulky ── */
.em-hp-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.em-hp-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    min-height: 36px;
    padding: 0.3rem 0.8rem;
    border-radius: 999px;
    border: 1px solid #e5e5e5;
    background: #fff;
    color: #495057;
    font-size: 0.8rem;
}

    .em-hp-chip.active {
        border-color: #ff007f;
        color: #a80058;
        background: #fff5fa;
        font-weight: 600;
    }

/* ── Dlaždice stavů ── */
.em-hp-kpis {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 0.85rem;
}

.em-hp-kpi {
    background: #fff;
    border: 1px solid #e4e4e9;
    border-radius: 14px;
    padding: 0.9rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    text-align: left;
    width: 100%;
}

    .em-hp-kpi:hover {
        border-color: #ff007f;
    }

    .em-hp-kpi.em-hp-kpi-alert {
        border-color: #ff007f;
        background: #fff9fc;
    }

.em-hp-kpi-label {
    font-size: 0.8rem;
    font-weight: 500;
    color: #5d5d66;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.em-hp-kpi-value {
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #141416;
    font-variant-numeric: tabular-nums;
}

.em-hp-ic {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    flex: none;
}

/* ── Barvy stavů (vždy s ikonou a textem, ne jen barvou) ── */
.em-hp-ok { background: #e3f4ea; color: #0a7a3d; }
.em-hp-soon { background: #fff1dc; color: #9a5300; }
.em-hp-bad { background: #fde7e5; color: #b3261e; }
.em-hp-pend { background: #ffe3f0; color: #a80058; }
.em-hp-none { background: #f0f0f3; color: #5d5d66; }

.em-hp-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    white-space: nowrap;
    vertical-align: middle;
}

.em-hp-flag {
    display: inline-flex;
    align-items: center;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.15rem 0.5rem;
    border-radius: 6px;
    background: #f0f0f3;
    color: #3c3c44;
    white-space: nowrap;
}

.em-hp-flag-hi {
    background: #141416;
    color: #fff;
}

/* ── Tabulka týmů ── */
.em-hp-table-wrap {
    overflow-x: auto;
}

.em-hp-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    min-width: 620px;
}

    .em-hp-table th {
        text-align: left;
        font-size: 0.72rem;
        font-weight: 600;
        color: #5d5d66;
        padding: 0.6rem 0.75rem;
    }

    .em-hp-table td {
        padding: 0.65rem 0.75rem;
        border-top: 1px solid #f0f0f3;
        vertical-align: middle;
        font-variant-numeric: tabular-nums;
    }

        .em-hp-table th:first-child, .em-hp-table td:first-child {
            padding-left: 1.1rem;
        }

    .em-hp-table .num {
        text-align: right;
    }

.em-hp-link {
    background: none;
    border: none;
    padding: 0;
    font-weight: 600;
    color: #141416;
    text-align: left;
}

    .em-hp-link:hover {
        color: #a80058;
    }

.em-hp-bar {
    display: flex;
    height: 10px;
    border-radius: 999px;
    overflow: hidden;
    background: #f0f0f3;
    min-width: 120px;
    gap: 2px;
}

    .em-hp-bar i { display: block; }
    .em-hp-bar .b-ok { background: #0a7a3d; }
    .em-hp-bar .b-soon { background: #e08a00; }
    .em-hp-bar .b-bad { background: #b3261e; }
    .em-hp-bar .b-pend { background: #ff007f; }
    .em-hp-bar .b-none { background: #d4d4da; }

.em-hp-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 0.6rem 1.1rem 0.2rem;
    font-size: 0.75rem;
    color: #3c3c44;
}

    .em-hp-legend span {
        display: inline-flex;
        align-items: center;
        gap: 0.35rem;
    }

    .em-hp-legend i {
        width: 10px;
        height: 10px;
        border-radius: 3px;
        display: inline-block;
    }

/* ── Řádky lidí ── */
.em-hp-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    padding: 0.7rem 1.1rem;
    border-bottom: 1px solid #f0f0f3;
}

    .em-hp-row:last-child {
        border-bottom: none;
    }

.em-hp-row-btn {
    display: flex;
    flex: 1 1 240px;
    min-width: 0;
    align-items: center;
    gap: 0.7rem;
    background: none;
    border: none;
    padding: 0;
    text-align: left;
    color: inherit;
}

    .em-hp-row-btn img {
        width: 34px;
        height: 34px;
        border-radius: 50%;
        flex: none;
        object-fit: cover;
    }

.em-hp-row-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #141416;
}

.em-hp-row-text {
    font-size: 0.82rem;
    color: #3c3c44;
    margin-top: 0.2rem;
    white-space: pre-line;
}

/* Šipka rozbalení řádku — vypadá jako prostá šedá ikona, jen je klikací. */
.em-hp-toggle {
    width: 32px;
    height: 32px;
    padding: 0;
    border: none;
    background: transparent;
    color: #8a8a94;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    cursor: pointer;
}

    .em-hp-toggle:hover {
        color: #ff007f;
    }

.em-hp-expand {
    padding: 0 1.1rem 1rem;
    border-bottom: 1px solid #f0f0f3;
    background: #fafafb;
}

.em-hp-empty {
    padding: 0.9rem 1.1rem;
    font-size: 0.85rem;
    color: #5d5d66;
}

.em-hp-search {
    max-width: 260px;
    min-height: 38px;
}

.em-hp-note {
    display: flex;
    gap: 0.6rem;
    align-items: flex-start;
    background: #f6f6f8;
    border: 1px solid #ececf0;
    border-radius: 12px;
    padding: 0.75rem 0.9rem;
    font-size: 0.82rem;
    color: #3c3c44;
}

.em-hp-cols {
    display: flex;
    flex-wrap: wrap;
    gap: 1.1rem;
    align-items: flex-start;
}

.em-hp-main {
    flex: 999 1 520px;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}

.em-hp-side {
    flex: 1 1 300px;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}

/* Bezpečnostní karta týmu — tmavá hlavička jako v návrhu. */
.em-hp-safety-head {
    background: #141416;
    color: #fff;
    border-radius: 13px 13px 0 0;
    padding: 0.9rem 1.1rem;
}

    .em-hp-safety-head .em-hp-kicker {
        font-size: 0.72rem;
        font-weight: 700;
        color: #ff7ab8;
        text-transform: uppercase;
        letter-spacing: 0.04em;
    }

    .em-hp-safety-head h3 {
        margin: 0.2rem 0 0;
        font-size: 1.05rem;
        font-weight: 700;
        color: #fff;
    }

.em-hp-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    min-height: 40px;
    padding: 0.45rem 0.85rem;
    border-radius: 10px;
    border: 1px solid #e0e0e6;
    background: #fff;
    color: #141416;
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
}

    .em-hp-btn:hover {
        border-color: #ff007f;
    }

/* Dlaždice v Přehledu klubu */
.em-hp-tile {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem 1.25rem;
    padding: 0.9rem 1.1rem;
}

    .em-hp-tile .em-hp-tile-num {
        display: inline-flex;
        align-items: center;
        gap: 0.45rem;
        font-size: 0.85rem;
        color: #3c3c44;
    }

        .em-hp-tile .em-hp-tile-num strong {
            font-size: 1.15rem;
            color: #141416;
            font-variant-numeric: tabular-nums;
        }

@media (max-width: 576px) {
    .em-hp-search {
        max-width: none;
        width: 100%;
    }

    .em-hp-subtab {
        min-width: 120px;
    }
}

@media print {
    .em-hp-noprint {
        display: none !important;
    }
}
