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



h1 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

.tab-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 1.5rem;
}

.tab-btn {
    background-color: #e5e7eb;
    border: none;
    padding: 10px 16px;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s ease;
}

.tab-btn:hover {
    background-color: #d1d5db;
}

.tab-btn.active {
    background-color: #779254;
    color: white;
}

.tab-content {
    display: none;
}

.tab-content.active-tab {
    display: block;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(175px, 1fr));
    gap: 1.5rem;
}

.card {
    background: white;
    border-radius: 16px;
    padding: .5rem;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.1);
}

.card h3 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.card .value {
    font-size: 1.8rem;
    font-weight: bold;
    color: #779254;
}

.placeholder {
    background-color: #f9fafb;
    border: 2px dashed #d1d5db;
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    color: #6b7280;
}

@media (max-width: 600px) {
    .tab-buttons {
        flex-direction: column;
    }
}


/* Organigrama */
.organigrama h2 {
    color: #8B0033;
    font-weight: bold;
    margin: 40px 0 10px;
}

.organigrama {
    display: flex;
    flex-direction: column;
    align-items: center;

    font-family: "Poppins", sans-serif;
    /* background-color: #fff; */
    padding: 20px;
    margin: 0;
    text-align: center;
}

.nivel {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 40px;
    margin: 20px 0;
}

.miembro {
    position: relative;
    width: 220px;
}

