/* Endereços de Clientes — Netto Contabilidade
   Cores da marca: azul #0070BA e amarelo #E5D30F (logotipo do site). */

:root {
  --azul: #0070BA;
  --azul-escuro: #005A96;
  --azul-claro: #E6F1FA;
  --amarelo: #E5D30F;
  --marca-texto: #FFF6A8;
  --fundo: #F3F5F8;
  --cartao: #FFFFFF;
  --texto: #18212C;
  --texto-2: #586474;
  --borda: #DFE4EA;
  --destaque: #FFF0A0;
  --alerta-fundo: #FFF7D6;
  --alerta-borda: #E8CF55;
  --alerta-texto: #5C4A00;
  --waze: #33CCFF;
  --waze-texto: #06293A;
  --sombra: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .08);
  --raio: 14px;
  --topo-h: 58px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --azul: #3B9BE2;
    --azul-escuro: #8CC4F0;
    --azul-claro: #16304A;
    --fundo: #0E141B;
    --cartao: #17202A;
    --texto: #E7ECF2;
    --texto-2: #9AA7B6;
    --borda: #263343;
    --destaque: rgba(229, 211, 15, .32);
    --alerta-fundo: #2E2A12;
    --alerta-borda: #6B5F1C;
    --alerta-texto: #F1E3A0;
    --sombra: none;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

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

body {
  margin: 0;
  background: var(--fundo);
  color: var(--texto);
  font: 17px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Open Sans", Arial, sans-serif;
  -webkit-tap-highlight-color: transparent;
  min-height: 100vh;
  padding-bottom: env(safe-area-inset-bottom);
}

a { color: var(--azul); }
button, input { font: inherit; color: inherit; }
svg { display: block; }

.sr {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

:focus-visible { outline: 3px solid var(--azul); outline-offset: 2px; }

/* ---------- Topo ---------- */

.topo {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: calc(var(--topo-h) + env(safe-area-inset-top));
  padding: env(safe-area-inset-top) max(16px, env(safe-area-inset-right)) 0 max(16px, env(safe-area-inset-left));
  background: #0070BA;
  color: #fff;
  border-bottom: 3px solid var(--amarelo);
}

.marca {
  display: flex; align-items: center; gap: 10px;
  color: inherit; text-decoration: none; min-width: 0;
}
.marca img { flex: none; border-radius: 9px; box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .55); }
.marca-texto { display: flex; flex-direction: column; min-width: 0; line-height: 1.15; }
.marca-texto strong { font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.marca-texto small { font-size: 12.5px; color: var(--marca-texto); letter-spacing: .02em; }

.btn-icone {
  flex: none; display: grid; place-items: center;
  width: 44px; height: 44px; border-radius: 12px;
  color: #fff;
}
.btn-icone:active { background: rgba(255, 255, 255, .16); }
.btn-icone svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }

main { max-width: 680px; margin: 0 auto; }

/* ---------- Pesquisa ---------- */

.busca-fixa {
  position: sticky; top: calc(var(--topo-h) + 3px + env(safe-area-inset-top)); z-index: 10;
  padding: 14px 16px 10px;
  background: var(--fundo);
}

.busca { position: relative; }
.busca input {
  width: 100%; height: 54px;
  padding: 0 52px 0 48px;
  border: 1.5px solid var(--borda); border-radius: var(--raio);
  background: var(--cartao);
  font-size: 18px;
  box-shadow: var(--sombra);
  -webkit-appearance: none; appearance: none;
}
.busca input::placeholder { color: var(--texto-2); }
.busca input:focus { outline: none; border-color: var(--azul); box-shadow: 0 0 0 3px color-mix(in srgb, var(--azul) 22%, transparent); }
.busca input::-webkit-search-cancel-button { display: none; }
.busca-lupa {
  position: absolute; left: 15px; top: 50%; transform: translateY(-50%);
  width: 22px; height: 22px; fill: none; stroke: var(--texto-2); stroke-width: 2; stroke-linecap: round;
  pointer-events: none;
}
.busca-limpar {
  position: absolute; right: 5px; top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px; border: 0; border-radius: 10px; background: transparent;
  display: grid; place-items: center; cursor: pointer;
}
.busca-limpar svg { width: 20px; height: 20px; fill: none; stroke: var(--texto-2); stroke-width: 2.2; stroke-linecap: round; }

.info { margin: 2px 20px 8px; font-size: 14px; color: var(--texto-2); min-height: 1.4em; }
.info strong { color: var(--texto); }

