.mphb {
    position: relative;
    overflow: hidden;
    max-width: 100%;
    border-radius: 8px;
    padding: 1.15rem 1.2rem;
    background: linear-gradient(
        135deg,
        color-mix(in srgb, var(--bs-primary) 10%, white),
        color-mix(in srgb, var(--bs-secondary) 6%, white) 55%,
        #ffffff
    );
    border: 1px solid color-mix(in srgb, var(--bs-secondary) 16%, white);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.06);
    isolation: isolate;
}

.mphb--card {
    width: 100%;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    isolation: auto;
}

.mphb--compact {
    padding: 0.95rem 1rem;
}

.mphb__content {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    min-width: 0;
    max-width: 100%;
}

.mphb--card .mphb__content {
    align-items: flex-start;
    gap: 0.9rem;
}

.mphb__left {
    min-width: 0;
    max-width: 100%;
    flex: 1 1 28rem;
}

.mphb__right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: flex-end;
    position: relative;
    z-index: 2;
    min-width: 0;
    max-width: 100%;
}

.mphb--card .mphb__right {
    margin-left: auto;
    gap: 0.6rem;
}

.mphb__badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 0.35rem 0.75rem;
    margin-bottom: 0.7rem;
    border-radius: 999px;
    font-size: 0.73rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--bs-primary);
    background: color-mix(in srgb, var(--bs-primary) 10%, white);
    border: 1px solid color-mix(in srgb, var(--bs-primary) 18%, white);
    backdrop-filter: blur(6px);
}

.mphb--card .mphb__badge {
    min-height: 24px;
    padding: 0.2rem 0.6rem;
    margin-bottom: 0.45rem;
    font-size: 0.66rem;
}

.mphb__title {
    margin: 0;
    max-width: 100%;
    font-size: clamp(1.25rem, 1.7vw, 1.72rem);
    line-height: 1.15;
    font-weight: 800;
    color: #1f2a3d;
    letter-spacing: 0;
    overflow-wrap: anywhere;
}

.mphb--card .mphb__title {
    font-size: 1rem;
    line-height: 1.35;
    letter-spacing: -0.01em;
}

.mphb__subtitle {
    margin: 0.55rem 0 0;
    max-width: min(760px, 100%);
    font-size: 0.92rem;
    line-height: 1.6;
    color: #5f6b7a;
    overflow-wrap: anywhere;
}

.mphb__right .mui-btn,
.mphb__right .btn,
.mphb__right a,
.mphb__right button {
    max-width: 100%;
}

.mphb--card .mphb__subtitle {
    margin-top: 0.28rem;
    max-width: none;
    font-size: 0.84rem;
    line-height: 1.55;
}

.mphb__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
    margin-top: 1rem;
}

.mphb--card .mphb__meta {
    gap: 0.55rem;
    margin-top: 0.75rem;
}

.mphb__meta-item {
    min-width: 128px;
    padding: 0.78rem 0.9rem;
    border-radius: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.62);
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(12px);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.mphb--card .mphb__meta-item {
    min-width: 112px;
    padding: 0.65rem 0.78rem;
    box-shadow: none;
}

.mphb__meta-label {
    display: block;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #7c8797;
}

.mphb__meta-value {
    display: block;
    margin-top: 0.35rem;
    font-size: 0.92rem;
    line-height: 1.45;
    font-weight: 800;
    color: #1f2a3d;
    word-break: break-word;
}

.mphb__graphics {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}

.mphb--no-graphics .mphb__graphics {
    display: none;
}

.mphb__orb,
.mphb__ring,
.mphb__grid {
    position: absolute;
}

.mphb__orb {
    border-radius: 999px;
    filter: blur(6px);
    opacity: 0.9;
}

.mphb__orb--one {
    top: -40px;
    right: 8%;
    width: 180px;
    height: 180px;
    background: color-mix(in srgb, var(--bs-primary) 20%, white);
}

.mphb__orb--two {
    bottom: -55px;
    left: 18%;
    width: 140px;
    height: 140px;
    background: color-mix(in srgb, var(--bs-secondary) 18%, white);
}

