/* PicLab — wireframes tema claro (A/B/C compartilham este CSS) */
:root {
  --bg: #f6f7fb;
  --card: #ffffff;
  --borda: #e4e8f0;
  --txt: #1b2432;
  --txt2: #667085;
  --accent: #5b67f1;
  --accent-soft: #eef0fe;
  --ok: #129d6e;
  --erro: #e5484d;
  --sombra: 0 1px 2px rgba(16, 24, 40, 0.06), 0 4px 16px rgba(16, 24, 40, 0.06);
}
* { box-sizing: border-box; margin: 0; }
body {
  background: var(--bg);
  color: var(--txt);
  font-family: -apple-system, "SF Pro Text", Inter, "Segoe UI", sans-serif;
  min-height: 100vh;
  padding: 24px 16px 80px;
  font-size: 15px;
}
.wrap { max-width: 880px; margin: 0 auto; }
.wrap-largo { max-width: 1180px; margin: 0 auto; }

/* header */
.wf-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px;
}
.logo { font-size: 22px; font-weight: 800; letter-spacing: -0.5px; }
.logo span { color: var(--accent); }
.pill-status {
  display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--txt2);
  background: var(--card); border: 1px solid var(--borda); border-radius: 20px; padding: 6px 14px;
  box-shadow: var(--sombra);
}
.pill-status .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); }

/* cards e etapas */
.card {
  background: var(--card); border: 1px solid var(--borda);
  border-radius: 16px; padding: 18px; margin-bottom: 14px; box-shadow: var(--sombra);
}
.etapa {
  display: flex; align-items: center; gap: 8px; margin-bottom: 10px;
  font-size: 12px; font-weight: 700; letter-spacing: 0.8px; text-transform: uppercase; color: var(--txt2);
}
.etapa .num {
  width: 20px; height: 20px; border-radius: 50%; background: var(--accent-soft);
  color: var(--accent); display: grid; place-items: center; font-size: 11px; font-weight: 800;
}
.etapa .opc { font-weight: 500; text-transform: none; letter-spacing: 0; }
textarea, .wf-input {
  width: 100%; min-height: 84px; resize: vertical; border-radius: 12px;
  border: 1px solid var(--borda); background: #fff; color: var(--txt);
  padding: 12px 14px; font-size: 15px; line-height: 1.5; outline: none;
  font-family: inherit;
}
textarea:focus, .wf-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

