/* Visual comum da CAJC (cabeçalho azul com o logótipo, cartões, passos numerados).
   Carregado depois dos estilos de cada página, por isso as cores daqui mandam. */

/* Figtree (SIL Open Font License), copiada para static/fonts: funciona sem internet */
@font-face {
  font-family: "Figtree"; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url("fonts/figtree-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF,
                 U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Figtree"; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url("fonts/figtree-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
                 U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --cor: #1e4e9c; --cor-esc: #173e7e; --cor-clara: #e8eef9;
  --fundo: #f0f1f3; --cartao: #fff; --texto: #16202e; --suave: #5b6474; --borda: #e1e4e9;
  --raio: 14px; --sombra: 0 1px 2px rgba(16, 24, 40, .04), 0 6px 18px rgba(16, 24, 40, .04);
  --letra: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}
body { font-family: var(--letra); background: var(--fundo); }
button, input, select, textarea { font-family: inherit; }

/* ---------- cabeçalho ---------- */
.topo-cajc { position: relative; background: var(--cor); color: #fff; margin: 0 0 22px; }
.topo-dentro { max-width: var(--largura, 960px); margin: 0 auto; padding: 22px var(--margem, 16px) 40px;
               display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; }
.topo-logo { flex: none; display: block; line-height: 0; }
.topo-logo img { width: 86px; height: auto; filter: drop-shadow(0 8px 16px rgba(0, 0, 0, .3)); }
.topo-texto { min-width: 0; flex: 1 1 380px; }
.topo-titulo { margin: 0; color: #fff; font-size: clamp(1.7rem, 3.4vw, 2.7rem); font-weight: 800; letter-spacing: -.035em; line-height: 1.05; }
.topo-sub { margin: 10px 0 0; color: rgba(255, 255, 255, .9); font-size: 1.02rem; line-height: 1.5; max-width: 44em; }
.topo-lado { flex: 0 0 auto; align-self: flex-start; margin-left: auto; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.topo-nav { display: flex; flex-wrap: nowrap; gap: 2px; padding: 4px; border-radius: 999px; background: rgba(0, 0, 0, .2); }
.topo-nav a, .topo-nav button { color: #fff; text-decoration: none; background: none; border: 0; border-radius: 999px;
                                padding: 7px 14px; font: inherit; font-size: .9rem; font-weight: 600; cursor: pointer; white-space: nowrap; }
.topo-nav a:hover, .topo-nav button:hover { background: rgba(255, 255, 255, .14); }
.topo-nav .ativo, .topo-nav .ativo:hover { background: #fff; color: var(--cor); }
.topo-nav form { margin: 0; display: inline; }
.topo-quem { font-size: .85rem; color: rgba(255, 255, 255, .78); padding-right: 12px; }
/* rebordo «rasgado» em baixo */
.topo-onda { position: absolute; left: 0; bottom: -1px; width: 100%; height: 24px; display: block; }
.topo-onda path { fill: var(--fundo); }
@media (max-width: 760px) {
  .topo-dentro { padding: 16px var(--margem-tel, 12px) 34px; gap: 12px 14px; }
  .topo-logo img { width: 58px; }
  .topo-texto { flex: 1 1 0; }
  .topo-sub { font-size: .92rem; margin-top: 6px; }
  .topo-lado { order: 3; width: 100%; align-items: stretch; margin: 0; }
  .topo-nav { flex-wrap: wrap; border-radius: 14px; justify-content: center; }
  .topo-quem { display: none; }
}
@media print { .topo-cajc { display: none !important; } }

/* ---------- passos numerados (como «1 Os seus dados») ---------- */
.passo { flex: none; display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
         background: var(--cor); color: #fff; font-size: .95rem; font-weight: 700; letter-spacing: 0; vertical-align: middle; margin-right: 10px; }
h1.parte-titulo { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 0; font-size: 1.55rem; font-weight: 700; letter-spacing: -.02em; }
.parte-sub { margin-left: 44px !important; }

/* ---------- cartões, botões e campos ---------- */
.bloco, details.local, #zona-carregar, form.envio, .folha:not(.folha-final), .caixa-login {
  border-radius: var(--raio); box-shadow: var(--sombra); }
.bloco { border-color: var(--borda); padding: 22px 24px; }
.botao, .botao-sec { border-radius: 10px; font-weight: 600; }
.botao { background: var(--cor); border-color: var(--cor); }
.botao:hover { background: var(--cor-esc); }
.botao-sec { color: var(--cor); border-color: #cfd6e2; }
.botao-sec:hover { border-color: var(--cor); }
input:not([type=checkbox]):not([type=radio]):not([type=file]), select, textarea { border-radius: 10px; }
input:not([type=checkbox]):not([type=radio]):not([type=file]):focus, select:focus, textarea:focus {
  outline: 2px solid var(--cor); outline-offset: 1px; border-color: var(--cor); }
@media (max-width: 700px) { .bloco { padding: 16px; } h1.parte-titulo { font-size: 1.3rem; } }

/* ---------- lista de pedidos ---------- */
details.cliente > summary { border-radius: var(--raio); box-shadow: var(--sombra); }
details.local { border-color: var(--borda); }
.separadores button.ativo { color: var(--cor); border-bottom-color: var(--cor); }

/* ---------- ficha de levantamento (janela) ---------- */
#ficha, #mapa-med { --f-azul: var(--cor); --f-azul-esc: var(--cor-esc); --f-azul-claro: var(--cor-clara); --f-r: 12px; --f-fundo: var(--fundo);
                    --f-sombra: var(--sombra); font-family: var(--letra); }
#ficha .ficha-topo { background: var(--cor); color: #fff; border-bottom: 0; }
#ficha .ficha-topo .ft-sub { color: rgba(255, 255, 255, .85); }
#ficha .ficha-topo h2 { color: #fff; font-weight: 800; letter-spacing: -.02em; }
#ficha .ficha-topo #f-fechar { background: rgba(255, 255, 255, .15); color: #fff; border-color: transparent; }
#ficha .ficha-topo .ft-docs a, #ficha .ficha-topo .ft-docs button { background: rgba(255, 255, 255, .15); color: #fff; border-color: transparent; }
#ficha .f-sec { border-radius: var(--raio); }
/* secções numeradas */
#ficha .f-conteudo { counter-reset: seccao; }
#ficha .f-sec > .f-sec-cab > .f-sec-tit { display: flex; align-items: center; font-size: 1.12rem; }
#ficha .f-sec > .f-sec-cab > .f-sec-tit::before { counter-increment: seccao; content: counter(seccao); flex: none; display: inline-grid;
  place-items: center; width: 30px; height: 30px; margin-right: 10px; border-radius: 50%; background: var(--cor); color: #fff; font-size: .88rem; font-weight: 700; }
@media (max-width: 700px) {
  details.local > summary { flex-wrap: wrap; row-gap: 6px; }
  details.local > summary > span:first-child { flex: 1 1 calc(100% - 30px); }
}
