:root {
  --azul: #1c97e1;
  --azul-escuro: #1178b6;
  --azul-claro: #e8f4fc;
  --preto: #111;
  --cinza: #6b7280;
  --linha: #e5e7eb;
  --fundo: #f7f8fa;
  --verde: #16a34a;
  --verde-claro: #e9f8ef;
  --laranja: #d97706;
  --laranja-claro: #fff6e6;
  --vermelho: #dc2626;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { font-family: Inter, "Inter var", system-ui, -apple-system, "Segoe UI", sans-serif; color: var(--preto); background: #fff; font-size: 14px; }
button, input, select, textarea { font-family: inherit; font-size: 14px; }
a { color: var(--azul); text-decoration: none; }
.hidden { display: none !important; }

/* Entrada */
.entrada { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0; }
.entrada img { width: 150px; }
.entrada .titulo { letter-spacing: 4px; font-size: 11px; font-weight: 500; margin-top: 14px; }
.entrada .circulos { display: flex; gap: 36px; margin-top: 64px; }
.circulo { width: 112px; height: 112px; border-radius: 50%; background: var(--azul); color: #fff; border: 0; font-size: 18px; font-weight: 600; cursor: pointer; transition: transform .15s, background .15s; }
.circulo:hover { transform: scale(1.05); background: var(--azul-escuro); }

/* Topo */
.topo { display: flex; align-items: center; gap: 28px; padding: 14px 28px; border-bottom: 1px solid var(--linha); background: #fff; position: sticky; top: 0; z-index: 5; }
.topo .marca { display: flex; flex-direction: column; align-items: flex-start; cursor: pointer; }
.topo .marca img { width: 92px; }
.topo .marca span { font-size: 8px; letter-spacing: 3px; margin-top: 4px; font-weight: 500; }
.topo nav { display: flex; gap: 4px; flex: 1; flex-wrap: wrap; }
.topo nav a { color: var(--cinza); padding: 8px 12px; border-radius: 8px; font-weight: 500; }
.topo nav a.ativo, .topo nav a:hover { color: var(--preto); background: var(--fundo); }
.topo .usuario { display: flex; align-items: center; gap: 10px; color: var(--cinza); }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--azul); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 600; font-size: 12px; }

main { max-width: 1180px; margin: 0 auto; padding: 28px; }
h1 { font-size: 22px; margin: 0 0 4px; font-weight: 700; }
h2 { font-size: 15px; margin: 28px 0 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; color: var(--cinza); }
h3 { font-size: 15px; margin: 0 0 8px; }
.sub { color: var(--cinza); margin: 0 0 20px; }
.linha-topo { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }

/* Botões */
.btn { border: 1px solid var(--linha); background: #fff; color: var(--preto); padding: 9px 14px; border-radius: 8px; cursor: pointer; font-weight: 500; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.btn:hover { background: var(--fundo); }
.btn.azul { background: var(--azul); color: #fff; border-color: var(--azul); }
.btn.azul:hover { background: var(--azul-escuro); }
.btn.verde { background: var(--verde); color: #fff; border-color: var(--verde); }
.btn.laranja { background: #fff; color: var(--laranja); border-color: #f3c98b; }
.btn.perigo { color: var(--vermelho); }
.btn.peq { padding: 5px 10px; font-size: 13px; }
.btn:disabled { opacity: .5; cursor: default; }
.acoes { display: flex; gap: 8px; flex-wrap: wrap; }

/* Cards */
.grade { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.card { border: 1px solid var(--linha); border-radius: 12px; padding: 16px; background: #fff; }
.card.clicavel { cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.card.clicavel:hover { border-color: var(--azul); box-shadow: 0 2px 10px rgba(28,151,225,.08); }
.card .meta { color: var(--cinza); font-size: 13px; margin-top: 4px; }
.vazio { color: var(--cinza); padding: 18px; border: 1px dashed var(--linha); border-radius: 12px; text-align: center; }
.barra { height: 6px; background: var(--fundo); border-radius: 4px; overflow: hidden; margin-top: 10px; }
.barra > div { height: 100%; background: var(--azul); }

.pill { display: inline-block; padding: 3px 9px; border-radius: 99px; font-size: 12px; font-weight: 600; background: var(--fundo); color: var(--cinza); }
.pill.azul { background: var(--azul-claro); color: var(--azul-escuro); }
.pill.verde { background: var(--verde-claro); color: var(--verde); }
.pill.laranja { background: var(--laranja-claro); color: var(--laranja); }
.pill.vermelho { background: #fdecec; color: var(--vermelho); }

/* Formulários */
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 20px; }
.form .full { grid-column: 1 / -1; }
.campo label { display: block; font-weight: 600; font-size: 13px; margin-bottom: 6px; }
.campo .dica { color: var(--cinza); font-size: 12px; font-weight: 400; margin-left: 4px; }
.com-mic { position: relative; }
.com-mic input, .com-mic textarea, .com-mic select { width: 100%; border: 1px solid var(--linha); border-radius: 8px; padding: 9px 44px 9px 11px; background: #fff; }
.com-mic textarea { min-height: 76px; resize: vertical; line-height: 1.45; }
.com-mic input:focus, .com-mic textarea:focus { outline: none; border-color: var(--azul); box-shadow: 0 0 0 3px var(--azul-claro); }
.mic { position: absolute; right: 6px; top: 6px; width: 30px; height: 30px; border-radius: 50%; border: 0; background: var(--azul-claro); color: var(--azul); cursor: pointer; display: flex; align-items: center; justify-content: center; }
.mic svg { width: 15px; height: 15px; }
.mic.gravando { background: var(--vermelho); color: #fff; animation: pulso 1.2s infinite; }
@keyframes pulso { 0% { box-shadow: 0 0 0 0 rgba(220,38,38,.5); } 70% { box-shadow: 0 0 0 10px rgba(220,38,38,0); } 100% { box-shadow: 0 0 0 0 rgba(220,38,38,0); } }
.volume { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.volume input { width: 100%; border: 1px solid var(--linha); border-radius: 8px; padding: 9px 11px; }
.volume span { font-size: 12px; color: var(--cinza); display: block; margin-bottom: 4px; }
.check { display: flex; align-items: center; gap: 8px; font-weight: 500; }

/* Posts */
.post { border: 1px solid var(--linha); border-radius: 12px; padding: 16px; margin-bottom: 12px; background: #fff; }
.post.aprovado { border-left: 4px solid var(--verde); }
.post.ajuste { border-left: 4px solid var(--laranja); }
.post-topo { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.post-topo .data { font-weight: 700; }
.post-grid { display: grid; grid-template-columns: 140px 170px 1fr; gap: 10px; }
.post-grid input, .post-grid select, .post-grid textarea { width: 100%; border: 1px solid var(--linha); border-radius: 8px; padding: 8px 10px; }
.textos { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 12px; }
.bloco-texto { position: relative; }
.bloco-texto .rotulo { display: flex; justify-content: space-between; align-items: center; font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .4px; color: var(--cinza); margin-bottom: 6px; }
.copiar { border: 1px solid var(--linha); background: #fff; border-radius: 6px; padding: 3px 9px; font-size: 12px; cursor: pointer; color: var(--azul); font-weight: 600; }
.copiar.ok { color: var(--verde); border-color: var(--verde); }
.artes { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.artes a img { width: 110px; height: 138px; object-fit: cover; border-radius: 8px; border: 1px solid var(--linha); }
.status-prod { border: 1px solid var(--linha); border-radius: 8px; padding: 6px 8px; }

.painel-lateral { background: var(--fundo); border-radius: 12px; padding: 16px; white-space: pre-wrap; line-height: 1.5; }
details summary { cursor: pointer; font-weight: 600; padding: 8px 0; }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--linha); vertical-align: top; }
th { font-size: 12px; color: var(--cinza); text-transform: uppercase; letter-spacing: .4px; }

.refs { display: flex; gap: 10px; flex-wrap: wrap; }
.refs .ref { position: relative; }
.refs .ref img { width: 96px; height: 96px; object-fit: cover; border-radius: 8px; border: 1px solid var(--linha); display: block; }
.refs .ref button { position: absolute; top: 4px; right: 4px; border: 0; background: rgba(0,0,0,.6); color: #fff; border-radius: 50%; width: 22px; height: 22px; cursor: pointer; }

/* Modal e toast */
.modal { position: fixed; inset: 0; background: rgba(17,17,17,.35); display: flex; align-items: center; justify-content: center; z-index: 50; padding: 20px; }
.modal-box { background: #fff; border-radius: 14px; padding: 24px; width: 100%; max-width: 520px; max-height: 90vh; overflow: auto; }
.modal-box h3 { margin-bottom: 14px; }
.modal-box .acoes { justify-content: flex-end; margin-top: 18px; }
.senha { width: 100%; border: 1px solid var(--linha); border-radius: 8px; padding: 11px; }
.erro { color: var(--vermelho); font-size: 13px; margin-top: 8px; min-height: 18px; }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: var(--preto); color: #fff; padding: 11px 18px; border-radius: 10px; z-index: 60; }

.medidor { height: 10px; background: var(--fundo); border-radius: 6px; overflow: hidden; }
.medidor > div { height: 100%; background: var(--azul); }

@media (max-width: 800px) {
  .form, .textos { grid-template-columns: 1fr; }
  .post-grid { grid-template-columns: 1fr 1fr; }
  .post-grid .tema { grid-column: 1 / -1; }
  .volume { grid-template-columns: 1fr 1fr; }
  main { padding: 18px; }
  .topo { padding: 12px 16px; gap: 12px; flex-wrap: wrap; }
}
