 :root {
            --bg-general: #0f1720;
            --bg-sidebar: #111c27;
            --bg-panel: #182431;
            --bg-panel-secundario: #1e2d3b;

            --texto-principal: #f3f6f9;
            --texto-secundario: #9fb0c0;

            --borde: #2a3a49;

            --azul: #2f80ed;
            --verde: #27ae60;
            --amarillo: #f2c94c;
            --rojo: #eb5757;

            --sidebar-width: 250px;
        }

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

        body {
            font-family: "Segoe UI", Arial, sans-serif;
            background: var(--bg-general);
            color: var(--texto-principal);
            min-height: 100vh;
        }

        .app {
            display: flex;
            min-height: 100vh;
        }

        .sidebar {
            width: var(--sidebar-width);
            background: var(--bg-sidebar);
            border-right: 1px solid var(--borde);
            padding: 22px 16px;
            position: fixed;
            top: 0;
            left: 0;
            bottom: 0;
        }

        .logo {
            display: flex;
            align-items: center;
            gap: 12px;
            margin-bottom: 36px;
            padding: 0 8px;
        }

        .logo-icono {
            width: 42px;
            height: 42px;
            border-radius: 12px;
            background: linear-gradient(135deg, #2f80ed, #56ccf2);
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: bold;
            font-size: 20px;
        }

        .logo-texto h1 {
            font-size: 18px;
            line-height: 1.1;
        }

        .logo-texto span {
            color: var(--texto-secundario);
            font-size: 12px;
        }

        .menu {
            display: flex;
            flex-direction: column;
            gap: 8px;
        }

        .menu a {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 13px 14px;
            border-radius: 10px;
            color: var(--texto-secundario);
            text-decoration: none;
            transition: 0.2s ease;
        }

        .menu a:hover {
            background: var(--bg-panel);
            color: var(--texto-principal);
        }

        .menu a.activo {
            background: rgba(47, 128, 237, 0.16);
            color: #7db4ff;
            border: 1px solid rgba(47, 128, 237, 0.32);
        }

        .menu-icono {
            width: 20px;
            text-align: center;
        }

        .contenido {
            margin-left: var(--sidebar-width);
            width: calc(100% - var(--sidebar-width));
            min-height: 100vh;
        }

        .topbar {
            height: 76px;
            background: rgba(15, 23, 32, 0.92);
            border-bottom: 1px solid var(--borde);
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 0 30px;
            position: sticky;
            top: 0;
            z-index: 10;
            backdrop-filter: blur(12px);
        }

        .topbar-titulo h2 {
            font-size: 20px;
            margin-bottom: 3px;
        }

        .topbar-titulo p {
            color: var(--texto-secundario);
            font-size: 13px;
        }

        .estado-servidor {
            display: flex;
            align-items: center;
            gap: 10px;
            background: var(--bg-panel);
            border: 1px solid var(--borde);
            padding: 10px 14px;
            border-radius: 12px;
        }

        .estado-punto {
            width: 10px;
            height: 10px;
            border-radius: 50%;
            background: var(--verde);
            box-shadow: 0 0 10px rgba(39, 174, 96, 0.7);
        }

        .estado-servidor strong {
            display: block;
            font-size: 13px;
        }

        .estado-servidor span {
            color: var(--texto-secundario);
            font-size: 11px;
        }

        .main {
            padding: 28px 30px 40px;
        }

        .encabezado-seccion {
            margin-bottom: 24px;
        }

        .encabezado-seccion h3 {
            font-size: 26px;
            margin-bottom: 6px;
        }

        .encabezado-seccion p {
            color: var(--texto-secundario);
        }

        .tarjetas {
            display: grid;
            grid-template-columns: repeat(4, minmax(0, 1fr));
            gap: 18px;
            margin-bottom: 24px;
        }

        .tarjeta {
            background: var(--bg-panel);
            border: 1px solid var(--borde);
            border-radius: 16px;
            padding: 20px;
            min-height: 145px;
        }

        .tarjeta-top {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 18px;
        }

        .tarjeta-titulo {
            color: var(--texto-secundario);
            font-size: 13px;
        }

        .tarjeta-icono {
            width: 38px;
            height: 38px;
            border-radius: 11px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 18px;
            background: var(--bg-panel-secundario);
        }

        .tarjeta-valor {
            font-size: 24px;
            font-weight: 700;
            margin-bottom: 7px;
        }

        .tarjeta-detalle {
            color: var(--texto-secundario);
            font-size: 12px;
        }

        .estado-ok {
            color: var(--verde);
        }

        .estado-advertencia {
            color: var(--amarillo);
        }

        .grid-principal {
            display: grid;
            grid-template-columns: 1.4fr 1fr;
            gap: 18px;
        }

        .panel {
            background: var(--bg-panel);
            border: 1px solid var(--borde);
            border-radius: 16px;
            padding: 22px;
        }

        .panel-cabecera {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 20px;
        }

        .panel-cabecera h4 {
            font-size: 17px;
        }

        .boton {
            background: var(--azul);
            color: white;
            border: none;
            border-radius: 10px;
            padding: 10px 15px;
            font-weight: 600;
            cursor: pointer;
        }

        .boton:hover {
            filter: brightness(1.08);
        }

        .recovery-detalle {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 14px;
        }

        .dato {
            background: var(--bg-panel-secundario);
            border: 1px solid var(--borde);
            border-radius: 12px;
            padding: 15px;
        }

        .dato span {
            display: block;
            color: var(--texto-secundario);
            font-size: 12px;
            margin-bottom: 6px;
        }

        .dato strong {
            font-size: 14px;
        }

        .actividad {
            display: flex;
            flex-direction: column;
            gap: 14px;
        }

        .actividad-item {
            display: flex;
            gap: 12px;
            align-items: flex-start;
            padding-bottom: 14px;
            border-bottom: 1px solid var(--borde);
        }

        .actividad-item:last-child {
            border-bottom: none;
            padding-bottom: 0;
        }

        .actividad-marca {
            width: 10px;
            height: 10px;
            border-radius: 50%;
            margin-top: 5px;
            flex-shrink: 0;
        }

        .actividad-texto strong {
            display: block;
            font-size: 13px;
            margin-bottom: 4px;
        }

        .actividad-texto span {
            color: var(--texto-secundario);
            font-size: 12px;
        }

        @media (max-width: 1100px) {
            .tarjetas {
                grid-template-columns: repeat(2, minmax(0, 1fr));
            }

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

        @media (max-width: 760px) {
            .sidebar {
                position: static;
                width: 100%;
                height: auto;
            }

            .app {
                display: block;
            }

            .contenido {
                margin-left: 0;
                width: 100%;
            }

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

            .topbar {
                padding: 0 18px;
            }

            .main {
                padding: 22px 18px 30px;
            }

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

            .recovery-detalle {
                grid-template-columns: 1fr;
            }
        }

/* ==========================================================
   ARES RECOVERY — DASHBOARD V2
   ========================================================== */

.sidebar-footer {
    position: absolute;
    left: 24px;
    right: 24px;
    bottom: 24px;
    padding-top: 18px;
    border-top: 1px solid var(--borde);
}

.sidebar-footer span,
.sidebar-footer small {
    display: block;
}

.sidebar-footer span {
    font-size: 13px;
    font-weight: 600;
}

.sidebar-footer small {
    margin-top: 4px;
    color: var(--texto-secundario);
    font-size: 11px;
}

.topbar-estado {
    display: flex;
    align-items: center;
    gap: 16px;
}

.ultima-comprobacion {
    text-align: right;
}

.ultima-comprobacion span,
.ultima-comprobacion strong {
    display: block;
}

.ultima-comprobacion span {
    color: var(--texto-secundario);
    font-size: 11px;
    margin-bottom: 4px;
}

.ultima-comprobacion strong {
    font-size: 13px;
}

.topbar-etiqueta,
.seccion-etiqueta,
.panel-etiqueta {
    display: block;
    margin-bottom: 6px;
    color: #73aefc;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.encabezado-seccion {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 24px;
}

.encabezado-seccion > div {
    max-width: 760px;
}

.boton {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 18px;
    border: 1px solid transparent;
    border-radius: 10px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.2s ease;
}

.boton-primario {
    background: var(--azul);
    color: #fff;
}

.boton-primario:hover {
    transform: translateY(-1px);
    filter: brightness(1.08);
}

.boton-secundario {
    background: var(--bg-panel-secundario);
    border-color: var(--borde);
    color: var(--texto-principal);
}

.boton-secundario:hover {
    border-color: rgba(47, 128, 237, 0.7);
}

.tarjeta {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 220px;
}

.tarjeta-top > div:first-child {
    min-width: 0;
}

.tarjeta-top small {
    display: block;
    margin-top: 5px;
    color: var(--texto-secundario);
    font-size: 11px;
}

.tarjeta-icono svg {
    width: 20px;
    height: 20px;
}

.tarjeta-icono.estado-correcto {
    background: rgba(39, 174, 96, 0.13);
    color: var(--verde);
}

.tarjeta-descripcion {
    margin-top: -4px;
    color: var(--texto-secundario);
    font-size: 12px;
}

.tarjeta-metricas {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-top: 18px;
}

.tarjeta-metricas > div {
    min-width: 0;
    padding: 11px;
    background: var(--bg-panel-secundario);
    border: 1px solid var(--borde);
    border-radius: 10px;
}

.tarjeta-metricas span,
.tarjeta-metricas strong {
    display: block;
}

.tarjeta-metricas span {
    margin-bottom: 5px;
    color: var(--texto-secundario);
    font-size: 10px;
}

.tarjeta-metricas strong {
    overflow: hidden;
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(320px, 0.8fr);
    gap: 18px;
    margin-bottom: 18px;
}

.panel-proteccion,
.panel-nivel {
    min-height: 430px;
}

.estado-badge {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 11px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
}

.estado-badge-ok {
    background: rgba(39, 174, 96, 0.12);
    border: 1px solid rgba(39, 174, 96, 0.28);
    color: #62d893;
}

.lista-comprobaciones {
    display: flex;
    flex-direction: column;
}

.comprobacion-item {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid var(--borde);
}

.comprobacion-item:last-child {
    border-bottom: 0;
}

.comprobacion-icono {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
}

.comprobacion-icono svg {
    width: 18px;
    height: 18px;
}

.comprobacion-icono.correcto {
    background: rgba(39, 174, 96, 0.13);
    color: var(--verde);
}

.comprobacion-icono.pendiente {
    background: rgba(242, 201, 76, 0.12);
    color: var(--amarillo);
}

.comprobacion-texto {
    min-width: 0;
}

.comprobacion-texto strong,
.comprobacion-texto span {
    display: block;
}

.comprobacion-texto strong {
    margin-bottom: 4px;
    font-size: 13px;
}

.comprobacion-texto span {
    color: var(--texto-secundario);
    font-size: 11px;
    line-height: 1.45;
}

.comprobacion-estado {
    color: var(--texto-secundario);
    font-size: 11px;
    font-weight: 600;
}

.nivel-proteccion {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.nivel-circulo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 190px;
    height: 190px;
    margin: 10px 0 22px;
    border-radius: 50%;
    background:
        conic-gradient(
            var(--azul) var(--nivel),
            var(--bg-panel-secundario) 0
        );
    box-shadow:
        0 0 0 10px rgba(47, 128, 237, 0.04),
        0 18px 40px rgba(0, 0, 0, 0.22);
}

.nivel-interior {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 148px;
    height: 148px;
    border-radius: 50%;
    background: var(--bg-panel);
    border: 1px solid var(--borde);
}

.nivel-interior strong {
    font-size: 36px;
    line-height: 1;
}

.nivel-interior span {
    margin-top: 8px;
    color: var(--texto-secundario);
    font-size: 12px;
}

.nivel-proteccion p {
    max-width: 340px;
    color: var(--texto-secundario);
    font-size: 12px;
    line-height: 1.6;
}

.nivel-leyenda {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    width: 100%;
    margin-top: 22px;
}

.nivel-leyenda > div {
    padding: 12px 8px;
    background: var(--bg-panel-secundario);
    border: 1px solid var(--borde);
    border-radius: 10px;
}

.nivel-leyenda span,
.nivel-leyenda strong {
    display: block;
}

.nivel-leyenda span {
    margin-bottom: 5px;
    color: var(--texto-secundario);
    font-size: 10px;
}

.nivel-leyenda strong {
    font-size: 11px;
}

.estado-advertencia {
    color: var(--amarillo);
}

.panel-recovery {
    margin-top: 18px;
}

.recovery-resumen {
    display: grid;
    grid-template-columns: 1.3fr repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.recovery-identidad,
.recovery-dato {
    min-width: 0;
    padding: 15px;
    background: var(--bg-panel-secundario);
    border: 1px solid var(--borde);
    border-radius: 12px;
}

.recovery-identidad {
    display: flex;
    align-items: center;
    gap: 13px;
}

.recovery-icono {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    flex-shrink: 0;
    border-radius: 11px;
    background: rgba(47, 128, 237, 0.14);
    color: #73aefc;
}

.recovery-icono svg {
    width: 22px;
    height: 22px;
}

.recovery-identidad strong,
.recovery-identidad span,
.recovery-dato span,
.recovery-dato strong {
    display: block;
}

.recovery-identidad span,
.recovery-dato span {
    margin-top: 5px;
    color: var(--texto-secundario);
    font-size: 10px;
}

.recovery-dato strong {
    overflow: hidden;
    margin-top: 7px;
    font-size: 12px;
    text-overflow: ellipsis;
}

.footer {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 18px 30px;
    border-top: 1px solid var(--borde);
    color: var(--texto-secundario);
    font-size: 11px;
}

@media (max-width: 1250px) {
    .tarjetas {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .recovery-resumen {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .recovery-identidad {
        grid-column: span 2;
    }
}

@media (max-width: 980px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .panel-proteccion,
    .panel-nivel {
        min-height: auto;
    }

    .topbar-estado {
        gap: 10px;
    }

    .ultima-comprobacion {
        display: none;
    }
}

@media (max-width: 760px) {
    .sidebar-footer {
        position: static;
        margin-top: 24px;
    }

    .encabezado-seccion {
        align-items: stretch;
        flex-direction: column;
    }

    .encabezado-seccion .boton {
        width: 100%;
    }

    .tarjeta-metricas {
        grid-template-columns: 1fr;
    }

    .comprobacion-item {
        grid-template-columns: 34px minmax(0, 1fr);
    }

    .comprobacion-estado {
        grid-column: 2;
    }

    .nivel-leyenda {
        grid-template-columns: 1fr;
    }

    .recovery-resumen {
        grid-template-columns: 1fr;
    }

    .recovery-identidad {
        grid-column: auto;
    }

    .footer {
        flex-direction: column;
        padding: 18px;
    }
}