:root {
    --marinho: #0f2742;
    --marinho-texto: #173a5d;
    --destaque: #2e9afe;
    --fundo: #f7f9fc;
    --borda: #e1e8f0;
    --texto: #212529;
    --muted: #66788b;
    --sidebar-largura: 216px;
    --sidebar-recolhida: 64px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
}

body {
    margin: 0;
    background: var(--fundo);
    color: var(--texto);
    font-family: "Segoe UI", Arial, sans-serif;
    font-size: 14px;
}

.app-shell {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 1040;
    width: var(--sidebar-largura);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    color: #fff;
    background: var(--marinho);
    transition: width .2s ease, transform .2s ease;
}

.sidebar.collapsed,
html.sidebar-recolhida-inicial .sidebar {
    width: var(--sidebar-recolhida);
}

.sidebar-header {
    min-height: 58px;
    padding: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, .1);
}

.sidebar-brand {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 9px;
    overflow: hidden;
    color: #fff;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: .02em;
    text-decoration: none;
    white-space: nowrap;
}

.sidebar-brand>i {
    flex: 0 0 auto;
    color: var(--destaque);
    font-size: 23px;
}

.sidebar-toggle,
.topbar-menu {
    width: 32px;
    height: 32px;
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    color: #fff;
    background: rgba(255, 255, 255, .08);
}

.sidebar-toggle:hover {
    background: rgba(255, 255, 255, .16);
}

.sidebar-nav {
    flex: 1;
    min-height: 0;
    padding: 8px 0;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, .2) transparent;
}

.menu-group-title {
    margin: 14px 12px 6px;
    color: rgba(255, 255, 255, .42);
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .08em;
    white-space: nowrap;
}

.menu-group {
    margin-top: 8px;
}

.menu-group-toggle {
    width: 100%;
    min-height: 39px;
    padding: 9px 12px;
    border: 0;
    border-left: 3px solid transparent;
    display: flex;
    align-items: center;
    gap: 11px;
    color: rgba(255, 255, 255, .72);
    background: transparent;
    font: inherit;
    font-size: 12px;
    font-weight: 700;
    text-align: left;
    white-space: nowrap;
    transition: color .15s, background-color .15s;
}

.menu-group-toggle:hover,
.menu-group-toggle[aria-expanded="true"] {
    color: #fff;
    background: rgba(255, 255, 255, .07);
}

.menu-group-toggle>i:first-child {
    flex: 0 0 auto;
    width: 22px;
    font-size: 18px;
    text-align: center;
}

.menu-group-seta {
    margin-left: auto;
    font-size: 11px;
    transition: transform .18s ease;
}

.menu-group-toggle[aria-expanded="true"] .menu-group-seta {
    transform: rotate(180deg);
}

.menu-group-content {
    display: none;
}

.menu-group-content.aberto {
    display: block;
}

.menu-group-content .menu-item {
    padding-left: 20px;
}

.menu-item {
    width: 100%;
    min-height: 39px;
    padding: 9px 12px;
    border: 0;
    border-left: 3px solid transparent;
    display: flex;
    align-items: center;
    gap: 11px;
    overflow: hidden;
    color: rgba(255, 255, 255, .72);
    background: transparent;
    font: inherit;
    font-size: 12px;
    text-align: left;
    text-decoration: none;
    white-space: nowrap;
    transition: color .15s, background-color .15s, border-color .15s;
}

.menu-item:hover,
.menu-item.ativo {
    color: #fff;
    background: rgba(255, 255, 255, .1);
}

.menu-item.ativo {
    border-left-color: var(--destaque);
}

.menu-item>i {
    flex: 0 0 auto;
    width: 22px;
    font-size: 19px;
    text-align: center;
}

.menu-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-footer {
    flex: 0 0 auto;
    border-top: 1px solid rgba(255, 255, 255, .1);
}

.usuario-menu {
    min-height: 58px;
    padding: 10px 13px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(255, 255, 255, .82);
}

.usuario-menu>i {
    flex: 0 0 auto;
    font-size: 25px;
    color: var(--destaque);
}

