@extends('layouts.app')

@section('title', 'Maintenance Report')

@section('content')
    <div class="mb-4 d-flex align-items-center gap-3">
        <a href="{{ route('reports.index') }}" class="btn btn-light btn-sm rounded-circle"><i class="bi bi-arrow-left"></i></a>
        <div>
            <h4 class="mb-0 fw-bold">Maintenance Intelligence & Reliability</h4>
            <p class="text-muted small mb-0">Asset uptime, service history, and reliability analytics.</p>
        </div>
    </div>

    <div class="row g-4 mb-4">
        <div class="col-md-3">
            <div class="card border-0 shadow-sm p-4 text-center h-100">
                <i class="bi bi-clock-history fs-3 text-primary mb-2"></i>
                <h6 class="text-muted small text-uppercase">Mean Time To Repair</h6>
                <h3 class="fw-bold">4.2 Hrs</h3>
            </div>
        </div>
        <div class="col-md-3">
            <div class="card border-0 shadow-sm p-4 text-center h-100">
                <i class="bi bi-gear-wide-connected fs-3 text-success mb-2"></i>
                <h6 class="text-muted small text-uppercase">Preventive vs Corrective</h6>
                <h3 class="fw-bold">82% / 18%</h3>
            </div>
        </div>
        <div class="col-md-3">
            <div class="card border-0 shadow-sm p-4 text-center h-100">
                <i class="bi bi-calendar-check fs-3 text-info mb-2"></i>
                <h6 class="text-muted small text-uppercase">Scheduled This Month</h6>
                <h3 class="fw-bold">24 Tasks</h3>
            </div>
        </div>
        <div class="col-md-3">
            <div class="card border-0 shadow-sm p-4 text-center h-100 bg-light">
                <i class="bi bi-exclamation-triangle fs-3 text-danger mb-2"></i>
                <h6 class="text-muted small text-uppercase">High Risk Assets</h6>
                <h3 class="fw-bold">3 Machines</h3>
            </div>
        </div>
    </div>

    <div class="card border-0 shadow-sm">
        <div class="card-header bg-white py-3 border-0">
            <h6 class="mb-0 fw-bold text-primary">Critical Asset Availability</h6>
        </div>
        <div class="card-body p-4 pt-0">
            <div class="row g-4">
                <div class="col-12">
                    <div class="d-flex justify-content-between mb-2">
                        <span class="fw-bold small text-muted">A1 Assembly Robot (Main Line)</span>
                        <span class="badge bg-success">99.9% Uptime</span>
                    </div>
                </div>
                <div class="col-12">
                    <div class="d-flex justify-content-between mb-2">
                        <span class="fw-bold small text-muted">B4 Industrial Oven (Bakery Unit)</span>
                        <span class="badge bg-warning text-dark">85.4% Uptime</span>
                    </div>
                </div>
            </div>
        </div>
    </div>
@endsection
