/* =========================================================
   Chico Filiados — painel do filiado (visual 2026)
   Tudo escopado em .chico-v2 para não afetar cadastro/login
   nem o tema. Sobrescreve as regras antigas do style.css.
   ========================================================= */

.chico-v2 {
    --cf-fundo:        #f4f2ed;
    --cf-card:         #ffffff;
    --cf-borda:        #e4e0d6;
    --cf-borda-linha:  #ebe8e1;
    --cf-borda-campo:  #d9d5cb;
    --cf-texto:        #1b2530;
    --cf-suave:        #5b6570;
    --cf-marinho:      #1a3a5c;
    --cf-azul:         #2271b1;
    --cf-ok-fundo:     #e7f3ea;  --cf-ok:     #1d6431;
    --cf-aviso-fundo:  #fbefd9;  --cf-aviso:  #7d4a00;
    --cf-erro-fundo:   #fdecec;  --cf-erro:   #9b1c1c;
    --cf-info-fundo:   #e3eef9;  --cf-info:   #1a4f86;
    --cf-neutro-fundo: #efede8;  --cf-neutro: #4d555e;
    --cf-raio:         12px;

    max-width: 1120px;
    margin: 0 auto;
    color: var(--cf-texto);
    font-size: 15px;
    line-height: 1.45;
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.chico-v2 *, .chico-v2 *::before, .chico-v2 *::after { box-sizing: border-box; }
.chico-v2 h2, .chico-v2 h3, .chico-v2 p { margin: 0; }
.chico-v2 a { color: var(--cf-azul); }

.chico-v2 .cf-sr {
    position: absolute !important; width: 1px; height: 1px; overflow: hidden;
    clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---------- Topo ---------- */
.chico-v2 .cf-topo { display: flex; flex-direction: column; gap: 6px; }
.chico-v2 .cf-topo__titulo { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.chico-v2 .cf-topo h2 { font-size: 30px; font-weight: 800; color: var(--cf-marinho); letter-spacing: -0.02em; line-height: 1.15; }
.chico-v2 .cf-topo p { color: var(--cf-suave); }
.chico-v2 .cf-selo-vip {
    display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border-radius: 999px;
    background: #f3e3a8; color: #5c4300; font-size: 12px; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase;
}

/* ---------- Cards ---------- */
.chico-v2 .cf-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.chico-v2 .cf-card {
    display: flex; flex-direction: column; gap: 10px; padding: 20px;
    background: var(--cf-card); border: 1px solid var(--cf-borda); border-radius: var(--cf-raio);
}
.chico-v2 .cf-card--saldo { background: var(--cf-marinho); border-color: var(--cf-marinho); color: #fff; }
.chico-v2 .cf-card__rotulo { display: block; font-size: 13px; font-weight: 600; color: var(--cf-suave); }
.chico-v2 .cf-card--saldo .cf-card__rotulo,
.chico-v2 .cf-card--saldo .cf-card__sub { color: #c9d6e4; }
.chico-v2 .cf-card__valor { font-size: 34px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; }
.chico-v2 .cf-card__valor--negativo { color: #ffc9c9; }
.chico-v2 .cf-card__sub { font-size: 13px; color: var(--cf-suave); }
.chico-v2 .cf-card__rodape { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: auto; }

.chico-v2 .cf-cupom { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.chico-v2 .cf-cupom__codigo { font-size: 26px; font-weight: 800; letter-spacing: 0.04em; word-break: break-all; }
.chico-v2 .cf-sugestao { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.chico-v2 .cf-sugestao input {
    height: 40px; padding: 0 12px; border: 1px solid var(--cf-borda-campo); border-radius: 8px;
    font: inherit; font-size: 14px; text-transform: uppercase; width: 170px; max-width: 100%;
}
.chico-v2 .cf-sugestao .cf-card__sub { flex-basis: 100%; }

.chico-v2 .cf-card--resumo { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.chico-v2 .cf-mini { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.chico-v2 .cf-mini__valor { font-size: 22px; font-weight: 800; line-height: 1.15; }
.chico-v2 .cf-mini .cf-card__sub { font-size: 12px; }

/* ---------- Botões ---------- */
.chico-v2 .cf-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    min-height: 40px; padding: 0 16px; border-radius: 8px; border: 1px solid transparent;
    font: inherit; font-size: 14px; font-weight: 700; line-height: 1; cursor: pointer; text-decoration: none;
    white-space: nowrap; transition: filter .15s, background .15s;
}
.chico-v2 .cf-btn:hover { filter: brightness(1.08); }
.chico-v2 .cf-btn:disabled, .chico-v2 .cf-btn[disabled] {
    background: #e9e6df !important; border-color: #c9c5bb !important; color: #6b7179 !important; cursor: not-allowed; filter: none;
}
.chico-v2 .cf-btn:focus-visible, .chico-v2 .cf-chip:focus-visible, .chico-v2 .chico-aba:focus-visible, .chico-v2 .cf-link:focus-visible {
    outline: 3px solid rgba(34, 113, 177, .45); outline-offset: 2px;
}
.chico-v2 .cf-btn--escuro   { background: var(--cf-marinho); border-color: var(--cf-marinho); color: #fff; }
.chico-v2 .cf-btn--azul     { background: var(--cf-azul); border-color: var(--cf-azul); color: #fff; }
.chico-v2 .cf-btn--claro    { background: #fff; border-color: #fff; color: var(--cf-marinho); }
.chico-v2 .cf-btn--contorno { background: #fff; border-color: var(--cf-borda-campo); color: var(--cf-texto); }
.chico-v2 .cf-btn--whats    { background: #1f8a4c; border-color: #1f8a4c; color: #fff; align-self: flex-start; }
.chico-v2 .cf-btn--grande   { min-height: 48px; padding: 0 24px; font-size: 15px; }
.chico-v2 .chico-btn-copiar--copiado { background: var(--cf-ok) !important; border-color: var(--cf-ok) !important; }
.chico-v2 .cf-link {
    padding: 0; border: 0; background: none; color: var(--cf-azul); font: inherit; font-size: 14px; font-weight: 600;
    cursor: pointer; text-decoration: underline; text-underline-offset: 2px;
}

/* ---------- Abas ---------- */
.chico-v2 .chico-abas {
    display: flex; gap: 28px; flex-wrap: nowrap; overflow-x: auto; margin: 0;
    border-bottom: 1px solid #dcd8ce; scrollbar-width: none;
}
.chico-v2 .chico-abas::-webkit-scrollbar { display: none; }
.chico-v2 .chico-aba {
    height: 48px; padding: 0 4px; margin: 0 0 -1px; border: 0; border-bottom: 2px solid transparent; border-radius: 0;
    background: transparent; color: var(--cf-suave); font: inherit; font-size: 15px; font-weight: 600; white-space: nowrap; cursor: pointer;
}
.chico-v2 .chico-aba:hover { background: transparent; color: var(--cf-marinho); }
.chico-v2 .chico-aba--ativa { color: var(--cf-marinho); border-bottom-color: var(--cf-marinho); font-weight: 700; }
.chico-v2 .chico-aba-conteudo { display: none; flex-direction: column; gap: 16px; }
.chico-v2 .chico-aba-conteudo--ativa { display: flex; }

/* ---------- Blocos e listas ---------- */
.chico-v2 .cf-bloco {
    display: flex; flex-direction: column; gap: 10px; padding: 20px;
    background: var(--cf-card); border: 1px solid var(--cf-borda); border-radius: var(--cf-raio);
}
.chico-v2 .cf-bloco h3 { font-size: 16px; font-weight: 700; color: var(--cf-texto); }
.chico-v2 .cf-bloco p { color: var(--cf-suave); font-size: 14px; }
.chico-v2 .cf-bloco .cf-btn { align-self: flex-start; }
.chico-v2 .cf-bloco--lista { padding: 0; gap: 0; overflow: hidden; }
.chico-v2 .cf-bloco--erro { background: var(--cf-erro-fundo); border-color: #f2c4c4; }
.chico-v2 .cf-bloco--erro h3 { color: var(--cf-erro); }
.chico-v2 .cf-bloco__cabeca {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 16px 20px; border-bottom: 1px solid var(--cf-borda-linha);
}

.chico-v2 .cf-inicio { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.chico-v2 .cf-coluna { display: flex; flex-direction: column; gap: 16px; }

.chico-v2 .cf-linha {
    display: flex; align-items: center; gap: 16px; padding: 14px 20px; border-bottom: 1px solid var(--cf-borda-linha);
}
.chico-v2 .cf-linha:last-child { border-bottom: 0; }
.chico-v2 .cf-linha--topo { align-items: flex-start; }
.chico-v2 .cf-linha__principal { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1 1 auto; }
.chico-v2 .cf-linha__titulo { font-size: 15px; font-weight: 700; }
.chico-v2 .cf-linha__sub { font-size: 13px; color: var(--cf-suave); overflow-wrap: anywhere; }
.chico-v2 .cf-linha__sub--menor { font-size: 12px; }
.chico-v2 .cf-linha__lado { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex-shrink: 0; }
.chico-v2 .cf-linha__valor { font-size: 15px; font-weight: 700; }
.chico-v2 .cf-riscado { color: #8a9097; text-decoration: line-through; }

.chico-v2 .cf-vazio { padding: 40px 24px; text-align: center; display: flex; flex-direction: column; gap: 6px; }
.chico-v2 .cf-vazio p { color: var(--cf-suave); }
.chico-v2 .cf-nota { font-size: 13px; color: var(--cf-suave); line-height: 1.5; }

/* ---------- Selos (pills) ---------- */
.chico-v2 .cf-pill {
    display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px;
    font-size: 12px; font-weight: 600; white-space: nowrap; line-height: 1.4;
}
.chico-v2 .cf-pill--ok     { background: var(--cf-ok-fundo);     color: var(--cf-ok); }
.chico-v2 .cf-pill--aviso  { background: var(--cf-aviso-fundo);  color: var(--cf-aviso); }
.chico-v2 .cf-pill--erro   { background: var(--cf-erro-fundo);   color: var(--cf-erro); }
.chico-v2 .cf-pill--info   { background: var(--cf-info-fundo);   color: var(--cf-info); }
.chico-v2 .cf-pill--neutro { background: var(--cf-neutro-fundo); color: var(--cf-neutro); }

/* ---------- Chips de filtro ---------- */
.chico-v2 .cf-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chico-v2 .cf-chip {
    display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: 999px;
    border: 1px solid var(--cf-borda-campo); background: #fff; color: var(--cf-texto);
    font: inherit; font-size: 14px; font-weight: 500; white-space: nowrap; cursor: pointer;
}
.chico-v2 .cf-chip span { font-size: 12px; color: var(--cf-suave); }
.chico-v2 .cf-chip--ativo { background: var(--cf-marinho); border-color: var(--cf-marinho); color: #fff; font-weight: 600; }
.chico-v2 .cf-chip--ativo span { color: #fff; opacity: .8; }

.chico-v2 .cf-barra { height: 10px; background: var(--cf-borda-linha); border-radius: 999px; overflow: hidden; }
.chico-v2 .cf-barra span { display: block; height: 100%; background: var(--cf-azul); border-radius: 999px; }

/* ---------- Gerar links ---------- */
.chico-v2 .cf-links-filtros { padding: 16px; gap: 12px; }
.chico-v2 .cf-busca {
    display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 14px;
    border: 1px solid var(--cf-borda-campo); border-radius: 8px; background: #fff; color: var(--cf-suave);
}
.chico-v2 .cf-busca:focus-within { border-color: var(--cf-azul); box-shadow: 0 0 0 3px rgba(34, 113, 177, .15); }
.chico-v2 .cf-busca input {
    flex: 1 1 auto; min-width: 0; height: 100%; border: 0 !important; outline: none; background: transparent;
    box-shadow: none !important; padding: 0; font: inherit; font-size: 15px; color: var(--cf-texto);
}
.chico-v2 .cf-links-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.chico-v2 #chico-links-total { font-size: 14px; font-weight: 600; }

.chico-v2 .cf-produto { border-bottom: 1px solid var(--cf-borda-linha); background: #fff; }
.chico-v2 .cf-produto:last-child { border-bottom: 0; }
.chico-v2 .cf-produto--aberto { background: #f8f7f3; }
.chico-v2 .cf-produto__linha { display: flex; align-items: center; gap: 16px; padding: 12px 20px; }
.chico-v2 .cf-produto__img {
    width: 48px; height: 48px; flex-shrink: 0; border-radius: 8px; object-fit: cover; background: #efede8;
}
.chico-v2 .cf-produto__info { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.chico-v2 .cf-produto__nome { font-size: 15px; font-weight: 600; }
.chico-v2 .cf-produto__cat { font-size: 13px; color: var(--cf-suave); }
.chico-v2 .cf-produto__gerar { flex-shrink: 0; }
.chico-v2 .cf-produto--aberto .cf-produto__gerar { background: #fff; border-color: var(--cf-borda-campo); color: var(--cf-texto); }
.chico-v2 .cf-produto__link { display: none; gap: 8px; padding: 0 20px 16px 84px; }
.chico-v2 .cf-produto--aberto .cf-produto__link { display: flex; }
.chico-v2 .cf-produto__url {
    flex: 1 1 auto; min-width: 0; height: 40px; padding: 0 12px; border: 1px solid var(--cf-borda-campo);
    border-radius: 8px; background: #fff; font: inherit; font-size: 13px; color: var(--cf-texto);
}

/* ---------- Resgate ---------- */
.chico-v2 .cf-resgate { gap: 18px; padding: 24px; }
.chico-v2 .cf-resgate h3 { font-size: 18px; }
.chico-v2 .chico-form { margin: 0; max-width: none; width: 100%; padding: 0; background: none; border: 0; box-shadow: none; display: flex; flex-direction: column; gap: 16px; }

.chico-v2 .cf-metodos { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.chico-v2 .chico-opcao-card {
    min-width: 0; align-items: flex-start !important; text-align: left; gap: 4px; padding: 16px;
    border: 2px solid var(--cf-borda); border-radius: 10px; background: #fff; margin: 0;
}
.chico-v2 .chico-opcao-card:hover { border-color: #9fb3c8; background: #fff; }
.chico-v2 .chico-opcao-card--ativa { border-color: var(--cf-marinho) !important; background: #f3f6fa !important; }
.chico-v2 .chico-opcao-card input[type="radio"] { position: absolute; opacity: 0; pointer-events: none; display: block; }
.chico-v2 .chico-opcao-card:focus-within { outline: 3px solid rgba(34, 113, 177, .45); outline-offset: 2px; }
.chico-v2 .chico-opcao-titulo { font-size: 16px; font-weight: 700; color: var(--cf-texto); margin: 0; }
.chico-v2 .chico-opcao-desc { font-size: 14px; color: var(--cf-texto); }
.chico-v2 .chico-opcao-aviso { font-size: 13px; color: var(--cf-suave); font-weight: 600; margin: 0; }
.chico-v2 .chico-opcao-aviso.cf-texto-aviso { color: var(--cf-aviso); }
.chico-v2 .chico-opcao-aviso.cf-texto-ok { color: var(--cf-ok); }

.chico-v2 .chico-preview-resgate { display: block; margin: 0; }
.chico-v2 .chico-preview-item {
    display: none; flex-direction: row; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 4px 12px;
    padding: 14px 16px; border: 0; border-radius: 10px; background: var(--cf-fundo); text-align: left; min-width: 0;
}
.chico-v2 .chico-preview-item--ativo { display: flex; background: var(--cf-fundo); }
.chico-v2 .chico-preview-label { font-size: 13px; font-weight: 600; color: var(--cf-suave); text-transform: none; letter-spacing: 0; margin: 0; }
.chico-v2 .chico-preview-valor { font-size: 26px; font-weight: 800; color: var(--cf-marinho); margin-left: auto; }
.chico-v2 .chico-preview-valor--bonus { color: var(--cf-ok); }
.chico-v2 .chico-preview-bonus {
    order: 3; flex-basis: 100%; margin: 0; padding: 0; background: none !important; color: var(--cf-suave) !important;
    font-size: 12px; font-weight: 600; text-align: right;
}

.chico-v2 .cf-aviso { display: flex; flex-direction: column; gap: 8px; padding: 16px; border-radius: 10px; border: 1px solid; font-size: 14px; line-height: 1.5; }
.chico-v2 .cf-aviso > strong:first-child { font-size: 15px; }
.chico-v2 .cf-aviso--atencao { background: #fdf6e8; border-color: #edd6a6; color: #4d3a1a; }
.chico-v2 .cf-aviso--atencao > strong:first-child { color: #6a3f00; }
.chico-v2 .cf-aviso--info { background: #eef4fb; border-color: #c4d7ee; color: #1f3550; }
.chico-v2 .cf-aviso--erro { background: var(--cf-erro-fundo); border-color: #f2c4c4; color: #5a1a1a; }
.chico-v2 .cf-aviso--erro > strong:first-child { color: var(--cf-erro); }
.chico-v2 .cf-check { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; background: #fff; border-radius: 8px; cursor: pointer; font-weight: 400; }
.chico-v2 .cf-check input { width: 20px; height: 20px; margin: 1px 0 0; flex-shrink: 0; }

.chico-v2 .chico-aviso { margin: 0; border-radius: 10px; }

.chico-v2 .chico-form-grupo { margin: 0; display: flex; flex-direction: column; gap: 6px; }
.chico-v2 .chico-form-grupo label { font-size: 13px; font-weight: 600; color: var(--cf-texto); margin: 0; }
.chico-v2 .chico-form-grupo small { font-size: 12px; color: var(--cf-suave); }
.chico-v2 .chico-label-info { font-weight: 400; color: var(--cf-suave); }
.chico-v2 .chico-form-grupo input[type="text"],
.chico-v2 .chico-form-grupo input[type="number"] {
    height: 44px; padding: 0 12px; border: 1px solid var(--cf-borda-campo); border-radius: 8px; font: inherit; font-size: 15px; background: #fff; width: 100%;
}
.chico-v2 .chico-input-prefix { border: 1px solid var(--cf-borda-campo); border-radius: 8px; background: #fff; }
.chico-v2 .chico-input-prefix span { padding: 0 12px; height: 44px; display: flex; align-items: center; background: var(--cf-fundo); border-right: 1px solid var(--cf-borda-campo); font-size: 15px; }
.chico-v2 .chico-input-prefix input { border: 0 !important; box-shadow: none !important; height: 44px; border-radius: 0; }
.chico-v2 .cf-campos-pix { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }

.chico-v2 .cf-conversao { display: flex; flex-direction: column; gap: 12px; padding: 16px; border-radius: 10px; background: var(--cf-ok-fundo); }
.chico-v2 .cf-conversao__valores { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.chico-v2 .cf-conversao__valores > div { display: flex; flex-direction: column; gap: 2px; }
.chico-v2 .cf-conversao__de { font-size: 20px; font-weight: 700; color: var(--cf-texto); }
.chico-v2 .cf-conversao__para { font-size: 26px; font-weight: 800; color: var(--cf-ok); }
.chico-v2 .cf-conversao__seta { font-size: 20px; font-weight: 700; color: var(--cf-ok); padding-bottom: 4px; }

.chico-v2 #chico-btn-resgatar { align-self: flex-start; }

/* ---------- Celular ---------- */
@media (max-width: 900px) {
    .chico-v2 .cf-cards { grid-template-columns: minmax(0, 1fr); }
    .chico-v2 .cf-inicio { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
    .chico-v2 { font-size: 14px; gap: 16px; }
    .chico-v2 .cf-topo h2 { font-size: 24px; }
    .chico-v2 .cf-card__valor { font-size: 30px; }
    .chico-v2 .chico-abas { gap: 20px; }
    .chico-v2 .cf-chips { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
    .chico-v2 .cf-chips::-webkit-scrollbar { display: none; }
    .chico-v2 .cf-linha, .chico-v2 .cf-bloco__cabeca { padding-left: 16px; padding-right: 16px; }
    .chico-v2 .cf-resgate { padding: 16px; }
    .chico-v2 .cf-campos-pix { grid-template-columns: minmax(0, 1fr); }
    .chico-v2 #chico-btn-resgatar { align-self: stretch; }

    /* Produto: nome e estoque empilhados, botão à direita */
    .chico-v2 .cf-produto__linha {
        display: grid; grid-template-columns: 48px minmax(0, 1fr) auto;
        grid-template-areas: "img info btn" "img pill btn";
        column-gap: 12px; row-gap: 6px; padding: 12px 16px;
    }
    .chico-v2 .cf-produto__img { grid-area: img; align-self: start; }
    .chico-v2 .cf-produto__info { grid-area: info; }
    .chico-v2 .cf-produto__linha .cf-pill { grid-area: pill; justify-self: start; }
    .chico-v2 .cf-produto__gerar { grid-area: btn; }
    .chico-v2 .cf-produto__nome { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .chico-v2 .cf-produto__link { padding: 0 16px 14px; flex-wrap: wrap; }
    .chico-v2 .cf-produto__link .cf-btn { flex: 1 1 auto; }
}