.lista {
  list-style: none; margin: 0 16px 24px; padding: 0;
  background: var(--cartao); border: 1px solid var(--borda); border-radius: var(--raio);
  overflow: hidden; box-shadow: var(--sombra);
}
.lista:empty { display: none; }
.lista li + li { border-top: 1px solid var(--borda); }
.lista a {
  position: relative; display: flex; flex-direction: column; gap: 2px;
  min-height: 64px; padding: 12px 44px 12px 16px;
  color: inherit; text-decoration: none;
}
.lista a:active { background: var(--azul-claro); }
@media (hover: hover) { .lista a:hover { background: var(--azul-claro); } }
.lista a::after {
  content: ""; position: absolute; right: 18px; top: 50%;
  width: 9px; height: 9px; margin-top: -5px;
  border-right: 2px solid var(--texto-2); border-top: 2px solid var(--texto-2);
  transform: rotate(45deg); opacity: .6;
}
.lista .nome { font-weight: 650; font-size: 16.5px; line-height: 1.3; }
.lista .fantasia { font-size: 14.5px; color: var(--azul-escuro); }
.lista .meta { font-size: 13.5px; color: var(--texto-2); line-height: 1.35; }

.titulo-lista {
  margin: 6px 20px 8px; font-size: 13px; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: var(--texto-2);
}

mark { background: var(--destaque); color: inherit; border-radius: 3px; padding: 0 1px; }

.filial {
  display: inline-block; padding: 0 7px; border-radius: 99px;
  background: var(--azul-claro); color: var(--azul-escuro);
  font-size: 12px; font-weight: 700; line-height: 19px; vertical-align: 1px;
}

/* ---------- Estado vazio ---------- */

.vazio { margin: 24px 16px; padding: 28px 22px; text-align: center; background: var(--cartao); border: 1px solid var(--borda); border-radius: var(--raio); }
.vazio svg { width: 56px; height: 56px; margin: 0 auto 10px; }
.vazio h2 { margin: 0 0 6px; font-size: 20px; }
.vazio p { margin: 0 0 18px; color: var(--texto-2); }

/* ---------- Páginas (cliente e base) ---------- */

.pagina { padding: 8px 16px 32px; }

.voltar {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 44px; padding: 0 12px 0 4px; margin: 4px 0 2px -4px;
  border: 0; background: none; color: var(--azul); font-weight: 600; font-size: 16px; cursor: pointer;
  border-radius: 10px;
}
.voltar svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

.cliente-nome { margin: 2px 0 4px; font-size: 23px; line-height: 1.25; font-weight: 750; letter-spacing: -.01em; overflow-wrap: anywhere; }
.cliente-fantasia { margin: 0 0 6px; font-size: 17px; color: var(--azul-escuro); font-weight: 600; }
.etiquetas { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 4px; }
.etiqueta {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 99px;
  background: var(--cartao); border: 1px solid var(--borda);
  font-size: 14px; color: var(--texto-2); font-variant-numeric: tabular-nums;
}
.etiqueta.filial-etq { background: var(--azul-claro); border-color: transparent; color: var(--azul-escuro); font-weight: 700; }
.outros-nomes { margin: 6px 0 0; font-size: 14px; color: var(--texto-2); }

.cartao {
  margin: 14px 0 0; padding: 16px 18px;
  background: var(--cartao); border: 1px solid var(--borda); border-radius: var(--raio);
  box-shadow: var(--sombra);
}
.cartao h2 { margin: 0 0 8px; font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--texto-2); }
.cartao p { margin: 0; }

.endereco { border-left: 5px solid var(--azul); }
.endereco .rua { font-size: 21px; line-height: 1.3; font-weight: 750; overflow-wrap: anywhere; }
.endereco .linha { font-size: 17px; }
.endereco .cidade { font-size: 18px; font-weight: 600; margin-top: 4px; }
.endereco .cep { font-size: 16px; color: var(--texto-2); font-variant-numeric: tabular-nums; }
.endereco .ref { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--borda); font-size: 16px; }
.endereco .ref b { color: var(--texto-2); font-weight: 600; }
.endereco .nota { margin-top: 10px; font-size: 14px; color: var(--texto-2); display: flex; gap: 6px; align-items: flex-start; }
.endereco .nota svg { flex: none; width: 17px; height: 17px; margin-top: 2px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }

.copiar {
  margin-top: 12px; display: inline-flex; align-items: center; gap: 7px;
  min-height: 40px; padding: 0 14px; border-radius: 10px;
  border: 1px solid var(--borda); background: transparent; color: var(--azul); font-weight: 600; font-size: 15px; cursor: pointer;
}
.copiar svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; }