.mphb__ring {
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.45);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.mphb__ring--one {
    top: 18px;
    right: 24px;
    width: 180px;
    height: 180px;
    opacity: 0.35;
}

.mphb__ring--two {
    bottom: -35px;
    right: 120px;
    width: 120px;
    height: 120px;
    opacity: 0.22;
}

.mphb__grid {
    top: 0;
    right: 0;
    width: 38%;
    height: 100%;
    opacity: 0.18;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.65) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.65) 1px, transparent 1px);
    background-size: 18px 18px;
    mask-image: linear-gradient(to left, rgba(0, 0, 0, 1), transparent);
    -webkit-mask-image: linear-gradient(to left, rgba(0, 0, 0, 1), transparent);
}

.mphb--graphic-02 .mphb__grid {
    width: 45%;
    opacity: 0.12;
    transform: skewX(-14deg);
}

.mphb--graphic-02 .mphb__orb--one {
    width: 220px;
    height: 220px;
    right: -10px;
    top: -50px;
}

.mphb--graphic-02 .mphb__orb--two {
    width: 110px;
    height: 110px;
    left: auto;
    right: 25%;
    bottom: -20px;
}

.mphb--graphic-03 .mphb__grid {
    display: none;
}

.mphb--graphic-03 .mphb__ring--one {
    width: 220px;
    height: 220px;
    top: -30px;
    right: 40px;
    opacity: 0.22;
}

.mphb--graphic-03 .mphb__ring--two {
    width: 160px;
    height: 160px;
    bottom: -55px;
    right: 10px;
    opacity: 0.18;
}

.mphb--graphic-03 .mphb__orb--one {
    width: 210px;
    height: 210px;
    right: 0;
    top: -70px;
}

.mphb--graphic-03 .mphb__orb--two {
    width: 95px;
    height: 95px;
    left: 10%;
    bottom: -20px;
}

@media (max-width: 767.98px) {
    .mphb {
        padding: 1.05rem 1rem;
    }

    .mphb__right {
        width: 100%;
        justify-content: flex-start;
    }

    .mphb--card .mphb__right {
        margin-left: 0;
    }

    .mphb__title {
        font-size: 1.25rem;
    }

    .mphb__subtitle {
        font-size: 0.86rem;
    }

    .mphb__meta {
        width: 100%;
    }

    .mphb__meta-item {
        flex: 1 1 140px;
        min-width: 0;
    }

    .mphb__grid {
        width: 55%;
    }
}
[data-bs-theme="dark"] .mphb {
    background:
        radial-gradient(
            circle at top left,
            rgba(14, 165, 233, 0.08),
            transparent 28%
        ),
        linear-gradient(135deg, #16202f 0%, #1b2433 45%, #202a3a 100%);
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: none;
}

[data-bs-theme="dark"] .mphb--card {
    background: transparent;
    border-color: transparent;
}

[data-bs-theme="dark"] .mphb__title {
    color: #f8fafc;
}

[data-bs-theme="dark"] .mphb__subtitle {
    color: #b8c3d1;
}

[data-bs-theme="dark"] .mphb__meta-item {
    border-color: rgba(255, 255, 255, 0.08);
    background: rgba(11, 18, 32, 0.38);
    box-shadow: none;
}

[data-bs-theme="dark"] .mphb__meta-label {
    color: #8ea0bc;
}

[data-bs-theme="dark"] .mphb__meta-value {
    color: #f8fafc;
}

[data-bs-theme="dark"] .mphb__badge {
    color: #ffffff;
    background: color-mix(in srgb, var(--bs-primary) 22%, #16202f);
    border-color: color-mix(in srgb, var(--bs-primary) 30%, #16202f);
}

[data-bs-theme="dark"] .mphb__grid {
    opacity: 0.05;
}

[data-bs-theme="dark"] .mphb__orb {
    filter: blur(18px);
    opacity: 0.22;
}

[data-bs-theme="dark"] .mphb__orb--one {
    background: color-mix(in srgb, var(--bs-primary) 26%, transparent);
}

[data-bs-theme="dark"] .mphb__orb--two {
    background: color-mix(in srgb, var(--bs-secondary) 18%, transparent);
}

[data-bs-theme="dark"] .mphb__ring {
    border-color: rgba(255, 255, 255, 0.05);
    box-shadow: none;
}

[data-bs-theme="dark"] .mphb__panel {
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.04),
        rgba(255, 255, 255, 0.015)
    );
    border-color: rgba(255, 255, 255, 0.06);
    box-shadow: none;
    opacity: 0.6;
}

[data-bs-theme="dark"] .mphb__dots {
    opacity: 0.08;
}

[data-bs-theme="dark"] .mphb__ribbon {
    opacity: 0.08;
    filter: blur(6px);
}

.mphb[class*="mphb--lms-"] {
    border-radius: 1.1rem;
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--bs-primary) 9%, white), transparent 34%),
        linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.mphb[class*="mphb--lms-"] .mphb__graphics {
    opacity: 1;
}

