/* ============================================================
   Nexus CRM — Estilos Globais
   ============================================================ */

/* Scrollbar customizada */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #CBD5E1; border-radius: 9999px; }
::-webkit-scrollbar-thumb:hover { background: #94A3B8; }

/* Utilitários de formulário via @apply */
.label-field {
  display: block;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: #0b1c30;
  margin-bottom: 4px;
  text-transform: uppercase;
}

.input-field {
  display: block;
  width: 100%;
  padding: 8px 12px;
  font-size: 14px;
  line-height: 20px;
  color: #0b1c30;
  background-color: #f8f9ff;
  border: 1px solid #c6c6cd;
  border-radius: 8px;
  transition: border-color 0.15s, box-shadow 0.15s;
  outline: none;
}
.input-field:focus {
  border-color: #0F172A;
  box-shadow: 0 0 0 3px rgba(15,23,42,0.1);
}
.input-field::placeholder { color: #76777d; }
select.input-field { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748B' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px; }

textarea.input-field { resize: vertical; min-height: 80px; }

/* Botões */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: white;
  background-color: #F97316;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: all 0.15s;
  box-shadow: 0 4px 14px 0 rgba(249,115,22,0.39);
}
.btn-primary:hover { background-color: #EA580C; box-shadow: none; }
.btn-primary:active { transform: scale(0.98); }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #0F172A;
  background-color: transparent;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s;
}
.btn-secondary:hover { background-color: #F8FAFC; border-color: #0F172A; }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 500;
  color: #64748B;
  background-color: transparent;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s;
}
.btn-ghost:hover { background-color: #F1F5F9; color: #0F172A; }

/* Cards */
.card {
  background-color: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  box-shadow: 0px 1px 3px rgba(15,23,42,0.08);
}

/* Status chips */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 10px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.02em;
}
.chip-success  { background: #dcfce7; color: #166534; }
.chip-warning  { background: #fef9c3; color: #854d0e; }
.chip-danger   { background: #fee2e2; color: #991b1b; }
.chip-info     { background: #dbeafe; color: #1e40af; }
.chip-neutral  { background: #f1f5f9; color: #475569; }
.chip-accent   { background: #fff7ed; color: #c2410c; }
.chip-purple   { background: #f3e8ff; color: #6b21a8; }

/* Modal backdrop */
.modal-backdrop {
  background-color: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
}
.modal-backdrop.hidden { display: none !important; }

/* Kanban */
.kanban-column { min-height: 120px; }
.kanban-card {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  padding: 12px;
  box-shadow: 0px 1px 2px rgba(15,23,42,0.06);
  cursor: grab;
  transition: box-shadow 0.15s, transform 0.15s;
  user-select: none;
}
.kanban-card:hover { box-shadow: 0px 4px 12px rgba(15,23,42,0.12); transform: translateY(-1px); }
.kanban-card.dragging { opacity: 0.5; transform: rotate(2deg); cursor: grabbing; }
.kanban-drop-zone { min-height: 80px; border: 2px dashed transparent; border-radius: 8px; transition: border-color 0.15s, background-color 0.15s; }
.kanban-drop-zone.drag-over { border-color: #F97316; background-color: #fff7ed; }

/* Tabelas */
.table-crm { width: 100%; border-collapse: collapse; }
.table-crm thead th {
  padding: 10px 16px;
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #64748B;
  background: #F8FAFC;
  border-bottom: 1px solid #E2E8F0;
}
.table-crm tbody tr { border-bottom: 1px solid #F1F5F9; transition: background-color 0.1s; }
.table-crm tbody tr:hover { background-color: #F8FAFC; }
.table-crm tbody td { padding: 12px 16px; font-size: 14px; color: #0F172A; }

/* Timeline */
.timeline-item { display: flex; gap: 12px; }
.timeline-line { display: flex; flex-direction: column; align-items: center; }
.timeline-dot { width: 32px; height: 32px; border-radius: 9999px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.timeline-connector { width: 2px; flex: 1; background-color: #E2E8F0; margin: 4px 0; min-height: 20px; }

/* KPI Card */
.kpi-card {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0px 1px 3px rgba(15,23,42,0.08);
}
.kpi-card .kpi-value { font-size: 28px; font-weight: 700; line-height: 1.2; color: #0F172A; }
.kpi-card .kpi-label { font-size: 13px; font-weight: 500; color: #64748B; margin-top: 4px; }
.kpi-card .kpi-trend { font-size: 12px; font-weight: 500; display: inline-flex; align-items: center; gap: 2px; }
.kpi-card .kpi-trend.up   { color: #16a34a; }
.kpi-card .kpi-trend.down { color: #dc2626; }

/* Prioridade */
.prio-alta   { color: #dc2626; }
.prio-media  { color: #d97706; }
.prio-baixa  { color: #64748B; }

/* Sidebar active */
.nav-item.active { background-color: #F97316 !important; color: white !important; }

/* Animação de entrada */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.animate-fade-in-up { animation: fadeInUp 0.3s ease forwards; }

/* Loading spinner */
.spinner {
  width: 20px; height: 20px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Skeleton loader */
.skeleton { background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%); background-size: 200% 100%; animation: shimmer 1.5s infinite; border-radius: 6px; }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
