/* ==========================================================================
   Wizard de onboarding (onboarding.php) · identidade Tucano (petróleo + âmbar
   sobre papel). Complementa auth.css: os tokens --bm-* vêm de lá.
   ========================================================================== */
body.onb-body { background: var(--bm-paper) !important; color: var(--bm-ink); min-height: 100vh; }
body.onb-body[data-bs-theme="dark"] { background: var(--bm-paper) !important; color: var(--bm-ink); }

/* ---- topbar ---- */
.onb-topbar { background: var(--bm-petrol-900); color: var(--bm-paper); position: sticky; top: 0; z-index: 1030; box-shadow: 0 6px 24px -12px rgba(0,0,0,.6); }
.onb-topbar__inner { max-width: 1240px; margin: 0 auto; padding: .85rem 1.25rem; display: flex; align-items: center; gap: 1.25rem; }
.onb-topbar__logo img { height: 30px; width: auto; display: block; }
.onb-topbar__passo { font-family: var(--bm-display); font-weight: 600; font-size: .95rem; white-space: nowrap; }
.onb-topbar__passo small { display: block; font-weight: 400; font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: #7FB2B8; }
.onb-topbar__acoes { margin-left: auto; white-space: nowrap; }
.onb-topbar__acoes a { color: var(--bm-paper) !important; font-weight: 600; text-decoration: none; font-size: .85rem; border: 1px solid rgba(246,241,231,.4); padding: .4rem .85rem; border-radius: 999px; display: inline-block; }
.onb-topbar__acoes a:hover { color: var(--bm-petrol-950) !important; background: var(--bm-amber); border-color: var(--bm-amber); }

/* stepper (desktop) */
.onb-stepper { display: flex; align-items: center; gap: 0; flex: 1 1 auto; min-width: 0; overflow-x: auto; scrollbar-width: none; padding: 0 .25rem; }
.onb-stepper::-webkit-scrollbar { display: none; }
.onb-stepper__item { display: flex; align-items: center; gap: .45rem; padding: .35rem .6rem; border-radius: 999px; font-size: .78rem; font-weight: 600; color: rgba(246,241,231,.62); white-space: nowrap; cursor: default; border: 1px solid transparent; }
.onb-stepper__num { width: 22px; height: 22px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: .72rem; background: rgba(246,241,231,.12); color: rgba(246,241,231,.75); }
.onb-stepper__item.concluido { color: rgba(246,241,231,.9); cursor: pointer; }
.onb-stepper__item.concluido .onb-stepper__num { background: var(--bm-amber); color: var(--bm-petrol-950); }
.onb-stepper__item.concluido:hover { border-color: rgba(242,169,59,.5); }
.onb-stepper__item.atual { color: var(--bm-paper); background: rgba(246,241,231,.08); border-color: rgba(246,241,231,.18); }
.onb-stepper__item.atual .onb-stepper__num { background: var(--bm-paper); color: var(--bm-petrol-900); }
.onb-stepper__sep { width: 14px; height: 1px; background: rgba(246,241,231,.18); flex: 0 0 auto; }
.onb-progress { display: none; }

/* ---- conteúdo ---- */
.onb-main { position: relative; padding: 2rem 1rem 6.5rem; }
.onb-main::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .45;
  background-image: radial-gradient(rgba(20,37,42,.09) 1px, transparent 1.2px); background-size: 26px 26px;
  mask-image: linear-gradient(180deg, rgba(0,0,0,.7), transparent 55%); }