.mphb__lms-graphic {
    position: absolute;
    inset: 0;
    overflow: hidden;
    max-width: 100%;
}

.mphb__lms-card,
.mphb__lms-node,
.mphb__lms-path,
.mphb__lms-seal,
.mphb__lms-chip {
    position: absolute;
    display: block;
}

.mphb__lms-card--main {
    right: 3.2rem;
    top: 1.05rem;
    width: min(185px, 24vw);
    height: 112px;
    border-radius: 0.85rem;
    border: 1px solid color-mix(in srgb, var(--bs-primary) 18%, white);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(255, 255, 255, 0.58)),
        linear-gradient(135deg, color-mix(in srgb, var(--bs-primary) 10%, white), color-mix(in srgb, var(--bs-secondary) 8%, white));
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(8px);
    transform: rotate(-2deg);
}

.mphb__lms-bar {
    position: absolute;
    left: 1rem;
    top: 1rem;
    width: 90px;
    height: 8px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--bs-primary) 55%, white);
}

.mphb__lms-bar--short {
    top: 1.9rem;
    width: 56px;
    background: color-mix(in srgb, var(--bs-secondary) 45%, white);
}

.mphb__lms-bars {
    position: absolute;
    inset: auto 1rem 1rem 1rem;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.45rem;
    align-items: end;
    height: 48px;
}

.mphb__lms-bars i {
    display: block;
    border-radius: 999px 999px 0.35rem 0.35rem;
    background: linear-gradient(180deg, var(--bs-primary), color-mix(in srgb, var(--bs-primary) 35%, white));
    animation: mphbLmsBars 2.6s ease-in-out infinite;
}

.mphb__lms-bars i:nth-child(1) { height: 42%; animation-delay: 0s; }
.mphb__lms-bars i:nth-child(2) { height: 78%; animation-delay: 0.15s; }
.mphb__lms-bars i:nth-child(3) { height: 58%; animation-delay: 0.3s; }
.mphb__lms-bars i:nth-child(4) { height: 92%; animation-delay: 0.45s; }

.mphb__lms-node {
    width: 18px;
    height: 18px;
    border-radius: 999px;
    border: 3px solid #ffffff;
    background: var(--bs-primary);
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.12);
}

.mphb__lms-node--one {
    right: 17rem;
    top: 2.3rem;
}

.mphb__lms-node--two {
    right: 15rem;
    bottom: 1.7rem;
    background: #16a34a;
}

.mphb__lms-node--three {
    right: 2rem;
    bottom: 2.1rem;
    background: #3b82f6;
}

.mphb__lms-path {
    height: 2px;
    border-radius: 999px;
    transform-origin: right center;
    background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--bs-primary) 40%, white));
    animation: mphbLmsPath 2.8s ease-in-out infinite;
}

.mphb__lms-path--one {
    right: 12.5rem;
    top: 3rem;
    width: 92px;
    transform: rotate(9deg);
}

.mphb__lms-path--two {
    right: 5.2rem;
    bottom: 2.7rem;
    width: 120px;
    transform: rotate(-8deg);
    animation-delay: 0.22s;
}