.miembro img.foto {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 1px solid #929090;
    object-fit: cover;
    object-position: top;
    /* <-- Agrega esta línea */
    padding: 5px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

.miembro img.logo {
    width: 50px;
    height: 50px;
    position: absolute;
    bottom: 90px;
    right: 25px;
    border-radius: 50%;
    /* border: 2px solid white; */
    /* background: white; */
}

.miembro img.logo2 {
    width: 50px;
    height: 50px;
    position: absolute;
    bottom: 115px;
    right: 25px;
    border-radius: 50%;
    /* border: 2px solid white; */
    /* background: white; */
}


.nombre a {
    /* font-weight: bold; */
    font-size: 14px;
    margin-top: 20px;
    color: #6b7280;
}

/* efecto foto dip pasado */
.foto-inactiva {
    filter: grayscale(1) drop-shadow(2px 0 6px white);
}

.nopointer {
    pointer-events: none;
}

.linea-conexion {
    height: 20px;
    border-left: 2px solid #ccc;
    margin: 0 auto;
}

.linea-horizontal {
    width: 80%;
    height: 2px;
    background-color: #ccc;
    margin: 10px auto;
}

.contenedor {
    transform: scale(0.9);
    /* ajusta entre 0.8 a 1 según necesidad */
    transform-origin: top center;
}

.periodo {
    font-weight: bold;
}


@media (max-width: 600px) {
    .nivel {
        flex-direction: column;
        gap: 20px;
    }
}


/* estilos para datos mesa */

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

header h1 {
    margin-bottom: 25px;
    font-size: 24px;
    color: #1e2a3a;
}

.charts {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 40px;
}

.chart-card {
    flex: 1;
    min-width: 280px;
    background: #fff;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}


/* Mapa */
.map-section {
    margin-top: 40px;
}

.map-wrapper {
    position: relative;
    width: 100%;
    max-width: 100%;
    overflow: auto;
}

#svgMap {
    width: 100%;
    height: auto;
}

.info-card {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    min-height: 200px;
    transition: all 0.3s ease;
}

.info-card h3 {
    font-size: 18px;
    margin-bottom: 12px;
    color: #184b23;
}

.info-card p {
    margin: 0;
    color: #555;
}


.info-box {
    margin-top: 15px;
    background: #e3f2fd;
    padding: 12px;
    border-left: 4px solid #974a32;
    font-size: 15px;
    border-radius: 4px;
}

/* Responsivo */
@media (max-width: 768px) {
    .charts {
        flex-direction: column;
    }
}

@media (max-width: 1168px) {
    .map-section {
        display: none;
    }
}

/* estilos para grafica de genero */
.bar-gender-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.bar-gender {
    width: 90%;
    max-width: 400px;
    height: 40px;
    display: flex;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(30, 136, 229, 0.07);
    margin-bottom: 12px;
    background: #f5f5f5;
}

.bar-segment, .bar-segment2 {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    font-weight: bold;
    font-size: 1.1em;
    color: #fff;
    height: 100%;
    padding-right: 18px;
    position: relative;
    transition: width 1s cubic-bezier(.4, 2, .6, 1);
}

.bar-segment span, .bar-segment2 span {
    font-size: 0.9em;
    margin-left: 8px;
    opacity: 0.85;
}

.bar-segment.male, .bar-segment2.male{
    background: linear-gradient(90deg, #1976d2 70%, #42a5f5 100%);
    border-top-left-radius: 20px;
    border-bottom-left-radius: 20px;
}

.bar-segment.female, .bar-segment2.female {
    background: linear-gradient(90deg, #f06292 70%, #f8bbd0 100%);
    border-top-right-radius: 20px;
    border-bottom-right-radius: 20px;
    justify-content: flex-start;
    padding-left: 18px;
    padding-right: 0;
}

.bar-legend {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    font-size: 1em;
}

.bar-legend .dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 6px;
}

.bar-legend .male {
    background: #1976d2;
}

.bar-legend .female {
    background: #f06292;
}

@media (max-width: 500px) {
    .bar-gender {
        height: 30px;
    }

    .bar-segment, .bar-segment2 {
        font-size: 0.95em;
        padding-right: 8px;
        padding-left: 8px;
    }
}

/* Grafica de battas integrantes */
.bar-chart-container {
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
}

.bar-chart {
    display: flex;
    align-items: flex-end;
    /* height: 220px; */
    gap: 18px;
    padding: 30px 10px 10px 10px;
    background: #f8f8fa;
    border-radius: 12px;
    box-shadow: 0 2px 8px #0001;
}

.bar {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    position: relative;
}

.bar-value {
    font-weight: bold;
    margin-bottom: 6px;
    color: #222;
    font-size: 1.1em;
}

.bar-rect {
    width: 36px;
    border-radius: 8px 8px 0 0;
    transition: height 0.5s;
    box-shadow: 0 2px 6px #0002;
}

.bar-label {
    margin-top: 8px;
    font-size: 0.95em;
    color: #444;
    font-weight: 500;
    text-align: center;
}

.bar-legend {
    margin-top: 18px;
    display: flex;
    justify-content: space-around;
    font-size: 0.95em;
}

.dot.pan {
    background: #01308E;
}

.dot.pri {
    background: #BF0312;
}

.dot.morena {
    background: #600C0C;
}

.dot.pt {
    background: #DE0209;
}

.dot.pvem {
    background: #50B747;
}

.dot.mc {
    background: #FF8400;
}

.dot {
    display: inline-block;
    width: 13px;
    height: 13px;
    border-radius: 50%;
    margin-right: 5px;
    vertical-align: middle;
}

.bar-rect.pan {
    background: #01308E;
}

.bar-rect.pri {
    background: #BF0312;
}

.bar-rect.morena {
    background: #600C0C;
}

.bar-rect.pt {
    background: #DE0209;
}

.bar-rect.pvem {
    background: #50B747;
}

.bar-rect.mc {
    background: #FF8400;
}


/* Responsive */
@media (max-width: 768px) {
    .dashboard {
        grid-template-columns: 1fr;
        padding: 15px;
    }

    .chart-legend {
        grid-template-columns: 1fr;
    }

    .gender-stats {
        flex-direction: column;
        gap: 1rem;
    }
}


/* tabla posiciones activos e inactivos */

.responsive-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 2rem 0;
    font-size: 1rem;
    background: #fff;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(44, 62, 80, 0.10);
}

.responsive-table thead {
    background: #43a047;
    color: #fff;
    letter-spacing: 1px;
}

.responsive-table th,
.responsive-table td {
    padding: 1.1rem 1rem;
    text-align: left;
}

.responsive-table tbody tr {
    transition: background 0.2s;
}

.responsive-table tbody tr.active {
    background: #e8f5e9;
    font-weight: bold;
    color: #2e7d32;
    border-left: 6px solid #43a047;
}

.responsive-table tbody tr.inactive {
    background: #f5f5f5;
    color: #aaa;
    font-style: italic;
    border-left: 6px solid #bdbdbd;
}

.responsive-table tbody tr.inactive td:first-child::before {
    content: "\F2FD";
    font-family: 'remixicon' !important;
    margin-right: 4px;
    font-size: 1.1em;
    vertical-align: middle;
    color: black;
    font-weight: bolder;
    font-size: 1rem;
    color: rgb(10, 10, 100);
}

.responsive-table td.partido {
    font-weight: bold;
}

.responsive-table td.partido.morena {
    color: #b71c1c;
}

.responsive-table td.partido.pan {
    color: #1976d2;
}

.responsive-table td.partido.pri {
    color: #388e3c;
}

.responsive-table td.partido.pt {
    color: #e53935;
}

.responsive-table td.partido.pvem {
    color: #43a047;
}

.responsive-table td.partido.mc {
    color: #ff9800;
}

@media (max-width: 700px) {
    .responsive-table thead {
        display: none;
    }

    .responsive-table,
    .responsive-table tbody,
    .responsive-table tr,
    .responsive-table td {
        display: block;
        width: 100%;
    }

    .responsive-table tr {
        margin-bottom: 1.2rem;
    }

    .responsive-table td {
        padding: 0.9rem 1rem;
        border-bottom: 1px solid #eee;
        position: relative;
        background: inherit;
    }

    .responsive-table td::before {
        content: attr(data-label);
        font-weight: bold;
        color: #43a047;
        display: block;
        margin-bottom: 0.3rem;
    }
}

.arrow {
    color: black;
    font-weight: bolder;
    font-size: 1rem;
    color: rgb(10, 10, 100);
}