/* cartorios-manager.css - Estilos para Gestão de Cartórios e Multi-Clientes */

/* Indicador de Cartório Ativo no Topo */
.active-cartorio-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, #0d233a 0%, #153e6b 100%);
  color: #ffffff;
  padding: 8px 16px;
  border-radius: 8px;
  margin-bottom: 16px;
  box-shadow: 0 2px 8px rgba(13, 35, 58, 0.15);
  font-size: 13.5px;
  animation: fadeInDown 0.3s ease-out;
}
.active-cartorio-info {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.active-cartorio-logo {
  max-height: 28px;
  max-width: 90px;
  object-fit: contain;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.9);
  padding: 2px 4px;
}
.active-cartorio-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.15);
  padding: 3px 10px;
  border-radius: 20px;
  font-weight: 600;
  letter-spacing: 0.2px;
}
.active-cartorio-badge .cartorio-tag {
  background: #3b82f6;
  color: #fff;
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 10px;
  text-transform: uppercase;
}
.active-cartorio-city {
  opacity: 0.9;
  font-size: 12.5px;
}
.active-cartorio-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.active-cartorio-actions a,
.active-cartorio-actions button {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
}
.active-cartorio-actions a:hover,
.active-cartorio-actions button:hover {
  background: rgba(255, 255, 255, 0.35);
}

/* Área de Gestão de Cartórios */
.cartorios-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.cartorios-header-card {
  background: #ffffff;
  border-radius: 10px;
  padding: 18px 22px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.cartorios-title-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 14px;
}

.cartorios-title-row h2 {
  margin: 0 0 4px 0;
  font-size: 18px;
  color: #0f172a;
}

.cartorios-title-row p {
  margin: 0;
  color: #64748b;
  font-size: 13px;
  line-height: 1.4;
}

.cartorios-stats-chips {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.cartorio-stat-chip {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 5px 12px;
  font-size: 12.5px;
  color: #334155;
  font-weight: 500;
}
.cartorio-stat-chip strong {
  color: #0284c7;
}

.cartorios-actions-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.btn-action-cartorio {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 500;
  border-radius: 6px;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
}

.btn-action-cartorio.primary {
  background: #0284c7;
  color: #ffffff;
}
.btn-action-cartorio.primary:hover {
  background: #0369a1;
}

.btn-action-cartorio.secondary {
  background: #f8fafc;
  color: #334155;
  border: 1px solid #cbd5e1;
}
.btn-action-cartorio.secondary:hover {
  background: #e2e8f0;
}

/* Barra de Filtros e Busca */
.cartorios-filter-bar {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  background: #ffffff;
  padding: 12px 18px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}

.cartorios-search-input {
  flex: 1;
  min-width: 240px;
  padding: 8px 14px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 13.5px;
  outline: none;
}
.cartorios-search-input:focus {
  border-color: #0284c7;
  box-shadow: 0 0 0 2px rgba(2, 132, 199, 0.15);
}

.cartorios-type-filter {
  display: flex;
  gap: 4px;
  background: #f1f5f9;
  padding: 3px;
  border-radius: 6px;
}
.type-filter-btn {
  border: none;
  background: transparent;
  padding: 5px 12px;
  border-radius: 4px;
  font-size: 12px;
  cursor: pointer;
  color: #64748b;
  font-weight: 500;
}
.type-filter-btn.active {
  background: #ffffff;
  color: #0284c7;
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

/* Tabela de Cartórios */
.cartorios-table-wrapper {
  background: #ffffff;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}

.cartorios-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13px;
}

.cartorios-table th {
  background: #f8fafc;
  color: #475569;
  font-weight: 600;
  padding: 10px 14px;
  border-bottom: 1px solid #e2e8f0;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.cartorios-table td {
  padding: 10px 14px;
  border-bottom: 1px solid #f1f5f9;
  color: #1e293b;
  vertical-align: middle;
}

.cartorios-table tbody tr:hover {
  background-color: #f8fafc;
}

.cartorio-id-badge {
  display: inline-block;
  font-weight: 700;
  color: #0369a1;
  background: #e0f2fe;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 12px;
}

.cartorio-name-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.cartorio-name-title {
  font-weight: 600;
  color: #0f172a;
}
.cartorio-name-slug {
  font-size: 11px;
  color: #94a3b8;
  font-family: monospace;
}

.cartorio-kind-tag {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
}
.kind-notas {
  background: #ecfdf5;
  color: #059669;
  border: 1px solid #a7f3d0;
}
.kind-registro {
  background: #eff6ff;
  color: #2563eb;
  border: 1px solid #bfdbfe;
}
.kind-protesto {
  background: #fffbeb;
  color: #d97706;
  border: 1px solid #fde68a;
}

.cartorio-url-box {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 11.5px;
  font-family: monospace;
  color: #475569;
  max-width: 230px;
}
.cartorio-url-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
}

.btn-copy-url {
  background: #0284c7;
  color: #fff;
  border: none;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.btn-copy-url:hover {
  background: #0369a1;
}

.cartorios-action-btns {
  display: flex;
  gap: 6px;
}
.btn-cartorio-action {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #475569;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 11.5px;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-cartorio-action:hover {
  background: #f1f5f9;
  color: #0f172a;
}
.btn-cartorio-action.delete {
  color: #ef4444;
  border-color: #fecaca;
}
.btn-cartorio-action.delete:hover {
  background: #fee2e2;
}

/* Modal de Importação em Lote */
.bulk-import-modal textarea {
  width: 100%;
  height: 220px;
  padding: 10px;
  font-family: monospace;
  font-size: 12px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  resize: vertical;
  line-height: 1.4;
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