.usuario-menu strong,
.usuario-menu small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.usuario-menu strong {
    font-size: 12px;
}

.usuario-menu small {
    color: rgba(255, 255, 255, .5);
    font-size: 10px;
}

.botao-sair {
    cursor: pointer;
    border-top: 1px solid rgba(255, 255, 255, .08);
}

.sidebar-footer form {
    margin: 0;
}

.sidebar.collapsed .menu-text,
.sidebar.collapsed .menu-group-title,
html.sidebar-recolhida-inicial .sidebar .menu-text,
html.sidebar-recolhida-inicial .sidebar .menu-group-title {
    display: none;
}

.sidebar.collapsed .sidebar-header,
html.sidebar-recolhida-inicial .sidebar .sidebar-header {
    justify-content: center;
    padding-inline: 6px;
}

.sidebar.collapsed .sidebar-brand,
html.sidebar-recolhida-inicial .sidebar .sidebar-brand {
    display: none;
}

.sidebar.collapsed .menu-item,
html.sidebar-recolhida-inicial .sidebar .menu-item {
    justify-content: center;
    gap: 0;
    padding-inline: 6px;
}

.sidebar.collapsed .usuario-menu,
html.sidebar-recolhida-inicial .sidebar .usuario-menu {
    justify-content: center;
    padding-inline: 6px;
}

.sidebar.collapsed .menu-group-toggle,
html.sidebar-recolhida-inicial .sidebar .menu-group-toggle {
    justify-content: center;
    gap: 0;
    padding-inline: 6px;
}

.sidebar.collapsed .menu-group-seta,
html.sidebar-recolhida-inicial .sidebar .menu-group-seta {
    display: none;
}

.sidebar.collapsed .menu-group-content .menu-item,
html.sidebar-recolhida-inicial .sidebar .menu-group-content .menu-item {
    padding-inline: 6px;
}

.main-area {
    flex: 1;
    min-width: 0;
    min-height: 100vh;
    margin-left: var(--sidebar-largura);
    transition: margin-left .2s ease;
}

.sidebar.collapsed+.main-area,
html.sidebar-recolhida-inicial .main-area {
    margin-left: var(--sidebar-recolhida);
}

.topbar {
    height: 58px;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    border-bottom: 1px solid var(--borda);
    background: #fff;
}

.topbar-menu {
    display: none;
    color: var(--marinho);
    border-color: var(--borda);
    background: #fff;
    font-size: 21px;
}

.topbar-contexto {
    text-align: right;
    line-height: 1.15;
}

.topbar-contexto span,
.topbar-contexto strong {
    display: block;
}

.topbar-contexto span {
    color: var(--muted);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.topbar-contexto strong {
    color: var(--marinho-texto);
    font-size: 12px;
}

.conteudo-principal {
    width: 100%;
    max-width: 1680px;
    margin: 0 auto;
    padding: 24px;
}

h1.h3 {
    color: var(--marinho);
    font-size: 1.55rem;
    font-weight: 700;
    letter-spacing: -.01em;
}

h2.h5,
.card-header {
    color: var(--marinho-texto);
}

.text-secondary {
    color: var(--muted) !important;
}

a {
    color: #1769aa;
}

.card {
    border: 1px solid var(--borda) !important;
    border-radius: 14px;
    box-shadow: none !important;
}

.card-header {
    padding: .75rem 1.25rem;
    border-bottom: 1px solid var(--borda);
    border-radius: 14px 14px 0 0 !important;
    font-size: .95rem;
    font-weight: 700;
    background: #fff !important;
}

.card-body {
    padding: 1.25rem;
}

.ajuda-secao {
    scroll-margin-top: 76px;
}

.ajuda-passo-numero {
    flex: 0 0 auto;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: var(--marinho-texto);
    font-size: .8rem;
    font-weight: 700;
}

.ajuda-fluxo {
    position: relative;
    display: grid;
    gap: 14px;
}

.ajuda-fluxo::before {
    content: "";
    position: absolute;
    top: 26px;
    bottom: 26px;
    left: 21px;
    width: 2px;
    background: var(--borda);
}

.ajuda-fluxo-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
}

