.panelhead {
    margin: -20px -20px 18px;
    padding: 15px 20px;
    min-height: 58px;
    border-radius: 12px 12px 0 0;
    border: 1px solid #d8e4f5;
    border-left: 4px solid #3475ed;
    background: linear-gradient(105deg, #edf4ff 0%, #f7faff 72%, #ffffff 100%);
}
.panelhead h2 {
    color: #1d3557;
    font-size: 17px;
    font-weight: 800;
    letter-spacing: 0.1px;
}
.panelhead .muted {
    margin-top: 3px;
}
.panelhead .textbtn {
    white-space: nowrap;
}

.recent-carousel {
    position: relative;
    margin: 0;
}
.recent {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 2px 2px 12px;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    scrollbar-width: thin;
}
.recent-item {
    box-sizing: border-box;
    flex: 0 0 100%;
    min-width: 0;
    min-height: 105px;
    padding: 17px 18px;
    border: 1px solid #dce4ef;
    border-radius: 12px;
    background: #fff;
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    scroll-snap-align: start;
    box-shadow: 0 2px 7px rgba(28, 53, 87, 0.06);
}
.recent-item-main {
    flex: 1;
    min-width: 0;
}
.recent-item-heading {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 7px 12px;
    margin-bottom: 7px;
}
.recent-item-heading b {
    color: #1d3557;
    font-size: 15px;
    font-weight: 800;
    white-space: nowrap;
}
.recent-item-heading span {
    color: #34445a;
    font-size: 14px;
    font-weight: 700;
}
.recent-item small {
    display: -webkit-box;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.55;
    overflow: hidden;
    overflow-wrap: anywhere;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}
.recent-total {
    flex: 0 0 auto;
    margin-left: auto;
    min-width: 92px;
    text-align: center;
    font-size: 12px;
    padding: 9px 11px;
}
.recent-arrow {
    position: absolute;
    z-index: 2;
    top: 50%;
    transform: translateY(-50%);
    display: none;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    min-height: 38px;
    padding: 0;
    border: 1px solid #c9d7eb;
    border-radius: 50% !important;
    background: rgba(255, 255, 255, 0.96);
    color: #245db7;
    font-size: 27px;
    line-height: 1;
    box-shadow: 0 3px 10px rgba(20, 40, 80, 0.18);
}
.recent-arrow:disabled {
    opacity: 0.3;
    cursor: default;
}
#recentCarousel.has-overflow .recent-arrow {
    display: flex;
}
#recentPrev {
    left: -10px;
}
#recentNext {
    right: -10px;
}
.recent-pager {
    padding-top: 5px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    text-align: center;
}
.recent:has(.empty) {
    display: block;
}
@media (max-width: 800px) {
    .panelhead {
        margin: -18px -18px 16px;
        padding: 13px 14px;
    }
    .recent-item {
        padding: 14px 12px;
        gap: 9px;
    }
    .recent-item-heading {
        gap: 4px 8px;
    }
    .recent-item-heading b {
        font-size: 14px;
    }
    .recent-item-heading span {
        font-size: 13px;
    }
    .recent-total {
        min-width: 76px;
        padding: 8px 7px;
        font-size: 11px;
    }
    .recent-arrow {
        width: 34px;
        height: 34px;
        min-height: 34px;
    }
    #recentPrev {
        left: -8px;
    }
    #recentNext {
        right: -8px;
    }
}

.panel > h2 {
    display: block;
    margin: -20px -20px 18px;
    padding: 14px 18px;
    border: 1px solid #d8e4f5;
    border-left: 4px solid #3475ed;
    border-radius: 12px 12px 0 0;
    background: linear-gradient(105deg, #edf4ff 0%, #f7faff 72%, #ffffff 100%);
    color: #1d3557;
    font-size: 16px;
    font-weight: 800;
}

.stats-panel {
    margin: 0 0 20px;
    padding: 0 18px 16px;
    border: 1px solid #d8e1ed;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 2px 7px rgba(28, 53, 87, 0.06);
}
.stats-heading {
    margin: 0 -18px 0;
    padding: 13px 18px;
    border-bottom: 1px solid #e4ebf5;
    color: #1d3557;
    font-size: 14px;
    font-weight: 800;
}
.stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
    margin: 0;
}
.stats .stat {
    min-width: 0;
    padding: 15px 18px 3px;
}
.stats .stat + .stat {
    border-left: 1px solid #e8edf4;
}
.stats .stat span {
    display: block;
    color: var(--muted);
    font-size: 12px;
}
.stats .stat b {
    display: block;
    margin-top: 5px;
    color: #172f50;
    font-size: 27px;
    line-height: 1.2;
}
@media (max-width: 800px) {
    .stats-panel {
        padding: 0 12px 12px;
    }
    .stats-heading {
        margin-left: -12px;
        margin-right: -12px;
        padding: 12px;
    }
    .stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .stats .stat {
        padding: 12px 10px 5px;
    }
    .stats .stat:nth-child(3) {
        border-left: 0;
    }
    .stats .stat:nth-child(n + 3) {
        border-top: 1px solid #e8edf4;
    }
    .stats .stat b {
        font-size: 24px;
    }
}
