/* Home page statistic cards. */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 12px 16px 0;
}

.stat-card {
    position: relative;
    min-height: 112px;
    padding: 14px 14px 12px;
    overflow: hidden;
    --stat-icon-color: #2563eb;
    --stat-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 19.5A2.5 2.5 0 0 1 6.5 17H20'/%3E%3Cpath d='M6.5 2H20v20H6.5A2.5 2.5 0 0 1 4 19.5v-15A2.5 2.5 0 0 1 6.5 2z'/%3E%3C/svg%3E");
    border: 1px solid rgba(226, 232, 240, 0.82);
    border-radius: 18px;
    background:
        radial-gradient(circle at 90% 88%, rgba(191, 219, 254, 0.78) 0 28px, transparent 29px),
        linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
    box-shadow:
        0 12px 24px rgba(15, 23, 42, 0.08),
        0 2px 6px rgba(15, 23, 42, 0.04);
}

.stat-card::after {
    content: '';
    position: absolute;
    right: -22px;
    bottom: -22px;
    width: 88px;
    height: 88px;
    border-radius: 50%;
    background: rgba(219, 234, 254, 0.78);
    opacity: 1;
    z-index: 0;
}

.stat-card::before {
    content: '';
    position: absolute;
    right: 14px;
    bottom: 14px;
    z-index: 1;
    width: 28px;
    height: 28px;
    background: var(--stat-icon-color);
    opacity: 0.28;
    -webkit-mask: var(--stat-icon) center / contain no-repeat;
    mask: var(--stat-icon) center / contain no-repeat;
}

.stat-card .label {
    position: relative;
    z-index: 1;
    display: block;
    color: #8ea0b7;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;
}

.stat-card .value {
    position: relative;
    z-index: 1;
    margin-top: 12px;
    color: #2563eb;
    font-size: 30px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.8px;
    background: none;
    -webkit-text-fill-color: currentColor;
}

.stat-card.danger .value {
    color: #f06464;
    background: none;
    -webkit-text-fill-color: currentColor;
}

.stat-card.danger {
    --stat-icon-color: #f06464;
    --stat-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10.29 3.86 1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z'/%3E%3Cpath d='M12 9v4'/%3E%3Cpath d='M12 17h.01'/%3E%3C/svg%3E");
}

.stat-card.success .value {
    color: #34c99a;
    background: none;
    -webkit-text-fill-color: currentColor;
}

.stat-card.success {
    --stat-icon-color: #34c99a;
    --stat-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z'/%3E%3Cpath d='M14 2v6h6'/%3E%3Cpath d='M9 15h6'/%3E%3Cpath d='M9 11h2'/%3E%3C/svg%3E");
}

.stat-card.warning .value {
    color: #f5a400;
    background: none;
    -webkit-text-fill-color: currentColor;
}

.stat-card.warning {
    --stat-icon-color: #f5a400;
    --stat-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='11' width='18' height='10' rx='2'/%3E%3Cpath d='M7 11V7a5 5 0 0 1 10 0v4'/%3E%3Cpath d='M8 16h.01'/%3E%3Cpath d='M16 16h.01'/%3E%3C/svg%3E");
}

.stat-card .trend {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    height: 21px;
    margin-top: 11px;
    padding: 0 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
}

/* Home latest documents. */
.section-title {
    padding: 20px 22px 12px;
}

.document-list {
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 0 8px 24px;
}

.document-list .doc-card.home-release-card {
    display: block;
    padding: 0;
    border: none;
    border-radius: 16px;
    background: #ffffff;
    box-shadow:
        0 12px 28px rgba(15, 23, 42, 0.08),
        0 2px 8px rgba(15, 23, 42, 0.04);
    text-decoration: none;
    color: inherit;
    overflow: hidden;
    transform: translateZ(0);
}

.document-list .doc-card.home-release-card:active {
    transform: scale(0.988);
}

