:root {
  --sidebar-bg: #1e293b;
  --sidebar-hover: #334155;
  --sidebar-active: #3b82f6;
  --sidebar-text: #cbd5e1;
  --sidebar-muted: #64748b;
  --page-bg: #f4f6fb;
}

body {
  margin: 0;
  background: var(--page-bg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: #1e293b;
}

.app-wrapper {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: 260px;
  background: var(--sidebar-bg);
  color: var(--sidebar-text);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.sidebar .brand {
  padding: 20px;
  font-size: 1.15rem;
  font-weight: 600;
  color: white;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  gap: 10px;
}
.sidebar .brand i { color: #60a5fa; font-size: 1.4rem; }

.sidebar .nav { padding: 10px 10px; flex: 1; }
.sidebar .nav-section {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--sidebar-muted);
  padding: 14px 12px 6px;
}
.sidebar .nav-link {
  color: var(--sidebar-text);
  padding: 8px 12px;
  border-radius: 6px;
  margin-bottom: 2px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.92rem;
}
.sidebar .nav-link:hover { background: var(--sidebar-hover); color: white; }
.sidebar .nav-link.active { background: var(--sidebar-active); color: white; }

.sidebar-footer {
  padding: 14px;
  border-top: 1px solid rgba(255,255,255,0.08);
  font-size: 0.85rem;
}
.user-info { display: flex; gap: 10px; align-items: center; }
.user-info i { font-size: 1.8rem; color: #60a5fa; }
.user-info .user-name { color: white; font-weight: 500; }

/* Conteúdo principal */
.content { flex: 1; min-width: 0; }

/* Cards de KPI */
.kpi-card {
  background: white;
  border-radius: 10px;
  padding: 18px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  border: 1px solid #e5e7eb;
}
.kpi-label { color: #64748b; font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.05em; }
.kpi-value { font-size: 1.5rem; font-weight: 600; margin-top: 4px; }
.kpi-value.positive { color: #16a34a; }
.kpi-value.negative { color: #dc2626; }
.kpi-icon { font-size: 1.8rem; color: #3b82f6; }

/* Tabelas */
.table { background: white; }
.table thead th {
  background: #f8fafc;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #475569;
  font-weight: 600;
}

/* Chip de estágio */
.estagio-chip {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 0.78rem;
  font-weight: 500;
  color: white;
}

/* Form login */
.login-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
}
.login-card {
  background: white;
  border-radius: 12px;
  padding: 40px;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

/* Linha-do-tempo estágios */
.estagios-timeline {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  margin-bottom: 20px;
}
.estagios-timeline .estagio-item {
  padding: 8px 14px;
  background: #e5e7eb;
  border-radius: 20px;
  font-size: 0.85rem;
  white-space: nowrap;
  color: #64748b;
}
.estagios-timeline .estagio-item.ativo {
  background: #3b82f6;
  color: white;
  font-weight: 500;
}
.estagios-timeline .estagio-item.passado {
  background: #86efac;
  color: #065f46;
}

/* Print recibo */
@media print {
  .sidebar, .no-print { display: none !important; }
  .content { width: 100%; }
  .recibo-container { padding: 0 !important; }
}
