/* styles.css - Updated with Poppins Font */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

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

body {
  font-family: 'Poppins', sans-serif; /* <--- NEW FONT */
  background: linear-gradient(to bottom, #f1f5f9, #e2e8f0);
  color: #1e293b;
}

.navbar {
  background: linear-gradient(135deg, #1e40af, #3b82f6);
  color: white;
  transition: width 0.3s ease;
}

.navbar a {
  padding: 12px 16px;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 8px;
  margin: 4px 8px;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

.navbar a, .sidebar-group-toggle {
  color: white !important;
}

.navbar a:hover, .navbar a.active {
  background-color: #2563eb;
  transform: translateX(5px);
}

.card {
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  padding: 24px;
  margin-bottom: 24px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.btn-primary {
  @apply bg-blue-600 text-white px-5 py-2.5 rounded-lg hover:bg-blue-700 transition-colors duration-200 font-semibold;
}

.btn-secondary {
  @apply bg-gray-200 text-gray-800 px-5 py-2.5 rounded-lg hover:bg-gray-300 transition-colors duration-200 font-semibold;
}

.btn-danger {
  @apply bg-red-600 text-white px-5 py-2.5 rounded-lg hover:bg-red-700 transition-colors duration-200 font-semibold;
}

.btn-success {
  @apply bg-green-600 text-white px-5 py-2.5 rounded-lg hover:bg-green-700 transition-colors duration-200 font-semibold;
}

/* FIXED MODAL STYLES */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal:not(.hidden) {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background: white;
  padding: 2rem;
  border-radius: 1rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
  position: relative;
  width: 90%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.modal:not(.hidden) .modal-content {
  transform: scale(1);
}

.modal-close-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #6b7280;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 0.5rem;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.modal-close-btn:hover {
  color: #374151;
  background-color: #f3f4f6;
}

table {
  @apply w-full border-collapse;
}

th, td {
  @apply p-3 text-left border-b border-gray-200;
}

th {
  @apply bg-gray-50 font-semibold text-gray-600;
}

.truncate {
  max-width: 150px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  position: relative;
}

.truncate:hover::after {
  content: attr(data-fulltext);
  @apply absolute bg-gray-800 text-white text-sm rounded p-2 z-10;
  max-width: 300px;
  white-space: normal;
}

.pagination {
  @apply flex justify-center gap-2 mt-4;
}

.pagination button {
  @apply px-4 py-2 rounded-lg bg-gray-200 hover:bg-gray-300;
}

.pagination .active {
  @apply bg-blue-600 text-white;
}

.search-bar {
  @apply w-full p-3 border rounded-lg mb-4 focus:outline-none focus:ring-2 focus:ring-blue-500;
}

.dropdown {
  @apply relative inline-block;
}

.dropdown-content {
  @apply absolute hidden bg-white shadow-lg rounded-lg mt-2 z-10;
  min-width: 100px;
}

.dropdown:hover .dropdown-content {
  @apply block;
}

.dashboard-stat {
  @apply bg-gradient-to-r from-blue-500 to-indigo-600 text-white p-6 rounded-xl;
}