.release-hero {
    position: relative;
    height: 170px;
    overflow: hidden;
    border-radius: 16px 16px 0 0;
    background:
        radial-gradient(circle at 11% 24%, rgba(255, 255, 255, 0.36) 0 74px, rgba(255, 255, 255, 0.28) 75px 76px, transparent 78px),
        radial-gradient(circle at 73% 90%, rgba(255, 255, 255, 0.18) 0 48px, rgba(255, 255, 255, 0.32) 49px 50px, transparent 52px),
        linear-gradient(135deg, #ffd9bf 0%, #ffb487 100%);
}

.home-release-card.pdf .release-hero {
    background:
        radial-gradient(circle at 11% 24%, rgba(255, 255, 255, 0.32) 0 74px, rgba(255, 255, 255, 0.26) 75px 76px, transparent 78px),
        radial-gradient(circle at 73% 90%, rgba(255, 255, 255, 0.16) 0 48px, rgba(255, 255, 255, 0.3) 49px 50px, transparent 52px),
        linear-gradient(135deg, #ffd3de 0%, #ffabc0 100%);
}

.home-release-card.doc .release-hero,
.home-release-card.docx .release-hero {
    background:
        radial-gradient(circle at 11% 24%, rgba(255, 255, 255, 0.32) 0 74px, rgba(255, 255, 255, 0.24) 75px 76px, transparent 78px),
        radial-gradient(circle at 73% 90%, rgba(255, 255, 255, 0.16) 0 48px, rgba(255, 255, 255, 0.3) 49px 50px, transparent 52px),
        linear-gradient(135deg, #cfe2ff 0%, #9ec9ff 100%);
}

.home-release-card.xls .release-hero,
.home-release-card.xlsx .release-hero {
    background:
        radial-gradient(circle at 11% 24%, rgba(255, 255, 255, 0.34) 0 74px, rgba(255, 255, 255, 0.25) 75px 76px, transparent 78px),
        radial-gradient(circle at 73% 90%, rgba(255, 255, 255, 0.18) 0 48px, rgba(255, 255, 255, 0.3) 49px 50px, transparent 52px),
        linear-gradient(135deg, #d5f8e8 0%, #9ee8ca 100%);
}

.home-release-card.txt .release-hero {
    background:
        radial-gradient(circle at 11% 24%, rgba(255, 255, 255, 0.34) 0 74px, rgba(255, 255, 255, 0.25) 75px 76px, transparent 78px),
        radial-gradient(circle at 73% 90%, rgba(255, 255, 255, 0.18) 0 48px, rgba(255, 255, 255, 0.3) 49px 50px, transparent 52px),
        linear-gradient(135deg, #f1f5f9 0%, #d9e2ec 100%);
}

.release-hero::before {
    content: '';
    position: absolute;
    left: 86px;
    top: 32px;
    width: calc(100% - 106px);
    height: 104px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.32);
}

.release-hero::after {
    content: '';
    position: absolute;
    left: -46px;
    top: -48px;
    width: 188px;
    height: 188px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.28);
}

.release-type-icon {
    position: absolute;
    left: 20px;
    top: 60px;
    z-index: 2;
    width: 50px;
    height: 50px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.6px;
    background: linear-gradient(135deg, #ff7f50 0%, #ff623f 100%);
    box-shadow: 0 12px 24px rgba(255, 99, 63, 0.22);
}

.home-release-card.pdf .release-type-icon {
    background: linear-gradient(135deg, #ff4966 0%, #ff3860 100%);
}

.home-release-card.doc .release-type-icon,
.home-release-card.docx .release-type-icon {
    background: linear-gradient(135deg, #60a5fa 0%, #2563eb 100%);
}

.home-release-card.xls .release-type-icon,
.home-release-card.xlsx .release-type-icon {
    background: linear-gradient(135deg, #34d399 0%, #059669 100%);
}

.home-release-card.txt .release-type-icon {
    background: linear-gradient(135deg, #cbd5e1 0%, #94a3b8 100%);
    box-shadow: 0 12px 24px rgba(148, 163, 184, 0.2);
}

.release-illustration {
    position: absolute;
    left: 100px;
    right: 74px;
    top: 45px;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.release-illustration span {
    display: block;
    height: 6px;
    border-radius: 999px;
    background: rgba(255, 126, 92, 0.62);
}

.home-release-card.pdf .release-illustration span {
    background: rgba(255, 91, 120, 0.58);
}

.home-release-card.doc .release-illustration span,
.home-release-card.docx .release-illustration span {
    background: rgba(37, 99, 235, 0.42);
}

.home-release-card.xls .release-illustration span,
.home-release-card.xlsx .release-illustration span {
    background: rgba(5, 150, 105, 0.42);
}

.home-release-card.txt .release-illustration span {
    background: rgba(100, 116, 139, 0.32);
}

.release-illustration span:nth-child(1) { width: 100%; }
.release-illustration span:nth-child(2) { width: 79%; }
.release-illustration span:nth-child(3) { width: 90%; }
.release-illustration span:nth-child(4) { width: 59%; }
.release-illustration span:nth-child(5) { width: 74%; }

.release-pie {
    position: absolute;
    right: 45px;
    top: 69px;
    z-index: 2;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: conic-gradient(rgba(255, 117, 80, 0.66) 0 25%, rgba(255, 255, 255, 0.34) 25% 100%);
}

.home-release-card.pdf .release-pie {
    background: conic-gradient(rgba(255, 74, 102, 0.58) 0 25%, rgba(255, 255, 255, 0.34) 25% 100%);
}

.home-release-card.doc .release-pie,
.home-release-card.docx .release-pie {
    background: conic-gradient(rgba(37, 99, 235, 0.42) 0 25%, rgba(255, 255, 255, 0.34) 25% 100%);
}

.home-release-card.xls .release-pie,
.home-release-card.xlsx .release-pie {
    background: conic-gradient(rgba(5, 150, 105, 0.42) 0 25%, rgba(255, 255, 255, 0.34) 25% 100%);
}

.home-release-card.txt .release-pie {
    background: conic-gradient(rgba(100, 116, 139, 0.34) 0 25%, rgba(255, 255, 255, 0.42) 25% 100%);
}

.release-file-pill {
    position: absolute;
    right: 10px;
    bottom: 10px;
    z-index: 3;
    height: 26px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0 12px;
    border-radius: 999px;
    background: #ffffff;
    color: #ff623f;
    font-size: 10.5px;
    font-weight: 700;
    box-shadow: 0 8px 18px rgba(255, 117, 80, 0.16);
}

.home-release-card.pdf .release-file-pill { color: #ff3860; }
.home-release-card.doc .release-file-pill,
.home-release-card.docx .release-file-pill { color: #2563eb; }
.home-release-card.xls .release-file-pill,
.home-release-card.xlsx .release-file-pill { color: #059669; }
.home-release-card.txt .release-file-pill { color: #64748b; }

.file-mini-icon {
    width: 11px;
    height: 13px;
    border-radius: 2px;
    background:
        linear-gradient(90deg, rgba(148, 163, 184, 0.45) 0 65%, transparent 65% 100%),
        linear-gradient(180deg, #eef2ff 0%, #f8fafc 100%);
    position: relative;
}

.file-mini-icon::before,
.file-mini-icon::after {
    content: '';
    position: absolute;
    left: 3px;
    right: 2px;
    height: 1px;
    background: #c4b5fd;
    border-radius: 1px;
}

.file-mini-icon::before { top: 5px; }
.file-mini-icon::after { top: 8px; }

.release-body {
    padding: 14px 16px 14px;
    background: #ffffff;
}

.document-list .home-release-card .doc-name {
    margin: 0 0 13px;
    color: #020617;
    font-size: 15px;
    font-weight: 800;
    line-height: 1.42;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.release-info-row {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

.release-date {
    flex: 0 0 auto;
    color: #a6b3c4;
    font-size: 10.5px;
    font-weight: 600;
    white-space: nowrap;
}

.release-tags {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.release-tags span {
    display: inline-flex;
    align-items: center;
    height: 22px;
    padding: 0 10px;
    border-radius: 999px;
    background: #edf2ff;
    color: #6674e8;
    font-size: 10.5px;
    font-weight: 700;
}

.release-tags .category-color-0 { background: #edf2ff; color: #6674e8; }
.release-tags .category-color-1 { background: #e7f7ed; color: #21b56e; }
.release-tags .category-color-2 { background: #fff0e8; color: #ff7a35; }
.release-tags .category-color-3 { background: #fff1f4; color: #ff3860; }
.release-tags .category-color-4 { background: #eff6ff; color: #2563eb; }
.release-tags .category-color-5 { background: #f3e8ff; color: #9333ea; }
.release-tags .category-color-6 { background: #ecfeff; color: #0891b2; }
.release-tags .category-color-7 { background: #f1f5f9; color: #64748b; }

.release-stats {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 12px;
    padding-top: 11px;
    border-top: 1px solid rgba(226, 232, 240, 0.78);
    color: #8fa0b3;
    font-size: 10.5px;
    font-weight: 700;
}

.release-stats span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.stat-view {
    color: #9aa8ba;
}

.stat-view svg {
    width: 13px;
    height: 13px;
    color: #9aa8ba;
    stroke-width: 2.2;
}

.document-list .doc-card-header,
.document-list .doc-card-footer,
.document-list .doc-icon,
.home-doc-main,
.document-list .doc-meta,
.document-list .doc-category,
.document-list .doc-format {
    all: unset;
}

.stat-card .trend.up {
    color: #10b981;
    background: rgba(16, 185, 129, 0.13);
}

.stat-card .trend.down {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.12);
}

@media (max-width: 360px) {
    .stat-grid {
        gap: 10px;
        margin-left: 12px;
        margin-right: 12px;
    }

    .stat-card {
        min-height: 116px;
        padding: 14px 13px;
    }

    .stat-card .value {
        font-size: 26px;
    }
}
