@tailwind base;
@tailwind components;
@tailwind utilities;

@layer base {
  body {
    @apply antialiased bg-slate-50 text-gray-900;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
  }
}

@layer components {
  /* Buttons */
  .btn-primary {
    @apply inline-flex items-center gap-2 bg-blue-600 text-white font-semibold text-sm px-4 py-2.5 rounded-xl hover:bg-blue-700 transition-colors shadow-sm;
  }
  .btn-secondary {
    @apply inline-flex items-center gap-2 border border-gray-200 text-gray-700 font-semibold text-sm px-4 py-2.5 rounded-xl hover:bg-gray-50 transition-colors;
  }
  .btn-danger {
    @apply inline-flex items-center gap-2 bg-red-50 text-red-600 font-semibold text-sm px-4 py-2.5 rounded-xl hover:bg-red-100 transition-colors;
  }

  /* Cards */
  .card {
    @apply bg-white rounded-2xl border border-gray-100 shadow-sm;
  }

  /* Table */
  .table-wrap {
    @apply overflow-x-auto rounded-2xl border border-gray-100 shadow-sm bg-white;
  }
  .table-wrap table {
    @apply w-full text-sm;
  }
  .table-wrap thead {
    @apply bg-slate-50 border-b border-gray-100;
  }
  .table-wrap th {
    @apply px-5 py-3.5 text-left text-xs font-semibold text-gray-500 uppercase tracking-wider whitespace-nowrap;
  }
  .table-wrap td {
    @apply px-5 py-3.5 text-gray-700;
  }
  .table-wrap tbody tr {
    @apply border-b border-gray-50 hover:bg-blue-50/40 transition-colors;
  }
  .table-wrap tbody tr:last-child {
    @apply border-b-0;
  }

  /* Badges */
  .badge {
    @apply inline-flex items-center text-xs font-semibold px-2.5 py-1 rounded-full;
  }
  .badge-green  { @apply bg-emerald-50 text-emerald-700 ring-1 ring-emerald-200/60; }
  .badge-red    { @apply bg-red-50 text-red-700 ring-1 ring-red-200/60; }
  .badge-blue   { @apply bg-blue-50 text-blue-700 ring-1 ring-blue-200/60; }
  .badge-yellow { @apply bg-amber-50 text-amber-700 ring-1 ring-amber-200/60; }
  .badge-gray   { @apply bg-gray-100 text-gray-600; }
  .badge-violet { @apply bg-violet-50 text-violet-700 ring-1 ring-violet-200/60; }

  /* Inputs */
  .input {
    @apply border border-gray-200 rounded-xl px-4 py-2.5 text-sm outline-none focus:border-blue-500 focus:ring-2 focus:ring-blue-100 transition-all bg-white placeholder:text-gray-400;
  }

  /* Pagination */
  .page-btn {
    @apply px-3 py-1.5 text-xs rounded-lg border border-gray-200 hover:bg-gray-50 disabled:opacity-40 transition-colors font-medium;
  }
  .page-btn.active {
    @apply bg-blue-600 text-white border-blue-600;
  }
}
