/* PRECIFICA - Contraste e legibilidade dos campos
   Correção visual isolada: não altera cálculos, validações ou dados. */
:root {
    color-scheme: dark;
}

/* Campos editáveis, preenchidos automaticamente, somente leitura e desabilitados */
input:not([type="hidden"]),
textarea,
select {
    color: #f4fff9 !important;
    -webkit-text-fill-color: #f4fff9 !important;
    opacity: 1 !important;
    background-color: #101b17 !important;
    border: 1px solid #527566 !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    text-shadow: none !important;
    caret-color: #36e6ad !important;
}

/* Campos bloqueados continuam claramente legíveis, com fundo distinto */
input:disabled,
textarea:disabled,
select:disabled,
input[readonly],
textarea[readonly] {
    color: #e7fff3 !important;
    -webkit-text-fill-color: #e7fff3 !important;
    opacity: 1 !important;
    background-color: #172720 !important;
    border-color: #668b79 !important;
    cursor: not-allowed;
}

/* O navegador aplica opacidade própria a controles disabled */
input:disabled,
textarea:disabled,
select:disabled {
    filter: none !important;
}

/* Texto de orientação dentro dos campos */
input::placeholder,
textarea::placeholder {
    color: #a9c2b5 !important;
    -webkit-text-fill-color: #a9c2b5 !important;
    opacity: 1 !important;
    font-weight: 400 !important;
}

/* Foco bem visível para digitação */
input:focus,
textarea:focus,
select:focus {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    border-color: #36e6ad !important;
    outline: 2px solid rgba(54, 230, 173, .28) !important;
    outline-offset: 1px !important;
    box-shadow: 0 0 0 3px rgba(54, 230, 173, .12) !important;
}

/* Opções dos seletores */
select option {
    color: #f4fff9 !important;
    background: #101b17 !important;
}

/* Rótulos e instruções associados aos campos */
label {
    color: #c5d9cf !important;
}

label small,
.hint,
.help,
.field-help {
    color: #a9c2b5 !important;
}

/* Valores de campos numéricos e autofill */
input[type="number"],
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="password"],
input[type="date"],
input[type="time"],
input[type="search"] {
    font-variant-numeric: tabular-nums;
}

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
    -webkit-text-fill-color: #f4fff9 !important;
    box-shadow: 0 0 0 1000px #101b17 inset !important;
    transition: background-color 9999s ease-out 0s;
}

/* Mantém contraste também em navegadores com regras de alto contraste */
@media (forced-colors: active) {
    input:not([type="hidden"]),
    textarea,
    select {
        forced-color-adjust: auto;
    }
}
