:root {
    --fundo: #f4f6f8;
    --superficie: #ffffff;
    --texto: #1c2733;
    --texto-suave: #5b6876;
    --borda: #d6dde4;
    --primaria: #0b5cab;
    --primaria-texto: #ffffff;
    --ok: #1a7f4b;
    --falha: #b42318;
    --aviso-fundo: #fff7e0;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--fundo);
    color: var(--texto);
    font-family: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
    font-size: 15px;
    line-height: 1.5;
}

h1 {
    font-size: 1.5rem;
    margin: 0 0 1rem;
}

h2 {
    font-size: 1.15rem;
    margin: 0 0 0.75rem;
}

a {
    color: var(--primaria);
}

.topo {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 1.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--superficie);
    border-bottom: 1px solid var(--borda);
}

.topo .marca {
    font-weight: 700;
    font-size: 1.1rem;
    text-decoration: none;
    white-space: nowrap;
}

.topo nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 1rem;
    flex: 1;
}

.topo nav a {
    text-decoration: none;
    padding: 0.25rem 0;
}

.topo nav a.active {
    border-bottom: 2px solid var(--primaria);
}

.topo .contexto {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-left: auto;
    color: var(--texto-suave);
}

.cliente-ativo {
    white-space: nowrap;
    padding: 0.2rem 0.6rem;
    border: 1px solid var(--borda);
    border-radius: 999px;
    color: var(--texto);
}

main {
    max-width: 1320px;
    margin: 1.5rem auto;
    padding: 0 1rem;
}

.cartao {
    background: var(--superficie);
    border: 1px solid var(--borda);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.cartao.estreito {
    max-width: 420px;
    margin: 3rem auto;
}

form {
    display: grid;
    gap: 0.9rem;
    max-width: 480px;
}

form.filtros {
    max-width: none;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    align-items: end;
    margin-bottom: 1rem;
}

label {
    display: grid;
    gap: 0.3rem;
    font-weight: 600;
}

label.marcacao {
    display: flex;
    gap: 0.5rem;
    align-items: flex-start;
    font-weight: 400;
}

input:not([type="checkbox"]),
select {
    padding: 0.5rem 0.6rem;
    border: 1px solid var(--borda);
    border-radius: 6px;
    font: inherit;
    width: 100%;
}

button {
    padding: 0.55rem 1rem;
    border: 1px solid var(--primaria);
    border-radius: 6px;
    background: var(--primaria);
    color: var(--primaria-texto);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

button.secundario {
    background: var(--superficie);
    color: var(--primaria);
}

button.perigo {
    background: var(--falha);
    border-color: var(--falha);
}

button:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.acoes,
.paginacao {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    align-items: center;
    margin-top: 1rem;
}

.erro {
    color: var(--falha);
    font-weight: 600;
}

.aviso {
    background: var(--aviso-fundo);
    border: 1px solid #e6c766;
    border-radius: 6px;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
}

.aviso code {
    word-break: break-all;
}

.observacao,
.carregando {
    color: var(--texto-suave);
}

.selo {
    display: inline-block;
    padding: 0.1rem 0.6rem;
    border-radius: 999px;
    font-weight: 600;
    border: 1px solid var(--borda);
}

.selo.ok {
    color: var(--ok);
    border-color: var(--ok);
}

.selo.falha {
    color: var(--falha);
    border-color: var(--falha);
}

.selo.alerta {
    color: #8a6100;
    border-color: #e6c766;
    background: var(--aviso-fundo);
}

.tabela-larga {
    overflow-x: auto;
}

.tabela-larga td,
.tabela-larga th {
    white-space: nowrap;
}

.indicadores {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin: 1rem 0;
}

button.indicador {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.15rem;
    min-width: 11rem;
    padding: 0.6rem 0.9rem;
    background: transparent;
    color: inherit;
    border: 1px solid var(--borda);
    border-radius: 6px;
    font-weight: 400;
    text-align: left;
}

button.indicador strong {
    font-size: 1.5rem;
    line-height: 1.2;
}

button.indicador.falha {
    border-color: var(--falha);
}

button.indicador.falha strong {
    color: var(--falha);
}

button.indicador.alerta {
    border-color: #e6c766;
    background: var(--aviso-fundo);
}

dl.resumo {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 0.4rem 1.25rem;
    margin: 0;
}

dl.resumo dt {
    color: var(--texto-suave);
}

dl.resumo dd {
    margin: 0;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    text-align: left;
    padding: 0.5rem 0.6rem;
    border-bottom: 1px solid var(--borda);
}

th {
    color: var(--texto-suave);
    font-weight: 600;
}

.lista-clientes {
    list-style: none;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

#blazor-error-ui {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 0.6rem 1.25rem;
    background: var(--aviso-fundo);
    border-top: 1px solid #e6c766;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

.separador {
    text-align: center;
    margin: 1rem 0 0.75rem;
}

#botao-do-google {
    display: flex;
    justify-content: center;
}
