* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #f8f9fa;
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
    padding: 2rem 1rem;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.header {
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-content h1 {
    font-size: 1.875rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 0.5rem;
}

.header-content p {
    color: #6b7280;
    font-size: 0.875rem;
}

.btn-report {
    background: #25d366;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    padding: 0.75rem 1.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: background-color 0.15s ease;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.btn-report:hover {
    background: #128c7e;
}

.btn-report:active {
    transform: translateY(1px);
}

.card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead {
    background-color: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
}

th {
    padding: 1rem 1.5rem;
    text-align: left;
    font-weight: 500;
    color: #374151;
    font-size: 0.875rem;
    border-right: 1px solid #e5e7eb;
}

th:last-child {
    border-right: none;
}

tbody tr {
    border-bottom: 1px solid #f3f4f6;
    transition: background-color 0.15s ease;
}

tbody tr:hover {
    background-color: #f9fafb;
}

tbody tr:last-child {
    border-bottom: none;
}

td {
    padding: 1rem 1.5rem;
    color: #374151;
    font-size: 0.875rem;
    border-right: 1px solid #f3f4f6;
}

td:last-child {
    border-right: none;
}

.numero {
    font-weight: 600;
    color: #1f2937;
}

.numero-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.country-flag {
    width: 20px;
    height: auto;
    border-radius: 2px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}

.motivo {
    color: #374151;
}

.fecha {
    color: #6b7280;
}

.btn-evidencias {
    background: #1f2937;
    border: 1px solid #1f2937;
    border-radius: 6px;
    padding: 0.5rem 1rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
}

.btn-evidencias:hover {
    background: #111827;
    border-color: #111827;
}

.btn-evidencias:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #6b7280;
    border-color: #6b7280;
}

.btn-evidencias .btn-icon {
    display: none;
}

.btn-evidencias .btn-text {
    display: inline-block;
}

.btn-evidencias .btn-count {
    display: none;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: #ffffff;
    margin: 5% auto;
    padding: 0;
    border-radius: 8px;
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1f2937;
}

.close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #9ca3af;
    cursor: pointer;
    padding: 0;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
}

.close:hover {
    background: #f3f4f6;
    color: #374151;
}

.modal-body {
    padding: 1.5rem;
    max-height: 60vh;
    overflow-y: auto;
}

.evidence-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.evidence-item {
    border-radius: 6px;
    overflow: hidden;
}

.evidence-item img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    cursor: pointer;
    transition: opacity 0.15s ease;
}

.evidence-item img:hover {
    opacity: 0.8;
}

/* Lightbox para imagen completa */
.lightbox {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    cursor: pointer;
}

.lightbox-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 90%;
    max-height: 90%;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #ffffff;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.5);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
}

.lightbox-close:hover {
    background: rgba(0, 0, 0, 0.8);
}

.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: #9ca3af;
}

.empty-state p {
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

@media (max-width: 768px) {
    body {
        padding: 1rem 0.5rem;
    }
    
    .header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .header-content h1 {
        font-size: 1.5rem;
    }
    
    .btn-report {
        width: 100%;
        justify-content: center;
    }
    
    th, td {
        padding: 0.5rem 0.75rem;
        font-size: 0.8125rem;
    }

    .btn-evidencias {
        padding: 0.4rem 0.75rem;
        font-size: 0.75rem;
        white-space: nowrap;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.25rem;
    }

    .btn-evidencias .btn-text {
        display: none;
    }

    .btn-evidencias .btn-icon {
        display: inline-block;
    }

    .btn-evidencias .btn-count {
        display: inline-block;
    }

    /* Ajustar ancho de columnas en móvil */
    table {
        table-layout: fixed;
    }

    th:nth-child(1), td:nth-child(1) { width: 25%; } /* Número */
    th:nth-child(2), td:nth-child(2) { width: 35%; } /* Motivo */
    th:nth-child(3), td:nth-child(3) { width: 20%; } /* Fecha */
    th:nth-child(4), td:nth-child(4) { width: 20%; } /* Evidencias */

    .numero {
        font-size: 0.75rem;
    }

    .country-flag {
        width: 16px;
    }

    .numero-container {
        gap: 0.375rem;
    }

    .motivo {
        font-size: 0.75rem;
        word-wrap: break-word;
    }

    .fecha {
        font-size: 0.75rem;
    }
}