/* Estilos para el listado de recibos de sueldo */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px 0;
    text-align: center;
    margin-bottom: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
}

.header p {
    font-size: 1.1em;
    opacity: 0.9;
}

.controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.search-box {
    flex: 1;
    margin-right: 20px;
}

.search-box input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.search-box input:focus {
    outline: none;
    border-color: #667eea;
}

.info-panel {
    display: flex;
    gap: 20px;
    align-items: center;
}

.info-item {
    text-align: center;
}

.info-item .label {
    font-size: 12px;
    color: #666;
    text-transform: uppercase;
}

.info-item .value {
    font-size: 18px;
    font-weight: bold;
    color: #333;
}

.recibos-table {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.table-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 0;
    display: grid;
    grid-template-columns: 80px 150px 1fr 200px 120px;
    gap: 15px;
    align-items: center;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 14px;
}

.table-header > div {
    padding: 0 15px;
}

.recibo-item {
    display: grid;
    grid-template-columns: 80px 150px 1fr 200px 120px;
    gap: 15px;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #e1e5e9;
    cursor: pointer;
    transition: all 0.3s ease;
}

.recibo-item:hover {
    background-color: #f8f9ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.1);
}

.recibo-item.selected {
    background-color: #e8ecff;
    border-left: 4px solid #667eea;
}

.recibo-item > div {
    padding: 0 15px;
}

.recibo-id {
    font-weight: bold;
    color: #667eea;
    text-align: center;
}

.recibo-dni {
    font-family: 'Courier New', monospace;
    font-weight: bold;
    color: #333;
}

.recibo-nombre {
    font-weight: 500;
    color: #333;
}

.recibo-empresa {
    color: #666;
    font-size: 14px;
}

.recibo-estado {
    text-align: center;
    font-weight: bold;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    text-transform: uppercase;
}

.estado-aprobado {
    background-color: #d4edda;
    color: #155724;
}

.estado-cargaia {
    background-color: #f8d7da;
    color: #721c24;
}

.estado-controlado {
    background-color: #fff3cd;
    color: #856404;
}

.estado-default {
    background-color: #e2e3e5;
    color: #383d41;
}

.loading {
    text-align: center;
    padding: 40px;
    color: #666;
}

.loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.error {
    background-color: #f8d7da;
    color: #721c24;
    padding: 15px;
    border-radius: 8px;
    margin: 20px 0;
    text-align: center;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
    padding: 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.pagination button {
    padding: 8px 16px;
    border: 2px solid #667eea;
    background: white;
    color: #667eea;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
}

.pagination button:hover:not(:disabled) {
    background: #667eea;
    color: white;
}

.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination .current-page {
    background: #667eea;
    color: white;
}

.instructions {
    background: #e8ecff;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid #667eea;
}

.instructions strong {
    color: #667eea;
}

.no-results {
    text-align: center;
    padding: 40px;
    color: #666;
    font-style: italic;
}

@media (max-width: 768px) {
    .table-header,
    .recibo-item {
        grid-template-columns: 1fr;
        gap: 5px;
    }
    
    .controls {
        flex-direction: column;
        gap: 15px;
    }
    
    .search-box {
        margin-right: 0;
    }
}
