@font-face {
    font-family: Montserrat;
    src: url("../fontes/Montserrat-SemiBold.ttf") format("truetype");
    font-weight: 600;
    font-display: swap;
}

:root {
    --barra: #072B52;
    --ativo: #0071B3;
    --azul: #004B8D;
    --azul-claro: #E8F1FA;
    --azul-borda: #9CC6EA;
    --fundo: #F4F6F9;
    --cartao: #FFF;
    --texto: #1F2A3C;
    --texto-2: #586377;
    --texto-3: #3A4556;
    --borda: #DDE3EA;
    --borda-2: #E9EDF2;
    --verde-fundo: #E1F3E4;
    --verde-texto: #17592A;
    --ambar-fundo: #FDEBD8;
    --ambar-texto: #8A4A07;
    --vermelho-fundo: #FBE3E1;
    --vermelho-texto: #9B241D;
    --cinza-fundo: #E9EDF3;
    --cinza-texto: #3D4B61;
    --raio: 12px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; font: 14px/1.45 "Segoe UI", system-ui, sans-serif; color: var(--texto); background: var(--fundo); }
a { color: #0064A0; text-underline-offset: 2px; }
a:hover { color: var(--azul); }
button, input, select, textarea { color: inherit; font: inherit; }
button { cursor: pointer; }
button:disabled { opacity: .5; cursor: default; }
h1, h2, h3 { margin: 0; font-weight: 600; line-height: 1.25; }
:focus-visible { outline: 2px solid var(--ativo); outline-offset: 2px; }
.so-leitor, .pular:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.pular:focus { position: fixed; z-index: 2; top: 8px; left: 8px; padding: 8px 12px; background: white; }
.icone { display: inline-block; flex: none; vertical-align: middle; width: 20px; height: 20px; }
.discreto { color: var(--texto-2); }
.monoespaco, .mono { font: .95em/1.5 Consolas, "Courier New", monospace; }

/* Entrada */
.entrada { display: grid; grid-template-columns: minmax(300px, 5fr) 7fr; min-height: 100vh; min-height: 100dvh; background: var(--cartao); }
.entrada-marca { padding: clamp(32px, 4.2vw, 64px); color: white; background: var(--barra); display: flex; flex-direction: column; }
.entrada-marca img { width: clamp(168px, 16vw, 222px); height: auto; }
.entrada-chamada { margin-block: auto; padding-block: 40px; max-width: 410px; }
.entrada-chamada h1 { font: 600 clamp(25px, 2.5vw, 38px)/1.2 Montserrat, "Segoe UI", sans-serif; }
.entrada-chamada p { margin: 12px 0 0; font-size: 16px; line-height: 1.55; color: #CCDBED; max-width: 37ch; }
.entrada-form { display: grid; align-items: center; justify-items: center; padding: 42px 28px; }
.entrada-cartao { width: min(100%, 400px); }
.entrada-cartao h2 { font-size: 27px; }
.entrada-cartao > .discreto { margin: 7px 0 26px; }
.entrada .botao.entrar { height: 48px; margin-top: 4px; font-size: 15px; }
.entrada :is(.erro, .aviso-ok) { margin-bottom: 16px; }

/* Painel */
.pagina-erro { display: grid; min-height: 100vh; place-items: center; padding: 16px; }
.pagina-erro .cartao { width: min(100%, 460px); padding: clamp(20px, 5vw, 36px); }
.pagina-erro h1 { font-size: 24px; }
.pagina-erro .botao { margin-top: 8px; }
.k { min-height: 100vh; display: flex; }
.k-barra { position: sticky; top: 0; flex: 0 0 232px; display: flex; flex-direction: column; align-self: flex-start; gap: 14px; height: 100vh; height: 100dvh; overflow: auto; padding: 20px 10px 12px; background: var(--cartao); border-right: 1px solid var(--borda); }
.marca { align-self: center; display: block; margin: 0 4px 8px; }
.marca img { display: block; width: 164px; height: auto; }
.menu { display: grid; gap: 3px; }
.k-barra .alternar-menu { display: none; }
.k-barra .item { width: 100%; min-height: 38px; display: flex; align-items: center; gap: 10px; padding: 0 11px; border: 0; border-radius: 10px; background: transparent; text-decoration: none; font-size: 13px; font-weight: 500; color: var(--texto-3); }
.item .icone { width: 18px; height: 18px; color: var(--texto-2); }
.k-barra .item:hover { background: var(--fundo); }
.k-barra .item[aria-current="page"] { background: var(--azul-claro); color: var(--azul); font-weight: 600; }
.item[aria-current="page"] .icone { color: inherit; }
.barra-rodape { margin-top: auto; border-top: 1px solid var(--borda-2); padding-top: 10px; }
.usuario { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin: 3px 11px; color: var(--texto-2); font-size: 12px; }
.k-conteudo { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 14px; padding: 16px 18px 24px; }
.faixa, .cartao { min-width: 0; border: 1px solid var(--borda); border-radius: var(--raio); background: var(--cartao); }
.faixa, .secao-titulo, .acoes, .direita, .barra-filtros, .chips, .paginacao { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.faixa { padding: 10px 14px; min-height: 54px; gap: 10px 14px; }
.faixa h1 { font-size: 19px; }
.faixa .direita { margin-left: auto; }
.cartao { padding: 14px; }
.k-conteudo > .cartao { container: cartao / inline-size; }
.cartao h2 { font-size: 16px; }
.cartao > h2, .secao-titulo { margin: 0 0 12px; }
.secao-titulo h2 { overflow-wrap: anywhere; }
.secao-titulo .direita { margin-left: auto; }
.botao, .icone-botao, .chip { display: inline-flex; justify-content: center; align-items: center; gap: 7px; text-decoration: none; cursor: pointer; }
.botao { min-height: 36px; border: 1px solid #C9D2DD; border-radius: 10px; padding: 6px 14px; color: var(--texto); background: #FFF; font-size: 13px; font-weight: 600; }
.botao:hover { border-color: var(--ativo); color: var(--texto); }
.botao.principal { background: var(--ativo); border-color: var(--ativo); color: #FFF; }
.botao.principal:hover { background: var(--azul); border-color: var(--azul); }
.botao.perigo { background: var(--vermelho-fundo); color: var(--vermelho-texto); border-color: #F2B9B4; }
.botao.perigo:hover { border-color: var(--vermelho-texto); }
.botao.pequeno { min-height: 30px; padding: 3px 10px; font-size: 12px; border-radius: 8px; }
.botao .icone, .icone-botao .icone { width: 16px; height: 16px; }
.icone-botao { border: 0; width: 30px; height: 30px; padding: 0; border-radius: 6px; background: transparent; color: var(--texto-2); }
.icone-botao:hover { background: var(--azul-claro); color: var(--azul); }
.barra-filtros { margin-bottom: 12px; }
.busca, .campo-linha { display: inline-flex; align-items: center; gap: 8px; height: 36px; max-width: 100%; padding: 0 10px; border: 1px solid var(--borda); border-radius: 10px; background: white; }
.busca { flex: 0 1 300px; }
.busca .icone, .campo-linha .icone { width: 17px; height: 17px; color: var(--texto-2); }
.busca input, .campo-linha select, .campo-linha input { min-width: 0; width: 100%; border: 0; outline: none; background: transparent; font-size: 13px; }
.busca:focus-within, .campo-linha:focus-within { outline: 2px solid var(--azul-borda); border-color: var(--ativo); }
.chips { gap: 6px; }
.chips + .tabela-rolagem, .dados + .acoes { margin-top: 14px; }
.chip { border-radius: 8px; border: 1px solid var(--borda); padding: 4px 10px; background: #FFF; color: var(--texto-3); font-size: 12px; min-height: 29px; }
.chip:hover { border-color: var(--azul-borda); }
.chip.ativo, .chip[aria-current="true"], .chip[aria-current="page"] { background: var(--azul-claro); border-color: var(--azul-borda); color: var(--azul); font-weight: 600; }
.chip span, .numero { font-variant-numeric: tabular-nums; }
.etiqueta { display: inline-block; padding: 2px 7px; border-radius: 6px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.etiqueta.verde, .aviso-ok { color: var(--verde-texto); background: var(--verde-fundo); }
.etiqueta.ambar { color: var(--ambar-texto); background: var(--ambar-fundo); }
.etiqueta.vermelho, .erro { color: var(--vermelho-texto); background: var(--vermelho-fundo); }
.etiqueta.cinza { color: var(--cinza-texto); background: var(--cinza-fundo); }
.tabela-rolagem { position: relative; border: 1px solid var(--borda); border-radius: 10px; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 10px; text-align: left; border-bottom: 1px solid var(--borda-2); }
th { background: #F8FAFC; color: var(--texto-2); font-size: 12px; font-weight: 600; }
th:first-child { border-top-left-radius: 9px; }
th:last-child { border-top-right-radius: 9px; }
td { overflow-wrap: anywhere; }
td.data, td .botao, td .mono, td.mono { overflow-wrap: normal; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #F8FAFC; }
.vazio { padding: 24px 12px; text-align: center; color: var(--texto-2); }
.paginacao { justify-content: flex-end; margin-top: 12px; color: var(--texto-2); font-size: 13px; }
.dados { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); gap: 16px 20px; }
.dados div { min-width: 0; }
.dados dt { font-size: 12px; font-weight: 600; color: var(--texto-2); }
.dados dd { margin: 4px 0 0; overflow-wrap: anywhere; white-space: pre-line; }

/* Formulários e confirmações */
.formulario, .campo { display: flex; flex-direction: column; min-width: 0; }
.formulario { gap: 16px; }
.campos-duplos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.cartao.formulario, .cartao > .formulario { max-width: 720px; }
.campo { gap: 6px; }
.campo > label, label.campo > span:first-child { font-size: 13px; font-weight: 600; color: var(--texto-3); }
.campo input, .campo select, .campo textarea { width: 100%; padding: 10px 13px; min-height: 42px; border: 1px solid var(--borda); border-radius: 10px; background: white; }
.entrada .campo input { min-height: 46px; }
.campo textarea { resize: vertical; }
.campo input:focus, .campo select:focus, .campo textarea:focus { border-color: var(--ativo); outline: 2px solid var(--azul-borda); outline-offset: 0; }
.campo-senha { position: relative; }
.campo-senha input { padding-right: 48px; }
.campo-senha input::-ms-reveal { display: none; }
.campo-senha button { position: absolute; inset: 3px 3px 3px auto; display: grid; place-items: center; width: 38px; border: 0; border-radius: 8px; background: transparent; color: var(--texto-2); }
.campo-senha button:hover { background: var(--azul-claro); color: var(--azul); }
.ocultar-senha { display: none; }
button[aria-pressed="true"] .ocultar-senha { display: block; }
.erro, .aviso-ok { margin: 0; padding: 10px 14px; border-radius: 10px; }
.validation-summary-valid { display: none; }
.validation-summary-errors ul { margin: 0; padding-left: 18px; }
.field-validation-error { color: var(--vermelho-texto); }
dialog { width: min(440px, calc(100% - 32px)); max-height: calc(100dvh - 40px); overflow-y: auto; overflow-wrap: anywhere; padding: 24px; border: 1px solid var(--borda); border-radius: var(--raio); background: var(--cartao); color: var(--texto); }
dialog::backdrop { background: rgb(15 33 55 / 48%); }
dialog h2 { margin-bottom: 16px; font-size: 20px; }
dialog .acoes { justify-content: flex-end; margin-top: 8px; }
.notificacao:not(:empty) { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); padding: 8px 14px; border-radius: 8px; color: white; background: var(--barra); }

@media (max-width: 760px) {
    .entrada { display: flex; flex-direction: column; }
    .entrada-marca { padding: 20px 24px; flex-direction: row; align-items: center; gap: 22px; }
    .entrada-marca img { width: 116px; }
    .entrada-chamada { padding: 0; margin: 0; }
    .entrada-chamada h1 { font-size: 20px; }
    .entrada-chamada p { display: none; }
    .entrada-form { padding: 42px 24px; }
    .k { flex-direction: column; }
    .k-barra { position: static; display: grid; grid-template-columns: minmax(0, 1fr) auto; flex: none; gap: 8px; padding: 10px 12px 8px; width: 100%; height: auto; border-right: 0; border-bottom: 1px solid var(--borda); }
    .marca { margin: 0; justify-self: start; }
    .marca img { width: 98px; }
    .k-barra .alternar-menu { display: inline-flex; align-self: center; }
    .alternar-menu:not([hidden])[aria-expanded="false"] ~ :is(.menu, .barra-rodape) { display: none; }
    .barra-rodape { grid-column: 1 / -1; align-items: center; display: flex; justify-content: space-between; margin: 0; padding-top: 6px; }
    .menu { grid-column: 1 / -1; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .k-conteudo { padding: 10px; gap: 10px; }
    .faixa .direita { margin-left: 0; }
    .cartao { padding: 10px; }
    .campos-duplos { grid-template-columns: 1fr; }
}

@container cartao (max-width: 55rem) {
    .tabela-rolagem { border: 0; }
    .tabela-rolagem table { display: block; }
    .tabela-rolagem thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
    .tabela-rolagem tbody { display: grid; gap: 10px; }
    .tabela-rolagem tbody tr { display: flex; flex-direction: column; gap: 6px; min-width: 0; padding: 12px; border: 1px solid var(--borda); border-radius: 8px; }
    .tabela-rolagem td { padding: 0; border: 0; }
    .tabela-rolagem td[data-rotulo] { display: grid; grid-template-columns: min(36%, 7rem) minmax(0, 1fr); align-items: baseline; justify-items: start; gap: 8px; }
    .tabela-rolagem td[data-rotulo]::before {
        content: attr(data-rotulo);
        content: attr(data-rotulo) / "";
        font: 600 12px/1.45 "Segoe UI", system-ui, sans-serif;
        color: var(--texto-2);
    }
    .tabela-rolagem .celula-com-acoes { order: 1; }
}
