/* Responsabilidade: tema mobile-first do aplicativo Monitor de Preços. */

:root {
    --bg: #f4f7fb;
    --surface: #ffffff;
    --surface-muted: #f8fafc;
    --surface-subtle: #f1f5f9;
    --text: #172033;
    --text-muted: #667085;
    --border: #dce3ed;
    --top: #0f1f38;
    --nav-bg: rgba(255, 255, 255, 0.97);
    --overlay: rgba(15, 23, 42, 0.58);
    --cor-primaria: #2563eb;
    --cor-primaria-escura: #1d4ed8;
    --cor-primaria-suave: #eff6ff;
    --cor-topo: var(--top);
    --cor-sucesso: #16a34a;
    --cor-sucesso-texto: #166534;
    --cor-sucesso-clara: #ecfdf3;
    --cor-perigo: #dc2626;
    --cor-perigo-clara: #fff1f2;
    --cor-alerta: #f59e0b;
    --cor-alerta-texto: #854d0e;
    --cor-alerta-clara: #fffbeb;
    --cor-fundo: var(--bg);
    --cor-superficie: var(--surface);
    --cor-superficie-secundaria: var(--surface-muted);
    --cor-superficie-terciaria: var(--surface-subtle);
    --cor-borda: var(--border);
    --cor-texto: var(--text);
    --cor-texto-secundario: var(--text-muted);
    --raio-card: 16px;
    --raio-controle: 10px;
    --sombra: 0 5px 18px rgba(15, 31, 56, 0.08);
    --altura-nav: 72px;
    font-family: Arial, sans-serif;
    color-scheme: light;
}

[data-theme="dark"] {
    --bg: #0f172a;
    --surface: #1e293b;
    --surface-muted: #172033;
    --surface-subtle: #263449;
    --text: #f8fafc;
    --text-muted: #cbd5e1;
    --border: #334155;
    --top: #020617;
    --nav-bg: rgba(15, 23, 42, 0.97);
    --overlay: rgba(2, 6, 23, 0.78);
    --cor-primaria: #60a5fa;
    --cor-primaria-escura: #3b82f6;
    --cor-primaria-suave: #172d4f;
    --cor-sucesso: #4ade80;
    --cor-sucesso-texto: #bbf7d0;
    --cor-sucesso-clara: #123524;
    --cor-perigo: #f87171;
    --cor-perigo-clara: #3b1720;
    --cor-alerta: #fbbf24;
    --cor-alerta-texto: #fde68a;
    --cor-alerta-clara: #3a2b0a;
    --sombra: 0 8px 24px rgba(2, 6, 23, 0.34);
    color-scheme: dark;
}

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

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

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    min-width: 0;
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: hidden;
    overflow-y: auto;
    background: var(--cor-fundo);
    color: var(--cor-texto);
    font-size: 16px;
    line-height: 1.45;
}

[hidden] {
    display: none !important;
}

button,
input,
select {
    max-width: 100%;
    font: inherit;
}

button {
    min-height: 44px;
    border: 0;
    cursor: pointer;
    touch-action: manipulation;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible {
    outline: 3px solid rgba(37, 99, 235, 0.3);
    outline-offset: 2px;
}

a {
    color: var(--cor-primaria);
    overflow-wrap: anywhere;
    word-break: break-word;
}

.topo-aplicativo {
    position: sticky;
    z-index: 50;
    top: 0;
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) 44px;
    align-items: center;
    width: 100%;
    min-height: 64px;
    padding: max(8px, env(safe-area-inset-top)) 12px 8px;
    background: var(--cor-topo);
    color: white;
    box-shadow: 0 2px 10px rgba(15, 31, 56, 0.2);
}

.marca-aplicativo {
    min-width: 0;
    padding: 0 8px;
}

.marca-aplicativo h1 {
    margin: 0;
    font-size: 17px;
    line-height: 1.2;
}

