@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --bg-primary: #0b0f19;
  --bg-secondary: #111827;
  --bg-tertiary: #1f2937;
  --card-bg: rgba(17, 24, 39, 0.75);
  --card-border: rgba(255, 255, 255, 0.08);
  --accent-primary: #3b82f6;
  --accent-emerald: #10b981;
  --accent-amber: #f59e0b;
  --accent-purple: #8b5cf6;
  --text-main: #f3f4f6;
  --text-muted: #9ca3af;
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: #0b0f19;
  color: #f3f4f6;
  overflow-x: hidden;
}

code, pre, .font-mono {
  font-family: 'JetBrains Mono', monospace;
}

/* Glassmorphism styling */
.glass-panel {
  background: rgba(17, 24, 39, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.glass-card {
  background: rgba(31, 41, 55, 0.5);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.glass-card:hover {
  border-color: rgba(59, 130, 246, 0.3);
  transform: translateY(-1px);
}

/* Subtle glow accents */
.glow-blue {
  box-shadow: 0 0 25px -5px rgba(59, 130, 246, 0.25);
}

.glow-emerald {
  box-shadow: 0 0 25px -5px rgba(16, 185, 129, 0.25);
}

/* Scrollbar polish */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: #0f172a;
}
::-webkit-scrollbar-thumb {
  background: #334155;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #475569;
}

/* Animations */
@keyframes pulseSubtle {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.animate-pulse-subtle {
  animation: pulseSubtle 2.5s infinite;
}

/* Custom badges */
.badge-pending {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-sent {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-dismissed {
  background: rgba(107, 114, 128, 0.15);
  color: #9ca3af;
  border: 1px solid rgba(107, 114, 128, 0.3);
}

/* Mobile Polish & Touch Ergonomics */
button, a, input, select, textarea {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

@media (max-width: 768px) {
  /* Prevent iOS Safari auto-zoom on input focus */
  input, select, textarea {
    font-size: 16px !important;
  }

  /* Ergonomic mobile touch targets */
  button:not(.chip-btn) {
    min-height: 40px;
  }

  .mobile-hide-scrollbar::-webkit-scrollbar {
    display: none;
  }
  .mobile-hide-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
  }

  /* Modals on mobile: fit viewport cleanly without getting cut off */
  .modal-overlay {
    align-items: flex-end !important;
    padding: 0 !important;
  }

  .modal-overlay > div {
    max-height: 92vh !important;
    width: 100% !important;
    max-width: 100% !important;
    border-bottom-left-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
    border-top-left-radius: 1.5rem !important;
    border-top-right-radius: 1.5rem !important;
    display: flex !important;
    flex-direction: column !important;
  }

  .modal-overlay > div > div:nth-child(2) {
    overflow-y: auto !important;
    flex: 1 1 auto !important;
    max-height: 65vh !important;
  }

  /* Bottom safe area padding for iPhone home indicator */
  nav.fixed.bottom-0 {
    padding-bottom: max(0.5rem, env(safe-area-inset-bottom)) !important;
  }
}

/* Modal backdrop */
.modal-overlay {
  background: rgba(4, 7, 14, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* Smart Action Chips */
.ai-smart-chip {
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(148, 163, 184, 0.2);
  color: #e2e8f0;
  transition: all 0.15s ease-in-out;
  white-space: nowrap;
}

.ai-smart-chip:hover, .ai-smart-chip:active {
  background: rgba(59, 130, 246, 0.2);
  border-color: rgba(59, 130, 246, 0.5);
  color: #93c5fd;
  transform: translateY(-1px);
}
