/* ==========================================================================
   flow.css — estilos compartilhados das telas de formulário do fluxo
   (cadastro-empresa, funcionario, receita). Depende de style.css e
   reaproveita as mesmas variáveis usadas em dnp.css. Carregar depois
   de style.css.
   ========================================================================== */

.flow-topbar {
  /* Header claro (opção A): degradê definido em style.css (--header-bg) */
  background: var(--header-bg);
  border-bottom: 1px solid #d3deee;
  box-shadow: 0 6px 24px rgba(10, 20, 40, .18);
  padding-top: env(safe-area-inset-top, 0px);
}
.flow-topbar-inner {
  display: flex;
  align-items: center;
  min-height: 72px;
}

.flow-section {
  padding: 60px 0 calc(120px + env(safe-area-inset-bottom, 0px));
}

.flow-shell {
  max-width: 560px;
  margin: 0 auto;
}

.flow-shell h1 {
  font-family: "Barlow Condensed", sans-serif;
  text-transform: uppercase;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.05;
  font-size: clamp(2rem, 5vw, 3rem);
  color: var(--heading);
  margin: 0 0 18px;
}

.flow-shell p {
  color: rgba(233, 240, 255, .82);
  font-size: 1.05rem;
  line-height: 1.8;
  margin: 0 0 24px;
}

.flow-card {
  background: linear-gradient(135deg, rgba(50,65,100,.55) 0%, rgba(15,25,50,.85) 100%);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: 36px;
}
@media (max-width: 600px) {
  .flow-card { padding: 22px; border-radius: 18px; }
}

.flow-field {
  display: grid;
  gap: 8px;
  margin-bottom: 20px;
}
.flow-field label {
  font-family: "Barlow Condensed", sans-serif;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: .02em;
  color: rgba(255,255,255,.85);
}
.flow-field input[type="text"],
.flow-field select {
  width: 100%;
  border: 2px solid rgba(255,255,255,.12);
  background: rgba(8,14,28,.55);
  color: #fff;
  border-radius: 12px;
  padding: 14px 16px;
  font: inherit;
  font-size: 1rem;
  transition: var(--transition);
  appearance: none;
}
.flow-field select {
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235a92ff' stroke-width='2.5'%3e%3cpath d='M6 9l6 6 6-6'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 18px;
  padding-right: 42px;
}
.flow-field input::placeholder { color: rgba(255,255,255,.4); }
.flow-field input:focus,
.flow-field select:focus {
  outline: none;
  border-color: var(--blue);
  background-color: rgba(8,14,28,.85);
  box-shadow: 0 0 0 3px rgba(63,124,255,.18);
}
.flow-field .hint {
  font-size: .8rem;
  color: rgba(255,255,255,.5);
}
.flow-field select:disabled {
  opacity: .45;
  cursor: not-allowed;
}

