﻿/* =====================================================
   ARCHIVO: collection-summary-enhanced.css
   PROPÓSITO: Mejoras adicionales para el resumen de cobranza
   Compatible con Theme Switcher (claro/oscuro)
   ===================================================== */

/* ===================================
   CARD DE RESUMEN PRINCIPAL
   =================================== */
.collection-summary-card {
    background: var(--bs-body-bg);
    border: 2px solid var(--bs-border-color);
    border-radius: 0.75rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

[data-bs-theme="dark"] .collection-summary-card {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    background: rgba(var(--bs-body-bg-rgb), 0.5);
    backdrop-filter: blur(10px);
}

/* ===================================
   HEADER DEL RESUMEN
   =================================== */
.collection-summary-header {
    background: linear-gradient(135deg, var(--bs-primary) 0%, var(--bs-info) 100%);
    color: white;
    padding: 1rem;
    border-radius: 0.75rem 0.75rem 0 0;
    border-bottom: 3px solid rgba(0, 0, 0, 0.1);
}

    .collection-summary-header h6 {
        color: white;
        font-weight: 700;
        margin: 0;
        display: flex;
        align-items: center;
        gap: 0.5rem;
        text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    }

[data-bs-theme="dark"] .collection-summary-header {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

/* ===================================
   SECCIONES DE INFORMACIÓN
   =================================== */
.collection-info-section {
    padding: 1rem;
    border-bottom: 1px solid var(--bs-border-color);
    background-color: var(--bs-body-bg);
    transition: all 0.2s ease;
}

    .collection-info-section:hover {
        background-color: var(--bs-tertiary-bg);
    }

    .collection-info-section:last-child {
        border-bottom: none;
        border-radius: 0 0 0.75rem 0.75rem;
    }

[data-bs-theme="dark"] .collection-info-section {
    background-color: rgba(255, 255, 255, 0.02);
}

    [data-bs-theme="dark"] .collection-info-section:hover {
        background-color: rgba(255, 255, 255, 0.05);
    }

/* ===================================
   LABELS Y VALORES
   =================================== */
.collection-label {
    font-size: 0.85rem;
    color: var(--bs-secondary-color);
    font-weight: 500;
    margin-bottom: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.collection-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--bs-body-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

    /* Valores destacados */
    .collection-value.primary {
        color: var(--bs-primary);
        font-size: 1.3rem;
    }

    .collection-value.success {
        color: #198754;
        font-size: 1.3rem;
    }

    .collection-value.danger {
        color: #dc3545;
    }

/* ===================================
   BADGES EN EL RESUMEN
   =================================== */
.collection-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4em 0.8em;
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 0.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

[data-bs-theme="dark"] .collection-badge {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* ===================================
   LISTA DE DETALLES
   =================================== */
.collection-details-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.collection-detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    border-bottom: 1px solid var(--bs-border-color);
    transition: all 0.2s ease;
}

    .collection-detail-item:hover {
        background-color: var(--bs-tertiary-bg);
        padding-left: 1rem;
    }

    .collection-detail-item:last-child {
        border-bottom: none;
    }

[data-bs-theme="dark"] .collection-detail-item {
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

    [data-bs-theme="dark"] .collection-detail-item:hover {
        background-color: rgba(255, 255, 255, 0.03);
    }

.collection-detail-label {
    font-size: 0.9rem;
    color: var(--bs-secondary-color);
    font-weight: 500;
}

.collection-detail-value {
    font-size: 1rem;
    font-weight: 600;
    color: var(--bs-body-color);
}

/* ===================================
   ICONOS EN EL RESUMEN
   =================================== */
.collection-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--bs-primary) 0%, var(--bs-info) 100%);
    color: white;
    font-size: 1.2rem;
    box-shadow: 0 2px 8px rgba(13, 110, 253, 0.3);
}

[data-bs-theme="dark"] .collection-icon {
    box-shadow: 0 2px 8px rgba(13, 110, 253, 0.5);
}

.collection-icon.success {
    background: linear-gradient(135deg, #198754 0%, #20c997 100%);
    box-shadow: 0 2px 8px rgba(25, 135, 84, 0.3);
}

[data-bs-theme="dark"] .collection-icon.success {
    box-shadow: 0 2px 8px rgba(25, 135, 84, 0.5);
}

/* ===================================
   ALERTAS EN EL RESUMEN
   =================================== */
.collection-alert {
    border-left: 4px solid;
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    background-color: var(--bs-tertiary-bg);
}

    .collection-alert.alert-info {
        border-left-color: var(--bs-info);
        background: linear-gradient(90deg, rgba(13, 202, 240, 0.1) 0%, transparent 100%);
    }

    .collection-alert.alert-warning {
        border-left-color: #ffc107;
        background: linear-gradient(90deg, rgba(255, 193, 7, 0.1) 0%, transparent 100%);
    }

[data-bs-theme="dark"] .collection-alert {
    background-color: rgba(255, 255, 255, 0.05);
}

    [data-bs-theme="dark"] .collection-alert.alert-info {
        background: linear-gradient(90deg, rgba(13, 202, 240, 0.15) 0%, transparent 100%);
    }

    [data-bs-theme="dark"] .collection-alert.alert-warning {
        background: linear-gradient(90deg, rgba(255, 193, 7, 0.15) 0%, transparent 100%);
    }

/* ===================================
   DIVISORES
   =================================== */
.collection-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--bs-border-color), transparent);
    margin: 1rem 0;
}

