<script setup>
import AppLayout from '@/Layouts/AppLayout.vue';
import { ref, computed } from 'vue';
import { useForm, router, Head } from '@inertiajs/vue3';

const props = defineProps({
  title: String,
  proveedores: { type: Array, default: () => [] },
  aseguradoras: { type: Array, default: () => [] },
  filters: { type: Object, default: () => ({}) },
});

const showModal = ref(false);
const editingId = ref(null);
const search = ref(props.filters.search || '');

const form = useForm({
  tenant_id: '',
  ruc: '',
  razon_social: '',
  tipo: 'dealer',
  contacto: '',
  telefono: '',
  email: '',
  activo: true,
  ejecutivos: [],
});

function openCreate() {
  form.reset();
  form.ejecutivos = [{ nombre: '', cargo: '', telefono: '', email: '' }];
  editingId.value = null;
  showModal.value = true;
}

function openEdit(p) {
  editingId.value = p.id;
  form.tenant_id = p.tenant_id;
  form.ruc = p.ruc;
  form.razon_social = p.razon_social;
  form.tipo = p.tipo;
  form.contacto = p.contacto || '';
  form.telefono = p.telefono || '';
  form.email = p.email || '';
  form.activo = p.activo;
  form.ejecutivos = (p.ejecutivos && p.ejecutivos.length)
    ? p.ejecutivos.map(e => ({ id: e.id, nombre: e.nombre, cargo: e.cargo || '', telefono: e.telefono || '', email: e.email || '' }))
    : [{ nombre: '', cargo: '', telefono: '', email: '' }];
  showModal.value = true;
}

function addEjecutivo() {
  form.ejecutivos.push({ nombre: '', cargo: '', telefono: '', email: '' });
}

function removeEjecutivo(index) {
  form.ejecutivos.splice(index, 1);
}

function submit() {
  if (editingId.value) {
    form.put(route('proveedores.update', editingId.value), {
      onSuccess: () => { showModal.value = false; },
    });
  } else {
    form.post(route('proveedores.store'), {
      onSuccess: () => { showModal.value = false; },
    });
  }
}

function destroy(id) {
  if (confirm('¿Está seguro de eliminar este proveedor?')) {
    router.delete(route('proveedores.destroy', id));
  }
}

function doSearch() {
  router.get(route('proveedores.index'), { search: search.value }, { preserveState: true });
}

// Stats
const totalProveedores = computed(() => props.proveedores.length);
</script>

