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

@layer base {
  /* Light mode base styles (default) */
  html, body {
    @apply bg-white text-gray-900;
  }

  /* Dark mode base styles */
  html.dark, html.dark body {
    @apply bg-dark text-gray-100;
  }

  /* Form elements - light mode */
  input, textarea, select {
    @apply bg-gray-50 border-gray-300 text-gray-900 placeholder-gray-400;
  }

  /* Form elements - dark mode */
  html.dark input, html.dark textarea, html.dark select {
    @apply bg-dark-200 border-dark-50 text-gray-100 placeholder-gray-500;
  }

  input:focus, textarea:focus, select:focus {
    @apply ring-primary-500 border-primary-500;
  }

  /* Labels - light mode */
  label {
    @apply text-gray-700;
  }

  /* Labels - dark mode */
  html.dark label {
    @apply text-gray-200;
  }

  /* Links */
  a {
    @apply text-primary-600 hover:text-primary-500;
  }

  html.dark a {
    @apply text-primary-400 hover:text-primary-300;
  }

  /* Horizontal rules - light mode */
  hr {
    @apply border-gray-200;
  }

  /* Horizontal rules - dark mode */
  html.dark hr {
    @apply border-dark-50;
  }
}

@layer components {
  .pending {
    @apply bg-yellow-100 border-yellow-500 text-yellow-700;
  }
  html.dark .pending {
    @apply bg-yellow-900/30 border-yellow-500 text-yellow-400;
  }

  .approved {
    @apply bg-green-100 border-green-500 text-green-700;
  }
  html.dark .approved {
    @apply bg-green-900/30 border-green-500 text-green-400;
  }

  .rejected {
    @apply bg-red-100 border-red-500 text-red-700;
  }
  html.dark .rejected {
    @apply bg-red-900/30 border-red-500 text-red-400;
  }

  .active {
    @apply text-primary-600;
  }
  html.dark .active {
    @apply text-primary-400;
  }

  /* Card styles - light mode */
  .card {
    @apply bg-white border border-gray-200 rounded-lg shadow-md;
  }
  /* Card styles - dark mode */
  html.dark .card {
    @apply bg-dark-300 border-dark-50 shadow-lg;
  }

  /* Input styles - light mode */
  .input-field {
    @apply bg-gray-50 border-gray-300 text-gray-900 rounded-lg focus:ring-primary-500 focus:border-primary-500;
  }
  /* Input styles - dark mode */
  html.dark .input-field {
    @apply bg-dark-200 border-dark-50 text-gray-100;
  }

  /* Button styles */
  .btn-primary {
    @apply bg-primary-600 hover:bg-primary-700 text-white font-medium rounded-lg;
  }

  .btn-secondary {
    @apply bg-gray-100 hover:bg-gray-200 text-gray-700 border border-gray-300 font-medium rounded-lg;
  }
  html.dark .btn-secondary {
    @apply bg-dark-200 hover:bg-dark-100 text-gray-200 border-dark-50;
  }
}

/* Scrollbar - light mode */
::-webkit-scrollbar {
  width: 5px;
}

::-webkit-scrollbar-track {
  background: #f3f4f6;
}

::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 5px;
  width: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #9ca3af;
}

/* Scrollbar - dark mode */
html.dark ::-webkit-scrollbar-track {
  background: #191717;
}

html.dark ::-webkit-scrollbar-thumb {
  background: #3d3a3a;
}

html.dark ::-webkit-scrollbar-thumb:hover {
  background: #4a4747;
}
