<!DOCTYPE html>
<html lang="es">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=768, initial-scale=1.0">
    <title>App Mantenimiento - Detalle del Mantenimiento</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;
            display: flex;
            flex-direction: column;
        }

        /* Header con imagen de fondo */
        .detail-header {
            background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
            padding: 0;
            position: relative;
            min-height: 280px;
        }

        .header-nav {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 16px 20px;
            position: relative;
            z-index: 10;
        }

        .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;
            transition: all 0.2s;
            text-decoration: none;
        }

        .back-btn:hover {
            background: rgba(255,255,255,0.25);
        }

        .header-actions {
            display: flex;
            gap: 10px;
        }

        .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;
        }

        /* Peaje Info Card */
        .peaje-info {
            padding: 0 20px 30px;
            position: relative;
            z-index: 10;
        }

        .peaje-badge {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            background: rgba(245, 158, 11, 0.2);
            color: #fcd34d;
            padding: 8px 16px;
            border-radius: 20px;
            font-size: 0.8rem;
            font-weight: 600;
            margin-bottom: 16px;
        }

        .peaje-badge i {
            font-size: 0.7rem;
        }

        .peaje-name {
            font-size: 2rem;
            font-weight: 700;
            color: var(--white);
            margin-bottom: 8px;
        }

        .peaje-location {
            display: flex;
            align-items: center;
            gap: 8px;
            color: rgba(255,255,255,0.8);
            font-size: 0.95rem;
            margin-bottom: 20px;
        }

        .peaje-stats {
            display: flex;
            gap: 24px;
        }

        .peaje-stat {
            display: flex;
            align-items: center;
            gap: 8px;
            color: rgba(255,255,255,0.9);
            font-size: 0.9rem;
        }

        .peaje-stat i {
            color: rgba(255,255,255,0.6);
        }

        /* Main Content */
        .main-content {
            flex: 1;
            background: var(--gray-50);
            border-radius: 32px 32px 0 0;
            margin-top: -20px;
            padding: 28px 20px;
            position: relative;
        }

        /* Info Cards Grid */
        .info-grid {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 16px;
            margin-bottom: 28px;
        }

        .info-card {
            background: var(--white);
            border-radius: var(--radius);
            padding: 20px;
            box-shadow: var(--shadow-sm);
        }

        .info-card-icon {
            width: 48px;
            height: 48px;
            border-radius: var(--radius-sm);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.25rem;
            margin-bottom: 12px;
        }

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

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

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

        .info-card-icon.periodo {
            background: rgba(245, 158, 11, 0.1);
            color: #f59e0b;
        }

        .info-card-label {
            font-size: 0.8rem;
            color: var(--gray-500);
            margin-bottom: 4px;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }

        .info-card-value {
            font-size: 1.1rem;
            font-weight: 600;
            color: var(--gray-800);
        }

        /* Section */
        .section {
            margin-bottom: 28px;
        }

        .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);
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .section-title i {
            color: var(--primary);
        }

        /* Progress Overview */
        .progress-overview {
            background: var(--white);
            border-radius: var(--radius);
            padding: 24px;
            box-shadow: var(--shadow-sm);
        }

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

        .progress-title {
            font-size: 0.9rem;
            color: var(--gray-600);
        }

        .progress-percentage {
            font-size: 1.5rem;
            font-weight: 700;
            color: var(--primary);
        }

        .progress-bar-large {
            height: 12px;
            background: var(--gray-200);
            border-radius: 6px;
            overflow: hidden;
            margin-bottom: 20px;
        }

        .progress-fill-large {
            height: 100%;
            background: linear-gradient(90deg, var(--success) 0%, #34d399 100%);
            border-radius: 6px;
            transition: width 0.5s;
        }

        .progress-stats {
            display: flex;
            justify-content: space-between;
        }

        .progress-stat-item {
            text-align: center;
        }

        .progress-stat-value {
            font-size: 1.5rem;
            font-weight: 700;
            color: var(--gray-800);
        }

        .progress-stat-label {
            font-size: 0.8rem;
            color: var(--gray-500);
        }

        .progress-stat-item.completed .progress-stat-value {
            color: var(--success);
        }

        .progress-stat-item.in-progress .progress-stat-value {
            color: var(--warning);
        }

        .progress-stat-item.pending .progress-stat-value {
            color: var(--gray-400);
        }

        /* Observaciones */
        .obs-card {
            background: var(--white);
            border-radius: var(--radius);
            padding: 20px;
            box-shadow: var(--shadow-sm);
        }

        .obs-text {
            color: var(--gray-600);
            font-size: 0.95rem;
            line-height: 1.6;
        }

        /* Action Button */
        .action-container {
            padding: 20px;
            padding-bottom: calc(20px + env(safe-area-inset-bottom));
            background: var(--white);
            border-top: 1px solid var(--gray-200);
            position: sticky;
            bottom: 0;
        }

        .btn-primary-large {
            width: 100%;
            padding: 18px 32px;
            background: linear-gradient(135deg, var(--accent) 0%, #c2185b 100%);
            border: none;
            border-radius: var(--radius);
            color: var(--white);
            font-size: 1.1rem;
            font-weight: 600;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 12px;
            box-shadow: 0 4px 15px rgba(233, 30, 99, 0.35);
            transition: all 0.3s;
            text-decoration: none;
        }

        .btn-primary-large:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 20px rgba(233, 30, 99, 0.45);
        }

        .btn-primary-large i {
            font-size: 1.25rem;
        }

        /* Continuar Button (para cuando ya está en proceso) */
        .btn-continue {
            background: linear-gradient(135deg, var(--warning) 0%, #d97706 100%);
            box-shadow: 0 4px 15px rgba(245, 158, 11, 0.35);
        }

        .btn-continue:hover {
            box-shadow: 0 6px 20px rgba(245, 158, 11, 0.45);
        }

        /* Safe area */
        .content-safe-area {
            padding-bottom: 120px;
        }

        /* Responsive */
        @media (max-width: 480px) {
            .peaje-name {
                font-size: 1.5rem;
            }

            .info-grid {
                grid-template-columns: repeat(2, 1fr);
                gap: 12px;
            }

            .info-card {
                padding: 16px;
            }

            .info-card-icon {
                width: 40px;
                height: 40px;
                font-size: 1rem;
            }

            .progress-percentage {
                font-size: 1.25rem;
            }

            .progress-stat-value {
                font-size: 1.25rem;
            }
        }
    </style>
</head>
<body>
    <div class="tablet-frame">
        <!-- Header -->
        <header class="detail-header">
            <div class="header-nav">
                <a href="01-listado-mantenimientos.html" class="back-btn">
                    <i class="fas fa-arrow-left"></i>
                </a>
                <div class="header-actions">
                    <button class="header-btn">
                        <i class="fas fa-share-alt"></i>
                    </button>
                    <button class="header-btn">
                        <i class="fas fa-ellipsis-v"></i>
                    </button>
                </div>
            </div>

            <div class="peaje-info">
                <div class="peaje-badge">
                    <i class="fas fa-circle"></i>
                    En Proceso
                </div>
                <h1 class="peaje-name">Peaje Boliche</h1>
                <div class="peaje-location">
                    <i class="fas fa-map-marker-alt"></i>
                    Concesión Autopista del Sol • Guayaquil
                </div>
                <div class="peaje-stats">
                    <div class="peaje-stat">
                        <i class="fas fa-road"></i>
                        <span>6 Vías</span>
                    </div>
                    <div class="peaje-stat">
                        <i class="fas fa-microchip"></i>
                        <span>24 Equipos</span>
                    </div>
                </div>
            </div>
        </header>

        <!-- Main Content -->
        <main class="main-content content-safe-area">
            <!-- Info Grid -->
            <div class="info-grid">
                <div class="info-card">
                    <div class="info-card-icon date">
                        <i class="far fa-calendar-alt"></i>
                    </div>
                    <div class="info-card-label">Fecha Programada</div>
                    <div class="info-card-value">07 Feb 2026</div>
                </div>
                <div class="info-card">
                    <div class="info-card-icon time">
                        <i class="far fa-clock"></i>
                    </div>
                    <div class="info-card-label">Inicio Real</div>
                    <div class="info-card-value">08:30 AM</div>
                </div>
                <div class="info-card">
                    <div class="info-card-icon vias">
                        <i class="fas fa-road"></i>
                    </div>
                    <div class="info-card-label">Total Vías</div>
                    <div class="info-card-value">6 Vías</div>
                </div>
                <div class="info-card">
                    <div class="info-card-icon periodo">
                        <i class="fas fa-calendar-check"></i>
                    </div>
                    <div class="info-card-label">Período</div>
                    <div class="info-card-value">Febrero 2026</div>
                </div>
            </div>

            <!-- Progress Section -->
            <div class="section">
                <div class="section-header">
                    <h2 class="section-title">
                        <i class="fas fa-tasks"></i>
                        Progreso del Mantenimiento
                    </h2>
                </div>
                <div class="progress-overview">
                    <div class="progress-header">
                        <span class="progress-title">Avance total de vías</span>
                        <span class="progress-percentage">33%</span>
                    </div>
                    <div class="progress-bar-large">
                        <div class="progress-fill-large" style="width: 33%;"></div>
                    </div>
                    <div class="progress-stats">
                        <div class="progress-stat-item completed">
                            <div class="progress-stat-value">2</div>
                            <div class="progress-stat-label">Completadas</div>
                        </div>
                        <div class="progress-stat-item in-progress">
                            <div class="progress-stat-value">1</div>
                            <div class="progress-stat-label">En Proceso</div>
                        </div>
                        <div class="progress-stat-item pending">
                            <div class="progress-stat-value">3</div>
                            <div class="progress-stat-label">Por Iniciar</div>
                        </div>
                    </div>
                </div>
            </div>

            <!-- Observaciones -->
            <div class="section">
                <div class="section-header">
                    <h2 class="section-title">
                        <i class="fas fa-clipboard"></i>
                        Observaciones
                    </h2>
                </div>
                <div class="obs-card">
                    <p class="obs-text">
                        Mantenimiento preventivo programado para el mes de febrero.
                        Verificar estado de antenas RFID y sensores de presión en todas las vías.
                        Coordinar con el personal de la concesión para el acceso.
                    </p>
                </div>
            </div>
        </main>

        <!-- Action Button -->
        <div class="action-container">
            <a href="03-lista-vias.html" class="btn-primary-large btn-continue">
                <i class="fas fa-play-circle"></i>
                Continuar Mantenimiento
            </a>
        </div>
    </div>
</body>
</html>
