/* Quadro da Agência (modelo de 01/11/2026): colunas em tons pastel da cor da
   etapa, botão "Nova demanda" cheio no topo de cada coluna e cartões com
   bandeira de prioridade, tipo do post, miniatura, cliente, pessoas e data.
   A cor de cada etapa vem do padrão abaixo ou da escolhida no menu da etapa
   (estilo inline --col, que vence a classe). */
.kb-column {
  --col: #7c8494;
  gap: 10px;
  background: color-mix(in srgb, var(--col) 13%, var(--surface));
  transition:
    background 0.2s,
    box-shadow 0.2s,
    transform 0.2s var(--ease);
}
.kb-column.kb-todo {
  --col: #ef4a5d;
}
.kb-column.kb-briefing {
  --col: #f29a38;
}
.kb-column.kb-doing {
  --col: #9b4fe0;
}
.kb-column.kb-review {
  --col: #2f6fde;
}
.kb-column.kb-done {
  --col: #16a37a;
}
.kb-column > header .col-tag {
  padding: 0;
  background: none !important;
  color: var(--ink) !important;
  font-size: 14px;
  font-weight: 700;
}
.kb-column > header .col-tag i {
  width: 9px;
  height: 9px;
  background: var(--col);
}
.kb-column > header .count {
  min-width: 24px;
  padding: 2px 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 70%, transparent);
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}
.kb-column > header .icon-button {
  margin-left: auto;
}
.kb-add {
  justify-content: center;
  gap: 6px;
  width: 100%;
  height: 40px;
  border: 0;
  border-radius: 14px;
  background: var(--col);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 6px 14px -10px var(--col);
  transition:
    filter 0.15s,
    transform 0.15s var(--ease);
}
.kb-add:hover {
  filter: brightness(0.95);
}
.kb-add:active {
  transform: scale(0.98);
}
.kb-add .icon {
  width: 16px;
  height: 16px;
}
/* Coluna que recebe o cartão arrastado: contorno na cor da etapa. */
.kb-column.drag-over {
  background: color-mix(in srgb, var(--col) 22%, var(--surface));
  box-shadow: inset 0 0 0 2px var(--col);
}

