
<div class="w-full" style="font-size:14px; display:flex; flex-direction:column; gap:14px;">

    <div>
        <a href="<?php echo e(route('environments.index')); ?>" wire:navigate
           class="inline-flex items-center gap-1.5 text-[13px] font-semibold" style="color:var(--text-link);">
            <svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="m15 18-6-6 6-6"/></svg>
            Entornos
        </a>
    </div>

    
    <section class="overflow-hidden rounded-xl border"
             style="background:var(--surface-card); border-color:var(--border-subtle);">
        <div class="flex flex-wrap items-center justify-between gap-6 px-6 py-5">
            <div class="flex min-w-0 flex-1 items-center gap-4">
                <span class="flex h-[52px] w-[52px] flex-none items-center justify-center rounded-xl"
                      style="background:var(--teal-100); color:var(--teal-700);">
                    <svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><rect x="2" y="3" width="20" height="7" rx="2"/><rect x="2" y="14" width="20" height="7" rx="2"/><path d="M6 6.5h.01"/><path d="M6 17.5h.01"/></svg>
                </span>
                <div class="min-w-0">
                    <div class="text-[10.5px] font-semibold uppercase tracking-[0.08em]" style="color:var(--orange-600);">
                        Uso del entorno
                    </div>
                    <div class="mt-0.5 flex flex-wrap items-center gap-2.5">
                        <h1 class="truncate" style="font-family:'Plus Jakarta Sans',sans-serif; font-size:21px; font-weight:700; letter-spacing:-0.02em; color:var(--text-strong); margin:0;">
                            <?php echo e($environment->name); ?>

                        </h1>
                        <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($environment->env): ?>
                            <span class="flex-none rounded px-1.5 py-px text-[10.5px] font-semibold"
                                  style="color:var(--info-500); background:var(--info-50);">
                                <?php echo e($environment->env); ?>

                            </span>
                        <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
                        <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($environment->trashed()): ?>
                            <span class="flex-none rounded-full px-2.5 py-px text-[11px] font-semibold"
                                  style="color:var(--danger-500); background:var(--danger-50);">De baja</span>
                        <?php elseif($environment->active): ?>
                            <span class="flex-none rounded-full px-2.5 py-px text-[11px] font-semibold"
                                  style="color:var(--success-500); background:var(--success-50);">Activo</span>
                        <?php else: ?>
                            <span class="flex-none rounded-full px-2.5 py-px text-[11px] font-semibold"
                                  style="color:var(--warning-500); background:var(--warning-50);">Desactivado</span>
                        <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
                    </div>
                    <div class="mt-1.5 flex flex-wrap items-center gap-2 text-[12.5px]" style="color:var(--text-muted);">
                        <a href="<?php echo e($environment->enlaceDelDominio() ?? '#'); ?>" target="_blank" rel="noopener"
                           class="inline-flex items-center gap-1 font-semibold" style="color:var(--text-link);">
                            <?php echo e(preg_replace('#^https?://#', '', (string) $environment->domain)); ?>

                            <svg width="11" height="11" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M15 3h6v6"/><path d="M10 14 21 3"/><path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"/></svg>
                        </a>
                        <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($environment->client): ?>
                            <span style="color:var(--border-strong);">·</span>
                            <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('admin.clients.index')): ?>
                                <a href="<?php echo e(route('clients.index')); ?>" wire:navigate
                                   class="font-semibold" style="color:var(--text-link);"><?php echo e($environment->client->name); ?></a>
                            <?php else: ?>
                                <span><?php echo e($environment->client->name); ?></span>
                            <?php endif; ?>
                        <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
                        <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($foto?->moodlerelease): ?>
                            <span style="color:var(--border-strong);">·</span>
                            <span>Moodle <?php echo e($foto->moodlerelease); ?></span>
                        <?php elseif($environment->version): ?>
                            <span style="color:var(--border-strong);">·</span>
                            <span>Moodle <?php echo e($environment->version); ?></span>
                        <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
                    </div>
                </div>
            </div>

            
            <div class="flex flex-none items-center gap-3 rounded-[10px] border px-4 py-2.5"
                 style="border-color:var(--border-subtle); background:var(--surface-alt);">
                <span class="h-2.5 w-2.5 flex-none rounded-full" style="background:<?php echo e($frescura['punto']); ?>;"></span>
                <div>
                    <div class="text-[10.5px] font-semibold uppercase tracking-[0.06em]" style="color:var(--text-muted);">
                        Último dato recibido
                    </div>
                    <div class="mt-px text-[14px] font-bold" style="color:<?php echo e($frescura['color']); ?>;">
                        <?php echo e($frescura['texto']); ?>

                    </div>
                    <div class="text-[11px]" style="color:var(--text-subtle);"><?php echo e($frescura['nota']); ?></div>
                </div>

                
                <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($this->puedePedirDatos()): ?>
                    <button type="button" wire:click="abrirPedirDatos"
                            title="Pedirle a este Moodle que envíe su foto de uso ahora"
                            class="flex-none rounded-lg border px-2.5 py-1.5 text-[12px] font-semibold"
                            style="border-color:var(--border-default); background:var(--surface-page); color:var(--text-body);">
                        Pedir ahora
                    </button>
                <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
            </div>
        </div>

        <div class="flex flex-wrap items-center justify-between gap-4 border-t px-6 py-2.5"
             style="border-color:var(--divider); background:var(--surface-alt);">
            <span class="text-[12px]" style="color:var(--text-muted);">
                Cuánta gente y cuánto contenido tiene este Moodle, y cómo evoluciona.
                <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->any(['admin.environments.index', 'admin.plugins.environment'])): ?>
                    Los plugins instalados están en
                    <a href="<?php echo e(route('environments.plugins.index', $environment)); ?>" wire:navigate
                       class="font-semibold" style="color:var(--text-link);">su inventario</a>;
                <?php endif; ?>
                <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('admin.api-logs.index')): ?>
                    las peticiones a la API, en
                    <a href="<?php echo e(route('api-logs.index')); ?>" wire:navigate
                       class="font-semibold" style="color:var(--text-link);">Monitorización</a>.
                <?php endif; ?>
            </span>

            
            <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if (! ($nuncaHaEnviado)): ?>
                <div class="flex flex-none flex-wrap items-center gap-2">
                    <span class="text-[11px] font-semibold uppercase tracking-[0.04em]" style="color:var(--text-subtle);">
                        Comparar con
                    </span>
                    <div class="flex flex-wrap gap-0.5 rounded-lg border p-[3px]"
                         style="background:var(--surface-page); border-color:var(--border-default);">
                        <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php $__currentLoopData = \App\Livewire\Environments\Uso::RANGOS; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $dias => $etiqueta): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                            <button type="button" wire:click="cambiarRango(<?php echo e($dias); ?>)"
                                    class="rounded-md px-2.5 py-[5px] text-[12px] font-semibold transition-colors"
                                    style="<?php echo \Illuminate\Support\Arr::toCssStyles([
                                        'background:var(--neutral-800); color:#fff' => $rango === $dias,
                                        'background:transparent; color:var(--text-muted)' => $rango !== $dias,
                                    ]) ?>">
                                <?php echo e($etiqueta); ?>

                            </button>
                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
                    </div>
                </div>
            <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
        </div>
    </section>

    
    <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($environment->trashed()): ?>
        <div class="flex items-center gap-3 rounded-xl border px-[18px] py-3 text-[13px]"
             style="background:var(--surface-sunken); border-color:var(--border-default); color:var(--text-body);">
            <svg width="17" height="17" viewBox="0 0 24 24" fill="none" stroke="var(--text-subtle)" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="flex-none"><circle cx="12" cy="12" r="10"/><path d="m4.9 4.9 14.2 14.2"/></svg>
            <span>
                Entorno dado de baja<?php echo e($environment->deleted_at ? ' el ' . $environment->deleted_at->format('d/m/Y') : ''); ?>.
                <strong class="font-semibold">Los datos históricos se conservan</strong>: lo que ves es
                la última foto y la serie hasta ese día.
            </span>
        </div>
    <?php elseif($frescura['viejo']): ?>
        
        <div class="flex items-center gap-3 rounded-xl border px-[18px] py-3 text-[13px]"
             style="background:var(--warning-50); border-color:var(--warning-500); color:var(--text-body);">
            <svg width="17" height="17" viewBox="0 0 24 24" fill="none" stroke="var(--warning-500)" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="flex-none"><circle cx="12" cy="12" r="10"/><path d="M12 6v6l4 2"/></svg>
            <span>
                <strong class="font-semibold">Estas cifras son del
                    <?php echo e($fechaDeLaFoto->format('d/m/Y')); ?>.</strong>
                El Moodle no ha vuelto a enviar desde entonces, así que
                <strong class="font-semibold">no son datos de hoy</strong>. Comprueba la
                sincronización en la ficha del entorno.
            </span>
        </div>
    <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>

    
    <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($nuncaHaEnviado): ?>
        <section class="rounded-xl border px-6 py-10 text-center"
                 style="background:var(--surface-card); border-color:var(--border-subtle);">
            <div class="inline-flex h-[52px] w-[52px] items-center justify-center rounded-full"
                 style="background:var(--surface-teal-subtle);">
                <svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="var(--teal-600)" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M3 3v16a2 2 0 0 0 2 2h16"/><path d="m7 14 4-4 4 3 5-6"/></svg>
            </div>
            <div class="mt-3.5" style="font-family:'Plus Jakarta Sans',sans-serif; font-size:16px; font-weight:700; color:var(--text-strong);">
                Este Moodle todavía no ha enviado ningún dato de uso
            </div>
            
            <div class="mx-auto mt-1.5 max-w-xl text-[13px] leading-relaxed" style="color:var(--text-muted);">
                No es un fallo del Manager: la foto diaria la envía una tarea programada del
                plugin del entorno, y de este no ha llegado ninguna. Suele ser que el plugin
                instalado es anterior a esa tarea, que el cron del Moodle no se está
                ejecutando, o que el entorno no ha sincronizado nunca.
            </div>
            <div class="mt-4 flex flex-wrap justify-center gap-2.5">
                
                <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($this->puedePedirDatos()): ?>
                    <button type="button" wire:click="abrirPedirDatos"
                            class="rounded-lg border-none px-4 py-2 text-[13px] font-semibold text-white"
                            style="background:var(--orange-500);"
                            onmouseover="this.style.background='var(--orange-600)'"
                            onmouseout="this.style.background='var(--orange-500)'">
                        Pedirle los datos ahora
                    </button>
                <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
                <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('admin.environments.index')): ?>
                    <a href="<?php echo e(route('environments.index')); ?>" wire:navigate
                       class="rounded-lg border px-3.5 py-2 text-[13px] font-semibold"
                       style="border-color:var(--border-default); background:var(--surface-page); color:var(--text-body);">
                        Ver la ficha del entorno
                    </a>
                <?php endif; ?>
                <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('admin.plugins.environment')): ?>
                    <a href="<?php echo e(route('environments.plugins.index', $environment)); ?>" wire:navigate
                       class="rounded-lg border px-3.5 py-2 text-[13px] font-semibold"
                       style="border-color:var(--border-default); background:var(--surface-page); color:var(--text-body);">
                        Ver qué plugins tiene
                    </a>
                <?php endif; ?>
            </div>
        </section>
    <?php else: ?>

        
        <div wire:loading.class="opacity-40" wire:target="cambiarRango"
             class="flex flex-col gap-3.5 transition-opacity duration-200">

        
        
        <div class="uso-familias-grid">
            <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php $__currentLoopData = $familias; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $familia): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                <section class="flex flex-col rounded-xl border px-5 pb-3.5 pt-4"
                         style="background:var(--surface-card); border-color:var(--border-subtle);">
                    <div class="flex items-center justify-between gap-2.5">
                        <h2 style="font-family:'Plus Jakarta Sans',sans-serif; font-size:13px; font-weight:700; letter-spacing:0.05em; text-transform:uppercase; color:var(--text-muted); margin:0;">
                            <?php echo e($familia['nombre']); ?>

                        </h2>
                        
                        <span class="whitespace-nowrap rounded-full px-2.5 py-0.5 text-[11px] font-bold"
                              style="color:<?php echo e($familia['delta']['fg']); ?>; background:<?php echo e($familia['delta']['bg']); ?>;">
                            <?php echo e($familia['delta']['texto']); ?>

                        </span>
                    </div>

                    <div class="py-4 text-center">
                        <div style="font-family:'Plus Jakarta Sans',sans-serif; font-size:40px; font-weight:800; letter-spacing:-0.02em; color:var(--text-strong); line-height:1;">
                            <?php echo e($familia['valor'] === null ? '—' : number_format($familia['valor'], 0, ',', '.')); ?>

                        </div>
                        <div class="mt-1.5 text-[12px]" style="color:var(--text-muted);"><?php echo e($familia['label']); ?></div>
                    </div>

                    <div class="grid grid-cols-3 gap-2.5 border-t pt-3" style="border-color:var(--divider);">
                        <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php $__currentLoopData = $familia['secundarias']; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $secundaria): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                            <div class="min-w-0 text-center" title="<?php echo e($secundaria['tip']); ?>">
                                <div style="font-family:'Plus Jakarta Sans',sans-serif; font-size:16px; font-weight:700; color:var(--text-strong);">
                                    <?php echo e($secundaria['valor']); ?>

                                </div>
                                <div class="mt-px text-[10.5px] leading-tight" style="color:var(--text-subtle);">
                                    <?php echo e($secundaria['label']); ?>

                                </div>
                            </div>
                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
                    </div>
                </section>
            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
        </div>

        
        
        <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($foto): ?>
            <div class="flex flex-wrap items-center gap-4 rounded-xl border px-5 py-2.5"
                 style="background:var(--surface-card); border-color:var(--border-subtle);">
                <span class="flex-none text-[11px] font-semibold uppercase tracking-[0.05em]" style="color:var(--text-subtle);">
                    Además
                </span>
                <div class="flex flex-wrap gap-x-5 gap-y-1 text-[12px]" style="color:var(--text-muted);">
                    <span>
                        <strong class="font-bold" style="color:var(--text-body);"><?php echo e(number_format((int) $foto->analyticspredictions, 0, ',', '.')); ?></strong>
                        predicciones de analítica ·
                        <strong class="font-bold" style="color:var(--text-body);"><?php echo e(number_format((int) $foto->analyticsactions, 0, ',', '.')); ?></strong>
                        acciones
                    </span>
                    <span>
                        <strong class="font-bold" style="color:var(--text-body);"><?php echo e(number_format((int) $foto->registereduserdevices, 0, ',', '.')); ?></strong>
                        móviles registrados
                    </span>
                    <span>
                        <strong class="font-bold" style="color:var(--text-body);"><?php echo e(number_format((int) $foto->registeredactiveuserdevices, 0, ',', '.')); ?></strong>
                        móviles activos
                    </span>
                </div>
            </div>
        <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>

        
        <section class="overflow-hidden rounded-xl border"
                 style="background:var(--surface-card); border-color:var(--border-subtle);">
            <div class="flex flex-wrap items-center justify-between gap-4 px-5 pb-2.5 pt-3.5">
                <div>
                    <h2 style="font-family:'Plus Jakarta Sans',sans-serif; font-size:15px; font-weight:700; color:var(--text-strong); margin:0;">
                        Evolución
                    </h2>
                    <div class="mt-0.5 text-[12px]" style="color:var(--text-muted);">
                        Últimos <?php echo e(\App\Livewire\Environments\Uso::RANGOS[$rango]); ?> — una foto al día,
                        con la fecha del Moodle. Si un día llegan dos envíos, gana el último; no hay
                        datos por hora.
                    </div>
                </div>
            </div>

            <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($sinSerie): ?>
                
                <div class="mx-5 mb-[18px] flex items-center gap-4 rounded-[10px] border-[1.5px] border-dashed px-5 py-4"
                     style="border-color:var(--border-default);">
                    <div class="flex h-[42px] w-[42px] flex-none items-center justify-center rounded-full"
                         style="background:var(--surface-teal-subtle);">
                        <svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="var(--teal-600)" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M3 3v16a2 2 0 0 0 2 2h16"/><path d="m7 14 4-4 4 3 5-6"/></svg>
                    </div>
                    <div>
                        <div class="text-[13.5px] font-semibold" style="color:var(--text-strong);">
                            La serie empieza ahora
                        </div>
                        <div class="mt-0.5 text-[12.5px]" style="color:var(--text-muted);">
                            Ya hay una primera foto, pero hace falta más de un día para dibujar una
                            evolución. Mañana habrá dos puntos; en una semana, una línea.
                            <strong class="font-semibold">No es una avería.</strong>
                        </div>
                    </div>
                </div>
            <?php else: ?>
                <div class="uso-series-grid px-5 pb-[18px] pt-1">
                    <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php $__currentLoopData = $series; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $serie): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                        <div class="rounded-[10px] border px-4 pb-3 pt-3.5" style="border-color:var(--border-subtle);">
                            <div class="flex items-start justify-between gap-2.5">
                                <div>
                                    <div class="text-[12px] font-semibold" style="color:var(--text-muted);">
                                        <?php echo e($serie['nombre']); ?>

                                    </div>
                                    <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if (! ($serie['vacia'])): ?>
                                        <div class="flex items-baseline gap-2">
                                            <span style="font-family:'Plus Jakarta Sans',sans-serif; font-size:20px; font-weight:800; letter-spacing:-0.01em; color:var(--text-strong);">
                                                <?php echo e($serie['valorActual']); ?>

                                            </span>
                                            <span class="text-[11.5px] font-semibold" style="color:<?php echo e($serie['delta']['fg']); ?>;">
                                                <?php echo e($serie['delta']['texto']); ?>

                                            </span>
                                        </div>
                                    <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
                                </div>
                                <span class="mt-1 h-2.5 w-2.5 flex-none rounded-full" style="background:<?php echo e($serie['color']); ?>;"></span>
                            </div>

                            <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($serie['vacia']): ?>
                                <div class="py-8 text-center text-[12.5px]" style="color:var(--text-subtle);">
                                    El Moodle no envía esta medida.
                                </div>
                            <?php else: ?>
                                <?php if (isset($component)) { $__componentOriginal9750a40f4d84a08f917b4163bce09c03 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal9750a40f4d84a08f917b4163bce09c03 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.grafica','data' => ['id' => $serie['metrica'],'opciones' => $serie['opciones'],'alto' => 170,'ariaLabel' => 'Evolución de ' . $serie['nombre']]] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('grafica'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
<?php endif; ?>
<?php $component->withAttributes(['id' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($serie['metrica']),'opciones' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($serie['opciones']),'alto' => 170,'aria-label' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute('Evolución de ' . $serie['nombre'])]); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal9750a40f4d84a08f917b4163bce09c03)): ?>
<?php $attributes = $__attributesOriginal9750a40f4d84a08f917b4163bce09c03; ?>
<?php unset($__attributesOriginal9750a40f4d84a08f917b4163bce09c03); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal9750a40f4d84a08f917b4163bce09c03)): ?>
<?php $component = $__componentOriginal9750a40f4d84a08f917b4163bce09c03; ?>
<?php unset($__componentOriginal9750a40f4d84a08f917b4163bce09c03); ?>
<?php endif; ?>

                                <div class="mt-1 flex items-center justify-between text-[10px]" style="color:var(--text-subtle);">
                                    <span><?php echo e($serie['desde']); ?></span>
                                    
                                    <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($serie['huecos'] > 0): ?>
                                        <span style="color:var(--warning-500);">
                                            <?php echo e($serie['huecos']); ?> de <?php echo e($serie['total']); ?> días sin dato
                                        </span>
                                    <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
                                    <span><?php echo e($serie['hasta']); ?></span>
                                </div>
                            <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
                        </div>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
                </div>
            <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
        </section>

        </div>
    <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
</div><?php /**PATH /var/www/html/resources/views/livewire/environments/uso.blade.php ENDPATH**/ ?>