@extends('layouts.admin')
@section('title', 'Custom Quote Requests')
@section('page-title', 'Custom Quotes')

@section('content')
<div class="glass-card">
    <div class="section-header">
        <div class="section-title">Custom Quote Requests</div>
        <span style="font-family:'JetBrains Mono',monospace;font-size:10px;color:var(--muted);">{{ $quotes->total() }} TOTAL</span>
    </div>
    <table class="data-table">
        <thead>
            <tr>
                <th>Name</th>
                <th>Email</th>
                <th>Phone</th>
                <th>Specs Preview</th>
                <th>Attachment</th>
                <th>Date</th>
                <th></th>
            </tr>
        </thead>
        <tbody>
            @forelse($quotes as $quote)
            <tr>
                <td style="font-weight:500;color:var(--text);">{{ $quote->full_name }}</td>
                <td style="color:#ef4444;font-size:12px;">{{ $quote->email }}</td>
                <td style="color:var(--muted);font-size:12px;" class="mono">{{ $quote->phone }}</td>
                <td style="color:var(--muted);font-size:12px;">{{ Str::limit($quote->specifications, 50) }}</td>
                <td>
                    @if($quote->attachment_path)
                        <span style="background:rgba(99,102,241,0.12);color:#a5b4fc;border:1px solid rgba(99,102,241,0.2);padding:2px 8px;border-radius:12px;font-size:10px;font-family:'JetBrains Mono',monospace;">ATTACHED</span>
                    @else
                        <span style="color:var(--muted);font-size:12px;">—</span>
                    @endif
                </td>
                <td style="color:var(--muted);font-size:12px;" class="mono">{{ $quote->created_at->format('M j, Y') }}</td>
                <td style="text-align:right;"><a href="{{ route('admin.quotes.show', $quote) }}" class="link-red">OPEN →</a></td>
            </tr>
            @empty
            <tr><td colspan="7" style="padding:48px;text-align:center;color:var(--muted);font-family:'JetBrains Mono',monospace;font-size:12px;letter-spacing:2px;">NO QUOTE REQUESTS YET</td></tr>
            @endforelse
        </tbody>
    </table>
    @if($quotes->hasPages())
    <div style="padding:16px 20px;border-top:1px solid var(--border);">{{ $quotes->links() }}</div>
    @endif
</div>
@endsection