/* Cartão */
.kb-card {
  position: relative;
  padding: 0;
  border: 0;
  border-radius: 16px;
  background: var(--surface);
  box-shadow: 0 1px 2px rgba(21, 22, 26, 0.06);
  transition:
    box-shadow 0.2s,
    transform 0.2s var(--ease);
}
.kb-card:hover {
  box-shadow: 0 10px 22px -16px rgba(21, 22, 26, 0.45);
  transform: translateY(-1px);
}
.kb-card.has-cover::before {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  top: 0;
  height: 4px;
  border-radius: 0 0 4px 4px;
  background: var(--cover-line);
}
.kb-card.cover-line-yellow {
  --cover-line: #f5b82e;
}
.kb-card.cover-line-blue {
  --cover-line: #4f8df7;
}
.kb-card.cover-line-purple {
  --cover-line: #9b6bf2;
}
.kb-card.cover-line-pink {
  --cover-line: #ef4f7c;
}
.kb-card.cover-line-teal {
  --cover-line: #14b88a;
}
.kb-card .task-open-area {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "top thumb"
    "title thumb"
    "client client"
    "asked asked"
    "foot foot";
  column-gap: 10px;
  row-gap: 6px;
  padding: 12px 12px 12px 12px;
}
.kb-top {
  grid-area: top;
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.kb-flag {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  flex: none;
  border-radius: 7px;
  background: var(--subtle);
  color: var(--muted);
}
.kb-flag .icon {
  width: 12px;
  height: 12px;
}
.kb-flag.p-urgent,
.kb-flag.p-high {
  background: #ffe1e1;
  color: #d92d2d;
}
.kb-flag.p-medium {
  background: #ffefd9;
  color: #c86a00;
}
.kb-flag.p-low {
  background: #dcf5e9;
  color: #11845e;
}
.kb-kind {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}
.kb-kind.tone-peach {
  background: #fde3c4;
  color: #8a4a00;
}
.kb-kind.tone-lilac {
  background: #ebdcff;
  color: #5b2fb5;
}
.kb-kind.tone-rose {
  background: #ffd9e6;
  color: #a3174f;
}
.kb-kind.tone-sun {
  background: #fff0b8;
  color: #6b5200;
}
.kb-kind.tone-gray {
  background: var(--subtle);
  color: var(--text);
}
.kb-top .label-chip {
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.kb-thumb {
  grid-area: thumb;
  width: 56px;
  height: 64px;
  border-radius: 10px;
  object-fit: cover;
  background: var(--subtle);
}
.kb-card h3 {
  grid-area: title;
  margin: 0;
  padding-left: 28px;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
  overflow-wrap: anywhere;
}
.kb-card.is-done h3 {
  color: var(--muted);
  text-decoration: line-through;
}
/* Círculo de concluir à esquerda do título. */
.kb-card .card-check {
  position: absolute;
  top: 39px;
  left: 9px;
  /* 24×24: alvo mínimo da WCAG 2.5.8 (era 22×22). */
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  background: none;
  /* Ícone precisa de 3:1 (--faint dava 2,39:1). */
  color: var(--muted);
}
.kb-card .card-check .icon {
  width: 20px;
  height: 20px;
}
.kb-card.is-done .card-check {
  color: #16a37a;
}
.kb-client {
  grid-area: client;
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.kb-client i {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  flex: none;
  border-radius: 50%;
  background: var(--ink);
  color: var(--on-ink);
  font-size: 9px;
  font-style: normal;
  font-weight: 700;
}
.kb-asked {
  grid-area: asked;
  justify-self: start;
  padding: 3px 9px;
  border-radius: 999px;
  background: #dfeaff;
  color: #1f4fb0;
  font-size: 11px;
  font-weight: 700;
  animation: kb-pop 0.35s var(--ease-spring);
}
.kb-asked.is-changes {
  background: #ffe6cc;
  color: #8a4a00;
}
.kb-foot {
  grid-area: foot;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 24px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}
.kb-foot .avatar-stack,
.kb-foot .people {
  margin: 0;
}
.kb-foot > span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.kb-foot .icon {
  width: 13px;
  height: 13px;
}
.kb-date.is-late {
  color: var(--danger-ink);
}
.kb-check.is-full {
  color: #11845e;
}
@keyframes kb-pop {
  from {
    transform: scale(0.6);
    opacity: 0;
  }
}

/* Arraste: o cartão levanta e inclina; a origem fica em contorno. */
.drag-ghost.kb-card {
  /* .kb-card é relative; o fantasma do arraste precisa ficar preso à tela. */
  position: fixed;
  transform: rotate(-2.5deg) scale(1.03);
  box-shadow: var(--shadow-lift);
}
.kb-card.drag-source {
  opacity: 0.35;
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--col) 50%, transparent);
}
.kb-card.just-dropped {
  animation: kb-drop 0.4s var(--ease-spring);
}
@keyframes kb-drop {
  from {
    transform: scale(1.04) rotate(-1deg);
  }
}

:root[data-theme="dark"] .kb-column {
  background: color-mix(in srgb, var(--col) 14%, var(--surface));
}
:root[data-theme="dark"] .kb-flag.p-urgent,
:root[data-theme="dark"] .kb-flag.p-high {
  background: rgba(217, 45, 45, 0.18);
  color: #ff8a8a;
}
:root[data-theme="dark"] .kb-flag.p-medium {
  background: rgba(200, 106, 0, 0.2);
  color: #ffb866;
}
:root[data-theme="dark"] .kb-flag.p-low {
  background: rgba(17, 132, 94, 0.2);
  color: #6fe0b4;
}
@media (prefers-reduced-motion: reduce) {
  .kb-card,
  .kb-asked,
  .kb-card.just-dropped {
    animation: none;
    transition: none;
  }
}
.kb-add {
  display: flex;
  align-items: center;
}
.kb-card .card-check {
  opacity: 1;
  transform: none;
}

/* Avisos em pílula (pill.js). */
.hub-pills {
  position: fixed;
  left: 50%;
  bottom: calc(24px + var(--bottom-nav, 0px) + env(safe-area-inset-bottom));
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  transform: translateX(-50%);
  pointer-events: none;
}
.hub-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 18px 6px 6px;
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 16px 36px -16px rgba(21, 22, 26, 0.45);
  animation: hub-pill-in 0.45s var(--ease-spring);
}
.hub-pill > span {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--on-accent);
}
.hub-pill > span .icon {
  width: 15px;
  height: 15px;
}
.hub-pill.is-leaving {
  opacity: 0;
  transform: translateY(8px) scale(0.96);
  transition:
    opacity 0.35s,
    transform 0.35s var(--ease);
}
@keyframes hub-pill-in {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.9);
  }
}
@media (prefers-reduced-motion: reduce) {
  .hub-pill {
    animation: none;
  }
}

/* ---------- Aprovação (fase 2, 01/11/2026) ----------
   Três colunas — Pendente, Alterações solicitadas e Aprovado — com a arte
   de cada post em destaque, cliente e título. */
