/* Custom styles - Hoa Vang Pig Management */

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #F8FAFC; }
::-webkit-scrollbar-thumb { background: #CBD5E1; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #94A3B8; }

/* Sidebar transitions */
.sidebar { transition: transform 0.3s ease; }

@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
}

/* Overlay for mobile sidebar */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 30;
}
.sidebar-overlay.active { display: block; }

/* Card hover effects */
.card-hover {
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.card-hover:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transform: translateY(-1px);
}

/* KPI card gradient borders */
.kpi-card {
  position: relative;
  overflow: hidden;
}
.kpi-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
}
.kpi-card.blue::before { background: #3B82F6; }
.kpi-card.green::before { background: #059669; }
.kpi-card.orange::before { background: #F97316; }
.kpi-card.slate::before { background: #0F172A; }

/* Table styles */
.data-table th {
  background: #F1F5F9;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  color: #475569;
}
.data-table td { border-bottom: 1px solid #E2E8F0; }
.data-table tr:hover td { background: #F8FAFC; }

/* Status badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
}
.badge-pending { background: #FEF3C7; color: #92400E; }
.badge-approved { background: #D1FAE5; color: #065F46; }
.badge-rejected { background: #FEE2E2; color: #991B1B; }

/* Form focus styles */
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: #3B82F6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

/* Button base */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  font-weight: 500;
  font-size: 0.875rem;
  transition: all 0.15s ease;
  cursor: pointer;
  border: none;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary { background: #3B82F6; color: white; }
.btn-primary:hover:not(:disabled) { background: #2563EB; }
.btn-accent { background: #059669; color: white; }
.btn-accent:hover:not(:disabled) { background: #047857; }
.btn-cta { background: #F97316; color: white; }
.btn-cta:hover:not(:disabled) { background: #EA580C; }
.btn-danger { background: #EF4444; color: white; }
.btn-danger:hover:not(:disabled) { background: #DC2626; }
.btn-outline {
  background: white;
  color: #1E293B;
  border: 1px solid #E2E8F0;
}
.btn-outline:hover:not(:disabled) { background: #F8FAFC; border-color: #CBD5E1; }

/* Login page background */
.login-bg {
  background: linear-gradient(135deg, #0F172A 0%, #1E3A5F 50%, #0F172A 100%);
}

/* Fade in animation */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.fade-in { animation: fadeIn 0.3s ease forwards; }

/* Print styles */
@media print {
  .sidebar, .sidebar-overlay, .no-print { display: none !important; }
  .main-content { margin-left: 0 !important; }
}

/* Modal overlay */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
}
.modal-content {
  background: white;
  border-radius: 0.75rem;
  padding: 1.5rem;
  max-width: 32rem;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
}

/* Pagination */
.page-btn {
  min-width: 2rem;
  height: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  border: 1px solid #E2E8F0;
  background: white;
  cursor: pointer;
  transition: all 0.15s ease;
}
.page-btn:hover { background: #F1F5F9; }
.page-btn.active { background: #3B82F6; color: white; border-color: #3B82F6; }
