/* ===== GRID DE CATEGORIAS ===== */
.dp-categories-grid {
    display: grid;
    gap: 24px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 0;
}

.dp-cols-1 { grid-template-columns: 1fr; }
.dp-cols-2 { grid-template-columns: repeat(2, 1fr); }
.dp-cols-3 { grid-template-columns: repeat(3, 1fr); }

/* ===== CARD DE CATEGORIA ===== */
.dp-category-card {
    background: #f0f0f0;
    border-radius: 12px;
    border: 1px solid #e0e0e0;
    overflow: hidden;
    transition: box-shadow 0.2s;
}

.dp-category-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

.dp-category-header {
    padding: 18px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dp-category-header h3 {
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    margin: 0;
}

.dp-file-count {
    background: rgba(255,255,255,0.25);
    color: #fff;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.dp-category-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.dp-no-files {
    text-align: center;
    color: #999;
    padding: 20px 0;
    font-size: 14px;
}

/* ===== CARD DE ARQUIVO ===== */
.dp-file-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #fff;
    border-radius: 8px;
    padding: 12px 14px;
    border: 1px solid #e8e8e8;
    transition: box-shadow 0.15s;
}

.dp-file-card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.dp-file-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: #f5f5f5;
    border-radius: 8px;
}

.dp-file-icon svg {
    width: 28px;
    height: 28px;
}

.dp-file-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.dp-file-name {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dp-file-type {
    font-size: 11px;
    font-weight: 600;
    color: #999;
    text-transform: uppercase;
}

.dp-file-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.dp-btn-view {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #c0392b;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 7px 12px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
}

.dp-btn-view:hover {
    background: #a93226;
}

.dp-btn-view svg {
    width: 14px;
    height: 14px;
    fill: #fff;
}

.dp-btn-download {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #2c3e50;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 7px 12px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s;
    white-space: nowrap;
}

.dp-btn-download:hover {
    background: #1a252f;
    color: #fff;
    text-decoration: none;
}

.dp-btn-download svg {
    width: 14px;
    height: 14px;
    fill: #fff;
}

/* ===== MODAL DE VISUALIZAÇÃO ===== */
.dp-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 99999;
    overflow: hidden;
}

.dp-modal-overlay.dp-active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.dp-modal {
    background: #fff;
    border-radius: 12px;
    width: 90%;
    max-width: 1000px;
    height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    overflow: hidden;
}

.dp-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    background: #c0392b;
    color: #fff;
}

.dp-modal-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 80%;
}

.dp-modal-close {
    background: rgba(255,255,255,0.2);
    color: #fff;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 22px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    flex-shrink: 0;
}

.dp-modal-close:hover {
    background: rgba(255,255,255,0.35);
}

.dp-modal-body {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 0;
}

.dp-modal-body iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.dp-modal-body img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.dp-modal-body .dp-download-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 40px;
}

.dp-modal-body .dp-download-link svg {
    width: 64px;
    height: 64px;
    fill: #c0392b;
}

.dp-modal-body .dp-download-link a {
    background: #c0392b;
    color: #fff;
    padding: 12px 28px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    transition: background 0.2s;
}

.dp-modal-body .dp-download-link a:hover {
    background: #a93226;
}

/* ===== RESPONSIVO ===== */
@media (max-width: 900px) {
    .dp-cols-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .dp-cols-2,
    .dp-cols-3 {
        grid-template-columns: 1fr;
    }

    .dp-file-actions {
        flex-direction: column;
        gap: 4px;
    }

    .dp-btn-view,
    .dp-btn-download {
        padding: 6px 10px;
        font-size: 11px;
    }

    .dp-modal {
        width: 95%;
        height: 90vh;
    }
}
