<!DOCTYPE html>
<html lang="es">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=768, initial-scale=1.0">
    <title>App Mantenimiento - Lista de Equipos</title>
    <link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css" rel="stylesheet">
    <style>
        :root {
            --primary: #1a3a5c;
            --primary-dark: #0f2840;
            --primary-light: #2d5a8a;
            --accent: #e91e63;
            --accent-light: #f8bbd9;
            --success: #10b981;
            --warning: #f59e0b;
            --danger: #ef4444;
            --info: #3b82f6;
            --gray-50: #f8fafc;
            --gray-100: #f1f5f9;
            --gray-200: #e2e8f0;
            --gray-300: #cbd5e1;
            --gray-400: #94a3b8;
            --gray-500: #64748b;
            --gray-600: #475569;
            --gray-700: #334155;
            --gray-800: #1e293b;
            --gray-900: #0f172a;
            --white: #ffffff;
            --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
            --shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
            --shadow-lg: 0 10px 25px -5px rgba(0,0,0,0.1);
            --radius: 16px;
            --radius-sm: 12px;
            --radius-xs: 8px;
        }

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

        body {
            font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, sans-serif;
            background: var(--gray-100);
            min-height: 100vh;
            color: var(--gray-800);
            -webkit-font-smoothing: antialiased;
        }

        .tablet-frame {
            max-width: 768px;
            margin: 0 auto;
            min-height: 100vh;
            background: var(--gray-50);
            position: relative;
        }

        /* Header compacto */
        .compact-header {
            background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
            padding: 16px 20px;
            position: sticky;
            top: 0;
            z-index: 100;
        }

        .header-row {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 16px;
        }

        .back-btn {
            width: 44px;
            height: 44px;
            border-radius: 50%;
            background: rgba(255,255,255,0.15);
            border: none;
            color: var(--white);
            font-size: 1.1rem;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            text-decoration: none;
        }

        .header-title {
            flex: 1;
            text-align: center;
        }

        .header-title h1 {
            font-size: 1.1rem;
            font-weight: 600;
            color: var(--white);
        }

        .header-title p {
            font-size: 0.8rem;
            color: rgba(255,255,255,0.7);
        }

        .header-btn {
            width: 44px;
            height: 44px;
            border-radius: 50%;
            background: rgba(255,255,255,0.15);
            border: none;
            color: var(--white);
            font-size: 1.1rem;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
        }

        /* Via Info Banner */
        .via-banner {
            background: rgba(255,255,255,0.1);
            border-radius: var(--radius-sm);
            padding: 16px;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .via-banner-info {
            display: flex;
            align-items: center;
            gap: 12px;
        }

        .via-banner-number {
            width: 44px;
            height: 44px;
            border-radius: 10px;
            background: rgba(245, 158, 11, 0.3);
            color: #fcd34d;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.25rem;
            font-weight: 700;
        }

        .via-banner-text h3 {
            color: var(--white);
            font-size: 1rem;
            font-weight: 600;
        }

        .via-banner-text p {
            color: rgba(255,255,255,0.7);
            font-size: 0.8rem;
        }

        .via-banner-progress {
            text-align: right;
        }

        .via-banner-progress .percentage {
            color: var(--white);
            font-size: 1.25rem;
            font-weight: 700;
        }

        .via-banner-progress .label {
            color: rgba(255,255,255,0.7);
            font-size: 0.75rem;
        }

        /* Main Content */
        .main-content {
            padding: 20px;
            padding-bottom: 100px;
        }

        .section-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 16px;
        }

        .section-title {
            font-size: 1.1rem;
            font-weight: 700;
            color: var(--gray-800);
        }

        .section-badge {
            background: var(--gray-100);
            color: var(--gray-600);
            padding: 6px 12px;
            border-radius: 20px;
            font-size: 0.8rem;
            font-weight: 600;
        }

        /* Equipment Grid - 2 columnas para tablet */
        .equipment-grid {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 16px;
        }

        .equipment-card {
            background: var(--white);
            border-radius: var(--radius);
            box-shadow: var(--shadow);
            overflow: hidden;
            transition: all 0.3s;
            cursor: pointer;
        }

        .equipment-card:hover {
            box-shadow: var(--shadow-lg);
            transform: translateY(-2px);
        }

        .equipment-card-header {
            padding: 16px;
            display: flex;
            align-items: center;
            gap: 12px;
        }

        .equipment-icon {
            width: 52px;
            height: 52px;
            border-radius: var(--radius-sm);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.3rem;
            flex-shrink: 0;
        }

        .equipment-icon.antena {
            background: rgba(59, 130, 246, 0.1);
            color: #3b82f6;
        }

        .equipment-icon.sensor {
            background: rgba(139, 92, 246, 0.1);
            color: #8b5cf6;
        }

        .equipment-icon.camara {
            background: rgba(236, 72, 153, 0.1);
            color: #ec4899;
        }

        .equipment-icon.semaforo {
            background: rgba(16, 185, 129, 0.1);
            color: #10b981;
        }

        .equipment-info {
            flex: 1;
            min-width: 0;
        }

        .equipment-name {
            font-size: 0.95rem;
            font-weight: 600;
            color: var(--gray-800);
            margin-bottom: 2px;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .equipment-code {
            font-size: 0.8rem;
            color: var(--gray-500);
        }

        .equipment-card-body {
            padding: 0 16px 16px;
        }

        .equipment-status {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 12px;
            background: var(--gray-50);
            border-radius: var(--radius-xs);
        }

        .status-indicator {
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .status-dot {
            width: 10px;
            height: 10px;
            border-radius: 50%;
        }

        .status-dot.completado { background: var(--success); }
        .status-dot.en-proceso { background: var(--warning); }
        .status-dot.por-iniciar { background: var(--gray-300); }

        .status-text {
            font-size: 0.8rem;
            font-weight: 500;
            color: var(--gray-600);
        }

        .status-action {
            width: 32px;
            height: 32px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 0.85rem;
        }

        .status-action.completado {
            background: rgba(16, 185, 129, 0.1);
            color: var(--success);
        }

        .status-action.en-proceso {
            background: rgba(245, 158, 11, 0.1);
            color: var(--warning);
        }

        .status-action.por-iniciar {
            background: var(--gray-100);
            color: var(--gray-400);
        }

        /* Checklist preview */
        .checklist-preview {
            margin-top: 12px;
            padding-top: 12px;
            border-top: 1px solid var(--gray-100);
        }

        .checklist-preview-label {
            font-size: 0.75rem;
            color: var(--gray-500);
            margin-bottom: 8px;
        }

        .checklist-mini-bar {
            height: 6px;
            background: var(--gray-200);
            border-radius: 3px;
            overflow: hidden;
        }

        .checklist-mini-fill {
            height: 100%;
            border-radius: 3px;
        }

        .checklist-mini-fill.completado { background: var(--success); }
        .checklist-mini-fill.en-proceso { background: var(--warning); }
        .checklist-mini-fill.por-iniciar { background: var(--gray-300); }

        .checklist-count {
            font-size: 0.75rem;
            color: var(--gray-500);
            text-align: right;
            margin-top: 4px;
        }

        /* Floating Action Button */
        .fab-container {
            position: fixed;
            bottom: 30px;
            left: 50%;
            transform: translateX(-50%);
            width: 100%;
            max-width: 728px;
            padding: 0 20px;
            z-index: 100;
        }

        .fab-btn {
            width: 100%;
            padding: 18px 32px;
            background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
            border: none;
            border-radius: var(--radius);
            color: var(--white);
            font-size: 1rem;
            font-weight: 600;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 12px;
            box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
            transition: all 0.3s;
        }

        .fab-btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 20px rgba(16, 185, 129, 0.5);
        }

        .fab-btn:disabled {
            background: var(--gray-300);
            box-shadow: none;
            cursor: not-allowed;
        }

        /* Responsive */
        @media (max-width: 480px) {
            .equipment-grid {
                grid-template-columns: 1fr;
            }

            .equipment-card-header {
                padding: 14px;
            }

            .equipment-icon {
                width: 44px;
                height: 44px;
                font-size: 1.1rem;
            }
        }
    </style>
</head>
<body>
    <div class="tablet-frame">
        <!-- Header -->
        <header class="compact-header">
            <div class="header-row">
                <a href="03-lista-vias.html" class="back-btn">
                    <i class="fas fa-arrow-left"></i>
                </a>
                <div class="header-title">
                    <h1>Equipos de la Vía</h1>
                    <p>Peaje Boliche</p>
                </div>
                <button class="header-btn">
                    <i class="fas fa-camera"></i>
                </button>
            </div>

            <div class="via-banner">
                <div class="via-banner-info">
                    <div class="via-banner-number">3</div>
                    <div class="via-banner-text">
                        <h3>Vía 3 - Carril Sur</h3>
                        <p>En proceso de mantenimiento</p>
                    </div>
                </div>
                <div class="via-banner-progress">
                    <div class="percentage">50%</div>
                    <div class="label">completado</div>
                </div>
            </div>
        </header>

        <!-- Main Content -->
        <main class="main-content">
            <div class="section-header">
                <h2 class="section-title">Equipos a Revisar</h2>
                <span class="section-badge">4 equipos</span>
            </div>

            <div class="equipment-grid">
                <!-- Equipo 1 - Completado -->
                <div class="equipment-card" onclick="location.href='05-checklist-equipo.html'">
                    <div class="equipment-card-header">
                        <div class="equipment-icon antena">
                            <i class="fas fa-wifi"></i>
                        </div>
                        <div class="equipment-info">
                            <div class="equipment-name">Antena RFID</div>
                            <div class="equipment-code">ANT-V3-001</div>
                        </div>
                    </div>
                    <div class="equipment-card-body">
                        <div class="equipment-status">
                            <div class="status-indicator">
                                <span class="status-dot completado"></span>
                                <span class="status-text">Completado</span>
                            </div>
                            <div class="status-action completado">
                                <i class="fas fa-check"></i>
                            </div>
                        </div>
                        <div class="checklist-preview">
                            <div class="checklist-preview-label">Checklist completado</div>
                            <div class="checklist-mini-bar">
                                <div class="checklist-mini-fill completado" style="width: 100%;"></div>
                            </div>
                            <div class="checklist-count">8/8 items</div>
                        </div>
                    </div>
                </div>

                <!-- Equipo 2 - Completado -->
                <div class="equipment-card" onclick="location.href='05-checklist-equipo.html'">
                    <div class="equipment-card-header">
                        <div class="equipment-icon sensor">
                            <i class="fas fa-tachometer-alt"></i>
                        </div>
                        <div class="equipment-info">
                            <div class="equipment-name">Sensor de Presión</div>
                            <div class="equipment-code">SEN-V3-002</div>
                        </div>
                    </div>
                    <div class="equipment-card-body">
                        <div class="equipment-status">
                            <div class="status-indicator">
                                <span class="status-dot completado"></span>
                                <span class="status-text">Completado</span>
                            </div>
                            <div class="status-action completado">
                                <i class="fas fa-check"></i>
                            </div>
                        </div>
                        <div class="checklist-preview">
                            <div class="checklist-preview-label">Checklist completado</div>
                            <div class="checklist-mini-bar">
                                <div class="checklist-mini-fill completado" style="width: 100%;"></div>
                            </div>
                            <div class="checklist-count">6/6 items</div>
                        </div>
                    </div>
                </div>

                <!-- Equipo 3 - En Proceso -->
                <div class="equipment-card" onclick="location.href='05-checklist-equipo.html'">
                    <div class="equipment-card-header">
                        <div class="equipment-icon camara">
                            <i class="fas fa-video"></i>
                        </div>
                        <div class="equipment-info">
                            <div class="equipment-name">Cámara LPR</div>
                            <div class="equipment-code">CAM-V3-003</div>
                        </div>
                    </div>
                    <div class="equipment-card-body">
                        <div class="equipment-status">
                            <div class="status-indicator">
                                <span class="status-dot en-proceso"></span>
                                <span class="status-text">En Proceso</span>
                            </div>
                            <div class="status-action en-proceso">
                                <i class="fas fa-play"></i>
                            </div>
                        </div>
                        <div class="checklist-preview">
                            <div class="checklist-preview-label">Checklist en progreso</div>
                            <div class="checklist-mini-bar">
                                <div class="checklist-mini-fill en-proceso" style="width: 40%;"></div>
                            </div>
                            <div class="checklist-count">4/10 items</div>
                        </div>
                    </div>
                </div>

                <!-- Equipo 4 - Por Iniciar -->
                <div class="equipment-card" onclick="location.href='05-checklist-equipo.html'">
                    <div class="equipment-card-header">
                        <div class="equipment-icon semaforo">
                            <i class="fas fa-traffic-light"></i>
                        </div>
                        <div class="equipment-info">
                            <div class="equipment-name">Semáforo LED</div>
                            <div class="equipment-code">SEM-V3-004</div>
                        </div>
                    </div>
                    <div class="equipment-card-body">
                        <div class="equipment-status">
                            <div class="status-indicator">
                                <span class="status-dot por-iniciar"></span>
                                <span class="status-text">Por Iniciar</span>
                            </div>
                            <div class="status-action por-iniciar">
                                <i class="fas fa-chevron-right"></i>
                            </div>
                        </div>
                        <div class="checklist-preview">
                            <div class="checklist-preview-label">Checklist pendiente</div>
                            <div class="checklist-mini-bar">
                                <div class="checklist-mini-fill por-iniciar" style="width: 0%;"></div>
                            </div>
                            <div class="checklist-count">0/5 items</div>
                        </div>
                    </div>
                </div>
            </div>
        </main>

        <!-- Floating Action Button -->
        <div class="fab-container">
            <button class="fab-btn" disabled>
                <i class="fas fa-check-circle"></i>
                Finalizar Vía (2/4 equipos)
            </button>
        </div>
    </div>
</body>
</html>
