/* Portal de admissão — v1.4.0 */
.vcm-portal [hidden] { display: none !important; }
.vcm-portal {
  --ink: #14231d; --muted: #5b6b63; --line: #dce5e0; --surface: #ffffff; --surface-soft: #f3f7f5;
  --field: #ffffff; --page: #f5f8f6; --brand: #1d6b54; --on-brand: #ffffff;
  --amber: #805812; --amber-soft: #fff3d9; --red: #982f27; --red-soft: #fcebe9;
  --shadow: 0 8px 28px rgba(20, 35, 29, .07);
  max-width: 1120px; margin: 0 auto; padding: 20px 20px 64px; font-size: 15.5px; line-height: 1.5;
  color: var(--ink); position: relative; color-scheme: light;
}
html[data-theme="dark"] .vcm-portal {
  --ink: #edf5f1; --muted: #a9bbb2; --line: #29443a; --surface: #10271f; --surface-soft: #18332a;
  --field: #0c211a; --page: #081a14; --on-brand: #ffffff; --amber: #f3c66d; --amber-soft: #352a15;
  --red: #ffaaa3; --red-soft: #3d211f; --shadow: 0 10px 32px rgba(0, 0, 0, .24); color-scheme: dark;
}
.vcm-portal * { box-sizing: border-box; }
.vcm-portal h1 { font-size: clamp(25px, 3vw, 34px); margin: 0; line-height: 1.15; color: var(--ink); }
.vcm-portal h2 { font-size: clamp(19px, 2vw, 24px); margin: 0; display: flex; align-items: center; gap: 10px; color: var(--ink); }
.vcm-portal h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--brand); margin: 26px 0 10px; }
html[data-theme="dark"] .vcm-portal h3 { color: #79d6b6; }
.vcm-p-muted { color: var(--muted); font-size: 14px; }
.vcm-p-kicker { text-transform: uppercase; letter-spacing: .09em; font-size: 11px; color: var(--brand); font-weight: 800; }
html[data-theme="dark"] .vcm-p-kicker { color: #79d6b6; }

/* Cabeçalho compacto */
.vcm-p-header { display: grid; grid-template-columns: minmax(0, 1fr) minmax(290px, 420px); align-items: center; gap: 28px; padding: 18px 0 20px; }
.vcm-p-header-brand { display: flex; align-items: center; gap: 16px; min-width: 0; }
.vcm-p-heading { min-width: 0; }
.vcm-p-logo { max-height: 56px; max-width: 160px; border-radius: 10px; background: var(--surface); padding: 5px; border: 1px solid var(--line); object-fit: contain; }
.vcm-p-header p { color: var(--muted); margin: 5px 0 0; overflow-wrap: anywhere; }
.vcm-p-progress-wrap { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.vcm-p-progress-summary { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; }
.vcm-p-progress-summary strong { color: var(--ink); font-size: 14px; white-space: nowrap; }
.vcm-p-progress { background: var(--surface-soft); border: 1px solid var(--line); border-radius: 99px; height: 10px; overflow: hidden; }
.vcm-p-progress i { display: block; height: 100%; border-radius: 99px; background: var(--brand); transition: width .4s; }
.vcm-p-progress-label { color: var(--muted); text-align: right; }

/* Etapas */
.vcm-p-steps { position: sticky; top: 0; z-index: 20; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; background: color-mix(in srgb, var(--page) 92%, transparent); backdrop-filter: blur(10px); padding: 10px 0; margin-bottom: 10px; }
.vcm-p-steps a { display: flex; align-items: center; gap: 9px; justify-content: center; min-height: 48px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 12px; text-decoration: none; color: var(--muted); font-size: 13px; font-weight: 700; background: var(--surface); }
.vcm-p-steps a i { font-style: normal; width: 25px; height: 25px; border-radius: 50%; background: var(--surface-soft); display: inline-flex; align-items: center; justify-content: center; font-size: 12px; flex: none; }
.vcm-p-steps a.is-current { border-color: var(--brand); color: var(--brand); }
.vcm-p-steps a.is-current i { background: var(--brand); color: var(--on-brand); }
.vcm-p-steps a.is-done { color: var(--brand); }
.vcm-p-steps a.is-done i { background: color-mix(in srgb, var(--brand) 18%, var(--surface)); color: var(--brand); }
html[data-theme="dark"] .vcm-p-steps a.is-current, html[data-theme="dark"] .vcm-p-steps a.is-done { color: #79d6b6; }

/* Cartões */
.vcm-p-card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: clamp(20px, 3vw, 32px); margin: 16px 0; box-shadow: var(--shadow); scroll-margin-top: 82px; color: var(--ink); }
.vcm-p-card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.vcm-p-num { font-style: normal; width: 34px; height: 34px; border-radius: 50%; background: var(--brand); color: var(--on-brand); display: inline-flex; align-items: center; justify-content: center; font-size: 14px; flex: none; }
.vcm-p-num.is-done { background: color-mix(in srgb, var(--brand) 18%, var(--surface)); color: var(--brand); }
.vcm-p-chip { font-size: 12px; font-weight: 700; background: var(--surface-soft); color: var(--muted); border: 1px solid var(--line); border-radius: 99px; padding: 5px 12px; }
.vcm-p-chip.is-ok { background: color-mix(in srgb, var(--brand) 14%, var(--surface)); color: var(--brand); }
.vcm-p-gate { text-align: center; margin-top: 40px; padding: 40px 26px; }
.vcm-p-gate p { color: var(--muted); max-width: 520px; margin: 8px auto 18px; }

/* Alertas */
.vcm-p-alert { border: 1px solid transparent; border-radius: 12px; padding: 13px 15px; font-size: 14px; margin: 12px 0; }
.vcm-p-alert.is-ok { background: color-mix(in srgb, var(--brand) 13%, var(--surface)); color: var(--brand); border-color: color-mix(in srgb, var(--brand) 30%, var(--line)); }
.vcm-p-alert.is-warn { background: var(--amber-soft); color: var(--amber); border-color: color-mix(in srgb, var(--amber) 25%, transparent); }
.vcm-p-alert.is-err { background: var(--red-soft); color: var(--red); border-color: color-mix(in srgb, var(--red) 25%, transparent); }
.vcm-p-toast { position: fixed; left: 50%; bottom: 22px; transform: translate(-50%, 20px); background: var(--ink); color: var(--surface); padding: 11px 18px; border-radius: 12px; font-size: 14px; opacity: 0; transition: all .3s; z-index: 999; max-width: 90vw; text-align: center; }
.vcm-p-toast.is-show { opacity: 1; transform: translate(-50%, 0); }
.vcm-p-toast.is-err { background: var(--red); color: #fff; }

/* Formulário */
.vcm-p-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 18px; }
.vcm-p-form label { display: block; font-size: 13px; font-weight: 700; color: var(--ink); }
.vcm-p-form input, .vcm-p-form select { width: 100%; min-height: 46px; margin-top: 5px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; font-size: 15px; background: var(--field); color: var(--ink); box-shadow: none; }
.vcm-p-form input::placeholder { color: var(--muted); opacity: .8; }
.vcm-p-form input:focus, .vcm-p-form select:focus, .vcm-p-btn:focus-visible, .vcm-p-btn-link:focus-visible, .vcm-p-steps a:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 35%, transparent); outline-offset: 2px; border-color: var(--brand); }
.vcm-p-invalid { border-color: var(--red) !important; }
.vcm-p-cpf-hint { color: var(--red); font-weight: 400; }

/* Assinatura e consentimento */
.vcm-p-signature { border: 1px dashed var(--line); background: var(--surface-soft); border-radius: 12px; padding: 14px; text-align: center; }
.vcm-p-signature canvas { width: 100%; max-width: 700px; height: auto; border: 1px solid var(--line); border-radius: 10px; touch-action: none; background: var(--field); }
.vcm-p-btn-link { background: none; border: 0; color: var(--brand); font-weight: 700; cursor: pointer; text-decoration: none; font-size: 14px; padding: 7px 0; display: inline-block; }
html[data-theme="dark"] .vcm-p-btn-link { color: #79d6b6; }
.vcm-p-consent { display: flex !important; gap: 11px; align-items: flex-start; background: var(--surface-soft); border: 1px solid var(--line); border-radius: 12px; padding: 14px; margin: 20px 0; font-weight: 400 !important; font-size: 13.5px !important; color: var(--muted); }
.vcm-p-consent input { width: auto !important; min-height: auto !important; margin-top: 3px !important; accent-color: var(--brand); }

/* Botões */
.vcm-p-btn { display: inline-block; background: var(--brand); color: var(--on-brand) !important; border: 1px solid var(--brand); border-radius: 11px; padding: 11px 20px; font-size: 15px; font-weight: 800; cursor: pointer; text-decoration: none; text-align: center; transition: filter .15s, transform .15s; }
.vcm-p-btn:hover { filter: brightness(1.08); }
.vcm-p-btn:active { transform: translateY(1px); }
.vcm-p-btn-lg { width: 100%; padding: 14px; margin-top: 4px; }
.vcm-p-btn-file { position: relative; overflow: hidden; padding: 9px 14px; font-size: 13px; white-space: nowrap; }
.vcm-p-btn-file input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.vcm-p-nojs-submit { margin-top: 6px; background: var(--ink); border-color: var(--ink); color: var(--surface) !important; }

/* Documentos */
.vcm-p-docs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
.vcm-p-doc { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; align-items: start; border: 1px solid var(--line); border-radius: 14px; padding: 15px; background: var(--surface); min-width: 0; }
.vcm-p-doc-state { width: 31px; height: 31px; border-radius: 50%; background: var(--surface-soft); color: var(--muted); display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 13px; }
.vcm-p-doc.is-done { border-color: color-mix(in srgb, var(--brand) 45%, var(--line)); background: color-mix(in srgb, var(--brand) 6%, var(--surface)); }
.vcm-p-doc.is-done .vcm-p-doc-state { background: var(--brand); color: var(--on-brand); }
.vcm-p-doc.is-wait .vcm-p-doc-state { background: var(--amber-soft); color: var(--amber); }
.vcm-p-doc.is-redo { border-color: color-mix(in srgb, var(--red) 38%, var(--line)); background: color-mix(in srgb, var(--red-soft) 65%, var(--surface)); }
.vcm-p-doc.is-redo .vcm-p-doc-state { background: var(--red); color: #fff; }
.vcm-p-doc-body { min-width: 0; }
.vcm-p-doc-body > b { font-size: 14px; }
.vcm-p-doc-note { display: block; color: var(--red); font-size: 13px; margin-top: 2px; }
.vcm-p-files { list-style: none; margin: 7px 0 0; padding: 0; font-size: 12.5px; }
.vcm-p-files li { display: flex; justify-content: space-between; gap: 8px; color: var(--muted); padding: 3px 0; }
.vcm-p-file-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vcm-p-file-status { flex: none; font-weight: 700; }
.vcm-p-files li.is-aprovado .vcm-p-file-status { color: var(--brand); }
.vcm-p-files li.is-rejeitado .vcm-p-file-status { color: var(--red); }
.vcm-p-files li.is-pendente_analise .vcm-p-file-status { color: var(--amber); }
.vcm-p-upload-progress { margin-top: 8px; background: var(--surface-soft); border: 1px solid var(--line); border-radius: 99px; height: 16px; position: relative; overflow: hidden; }
.vcm-p-upload-progress i { display: block; height: 100%; background: var(--brand); border-radius: 99px; width: 0; transition: width .2s; }
.vcm-p-upload-progress span { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 10.5px; font-weight: 800; color: var(--ink); }
.vcm-p-upload-form { grid-column: 2; display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }

/* Acompanhamento */
.vcm-p-track { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 16px 0; }
.vcm-p-track-item { border: 1px solid var(--line); background: var(--surface-soft); border-radius: 12px; padding: 14px; }
.vcm-p-track-item b { display: block; font-size: 13.5px; color: var(--ink); }
.vcm-p-track-item span { color: var(--muted); font-size: 13px; }
.vcm-p-track-item.is-done { border-color: color-mix(in srgb, var(--brand) 45%, var(--line)); }
.vcm-p-track-item.is-done span { color: var(--brand); font-weight: 700; }
.vcm-p-footer { text-align: center; color: var(--muted); font-size: 12.5px; margin-top: 26px; }

@media (max-width: 820px) {
  .vcm-portal { padding-inline: 14px; }
  .vcm-p-header { grid-template-columns: 1fr; gap: 16px; }
  .vcm-p-progress-summary { align-items: center; }
  .vcm-p-progress-label { text-align: right; }
  .vcm-p-docs { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .vcm-portal { padding-top: 8px; font-size: 15px; }
  .vcm-p-header-brand { align-items: flex-start; }
  .vcm-p-logo { max-width: 105px; max-height: 48px; }
  .vcm-p-progress-summary { align-items: flex-start; flex-direction: column; gap: 2px; }
  .vcm-p-progress-label { text-align: left; }
  .vcm-p-grid, .vcm-p-track { grid-template-columns: 1fr; }
  .vcm-p-card { border-radius: 14px; padding: 19px 16px; }
  .vcm-p-steps a span { display: none; }
  .vcm-p-steps a { min-height: 44px; }
  .vcm-p-doc { grid-template-columns: auto minmax(0, 1fr); }
  .vcm-p-upload-form { grid-column: 1 / -1; width: 100%; }
  .vcm-p-btn-file { flex: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .vcm-p-progress i, .vcm-p-toast, .vcm-p-btn { transition: none; }
}
