/* =====================================================================
   Voyger — Ajustes globais de UI
   Inputs cianos + evidência visual de botões para todo o sistema.
   Usa !important apenas onde precisa vencer o estilo próprio dos módulos.
   ===================================================================== */

input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="button"]):not([type="submit"]):not([type="reset"]):not([type="image"]):not([type="color"]):not([type="file"]):not([type="hidden"]),
textarea,
select {
  background-color: #D9FFFF !important;
  color: #08282b !important;
  caret-color: #08282b !important;
  border-color: #2bd4d4 !important;
  -webkit-text-fill-color: #08282b !important; /* evita texto branco em autofill/webkit */
}

/* Placeholder legível sobre o ciano */
input::placeholder,
textarea::placeholder,
select::placeholder {
  color: rgba(8, 40, 43, 0.55) !important;
  opacity: 1 !important;
}

/* Opções do <select> (dropdown aberto) mantêm o mesmo contraste */
select option,
select optgroup {
  background-color: #D9FFFF !important;
  color: #08282b !important;
}

/* Foco: mantém o ciano, apenas realça a borda */
input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="button"]):not([type="submit"]):not([type="reset"]):not([type="image"]):not([type="color"]):not([type="file"]):not([type="hidden"]):focus,
textarea:focus,
select:focus {
  background-color: #D9FFFF !important;
  color: #08282b !important;
  border-color: #2bd4d4 !important;
}

/* Autofill do Chrome/WebKit costuma pintar de amarelo — força o ciano */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
textarea:-webkit-autofill,
select:-webkit-autofill {
  -webkit-text-fill-color: #08282b !important;
  caret-color: #08282b !important;
  box-shadow: 0 0 0px 1000px #D9FFFF inset !important;
  -webkit-box-shadow: 0 0 0px 1000px #D9FFFF inset !important;
  border-color: #2bd4d4 !important;
}

/* Botões: deixa qualquer ação claramente clicável sem alterar layout/cor do módulo */
button:not(.crm-grid-resize-handle):not([data-no-global-button-effect]) {
  outline: 1px solid rgba(15, 23, 42, 0.16) !important;
  outline-offset: -1px !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.12), 0 8px 18px -14px rgba(15, 23, 42, 0.42) !important;
  transition: translate 0.12s ease, box-shadow 0.12s ease, outline-color 0.12s ease, background-color 0.12s ease, border-color 0.12s ease, color 0.12s ease, opacity 0.12s ease !important;
  -webkit-tap-highlight-color: transparent;
}

button:not(.crm-grid-resize-handle):not([data-no-global-button-effect]):hover:not(:disabled) {
  outline-color: rgba(var(--vt-primary-r, 15), var(--vt-primary-g, 23), var(--vt-primary-b, 42), 0.38) !important;
  box-shadow: 0 2px 5px rgba(15, 23, 42, 0.16), 0 12px 26px -16px rgba(var(--vt-primary-r, 15), var(--vt-primary-g, 23), var(--vt-primary-b, 42), 0.48) !important;
  translate: 0 -1px;
}

button:not(.crm-grid-resize-handle):not([data-no-global-button-effect]):active:not(:disabled) {
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.12), inset 0 1px 2px rgba(15, 23, 42, 0.16) !important;
  translate: 0 0;
}

button:not(.crm-grid-resize-handle):not([data-no-global-button-effect]):focus-visible {
  outline: 2px solid rgba(var(--vt-primary-r, 15), var(--vt-primary-g, 23), var(--vt-primary-b, 42), 0.58) !important;
  outline-offset: 2px !important;
}

button:not(.crm-grid-resize-handle):not([data-no-global-button-effect]):disabled,
button:not(.crm-grid-resize-handle):not([data-no-global-button-effect])[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.58;
  translate: 0 0;
}

html[data-theme="dark"] button:not(.crm-grid-resize-handle):not([data-no-global-button-effect]),
body[data-theme="dark"] button:not(.crm-grid-resize-handle):not([data-no-global-button-effect]),
[data-theme="dark"] button:not(.crm-grid-resize-handle):not([data-no-global-button-effect]) {
  outline-color: rgba(255, 255, 255, 0.18) !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.34), 0 10px 22px -16px rgba(0, 0, 0, 0.72) !important;
}

html[data-theme="dark"] button:not(.crm-grid-resize-handle):not([data-no-global-button-effect]):hover:not(:disabled),
body[data-theme="dark"] button:not(.crm-grid-resize-handle):not([data-no-global-button-effect]):hover:not(:disabled),
[data-theme="dark"] button:not(.crm-grid-resize-handle):not([data-no-global-button-effect]):hover:not(:disabled) {
  outline-color: rgba(var(--vt-primary-r, 255), var(--vt-primary-g, 255), var(--vt-primary-b, 255), 0.48) !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.42), 0 14px 28px -16px rgba(var(--vt-primary-r, 0), var(--vt-primary-g, 0), var(--vt-primary-b, 0), 0.82) !important;
}

html[data-theme="dark"] button:not(.crm-grid-resize-handle):not([data-no-global-button-effect]):focus-visible,
body[data-theme="dark"] button:not(.crm-grid-resize-handle):not([data-no-global-button-effect]):focus-visible,
[data-theme="dark"] button:not(.crm-grid-resize-handle):not([data-no-global-button-effect]):focus-visible {
  outline-color: rgba(var(--vt-primary-r, 255), var(--vt-primary-g, 255), var(--vt-primary-b, 255), 0.62) !important;
}

/* A busca da header é parte do chrome de navegação, não de um formulário. */
.dashboard-header .search-bar input {
  background-color: var(--header-control, #f7f8fb) !important;
  color: var(--header-text, #172033) !important;
  border-color: var(--header-border, rgba(15, 23, 42, 0.09)) !important;
  -webkit-text-fill-color: var(--header-text, #172033) !important;
}

.dashboard-header .search-bar input::placeholder {
  color: var(--header-muted, #737b8c) !important;
}

.dashboard-header .search-bar input:focus {
  background-color: #fff !important;
  border-color: color-mix(in srgb, var(--vt-primary, #2563eb) 38%, transparent) !important;
}

[data-theme="dark"] .dashboard-header .search-bar input {
  background-color: rgba(255, 255, 255, 0.06) !important;
  color: #f3f4f6 !important;
  border-color: rgba(255, 255, 255, 0.11) !important;
  -webkit-text-fill-color: #f3f4f6 !important;
}

[data-theme="dark"] .dashboard-header .search-bar input:focus {
  background-color: rgba(255, 255, 255, 0.1) !important;
}

@media (max-width: 640px) {
  .dashboard-header .search-bar input:not(:focus) {
    color: transparent !important;
    -webkit-text-fill-color: transparent !important;
  }

  .dashboard-header .search-bar input:not(:focus)::placeholder {
    color: transparent !important;
  }
}
