/* App do cliente (PWA): abas no rodapé, carteira, linha do tempo, Pix e avisos. */
.client-area [hidden] { display: none !important; }
.client-area { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
.app-title { font-size: clamp(1.25rem, 4.5vw, 1.6rem); margin: .2rem 0 .1rem; }
.app-tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; display: grid; grid-template-columns: repeat(6, 1fr);
  background: #0a0a0a; border-top: 1px solid #262626; padding: 4px 4px calc(4px + env(safe-area-inset-bottom)); }
.client-area .app-tabs a, .app-tabs a { position: relative; display: grid; justify-items: center; gap: 2px; padding: 6px 2px; color: #a3a3a3; text-decoration: none; font-size: 11px; font-weight: 600; border-radius: 10px; min-width: 0; }
.app-tabs a span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.client-area .app-tabs a[aria-current="page"], .app-tabs a[aria-current="page"] { color: #fff; background: #1a1a1a; }
.app-tabs a[aria-current="page"] svg { color: #e11d2e; }
.app-badge { position: absolute; top: 2px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: #e11d2e; color: #fff; font-size: 11px; line-height: 18px; text-align: center; }
.app-offline-bar { position: fixed; left: 0; right: 0; bottom: calc(62px + env(safe-area-inset-bottom)); z-index: 44; margin: 0; padding: 6px 12px; background: #3a2a06; color: #f5c96b; font-size: 13px; text-align: center; }
.app-offline-bar[hidden] { display: none; }
body:has(.app-tabs) .wa-float { bottom: calc(82px + env(safe-area-inset-bottom)); }
@media (min-width: 900px) {
  .app-tabs { left: 50%; right: auto; bottom: 14px; transform: translateX(-50%); width: min(720px, calc(100% - 32px)); border: 1px solid #262626; border-radius: 16px; box-shadow: 0 10px 30px rgba(0,0,0,.35); }
  .app-tabs a { grid-auto-flow: column; justify-content: center; align-items: center; gap: 6px; font-size: 13px; padding: 9px 6px; }
  .app-badge { position: static; }
}
.app-offline-box { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; }
.wallet-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.wallet-card { display: grid; gap: .45rem; align-content: start; padding: 1rem; border-radius: 16px; border: 1px solid #262626; background: linear-gradient(160deg, #141414, #0b0b0b); color: #f5f5f5; min-width: 0; }
.wallet-card header { display: flex; justify-content: space-between; gap: .5rem; flex-wrap: wrap; }
.wallet-card h2 { margin: .2rem 0 0; font-size: 1.05rem; line-height: 1.3; overflow-wrap: anywhere; }
.wallet-card.tone-danger { border-color: #5a1a21; }
.wallet-card.tone-warn { border-color: #5a4310; }
.wallet-card.tone-success { border-color: #1f4d2f; }
.wallet-number { font-size: 1.1rem; letter-spacing: .04em; margin: 0; overflow-wrap: anywhere; }
.wallet-card .actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .3rem; }
.wallet-qr { width: 100%; }
.wallet-qr > summary { list-style: none; display: inline-flex; cursor: pointer; }
.wallet-qr > summary::-webkit-details-marker { display: none; }
.wallet-qr-box { margin-top: .7rem; display: grid; justify-items: center; gap: .3rem; text-align: center; }
.wallet-qr-img, .app-pix-qr { width: min(220px, 70vw); aspect-ratio: 1; background: #fff; border-radius: 10px; padding: 6px; }
.wallet-qr-img svg, .app-pix-qr svg { width: 100%; height: 100%; display: block; }
.app-pix-qr { margin: .6rem auto; }
.app-charge { display: grid; gap: .5rem; padding: .8rem 0; border-top: 1px solid #1f1f1f; }
.app-charge:first-of-type { border-top: 0; }
.app-charge header { display: flex; justify-content: space-between; gap: .5rem; flex-wrap: wrap; align-items: center; }
.app-charge form, .app-charge .toolbar { margin: 0; }
.app-pix > summary { cursor: pointer; }
.app-progress { height: 10px; border-radius: 999px; background: #1f1f1f; overflow: hidden; margin-top: .8rem; }
.app-progress span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #e11d2e, #f97316); border-radius: inherit; }
.app-steps { list-style: none; margin: .6rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: .35rem; }
.app-steps li { font-size: 12.5px; padding: .2rem .6rem; border-radius: 999px; background: #1a1a1a; color: #a3a3a3; }
.app-steps li.is-done { background: #0d2416; color: #8be0a4; }
.app-timeline { list-style: none; margin: 0; padding: 0 0 0 1rem; border-left: 2px solid #262626; display: grid; gap: .9rem; }
.app-timeline li { position: relative; display: grid; gap: .1rem; }
.app-timeline li::before { content: ""; position: absolute; left: calc(-1rem - 7px); top: .3rem; width: 12px; height: 12px; border-radius: 50%; background: #e11d2e; border: 2px solid #0a0a0a; }
.app-timeline time { font-size: 12px; color: #a3a3a3; }
.app-notices li.is-unread strong::before { content: "● "; color: #e11d2e; }
.app-catalog li { flex-wrap: wrap; }
.app-id-photo { border: 1px dashed #404040; border-radius: 12px; padding: .8rem; margin: 0; display: grid; gap: .5rem; }
.app-id-photo legend { font-weight: 700; padding: 0 .3rem; }
@media (max-width: 640px) {
  .client-area .field-grid { grid-template-columns: 1fr; }
  .client-area .field-grid .span2 { grid-column: auto; }
}
.app-progress span.w0 { width: 0%; }
.app-progress span.w5 { width: 5%; }
.app-progress span.w10 { width: 10%; }
.app-progress span.w15 { width: 15%; }
.app-progress span.w20 { width: 20%; }
.app-progress span.w25 { width: 25%; }
.app-progress span.w30 { width: 30%; }
.app-progress span.w35 { width: 35%; }
.app-progress span.w40 { width: 40%; }
.app-progress span.w45 { width: 45%; }
.app-progress span.w50 { width: 50%; }
.app-progress span.w55 { width: 55%; }
.app-progress span.w60 { width: 60%; }
.app-progress span.w65 { width: 65%; }
.app-progress span.w70 { width: 70%; }
.app-progress span.w75 { width: 75%; }
.app-progress span.w80 { width: 80%; }
.app-progress span.w85 { width: 85%; }
.app-progress span.w90 { width: 90%; }
.app-progress span.w95 { width: 95%; }
.app-progress span.w100 { width: 100%; }
/* Entrada do app das lojas (/app/): escolha do perfil e interruptor do Face ID. */
.app-entry { text-align: center; }
.app-entry-choices { display: grid; gap: .45rem; margin: 1.1rem 0 .8rem; text-align: left; }
.app-entry-choices .button { justify-content: center; width: 100%; min-height: 48px; font-size: 1rem; }
.app-entry-choices small { margin-bottom: .55rem; }
.app-entry-links a { white-space: nowrap; }
.app-bio[hidden], [data-push-native-box][hidden], [data-push-web-box][hidden] { display: none !important; }
.app-bio { margin: .6rem 0; text-align: left; display: grid; gap: .3rem; }
.app-bio .check-field input { width: auto; }

/* Site × app Android (TWA): o servidor manda as duas versões; o app abre em display-mode standalone. */
.so-app { display: none; }
.so-web.so-contents { display: contents; } /* invólucro de página inteira: não mexe no layout */
@media (display-mode: standalone), (display-mode: fullscreen), (display-mode: minimal-ui) {
  .so-web { display: none !important; }
  .so-app { display: revert !important; }
}