.ap-page {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.ap-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}
.ap-head-ico {
  display: grid;
  place-items: center;
  color: var(--accent);
}
.ap-head-ico .icon {
  width: 30px;
  height: 30px;
}
.ap-head h1 {
  margin: 0;
  font-size: clamp(26px, 3.4vw, 38px);
  font-weight: 500;
  letter-spacing: -0.03em;
}
.ap-count {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 6px 0 14px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 13px;
  font-weight: 700;
}
.ap-count b {
  display: grid;
  place-items: center;
  min-width: 24px;
  height: 24px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-size: 12px;
}
.ap-tools {
  display: flex;
  gap: 8px;
  margin-left: auto;
}
.ap-tools > select {
  height: 38px;
  min-width: 180px;
}
.ap-cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}
.ap-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}
.ap-col-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px 6px 6px;
  border-radius: 999px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.ap-col-head > span {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--on-ink);
}
.ap-col-head.is-warn > span {
  background: #f29a38;
  color: #1f1300;
}
.ap-col-head.is-ok > span {
  background: #16a37a;
  color: #fff;
}
.ap-col-head > span .icon {
  width: 15px;
  height: 15px;
}
.ap-col-head strong {
  flex: 1;
  font-size: 14px;
}
.ap-col-head b {
  min-width: 26px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--subtle);
  font-size: 12px;
  text-align: center;
}
.ap-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.ap-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  padding: 7px 7px 10px;
  border: 0;
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  transition:
    transform 0.2s var(--ease),
    box-shadow 0.2s;
}
.ap-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px -18px rgba(21, 22, 26, 0.5);
}
.ap-card .ap-art {
  display: grid;
  place-items: center;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  border-radius: 11px;
  object-fit: cover;
  background: var(--subtle);
  color: var(--muted);
}
.ap-client {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  padding: 0 3px;
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ap-client b {
  display: grid;
  place-items: center;
  width: 16px;
  height: 16px;
  flex: none;
  border-radius: 50%;
  background: var(--ink);
  color: var(--on-ink);
  font-size: 7px;
}
.ap-card > strong {
  padding: 0 3px;
  overflow: hidden;
  font-size: 13px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ap-facets {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 0 3px;
}
.ap-facets i {
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--peach);
  color: var(--peach-ink);
  font-size: 10px;
  font-style: normal;
  font-weight: 700;
}
.ap-facets i.is-bad {
  background: var(--rose);
  color: var(--danger-ink);
}
.ap-tag {
  align-self: flex-start;
  margin: 0 3px;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--lilac);
  color: var(--lilac-ink);
  font-size: 10px;
  font-weight: 700;
}
.ap-empty {
  grid-column: 1 / -1;
  margin: 0;
  padding: 24px 12px;
  border: 1.5px dashed var(--line-2);
  border-radius: 16px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}
@media (max-width: 1100px) {
  .ap-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (max-width: 760px) {
  .ap-cols {
    grid-template-columns: minmax(0, 1fr);
  }
  .ap-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .ap-tools {
    width: 100%;
    margin-left: 0;
  }
  .ap-tools > select {
    flex: 1;
    min-width: 0;
  }
}

/* ---------- Agenda visual da Postagem (fase 3, 01/11/2026) ---------- */
.social-arts {
  padding: 16px;
}
.social-arts > header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
.social-arts > header h2 {
  margin: 0 8px;
  font-size: 18px;
}
.sa-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}
.sa-weekday {
  padding-bottom: 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  text-align: center;
}
.sa-cell {
  position: relative;
  display: flex;
  justify-content: flex-end;
  gap: 4px;
  min-height: 132px;
  padding: 26px 6px 6px;
  border-radius: 14px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
}
.sa-cell.is-outside {
  opacity: 0.45;
}
.sa-cell.is-today {
  box-shadow: inset 0 0 0 2px var(--accent);
}
.sa-day {
  position: absolute;
  top: 6px;
  left: 9px;
  font-size: 13px;
  font-weight: 700;
}
.sa-tile {
  position: relative;
  flex: 0 1 62%;
  min-width: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 10px;
  background: var(--subtle);
  aspect-ratio: 4 / 5;
  align-self: flex-end;
  cursor: pointer;
  box-shadow: 0 6px 14px -10px rgba(21, 22, 26, 0.5);
  transition: transform 0.2s var(--ease);
}
.sa-cell.is-many .sa-tile {
  flex-basis: 48%;
}
.sa-tile:hover {
  transform: translateY(-2px) scale(1.02);
}
.sa-tile img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.sa-text {
  display: block;
  padding: 6px;
  color: var(--text);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.25;
  text-align: left;
  overflow-wrap: anywhere;
}
.sa-nets {
  position: absolute;
  left: 4px;
  bottom: 4px;
  display: flex;
  gap: 2px;
}
.sa-nets .brand-mark {
  box-shadow: 0 0 0 1.5px #fff;
}
.sa-time {
  position: absolute;
  right: 4px;
  top: 4px;
  padding: 1px 5px;
  border-radius: 6px;
  background: rgba(21, 22, 26, 0.72);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
}
.sa-tile.st-gray {
  opacity: 0.7;
}
.sa-tile.is-new {
  animation: sa-land 0.7s var(--ease-spring);
  box-shadow:
    0 0 0 3px var(--accent),
    0 14px 26px -12px rgba(21, 22, 26, 0.5);
}
@keyframes sa-land {
  from {
    transform: translateY(-40px) rotate(-6deg) scale(1.2);
    opacity: 0;
  }
}
.social-month > header h2 small,
.social-arts > header h2 small {
  color: var(--muted);
  font-size: inherit;
  font-weight: 500;
}
.art-more {
  display: none;
}
/* Calendário de artes no celular (14/11/2026, referência "álbum do dia"):
   cada dia é um quadrado; com post, a arte ocupa o quadrado inteiro e o
   número do dia fica por cima, em branco. Dias de fora do mês somem. */
