/* Sistema de Chamados - Estilos customizados */

* { box-sizing: border-box; }

/* Scrollbar customizada */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #f1f5f9; }
::-webkit-scrollbar-thumb { background: #94a3b8; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #64748b; }

/* Transições suaves */
.fade-in { animation: fadeIn 0.25s ease-in; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* Status badges */
.badge-draft     { background: #f1f5f9; color: #64748b; }
.badge-open      { background: #dbeafe; color: #1d4ed8; }
.badge-in_progress { background: #fef3c7; color: #d97706; }
.badge-waiting   { background: #ede9fe; color: #7c3aed; }
.badge-resolved  { background: #dcfce7; color: #16a34a; }
.badge-closed    { background: #f1f5f9; color: #6b7280; }
.badge-cancelled { background: #fee2e2; color: #dc2626; }

/* Priority badges */
.priority-critical { background: #fee2e2; color: #dc2626; }
.priority-high     { background: #ffedd5; color: #ea580c; }
.priority-medium   { background: #fef3c7; color: #d97706; }
.priority-low      { background: #f0fdf4; color: #16a34a; }

/* SLA breached */
.sla-breached { border-left: 3px solid #dc2626; }
.sla-warning  { border-left: 3px solid #f59e0b; }
.sla-ok       { border-left: 3px solid #22c55e; }

/* Sidebar nav item */
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
  color: #94a3b8;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
}
.nav-item:hover { background: #1e3a5f; color: #fff; }
.nav-item.active { background: #2563eb; color: #fff; }
.nav-item i { width: 18px; text-align: center; }

/* Card hover */
.card-hover { transition: all 0.2s ease; }
.card-hover:hover { box-shadow: 0 4px 20px rgba(0,0,0,0.12); transform: translateY(-1px); }

/* Timeline */
.timeline-item { position: relative; padding-left: 32px; margin-bottom: 20px; }
.timeline-item::before {
  content: '';
  position: absolute;
  left: 11px;
  top: 28px;
  bottom: -20px;
  width: 2px;
  background: #e2e8f0;
}
.timeline-item:last-child::before { display: none; }
.timeline-dot {
  position: absolute;
  left: 0;
  top: 6px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  border: 2px solid #fff;
  box-shadow: 0 0 0 2px #e2e8f0;
}

/* Modal overlay */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex; align-items: center; justify-content: center;
  z-index: 100;
  animation: fadeOverlay 0.2s ease;
}
@keyframes fadeOverlay { from { opacity: 0; } to { opacity: 1; } }
.modal-box {
  background: #fff;
  border-radius: 12px;
  padding: 28px;
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  animation: slideUp 0.2s ease;
}
@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* Toast notification */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 14px 20px;
  border-radius: 10px;
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  z-index: 200;
  animation: slideToast 0.3s ease;
  max-width: 360px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}
@keyframes slideToast { from { transform: translateX(100px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
.toast-success { background: #16a34a; }
.toast-error   { background: #dc2626; }
.toast-info    { background: #2563eb; }

/* Table */
.data-table { width: 100%; border-collapse: collapse; }
.data-table th { background: #f8fafc; font-weight: 600; font-size: 12px; color: #64748b; text-transform: uppercase; letter-spacing: 0.05em; padding: 10px 16px; text-align: left; }
.data-table td { padding: 12px 16px; border-top: 1px solid #f1f5f9; font-size: 14px; }
.data-table tr:hover td { background: #f8fafc; cursor: pointer; }

/* Input/Select */
input, select, textarea {
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
input:focus, select:focus, textarea:focus {
  border-color: #2563eb !important;
  box-shadow: 0 0 0 3px rgba(37,99,235,0.15);
}

/* Loading spinner */
.spinner {
  width: 32px; height: 32px;
  border: 3px solid #e2e8f0;
  border-top-color: #2563eb;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Stat cards */
.stat-card {
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: 0 1px 6px rgba(0,0,0,0.06);
}
.stat-icon {
  width: 48px; height: 48px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
}

/* Sidebar */
#sidebar {
  width: 240px;
  background: #0f1f3d;
  min-height: 100vh;
  position: fixed;
  left: 0; top: 0;
  display: flex;
  flex-direction: column;
  z-index: 50;
  transition: transform 0.3s ease;
}

#main-content {
  margin-left: 240px;
  min-height: 100vh;
}

@media (max-width: 768px) {
  #sidebar { transform: translateX(-100%); }
  #sidebar.open { transform: translateX(0); }
  #main-content { margin-left: 0; }
}
