.hm-report-shell {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(125, 147, 184, 0.18) !important;
    border-radius: 28px !important;
    background:
        radial-gradient(circle at top left, rgba(133, 181, 255, 0.18), transparent 30%),
        radial-gradient(circle at top right, rgba(119, 208, 184, 0.16), transparent 28%),
        linear-gradient(180deg, #fbfdff 0%, #f6f9ff 48%, #fffaf3 100%) !important;
    box-shadow: 0 30px 70px -50px rgba(33, 53, 85, 0.55);
}

.hm-report-shell::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.56), transparent 42%),
        radial-gradient(circle at 18% 12%, rgba(255, 255, 255, 0.85), transparent 24%);
    pointer-events: none;
}

.hm-report-shell > * {
    position: relative;
    z-index: 1;
}

.hm-report-title {
    margin: -0.25rem 0 1.35rem !important;
    padding: 1.15rem 1.35rem;
    border: 1px solid rgba(126, 151, 196, 0.16);
    border-radius: 24px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(239, 245, 255, 0.94));
    box-shadow: 0 22px 44px -34px rgba(48, 74, 118, 0.55);
}

.hm-report-title strong {
    color: #183b67;
}

.hm-report-card {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(116, 136, 168, 0.14) !important;
    border-radius: 22px !important;
    background: rgba(255, 255, 255, 0.92) !important;
    box-shadow: 0 24px 50px -40px rgba(33, 53, 85, 0.55);
    backdrop-filter: blur(10px);
}

.hm-report-card:not(:last-of-type)::after {
    content: "";
    position: absolute;
    left: 26px;
    right: 26px;
    bottom: -12px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(122, 143, 181, 0.55), transparent);
}

.hm-report-card .card-header {
    position: relative;
    border-bottom: none !important;
    padding: 1rem 1.35rem;
}

.hm-report-card .card-header::after {
    content: "";
    position: absolute;
    left: 1.35rem;
    right: 1.35rem;
    bottom: 0;
    height: 1px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.06));
}

.hm-report-card .card-body {
    padding: 1.3rem 1.4rem;
}

#student-report-contents .btn[data-report-target] {
    border-color: rgba(110, 137, 185, 0.16);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(244, 248, 255, 0.96));
    color: #214060;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.88);
    transition: transform 160ms ease, box-shadow 220ms ease, border-color 220ms ease, background 220ms ease;
}

#student-report-contents .btn[data-report-target]:hover,
#student-report-contents .btn[data-report-target]:focus {
    transform: translateY(-2px);
    border-color: rgba(87, 124, 190, 0.34);
    background: linear-gradient(180deg, rgba(255, 255, 255, 1), rgba(236, 244, 255, 0.98));
    box-shadow: 0 18px 30px -26px rgba(45, 78, 131, 0.65);
}

#student-report-assessment-results > .card-header {
    background: linear-gradient(135deg, #eaf7ff, #d7ecff) !important;
    color: #0b4268 !important;
}

#student-report-topic-profile > .card-header {
    background: linear-gradient(135deg, #fbf2e3, #f3e1be) !important;
    color: #704610 !important;
}

#student-report-engagement-habits > .card-header {
    background: linear-gradient(135deg, #0f6efd, #6ea7ff) !important;
    color: #ffffff !important;
}

#student-report-practice-quality > .card-header {
    background: linear-gradient(135deg, #1b8757, #64c89b) !important;
    color: #ffffff !important;
}

#student-report-memory-retention > .card-header {
    background: linear-gradient(135deg, #6f42c1, #a98ae3) !important;
    color: #ffffff !important;
}

#student-report-current-goals > .card-header {
    background: linear-gradient(135deg, #def7ef, #c7efe2) !important;
    color: #0b6f57 !important;
}

#student-report-visual-progress > .card-header {
    background: linear-gradient(135deg, #f4f6fb, #e0e7f4) !important;
    color: #334c6c !important;
}

.hm-report-benchmark {
    display: block;
    margin-top: 0.55rem;
}

.hm-report-benchmark-row {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    margin-top: 0.3rem;
}

.hm-report-benchmark-label {
    width: 2.9rem;
    flex-shrink: 0;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #64748b;
}

.hm-report-benchmark-track {
    flex: 1;
    height: 8px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(171, 184, 208, 0.28);
}

.hm-report-benchmark-fill {
    display: block;
    height: 100%;
    width: var(--benchmark-width, 0%);
    transform-origin: left center;
    transform: scaleX(0);
    animation: hm-report-bar-grow 760ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
    animation-delay: var(--benchmark-delay, 0ms);
}

