@tailwind base;
@tailwind components;
@tailwind utilities;

@layer base {
  * {
    box-sizing: border-box;
  }
  body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background: #fff;
    color: #1a2332;
  }
}

@layer components {
  .toast {
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    padding: 0.75rem 1.25rem;
    border-radius: 0.5rem;
    color: #fff;
    font-size: 0.875rem;
    font-weight: 500;
    z-index: 1000;
    animation: toast-in 0.3s ease, toast-out 0.3s ease 2.2s forwards;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  }
  .toast-success { background: #4caf50; }
  .toast-error { background: #f44336; }

  @keyframes toast-in {
    from { opacity: 0; transform: translateY(1rem); }
    to { opacity: 1; transform: translateY(0); }
  }
  @keyframes toast-out {
    from { opacity: 1; }
    to { opacity: 0; }
  }

  .range-input {
    @apply w-full border border-gray-300 rounded px-3 py-1.5 text-sm focus:ring-2 focus:ring-reo-teal focus:border-reo-teal outline-none transition-colors;
  }

  .btn-primary {
    @apply bg-reo-teal text-white font-medium px-4 py-2 rounded-lg hover:bg-reo-teal-dark transition-colors cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed;
  }

  .btn-secondary {
    @apply bg-gray-100 text-gray-700 font-medium px-4 py-2 rounded-lg hover:bg-gray-200 transition-colors cursor-pointer;
  }

  .badge {
    @apply inline-flex items-center px-2 py-0.5 rounded-full text-xs font-medium;
  }
  .badge-success { @apply bg-green-100 text-green-800; }
  .badge-warning { @apply bg-yellow-100 text-yellow-800; }
  .badge-info { @apply bg-blue-100 text-blue-800; }
  .badge-danger { @apply bg-red-100 text-red-800; }
  .badge-gray { @apply bg-gray-100 text-gray-600; }

  .stat-value {
    @apply text-3xl font-bold tracking-tight;
  }

  .status-dot {
    @apply inline-block w-2 h-2 rounded-full mr-1.5;
  }
  .status-dot-running { @apply bg-green-500; animation: pulse-dot 1.5s infinite; }
  .status-dot-pending { @apply bg-yellow-500; }
  .status-dot-complete { @apply bg-blue-500; }
  .status-dot-error { @apply bg-red-500; }

  @keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
  }
}