@media (max-width: 760px) {
  .social-arts {
    padding: 14px 10px 12px;
  }
  .social-arts > header {
    flex-wrap: wrap;
    margin-bottom: 14px;
  }
  .social-arts > header h2 {
    order: -1;
    flex: 1 0 100%;
    margin: 0 0 6px;
    font-size: 30px;
    font-weight: 800;
    letter-spacing: -0.03em;
    text-align: center;
  }
  .social-arts > header h2 small {
    font-weight: 400;
  }
  .social-arts > header .subtle-button {
    margin-left: auto;
  }
  .sa-grid {
    gap: 5px;
  }
  .sa-weekday {
    padding-bottom: 4px;
    font-size: 11px;
    text-transform: uppercase;
  }
  .sa-cell {
    display: block;
    min-height: 0;
    padding: 0;
    overflow: hidden;
    aspect-ratio: 1;
    border-radius: 10px;
    background: var(--subtle);
    box-shadow: none;
  }
  .sa-cell.is-outside {
    visibility: hidden;
  }
  .sa-cell.is-today {
    box-shadow: inset 0 0 0 2px var(--accent);
  }
  .sa-day {
    z-index: 2;
    top: 5px;
    left: 6px;
    color: var(--muted);
    font-size: 12px;
    pointer-events: none;
  }
  .sa-cell.has-post .sa-day {
    color: #fff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.55);
  }
  .sa-tile,
  .sa-cell.is-many .sa-tile {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border-radius: 0;
    aspect-ratio: auto;
    box-shadow: none;
  }
  .sa-tile:hover {
    transform: none;
  }
  .sa-cell.is-many .sa-tile:nth-of-type(n + 2) {
    display: none;
  }
  .sa-cell.is-today.has-post {
    box-shadow: none;
    outline: 2px solid var(--accent);
    outline-offset: 1px;
  }
  .sa-time,
  .sa-text {
    display: none;
  }
  .sa-tile:not(:has(img)) {
    background: var(--lilac);
  }
  .sa-nets {
    left: auto;
    right: 3px;
    bottom: 3px;
  }
  .sa-nets .brand-mark {
    width: 12px;
    height: 12px;
  }
  .sa-nets .brand-mark + .brand-mark {
    display: none;
  }
  /* Área do cliente: a faixa "Aprovar" desce para o pé do quadrado. */
  .cpo-arts .sa-cell .cpo-band {
    top: auto;
    bottom: 0;
    padding: 1px 0;
    font-size: 8px;
    letter-spacing: 0.04em;
  }
  .cpo-arts .sa-cell:has(.cpo-band) .sa-nets,
  .cpo-arts .sa-cell:has(.cpo-band) .art-more {
    display: none;
  }
  .art-more {
    position: absolute;
    z-index: 2;
    left: 4px;
    bottom: 4px;
    display: block;
    padding: 0 5px;
    border-radius: 999px;
    background: rgba(21, 22, 26, 0.72);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    line-height: 16px;
    pointer-events: none;
  }
}

