/* 
  Aunt Annabel Shamba - Custom Modern Farm Stylesheet
  Clean, responsive, agricultural palette with rich contrast
*/

:root {
  --primary-50: #f0fdf4;
  --primary-100: #dcfce7;
  --primary-200: #bbf7d0;
  --primary-500: #22c55e;
  --primary-600: #16a34a;
  --primary-700: #15803d;
  --primary-800: #166534;
  --primary-900: #14532d;

  --amber-50: #fffbeb;
  --amber-100: #fef3c7;
  --amber-500: #f59e0b;
  --amber-600: #d97706;

  --red-50: #fef2f2;
  --red-100: #fee2e2;
  --red-500: #ef4444;
  --red-600: #dc2626;

  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-400: #94a3b8;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1e293b;
  --gray-900: #0f172a;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: #f4f6f8;
  color: var(--gray-800);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Calendar Grid Styles */
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}

.calendar-cell {
  min-height: 110px;
  transition: all 0.15s ease-in-out;
  cursor: pointer;
}

.calendar-cell:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.calendar-cell.today {
  border: 2px solid var(--primary-600);
  background-color: #f0fdf4 !important;
}

.calendar-cell.other-month {
  background-color: #f8fafc;
  opacity: 0.55;
}

/* Modal Animations */
.modal-overlay {
  background-color: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(3px);
  transition: opacity 0.2s ease-out;
}

.modal-content {
  max-height: 90vh;
  animation: modalSlideUp 0.2s ease-out forwards;
}

@keyframes modalSlideUp {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(12px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Badge Styles */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.25;
}

.badge-cost {
  background-color: #fee2e2;
  color: #991b1b;
}

.badge-revenue {
  background-color: #dcfce7;
  color: #166534;
}

.badge-workers {
  background-color: #e0f2fe;
  color: #075985;
}

.badge-profit {
  background-color: #dcfce7;
  color: #14532d;
  border: 1px solid #86efac;
}

.badge-loss {
  background-color: #fee2e2;
  color: #7f1d1d;
  border: 1px solid #fca5a5;
}

/* Quick Select Tag Buttons */
.tag-chip {
  cursor: pointer;
  user-select: none;
  transition: all 0.12s ease;
}

.tag-chip:hover {
  background-color: var(--primary-100);
  color: var(--primary-800);
  border-color: var(--primary-500);
}

.tag-chip.active {
  background-color: var(--primary-600);
  color: white;
  border-color: var(--primary-600);
}

/* Printing optimizations */
@media print {
  body {
    background: white !important;
  }
  header, nav, .no-print, button:not(.print-allow) {
    display: none !important;
  }
  .modal-overlay {
    display: none !important;
  }
  .card {
    box-shadow: none !important;
    border: 1px solid #ccc !important;
  }
}
