/* Troia CRM — Base Styles */

:root {
  --bg-primary: #0f1117;
  --bg-card: #161922;
  --bg-hover: #1e222e;
  --border-subtle: #272c3a;
  --text-primary: #e2e4ea;
  --text-muted: #6b7186;
  --accent: #e85d4f;
  --sage: #5b8c7b;
  --gold: #d4a657;
}

* {
  box-sizing: border-box;
}

html, body { margin: 0; padding: 0; }

body {
  background-color: var(--bg-primary);
  background-image:
    radial-gradient(circle at 0% 0%, rgba(232, 93, 79, 0.06) 0%, transparent 40%),
    radial-gradient(circle at 100% 0%, rgba(91, 140, 123, 0.05) 0%, transparent 30%),
    radial-gradient(circle at 50% 100%, rgba(212, 166, 87, 0.03) 0%, transparent 40%);
  background-attachment: fixed;
}

/* Text selection */
::selection {
  background: rgba(232, 93, 79, 0.25);
  color: #fff;
}
::-moz-selection {
  background: rgba(232, 93, 79, 0.25);
  color: #fff;
}

/* Scrollbar */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #272c3a; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #363b4d; }

/* Focus visible */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Animations */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes slideInRight {
  from { opacity: 0; transform: translateX(24px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
.animate-fade-up { animation: fadeInUp 0.4s ease-out forwards; }
.animate-fade-in { animation: fadeIn 0.3s ease-out forwards; }
.animate-slide-in { animation: slideInRight 0.3s ease-out forwards; }

/* Stagger animation delays */
.stagger-1 { animation-delay: 0.05s; }
.stagger-2 { animation-delay: 0.1s; }
.stagger-3 { animation-delay: 0.15s; }
.stagger-4 { animation-delay: 0.2s; }
.stagger-5 { animation-delay: 0.25s; }
.stagger-6 { animation-delay: 0.3s; }

/* Skeleton shimmer */
.skeleton-shimmer {
  background: linear-gradient(90deg, #1e222e 0%, #272c3a 50%, #1e222e 100%);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
}

/* Drag and drop */
.dragging { opacity: 0.4; transform: scale(0.98); }
.drag-over { background-color: rgba(232, 93, 79, 0.06); }
.kanban-column.drag-over { border-color: rgba(232, 93, 79, 0.4); }
.kanban-column.drag-source { opacity: 0.7; }

.kanban-card.dragging { cursor: grabbing; }

/* Kanban specific scroll */
.kanban-scroll { scroll-behavior: smooth; }
.kanban-cards-scroll::-webkit-scrollbar { width: 5px; }

/* Drop placeholder ghost */
.drop-placeholder {
  height: 76px;
  border: 2px dashed rgba(232, 93, 79, 0.4);
  border-radius: 12px;
  background: rgba(232, 93, 79, 0.03);
  flex-shrink: 0;
}

/* Empty state in kanban column */
.empty-state { user-select: none; }

/* Toast */
.toast-enter { animation: slideInRight 0.25s ease-out forwards; }

/* Shake (error feedback) */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}
.animate-shake { animation: shake 0.3s ease-in-out; }

/* Prefers reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Sidebar active link */
.nav-link-active {
  background-color: var(--bg-hover);
  color: #e2e4ea;
  border-left-color: var(--accent);
}

/* Card hover effect */
.card-hover {
  transition: border-color 0.2s, transform 0.2s;
}
.card-hover:hover {
  border-color: #363b4d;
  transform: translateY(-1px);
}

/* Glassmorphism panel */
.glass-panel {
  background: rgba(22, 25, 34, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* Smooth transitions on interactive elements */
button, a, select, input, textarea {
  transition: background-color 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s, opacity 0.15s;
}

/* Tabular numbers for currency/value displays */
.tabular-nums {
  font-variant-numeric: tabular-nums;
  font-feature-settings: 'tnum';
}

/* Hide scrollbar but keep scrollable */
.scrollbar-hide {
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.scrollbar-hide::-webkit-scrollbar { display: none; }

/* Sidebar mobile overlay */
.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(2px);
  z-index: 30;
  animation: fadeIn 0.2s ease-out forwards;
}

/* Gradient text */
.gradient-text {
  background: linear-gradient(135deg, #e85d4f 0%, #d4a657 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