/* Mensal no celular (14/11/2026): o mesmo quadrado do Calendário, com a
   arte do primeiro post ocupando o dia, o número por cima e um ponto com a
   cor do status. No computador a arte fica escondida (a lista segue igual). */
.sp-art,
.sm-more {
  display: none;
}
@media (max-width: 760px) {
  .social-month > header {
    flex-wrap: wrap;
  }
  .social-month > header h2 {
    order: -1;
    flex: 1 0 100%;
    margin: 0 0 6px;
    font-size: 30px;
    font-weight: 800;
    letter-spacing: -0.03em;
    text-align: center;
  }
  .social-month > header h2 small {
    font-weight: 400;
  }
  .social-month > header .subtle-button {
    margin-left: auto;
  }
  .social-month .sm-grid {
    gap: 5px;
  }
  .social-month .sm-cell {
    position: relative;
    display: block;
    min-height: 0;
    padding: 0;
    overflow: hidden;
    aspect-ratio: 1;
    border-radius: 10px;
  }
  .social-month .sm-cell.is-outside {
    visibility: hidden;
  }
  .social-month .sm-cell > header {
    position: absolute;
    z-index: 2;
    top: 5px;
    left: 6px;
    color: var(--muted);
    font-size: 12px;
    pointer-events: none;
  }
  .social-month .sm-cell.is-today > header span {
    min-width: 20px;
    height: 20px;
    border-radius: 6px;
    font-size: 11px;
  }
  .social-month .sm-cell.has-post > header {
    color: #fff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.55);
  }
  .social-month .sm-cell.is-today.has-post {
    outline: 2px solid var(--accent);
    outline-offset: 1px;
  }
  .social-month .sm-cell .sm-special,
  .social-month .sm-cell .sp-del,
  .social-month .sm-cell .sp-card + .sp-card {
    display: none;
  }
  .social-month .sm-cell .sp-card {
    position: absolute;
    inset: 0;
  }
  .social-month .sm-cell .sp-card::after {
    content: "";
    position: absolute;
    right: 4px;
    bottom: 4px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--st-ink, var(--muted));
    box-shadow: 0 0 0 1.5px #fff;
    pointer-events: none;
  }
  .social-month .sm-cell .sp-open {
    position: absolute;
    inset: 0;
    min-height: 0;
    padding: 0;
    border-radius: 0;
    background: var(--st-bg, var(--subtle));
  }
  .social-month .sm-cell .sp-open > .sp-art {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    clip-path: none;
    white-space: normal;
  }
  .sp-art .sp-thumb {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 0;
    object-fit: cover;
  }
  .sp-art .sp-thumb-empty {
    display: grid;
    place-items: center;
    background: var(--st-bg, var(--subtle));
    color: var(--st-ink, var(--muted));
  }
  .sp-art .sp-thumb-empty .icon {
    width: 16px;
    height: 16px;
  }
  .social-month .sm-more {
    position: absolute;
    z-index: 2;
    left: 4px;
    bottom: 4px;
    display: block;
    padding: 0 5px;
    border-radius: 999px;
    background: rgba(21, 22, 26, 0.72);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    line-height: 16px;
    pointer-events: none;
  }
}

/* Semanal no celular (14/11/2026): colunas com encaixe ao deslizar e a
   arte no formato do post (4:5), sem corte. */
@media (max-width: 760px) {
  .social-week .sw-grid {
    grid-template-columns: repeat(7, 72%);
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }
  .social-week .sw-grid {
    align-items: start;
  }
  .social-week .sw-day {
    min-height: 220px;
    scroll-snap-align: start;
  }
  .social-week .sw-post .sp-thumb {
    height: auto;
    aspect-ratio: 4 / 5;
    border-radius: 10px;
    object-fit: cover;
  }
  .social-week .sw-post .sp-thumb-empty {
    aspect-ratio: 16 / 9;
  }
}

/* "Agendado": os botões do agendamento ficam verdes antes de fechar. */
.se-new.is-done [type="submit"] {
  background: #16a37a !important;
  color: #fff !important;
  animation: kb-pop 0.35s var(--ease-spring);
}
@media (prefers-reduced-motion: reduce) {
  .sa-tile.is-new,
  .se-new.is-done [type="submit"] {
    animation: none;
  }
}

