/* Tag */
.tag {
  display: inline-block;
  padding: 2px 8px;
  background: #f1f5f9;
  border-radius: 999px;
  margin-right: 6px;
  font-size: 12px;
}

/* Links */
a { color: #0ea5e9; text-decoration: none; }
a:hover { text-decoration: underline; }

/* Code */
code {
  background: #f1f5f9;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: ui-monospace, monospace;
  font-size: 0.9em;
}

/* Autocomplete */
.autocomplete { position: relative; }
.autocomplete-list {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  max-height: 200px;
  overflow: auto;
  z-index: 1000;
  margin-top: 4px;
}
.autocomplete-item {
  padding: 8px 12px;
  cursor: pointer;
}
.autocomplete-item:hover { background: #f8fafc; }

/* Pill */
.pill {
  display: inline-block;
  padding: 4px 8px;
  background: #e2e8f0;
  border-radius: 999px;
  margin-right: 6px;
  margin-bottom: 4px;
  font-size: 12px;
}

/* Fieldline */
.fieldline {
  padding: 6px 8px;
  border-bottom: 1px solid #f1f5f9;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* List (genérica) */
.list {
  max-height: 320px;
  overflow: auto;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 6px;
  background: #fff;
}

/* CID list */
.cid-row {
  padding: 8px;
  border-bottom: 1px solid #f1f5f9;
  cursor: pointer;
}
.cid-row:hover { background: #f8fafc; }

/* Chip / Side buttons (GLOBAL)
   (antes você tinha isso no <style> do head, então fica aqui) */
.chip {
  padding: 6px 10px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  border-radius: 8px;
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.4px;
  color: #334155;
  font-weight: 700;
  cursor: pointer;
}
.chip.active {
  background: #e2e8f0;
  border-color: #94a3b8;
}

.sidebtn {
  padding: 8px 10px;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.4px;
  text-align: left;
  color: #334155;
  font-weight: 700;
  cursor: pointer;
}
.sidebtn.danger {
  background: #fef2f2;
  border-color: #ef4444;
  color: #ef4444;
}
.sidebtn:hover, .chip:hover {
  background: #f1f5f9;
}


/* ============================= */
/*        MODAL — ALTO CUSTO      */
/* ============================= */
.hc-overlay{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.35);
  display:flex;
  align-items:center;
  justify-content:center;
  z-index: 9999;
}
.hc-overlay.hidden{ display:none !important; }

.hc-panel{
  width:min(860px, 92vw);
  max-height: 90vh;
  background:#fff;
  border:1px solid #e5e7eb;
  border-radius:12px;
  overflow:hidden;
  box-shadow:0 10px 25px rgba(0,0,0,.2);
  display:flex;
  flex-direction:column;
}

.hc-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:10px 14px;
  background:#0b7285;
  color:#fff;
}

.hc-close{
  border:none;
  background:transparent;
  color:#fff;
  font-size:22px;
  cursor:pointer;
  line-height: 1;
}

.hc-body{
  padding:12px 14px;
  display:flex;
  flex-direction:column;
  gap:10px;
}

.hc-list{
  max-height: 420px;
  overflow:auto;
  border:1px solid #e5e7eb;
  border-radius:10px;
  background:#fff;
}

.hc-row{
  padding: 10px 12px;
  border-bottom: 1px solid #f1f5f9;
  cursor:pointer;
}
.hc-row:hover{ background:#f8fafc; }

.hc-name{ font-weight:800; color:#0f172a; font-size: 13px; }
.hc-sub{ color:#64748b; font-size: 12px; margin-top: 2px; }

.hc-footer{
  padding:10px 14px;
  border-top: 1px solid #e5e7eb;
  display:flex;
  justify-content:flex-end;
  gap:8px;
}
