.download-attachments {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
}

.download-card-footer .download-attachment {
    display: flex;
    height: auto;
    min-width: 0;
    overflow: hidden;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0;
    color: #1e293b;
    background: #fff;
    border: 1px solid #dbe4e1;
}

.download-card-footer .download-attachment:hover {
    color: #164e3f;
    border-color: #9dbab2;
    box-shadow: 0 5px 14px rgba(15, 23, 42, 0.09);
}

.download-card-footer .download-preview-link {
    display: block;
    height: auto;
    color: inherit;
    background: transparent;
    text-decoration: none;
}

.download-image-preview {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #eef2f1;
}

.download-image-preview img {
    display: block;
    width: 100%;
    height: 100%;
    padding: 0.75rem;
    object-fit: contain;
}

.download-document-preview {
    display: grid;
    min-height: 150px;
    padding: 1.25rem;
    place-items: center;
    align-content: center;
    gap: 0.35rem;
    background: #f8faf9;
}

.download-document-preview > i {
    color: #9b0b62;
    font-size: 2.8rem;
}

.download-document-preview > em {
    color: #64748b;
    font-size: 0.65rem;
    font-style: normal;
    font-weight: 700;
}

.download-document-preview > small {
    margin-top: 0.45rem;
    color: #164e3f;
    font-size: 0.7rem;
    font-weight: 600;
}

.download-card-footer .download-file-button {
    display: flex;
    height: 40px;
    margin: 0.7rem;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    color: #fff;
    background: #9b0b62;
    font-size: 0.75rem;
    font-weight: 600;
    text-decoration: none;
}

.download-card-footer .download-file-button:hover {
    color: #fff;
    background: #7f0950;
}

.download-document-list-item {
    display: flex;
    min-width: 0;
    padding: 0.65rem;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    background: #fff;
    border: 1px solid #dbe4e1;
}

.download-card-footer .download-document-info {
    display: flex;
    min-width: 0;
    height: auto;
    align-items: center;
    justify-content: flex-start;
    gap: 0.75rem;
    color: #1e293b;
    background: transparent;
    text-decoration: none;
}

.download-document-info > i {
    flex: 0 0 auto;
    color: #9b0b62;
    font-size: 1.8rem;
}

.download-document-info > span {
    display: grid;
    min-width: 0;
    gap: 0.15rem;
}

.download-document-info strong {
    overflow: hidden;
    font-size: 0.78rem;
    line-height: 1.5;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.download-document-info small {
    color: #64748b;
    font-size: 0.65rem;
}

.download-document-actions {
    display: flex;
    flex: 0 0 auto;
    gap: 0.35rem;
}

.download-card-footer .download-document-actions a {
    display: inline-flex;
    width: 36px;
    height: 36px;
    align-items: center;
    justify-content: center;
    color: #164e3f;
    background: #edf4f2;
    border: 1px solid #d4e2de;
    text-decoration: none;
}

.download-card-footer .download-document-actions a:hover {
    color: #fff;
    background: #164e3f;
}

@media (max-width: 575.98px) {
    .download-attachments {
        grid-template-columns: 1fr;
    }

    .download-document-list-item {
        align-items: flex-start;
    }
}

.download-library {
    display: grid;
    gap: 3rem;
}

.download-library-title {
    display: flex;
    margin-bottom: 1rem;
    padding-bottom: 0.7rem;
    align-items: end;
    justify-content: space-between;
    gap: 1rem;
    border-bottom: 3px solid #374151;
}

.download-library-title h2 {
    margin: 0;
    color: #164e3f;
    font-size: 1.4rem;
}

.download-library-title h2 i {
    margin-right: 0.4rem;
    color: #9b0b62;
}

.download-library-title > span {
    color: #64748b;
    font-size: 0.72rem;
}

.download-media-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem;
}

.download-media-item {
    min-width: 0;
    overflow: hidden;
    background: #fff;
    border: 1px solid #dbe4e1;
}

.download-media-item header {
    display: flex;
    min-height: 52px;
    padding: 0.65rem 0.85rem;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    color: #fff;
    background: #3f3f3f;
}

.download-media-item header strong {
    overflow: hidden;
    font-size: 0.82rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.download-media-item header span {
    flex: 0 0 auto;
    padding: 0.2rem 0.4rem;
    color: #fff;
    background: #9b0b62;
    font-size: 0.58rem;
}

.download-media-preview {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #f1f5f4;
}

.download-media-preview img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.download-media-button {
    display: flex;
    height: 42px;
    margin: 0.75rem;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    color: #fff;
    background: #9b0b62;
    font-size: 0.75rem;
    font-weight: 600;
    text-decoration: none;
}

.download-media-button:hover {
    color: #fff;
    background: #7f0950;
}

.download-list-head,
.download-list-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 130px 120px;
    align-items: center;
    gap: 1rem;
}

.download-list-head {
    padding: 0.65rem 0.9rem;
    color: #475569;
    font-size: 0.72rem;
    font-weight: 600;
}

.download-list-head span:last-child {
    text-align: center;
}

.download-list-row {
    min-height: 68px;
    padding: 0.65rem 0.9rem;
    background: #fff;
    border-top: 1px solid #e2e8f0;
}

.download-list-row:nth-child(odd) {
    background: #f8faf9;
}

.download-list-name {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 0.75rem;
    color: #334155;
    text-decoration: none;
}

.download-list-name > i {
    flex: 0 0 auto;
    color: #9b0b62;
    font-size: 1.55rem;
}

.download-list-name > span {
    display: grid;
    min-width: 0;
    gap: 0.15rem;
}

.download-list-name strong {
    font-size: 0.78rem;
    line-height: 1.5;
}

.download-list-name small,
.download-list-row time {
    color: #64748b;
    font-size: 0.68rem;
}

.download-list-button {
    display: inline-flex;
    height: 36px;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    color: #fff;
    background: #164e3f;
    font-size: 0.68rem;
    font-weight: 600;
    text-decoration: none;
}

.download-list-button:hover {
    color: #fff;
    background: #0f3b30;
}

@media (max-width: 991.98px) {
    .download-media-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 575.98px) {
    .download-media-grid {
        grid-template-columns: 1fr;
    }

    .download-list-head {
        display: none;
    }

    .download-list-row {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .download-list-row time {
        display: none;
    }

    .download-list-button {
        width: 38px;
    }

    .download-list-button span {
        display: none;
    }
}
