/* =========================
   RESET BASE
========================= */
* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    font-family: Arial, sans-serif;
}


.entry-content,
.site-main {
    max-width: 100% !important;
}

/* =========================
   CONTENEDOR
========================= */
.aec-container {
    width: 100% !important;
    max-width: 1200px !important;
    /* puedes subirlo a 1400px si quieres */
    margin: 0 auto;

    /* max-width: 900px;
    margin: auto;
    padding: 20px; */
}

/* =========================
   FORMULARIOS
========================= */
.aec-form input,
.aec-form select,
.aec-form textarea {
    width: 100%;
    padding: 10px;
    margin-bottom: 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 14px;
}

.aec-form label {
    font-weight: bold;
    display: block;
    margin-bottom: 5px;
}

.aec-form textarea {
    min-height: 100px;
    resize: vertical;
}

.aec-form button {
    background: #2E7D32;
    color: #fff;
    padding: 12px;
    border: none;
    cursor: pointer;
    width: 100%;
    border-radius: 6px;
    font-size: 16px;
}

.aec-form button:hover {
    background: #1b5e20;
}

/* =========================
   BOTONES
========================= */
.aec-btn {
    background: #2E7D32;
    color: #fff;
    padding: 10px 15px;
    text-decoration: none;
    border-radius: 5px;
    display: inline-block;
}

.aec-btn:hover {
    background: #1b5e20;
}

/* =========================
   TABLA DASHBOARD
========================= */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

table th {
    background: #2E7D32;
    color: #fff;
    padding: 10px;
}

table td {
    padding: 10px;
    border-bottom: 1px solid #ddd;
}

table tr:hover {
    background: #f5f5f5;
}

/* =========================
   MODAL (FIX DEFINITIVO)
========================= */
.aec-modal {
    display: none !important;
    /* 🔥 FORZAR OCULTO */
    position: fixed !important;
    z-index: 999999;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.6);
}

/* CUANDO SE ACTIVA */
.aec-modal.active {
    display: block !important;
}

/* CONTENIDO CENTRADO REAL */
.aec-modal-content {
    position: fixed;

    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);

    background: #fff;

    width: 600px;
    max-width: 95%;

    padding: 20px;
    border-radius: 10px;

    max-height: 90vh;
    overflow-y: auto;

    z-index: 1000000;

    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* BOTÓN CERRAR */
.close {
    float: right;
    font-size: 24px;
    cursor: pointer;
}

/* =========================
   BARRA DE PROGRESO
========================= */
.aec-progress {
    width: 100%;
    background: #ddd;
    height: 10px;
    border-radius: 5px;
    margin-bottom: 15px;
}

.aec-bar {
    height: 10px;
    background: #2E7D32;
    border-radius: 5px;
    transition: width 0.3s ease;
}

/* =========================
   MENSAJES
========================= */
.aec-success {
    background: #e8f5e9;
    color: #2e7d32;
    padding: 15px;
    border-radius: 5px;
    text-align: center;
    margin-top: 20px;
}

.aec-error {
    background: #ffebee;
    color: #c62828;
    padding: 15px;
    border-radius: 5px;
    text-align: center;
}

/* =========================
   RESPONSIVE
========================= */
@media (max-width: 768px) {
    .aec-modal-content {
        width: 95%;
        padding: 15px;
    }

    table th,
    table td {
        font-size: 12px;
        padding: 8px;
    }
}

/* =========================
   FIX WORDPRESS (CRÍTICO)
========================= */
body,
html {
    overflow: visible !important;
}


/* KPIs */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.kpi-box {
    background: #1B5E20;
    color: white;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
}

/* 🔥 GRID DE GRÁFICAS */
.chart-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 30px;
}

/* TARJETA DE GRÁFICA */
.chart-box {
    background: #fff;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.chart-box canvas {
    width: 100% !important;
    height: 250px !important;
}

@media (max-width: 1024px) {
    .chart-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .chart-grid {
        grid-template-columns: 1fr;
    }
}

.aec-filtros {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.aec-filtros select,
.aec-filtros button {
    padding: 10px;
}


.aec-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.7);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #ddd;
    border-top: 5px solid #2E7D32;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    100% {
        transform: rotate(360deg);
    }
}