.onb-container { position: relative; max-width: 1240px; margin: 0 auto; }
.onb-container--estreito { max-width: 720px; }
.onb-passo[hidden] { display: none !important; }
.onb-passo__cabeca { margin-bottom: 1.5rem; }
.onb-passo__cabeca .auth-title { font-size: clamp(1.7rem, 2.6vw, 2.4rem); }
.onb-passo__cabeca .auth-sub { margin-bottom: 0; max-width: 62ch; }
.onb-card { background: #fff; border: 1px solid var(--bm-line); border-radius: 14px; padding: clamp(1.1rem, 2.5vw, 2rem); box-shadow: 0 30px 60px -48px rgba(11,42,48,.45); }
.onb-card + .onb-card { margin-top: 1rem; }
.onb-card__titulo { font-family: var(--bm-display); font-weight: 700; font-size: 1.05rem; color: var(--bm-ink); margin-bottom: .75rem; display: flex; align-items: center; gap: .5rem; }
.onb-card__titulo .ki-duotone { color: var(--bm-petrol-500); }
.onb-nota { font-size: .85rem; color: var(--bm-muted); }
.onb-body .form-label { font-family: var(--bm-display); font-weight: 600; font-size: .85rem; color: var(--bm-ink) !important; margin-bottom: .35rem; }
.onb-body .form-control, .onb-body .form-select { background-color: #fff !important; border: 1.5px solid var(--bm-line) !important; border-radius: 6px !important; color: var(--bm-ink) !important; box-shadow: none !important; }
/* Select precisa parecer select: mantém a seta do Bootstrap (background-image) e o espaço dela à direita */
.onb-body .form-select { background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%232A6A72' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e") !important; background-repeat: no-repeat !important; background-position: right .75rem center !important; background-size: 16px 12px !important; padding-right: 2.25rem !important; appearance: none; -webkit-appearance: none; cursor: pointer; }
.onb-body .form-select-sm { background-position: right .5rem center !important; padding-right: 1.9rem !important; }
.onb-body .form-control:focus, .onb-body .form-select:focus { border-color: var(--bm-petrol-500) !important; box-shadow: 0 0 0 4px rgba(42,106,114,.15) !important; }
.onb-body .form-control.is-invalid { border-color: #C0392B !important; }
.onb-body .form-control-sm, .onb-body .form-select-sm { padding: .45rem .7rem !important; }
.onb-body .btn-primary { background: var(--bm-petrol-800) !important; border: 0 !important; color: var(--bm-paper) !important; font-family: var(--bm-display); font-weight: 600; box-shadow: inset 0 -2px 0 rgba(0,0,0,.18); }
.onb-body .btn-primary:hover:not(:disabled) { background: var(--bm-petrol-900) !important; }
.onb-body .btn-primary:disabled { opacity: .55; }
.onb-body .btn-light-primary { background: rgba(42,106,114,.1) !important; color: var(--bm-petrol-800) !important; border: 0; }
.onb-body .btn-light-primary:hover { background: rgba(42,106,114,.18) !important; }
.onb-body .btn-light { background: #fff !important; border: 1.5px solid var(--bm-line) !important; color: var(--bm-ink) !important; }
.onb-body .btn-amber { background: var(--bm-amber) !important; color: #fff !important; border: 0; font-family: var(--bm-display); font-weight: 700; box-shadow: inset 0 -2px 0 rgba(0,0,0,.14); text-shadow: 0 1px 1px rgba(0,0,0,.18); }
.onb-body .btn-amber .ki-duotone, .onb-body .btn-amber .ki-duotone [class*="path"] { color: #fff !important; }
.onb-body .btn-amber:hover:not(:disabled) { background: #E59A2A !important; }
.onb-body .form-check-input:checked { background-color: var(--bm-petrol-800); border-color: var(--bm-petrol-800); }
.onb-body a { color: var(--bm-petrol-800); }
.onb-body .text-muted { color: var(--bm-muted) !important; }
.onb-body .alert { border-radius: 10px; }
.onb-body .separator { border-color: var(--bm-line) !important; }
.onb-body .nav-tabs .nav-link { color: var(--bm-muted); }
.onb-body .nav-tabs .nav-link.active { color: var(--bm-petrol-800); border-bottom-color: var(--bm-petrol-800); }
.onb-body .badge.badge-light-success { background: rgba(80,205,137,.14); color: #1f7a48; }

/* escolha em cartões (CPF/CNPJ, sim/não, forma de pagamento) */
.onb-escolha { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: .75rem; }
.onb-escolha__item { border: 1.5px solid var(--bm-line); border-radius: 10px; padding: .85rem 1rem; cursor: pointer; background: #fff; transition: border-color .15s, box-shadow .15s; }
.onb-escolha__item:hover { border-color: var(--bm-petrol-500); }
.onb-escolha__item.ativo { border-color: var(--bm-petrol-800); box-shadow: 0 0 0 3px rgba(42,106,114,.16); }
.onb-escolha__item .fw-bold { font-family: var(--bm-display); }
.onb-escolha__item small { color: var(--bm-muted); display: block; }

/* força da senha */
.onb-senha-forca { height: 6px; border-radius: 4px; background: rgba(20,37,42,.1); overflow: hidden; margin-top: .4rem; }
.onb-senha-forca > span { display: block; height: 100%; width: 0; transition: width .2s, background .2s; background: #C0392B; }
.onb-senha-forca.f2 > span { width: 50%; background: var(--bm-amber); }
.onb-senha-forca.f3 > span { width: 100%; background: #1f9d57; }
.onb-senha-forca.f1 > span { width: 25%; }

/* código de verificação */
.onb-codigo { font-family: var(--bm-display); font-size: 2rem; letter-spacing: .6em; text-align: center; padding-left: .9em !important; font-weight: 700; }

/* listas de itens (serviços, equipe) */
.onb-lista { display: flex; flex-direction: column; gap: .6rem; }
.onb-item { display: flex; align-items: center; gap: .85rem; padding: .7rem .9rem; border: 1.5px solid var(--bm-line); border-radius: 10px; background: #fff; }
.onb-item__avatar { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; flex: 0 0 auto; background: var(--bm-paper); display: flex; align-items: center; justify-content: center; font-family: var(--bm-display); font-weight: 700; color: var(--bm-petrol-800); border: 2px solid transparent; }
.onb-item__nome { font-weight: 600; min-width: 0; flex: 1 1 auto; }
.onb-item__meta { font-size: .8rem; color: var(--bm-muted); }
.onb-item__acoes { display: flex; align-items: center; gap: .35rem; flex: 0 0 auto; }
.onb-item .form-control-sm { width: 84px; }
.onb-vazio { border: 1.5px dashed var(--bm-line); border-radius: 10px; padding: 1.25rem; text-align: center; color: var(--bm-muted); font-size: .9rem; }

/* site: preview + edição */
.onb-site-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 1.25rem; align-items: start; }
.onb-site-grid__preview { position: sticky; top: 84px; }
.onb-site-grid__preview .card { border: 1px solid var(--bm-line); border-radius: 14px; }
.onb-site-grid__preview #previewFrame { height: 70vh; min-height: 480px; }
.onb-preview-toggle { display: none; }
#onbSiteWrap .tab-pane { display: block; opacity: 1; }
#onbSiteWrap .onb-passo[hidden] { display: none !important; }
#onbSiteWrap .preset-card { background: #fff; }
.onb-logo-destino .d-flex { flex-wrap: wrap; }
.onb-logo-destino #logoAtual { width: 96px !important; height: 96px !important; }

/* planos */
.onb-periodo { display: inline-flex; border: 1.5px solid var(--bm-line); border-radius: 999px; padding: 3px; background: #fff; }
.onb-periodo button { border: 0; background: transparent; padding: .45rem 1rem; border-radius: 999px; font-family: var(--bm-display); font-weight: 600; color: var(--bm-muted); }
.onb-periodo button.ativo { background: var(--bm-petrol-800); color: var(--bm-paper); }
.onb-periodo .badge { background: var(--bm-amber); color: var(--bm-petrol-950); margin-left: .35rem; }
.onb-planos { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }
.onb-plano { position: relative; border: 1.5px solid var(--bm-line); border-radius: 14px; padding: 1.25rem; background: #fff; cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.onb-plano.ativo { border-color: var(--bm-petrol-800); box-shadow: 0 0 0 3px rgba(42,106,114,.16); }
.onb-plano__selo { position: absolute; top: -.7rem; left: 1rem; background: var(--bm-amber); color: var(--bm-petrol-950); font-size: .72rem; font-weight: 700; padding: .25rem .6rem; border-radius: 999px; font-family: var(--bm-display); }
.onb-plano__nome { font-family: var(--bm-display); font-weight: 800; font-size: 1.2rem; }
.onb-plano__preco { font-family: var(--bm-display); font-weight: 800; font-size: 2rem; letter-spacing: -.02em; line-height: 1; margin: .5rem 0 .2rem; color: var(--bm-petrol-800); }
.onb-plano__preco small { font-size: .9rem; font-weight: 600; color: var(--bm-muted); letter-spacing: 0; }
.onb-plano__cheio { font-size: .85rem; color: var(--bm-muted); text-decoration: line-through; }
.onb-plano__depois { font-size: .8rem; color: var(--bm-muted); margin-bottom: .75rem; }
.onb-plano__recursos { list-style: none; padding: 0; margin: .75rem 0 0; font-size: .86rem; }
.onb-plano__recursos li { padding: .2rem 0; }
.onb-plano__recursos li::before { content: "✓"; color: var(--bm-amber-text); font-weight: 700; margin-right: .4rem; }
.onb-resumo { border: 1.5px solid var(--bm-line); border-radius: 12px; background: #fff; }
.onb-resumo__linha { display: flex; justify-content: space-between; gap: 1rem; padding: .55rem .9rem; border-bottom: 1px solid var(--bm-line); font-size: .9rem; }
.onb-resumo__linha:last-child { border-bottom: 0; }
.onb-resumo__linha small { display: block; color: var(--bm-muted); font-size: .76rem; }
.onb-resumo__total { font-family: var(--bm-display); font-weight: 800; font-size: 1.1rem; background: rgba(42,106,114,.06); }
.onb-pix-qr { max-width: 240px; width: 100%; border: 1px solid var(--bm-line); border-radius: 10px; background: #fff; padding: 6px; }
.onb-copia { font-family: monospace; font-size: .75rem; word-break: break-all; }

/* sucesso */
.onb-sucesso { text-align: center; padding: 2rem 0; }
.onb-sucesso__icone { width: 96px; height: 96px; border-radius: 50%; background: #1F9D55; color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 3rem; margin-bottom: 1.25rem; box-shadow: 0 20px 40px -20px rgba(31,157,85,.75); }
.onb-sucesso__icone .ki-duotone, .onb-sucesso__icone .ki-duotone [class*="path"], .onb-sucesso__icone i { color: #fff !important; }
/* Estado de sucesso: o card fica centralizado na área útil (abaixo da barra), não no rodapé */
body.onb-sucesso-ativo .onb-main { display: flex; align-items: center; justify-content: center; min-height: calc(100vh - 72px); padding-bottom: 2rem; }
body.onb-sucesso-ativo .onb-container { width: 100%; }
#onbConfete { position: fixed !important; inset: 0; pointer-events: none; z-index: 1040; }
.onb-confete { position: fixed; inset: 0; pointer-events: none; z-index: 1040; }

/* rodapé de navegação */
.onb-rodape { position: fixed; left: 0; right: 0; bottom: 0; z-index: 1025; background: rgba(246,241,231,.92); backdrop-filter: blur(8px); border-top: 1px solid var(--bm-line); }
.onb-rodape__inner { max-width: 1240px; margin: 0 auto; padding: .75rem 1.25rem; display: flex; align-items: center; gap: .75rem; }
.onb-rodape__inner .btn { min-width: 150px; padding: .8rem 1.4rem; }
.onb-rodape__dica { font-size: .82rem; color: var(--bm-muted); margin-left: auto; }
.onb-rodape[hidden] { display: none !important; }

/* ---- responsivo ---- */
@media (max-width: 991.98px) {
  .onb-topbar__inner { flex-wrap: wrap; gap: .6rem .9rem; padding: .7rem 1rem; }
  .onb-stepper { display: none; }
  .onb-progress { display: block; width: 100%; order: 10; }
  .onb-progress__txt { display: flex; justify-content: space-between; font-size: .74rem; color: rgba(246,241,231,.8); margin-bottom: .3rem; font-family: var(--bm-display); font-weight: 600; }
  .onb-progress__bar { height: 5px; border-radius: 4px; background: rgba(246,241,231,.15); overflow: hidden; }
  .onb-progress__bar > span { display: block; height: 100%; background: var(--bm-amber); transition: width .3s; }
  .onb-topbar__passo { display: none; }
  .onb-main { padding: 1.25rem .85rem 7rem; }
  .onb-card { border-radius: 12px; }
  .onb-site-grid { grid-template-columns: 1fr; }
  .onb-site-grid__preview { position: static; display: none; }
  .onb-site-grid__preview.aberto { display: block; }
  .onb-site-grid__preview #previewFrame { height: 60vh; min-height: 360px; }
  .onb-preview-toggle { display: flex; }
  .onb-rodape__inner { padding: .6rem .85rem calc(.6rem + env(safe-area-inset-bottom)); }
  .onb-rodape__inner .btn { min-width: 0; flex: 1 1 0; padding: .85rem .6rem; }
  .onb-rodape__dica { display: none; }
  .onb-item { flex-wrap: wrap; }
  .onb-item__acoes { width: 100%; justify-content: flex-end; }
}
@media (prefers-reduced-motion: reduce) { .onb-progress__bar > span { transition: none; } }

/* Grade do HORÁRIO DE FUNCIONAMENTO no celular (#negHorarios): 4 colunas
   (Dia | Aberto | Abre | Fecha) cabem em 390px só apertando padding e fonte.
   A grade da JORNADA (#colabJornada, 6 colunas com intervalo) tem layout próprio,
   de duas linhas por dia — ele vive em assets/js/colaborador_jornada.js
   (classe .jornada-grade), porque a mesma grade também é usada pela modal de
   colaborador, que não carrega esta folha. [revisão do case 09/2026] */
/* Desktop: o conjunto formulário + ações fica centralizado verticalmente e as ações vêm
   logo ABAIXO do cartão (não presas ao fundo da janela), alinhadas à largura do conteúdo —
   um formulário curto e o botão principal ficam juntos, sem o vão do rodapé fixo. No celular
   (bloco abaixo) o rodapé continua fixo na base, que é o certo para telas curtas. */
@media (min-width: 576px) {
  body.onb-body { display: flex; flex-direction: column; }
  .onb-main { flex: 0 0 auto; margin-top: auto; padding-bottom: 1rem; }
  .onb-rodape { position: static; flex: 0 0 auto; margin-bottom: auto; background: transparent; border-top: 0; box-shadow: none; backdrop-filter: none; }
  .onb-rodape__inner { max-width: 720px; padding-top: .25rem; padding-bottom: .5rem; }
}

@media (max-width: 575.98px) {
  #negHorarios table { table-layout: fixed; width: 100%; font-size: .78rem; }
  #negHorarios th, #negHorarios td { padding: .35rem .15rem; vertical-align: middle; }
  #negHorarios td.jornada-dia { width: 2.6rem; white-space: nowrap; }
  #negHorarios input[type="time"] { min-width: 0; width: 100%; padding: .3rem .15rem; font-size: .78rem; text-align: center; }
  #negHorarios .form-check { margin: 0; }
}
