body { font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif; }

/* ---- painéis e tipografia ---- */
.card-painel {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  padding: 1.25rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
@media (min-width: 640px) { .card-painel { padding: 1.5rem; } }

.titulo-sec { font-size: 0.95rem; font-weight: 600; color: #0f172a; }
.rotulo { display: block; font-size: 0.78rem; font-weight: 500; color: #475569; }

.campo {
  display: block;
  width: 100%;
  margin-top: 0.3rem;
  padding: 0.6rem 0.8rem;
  border: 1px solid #cbd5e1;
  border-radius: 0.65rem;
  background: #fff;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.campo:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18);
}

/* ---- accordion ---- */
.grupo > summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: #2563eb;
  user-select: none;
}
.grupo > summary::-webkit-details-marker { display: none; }
.grupo > summary::before {
  content: '▸';
  display: inline-block;
  transition: transform 0.15s;
}
.grupo[open] > summary::before { transform: rotate(90deg); }

/* ---- botões ---- */
.btn-prim {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.4rem;
  border: 0;
  border-radius: 0.65rem;
  background: #2563eb;
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}
.btn-prim:hover { background: #1d4ed8; }
.btn-prim:disabled { opacity: 0.6; cursor: not-allowed; }
.btn-prim.btn-sm { padding: 0.5rem 0.9rem; font-size: 0.85rem; border-radius: 0.55rem; }

.btn-sec {
  padding: 0.45rem 0.85rem;
  border: 1px solid #cbd5e1;
  border-radius: 0.6rem;
  background: #fff;
  font-size: 0.85rem;
  font-weight: 500;
  color: #334155;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.btn-sec:hover { background: #f1f5f9; }
.btn-sec.ativo { background: #fef3c7; border-color: #f59e0b; color: #92400e; }
.btn-sec:disabled { opacity: 0.6; cursor: not-allowed; }

.btn-acao {
  padding: 0.5rem 0.8rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.55rem;
  background: #fff;
  font-size: 0.82rem;
  font-weight: 500;
  color: #475569;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.btn-acao:hover { background: #f8fafc; border-color: #cbd5e1; }
.btn-acao.interesse-on { background: #fffbeb; border-color: #f59e0b; color: #92400e; }
.btn-acao.restaurar { border-color: #2563eb; color: #1d4ed8; }

.link-discreto {
  background: none;
  border: 0;
  padding: 0;
  color: #94a3b8;
  font-size: 0.75rem;
  text-decoration: underline dotted;
  cursor: pointer;
}
.link-discreto:hover { color: #475569; }

/* ---- switch (exibir ocultas) ---- */
.switch {
  position: relative;
  flex-shrink: 0;
  width: 2.25rem;
  height: 1.25rem;
  border-radius: 9999px;
  background: #cbd5e1;
  transition: background 0.15s;
}
.switch::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
  transition: transform 0.15s;
}
input:checked + .switch { background: #2563eb; }
input:checked + .switch::after { transform: translateX(1rem); }
input:focus-visible + .switch { box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.3); }

/* ---- chips de modalidade ---- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.28rem 0.75rem;
  border: 1px solid #cbd5e1;
  border-radius: 9999px;
  background: #fff;
  font-size: 0.82rem;
  cursor: pointer;
  user-select: none;
  transition: border-color 0.15s;
}
.chip:hover { border-color: #2563eb; }
.chip.ativo { background: #2563eb; border-color: #2563eb; color: #fff; }
.chip.vazio:not(.ativo) { opacity: 0.5; }
.chip-n { font-size: 0.75rem; opacity: 0.75; }

/* ---- cards de licitação ---- */
.card-licitacao {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  padding: 1.25rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  transition: box-shadow 0.15s, border-color 0.15s;
}
.card-licitacao:hover { box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08); border-color: #cbd5e1; }

.dist-pill {
  flex-shrink: 0;
  padding: 0.2rem 0.65rem;
  border-radius: 9999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 0.8rem;
  font-weight: 600;
}
.tag-mod, .tag-oculta {
  display: inline-block;
  padding: 0.1rem 0.5rem;
  border-radius: 0.4rem;
  font-size: 0.68rem;
  font-weight: 600;
}
.tag-mod { background: #f1f5f9; color: #475569; }
.tag-oculta { background: #e2e8f0; color: #475569; }

.badge-novo {
  display: inline-block;
  padding: 0.1rem 0.45rem;
  border-radius: 0.4rem;
  background: #dcfce7;
  color: #166534;
  font-size: 0.68rem;
  font-weight: 700;
}
.badge-prazo {
  display: inline-block;
  margin-top: 0.25rem;
  padding: 0.1rem 0.55rem;
  border-radius: 9999px;
  font-size: 0.72rem;
  font-weight: 600;
}

.spinner {
  width: 20px;
  height: 20px;
  border: 3px solid #bfdbfe;
  border-top-color: #2563eb;
  border-radius: 50%;
  animation: giro 0.8s linear infinite;
}
@keyframes giro { to { transform: rotate(360deg); } }

/* ---- modal da conta ---- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.modal.hidden { display: none; }
.modal-fundo { position: absolute; inset: 0; background: rgba(15, 23, 42, 0.45); }
.modal-caixa {
  position: relative;
  width: 100%;
  max-width: 26rem;
  max-height: 90vh;
  overflow-y: auto;
  background: #fff;
  border-radius: 1rem;
  padding: 1.5rem;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.25);
}
.modal-x {
  position: absolute;
  top: 0.6rem;
  right: 0.8rem;
  border: 0;
  background: none;
  font-size: 1.5rem;
  line-height: 1;
  color: #94a3b8;
  cursor: pointer;
}
.modal-x:hover { color: #475569; }

.abas { display: flex; gap: 0.25rem; padding: 0.25rem; margin: 1rem 0; background: #f1f5f9; border-radius: 0.7rem; }
.aba {
  flex: 1;
  padding: 0.45rem;
  border: 0;
  border-radius: 0.55rem;
  background: transparent;
  font-size: 0.85rem;
  font-weight: 500;
  color: #64748b;
  cursor: pointer;
}
.aba.ativo { background: #fff; color: #0f172a; box-shadow: 0 1px 2px rgba(15, 23, 42, 0.1); }

.kw {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.4rem 0.2rem 0.7rem;
  border-radius: 9999px;
  background: #eff6ff;
  color: #1e40af;
  font-size: 0.8rem;
}
.kw button { border: 0; background: none; color: #60a5fa; font-size: 1rem; line-height: 1; cursor: pointer; }
.kw button:hover { color: #1e40af; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation-duration: 0.01ms !important; }
}
