/**
 * Cadastro de Cliente — formulário público
 *
 * Página autônoma: não depende do CSS do admin nem de framework externo.
 * Escrita mobile-first — a maior parte dos cadastros vem do celular.
 */

:root {
    --cc-bg:        #f1f5f9;
    --cc-surface:   #ffffff;
    --cc-surface-2: #f8fafc;
    --cc-text:      #0f172a;
    --cc-text-2:    #334155;
    --cc-muted:     #64748b;
    --cc-border:    #e2e8f0;
    --cc-border-2:  #cbd5e1;
    --cc-primary:   #1d4ed8;
    --cc-primary-d: #1e3a8a;
    --cc-primary-s: #eff4ff;
    --cc-ring:      rgba(29, 78, 216, .16);
    --cc-error:     #dc2626;
    --cc-error-bg:  #fef2f2;
    --cc-ok:        #15803d;
    --cc-warn:      #b45309;
    --cc-aside-1:   #0b1b3a;
    --cc-aside-2:   #16336b;
    --cc-radius:    18px;
    --cc-shadow:    0 20px 45px -28px rgba(15, 23, 42, .45);
    --cc-bar-bg:    #0f172a;
    --cc-bar-fg:    #ffffff;
    /* Respiro para o notch / barra de gestos do celular */
    --cc-safe-b:    env(safe-area-inset-bottom, 0px);
}

/* MODO CLARO SEMPRE.
   O bloco @media (prefers-color-scheme: dark) foi removido de propósito: o
   formulário precisa ter a mesma aparência para todo mundo, inclusive em
   celular e sistema no modo escuro. O painel de apresentação da esquerda
   continua escuro — isso vem dos tokens --cc-aside-*, não do tema do sistema.
   `color-scheme: light` faz select, scrollbar e campos nativos serem
   desenhados claros mesmo num sistema em modo escuro. */
:root { color-scheme: light; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    background: var(--cc-bg);
    color: var(--cc-text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}

img { max-width: 100%; }

/* ---------------------------------------------------------------
   BARRA DA EQUIPE (só para quem está logado no sistema)
   --------------------------------------------------------------- */
.cc-staffbar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 10px 16px;
    background: var(--cc-bar-bg);
    color: var(--cc-bar-fg);
    font-size: 13px;
}
.cc-staffbar-label { opacity: .8; }
.cc-staffbar input {
    flex: 1 1 240px;
    min-width: 0;
    padding: 9px 11px;
    border: 0;
    border-radius: 9px;
    background: rgba(255, 255, 255, .14);
    color: var(--cc-bar-fg);
    font: inherit;
}
.cc-staffbar-btn {
    padding: 9px 15px;
    border: 0;
    border-radius: 9px;
    background: var(--cc-bar-fg);
    color: var(--cc-bar-bg);
    font: inherit;
    font-weight: 650;
    cursor: pointer;
}

/* ---------------------------------------------------------------
   ESTRUTURA
   --------------------------------------------------------------- */
.cc-shell { display: flex; flex-direction: column; min-height: 100vh; }

/* ---------------------------------------------------------------
   PAINEL DE APRESENTAÇÃO
   --------------------------------------------------------------- */
.cc-aside {
    background: linear-gradient(160deg, var(--cc-aside-1), var(--cc-aside-2));
    color: #fff;
    padding: 20px 20px 32px;
}
.cc-aside-inner { max-width: 460px; margin: 0 auto; }

/* No celular a apresentação é só um cabeçalho: o formulário precisa
   começar dentro da primeira tela, sem rolagem. A lista de vantagens
   volta no desktop, onde ela ocupa a coluna lateral. */
/* No celular o painel vira um cabeçalho compacto: o guia e as notas ficam
   ocultos para a pessoa chegar ao formulário sem rolagem. Voltam no desktop,
   onde há coluna dedicada. */
.cc-benefits,
.cc-guide,
.cc-aside-note { display: none; }

.cc-brandmark { display: flex; align-items: center; gap: 11px; margin-bottom: 16px; }
.cc-brandmark img { max-height: 40px; max-width: 150px; object-fit: contain; }
.cc-brandmark-letter {
    width: 40px; height: 40px;
    border-radius: 12px;
    background: rgba(255, 255, 255, .16);
    display: flex; align-items: center; justify-content: center;
    font-size: 19px; font-weight: 700;
}
.cc-brandmark-name { font-size: 15px; font-weight: 600; letter-spacing: .01em; opacity: .95; }

.cc-aside-title { margin: 0 0 6px; font-size: 24px; line-height: 1.2; letter-spacing: -.025em; }
.cc-aside-lead  { margin: 0; font-size: 14.5px; color: rgba(255, 255, 255, .78); }

