:root {
    --a11y-escala: 1;
}

html.a11y-fonte {
    font-size: calc(var(--a11y-base, 14px) * var(--a11y-escala)) !important;
}
html.a11y-fonte .header .page-brand { font-size: calc(20px * var(--a11y-escala)); }
html.a11y-fonte .header .sidebar-toggler,
html.a11y-fonte .side-menu li .sidebar-item-icon { font-size: calc(16px * var(--a11y-escala)); }
html.a11y-fonte .side-menu .heading,
html.a11y-fonte .ibox .ibox-head .ibox-title small,
html.a11y-fonte .painel-indicador-rotulo,
html.a11y-fonte .painel-linha-sm,
html.a11y-fonte .painel-lista-dado { font-size: calc(13px * var(--a11y-escala)); }
html.a11y-fonte .ibox .ibox-head .ibox-title,
html.a11y-fonte .card-title { font-size: calc(16px * var(--a11y-escala)); }
html.a11y-fonte .painel-grupo-titulo { font-size: calc(15px * var(--a11y-escala)); }
html.a11y-fonte .painel-indicador-numero { font-size: calc(26px * var(--a11y-escala)); }
html.a11y-fonte .input-group-icon .form-control,
html.a11y-fonte .input-group-icon .form-select { padding-left: calc(33px * var(--a11y-escala)); }
html.a11y-fonte .input-group-icon.right .form-control,
html.a11y-fonte .input-group-icon.right .form-select { padding-left: 12px; padding-right: calc(33px * var(--a11y-escala)); }
html.a11y-fonte .input-group-icon .input-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: calc(34px * var(--a11y-escala));
    height: 100%;
    line-height: 1;
}

html.a11y-cinza {
    filter: grayscale(1);
}

html.a11y-invertido {
    filter: invert(1) hue-rotate(180deg);
    background-color: #fff;
}
html.a11y-invertido img,
html.a11y-invertido video,
html.a11y-invertido canvas,
html.a11y-invertido picture,
html.a11y-invertido iframe {
    filter: invert(1) hue-rotate(180deg);
}

html.a11y-contraste,
html.a11y-contraste :where(body, body *:not(svg, svg *, img, video, canvas, .a11y-guia)) {
    background-color: #000 !important;
    background-image: none !important;
    color: #fff !important;
    border-color: #fff !important;
    box-shadow: none !important;
    text-shadow: none !important;
}
html.a11y-contraste a,
html.a11y-contraste a *,
html.a11y-contraste .btn,
html.a11y-contraste .btn *,
html.a11y-contraste button,
html.a11y-contraste button *,
html.a11y-contraste .dropdown-item,
html.a11y-contraste .nav-link,
html.a11y-contraste .page-link {
    color: #ff0 !important;
}
html.a11y-contraste .btn,
html.a11y-contraste button,
html.a11y-contraste input,
html.a11y-contraste select,
html.a11y-contraste textarea,
html.a11y-contraste .form-control,
html.a11y-contraste .form-select,
html.a11y-contraste .select2-selection {
    border: 1px solid #ff0 !important;
}
html.a11y-contraste .modal-content,
html.a11y-contraste .dropdown-menu {
    border: 2px solid #fff !important;
}
html.a11y-contraste ::placeholder {
    color: #bbb !important;
    opacity: 1;
}
html.a11y-contraste .form-check-input:checked {
    background-color: #ff0 !important;
}
html.a11y-contraste #a11yPainel .a11y-opcao[aria-pressed="true"],
html.a11y-contraste #a11yPainel .a11y-opcao[aria-pressed="true"] * {
    background-color: #ff0 !important;
    color: #000 !important;
}
html.a11y-contraste .a11y-guia {
    background-color: rgba(255, 255, 0, 0.35) !important;
    border-color: #ff0 !important;
}
html.a11y-contraste img {
    background-color: #fff;
}
html.a11y-contraste .input-icon {
    background-color: transparent !important;
}
html.a11y-contraste svg {
    fill: currentColor;
}

html.a11y-legivel body *:not(i):not([class*="fa"]):not([class*="ti-"]):not([class*="icon"]):not([class*="glyph"]) {
    font-family: Verdana, Tahoma, Arial, sans-serif !important;
}

html.a11y-espacamento body *:not(i):not([class*="fa"]):not([class*="ti-"]):not([class*="icon"]):not(input):not(select) {
    line-height: 1.8 !important;
    letter-spacing: 0.06em !important;
    word-spacing: 0.16em !important;
}
html.a11y-espacamento body p {
    margin-bottom: 1.5em !important;
}

html.a11y-links a:not(.btn),
html.a11y-links a:not(.btn) * {
    text-decoration: underline !important;
    text-decoration-thickness: 2px !important;
    text-underline-offset: 3px;
    font-weight: 600 !important;
}
html.a11y-links a.btn {
    outline: 2px dashed currentColor;
    outline-offset: 2px;
}

html.a11y-foco *:focus,
html.a11y-foco *:focus-visible {
    outline: 3px solid #ffbf00 !important;
    outline-offset: 2px !important;
    box-shadow: 0 0 0 6px #000 !important;
}

