/* Painel de posts. Feito pra usar no celular primeiro.
   Paleta da marca da Érika: rosa claro, branco, pêssego no botão principal. */
:root {
  --fundo: #fdf3f7; --cartao: #ffffff; --texto: #3f2a35; --suave: #8f6d7d; --linha: #f1d9e4;
  --rosa: #d9488b; --rosa-claro: #fbe1ec; --pessego: #f4a271;
  --ok: #2f7d5b; --ok-claro: #dff2e9; --aviso: #a2610e; --aviso-claro: #fbecd5; --erro: #b3261e; --erro-claro: #fbe3e1;
  --display: 'Fredoka', ui-rounded, system-ui, sans-serif;
  --corpo: 'Quicksand', system-ui, sans-serif;
  --script: 'Cormorant Garamond', Georgia, serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--fundo); color: var(--texto); font: 500 16px/1.5 var(--corpo);
  padding-left: max(14px, env(safe-area-inset-left, 0px)); padding-right: max(14px, env(safe-area-inset-right, 0px));
  padding-bottom: calc(90px + env(safe-area-inset-bottom, 0px));
}
h1, h2, h3 { font-family: var(--display); font-weight: 600; margin: 0; line-height: 1.15; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--rosa-claro); outline-offset: 2px; }
.esconde { display: none !important; }