/* Capa no topo do cartão (03/11/2026); a miniatura à direita é o anexo. */
.kb-card .task-open-area:has(> .kb-cover) {
  grid-template-areas:
    "cover cover"
    "top thumb"
    "title thumb"
    "client client"
    "asked asked"
    "foot foot";
}
.kb-cover {
  grid-area: cover;
  display: block;
  width: calc(100% + 24px);
  max-width: none;
  height: 96px;
  margin: -12px -12px 4px;
  border-radius: 16px 16px 0 0;
  object-fit: cover;
  background: var(--subtle);
}
/* Com capa, o círculo de concluir desce junto com o título. */
.kb-card:has(.kb-cover) .card-check {
  top: 140px;
}
/* Ícone do quadro (03/11/2026): o ícone do cabeçalho abre a grade de ícones. */
.board-icon-btn {
  border: 0;
  cursor: pointer;
  transition: transform 0.15s;
}
.board-icon-btn:hover {
  transform: scale(1.06);
}
.board-icon-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(48px, 1fr));
  gap: 10px;
}
.board-icon-grid button {
  border: 0;
  cursor: pointer;
  opacity: 0.55;
  transition:
    opacity 0.15s,
    transform 0.15s;
}
.board-icon-grid button:hover,
.board-icon-grid button.is-on {
  opacity: 1;
  transform: scale(1.06);
}
.board-icon-grid button.is-on {
  box-shadow:
    0 0 0 2px var(--surface),
    0 0 0 4px var(--ink);
}

/* ---------- Calendário do quadro (03/11/2026, modelo Asana/Trello) ----------
   Barras do início ao prazo na cor da etapa; semana em faixas. */
