<!DOCTYPE html>
<html lang="es">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Aprobación de Compra</title>
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: 'Segoe UI', system-ui, sans-serif;
            background: #f0f2f5;
            min-height: 100vh;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .card {
            background: #fff;
            max-width: 500px;
            width: 90%;
            padding: 2.5rem;
            box-shadow: 0 4px 24px rgba(0, 0, 0, .08);
        }

        .logo {
            text-align: center;
            margin-bottom: 1.5rem;
            font-size: 1.2rem;
            font-weight: 700;
            color: #1a365d;
            text-transform: uppercase;
            letter-spacing: 2px;
        }

        h1 {
            font-size: 1.3rem;
            color: #1a365d;
            margin-bottom: 1rem;
        }

        .info {
            background: #f7fafc;
            padding: 1rem;
            margin-bottom: 1.5rem;
            border-left: 3px solid #3182ce;
        }

        .info p {
            margin: .25rem 0;
            color: #4a5568;
            font-size: .9rem;
        }

        .info strong {
            color: #2d3748;
        }

        .question {
            font-size: 1rem;
            color: #2d3748;
            margin-bottom: 1.5rem;
            font-weight: 600;
        }

        .buttons {
            display: flex;
            gap: 1rem;
        }

        .btn {
            flex: 1;
            padding: .8rem 1.5rem;
            border: none;
            font-size: 1rem;
            font-weight: 600;
            cursor: pointer;
            text-transform: uppercase;
            letter-spacing: .5px;
            transition: all .2s;
        }

        .btn-accept {
            background: #38a169;
            color: #fff;
        }

        .btn-accept:hover {
            background: #2f855a;
        }

        .btn-reject {
            background: #e53e3e;
            color: #fff;
        }

        .btn-reject:hover {
            background: #c53030;
        }
    </style>
</head>

<body>
    <div class="card">
        <div class="logo">Sistema Ajuste Siniestros</div>
        <h1>Solicitud de Aprobación de Importación</h1>
        <div class="info">
            <p><strong>Caso:</strong> {{ $caso->numero_reclamo ?? $caso->id }}</p>
            <p><strong>Vehículo:</strong> {{ $caso->vehiculo?->marca }} {{ $caso->vehiculo?->modelo }} —
                {{ $caso->vehiculo?->placa }}</p>
            <p><strong>Aseguradora:</strong> {{ $caso->aseguradora?->nombre ?? 'N/A' }}</p>
        </div>
        <p class="question">¿Acepta la importación de repuestos para este caso?</p>
        <div class="buttons">
            <form method="POST" action="{{ route('aprobacion.responder', $token) }}" style="flex:1;display:flex;">
                @csrf
                <input type="hidden" name="decision" value="aceptado">
                <button type="submit" class="btn btn-accept" style="width:100%;">✓ Aceptar</button>
            </form>
            <form method="POST" action="{{ route('aprobacion.responder', $token) }}" style="flex:1;display:flex;">
                @csrf
                <input type="hidden" name="decision" value="rechazado">
                <button type="submit" class="btn btn-reject" style="width:100%;">✗ Rechazar</button>
            </form>
        </div>
    </div>
</body>

</html>