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

@layer components {
    .btn {
        @apply inline-flex items-center justify-center px-4 py-2 text-sm font-medium rounded-lg transition-colors duration-150 focus:outline-none focus:ring-2 focus:ring-offset-2;
    }

    .btn-primary {
        @apply bg-primary-600 text-white hover:bg-primary-700 focus:ring-primary-500;
    }

    .btn-secondary {
        @apply bg-gray-100 text-gray-700 hover:bg-gray-200 focus:ring-gray-500;
    }

    .btn-danger {
        @apply bg-red-600 text-white hover:bg-red-700 focus:ring-red-500;
    }

    .btn-success {
        @apply bg-green-600 text-white hover:bg-green-700 focus:ring-green-500;
    }

    .input {
        @apply block w-full rounded-lg border-gray-300 shadow-sm focus:border-primary-500 focus:ring-primary-500 text-sm;
    }

    .input-error {
        @apply border-red-300 focus:border-red-500 focus:ring-red-500;
    }

    .label {
        @apply block text-sm font-medium text-gray-700 mb-1;
    }

    .card {
        @apply bg-white rounded-xl shadow-sm border border-gray-200;
    }

    .card-header {
        @apply px-6 py-4 border-b border-gray-200;
    }

    .card-body {
        @apply p-6;
    }

    .badge {
        @apply inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium;
    }

    .badge-success {
        @apply bg-green-100 text-green-800;
    }

    .badge-danger {
        @apply bg-red-100 text-red-800;
    }

    .badge-warning {
        @apply bg-yellow-100 text-yellow-800;
    }

    .badge-info {
        @apply bg-blue-100 text-blue-800;
    }

    .badge-gray {
        @apply bg-gray-100 text-gray-800;
    }

    .table-container {
        @apply overflow-x-auto;
    }

    .table {
        @apply min-w-full divide-y divide-gray-200;
    }

    .table th {
        @apply px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider bg-gray-50;
    }

    .table td {
        @apply px-6 py-4 whitespace-nowrap text-sm text-gray-900;
    }

    .table tbody tr {
        @apply hover:bg-gray-50;
    }

    .sidebar-link {
        @apply flex items-center gap-3 px-3 py-2 text-sm font-medium rounded-lg transition-colors duration-150;
    }

    .sidebar-link-active {
        @apply bg-primary-50 text-primary-700;
    }

    .sidebar-link-inactive {
        @apply text-gray-600 hover:bg-gray-50 hover:text-gray-900;
    }
}
