/* =====================================================================
 * DuoPro Portal: estilos base do portal novo (Fase 1)
 * Reaproveita as variáveis do site (assets/css/style.css).
 * ===================================================================== */

/* Aviso discreto quando um conteúdo não tem tradução no idioma atual */
.i18n-fallback {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 8px;
  border-radius: 999px;
  background: rgba(201, 164, 76, 0.14);   /* --gold com transparência */
  color: #6b5317;                          /* contraste AA sobre o fundo */
  font-size: 0.72rem;
  font-weight: 600;
  vertical-align: middle;
  white-space: nowrap;
}

/* Link "pular para o conteúdo" (acessibilidade: navegação por teclado) */
.skip-link {
  position: absolute;
  left: 12px;
  top: -48px;
  z-index: 1000;
  padding: 10px 16px;
  border-radius: var(--radius);
  background: var(--navy);
  color: var(--white);
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus { top: 12px; }

/* Foco visível em todos os controles do portal */
.pc :is(a, button, input, select, textarea):focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

/* O site público esconde o seletor de idioma em telas pequenas;
   no portal ele precisa estar sempre visível (requisito). */
.pc .lang-switch { display: flex; }
.pc .lang-switch button { min-width: 36px; min-height: 32px; }   /* alvo de toque confortável */

@media (max-width: 420px) {
  .pc .portal-topbar .logo .word span { display: none; }         /* mostra só "DuoPro" */
  .pc .portal-topbar .logo .word { font-size: 1.1rem; }
}

/* ===================== Fase 2: autenticação ===================== */
[hidden] { display: none !important; }
html.pc-guarding body { visibility: hidden; }

.alert-info { background: #eef2fa; color: var(--navy); }
.btn-outline-navy { background: transparent; border: 1px solid var(--navy); color: var(--navy); }
.btn-outline-navy:hover { background: rgba(11, 37, 69, 0.06); }
.btn-link { background: none; border: 0; color: var(--muted); font-weight: 500; text-decoration: underline; padding: 8px; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

.pc-auth-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 22px; flex-wrap: wrap; }
.pc-auth-top .logo { margin: 0 !important; color: var(--navy); }
.pc-auth-top .lang-switch button { border-color: #cfd5e2; color: var(--navy); }
.pc-auth-top .lang-switch button.active { background: var(--navy); border-color: var(--navy); color: var(--white); }
.pc-auth-foot { text-align: center; margin-top: 22px; font-size: 0.85rem; color: var(--muted); }
.pc-auth-foot a { color: var(--muted); }

.pc-form .field { margin-bottom: 16px; }
.pc-form label, .pc-lang-choice legend { display: block; font-weight: 600; font-size: 0.88rem; margin-bottom: 6px; color: var(--text); }
.pc-form input[type=email], .pc-form input[type=password], .pc-form input[type=text], .pc-code {
  width: 100%; box-sizing: border-box; padding: 12px 13px; border: 1px solid #cfd5e2; border-radius: 8px;
  font: inherit; font-size: 1rem; background: var(--white); color: var(--text);
}
.pc-form input:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px rgba(11, 37, 69, .12); }
.pc-pw-wrap { position: relative; }
.pc-pw-wrap input { padding-right: 46px !important; }
.pc-pw-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); background: none; border: 0; cursor: pointer; font-size: 1.05rem; padding: 6px 8px; border-radius: 6px; }
.pc-pw-toggle[aria-pressed=true] { background: #eef2fa; }
.pc-strength { height: 6px; background: #e8ebf2; border-radius: 99px; margin-top: 8px; overflow: hidden; }
.pc-strength span { display: block; height: 100%; width: 0; background: #b3261e; transition: width .2s, background .2s; }
.pc-strength span[data-score="1"] { background: #c9a44c; }
.pc-strength span[data-score="2"] { background: #7c9a3c; }
.pc-strength span[data-score="3"], .pc-strength span[data-score="4"] { background: #2e7d32; }
.pc-hint { color: var(--muted); font-size: 0.84rem; margin: 6px 0 0; }
.pc-note { color: var(--muted); font-size: 0.85rem; text-align: center; margin: 18px 0 0; line-height: 1.5; }
.pc-center { text-align: center; margin: 14px 0 0; font-size: 0.9rem; }
.pc-center a { color: var(--navy); }
.pc-code { text-align: center; letter-spacing: .5em; font-size: 1.4rem !important; font-variant-numeric: tabular-nums; margin-bottom: 14px; }

.pc-lang-choice { border: 1px solid #e3e6ee; border-radius: 10px; padding: 12px 14px; margin: 0 0 18px; display: flex; flex-wrap: wrap; gap: 8px 18px; }
.pc-lang-choice legend { padding: 0 4px; }
.pc-lang-choice label { display: flex; align-items: center; gap: 6px; font-size: 0.93rem; cursor: pointer; }

.pc-steps { padding-left: 20px; margin: 0 0 16px; color: var(--text); font-size: 0.93rem; line-height: 1.5; }
.pc-steps li { margin-bottom: 10px; }
.pc-qr { background: var(--white); border: 1px solid #e3e6ee; border-radius: 12px; padding: 10px; width: max-content; margin: 10px 0; }
.pc-qr img { display: block; width: 180px; height: 180px; }
.pc-secret summary { cursor: pointer; color: var(--navy); font-size: 0.86rem; }
.pc-secret code { display: block; margin-top: 6px; padding: 8px 10px; background: var(--cream); border-radius: 8px; word-break: break-all; font-size: 0.92rem; }

.pc-terms { list-style: none; padding: 0; margin: 0 0 18px; }
.pc-terms li { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border: 1px solid #e3e6ee; border-radius: 10px; margin-bottom: 10px; }
.pc-terms input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--navy); flex-shrink: 0; }
.pc-terms label { font-weight: 500 !important; margin: 0 !important; }
.pc-terms a { color: var(--navy); font-weight: 600; }
.pc-terms .pc-hint { display: block; margin-top: 2px; }

.pc-modal-backdrop { position: fixed; inset: 0; background: rgba(6, 23, 48, .55); display: flex; align-items: center; justify-content: center; padding: 16px; z-index: 2000; }
.pc-modal { background: var(--white); border-radius: 14px; padding: 22px; width: 100%; max-width: 420px; box-shadow: 0 20px 50px rgba(0,0,0,.25); max-height: calc(100vh - 32px); overflow: auto; color: var(--text); }
.pc-modal-wide { max-width: 520px; }
.pc-modal h2 { font-family: var(--font-heading); color: var(--navy-dark); font-size: 1.2rem; margin: 0 0 10px; }
.pc-modal h3 { font-size: 1rem; margin: 0 0 6px; color: var(--navy-dark); }
.pc-modal-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.pc-close { background: none; border: 0; font-size: 1.6rem; line-height: 1; cursor: pointer; color: var(--muted); padding: 4px 8px; border-radius: 6px; }
.pc-modal-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; margin-top: 16px; }
.pc-sec-block { border-top: 1px solid #eef0f5; padding: 16px 0 6px; }
.pc-sec-block:first-child { border-top: 0; padding-top: 6px; }
.pc-status { font-weight: 600; margin: 8px 0; color: var(--muted); }
.pc-status.pc-ok { color: #2e7d32; }
.pc-sec-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.pc-toast { position: fixed; top: 18px; right: 18px; left: 18px; max-width: 380px; margin-left: auto; z-index: 2100; box-shadow: 0 6px 20px rgba(0,0,0,.15); }

/* Páginas que não carregam style.css (ex.: admin.html): variáveis e botões mínimos */
:root {
  --navy: #0b2545; --navy-light: #13315c; --navy-dark: #061730;
  --gold: #c9a44c; --gold-light: #e3c878; --cream: #f7f5f0;
  --text: #1c2530; --muted: #5b6472; --white: #ffffff; --radius: 10px;
  --font-heading: "Lora", Georgia, serif;
}
.pc-modal .btn { display: inline-block; padding: 11px 20px; border-radius: var(--radius); font-weight: 600; font-size: 0.95rem; cursor: pointer; border: 1px solid transparent; font-family: inherit; }
.pc-modal .btn-navy { background: var(--navy); color: var(--white); }
.pc-modal .btn-block { width: 100%; text-align: center; }
.pc-modal .alert { padding: 12px 14px; border-radius: 8px; font-size: 0.88rem; margin-bottom: 14px; }
.pc-modal .alert-error { background: #fdecea; color: #b3261e; }
.pc-modal .alert-success { background: #e8f5e9; color: #2e7d32; }
.pc-modal .field { margin-bottom: 14px; }

/* =====================================================================
 * Cadastro de novos clientes (wizard) e CAPTCHA
 * ===================================================================== */
.pc-form input[type=tel], .pc-form input[type=date], .pc-form select {
  width: 100%; box-sizing: border-box; padding: 12px 13px; border: 1px solid #cfd5e2; border-radius: 8px;
  font: inherit; font-size: 1rem; background: var(--white); color: var(--text);
}
.pc-form select:focus, .pc-form input[type=tel]:focus, .pc-form input[type=date]:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px rgba(11, 37, 69, .12); }

.pc-signup-cta { margin-top: 18px; padding-top: 14px; border-top: 1px solid #eef0f5; }
.pc-signup-cta .pc-note { margin: 0 0 10px; }
.su-captcha, .su-captcha-login { display: flex; flex-direction: column; align-items: center; margin: 4px 0 16px; min-height: 0; }
.su-captcha-login:empty { display: none; }

.su-progress { margin: 0 0 22px; }
.su-bar { height: 8px; background: #e8ebf2; border-radius: 99px; overflow: hidden; }
.su-bar span { display: block; height: 100%; background: var(--navy); border-radius: 99px; transition: width .25s ease; }
.su-steps { list-style: none; display: flex; justify-content: space-between; gap: 4px; margin: 10px 0 0; padding: 0; }
.su-steps li { display: flex; flex-direction: column; align-items: center; gap: 4px; flex: 1; min-width: 0; font-size: .74rem; color: var(--muted); text-align: center; }
.su-dot { width: 24px; height: 24px; border-radius: 50%; border: 1px solid #cfd5e2; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: .78rem; background: var(--white); }
.su-steps li.current { color: var(--navy); font-weight: 700; }
.su-steps li.current .su-dot { background: var(--navy); border-color: var(--navy); color: var(--white); }
.su-steps li.done .su-dot { background: #2e7d32; border-color: #2e7d32; color: var(--white); }
.su-lbl { overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.su-count { text-align: center; margin: 8px 0 0; }
@media (max-width: 520px) { .su-steps li:not(.current) .su-lbl { display: none; } }

.su-h2 { font-size: 1rem; margin: 0 0 12px; color: var(--navy-dark); }
.su-note { margin: 0 0 16px; }
.su-types { display: grid; gap: 12px; margin: 0 0 18px; }
.su-type { text-align: left; border: 2px solid #e3e6ee; background: var(--white); border-radius: 12px; padding: 16px 18px; cursor: pointer; font: inherit; color: var(--text); display: flex; flex-direction: column; gap: 4px; transition: border-color .15s, box-shadow .15s; }
.su-type strong { color: var(--navy-dark); font-size: 1.05rem; }
.su-type span { color: var(--muted); font-size: .88rem; line-height: 1.45; }
.su-type:hover, .su-type:focus-visible { border-color: var(--navy); outline: none; box-shadow: 0 0 0 3px rgba(11, 37, 69, .1); }
.su-type.selected { border-color: var(--navy); background: #f4f7fc; }

.su-services { border: 0; padding: 0; margin: 0 0 16px; display: grid; gap: 8px; }
.su-svc { display: flex; align-items: center; gap: 10px; border: 1px solid #e3e6ee; border-radius: 10px; padding: 12px 14px; cursor: pointer; font-weight: 500 !important; margin: 0 !important; }
.su-svc input { width: 18px; height: 18px; accent-color: var(--navy); flex-shrink: 0; }
.su-svc:has(input:checked) { border-color: var(--navy); background: #f4f7fc; }

.su-actions { display: flex; gap: 10px; justify-content: space-between; margin-top: 18px; }
.su-actions .btn { flex: 1; }
.su-actions.su-col { flex-direction: column; align-items: stretch; margin-top: 8px; }
.su-center { text-align: center; }

/* Fila "Novos clientes" (equipe) */
.su-chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 16px; }
.su-chip { border: 1px solid #cfd5e2; background: var(--white); border-radius: 999px; padding: 7px 14px; font: inherit; font-size: .88rem; font-weight: 600; color: var(--navy); cursor: pointer; }
.su-chip.active { background: var(--navy); border-color: var(--navy); color: var(--white); }
.su-card { display: flex; gap: 14px; align-items: flex-start; flex-wrap: wrap; background: var(--white); border: 1px solid #e3e6ee; border-radius: 12px; padding: 14px 16px; margin-bottom: 10px; list-style: none; }
.su-card-main { flex: 1 1 260px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.su-card-actions { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.su-st-novo { background: #fff4d6; color: #7a5a00; }
.su-st-em_analise { background: #e3eefc; color: #174a8b; }
.su-st-ativo { background: #d8f3dc; color: #1e6b3a; }
.crm-origin-site { background: #e8f5e9; color: #1e6b3a; }
.crm-origin-convite { background: #eef0f5; color: #3d4757; }
