/* ============================================================
   Minha área — leitura grande, toque fácil, funciona como app.
   ============================================================ */
body.cl { background: var(--branco); font-size: 21px; padding-bottom: calc(86px + env(safe-area-inset-bottom)); min-height: 100dvh; }

.cl-topo { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: calc(10px + env(safe-area-inset-top)) clamp(16px, 4vw, 40px) 10px; background: var(--principal); }
.cl-marca img { height: 40px; width: auto; filter: brightness(0) invert(1); }
.cl-topo-acoes { display: flex; gap: 8px; align-items: center; }
.cl-topo .btn--fantasma { color: var(--branco); box-shadow: inset 0 0 0 1px rgba(239,239,239,.35); }

.cl-app { width: min(920px, 100%); margin: 0 auto; padding: clamp(16px, 3vw, 32px) clamp(16px, 4vw, 32px) 40px; display: grid; gap: 18px; }
.cl-carregando { text-align: center; padding: 18vh 0; }

.cl-bloco { background: var(--papel); border-radius: 22px; padding: clamp(20px, 4vw, 34px); display: grid; gap: 14px; box-shadow: 0 1px 0 rgba(40,27,18,.06); }
.cl-bloco .corpo { color: var(--principal); font-size: 1.04rem; font-weight: 500; max-width: 62ch; }
.cl-bloco h1, .cl-bloco h2 { margin: 0; }
.cl-ola { font-size: 1.7rem; color: var(--suave); }
.cl-grande { font-size: 1.25rem; font-weight: 600; margin: 0; }
.cl-nota { font-size: .98rem; color: var(--suave); margin: 0; line-height: 1.45; }
.cl-linha { display: flex; flex-wrap: wrap; gap: 12px; }
.cl-faixa { background: #fff4d6; grid-template-columns: 1fr auto; align-items: center; }
.cl-alerta { background: #f7dede; color: #7a1f1f; border-radius: 12px; padding: 12px 16px; margin: 0; font-weight: 700; }
.cl-sub { text-decoration: underline; text-underline-offset: 3px; }
.cl-link { text-decoration: underline; text-underline-offset: 3px; font: inherit; color: var(--principal); padding: 6px 0; text-align: left; }
.btn { font-size: 1.02rem; padding: 16px 28px; }
.btn--miudo { font-size: .92rem; padding: 12px 18px; }
.btn--grande { font-size: 1.12rem; }

/* portão */
.cl-portao { display: grid; place-items: center; min-height: 60vh; }
.cl-cartao { background: var(--papel); border-radius: 26px; padding: clamp(26px, 6vw, 52px); display: grid; gap: 18px; max-width: 560px; }

/* lista */
.cl-lista { display: grid; gap: 14px; }
.cl-pedido { position: relative; display: grid; grid-template-columns: 96px 1fr; gap: 18px; align-items: center; background: var(--papel); border-radius: 22px; padding: 16px; transition: transform .25s var(--curva), box-shadow .25s; }
.cl-pedido:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(40,27,18,.12); }
.cl-pedido img { width: 96px; height: 96px; object-fit: contain; background: var(--branco); border-radius: 16px; }
.cl-pedido h2 { margin: 2px 0 6px; }
.cl-nova { position: absolute; top: 14px; right: 14px; background: #b3401f; color: #fff; font-family: var(--interface); font-size: .8rem; padding: 4px 10px; border-radius: 999px; }
.cl-estado { margin: 0 0 8px; font-family: var(--interface); font-size: .98rem; font-weight: 700; }
.cl-estado[data-s="cancelado"] { color: #7a1f1f; }
.cl-barra { height: 8px; border-radius: 999px; background: var(--branco); overflow: hidden; }
.cl-barra i { display: block; height: 100%; background: var(--menta); border-radius: inherit; }

/* um pedido */
.cl-voltar { font-family: var(--interface); font-size: .98rem; text-decoration: underline; text-underline-offset: 4px; width: fit-content; padding: 6px 0; }
/* andamento do pedido: menos destaque que a linha do tempo de baixo, e a cor vai de vermelho a verde forte */
.cl-passos { list-style: none; margin: 10px 0 0; padding: 0; display: flex; gap: 0; }
.cl-passos li { --cor: var(--menta); flex: 1 1 0; min-width: 0; display: grid; justify-items: center; align-content: start; gap: 6px; text-align: center; position: relative; font-family: var(--interface); font-size: .74rem; line-height: 1.15; color: var(--suave); padding-top: 2px; }
.cl-passos li::before { content: ''; position: absolute; top: 8px; left: -50%; width: 100%; height: 3px; background: var(--branco); z-index: 0; }
.cl-passos li:first-child::before { display: none; }
.cl-passos i { width: 14px; height: 14px; border-radius: 50%; background: var(--branco); box-shadow: inset 0 0 0 2px var(--linha); position: relative; z-index: 1; }
.cl-passos li[data-feito] i { background: var(--cor); box-shadow: none; }
.cl-passos li[data-feito]::before, .cl-passos li[data-atual]::before { background: var(--cor); }
.cl-passos li[data-atual] i { background: var(--cor); box-shadow: 0 0 0 4px color-mix(in srgb, var(--cor) 30%, transparent); }
.cl-passos li[data-atual] { color: var(--principal); font-weight: 700; }
@media (max-width: 640px) {
  /* no celular as palavras ficam em pé, alinhadas pela cabeça: cabe tudo na tela, sem barra de rolagem */
  .cl-passos li span { writing-mode: vertical-rl; white-space: nowrap; font-size: .72rem; line-height: 1; padding: 2px 0 0; }
}
.cl-prazo { margin: 4px 0 0; font-size: 1.05rem; }

.cl-ok { background: #e3f3ea; } .cl-espera { background: #fff4d6; } .cl-meet { background: #eaf0fb; }
.cl-pixgrade { display: grid; grid-template-columns: 220px 1fr; gap: 24px; align-items: start; }
.cl-qr { background: #fff; padding: 10px; border-radius: 16px; box-shadow: inset 0 0 0 1px var(--linha); }
.cl-qr svg { width: 100%; height: auto; }
.cl-pixdados { display: grid; gap: 8px; min-width: 0; }
.cl-pixdados .miudo { margin: 0; }
.cl-codigo { display: block; background: var(--branco); border-radius: 12px; padding: 12px 14px; font-size: .86rem; word-break: break-all; line-height: 1.4; max-height: 7.5em; overflow: auto; user-select: all; }
.cl-passo { font-weight: 700; margin: 6px 0 0; }
.cl-comp { width: fit-content; cursor: pointer; }

/* conversa */
.cl-chat { display: grid; gap: 12px; max-height: 58vh; overflow-y: auto; padding: 6px 2px; scroll-behavior: smooth; }
.cl-msg { display: flex; }
.cl-msg[data-meu="true"] { justify-content: flex-end; }
.cl-balao { max-width: min(86%, 560px); background: var(--branco); border-radius: 20px 20px 20px 6px; padding: 12px 16px; display: grid; gap: 8px; }
.cl-msg[data-meu="true"] .cl-balao { background: var(--menta); border-radius: 20px 20px 6px 20px; }
.cl-balao p { margin: 0; white-space: pre-wrap; word-break: break-word; font-size: 1.04rem; line-height: 1.45; }
.cl-balao time { opacity: .75; }
.cl-video { max-width: 100%; width: 320px; border-radius: 12px; background: #000; }
/* foto do bate-papo: quadradinho, como no WhatsApp; toque para ver inteira */
.cl-foto { width: 168px; height: 168px; object-fit: cover; border-radius: 12px; background: #000; display: block; cursor: zoom-in; }
a[data-foto] { display: inline-block; line-height: 0; }
.cl-venceu { font-style: italic; color: var(--suave); }
.cl-validade { opacity: .8; }
.cl-vazio { text-align: center; padding: 22px 0; }
.cl-enviar { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: end; }
.cl-enviar textarea { width: 100%; padding: 14px 16px; border: 0; border-radius: 16px; background: var(--branco); font: inherit; font-size: 1.04rem; resize: none; max-height: 160px; }
.cl-enviar textarea:focus { outline: 0; box-shadow: inset 0 0 0 2px var(--principal); }
.cl-anexo { cursor: pointer; }
.cl-arq { margin: 0; font-size: .98rem; }

/* ficha, documentos, linha do tempo */
.cl-ficha { margin: 0; display: grid; gap: 0; }
.cl-ficha > div { display: grid; grid-template-columns: minmax(120px, 190px) 1fr; gap: 14px; padding: 11px 0; border-bottom: 1px solid var(--linha); }
.cl-ficha dt { font-family: var(--interface); font-size: .92rem; color: var(--suave); }
.cl-ficha dd { margin: 0; font-size: 1.04rem; white-space: pre-wrap; }
.cl-docs { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.cl-docs li { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; border-bottom: 1px solid var(--linha); padding-bottom: 8px; }
.cl-tempo { list-style: none; margin: 0; padding: 0 0 0 20px; border-left: 3px solid var(--branco); display: grid; gap: 18px; }
.cl-tempo li { position: relative; display: grid; gap: 2px; }
.cl-tempo li::before { content: ''; position: absolute; left: -29px; top: 7px; width: 13px; height: 13px; border-radius: 50%; background: var(--menta); box-shadow: 0 0 0 4px var(--papel); }
.cl-tempo b { font-size: 1.06rem; } .cl-tempo span { color: var(--suave); }

/* novidades */
.cl-cards { display: grid; gap: 14px; }
.cl-card { display: grid; grid-template-columns: 150px 1fr; gap: 18px; background: var(--branco); border-radius: 18px; overflow: hidden; }
.cl-card:not(:has(img)) { grid-template-columns: 1fr; }
.cl-card img { width: 100%; height: 100%; object-fit: cover; min-height: 140px; }
.cl-card > div { padding: 16px; display: grid; gap: 8px; align-content: start; }
.cl-feed { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.cl-feed a { display: grid; gap: 4px; padding: 14px 4px; border-bottom: 1px solid var(--linha); }
.cl-feed b { font-size: 1.08rem; line-height: 1.3; } .cl-feed span { color: var(--suave); font-size: 1rem; }
.cl-feed em { font-style: normal; }

/* avisos */
.cl-push { display: grid; gap: 12px; background: var(--branco); border-radius: 16px; padding: 18px; justify-items: start; }
.cl-avisos { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.cl-avisos a { display: grid; grid-template-columns: 52px 1fr; gap: 14px; padding: 14px 6px; border-bottom: 1px solid var(--linha); align-items: start; }
.cl-avisos img { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; background: var(--branco); }
.cl-avisos li[data-lida="false"] b { font-weight: 800; }
.cl-avisos li[data-lida="false"] a { background: #f6f0e4; border-radius: 14px; }
.cl-avisos b, .cl-avisos span { display: block; } .cl-avisos span { color: var(--suave); font-size: 1rem; }
.cl-form { display: grid; gap: 16px; max-width: 520px; }
.cl-sols { margin: 0; padding-left: 20px; display: grid; gap: 4px; }

/* abas fixas embaixo */
.cl-abas { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; display: grid; grid-template-columns: repeat(4, 1fr); background: var(--papel); box-shadow: 0 -6px 24px rgba(40,27,18,.1); padding-bottom: env(safe-area-inset-bottom); }
.cl-abas a { position: relative; display: grid; justify-items: center; gap: 2px; padding: 10px 4px 9px; font-family: var(--interface); font-size: .82rem; color: var(--suave); }
.cl-abas svg { width: 26px; height: 26px; }
.cl-abas a[aria-current] { color: var(--principal); font-weight: 700; }
.cl-abas a[aria-current]::before { content: ''; position: absolute; top: 0; width: 38px; height: 4px; border-radius: 0 0 6px 6px; background: var(--principal); }
.cl-bolinha { position: absolute; top: 6px; left: calc(50% + 6px); min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; background: #b3401f; color: #fff; font-style: normal; font-size: .72rem; display: grid; place-items: center; }

#toast { position: fixed; left: 50%; bottom: calc(100px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 400; background: var(--principal); color: var(--branco); padding: 14px 22px; border-radius: 999px; font-family: var(--interface); max-width: calc(100vw - 32px); box-shadow: 0 10px 30px rgba(0,0,0,.3); }
#toast[data-tipo="erro"] { background: #7a1f1f; }

@media (max-width: 640px) {
  body.cl { font-size: 20px; }
  .cl-pixgrade { grid-template-columns: 1fr; justify-items: center; } .cl-qr { width: min(260px, 100%); } .cl-pixdados { width: 100%; }
  .cl-pedido { grid-template-columns: 76px 1fr; } .cl-pedido img { width: 76px; height: 76px; }
  .cl-ficha > div { grid-template-columns: 1fr; gap: 2px; }
  .cl-card { grid-template-columns: 1fr; } .cl-card img { height: 180px; }
  .cl-enviar { grid-template-columns: 1fr auto; } .cl-enviar .cl-anexo { grid-column: 1; grid-row: 2; } .cl-enviar button[type=submit] { grid-row: 2; }
  .cl-faixa { grid-template-columns: 1fr; }
}
@media (min-width: 900px) {
  .cl-abas { left: 50%; right: auto; width: min(920px, 100%); transform: translateX(-50%); border-radius: 22px 22px 0 0; }
}

/* ajuda para liberar os avisos, por navegador */
.cl-ajuda { margin-top: 4px; border-top: 1px solid var(--linha); padding-top: 12px; }
.cl-ajuda summary { cursor: pointer; font-family: var(--interface); font-size: .98rem; color: var(--suave); text-decoration: underline; text-underline-offset: 3px; list-style: none; padding: 8px 0; }
.cl-ajuda summary::-webkit-details-marker { display: none; }
.cl-ajuda summary::before { content: "＋ "; text-decoration: none; display: inline-block; }
.cl-ajuda[open] summary::before { content: "－ "; }
.cl-ajuda-corpo { display: grid; gap: 14px; padding: 6px 0 4px; }
.cl-ajuda-corpo section { background: var(--papel); border-radius: 14px; padding: 14px 18px; }
.cl-ajuda-corpo section[data-seu] { box-shadow: inset 0 0 0 2px var(--menta); }
.cl-ajuda-corpo h3 { margin: 0 0 6px; font-family: var(--interface); font-size: 1rem; color: var(--principal); }
.cl-ajuda-corpo h3 em { font-style: normal; font-size: .84rem; color: var(--suave); }
.cl-ajuda-corpo ol { margin: 0; padding-left: 1.3em; display: grid; gap: 4px; font-size: .98rem; line-height: 1.42; color: var(--principal); }

/* boas-vindas depois de um novo pedido */
.cl-parabens { background: linear-gradient(135deg, #E7F3EC, var(--papel)); box-shadow: inset 0 0 0 1.5px var(--menta); }
.cl-pedido[data-novo] { box-shadow: 0 0 0 2px var(--menta); }
.cl-nova--bem { background: var(--menta); color: var(--principal); }

/* Novidades dentro da área do cliente */
body.cl { overflow-x: clip; }
body.cl:has(.cl-blog), body.cl.bl-escuro { padding-bottom: 0; }
.cl-app:has(.cl-blog), body.bl-escuro .cl-app { width: 100%; max-width: none; padding: 0; gap: 0; }
.cl-app .cl-blog { padding-bottom: calc(120px + env(safe-area-inset-bottom)); }
