#top-nav {
    margin-top: 10px;
}

#top-nav a {
    color: #fff;
    background: #1b3d63;
    padding: 8px 15px;
    margin-right: 10px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 15px;
    transition: 0.2s;
}

#top-nav a:hover {
    background: #16324d;
}

#logo-viavision {
    height: 60px;
    width: auto;
    margin-right: 15px;
    vertical-align: middle;
}


body {
    font-family: Arial, sans-serif;
    margin: 0;
    background: #f6f6f6;
}

header {
    background: #1f4e79;
    color: white;
    padding: 15px;
    text-align: center;
    display: flex;
}

#layout {
    display: flex;
    height: calc(100vh - 120px);
}

aside#sidebar {
    width: 260px;
    background: white;
    padding: 20px;
    border-right: 2px solid #ddd;
    overflow-y: auto;
}

aside h2 {
    margin-top: 0;
}

#map {
    height: 380px;
    border-radius: 10px;
}

#content {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}

section {
    background: white;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 10px;
    box-shadow: 0 0 10px #ccc;
}

footer {
    background: #1f4e79;
    color: white;
    padding: 10px;
    text-align: center;
}

/* === ESTILOS PARA LAS TABLAS DINÁMICAS === */
table {
    border-collapse: collapse;
    width: 100%;
    background: white;
    margin: 20px 0;
    border-radius: 12px;
    overflow: hidden;
}

th, td {
    padding: 12px;
    text-align: center;
    border-bottom: 1px solid #ddd;
}

th {
    background: #1d3557;
    color: white;
    font-weight: bold;
}

tr:hover {
    background: #f7f7f7;
}

.chart-container {
    position: relative;
    width: 100%;
    max-width: 900px;   /* límite horizontal */
    height: 300px;      /* altura fija y estable */
    margin: 20px auto;
}

canvas {
    width: 100% !important;
    height: 100% !important;
}

/* ==== SIDEBAR ==== */
aside#sidebar {
    width: 260px;
    background: white;
    padding: 20px;
    border-right: 2px solid #ddd;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

aside#sidebar label {
    font-weight: bold;
    margin-top: 5px;
    color: #1f4e79;
}

aside#sidebar select,
aside#sidebar button {
    width: 100%;
    padding: 10px;
    border-radius: 6px;
    border: 1px solid #aaa;
    font-size: 14px;
    background: #f9f9f9;
}

aside#sidebar button {
    background: #1f4e79;
    color: white;
    border: none;
    cursor: pointer;
    margin-top: 10px;
}

aside#sidebar button:hover {
    background: #163a5c;
}

/* ==== LAYOUT PRINCIPAL ==== */
#layout {
    display: flex;
    gap: 15px;
}

/* ==== CONTENT ==== */
#content {
    flex: 1;
    padding: 20px;
}

/* ==== RESPONSIVE: Sidebar se pasa arriba en móviles ==== */
@media (max-width: 900px) {
    #layout {
        flex-direction: column;
    }

    aside#sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 2px solid #ddd;
    }
}

/* Extra mobile */
@media (max-width: 600px) {
    aside#sidebar {
        padding: 15px;
    }

    aside#sidebar select,
    aside#sidebar button {
        font-size: 13px;
        padding: 8px;
    }
}






