/* Custom validation styles */
.valid.modified:not([type="checkbox"]) {
  border-color: #10b981 !important;
  box-shadow: 0 0 0 1px #10b981;
}

.invalid {
  border-color: #ef4444 !important;
  box-shadow: 0 0 0 1px #ef4444;
}

.validation-message {
  color: #ef4444;
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

/* Loading skeleton animation */
@keyframes shimmer {
  0% {
    background-position: -1000px 0;
  }
  100% {
    background-position: 1000px 0;
  }
}

.skeleton {
  animation: shimmer 2s infinite;
  background: linear-gradient(to right, #f0f0f0 4%, #e0e0e0 25%, #f0f0f0 36%);
  background-size: 1000px 100%;
}

/* Toast animation */
@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOutRight {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(100%);
    opacity: 0;
  }
}

.toast-enter {
  animation: slideInRight 0.3s ease-out;
}

.toast-exit {
  animation: slideOutRight 0.3s ease-in;
}

/* Custom scrollbar */
.custom-scrollbar::-webkit-scrollbar {
  width: 8px;
}

.custom-scrollbar::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 4px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Form field base styles - Tailwind will extend these */
.form-field {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  transition: all 0.2s;
  color: #111827; /* text-gray-900 for better visibility */
  background-color: white;
  cursor: auto; /* Normal cursor for inputs/selects */
}

.form-field select {
  cursor: pointer; /* Pointer cursor specifically for selects */
}

.form-field:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgb(59 130 246 / 0.1);
}

.form-field:read-only {
    background-color: #f9fafb;
    color: #6b7280;
    cursor: pointer;
}

.form-field:disabled {
  background-color: #f3f4f6;
  color: #9ca3af;
  cursor: not-allowed;
}

/* Card styles */
.card {
  background-color: white;
  border-radius: 0.75rem;
  box-shadow:
    0 1px 3px 0 rgb(0 0 0 / 0.1),
    0 1px 2px -1px rgb(0 0 0 / 0.1);
  border: 1px solid #e5e7eb;
  overflow: hidden;
}

.card-header {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid #e5e7eb;
  background-color: #f9fafb;
}

.card-body {
  padding: 1.5rem;
}

/* Button styles */
.btn {
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  font-weight: 500;
  transition: all 0.2s;
  cursor: pointer;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    border-radius: 0.375rem;
}

.btn-xs {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    border-radius: 0.25rem;
}

.btn:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgb(59 130 246 / 0.1);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background-color: #3b82f6;
  color: white;
}

.btn-primary:hover:not(:disabled) {
  background-color: #2563eb;
  box-shadow:
    0 4px 6px -1px rgb(0 0 0 / 0.1),
    0 2px 4px -2px rgb(0 0 0 / 0.1);
}

.btn-secondary {
  background-color: #f3f4f6;
  color: #374151;
  border: 1px solid #d1d5db;
}

.btn-secondary:hover:not(:disabled) {
  background-color: #e5e7eb;
}

.btn-success {
  background-color: #10b981;
  color: white;
}

.btn-success:hover:not(:disabled) {
  background-color: #059669;
}

.btn-danger {
  background-color: #ef4444;
  color: white;
}

.btn-danger:hover:not(:disabled) {
  background-color: #dc2626;
}

.btn-filter {
    background-color: #6366f1;
    color: white;
}

.btn-filter:hover:not(:disabled) {
    background-color: #4f46e5;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
}

.btn-refresh {
    background-color: #f3f4f6;
    color: #374151;
    border: 1px solid #d1d5db;
}

.btn-refresh:hover:not(:disabled) {
    background-color: #e5e7eb;
}

.btn-trail {
    background-color: #f3f4f6;
    color: #374151;
    border: 1px solid #d1d5db;
}

.btn-trail:hover:not(:disabled) {
    background-color: #e5e7eb;
}

.btn-export {
    background-color: #059669;
    color: white;
}

.btn-export:hover:not(:disabled) {
    background-color: #047857;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
}


.btn-excel {
    background-color: #217346;
    color: white;
    padding: 1rem;
    min-height: 120px;
    flex-direction: column;
    gap: 0.75rem;
}

.btn-excel:hover:not(:disabled) {
    background-color: #1a5c37;
    transform: scale(1.05);
}

.btn-pdf {
    background-color: #dc2626;
    color: white;
    padding: 1rem;
    min-height: 120px;
    flex-direction: column;
    gap: 0.75rem;
}

.btn-pdf:hover:not(:disabled) {
    background-color: #b91c1c;
    transform: scale(1.05);
}



/* Modal backdrop */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgb(0 0 0 / 0.5);
  transition: opacity 0.3s;
  z-index: 40;
}

.modal-content {
  transform: translateY(0);
  transition: all 0.3s;
}

/* Prevent body scroll when modal is open */
body.modal-open {
  overflow: hidden;
}
