/* Documentos + consulta — layout leve, estável em todos os temas */

.page-documentos,
.page-consulta { background: var(--page, #f4f6fa); }

.docs-page { padding: 0 0 64px; }
.docs-wrap { max-width: 920px; }
.docs-body { padding-top: 20px; }

/* Faixa do pedido — texto branco sobre navy do tema */
.docs-banner {
  padding: 22px 0 26px;
  color: #fff;
  background: linear-gradient(135deg, var(--brand-navy-deep, #0b1a33), var(--brand-navy, #122033));
}
.docs-banner .docs-wrap { max-width: 920px; }
.docs-protocol {
  display: inline-block; margin: 0 0 8px; padding: 4px 10px;
  border-radius: 999px; background: rgba(255,255,255,.12);
  font-size: 12.5px; font-weight: 650; color: #fff;
}
.docs-protocol strong { font-weight: 750; letter-spacing: .02em; }
.docs-banner h1 {
  margin: 0 0 6px; color: #fff;
  font-size: clamp(22px, 3.5vw, 28px); font-weight: 750; line-height: 1.2;
}
.docs-lead { margin: 0; max-width: 48ch; color: rgba(255,255,255,.88); font-size: 14.5px; line-height: 1.5; }

.cabecalho-claro.page-documentos .site-header-checkout .secure-badge,
.cabecalho-claro.page-consulta .site-header-checkout .secure-badge { color: var(--ink); }
.cabecalho-claro.page-documentos .site-header-checkout .secure-badge .icon,
.cabecalho-claro.page-consulta .site-header-checkout .secure-badge .icon { color: var(--brand-blue); }

/* Alertas e progresso */
.docs-alert {
  display: flex; gap: 8px; align-items: flex-start;
  margin: 0 0 12px; padding: 10px 12px; border-radius: 10px;
  font-size: 14px; font-weight: 600; line-height: 1.4;
}
.docs-alert .icon { flex: none; width: 18px; height: 18px; margin-top: 1px; }
.docs-alert.is-ok { color: #0f5c35; background: #e8f6ee; }
.docs-alert.is-error { color: #8e1c1c; background: #fdecec; }
.docs-alert.is-warn { color: #8a4b00; background: #fff4e0; }

.docs-progress {
  display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center;
  margin: 0 0 16px; padding: 12px 14px;
  border: 1px solid var(--line, #e2e8f0); border-radius: 12px; background: #fff;
  color: var(--ink, #122033);
}
.docs-progress strong { font-size: 14px; font-weight: 700; }
.docs-progress-bar {
  flex: 1; min-width: 120px; height: 7px; overflow: hidden;
  border-radius: 999px; background: #e8edf3;
}
.docs-progress-bar span {
  display: block; height: 100%; border-radius: inherit;
  background: var(--brand-blue, #0b5cd5); transition: width .3s;
}
.docs-progress.is-done { border-color: #a7dcbd; background: #f2fbf6; }
.docs-progress.is-done .docs-progress-bar span { background: #16a34a; }

/* Layout */
.docs-layout { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 18px; align-items: start; }
.docs-main {
  margin: 0; padding: 0; border: none; background: transparent;
  color: var(--ink, #122033);
}
.docs-side { display: grid; gap: 12px; }

.docs-types { display: grid; gap: 10px; margin: 0 0 14px; padding: 0; list-style: none; }
.docs-type {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px;
  padding: 14px; border: 1px solid var(--line, #e2e8f0); border-radius: 12px;
  background: #fff; color: var(--ink, #122033);
}
.docs-type.is-done { border-color: #9fd4b5; background: #f6fcf8; }
.docs-type.is-picked { border-color: var(--brand-blue, #0b5cd5); }
.docs-type-optional { border-style: dashed; }
.docs-type-icon {
  width: 40px; height: 40px; display: grid; place-items: center;
  border-radius: 10px; color: var(--brand-blue, #0b5cd5);
  background: color-mix(in srgb, var(--brand-blue, #0b5cd5) 9%, #fff);
}
.docs-type-icon .icon { width: 20px; height: 20px; }
.docs-type.is-done .docs-type-icon { color: #fff; background: #16a34a; }
.docs-type-main { display: grid; gap: 4px; min-width: 0; }
.docs-type-title { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; }
.docs-type-title strong { font-size: 15px; font-weight: 700; }
.docs-type-hint { margin: 0; color: var(--muted, #5a6a7e); font-size: 13px; line-height: 1.4; }
.docs-selfie-dica { margin: 0; color: var(--brand-blue, #0b5cd5); font-size: 12.5px; font-weight: 650; }
.docs-tag {
  display: inline-block; padding: 1px 7px; border-radius: 999px;
  font-size: 11px; font-style: normal; font-weight: 700;
  color: var(--muted, #5a6a7e); background: #eef2f6;
}
.docs-tag.is-req { color: #9a3412; background: #fff1e6; }

.docs-sent { margin: 4px 0 0; padding: 0; list-style: none; display: grid; gap: 2px; }
.docs-sent li { color: #0f5c35; font-size: 12.5px; font-weight: 600; overflow-wrap: anywhere; }
.docs-sent small { color: var(--muted, #5a6a7e); font-weight: 500; }
.docs-picked { color: var(--brand-blue, #0b5cd5); font-size: 12.5px; font-weight: 700; overflow-wrap: anywhere; }
.docs-picked:empty { display: none; }

.docs-pick-group { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.docs-pick { position: relative; overflow: hidden; cursor: pointer; }
.docs-pick input { position: absolute; inset: 0; opacity: 0; cursor: pointer; font-size: 0; }

.docs-rules { margin: 0 0 12px; color: var(--muted, #5a6a7e); font-size: 12.5px; line-height: 1.4; }
.docs-submit { width: 100%; justify-content: center; }

.docs-selo {
  display: flex; gap: 8px; align-items: flex-start; margin: 0; padding: 10px 12px;
  border-radius: 10px; border: 1px solid color-mix(in srgb, var(--brand-blue, #0b5cd5) 20%, transparent);
  background: #fff; color: var(--muted, #5a6a7e); font-size: 13px; line-height: 1.4;
}
.docs-selo .icon { flex: none; width: 18px; height: 18px; color: var(--brand-blue, #0b5cd5); }
.docs-qr[hidden] { display: none; }
.docs-qr {
  margin: 0; padding: 12px; border: 1px solid var(--line, #e2e8f0);
  border-radius: 12px; background: #fff; color: var(--ink, #122033);
}
.docs-qr p { margin: 0 0 8px; font-size: 13px; color: var(--muted, #5a6a7e); }
.docs-qr p strong { color: var(--ink, #122033); }
.docs-qr-code { width: 140px; margin: 0 auto; padding: 6px; border: 1px solid var(--line, #e2e8f0); border-radius: 10px; }
.docs-qr-code svg { display: block; width: 100%; height: auto; }
.docs-help {
  display: inline-flex; gap: 8px; align-items: center;
  color: var(--brand-blue, #0b5cd5); font-size: 14px; font-weight: 700; text-decoration: none;
}
.docs-help:hover { text-decoration: underline; }
.docs-help .icon { width: 18px; height: 18px; }

.docs-empty {
  max-width: 480px; margin: 40px auto 0; padding: 28px 20px; text-align: center;
  border: 1px solid var(--line, #e2e8f0); border-radius: 14px; background: #fff;
  color: var(--ink, #122033);
}
.docs-empty-icon {
  width: 56px; height: 56px; display: grid; place-items: center; margin: 0 auto 12px;
  border-radius: 50%; color: var(--brand-blue, #0b5cd5);
  background: color-mix(in srgb, var(--brand-blue, #0b5cd5) 10%, #fff);
}
.docs-empty-icon .icon { width: 24px; height: 24px; }
.docs-empty h1 { margin: 0 0 8px; font-size: 22px; }
.docs-empty p { margin: 0; color: var(--muted, #5a6a7e); line-height: 1.5; }
.docs-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 14px; }

.spinner {
  display: inline-block; width: 18px; height: 18px;
  border: 2px solid color-mix(in srgb, #fff 40%, transparent); border-top-color: #fff;
  border-radius: 50%; animation: docs-spin .8s linear infinite;
}
@keyframes docs-spin { to { transform: rotate(360deg); } }
.btn .spinner { margin-right: 8px; }

/* Prévia / câmera */
.docs-preview {
  position: fixed; inset: 0; z-index: 80; display: grid; place-items: center;
  padding: 16px; background: rgba(6, 14, 28, .78);
}
.docs-preview[hidden] { display: none !important; }
body.docs-preview-open { overflow: hidden; }
.docs-preview-box {
  width: min(400px, 100%); background: #fff; border-radius: 16px; padding: 16px;
  box-shadow: 0 24px 60px rgba(0,0,0,.35);
}
.docs-preview-title { margin: 0 0 4px; text-align: center; color: var(--ink, #122033); font-size: 16px; font-weight: 750; }
.docs-preview-dica { margin: 0 0 12px; color: var(--muted, #5a6a7e); font-size: 13px; line-height: 1.4; text-align: center; }
.docs-preview-frame {
  position: relative; aspect-ratio: 3 / 4; border-radius: 12px; overflow: hidden; background: #0b1a33;
}
.docs-preview-frame img,
.docs-preview-frame video { width: 100%; height: 100%; object-fit: cover; display: block; }
.docs-preview-frame.is-selfie video { transform: scaleX(-1); }
.docs-preview-frame.is-doc::after {
  content: ''; position: absolute; inset: 10% 8%;
  border: 2px dashed rgba(255,255,255,.9); border-radius: 10px;
  box-shadow: 0 0 0 999px rgba(0,0,0,.38); pointer-events: none;
}
.docs-preview-frame.is-selfie::before {
  content: ''; position: absolute; left: 50%; top: 12%; width: 58%; height: 42%;
  transform: translateX(-50%); border: 2px dashed rgba(255,255,255,.92); border-radius: 50%;
  box-shadow: 0 0 0 999px rgba(0,0,0,.38); pointer-events: none;
}
.docs-preview-frame.is-selfie::after {
  content: ''; position: absolute; left: 14%; right: 14%; bottom: 8%; height: 28%;
  border: 2px dashed rgba(255,255,255,.78); border-radius: 8px; pointer-events: none;
}
.docs-preview-actions { display: flex; gap: 8px; margin-top: 12px; }
.docs-preview-actions[hidden] { display: none !important; }
.docs-preview-actions .btn { flex: 1; justify-content: center; }

/* ——— Consulta ——— */
.consulta-page { padding: 28px 0 64px; }
.consulta-page .docs-wrap { max-width: 480px; }
.consulta-card {
  padding: 22px 20px; border: 1px solid var(--line, #e2e8f0); border-radius: 14px;
  background: #fff; color: var(--ink, #122033);
  box-shadow: 0 10px 28px color-mix(in srgb, var(--brand-navy-deep, #0b1a33) 6%, transparent);
}
.consulta-head { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 16px; }
.consulta-head h1 { margin: 0 0 4px; font-size: 22px; font-weight: 750; color: var(--ink, #122033); }
.consulta-head .muted { margin: 0; color: var(--muted, #5a6a7e); font-size: 14px; line-height: 1.45; }
.consulta-head-icon {
  flex: none; display: grid; place-items: center; width: 40px; height: 40px;
  border-radius: 10px; background: color-mix(in srgb, var(--brand-blue, #0b5cd5) 10%, #fff);
  color: var(--brand-blue, #0b5cd5);
}
.consulta-head-icon .icon { width: 20px; height: 20px; }
.consulta-form .field { margin-bottom: 12px; }
.consulta-form .btn { width: 100%; justify-content: center; }
.consulta-form .btn .icon { width: 16px; height: 16px; margin-right: 6px; }
.consulta-page .alert { margin-bottom: 12px; }

.consulta-resultado { margin-top: 4px; }
.consulta-protocolo {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px;
  margin: 0 0 12px; padding: 12px 14px; border-radius: 10px;
  background: color-mix(in srgb, var(--brand-blue, #0b5cd5) 7%, #fff);
  border: 1px solid color-mix(in srgb, var(--brand-blue, #0b5cd5) 16%, transparent);
}
.consulta-protocolo-label {
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
  color: var(--muted, #5a6a7e);
}
.consulta-protocolo strong { font-size: 1.15rem; letter-spacing: .02em; color: var(--ink, #122033); }
.consulta-status {
  display: inline-flex; align-items: center; gap: 8px; margin: 0 0 14px;
  padding: 7px 11px; border-radius: 999px; font-weight: 650; font-size: 14px;
  background: #eef2f7; color: var(--ink, #122033);
}
.consulta-status-icon { display: grid; place-items: center; }
.consulta-status-icon .icon { width: 15px; height: 15px; }
.consulta-status--instalado { background: #e6f6ec; color: #0a7a3e; }
.consulta-status--cancelado { background: #fdecee; color: #b42318; }
.consulta-status--agendado { background: #eef4ff; color: #1d4ed8; }
.consulta-status--em_contato { background: #fff7e8; color: #9a6700; }
.consulta-meta { display: grid; gap: 8px; margin: 0 0 14px; padding: 0; list-style: none; }
.consulta-meta li {
  display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px;
  border: 1px solid var(--line, #e2e8f0); border-radius: 10px; background: #fff;
}
.consulta-meta-icon {
  flex: none; display: grid; place-items: center; width: 32px; height: 32px;
  border-radius: 8px; background: var(--page, #f4f6fa); color: var(--brand-blue, #0b5cd5);
}
.consulta-meta-icon .icon { width: 16px; height: 16px; }
.consulta-meta-label {
  display: block; font-size: 11px; font-weight: 650; color: var(--muted, #5a6a7e);
  text-transform: uppercase; letter-spacing: .03em; margin-bottom: 1px;
}
.consulta-meta strong { font-size: 14.5px; font-weight: 650; color: var(--ink, #122033); }
.consulta-acoes { margin: 0 0 10px; }
.consulta-acoes .btn { width: 100%; justify-content: center; }
.consulta-page .hint { margin: 0; color: var(--muted, #5a6a7e); font-size: 13px; }
.consulta-nova { margin: 16px 0 0; padding-top: 12px; border-top: 1px solid var(--line, #e2e8f0); }
.consulta-nova a { display: inline-flex; align-items: center; gap: 6px; font-weight: 650; color: var(--brand-blue, #0b5cd5); text-decoration: none; }
.consulta-nova a:hover { text-decoration: underline; }
.consulta-nova .icon { width: 14px; height: 14px; }

@media (max-width: 760px) {
  .docs-layout { grid-template-columns: 1fr; }
  .docs-side { order: -1; display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; }
  .docs-qr { width: 100%; }
  .docs-selo { flex: 1; min-width: 160px; }
  .docs-body { padding-top: 14px; }
  .docs-banner { padding: 18px 0 20px; }
  .docs-type { padding: 12px; }
  .docs-pick-group .btn { flex: 1; justify-content: center; min-width: 0; }
  .docs-submit {
    position: sticky; bottom: 8px; z-index: 4;
    box-shadow: 0 8px 24px rgba(0,0,0,.12);
  }
  .consulta-page { padding: 18px 0 48px; }
  .consulta-card { padding: 16px; }
}