/* STYLOS DE LAYOUT */
.aec-header {
    background: #1B5E20;
    color: white;
    padding: 15px;
}

.aec-layout {
    display: flex;
    height: 100vh;
}

/* SIDEBAR */
.aec-sidebar {
    width: 260px;
    min-height: 100vh;
    background: #111827;
    padding: 20px 15px;
}

.aec-sidebar ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.aec-sidebar li {
    list-style: none;
}

/* LINKS */
.aec-sidebar a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-decoration: none;
    color: #fff;
    padding: 12px 15px;
    border-radius: 10px;
    margin-bottom: 5px;
    transition: 0.3s;
    font-size: 14px;
}

.aec-sidebar a:hover {
    background: #1f2937;
}






/* =========================================
HOME EJECUTIVO
========================================= */

.aec-home {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

/* HERO */

.aec-hero {

    background:
        linear-gradient(135deg,
            #166534,
            #22c55e);

    border-radius: 28px;

    padding: 35px;

    color: white;

    display: flex;

    justify-content: space-between;

    align-items: center;

    box-shadow:
        0 20px 45px rgba(34, 197, 94, .25);
}

.aec-hero h1 {
    margin: 0;
    font-size: 34px;
}

.aec-hero p {
    margin-top: 10px;
    font-size: 18px;
}

.aec-hero span {
    opacity: .9;
}

.aec-hero-badge {

    width: 130px;
    height: 130px;

    border-radius: 50%;

    background: rgba(255, 255, 255, .15);

    display: flex;

    align-items: center;

    justify-content: center;

    font-size: 28px;

    font-weight: bold;

    backdrop-filter: blur(10px);
}

/* GRID KPI */

.aec-home-grid {

    display: grid;

    grid-template-columns:
        repeat(4, 1fr);

    gap: 20px;
}

.aec-home-card {

    padding: 28px;

    border-radius: 24px;

    color: white;

    box-shadow:
        0 15px 35px rgba(0, 0, 0, .08);

    transition: .3s;
}

.aec-home-card:hover {

    transform: translateY(-5px);
}

.aec-home-card h3 {
    margin-top: 0;
}

.aec-home-card p {

    font-size: 38px;

    margin: 0;

    font-weight: bold;
}

/* COLORES */

.green {
    background:
        linear-gradient(135deg, #16a34a, #22c55e);
}

.blue {
    background:
        linear-gradient(135deg, #2563eb, #3b82f6);
}

.orange {
    background:
        linear-gradient(135deg, #ea580c, #fb923c);
}

.purple {
    background:
        linear-gradient(135deg, #7c3aed, #a855f7);
}

/* SHORTCUTS */

.aec-shortcuts {

    display: grid;

    grid-template-columns:
        repeat(4, 1fr);

    gap: 15px;
}

.aec-shortcuts a {

    background: white;

    padding: 18px;

    border-radius: 18px;

    text-decoration: none;

    color: #166534;

    font-weight: 600;

    box-shadow:
        0 10px 30px rgba(0, 0, 0, .05);

    transition: .3s;
}

.aec-shortcuts a:hover {

    transform: translateY(-4px);

    background: #f0fdf4;
}

/* EXECUTIVE GRID */

.aec-executive-grid {

    display: grid;

    grid-template-columns:
        1.5fr 1fr;

    gap: 20px;
}

.aec-panel {

    background: white;

    border-radius: 24px;

    padding: 25px;

    box-shadow:
        0 10px 30px rgba(0, 0, 0, .05);
}

.aec-panel h3 {
    margin-top: 0;
}

.aec-activity {

    padding-left: 20px;
}

.aec-activity li {
    margin-bottom: 12px;
}

/* RESPONSIVE */

@media(max-width:1200px) {

    .aec-home-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .aec-shortcuts {
        grid-template-columns: repeat(2, 1fr);
    }

    .aec-executive-grid {
        grid-template-columns: 1fr;
    }
}

@media(max-width:768px) {

    .aec-home-grid {
        grid-template-columns: 1fr;
    }

    .aec-shortcuts {
        grid-template-columns: 1fr;
    }

    .aec-hero {
        flex-direction: column;
        gap: 20px;
    }
}