/* Main Styles */
:root {
  --primary: #5e8e3e;
  --secondary: #95bf47;
  --dark: #212b36;
  --light: #f9fafb;
  --border: #dfe3e8;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
  background-color: #f5f5f5;
  color: var(--dark);
}

/* Navbar customization */
.navbar-dark.bg-primary {
  background-color: var(--primary) !important;
}

.btn-primary {
  background-color: var(--primary);
  border-color: var(--primary);
}

.btn-primary:hover, .btn-primary:focus {
  background-color: #4a7a2e;
  border-color: #4a7a2e;
}

.text-primary {
  color: var(--primary) !important;
}

/* Card styling */
.card {
  border-radius: 0.5rem;
  border: 1px solid var(--border);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.card-header {
  background-color: white;
  border-bottom: 1px solid var(--border);
  padding: 1rem 1.25rem;
}

/* Dashboard stats */
.display-4 {
  font-weight: 600;
  color: var(--primary);
}

/* Table styling */
.table th {
  font-weight: 500;
  color: #637381;
  border-top: none;
}

.table-hover tbody tr:hover {
  background-color: rgba(94, 142, 62, 0.05);
}

/* Import steps styling */
.steps {
  display: flex;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  position: relative;
}

.step:not(:last-child):after {
  content: '';
  position: absolute;
  top: 20px;
  width: 100%;
  height: 2px;
  background-color: #e9ecef;
  z-index: 0;
}

.step.active:not(:last-child):after {
  background-color: var(--primary);
}

.step-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: #e9ecef;
  color: #6c757d;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  margin-bottom: 0.5rem;
  z-index: 1;
}

.step.active .step-icon {
  background-color: var(--primary);
  color: white;
}

.step-text {
  font-size: 0.875rem;
  color: #6c757d;
}

.step.active .step-text {
  color: var(--primary);
  font-weight: bold;
}

/* Feature icons */
.feature-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

.bg-primary {
  background-color: var(--primary) !important;
}

/* Form elements */
.form-control:focus {
  border-color: var(--secondary);
  box-shadow: 0 0 0 0.25rem rgba(94, 142, 62, 0.25);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .step-text {
    font-size: 0.75rem;
  }
  
  .step-icon {
    width: 32px;
    height: 32px;
    font-size: 0.875rem;
  }
}

/* Toast notifications */
.toast-container {
  z-index: 1060;
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  max-width: 350px;
}

.toast {
  min-width: 280px;
  max-width: 350px;
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  border-radius: 0.5rem;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  margin-bottom: 0.75rem;
  overflow: hidden;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.toast-header {
  background-color: transparent;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  padding: 0.75rem 1rem;
}

.toast-body {
  padding: 0.75rem 1rem;
  color: #212529;
}

.toast-success {
  border-left: 4px solid var(--primary);
}

.toast-error {
  border-left: 4px solid #dc3545;
}

.toast-warning {
  border-left: 4px solid #ffc107;
}

.toast-info {
  border-left: 4px solid #0dcaf0;
}

/* Import page enhancements */
.file-upload-container {
  border: 2px dashed var(--border);
  border-radius: 0.5rem;
  padding: 2rem;
  text-align: center;
  transition: all 0.3s ease;
  background-color: #f9fafb;
  cursor: pointer;
}

.file-upload-container:hover, .file-upload-container.dragover {
  border-color: var(--primary);
  background-color: rgba(94, 142, 62, 0.05);
}

.file-upload-container input[type="file"] {
  opacity: 0;
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  cursor: pointer;
}

.file-name-display {
  font-weight: 500;
}

/* Preview table enhancements */
#preview-table {
  border-collapse: separate;
  border-spacing: 0;
}

#preview-table th {
  position: sticky;
  top: 0;
  background-color: #f8f9fa;
  z-index: 10;
}

#preview-table tbody tr:nth-child(even) {
  background-color: rgba(0, 0, 0, 0.02);
}

/* Results container animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

#import-results {
  animation: fadeIn 0.5s ease-in-out;
}

.count-animation {
  transition: all 0.5s ease-in-out;
}

/* Loading spinner enhancements */
.spinner-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 0;
}

.spinner-border.text-primary {
  width: 3rem;
  height: 3rem;
  color: var(--primary) !important;
}

/* Import history page */
.progress {
  height: 20px;
  border-radius: 0.25rem;
  background-color: #e9ecef;
}

.progress-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 0.75rem;
  font-weight: bold;
}

.view-errors {
  white-space: nowrap;
}

/* Modal styling */
.modal-header {
  background-color: var(--light);
  border-bottom: 1px solid var(--border);
}

.modal-footer {
  background-color: var(--light);
  border-top: 1px solid var(--border);
}
