:root {
  --azul: #1e3a5f;
  --azul-claro: #2f5d8a;
  --verde: #1f8a4c;
  --vermelho: #c0392b;
  --cinza-bg: #f4f6f8;
  --cinza-borda: #d3dae0;
  --texto: #1c2733;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  background: var(--cinza-bg);
  color: var(--texto);
}

.container {
  max-width: 560px;
  margin: 0 auto;
  padding: 32px 20px 60px;
}

.card {
  background: #fff;
  border: 1px solid var(--cinza-borda);
  border-radius: 10px;
  padding: 28px 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

h1 {
  font-size: 1.4rem;
  color: var(--azul);
  margin-top: 0;
}

p.lead {
  color: #4a5a68;
  line-height: 1.5;
}

.etapas {
  display: flex;
  gap: 6px;
  margin-bottom: 24px;
}

.etapas .ponto {
  flex: 1;
  height: 4px;
  border-radius: 2px;
  background: var(--cinza-borda);
}

.etapas .ponto.ativo {
  background: var(--azul-claro);
}

.etapas .ponto.concluido {
  background: var(--verde);
}

label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin: 16px 0 6px;
}

input[type="text"],
input[type="email"],
input[type="date"],
input[type="tel"],
select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--cinza-borda);
  border-radius: 6px;
  font-size: 1rem;
}

input.erro {
  border-color: var(--vermelho);
}

.msg-erro {
  color: var(--vermelho);
  font-size: 0.85rem;
  margin-top: 4px;
}

.acoes {
  margin-top: 28px;
  display: flex;
  justify-content: flex-end;
}

button,
.botao {
  background: var(--azul);
  color: #fff;
  border: none;
  padding: 12px 22px;
  border-radius: 6px;
  font-size: 1rem;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}

button:hover,
.botao:hover {
  background: var(--azul-claro);
}

.radio-group {
  display: flex;
  gap: 16px;
  margin-top: 8px;
}

.radio-group label {
  font-weight: 400;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.termos-texto {
  background: var(--cinza-bg);
  border: 1px solid var(--cinza-borda);
  border-radius: 6px;
  padding: 14px;
  font-size: 0.9rem;
  line-height: 1.6;
  max-height: 220px;
  overflow-y: auto;
  white-space: pre-wrap;
}

.checkbox-linha {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 16px;
}

.checkbox-linha input {
  margin-top: 4px;
}

.checkbox-linha label {
  font-weight: 400;
  margin: 0;
}

.status-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 0.78rem;
  font-weight: 600;
}

.status-PENDENTE {
  background: #e9edf1;
  color: #5a6b7a;
}

.status-EM_ANALISE {
  background: #fdf3d9;
  color: #8a6d1f;
}

.status-APROVADO {
  background: #e2f5e9;
  color: var(--verde);
}

.status-REPROVADO {
  background: #fbe6e3;
  color: var(--vermelho);
}

.status-ATIVO {
  background: #e2f5e9;
  color: var(--verde);
}

.status-INATIVO {
  background: #fbe6e3;
  color: var(--vermelho);
}

.doc-slot {
  border: 1px solid var(--cinza-borda);
  border-radius: 8px;
  padding: 16px;
  margin-top: 14px;
}

.doc-slot h3 {
  margin: 0 0 6px;
  font-size: 1rem;
}

.doc-slot .motivo {
  color: var(--vermelho);
  font-size: 0.85rem;
  margin-top: 6px;
}

.central-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Layout do Painel do Operador: menu lateral retrátil + área de conteúdo */

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

.sidebar {
  width: 240px;
  flex-shrink: 0;
  background: var(--azul);
  color: #fff;
  display: flex;
  flex-direction: column;
  transition: width 0.18s ease;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
}

.app-shell.sidebar-collapsed .sidebar {
  width: 64px;
}

.sidebar-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 18px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.app-shell.sidebar-collapsed .sidebar-top {
  justify-content: center;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow: hidden;
  min-width: 0;
}

.app-shell.sidebar-collapsed .sidebar-brand {
  gap: 0;
}

.sidebar-logo {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.16);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.02em;
  flex-shrink: 0;
}

.sidebar-brand-text {
  white-space: nowrap;
  overflow: hidden;
}

.sidebar-title {
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.25;
}

.sidebar-subtitle {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.65);
}

.sidebar-toggle {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.75);
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  display: flex;
  flex-shrink: 0;
  transition: transform 0.18s ease, background 0.15s ease;
}

.sidebar-toggle svg {
  width: 18px;
  height: 18px;
}

.sidebar-toggle:hover {
  background: rgba(255, 255, 255, 0.12);
}

.app-shell.sidebar-collapsed .sidebar-toggle {
  transform: rotate(180deg);
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 8px;
  flex: 1;
  overflow-y: auto;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  font-size: 0.9rem;
  white-space: nowrap;
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
}

.sidebar-link:hover {
  background: rgba(255, 255, 255, 0.09);
  color: #fff;
}

.sidebar-link.ativo {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-weight: 600;
}

.sidebar-icon {
  flex-shrink: 0;
  display: flex;
}

.sidebar-icon svg {
  width: 20px;
  height: 20px;
}

.sidebar-label {
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-group summary.sidebar-link {
  list-style: none;
  justify-content: flex-start;
}

.sidebar-group summary.sidebar-link::-webkit-details-marker {
  display: none;
}

.sidebar-caret {
  margin-left: auto;
  display: flex;
  transition: transform 0.15s ease;
}

.sidebar-group[open] .sidebar-caret {
  transform: rotate(90deg);
}

.sidebar-submenu {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-left: 20px;
  margin-top: 2px;
}

.app-shell.sidebar-collapsed .sidebar-caret,
.app-shell.sidebar-collapsed .sidebar-submenu {
  display: none;
}

.sidebar-bottom {
  padding: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.sidebar-logout-btn {
  color: rgba(255, 255, 255, 0.85);
}

.app-shell.sidebar-collapsed .sidebar-brand-text,
.app-shell.sidebar-collapsed .sidebar-label {
  display: none;
}

.app-main {
  flex: 1;
  min-width: 0;
  padding: 32px 28px 60px;
  overflow-x: auto;
}

@media (max-width: 640px) {
  .app-main {
    padding: 20px 14px 40px;
  }
}

.login-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 22px;
}

.login-logo {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: var(--azul);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 10px;
}

.login-title {
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--azul);
}

.login-subtitle {
  font-size: 0.85rem;
  color: #5a6b7a;
  margin-top: 2px;
}
