/* =====================================================================
   MARÉ · Planejamento de Postagens
   ===================================================================== */

:root {
  --azul: #2f6fdb;
  --azul-esc: #1f54b3;
  --azul-prof: #0f2f6b;
  --azul-claro: #eaf1fd;
  --azul-bruma: #f3f7fe;

  --fundo: #f6f8fb;
  --superficie: #ffffff;
  --texto: #0f1b2d;
  --texto-2: #4a5a72;
  --texto-3: #8392a8;
  --borda: #e3e8f0;
  --borda-forte: #cfd7e3;

  --perigo: #d43c3c;
  --perigo-claro: #fdecec;
  --aviso: #b26b00;
  --aviso-claro: #fff6e5;

  --st-rascunho: #94a3b8;
  --st-aguardando: #f59e0b;
  --st-concluido: #16a34a;

  --raio: 12px;
  --raio-p: 8px;
  --sombra: 0 1px 2px rgba(15, 27, 45, .06), 0 4px 16px rgba(15, 27, 45, .06);
  --sombra-forte: 0 20px 60px rgba(8, 20, 45, .28);

  --fonte: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --fonte-ig: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

  --sidebar: 276px;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--fonte);
  font-size: 15px;
  line-height: 1.45;
  color: var(--texto);
  background: var(--fundo);
  -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
img, video { display: block; max-width: 100%; }
svg { display: block; width: 100%; height: 100%; }
code { background: var(--azul-claro); padding: 1px 6px; border-radius: 6px; font-size: .9em; }
.muted { color: var(--texto-3); }

:focus-visible { outline: 2px solid var(--azul); outline-offset: 2px; }