.cc-benefits { list-style: none; margin: 22px 0 0; padding: 0; grid-template-columns: 1fr; gap: 13px; }
.cc-benefits li { display: flex; align-items: flex-start; gap: 12px; font-size: 14.5px; color: rgba(255, 255, 255, .82); }
.cc-benefits strong { color: #fff; font-weight: 620; }
.cc-benefit-ico {
    flex: 0 0 auto;
    width: 32px; height: 32px;
    border-radius: 10px;
    background: rgba(255, 255, 255, .12);
    display: flex; align-items: center; justify-content: center;
}
.cc-benefit-ico svg { width: 17px; height: 17px; fill: none; stroke: #fff; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

/* ---- Guia numerado: como funciona abrir um caso ---- */
.cc-guide { list-style: none; margin: 24px 0 0; padding: 0; counter-reset: none; }
.cc-guide li {
    position: relative;
    display: flex; align-items: flex-start; gap: 13px;
    padding-bottom: 16px;
}
/* Linha ligando os passos, para ler como um percurso e não como lista solta. */
.cc-guide li:not(:last-child)::before {
    content: '';
    position: absolute; left: 13px; top: 30px; bottom: 2px;
    width: 1.5px;
    background: rgba(255, 255, 255, .16);
}
.cc-guide li:last-child { padding-bottom: 0; }
.cc-guide-num {
    position: relative; z-index: 1;
    flex: 0 0 auto;
    width: 27px; height: 27px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .14);
    display: flex; align-items: center; justify-content: center;
    font-size: 12.5px; font-weight: 600; color: #fff;
}
.cc-guide li > span:last-child {
    display: block;
    font-size: 13.5px; line-height: 1.5;
    color: rgba(255, 255, 255, .72);
}
/* Título em bloco; o restante da frase (com <em>) flui inline na MESMA linha,
   senão o nome/pontuação caem soltos em linhas próprias. */
.cc-guide strong { display: block; margin-bottom: 2px; font-size: 14.5px; font-weight: 600; color: #fff; }
.cc-guide em { font-style: normal; color: rgba(255, 255, 255, .92); font-weight: 500; }

/* ---- Aviso sobre a outra parte ---- */
.cc-aside-note {
    display: flex; align-items: flex-start; gap: 10px;
    margin: 22px 0 0; padding: 13px 14px;
    background: rgba(255, 255, 255, .07);
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 13px;
    font-size: 13px; line-height: 1.5;
    color: rgba(255, 255, 255, .74);
}
.cc-aside-note svg { flex: 0 0 auto; width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linejoin: round; margin-top: 1px; }
.cc-aside-note strong { display: block; color: #fff; font-weight: 600; }

.cc-aside-secure {
    display: flex; align-items: flex-start; gap: 9px;
    margin: 24px 0 0;
    font-size: 12.5px;
    color: rgba(255, 255, 255, .62);
}
.cc-aside-secure svg { flex: 0 0 auto; width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; margin-top: 1px; }

/* ---------------------------------------------------------------
   COLUNA DO FORMULÁRIO
   --------------------------------------------------------------- */
.cc-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 0 calc(20px + var(--cc-safe-b));
}

.cc-card {
    width: 100%;
    max-width: 620px;
    background: var(--cc-surface);
    border-radius: var(--cc-radius) var(--cc-radius) 0 0;
    padding: 22px 18px 0;
    margin-top: -18px;
    position: relative;
    z-index: 1;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.cc-copy { margin: 14px 0 0; color: var(--cc-muted); font-size: 12.5px; }

/* ---------------------------------------------------------------
   PROGRESSO
   --------------------------------------------------------------- */
.cc-steps { margin-bottom: 20px; }
.cc-steps-top {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 8px;
}
.cc-steps-count { font-size: 12.5px; color: var(--cc-muted); text-transform: uppercase; letter-spacing: .06em; }
.cc-steps-count b { color: var(--cc-primary); }
.cc-steps-name { font-size: 13.5px; font-weight: 620; }

.cc-steps-bar { height: 6px; border-radius: 99px; background: var(--cc-border); overflow: hidden; }
.cc-steps-bar span {
    display: block; height: 100%; width: 25%;
    border-radius: 99px;
    background: linear-gradient(90deg, var(--cc-primary), var(--cc-primary-d));
    transition: width .35s cubic-bezier(.4, 0, .2, 1);
}

/* Trilha com nomes: só no desktop */
.cc-steps ol { display: none; }

/* ---------------------------------------------------------------
   PASSOS
   --------------------------------------------------------------- */
.cc-step { display: none; }
.cc-step.is-active { display: block; animation: cc-in .3s cubic-bezier(.4, 0, .2, 1); }
@keyframes cc-in {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: none; }
}

.cc-step-title { margin: 0 0 4px; font-size: 21px; letter-spacing: -.02em; }
.cc-step-sub   { margin: 0 0 20px; color: var(--cc-muted); font-size: 14px; }
.cc-step-sub strong { color: var(--cc-text-2); font-weight: 620; }

/* ---------------------------------------------------------------
   SEGMENTO PF / PJ
   --------------------------------------------------------------- */
.cc-segment { display: flex; gap: 10px; margin-bottom: 20px; }
.cc-segment label {
    flex: 1;
    display: flex; flex-direction: column; gap: 1px;
    padding: 13px 14px;
    min-height: 62px;
    justify-content: center;
    border: 1.5px solid var(--cc-border-2);
    border-radius: 13px;
    background: var(--cc-surface);
    cursor: pointer;
    transition: border-color .18s, background .18s, box-shadow .18s;
}
.cc-segment label b     { font-size: 14.5px; font-weight: 640; }
.cc-segment label small { color: var(--cc-muted); font-size: 12px; }
/* O rádio some visualmente mas continua focável pelo teclado. */
.cc-segment label input { position: absolute; width: 1px; height: 1px; margin: 0; opacity: 0; }
.cc-segment label.is-on {
    border-color: var(--cc-primary);
    background: var(--cc-primary-s);
    box-shadow: inset 0 0 0 1px var(--cc-primary);
}
.cc-segment label:focus-within { box-shadow: 0 0 0 4px var(--cc-ring); }

/* ---------------------------------------------------------------
   CAMPOS
   --------------------------------------------------------------- */
.cc-row { display: flex; flex-wrap: wrap; gap: 0 14px; }
.cc-row > .cc-field { flex: 1 1 100%; min-width: 0; }

.cc-field { margin-bottom: 17px; }
.cc-field label {
    display: block;
    margin-bottom: 6px;
    font-size: 13.5px;
    font-weight: 620;
    color: var(--cc-text-2);
}
.cc-optional {
    display: inline-block;
    margin-left: 4px;
    padding: 1px 7px;
    border-radius: 99px;
    background: var(--cc-surface-2);
    border: 1px solid var(--cc-border);
    color: var(--cc-muted);
    font-size: 11px;
    font-weight: 500;
    vertical-align: 1px;
}

.cc-field input,
.cc-field select,
.cc-field textarea {
    width: 100%;
    /* 16px evita o zoom automático do iOS ao focar */
    font-size: 16px;
    min-height: 52px;
    padding: 14px 15px;
    border: 1.5px solid var(--cc-border-2);
    border-radius: 12px;
    background: var(--cc-surface);
    color: var(--cc-text);
    font-family: inherit;
    transition: border-color .18s, box-shadow .18s;
    appearance: none;
}
.cc-field select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath fill='%2364748b' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    padding-right: 36px;
}
.cc-field input:focus,
.cc-field select:focus,
.cc-field textarea:focus {
    outline: none;
    border-color: var(--cc-primary);
    box-shadow: 0 0 0 4px var(--cc-ring);
}
.cc-field input::placeholder,
.cc-field textarea::placeholder { color: var(--cc-muted); opacity: .65; }

/* Área de texto: alta o bastante para caber um relato sem rolagem interna,
   e só redimensionável na vertical — arrastar na horizontal estouraria o
   cartão do formulário. */
.cc-field textarea {
    min-height: 132px;
    padding: 14px 15px;
    line-height: 1.6;
    resize: vertical;
    display: block;
}

.cc-hint { margin: 6px 0 0; color: var(--cc-muted); font-size: 12.5px; }
.cc-hint-block { margin: -8px 0 17px; }
.cc-hint.is-ok   { color: var(--cc-ok); }
.cc-hint.is-warn { color: var(--cc-warn); }

.cc-err { display: none; margin: 6px 0 0; color: var(--cc-error); font-size: 12.5px; font-weight: 500; }
.has-error .cc-err:not(:empty) { display: block; }
.has-error input,
.has-error select { border-color: var(--cc-error); }

.cc-input-group { position: relative; }
.cc-input-group input { padding-right: 92px; }
.cc-eye {
    position: absolute;
    top: 50%; right: 6px;
    transform: translateY(-50%);
    min-height: 40px;
    padding: 6px 12px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: var(--cc-primary);
    font: inherit;
    font-size: 13px; font-weight: 620;
    cursor: pointer;
}

/* Honeypot — fora da tela, mas presente no DOM */
.cc-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------------------------------------------------------------
   FOTO
   --------------------------------------------------------------- */
/* ---------------------------------------------------------------
   PROVA DE VIDA — destaque (obrigatória nos dois fluxos)
   --------------------------------------------------------------- */
.cc-prova-vida {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    margin-bottom: 14px;
    border: 1px solid #fcd34d;
    border-left: 4px solid var(--cc-warn);
    border-radius: 12px;
    background: #fffbeb;
}
.cc-prova-vida-ic {
    flex: 0 0 auto;
    width: 34px; height: 34px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 9px;
    background: var(--cc-warn);
}
.cc-prova-vida-ic svg { width: 20px; height: 20px; fill: none; stroke: #fff; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.cc-prova-vida strong { display: block; font-size: 13.5px; color: #7c2d12; font-weight: 700; }
.cc-prova-vida p { margin: 3px 0 0; font-size: 12.5px; color: #92400e; line-height: 1.45; }
.cc-prova-vida p strong { display: inline; font-size: inherit; color: #7c2d12; }

.cc-req-badge {
    display: inline-block;
    margin-left: 6px;
    padding: 1px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .02em;
    color: #fff;
    background: var(--cc-warn);
    vertical-align: middle;
}

.cc-photo {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid var(--cc-border);
    border-radius: 14px;
    background: var(--cc-surface-2);
}
.cc-photo-preview {
    flex: 0 0 auto;
    width: 72px; height: 72px;
    border-radius: 50%;
    background: var(--cc-surface);
    border: 1.5px solid var(--cc-border-2);
    overflow: hidden;
    display: flex; align-items: center; justify-content: center;
}
.cc-photo-preview svg { width: 30px; height: 30px; fill: none; stroke: var(--cc-muted); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.cc-photo-preview img { width: 100%; height: 100%; object-fit: cover; }

.cc-photo-side { min-width: 0; }
.cc-photo-side strong { display: block; font-size: 14px; font-weight: 620; }
.cc-photo-side p { margin: 2px 0 10px; color: var(--cc-muted); font-size: 12.5px; }
.cc-photo-btns { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------------------------------------------------------------
   FORÇA DA SENHA
   --------------------------------------------------------------- */
.cc-strength { height: 5px; margin-top: 9px; border-radius: 99px; background: var(--cc-border); overflow: hidden; }
.cc-strength span {
    display: block; height: 100%; width: 0;
    border-radius: 99px;
    background: var(--cc-error);
    transition: width .25s, background .25s;
}

/* ---------------------------------------------------------------
   REVISÃO
   --------------------------------------------------------------- */
.cc-review { display: grid; gap: 10px; margin-bottom: 18px; }
.cc-review-card {
    border: 1px solid var(--cc-border);
    border-radius: 14px;
    background: var(--cc-surface-2);
    padding: 14px 15px;
}
.cc-review-head {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 9px;
}
.cc-review-head h4 {
    margin: 0;
    font-size: 12px; font-weight: 700;
    text-transform: uppercase; letter-spacing: .07em;
    color: var(--cc-muted);
}
.cc-review-edit {
    border: 0; background: none; padding: 4px 2px;
    color: var(--cc-primary);
    font: inherit; font-size: 13px; font-weight: 620;
    cursor: pointer;
}
.cc-review dl { margin: 0; display: grid; gap: 7px; }
/* Só as linhas do <dl> viram flex — sem isso a regra pegaria o próprio
   card e o cabeçalho, que também são <div>. */
.cc-review dl > div { display: flex; gap: 10px; align-items: baseline; }
.cc-review dt { flex: 0 0 34%; color: var(--cc-muted); font-size: 12.5px; }
.cc-review dd { margin: 0; flex: 1; font-size: 14px; font-weight: 550; word-break: break-word; }
.cc-review dd.is-empty { color: var(--cc-muted); font-weight: 400; font-style: italic; }

.cc-ready {
    border: 1px dashed var(--cc-border-2);
    border-radius: 14px;
    padding: 14px 15px;
    margin-bottom: 18px;
}
.cc-ready > strong { display: block; margin-bottom: 8px; font-size: 13.5px; }
.cc-ready ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.cc-ready li {
    position: relative;
    padding-left: 24px;
    color: var(--cc-muted);
    font-size: 13.5px;
}
.cc-ready li::before {
    content: "";
    position: absolute;
    left: 4px; top: 6px;
    width: 11px; height: 6px;
    border-left: 2px solid var(--cc-ok);
    border-bottom: 2px solid var(--cc-ok);
    transform: rotate(-45deg);
}

/* ---------------------------------------------------------------
   ACEITE
   --------------------------------------------------------------- */
.cc-check { margin-bottom: 18px; }
.cc-check label {
    display: flex; gap: 12px; align-items: flex-start;
    font-size: 13.5px; color: var(--cc-muted);
    cursor: pointer;
}
.cc-check input {
    margin: 1px 0 0;
    width: 20px; height: 20px;
    flex: 0 0 auto;
    accent-color: var(--cc-primary);
}
.cc-check a { color: var(--cc-primary); }
.cc-check.has-error > label > span { color: var(--cc-error); }

.cc-recaptcha { margin-bottom: 18px; }

/* ---------------------------------------------------------------
   BOTÕES + BARRA DE AÇÃO
   No celular a barra gruda no rodapé: o botão principal fica sempre
   ao alcance do polegar, sem precisar rolar.
   --------------------------------------------------------------- */
/* Barra de ações NÃO flutua no celular.
   Antes era `position: sticky; bottom: 0`, o que deixava o "Continuar"
   colado na base da tela o tempo todo — tapando campo e dando a impressão
   de que dava para avançar sem ler o passo. Agora ela fica no fluxo, no
   fim do conteúdo: a pessoa só chega nela rolando até o fim do passo. */
.cc-actions {
    display: flex;
    gap: 10px;
    margin: 26px 0 calc(4px + var(--cc-safe-b));
    padding: 16px 0 0;
    border-top: 1px solid var(--cc-border);
}

.cc-btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 52px;
    padding: 14px 20px;
    border: 1.5px solid transparent;
    border-radius: 12px;
    font-family: inherit;
    font-size: 15.5px;
    font-weight: 640;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: transform .12s, background .18s, box-shadow .18s;
    -webkit-tap-highlight-color: transparent;
}
.cc-btn:active { transform: translateY(1px); }
.cc-btn-primary {
    background: var(--cc-primary);
    color: #fff;
    box-shadow: 0 12px 24px -14px var(--cc-primary);
}
.cc-btn-primary:hover { background: var(--cc-primary-d); }
.cc-btn-ghost {
    flex: 0 0 auto;
    min-width: 104px;
    background: var(--cc-surface);
    border-color: var(--cc-border-2);
    color: var(--cc-text-2);
}
.cc-btn-soft {
    flex: 0 0 auto;
    background: var(--cc-primary-s);
    color: var(--cc-primary);
    border-color: transparent;
}
.cc-btn-quiet {
    flex: 0 0 auto;
    background: transparent;
    color: var(--cc-muted);
    border-color: var(--cc-border-2);
}
.cc-btn-sm { min-height: 42px; padding: 9px 15px; font-size: 13.5px; border-radius: 10px; }
.cc-btn-block { width: 100%; }
.cc-btn[disabled] { opacity: .6; cursor: default; }

.cc-spinner { display: none; width: 17px; height: 17px; }
.is-sending .cc-spinner {
    display: inline-block;
    border: 2px solid rgba(255, 255, 255, .4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: cc-spin .7s linear infinite;
}
@keyframes cc-spin { to { transform: rotate(360deg); } }

/* ---------------------------------------------------------------
   ALERTA
   --------------------------------------------------------------- */
.cc-alert {
    padding: 13px 15px;
    border-radius: 12px;
    font-size: 13.5px;
    margin-bottom: 18px;
}
.cc-alert strong { display: block; margin-bottom: 2px; font-size: 14px; }
.cc-alert-error {
    background: var(--cc-error-bg);
    color: var(--cc-error);
    border: 1px solid currentColor;
}

/* ---------------------------------------------------------------
   RODAPÉ DO CARTÃO
   --------------------------------------------------------------- */
.cc-foot {
    margin-top: 18px;
    padding: 16px 0 20px;
    border-top: 1px solid var(--cc-border);
    text-align: center;
    color: var(--cc-muted);
    font-size: 14px;
}
.cc-foot a { color: var(--cc-primary); font-weight: 620; text-decoration: none; }
.cc-foot a:hover { text-decoration: underline; }

/* ---------------------------------------------------------------
   MODAL DE RECORTE
   --------------------------------------------------------------- */
.cc-modal {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    background: rgba(8, 13, 24, .6);
    backdrop-filter: blur(2px);
}
.cc-modal[hidden] { display: none; }
.cc-modal-box {
    width: 100%;
    max-width: 420px;
    background: var(--cc-surface);
    border-radius: 20px 20px 0 0;
    padding: 16px 16px calc(16px + var(--cc-safe-b));
    animation: cc-up .25s cubic-bezier(.4, 0, .2, 1);
}
@keyframes cc-up { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }

.cc-modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.cc-modal-head h3 { margin: 0; font-size: 17px; }
.cc-modal-x {
    border: 0; background: none;
    width: 38px; height: 38px;
    font-size: 26px; line-height: 1;
    color: var(--cc-muted);
    cursor: pointer;
}

.cc-crop-stage {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    max-height: 58vh;
    margin: 0 auto;
    border-radius: 14px;
    overflow: hidden;
    background: #0b1220;
    touch-action: none;
    cursor: grab;
}
.cc-crop-stage:active { cursor: grabbing; }
.cc-crop-stage canvas { display: block; width: 100%; height: 100%; }
.cc-crop-mask {
    position: absolute; inset: 0;
    pointer-events: none;
    background: rgba(8, 13, 24, .55);
    -webkit-mask: radial-gradient(circle at 50% 50%, transparent 0 42%, #000 42.4%);
            mask: radial-gradient(circle at 50% 50%, transparent 0 42%, #000 42.4%);
}

.cc-crop-zoom { display: flex; align-items: center; gap: 12px; margin: 14px 2px 0; color: var(--cc-muted); }
.cc-crop-zoom input {
    flex: 1;
    accent-color: var(--cc-primary);
    height: 28px;
}
.cc-crop-tip { margin: 8px 0 0; text-align: center; color: var(--cc-muted); font-size: 12.5px; }

.cc-modal-foot { display: flex; gap: 10px; margin-top: 16px; }

/* ---------------------------------------------------------------
   AVISO DE CADASTRO EXISTENTE
   --------------------------------------------------------------- */
.cc-found-lead { margin: 0 0 16px; color: var(--cc-muted); font-size: 14px; }

.cc-found-data {
    margin: 0 0 18px;
    padding: 14px 15px;
    border: 1px solid var(--cc-border);
    border-radius: 14px;
    background: var(--cc-surface-2);
    display: grid;
    gap: 8px;
}
.cc-found-data > div { display: flex; gap: 10px; align-items: baseline; }
.cc-found-data dt { flex: 0 0 34%; color: var(--cc-muted); font-size: 12.5px; }
.cc-found-data dd { margin: 0; flex: 1; font-size: 14.5px; font-weight: 600; word-break: break-word; }

.cc-found-links {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    margin: 14px 0 0;
    font-size: 13.5px;
    text-align: center;
}
.cc-found-links a,
.cc-found-links button {
    border: 0;
    background: none;
    padding: 4px 2px;
    color: var(--cc-primary);
    font: inherit;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}
.cc-found-links button { color: var(--cc-muted); font-weight: 500; }

/* ---------------------------------------------------------------
   TELA DE CONCLUSÃO
   --------------------------------------------------------------- */
.cc-card-done { text-align: center; padding-bottom: 0; }

.cc-done-check { width: 76px; height: 76px; margin: 6px auto 18px; }
.cc-done-check svg { width: 100%; height: 100%; }
.cc-done-circle {
    stroke: var(--cc-ok);
    stroke-width: 2.5;
    stroke-dasharray: 151;
    stroke-dashoffset: 151;
    animation: cc-draw .6s cubic-bezier(.65, 0, .45, 1) forwards;
}
.cc-done-tick {
    stroke: var(--cc-ok);
    stroke-width: 3.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 40;
    stroke-dashoffset: 40;
    animation: cc-draw .35s cubic-bezier(.65, 0, .45, 1) .5s forwards;
}
@keyframes cc-draw { to { stroke-dashoffset: 0; } }

.cc-done-title { margin: 0 0 10px; font-size: 23px; letter-spacing: -.02em; }
.cc-done-lead  { margin: 0 0 20px; color: var(--cc-muted); font-size: 15px; }
.cc-done-lead strong { color: var(--cc-text-2); }

.cc-done-box {
    display: flex;
    gap: 13px;
    text-align: left;
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid var(--cc-border);
    border-radius: 14px;
    background: var(--cc-primary-s);
}
.cc-done-box-ico { flex: 0 0 auto; }
.cc-done-box-ico svg {
    width: 22px; height: 22px;
    fill: none; stroke: var(--cc-primary);
    stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
}
/* Só o título vira bloco — os destaques dentro do texto seguem inline. */
.cc-done-box > div > strong { display: block; margin-bottom: 4px; font-size: 15px; }
.cc-done-box p { margin: 0; color: var(--cc-text-2); font-size: 13.5px; }

.cc-done-login {
    margin-top: 18px;
    padding: 15px;
    border: 1px dashed var(--cc-border-2);
    border-radius: 14px;
    text-align: left;
}
.cc-done-login > strong { display: block; margin-bottom: 4px; font-size: 14px; }
.cc-done-login p { margin: 0; color: var(--cc-muted); font-size: 13.5px; }
.cc-done-login b { color: var(--cc-text); }

/* ===============================================================
   TABLET
   =============================================================== */
@media (min-width: 620px) {
    .cc-row > .cc-field { flex: 1 1 0; }
    .cc-row > .cc-col-4 { flex: 0 0 calc(33.333% - 9.34px); }
    .cc-row > .cc-col-8 { flex: 1 1 0; }

    .cc-main { padding: 26px 20px calc(26px + var(--cc-safe-b)); }
    .cc-card {
        margin-top: 0;
        border-radius: var(--cc-radius);
        border: 1px solid var(--cc-border);
        box-shadow: var(--cc-shadow);
        padding: 28px 28px 0;
        flex: 0 0 auto;
    }
    .cc-actions {
        position: static;
        margin: 26px 0 0;
        padding: 0;
        border-top: 0;
    }
    .cc-foot { margin-top: 26px; }
    .cc-aside { padding: 34px 24px 46px; }
    .cc-modal { align-items: center; }
    .cc-modal-box { border-radius: 20px; }
}

/* ===============================================================
   DESKTOP — duas colunas
   =============================================================== */
@media (min-width: 1024px) {
    .cc-shell { flex-direction: row; align-items: stretch; }

    .cc-aside {
        flex: 0 0 42%;
        max-width: 520px;
        display: flex;
        align-items: center;
        padding: 48px 44px;
    }
    .cc-aside-title { font-size: 34px; }
    .cc-aside-lead  { font-size: 16px; }
    .cc-benefits    { display: grid; }
    .cc-guide       { display: block; }
    .cc-aside-note  { display: flex; }

    .cc-main { justify-content: center; padding: 44px 40px; }
    .cc-card { max-width: 580px; }

    /* Trilha completa com os nomes dos passos */
    .cc-steps ol {
        display: flex;
        justify-content: space-between;
        gap: 6px;
        list-style: none;
        margin: 12px 0 0;
        padding: 0;
    }
    .cc-steps ol li {
        display: flex; align-items: center; gap: 7px;
        font-size: 12.5px;
        color: var(--cc-muted);
    }
    .cc-steps ol li i {
        width: 9px; height: 9px;
        border-radius: 50%;
        background: var(--cc-border-2);
        transition: background .2s;
    }
    .cc-steps ol li.is-active { color: var(--cc-text); font-weight: 620; }
    .cc-steps ol li.is-active i,
    .cc-steps ol li.is-done i { background: var(--cc-primary); }
    .cc-steps-top { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    * { animation: none !important; transition: none !important; }
}

/* =========================================================================
   ANEXOS DO CASO
   ========================================================================= */
.cc-upload {
    display: flex; align-items: center; gap: 13px;
    padding: 18px 16px;
    background: var(--cc-surface-2);
    border: 1.5px dashed var(--cc-border-2);
    border-radius: var(--cc-radius);
    cursor: pointer;
    transition: border-color .15s ease, background .15s ease;
}
.cc-upload:hover { border-color: var(--cc-primary); background: var(--cc-primary-s); }
.cc-upload svg {
    width: 26px; height: 26px; flex-shrink: 0;
    fill: none; stroke: var(--cc-primary); stroke-width: 1.7;
    stroke-linecap: round; stroke-linejoin: round;
}
.cc-upload span { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cc-upload strong { font-size: 15px; font-weight: 500; color: var(--cc-text); }
.cc-upload small { font-size: 13px; color: var(--cc-muted); line-height: 1.4; }

.cc-upload-list { list-style: none; margin: 12px 0 0; padding: 0; }
.cc-upload-list li {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 12px; margin-bottom: 7px;
    background: var(--cc-surface);
    border: 1px solid var(--cc-border);
    border-radius: 12px;
}
.cc-upload-nome {
    flex: 1 1 auto; min-width: 0;
    font-size: 14px; color: var(--cc-text);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.cc-upload-tam { flex-shrink: 0; font-size: 12px; color: var(--cc-muted); }
.cc-upload-rm {
    flex-shrink: 0;
    width: 26px; height: 26px;
    display: inline-flex; align-items: center; justify-content: center;
    background: none; border: none; border-radius: 8px;
    color: var(--cc-muted); font-size: 20px; line-height: 1;
    cursor: pointer;
}
.cc-upload-rm:hover { background: var(--cc-error-bg); color: var(--cc-error); }

/* =========================================================================
   TIPOGRAFIA DO FORMULÁRIO
   Corpo maior e de traço leve. 16px nos campos é o mínimo que impede o iOS
   de dar zoom ao focar; aqui vai acima disso para leitura confortável de
   quem preenche o formulário inteiro pelo celular.
   ========================================================================= */
.cc-step-title  { font-size: 25px; font-weight: 300; letter-spacing: -0.025em; line-height: 1.25; }
.cc-step-sub    { font-size: 15.5px; font-weight: 300; line-height: 1.55; }

.cc-field label {
    font-size: 15.5px;
    font-weight: 400;
    letter-spacing: -0.01em;
}
.cc-field input,
.cc-field select,
.cc-field textarea {
    font-size: 17px;
    font-weight: 300;
    letter-spacing: -0.01em;
    min-height: 56px;
}
.cc-field textarea { min-height: 150px; line-height: 1.6; }

.cc-hint        { font-size: 14px; font-weight: 300; line-height: 1.5; }
.cc-err         { font-size: 14px; }
.cc-optional    { font-size: 12.5px; }
.cc-segment b   { font-size: 15.5px; }
.cc-segment small { font-size: 13.5px; }
.cc-btn         { font-size: 16px; }
.cc-check span  { font-size: 15px; line-height: 1.55; }

@media (min-width: 620px) {
    .cc-step-title { font-size: 29px; }
    .cc-step-sub   { font-size: 16.5px; }
}

/* =========================================================================
   TAXA DE INSCRIÇÃO
   Aparece logo abaixo do Valor do Caso, conforme a pessoa digita.
   ========================================================================= */
.cc-taxa {
    margin: -6px 0 20px;
    padding: 16px 18px;
    background: var(--cc-primary-s);
    border: 1.5px solid var(--cc-primary);
    border-radius: var(--cc-radius);
}
.cc-taxa-linha {
    display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
}
.cc-taxa-rotulo {
    font-size: 15px; font-weight: 400; color: var(--cc-text-2);
}
.cc-taxa-valor {
    font-size: 26px; font-weight: 500; color: var(--cc-primary);
    letter-spacing: -0.03em; white-space: nowrap;
}
.cc-taxa-obs {
    margin: 8px 0 0;
    font-size: 13.5px; font-weight: 300; line-height: 1.5;
    color: var(--cc-muted);
}
@media (max-width: 380px) {
    .cc-taxa-linha { flex-direction: column; gap: 2px; }
}

/* =========================================================================
   CAMPOS PERSONALIZADOS DO CONTATO
   Tipos que o formulário não tinha: múltipla escolha, caixas e cor.
   ========================================================================= */
.cc-field select[multiple] {
    min-height: 120px;
    padding: 10px 12px;
    background-image: none;   /* a seta do select simples não cabe aqui */
}
.cc-field select[multiple] option {
    padding: 9px 10px;
    border-radius: 8px;
}

.cc-cf-checks { display: flex; flex-direction: column; gap: 9px; }
.cc-cf-check {
    display: flex; align-items: center; gap: 11px;
    padding: 13px 15px;
    background: var(--cc-surface);
    border: 1.5px solid var(--cc-border-2);
    border-radius: 12px;
    font-size: 15.5px; font-weight: 300;
    cursor: pointer;
}
.cc-cf-check input { width: 20px; height: 20px; flex-shrink: 0; accent-color: var(--cc-primary); }
.cc-cf-check:has(input:checked) { border-color: var(--cc-primary); background: var(--cc-primary-s); }

.cc-field input.cc-cf-color {
    min-height: 56px; padding: 6px;
    cursor: pointer;
}

/* ============================================================
   Cônjuge (Requerente casado) + Requeridos adicionais
   ============================================================ */
.cc-conjuge{
    margin-top:6px; padding:14px 16px;
    border:1px dashed var(--cc-border-2);
    border-radius:12px;
    background:var(--cc-surface-2);
    animation:cc-fade .18s ease;
}
.cc-conjuge-head{ margin-bottom:8px; }
.cc-conjuge-head strong{ display:block; color:var(--cc-text); font-size:14px; }
.cc-conjuge-head .cc-hint{ display:block; margin-top:2px; }

.cc-req-extra{
    margin-top:14px; padding:14px 16px;
    border:1px solid var(--cc-border);
    border-radius:12px;
    background:var(--cc-surface-2);
    animation:cc-fade .18s ease;
}
.cc-req-extra-head{
    display:flex; align-items:center; justify-content:space-between;
    margin-bottom:10px;
}
.cc-req-extra-head strong{ color:var(--cc-text); font-size:14px; }
.cc-req-remover{
    border:0; background:transparent; cursor:pointer;
    color:#b91c1c; font-size:12.5px; font-weight:600; padding:4px 6px;
    border-radius:6px;
}
.cc-req-remover:hover{ background:#fef2f2; }

.cc-req-add{
    display:inline-flex; align-items:center; gap:8px;
    /* margin-bottom generoso: o aviso logo abaixo (.cc-hint-block) usa
       margin-top NEGATIVO (assume folga no elemento anterior). Sem esta
       margem, o texto subia por cima do botão — no desktop e no celular. */
    margin:14px 0 22px; padding:12px 16px;
    border:1px dashed var(--cc-primary); border-radius:10px;
    background:var(--cc-primary-s); color:var(--cc-primary-d);
    font-size:14px; font-weight:600; cursor:pointer; width:100%;
    justify-content:center;
}
.cc-req-add:hover{ background:#e5edff; }
.cc-req-add span{ font-size:18px; line-height:1; }
.cc-req-limite{ margin:10px 0 22px; color:var(--cc-muted); font-size:12.5px; text-align:center; }

@keyframes cc-fade{ from{ opacity:0; transform:translateY(-4px); } to{ opacity:1; transform:none; } }

/* ============================================================
   TELA DE PROCESSAMENTO (entre o envio e a tela de sucesso)
   ============================================================ */
.cc-processando{
    position: fixed; inset: 0; z-index: 9999;
    display: flex; align-items: center; justify-content: center;
    padding: 24px;
    background: linear-gradient(160deg, #0f172a 0%, #1e293b 100%);
    animation: cc-proc-in .25s ease;
}
.cc-processando[hidden]{ display: none !important; }
.cc-processando-box{ max-width: 380px; width: 100%; text-align: center; color: #fff; }
.cc-processando-box h2{
    margin: 22px 0 6px; font-size: 22px; font-weight: 300; letter-spacing: -.2px; line-height: 1.25;
}
.cc-processando-sub{ margin: 0 0 26px; font-size: 14px; color: rgba(255,255,255,.62); font-weight: 300; }
.cc-processando-nota{ margin: 24px 0 0; font-size: 12px; color: rgba(255,255,255,.40); }

/* Anel de três pontos girando */
.cc-processando-anel{ display: flex; gap: 8px; justify-content: center; }
.cc-processando-anel span{
    width: 10px; height: 10px; border-radius: 50%; background: #fff;
    animation: cc-proc-pulse 1.1s ease-in-out infinite;
}
.cc-processando-anel span:nth-child(2){ animation-delay: .16s; }
.cc-processando-anel span:nth-child(3){ animation-delay: .32s; }

/* Passos: acendem em sequência, dando noção de progresso */
.cc-processando-passos{ list-style: none; margin: 0; padding: 0; text-align: left; }
.cc-processando-passos li{
    position: relative; padding: 9px 0 9px 30px;
    font-size: 14.5px; font-weight: 300; color: rgba(255,255,255,.35);
    transition: color .3s ease;
}
.cc-processando-passos li::before{
    content: ''; position: absolute; left: 6px; top: 15px;
    width: 8px; height: 8px; border-radius: 50%;
    background: rgba(255,255,255,.22); transition: background .3s ease, box-shadow .3s ease;
}
.cc-processando-passos li.is-on{ color: #fff; }
.cc-processando-passos li.is-on::before{
    background: #4ade80; box-shadow: 0 0 0 4px rgba(74,222,128,.18);
}

@keyframes cc-proc-in{ from{ opacity: 0; } to{ opacity: 1; } }
@keyframes cc-proc-pulse{
    0%, 100%{ transform: scale(.65); opacity: .4; }
    50%     { transform: scale(1);   opacity: 1; }
}
@media (prefers-reduced-motion: reduce){
    .cc-processando{ animation: none; }
    .cc-processando-anel span{ animation: none; opacity: .9; }
}

/* =====================================================================
   MODO GESTÃO — busca de Requerente já cadastrado + aviso de staff
   (elementos só aparecem quando o wizard é aberto por staff logado)
   ===================================================================== */
.cc-clipick { position: relative; margin: 0 0 18px; }
.cc-clipick-search { position: relative; margin-bottom: 0; }
.cc-cli-results {
    list-style: none; margin: 6px 0 0; padding: 6px;
    position: absolute; left: 0; right: 0; z-index: 30;
    background: var(--cc-surface); border: 1px solid var(--cc-border-2);
    border-radius: 14px; box-shadow: 0 18px 40px rgba(15, 23, 42, .14);
    max-height: 320px; overflow-y: auto;
}
.cc-cli-item {
    display: flex; flex-direction: column; gap: 2px;
    padding: 10px 12px; border-radius: 10px; cursor: pointer;
}
.cc-cli-item:hover, .cc-cli-item:focus { background: var(--cc-primary-s); }
.cc-cli-item-nome { font-weight: 600; color: var(--cc-text); font-size: 15px; }
.cc-cli-item-sub  { font-size: 12.5px; color: var(--cc-muted); }
.cc-cli-empty     { padding: 12px; font-size: 13px; color: var(--cc-muted); }

.cc-cli-chosen {
    margin-top: 12px; padding: 14px;
    background: var(--cc-primary-s); border: 1px solid #c7d7fb; border-radius: 14px;
}
.cc-cli-chip { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cc-cli-chip-nome {
    font-weight: 700; color: var(--cc-primary-d); font-size: 16px;
    display: inline-flex; align-items: center; gap: 8px;
}
.cc-cli-chip-nome::before {
    content: ""; width: 9px; height: 9px; border-radius: 50%;
    background: var(--cc-primary); display: inline-block;
}
.cc-cli-trocar {
    margin-left: auto; background: none; border: none; cursor: pointer;
    color: var(--cc-primary); font-weight: 600; font-size: 13px;
    text-decoration: underline; padding: 4px 6px;
}
.cc-cli-actions { margin-top: 12px; }

.cc-staffnote {
    display: flex; flex-direction: column; gap: 4px;
    padding: 14px 16px; margin: 4px 0 4px;
    background: var(--cc-surface-2); border: 1px dashed var(--cc-border-2);
    border-radius: 14px;
}
.cc-staffnote strong { color: var(--cc-text); font-size: 14px; }
.cc-staffnote span   { color: var(--cc-muted); font-size: 13px; }

/* =====================================================================
   Gravador de ÁUDIO do Caso (passo "O caso")
   ===================================================================== */
.cc-audio {
    margin: 4px 0 18px; padding: 16px;
    background: var(--cc-surface-2); border: 1px solid var(--cc-border);
    border-radius: 16px;
}
.cc-audio-head { display: flex; flex-direction: column; gap: 3px; margin-bottom: 12px; }
.cc-audio-head strong { color: var(--cc-text); font-size: 15px; }
.cc-audio-controls { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cc-audio-btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 10px 16px; border-radius: 12px; cursor: pointer;
    font-size: 14px; font-weight: 600; border: 1px solid var(--cc-border-2);
    background: var(--cc-surface); color: var(--cc-text-2);
    transition: transform .08s ease, background .15s ease, border-color .15s ease;
}
.cc-audio-btn:active { transform: scale(.97); }
.cc-audio-rec { border-color: #fbcfe0; color: #be123c; background: #fff1f5; }
.cc-audio-rec:hover { background: #ffe4ec; }
.cc-audio-stop { border-color: var(--cc-border-2); color: var(--cc-text); }
.cc-audio-redo { color: var(--cc-primary); border-color: #c7d7fb; background: var(--cc-primary-s); }
.cc-audio-dot {
    width: 11px; height: 11px; border-radius: 50%; background: #e11d48;
    box-shadow: 0 0 0 0 rgba(225, 29, 72, .5); animation: cc-pulse 1.4s infinite;
}
.cc-audio-square { width: 11px; height: 11px; border-radius: 2px; background: var(--cc-text); }
@keyframes cc-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(225, 29, 72, .45); }
    70%  { box-shadow: 0 0 0 8px rgba(225, 29, 72, 0); }
    100% { box-shadow: 0 0 0 0 rgba(225, 29, 72, 0); }
}
.cc-audio-time {
    font-variant-numeric: tabular-nums; font-weight: 700; color: var(--cc-text-2);
    font-size: 14px; min-width: 90px;
}
.cc-audio-bar {
    height: 6px; border-radius: 999px; background: #e5e7eb;
    margin-top: 12px; overflow: hidden;
}
.cc-audio-bar span {
    display: block; height: 100%; width: 0; border-radius: 999px;
    background: linear-gradient(90deg, #f43f5e, #e11d48); transition: width .2s linear;
}
.cc-audio-player { width: 100%; margin-top: 12px; }
.cc-audio-msg { margin: 10px 0 0; font-size: 13px; color: var(--cc-muted); }
.cc-audio-msg.is-ok  { color: var(--cc-ok); }
.cc-audio-msg.is-erro { color: var(--cc-error); }