.hm-report-benchmark-fill--student {
    background: linear-gradient(90deg, #0d6efd, #5aa6ff);
}

.hm-report-benchmark-fill--average {
    background: linear-gradient(90deg, #94a3b8, #c2cfdd);
}

.hm-report-benchmark-fill--highest {
    background: linear-gradient(90deg, #ffb703, #ffd166);
}

.hm-report-benchmark-value {
    min-width: 3.5rem;
    text-align: right;
    font-size: 0.72rem;
    color: #5b6778;
}

.hm-report-comparison {
    display: block;
    line-height: 1.4;
}

.hm-report-metric-card {
    border-color: rgba(116, 136, 168, 0.16) !important;
    border-radius: 20px !important;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 250, 255, 0.92)) !important;
    box-shadow: 0 18px 34px -28px rgba(45, 70, 112, 0.42);
}

.hm-report-stat-block + .hm-report-stat-block {
    margin-top: 0.85rem;
    padding-top: 0.8rem;
    border-top: 1px solid rgba(154, 172, 198, 0.24);
}

.hm-report-metric-card .hm-report-comparison {
    margin-top: 0.28rem;
    font-size: 0.94em;
}

.hm-report-metric-tile {
    border: 1px solid rgba(116, 136, 168, 0.16);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.9);
    padding: 1rem;
}

.hm-report-metric-tile-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    flex: 0 0 2.25rem;
    border-radius: 999px;
    background: rgba(13, 110, 253, 0.1);
    color: #0d6efd;
}

.hm-report-metric-label {
    font-size: 0.82rem;
    font-weight: 700;
    color: #4b5563;
}

.hm-report-metric-value {
    margin-top: 0.1rem;
    font-size: 1.35rem;
    font-weight: 800;
    color: #1f2937;
}

.hm-report-inline-note {
    max-width: 72rem;
    line-height: 1.55;
}

.hm-report-finding-card {
    border: 1px solid rgba(116, 136, 168, 0.14);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.88);
    padding: 1rem;
}

.hm-report-overview-card .card-body {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(248, 251, 255, 0.88));
}

#progress-page:has(#tab-my-report.active) > .page-container {
    max-width: 98%;
}

.hm-report-topic-profile-table {
    --hm-report-topic-grid: rgba(128, 146, 176, 0.28);
    --hm-report-topic-section-border: rgba(100, 116, 139, 0.28);
}

.hm-report-topic-profile-table thead th {
    vertical-align: middle;
    border-color: var(--hm-report-topic-grid);
}

.hm-report-topic-header-topic {
    background: #f5f7fa !important;
    color: #1f2937 !important;
}

.hm-report-topic-header-group,
.hm-report-topic-header-sub {
    text-align: center;
    font-weight: 700;
}

.hm-report-topic-header-group--learning,
.hm-report-topic-header-sub--learning {
    background: #e8f1ff !important;
    color: #16436f !important;
}

.hm-report-topic-header-group--flashcards,
.hm-report-topic-header-sub--flashcards {
    background: #ecfdf3 !important;
    color: #12633b !important;
}

.hm-report-topic-header-group--mcq,
.hm-report-topic-header-sub--mcq {
    background: #fff2d9 !important;
    color: #7a4b08 !important;
}

.hm-report-topic-section-start {
    border-left: 2px solid var(--hm-report-topic-section-border);
}

.hm-report-back-to-top {
    position: fixed;
    right: 1.5rem;
    bottom: 1.5rem;
    z-index: 1080;
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.8rem 1rem;
    border: 1px solid rgba(83, 111, 163, 0.18);
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(15, 110, 253, 0.96), rgba(85, 153, 255, 0.96));
    color: #ffffff;
    box-shadow: 0 24px 48px -26px rgba(21, 63, 128, 0.68);
    opacity: 0;
    pointer-events: none;
    transform: translateY(18px);
    transition: opacity 220ms ease, transform 220ms ease, box-shadow 220ms ease;
}

.hm-report-back-to-top:hover,
.hm-report-back-to-top:focus {
    color: #ffffff;
    box-shadow: 0 26px 54px -24px rgba(21, 63, 128, 0.76);
}

.hm-report-back-to-top.is-visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.hm-report-back-to-top.hm-report-back-to-top--teacher {
    bottom: 6rem;
}

.hm-report-reveal {
    opacity: 0;
    transform: translateY(24px);
}

.hm-report-reveal.is-visible {
    animation: hm-report-card-enter 620ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
    animation-delay: var(--report-reveal-delay, 0ms);
}

@keyframes hm-report-card-enter {
    from {
        opacity: 0;
        transform: translateY(24px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes hm-report-bar-grow {
    from {
        transform: scaleX(0);
    }

    to {
        transform: scaleX(1);
    }
}

@media (prefers-reduced-motion: reduce) {
    .hm-report-reveal,
    .hm-report-reveal.is-visible {
        opacity: 1;
        transform: none;
        animation: none;
    }

    .hm-report-benchmark-fill {
        transform: none;
        animation: none;
    }

    #student-report-contents .btn[data-report-target],
    .hm-report-back-to-top {
        transition: none;
    }
}
