/* Variables de colores para consistencia - ACTUALIZADO CON VERDE HGW */
:root {
    --hgw-green: #2e7d32;
    --hgw-dark-green: #1b5e20;
    --primary-color: #2e7d32; /* Cambiado a verde HGW */
    --primary-dark: #1b5e20; /* Cambiado a verde oscuro HGW */
    --secondary-color: #8bc34a; /* Verde claro complementario */
    --text-color: #263238;
    --text-light: #78909c;
    --bg-color: #f1f8e9; /* Fondo verde muy claro */
    --bg-light: #ffffff;
    --border-color: #c5e1a5; /* Borde verde claro */
    --success-color: #4CAF50;
    --error-color: #e53935;
    --warning-color: #ffa000;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

/* Reset mejorado */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Estilos de la página */
body {
    font-family: 'Roboto', Arial, sans-serif;
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    padding: 20px;
    color: var(--text-color);
    line-height: 1.6;
}

/* Contenedor principal */
.container {
    width: 90%;
    max-width: 1400px;
    background-color: var(--bg-light);
    box-shadow: var(--shadow);
    border-radius: 12px;
    overflow: hidden;
    margin: 20px 0;
}

/* Cabecera - ACTUALIZADO CON VERDE HGW */
.header {
    padding: 30px 30px 15px;
    text-align: center;
    background: linear-gradient(to right, var(--primary-color), var(--primary-dark));
    color: white;
    position: relative;
    overflow: hidden;
}

.header::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='%237baa7c' fill-opacity='0.1' fill-rule='evenodd'/%3E%3C/svg%3E");
    opacity: 0.6;
    z-index: 0;
}

.header-content {
    position: relative;
    z-index: 1;
}

.title {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 10px;
    letter-spacing: 0.5px;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.title span.hgw {
    color: #ffeb3b; /* Amarillo para contraste */
    font-weight: 800;
}

.subtitle {
    font-size: 1.5rem;
    font-weight: 400;
    margin-bottom: 15px;
    opacity: 0.9;
}

.divider {
    height: 3px;
    width: 80px;
    background-color: rgba(255, 255, 255, 0.5);
    margin: 0 auto;
    border-radius: 3px;
}

/* Sección de búsqueda */
.search-section {
    padding: 30px;
    background-color: var(--bg-light);
    border-bottom: 1px solid var(--border-color);
}

.search-form {
    max-width: 700px;
    margin: 0 auto;
}

.search-input-container {
    display: flex;
    align-items: center;
    border: 2px solid var(--border-color);
    border-radius: 50px;
    overflow: hidden;
    transition: var(--transition);
    background: var(--bg-light);
}

.search-input-container.focused {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.2);
}

.search-icon {
    padding: 0 15px 0 20px;
    color: var(--text-light);
    font-size: 1.1rem;
}

.search-input {
    flex: 1;
    padding: 16px 0;
    font-size: 1rem;
    border: none;
    outline: none;
    background: transparent;
    color: var(--text-color);
}

.search-input::placeholder {
    color: var(--text-light);
}

.search-button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 16px 24px;
    font-size: 1rem;
    font-weight: 500;
    background-color: var(--primary-color);
    color: white;
    border: none;
    cursor: pointer;
    transition: var(--transition);
}

.search-button:hover {
    background-color: var(--primary-dark);
}

.search-hint {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    font-size: 0.85rem;
    color: var(--text-light);
}

/* Información de resultados */
.results-info {
    padding: 15px 30px;
    background-color: #f1f8e9;
    border-bottom: 1px solid var(--border-color);
    font-weight: 500;
    color: var(--text-light);
}

/* Sección de tabla */
.table-section {
    padding: 0 30px 30px;
}

.table-container {
    overflow-x: auto;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    margin-top: 20px;
    border: 1px solid var(--border-color);
}

.results-table {
    width: 100%;
    border-collapse: collapse;
    background-color: var(--bg-light);
}

.results-table th {
    background-color: var(--primary-color);
    padding: 16px 12px;
    text-align: left;
    font-weight: 600;
    color: white;
    position: sticky;
    top: 0;
    cursor: pointer;
    user-select: none;
    transition: var(--transition);
}

.results-table th:hover {
    background-color: var(--primary-dark);
}

.results-table th i {
    margin-left: 5px;
    font-size: 0.8rem;
    opacity: 0.8;
}

.results-table td {
    padding: 14px 12px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-color);
}

.results-table tr:last-child td {
    border-bottom: none;
}

.results-table tr {
    transition: var(--transition);
}

.results-table tr:hover {
    background-color: #f1f8e9;
}

.loading-row td {
    text-align: center;
    padding: 40px;
}

.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    color: var(--text-light);
}

.loading-spinner i {
    font-size: 2rem;
    color: var(--primary-color);
}

.error-message {
    text-align: center;
    color: var(--error-color);
    font-weight: 500;
}

.error-message i {
    margin-right: 8px;
}

.no-results {
    text-align: center;
    padding: 40px;
    color: var(--text-light);
}

.no-results i {
    font-size: 3rem;
    margin-bottom: 15px;
    color: var(--secondary-color);
}

/* Footer */
.footer {
    padding: 20px 30px;
    text-align: center;
    background-color: #f1f8e9;
    color: var(--text-light);
    font-size: 0.9rem;
    border-top: 1px solid var(--border-color);
}

/* Estilo responsive para dispositivos pequeños */
@media (max-width: 992px) {
    .title {
        font-size: 1.8rem;
    }
    
    .subtitle {
        font-size: 1.3rem;
    }
}

@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    .container {
        width: 100%;
        margin: 0;
        border-radius: 8px;
    }
    
    .header {
        padding: 20px 20px 10px;
    }
    
    .title {
        font-size: 1.5rem;
    }
    
    .subtitle {
        font-size: 1.2rem;
    }
    
    .search-section, 
    .table-section,
    .results-info {
        padding: 20px;
    }
    
    .search-input-container {
        flex-direction: column;
        border-radius: 12px;
        border: 2px solid var(--border-color);
    }
    
    .search-icon {
        display: none;
    }
    
    .search-input {
        width: 100%;
        padding: 14px 20px;
        border-bottom: 1px solid var(--border-color);
    }
    
    .search-button {
        width: 100%;
        justify-content: center;
        padding: 14px;
    }
    
    .results-table th, 
    .results-table td {
        padding: 10px 8px;
        font-size: 0.9rem;
    }
    
    .results-table th i {
        display: none;
    }
    
    .footer {
        padding: 15px 20px;
    }
}

@media (max-width: 480px) {
    .title {
        font-size: 1.3rem;
    }
    
    .subtitle {
        font-size: 1.1rem;
    }
    
    .search-hint span {
        font-size: 0.8rem;
    }
    
    .results-table {
        font-size: 0.85rem;
    }
    
    .results-table th, 
    .results-table td {
        padding: 8px 6px;
    }
}