/* --- VARIABLES DE DISEÑO --- */
:root {
    --primary-color: #2c3e50;
    --accent-color: #e67e22;
    --bg-color: #f4f6f7;
    --card-bg: #ffffff;
    --text-color: #333333;
}

/* --- ESTILOS GENERALES --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* --- HEADER --- */
header {
    background-color: var(--primary-color);
    color: white;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

header h1 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

footer {
    background-color: #1a252f; /* Fondo oscuro elegante */
    color: #ffffff;
    text-align: center; /* Centrado absoluto */
    padding: 20px;
    margin-top: auto; /* Lo mantiene siempre abajo */
    border-top: 3px solid var(--accent-color); /* Línea divisoria elegante */
    font-size: 0.9rem;
}


/* --- CONTENEDOR PRINCIPAL --- */
.main-container {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 20px;
    padding: 20px;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
    flex: 1;
}

/* --- MENÚ DE CATEGORÍAS (Sidebar) --- */
.sidebar {
    background-color: var(--card-bg);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    height: fit-content;
}

.sidebar h2 {
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: var(--primary-color);
    border-bottom: 2px solid var(--bg-color);
    padding-bottom: 8px;
}

.category-list {
    list-style: none;
}

.category-item {
    padding: 10px 12px;
    margin-bottom: 8px;
    background-color: var(--bg-color);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.category-item:hover,
.category-item.active {
    background-color: var(--accent-color);
    color: white;
}

/* --- PANEL DE CONTENIDO DERECHO --- */
.dashboard-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Contenedor de la barra de búsqueda */
.search-box-container {
    background-color: var(--card-bg);
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.search-input {
    width: 100%;
    padding: 12px 20px;
    font-size: 1rem;
    border: 2px solid var(--bg-color);
    border-radius: 6px;
    outline: none;
    transition: border-color 0.3s ease;
}

.search-input:focus {
    border-color: var(--accent-color);
}

/* --- SECCIÓN DE TARJETAS (Grid) --- */
.content-area {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    align-content: start;
}

/* --- TARJETA DE MANUAL --- */
.manual-card {
    background-color: var(--card-bg);
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border-top: 4px solid var(--primary-color);
    transition: transform 0.2s ease;
}

.manual-card:hover {
    transform: translateY(-5px);
}

.manual-tag {
    font-size: 0.75rem;
    background-color: #e8f4fd;
    color: #1d88e5;
    padding: 4px 8px;
    border-radius: 4px;
    align-self: flex-start;
    margin-bottom: 10px;
    text-transform: uppercase;
    font-weight: bold;
}

.manual-title {
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.manual-description {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 20px;
    line-height: 1.4;
}

/* Botones de acción */
.actions-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.btn {
    padding: 10px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: bold;
    text-align: center;
    transition: background 0.2s;
}

.btn-view {
    background-color: #f0f0f0;
    color: var(--primary-color);
}

.btn-view:hover {
    background-color: #e0e0e0;
}

.btn-download {
    background-color: var(--primary-color);
    color: white;
}

.btn-download:hover {
    background-color: #1a252f;
}

.btn-errors {
    background-color: var(--primary-color);
    color: white;
}

.btn-errors:hover {
    background-color: #1a252f;
}

/* --- DISEÑO RESPONSIVE --- */
@media (max-width: 768px) {
    .main-container {
        grid-template-columns: 1fr;
        padding: 10px;
    }

    .sidebar {
        margin-bottom: 10px;
    }

    .category-list {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
    }

    .category-item {
        margin-bottom: 0;
        flex: 1 1 auto;
        text-align: center;
        font-size: 0.9rem;
    }
}
