/* ============================================================================
 * REFINAMENTOS — Buttons, Form Inputs, Month Selector, Input Group, Spinner
 * ============================================================================
 * Carregado depois de custom.css + 00-tokens-bridge.css. Usa só seletores
 * já existentes no vsx-financeiro — nenhuma classe nova, nenhum .vsx-*.
 * Refina cor/foco/sombra/transição; não altera padding/width/min-height.
 * ============================================================================ */

/* ── Buttons: focus-visible acessível (ausente hoje em todas as variantes) ── */
.btn:focus-visible {
  outline: none;
  /* anel de 2px em focus-ring sobre --bg garante contraste real p/ teclado */
  box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--focus-ring);
}

/* disabled não deve responder a clique/hover, só o cursor já sinaliza isso hoje */
.btn:disabled {
  pointer-events: none;
}

/* ── Primary: brightness em vez de opacity (mantém saturação do gradiente) ── */
.btn-primary:hover:not(:disabled) {
  opacity: 1;
  filter: brightness(1.08);
}
.btn-primary:active:not(:disabled) {
  filter: brightness(0.95);
  transform: translateY(1px);
}

/* ── Secondary: active mais perceptível que só a borda do hover ── */
.btn-secondary:active:not(:disabled) {
  background: var(--bg-hover);
}

/* ── Success / Danger / Warning: active consistente com o hover existente ── */
.btn-success:active:not(:disabled) { background: rgba(16, 185, 129, 0.28); }
.btn-danger:active:not(:disabled)  { background: rgba(239, 68, 68, 0.3); }
.btn-warning:active:not(:disabled) { background: rgba(245, 158, 11, 0.3); }

/* ── Ghost: active para fechar o ciclo hover/active dos demais botões ── */
.btn-ghost:active:not(:disabled) {
  background: var(--bg-card2);
}

/* ── Form Inputs: anel de foco em focus-ring (accent-dim tem baixo contraste) ── */
.form-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--focus-ring);
}

.form-input:hover:not(:disabled):not(:focus) {
  border-color: var(--text-3);
}

.form-input:disabled {
  pointer-events: none;
}

/* Mesmo anel de foco em elementos nativos que só respondem a :focus (não :focus-visible) */
.form-input:focus-visible {
  box-shadow: 0 0 0 3px var(--focus-ring);
}

/* ── Month Selector: hover sutil (é clicável no fluxo, mesmo com cursor:default) ── */
.month-selector:hover {
  border-color: var(--text-3);
}

/* ── Input Group: o :focus do input interno não deve perder o anel ao lado do botão ── */
.input-group .form-input:focus {
  position: relative;
  z-index: 1;
}
