:root {
  --sidebar-bg: #1f2937;
  --sidebar-bg-active: #374151;
  --sidebar-text: #d1d5db;
  --sidebar-text-active: #ffffff;
  --topbar-bg: #ffffff;
  --app-bg: #f3f4f6;
  --brand: #0d6efd;
}

body {
  background: var(--app-bg);
}

/* ---------- Login ---------- */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0d6efd 0%, #1f2937 100%);
}
.login-card {
  background: #fff;
  border-radius: 1rem;
  box-shadow: 0 1rem 3rem rgba(0, 0, 0, .2);
  padding: 2.5rem;
  width: 100%;
  max-width: 380px;
}
.login-logo {
  display: block;
  max-height: 64px;
  margin: 0 auto 1rem;
}
.login-title {
  font-size: 1.4rem;
  font-weight: 700;
  text-align: center;
}
.login-subtitle {
  color: #6b7280;
  text-align: center;
  margin-bottom: 1.5rem;
  font-size: .9rem;
}
.login-footer {
  text-align: center;
  color: #9ca3af;
  font-size: .8rem;
  margin-top: 1.5rem;
}

/* ---------- App shell ---------- */
.app-wrapper {
  display: flex;
  min-height: 100vh;
}
.app-sidebar {
  width: 240px;
  flex-shrink: 0;
  background: var(--sidebar-bg);
  color: var(--sidebar-text);
  display: flex;
  flex-direction: column;
}
.app-sidebar .sidebar-brand {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: 1.1rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.app-sidebar .sidebar-brand img {
  height: 32px;
}
.app-sidebar .sidebar-brand span {
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
}
.app-sidebar .nav-link {
  color: var(--sidebar-text);
  padding: .65rem 1rem;
  border-radius: .5rem;
  margin: .15rem .6rem;
  display: flex;
  align-items: center;
  gap: .6rem;
  font-size: .92rem;
}
.app-sidebar .nav-link:hover {
  background: var(--sidebar-bg-active);
  color: #fff;
}
.app-sidebar .nav-link.active {
  background: var(--brand);
  color: #fff;
}
.app-sidebar .nav-section-title {
  color: #9ca3af;
  text-transform: uppercase;
  font-size: .7rem;
  letter-spacing: .05em;
  padding: 1rem 1.2rem .3rem;
}
.app-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.app-topbar {
  background: var(--topbar-bg);
  border-bottom: 1px solid #e5e7eb;
  padding: .75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.app-main {
  flex: 1;
  padding: 1.5rem;
}
.sb-overlay {
  display: none;
}

@media (max-width: 900px) {
  .app-sidebar {
    position: fixed;
    z-index: 1050;
    height: 100vh;
    transform: translateX(-100%);
    transition: transform .2s ease;
  }
  .app-sidebar.open {
    transform: translateX(0);
  }
  .sb-overlay.open {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .4);
    z-index: 1040;
  }
}

/* ---------- KPI cards ---------- */
.kpi-card {
  border: 0;
  border-radius: .75rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .08);
}
.kpi-card .kpi-value {
  font-size: 1.9rem;
  font-weight: 700;
  line-height: 1;
}
.kpi-card .kpi-label {
  color: #6b7280;
  font-size: .82rem;
}

/* ---------- Status stepper ---------- */
.status-stepper {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
  gap: .25rem;
}
.status-stepper-item {
  display: flex;
  align-items: center;
  gap: .4rem;
  font-size: .78rem;
  color: #9ca3af;
  padding: .3rem .6rem;
  border-radius: 999px;
  background: #f3f4f6;
}
.status-stepper-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.status-stepper-done {
  background: #dcfce7;
  color: #15803d;
}
.status-stepper-current {
  background: #0d6efd;
  color: #fff;
  font-weight: 600;
}
.status-stepper-upcoming {
  opacity: .7;
}

/* ---------- Process cards (fila) ---------- */
.processo-card {
  border: 0;
  border-radius: .75rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .08);
  transition: box-shadow .15s ease;
}
.processo-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, .12);
}
.processo-numero {
  font-variant-numeric: tabular-nums;
  color: #6b7280;
  font-size: .85rem;
}
