/* =====================================================
   FRETE+ - CENTRAL DE PÓS-VENDA
===================================================== */

.posvenda-cards {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.posvenda-card {
    background: #15243a;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 18px;
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.05);
}

.posvenda-card span {
    display: block;
    color: #94a3b8;
    font-size: 13px;
    margin-bottom: 8px;
}

.posvenda-card strong {
    font-size: 28px;
    color: #f4f7fb;
}

.posvenda-filtros {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr auto;
    gap: 12px;
    margin-bottom: 20px;
}

.posvenda-filtros input,
.posvenda-filtros select {
    height: 44px;
    border: 1px solid #31455f;
    border-radius: 10px;
    padding: 0 12px;
    background: #15243a;
    font-size: 14px;
}

.posvenda-status {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.posvenda-status.pendente {
    background: rgba(239,68,68,.13);
    color: #b91c1c;
}

.posvenda-status.em_analise {
    background: rgba(245,158,11,.14);
    color: #92400e;
}

.posvenda-status.resolvido {
    background: #dcfce7;
    color: #166534;
}

.posvenda-tipo {
    font-weight: 700;
    color: #f4f7fb;
}

.posvenda-descricao {
    display: block;
    margin-top: 4px;
    color: #94a3b8;
    font-size: 12px;
}

.btn-posvenda {
    border: none;
    border-radius: 8px;
    padding: 8px 11px;
    cursor: pointer;
    font-weight: 700;
    font-size: 12px;
    background: rgba(56,189,248,.13);
    color: #0369a1;
}

.btn-posvenda:hover {
    background: #bae6fd;
}

.posvenda-vazio {
    padding: 30px;
    text-align: center;
    color: #94a3b8;
}

.posvenda-modal-resumo {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.posvenda-modal-resumo > div {
    padding: 14px;
    background: #101c2d;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
}

.posvenda-modal-resumo span {
    display: block;
    color: #94a3b8;
    font-size: 11px;
    text-transform: uppercase;
    margin-bottom: 5px;
}

.posvenda-historico {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.posvenda-historico-item {
    padding: 12px;
    border-left: 3px solid #0284c7;
    background: #101c2d;
    border-radius: 8px;
}

.posvenda-historico-item strong {
    display: block;
    margin-bottom: 4px;
}

.posvenda-historico-item span {
    color: #94a3b8;
    font-size: 12px;
}

@media (max-width: 900px) {
    .posvenda-cards {
        grid-template-columns: repeat(2, 1fr);
    }

    .posvenda-filtros {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 600px) {
    .posvenda-cards,
    .posvenda-filtros,
    .posvenda-modal-resumo {
        grid-template-columns: 1fr;
    }
}

/* =====================================================
   GALERIA DE ARQUIVOS DO PÓS-VENDA
===================================================== */

.posvenda-galeria {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.posvenda-arquivo-card {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #15243a;
    overflow: hidden;
}

.posvenda-arquivo-preview {
    width: 100%;
    height: 180px;
    background: #101c2d;
    display: flex;
    align-items: center;
    justify-content: center;
}

.posvenda-arquivo-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.posvenda-arquivo-preview video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #000;
}

.posvenda-arquivo-info {
    padding: 12px;
}

.posvenda-arquivo-info strong {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    color: #f4f7fb;
    word-break: break-word;
}

.posvenda-arquivo-acoes {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.posvenda-arquivo-acoes a,
.posvenda-arquivo-acoes button {
    border: none;
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
}

.posvenda-arquivo-acoes a {
    background: rgba(56,189,248,.13);
    color: #0369a1;
}

.posvenda-arquivo-acoes button {
    background: #17263a;
    color: #cbd5e1;
}

.posvenda-arquivo-vazio {
    padding: 18px;
    text-align: center;
    color: #94a3b8;
    background: #101c2d;
    border-radius: 10px;
}

@media (max-width: 700px) {
    .posvenda-galeria {
        grid-template-columns: 1fr;
    }

    .posvenda-arquivo-preview {
        height: 220px;
    }
}