.aviso {
  margin: 14px 0 0; padding: 12px 14px; border-radius: 12px;
  background: var(--alerta-fundo); border: 1px solid var(--alerta-borda); color: var(--alerta-texto);
  font-size: 15px; display: flex; gap: 10px;
}
.aviso svg { flex: none; width: 20px; height: 20px; margin-top: 1px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.acoes { display: grid; gap: 12px; margin-top: 16px; }
.plano-b { margin: 12px 4px 0; font-size: 14.5px; color: var(--texto-2); text-align: center; }
.plano-b a { font-weight: 650; }
.link {
  border: 0; background: none; padding: 4px 2px; cursor: pointer;
  color: var(--azul); font-size: 14.5px; font-weight: 650; text-decoration: underline;
}

.ajuste { margin-top: 14px; padding: 14px 16px; border-radius: var(--raio); background: var(--cartao); border: 1px solid var(--borda); }
.ajuste label { display: block; margin-bottom: 6px; font-size: 14px; font-weight: 650; color: var(--texto-2); }
.ajuste input {
  width: 100%; min-height: 48px; padding: 10px 12px;
  border: 1.5px solid var(--borda); border-radius: 12px; background: var(--fundo); font-size: 16px;
}
.ajuste input:focus { outline: none; border-color: var(--azul); }
@media (min-width: 560px) { .acoes { grid-template-columns: 1fr 1fr; } }

.btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 62px; padding: 10px 18px; border-radius: 16px; border: 0;
  font-size: 18.5px; font-weight: 750; text-decoration: none; text-align: center; cursor: pointer;
  box-shadow: 0 2px 6px rgba(16, 24, 40, .14);
  transition: transform .08s ease, filter .15s ease;
}
.btn:active { transform: scale(.985); filter: brightness(.95); }
.btn svg { flex: none; width: 26px; height: 26px; fill: currentColor; }
.btn-maps { background: #0070BA; color: #fff; }
.btn-waze { background: var(--waze); color: var(--waze-texto); }
.btn-primario { background: #0070BA; color: #fff; min-height: 54px; font-size: 17px; }
.btn-secundario { background: var(--cartao); color: var(--texto); border: 1.5px solid var(--borda); box-shadow: none; min-height: 50px; font-size: 16px; font-weight: 650; }
.btn-perigo { background: transparent; color: #C0362C; border: 1.5px solid currentColor; box-shadow: none; min-height: 48px; font-size: 15.5px; font-weight: 650; }
.btn[aria-disabled="true"] { opacity: .45; pointer-events: none; }
.btn-linha { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.btn-linha .btn { flex: 1 1 180px; }

.contato-linha { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 4px 0; }
.contato-linha + .contato-linha { border-top: 1px solid var(--borda); padding-top: 10px; margin-top: 6px; }
.contato-linha .rotulo { font-size: 13.5px; color: var(--texto-2); }
.contato-linha .valor { font-size: 17px; font-weight: 600; overflow-wrap: anywhere; }
.tel {
  flex: none; display: inline-flex; align-items: center; gap: 6px;
  min-height: 44px; padding: 0 16px; border-radius: 12px;
  background: var(--azul-claro); color: var(--azul-escuro); font-weight: 700; text-decoration: none;
}
.tel svg { width: 18px; height: 18px; fill: currentColor; }

/* ---------- Base de clientes ---------- */

.pagina h1 { margin: 4px 0 2px; font-size: 24px; }
.base-total { font-size: 30px; font-weight: 800; line-height: 1.1; color: var(--azul); }
.base-total small { font-size: 16px; font-weight: 600; color: var(--texto-2); }
.texto-2 { color: var(--texto-2); font-size: 15px; }
.ajuda { margin-top: 10px !important; font-size: 14.5px; color: var(--texto-2); }
.resumo { list-style: none; margin: 10px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.resumo li { padding: 10px 12px; border-radius: 12px; background: var(--fundo); font-size: 14px; color: var(--texto-2); }
.resumo b { display: block; font-size: 22px; color: var(--texto); font-variant-numeric: tabular-nums; }
.colunas { margin: 12px 0 0; padding: 0; list-style: none; font-size: 14.5px; }
.colunas li { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-top: 1px solid var(--borda); }
.colunas li span:last-child { color: var(--texto-2); text-align: right; overflow-wrap: anywhere; }
.status { margin-top: 12px !important; font-size: 15px; }
.status.erro { color: #C0362C; font-weight: 600; }
input[type="file"].sr { position: absolute; }

/* ---------- Aviso rápido ---------- */

.toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); z-index: 50;
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  max-width: calc(100% - 32px); padding: 12px 18px; border-radius: 12px;
  background: #18212C; color: #fff; font-size: 15px; font-weight: 600;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .25);
  transition: opacity .2s ease, transform .2s ease;
}
.toast.visivel { opacity: 1; transform: translate(-50%, 0); }
