<!DOCTYPE html>
<html lang="es">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title><?php echo $__env->yieldContent('title', 'Mantenimiento'); ?></title>
    <style>
        body { font-family: Arial, sans-serif; background: #f8fafc; margin: 0; padding: 24px; }
        .container { max-width: 1100px; margin: 0 auto; background: #fff; padding: 20px; border-radius: 14px; box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08); }
        .topbar-shell { position: sticky; top: 0; z-index: 10; background: #fff; padding-bottom: 10px; border-bottom: 1px solid #e2e8f0; margin-bottom: 14px; }
        .top { display:flex; justify-content: space-between; align-items:center; gap: 12px; flex-wrap: wrap; }
        .top-actions { display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
        .user-chip { display:inline-flex; align-items:center; gap:8px; background:#eff6ff; border:1px solid #bfdbfe; color:#1e3a8a; padding:8px 12px; border-radius:999px; font-weight:700; font-size:13px; white-space:nowrap; }
        .user-icon { width:24px; height:24px; border-radius:999px; display:inline-flex; align-items:center; justify-content:center; background:#dbeafe; font-size:14px; }
        a { color: #0f172a; }
        .btn { display:inline-block; padding: 10px 14px; border-radius: 10px; text-decoration:none; border:1px solid #e2e8f0; background:#f1f5f9; }
        .btn.primary { background:#ef4444; border-color:#ef4444; color:#fff; }
        .btn.danger { background:#dc2626; border-color:#dc2626; color:#fff; }
        table { width:100%; border-collapse: collapse; }
        th, td { border-bottom: 1px solid #e5e7eb; padding: 10px 8px; text-align:left; font-size: 14px; }
        th { background:#f8fafc; }
        .row-actions { display:flex; gap:8px; flex-wrap: wrap; }
        .flash { background:#dcfce7; border:1px solid #86efac; color:#166534; padding:10px; border-radius: 10px; margin-bottom: 12px; }
        .nav-back { margin-bottom: 12px; }
        .nav-back .btn { padding: 8px 12px; }
    </style>
</head>
<body>
<div class="container">
    <div class="topbar-shell">
        <div class="top">
            <div>
                <h2 style="margin:0">Mantenimiento</h2>
                <div style="color:#475569;font-size:13px"><?php echo $__env->yieldContent('subtitle', ''); ?></div>
            </div>
            <div class="top-actions">
                <div class="user-chip" title="Usuario logueado">
                    <span class="user-icon">👤</span>
                    <span><?php echo e(trim((auth()->user()->nombres ?? auth()->user()->name ?? auth()->user()->usuario ?? '') . ' ' . (auth()->user()->apellidos ?? ''))); ?></span>
                </div>
                <a class="btn" href="<?php echo e(route('dashboard')); ?>">Volver al Menu Principal</a>
                <form method="POST" action="<?php echo e(route('logout')); ?>" style="margin:0">
                    <?php echo csrf_field(); ?>
                    <button class="btn danger" type="submit">Cerrar sesión</button>
                </form>
            </div>
        </div>
    </div>

    <?php if(session('success')): ?>
        <div class="flash"><?php echo e(session('success')); ?></div>
    <?php endif; ?>

    <?php if($errors->any()): ?>
        <div class="flash" style="background:#fef2f2;border-color:#fecaca;color:#991b1b;">
            <strong>Por favor corrige los siguientes errores:</strong>
            <ul style="margin:6px 0 0 18px; padding:0;">
                <?php $__currentLoopData = $errors->all(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $error): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                    <li><?php echo e($error); ?></li>
                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
            </ul>
        </div>
    <?php endif; ?>

    <div class="nav-back">
        <?php echo $__env->yieldContent('back'); ?>
    </div>

    <?php echo $__env->yieldContent('actions'); ?>
    <?php echo $__env->yieldContent('content'); ?>
</div>
</body>
</html>


<?php /**PATH C:\laragon\www\grifo\resources\views/partials/layout.blade.php ENDPATH**/ ?>