/* ---------- posts ---------- */
.page.wide { max-width: 1400px; }
.navlabel.first { margin-top: 0; }
.perms { display: flex; gap: 12px; margin-top: 6px; }
.perms label.check { font-size: 12px; margin: 0; }
.tr.users { grid-template-columns: 1.2fr 1.4fr 1fr 1.4fr 1fr; }

.st { display: inline-block; font-size: 12px; padding: 3px 10px; border-radius: 99px; font-weight: 600; background: var(--panel2); color: var(--muted); }
.st.agendado, .chipost.agendado { --c: #3B82F6; } .st.publicado, .chipost.publicado { --c: var(--ok); }
.st.erro, .chipost.erro, .st.parcial, .chipost.parcial { --c: var(--err); } .st.publicando, .chipost.publicando { --c: var(--warn); }
.st.rascunho, .chipost.rascunho { --c: #737373; }
.st[class*=" "] { background: color-mix(in srgb, var(--c) 18%, transparent); color: var(--c); }
.legend { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; }

.calnav { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.calnav h2 { margin: 0; min-width: 190px; text-align: center; }
.calendar { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.dow { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; padding: 4px 6px; }
.day { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; min-height: 120px; padding: 6px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.day.other { opacity: .45; }
.day.today { border-color: var(--accent); }
.dayhead { display: flex; justify-content: space-between; align-items: center; font-size: 13px; font-weight: 700; }
.day.today .dayhead span { color: var(--accent); }
.dayhead .add { opacity: 0; width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; background: var(--panel2); color: var(--accent); text-decoration: none; font-weight: 800; }
.day:hover .add { opacity: 1; }
.chipost { display: flex; gap: 6px; align-items: center; background: var(--panel2); border-left: 3px solid var(--c, var(--line)); border-radius: 6px; padding: 4px 6px; color: var(--fg); text-decoration: none !important; font-size: 12px; min-width: 0; }
.chipost img { width: 28px; height: 28px; object-fit: cover; border-radius: 4px; flex: none; }
.chipost .vid { width: 28px; height: 28px; display: grid; place-items: center; background: #000; border-radius: 4px; flex: none; font-size: 10px; }
.chipost .tx { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; line-height: 1.3; }
.chipost small { color: var(--muted); }
.drafts { display: flex; gap: 8px; flex-wrap: wrap; }

.results { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.res { background: var(--panel); border: 1px solid var(--line); border-left: 4px solid var(--muted); border-radius: 10px; padding: 10px 14px; font-size: 14px; display: flex; gap: 10px; align-items: baseline; max-width: 100%; }
.res.publicado { border-left-color: var(--ok); } .res.erro { border-left-color: var(--err); color: #fca5a5; }

.composer { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
.kinds { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 16px; }
.kinds button { background: var(--panel2); border: 1px solid var(--line); color: var(--fg); border-radius: 10px; padding: 12px; font: inherit; cursor: pointer; display: flex; flex-direction: column; gap: 2px; }
.kinds button.on { border-color: var(--accent); color: var(--accent); }
.kinds small { color: var(--muted); font-size: 12px; }
.mediagrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.mitem { position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: var(--panel2); border: 1px solid var(--line); }
.mitem img, .mitem video { width: 100%; height: 100%; object-fit: cover; display: block; }
.mbadge { position: absolute; left: 6px; top: 6px; background: rgba(0,0,0,.7); font-size: 11px; padding: 2px 6px; border-radius: 6px; }
.mctl { position: absolute; inset: auto 0 0 0; display: flex; justify-content: center; gap: 4px; padding: 6px; background: linear-gradient(transparent, rgba(0,0,0,.7)); }
.mctl button { background: rgba(0,0,0,.6); color: #fff; border: 0; width: 28px; height: 28px; border-radius: 6px; cursor: pointer; }
.mitem.add { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; border-style: dashed; cursor: pointer; color: var(--muted); text-align: center; padding: 8px; margin: 0; }
.mitem.add span { font-size: 28px; color: var(--accent); }
.mitem.uploading { display: flex; flex-direction: column; justify-content: center; gap: 6px; padding: 12px; }
.bar { height: 6px; background: var(--line); border-radius: 99px; overflow: hidden; }
.bar div { height: 100%; background: var(--accent); transition: width .2s; }
.cover { display: flex; gap: 12px; align-items: center; margin-top: 14px; }
.cover img { width: 64px; height: 112px; object-fit: cover; border-radius: 8px; }
.cover p { margin: 4px 0 8px; }
.counter { text-align: right; margin-top: -6px; }

.phone { position: sticky; top: 20px; background: #000; border: 1px solid var(--line); border-radius: 28px; padding: 14px 12px 18px; }
.ph-head { display: flex; align-items: center; gap: 8px; font-size: 13px; margin-bottom: 10px; }
.ph-av { width: 28px; height: 28px; border-radius: 99px; background: linear-gradient(135deg, #F97316, #DB2777); }
.ph-media { aspect-ratio: 4 / 5; background: #111; border-radius: 6px; overflow: hidden; position: relative; }
.phone.story .ph-media, .phone.reels .ph-media { aspect-ratio: 9 / 16; }
.ph-inner, .ph-inner img, .ph-inner video { width: 100%; height: 100%; object-fit: cover; display: block; }
.ph-count { position: absolute; right: 8px; top: 8px; background: rgba(0,0,0,.6); font-size: 11px; padding: 2px 8px; border-radius: 99px; }
.ph-empty { height: 100%; display: grid; place-items: center; color: var(--muted); }
.ph-cap { font-size: 13px; margin-top: 10px; white-space: pre-wrap; max-height: 160px; overflow: auto; line-height: 1.45; }

@media (max-width: 900px) {
  .calendar { grid-template-columns: 1fr; }
  .dow { display: none; }
  .day { min-height: 0; }
  .day.other, .day:not(.has):not(.today) { display: none; }
  .composer { grid-template-columns: 1fr; }
  .phone { position: static; max-width: 320px; }
}

/* planejamento */
.plan { display: grid; grid-template-columns: 420px minmax(0, 1fr); gap: 24px; align-items: start; margin-top: 8px; }
.planlist { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow: auto; }
.planhead { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.planitem { display: grid; grid-template-columns: auto 48px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); font-size: 13px; }
.pi-body { min-width: 0; } .pi-body input, .pi-body textarea { max-width: 100%; box-sizing: border-box; }
.planitem label.check { margin: 0; }
.pi-thumb { width: 48px; height: 60px; border-radius: 6px; overflow: hidden; background: var(--panel2); display: grid; place-items: center; color: var(--muted); font-size: 12px; }
.pi-thumb img { width: 100%; height: 100%; object-fit: cover; }
.pi-cap { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 230px; }
.pi-body .st { margin-left: 4px; font-size: 11px; padding: 1px 8px; }
.planprev { min-width: 0; }
#planslides { display: grid; grid-template-columns: repeat(auto-fill, minmax(400px, 1fr)); gap: 14px; }
.plthumb { position: relative; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 8px; background: #fff; border: 1px solid var(--line); }
.plscale { width: 1600px; height: 900px; transform-origin: top left; }
.plnum { position: absolute; right: 8px; bottom: 6px; background: rgba(0,0,0,.6); color: #fff; font-size: 11px; padding: 1px 7px; border-radius: 99px; }
@media (max-width: 1100px) { .plan { grid-template-columns: 1fr; } .planlist { position: static; max-height: none; } }

/* serviços do cliente */
.services { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.services label { display: flex; flex-direction: column; gap: 2px; background: var(--panel2); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px 12px 40px; position: relative; cursor: pointer; color: var(--fg); margin: 0; }
.services label.on { border-color: var(--accent); }
.services input { position: absolute; left: 14px; top: 15px; }
.services small { color: var(--muted); font-size: 12px; }
.tag.svc { border-color: color-mix(in srgb, var(--accent) 50%, transparent); color: var(--accent); }

/* semanal no WhatsApp */
.wk-clients .tr { grid-template-columns: 1.2fr .8fr 1.6fr 1.1fr 1.2fr .9fr; }
.wk-inc label.check { margin: 0 0 4px; font-size: 13px; }
.wk-msgs { display: flex; flex-direction: column; gap: 16px; }
.wk-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.wk-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
.wk-body textarea { margin: 0; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }
.wa { background: #0B141A; border-radius: 12px; padding: 16px; max-height: 460px; overflow: auto; background-image: radial-gradient(rgba(255,255,255,.03) 1px, transparent 1px); background-size: 14px 14px; }
.wa-bubble { background: #005C4B; color: #E9EDEF; border-radius: 10px 0 10px 10px; padding: 10px 12px; font-family: Arial, sans-serif; font-size: 14px; line-height: 1.45; margin-left: 12%; overflow-wrap: anywhere; }
.wk-labels { border-top: 1px solid var(--line); margin-top: 12px; padding-top: 12px; display: grid; gap: 4px; }
@media (max-width: 900px) { .wk-body { grid-template-columns: 1fr; } }

/* aprovação do planejamento */
.plancount { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.plancount .st { font-size: 12px; }
.pi-approve { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
.pi-approve textarea { margin: 0; font-size: 12px; padding: 6px 8px; }
.pi-approve .btn { align-self: flex-start; }
.seg3 { display: flex; gap: 4px; }
.seg3 button { flex: 1; background: var(--panel2); border: 1px solid var(--line); color: var(--muted); border-radius: 7px; padding: 4px 6px; font: inherit; font-size: 12px; cursor: pointer; }
.seg3 button.on { color: var(--fg); border-color: var(--muted); }
.seg3 button.on.ok { color: var(--ok); border-color: var(--ok); background: color-mix(in srgb, var(--ok) 14%, var(--panel2)); }
.seg3 button.on.aj { color: var(--err); border-color: var(--err); background: color-mix(in srgb, var(--err) 14%, var(--panel2)); }
.planitem.ap-aprovado { box-shadow: inset 3px 0 0 var(--ok); padding-left: 8px; }
.planitem.ap-ajustar { box-shadow: inset 3px 0 0 var(--err); padding-left: 8px; }
.alert.ok { background: color-mix(in srgb, var(--ok) 12%, transparent); border-color: color-mix(in srgb, var(--ok) 40%, transparent); }


/* ---------- agendamento: textos prontos, contadores, atalhos e prévia ---------- */
.caphead { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; color: var(--muted); font-size: 13px; }
.snip { background: var(--panel2); border: 1px solid var(--line); border-radius: 12px; padding: 10px; margin-bottom: 8px; }
.snip-tabs { margin-bottom: 8px; }
.snip-list { display: flex; flex-direction: column; gap: 4px; max-height: 240px; overflow: auto; }
.snip-item { display: flex; gap: 6px; align-items: flex-start; }
.snip-use { flex: 1; text-align: left; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; color: var(--fg); font: inherit; cursor: pointer; display: flex; flex-direction: column; gap: 2px; }
.snip-use:hover { border-color: var(--accent); }
.snip-use small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.snip-new { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; } .snip-new input { flex: 1; min-width: 160px; margin: 0; }
.netcount { display: flex; flex-direction: column; gap: 2px; margin: 4px 0 10px; font-size: 12px; color: var(--muted); }
.nc b { font-weight: 600; margin-right: 6px; color: var(--fg); }
.nc.near { color: var(--warn); } .nc.over { color: var(--err); }
.quick { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.quick .chip { padding: 5px 12px; font-size: 12.5px; }
.ph-inner { position: relative; }
.ph-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 26px; height: 26px; border-radius: 50%; border: 0; background: rgba(255,255,255,.85); color: #111; cursor: pointer; font-size: 16px; line-height: 1; }
.ph-nav.prev { left: 6px; } .ph-nav.next { right: 6px; }
.ph-dots { display: flex; justify-content: center; gap: 4px; padding: 6px 0 0; }
.ph-dots i { width: 6px; height: 6px; border-radius: 50%; background: #c7c7c7; } .ph-dots i.on { background: #0095f6; }
.ph-more { background: none; border: 0; color: #8e8e8e; font: inherit; padding: 0; cursor: pointer; }
.ph-note { margin: 6px 4px 0; }

/* ---------- calendário: lista e quadro ---------- */
.cal-list { display: flex; flex-direction: column; gap: 18px; }
.cl-day h3 { margin: 0 0 8px; font-size: 15px; }
.cl-day .cdate { display: inline-block; margin: 0 6px 6px 0; }
.cl-row { display: grid; grid-template-columns: 44px 54px 1fr auto auto; gap: 12px; align-items: center; padding: 8px 10px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; margin-bottom: 6px; color: var(--fg); text-decoration: none; }
.cl-row:hover { border-color: #3a3a3a; }
.cl-thumb { width: 44px; height: 55px; border-radius: 6px; overflow: hidden; background: var(--panel2); display: grid; place-items: center; color: var(--muted); }
.cl-thumb img { width: 100%; height: 100%; object-fit: cover; }
.cl-main { display: flex; flex-direction: column; min-width: 0; } .cl-main > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cl-nets { display: flex; gap: 4px; }
.net { font-size: 10.5px; font-weight: 700; padding: 2px 6px; border-radius: 5px; background: #2a2a2a; }
.net.instagram { background: #3b1d33; color: #f9a8d4; } .net.facebook { background: #1b2a44; color: #93c5fd; }
.cal-board { display: grid; grid-template-columns: repeat(4, minmax(200px, 1fr)); gap: 12px; overflow-x: auto; }
.cb-col { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 10px; min-height: 120px; }
.cb-col h3 { margin: 0 0 8px; font-size: 14px; display: flex; gap: 6px; align-items: center; }
.cb-card { display: flex; gap: 8px; padding: 8px; border-radius: 8px; background: var(--panel2); margin-bottom: 6px; color: var(--fg); text-decoration: none; }
.cb-card img { width: 38px; height: 48px; object-fit: cover; border-radius: 5px; flex: none; }
.cb-card div { display: flex; flex-direction: column; min-width: 0; } .cb-card b { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 760px) {
  .cl-row { grid-template-columns: 40px 1fr auto; } .cl-row > b, .cl-row .cl-nets { display: none; }
  .cal-board { grid-template-columns: repeat(4, 78vw); }
}

/* ---------- prévia do feed ---------- */
.pv-tabs { margin-bottom: 12px; }
.feedpv > p { margin: 0 0 10px; }
.ig-frame { background: #fff; color: #111; border-radius: 18px; padding: 14px; max-width: 520px; }
.ig-top { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; }
.ig-top div { display: flex; flex-direction: column; } .ig-top small { color: #737373 !important; }
.ig-av { width: 52px; height: 52px; border-radius: 50%; background: linear-gradient(135deg, #f58529, #dd2a7b, #8134af); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 20px; flex: none; }
.ig-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; }
.ig-cell { position: relative; aspect-ratio: 3 / 4; background: #efefef; overflow: hidden; display: block; }
.ig-cell img, .ig-cell video { width: 100%; height: 100%; object-fit: cover; display: block; }
.ig-cell.new { outline: 2px solid transparent; cursor: grab; }
.ig-cell.new.locked { cursor: default; }
.ig-cell.old { opacity: .55; }
.ig-cell.over { outline-color: #0095f6; }
.ig-cell.dragging { opacity: .4; }
.ig-empty { position: absolute; inset: 0; display: grid; place-items: center; padding: 8px; text-align: center; font-size: 12px; color: #555; }
.ig-ico { position: absolute; top: 6px; right: 6px; color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,.6); font-size: 13px; }
.ig-ico + .ig-ico { right: 22px; }
.ig-when { position: absolute; left: 4px; bottom: 4px; background: rgba(0,0,0,.65); color: #fff; font-size: 10.5px; padding: 1px 6px; border-radius: 6px; }
.ig-lock { position: absolute; top: 4px; left: 4px; font-size: 12px; }
.ig-move { position: absolute; right: 4px; bottom: 4px; display: flex; gap: 2px; opacity: 0; transition: opacity .15s; }
.ig-cell:hover .ig-move, .ig-cell:focus-within .ig-move { opacity: 1; }
.ig-move button { width: 22px; height: 22px; border: 0; border-radius: 5px; background: rgba(255,255,255,.9); cursor: pointer; }
.ig-move button:disabled { opacity: .35; cursor: default; }
.ig-foot { color: #737373 !important; margin: 8px 0 0; }
@media (hover: none) { .ig-move { opacity: 1; } }
.day-dates, .day-posts { display: flex; flex-direction: column; gap: 4px; min-width: 0; } .day-dates:empty { display: none; } .cl-dates { margin-bottom: 6px; }

/* ---------- desempenho ---------- */
.dtabs { margin: 4px 0 14px; }
.dfilters { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 12px; }
.dfilters label { margin: 0; min-width: 180px; } .dfilters .quick { margin: 0 0 6px; }
.dsum { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; margin-bottom: 12px; }
.dsum > div { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; }
.dsum b { font-size: 20px; } .dsum span { font-size: 12px; color: var(--muted); }
.rk { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.rk-row { display: grid; grid-template-columns: 28px 48px 1fr auto; gap: 12px; align-items: center; padding: 8px 10px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; color: var(--fg); text-decoration: none; }
.rk-row:hover { border-color: #3a3a3a; }
.rk-n { font-weight: 800; color: var(--muted); text-align: center; }
.rk-th { width: 48px; height: 60px; border-radius: 6px; overflow: hidden; background: var(--panel2); } .rk-th img { width: 100%; height: 100%; object-fit: cover; }
.rk-main { display: flex; flex-direction: column; min-width: 0; } .rk-cap { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rk-val { text-align: right; display: flex; flex-direction: column; } .rk-val b { font-size: 17px; }
.rk-val small { font-size: 11.5px; } .rk-val small.up { color: #86efac; } .rk-val small.down { color: #FCA5A5; }
.btop { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 8px; margin-bottom: 14px; }
.btop-c { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 2px; }
.btop-c b { font-size: 16px; } .btop-c small { color: #86efac; }
.hm-wrap { overflow-x: auto; margin-bottom: 8px; }
.hm { border-collapse: separate; border-spacing: 3px; font-size: 12px; min-width: 640px; }
.hm th { color: var(--muted); font-weight: 600; padding: 4px 6px; text-align: left; white-space: nowrap; }
.hm td { width: 84px; height: 40px; border-radius: 6px; background: var(--panel); text-align: center; position: relative; }
.hm td span { font-weight: 700; } .hm td small { position: absolute; right: 4px; bottom: 2px; font-size: 9.5px; color: var(--muted); }
.bcols { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin-top: 10px; }
.bcols h4 { margin: 0 0 6px; font-size: 13px; color: var(--muted); }
.bbar { display: grid; grid-template-columns: 120px 1fr 48px; gap: 8px; align-items: center; font-size: 13px; padding: 3px 0; }
.bbar i { display: block; height: 8px; border-radius: 99px; background: var(--accent); }
.bbar b { text-align: right; }
.bmt td small { display: block; font-size: 11.5px; } .bmt .tag { margin-left: 4px; }
.bmt input.inline { margin: 0; width: 100%; min-width: 90px; }
.nowrap { white-space: nowrap; }
@media (max-width: 640px) { .rk-row { grid-template-columns: 22px 40px 1fr; } .rk-val { grid-column: 3; text-align: left; flex-direction: row; gap: 8px; align-items: baseline; } }
/* referências de mercado no celular: cada métrica vira um bloco, sem rolar para o lado */
@media (max-width: 700px) {
  .bmt, .bmt tbody, .bmt tr, .bmt td { display: block; width: 100%; }
  .bmt tr:first-child { display: none; }
  .bmt tr { padding: 10px 0; border-bottom: 1px solid var(--line); }
  .bmt td { padding: 3px 0; border: 0; }
  .bmt td[data-l]::before { content: attr(data-l); display: block; font-size: 12px; color: var(--muted); }
}