/* ---------- Botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 16px;
  border-radius: 10px; border: 1px solid transparent;
  font-weight: 600; font-size: 14px; white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s, transform .05s, box-shadow .15s;
}
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn [data-icone], .btn .ico { width: 18px; height: 18px; flex: none; }
.btn-pri { background: var(--azul); color: #fff; box-shadow: 0 1px 2px rgba(47, 111, 219, .3); }
.btn-pri:hover:not(:disabled) { background: var(--azul-esc); }
.btn-sec { background: var(--superficie); border-color: var(--borda-forte); color: var(--texto); }
.btn-sec:hover:not(:disabled) { background: var(--azul-bruma); border-color: var(--azul); color: var(--azul-esc); }
.btn-perigo { background: var(--perigo); color: #fff; }
.btn-perigo:hover:not(:disabled) { background: #b72f2f; }
.btn-fantasma { background: transparent; color: var(--texto-2); }
.btn-fantasma:hover { background: var(--azul-bruma); color: var(--azul-esc); }
.btn-fantasma.perigo:hover { background: var(--perigo-claro); color: var(--perigo); }
.btn-grande { height: 46px; font-size: 15px; width: 100%; }
.btn-destaque { height: 44px; padding: 0 20px; font-size: 15px; border-radius: 12px; }

.btn-icone {
  display: inline-grid; place-items: center;
  width: 38px; height: 38px; padding: 9px;
  border: 0; background: transparent; border-radius: 10px; color: var(--texto-2);
}
.btn-icone:hover { background: var(--azul-bruma); color: var(--azul-esc); }

/* ---------- Campos ---------- */
.campo { display: flex; flex-direction: column; gap: 6px; }
.campo > span { font-size: 13px; font-weight: 600; color: var(--texto-2); }
.campo input, .campo textarea, .campo select {
  width: 100%; height: 42px; padding: 0 12px;
  border: 1px solid var(--borda-forte); border-radius: 10px; background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
.campo textarea { height: auto; padding: 10px 12px; resize: vertical; line-height: 1.5; }
.campo input:focus, .campo textarea:focus, .campo select:focus {
  outline: none; border-color: var(--azul); box-shadow: 0 0 0 3px rgba(47, 111, 219, .15);
}
.campo.invalido input, .campo.invalido textarea { border-color: var(--perigo); }
.campo-ajuda { font-size: 12px; color: var(--texto-3); }
.campo-erro { font-size: 12px; color: var(--perigo); }
.erro { color: var(--perigo); background: var(--perigo-claro); padding: 10px 12px; border-radius: 10px; font-size: 14px; margin: 0; }

/* ---------- Marca ---------- */
.marca { display: flex; align-items: center; gap: 10px; }
.marca-icone { width: 34px; height: 34px; color: var(--azul); }
.marca-nome { font-weight: 800; font-size: 22px; letter-spacing: -.02em; color: var(--azul-prof); }
.marca-p .marca-icone { width: 28px; height: 28px; }
.marca-p .marca-nome { font-size: 19px; }

/* ---------- Carregando ---------- */
.tela-carregando { position: fixed; inset: 0; display: grid; place-items: center; background: var(--fundo); z-index: 50; }
.carregando-marca { width: 64px; height: 64px; color: var(--azul); animation: pulso 1.4s ease-in-out infinite; }
@keyframes pulso { 0%, 100% { opacity: .35; transform: scale(.94); } 50% { opacity: 1; transform: scale(1); } }

/* ---------- Telas centrais ---------- */
.tela-centro { min-height: 100%; display: grid; place-items: center; padding: 24px; }
.cartao-config { max-width: 480px; background: #fff; padding: 32px; border-radius: 18px; box-shadow: var(--sombra); }
.cartao-config h1 { font-size: 20px; margin: 20px 0 8px; }

/* ---------- Login ---------- */
.tela-login {
  position: relative; min-height: 100%; display: grid; place-items: center; padding: 24px;
  background: radial-gradient(1200px 600px at 20% -10%, #5b93ef 0%, transparent 60%),
              linear-gradient(160deg, #2f6fdb 0%, #1f54b3 55%, #163f8a 100%);
  overflow: hidden;
}
.login-ondas { position: absolute; inset: auto 0 0 0; height: 38vh; pointer-events: none; }
.login-ondas svg { position: absolute; inset: 0; }
.login-ondas svg:first-child path { fill: rgba(255, 255, 255, .08); }
.login-ondas svg:last-child path { fill: rgba(255, 255, 255, .1); }
.cartao-login {
  position: relative; width: 100%; max-width: 400px;
  background: #fff; border-radius: 22px; padding: 36px 32px 32px;
  box-shadow: 0 30px 80px rgba(6, 22, 60, .35);
  display: flex; flex-direction: column; gap: 16px;
}
.marca-login { display: flex; align-items: center; gap: 12px; }
.marca-login .marca-icone { width: 44px; height: 44px; }
.marca-login .marca-nome { font-size: 30px; }
.login-sub { margin: -6px 0 8px; color: var(--texto-2); }
.campo-senha { position: relative; }
.campo-senha input { padding-right: 84px; }
.btn-olho {
  position: absolute; right: 6px; top: 6px; height: 30px; padding: 0 10px;
  border: 0; border-radius: 8px; background: transparent; color: var(--azul-esc); font-size: 13px; font-weight: 600;
}
.btn-olho:hover { background: var(--azul-bruma); }

/* ---------- Layout do app ---------- */
.app { display: flex; min-height: 100%; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--sidebar);
  display: flex; flex-direction: column;
  background: var(--superficie); border-right: 1px solid var(--borda);
  padding: 20px 14px 14px; z-index: 30;
}
.sidebar-topo { display: flex; align-items: center; justify-content: space-between; padding: 0 8px 18px; }
.sidebar-secao { padding: 6px 10px 8px; }
.sidebar-titulo { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--texto-3); }
.lista-clientes { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; margin: 0 -4px; padding: 0 4px; }
.item-cliente {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 8px 10px; border: 0; border-radius: 12px; background: transparent; text-align: left;
  transition: background .12s;
}
.item-cliente:hover { background: var(--azul-bruma); }
.item-cliente.ativo { background: var(--azul-claro); }
.item-cliente.ativo .item-nome { color: var(--azul-prof); }
.item-cliente .avatar { width: 38px; height: 38px; font-size: 13px; }
.item-textos { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.item-nome { font-weight: 600; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item-arroba { font-size: 12.5px; color: var(--texto-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item-contagem {
  min-width: 24px; height: 22px; padding: 0 7px; border-radius: 11px;
  display: grid; place-items: center; font-size: 12px; font-weight: 700;
  background: var(--fundo); color: var(--texto-2);
}
.item-cliente.ativo .item-contagem { background: #fff; color: var(--azul-esc); }
.btn-novo-cliente {
  display: flex; align-items: center; gap: 10px; margin: 8px 0 0;
  height: 44px; padding: 0 14px; border-radius: 12px;
  border: 1.5px dashed var(--borda-forte); background: transparent; color: var(--texto-2); font-weight: 600;
}
.btn-novo-cliente [data-icone] { width: 18px; height: 18px; }
.btn-novo-cliente:hover { border-color: var(--azul); color: var(--azul-esc); background: var(--azul-bruma); }

.sidebar-rodape { border-top: 1px solid var(--borda); margin-top: 14px; padding-top: 14px; display: flex; flex-direction: column; gap: 2px; }
.uso { padding: 0 10px 10px; }
.uso-linha { display: flex; justify-content: space-between; font-size: 12px; color: var(--texto-2); margin-bottom: 6px; }
.uso-linha span:first-child { font-weight: 600; }
.uso-barra { height: 6px; border-radius: 3px; background: var(--fundo); overflow: hidden; }
.uso-barra span { display: block; height: 100%; width: 0; background: var(--azul); border-radius: 3px; transition: width .4s; }
.uso.alto .uso-barra span { background: var(--st-aguardando); }
.uso.cheio .uso-barra span { background: var(--perigo); }
.sync { display: flex; align-items: center; gap: 8px; padding: 2px 10px 8px; font-size: 12px; color: var(--texto-3); }
.sync-ponto { width: 8px; height: 8px; border-radius: 50%; background: var(--st-rascunho); }
.sync.ok .sync-ponto { background: var(--st-concluido); box-shadow: 0 0 0 3px rgba(22, 163, 74, .15); }
.sync.offline .sync-ponto { background: var(--perigo); }
.link-rodape {
  display: flex; align-items: center; gap: 10px; height: 36px; padding: 0 10px;
  border: 0; background: transparent; border-radius: 10px; color: var(--texto-2); font-size: 13.5px; font-weight: 500; text-align: left;
}
.link-rodape [data-icone] { width: 17px; height: 17px; }
.link-rodape:hover { background: var(--azul-bruma); color: var(--azul-esc); }
.link-rodape.link-perigo:hover { background: var(--perigo-claro); color: var(--perigo); }

.conteudo { flex: 1; margin-left: var(--sidebar); min-width: 0; }
.area-cliente { max-width: 975px; margin: 0 auto; padding: 32px 28px 64px; }
.so-tablet { display: none !important; }
.sidebar-veu { display: none; }

/* ---------- Avatar ---------- */
.avatar {
  display: grid; place-items: center; flex: none; overflow: hidden;
  width: 40px; height: 40px; border-radius: 50%; background: var(--fundo);
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-iniciais {
  background: var(--cor); color: #fff; font-weight: 700; letter-spacing: .02em;
  background-image: linear-gradient(145deg, rgba(255, 255, 255, .18), rgba(0, 0, 0, .08));
}

/* ---------- Avisos ---------- */
.aviso {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px; border-radius: 12px; margin-bottom: 20px;
  background: var(--azul-bruma); border: 1px solid var(--azul-claro); color: var(--azul-prof); font-size: 14px;
}
.aviso [data-icone] { width: 18px; height: 18px; flex: none; color: var(--azul); }
.aviso.atencao { background: var(--aviso-claro); border-color: #fde6b8; color: #6b4300; }
.aviso.atencao [data-icone] { color: var(--aviso); }
.aviso p { margin: 0; flex: 1; }
.aviso .btn { height: 32px; font-size: 13px; }

/* ---------- Perfil (cabeçalho estilo Instagram) ---------- */
.perfil { display: flex; align-items: center; gap: 56px; padding: 8px 32px 32px; }
.perfil-foto { flex: none; padding: 4px; border-radius: 50%; background: conic-gradient(from 200deg, #7fb0ff, var(--azul), #1b4aa3, #5ec2e6, #7fb0ff); }
.perfil-foto .avatar { width: 150px; height: 150px; font-size: 46px; border: 4px solid var(--fundo); }
.perfil-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.perfil-linha { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.perfil-arroba { font-family: var(--fonte-ig); font-size: 22px; font-weight: 400; margin: 0; overflow-wrap: anywhere; }
.perfil-nome { font-weight: 700; font-size: 15px; }
.perfil-numeros { display: flex; gap: 28px; flex-wrap: wrap; font-size: 15px; }
.perfil-numeros b { font-weight: 700; }
.perfil-status { display: flex; gap: 8px; flex-wrap: wrap; }
.chip-status {
  display: inline-flex; align-items: center; gap: 6px;
  height: 26px; padding: 0 10px; border-radius: 13px; font-size: 12.5px; font-weight: 600;
  background: var(--superficie); border: 1px solid var(--borda); color: var(--texto-2);
}
.ponto { width: 8px; height: 8px; border-radius: 50%; background: var(--c); flex: none; }

.acoes-perfil { display: flex; align-items: center; gap: 10px; justify-content: space-between; flex-wrap: wrap; margin-bottom: 4px; }
.acoes-perfil .grupo { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* ---------- Abas (grade / calendário) ---------- */
.abas { display: flex; align-items: center; justify-content: center; gap: 56px; border-top: 1px solid var(--borda-forte); margin-top: 22px; position: relative; }
.aba {
  display: flex; align-items: center; gap: 8px; height: 52px; margin-top: -1px;
  border: 0; border-top: 1px solid transparent; background: transparent;
  font-size: 12.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--texto-3);
}
.aba [data-icone] { width: 14px; height: 14px; }
.aba.ativa { color: var(--texto); border-top-color: var(--texto); }
.aba:hover { color: var(--texto); }
.abas-extra { position: absolute; right: 0; top: 50%; transform: translateY(-50%); }
.btn-ordem { height: 32px; padding: 0 10px; font-size: 12.5px; font-weight: 600; gap: 6px; }
.btn-ordem [data-icone] { width: 15px; height: 15px; }

/* ---------- Grade ---------- */
.grade { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; }
.celula {
  position: relative; aspect-ratio: 3 / 4; overflow: hidden;
  background: #dfe5ee; border: 0; padding: 0; cursor: pointer;
}
.celula img, .celula video { width: 100%; height: 100%; object-fit: cover; }
.celula-tipo { position: absolute; top: 9px; right: 9px; width: 22px; height: 22px; color: #fff; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .45)); }
.celula-status {
  position: absolute; top: 10px; left: 10px; width: 10px; height: 10px; border-radius: 50%;
  background: var(--c); box-shadow: 0 0 0 2px #fff, 0 1px 4px rgba(0, 0, 0, .35);
}
.celula-sobre {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  background: rgba(8, 18, 36, .5); color: #fff; opacity: 0; transition: opacity .15s;
  font-weight: 700; text-align: center; padding: 12px;
}
.celula-sobre .data { font-size: 16px; }
.celula-sobre .hora { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; }
.celula-sobre .hora [data-icone] { width: 15px; height: 15px; }
.celula-sobre .st { font-size: 12px; font-weight: 600; opacity: .9; }
.celula:hover .celula-sobre, .celula:focus-visible .celula-sobre { opacity: 1; }
.celula-rotulo {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 10px 8px;
  background: linear-gradient(transparent, rgba(0, 0, 0, .55)); color: #fff;
  font-size: 12px; font-weight: 700; text-align: left; letter-spacing: .01em;
}
.celula:hover .celula-rotulo { opacity: 0; }
.celula-vazia { display: grid; place-items: center; color: var(--texto-3); }
.celula-vazia [data-icone] { width: 34px; height: 34px; }

.vazio {
  text-align: center; padding: 64px 20px; color: var(--texto-2);
  display: flex; flex-direction: column; align-items: center; gap: 12px;
}
.vazio-icone { width: 72px; height: 72px; padding: 18px; border-radius: 50%; border: 2px solid var(--texto); color: var(--texto); }
.vazio h3 { margin: 6px 0 0; font-size: 26px; font-weight: 800; color: var(--texto); }
.vazio p { margin: 0 0 8px; max-width: 360px; }

/* ---------- Calendário ---------- */
.cal-topo { display: flex; align-items: center; justify-content: space-between; padding: 18px 0 14px; }
.cal-titulo { font-size: 18px; font-weight: 700; margin: 0; }
.cal-nav { display: flex; gap: 4px; align-items: center; }
.cal-nav .btn-icone { width: 34px; height: 34px; padding: 8px; }
.cal {
  display: grid; grid-template-columns: repeat(7, minmax(0, 1fr));
  background: var(--borda); gap: 1px; border: 1px solid var(--borda); border-radius: var(--raio); overflow: hidden;
}
.cal-dow { background: var(--azul-bruma); padding: 8px; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--texto-2); text-align: center; }
.cal-dia { background: #fff; min-height: 116px; padding: 6px; display: flex; flex-direction: column; gap: 4px; position: relative; }
.cal-dia.fora { background: #fafbfd; }
.cal-dia.fora .cal-num { color: var(--borda-forte); }
.cal-num { font-size: 12.5px; font-weight: 700; color: var(--texto-2); width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; }
.cal-dia.hoje .cal-num { background: var(--azul); color: #fff; }
.cal-add {
  position: absolute; top: 6px; right: 6px; width: 24px; height: 24px; padding: 5px;
  border: 0; border-radius: 6px; background: transparent; color: var(--texto-3); opacity: 0;
}
.cal-dia:hover .cal-add { opacity: 1; }
.cal-add:hover { background: var(--azul-claro); color: var(--azul-esc); }
.cal-post {
  display: flex; align-items: center; gap: 6px; width: 100%;
  padding: 3px; border: 1px solid var(--borda); border-radius: 8px; background: #fff; text-align: left;
  font-size: 12px; font-weight: 600;
}
.cal-post:hover { border-color: var(--azul); background: var(--azul-bruma); }
.cal-post .mini { width: 26px; height: 34px; border-radius: 4px; overflow: hidden; background: #dfe5ee; flex: none; }
.cal-post .mini img, .cal-post .mini video { width: 100%; height: 100%; object-fit: cover; }
.cal-post .ponto { margin-left: auto; margin-right: 3px; }

/* ---------- Modal ---------- */
.modal-fundo {
  position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 24px;
  background: rgba(6, 14, 30, .72); opacity: 0; transition: opacity .18s;
}
.modal-fundo.show { opacity: 1; }
.modal-fechar {
  position: fixed; top: 14px; right: 16px; width: 40px; height: 40px; padding: 8px;
  border: 0; background: transparent; color: #fff; border-radius: 50%; z-index: 2;
}
.modal-fechar:hover { background: rgba(255, 255, 255, .12); }
.modal-seta {
  position: fixed; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; padding: 10px;
  border: 0; border-radius: 50%; background: #fff; color: var(--texto); box-shadow: var(--sombra); z-index: 2;
}
.modal-seta.esq { left: 20px; }
.modal-seta.dir { right: 20px; }
.modal-seta:disabled { opacity: 0; pointer-events: none; }

/* Visualização da publicação (estilo Instagram) */
.post {
  display: flex; background: #fff; border-radius: 6px; overflow: hidden;
  width: min(1180px, calc(100vw - 140px)); height: min(860px, calc(100vh - 64px));
  box-shadow: var(--sombra-forte); transform: scale(.98); transition: transform .18s;
}
.modal-fundo.show .post, .modal-fundo.show .editor { transform: none; }
.post-midia { flex: 1; min-width: 0; background: #000; position: relative; display: grid; place-items: center; }
.post-lateral { width: 400px; flex: none; display: flex; flex-direction: column; border-left: 1px solid var(--borda); font-family: var(--fonte-ig); }
.post-cab { display: flex; align-items: center; gap: 12px; padding: 14px 12px 14px 16px; border-bottom: 1px solid var(--borda); }
.post-cab .avatar { width: 34px; height: 34px; font-size: 12px; }
.post-cab-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.post-cab-txt b { font-size: 14px; font-weight: 600; }
.post-cab-txt span { font-size: 12px; color: var(--texto-3); }
.post-cab .btn-icone { width: 34px; height: 34px; padding: 7px; }
.post-corpo { flex: 1; overflow-y: auto; padding: 16px; }
.post-legenda { display: flex; gap: 12px; }
.post-legenda .avatar { width: 34px; height: 34px; font-size: 12px; }
.post-legenda-txt { font-size: 14px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; min-width: 0; }
.post-legenda-txt b { font-weight: 600; margin-right: 6px; }
.post-legenda-vazia { color: var(--texto-3); font-style: italic; }
.post-rodape { border-top: 1px solid var(--borda); padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 12px; font-family: var(--fonte); }
.post-quando { display: flex; align-items: center; gap: 10px; }
.post-quando [data-icone] { width: 20px; height: 20px; color: var(--azul); flex: none; }
.post-quando b { display: block; font-size: 14px; }
.post-quando span { font-size: 13px; color: var(--texto-2); }
.post-tipo { font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--texto-3); }
.segmentado { display: flex; gap: 4px; background: var(--fundo); padding: 4px; border-radius: 12px; }
.segmentado button {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px;
  height: 34px; padding: 0 6px; border: 0; border-radius: 9px; background: transparent;
  font-size: 12.5px; font-weight: 600; color: var(--texto-2); white-space: nowrap;
}
.segmentado button:hover { color: var(--texto); }
.segmentado button.ativo { background: #fff; color: var(--texto); box-shadow: 0 1px 3px rgba(15, 27, 45, .12); }
.post-botoes { display: flex; gap: 8px; }
.post-botoes .btn { flex: 1; }
.faixa-alerta { background: var(--aviso-claro); color: #6b4300; font-size: 13px; padding: 10px 16px; display: flex; gap: 10px; align-items: center; }
.faixa-alerta button { margin-left: auto; height: 30px; font-size: 12.5px; }

/* Carrossel */
.carrossel { position: absolute; inset: 0; overflow: hidden; }
.carrossel-trilho { display: flex; height: 100%; transition: transform .3s ease; }
.carrossel-item { flex: 0 0 100%; height: 100%; position: relative; }
.carrossel-item img, .carrossel-item video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.car-seta {
  position: absolute; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; padding: 7px;
  border: 0; border-radius: 50%; background: rgba(255, 255, 255, .85); color: #111; box-shadow: 0 1px 4px rgba(0, 0, 0, .3);
}
.car-seta.esq { left: 12px; }
.car-seta.dir { right: 12px; }
.car-seta:hover { background: #fff; }
.car-seta[hidden] { display: none; }
.car-pontos { position: absolute; bottom: 14px; left: 0; right: 0; display: flex; justify-content: center; gap: 4px; pointer-events: none; }
.car-pontos span { width: 6px; height: 6px; border-radius: 50%; background: rgba(255, 255, 255, .45); transition: background .2s; }
.car-pontos span.ativo { background: #fff; }
.car-contador { position: absolute; top: 14px; right: 14px; background: rgba(18, 18, 18, .7); color: #fff; font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 12px; }

/* Editor */
.editor {
  display: flex; flex-direction: column; background: #fff; border-radius: 16px; overflow: hidden;
  width: min(1120px, calc(100vw - 48px)); height: min(820px, calc(100vh - 48px));
  box-shadow: var(--sombra-forte); transform: scale(.98); transition: transform .18s;
}
.editor-cab { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--borda); }
.editor-cab h2 { margin: 0; font-size: 16px; font-weight: 700; text-align: center; flex: 1; }
.editor-cab .btn { height: 34px; }
.editor-corpo { flex: 1; display: flex; min-height: 0; }
.editor-midia { flex: 1; min-width: 0; display: flex; flex-direction: column; background: var(--fundo); border-right: 1px solid var(--borda); }
.editor-palco { flex: 1; min-height: 0; position: relative; background: #0b0f17; display: grid; place-items: center; }
.editor-palco > img, .editor-palco > video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.soltar {
  position: absolute; inset: 16px; border: 2px dashed rgba(255, 255, 255, .28); border-radius: 16px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  color: #dfe7f5; text-align: center; padding: 24px;
}
.soltar [data-icone] { width: 64px; height: 64px; color: #8fb3f0; }
.soltar p { margin: 0; font-size: 18px; font-weight: 600; }
.soltar small { color: #9aa8bf; }
.editor-midia.arrastando .soltar, .editor-midia.arrastando .editor-tira { border-color: var(--azul); background: rgba(47, 111, 219, .12); }
.editor-tira { display: flex; gap: 8px; padding: 12px; overflow-x: auto; border-top: 1px solid var(--borda); background: #fff; min-height: 104px; align-items: center; }
.miniatura {
  position: relative; flex: none; width: 60px; height: 80px; border-radius: 8px; overflow: hidden;
  border: 2px solid transparent; background: #dfe5ee; cursor: pointer; padding: 0;
}
.miniatura.ativa { border-color: var(--azul); }
.miniatura img, .miniatura video { width: 100%; height: 100%; object-fit: cover; }
.miniatura .mini-tipo { position: absolute; bottom: 4px; left: 4px; width: 14px; height: 14px; color: #fff; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .6)); }
.miniatura .mini-num { position: absolute; top: 3px; left: 3px; background: rgba(0, 0, 0, .55); color: #fff; font-size: 10px; font-weight: 700; padding: 0 5px; border-radius: 6px; }
.btn-add-midia {
  flex: none; width: 60px; height: 80px; border-radius: 8px; border: 1.5px dashed var(--borda-forte);
  background: transparent; color: var(--texto-2); padding: 18px;
}
.btn-add-midia:hover { border-color: var(--azul); color: var(--azul); background: var(--azul-bruma); }
.palco-acoes { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); display: flex; gap: 6px; background: rgba(15, 20, 30, .78); padding: 5px; border-radius: 12px; }
.palco-acoes button { height: 32px; padding: 0 10px; border: 0; border-radius: 8px; background: transparent; color: #fff; font-size: 12.5px; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.palco-acoes button svg { width: 15px; height: 15px; }
.palco-acoes button:hover:not(:disabled) { background: rgba(255, 255, 255, .14); }
.palco-acoes button:disabled { opacity: .35; cursor: default; }
.palco-acoes .remover:hover { background: rgba(212, 60, 60, .9); }
.editor-form { width: 380px; flex: none; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 16px; }
.editor-quem { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 14px; }
.editor-quem .avatar { width: 30px; height: 30px; font-size: 11px; }
.editor-form textarea { min-height: 220px; }
.contador { align-self: flex-end; font-size: 12px; color: var(--texto-3); margin-top: -2px; }
.contador.excedido { color: var(--perigo); font-weight: 700; }
.linha-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.editor-tipo { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--texto-2); background: var(--fundo); border-radius: 10px; padding: 10px 12px; }
.editor-tipo svg { width: 18px; height: 18px; color: var(--azul); flex: none; }
.progresso { font-size: 13px; color: var(--azul-esc); display: flex; align-items: center; gap: 8px; }
.giro { width: 16px; height: 16px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: giro .8s linear infinite; flex: none; }
@keyframes giro { to { transform: rotate(360deg); } }

/* Formulário de cliente */
.janela {
  width: min(460px, calc(100vw - 32px)); max-height: calc(100vh - 48px); overflow-y: auto;
  background: #fff; border-radius: 18px; box-shadow: var(--sombra-forte); padding: 24px;
  display: flex; flex-direction: column; gap: 18px; transform: scale(.98); transition: transform .18s;
}
.modal-fundo.show .janela { transform: none; }
.janela h2 { margin: 0; font-size: 19px; }
.janela-acoes { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.janela-acoes .espaco { flex: 1; }
.foto-escolha { display: flex; align-items: center; gap: 16px; }
.foto-escolha .avatar { width: 84px; height: 84px; font-size: 28px; }
.foto-escolha-btns { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.foto-escolha-btns .btn { height: 34px; font-size: 13px; }
.cores { display: flex; gap: 8px; flex-wrap: wrap; }
.cor {
  width: 30px; height: 30px; border-radius: 50%; border: 0; background: var(--c);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .0);
}
.cor.ativa { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--c); }
.prefixo { position: relative; }
.prefixo::before { content: '@'; position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--texto-3); }
.prefixo input { padding-left: 28px; }

/* Caixa de confirmação */
.dialogo-fundo { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 20px; background: rgba(6, 14, 30, .55); opacity: 0; transition: opacity .15s; }
.dialogo-fundo.show { opacity: 1; }
.dialogo { width: min(440px, 100%); background: #fff; border-radius: 16px; padding: 22px; box-shadow: var(--sombra-forte); display: flex; flex-direction: column; gap: 14px; }
.dialogo h3 { margin: 0; font-size: 18px; }
.dialogo-msg { color: var(--texto-2); font-size: 14.5px; }
.dialogo-msg p { margin: 0 0 8px; }
.dialogo-msg p:last-child { margin: 0; }
.dialogo-acoes { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; margin-top: 4px; }

/* Avisos rápidos */
.toasts { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 100; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast {
  background: #13213a; color: #fff; padding: 11px 16px; border-radius: 12px; font-size: 14px; font-weight: 500;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .2); opacity: 0; transform: translateY(10px); transition: opacity .2s, transform .2s; max-width: min(520px, 90vw);
}
.toast.show { opacity: 1; transform: none; }
.toast-ok { background: #13502e; }
.toast-erro { background: #8f2424; }

/* =====================================================================
   Responsivo
   ===================================================================== */
@media (max-width: 1100px) {
  .post-lateral { width: 340px; }
  .editor-form { width: 340px; }
}

@media (max-width: 960px) {
  .so-tablet { display: inline-grid !important; }
  .barra-mobile.so-tablet { display: flex !important; }
  .sidebar { transform: translateX(-100%); transition: transform .22s ease; box-shadow: none; }
  .app.menu-aberto .sidebar { transform: none; box-shadow: var(--sombra-forte); }
  .app.menu-aberto .sidebar-veu { display: block; position: fixed; inset: 0; background: rgba(6, 14, 30, .4); z-index: 25; }
  .conteudo { margin-left: 0; }
  .barra-mobile {
    position: sticky; top: 0; z-index: 20; align-items: center; justify-content: space-between;
    height: 56px; padding: 0 10px; background: rgba(255, 255, 255, .92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--borda);
  }
  .barra-mobile > span { width: 38px; }
  .area-cliente { padding: 20px 16px 48px; }
  .perfil { gap: 28px; padding: 8px 4px 24px; }
  .perfil-foto .avatar { width: 110px; height: 110px; font-size: 36px; }

  .post, .editor { flex-direction: column; width: calc(100vw - 24px); height: calc(100vh - 24px); }
  .modal-fundo { padding: 12px; }
  .post-midia { flex: 1 1 55%; }
  .post-lateral { width: auto; flex: 1 1 45%; min-height: 0; border-left: 0; border-top: 1px solid var(--borda); }
  .modal-seta { display: none; }
  .modal-fechar { top: 16px; right: 16px; background: rgba(0, 0, 0, .5); }
  .editor-corpo { flex-direction: column; overflow-y: auto; }
  .editor-midia { flex: none; height: 52vh; border-right: 0; border-bottom: 1px solid var(--borda); }
  .editor-form { width: auto; overflow: visible; }
}

@media (max-width: 640px) {
  .perfil { flex-direction: column; align-items: flex-start; gap: 16px; }
  .abas { gap: 28px; justify-content: flex-start; }
  .abas-extra { position: static; transform: none; margin-left: auto; }
  .cal-dia { min-height: 84px; padding: 4px; }
  .cal-post span.h { display: none; }
  .cal-post .ponto { display: none; }
  .linha-2 { grid-template-columns: 1fr; }
}