/* topo */
.topo { display: flex; align-items: center; gap: 12px; padding: 16px 0 10px; }
.topo img { width: 44px; height: 44px; border-radius: 50%; background: #fff; box-shadow: 0 2px 10px rgba(217,72,139,.18); }
.topo .marca b { display: block; font-family: var(--script); font-style: italic; font-size: 24px; line-height: 1; color: #7a2c4e; }
.topo .marca span { font-size: 11px; letter-spacing: .25em; text-transform: uppercase; color: var(--suave); font-weight: 700; }
.topo .sair { margin-left: auto; background: none; border: 0; color: var(--suave); font-size: 14px; }

/* abas fixas embaixo, como app */
.abas { position: fixed; left: 0; right: 0; bottom: 0; z-index: 5; display: flex; background: #fff; border-top: 1px solid var(--linha);
  padding: 6px max(10px, env(safe-area-inset-left, 0px)) calc(6px + env(safe-area-inset-bottom, 0px)); }
.abas button { flex: 1; background: none; border: 0; padding: 8px 4px; border-radius: 14px; font-weight: 700; color: var(--suave); font-size: 14px; }
.abas button[aria-selected="true"] { background: var(--rosa-claro); color: var(--rosa); }
.abas .icone { display: block; margin: 0 auto 2px; }

main { max-width: 760px; margin: 0 auto; }
.aviso { background: var(--cartao); border: 1px solid var(--linha); border-radius: 18px; padding: 14px 16px; color: var(--suave); font-size: 15px; }
.aviso.forte { color: var(--texto); }

/* semana */
.navsemana { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 6px 0 14px; }
.navsemana h2 { font-size: 20px; text-align: center; }
.navsemana button { width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--linha); background: #fff; font-size: 20px; }
.fila { font-size: 14px; color: var(--aviso); background: var(--aviso-claro); border-radius: 12px; padding: 8px 12px; margin-bottom: 12px; }
.dia { margin-bottom: 22px; }
.dia > h3 { font-size: 17px; margin: 0 0 8px 2px; }
.dia > h3 small { font-family: var(--corpo); color: var(--suave); font-weight: 600; font-size: 14px; margin-left: 6px; }
.pecas { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.peca { background: var(--cartao); border: 1px solid var(--linha); border-radius: 20px; overflow: hidden; display: flex; flex-direction: column; min-width: 0; }
.peca .img { position: relative; background: var(--rosa-claro); aspect-ratio: 4 / 5; }
.peca.story .img { aspect-ratio: 9 / 16; max-height: 420px; }
.peca .img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.peca .estado { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 16px; color: var(--suave); font-weight: 700; font-size: 14px; }
.peca .tipo { position: absolute; top: 10px; left: 10px; background: rgba(255,255,255,.92); border-radius: 999px; padding: 3px 10px; font-size: 12px; font-weight: 700; }
.peca .postou { position: absolute; top: 10px; right: 10px; background: var(--ok); color: #fff; border-radius: 999px; padding: 3px 10px; font-size: 12px; font-weight: 700; }
.peca .corpo { padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.peca textarea { width: 100%; min-height: 96px; resize: vertical; border: 1px solid var(--linha); border-radius: 12px; padding: 8px 10px; background: var(--fundo); font-size: 14.5px; }
.botoes { display: flex; flex-wrap: wrap; gap: 6px; }
.bt { border: 1.5px solid var(--linha); background: #fff; border-radius: 999px; padding: 7px 13px; font-size: 14px; font-weight: 700; color: var(--texto); text-decoration: none; display: inline-block; }
.bt.forte { background: var(--rosa); border-color: var(--rosa); color: #fff; }
.bt.pessego { background: var(--pessego); border-color: var(--pessego); color: #fff; }
.bt.ok { background: var(--ok-claro); border-color: var(--ok-claro); color: var(--ok); }
.bt:disabled { opacity: .5; }
.gerar { text-align: center; padding: 30px 16px; }
.gerar p { color: var(--suave); margin: 8px 0 18px; }
.gerar .bt { font-size: 17px; padding: 12px 26px; }

/* editor (folha de baixo) */
.folha { position: fixed; inset: 0; z-index: 10; background: rgba(63,42,53,.35); display: flex; align-items: flex-end; justify-content: center; }
.folha .caixa { background: #fff; width: 100%; max-width: 620px; max-height: 92vh; overflow: auto; border-radius: 24px 24px 0 0;
  padding: 18px max(16px, env(safe-area-inset-left, 0px)) calc(20px + env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; gap: 12px; }
.folha h3 { font-size: 20px; }
.campo { display: flex; flex-direction: column; gap: 4px; }
.campo label { font-size: 13px; font-weight: 700; color: var(--suave); }
.campo input, .campo select, .campo textarea { border: 1px solid var(--linha); border-radius: 12px; padding: 9px 11px; background: var(--fundo); width: 100%; }
.opcoes { display: flex; gap: 8px; }
.opcoes label { flex: 1; border: 1.5px solid var(--linha); border-radius: 14px; padding: 10px; text-align: center; font-weight: 700; font-size: 14px; }
.opcoes input { display: none; }
.opcoes input:checked + span { color: var(--rosa); }
.opcoes label:has(input:checked) { border-color: var(--rosa); background: var(--rosa-claro); }
.escolhe-foto { display: grid; grid-template-columns: repeat(auto-fill, minmax(70px, 1fr)); gap: 6px; max-height: 220px; overflow: auto; }
.escolhe-foto button { padding: 0; border: 3px solid transparent; border-radius: 10px; overflow: hidden; aspect-ratio: 1; background: var(--rosa-claro); }
.escolhe-foto button.sel { border-color: var(--rosa); }
.escolhe-foto img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* fotos */
.subir { display: flex; flex-direction: column; gap: 8px; background: var(--cartao); border: 2px dashed #efbfd3; border-radius: 20px; padding: 18px; text-align: center; margin-bottom: 14px; }
.subir b { font-family: var(--display); font-size: 18px; font-weight: 600; }
.subir small { color: var(--suave); }
.filtro { display: flex; gap: 6px; margin-bottom: 12px; flex-wrap: wrap; }
.filtro button { border: 1.5px solid var(--linha); background: #fff; border-radius: 999px; padding: 6px 12px; font-weight: 700; font-size: 13px; color: var(--suave); }
.filtro button[aria-pressed="true"] { border-color: var(--rosa); color: var(--rosa); background: var(--rosa-claro); }
.grade { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.foto { background: var(--cartao); border: 1px solid var(--linha); border-radius: 16px; overflow: hidden; min-width: 0; }
.foto .img { position: relative; aspect-ratio: 1; background: var(--rosa-claro); }
.foto .img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.foto.usada .img img { opacity: .45; }
.foto .selo { position: absolute; left: 6px; top: 6px; background: rgba(255,255,255,.92); border-radius: 999px; font-size: 11px; font-weight: 700; padding: 2px 8px; }
.foto .corpo { padding: 8px; display: flex; flex-direction: column; gap: 5px; }
.foto input { width: 100%; border: 1px solid var(--linha); border-radius: 9px; padding: 5px 8px; font-size: 13.5px; background: var(--fundo); }
.foto .linha { display: flex; gap: 5px; }
.foto .acoes { display: flex; justify-content: space-between; gap: 4px; }
.foto .acoes button { border: 0; background: none; font-size: 12.5px; font-weight: 700; color: var(--suave); padding: 4px 2px; }

/* reels */
.reel { background: var(--cartao); border: 1px solid var(--linha); border-radius: 20px; padding: 16px; margin-bottom: 14px; display: flex; flex-direction: column; gap: 10px; }
.reel .cab { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.reel .cab small { color: var(--suave); font-weight: 600; }
.chip { display: inline-block; font-size: 12px; font-weight: 700; border-radius: 999px; padding: 3px 10px; }
.chip.revisar { background: var(--aviso-claro); color: var(--aviso); }
.chip.aprovado { background: var(--ok-claro); color: var(--ok); }
.chip.erro { background: var(--erro-claro); color: var(--erro); }
.chip.fila, .chip.gerando { background: var(--rosa-claro); color: var(--rosa); }
.cenas { display: flex; flex-direction: column; gap: 8px; }
.cena { display: grid; grid-template-columns: 64px 1fr; gap: 10px; align-items: center; }
.cena img { width: 64px; height: 64px; border-radius: 12px; object-fit: cover; background: var(--rosa-claro); }
.cena b { display: block; font-size: 15px; }
.cena small { color: var(--suave); font-size: 13px; }

/* entrar */
.entrar { min-height: 100vh; display: grid; place-items: center; }
.entrar form { background: #fff; border-radius: 26px; padding: 28px 22px; width: 100%; max-width: 360px; box-shadow: 0 20px 60px rgba(217,72,139,.12); display: flex; flex-direction: column; gap: 14px; text-align: center; }
.entrar img { width: 96px; height: 96px; border-radius: 50%; margin: 0 auto; }
.entrar input { border: 1px solid var(--linha); border-radius: 14px; padding: 12px 14px; background: var(--fundo); text-align: center; font-size: 17px; }
.entrar .erro { color: var(--erro); font-size: 14px; min-height: 1.4em; }
.toast { position: fixed; left: 50%; bottom: calc(86px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); background: var(--texto); color: #fff; padding: 9px 16px; border-radius: 999px; font-size: 14px; font-weight: 700; z-index: 20; }
@media (prefers-reduced-motion: no-preference) { .toast { transition: opacity .2s; } }

/* agenda do Instagram */
.faixa-ig { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--cartao); border: 1px solid var(--linha); border-radius: 18px; padding: 12px 14px; margin-bottom: 14px; }
.faixa-ig b { display: block; font-size: 15px; }
.faixa-ig small { color: var(--suave); font-size: 13px; }
.faixa-ig > div { min-width: 0; }
.agenda { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 700; color: var(--rosa); background: var(--rosa-claro); border-radius: 12px; padding: 6px 10px; }
.agenda.ok { color: var(--ok); background: var(--ok-claro); }
.agenda.erro { color: var(--erro); background: var(--erro-claro); font-weight: 600; }
.agenda.apagada { background: none; padding: 0; }
.agenda input[type=time] { border: 1px solid var(--linha); border-radius: 8px; padding: 2px 6px; background: #fff; font-weight: 700; }
.agenda a, .link { color: inherit; background: none; border: 0; padding: 0; font-weight: 700; text-decoration: underline; font-size: 13.5px; }