.marca-aplicativo p {
    margin: 2px 0 0;
    overflow: hidden;
    color: #d8deea;
    font-size: 11px;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.botao-icone {
    display: grid;
    place-items: center;
    width: 44px;
    min-height: 44px;
    padding: 0;
    background: transparent;
    color: white;
    border-radius: 50%;
    font-size: 23px;
}

.botao-icone:hover {
    background: rgba(255, 255, 255, 0.1);
}

.sino-topo {
    font-size: 25px;
}

.conteudo-aplicativo {
    width: calc(100% - 24px);
    max-width: 100%;
    min-width: 0;
    min-height: calc(100dvh - 64px);
    margin: 0 auto;
    padding: 18px 0 calc(var(--altura-nav) + 24px + env(safe-area-inset-bottom));
}

.tela {
    width: 100%;
    min-width: 0;
    animation: entrada-tela 160ms ease-out;
}

@keyframes entrada-tela {
    from { opacity: 0; transform: translateY(3px); }
    to { opacity: 1; transform: translateY(0); }
}

.cabecalho-tela,
.cabecalho-interno {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.cabecalho-tela h2,
.cabecalho-interno h2 {
    margin: 0;
    font-size: 24px;
    line-height: 1.2;
}

.rotulo-tela {
    margin: 0 0 2px;
    color: var(--cor-primaria);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.texto-secundario {
    margin: 4px 0 0;
    color: var(--cor-texto-secundario);
    font-size: 14px;
}

.botao-flutuante,
.botao-voltar {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 48px;
    min-height: 48px;
    padding: 0;
    border-radius: 50%;
    background: var(--cor-primaria);
    color: white;
    box-shadow: 0 5px 14px rgba(37, 99, 235, 0.25);
    font-size: 28px;
    font-weight: 400;
}

.botao-voltar {
    width: 44px;
    min-height: 44px;
    background: var(--cor-superficie);
    color: var(--cor-texto);
    box-shadow: var(--sombra);
    font-size: 23px;
}

.cabecalho-interno {
    justify-content: flex-start;
}

.campo-pesquisa {
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    width: 100%;
    min-height: 48px;
    margin-bottom: 14px;
    padding: 0 12px;
    background: var(--cor-superficie);
    border: 1px solid var(--cor-borda);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(15, 31, 56, 0.04);
    color: var(--cor-texto-secundario);
}

.campo-pesquisa input {
    width: 100%;
    min-width: 0;
    min-height: 46px;
    padding: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--cor-texto);
    font-size: 16px;
}

.card,
.painel-lista {
    width: 100%;
    min-width: 0;
    padding: 15px;
    background: var(--cor-superficie);
    border: 1px solid rgba(220, 227, 237, 0.8);
    border-radius: var(--raio-card);
    box-shadow: var(--sombra);
}

.titulo-secao {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 13px;
}

.titulo-secao h2 {
    margin: 0;
    font-size: 17px;
}

.icone-secao {
    display: grid;
    place-items: center;
    width: 27px;
    height: 27px;
    color: var(--cor-primaria);
    background: #eff6ff;
    border-radius: 8px;
}

.formulario {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
    width: 100%;
    min-width: 0;
}

.campo,
.campo-grande,
.grupo-formulario,
.notificacoes-produto,
.lojas-produto,
.botoes {
    grid-column: 1 / -1;
    min-width: 0;
}

.campo {
    display: flex;
    flex-direction: column;
}

.grupo-formulario {
    width: 100%;
    min-width: 0;
    padding: 4px 0 8px;
}

.grupo-formulario + .grupo-formulario {
    margin-top: 2px;
}

.titulo-grupo-formulario {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 14px;
    color: var(--cor-texto);
    font-size: 16px;
}

.titulo-grupo-formulario span {
    font-size: 18px;
    line-height: 1;
}

.grade-grupo-formulario {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
    min-width: 0;
}

label {
    margin-bottom: 7px;
    font-size: 14px;
    font-weight: 700;
}

.opcional {
    color: var(--cor-texto-secundario);
    font-weight: 400;
}

input,
select {
    width: 100%;
    min-width: 0;
    min-height: 46px;
    padding: 11px 12px;
    background: white;
    color: var(--cor-texto);
    border: 1px solid #cbd5e1;
    border-radius: var(--raio-controle);
    font-size: 16px;
}

input:focus,
select:focus {
    border-color: var(--cor-primaria);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    outline: 0;
}

.texto-auxiliar {
    margin-top: 6px;
    color: var(--cor-texto-secundario);
    font-size: 12px;
    line-height: 1.4;
}

.notificacoes-produto,
.lojas-produto {
    width: 100%;
}

.linha-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 12px 0;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.4;
}

.linha-checkbox input {
    flex: 0 0 auto;
    width: 20px;
    min-height: 20px;
    margin: 1px 0 0;
    accent-color: var(--cor-primaria);
}

.cabecalho-secao-formulario .titulo-grupo-formulario {
    margin-bottom: 0;
}

.cabecalho-secao-formulario {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 12px;
}

#lista-lojas-formulario {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    min-width: 0;
}

.linha-loja {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    width: 100%;
    min-width: 0;
    padding: 13px;
    background: #f8fafc;
    border: 1px solid #e5eaf1;
    border-radius: 11px;
}

.linha-loja > * {
    min-width: 0;
}

.botao-adicionar-loja {
    min-height: 38px;
    padding: 8px 12px;
    background: #eff6ff;
    color: var(--cor-primaria);
    border: 1px solid #bfdbfe;
    border-radius: 9px;
    font-size: 13px;
    font-weight: 700;
}

.botao-remover-loja {
    width: 100%;
    padding: 10px 14px;
    background: var(--cor-perigo-clara);
    color: var(--cor-perigo);
    border: 1px solid #fecdd3;
    border-radius: 9px;
    font-weight: 700;
}

.botao-remover-loja:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.botoes {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
}

.botoes button {
    width: 100%;
    min-height: 48px;
    border-radius: 10px;
    font-weight: 700;
}

.botao-salvar {
    background: var(--cor-primaria);
    color: white;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

.botao-salvar:hover {
    background: var(--cor-primaria-escura);
}

.botao-limpar {
    background: #eef1f5;
    color: #475467;
}

#mensagem {
    min-height: 22px;
    margin: 14px 0 0;
    font-size: 14px;
    font-weight: 700;
}

.mensagem-sucesso { color: var(--cor-sucesso); }
.mensagem-erro { color: var(--cor-perigo); }

#lista-produtos {
    display: grid;
    gap: 12px;
    width: 100%;
    min-width: 0;
}

.produto {
    position: relative;
    width: 100%;
    min-width: 0;
    padding: 14px;
    background: var(--cor-superficie);
    border: 1px solid var(--cor-borda);
    border-radius: 13px;
    box-shadow: 0 3px 10px rgba(15, 31, 56, 0.06);
}

.cabecalho-produto {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr) 38px;
    align-items: start;
    gap: 11px;
}

