/* ==========================================================================
   SISTEMA DE GESTÃO AGRÍCOLA 2.0 - DESIGN SYSTEM & THEME
   ========================================================================== */

:root {
  --primary: #15803d;
  --primary-hover: #166534;
  --primary-light: #dcfce7;
  --accent: #ca8a04;
  --bg-main: #f8fafc;
  --bg-card: #ffffff;
  --border-color: #e2e8f0;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --sidebar-bg: #064e3b;
  --sidebar-text: #ecfdf5;
}

.dark {
  --primary: #22c55e;
  --primary-hover: #16a34a;
  --primary-light: #052e16;
  --accent: #eab308;
  --bg-main: #0f172a;
  --bg-card: #1e293b;
  --border-color: #334155;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --sidebar-bg: #022c22;
  --sidebar-text: #f0fdf4;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg-main);
  color: var(--text-main);
  transition: background-color 0.2s ease, color 0.2s ease;
  min-height: 100vh;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}
.dark ::-webkit-scrollbar-thumb {
  background: #475569;
}

/* Modal animation */
.modal-enter {
  animation: modalFadeIn 0.2s ease-out forwards;
}
@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(-10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Pulse animation for urgent badge */
@keyframes urgentPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.85; transform: scale(1.04); }
}
.animate-urgent {
  animation: urgentPulse 2s infinite ease-in-out;
}

/* Toast Notification */
#toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  min-width: 300px;
  max-width: 420px;
  padding: 14px 18px;
  border-radius: 8px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  gap: 12px;
  animation: toastSlideIn 0.3s ease forwards;
  font-size: 0.925rem;
  font-weight: 500;
}
@keyframes toastSlideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* ==========================================================================
   PRINT STYLES FOR OFFICIAL WORK ORDER (ORDEM DE SERVIÇO)
   ========================================================================== */
#print-area {
  display: none !important;
}

@media print {
  body * {
    visibility: hidden !important;
  }
  #print-area, #print-area * {
    visibility: visible !important;
  }
  #print-area {
    display: block !important;
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    margin: 0;
    padding: 0;
    background: #ffffff !important;
    color: #000000 !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
  .no-print {
    display: none !important;
  }
  @page {
    size: auto;
    margin: 8mm;
  }
  tr {
    page-break-inside: avoid !important;
  }
  thead {
    display: table-header-group !important;
  }
}