.tc {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
}
.tc-bar-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}
.tc-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}
.tc-nav h2 {
  margin: 0 0 0 8px;
  font-size: 15px;
  font-weight: 700;
}
.tc-today {
  height: 32px;
  padding: 0 10px;
  font-weight: 600;
}
.tc-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}
.tc-tools .tool-pill b {
  margin-left: 4px;
  font-weight: 700;
}
.tc-mode button {
  height: 32px;
  padding: 0 12px;
}
.tc-body {
  display: flex;
  min-width: 0;
}
.tc-grid {
  flex: 1;
  min-width: 0;
}
.tc-weekdays {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  border-bottom: 1px solid var(--line);
}
.tc-weekdays span {
  padding: 8px 10px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.tc-week {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  grid-template-rows: 34px repeat(var(--lanes), 32px) minmax(14px, 1fr);
  row-gap: 4px;
  min-height: 128px;
  border-bottom: 1px solid var(--line);
}
.tc.is-week .tc-week {
  min-height: 420px;
}
.tc-day {
  position: relative;
  grid-row: 1 / -1;
  border-right: 1px solid var(--line);
  transition: background 0.15s;
}
.tc-day:nth-child(7) {
  border-right: 0;
}
.tc-day.is-weekend {
  background: color-mix(in srgb, var(--subtle) 55%, transparent);
}
.tc-day.is-out .tc-num {
  color: color-mix(in srgb, var(--muted) 60%, transparent);
}
.tc-day.drag-over {
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 2px var(--accent);
}
.tc-num {
  display: inline-grid;
  place-items: center;
  min-width: 26px;
  height: 26px;
  margin: 6px 0 0 8px;
  padding: 0 6px;
  border-radius: 8px;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
}
.tc-day.is-today .tc-num {
  background: var(--accent);
  color: var(--on-accent);
}
.tc-add {
  position: absolute;
  top: 6px;
  right: 6px;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  opacity: 0;
  cursor: pointer;
  transition: opacity 0.15s;
}
.tc-add .icon {
  width: 15px;
  height: 15px;
}
.tc-day:hover .tc-add,
.tc-add:focus-visible {
  opacity: 1;
}
.tc-add:hover {
  background: var(--subtle);
  color: var(--ink);
}
.tc-bar {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  height: 30px;
  margin: 0 4px;
  padding: 0 8px 0 4px;
  border: 0;
  border-radius: 8px;
  background: color-mix(in srgb, var(--bar) 78%, #ffffff);
  color: #15161a;
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.08);
  transition:
    filter 0.15s,
    transform 0.15s;
}
.tc-bar:hover {
  filter: brightness(0.97);
  transform: translateY(-1px);
}
.tc-bar.cut-l {
  margin-left: 0;
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}
.tc-bar.cut-r {
  margin-right: 0;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}
.tc-bar:not(:has(.person-avatar, .member-avatar, .avatar)) {
  padding-left: 10px;
}
.tc-bar .person-avatar,
.tc-chip .person-avatar {
  width: 22px !important;
  height: 22px !important;
  flex: none;
  font-size: 9px !important;
  box-shadow: 0 0 0 2px rgb(255 255 255 / 0.7);
}
.tc-title {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.tc-tags {
  display: flex;
  gap: 3px;
  flex: none;
}
.tc-tags i {
  width: 10px;
  height: 10px;
  border: 1.5px solid rgb(255 255 255 / 0.85);
  border-radius: 3px;
}
.tc-bar.is-done {
  opacity: 0.55;
}
.tc-bar.is-done .tc-title {
  text-decoration: line-through;
}
.tc-bar.is-late {
  box-shadow:
    inset 0 0 0 2px #e0464f,
    0 1px 2px rgb(0 0 0 / 0.08);
}
.tc-side {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 250px;
  flex: none;
  padding: 14px;
  border-left: 1px solid var(--line);
  background: var(--subtle);
}
.tc-side h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 14px;
}
.tc-side h3 span {
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--surface);
  font-size: 12px;
}
.tc-side p {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 12px;
}
.tc-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 6px 10px;
  border: 0;
  border-left: 4px solid var(--bar);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.06);
}
@media (max-width: 900px) {
  .tc-body {
    flex-direction: column;
  }
  .tc-side {
    width: auto;
    border-top: 1px solid var(--line);
    border-left: 0;
  }
}
@media (max-width: 600px) {
  .tc-bar-top {
    padding: 10px;
  }
  .tc-tools {
    margin-left: 0;
  }
  .tc-new {
    display: none !important;
  }
  .tc-weekdays span {
    padding: 6px 2px;
    text-align: center;
    font-size: 10px;
  }
  .tc-num {
    margin: 4px 0 0 2px;
    min-width: 22px;
    height: 22px;
    font-size: 11.5px;
  }
  .tc-week {
    grid-template-rows: 30px repeat(var(--lanes), 24px) minmax(10px, 1fr);
    row-gap: 3px;
    min-height: 96px;
  }
  .tc-bar {
    height: 22px;
    margin: 0 1px;
    padding: 0 4px;
    border-radius: 5px;
    font-size: 10.5px;
  }
  .tc-bar .person-avatar,
  .tc-tags {
    display: none;
  }
  .tc-add {
    display: none;
  }
}
:root[data-theme="dark"] .tc-bar {
  background: color-mix(in srgb, var(--bar) 55%, #1d1f23);
  color: #fafafa;
}
/* Imagem própria no ícone do quadro. */
.board-dot:has(> .board-img) {
  overflow: hidden;
  padding: 0;
}
.board-img {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
}
.board-icon-upload {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.board-icon-upload > small {
  flex: 1 1 100%;
}
.board-icon-upload .subtle-button {
  cursor: pointer;
}

/* V4 1.3 — aguardando o cliente */
.kb-asked.is-waiting {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--sun);
  color: var(--sun-ink);
}
.board-card:not(.kb-card) .kb-asked.is-waiting {
  margin: 4px 0 2px;
}
.kb-asked.is-waiting svg {
  width: 12px;
  height: 12px;
}

/* V4 1.7 — aprovação de demanda comum (cartão) */
.kb-asked.is-ok {
  background: var(--mint);
  color: var(--mint-ink);
}
.kb-asked.is-bad {
  background: var(--rose);
  color: var(--rose-ink);
}
.kb-asked:has(svg) {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.kb-asked svg {
  width: 12px;
  height: 12px;
}
.board-card:not(.kb-card) .kb-asked {
  margin: 4px 4px 2px 0;
}

/* V4 1.7 — página Aprovação: posts ou demandas; abas de situação */
.ap-kind {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  border-radius: 999px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.ap-kind button {
  height: 30px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.ap-kind button.on {
  background: var(--ink);
  color: var(--on-ink);
}
.ap-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.ap-tabs button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 8px 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.ap-tabs button .icon {
  width: 15px;
  height: 15px;
}
.ap-tabs button b {
  min-width: 24px;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--subtle);
  font-size: 12px;
  text-align: center;
}
.ap-tabs button.on {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--on-ink);
}
.ap-tabs button.on b {
  background: var(--surface);
  color: var(--ink);
}
.ap-demands {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}
.ap-demand {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
  color: var(--ink);
  text-align: left;
  font: inherit;
  cursor: pointer;
  transition: box-shadow 0.2s, transform 0.2s var(--ease);
}
.ap-demand:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-pop);
}
.ap-demand strong {
  font-size: 14px;
  overflow-wrap: anywhere;
}
.ap-demand small {
  display: flex;
  gap: 6px;
  align-items: flex-start;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.ap-demand small .icon {
  flex: none;
  width: 13px;
  height: 13px;
  margin-top: 1px;
}
.ap-demands > .ap-empty {
  grid-column: 1 / -1;
}
@media (max-width: 720px) {
  .ap-kind {
    order: 3;
  }
  .ap-demands {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 480px) {
  .ap-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .ap-tabs button {
    justify-content: space-between;
    padding: 0 6px 0 10px;
  }
}
/* V4 1.6 — "Enviar em lote" cabe na barra no celular */
.ap-tools {
  flex-wrap: wrap;
}
@media (max-width: 760px) {
  .ap-tools > .clientpick,
  .ap-tools > .client-pick,
  .ap-tools > :first-child {
    flex: 1 1 100%;
    min-width: 0;
  }
  .ap-tools > button {
    flex: 1 1 0;
    min-width: 0;
    justify-content: center;
  }
}

/* V4 2.1 — automações do quadro */
.au-panel,
#automation-form {
  display: grid;
  gap: 14px;
}
.au-tabs {
  display: inline-flex;
  gap: 2px;
  width: fit-content;
  padding: 3px;
  border-radius: 999px;
  background: var(--subtle);
}
.au-tabs button {
  height: 30px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.au-tabs button.on {
  background: var(--ink);
  color: var(--on-ink);
}
.au-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.au-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface);
}
.au-list li > div {
  flex: 1;
  min-width: 0;
}
.au-list li.is-off {
  opacity: 0.6;
}
.au-list strong {
  font-size: 14px;
}
.au-list p {
  margin: 4px 0 0;
  color: var(--text);
  font-size: 12.5px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.au-list p b {
  color: var(--ink);
}
.au-switch {
  position: relative;
  flex: none;
  width: 36px;
  height: 22px;
  cursor: pointer;
}
.au-switch input {
  position: absolute;
  inset: 0;
  opacity: 0;
  margin: 0;
  cursor: pointer;
}
.au-switch i {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: var(--line-2);
  transition: background 0.2s;
}
.au-switch i::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.2s var(--ease);
}
.au-switch input:checked + i {
  background: var(--accent);
}
.au-switch input:checked + i::after {
  transform: translateX(14px);
}
.au-switch input:focus-visible + i {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}
.au-empty {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 24px 12px;
  border: 1.5px dashed var(--line-2);
  border-radius: var(--r-md);
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}
.au-empty .icon {
  width: 26px;
  height: 26px;
  color: var(--faint);
}
.au-empty p {
  margin: 0;
  max-width: 44ch;
}
.au-block {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  min-width: 0;
}
.au-block legend {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 4px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}
.au-block legend .icon {
  width: 14px;
  height: 14px;
}
.au-conds {
  grid-template-columns: repeat(auto-fill, minmax(128px, 1fr));
}
.au-actions {
  display: grid;
  gap: 8px;
}
.au-action {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) minmax(140px, 1.3fr) auto;
  gap: 8px;
  align-items: center;
}
.au-action > [hidden] {
  display: none;
}
.au-action > .icon-button {
  grid-column: 3;
  grid-row: 1;
}
.au-days {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
}
.au-days input {
  width: 80px;
}
.au-active {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
}
.au-runs {
  display: grid;
  gap: 6px;
  max-height: 50vh;
  margin: 0;
  padding: 0;
  overflow: auto;
  list-style: none;
}
.au-runs li {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--r-sm);
  background: var(--subtle);
  font-size: 12.5px;
}
.au-runs li.is-bad {
  background: var(--rose);
  color: var(--rose-ink);
}
.au-runs time {
  color: var(--muted);
}
.au-runs span {
  display: grid;
  gap: 2px;
  min-width: 0;
  overflow-wrap: anywhere;
}
.au-runs .text-button {
  display: inline;
  min-height: 0;
  padding: 0;
  font-size: inherit;
  font-weight: 600;
  text-decoration: underline;
}
.au-runs small {
  color: var(--text);
}
@media (max-width: 640px) {
  .au-action {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .au-action > :not(select[name="actionType"]):not(.icon-button) {
    grid-column: 1 / -1;
  }
  .au-action > .icon-button {
    grid-column: 2;
  }
  .au-runs li {
    grid-template-columns: 1fr;
    gap: 2px;
  }
}
.au-runs .text-button {
  text-align: left;
  color: var(--ink);
}
.au-note {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}
.au-tdays input {
  width: 100%;
}

/* V4 2.1 — demandas arquivadas do quadro */
.arch-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.arch-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface);
}
.arch-list li > span {
  display: grid;
  flex: 1;
  gap: 2px;
  min-width: 0;
  overflow-wrap: anywhere;
}
.arch-list small {
  color: var(--muted);
  font-size: 12px;
}
@media (max-width: 480px) {
  .arch-list li {
    flex-wrap: wrap;
  }
}
