/* ========= GENERAL ========= */

* {
    box-sizing: border-box;
}

html, body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

html {
    filter: sepia(20%);
}

body {
    margin: 0;
    font-family: "Segoe UI", sans-serif;
    background: #0f0f0f;
    color: #fff;
    display: flex;
}

h1, h2, h3, p {
    margin: 0;
}

.updated {
    color: #4b92fc; /* azul */
    font-size: 14px; /* opcional, para que no sea tan grande como el h2 */
    margin: 4px 0 0 0; /* opcional, para separar del h2 */
}

/* ========= SIDEBAR ========= */

.sidebar {
    width: 240px;
    background: #1a1a1a;
    height: 100vh;
    padding: 20px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: bold;
}

.logo-icon {
    width: 35px;
    height: 35px;
    background: #f2c200;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: #000;
}

.menu,
.bottom-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.menu li,
.bottom-menu .item {
    padding: 12px 15px;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    opacity: 0.8;
    white-space: nowrap;
}

.menu li.active {
    background: #3d3d21;
    opacity: 1;
}

.menu li:hover,
.bottom-menu .item:hover {
    background: #333;
    opacity: 1;
}

/* ========= MAIN ========= */

.main {
    padding: 30px;
    width: 100%;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.avatar {
    width: 40px;
    height: 40px;
    background: #ffd2ba;
    border-radius: 50%;
}

.email {
    font-size: 12px;
    opacity: 0.7;
}

.new-report {
    background: #f8d000;
    border: none;
    padding: 10px 18px;
    border-radius: 10px;
    font-weight: bold;
    cursor: pointer;
}

/* ========= CARDS ========= */

.welcome {
    margin-top: 25px;
    font-size: 14px;
}

.cards-container {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 18px;
    margin-top: 20px;
}

.card {
    padding: 18px;
    background: #1a1a1a;
    border-radius: 12px;
    border: 1px solid #2a2a2a;

    /* Ajustes para leyendas */
    display: flex;
    flex-direction: column;
}

.card.highlight {
    background: #106efa;
    color: #000;
}

/* ICONOS DEL DASHBOARD */
.card .icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;

    background: rgba(242, 194, 0, 0.15);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(242, 194, 0, 0.25);
    box-shadow: 0 0 12px rgba(242, 194, 0, 0.20);
}

.card .icon.yellow { color: #f2c200; }
.card .icon.green { color: #00cc66; }
.card .icon.red { color: #ff4444; }

.value {
    font-size: 18px;
    font-weight: bold;
}

.sub {
    font-size: 12px;
    opacity: 0.8;
    margin-top: auto; /* Empuja la leyenda al fondo del card */
}

.card .sub.red {
    color: #ff4444;
    opacity: 1;
}

.card .sub.green {
    color: #00cc66;
    opacity: 1;
}

/* Opcional: si quieres que ciertos valores sean más grandes */
.card .value.big {
    font-size: 36px;
}

/* Contraste para card highlight */
.card.highlight .sub {
    color: #000;
}

/* ========= CHART + ACTIVITY ========= */

.content {
    margin-top: 30px;
    display: grid;
    grid-template-columns: 1.8fr 1.2fr;
    gap: 20px;
}

.chart-box {
    background: #1a1a1a;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #2a2a2a;
}

.chart-value {
    font-size: 30px;
    margin-bottom: 10px;
}

.activity {
    background: #1a1a1a;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #2a2a2a;
}

.activity ul {
    list-style: none;
    padding: 0;
}

.activity li {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ICONOS DE ACTIVITY */
.activity .icon {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.activity .icon.blue { background: #0099ff; }
.activity .icon.green { background: #00cc66; }
.activity .icon.red { background: #ff4444; }
.activity .icon.yellow { background: #f2c200; }

/* ========= RESPONSIVE ========= */

/* Tablets y pantallas medianas */
@media (max-width: 992px) {

    body {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        height: auto;
        padding: 10px;
        flex-direction: row;
        align-items: center;
        gap: 10px;
        overflow-x: auto;
        white-space: nowrap;
    }

    .sidebar .menu,
    .sidebar .bottom-menu {
        display: flex;
        flex-direction: row;
        gap: 10px;
    }

    .main {
        width: 100%;
        padding: 20px;
    }

    .cards-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Móviles grandes */
@media (max-width: 768px) {
    .cards-container {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }
}

/* Móviles pequeños */
@media (max-width: 480px) {

    .cards-container {
        grid-template-columns: 1fr;
    }

    .card {
        width: 100%;
    }

    header {
        flex-direction: column;
        gap: 10px;
    }

    .content {
        grid-template-columns: 1fr;
    }
}

/* Gráfica + actividad para cualquier pantalla menor a 1200px */
@media (max-width: 1200px) {
    .content {
        grid-template-columns: 1fr;
    }

    .chart-box,
    .activity {
        width: 100%;
    }
}