/* ── Header profile dropdown (public + dashboard) ── */

.hpm-panel {
    --hpm-brand: #01305F;
    --hpm-accent: #0089BF;
    --hpm-border: rgba(1, 48, 95, 0.08);
    --hpm-muted: #64748b;
    min-width: 300px;
    max-width: min(320px, calc(100vw - 1.5rem));
    border: 1px solid var(--hpm-border) !important;
    border-radius: 16px !important;
    box-shadow: 0 12px 40px rgba(1, 48, 95, 0.14) !important;
    margin-top: 10px !important;
    overflow: hidden;
    animation: hpm-slide-down 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes hpm-slide-down {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hpm-head {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1rem 0.85rem;
    background: linear-gradient(160deg, #f8fbff 0%, #eef6fc 55%, #e8f4fa 100%);
    border-bottom: 1px solid var(--hpm-border);
    text-align: start;
}

.hpm-head__avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #fff;
    box-shadow: 0 2px 8px rgba(1, 48, 95, 0.12);
    flex-shrink: 0;
}

.hpm-head__body {
    flex: 1;
    min-width: 0;
}

.hpm-head__name {
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--hpm-brand);
    line-height: 1.35;
    margin: 0 0 0.15rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hpm-head__email {
    display: block;
    font-size: 0.75rem;
    color: var(--hpm-muted);
    line-height: 1.35;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    direction: ltr;
    text-align: start;
}

.hpm-head__role {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    margin-top: 0.35rem;
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
    font-size: 0.6875rem;
    font-weight: 600;
    line-height: 1.4;
}

.hpm-head__role--company {
    background: rgba(0, 137, 191, 0.12);
    color: #0369a1;
}

.hpm-head__role--employee {
    background: rgba(1, 48, 95, 0.08);
    color: var(--hpm-brand);
}

.hpm-head__role--client {
    background: rgba(16, 185, 129, 0.12);
    color: #047857;
}

.hpm-head__role--pending {
    background: rgba(245, 158, 11, 0.14);
    color: #b45309;
}

.hpm-wallet-slot {
    padding: 0.65rem 0.75rem 0.5rem;
    border-bottom: 1px solid #f0f4f8;
}

.hpm-wallet {
    display: block;
    text-decoration: none;
    border-radius: 12px;
}

.hpm-wallet__inner {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.7rem 0.8rem;
    border-radius: 12px;
    background: linear-gradient(135deg, #f8fbff 0%, #eef6fc 100%);
    border: 1px solid rgba(1, 48, 95, 0.1);
    transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.hpm-wallet:hover .hpm-wallet__inner {
    background: linear-gradient(135deg, #eef6fc 0%, #e3f2fa 100%);
    border-color: rgba(0, 137, 191, 0.22);
    box-shadow: 0 3px 10px rgba(0, 137, 191, 0.12);
    transform: translateY(-1px);
}

.hpm-wallet__icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--hpm-brand), var(--hpm-accent));
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    flex-shrink: 0;
}

.hpm-wallet--company .hpm-wallet__icon {
    background: linear-gradient(135deg, #0f766e, #14b8a6);
}

.hpm-wallet__body {
    flex: 1;
    min-width: 0;
    text-align: start;
}

.hpm-wallet__label {
    display: block;
    font-size: 0.72rem;
    color: var(--hpm-muted);
    line-height: 1.35;
    margin-bottom: 0.1rem;
}

.hpm-wallet__amount {
    display: block;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--hpm-brand);
    line-height: 1.35;
    font-variant-numeric: tabular-nums;
}

.hpm-wallet__amount small {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--hpm-accent);
}

.hpm-wallet__chevron {
    width: 26px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(0, 137, 191, 0.1);
    color: var(--hpm-accent);
    font-size: 0.7rem;
    flex-shrink: 0;
}

.hpm-body {
    padding: 0.35rem 0.5rem 0.5rem;
}

.hpm-section + .hpm-section {
    margin-top: 0.15rem;
}

.hpm-section__label {
    display: block;
    padding: 0.45rem 0.65rem 0.25rem;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: #94a3b8;
    text-transform: none;
}

.hpm-link {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    width: 100%;
    padding: 0.55rem 0.65rem;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--hpm-brand);
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    text-align: start;
    transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.hpm-link:hover,
.hpm-link:focus-visible {
    background: rgba(1, 48, 95, 0.06);
    color: var(--hpm-brand);
    transform: translateX(-2px);
}

.hpm-link.is-active {
    background: rgba(0, 137, 191, 0.1);
    color: var(--hpm-accent);
    font-weight: 600;
}

.hpm-link__icon {
    width: 32px;
    height: 32px;
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    flex-shrink: 0;
    background: rgba(1, 48, 95, 0.07);
    color: var(--hpm-brand);
}

.hpm-link--admin .hpm-link__icon {
    background: rgba(0, 137, 191, 0.12);
    color: var(--hpm-accent);
}

.hpm-link__text {
    flex: 1;
    min-width: 0;
}

.hpm-footer {
    padding: 0.35rem 0.5rem 0.55rem;
    border-top: 1px solid #f0f4f8;
    margin-top: 0.15rem;
}

.hpm-logout {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    width: 100%;
    padding: 0.55rem 0.65rem;
    border-radius: 10px;
    color: #dc2626 !important;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.15s ease;
}

.hpm-logout:hover {
    background: rgba(220, 38, 38, 0.08);
    color: #dc2626 !important;
}

.hpm-logout__icon {
    width: 32px;
    height: 32px;
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(220, 38, 38, 0.1);
    font-size: 0.95rem;
}

.hpm-body .dropdown-item[data-rv-pwa-menu-install] i {
    width: 32px;
    height: 32px;
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(1, 48, 95, 0.07);
    font-size: 0.95rem;
}

.hpm-body button.dropdown-item[data-rv-pwa-menu-install] {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    width: 100%;
    padding: 0.55rem 0.65rem;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--hpm-brand);
    font-size: 0.875rem;
    font-weight: 500;
    text-align: start;
}

.hpm-body button.dropdown-item[data-rv-pwa-menu-install]:hover {
    background: rgba(1, 48, 95, 0.06);
    color: var(--hpm-brand);
}

@media (max-width: 991.98px) {
    .hpm-panel {
        min-width: min(300px, calc(100vw - 24px));
    }
}
