* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font-family:
    system-ui,
    -apple-system,
    Arial,
    sans-serif;
  background: #f5f5f7;
  color: #222;
}

.app-header {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 12px 24px;
  background: #fff;
  border-bottom: 1px solid #e2e2e2;
}
.app-header-logo {
  font-weight: 700;
}
.app-nav {
  flex: 1;
}
.app-nav-link {
  color: #555;
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 6px;
}
.app-nav-link.active {
  background: #6c5ce7;
  color: #fff;
}
.app-header-user {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
}
.app-header-user a {
  color: #6c5ce7;
  text-decoration: none;
}

.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}
.login-box {
  background: #fff;
  padding: 32px;
  border-radius: 12px;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.08);
  width: 100%;
  max-width: 340px;
}
.login-box h1 {
  font-size: 18px;
  margin-bottom: 20px;
}
.login-box label {
  display: block;
  margin-bottom: 14px;
  font-size: 13px;
  font-weight: 600;
}
.login-box input {
  display: block;
  width: 100%;
  margin-top: 4px;
  padding: 9px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
  box-sizing: border-box;
}
.login-box .btn {
  width: 100%;
  margin-top: 8px;
}
.login-erro {
  color: #c0392b;
  font-size: 13px;
  margin-bottom: 14px;
}

.curriculo-bloco {
  background: #fff;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 20px;
}
.curriculo-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.curriculo-header h2 {
  font-size: 15px;
  margin: 0;
}
.curriculo-de-quem {
  display: block;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 10px;
}
.curriculo-de-quem input {
  display: block;
  width: 260px;
  margin-top: 4px;
  padding: 6px 8px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 13px;
  font-family: inherit;
}
.curriculo-textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-family: monospace;
  font-size: 12px;
  line-height: 1.5;
  margin-bottom: 8px;
  resize: vertical;
}

.page-container {
  padding: 24px;
  max-width: 1000px;
  margin: 0 auto;
}
.page-container:has(.leads-page),
.page-container:has(.fontes-page) {
  max-width: none;
  margin: 0;
}

.leads-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.leads-filtros {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
  margin-bottom: 16px;
}
.leads-filtros label {
  font-size: 12px;
  font-weight: 600;
  color: #666;
}
.leads-filtros input,
.leads-filtros select {
  display: block;
  margin-top: 4px;
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
}
.leads-filtros .btn {
  margin-top: 0;
}
.leads-filtros .data-campo {
  position: relative;
  display: flex;
  align-items: flex-end;
  gap: 4px;
}
.leads-filtros .data-campo-picker {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 1px;
  height: 1px;
  margin: 0;
  padding: 0;
  border: 0;
  opacity: 0;
  pointer-events: none;
}
.leads-filtros .data-campo-btn {
  margin-top: 4px;
  padding: 9px 10px;
  border: 1px solid #ddd;
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
}
.leads-table th.th-ordenar {
  cursor: pointer;
  user-select: none;
}
.leads-table th.th-ordenar:hover {
  color: #6c5ce7;
}
.th-seta {
  color: #ccc;
  font-size: 10px;
}
.leads-table th.th-ativo .th-seta {
  color: #6c5ce7;
}
.leads-filtros .leads-aviso {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  font-weight: 400;
  color: #c0392b;
}
.leads-paginacao {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
}
.leads-paginacao label {
  font-size: 12px;
  font-weight: 600;
  color: #666;
}
.leads-paginacao select {
  margin-left: 6px;
  padding: 6px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 13px;
  font-family: inherit;
}
.leads-paginacao-contador {
  display: flex;
  align-items: center;
  gap: 12px;
}
.leads-paginacao .btn {
  margin-top: 0;
}

.btn {
  border: 1px solid #ddd;
  background: #fff;
  border-radius: 8px;
  padding: 8px 14px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 12px;
}
.btn-primary {
  background: #6c5ce7;
  color: #fff;
  border: none;
  margin-top: 0;
}
.btn-link {
  background: none;
  border: none;
  color: #6c5ce7;
  cursor: pointer;
}

.leads-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
}
.leads-table th,
.leads-table td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid #eee;
  font-size: 14px;
}
.leads-table th {
  background: #fafafa;
  font-size: 12px;
  text-transform: uppercase;
  color: #888;
}
.leads-page .leads-table tbody tr:nth-child(even) {
  background: #f8f8f8;
}
#fonteResultado .leads-table tbody tr:nth-child(even) {
  background: #f1f1f5;
}
.muted {
  color: #999;
  font-size: 12px;
}
.status-select {
  padding: 4px 6px;
  border-radius: 6px;
  border: 1px solid #ddd;
}