/* formato segmentado */
.seg { display: inline-flex; background: #eef0f5; border-radius: 12px; padding: 4px; gap: 4px; }
.seg button {
  border: 0; background: transparent; border-radius: 9px; padding: 8px 14px;
  font-size: 13.5px; color: var(--txt2); cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
}
.seg button.ativo { background: #fff; color: var(--txt); font-weight: 600; box-shadow: 0 1px 4px rgba(16,24,40,0.12); }
.seg .forma { font-size: 11px; }

/* abas de categoria */
.cat-tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 10px; margin-bottom: 12px; }
.cat-tab {
  flex: 0 0 auto; border: 1px solid var(--borda); background: #fff; color: var(--txt2);
  border-radius: 18px; padding: 7px 14px; font-size: 13px; cursor: pointer;
}
.cat-tab.ativo { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }

/* grade de estilos (sem /cmd, com zoom) */
.grade-estilos { display: grid; grid-template-columns: repeat(auto-fill, minmax(116px, 1fr)); gap: 12px; }
.estilo {
  position: relative; cursor: pointer; border-radius: 14px; overflow: hidden;
  border: 2px solid var(--borda); background: #fff; transition: transform 0.12s, border-color 0.12s, box-shadow 0.12s;
}
.estilo:hover { transform: translateY(-2px); box-shadow: var(--sombra); }
.estilo .thumb { width: 100%; aspect-ratio: 1; display: grid; place-items: center; background: #eef0f5; position: relative; }
.estilo .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.estilo .rotulo { padding: 7px 9px 8px; font-size: 12.5px; font-weight: 600; line-height: 1.3; }
.estilo.selecionado { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.estilo.selecionado::after {
  content: "✓"; position: absolute; top: 7px; right: 7px; width: 24px; height: 24px;
  display: grid; place-items: center; font-size: 13px; font-weight: 800; color: #fff;
  background: var(--accent); border-radius: 50%; box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}
.btn-zoom {
  position: absolute; top: 7px; left: 7px; width: 26px; height: 26px; border: 0; border-radius: 8px;
  background: rgba(255,255,255,0.92); color: var(--txt); font-size: 13px; cursor: pointer;
  display: grid; place-items: center; opacity: 0; transition: opacity 0.12s;
}
.estilo:hover .btn-zoom, .estilo .btn-zoom:focus { opacity: 1; }
.btn-zoom:hover { background: var(--accent); color: #fff; }

/* lightbox */
.lightbox {
  position: fixed; inset: 0; background: rgba(15, 18, 30, 0.72); z-index: 100;
  display: grid; place-items: center; padding: 24px;
}
.lightbox .lb-box {
  background: #fff; border-radius: 18px; padding: 16px; max-width: 640px; width: 100%;
  box-shadow: 0 24px 64px rgba(0,0,0,0.35);
}
.lightbox img { width: 100%; border-radius: 12px; display: block; }
.lightbox .lb-info { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; }
.lightbox .lb-nome { font-weight: 700; font-size: 15px; }
.lightbox .lb-desc { font-size: 12.5px; color: var(--txt2); margin-top: 2px; }
.lightbox .lb-acoes { display: flex; gap: 8px; }
.lightbox .lb-fechar {
  position: absolute; top: 16px; right: 20px; width: 36px; height: 36px; border-radius: 50%;
  border: 0; background: rgba(255,255,255,0.92); font-size: 16px; cursor: pointer;
}

/* anexo */
.anexo-zone {
  border: 1.5px dashed var(--borda); border-radius: 12px; padding: 14px;
  display: flex; align-items: center; gap: 12px; color: var(--txt2); font-size: 13.5px;
}
.anexo-zone .btn-anexo {
  border: 0; background: var(--accent-soft); color: var(--accent); font-weight: 600;
  border-radius: 10px; padding: 9px 16px; cursor: pointer; font-size: 13.5px;
}

/* CTA */
.cta {
  width: 100%; padding: 16px; border: 0; border-radius: 14px; cursor: pointer;
  background: var(--accent); color: #fff; font-size: 16px; font-weight: 700;
  box-shadow: 0 6px 20px rgba(91, 103, 241, 0.35);
}
.cta:hover { filter: brightness(1.06); }
.btn-ghost {
  border: 1px solid var(--borda); background: #fff; color: var(--txt2);
  border-radius: 10px; padding: 9px 14px; font-size: 13px; cursor: pointer;
}
.btn-ghost:hover { border-color: var(--accent); color: var(--txt); }

/* resultado */
.resultado-card { text-align: center; }
.resultado-card img { width: 100%; border-radius: 12px; display: block; }
.resultado-acoes { display: flex; gap: 8px; justify-content: center; margin-top: 12px; flex-wrap: wrap; }
.shimmer {
  width: 100%; aspect-ratio: 16/9; border-radius: 12px;
  background: linear-gradient(100deg, #eef0f5 40%, #f7f8fb 50%, #eef0f5 60%);
  background-size: 200% 100%; animation: brilho 1.4s infinite;
}
@keyframes brilho { to { background-position: -200% 0; } }

/* histórico */
.hist-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.hist-item {
  position: relative; border-radius: 12px; border: 1px solid var(--borda);
  background: #fff; box-shadow: var(--sombra);
}
.hist-item img { width: 100%; height: 120px; object-fit: cover; display: block; border-radius: 11px 11px 0 0; }
.hist-item .hist-acoes {
  position: absolute; bottom: 6px; left: 6px; right: 6px; display: flex; gap: 4px;
  background: rgba(255,255,255,0.92); border-radius: 9px; padding: 4px;
  opacity: 0; transition: opacity 0.12s;
}
.hist-item:hover .hist-acoes { opacity: 1; }
.hist-acoes button {
  flex: 1; border: 0; border-radius: 7px; background: transparent;
  font-size: 13px; padding: 4px; cursor: pointer;
}
.hist-acoes button:hover { background: var(--accent-soft); }

/* tooltips (passe o mouse): use data-tip="texto" */
[data-tip] { position: relative; }
[data-tip]:hover::after {
  content: attr(data-tip);
  position: absolute; bottom: calc(100% + 7px); left: 50%; transform: translateX(-50%);
  background: #1b2432; color: #fff; font-size: 11.5px; font-weight: 500; line-height: 1.3;
  padding: 6px 10px; border-radius: 8px; white-space: nowrap; z-index: 60; pointer-events: none;
  box-shadow: 0 4px 14px rgba(0,0,0,0.2);
}
[data-tip]:hover::before {
  content: ""; position: absolute; bottom: calc(100% + 2px); left: 50%; transform: translateX(-50%);
  border: 5px solid transparent; border-top-color: #1b2432; z-index: 60; pointer-events: none;
}
h2.secao { font-size: 15px; margin: 26px 0 12px; color: var(--txt); }
.chips-selecionados { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.chips-selecionados:empty { display: none; }
.chip-estilo {
  font-size: 12px; color: var(--accent); background: var(--accent-soft);
  border: 1px solid transparent; border-radius: 14px; padding: 5px 11px; cursor: pointer;
}
.contagem { color: var(--accent); font-weight: 600; }
code { background: #eef0f5; border-radius: 6px; padding: 1px 6px; font-size: 12px; }