html.a11y-cursor,
html.a11y-cursor * {
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 48 48'%3E%3Cpath d='M4 2 L4 38 L13 29 L20 45 L27 42 L20 26 L33 26 Z' fill='%23000' stroke='%23fff' stroke-width='3' stroke-linejoin='round'/%3E%3C/svg%3E") 4 2, auto !important;
}
html.a11y-cursor a,
html.a11y-cursor a *,
html.a11y-cursor button,
html.a11y-cursor button *,
html.a11y-cursor .btn,
html.a11y-cursor .btn *,
html.a11y-cursor [onclick],
html.a11y-cursor [onclick] *,
html.a11y-cursor label,
html.a11y-cursor select,
html.a11y-cursor [role="button"] {
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 48 48'%3E%3Cpath d='M17 4 a4 4 0 0 1 8 0 V20 l10 2 a5 5 0 0 1 4 6 l-3 12 a6 6 0 0 1-6 5 H21 a6 6 0 0 1-5-3 L8 30 a4 4 0 0 1 6-5 l3 3 Z' fill='%23000' stroke='%23fff' stroke-width='3' stroke-linejoin='round'/%3E%3C/svg%3E") 20 2, pointer !important;
}
html.a11y-cursor input[type="text"],
html.a11y-cursor input[type="email"],
html.a11y-cursor input[type="password"],
html.a11y-cursor input[type="number"],
html.a11y-cursor input[type="search"],
html.a11y-cursor input:not([type]),
html.a11y-cursor textarea {
    cursor: text !important;
}

html.a11y-animacao *,
html.a11y-animacao *::before,
html.a11y-animacao *::after {
    animation-duration: 0s !important;
    animation-delay: 0s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0s !important;
    transition-delay: 0s !important;
    scroll-behavior: auto !important;
}

.a11y-guia {
    position: fixed;
    left: 0;
    right: 0;
    top: 0;
    height: 10px;
    background: rgba(255, 191, 0, 0.6);
    border-top: 3px solid #000;
    border-bottom: 3px solid #000;
    pointer-events: none;
    z-index: 2147483600;
    display: none;
}
html.a11y-guia-ativo .a11y-guia {
    display: block;
}

.a11y-botao {
    position: fixed;
    right: 10px;
    top: calc(50vh + 28px);
    z-index: 2147483640;
    display: inline-flex;
    flex-direction: row-reverse;
    align-items: center;
    height: 40px;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: linear-gradient(180deg, #3184ef, #2975e0);
    color: #fff;
    font: 600 14px/1 Arial, sans-serif;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    cursor: pointer;
}
.a11y-botao-icone {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
}
.a11y-botao-icone i {
    font-size: 24px;
}
.a11y-botao-nome {
    display: inline-block;
    max-width: 0;
    opacity: 0;
    white-space: nowrap;
    transition: max-width 0.25s ease, opacity 0.2s ease, padding 0.25s ease;
}
.a11y-botao:focus-visible .a11y-botao-nome {
    max-width: 200px;
    padding-left: 12px;
    opacity: 1;
}
@media (hover: hover) {
    .a11y-botao:hover .a11y-botao-nome {
        max-width: 200px;
        padding-left: 12px;
        opacity: 1;
    }
    .a11y-botao:hover {
        background: linear-gradient(180deg, #2975e0, #1f63c4);
    }
}
.a11y-botao:focus-visible {
    outline: 3px solid #ffbf00;
    outline-offset: 2px;
}

#a11yBotao,
#a11yPainel,
#a11yPainel *:not(i) {
    font-family: Arial, sans-serif !important;
    letter-spacing: normal !important;
    word-spacing: normal !important;
}
#a11yPainel *:not(i) {
    line-height: 1.3 !important;
}
#a11yBotao i,
#a11yPainel i {
    line-height: 1 !important;
}

.a11y-painel {
    position: fixed;
    right: 60px;
    top: 50vh;
    transform: translateY(-50%);
    z-index: 2147483641;
    width: 340px;
    max-width: calc(100vw - 72px);
    max-height: calc(100vh - 24px);
    overflow-y: auto;
    padding: 14px;
    border: 2px solid #0b4f8a;
    border-radius: 10px;
    background: #fff;
    color: #222;
    font: 400 14px/1.35 Arial, sans-serif;
    letter-spacing: normal;
    word-spacing: normal;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
}
.a11y-painel[hidden] {
    display: none;
}
.a11y-painel * {
    box-sizing: border-box;
    font-family: Arial, sans-serif;
    letter-spacing: normal;
    word-spacing: normal;
    line-height: 1.3;
}
.a11y-painel i[class*="fa-"] {
    font-family: var(--fa-family, "Font Awesome 7 Free");
}
.a11y-topo {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 10px;
}
.a11y-titulo {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
    color: #0b4f8a;
}
.a11y-grupo {
    margin: 12px 0 6px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    color: #555;
}
.a11y-grade {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}
.a11y-fonte-linha {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 6px;
    align-items: center;
}
.a11y-valor {
    min-width: 54px;
    text-align: center;
    font-size: 15px;
    font-weight: 700;
}
.a11y-opcao,
.a11y-acao {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 44px;
    padding: 6px 8px;
    border: 2px solid #c9d3de;
    border-radius: 8px;
    background: #f5f7fa;
    color: #222;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
}
.a11y-opcao:hover,
.a11y-acao:hover {
    border-color: #0b4f8a;
}
.a11y-opcao:focus-visible,
.a11y-acao:focus-visible {
    outline: 3px solid #ffbf00;
    outline-offset: 1px;
}
.a11y-opcao[aria-pressed="true"] {
    border-color: #0b4f8a;
    background: #0b4f8a;
    color: #fff;
}
.a11y-acao:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}
.a11y-rodape {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 14px;
}
.a11y-rodape small {
    flex: 1 1 160px;
    color: #555;
    font-size: 12px;
}
.a11y-fechar {
    min-height: 36px;
    padding: 4px 10px;
}

@media (max-width: 575.98px) {
    .a11y-painel {
        left: 8px;
        right: 58px;
        width: auto;
        max-width: none;
        max-height: calc(100vh - 16px);
    }
}

@media print {
    .a11y-botao,
    .a11y-painel,
    .a11y-guia {
        display: none !important;
    }
}