.mphb__lms-seal {
    right: 2.45rem;
    top: 1rem;
    width: 48px;
    height: 48px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #16a34a;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(22, 163, 74, 0.18);
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08);
    animation: mphbLmsSeal 3.4s ease-in-out infinite;
}

.mphb__lms-seal i {
    font-size: 1.18rem;
}

.mphb__lms-chip {
    min-width: 42px;
    padding: 0.26rem 0.58rem;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    color: #1f2a3d;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(255, 255, 255, 0.76);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.mphb__lms-chip--top {
    right: 12.4rem;
    top: 0.8rem;
}

.mphb__lms-chip--bottom {
    right: 10.6rem;
    bottom: 0.9rem;
}

.mphb--lms-assessments .mphb__lms-chip--bottom { content: "CBT"; }
.mphb--lms-certificates .mphb__lms-seal { color: #f59e0b; }
.mphb--lms-community .mphb__lms-node--two { background: #f59e0b; }
.mphb--lms-tutor .mphb__lms-chip--top { color: var(--bs-primary); }
.mphb--lms-showcase .mphb__lms-card--main { width: 215px; height: 128px; }

@keyframes mphbLmsBars {
    0%, 100% { transform: scaleY(0.92); opacity: 0.78; }
    50% { transform: scaleY(1.08); opacity: 1; }
}

@keyframes mphbLmsPath {
    0%, 100% { opacity: 0.42; }
    50% { opacity: 0.9; }
}

@keyframes mphbLmsSeal {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-3px) scale(1.04); }
}

[data-bs-theme="dark"] .mphb[class*="mphb--lms-"] {
    background:
        radial-gradient(circle at top left, color-mix(in srgb, var(--bs-primary) 14%, transparent), transparent 32%),
        linear-gradient(135deg, #121a27 0%, #172233 52%, #111827 100%);
}

[data-bs-theme="dark"] .mphb__lms-card--main {
    background:
        linear-gradient(180deg, rgba(31, 38, 55, 0.86), rgba(17, 24, 39, 0.7)),
        linear-gradient(135deg, color-mix(in srgb, var(--bs-primary) 15%, #111827), #151f2f);
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: none;
}

[data-bs-theme="dark"] .mphb__lms-node {
    border-color: #111827;
}

[data-bs-theme="dark"] .mphb__lms-seal,
[data-bs-theme="dark"] .mphb__lms-chip {
    color: #f8fafc;
    background: rgba(17, 24, 39, 0.82);
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: none;
}

@media (max-width: 767.98px) {
    .mphb__lms-graphic {
        opacity: 0.34;
    }

    .mphb__lms-card--main {
        right: -1.5rem;
        top: 1rem;
        width: 150px;
    }

    .mphb__lms-node,
    .mphb__lms-path,
    .mphb__lms-seal,
    .mphb__lms-chip {
        display: none;
    }
}

@media (max-width: 1199.98px) {
    .mphb[class*="mphb--lms-"] .mphb__left {
        flex-basis: min(100%, 32rem);
    }

    .mphb__lms-card--main {
        right: 1rem;
        width: 150px;
        opacity: 0.56;
    }

    .mphb__lms-node,
    .mphb__lms-path,
    .mphb__lms-seal,
    .mphb__lms-chip {
        display: none;
    }
}

@media (max-width: 991.98px) {
    .mphb {
        padding: 1rem;
    }

    .mphb__right {
        width: 100%;
        justify-content: flex-start;
    }

    .mphb__graphics {
        opacity: 0.26;
    }
}

@media (prefers-reduced-motion: reduce) {
    .mphb__lms-bars i,
    .mphb__lms-path,
    .mphb__lms-seal {
        animation: none;
    }
}

/* Product operational pages use simple, compact page headers. */
body.product-ui-v2 .mphb:not(.mphb--card) {
    min-height: 0;
    background: var(--app-surface);
    border-color: var(--app-line);
    box-shadow: var(--app-shadow-xs);
}

body.product-ui-v2 .mphb__graphics,
body.product-ui-v2 .mphb .product-dimension-scene,
body.product-ui-v2 .mphb__right .lxp-graphic {
    display: none !important;
}