<template>
  <Head :title="title" />

  <AppLayout :title="title">
    <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8">
      <!-- Header Premium -->
      <div class="mb-10 flex flex-col md:flex-row md:items-end justify-between gap-6">
        <div>
          <span class="text-xs font-bold uppercase tracking-widest text-primary-600 mb-2 block">Cadena de Suministro</span>
          <h1 class="text-4xl font-extrabold text-slate-900 tracking-tight uppercase">Proveedores <span class="text-slate-400 font-light italic">de Repuestos</span></h1>
          <p class="text-slate-500 mt-2 max-w-xl italic">Homologación de importadores y distribuidores locales para el abastecimiento de piezas en la red nacional.</p>
        </div>

        <button @click="openCreate" class="group relative px-8 py-3 bg-slate-900 text-white rounded-2xl font-black uppercase text-[10px] tracking-widest overflow-hidden transition-all hover:pr-12 shadow-xl shadow-slate-200">
            <span class="relative z-10">Nuevo Proveedor</span>
            <svg class="absolute right-4 top-1/2 -translate-y-1/2 w-5 h-5 opacity-0 group-hover:opacity-100 transition-all text-primary-400" fill="none" stroke="currentColor" viewBox="0 0 24 24">
                <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 4v16m8-8H4" />
            </svg>
        </button>
      </div>

      <!-- Filters & Search -->
      <div class="flex flex-col md:flex-row items-center gap-4 mb-8 bg-slate-50/50 p-4 rounded-3xl border border-slate-100 backdrop-blur-sm">
        <div class="relative flex-1 group">
          <input 
            v-model="search" 
            @keyup.enter="doSearch"
            type="text" 
            placeholder="Filtrar por Razón Social, RUC o Código de Sistema..."
            class="w-full pl-12 pr-4 py-3 bg-white border-transparent rounded-[1.25rem] text-sm font-medium focus:ring-2 focus:ring-primary-500 focus:bg-white transition-all shadow-sm"
          />
          <svg class="absolute left-4 top-1/2 -translate-y-1/2 w-5 h-5 text-slate-300 transition-colors group-focus-within:text-primary-500" fill="none" stroke="currentColor" viewBox="0 0 24 24">
            <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z" />
          </svg>
        </div>
        
        <button @click="doSearch" class="px-8 py-3 bg-slate-800 text-white rounded-[1.25rem] text-xs font-black uppercase tracking-widest hover:bg-slate-900 transition-all transform active:scale-95 shadow-lg shadow-slate-200">Refrescar Red</button>
      </div>

      <!-- Main Layout -->
      <div class="bg-white rounded-[2.5rem] border border-slate-100 shadow-2xl overflow-hidden glass-morphism hidden md:block">
        <table class="w-full text-left border-collapse">
          <thead>
            <tr class="bg-slate-50/70 backdrop-blur-md">
              <th class="px-8 py-5 text-[10px] font-black text-slate-400 uppercase tracking-widest border-b border-slate-100 italic uppercase">Proveedor / Entidad</th>
              <th class="px-8 py-5 text-[10px] font-black text-slate-400 uppercase tracking-widest border-b border-slate-100 italic uppercase">Tipo / Clasificación</th>
              <th class="px-8 py-5 text-[10px] font-black text-slate-400 uppercase tracking-widest border-b border-slate-100 italic uppercase">Ejecutivos Asignados</th>
              <th class="px-8 py-5 text-[10px] font-black text-slate-400 uppercase tracking-widest border-b border-slate-100 italic uppercase">Estatus Operativo</th>
              <th class="px-8 py-5 text-[10px] font-black text-slate-400 uppercase tracking-widest border-b border-slate-100 text-center italic uppercase">Gestión</th>
            </tr>
          </thead>
          <tbody class="divide-y divide-slate-50">
            <tr v-for="p in proveedores" :key="p.id" class="group hover:bg-primary-50/20 transition-all duration-300">
              <td class="px-8 py-6">
                <div class="flex items-center gap-4">
                    <div class="w-12 h-12 rounded-[1.25rem] bg-slate-50 border border-slate-100 flex items-center justify-center text-slate-400 group-hover:bg-slate-900 group-hover:text-white transition-all duration-500 group-hover:rotate-6 shadow-sm group-hover:shadow-xl">
                        <svg class="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M20 7l-8-4-8 4m16 0l-8 4m8-4v10l-8 4m0-10L4 7m8 4v10M4 7v10l8 4" /></svg>
                    </div>
                    <div>
                        <p class="font-black text-slate-900 tracking-tight text-lg leading-none uppercase">{{ p.razon_social }}</p>
                        <p class="text-[10px] text-slate-400 mt-2 font-mono font-black uppercase tracking-widest">{{ p.ruc }}</p>
                    </div>
                </div>
              </td>
              <td class="px-8 py-6">
                <span :class="p.tipo === 'dealer' ? 'bg-indigo-50 text-indigo-700' : 'bg-amber-50 text-amber-700'" class="px-3 py-1 rounded-full text-[9px] font-black uppercase tracking-widest shadow-sm">
                    {{ p.tipo === 'dealer' ? 'Distribuidor Oficial' : 'Multimarca' }}
                </span>
                <p class="text-[9px] text-slate-400 mt-2 font-bold uppercase tracking-tighter">{{ p.codigo_sistema }}</p>
              </td>
              <td class="px-8 py-6">
                <div v-if="p.ejecutivos && p.ejecutivos.length" class="flex flex-wrap gap-1 max-w-[200px]">
                    <span v-for="e in p.ejecutivos" :key="e.id" class="text-[9px] font-bold text-slate-600 bg-white border border-slate-100 px-2 py-0.5 rounded-lg shadow-sm">
                        {{ e.nombre }}
                    </span>
                </div>
                <span v-else class="text-[10px] text-slate-300 font-bold uppercase italic tracking-widest">Sin ejecutivos</span>
              </td>
              <td class="px-8 py-6">
                <div class="flex items-center gap-2">
                    <span :class="p.activo ? 'bg-emerald-500 shadow-emerald-200' : 'bg-rose-500 shadow-rose-200'" class="w-2 h-2 rounded-full shadow-lg animate-pulse"></span>
                    <span :class="p.activo ? 'text-emerald-700' : 'text-rose-700'" class="text-[10px] font-black uppercase tracking-widest italic">
                        {{ p.activo ? 'Homologado' : 'Suspendido' }}
                    </span>
                </div>
              </td>
              <td class="px-8 py-6 text-center">
                <div class="flex items-center justify-center gap-3 transform transition-all group-hover:translate-x-0 translate-x-4 opacity-0 group-hover:opacity-100">
                    <button @click="openEdit(p)" class="p-2.5 bg-white border border-slate-100 text-slate-600 rounded-2xl hover:bg-primary-600 hover:text-white hover:border-primary-600 transition-all duration-300 shadow-sm hover:shadow-lg">
                        <svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15.232 5.232l3.536 3.536m-2.036-5.036a2.5 2.5 0 113.536 3.536L6.5 21.036H3v-3.572L16.732 3.732z"/></svg>
                    </button>
                    <button @click="destroy(p.id)" class="p-2.5 bg-white border border-slate-100 text-rose-600 rounded-2xl hover:bg-rose-600 hover:text-white hover:border-rose-600 transition-all duration-300 shadow-sm hover:shadow-lg">
                        <svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"/></svg>
                    </button>
                </div>
              </td>
            </tr>
            <tr v-if="!proveedores.length">
                <td colspan="5" class="py-24 text-center">
                    <div class="w-24 h-24 bg-slate-50/50 rounded-full flex items-center justify-center mx-auto mb-6 border-2 border-dashed border-slate-200 transform transition-transform hover:rotate-12">
                        <svg class="w-12 h-12 text-slate-200" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 21V5a2 2 0 00-2-2H7a2 2 0 00-2 2v16m14 0h2m-2 0h-5m-9 0H3m2 0h5M9 7h1m-1 4h1m4-4h1m-1 4h1m-5 10v-5a1 1 0 011-1h2a1 1 0 011 1v5m-4 0h4" /></svg>
                    </div>
                    <p class="text-xs font-black text-slate-400 uppercase tracking-widest italic leading-relaxed">No se han homologado proveedores en este canal de suministro.</p>
                </td>
            </tr>
          </tbody>
        </table>
      </div>

      <!-- Mobile Cards -->
      <div class="md:hidden space-y-3">
        <template v-if="proveedores.length > 0">
          <div v-for="p in proveedores" :key="p.id" class="bg-white rounded-2xl border border-slate-100 shadow-sm p-4 space-y-3">
            <div class="flex items-center gap-3">
              <div class="w-10 h-10 rounded-xl bg-slate-50 border border-slate-100 flex items-center justify-center text-slate-400 flex-shrink-0">
                <svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M20 7l-8-4-8 4m16 0l-8 4m8-4v10l-8 4m0-10L4 7m8 4v10M4 7v10l8 4" /></svg>
              </div>
              <div class="min-w-0 flex-1">
                <p class="font-bold text-slate-900 text-sm truncate uppercase">{{ p.razon_social }}</p>
                <p class="text-[10px] text-slate-400 font-mono font-bold">{{ p.ruc }}</p>
              </div>
              <div class="flex items-center gap-1.5 flex-shrink-0">
                <span :class="p.activo ? 'bg-emerald-500' : 'bg-rose-500'" class="w-2 h-2 rounded-full"></span>
                <span :class="p.activo ? 'text-emerald-700' : 'text-rose-700'" class="text-[9px] font-bold uppercase">{{ p.activo ? 'Activo' : 'Inactivo' }}</span>
              </div>
            </div>
            <div class="flex items-center gap-2">
              <span :class="p.tipo === 'dealer' ? 'bg-indigo-50 text-indigo-700' : 'bg-amber-50 text-amber-700'" class="px-2 py-0.5 rounded-full text-[9px] font-bold uppercase">
                {{ p.tipo === 'dealer' ? 'Distribuidor Oficial' : 'Multimarca' }}
              </span>
              <span class="text-[9px] text-slate-400 font-bold">{{ p.codigo_sistema }}</span>
            </div>
            <div v-if="p.ejecutivos && p.ejecutivos.length" class="flex flex-wrap gap-1">
              <span v-for="e in p.ejecutivos" :key="e.id" class="text-[9px] font-bold text-slate-600 bg-white border border-slate-100 px-2 py-0.5 rounded-lg">
                {{ e.nombre }}
              </span>
            </div>
            <span v-else class="text-[10px] text-slate-300 font-bold italic">Sin ejecutivos</span>
            <div class="flex items-center justify-end gap-2 pt-2 border-t border-slate-50">
              <button @click="openEdit(p)" class="p-2 bg-white border border-slate-100 text-slate-600 rounded-xl hover:bg-primary-600 hover:text-white transition-all">
                <svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15.232 5.232l3.536 3.536m-2.036-5.036a2.5 2.5 0 113.536 3.536L6.5 21.036H3v-3.572L16.732 3.732z"/></svg>
              </button>
              <button @click="destroy(p.id)" class="p-2 bg-white border border-slate-100 text-rose-600 rounded-xl hover:bg-rose-600 hover:text-white transition-all">
                <svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"/></svg>
              </button>
            </div>
          </div>
        </template>
        <div v-else class="bg-white rounded-2xl border border-slate-100 shadow-sm p-8 text-center">
          <p class="text-slate-400 font-medium">No hay proveedores registrados.</p>
        </div>
      </div>

      <!-- Pagination Placeholder -->
      <div class="mt-8 flex justify-between items-center px-8">
        <p class="text-[10px] font-black text-slate-400 uppercase tracking-[0.2em] italic uppercase">Red de Suministro: {{ totalProveedores }} Entidades Homologadas</p>
      </div>
    </div>

    <!-- Modal Premium -->
    <div v-if="showModal" class="fixed inset-0 z-[100] overflow-y-auto">
        <div class="flex items-center justify-center min-h-screen px-4 py-8">
            <div @click="showModal = false" class="fixed inset-0 bg-slate-900/70 backdrop-blur-xl transition-opacity duration-500"></div>
            
            <div class="relative bg-white w-full max-w-3xl rounded-[3.5rem] shadow-2xl overflow-hidden glass-morphism border border-white/40">
                <div class="px-12 py-10 border-b border-slate-50 flex items-center justify-between bg-white/40 backdrop-blur-md">
                    <div>
                        <h3 class="text-3xl font-black text-slate-900 tracking-tighter uppercase">{{ editingId ? 'Actualizar' : 'Homologar' }} Proveedor</h3>
                        <p class="text-[10px] text-slate-400 font-black uppercase tracking-[0.2em] mt-1 italic italic">Registro y configuración de cadena de suministros</p>
                    </div>
                    <button @click="showModal = false" class="w-12 h-12 rounded-2xl bg-white shadow-xl flex items-center justify-center text-slate-400 hover:text-slate-900 transition-all hover:rotate-90">✕</button>
                </div>

                <form @submit.prevent="submit" class="p-12 space-y-10">
                    <div class="grid grid-cols-1 md:grid-cols-2 gap-12">
                        <!-- Left: Main Info -->
                        <div class="space-y-6">
                            <h4 class="text-[10px] font-black text-primary-600 uppercase tracking-[0.3em] flex items-center gap-2 italic">
                                <span class="w-4 h-px bg-primary-600"></span> Datos de Facturación
                            </h4>
                            
                            <div>
                                <label class="text-[10px] font-black uppercase text-slate-400 mb-2 block tracking-widest italic">Aseguradora Sede *</label>
                                <select v-model="form.tenant_id" class="w-full px-6 py-4 bg-slate-50 border-transparent rounded-[1.5rem] text-xs font-bold focus:ring-2 focus:ring-primary-500 focus:bg-white transition-all uppercase" required>
                                    <option value="" disabled>SELECCIONAR CANAL...</option>
                                    <option v-for="a in aseguradoras" :key="a.id" :value="a.id">{{ a.nombre }}</option>
                                </select>
                            </div>

                            <div>
                                <label class="text-[10px] font-black uppercase text-slate-400 mb-2 block tracking-widest italic">Razón Social *</label>
                                <input v-model="form.razon_social" type="text" class="w-full px-6 py-4 bg-slate-50 border-transparent rounded-[1.5rem] text-sm font-bold focus:ring-2 focus:ring-primary-500 focus:bg-white transition-all uppercase" required />
                            </div>

                            <div class="grid grid-cols-2 gap-4">
                                <div>
                                    <label class="text-[10px] font-black uppercase text-slate-400 mb-2 block tracking-widest italic">RUC *</label>
                                    <input v-model="form.ruc" type="text" maxlength="13" class="w-full px-6 py-4 bg-slate-50 border-transparent rounded-[1.5rem] text-sm font-mono font-black focus:ring-2 focus:ring-primary-500 focus:bg-white transition-all" required />
                                </div>
                                <div>
                                    <label class="text-[10px] font-black uppercase text-slate-400 mb-2 block tracking-widest italic">Clasificación *</label>
                                    <select v-model="form.tipo" class="w-full px-6 py-4 bg-slate-50 border-transparent rounded-[1.5rem] text-xs font-bold focus:ring-2 focus:ring-primary-500 focus:bg-white transition-all uppercase" required>
                                        <option value="dealer">Distribuidor Oficial</option>
                                        <option value="multimarca">Multimarca</option>
                                    </select>
                                </div>
                            </div>

                            <div class="grid grid-cols-2 gap-4">
                                <div>
                                    <label class="text-[10px] font-black uppercase text-slate-400 mb-2 block tracking-widest italic">Email Base</label>
                                    <input v-model="form.email" type="email" class="w-full px-6 py-4 bg-slate-50 border-transparent rounded-[1.5rem] text-xs font-bold focus:ring-2 focus:ring-primary-500 focus:bg-white transition-all lowercase italic" />
                                </div>
                                <div>
                                    <label class="text-[10px] font-black uppercase text-slate-400 mb-2 block tracking-widest italic">Teléfono Matriz</label>
                                    <input v-model="form.telefono" type="text" class="w-full px-6 py-4 bg-slate-50 border-transparent rounded-[1.5rem] text-xs font-bold focus:ring-2 focus:ring-primary-500 focus:bg-white transition-all" />
                                </div>
                            </div>
                        </div>

                        <!-- Right: Executives -->
                        <div class="space-y-6">
                            <div class="flex items-center justify-between mb-4">
                                <h4 class="text-[10px] font-black text-primary-600 uppercase tracking-[0.3em] flex items-center gap-2 italic">
                                    <span class="w-4 h-px bg-primary-600"></span> Ejecutivos de Cuenta
                                </h4>
                                <button type="button" @click="addEjecutivo" class="text-[9px] font-black uppercase text-primary-600 bg-primary-50 px-3 py-1.5 rounded-xl hover:bg-primary-500 hover:text-white transition-all shadow-sm">+ Adicionar</button>
                            </div>
                            
                            <div class="space-y-4 max-h-[300px] overflow-y-auto pr-2 custom-scrollbar">
                                <div v-for="(ej, i) in form.ejecutivos" :key="i" class="p-6 bg-slate-50 border border-slate-100 rounded-[2rem] relative group/item">
                                    <button v-if="form.ejecutivos.length > 1" type="button" @click="removeEjecutivo(i)" class="absolute -top-2 -right-2 w-8 h-8 bg-white text-rose-500 rounded-full shadow-lg border border-rose-50 flex items-center justify-center text-xs opacity-0 group-hover/item:opacity-100 transition-opacity transform hover:scale-110">✕</button>
                                    
                                    <div class="space-y-4">
                                        <div class="grid grid-cols-2 gap-3">
                                            <input v-model="ej.nombre" type="text" placeholder="NOMBRE COMPLETO" class="w-full px-4 py-3 bg-white border-transparent rounded-xl text-[10px] font-black uppercase focus:ring-2 focus:ring-primary-500" required />
                                            <input v-model="ej.cargo" type="text" placeholder="CARGO / POSICIÓN" class="w-full px-4 py-3 bg-white border-transparent rounded-xl text-[10px] font-black uppercase focus:ring-2 focus:ring-primary-500" />
                                        </div>
                                        <div class="grid grid-cols-2 gap-3">
                                            <input v-model="ej.telefono" type="text" placeholder="CONTACTO" class="w-full px-4 py-3 bg-white border-transparent rounded-xl text-[10px] font-black focus:ring-2 focus:ring-primary-500" />
                                            <input v-model="ej.email" type="email" placeholder="EMAIL DIRECTO" class="w-full px-4 py-3 bg-white border-transparent rounded-xl text-[10px] font-black lowercase focus:ring-2 focus:ring-primary-500" />
                                        </div>
                                    </div>
                                </div>
                            </div>

                            <div v-if="editingId" class="pt-6 border-t border-slate-50">
                                <label class="flex items-center gap-3 cursor-pointer group w-fit">
                                    <div class="relative w-12 h-6 bg-slate-100 rounded-full transition-colors group-hover:bg-slate-200">
                                        <input v-model="form.activo" type="checkbox" class="absolute inset-0 opacity-0 cursor-pointer z-10" />
                                        <div :class="form.activo ? 'translate-x-6 bg-emerald-500 shadow-emerald-200' : 'translate-x-0 bg-slate-400 shadow-slate-200'" class="w-6 h-6 rounded-full transition-all duration-300 shadow-md transform"></div>
                                    </div>
                                    <span class="text-[10px] font-black uppercase text-slate-600 tracking-widest italic">Homologación Vigente</span>
                                </label>
                            </div>
                        </div>
                    </div>

                    <div class="flex justify-end gap-6 pt-10 border-t border-slate-50">
                        <button type="button" @click="showModal = false" class="px-8 py-4 text-xs font-black text-slate-400 uppercase tracking-[0.2em] hover:text-slate-900 transition-colors italic">Descartar Proceso</button>
                        <button type="submit" :disabled="form.processing" class="px-16 py-4 bg-slate-900 text-white rounded-[1.5rem] font-black uppercase text-[10px] tracking-[0.2em] hover:bg-primary-600 hover:shadow-2xl hover:shadow-primary-200 disabled:opacity-50 transition-all active:scale-95 transform">
                            {{ form.processing ? 'Vinculando...' : (editingId ? 'Confirmar Homologación' : 'Finalizar Alta') }}
                        </button>
                    </div>
                </form>
            </div>
        </div>
    </div>
  </AppLayout>
</template>

<style scoped>
.glass-morphism {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
}

.custom-scrollbar::-webkit-scrollbar {
    width: 4px;
}
.custom-scrollbar::-webkit-scrollbar-track {
    background: #f8fafc;
    border-radius: 10px;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
    background: #e2e8f0;
    border-radius: 10px;
}
</style>