.ajuda-fluxo-marcador {
    z-index: 1;
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    border: 2px solid var(--borda);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #1769aa;
    background: #fff;
    font-size: 1.1rem;
}

.ajuda-nivel-atual {
    border-color: #86b7fe !important;
    background: #f8fbff;
}

.form-label {
    margin-bottom: .3rem;
    color: var(--marinho-texto);
    font-size: .82rem;
    font-weight: 600;
}

.form-text {
    font-size: .78rem;
}

.form-control,
.form-select {
    min-height: 38px;
    border-color: #ced4da;
}

.form-control:focus,
.form-select:focus {
    border-color: #86b7fe;
    box-shadow: 0 0 0 .25rem rgba(13, 110, 253, .15);
}

.btn-primary {
    --bs-btn-bg: #1769aa;
    --bs-btn-border-color: #1769aa;
    --bs-btn-hover-bg: #12598f;
    --bs-btn-hover-border-color: #12598f;
}

.btn {
    font-size: .88rem;
    border-radius: 7px;
}

.table {
    --bs-table-bg: transparent;
    --bs-table-hover-bg: #f3f8ff;
    margin-bottom: 0;
    font-size: .9rem;
}

.table> :not(caption)>*>* {
    padding: .7rem .9rem;
    border-bottom-color: #edf1f6;
}

.table thead th {
    padding-top: .65rem;
    padding-bottom: .65rem;
    color: var(--muted);
    background: #f4f7fb;
    border-bottom: 1px solid var(--borda);
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
    white-space: nowrap;
    vertical-align: middle;
}

.table tbody td {
    vertical-align: middle;
}

.table tbody tr:last-child>* {
    border-bottom: 0;
}

.paginacao-simples .pagination {
    margin-bottom: 0;
}

.paginacao-simples .page-link {
    min-width: 32px;
    color: #1769aa;
    text-align: center;
}

.paginacao-simples .active>.page-link {
    border-color: #1769aa;
    background: #1769aa;
}

.paginacao-simples .campo-pagina {
    width: 72px;
}

.badge {
    padding: .4em .7em;
    font-size: .72rem;
    font-weight: 600;
}

.progress {
    background: #e7edf5;
}

.progress-bar {
    background: var(--destaque);
}

.grafico-container {
    position: relative;
    width: 100%;
    min-height: 280px;
}

.grafico-evolucao {
    min-height: 310px;
}

.grafico-rosca {
    min-height: 310px;
}

.grafico-categorias {
    min-height: 300px;
}

.relatorio-detalhes>summary {
    cursor: pointer;
    list-style: none;
    user-select: none;
}

.relatorio-detalhes>summary::-webkit-details-marker {
    display: none;
}

.relatorio-detalhes>summary::after {
    float: right;
    content: "\F282";
    font-family: "bootstrap-icons";
    transition: transform .15s ease;
}

.relatorio-detalhes[open]>summary::after {
    transform: rotate(180deg);
}

.select2-container {
    width: 100% !important;
    font-size: 1rem;
}

.select2-container .select2-selection--single {
    height: 38px;
    border: 1px solid #ced4da;
    border-radius: .375rem;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    padding-left: .75rem;
    padding-right: 2rem;
    color: var(--texto);
    line-height: 36px;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 36px;
    right: .35rem;
}

.select2-container .select2-selection--multiple {
    min-height: 38px;
    border: 1px solid #ced4da;
    border-radius: .375rem;
}

.select2-container--default .select2-results__option--highlighted.select2-results__option--selectable {
    background: #1769aa;
}

.select2-container--default.select2-container--focus .select2-selection--single,
.select2-container--default.select2-container--focus .select2-selection--multiple {
    border-color: #86b7fe;
    box-shadow: 0 0 0 .25rem rgba(13, 110, 253, .15);
}