.icone-produto {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    background: linear-gradient(145deg, #dbeafe, #eff6ff);
    color: var(--cor-primaria);
    border-radius: 12px;
    font-size: 22px;
    font-weight: 800;
}

.identificacao-produto {
    min-width: 0;
}

.produto h3 {
    margin: 0 0 4px;
    font-size: 15px;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

.metadados-produto {
    margin: 0 0 6px;
    color: var(--cor-texto-secundario);
    font-size: 12px;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.status {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
}

.status.ativo {
    background: var(--cor-sucesso-clara);
    color: #15803d;
}

.status.pausado {
    background: #f2f4f7;
    color: #667085;
}

.menu-produto {
    position: relative;
    z-index: 5;
}

.menu-produto > summary {
    display: grid;
    place-items: center;
    width: 38px;
    min-height: 38px;
    cursor: pointer;
    list-style: none;
    border-radius: 50%;
    color: var(--cor-texto-secundario);
    font-size: 25px;
    line-height: 1;
}

.menu-produto > summary::-webkit-details-marker {
    display: none;
}

.menu-produto[open] > summary {
    background: #eef2f7;
}

.menu-produto > div {
    position: absolute;
    top: 42px;
    right: 0;
    min-width: 165px;
    padding: 7px;
    background: white;
    border: 1px solid var(--cor-borda);
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(15, 31, 56, 0.18);
    display: grid;
    gap: 6px;
}

.botao-editar {
    width: 100%;
    padding: 9px 11px;
    background: #eff6ff;
    color: var(--cor-primaria);
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
}

.botao-excluir {
    width: 100%;
    padding: 9px 11px;
    background: var(--cor-perigo-clara);
    color: var(--cor-perigo);
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
}

.resumo-lojas {
    margin-top: 12px;
    border-top: 1px solid #edf0f4;
}

.resumo-lojas > summary,
.detalhes-consulta > summary {
    padding: 11px 0;
    cursor: pointer;
    color: var(--cor-primaria);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.4;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.lojas-monitoradas {
    margin-bottom: 10px;
}

.loja-monitorada {
    min-width: 0;
    margin: 8px 0;
    padding: 10px 11px;
    background: #f8fafc;
    border-left: 3px solid var(--cor-primaria);
    border-radius: 5px;
}

.loja-monitorada h4,
.resultado-loja h4 {
    margin: 0 0 6px;
    font-size: 14px;
}

.loja-monitorada p,
.resultado-loja p {
    margin: 6px 0;
    font-size: 13px;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.resumo-notificacoes {
    margin: 8px 0 0;
    color: var(--cor-texto-secundario);
    font-size: 12px;
    overflow-wrap: anywhere;
}

.produto-acoes {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 9px;
    margin-top: 13px;
}

.botao-consultar {
    width: 100%;
    min-height: 44px;
    padding: 10px 13px;
    background: var(--cor-sucesso);
    color: white;
    border-radius: 9px;
    font-size: 14px;
    font-weight: 700;
}

.botao-consultar:disabled {
    background: #8fa99a;
    cursor: wait;
}

.resultado-consulta {
    width: 100%;
    min-width: 0;
    max-height: none;
    margin-top: 12px;
    overflow: visible;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.resultado-consulta:empty {
    display: none;
}

.estado-carregando,
.resultado-consulta > .mensagem-erro {
    margin: 0;
    padding: 12px;
    background: #eff6ff;
    border-radius: 9px;
    color: var(--cor-primaria);
    font-size: 13px;
    font-weight: 700;
}

.resultado-consulta > .mensagem-erro {
    background: var(--cor-perigo-clara);
    color: var(--cor-perigo);
}

.resumo-consulta {
    padding: 13px;
    background: var(--cor-sucesso-clara);
    border: 1px solid #bbf7d0;
    border-radius: 10px;
}

.resumo-consulta h4 {
    margin: 0 0 8px;
    color: #166534;
    font-size: 15px;
}

.resumo-consulta p {
    margin: 6px 0;
    font-size: 13px;
}

.resultado-valores {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    width: 100%;
    margin: 12px 0;
}

.resultado-valor {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 11px;
    background: white;
    border: 1px solid #d8eee0;
    border-radius: 8px;
}

.resultado-valor span {
    margin-bottom: 4px;
    color: var(--cor-texto-secundario);
    font-size: 11px;
    line-height: 1.3;
}

.resultado-valor strong {
    min-width: 0;
    color: var(--cor-texto);
    font-size: 15px;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

.resultado-total {
    grid-column: 1 / -1;
    background: #dcfce7;
    border-color: #86efac;
}

.resultado-total strong {
    color: #14532d;
    font-size: 20px;
}

.avaliacao-notificacao {
    margin-top: 10px;
    padding: 10px;
    background: var(--cor-alerta-clara);
    color: #854d0e;
    border-radius: 8px;
    font-size: 12px;
    line-height: 1.45;
}

.avaliacao-notificacao strong {
    display: block;
}

.avaliacao-notificacao p {
    margin: 4px 0 0;
    color: #854d0e;
    font-size: 12px;
}

.detalhes-consulta {
    margin-top: 8px;
}

.resultado-loja {
    min-width: 0;
    margin: 9px 0;
    padding: 12px;
    background: white;
    border: 1px solid var(--cor-borda);
    border-left: 4px solid #7d8798;
    border-radius: 8px;
}

.resultado-loja.vencedora {
    background: #f3fcf6;
    border-left-color: var(--cor-sucesso);
}

.resultado-loja.erro-loja {
    background: var(--cor-perigo-clara);
    border-left-color: var(--cor-perigo);
}

.valor-total {
    padding: 8px;
    background: #eff6ff;
    border-radius: 6px;
    color: #1e3a8a;
    font-size: 15px !important;
}

.sem-produtos {
    display: grid;
    place-items: center;
    min-height: 150px;
    padding: 22px;
    color: var(--cor-texto-secundario);
    text-align: center;
    border: 1px dashed #cbd5e1;
    border-radius: 12px;
}

.sem-produtos span {
    font-size: 35px;
    color: #94a3b8;
}

.sem-produtos p {
    margin: 6px 0 0;
}

.placeholder-card {
    display: grid;
    place-items: center;
    min-height: 280px;
    padding: 30px 20px;
    text-align: center;
}

.icone-placeholder {
    display: grid;
    place-items: center;
    width: 68px;
    height: 68px;
    margin-bottom: 14px;
    background: #eff6ff;
    color: var(--cor-primaria);
    border-radius: 20px;
    font-size: 32px;
}

.placeholder-card h3 {
    margin: 0 0 7px;
    font-size: 19px;
}

.placeholder-card p {
    max-width: 390px;
    margin: 0;
    color: var(--cor-texto-secundario);
    font-size: 14px;
}

.lista-comparacao-visual {
    display: grid;
    gap: 8px;
    width: 100%;
    margin-top: 18px;
    text-align: left;
}

.lista-comparacao-visual label {
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr);
    align-items: center;
    gap: 9px;
    width: 100%;
    margin: 0;
    padding: 10px;
    background: #f8fafc;
    border: 1px solid var(--cor-borda);
    border-radius: 9px;
    color: var(--cor-texto-secundario);
    font-size: 13px;
}

.lista-comparacao-visual input {
    width: 18px;
    min-height: 18px;
}

.lista-comparacao-visual span {
    min-width: 0;
    overflow-wrap: anywhere;
}

.placeholder-card button {
    width: 100%;
    margin-top: 20px;
    padding: 11px;
    background: #e8edf4;
    color: #98a2b3;
    border-radius: 9px;
    font-weight: 700;
    cursor: not-allowed;
}

.filtros-visuais {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.filtros-visuais span {
    padding: 8px 11px;
    background: white;
    color: var(--cor-texto-secundario);
    border: 1px solid var(--cor-borda);
    border-radius: 999px;
    font-size: 12px;
}

.lista-configuracoes {
    padding: 6px 15px;
}

.lista-configuracoes > div {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    padding: 14px 0;
    border-bottom: 1px solid #edf0f4;
}

.lista-configuracoes > div:last-child {
    border-bottom: 0;
}

.lista-configuracoes > div > span {
    color: var(--cor-primaria);
    font-size: 21px;
}

.lista-configuracoes p,
.lista-configuracoes strong,
.lista-configuracoes small {
    display: block;
    margin: 0;
}

.lista-configuracoes small {
    margin-top: 2px;
    color: var(--cor-texto-secundario);
}

.navegacao-inferior {
    position: fixed;
    z-index: 100;
    right: 0;
    bottom: 0;
    left: 0;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    width: 100%;
    min-height: calc(var(--altura-nav) + env(safe-area-inset-bottom));
    padding: 7px 4px max(7px, env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, 0.97);
    border-top: 1px solid var(--cor-borda);
    box-shadow: 0 -4px 18px rgba(15, 31, 56, 0.09);
    backdrop-filter: blur(12px);
}

.navegacao-inferior button {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    min-width: 0;
    min-height: 54px;
    padding: 4px 1px;
    background: transparent;
    color: #667085;
    border-radius: 11px;
}

.navegacao-inferior button > span {
    font-size: 21px;
    line-height: 1;
}

.navegacao-inferior button > small {
    max-width: 100%;
    overflow: hidden;
    font-size: 9px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.navegacao-inferior button.ativo {
    background: #eff6ff;
    color: var(--cor-primaria);
}

@media (min-width: 390px) {
    .navegacao-inferior button > small {
        font-size: 10px;
    }
}

@media (min-width: 600px) {
    .produto-acoes {
        grid-template-columns: minmax(0, 1fr);
    }

    .botoes {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 768px) {
    .topo-aplicativo {
        padding-right: max(24px, calc((100% - 900px) / 2));
        padding-left: max(24px, calc((100% - 900px) / 2));
    }

    .conteudo-aplicativo {
        width: calc(100% - 40px);
        max-width: 900px;
        padding-top: 24px;
    }

    .card,
    .painel-lista {
        padding: 22px;
    }

    .formulario {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 18px;
    }

    .campo-grande,
    .grupo-formulario,
    .notificacoes-produto,
    .lojas-produto,
    .botoes {
        grid-column: 1 / -1;
    }

    .grade-grupo-formulario {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 18px;
    }

    .linha-loja {
        grid-template-columns: minmax(140px, 1fr) minmax(0, 2.2fr) minmax(125px, 0.8fr) auto;
        align-items: end;
    }

    .botao-remover-loja {
        width: auto;
        white-space: nowrap;
    }

    .navegacao-inferior {
        right: 50%;
        left: auto;
        width: min(100%, 900px);
        transform: translateX(50%);
        border-right: 1px solid var(--cor-borda);
        border-left: 1px solid var(--cor-borda);
        border-radius: 18px 18px 0 0;
    }

    .navegacao-inferior button > small {
        font-size: 11px;
    }
}

@media (min-width: 960px) {
    #lista-produtos {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: start;
    }

    .produto:has(.resultado-consulta:not(:empty)) {
        grid-column: 1 / -1;
    }
}

@media (min-width: 1100px) {
    .topo-aplicativo {
        grid-template-columns: 48px minmax(0, 1fr) 48px;
        padding-right: max(24px, calc((100% - 1100px) / 2));
        padding-left: max(24px, calc((100% - 1100px) / 2));
    }

    .marca-aplicativo h1 {
        font-size: 19px;
    }

    .marca-aplicativo p {
        font-size: 13px;
    }

    .conteudo-aplicativo {
        width: min(94%, 1100px);
        max-width: 1100px;
        margin-inline: auto;
    }

    .navegacao-inferior {
        max-width: 900px;
    }

    .cabecalho-tela h2,
    .cabecalho-interno h2 {
        font-size: 28px;
    }

    .card,
    .painel-lista {
        padding: 26px;
    }

    .card-formulario {
        padding: 28px;
    }
}

/* Comparação entre produtos consultados */
.painel-comparacao {
    margin-bottom: 16px;
}

.cabecalho-comparacao {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}

.cabecalho-comparacao h3 {
    margin: 0;
    font-size: 17px;
}

#contador-comparacao {
    padding: 5px 9px;
    background: #eff6ff;
    color: var(--cor-primaria);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.lista-comparacao-visual {
    display: grid;
    gap: 10px;
    width: 100%;
}

.lista-comparacao-visual .item-comparacao {
    display: grid;
    grid-template-columns: 22px 44px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    width: 100%;
    min-width: 0;
    margin: 0;
    padding: 12px;
    background: #f8fafc;
    border: 1px solid var(--cor-borda);
    border-radius: 11px;
    cursor: pointer;
}

.lista-comparacao-visual .item-comparacao.selecionado {
    background: #eff6ff;
    border-color: #93c5fd;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.08);
}

.lista-comparacao-visual .item-comparacao:has(input:disabled) {
    cursor: wait;
}

.item-comparacao > input {
    width: 20px;
    min-height: 20px;
    margin: 0;
    accent-color: var(--cor-primaria);
}

.inicial-comparacao {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    background: #dbeafe;
    color: var(--cor-primaria);
    border-radius: 10px;
    font-size: 18px;
    font-weight: 800;
}

.textos-comparacao {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.textos-comparacao strong,
.textos-comparacao small {
    overflow-wrap: anywhere;
    word-break: break-word;
}

.textos-comparacao strong {
    color: var(--cor-texto);
    font-size: 14px;
    line-height: 1.35;
}

.textos-comparacao small {
    margin-top: 3px;
    color: var(--cor-texto-secundario);
    font-size: 12px;
    line-height: 1.4;
}

.estado-consulta {
    align-self: flex-start;
    margin-top: 6px;
    padding: 3px 7px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
}

.estado-consulta.consultado {
    background: var(--cor-sucesso-clara);
    color: #15803d;
}

.estado-consulta.pendente {
    background: #f2f4f7;
    color: #667085;
}

.estado-consulta.consultando {
    background: #eff6ff;
    color: var(--cor-primaria);
}

.estado-consulta.falhou {
    background: var(--cor-perigo-clara);
    color: var(--cor-perigo);
}

.mensagem-comparacao {
    min-height: 20px;
    margin: 12px 0;
    color: var(--cor-perigo);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.5;
    white-space: pre-line;
}

.botao-comparar {
    width: 100%;
    min-height: 48px;
    padding: 11px 16px;
    background: var(--cor-primaria);
    color: white;
    border-radius: 10px;
    font-weight: 700;
}

.botao-comparar:disabled {
    background: #d7dde7;
    color: #8a94a4;
    cursor: not-allowed;
}

.resultado-comparacao:empty {
    display: none;
}

.resultado-comparacao > h3 {
    margin: 20px 0 12px;
    font-size: 20px;
}

.lista-ranking {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
}

.item-ranking {
    min-width: 0;
    padding: 15px;
    background: white;
    border: 1px solid var(--cor-borda);
    border-radius: 13px;
    box-shadow: var(--sombra);
}

.item-ranking.vencedor-ranking {
    background: #f3fcf6;
    border: 2px solid #86efac;
}

.cabecalho-ranking {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.posicao-ranking {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    background: #eef2f7;
    color: var(--cor-texto);
    border-radius: 50%;
    font-size: 16px;
    font-weight: 800;
}

.vencedor-ranking .posicao-ranking {
    background: var(--cor-sucesso);
    color: white;
}

.cabecalho-ranking h4,
.cabecalho-ranking p {
    margin: 0;
    overflow-wrap: anywhere;
}

.cabecalho-ranking h4 {
    font-size: 16px;
}

.cabecalho-ranking p {
    margin-top: 3px;
    color: var(--cor-texto-secundario);
    font-size: 12px;
}

.selo-melhor {
    grid-column: 1 / -1;
    justify-self: start;
    padding: 4px 8px;
    background: var(--cor-sucesso);
    color: white;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
}

.valores-ranking {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
    margin-bottom: 10px;
}

.item-ranking > p {
    margin: 7px 0;
    font-size: 13px;
    overflow-wrap: anywhere;
}

.resumo-ranking {
    margin-top: 14px;
    padding: 16px;
    background: var(--cor-sucesso-clara);
    border: 1px solid #86efac;
    border-radius: 13px;
}

.resumo-ranking h4 {
    margin: 0 0 10px;
    color: #166534;
    font-size: 17px;
}

.resumo-ranking p {
    margin: 7px 0;
    font-size: 14px;
}

.comparacao-vazia {
    margin: 0;
    padding: 20px;
    color: var(--cor-texto-secundario);
    text-align: center;
}

@media (min-width: 768px) {
    .lista-ranking {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .vencedor-ranking {
        grid-column: 1 / -1;
    }
}

/* Histórico de consultas */
.tela-consultas { display: grid; gap: 14px; }
.filtros-historico { display: grid; grid-template-columns: 1fr; gap: 12px; }
.filtros-historico label { display: grid; gap: 6px; color: var(--cor-texto-secundario); font-size: 12px; font-weight: 700; }
.filtro-produtos-historico { position: relative; display: grid; gap: 6px; min-width: 0; color: var(--cor-texto-secundario); font-size: 12px; font-weight: 700; }
.filtro-produtos-historico small { font-weight: 400; }
#seletor-produtos-historico { position: relative; min-width: 0; }
#seletor-produtos-historico > summary { display: flex; align-items: center; min-height: 44px; padding: 9px 36px 9px 11px; overflow: hidden; background: white; border: 1px solid var(--cor-borda); border-radius: 9px; color: var(--cor-texto); font-size: 16px; font-weight: 600; cursor: pointer; list-style: none; text-overflow: ellipsis; white-space: nowrap; }
#seletor-produtos-historico > summary::-webkit-details-marker { display: none; }
#seletor-produtos-historico > summary::after { content: "⌄"; position: absolute; right: 13px; font-size: 18px; }
.conteudo-seletor-produtos { position: absolute; z-index: 30; top: calc(100% + 5px); right: 0; left: 0; padding: 7px; background: white; border: 1px solid var(--cor-borda); border-radius: 10px; box-shadow: 0 12px 28px rgba(15, 31, 56, .18); }
#busca-produtos-historico { width: 100%; min-height: 42px; margin-bottom: 6px; padding: 9px 11px; border: 1px solid var(--cor-borda); border-radius: 8px; font-size: 16px; box-sizing: border-box; }
#opcoes-produtos-historico { display: grid; gap: 2px; max-height: 270px; overflow-y: auto; }
#nenhum-produto-historico { margin: 10px; color: var(--cor-texto-secundario); font-size: 13px; font-weight: 500; text-align: center; }
.filtros-historico .opcao-produto-historico { display: grid; grid-template-columns: 20px minmax(0, 1fr); align-items: start; gap: 9px; padding: 9px; color: var(--cor-texto); border-radius: 7px; font-size: 13px; font-weight: 500; cursor: pointer; overflow-wrap: anywhere; }
.filtros-historico .opcao-produto-historico:hover { background: #eff6ff; }
.opcao-produto-historico input { width: 18px; min-height: 18px; margin: 0; accent-color: var(--cor-primaria); }
.filtros-historico select { width: 100%; min-width: 0; min-height: 44px; padding: 9px 11px; border: 1px solid var(--cor-borda); border-radius: 9px; background: white; font-size: 16px; }
#atualizar-historico { min-height: 44px; padding: 10px 18px; align-self: end; background: var(--cor-primaria); color: white; border-radius: 9px; font-weight: 700; }
#atualizar-historico:disabled { opacity: .55; cursor: wait; }
.estado-historico { min-height: 0; margin: 0; color: var(--cor-texto-secundario); font-size: 13px; }
.estado-historico:not(:empty) { padding: 13px; background: #eff6ff; border-radius: 9px; }
.estado-historico.erro { background: var(--cor-perigo-clara); color: var(--cor-perigo); }
.info-cache-historico { display: flex; flex-wrap: wrap; gap: 5px 14px; padding: 11px 13px; background: #eef6ff; color: var(--cor-texto-secundario); border-radius: 9px; font-size: 12px; }
.info-cache-historico strong { width: 100%; color: var(--cor-primaria); }
#carregar-mais-historico { width: 100%; min-height: 42px; margin-top: 12px; background: #eff6ff; color: var(--cor-primaria); border: 1px solid #bfdbfe; border-radius: 9px; font-weight: 700; }
#limpar-cache-historico { min-height: 36px; margin-top: 8px; padding: 7px 11px; background: var(--cor-perigo-clara); color: var(--cor-perigo); border-radius: 8px; font-weight: 700; }
.resumo-historico { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.resumo-historico article { min-width: 0; padding: 13px; background: white; border: 1px solid var(--cor-borda); border-radius: 11px; box-shadow: var(--sombra); }
.resumo-historico span { display: block; margin-bottom: 5px; color: var(--cor-texto-secundario); font-size: 11px; }
.resumo-historico strong { font-size: 17px; overflow-wrap: anywhere; }
.painel-grafico-historico h3, .painel-consultas-recentes h3 { margin: 0 0 14px; font-size: 17px; }
.grafico-historico { width: 100%; min-width: 0; min-height: 270px; overflow: hidden; }
.grafico-historico svg { display: block; width: 100%; height: auto; min-height: 260px; }
.grade-grafico { stroke: #e5e7eb; stroke-width: 1; }
.rotulo-eixo { fill: #667085; font-size: 11px; }
.legenda-historico { display: flex; flex-wrap: wrap; gap: 8px 14px; margin-top: 10px; font-size: 11px; }
.legenda-historico span { display: inline-flex; align-items: center; gap: 6px; min-width: 0; overflow-wrap: anywhere; }
.legenda-historico i { flex: 0 0 auto; width: 10px; height: 10px; border-radius: 50%; }
.historico-vazio { display: grid; place-items: center; min-height: 250px; margin: 0; color: var(--cor-texto-secundario); text-align: center; }
.lista-historico { display: grid; gap: 11px; }
.item-historico { min-width: 0; padding: 13px; border: 1px solid var(--cor-borda); border-radius: 11px; background: #f8fafc; }
.topo-item-historico { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: start; }
.topo-item-historico h4, .topo-item-historico p { margin: 0; overflow-wrap: anywhere; }
.topo-item-historico h4 { font-size: 14px; }
.topo-item-historico p { margin-top: 4px; color: var(--cor-texto-secundario); font-size: 11px; }
.total-item-historico { color: #15803d; font-size: 15px; white-space: nowrap; }
.tipo-historico {
    display: inline-flex;
    width: fit-content;
    margin: 3px 0 6px;
    padding: 3px 7px;
    border-radius: 999px;
    background: #e8f0ff;
    color: #2457a7;
    font-size: 11px;
    font-weight: 700;
}

.tipo-historico.local {
    background: #f1f5f9;
    color: var(--cor-texto-secundario);
}
.valores-item-historico { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 12px; margin-top: 10px; }
.valores-item-historico p, .item-historico details p { margin: 3px 0; font-size: 12px; overflow-wrap: anywhere; }
.valores-item-historico p:nth-child(3) { padding: 8px; background: var(--cor-sucesso-clara); color: #166534; border-radius: 7px; font-size: 13px; }
.item-historico summary { padding: 10px 0 0; color: var(--cor-primaria); cursor: pointer; font-size: 12px; font-weight: 700; }
.item-historico a { display: inline-block; margin-top: 8px; overflow-wrap: anywhere; }
.todas-lojas-historico { margin-top: 99px; padding-top: 7px; border-top: 1px solid var(--cor-borda); }

@media (min-width: 768px) {
    .filtros-historico { grid-template-columns: minmax(0, 2fr) minmax(180px, 1fr) auto; }
    .resumo-historico { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .grafico-historico { min-height: 350px; }
    .grafico-historico svg { min-height: 330px; }
    .tipo-historico {
    display: inline-flex;
    width: fit-content;
    margin: 3px 0 6px;
    padding: 3px 7px;
    border-radius: 999px;
    background: #e8f0ff;
    color: #2457a7;
    font-size: 11px;
    font-weight: 700;
}

.tipo-historico.local {
    background: #f1f5f9;
    color: var(--cor-texto-secundario);
}
.valores-item-historico { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* Autenticação & Usuários */
.overlay-login {
    position: fixed;
    z-index: 1000;
    top: 0; left: 0; right: 0; bottom: 0;
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgba(15, 31, 56, 0.85);
    backdrop-filter: blur(4px);
}
.card-login {
    max-width: 400px;
    width: 100%;
    text-align: center;
    padding: 28px 20px;
}
.marca-login h2 { margin: 10px 0 4px; font-size: 22px; }
.marca-login p { margin: 0 0 20px; color: var(--cor-texto-secundario); font-size: 14px; }
.botao-google {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    min-height: 48px;
    padding: 10px 18px;
    background: white;
    color: var(--cor-texto);
    border: 1px solid var(--cor-borda);
    border-radius: var(--raio-controle);
    font-size: 15px;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(15, 31, 56, 0.08);
}
.botao-google:hover { background: #f8fafc; }
.mensagem-login-erro {
    margin-top: 14px;
    padding: 10px;
    background: var(--cor-perigo-clara);
    color: var(--cor-perigo);
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
}

.painel-usuario-topo {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-self: end;
    font-size: 12px;
}
.email-topo { max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.badge-papel {
    padding: 2px 6px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
}
.botao-logout {
    min-height: 30px;
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
}
.botao-logout:hover { background: rgba(255, 255, 255, 0.3); }

.badge-visibilidade {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    margin-left: 6px;
}
.badge-visibilidade.privada { background: #f1f5f9; color: #475467; }
.badge-visibilidade.compartilhada { background: #eff6ff; color: var(--cor-primaria); }

.modal-sobreposicao {
    position: fixed;
    z-index: 900;
    top: 0; left: 0; right: 0; bottom: 0;
    display: grid;
    place-items: center;
    padding: 16px;
    background: rgba(15, 31, 56, 0.6);
}
.modal-card {
    max-width: 460px;
    width: 100%;
    padding: 20px;
}
.cabecalho-modal {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}
.cabecalho-modal h3 { margin: 0; font-size: 18px; }
.botao-fechar-modal {
    background: transparent;
    font-size: 24px;
    color: var(--cor-texto-secundario);
    min-height: 36px;
}
.lista-checkboxes-usuarios {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 220px;
    overflow-y: auto;
    margin: 14px 0;
    padding: 6px;
    border: 1px solid var(--cor-borda);
    border-radius: 8px;
}
.botoes-modal { display: flex; gap: 10px; margin-top: 14px; }
.botoes-modal button { flex: 1; }

.formulario-admin { display: grid; gap: 12px; margin-top: 12px; }
.painel-lista-admin { margin-top: 14px; }
.lista-usuarios-admin { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.item-usuario-admin {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    background: #f8fafc;
    border: 1px solid var(--cor-borda);
    border-radius: 10px;
}
.item-usuario-admin h4 { margin: 0; font-size: 14px; }
.item-usuario-admin p { margin: 2px 0 0; color: var(--cor-texto-secundario); font-size: 12px; }

.aviso-discreto {
    font-size: 13px;
    color: #854d0e;
    background-color: #fef9c3;
    border: 1px solid #fef08a;
    padding: 8px 12px;
    border-radius: 6px;
    margin-bottom: 10px;
}

.container-toasts {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 360px;
    width: calc(100% - 40px);
}

.toast-notificacao {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: #0f1f38;
    color: #ffffff;
    padding: 14px 16px;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
    border: 1px solid #2563eb;
    cursor: pointer;
    animation: toastEntrar 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.toast-notificacao.saindo {
    opacity: 0;
    transform: translateY(-10px);
}

.toast-icone {
    font-size: 20px;
    line-height: 1;
}

.toast-conteudo h4 {
    margin: 0 0 4px 0;
    font-size: 14px;
    font-weight: 700;
    color: #ffffff;
}

.toast-conteudo p {
    margin: 0;
    font-size: 13px;
    color: #cbd5e1;
    line-height: 1.4;
}

@keyframes toastEntrar {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}


.acoes-cabecalho-produtos {
    display: flex;
    align-items: center;
    gap: 10px;
}

.botao-atualizar-produtos {
    min-height: 42px;
    padding: 8px 14px;
    border: 1px solid var(--cor-primaria);
    border-radius: 10px;
    background: var(--cor-superficie);
    color: var(--cor-primaria);
    font-weight: 700;
}

.botao-atualizar-produtos:disabled {
    opacity: .55;
    cursor: wait;
}

.ultima-sincronizacao-produtos,
.aviso-cache-produtos {
    margin-top: 4px;
    font-size: 12px;
    color: var(--cor-texto-secundario);
}

.aviso-cache-produtos {
    color: #9a6700;
}

@media (max-width: 600px) {
    .acoes-cabecalho-produtos {
        align-items: flex-end;
        flex-direction: column-reverse;
    }
    .botao-atualizar-produtos {
        min-height: 36px;
        padding: 6px 9px;
        font-size: 12px;
    }
}
/* Tema e Configurações da versão distribuída */
.lista-configuracoes > div {
    border-bottom-color: var(--cor-borda);
}

.conteudo-configuracao {
    min-width: 0;
    width: 100%;
}

.conteudo-configuracao > strong {
    margin-bottom: 7px;
}

.conteudo-configuracao select {
    width: 100%;
    min-height: 44px;
    padding: 9px 36px 9px 11px;
    background: var(--cor-superficie);
    color: var(--cor-texto);
    border: 1px solid var(--cor-borda);
    border-radius: var(--raio-controle);
}

.acoes-configuracao {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.acoes-configuracao button {
    width: auto;
    min-width: min(100%, 190px);
}

.feedback-configuracao {
    margin-top: 8px !important;
}

input,
select,
textarea,
.campo-pesquisa,
.card,
.painel-lista,
.item-produto,
.item-historico,
.resumo-historico article,
#seletor-produtos-historico > summary,
.conteudo-seletor-produtos,
.filtros-historico select,
.botao-google {
    background-color: var(--cor-superficie);
    color: var(--cor-texto);
    border-color: var(--cor-borda);
}

.linha-loja,
.card-loja-formulario,
.resultado-comparacao article,
.opcao-produto-historico,
.info-cache-historico,
.estado-historico,
.placeholder-card button {
    background-color: var(--cor-superficie-secundaria);
    color: var(--cor-texto);
    border-color: var(--cor-borda);
}

.navegacao-inferior {
    background: var(--nav-bg);
}

.navegacao-inferior button {
    color: var(--cor-texto-secundario);
}

.navegacao-inferior button.ativo,
#carregar-mais-historico {
    background: var(--cor-primaria-suave);
    color: var(--cor-primaria);
    border-color: var(--cor-primaria);
}

.modal-sobreposicao,
.overlay-login {
    background-color: var(--overlay);
}

.grade-grafico,
.linha-grade-grafico {
    stroke: var(--cor-borda);
}

.rotulo-grafico,
.rotulo-eixo-grafico {
    fill: var(--cor-texto-secundario);
}

.valores-item-historico p:nth-child(3),
.total-item-historico {
    color: var(--cor-sucesso-texto);
}

.mensagem-aviso,
.aviso-cache-produtos {
    color: var(--cor-alerta-texto);
}

[data-theme="dark"] .topo-aplicativo {
    box-shadow: 0 2px 14px rgba(2, 6, 23, 0.65);
}

[data-theme="dark"] .modal-card,
[data-theme="dark"] .toast-notificacao {
    box-shadow: 0 18px 40px rgba(2, 6, 23, 0.55);
}

[data-theme="dark"] .toast-notificacao {
    background: #172033;
    border-color: #60a5fa;
}

[data-theme="dark"] .toast-conteudo h4 {
    color: #f8fafc;
}

[data-theme="dark"] .toast-conteudo p {
    color: #cbd5e1;
}

[data-theme="dark"] input::placeholder,
[data-theme="dark"] textarea::placeholder {
    color: #94a3b8;
}

@media (max-width: 600px) {
    .acoes-configuracao {
        flex-direction: column;
    }

    .acoes-configuracao button {
        width: 100%;
    }
}
/* Contraste reforçado nas telas de comparação, histórico e administração */
[data-theme="dark"] .lista-comparacao-visual .item-comparacao {
    background: #172033;
    color: var(--cor-texto);
    border-color: #475569;
}

[data-theme="dark"] .lista-comparacao-visual .item-comparacao:hover {
    background: #1d2a3d;
    border-color: #64748b;
}

[data-theme="dark"] .lista-comparacao-visual .item-comparacao.selecionado {
    background: #172d4f;
    border-color: #60a5fa;
    box-shadow: 0 0 0 2px rgba(96, 165, 250, 0.18);
}

[data-theme="dark"] .inicial-comparacao {
    background: #1e3a5f;
    color: #93c5fd;
}

[data-theme="dark"] .estado-consulta.pendente {
    background: #334155;
    color: #e2e8f0;
}

[data-theme="dark"] .estado-consulta.consultando {
    background: #1e3a5f;
    color: #bfdbfe;
}

[data-theme="dark"] .estado-consulta.consultado {
    background: #123524;
    color: #bbf7d0;
}

[data-theme="dark"] .botao-comparar:disabled {
    background: #334155;
    color: #cbd5e1;
    opacity: 0.78;
}

[data-theme="dark"] .estado-historico:not(:empty) {
    background: #172d4f;
    color: #dbeafe;
    border: 1px solid #294d78;
}

[data-theme="dark"] .estado-historico.erro {
    background: var(--cor-perigo-clara);
    color: #fecaca;
    border-color: #7f1d1d;
}

[data-theme="dark"] .info-cache-historico {
    background: #172033;
    color: #cbd5e1;
    border: 1px solid #334155;
}

[data-theme="dark"] .item-historico {
    background: #172033;
    border-color: #3b4b61;
}

[data-theme="dark"] .tipo-historico,
[data-theme="dark"] .tipo-historico.local {
    background: #1e3a5f;
    color: #bfdbfe;
    border: 1px solid #315d8f;
}

[data-theme="dark"] .valores-item-historico p:nth-child(3) {
    background: #123524;
    color: #bbf7d0;
}

[data-theme="dark"] .item-usuario-admin {
    background: #172033;
    color: #f8fafc;
    border-color: #475569;
}

[data-theme="dark"] .item-usuario-admin h4 {
    color: #f8fafc;
}

[data-theme="dark"] .item-usuario-admin p {
    color: #cbd5e1;
}

[data-theme="dark"] .item-usuario-admin .botao-excluir {
    background: #4c1d2a;
    color: #fecdd3;
    border: 1px solid #9f3854;
}

[data-theme="dark"] .item-usuario-admin .botao-excluir:hover {
    background: #642238;
}

[data-theme="dark"] .resumo-historico article,
[data-theme="dark"] .painel-grafico-historico,
[data-theme="dark"] .painel-consultas-recentes,
[data-theme="dark"] .painel-comparacao,
[data-theme="dark"] .painel-lista-admin {
    border-color: #3b4b61;
}

[data-theme="dark"] .texto-secundario,
[data-theme="dark"] .textos-comparacao small,
[data-theme="dark"] .topo-item-historico p {
    color: #cbd5e1;
}