<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>Collateral Label — {{ $collateral->code }}</title>
<style>
body{font-family:Arial,sans-serif;margin:0;background:#f5f5f5;color:#111}.actions{max-width:520px;margin:14px auto;display:flex;justify-content:flex-end}.btn{border:1px solid #bbb;background:#fff;padding:8px 12px;cursor:pointer}.label{max-width:520px;margin:0 auto;background:#fff;border:2px solid #111;padding:20px;text-align:center}.code{font-size:22px;font-weight:700;letter-spacing:.04em}.meta{font-size:12px;color:#555;margin-top:5px}.barcode{margin:15px auto 8px;max-width:470px}.item{font-size:15px;font-weight:700;margin-top:8px}@media print{body{background:#fff}.actions{display:none}.label{margin:0;border:2px solid #000;max-width:none;width:92mm;box-sizing:border-box;padding:8mm}}
</style>
</head>
<body>
<div class="actions"><button class="btn" onclick="window.print()">Print label</button></div>
<main class="label">
<div class="code">{{ $collateral->code }}</div>
<div class="barcode">{!! $barcodeSvg !!}</div>
<div class="item">{{ $collateral->item }}</div>
<div class="meta">{{ $collateral->customer->full_name }} · {{ $collateral->branch->name }}</div>
<div class="meta">Store: {{ collect([$collateral->store_room,$collateral->shelf])->filter()->join(' → ') ?: 'Not assigned' }}</div>
</main>
</body>
</html>