.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  display: none;
  z-index: 998;
}
.drawer-overlay.open {
  display: block;
}
.drawer {
  position: fixed;
  top: 0;
  right: -650px;
  width: 630px;
  height: 100%;
  background: #fff;
  box-shadow: -2px 0 12px rgba(0, 0, 0, 0.15);
  z-index: 999;
  transition: right 0.2s ease;
  padding: 20px;
  overflow-y: auto;
}
.drawer.open {
  right: 0;
}
.drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.drawer-header button {
  border: none;
  background: none;
  font-size: 22px;
  cursor: pointer;
}
.drawer-content {
  overflow-wrap: break-word;
  word-break: break-word;
}
.drawer-content pre {
  white-space: pre-wrap;
  word-break: break-word;
  font-family: monospace;
  font-size: 12px;
  line-height: 1.5;
}
.vaga-retrato {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid #eee;
}
.vaga-descricao {
  max-height: 220px;
  overflow-y: auto;
  background: #fafafa;
  border-radius: 6px;
  padding: 10px;
}
.vaga-acoes {
  display: flex;
  gap: 8px;
  margin-top: 14px;
}
.vaga-acoes .btn {
  margin-top: 0;
}

.vaga-accordion {
  margin-top: 12px;
  border: 1px solid #eee;
  border-radius: 8px;
  padding: 8px 12px;
  background: #fff;
}
.fontes-cadastro {
  margin-bottom: 20px;
}
.cadastro-campos label {
  display: block;
  margin: 10px 0;
  font-size: 13px;
  font-weight: 600;
}
.cadastro-campos input,
.cadastro-campos select,
.cadastro-campos textarea {
  display: block;
  width: 100%;
  max-width: 640px;
  margin-top: 4px;
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 13px;
  font-family: inherit;
}
.cadastro-campos textarea {
  font-family: monospace;
  font-size: 11px;
  resize: vertical;
}
.acc-titulo {
  font-weight: 700;
  font-size: 13px;
  color: #333;
  text-transform: none;
}
.acc-meta {
  font-size: 11px;
  font-weight: 400;
  color: #888;
  text-transform: none;
}
.vaga-accordion summary {
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  color: #666;
  text-transform: uppercase;
}
.vaga-ia {
  margin-top: 14px;
}
.vaga-analise {
  margin-top: 12px;
  padding: 12px;
  background: #fafafa;
  border-radius: 8px;
}
.vaga-analise ul {
  margin: 4px 0 10px;
  padding-left: 20px;
}
.vaga-analise li {
  font-size: 13px;
  margin-bottom: 2px;
}

#formNovoLead label {
  display: block;
  margin-bottom: 12px;
  font-size: 13px;
  font-weight: 600;
}
#formNovoLead input,
#formNovoLead select,
#formNovoLead textarea {
  display: block;
  width: 100%;
  margin-top: 4px;
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
}

.fontes-testar .fonte-nao-salvas {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 38px;
  font-weight: 400;
  font-size: 13px;
  color: #666;
}
.fontes-testar .fonte-nao-salvas input {
  display: inline-block;
  width: auto;
  min-width: 0;
  margin: 0;
  padding: 0;
}
.fontes-testar {
  display: flex;
  gap: 16px;
  align-items: flex-end;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.fontes-testar label {
  font-size: 13px;
  font-weight: 600;
}
.fontes-testar input,
.fontes-testar select {
  display: block;
  margin-top: 4px;
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
  min-width: 260px;
}
.muted {
  color: #999;
  font-size: 13px;
}
.fonte-resultado-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 16px 0 8px;
}
.fonte-palavras-usadas {
  font-size: 12px;
  color: #888;
  margin-bottom: 20px;
}
.palavra-chip {
  background: #eee;
  border: none;
  border-radius: 12px;
  padding: 3px 10px;
  margin: 2px 2px;
  font-size: 12px;
  cursor: pointer;
  color: #444;
}
.palavra-chip:hover {
  background: #ddd;
}

.ajuda-page h1 {
  margin-bottom: 4px;
}
.ajuda-page h2 {
  margin-top: 28px;
  font-size: 16px;
}
.ajuda-page ol,
.ajuda-page ul {
  padding-left: 20px;
  line-height: 1.6;
}
.ajuda-page li {
  margin-bottom: 4px;
}

.badge-dup {
  display: block;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 10px;
  white-space: nowrap;
  margin-top: 4px;
  width: fit-content;
}
.badge-dup-exato {
  background: #e0e0e0;
  color: #555;
}
.badge-dup-parecido {
  background: #fff3cd;
  color: #8a6d3b;
}

.fonte-lote-header td {
  background: #f5f5f7;
  font-weight: 600;
  font-size: 12px;
  color: #888;
  padding: 6px 12px;
}
.fonte-status .st {
  display: inline-block;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 10px;
  background: #eee;
  color: #666;
  white-space: nowrap;
}
.fonte-status .st-ok {
  background: #d4f5dd;
  color: #1d7a3a;
}
.fonte-status .st-no {
  background: #f7d4d4;
  color: #a33333;
}
.fonte-status .st-ia {
  background: #dcd6fb;
  color: #5b46d6;
}