.flow-status {
  margin-top: 14px;
  font-size: .9rem;
  text-align: center;
  min-height: 1.3em;
  color: rgba(255,255,255,.55);
}
.flow-status.is-error { color: #ffb0b0; }
.flow-status.is-ok { color: #34d399; }

.flow-error-box {
  background: rgba(255,97,97,.1);
  border: 1px solid rgba(255,97,97,.35);
  border-radius: 14px;
  padding: 14px 16px;
  font-size: .9rem;
  color: #ffd4d4;
  margin-top: 16px;
}

.flow-hidden { display: none !important; }

/* --------------------------------------------------------------------
   Link gerado (tela final do cadastro-empresa.html)
-------------------------------------------------------------------- */
.flow-link-box {
  display: flex;
  gap: 10px;
  align-items: center;
  background: rgba(8,14,28,.55);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  margin: 8px 0 4px;
}
.flow-link-box input {
  flex: 1;
  background: transparent;
  border: none;
  color: #fff;
  font-size: .92rem;
  font-family: monospace;
}
.flow-link-box input:focus { outline: none; }
.flow-copy-btn {
  flex-shrink: 0;
  background: var(--blue);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 9px 14px;
  font-weight: 700;
  font-size: .85rem;
  cursor: pointer;
}
.flow-copy-btn:hover { background: #2f5ccc; }

/* --------------------------------------------------------------------
   Etapas (indicador 1/3, 2/3, 3/3)
-------------------------------------------------------------------- */
.flow-step-label {
  margin: 0 0 12px;
}

/* --------------------------------------------------------------------
   Anexo de receita (foto ou arquivo)
-------------------------------------------------------------------- */
.flow-upload-choice {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 20px;
}
.flow-upload-choice button {
  padding: 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.04);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}
.flow-upload-choice button:hover {
  border-color: var(--blue-2);
  background: rgba(63,124,255,.12);
}
.flow-upload-choice button.is-active {
  border-color: var(--blue-2);
  background: rgba(63,124,255,.2);
}

.flow-preview {
  width: 100%;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  margin-bottom: 16px;
  background: #000;
}
.flow-preview img { display: block; width: 100%; }
.flow-preview .pdf-badge {
  padding: 40px 20px;
  text-align: center;
  color: rgba(255,255,255,.8);
  font-weight: 700;
}

.flow-btn-row {
  display: flex;
  gap: 12px;
  margin-top: 22px;
}
.flow-btn-row .btn,
.flow-btn-row .btn-outline {
  flex: 1;
}
@media (max-width: 600px) {
  .flow-btn-row { flex-direction: column; }
}

/* --------------------------------------------------------------------
   Acompanhamento — funcionários já registrados na filial
   (funcionario.html; dados públicos e mínimos: nome, modelo, status)
-------------------------------------------------------------------- */
.flow-registered-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255,255,255,.07);
}
.flow-registered-item:last-child { border-bottom: none; }
.flow-registered-item .who {
  font-weight: 700;
  color: #fff;
  font-size: .95rem;
}
.flow-registered-item .meta {
  font-size: .8rem;
  color: rgba(255,255,255,.55);
  margin-top: 3px;
  line-height: 1.5;
}
.flow-order-badge {
  flex-shrink: 0;
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .03em;
  white-space: nowrap;
}
.flow-order-badge.order-criado { background: rgba(255,255,255,.1); color: rgba(255,255,255,.75); }
.flow-order-badge.order-em_analise { background: rgba(255,215,0,.15); color: #ffd700; }
.flow-order-badge.order-producao { background: rgba(63,124,255,.2); color: #7fa8ff; }
.flow-order-badge.order-finalizado { background: rgba(52,211,153,.15); color: #34d399; }

@media (max-width: 480px) {
  .flow-registered-item { flex-direction: column; gap: 6px; }
}

/* --------------------------------------------------------------------
   Galeria de arquivos anexados (receita.html — várias fotos/PDFs)
-------------------------------------------------------------------- */
.flow-gallery-count {
  font-size: .85rem;
  color: rgba(255,255,255,.55);
  margin: 4px 0 12px;
}
.flow-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}
.flow-gallery-item {
  position: relative;
  aspect-ratio: 1;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.04);
}
.flow-gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.flow-gallery-pdf {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 1.6rem;
  color: rgba(255,255,255,.8);
}
.flow-gallery-pdf span {
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .04em;
}
.flow-gallery-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: none;
  background: rgba(8,14,28,.85);
  color: #fff;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.flow-gallery-remove:hover { background: rgba(224,90,90,.85); }

/* --------------------------------------------------------------------
   Câmera ao vivo simples (receita.html) — captura manual, sem
   detecção facial. Traseira por padrão via getUserMedia.
-------------------------------------------------------------------- */
#camera-video {
  width: 100%;
  aspect-ratio: 3 / 4;
  max-height: 70vh;
  object-fit: cover;
  border-radius: 14px;
  background: #000;
  display: block;
}
.flow-text-btn {
  width: 100%;
  margin-top: 8px;
  background: none;
  border: none;
  color: rgba(255,255,255,.5);
  font-size: .85rem;
  cursor: pointer;
  padding: 8px;
}
