[Back]
<!DOCTYPE html>
<html>

<head>
    <title>Print Asset Report</title>
    <style>
            body {
            font-family: Arial, sans-serif;
            margin: 0;
            padding: 0;
            width: 100%;
            font-size: 8pt; /* Set global font size */
        }

        @page {
            size: A4;
            margin: 15mm; /* Set margins to ensure content fits well */
        }

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

        .logo {
            width: 80px; /* Adjust the logo size */
            height: auto;
        }

        h1 {
            text-align: center;
            font-size: 16pt; /* Set font size for the title */
            margin-bottom: 20px;
            flex: 1; /* Ensure the title takes available space */
        }

        table {
            width: 100%;
            border-collapse: collapse;
            table-layout: fixed; /* Ensures table columns are fixed and fit the page */
            margin: 20px 0;
        }

        th, td {
            border: 1px solid #ddd;
            padding: 5px; /* Adjust padding to fit more content */
            text-align: left;
            font-size: 8pt; /* Set font size for table content */
            word-wrap: break-word; /* Ensure long text in cells wraps */
        }

        th {
            background-color: #f2f2f2;
            text-align: center;
            font-size: 9pt; /* Set font size for header */
        }

        td {
            text-align: center;
        }

        /* Optional: Reduce the spacing for the table */
        tr {
            page-break-inside: avoid; /* Prevent page breaks inside the table */
        }
    </style>
</head>
<body>

 <header>
        <img src="{{ public_path('/images/care22.png') }}" alt="Company Logo" class="logo">
        <h1>{{ $title }}</h1>
        <br><br><br>
    </header>
    <h1></h1>
    <table>
        <thead>
            <tr>
                <th>ID</th>
                <th>Type</th>
                <th>Location</th>
                <th>Department</th>
                <th>Brand</th>
                <th>Model</th>
                <th>Asset Tag</th>
                <th>Serial No</th>
                <th>Status</th>
                <th>Remarks</th>
               
            </tr>
        </thead>
        <tbody>
            @foreach ($assets as $asset)
                <tr>
                    <td>{{ $asset->id }}</td>
                    <td>{{ $asset->type }}</td>
                    <td>{{ $asset->location }}</td>
                    <td>{{ $asset->dept }}</td>
                    <td>{{ $asset->brand }}</td>
                    <td>{{ $asset->model }}</td>
                    <td>{{ $asset->assetTag }}</td>
                    <td>{{ $asset->Serial_No }}</td>
                    <td>{{ $asset->status }}</td>
                    <td>{{ $asset->remarks }}</td>
                    
                </tr>
            @endforeach
        </tbody>
    </table>
</body>
</html>