/* Painel da bio, opção B (editar em cima da própria bio). Base: prototipos/painel/index.html?v=bio, escolhido pelo
   Paulo em 20/10/2026. A bio desenhada aqui é aproximada (mesmas cores, fonte e ordem; sem os efeitos de vidro). */
:root {
  --fundo: #070606; --sup: #141111; --sup2: #1C1818; --borda: #2A2222; --borda-forte: #3A2E2E;
  --texto: #F2EEEE; --apagado: #9A8E8E; --vermelho: #D7162B; --vermelho-claro: #FF3B45;
  --verde: #25D366; --amarelo: #F5B83D; --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --topo-seguro: env(safe-area-inset-top, 0px); --baixo-seguro: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: #0d0c0c; color: var(--texto); font-family: 'Archivo', system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; }
img, video { display: block; max-width: 100%; }

/* ---------- moldura: a tela do celular; no computador, uma coluna do tamanho de um celular ---------- */
.app { position: fixed; inset: 0; max-width: 480px; margin: 0 auto; background: var(--fundo); overflow: hidden; }
.tela { position: absolute; inset: 0; overflow-y: auto; overflow-x: hidden; scrollbar-width: none; }
.tela::-webkit-scrollbar { display: none; }
.tela.com-barra { padding-bottom: calc(96px + var(--baixo-seguro)); }
.fixo { position: absolute; left: 0; right: 0; bottom: 0; z-index: 20; }
.camada { position: absolute; inset: 0; z-index: 30; pointer-events: none; }
.camada > * { pointer-events: auto; }
#toast { position: absolute; left: 16px; right: 16px; bottom: calc(110px + var(--baixo-seguro)); z-index: 40; pointer-events: none; }
/* com uma folha aberta, o aviso vai pro alto: embaixo ele cobria os campos e os botões da folha */
#camada:not(:empty) ~ #toast { top: calc(16px + var(--topo-seguro)); bottom: auto; }
.vazio { padding: 18px; text-align: center; color: var(--apagado); font-size: 14px; }
.vazio--meio { padding-top: 40vh; }

/* ---------- selo, botões e a barra de baixo ---------- */
.status { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.status--ar { background: rgba(37,211,102,.12); color: #7BE3A4; }
.status--rascunho { background: rgba(245,184,61,.14); color: var(--amarelo); }
.status i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.barra-baixo { display: flex; gap: 10px; padding: 12px 16px calc(14px + var(--baixo-seguro)); background: linear-gradient(0deg, rgba(7,6,6,1) 70%, rgba(7,6,6,0)); }
.barra-baixo__status { align-self: center; }
.btn { flex: 1; padding: 15px 14px; border-radius: 14px; border: 1px solid var(--borda-forte); background: var(--sup); font-weight: 700; font-size: 15px; display: inline-flex; justify-content: center; align-items: center; gap: 8px; }
.btn svg { width: 18px; height: 18px; }
.btn--menu, .btn--curto { flex: 0 0 auto; }
.btn--forte { background: var(--vermelho); border-color: var(--vermelho); color: #fff; }
.btn--forte:disabled { background: var(--sup2); border-color: var(--borda); color: var(--apagado); }
.btn--perigo { background: none; border-color: rgba(255,59,69,.4); color: var(--vermelho-claro); }
/* desligado sem transparência: com opacity, o card que passa por trás da barra aparecia através do botão */
.btn:disabled { color: var(--apagado); }

/* ---------- itens do menu ---------- */
.grupo { background: var(--sup); border: 1px solid var(--borda); border-radius: 16px; overflow: hidden; margin-top: 12px; }
.item { width: 100%; display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: none; border: 0; text-align: left; }
.item + .item { border-top: 1px solid var(--borda); }
.item__thumb { flex: 0 0 44px; width: 44px; height: 44px; border-radius: 10px; background: var(--sup2); display: grid; place-items: center; }
.item__thumb svg { width: 22px; height: 22px; }
.item__txt { flex: 1; min-width: 0; }
.item__txt b { display: block; font-size: 15px; font-weight: 600; }
.item__txt small { display: block; margin-top: 2px; font-size: 13px; color: var(--apagado); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item__seta { color: var(--apagado); font-size: 20px; }

/* ---------- "Organizar": linhas com alça de arrastar ---------- */
/* minmax(0, 1fr): sem isso o título longo (nowrap) estica a coluna e empurra a alça pra fora da tela */
.lista { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; margin-top: 10px; }
.linha { display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 10px; background: var(--sup); border: 1px solid var(--borda); border-radius: 14px;
  transition: transform 160ms var(--ease); touch-action: pan-y; }
.linha.arrastando { transition: none; z-index: 5; position: relative; box-shadow: 0 14px 30px rgba(0,0,0,.6); border-color: var(--borda-forte); background: var(--sup2); }
.linha__capa { flex: 0 0 48px; width: 48px; height: 48px; border-radius: 9px; object-fit: cover; }
.linha__capa.larga { flex-basis: 64px; width: 64px; height: 36px; border-radius: 6px; }
.linha__txt { flex: 1; min-width: 0; background: none; border: 0; text-align: left; padding: 4px 0; }
.linha__txt b { display: block; font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.linha__txt small { display: flex; align-items: center; gap: 6px; margin-top: 2px; font-size: 12px; color: var(--apagado); white-space: nowrap; overflow: hidden; }
.linha__txt small i { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 8px; }
.alca { flex: 0 0 40px; height: 44px; display: grid; place-items: center; color: var(--apagado); touch-action: none; cursor: grab; border-radius: 10px; }
.alca:active { cursor: grabbing; background: var(--sup2); }
.alca svg { width: 22px; height: 22px; }
.mais { width: 100%; margin-top: 8px; padding: 14px; border-radius: 14px; border: 1.5px dashed var(--borda-forte); background: none; color: var(--texto); font-weight: 600; display: flex; justify-content: center; align-items: center; gap: 8px; }
.mais svg { width: 18px; height: 18px; }
.dica { margin: 8px 4px 0; font-size: 12px; color: var(--apagado); line-height: 1.45; }

/* ---------- folha que sobe de baixo ---------- */
.fundo-escuro { position: absolute; inset: 0; background: rgba(0,0,0,.55); animation: aparece 200ms ease; }
.folha { position: absolute; left: 0; right: 0; bottom: 0; max-height: 90%; overflow-y: auto; background: #151212; border-radius: 22px 22px 0 0;
  border-top: 1px solid var(--borda-forte); padding: 10px 18px calc(30px + var(--baixo-seguro)); animation: sobe 320ms var(--ease); }
.folha__puxador { width: 40px; height: 5px; border-radius: 3px; background: var(--borda-forte); margin: 0 auto 12px; }
.folha h3 { margin: 0 0 4px; font-size: 19px; font-weight: 800; }
.folha p.sub { margin: 0 0 14px; font-size: 13px; line-height: 1.45; color: var(--apagado); }
.folha .mais { margin-top: 12px; }
.folha .aviso { margin: 12px 0 0; font-size: 14px; }
.quebra { word-break: break-all; }
.campo { display: grid; gap: 6px; margin-top: 14px; }
.campo span { font-size: 13px; font-weight: 600; color: var(--apagado); }
.campo input, .campo textarea, .linha-campo input { width: 100%; padding: 13px 14px; border-radius: 12px; border: 1px solid var(--borda-forte); background: #0c0a0a; font-size: 16px; }
.campo textarea { min-height: 96px; resize: vertical; line-height: 1.45; }
.campo input:focus, .campo textarea:focus, .linha-campo input:focus { outline: 2px solid rgba(215,22,43,.6); border-color: transparent; }
.campo .ok, .campo .dica { margin: 2px 0 0; }
.linha-campo { display: flex; gap: 8px; }
.linha-campo input { flex: 1; min-width: 0; }
.linha-campo .btn { flex: 0 0 auto; }
.acoes { display: flex; gap: 10px; margin-top: 18px; }
.etiquetas { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.etiqueta { display: inline-flex; align-items: center; gap: 6px; padding: 8px 10px 8px 12px; border-radius: 999px; background: var(--sup2); border: 1px solid var(--borda); font-size: 14px; }
.etiqueta button { width: 22px; height: 22px; border-radius: 50%; border: 0; background: rgba(255,255,255,.08); line-height: 1; }
.escolher { width: 100%; display: flex; justify-content: center; align-items: center; gap: 8px; padding: 13px; border-radius: 12px; border: 1px solid var(--borda-forte); background: var(--sup); font-weight: 600; }
.escolher svg { width: 18px; height: 18px; }
/* escolher arquivo: o <input type=file> fica escondido dentro do rótulo; tocar no rótulo abre a galeria do celular */
label.escolher { margin-top: 10px; cursor: pointer; }
.escolher input { display: none; }
.perfil-foto label.escolher { flex: 1; margin: 0; }
.segmento { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 12px; background: #0c0a0a; border: 1px solid var(--borda); margin-top: 6px; }
.segmento button { padding: 10px; border-radius: 9px; border: 0; background: none; font-weight: 600; color: var(--apagado); }
.segmento button[aria-pressed="true"] { background: var(--sup2); color: var(--texto); }
.progresso__barra { height: 6px; border-radius: 3px; background: var(--sup2); margin-top: 8px; overflow: hidden; }
.progresso__barra i { display: block; width: 0; height: 100%; background: var(--verde); transition: width 120ms linear; }
.midia { margin-top: 12px; border-radius: 14px; overflow: hidden; background: #000; border: 1px solid var(--borda); }
.midia img, .midia video { width: 100%; height: 240px; object-fit: cover; }
.perfil-foto { display: flex; align-items: center; gap: 14px; margin-top: 10px; }
.perfil-foto img { flex: 0 0 84px; width: 84px; height: 84px; border-radius: 50%; object-fit: cover; }
.perfil-foto .dica { margin: 0; }
.progresso { margin-top: 12px; padding: 12px; border-radius: 12px; background: var(--sup); border: 1px solid var(--borda); font-size: 13px; color: var(--apagado); }
.ok { color: #7BE3A4; font-size: 14px; }
.aviso { color: var(--vermelho-claro); }
.aviso.forte { margin-top: 18px; font-weight: 600; }
.cartao-novo { margin-top: 14px; }
.versao { display: flex; align-items: center; gap: 12px; padding: 12px 0; }
.versao + .versao { border-top: 1px solid var(--borda); }
.versao__txt { flex: 1; }
.versao__txt b { display: block; font-size: 15px; }
.versao__txt small { color: var(--apagado); font-size: 13px; }
.versao button { padding: 9px 12px; border-radius: 10px; border: 1px solid var(--borda-forte); background: var(--sup); font-size: 13px; font-weight: 600; }
.selo { font-size: 12px; padding: 4px 8px; border-radius: 999px; background: rgba(37,211,102,.12); color: #7BE3A4; font-weight: 600; }
.aviso-toast { padding: 13px 16px; border-radius: 14px; background: #F2EEEE; color: #111; font-size: 14px; font-weight: 600; box-shadow: 0 10px 30px rgba(0,0,0,.5); animation: sobe 300ms var(--ease); }
@keyframes sobe { from { transform: translateY(24px); opacity: 0; } }
@keyframes aparece { from { opacity: 0; } }

/* ---------- entrar ---------- */
.login { min-height: 100%; max-width: 420px; margin: 0 auto; display: flex; flex-direction: column; justify-content: center; padding: calc(40px + var(--topo-seguro)) 24px 40px; }
.login h1 { margin: 0; text-align: center; font-size: 26px; font-weight: 800; font-stretch: 120%; text-transform: uppercase; }
.login p { text-align: center; color: var(--apagado); font-size: 14px; margin: 6px 0 18px; }
.login p.aviso { color: var(--vermelho-claro); margin: 14px 0 0; font-weight: 600; }
.login .btn { flex: 0 0 auto; width: 100%; margin-top: 18px; }
.login small { display: block; text-align: center; margin-top: 16px; color: var(--apagado); font-size: 13px; }

/* ---------- a bio com os lápis ---------- */
.bio { position: relative; min-height: 100%; }
.bio__fundo { position: absolute; top: 0; left: 0; right: 0; height: 1200px; overflow: hidden; background: #000; }
.bio__fundo img, .bio__fundo video { width: 100%; height: 100%; object-fit: cover; object-position: 62% 0%; }
.bio__fundo::after { content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(7,6,6,0.30) 0%, rgba(7,6,6,0.62) 34%, rgba(7,6,6,0.86) 62%, #070606 100%); }
.bio__pag { position: relative; padding: calc(52px + var(--topo-seguro)) 20px 48px; }
.bio__perfil { text-align: center; }
.bio__foto { width: 104px; height: 104px; margin: 0 auto 14px; border-radius: 50%; padding: 3px; background: conic-gradient(from 0deg, #FF3B45, transparent 40%, transparent 60%, #FF3B45);
  box-shadow: 0 0 44px rgba(215,22,43,.35); }
.bio__foto img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.bio__nome { margin: 0; font-size: 40px; line-height: .95; font-weight: 800; font-stretch: 125%; text-transform: uppercase; letter-spacing: -.01em; }
.bio__redes { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin: 16px 0 0; }
.pill { display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 13px; border-radius: 999px; background: rgba(18,16,16,.75); border: 1px solid var(--borda-forte); font-size: 13px; font-weight: 500; }
.pill svg { width: 16px; height: 16px; }
.bio__links { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; margin-top: 10px; }
.bcard { position: relative; border-radius: 16px; background: rgba(16,16,20,.38); backdrop-filter: blur(10px) saturate(1.4); -webkit-backdrop-filter: blur(10px) saturate(1.4);
  box-shadow: inset 0 0 0 1.5px var(--contorno, rgba(255,255,255,.3)), inset 0 1.5px 1px rgba(255,255,255,.35), 0 12px 30px -12px rgba(0,0,0,.55); }
.bcard--link { display: flex; align-items: center; gap: 14px; padding: 12px 16px 12px 12px; }
.bcard--link img { flex: 0 0 54px; width: 54px; height: 54px; border-radius: 10px; object-fit: cover; }
.bcard--link b { display: block; font-size: 16px; font-weight: 700; }
.bcard--link small { display: block; margin-top: 3px; font-size: 13px; color: var(--apagado); }
.bcard--link .marca { flex: 0 0 22px; width: 22px; height: 22px; margin-left: auto; }
.bcard--video { padding: 16px 16px 0; }
.bcard--video .tela-video { aspect-ratio: 16/9; border-radius: 8px; overflow: hidden; box-shadow: 0 0 0 1px rgba(0,0,0,.55); position: relative; }
.bcard--video .tela-video img { width: 100%; height: 100%; object-fit: cover; }
.bcard--video .pe { padding: 12px 0 16px; }
.bcard--video b { display: block; font-size: 15px; font-weight: 600; line-height: 1.35; }
.bcard--video small { display: block; margin-top: 4px; font-size: 12px; color: var(--apagado); }
.selo-previa { position: absolute; left: 8px; bottom: 8px; padding: 4px 8px; border-radius: 999px; background: rgba(0,0,0,.6); font-size: 11px; font-weight: 600; }
.bio .mais { background: rgba(10,8,8,.6); }
.bio__zap { margin-top: 18px; }
.zap { display: flex; justify-content: center; align-items: center; gap: 10px; height: 62px; border-radius: 999px; font-size: 13px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; --contorno: #25D366; }
.zap svg { width: 22px; height: 22px; fill: currentColor; }
.bio__letreiro { margin: 44px -20px 0; overflow: hidden; white-space: nowrap; font-size: 30px; font-weight: 800; font-stretch: 125%; text-transform: uppercase; color: rgba(242,238,238,.22); }
.bio__pe { margin-top: 36px; text-align: center; font-size: 12px; color: var(--apagado); }
.editavel { position: relative; }
/* os botões do topo deixam 40 px à direita pro lápis (que fica 30 px pra fora do grupo): com 3 botões eles quebram
   em duas linhas, o grupo ocupa a largura toda e o lápis saía da tela */
.editavel--redes { display: inline-block; max-width: calc(100% - 40px); }
.lapis { position: absolute; z-index: 3; width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--texto); color: #111; display: grid; place-items: center;
  box-shadow: 0 4px 14px rgba(0,0,0,.5); }
.lapis svg { width: 16px; height: 16px; }
.lapis--canto { top: -8px; right: -8px; }
.troca-fundo { position: absolute; z-index: 4; top: calc(12px + var(--topo-seguro)); left: 14px; display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 999px; border: 0; background: rgba(242,238,238,.92); color: #111; font-size: 13px; font-weight: 700; }
.troca-fundo svg { width: 16px; height: 16px; }
.organizar { display: flex; justify-content: space-between; align-items: center; margin-top: 30px; }
.organizar span { font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--apagado); }
.organizar button { padding: 8px 12px; border-radius: 999px; border: 1px solid var(--borda-forte); background: rgba(18,16,16,.85); font-size: 13px; font-weight: 600; }
