{{-- Layout común para listados de catálogos --}}
@extends('layouts.app')

@section('breadcrumb')
<li class="breadcrumb-item"><a href="{{ route('web.catalogos.index') }}">Catálogos</a></li>
<li class="breadcrumb-item active">@yield('catalogo-nombre')</li>
@endsection

@push('styles')
<link href="{{ asset('assets/css/mantenimientos.css') }}" rel="stylesheet">
<style>
    .catalogo-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 1.5rem;
        gap: 1rem;
        flex-wrap: wrap;
    }

    .catalogo-title {
        display: flex;
        align-items: center;
        gap: 0.75rem;
    }

    .catalogo-title-icon {
        width: 42px;
        height: 42px;
        border-radius: 10px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1rem;
        color: #fff;
    }

    .catalogo-title h2 {
        margin: 0;
        font-size: 1.25rem;
        font-weight: 600;
        color: #1a3a5c;
    }

    .catalogo-table-container {
        background: #fff;
        border: 1px solid #e2e8f0;
        border-radius: 10px;
        overflow: hidden;
    }

    .catalogo-table {
        width: 100%;
        margin: 0;
        border-collapse: collapse;
    }

    .catalogo-table thead {
        background: #f8fafc;
    }

    .catalogo-table th {
        padding: 0.875rem 1rem;
        text-align: left;
        font-size: 0.75rem;
        font-weight: 600;
        color: #64748b;
        text-transform: uppercase;
        letter-spacing: 0.3px;
        border-bottom: 1px solid #e2e8f0;
    }

    .catalogo-table td {
        padding: 0.875rem 1rem;
        font-size: 0.9rem;
        color: #475569;
        border-bottom: 1px solid #f1f5f9;
        vertical-align: middle;
    }

    .catalogo-table tbody tr:hover {
        background: #fafbfc;
    }

    .catalogo-table tbody tr:last-child td {
        border-bottom: none;
    }

    .estado-badge {
        padding: 0.25rem 0.625rem;
        border-radius: 20px;
        font-size: 0.7rem;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.3px;
    }

    .estado-badge.activo {
        background: rgba(5, 150, 105, 0.1);
        color: #059669;
    }

    .estado-badge.inactivo {
        background: rgba(220, 38, 38, 0.1);
        color: #dc2626;
    }

    .color-preview {
        width: 24px;
        height: 24px;
        border-radius: 6px;
        display: inline-block;
        vertical-align: middle;
        border: 1px solid rgba(0,0,0,0.1);
    }

    .btn-action {
        padding: 0.375rem 0.625rem;
        font-size: 0.75rem;
        border-radius: 6px;
        text-decoration: none;
        display: inline-flex;
        align-items: center;
        gap: 0.25rem;
        transition: all 0.15s;
        border: 1px solid #e2e8f0;
        background: #fff;
        color: #64748b;
    }

    .btn-action:hover {
        background: #f8fafc;
        color: #1a3a5c;
        border-color: #cbd5e1;
    }

    .btn-action.editar:hover {
        background: rgba(59, 130, 246, 0.05);
        color: #2563eb;
        border-color: #3b82f6;
    }

    .actions-cell {
        display: flex;
        gap: 0.375rem;
        flex-wrap: wrap;
    }

    .empty-state {
        text-align: center;
        padding: 3rem 2rem;
        color: #94a3b8;
    }

    .empty-state i {
        font-size: 2.5rem;
        margin-bottom: 1rem;
        color: #e2e8f0;
    }

    .empty-state h4 {
        color: #64748b;
        margin-bottom: 0.5rem;
    }

    .catalogo-footer {
        padding: 1rem;
        border-top: 1px solid #e2e8f0;
        background: #fafbfc;
    }
</style>
@endpush