.auth-page {
    position: relative;
    display: grid;
    place-items: center;
    min-height: 100svh;
    overflow: hidden;
    padding: 2rem;
    background: radial-gradient(circle at 15% 12%, rgba(59, 173, 163, .17), transparent 25rem), radial-gradient(circle at 91% 86%, rgba(89, 127, 168, .2), transparent 28rem), linear-gradient(135deg, #091729 0%, #10263e 58%, #0f3942 100%);
}

.auth-page::before,
.auth-page::after {
    position: absolute;
    content: "";
    border: 1px solid rgba(255, 255, 255, .05);
    border-radius: 50%;
    pointer-events: none;
}

.auth-page::before {
    top: -18rem;
    right: -10rem;
    width: 35rem;
    height: 35rem;
}

.auth-page::after {
    bottom: -24rem;
    left: -16rem;
    width: 42rem;
    height: 42rem;
}

.auth-card {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(21rem, .92fr);
    width: min(61rem, 100%);
    min-height: 35rem;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 1.35rem;
    background: #fff;
    box-shadow: 0 36px 90px rgba(1, 10, 24, .34);
}

.auth-intro {
    display: flex;
    justify-content: space-between;
    flex-direction: column;
    padding: clamp(2rem, 5vw, 3.4rem);
    color: #fff;
    background: linear-gradient(rgba(13, 38, 59, .55), rgba(10, 40, 48, .84)), radial-gradient(circle at 70% 20%, rgba(75, 193, 181, .35), transparent 18rem), #102b43;
}

.auth-brand {
    display: inline-flex;
    align-items: center;
    gap: .8rem;
}

.brand-mark {
    display: inline-flex;
    align-items: flex-end;
    gap: .14rem;
    width: 2.15rem;
    height: 2.15rem;
    padding: .38rem;
    flex: 0 0 auto;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: .65rem;
    background: rgba(255, 255, 255, .1);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14);
}

.brand-mark-large {
    width: 2.75rem;
    height: 2.75rem;
    padding: .48rem;
}

.brand-mark span {
    width: .18rem;
    min-height: 42%;
    border-radius: 999px;
}

.brand-mark span:nth-child(1) {
    height: 46%;
    background: #f4bf4f;
}

.brand-mark span:nth-child(2) {
    height: 65%;
    background: #ee845d;
}

.brand-mark span:nth-child(3) {
    height: 88%;
    background: #67b7d1;
}

.brand-mark span:nth-child(4) {
    height: 70%;
    background: #78c38e;
}

.brand-mark span:nth-child(5) {
    height: 100%;
    background: #c09de1;
}

.brand-copy {
    display: flex;
    flex-direction: column;
    line-height: 1.05;
}

.brand-copy strong {
    font-size: 1.18rem;
    font-weight: 750;
    letter-spacing: .075em;
}

.brand-copy small {
    margin-top: .22rem;
    color: rgba(255, 255, 255, .62);
    font-size: .72rem;
    font-weight: 500;
    letter-spacing: .035em;
}

.auth-intro-copy {
    max-width: 28rem;
    margin-top: clamp(3rem, 10vh, 6rem);
}

.auth-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    margin-bottom: 1rem;
    color: #8ed8d0;
    font-size: .72rem;
    font-weight: 750;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.auth-eyebrow::before {
    width: 1.5rem;
    height: 1px;
    content: "";
    background: currentColor;
}

.auth-intro h1 {
    max-width: 27rem;
    margin: 0;
    color: #fff;
    font-size: clamp(2rem, 3.4vw, 2.85rem);
    font-weight: 720;
    letter-spacing: -.045em;
    line-height: 1.07;
}

.auth-intro-copy p {
    max-width: 26rem;
    margin: 1.2rem 0 0;
    color: rgba(255, 255, 255, .68);
    font-size: .98rem;
    line-height: 1.65;
}

.auth-senses {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
    margin-top: 2rem;
}

.auth-senses span {
    padding: .38rem .62rem;
    color: rgba(255, 255, 255, .68);
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 999px;
    background: rgba(255, 255, 255, .045);
    font-size: .68rem;
}

.auth-form-panel {
    display: flex;
    justify-content: center;
    flex-direction: column;
    padding: clamp(2rem, 5vw, 3.6rem);
    background: #fff;
}

.auth-form-header {
    margin-bottom: 1.8rem;
}