/* ===================================
   ESTADO VACÍO
   =================================== */
.collection-empty-state {
    padding: 2rem 1rem;
    text-align: center;
    background: var(--bs-tertiary-bg);
    border-radius: 0.5rem;
    border: 2px dashed var(--bs-border-color);
}

    .collection-empty-state i {
        font-size: 3rem;
        color: var(--bs-secondary-color);
        opacity: 0.5;
        margin-bottom: 1rem;
    }

    .collection-empty-state p {
        color: var(--bs-secondary-color);
        font-size: 1rem;
        margin: 0;
    }

[data-bs-theme="dark"] .collection-empty-state {
    background: rgba(255, 255, 255, 0.02);
}

/* ===================================
   TOTALES Y MONTOS DESTACADOS
   =================================== */
.collection-total-box {
    background: linear-gradient(135deg, var(--bs-primary) 0%, var(--bs-info) 100%);
    color: white;
    padding: 1.5rem;
    border-radius: 0.75rem;
    text-align: center;
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.3);
}

[data-bs-theme="dark"] .collection-total-box {
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.5);
}

.collection-total-label {
    font-size: 0.9rem;
    font-weight: 500;
    opacity: 0.9;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.collection-total-amount {
    font-size: 2rem;
    font-weight: 800;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* ===================================
   ANIMACIONES
   =================================== */
@keyframes slideInFromRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.collection-summary-card {
    animation: slideInFromRight 0.3s ease-out;
}

@keyframes pulseGlow {
    0%, 100% {
        box-shadow: 0 2px 8px rgba(13, 110, 253, 0.3);
    }

    50% {
        box-shadow: 0 4px 16px rgba(13, 110, 253, 0.5);
    }
}

.collection-summary-card:hover {
    animation: pulseGlow 2s ease-in-out infinite;
}

/* ===================================
   RESPONSIVE DESIGN
   =================================== */
@media (max-width: 768px) {
    .collection-summary-header h6 {
        font-size: 1rem;
    }

    .collection-value {
        font-size: 1rem;
    }

        .collection-value.primary,
        .collection-value.success {
            font-size: 1.1rem;
        }

    .collection-total-amount {
        font-size: 1.5rem;
    }

    .collection-icon {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
}

/* ===================================
   GRID LAYOUT PARA RESUMEN
   =================================== */
.collection-summary-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

@media (min-width: 576px) {
    .collection-summary-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 992px) {
    .collection-summary-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ===================================
   PROGRESS BAR EN RESUMEN
   =================================== */
.collection-progress {
    height: 8px;
    background: var(--bs-tertiary-bg);
    border-radius: 4px;
    overflow: hidden;
    margin-top: 0.5rem;
}

.collection-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--bs-primary) 0%, var(--bs-info) 100%);
    border-radius: 4px;
    transition: width 0.5s ease;
}

/* ===================================
   MEJORAS ADICIONALES MODO OSCURO
   =================================== */
[data-bs-theme="dark"] .collection-label {
    color: rgba(255, 255, 255, 0.7);
}

[data-bs-theme="dark"] .collection-value {
    color: rgba(255, 255, 255, 0.95);
}

[data-bs-theme="dark"] .collection-detail-label {
    color: rgba(255, 255, 255, 0.6);
}

[data-bs-theme="dark"] .collection-detail-value {
    color: rgba(255, 255, 255, 0.9);
}
