/* V60 — Campos Estado / Ativo melhorados */
.form-group:has(input[type="checkbox"]),
.form-field:has(input[type="checkbox"]),
.field:has(input[type="checkbox"]),
.checkbox-group,
.status-field,
.estado-field {
    display: flex !important;
    align-items: center !important;
    gap: 14px !important;
    flex-wrap: wrap;
}

input[type="checkbox"] {
    appearance: none !important;
    -webkit-appearance: none !important;
    width: 54px !important;
    height: 30px !important;
    min-width: 54px !important;
    border: 0 !important;
    border-radius: 999px !important;
    background: #d7dce5 !important;
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, .12) !important;
    position: relative !important;
    cursor: pointer !important;
    transition: background .2s ease, box-shadow .2s ease, transform .2s ease !important;
    vertical-align: middle !important;
    margin: 0 !important;
}

input[type="checkbox"]::before {
    content: "" !important;
    position: absolute !important;
    top: 4px !important;
    left: 4px !important;
    width: 22px !important;
    height: 22px !important;
    border-radius: 50% !important;
    background: #fff !important;
    box-shadow: 0 3px 8px rgba(15, 23, 42, .22) !important;
    transition: transform .2s ease !important;
}

input[type="checkbox"]:checked {
    background: linear-gradient(135deg, #22c55e, #16a34a) !important;
    box-shadow: inset 0 0 0 1px rgba(22, 163, 74, .25), 0 0 0 4px rgba(34, 197, 94, .12) !important;
}

input[type="checkbox"]:checked::before {
    transform: translateX(24px) !important;
}

input[type="checkbox"]:focus-visible {
    outline: none !important;
    box-shadow: 0 0 0 4px rgba(249, 115, 22, .25) !important;
}

input[type="checkbox"]:disabled {
    opacity: .55 !important;
    cursor: not-allowed !important;
}

input[type="checkbox"] + label,
label:has(input[type="checkbox"]) {
    cursor: pointer !important;
}

/* Melhor leitura para labels como ESTADO / ATIVO */
label,
.form-label,
.admin-form label {
    line-height: 1.25 !important;
}

.status-badge,
.badge-active,
.badge-inactive {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: .8rem;
    font-weight: 700;
}

/* Fallback para browsers antigos sem :has() */
.checkbox-line {
    display: flex !important;
    align-items: center !important;
    gap: 14px !important;
}