.auth-form-icon {
    display: grid;
    place-items: center;
    width: 2.7rem;
    height: 2.7rem;
    margin-bottom: 1rem;
    color: #0c706d;
    border: 1px solid #c8e4e1;
    border-radius: .75rem;
    background: #eef9f7;
    font-size: 1.15rem;
}

.auth-form-header h2 {
    margin: 0;
    color: #19263b;
    font-size: 1.65rem;
    font-weight: 730;
    letter-spacing: -.025em;
}

.auth-form-header p {
    margin: .45rem 0 0;
    color: #667085;
    font-size: .9rem;
    line-height: 1.5;
}

.auth-form-panel .form-control {
    min-height: 2.9rem;
}

.auth-form-panel .form-control:focus {
    border-color: #5fb9b4;
    box-shadow: 0 0 0 .25rem rgba(15, 133, 128, .15);
}

.auth-form-panel .btn-primary {
    --bs-btn-bg: #0f8580;
    --bs-btn-border-color: #0f8580;
    --bs-btn-hover-bg: #0c706d;
    --bs-btn-hover-border-color: #0c706d;
}

.auth-submit {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 2.9rem;
    margin-top: .2rem;
    padding-inline: 1rem;
}

.auth-support {
    margin: 1.3rem 0 0;
    color: #8a95a3;
    font-size: .73rem;
    text-align: center;
}

.estado-rascunho {
    background: #6c757d;
}

.estado-pendente {
    color: #212529;
    background: #f59f00;
}

.estado-em_preenchimento {
    color: #212529;
    background: #0dcaf0;
}

.estado-respondida {
    background: #6f42c1;
}

.estado-finalizada {
    background: #198754;
}

.sticky-actions {
    position: sticky;
    bottom: 0;
    z-index: 1020;
    margin: 2rem -1.5rem -1.5rem;
}

.criterio-pergunta {
    min-width: 300px;
}

.min-w-0 {
    min-width: 0;
}

@media (max-width: 760px) {
    .auth-page {
        align-items: start;
        padding: 1rem;
    }

    .auth-card {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .auth-intro {
        min-height: 15rem;
        padding: 1.6rem;
    }

    .auth-intro-copy {
        margin-top: 2.5rem;
    }

    .auth-intro h1 {
        font-size: 1.85rem;
    }

    .auth-intro-copy p,
    .auth-senses {
        display: none;
    }

    .auth-form-panel {
        padding: 1.7rem 1.5rem 1.5rem;
    }

    .sidebar {
        width: var(--sidebar-largura);
        transform: translateX(-100%);
        box-shadow: 8px 0 24px rgba(15, 39, 66, .2);
    }

    .sidebar.mobile-open {
        transform: translateX(0);
    }

    .sidebar.collapsed {
        width: var(--sidebar-largura);
    }

    .sidebar.collapsed .menu-text {
        display: block;
    }

    .sidebar.collapsed .menu-group-title {
        display: block;
    }

    .sidebar.collapsed .sidebar-brand {
        display: flex;
    }

    .sidebar.collapsed .sidebar-header {
        justify-content: space-between;
        padding-inline: 12px;
    }

    .sidebar.collapsed .menu-item {
        justify-content: flex-start;
        gap: 11px;
        padding-inline: 12px;
    }

    .sidebar.collapsed .usuario-menu {
        justify-content: flex-start;
        padding-inline: 13px;
    }

    .sidebar.collapsed .menu-group-toggle {
        justify-content: flex-start;
        gap: 11px;
        padding-inline: 12px;
    }

    .sidebar.collapsed .menu-group-seta {
        display: inline-block;
    }

    .sidebar.collapsed .menu-group-content .menu-item {
        padding-left: 20px;
    }

    .main-area,
    .sidebar.collapsed+.main-area {
        margin-left: 0;
    }

    .topbar {
        justify-content: space-between;
        padding-inline: 14px;
    }

    .topbar-menu {
        display: inline-flex;
    }

    .conteudo-principal {
        padding: 16px 12px 24px;
    }

    .grafico-container,
    .grafico-evolucao,
    .grafico-rosca,
    .grafico-categorias {
        min-height: 250px;
    }
}

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}
