/* Módulos: agenda, postagem, conteúdos, conversas, equipes, configurações,
   jurídico, integrações, painel /admin/, login e gaveta de avisos. */

/* ---------- Cores de evento (pastéis) ---------- */
.ev-pink {
  --ev-bg: var(--rose);
  --ev-ink: var(--rose-ink);
}
.ev-peach {
  --ev-bg: var(--peach);
  --ev-ink: var(--peach-ink);
}
.ev-cyan {
  --ev-bg: var(--sky);
  --ev-ink: var(--sky-ink);
}
.ev-lavender {
  --ev-bg: var(--lilac);
  --ev-ink: var(--lilac-ink);
}
.ev-mint {
  --ev-bg: var(--mint);
  --ev-ink: var(--mint-ink);
}
.ev-gray {
  --ev-bg: var(--subtle);
  --ev-ink: var(--text);
}

/* ---------- Agenda ---------- */
.agenda-page {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}
.agenda-side {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.agenda-side h2 {
  margin-bottom: 10px;
  font-size: 15px;
}
.agenda-mini header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.agenda-mini header strong {
  font-size: 14px;
}
.agenda-mini-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 2px;
  text-align: center;
}
.agenda-mini-grid .weekday {
  padding: 4px 0;
  color: var(--faint);
  font-size: 11px;
  font-weight: 700;
}
.agenda-mini-grid button {
  position: relative;
  height: 32px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.agenda-mini-grid button:hover {
  background: var(--subtle);
}
.agenda-mini-grid .in-week {
  background: var(--subtle);
}
.agenda-mini-grid .has-events::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 3px;
  width: 4px;
  height: 4px;
  margin-left: -2px;
  border-radius: 50%;
  background: var(--accent);
}
.agenda-mini-grid .is-today {
  color: var(--accent);
}
.agenda-mini-grid .is-selected {
  background: var(--accent);
  color: var(--on-accent, #fff);
}
.agenda-mini-grid .is-selected::after {
  background: #fff;
}
.agenda-upcoming {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.agenda-up {
  padding: 12px;
  border-radius: var(--r-md);
  background: var(--ev-bg, var(--subtle));
}
.agenda-up-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 100%;
  text-align: left;
}
.agenda-up-when {
  color: var(--ev-ink);
  font-size: 11px;
  font-weight: 700;
}
.agenda-up small {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--text);
}
.agenda-up small .icon {
  width: 13px;
  height: 13px;
}
.agenda-up footer {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.agenda-rsvp {
  min-height: 30px;
  padding: 0 10px;
  border-radius: var(--r-sm);
  background: rgba(255, 255, 255, 0.7);
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.agenda-rsvp.yes {
  background: var(--ink);
  color: var(--on-ink);
}
.agenda-rsvp .icon {
  width: 14px;
  height: 14px;
}
.agenda-confirmed,
.agenda-join {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 700;
  color: var(--mint-ink);
}
.agenda-join {
  min-height: 30px;
  padding: 0 10px;
  border-radius: var(--r-sm);
  background: var(--ink);
  color: var(--on-ink);
}
.agenda-confirmed .icon,
.agenda-join .icon {
  width: 14px;
  height: 14px;
}
.agenda-calm {
  color: var(--muted);
  font-size: 13px;
}
.agenda-filters {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.agenda-filters label {
  display: flex !important;
  align-items: center;
  gap: 10px;
  padding: 6px 4px;
  border-radius: var(--r-sm);
  font-size: 13px;
}
.agenda-filters label span {
  flex: 1;
}
.agenda-filters small {
  color: var(--muted);
}
.agenda-main {
  min-width: 0;
  padding: 0;
  overflow: hidden;
}
.agenda-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}
.agenda-nav {
  flex: 1;
  min-width: 220px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.agenda-nav h2 {
  margin-left: 8px;
  font-size: 17px;
}
.agenda-today {
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  font-size: 13px;
  font-weight: 600;
}
.agenda-hint {
  padding: 10px 16px 14px;
  color: var(--muted);
  font-size: 12px;
}
.tg {
  --gutter: 58px;
}
.tg-head,
.tg-body {
  display: grid;
  grid-template-columns: var(--gutter) repeat(var(--days), minmax(0, 1fr));
}
.tg-head {
  border-bottom: 1px solid var(--line);
}
.tg-zone {
  align-self: end;
  padding: 0 0 8px 8px;
  color: var(--faint);
  font-size: 10px;
}
.tg-day {
  display: grid;
  justify-items: center;
  gap: 2px;
  padding: 10px 4px;
}
.tg-day small {
  color: var(--muted);
  font-size: 11px;
  text-transform: capitalize;
}
.tg-day strong {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  font-size: 17px;
}
.tg-day em {
  color: var(--faint);
  font-size: 10px;
  font-style: normal;
}
.tg-day.is-today strong {
  background: var(--accent);
  color: var(--on-accent, #fff);
}
.tg-day.is-selected:not(.is-today) strong {
  background: var(--hover);
}
.tg-scroll {
  max-height: min(68vh, 760px);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.tg-body {
  position: relative;
  margin: 10px 0;
}
.tg-axis {
  position: relative;
}
.tg-axis span {
  position: absolute;
  right: 10px;
  transform: translateY(-50%);
  color: var(--faint);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}
.tg-col {
  position: relative;
  border-left: 1px solid var(--line);
  background-image: repeating-linear-gradient(
    to bottom,
    var(--line) 0 1px,
    transparent 1px var(--hour)
  );
  cursor: copy;
}
.tg-col.is-today {
  background-color: color-mix(in srgb, var(--accent) 4%, transparent);
}
.tg-col.is-past {
  background-color: color-mix(in srgb, var(--subtle) 60%, transparent);
}
.tg-event {
  position: absolute;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 1px;
  overflow: hidden;
  padding: 6px 9px;
  border-radius: 12px;
  background: var(--ev-bg, var(--sky));
  color: var(--ev-ink, var(--sky-ink));
  font-size: 12px;
  cursor: grab;
  transition:
    box-shadow 0.2s,
    transform 0.2s;
}
.tg-event:hover {
  z-index: 3;
  box-shadow: var(--shadow-pop);
}
.tg-event strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--ink);
  font-size: 12px;
}
.tg-time,
.tg-extra {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}
.tg-event.is-short {
  flex-direction: row;
  align-items: center;
  gap: 6px;
  padding-block: 2px;
}
.tg-event.is-confirmed {
  box-shadow: inset 3px 0 0 var(--ev-ink);
}
.tg-event.is-google {
  cursor: pointer;
  background-image: repeating-linear-gradient(
    135deg,
    transparent 0 6px,
    rgba(255, 255, 255, 0.35) 6px 8px
  );
}
.tg-badge {
  position: absolute;
  top: 5px;
  right: 6px;
  min-height: 0;
  padding: 0;
  background: none;
}
.tg-badge .icon {
  width: 13px;
  height: 13px;
}
.tg-resize {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 8px;
  cursor: ns-resize;
}
.tg-event.is-dragging {
  z-index: 5;
  opacity: 0.92;
  cursor: grabbing;
  box-shadow: var(--shadow-lift);
  transform: rotate(-1.5deg) scale(1.02);
}
.tg-now {
  position: absolute;
  left: -1px;
  right: 0;
  z-index: 4;
  height: 2px;
  background: var(--accent);
  pointer-events: none;
}
.tg-now::before {
  content: "";
  position: absolute;
  left: -5px;
  top: -4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
}
.am-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
  padding: 12px;
}
.am-weekday {
  padding: 4px 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}
.am-cell {
  min-height: 108px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 6px;
  border-radius: var(--r);
  background: var(--subtle);
}
.am-cell.is-outside {
  opacity: 0.45;
}
.am-cell header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.am-num {
  min-width: 26px;
  height: 26px;
  padding: 0 6px;
  border-radius: 9px;
  font-size: 12px;
  font-weight: 700;
}
.am-cell.is-today .am-num {
  background: var(--accent);
  color: var(--on-accent, #fff);
}
.am-add {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: var(--muted);
  opacity: 0;
}
.am-cell:hover .am-add {
  opacity: 1;
}
.am-add .icon {
  width: 14px;
  height: 14px;
}
.am-chip {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  padding: 3px 6px;
  border-radius: var(--r-xs);
  background: var(--ev-bg);
  color: var(--ev-ink);
  font-size: 11px;
  text-align: left;
}
.am-chip i {
  display: none;
}
.am-chip span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--ink);
}
.am-more {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  text-align: left;
}
.al-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 16px;
}
.al-list h3 {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 8px;
}
.al-list h3 strong {
  font-size: 22px;
}
.al-list h3 span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}
.al-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  padding: 8px 12px 8px 8px;
  border-radius: var(--r-md);
  background: var(--ev-bg);
}
.al-row.is-declined {
  opacity: 0.55;
}
.al-main {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
}
.al-time {
  display: flex;
  flex-direction: column;
  min-width: 46px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.al-time small {
  color: var(--text);
  font-weight: 500;
}
.al-main > i {
  display: none;
}
.al-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.al-text small {
  color: var(--text);
}
.al-chip {
  background: rgba(255, 255, 255, 0.7);
}
.agenda-year {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  padding: 16px;
}
.agenda-mini.is-compact {
  padding: 12px;
  border-radius: var(--r-md);
  background: var(--subtle);
}
.agenda-mini.is-compact .agenda-mini-grid button {
  height: 26px;
}
/* Janela do evento */
.ev-detail header {
  display: flex;
  gap: 12px;
  padding: 14px;
  border-radius: var(--r-md);
  background: var(--ev-bg);
}
.ev-detail header > i {
  width: 6px;
  border-radius: 3px;
  background: var(--ev-ink);
}
.ev-detail header p {
  color: var(--text);
  font-size: 13px;
}
.ev-join {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: var(--r-md);
  background: var(--ink);
  color: var(--on-ink);
  font-weight: 700;
}
.ev-join small {
  margin-left: auto;
  opacity: 0.7;
}
.ev-detail dl {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 8px 12px;
  margin: 14px 0;
}
.ev-detail dt {
  color: var(--muted);
}
.ev-detail dd {
  margin: 0;
  font-weight: 600;
}
.ev-notes {
  padding: 12px 14px;
  border-radius: var(--r-md);
  background: var(--subtle);
}
.ev-notes small {
  color: var(--muted);
}
.ev-rsvp {
  display: flex;
  gap: 8px;
  margin-top: 14px;
}
.ev-rsvp button {
  flex: 1;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid var(--line-2);
  border-radius: var(--r);
  font-weight: 600;
}
.ev-rsvp .selected {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--on-ink);
}
.ev-detail .modal-footer,
.agenda-form .modal-footer,
#modal .modal-footer:has(> div) {
  justify-content: space-between;
  align-items: center;
}
.modal-footer > div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-left: auto;
}
.agenda-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.agenda-when {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 10px;
}
.agenda-durations {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.agenda-durations button {
  min-height: 32px;
  padding: 0 12px;
  border-radius: 16px;
  background: var(--subtle);
  font-size: 12px;
  font-weight: 600;
}
.agenda-durations button:hover {
  background: var(--hover);
}
.agenda-colors {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.agenda-colors label {
  position: relative;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 17px;
  background: var(--ev-bg);
  color: var(--ev-ink);
  font-size: 12px;
  font-weight: 700;
}
.agenda-colors input {
  position: absolute;
  opacity: 0;
}
.agenda-colors label:has(input:checked) {
  box-shadow:
    0 0 0 2px var(--surface),
    0 0 0 4px var(--ev-ink);
}
.form-warning:empty {
  display: none;
}

@media (max-width: 1023px) {
  .agenda-page {
    grid-template-columns: minmax(0, 1fr);
  }
  .agenda-side {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  }
}
@media (max-width: 600px) {
  .agenda-when {
    grid-template-columns: 1fr 1fr;
  }
  .agenda-when .field:first-child {
    grid-column: 1 / -1;
  }
  .tg:not(.is-day) .tg-head,
  .tg:not(.is-day) .tg-scroll {
    min-width: 640px;
  }
  .tg:not(.is-day) {
    overflow-x: auto;
  }
  .am-cell {
    min-height: 64px;
  }
}

/* ---------- Equipes e pessoas ---------- */
.team-page,
.settings-page {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.team-heading {
  align-items: center;
}
.teams-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.teams-head p {
  margin-top: 2px;
  font-size: 13px;
}
.team-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}
.team-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  border-radius: var(--r-lg);
  background: var(--subtle);
  border-color: transparent;
}
.team-card > header {
  display: flex;
  align-items: center;
  gap: 12px;
}
.team-card > header > div {
  flex: 1;
  min-width: 0;
}
.team-card small {
  color: var(--muted);
}
.team-swatch {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: var(--team-color);
  flex: none;
}
.team-card > p {
  color: var(--text);
  font-size: 13px;
}
.team-card-people,
.team-card-boards {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.team-member-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px 3px 3px;
  border-radius: 20px;
  background: var(--surface);
  font-size: 13px;
  font-weight: 600;
}
.team-member-pill .person-avatar {
  width: 26px;
  height: 26px;
  font-size: 10px;
}
.team-member-pill b {
  padding: 1px 6px;
  border-radius: 6px;
  background: var(--lilac);
  color: var(--lilac-ink);
  font-size: 10px;
}
.team-card-boards button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 0 10px;
  border-radius: var(--r-sm);
  background: var(--surface);
  font-size: 12px;
  font-weight: 600;
}
.team-card-boards .icon {
  width: 14px;
  height: 14px;
}
.people-directory {
  display: flex;
  flex-direction: column;
}
.people-row,
.team-row,
.admin-user,
.admin-session {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 4px;
  border-top: 1px solid var(--line);
}
.people-row:first-child,
.team-row:first-child,
.admin-user:first-child,
.admin-session:first-child {
  border-top: 0;
}
.people-row > div:nth-child(2),
.team-person,
.admin-user > div,
.admin-session > div {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.people-row small,
.team-person small,
.admin-user small,
.admin-session small {
  color: var(--muted);
}
/* V4 3.6 — presença e tempo de casa na lista de pessoas */
.people-face {
  position: relative;
  flex: none;
  display: inline-flex;
}
.people-face .presence-dot {
  position: absolute;
  right: -1px;
  bottom: -1px;
  width: 11px;
  height: 11px;
  border: 2px solid var(--surface);
  border-radius: 50%;
  background: var(--line-2);
}
.people-row.is-online .people-face .presence-dot {
  background: var(--accent, #16a974);
}
.people-row small.people-since {
  font-size: 11px;
}
.people-teams .icon-button {
  width: 30px;
  height: 30px;
}
.people-teams {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}
.team-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 24px;
  padding: 0 9px;
  border-radius: var(--r-xs);
  background: var(--subtle);
  font-size: 11px;
  font-weight: 700;
}
.team-tag::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--team-color, var(--accent));
}
.team-tag.is-admin {
  background: var(--ink);
  color: var(--on-ink);
}
.team-tag.is-admin::before {
  display: none;
}
.team-how {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: how;
}
.team-how li {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px;
  border-radius: var(--r-md);
  background: var(--subtle);
  counter-increment: how;
}
.team-how li::before {
  content: counter(how);
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: var(--ink);
  color: var(--on-ink);
  font-size: 12px;
  font-weight: 700;
}
.team-how span {
  color: var(--text);
  font-size: 13px;
}
.team-role {
  color: var(--muted);
  font-size: 12px;
}
.team-row.inactive {
  opacity: 0.55;
}
.legacy-people > summary h2 {
  display: inline;
}
.legacy-people > summary p {
  margin: 4px 0 0 20px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
}
.legacy-people > header {
  margin: 14px 0 6px;
}
.share-visibility {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0;
  border: 0;
}
.share-option {
  display: flex !important;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-md);
}
.share-option:has(input:checked) {
  border-color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--ink);
}
.share-option > span {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 0 8px;
  align-items: center;
}
.share-option small {
  grid-column: 2;
  color: var(--muted);
}
.share-people,
.share-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.share-person,
.team-pick-row {
  display: flex !important;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--r);
  background: var(--subtle);
}
.share-person > div,
.team-pick-row > span:not(.person-avatar) {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.share-person small,
.team-pick-row small {
  color: var(--muted);
}
.share-person select,
.team-pick-row select {
  width: auto;
  min-height: 34px;
  font-size: 12px;
}
.team-pick {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 320px;
  overflow: auto;
}
.avatar-colors {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.avatar-colors label {
  position: relative;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--member-color);
}
.avatar-colors input {
  position: absolute;
  opacity: 0;
}
.avatar-colors label:has(input:checked) {
  box-shadow:
    0 0 0 2px var(--surface),
    0 0 0 4px var(--ink);
}
.more-avatar {
  background: var(--subtle) !important;
  color: var(--text) !important;
}

/* ---------- Conversas e menções ---------- */
.client-chat {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  min-height: 520px;
  padding: 0;
  overflow: hidden;
}
.client-chat > nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px;
  border-right: 1px solid var(--line);
  background: var(--subtle);
  overflow-y: auto;
}
.client-chat > nav button {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px;
  border-radius: var(--r);
  text-align: left;
}
.client-chat > nav button:hover {
  background: var(--hover);
}
.client-chat > nav button.active {
  background: var(--surface);
  box-shadow: var(--shadow);
}
.client-chat > nav small {
  color: var(--muted);
}
.chat-conversation {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.chat-conversation > header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}
.chat-conversation > header span {
  flex: 1;
  color: var(--muted);
  font-size: 13px;
}
.chat-history {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 520px;
  padding: 16px;
  overflow-y: auto;
}
.chat-history article {
  align-self: flex-start;
  max-width: 78%;
  padding: 10px 13px;
  border-radius: 4px 16px 16px 16px;
  background: var(--subtle);
}
.chat-history article.mine {
  align-self: flex-end;
  border-radius: 16px 4px 16px 16px;
  background: var(--ink);
  color: var(--on-ink);
}
.chat-history article small {
  opacity: 0.65;
}
#chat-compose {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 12px 16px 16px;
  border-top: 1px solid var(--line);
}
#chat-compose textarea {
  min-height: 46px;
  border-radius: var(--r-md);
  background: var(--subtle);
  border-color: transparent;
}
.chat-mention-picker {
  position: absolute;
}
.chat-member {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
}
.inbox-panel {
  margin-top: 16px;
}
.mention-message {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px;
  margin-top: 8px;
  border-radius: var(--r-md);
  background: var(--lilac);
}
.mention-message.read {
  background: var(--subtle);
}
.mention-message header {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}
.mention-message time {
  color: var(--muted);
  font-size: 12px;
}
.mention-message > button:last-child {
  align-self: flex-end;
  margin-top: -36px;
}
/* Gaveta de avisos e agenda */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 95;
  background: rgba(15, 16, 20, 0.35);
}
.agenda-drawer {
  position: fixed;
  top: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 100;
  width: min(400px, calc(100vw - 24px));
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  background: var(--surface);
  box-shadow: var(--shadow-dialog);
  animation: drawer-right 0.3s var(--ease);
}
@keyframes drawer-right {
  from {
    transform: translateX(30px);
    opacity: 0;
  }
  to {
    transform: none;
    opacity: 1;
  }
}
.agenda-drawer > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.drawer-intro,
.drawer-free {
  color: var(--muted);
  font-size: 13px;
}
.clear-notices {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 0 12px;
  border-radius: var(--r-sm);
  background: var(--subtle);
  font-size: 13px;
  font-weight: 600;
}
.clear-notices .icon {
  width: 16px;
  height: 16px;
}
.drawer-task,
.drawer-event {
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--r-md);
  background: var(--subtle);
  text-align: left;
  transition: background 0.15s;
}
.drawer-task:hover,
.drawer-event:hover {
  background: var(--hover);
}
.drawer-task span,
.drawer-event small {
  color: var(--muted);
  font-size: 13px;
}
.drawer-event {
  flex-direction: row;
  gap: 10px;
}
.drawer-date {
  display: flex;
  justify-content: space-between;
  margin: 8px 0 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: capitalize;
}
.drawer-calendar {
  margin-top: auto;
}
/* Destaques da semana (ranking) */
.home-activity {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
  align-items: start;
}
.ranking-panel .section-heading small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.ranking-panel .section-heading .icon {
  color: #f5b83d;
}
.ranking-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}
.ranking-columns h3 {
  margin-bottom: 8px;
  font-size: 13px;
  color: var(--text);
}
.ranking-columns ol {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.rank-level {
  display: grid;
  grid-template-columns: 26px 30px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border-radius: var(--r);
  background: var(--subtle);
}
.rank-level > span:nth-child(3) {
  display: flex;
  flex-direction: column;
  font-weight: 600;
}
.rank-level small {
  color: var(--muted);
  font-weight: 500;
}
.rank-avatar {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}
.rank-place {
  text-align: center;
}
.rank-chart {
  grid-column: 1 / -1;
  height: 4px;
  overflow: hidden;
  border-radius: 2px;
  background: var(--line);
}
.rank-chart > span {
  display: block;
  height: 100%;
  background: var(--accent);
}
.rank-note {
  margin-top: 12px;
  font-size: 12px;
}

/* ---------- Configurações ---------- */
.settings-tabs {
  display: inline-flex;
}
.profile-photo-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.profile-photo-controls img,
.profile-photo-controls > .icon {
  width: 56px;
  height: 56px;
  padding: 0;
  border-radius: 50%;
  object-fit: cover;
  background: var(--subtle);
}
.profile-photo-controls > .icon {
  padding: 14px;
  color: var(--muted);
}
.profile-photo-controls label input {
  position: absolute;
  opacity: 0;
  width: 1px;
}
#settings-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
#settings-form > button[type="submit"] {
  align-self: flex-start;
}
.data-settings {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.data-settings p {
  margin: 4px 0 0 !important;
}
.profile-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.profile-popover {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-radius: var(--r-md);
  background: var(--subtle);
}
.profile-popover .person-avatar {
  width: 46px;
  height: 46px;
  font-size: 15px;
}
.profile-popover p {
  color: var(--muted);
  font-size: 13px;
}
#modal .profile-actions {
  flex-direction: column;
}
#modal .profile-actions > * {
  justify-content: flex-start;
  width: 100%;
}
.theme-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}
.theme-grid .field {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  padding: 8px 8px 8px 12px;
  border-radius: var(--r);
  background: var(--subtle);
}
.icon-editor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
}
.icon-editor-grid section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 10px;
  border-radius: var(--r-md);
  background: var(--subtle);
  text-align: center;
}
.icon-editor-grid section > .icon {
  width: 26px;
  height: 26px;
}
.icon-editor-grid label {
  position: relative;
  min-height: 32px;
  font-size: 12px;
}
.icon-editor-grid input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
}
.label-manager {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.label-edit-form {
  display: flex;
  align-items: center;
  gap: 8px;
}
.label-edit-form input[type="color"] {
  flex: none;
}
.status-pill {
  background: var(--subtle);
  color: var(--text);
}
.status-pill.on {
  background: var(--mint);
  color: var(--mint-ink);
}

/* ---------- Google ---------- */
.google-card > header,
.ical-card > header,
.legal-api > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}
.google-card h2 .icon,
.ical-card h2 .icon,
.legal-api h2 .icon {
  width: 18px;
  height: 18px;
  margin-right: 6px;
  vertical-align: -3px;
}
.google-steps {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}
.google-step {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 12px;
  padding: 14px;
  border-radius: var(--r-md);
  background: var(--subtle);
}
.google-step-n {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--surface);
  font-weight: 800;
}
.google-step.done .google-step-n {
  background: var(--accent);
  color: var(--on-accent, #fff);
}
.google-step > div {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}
.google-guide {
  margin: 0 !important;
  padding: 12px !important;
  background: var(--surface) !important;
}
.google-guide ol {
  margin: 10px 0 0;
  padding-left: 18px;
  color: var(--text);
  font-size: 13px;
}
.google-copy {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: var(--r);
  background: var(--surface);
  font-size: 12px;
}
.google-copy code {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.google-credentials {
  display: grid;
  gap: 10px;
}
.google-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.google-master {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 6px 12px;
  margin: 0;
}
.google-master dt {
  color: var(--muted);
}
.google-master dd {
  margin: 0;
  font-weight: 600;
}
.google-master-line {
  color: var(--text);
  font-size: 13px;
}
.google-calendar-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* ---------- Painel /admin/ ---------- */
.admin-console {
  min-height: 100vh;
  display: flex;
}
/* No tablet o menu da área de trabalho vira só ícones (76px); o painel do
   administrador mantém os nomes, com uma coluna um pouco mais estreita. */
@media (min-width: 601px) and (max-width: 1023px) {
  .admin-console {
    --sidebar: 212px;
  }
  .admin-main {
    padding: 26px 22px 36px;
  }
}
.admin-nav {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar);
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 20px 14px 16px;
  background: var(--bg);
}
.admin-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 6px;
}
.admin-brand > div {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.admin-brand small {
  color: var(--muted);
}
.admin-nav nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.admin-nav nav button {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 40px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: var(--r);
  color: var(--text);
  font-weight: 500;
  text-align: left;
}
.admin-nav nav button:hover {
  background: var(--hover);
}
.admin-nav nav button.selected {
  background: var(--surface);
  border-color: var(--line);
  color: var(--ink);
  font-weight: 700;
  box-shadow: var(--shadow);
}
.admin-pending-count {
  margin-left: auto;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: var(--danger);
  color: #fff;
  font-size: 11px;
}
.admin-nav footer {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.admin-nav footer small {
  color: var(--muted);
  padding: 0 4px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.admin-main {
  flex: 1;
  min-width: 0;
  min-height: calc(100vh - 24px);
  margin: 12px 12px 12px var(--sidebar);
  padding: 30px 32px 40px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  background: var(--surface);
}
.admin-head small,
.setup-page > header small,
.content-heading small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
}
.admin-head h1,
.setup-page > header h1 {
  margin: 4px 0;
}
.admin-head p,
.setup-page > header p {
  color: var(--muted);
}
.admin-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 12px;
}
.admin-tile {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  text-align: left;
  transition:
    box-shadow 0.2s,
    transform 0.2s;
}
.admin-tile:hover {
  box-shadow: var(--shadow-pop);
  transform: translateY(-1px);
}
.admin-tile small {
  color: var(--muted);
}
.admin-tile strong {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.admin-tile.is-text strong {
  font-size: 18px;
}
.admin-tile span {
  color: var(--muted);
  font-size: 12px;
}
.admin-tile.warn strong {
  color: var(--peach-ink);
}
.admin-env dl,
.admin-meta {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 8px 16px;
  margin: 0;
}
.admin-env dt,
.admin-meta dt {
  color: var(--muted);
}
.admin-env dd,
.admin-meta dd {
  margin: 0;
}
.admin-rules {
  display: grid;
  gap: 8px;
}
.admin-rule {
  display: flex;
  gap: 10px;
  padding: 12px;
  border-radius: var(--r);
  background: var(--subtle);
}
.admin-sessions > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}
.admin-user-avatar {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  flex: none;
  border-radius: 50%;
  background: var(--lilac);
  color: var(--lilac-ink);
  font-size: 12px;
  font-weight: 700;
}
.admin-user.is-pending {
  margin: 4px 0;
  padding: 12px;
  border: 0;
  border-radius: var(--r-md);
  background: var(--sun);
}
.admin-user.is-rejected {
  opacity: 0.6;
}
.admin-user-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}
.admin-badge {
  display: inline-flex;
  min-height: 22px;
  padding: 0 8px;
  align-items: center;
  border-radius: var(--r-xs);
  background: var(--subtle);
  font-size: 11px;
  font-weight: 700;
}
.admin-badge.is-pending {
  background: var(--peach);
  color: var(--peach-ink);
}
.admin-badge.is-rejected {
  background: var(--rose);
  color: var(--rose-ink);
}
.admin-password {
  display: flex;
  align-items: flex-end;
  gap: 8px;
}
.admin-password .field {
  flex: 1;
}
.setup-page {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.setup-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.setup-steps span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 12px 0 6px;
  border-radius: 18px;
  background: var(--subtle);
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}
.setup-steps b {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--surface);
  font-size: 12px;
}
.setup-steps .active {
  background: var(--ink);
  color: var(--on-ink);
}
.setup-steps .active b {
  background: var(--accent);
  color: var(--on-accent, #fff);
}
#setup-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.mode-options,
.signup-modes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}
.mode-options label,
.signup-modes label {
  position: relative;
  display: flex !important;
  flex-direction: column;
  align-items: flex-start !important;
  gap: 4px;
  padding: 16px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-md);
  cursor: pointer;
}
.mode-options label:has(input:checked),
.signup-modes label:has(input:checked) {
  border-color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--ink);
  background: var(--subtle);
}
.mode-options p {
  color: var(--muted);
  font-size: 13px;
}
.setup-review {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 8px 16px;
}
.setup-review dt {
  color: var(--muted);
}
.setup-review dd {
  margin: 0;
  font-weight: 600;
}
.setup-actions {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}
.integration-grid,
.legal-api-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 12px;
}
.integration-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.admin-subhead {
  margin-top: 10px;
}
.admin-restricted h1 {
  margin-bottom: 6px;
}
.board-picker {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 420px;
  overflow: auto;
  margin-top: 10px;
}
.board-picker label,
.board-picker > button {
  display: flex !important;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--r);
  text-align: left;
}
.board-picker label:hover,
.board-picker > button:hover {
  background: var(--subtle);
}
.picker-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
}
.picker-group {
  margin: 10px 0 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}
.picker-owner {
  margin-left: auto;
  color: var(--muted);
  font-size: 12px;
}

/* ---------- APIs jurídicas ---------- */
.legal-api {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.legal-api p {
  color: var(--text) !important;
  font-size: 13px;
}
.oab-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.oab-row {
  display: grid;
  grid-template-columns: 1fr 90px 1.4fr auto;
  align-items: end;
  gap: 8px;
}
.legal-feed {
  margin-top: 16px;
}
.legal-feed-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.legal-feed-item {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 14px;
  border-radius: var(--r-md);
  background: var(--subtle);
}
.legal-feed-item.is-new {
  background: var(--lilac);
}
.legal-feed-item > div:first-child {
  flex: 1;
  min-width: 240px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.legal-feed-item small {
  color: var(--muted);
}
.legal-feed-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}
.legal-feed-count {
  color: var(--muted);
}
.datajud-line {
  color: var(--muted);
  font-size: 12px;
}

/* ---------- Páginas antigas (clientes, conteúdos, mensagens) ---------- */
.collection-page,
.messages-page {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.content-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}
.document-card,
.client-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
}
.document-card p,
.client-card p {
  color: var(--muted);
  font-size: 13px;
}
.document-card footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  color: var(--muted);
}
.document-icon,
.client-initial {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--mint);
  color: var(--mint-ink);
  font-weight: 700;
}
.client-card dl {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr);
  gap: 4px 10px;
  margin: 0;
  font-size: 13px;
}
.client-card dt {
  color: var(--muted);
}
.client-card dd {
  margin: 0;
}
.client-card .pill {
  min-height: 34px;
  align-self: flex-start;
}
.message-log {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.message {
  padding: 14px;
  border-radius: var(--r-md);
  background: var(--subtle);
}
.message header {
  display: flex;
  align-items: center;
  gap: 10px;
}
.message header small {
  flex: 1;
  color: var(--muted);
}
#message-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
#message-form > div {
  display: flex;
  gap: 8px;
}
.legacy-documents .collection-page,
details .collection-page {
  margin-top: 14px;
}

@media (max-width: 760px) {
  .client-chat {
    grid-template-columns: minmax(0, 1fr);
  }
  .client-chat > nav {
    flex-direction: row;
    overflow-x: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .client-chat > nav button {
    flex: none;
  }
  .oab-row {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 600px) {
  .admin-nav {
    position: static;
    width: auto;
    padding: 16px 16px 0;
  }
  .admin-nav nav {
    flex-direction: row;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .admin-nav nav button {
    flex: none;
  }
  .admin-nav footer {
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
  }
  .admin-console {
    flex-direction: column;
  }
  .admin-tiles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .admin-tile strong {
    font-size: 22px;
  }
  .admin-main {
    margin: 12px 0 0;
    padding: 20px 18px 32px;
    border: 0;
    border-radius: 24px 24px 0 0;
  }
  .agenda-drawer {
    top: auto;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-height: 86dvh;
    border-radius: 26px 26px 0 0;
  }
  .admin-env dl,
  .admin-meta,
  .setup-review,
  .google-master,
  .ev-detail dl {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ---------- Entrada: login, cadastro e espera ---------- */
.auth {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: 12px;
  padding: 12px;
  background: var(--bg);
}
.auth-panel {
  display: flex;
  flex-direction: column;
  padding: 28px 32px;
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  background: var(--surface);
}
.auth-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.auth-box {
  width: min(400px, 100%);
  margin: auto;
  padding: 40px 0;
  display: flex;
  flex-direction: column;
  gap: 22px;
  animation: rise 0.5s var(--ease);
}
.auth-head h1,
.pending-notice h1 {
  margin: 10px 0 6px;
  font-size: 30px;
}
.auth-head p,
.pending-notice p {
  color: var(--muted);
}
#auth-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.auth-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
}
.auth-field input {
  height: 52px;
  border-color: transparent !important;
  border-radius: 14px !important;
  background: var(--subtle) !important;
  font-size: 15px !important;
}
.auth-field input:focus {
  border-color: var(--accent) !important;
  background: var(--surface) !important;
}
.password-hint {
  color: var(--muted);
  font-size: 12px;
}
.auth-submit {
  height: 56px;
  margin-top: 4px;
  border-radius: 16px;
  font-size: 16px;
  font-weight: 700;
}
.auth-or {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--faint);
  font-size: 12px;
}
.auth-or::before,
.auth-or::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}
.google-login {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 52px;
  border: 1px solid var(--line-2);
  border-radius: 16px;
  font-weight: 700;
  transition: background 0.15s;
}
.google-login:hover {
  background: var(--subtle);
}
.auth-foot {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  color: var(--muted);
  font-size: 14px;
}
.auth-foot a,
.admin-entry,
.back-login {
  color: var(--ink);
  font-weight: 700;
}
.mobile-register a {
  color: var(--accent);
}
.demo-link {
  color: var(--text);
  font-weight: 600;
}
.pending-notice {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.auth-art {
  position: relative;
  overflow: hidden;
  display: flex;
  border-radius: var(--r-xl);
  background:
    radial-gradient(circle at 80% 15%, #ffffff 0 1px, transparent 2px) 0 0 /
      38px 38px,
    #eef3f1;
}
:root[data-theme="dark"] .auth-art {
  background: #15201d;
}
.auth-art-inner {
  margin: auto;
  width: min(460px, 86%);
  display: flex;
  flex-direction: column;
  gap: 30px;
}
.art-week {
  align-self: flex-end;
  display: flex;
  gap: 6px;
  padding: 14px;
  border-radius: 24px;
  background: var(--surface);
  box-shadow: var(--shadow-pop);
  animation: rise 0.6s var(--ease) 0.1s backwards;
}
.art-week span {
  width: 44px;
  height: 62px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  border-radius: 16px;
}
.art-week small {
  color: var(--faint);
  font-size: 11px;
}
.art-week b {
  font-size: 15px;
}
.art-week .on {
  background: var(--accent);
  color: var(--on-accent, #fff);
}
.art-week .on small {
  color: rgba(255, 255, 255, 0.85);
}
.art-cards {
  display: flex;
  gap: 14px;
}
.art-card {
  flex: 1;
  height: 190px;
  display: flex;
  flex-direction: column;
  padding: 14px;
  border-radius: 24px;
  background: var(--card-bg);
  color: #15161a;
  animation: rise 0.6s var(--ease) backwards;
}
.art-card.tone-0 {
  --card-bg: #e6deff;
  transform: rotate(-8deg) translateY(10px);
  box-shadow: var(--shadow-lift);
  animation-delay: 0.2s;
}
.art-card.tone-1 {
  --card-bg: #d7f4e6;
  animation-delay: 0.3s;
}
.art-card.tone-2 {
  --card-bg: #d6ecfb;
  animation-delay: 0.4s;
}
.art-card em {
  align-self: flex-end;
  padding: 3px 8px;
  border: 1px solid rgba(21, 22, 26, 0.12);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.6);
  font-size: 10px;
  font-style: normal;
  font-weight: 700;
}
.art-card strong {
  margin-top: 12px;
  font-size: 16px;
  line-height: 1.25;
}
.art-card small {
  margin-top: auto;
  color: rgba(21, 22, 26, 0.6);
  font-size: 11px;
}
.art-card i {
  margin-top: 6px;
  height: 4px;
  border-radius: 2px;
  background: rgba(21, 22, 26, 0.1);
}
.art-card b {
  display: block;
  height: 100%;
  border-radius: 2px;
  background: #15161a;
}
.art-copy h2 {
  font-size: 30px;
  line-height: 1.15;
  letter-spacing: -0.03em;
}
.art-copy p {
  margin-top: 10px;
  color: var(--text);
}
@media (max-width: 900px) {
  .auth {
    grid-template-columns: minmax(0, 1fr);
    padding: 0;
    background: var(--surface);
  }
  .auth-panel {
    min-height: 100vh;
    padding: 22px 20px;
    border: 0;
    border-radius: 0;
  }
  .auth-art {
    display: none;
  }
  .auth-box {
    margin: 32px 0 auto;
  }
  .auth-head h1,
  .pending-notice h1 {
    font-size: 26px;
  }
}

/* ---------- Postagem (Agência) ---------- */
.st-gray,
.sc-gray,
.c-gray {
  --st-bg: var(--subtle);
  --st-ink: var(--text);
}
.st-yellow,
.sc-yellow,
.c-yellow {
  --st-bg: var(--sun);
  --st-ink: var(--sun-ink);
}
.st-orange,
.sc-orange,
.c-orange {
  --st-bg: var(--peach);
  --st-ink: var(--peach-ink);
}
.st-green,
.sc-green,
.c-green {
  --st-bg: var(--mint);
  --st-ink: var(--mint-ink);
}
.st-purple,
.sc-purple {
  --st-bg: var(--lilac);
  --st-ink: var(--lilac-ink);
}
.st-teal,
.sc-teal {
  --st-bg: var(--sky);
  --st-ink: var(--sky-ink);
}
.cover-lilac {
  --cover: #e6deff;
}
.cover-peach {
  --cover: #fce7d6;
}
.cover-lime {
  --cover: #eaf5c8;
}
.cover-sky {
  --cover: #d6ecfb;
}
.cover-coral {
  --cover: #ffe0da;
}
.cover-mint {
  --cover: #d7f4e6;
}
.social-heading {
  align-items: center;
}
.social-counters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.social-counters button,
.api-pipe > div {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  min-height: 34px;
  padding: 6px 12px;
  border-radius: var(--r-sm);
  background: var(--st-bg);
  color: var(--st-ink);
  font-size: 12px;
  font-weight: 600;
}
.social-counters strong,
.api-pipe strong {
  font-size: 15px;
  color: var(--ink);
}
.social-counters .selected {
  box-shadow: inset 0 0 0 2px var(--st-ink);
}
.social-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}
.social-toolbar > select {
  width: auto;
  min-width: 190px;
}
.social-toolbar > .dark-button {
  margin-left: auto;
}
.social-loading {
  color: var(--muted);
}
.social-month > header,
.social-week > header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
}
.social-month > header h2,
.social-week > header h2 {
  min-width: 180px;
  text-align: center;
}
.sm-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}
.sm-weekday {
  padding: 4px 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}
.sm-cell {
  min-height: 118px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 6px;
  border-radius: var(--r);
  background: var(--subtle);
}
.sm-cell.is-outside {
  opacity: 0.45;
}
.sm-cell > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 700;
}
.sm-cell.is-today > header span {
  min-width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--accent);
  color: var(--on-accent, #fff);
}
.sm-add {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: var(--muted);
  opacity: 0;
}
.sm-cell:hover .sm-add,
.sw-day:hover .sm-add {
  opacity: 1;
}
.sm-add .icon {
  width: 14px;
  height: 14px;
}
.sp-card {
  position: relative;
}
.sp-open {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 6px 8px;
  border-radius: var(--r-sm);
  background: var(--st-bg);
  text-align: left;
}
.sp-top {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--st-ink);
  font-size: 10px;
}
.sp-top .icon {
  width: 12px;
  height: 12px;
}
.sp-dot {
  margin-left: auto;
}
.sp-dot .icon {
  width: 12px;
  height: 12px;
}
.sp-state {
  color: var(--st-ink);
  font-size: 10px;
  font-weight: 700;
}
.sp-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 700;
}
.sp-pop {
  position: absolute;
  left: 0;
  top: calc(100% + 6px);
  z-index: 30;
  width: 240px;
  display: none;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
  box-shadow: var(--shadow-dialog);
}
.sp-card:hover .sp-pop,
.sp-card:focus-within .sp-pop {
  display: flex;
}
.sp-card.pop-left .sp-pop {
  left: auto;
  right: 0;
}
.sp-card.pop-up .sp-pop {
  top: auto;
  bottom: calc(100% + 6px);
}
.sp-pop-media {
  position: relative;
}
.sp-pop-media .sp-thumb {
  width: 100%;
  height: 130px;
  border-radius: var(--r);
}
.sp-pop-handle {
  position: absolute;
  left: 8px;
  bottom: 8px;
  padding: 2px 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.85);
  font-size: 11px;
  font-weight: 700;
}
.sp-pop-facets {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.sp-pop-facets span {
  display: flex;
  flex-direction: column;
}
.sp-pop-facets small,
.sp-pop p {
  color: var(--muted);
  font-size: 11px;
}
.sp-pop p {
  display: flex;
  align-items: center;
  gap: 6px;
}
.sp-pop .icon {
  width: 14px;
  height: 14px;
}
.sp-pop-error {
  color: var(--danger-ink) !important;
}
.fs-pending {
  color: var(--muted);
}
.fs-approved {
  color: var(--mint-ink);
}
.fs-changes {
  color: var(--peach-ink);
}
.sp-thumb {
  width: 44px;
  height: 44px;
  flex: none;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: var(--r-sm);
  object-fit: cover;
  background: var(--subtle);
  color: var(--muted);
}
.sp-thumb-empty .icon {
  width: 18px;
  height: 18px;
}
.sp-status,
.task-post-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 22px;
  padding: 0 8px;
  border-radius: var(--r-xs);
  background: var(--st-bg);
  color: var(--st-ink);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}
.task-post-chip .icon {
  width: 12px;
  height: 12px;
}
.sw-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}
.sw-day {
  min-height: 300px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px;
  border-radius: var(--r-md);
  background: var(--subtle);
}
.sw-day > header {
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.sw-day > header small {
  color: var(--muted);
}
.sw-day > header .sm-add {
  margin-left: auto;
}
.sw-day.is-today > header strong {
  color: var(--accent);
}
.sw-post {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px;
  border-radius: var(--r);
  background: var(--surface);
  text-align: left;
  box-shadow: var(--shadow);
}
.sw-post .sp-thumb {
  width: 100%;
  height: 80px;
}
.sw-post > span {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
}
.sw-post small {
  color: var(--muted);
  font-size: 11px;
}
.sw-free {
  color: var(--faint);
  font-size: 12px;
}
.sf-profile {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.sf-profile > div {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.sf-profile small {
  color: var(--muted);
}
.sf-profile select {
  width: auto;
}
.ac-avatar {
  width: 46px;
  height: 46px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--cover, var(--lilac));
  color: #15161a;
  font-weight: 800;
}
.sf-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  max-width: 620px;
}
.sf-tile {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 6px;
  background: var(--subtle);
}
.sf-tile .sp-thumb {
  width: 100%;
  height: 100%;
  border-radius: 0;
}
.sf-tile.is-pending .sp-thumb {
  opacity: 0.55;
}
.sf-badge {
  position: absolute;
  top: 6px;
  left: 6px;
}
.sf-multi {
  position: absolute;
  top: 6px;
  right: 6px;
  color: #fff;
}
.sf-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  padding: 18px 8px 6px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.55));
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  text-align: left;
}
.social-queue {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 12px;
}
.sq-group h2 {
  margin-bottom: 10px;
}
.sq-group h2 small {
  color: var(--muted);
  font-weight: 500;
}
.sq-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-top: 1px solid var(--line);
}
.sq-row:first-of-type {
  border-top: 0;
}
.sq-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  text-align: left;
}
.sq-main small {
  color: var(--muted);
}
.sq-main em {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--danger-ink);
  font-size: 12px;
  font-style: normal;
}
.sq-row .subtle-button,
.sq-row .dark-button {
  min-height: 34px;
  padding: 0 12px;
  font-size: 13px;
}
/* Edição da postagem */
.content-back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
}
.content-back-link .icon {
  width: 16px;
  height: 16px;
}
.se-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}
.se-head small {
  color: var(--muted);
}
.se-alert {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  padding: 12px 14px;
  border-radius: var(--r);
  background: var(--rose);
  color: var(--rose-ink);
}
.se-layout {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}
.se-phone {
  position: sticky;
  top: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 34px;
  background: var(--surface);
  box-shadow: var(--shadow-pop);
}
.se-phone > header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
}
.se-phone > header .ac-avatar {
  width: 34px;
  height: 34px;
  font-size: 12px;
}
.se-phone > header div {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.se-phone > header small {
  color: var(--muted);
}
.se-media {
  position: relative;
  aspect-ratio: 4 / 5;
  background: var(--subtle);
}
.se-media.is-story {
  aspect-ratio: 9 / 16;
}
.se-media img,
.se-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.se-media-empty {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--muted);
}
.se-media > .icon-button {
  position: absolute;
  top: 50%;
  background: rgba(255, 255, 255, 0.85);
  transform: translateY(-50%);
}
.se-media > .icon-button:first-of-type {
  left: 8px;
}
.se-media > .icon-button:last-of-type {
  right: 8px;
}
.se-dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 10px;
  display: flex;
  justify-content: center;
  gap: 4px;
}
.se-dots i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.6);
}
.se-dots i.on {
  background: #fff;
}
.se-phone > footer {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 16px 18px;
  font-size: 13px;
}
.se-actions {
  display: flex;
  gap: 12px;
}
.se-actions span {
  flex: 1;
}
.se-work {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}
.se-facets {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}
.se-facets button {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 10px 12px;
  border: 1px solid var(--line-2);
  border-radius: var(--r);
}
.se-facets button span {
  font-size: 12px;
  font-weight: 600;
}
.se-facets .selected {
  border-color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--ink);
}
.se-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.se-panel > footer {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
}
.se-facet-state {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
}
.se-facet-state select {
  width: auto;
}
.se-tools {
  display: flex;
  gap: 2px;
  margin-bottom: 4px;
}
.se-emoji {
  position: relative;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: none !important;
}
.se-emoji summary {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: var(--r-sm);
}
.se-emoji summary::before {
  display: none;
}
.se-emoji > div {
  position: absolute;
  z-index: 10;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  width: 200px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface);
  box-shadow: var(--shadow-pop);
}
.se-emoji > div button {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  font-size: 16px;
}
.se-count {
  color: var(--muted);
  font-size: 12px;
}
.se-files {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 8px;
}
.se-files figure {
  margin: 0;
  overflow: hidden;
  border-radius: var(--r);
  background: var(--subtle);
}
.se-files img,
.se-files video {
  width: 100%;
  height: 110px;
  object-fit: cover;
}
.se-files figcaption {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 4px 4px 8px;
  font-size: 11px;
}
.se-files figcaption span {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.se-thread h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.se-thread h2 small {
  color: var(--muted);
}
.se-thread article {
  margin-bottom: 8px;
  padding: 10px 13px;
  border-radius: 4px 16px 16px 16px;
  background: var(--subtle);
}
.se-thread article.from-client {
  background: var(--lilac);
}
.se-thread article header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.se-thread time {
  margin-left: auto;
  color: var(--muted);
  font-size: 12px;
}
#hub-social-reply {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}
.se-bar {
  position: sticky;
  bottom: 12px;
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 18px;
  padding: 10px 12px;
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-dialog);
}
.se-chip select {
  width: auto;
  min-height: 36px;
  border-color: transparent;
  background-color: var(--st-bg);
  color: var(--st-ink);
  font-weight: 700;
}
.se-sep {
  width: 1px;
  height: 24px;
  background: var(--line-2);
}
.se-time {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text);
  font-size: 13px;
}
.se-time .icon {
  width: 16px;
  height: 16px;
}
.se-grow {
  flex: 1;
}
.se-targets,
.se-downloads,
.se-publish {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.se-note {
  color: var(--muted);
  font-size: 13px;
}
/* APIs Meta por cliente */
.api-head-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.api-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  padding: 10px;
}
.api-toolbar label {
  flex: 1;
  min-width: 220px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding-left: 8px;
  color: var(--muted);
}
.api-toolbar input {
  border: 0 !important;
  box-shadow: none !important;
}
.api-toolbar select {
  width: auto;
}
.api-clients {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}
.api-client {
  padding: 0;
  overflow: hidden;
  transition:
    box-shadow 0.2s,
    transform 0.2s;
}
.api-client:hover {
  box-shadow: var(--shadow-pop);
  transform: translateY(-1px);
}
.api-client > button {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding: 0 16px 16px;
  text-align: left;
}
.ac-cover {
  align-self: stretch;
  height: 64px;
  margin: 0 -16px;
  background: var(--cover);
}
.api-client .ac-avatar {
  margin-top: -26px;
  border: 3px solid var(--surface);
}
.ac-name {
  display: flex;
  align-items: center;
  gap: 6px;
}
.ac-name i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--faint);
}
.ac-name i.on {
  background: var(--accent);
}
.ac-name em {
  font-size: 11px;
  font-style: normal;
  color: var(--mint-ink);
}
.ac-name em.off {
  color: var(--muted);
}
.ac-handle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--muted);
}
.ac-handle .icon {
  width: 14px;
  height: 14px;
}
.ac-tag {
  padding: 2px 8px;
  border-radius: var(--r-xs);
  background: var(--subtle);
  font-size: 11px;
  font-weight: 700;
}
.ac-tag.is-empty {
  color: var(--faint);
}
.ac-counts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 10px;
  margin-top: 4px;
  font-size: 12px;
  color: var(--text);
}
.ac-counts span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.ac-counts i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--st-ink);
}
.api-hero {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 14px;
  padding-top: 70px;
  overflow: hidden;
}
.api-hero .ac-cover {
  position: absolute;
  inset: 0 0 auto 0;
  height: 80px;
  margin: 0;
}
.api-hero .ac-avatar {
  position: relative;
  width: 64px;
  height: 64px;
  border: 3px solid var(--surface);
}
.api-hero > div:nth-of-type(1) {
  flex: 1;
}
.api-hero p {
  color: var(--muted);
}
.api-hero-actions {
  display: flex;
  gap: 8px;
}
.api-detail {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 12px;
  margin-top: 12px;
}
.api-detail h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
.api-detail h3 {
  margin: 14px 0 8px;
}
.api-meta dl {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 6px 12px;
  margin: 0 0 12px;
}
.api-meta dt {
  color: var(--muted);
}
.api-meta dd {
  margin: 0;
  font-weight: 600;
}
.api-meta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}
.api-prep {
  padding: 10px 12px;
  border-radius: var(--r);
  background: var(--sun);
  color: var(--sun-ink);
  font-size: 13px;
}
.api-pages {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}
.api-pages label {
  display: flex !important;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: var(--r);
  background: var(--subtle);
}
.api-pages label span {
  display: flex;
  flex-direction: column;
}
.api-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}
.api-kpis > div {
  display: flex;
  flex-direction: column;
  padding: 12px;
  border-radius: var(--r);
  background: var(--subtle);
}
.api-kpis strong {
  font-size: 20px;
}
.api-kpis span {
  color: var(--muted);
  font-size: 12px;
}
.api-media {
  margin-bottom: 8px;
}
.api-media td:first-child {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.api-pipe {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.api-next {
  flex-direction: row;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px;
  border-radius: var(--r);
}
.api-next:hover {
  background: var(--subtle);
}
.api-next span {
  display: flex;
  flex-direction: column;
}
.api-tabs {
  margin-bottom: 10px;
}
@media (max-width: 1023px) {
  .se-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .se-phone {
    position: static;
    max-width: 360px;
    margin: 0 auto;
  }
}
@media (max-width: 760px) {
  .sw-grid {
    grid-template-columns: repeat(7, 200px);
    overflow-x: auto;
  }
  .sm-cell {
    min-height: 70px;
  }
  .social-toolbar > .dark-button {
    margin-left: 0;
  }
  .se-facets {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .se-bar {
    bottom: calc(var(--bottom-nav) + 8px);
  }
  .api-meta dl {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ---------- Jurídico ---------- */
.legal-page {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.legal-heading {
  margin-bottom: 6px;
}
.legal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.legal-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
}
.legal-stat {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-items: center;
  gap: 2px 12px;
}
.legal-stat .icon {
  grid-row: span 2;
  width: 40px;
  height: 40px;
  padding: 10px;
  border-radius: 12px;
  background: var(--subtle);
  color: var(--text);
}
.legal-stat strong {
  font-size: 28px;
  line-height: 1;
}
.legal-stat span {
  color: var(--muted);
  font-size: 13px;
}
.legal-stat.late .icon {
  background: var(--rose);
  color: var(--rose-ink);
}
.legal-stat.soon .icon {
  background: var(--peach);
  color: var(--peach-ink);
}
.legal-upcoming h2,
.legal-next h2,
.legal-facts h2,
.legal-hearings h2,
.legal-dashboard h3 {
  margin-bottom: 10px;
}
.legal-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 10px;
}
.legal-filters select {
  width: auto;
  min-width: 170px;
}
.legal-search {
  flex: 1;
  min-width: 240px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding-left: 8px;
  color: var(--muted);
}
.legal-search input {
  border: 0 !important;
  box-shadow: none !important;
}
.legal-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.legal-card {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  text-align: left;
  transition:
    box-shadow 0.2s,
    transform 0.2s;
}
.legal-card:hover {
  box-shadow: var(--shadow-pop);
  transform: translateY(-1px);
}
.legal-card-main {
  flex: 1;
  min-width: 240px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.legal-card-main strong {
  font-size: 16px;
}
.legal-card-main > span:not(.legal-chips) {
  color: var(--muted);
  font-size: 13px;
}
.legal-number {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.legal-number .icon-button {
  width: 26px;
  height: 26px;
}
.legal-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}
.legal-chips i {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: var(--r-xs);
  background: var(--subtle);
  color: var(--text);
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
}
.legal-chips .muted-chip,
.muted-chip {
  color: var(--muted);
}
.legal-chips .status-active,
.status-active {
  background: var(--mint);
  color: var(--mint-ink);
}
.legal-chips .status-suspended,
.status-suspended {
  background: var(--sun);
  color: var(--sun-ink);
}
.legal-card-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 6px;
}
.legal-due,
.legal-hearing {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: var(--r-sm);
  background: var(--subtle);
  font-size: 12px;
  font-weight: 600;
}
.legal-due small {
  margin-left: 4px;
  opacity: 0.8;
}
.legal-due .icon,
.legal-hearing .icon {
  width: 14px;
  height: 14px;
}
.legal-due.late,
.legal-deadline.late .legal-deadline-date {
  background: var(--rose);
  color: var(--rose-ink);
}
.legal-due.today,
.legal-due.soon,
.legal-deadline.today .legal-deadline-date,
.legal-deadline.soon .legal-deadline-date {
  background: var(--peach);
  color: var(--peach-ink);
}
.legal-avatar {
  width: 30px;
  height: 30px;
  display: inline-grid;
  place-items: center;
  flex: none;
  border-radius: 50%;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}
.legal-deadline {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 4px;
  border-top: 1px solid var(--line);
}
.legal-deadline:first-of-type {
  border-top: 0;
}
.legal-deadline > .legal-check {
  padding: 0;
  background: none;
  color: var(--faint);
}
.legal-deadline.done > .legal-check {
  color: var(--accent);
}
.legal-deadline-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  text-align: left;
}
.legal-deadline-body small {
  color: var(--muted);
}
.legal-deadline.done .legal-deadline-body strong {
  color: var(--muted);
  text-decoration: line-through;
}
.legal-deadline-date {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  padding: 6px 10px;
  border-radius: var(--r-sm);
  background: var(--subtle);
  font-size: 12px;
}
.legal-deadline-date small {
  opacity: 0.85;
}
.legal-dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}
.legal-dashboard h3 {
  color: var(--text);
  font-size: 13px;
}
.legal-hearing-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 8px;
  border-radius: var(--r);
  text-align: left;
}
.legal-hearing-row:hover {
  background: var(--subtle);
}
.legal-hearing-row > span:last-child {
  display: flex;
  flex-direction: column;
}
.legal-hearing-row small {
  color: var(--muted);
}
.legal-date-box {
  width: 46px;
  height: 50px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: none;
  border-radius: 14px;
  background: var(--sky);
  color: var(--sky-ink);
}
.legal-date-box b {
  font-size: 18px;
  line-height: 1;
}
.legal-date-box small {
  color: inherit !important;
  font-size: 11px;
  text-transform: uppercase;
}
.legal-detail-head {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.legal-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}
.legal-title-row h1 {
  margin: 4px 0;
}
.portal-toggle.on {
  background: var(--mint);
  border-color: transparent;
  color: var(--mint-ink);
}
.legal-tabs {
  padding: 4px;
  border-radius: 14px;
  background: var(--subtle);
}
.legal-tabs > button b {
  min-width: 20px;
  height: 20px;
  display: inline-grid;
  place-items: center;
  padding: 0 5px;
  border-radius: 10px;
  background: var(--surface);
  font-size: 11px;
}
.legal-tabs > .selected,
.legal-tabs > .selected:hover {
  /* 15/11/2026: o estilo de pílula (refine.css) deixava o texto branco
     sobre o fundo branco da aba escolhida. */
  background: var(--surface) !important;
  color: var(--ink) !important;
  box-shadow: var(--shadow);
}
.legal-summary {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 1fr);
  gap: 14px;
  align-items: start;
}
.legal-facts dl {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
  margin: 0;
}
.legal-facts dl > div {
  padding: 10px 12px;
  border-radius: var(--r);
  background: var(--subtle);
}
.legal-facts dt {
  color: var(--muted);
  font-size: 12px;
}
.legal-facts dd {
  margin: 2px 0 0;
  font-weight: 600;
}
.legal-facts h3 {
  margin: 16px 0 6px;
}
.legal-notes {
  white-space: pre-wrap;
  color: var(--text);
}
.legal-side {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.legal-next {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.legal-next > .subtle-button {
  align-self: flex-start;
  min-height: 34px;
  font-size: 13px;
}
.legal-tab-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.legal-tab-head p {
  max-width: 640px;
  color: var(--muted);
  font-size: 13px;
}
.legal-timeline-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.legal-movement {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.legal-movement.highlight {
  border-color: transparent;
  background: var(--sun);
}
.legal-movement > header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.legal-movement time {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}
.legal-movement > header > i {
  padding: 2px 8px;
  border-radius: var(--r-xs);
  background: var(--lilac);
  color: var(--lilac-ink);
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
}
.legal-flag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #b07800;
  font-size: 12px;
  font-weight: 700;
}
.legal-flag .icon {
  width: 14px;
  height: 14px;
}
.office-portal-flag {
  background: var(--mint) !important;
  color: var(--mint-ink) !important;
}
.legal-movement p {
  color: var(--text);
}
.legal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.legal-links button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: var(--r-sm);
  background: var(--subtle);
  font-size: 12px;
  font-weight: 600;
}
.legal-links .icon {
  width: 14px;
  height: 14px;
}
.legal-movement footer {
  display: flex;
  gap: 6px;
  margin-top: 4px;
}
.legal-movement footer .subtle-button {
  min-height: 32px;
  font-size: 12px;
}
.legal-movement footer .icon-button {
  margin-left: auto;
}
.legal-tasks,
.legal-hearings,
.legal-deadlines {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.legal-task {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 2px 10px;
  align-items: center;
  width: 100%;
  padding: 10px 8px;
  border-radius: var(--r);
  text-align: left;
}
.legal-task:hover {
  background: var(--subtle);
}
.legal-task small {
  grid-column: 2;
  color: var(--muted);
}
.legal-task.done strong {
  color: var(--muted);
  text-decoration: line-through;
}
.legal-task .icon {
  color: var(--faint);
}
.legal-task.done .icon {
  color: var(--accent);
}
.legal-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.legal-form > section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.legal-form > section > h3 {
  color: var(--text);
  font-size: 13px;
}
dialog.legal-modal {
  width: min(760px, calc(100vw - 32px));
}
.legal-cnj-status {
  margin-top: -6px;
  color: var(--muted);
  font-size: 12px;
}
.legal-cnj-status:empty {
  display: none;
}
.legal-deadline-form[data-counting="manual"] .legal-auto,
.legal-deadline-form:not([data-counting="manual"]) .legal-manual,
#office-client-form[data-type="pf"] .office-pj-only,
#office-client-form[data-type="pj"] .office-pf-only,
#office-intake-form[data-prospect="false"] .office-prospect {
  display: none;
}
.legal-holidays > div {
  display: flex;
  gap: 8px;
  margin-top: 6px;
}
.legal-holidays input {
  width: auto;
}
#legal-deadline-preview.legal-preview {
  padding: 12px 14px;
  border-radius: var(--r);
  background: var(--mint);
  color: var(--mint-ink);
  font-size: 13px;
}
#legal-deadline-preview.legal-preview:empty {
  display: none;
}
/* Escritório: clientes, atendimentos, modelos, auditoria */
.office-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}
.office-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.office-card > header {
  display: flex;
  align-items: center;
  gap: 12px;
}
.office-card > header > div {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.office-card small {
  color: var(--muted);
}
.office-initial {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  flex: none;
  border-radius: 50%;
  background: var(--sky);
  color: var(--sky-ink);
  font-weight: 800;
}
.office-initial.pj {
  border-radius: 12px;
  background: var(--lilac);
  color: var(--lilac-ink);
}
.office-contact {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 0;
}
.office-contact dt {
  color: var(--muted);
  font-size: 12px;
}
.office-contact dd {
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 13px;
  font-weight: 600;
}
.office-card footer {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
}
/* Botões do cartão quebram linha em vez de sair do box (03/11/2026). */
.office-card footer > * {
  max-width: 100%;
}
.office-card {
  min-width: 0;
}

.office-card footer .subtle-button {
  min-height: 34px;
  font-size: 13px;
}
/* Clientes do Jurídico no desenho do usuário (Figma, 15/11/2026): painel do
   título, blocos de situação que filtram, busca e cartões com cabeçalho na
   cor da situação e botões de função em duas colunas. */
.office-clients .office-hero {
  padding: 28px;
  border-radius: var(--r-xl);
  background: color-mix(in srgb, var(--accent) 9%, var(--surface));
}
.office-clients .office-hero h1 {
  font-size: 34px;
}
.office-tiles {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}
.office-tile {
  position: relative;
  display: grid;
  gap: 6px;
  min-height: 104px;
  padding: 18px 20px;
  border-radius: var(--r-md);
  text-align: left;
  align-content: start;
}
.office-tile span {
  font-size: 13px;
  font-weight: 600;
}
.office-tile strong {
  font-size: 32px;
  font-weight: 800;
  line-height: 1.1;
}
.office-tile i {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 16px;
  height: 3px;
  border-radius: 2px;
  background: currentColor;
}
.office-tile.is-all {
  background: var(--subtle);
  color: var(--ink);
}
.office-tile.is-critical {
  background: var(--rose);
  color: var(--rose-ink);
}
.office-tile.is-warn {
  background: var(--sun);
  color: var(--sun-ink);
}
.office-tile.is-ok {
  background: var(--mint);
  color: var(--mint-ink);
}
.office-tile.is-on {
  color: var(--on-ink);
}
.office-tile.is-all.is-on,
.office-tile.is-ok.is-on {
  background: var(--mint-ink);
}
.office-tile.is-critical.is-on {
  background: var(--rose-ink);
}
.office-tile.is-warn.is-on {
  background: var(--sun-ink);
}
html[data-theme="dark"] .office-tile.is-on {
  color: var(--surface);
}
.office-tile.is-on i {
  background: var(--accent);
}
.office-clients .legal-filters {
  border-radius: var(--r-md);
  background: color-mix(in srgb, var(--accent) 7%, var(--surface));
}
.office-client-card {
  position: relative;
  gap: 12px;
  padding: 0 20px 20px;
  overflow: hidden;
  border-radius: var(--r-md);
}
.office-client-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 20px;
  width: 44px;
  height: 4px;
  border-radius: 0 0 3px 3px;
  background: var(--mint-ink);
}
.office-client-card.is-critical::before {
  background: var(--rose-ink);
}
.office-client-card.is-warn::before {
  background: var(--sun-ink);
}
.office-client-card > header {
  margin: 0 -20px;
  padding: 22px 20px 18px;
  background: color-mix(in srgb, var(--mint) 70%, var(--surface));
}
.office-client-card.is-critical > header {
  background: color-mix(in srgb, var(--rose) 70%, var(--surface));
}
.office-client-card.is-warn > header {
  background: color-mix(in srgb, var(--sun) 70%, var(--surface));
}
.office-client-card .office-initial {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--mint-ink);
  color: var(--on-ink);
  font-size: 15px;
}
.office-client-card.is-critical .office-initial {
  background: var(--rose-ink);
}
.office-client-card.is-warn .office-initial {
  background: var(--sun-ink);
}
html[data-theme="dark"] .office-client-card .office-initial {
  color: var(--surface);
}
.office-client-card .office-card-open strong {
  font-size: 17px;
}
.office-client-card .office-card-mail {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 10.5px;
}
.office-client-card .legal-chips,
.office-client-card .lc-status {
  margin: 0;
}
.office-card footer.office-card-fns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 12px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}
.office-card footer.office-card-fns > .subtle-button {
  position: relative;
  justify-content: center;
  min-width: 0;
  min-height: 36px;
  padding: 4px 10px 4px 32px;
  border: 0;
  border-radius: var(--r-sm);
  background: var(--subtle);
  color: var(--ink);
  font-size: 12.5px;
  line-height: 1.15;
  text-align: center;
  /* Em cartão estreito o texto quebra linha em vez de sair do botão. */
  white-space: normal;
}
.office-card footer.office-card-fns > .subtle-button .icon {
  position: absolute;
  left: 12px;
  top: 50%;
  width: 16px;
  height: 16px;
  transform: translateY(-50%);
}
.office-card footer.office-card-fns > .subtle-button.is-fn {
  background: var(--accent-soft);
}
.office-card footer.office-card-fns > .subtle-button:hover {
  background: color-mix(in srgb, var(--accent) 18%, transparent);
}
@media (max-width: 900px) {
  .office-tiles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .office-tile {
    min-height: 84px;
  }
  .office-tile strong {
    font-size: 26px;
  }
  .office-clients .office-hero {
    padding: 20px;
  }
  .office-clients .office-hero h1 {
    font-size: 26px;
  }
}
.office-pipeline {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(250px, 1fr);
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 8px;
}
.office-stage {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  border: 0;
  border-radius: 22px;
  background: var(--subtle);
}
.office-stage h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px;
  font-size: 14px;
}
.office-stage h2 span {
  color: var(--muted);
  font-weight: 600;
}
.office-intake {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
}
.office-intake-open {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px;
  text-align: left;
}
.office-intake-open small {
  color: var(--muted);
}
.office-steps-preview,
.office-run-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 8px 0 0;
  padding-left: 18px;
  font-size: 13px;
}
.office-steps-preview small {
  color: var(--muted);
}
.office-run-list {
  padding: 0;
  list-style: none;
}
.office-run-list li {
  display: flex;
  justify-content: space-between;
  padding: 8px 10px;
  border-radius: var(--r-sm);
  background: var(--subtle);
}
.office-template-editor {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  gap: 14px;
}
.office-template-editor aside p {
  color: var(--muted);
  font-size: 12px;
}
.office-fields {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 8px;
}
.office-fields button {
  padding: 4px 8px;
  border-radius: var(--r-xs);
  background: var(--subtle);
  font-size: 11px;
  font-weight: 600;
}
.office-fields button:hover {
  background: var(--lilac);
  color: var(--lilac-ink);
}
.office-step {
  display: grid;
  grid-template-columns:
    28px minmax(0, 1fr) 120px repeat(2, minmax(0, 160px))
    auto;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border-radius: var(--r);
  background: var(--subtle);
}
.office-step-n {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: var(--ink);
  color: var(--on-ink);
  font-size: 12px;
  font-weight: 700;
}
.office-offset {
  display: flex !important;
  align-items: center;
  gap: 6px;
}
.office-offset small {
  color: var(--muted);
}
.office-doc-body {
  max-height: 50dvh;
  overflow: auto;
  padding: 16px;
  border-radius: var(--r);
  background: var(--subtle);
  white-space: pre-wrap;
  font-size: 14px;
  line-height: 1.6;
}
.office-audit {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 6px 16px;
  list-style: none;
}
.office-audit-row {
  display: flex;
  gap: 14px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
  font-size: 13px;
}
.office-audit-row:first-child {
  border-top: 0;
}
.office-audit-row time {
  min-width: 110px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.office-audit-row.portal {
  color: var(--lilac-ink);
}
.office-lead {
  padding: 12px;
  border-radius: var(--r);
  background: var(--subtle);
}
.office-portal-scope ul {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
  font-size: 13px;
}
.office-portal-scope li {
  display: flex;
  align-items: center;
  gap: 8px;
}
.office-copy {
  display: flex;
  gap: 8px;
}
.office-note {
  font-size: 12px;
}
@media (max-width: 900px) {
  .legal-summary,
  .office-template-editor {
    grid-template-columns: minmax(0, 1fr);
  }
  .office-step {
    grid-template-columns: 28px minmax(0, 1fr);
  }
  .office-step > :nth-child(n + 3) {
    grid-column: 2;
  }
}
@media (max-width: 600px) {
  .legal-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .legal-stat {
    padding: 14px;
    grid-template-columns: minmax(0, 1fr);
  }
  .legal-stat .icon {
    grid-row: auto;
    width: 32px;
    height: 32px;
    padding: 7px;
  }
  .legal-stat strong {
    font-size: 24px;
  }
  .legal-card-side {
    align-items: flex-start;
  }
  .office-pipeline {
    grid-auto-columns: calc(100vw - 60px);
  }
  .legal-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    max-width: 100%;
  }
}

/* Impressão de documento do escritório (Modelos › documento gerado). */
@media print {
  body.office-printing > :not(#modal) {
    display: none !important;
  }
  body.office-printing #modal {
    position: static;
    width: auto;
    max-height: none;
    border: 0;
    box-shadow: none;
  }
  body.office-printing #modal > :not(.office-doc),
  body.office-printing .office-doc > :not(#office-doc-print) {
    display: none !important;
  }
  body.office-printing .office-doc-body {
    max-height: none;
    overflow: visible;
    padding: 0;
    background: none;
  }
}

/* Postagem › Mensal no celular (27/10/2026): células compactas, cada postagem
   vira uma pílula na cor da etapa (o título segue para leitores de tela), o
   "+" de cada dia sai (no toque ele não aparecia) e o cabeçalho cabe na tela. */
@media (max-width: 600px) {
  .social-month > header,
  .social-week > header {
    flex-wrap: wrap;
  }
  .social-month > header h2,
  .social-week > header h2 {
    flex: 1;
    min-width: 0;
    font-size: 16px;
  }
  .sm-grid {
    gap: 4px;
  }
  .sm-weekday {
    padding: 2px 0;
    text-align: center;
    font-size: 10px;
  }
  .sm-cell {
    min-width: 0;
    min-height: 58px;
    padding: 5px 3px;
    gap: 3px;
  }
  .sm-cell > header {
    justify-content: center;
  }
  .sm-cell .sm-add,
  .sm-cell .sp-pop {
    display: none;
  }
  .sp-open {
    min-height: 22px;
    padding: 0;
    border-radius: 8px;
    background: var(--st-ink, var(--muted));
  }
  .sp-open > span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
}
/* Alvos de toque mínimos (≥ 32px) sem mudar o desenho: área extra invisível. */
@media (pointer: coarse), (max-width: 600px) {
  .legal-deadline > .legal-check,
  .content-back-link {
    position: relative;
  }
  .legal-deadline > .legal-check::after,
  .content-back-link::after {
    content: "";
    position: absolute;
    inset: -8px;
  }
}

/* Menções recebidas (27/10, tarde): lista simples, sem blocos coloridos.
   Um ponto marca o que ainda não foi lido. */
.inbox-panel .mention-message {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  column-gap: 6px;
  row-gap: 2px;
  margin: 0;
  padding: 12px 10px 12px 24px;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
}
.inbox-panel .mention-message:last-child {
  border-bottom: 0;
}
.inbox-panel .mention-message:hover {
  background: var(--subtle);
}
.inbox-panel .mention-message::before {
  content: "";
  position: absolute;
  left: 9px;
  top: 19px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}
.inbox-panel .mention-message.read::before {
  display: none;
}
.inbox-panel .mention-message header {
  grid-column: 1;
  justify-content: flex-start;
  align-items: baseline;
  gap: 8px;
  font-size: 13px;
}
.inbox-panel .mention-message header strong {
  font-weight: 600;
}
.inbox-panel .mention-message h3 {
  grid-column: 1;
  overflow: hidden;
  font-size: 14px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.inbox-panel .mention-message p,
.inbox-panel .mention-message > small {
  grid-column: 1;
  color: var(--muted);
  font-size: 13px;
}
.inbox-panel .mention-message > .text-button {
  grid-column: 2;
  grid-row: 1 / span 3;
  font-size: 13px;
}
.inbox-panel .mention-message > button:last-child {
  grid-column: 3;
  grid-row: 1 / span 3;
  align-self: center;
  margin: 0;
  color: var(--muted);
}
@media (max-width: 600px) {
  .inbox-panel .mention-message > .text-button {
    grid-column: 1;
    grid-row: auto;
    justify-self: start;
  }
}
.export-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px;
}
.export-row .field {
  flex: 1 1 220px;
  min-width: 0;
}
.export-row .dark-button {
  min-height: 42px;
}
/* Painel do administrador: liga/desliga a faixa de datas importantes. */
.admin-dates {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
}
.admin-dates > div {
  flex: 1 1 320px;
  min-width: 0;
}
.admin-dates h2 {
  margin: 0 0 4px;
}
.admin-dates p {
  margin: 0;
}
.admin-dates-state {
  padding: 4px 10px;
  border-radius: 99px;
  background: var(--subtle);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}
.admin-dates-state.on {
  background: var(--mint);
  color: var(--mint-ink);
}
/* Postagem: datas comemorativas no calendário (botão liga/desliga). */
.dates-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}
.dates-toggle .icon {
  width: 16px;
  height: 16px;
}
.dates-toggle.selected {
  border-color: color-mix(in srgb, var(--lilac-ink) 30%, transparent);
  background: var(--lilac);
  color: var(--lilac-ink);
}
.sm-special {
  display: block;
  overflow: hidden;
  margin: 0 0 4px;
  padding: 2px 6px;
  border-radius: 6px;
  background: var(--lilac);
  color: var(--lilac-ink);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sm-special.is-holiday {
  background: var(--peach);
  color: var(--peach-ink);
  font-weight: 700;
}
.sw-day .sm-special {
  white-space: normal;
}
/* ---------- Postagem › Planejar (feed no celular + calendário) ---------- */
.social-plan {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.pl-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  min-height: 38px;
}
.pl-bar p {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 auto 0 0;
  color: var(--muted);
  font-size: 13px;
}
.pl-bar p .icon {
  width: 16px;
  height: 16px;
}
.pl-picked {
  font-size: 13px;
  font-weight: 700;
}
.pl-layout {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}
.pl-phone {
  position: sticky;
  top: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: calc(100dvh - 32px);
}
.pl-phone > header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 4px 0;
}
.pl-phone > header .ac-avatar {
  display: grid;
  place-items: center;
  flex: none;
  width: 36px;
  height: 36px;
  margin: 0;
  border: 0;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 700;
}
.pl-phone > header div {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.pl-phone > header strong {
  overflow: hidden;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pl-phone > header small {
  color: var(--muted);
  font-size: 11.5px;
}
.pl-phone > select {
  height: 34px;
  min-height: 0;
  font-size: 13px;
}
.pl-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2px;
  overflow-y: auto;
  border-radius: 6px;
}
.pl-tile {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: var(--subtle);
  cursor: grab;
  touch-action: manipulation;
}
.pl-tile .sp-thumb {
  width: 100%;
  height: 100%;
  border-radius: 0;
  object-fit: cover;
}
.pl-tile .sp-thumb-empty {
  display: grid;
  place-items: center;
  color: var(--muted);
}
.pl-tile-title {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  overflow: hidden;
  padding: 14px 6px 5px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.55));
  color: #fff;
  font-size: 10.5px;
  font-weight: 600;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.15s;
}
.pl-tile:hover .pl-tile-title,
.pl-tile:focus-visible .pl-tile-title {
  opacity: 1;
}
.pl-tile.is-pending::after {
  content: "";
  position: absolute;
  top: 6px;
  left: 6px;
  width: 8px;
  height: 8px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #e8a33d;
}
.pl-nodate {
  position: absolute;
  top: 5px;
  right: 5px;
  padding: 1px 6px;
  border-radius: 6px;
  background: rgba(21, 22, 26, 0.75);
  color: #fff;
  font-size: 10px;
  font-style: normal;
  font-weight: 700;
}
.pl-pick {
  position: absolute;
  bottom: 5px;
  right: 5px;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: rgba(21, 22, 26, 0.35);
  color: transparent;
  opacity: 0;
  cursor: pointer;
  transition: opacity 0.15s;
}
.pl-pick .icon {
  width: 13px;
  height: 13px;
}
.pl-tile:hover .pl-pick,
.pl-tile.is-picked .pl-pick {
  opacity: 1;
}
.pl-tile.is-picked .pl-pick {
  background: var(--accent);
  color: #fff;
}
.pl-tile.is-picked {
  outline: 3px solid var(--accent);
  outline-offset: -3px;
}
.pl-over {
  outline: 3px solid var(--accent) !important;
  outline-offset: -3px;
  background: var(--accent-soft) !important;
}
.pl-empty {
  grid-column: 1 / -1;
  padding: 20px 8px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}
.pl-side {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}
.pl-tray {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 14px;
  border: 1.5px dashed var(--line-2);
  border-radius: 16px;
}
.pl-tray > strong {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
}
.pl-tray > strong small {
  color: var(--muted);
}
.pl-tray > strong .icon {
  width: 15px;
  height: 15px;
}
.pl-tray > div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.pl-tray > div > small {
  color: var(--muted);
}
.pl-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 220px;
  padding: 4px 10px 4px 4px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  font-size: 12.5px;
  font-weight: 600;
  cursor: grab;
}
.pl-chip .sp-thumb {
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  object-fit: cover;
}
.pl-chip span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pl-calendar {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
}
.pl-calendar > header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
}
.pl-calendar > header h2 {
  margin: 0 6px;
  font-size: 17px;
}
.pl-calendar > header .subtle-button {
  margin-left: auto;
  height: 34px;
}
.pl-week,
.pl-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}
.pl-week span {
  padding: 0 4px 6px;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 600;
}
.pl-day {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  min-height: 104px;
  padding: 6px;
  border-radius: 12px;
  background: var(--subtle);
  transition: background 0.15s;
}
.pl-day {
  position: relative;
}
.pl-day:hover,
.pl-day:focus-within {
  z-index: 5;
}
.pl-day.is-outside > .pl-num,
.pl-day.is-outside .sp-open {
  opacity: 0.55;
}
.pl-day.is-past {
  background: color-mix(in srgb, var(--subtle) 60%, transparent);
}
.pl-num {
  font-size: 12px;
  font-weight: 700;
}
.pl-day.is-today .pl-num {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
}
.pl-item {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  font-size: 11px;
  font-weight: 600;
  cursor: grab;
}
.pl-item .sp-thumb {
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  object-fit: cover;
}
.pl-item span {
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pl-ghost {
  position: fixed !important;
  top: 0;
  left: 0;
  z-index: 600;
  border-radius: 10px;
  overflow: hidden;
}
/* Legenda rápida */
.pl-quick-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.pl-quick-head .sp-thumb {
  flex: none;
  width: 64px;
  height: 64px;
  border-radius: 12px;
  object-fit: cover;
}
.pl-quick-head div {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
}
.pl-quick-head small {
  color: var(--muted);
}
.pl-count {
  margin: 4px 0 10px;
  color: var(--muted);
  font-size: 12px;
}
.pl-count.over {
  color: var(--danger-ink);
}
.pl-groups {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
#plan-groups {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
#plan-groups > small {
  color: var(--muted);
}
.pl-group {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 99px;
  background: var(--surface);
}
.pl-group > button:first-child {
  padding: 5px 4px 5px 12px;
  border: 0;
  background: none;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
}
.pl-group small {
  color: var(--muted);
}
.pl-group .icon-button {
  width: 26px;
  height: 26px;
  color: var(--muted);
}
.pl-group .icon-button .icon {
  width: 13px;
  height: 13px;
}
.pl-new-group summary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.pl-new-group summary .icon {
  width: 14px;
  height: 14px;
}
.pl-new-group[open] summary {
  margin-bottom: 8px;
}
@media (max-width: 1100px) {
  .pl-layout {
    grid-template-columns: 300px minmax(0, 1fr);
  }
}
@media (max-width: 860px) {
  .pl-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .pl-phone {
    position: static;
    max-height: none;
    width: min(100%, 360px);
    margin: 0 auto;
  }
  .pl-grid {
    max-height: 420px;
  }
}
@media (max-width: 600px) {
  .pl-calendar {
    padding: 10px;
  }
  .pl-week,
  .pl-days {
    gap: 3px;
  }
  .pl-day {
    min-height: 70px;
    padding: 4px;
    border-radius: 8px;
  }
  .pl-item {
    padding: 0;
    border: 0;
    background: none;
  }
  .pl-item span {
    display: none;
  }
  .pl-item .sp-thumb {
    width: 100%;
    height: auto;
    aspect-ratio: 1;
  }
  .pl-tile .pl-pick {
    opacity: 1;
  }
}
.pl-new-group > summary::before {
  display: none;
}
.pl-new-group > summary {
  list-style: none;
}
.pl-new-group > summary::-webkit-details-marker {
  display: none;
}
/* Planejar: cartão do calendário igual ao do modo Mensal, arrastável. */
.pl-card {
  min-width: 0;
  cursor: grab;
}
.pl-card .sp-card {
  margin: 0;
}
.pl-grid {
  border-radius: 10px;
}

.task-is-dragging .sp-pop {
  display: none !important;
}
@media (max-width: 600px) {
  .pl-day .sp-open {
    padding: 3px 4px;
  }
  .pl-day .sp-top,
  .pl-day .sp-state {
    display: none;
  }
  .pl-day .sp-title {
    font-size: 10px;
  }
}
/* Planejar: o post inteiro é arrastado, nunca só a foto ou o texto. */
.social-plan [data-plan-id],
.social-plan [data-plan-id] * {
  -webkit-user-drag: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}
.social-plan [data-plan-id] img,
.social-plan [data-plan-id] video {
  pointer-events: none;
}
/* Agência: abas que unem Postagem e Páginas do cliente numa página só. */
.post-sections {
  display: inline-flex;
  margin-bottom: 16px;
}
.post-sections a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 14px;
  border-radius: 11px;
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  text-decoration: none;
  transition: background 0.2s;
}
.post-sections a:hover {
  background: var(--subtle);
}
.post-sections a.selected {
  background: var(--hover);
  color: var(--ink);
  font-weight: 700;
}
.post-sections a .icon {
  width: 16px;
  height: 16px;
}
/* Apagar rascunho direto do calendário (aparece ao passar o mouse). */
.sp-del {
  position: absolute;
  top: 4px;
  right: 4px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 0;
  border-radius: 7px;
  background: var(--surface);
  box-shadow: var(--shadow);
  color: var(--danger-ink, #b42318);
  opacity: 0;
  cursor: pointer;
  transition: opacity 0.15s;
}
.sp-del .icon {
  width: 13px;
  height: 13px;
}
.sp-card:hover .sp-del,
.sp-del:focus-visible {
  opacity: 1;
}
@media (hover: none) {
  .sp-del {
    opacity: 1;
  }
}
.sq-row .icon-button[data-action="social-delete"] {
  color: var(--danger-ink, #b42318);
}
/* ---------- Jurídico: visão geral do escritório no Início ---------- */
.legal-overview {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.legal-overview-card {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 6px 16px;
  min-height: 108px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition:
    border-color 0.15s,
    transform 0.15s;
}
.legal-overview-card:hover {
  border-color: var(--line-2);
  transform: translateY(-1px);
}
.legal-overview-card.has-alert {
  border-color: color-mix(in srgb, var(--danger-ink, #b42318) 30%, var(--line));
}
.lo-head {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  margin-bottom: auto;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}
.lo-head .icon {
  width: 16px;
  height: 16px;
}
.lo-big,
.lo-split {
  display: flex;
  flex-direction: column;
}
.lo-big b {
  font-size: 32px;
  line-height: 1;
}
.lo-split b {
  font-size: 22px;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.lo-big small,
.lo-split small {
  color: var(--muted);
  font-size: 12px;
}
.lo-split b.is-late {
  color: var(--danger-ink, #b42318);
}
.lo-split b.is-today {
  color: var(--accent);
}
.has-alert .lo-big b {
  color: var(--danger-ink, #b42318);
}
.legal-overview-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 65vh;
  overflow-y: auto;
}
.lo-group {
  margin: 10px 0 2px;
  font-size: 13px;
}
.lo-group small {
  color: var(--muted);
}
.lo-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
}
.lo-row > div:first-child {
  flex: 1 1 260px;
  min-width: 0;
}
.lo-row small {
  color: var(--muted);
  font-size: 12px;
}
.lo-row strong {
  display: block;
  margin-top: 2px;
}
.lo-row p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}
.lo-row.is-unread {
  border-left: 3px solid var(--accent);
}
.lo-row.is-late {
  border-left: 3px solid var(--danger-ink, #b42318);
}
.lo-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.legal-movement.is-unread {
  border-left: 3px solid var(--accent);
}
.legal-unread {
  padding: 2px 8px;
  border-radius: 99px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
}
@media (max-width: 1100px) {
  .legal-overview {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 600px) {
  .legal-overview {
    gap: 8px;
  }
  .legal-overview-card {
    gap: 4px 10px;
    min-height: 0;
    padding: 12px;
    border-radius: 16px;
  }
  .lo-big b {
    font-size: 26px;
  }
  .lo-split b {
    font-size: 19px;
  }
  .lo-split small,
  .lo-big small {
    font-size: 10.5px;
  }
}
@media (max-width: 340px) {
  .legal-overview {
    grid-template-columns: minmax(0, 1fr);
  }
}
/* ---------- Jurídico › Intimações ---------- */
.in-tabs {
  display: flex;
  gap: 4px;
  margin: 4px 0 12px;
  border-bottom: 1px solid var(--line);
}
.in-tabs button {
  padding: 10px 14px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: none;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.in-tabs button small {
  margin-left: 4px;
  padding: 1px 7px;
  border-radius: 99px;
  background: var(--subtle);
  font-size: 11px;
}
.in-tabs button.selected {
  border-bottom-color: var(--ink);
  color: var(--text);
}
.in-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.in-search {
  flex: 1 1 320px;
}
.in-tools select {
  height: 40px;
  min-height: 0;
  font-size: 13px;
}
.in-missing {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
}
.in-batch {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  background: var(--accent-soft);
}
.in-batch select {
  height: 38px;
  min-height: 0;
  font-size: 13px;
}
.in-list {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  overflow: hidden;
}
.in-all {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}
.in-row {
  display: grid;
  grid-template-columns: 28px 140px 200px minmax(0, 1fr) auto 34px 34px;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  border-left: 3px solid transparent;
}
.in-row:last-child {
  border-bottom: 0;
}
.in-row.is-pending {
  border-left-color: var(--accent);
}
.in-row.is-picked {
  background: var(--accent-soft);
}
.in-row small {
  display: block;
  color: var(--muted);
  font-size: 11.5px;
}
.in-row strong {
  display: block;
  font-size: 13.5px;
}
.in-dates strong + small,
.in-proc strong + small {
  margin-top: 4px;
}
.in-proc span {
  font-size: 13px;
}
.in-desc {
  min-width: 0;
}
.in-desc summary {
  list-style: none;
  cursor: pointer;
}
.in-desc summary::-webkit-details-marker,
.in-desc summary::before {
  display: none;
}
.in-desc summary strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.in-desc[open] summary strong {
  white-space: normal;
}
.in-desc p {
  margin: 8px 0 0;
  font-size: 13px;
  line-height: 1.55;
  white-space: pre-wrap;
}
.in-note {
  display: flex;
  gap: 6px;
  color: var(--muted);
}
.in-note .icon {
  flex: none;
  width: 14px;
  height: 14px;
}
.in-flags {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}
.in-chip {
  padding: 2px 8px;
  border-radius: 99px;
  background: var(--subtle);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}
.in-chip.warn {
  background: var(--sun, #fff4cc);
  color: var(--sun-ink, #8a6100);
}
.in-chip.ok {
  background: var(--mint);
  color: var(--mint-ink);
}
.in-chip.danger {
  background: var(--danger-soft, #fde7e7);
  color: var(--danger-ink, #b42318);
}
.in-who .person-avatar {
  width: 30px;
  height: 30px;
  font-size: 11px;
}
.in-nobody {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px dashed var(--line-2);
  border-radius: 50%;
  color: var(--muted);
}
.in-nobody .icon {
  width: 14px;
  height: 14px;
}
.in-menu {
  position: relative;
}
.in-menu > summary {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 10px;
  list-style: none;
  cursor: pointer;
}
.in-menu > summary::-webkit-details-marker,
.in-menu > summary::before {
  display: none;
}
.in-menu > summary .icon {
  width: 16px;
  height: 16px;
}
.in-menu > div {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 20;
  display: flex;
  flex-direction: column;
  min-width: 220px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow-pop);
}
.in-menu > div > button,
.in-menu > div > a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 0;
  border-radius: 9px;
  background: none;
  color: var(--text);
  font-size: 13px;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}
.in-menu > div > button:hover,
.in-menu > div > a:hover {
  background: var(--subtle);
}
.in-menu > div .icon {
  width: 15px;
  height: 15px;
}
@media (max-width: 1100px) {
  .in-row {
    grid-template-columns: 28px 120px minmax(0, 1fr) 34px 34px;
  }
  .in-proc {
    grid-column: 3;
  }
  .in-desc {
    grid-column: 2 / -1;
  }
  .in-flags {
    grid-column: 2 / -1;
    flex-direction: row;
    justify-content: flex-start;
  }
}
@media (max-width: 600px) {
  .in-row {
    grid-template-columns: 24px minmax(0, 1fr) 32px;
    gap: 8px 10px;
    padding: 12px;
  }
  .in-dates {
    grid-column: 2;
    display: grid;
    grid-template-columns: auto auto;
    gap: 0 10px;
  }
  .in-proc,
  .in-desc,
  .in-flags {
    grid-column: 2 / -1;
  }
  .in-who {
    display: none;
  }
  .in-menu {
    grid-column: 3;
    grid-row: 1;
  }
  .in-tools select {
    flex: 1 1 140px;
  }
}
.in-tools select {
  width: auto !important;
  flex: 0 1 220px;
}
.in-tools .in-search {
  flex: 1 1 100%;
}
.in-proc strong {
  white-space: nowrap;
}
.in-row {
  grid-template-columns: 28px 130px 215px minmax(0, 1fr) auto 34px 34px;
}
@media (max-width: 1100px) {
  .in-row {
    grid-template-columns: 28px 120px minmax(0, 1fr) 34px 34px;
  }
}
@media (max-width: 600px) {
  .in-row {
    grid-template-columns: 24px minmax(0, 1fr) 32px;
  }
  .in-proc strong {
    white-space: normal;
  }
}
.in-batch select {
  width: auto !important;
  flex: 0 1 220px;
}
/* ---------- Jurídico › Financeiro e Timesheet ---------- */
.fi-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}
.fi-summary {
  position: sticky;
  top: 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
}
.fi-summary h2 {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}
.fi-total {
  font-size: 26px;
  font-variant-numeric: tabular-nums;
}
.fi-total.neg,
.fi-summary .neg {
  color: var(--danger-ink, #b42318);
}
.fi-summary .pos {
  color: var(--mint-ink, #0f7a55);
}
.fi-summary > small {
  color: var(--muted);
}
.fi-summary dl {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 12px 0 0;
}
.fi-summary dt {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
}
.fi-summary dt .icon {
  width: 14px;
  height: 14px;
  transform: rotate(-90deg);
}
.fi-summary dl div:last-child dt .icon {
  transform: rotate(90deg);
}
.fi-summary dd {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.fi-summary dd.muted {
  font-size: 12px;
  font-weight: 500;
}
.fi-overdue {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  padding: 8px 10px;
  border: 0;
  border-radius: 12px;
  background: var(--danger-soft, #fde7e7);
  color: var(--danger-ink, #b42318);
  font-size: 12.5px;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}
.fi-overdue .icon {
  flex: none;
  width: 15px;
  height: 15px;
}
.fi-month {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.fi-month strong {
  min-width: 140px;
  font-size: 13px;
  text-align: center;
}
.in-tools [data-fin-status],
.in-tools [data-ts-person] {
  width: auto !important;
  flex: 0 1 200px;
  height: 40px;
  min-height: 0;
  font-size: 13px;
}
.fi-row {
  display: grid;
  grid-template-columns: 120px 150px minmax(0, 1.4fr) minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}
.fi-row:last-child {
  border-bottom: 0;
}
.fi-row small {
  display: block;
  color: var(--muted);
  font-size: 11.5px;
}
.fi-row strong {
  display: block;
  font-size: 13.5px;
}
.fi-what strong,
.fi-who span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.fi-who span {
  display: block;
  font-size: 13px;
}
.fi-amount strong {
  font-variant-numeric: tabular-nums;
}
.fi-amount.income strong {
  color: var(--mint-ink, #0f7a55);
}
.fi-amount.expense strong {
  color: var(--danger-ink, #b42318);
}
.fi-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}
.fi-actions .subtle-button {
  height: 32px;
}
.fi-actions .icon-button {
  width: 32px;
  height: 32px;
}
.fi-kind {
  display: inline-flex;
  gap: 4px;
  margin-bottom: 12px;
  padding: 4px;
  border-radius: 12px;
  background: var(--subtle);
}
.fi-kind label {
  cursor: pointer;
}
.fi-kind input {
  position: absolute;
  opacity: 0;
}
.fi-kind span {
  display: block;
  padding: 7px 16px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 700;
}
.fi-kind input:checked + span {
  background: var(--surface);
  box-shadow: var(--shadow);
}
.fi-kind input:focus-visible + span {
  outline: 2px solid var(--accent);
}
.fi-hint {
  align-self: end;
  margin: 0 0 10px;
  font-size: 12px;
}
.ts-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}
.ts-stats > div {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
}
.ts-stats small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}
.ts-stats strong {
  font-size: 22px;
  font-variant-numeric: tabular-nums;
}
.ts-row {
  grid-template-columns: 170px 90px minmax(0, 1.4fr) minmax(0, 1fr) auto;
}
.ts-bill {
  color: var(--mint-ink, #0f7a55) !important;
  font-weight: 700;
}
.ts-timers {
  margin-bottom: 12px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
}
.ts-timers summary {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
}
.ts-timers summary .icon {
  width: 16px;
  height: 16px;
}
.ts-timer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 0 0;
}
.ts-timer small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}
@media (max-width: 1100px) {
  .fi-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .fi-summary {
    position: static;
  }
  .fi-row,
  .ts-row {
    grid-template-columns: 110px minmax(0, 1fr) auto;
  }
  .fi-what,
  .fi-who {
    grid-column: 1 / -1;
  }
}
@media (max-width: 600px) {
  .fi-row,
  .ts-row {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 8px 12px;
    padding: 12px;
  }
  .fi-row > .in-chip,
  .fi-actions {
    grid-column: span 1;
  }
  .fi-actions {
    justify-content: flex-end;
  }
  .ts-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }
  .ts-stats strong {
    font-size: 17px;
  }
  .fi-month strong {
    min-width: 110px;
  }
}
.fi-row > .in-chip {
  justify-self: start;
}
/* ---------- Jurídico › Contratos de honorários ---------- */
.ct-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px auto auto;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}
.ct-row:last-child {
  border-bottom: 0;
}
.ct-main small,
.ct-money small {
  display: block;
  color: var(--muted);
  font-size: 11.5px;
}
.ct-main strong {
  display: block;
  margin: 2px 0;
  font-size: 15px;
}
.ct-main > span {
  font-size: 13px;
}
.ct-rules {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.ct-rules i {
  padding: 2px 9px;
  border-radius: 99px;
  background: var(--subtle);
  font-size: 11.5px;
  font-style: normal;
  font-weight: 600;
}
.ct-money strong {
  display: block;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}
.ct-money .pos,
.ts-stats .pos {
  color: var(--mint-ink, #0f7a55);
}
.ts-stats .neg {
  color: var(--danger-ink, #b42318);
}
.ct-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}
.ct-actions .dark-button,
.ct-actions .subtle-button {
  height: 34px;
  font-size: 13px;
}
.ct-actions .icon-button {
  width: 34px;
  height: 34px;
}
.ct-rule {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1fr auto;
  align-items: end;
  gap: 8px;
  margin-bottom: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
}
.ct-rule .ct-rule-desc {
  grid-column: 1 / -2;
}
.ct-rule > .icon-button {
  grid-column: -2;
  grid-row: 1;
}
.ct-preview {
  margin: 0 0 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--subtle);
  font-weight: 600;
}
.ct-page [data-ct-status],
.ct-page [data-ct-filter],
.ct-page [data-ct-charge-status] {
  width: auto !important;
  flex: 0 1 220px;
  height: 40px;
  min-height: 0;
  font-size: 13px;
}
@media (max-width: 900px) {
  .ct-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .ct-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }
  .ct-rule {
    grid-template-columns: 1fr 1fr;
  }
  .ct-rule > .icon-button {
    grid-column: 2;
    justify-self: end;
  }
  .ct-rule .ct-rule-desc {
    grid-column: 1 / -1;
  }
}
.ct-row > .in-chip {
  justify-self: start;
}
/* ---------- Jurídico › Lista de atividades e Relatórios ---------- */
.ac-row {
  display: grid;
  grid-template-columns: 28px 140px 190px minmax(0, 1fr) auto auto 34px;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  border-left: 3px solid var(--line-2);
}
.ac-row:last-child {
  border-bottom: 0;
}
.ac-row.type-deadline {
  border-left-color: #e8a33d;
}
.ac-row.type-hearing {
  border-left-color: var(--lilac-ink, #6451d2);
}
.ac-row.type-event {
  border-left-color: #2879df;
}
.ac-row.type-task {
  border-left-color: var(--accent);
}
.ac-row.is-done {
  opacity: 0.6;
}
.ac-row.is-picked {
  background: var(--accent-soft);
}
.ac-row small {
  display: block;
  color: var(--muted);
  font-size: 11.5px;
}
.ac-row strong {
  display: block;
  font-size: 13.5px;
}
.ac-row strong.is-fatal {
  color: var(--danger-ink, #b42318);
}
.ac-row strong .icon {
  width: 13px;
  height: 13px;
  vertical-align: -2px;
  color: var(--danger-ink, #b42318);
}
.ac-title {
  min-width: 0;
  padding: 0;
  border: 0;
  background: none;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}
.ac-title .col-tag {
  min-height: 22px;
  padding: 0 8px;
  font-size: 11px;
}
.ac-title strong {
  margin-top: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ac-title > span {
  display: block;
  overflow: hidden;
  color: var(--muted);
  font-size: 12.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ac-people {
  display: flex;
}
.ac-people .person-avatar {
  width: 28px;
  height: 28px;
  margin-left: -6px;
  border: 2px solid var(--surface);
  font-size: 10px;
}
.ac-row > .icon-button {
  width: 32px;
  height: 32px;
}
.ac-period {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
}
.ac-period input {
  width: auto !important;
  height: 40px;
  min-height: 0;
}
.act-page .in-tools select {
  width: auto !important;
  flex: 0 1 190px;
  height: 40px;
  min-height: 0;
  font-size: 13px;
}
.in-all b.neg {
  color: var(--danger-ink, #b42318);
}
.rep-stats small + small,
.rep-stats strong + small {
  display: block;
  margin-top: 2px;
}
.rep-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}
.rep-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
}
.rep-card h2 {
  margin: 0;
  font-size: 16px;
}
.rep-card p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}
.rep-card .subtle-button {
  align-self: flex-start;
  margin-top: auto;
}
.rep-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--lilac);
  color: var(--lilac-ink);
}
.rep-icon .icon {
  width: 18px;
  height: 18px;
}
@media (max-width: 1100px) {
  .ac-row {
    grid-template-columns: 28px 130px minmax(0, 1fr) auto 34px;
  }
  .ac-row > div:nth-child(3) {
    display: none;
  }
  .ac-people {
    display: none;
  }
}
@media (max-width: 600px) {
  .ac-row {
    grid-template-columns: 24px minmax(0, 1fr) 32px;
    gap: 6px 10px;
    padding: 12px;
  }
  .ac-row > div:nth-child(2),
  .ac-title,
  .ac-row > .in-chip {
    grid-column: 2;
  }
  .ac-row > .in-chip {
    justify-self: start;
  }
  .ac-row > .icon-button {
    grid-column: 3;
    grid-row: 1;
  }
  .ac-period {
    flex: 1 1 140px;
  }
  .ac-period input {
    flex: 1;
  }
}
.ac-row > div:nth-child(3) strong {
  overflow: hidden;
  font-size: 12.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.act-page .in-search {
  flex: 1 1 100%;
}
/* Painel › Configuração › Logo e favicon */
.brand-card {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}
.brand-card > p {
  margin: -6px 0 0;
}
.brand-slot {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.brand-preview {
  width: 64px;
  height: 64px;
  flex: none;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 14px;
  background: #fff;
  box-shadow: inset 0 0 0 1px var(--line-2);
  color: var(--muted);
}
.brand-preview.favicon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
}
.brand-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.brand-info {
  display: grid;
  gap: 4px;
  min-width: 0;
}
.brand-info small {
  color: var(--muted);
}
.brand-buttons {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}
.brand-buttons input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}
.brand-buttons label {
  position: relative;
  cursor: pointer;
}
/* Configurações › Editor visual › Aplicação da cor */
.tint-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 16px 0 14px;
  padding: 0;
  border: 0;
}
.tint-options legend {
  margin-bottom: 8px;
  padding: 0;
  color: var(--ink);
  font-weight: 700;
}
.tint-options .tint-option {
  position: relative;
  display: grid;
  align-items: start;
  gap: 3px;
  padding: 10px 10px 12px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-md);
  background: var(--surface);
  cursor: pointer;
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
}
.tint-option:hover {
  border-color: color-mix(in srgb, var(--accent) 40%, var(--line-2));
}
.tint-option:has(input:checked) {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.tint-option:has(input:focus-visible) {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.tint-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.tint-option strong {
  color: var(--ink);
  font-size: 13px;
}
.tint-option small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}
/* Miniatura: menu à esquerda (i) e painel branco (b). */
.tint-mini {
  display: grid;
  grid-template-columns: 30% 1fr;
  gap: 5px;
  height: 58px;
  margin-bottom: 6px;
  padding: 6px;
  border-radius: 10px;
  background: #f4f5f7;
}
.tint-mini i,
.tint-mini b {
  border-radius: 6px;
}
.tint-mini i {
  background: linear-gradient(
    #fff 0 9px,
    transparent 9px 14px,
    rgba(21, 22, 26, 0.1) 14px 18px,
    transparent 18px 23px,
    rgba(21, 22, 26, 0.1) 23px 27px,
    transparent 27px
  );
  background-size: 70% 100%;
  background-repeat: no-repeat;
  background-position: 4px 4px;
}
.tint-mini b {
  background: #fff;
  box-shadow: inset 0 0 0 1px #eceef2;
}
.tint-mini-1 {
  background: color-mix(in srgb, var(--accent) 9%, #f4f5f7);
}
.tint-mini-2 {
  background: color-mix(in srgb, var(--accent) 30%, #f4f5f7);
}
.tint-mini-2 i {
  background-color: color-mix(in srgb, var(--accent) 38%, #f4f5f7);
}
:root[data-theme="dark"] .tint-mini {
  filter: brightness(0.82);
}
@media (max-width: 600px) {
  .tint-options {
    grid-template-columns: 1fr;
  }
  .tint-options .tint-option {
    grid-template-columns: 76px 1fr;
    column-gap: 12px;
    align-items: center;
  }
  .tint-mini {
    grid-row: span 2;
    height: 48px;
    margin: 0;
  }
}
/* Painel › Configuração › Tela de abertura */
.splash-card {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}
.splash-card > p {
  margin: -4px 0 0;
}
.splash-input {
  position: relative;
  display: block;
}
.splash-input input {
  width: 100%;
  padding-right: 34px;
}
.splash-input em {
  position: absolute;
  top: 50%;
  right: 14px;
  transform: translateY(-50%);
  color: var(--muted);
  font-style: normal;
  pointer-events: none;
}
/* Integrações › Catálogo de APIs (modo Jurídico) */
.hub-catalog {
  display: grid;
  gap: 18px;
  margin-top: 22px;
}
.hub-head p {
  margin-top: 4px;
}
.hub-group h3 {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.hub-list {
  display: grid;
  gap: 8px;
}
.hub-card {
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
}
.hub-card.is-open {
  border-color: var(--line-2);
  box-shadow: var(--shadow-pop);
}
.hub-toggle {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  border: 0;
  background: none;
  color: inherit;
  text-align: left;
  cursor: pointer;
}
.hub-toggle > .icon {
  flex: none;
  width: 16px;
  height: 16px;
  color: var(--muted);
  transition: transform 0.2s var(--ease);
}
.hub-card.is-open .hub-toggle > .icon {
  transform: rotate(180deg);
}
.hub-name {
  display: grid;
  flex: 1;
  min-width: 0;
}
.hub-name strong {
  color: var(--ink);
}
.hub-name small {
  color: var(--muted);
  font-size: 12px;
}
.hub-card .status-pill {
  flex: none;
  max-width: 48%;
  white-space: normal;
  text-align: center;
}
.hub-status-active {
  background: var(--mint);
  color: var(--mint-ink);
}
.hub-status-waiting {
  background: var(--sky);
  color: var(--sky-ink);
}
.hub-status-missing {
  background: var(--sun);
  color: var(--sun-ink);
}
.hub-body {
  display: none;
  gap: 12px;
  padding: 0 14px 14px;
}
.hub-card.is-open .hub-body {
  display: grid;
}
.hub-body > p {
  color: var(--text);
}
.hub-switch {
  font-weight: 600;
}
.hub-saved {
  margin-left: 6px;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--mint);
  color: var(--mint-ink);
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
}
.hub-log {
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 10px 12px;
  border-radius: var(--r);
  background: var(--subtle);
  list-style: none;
  font-size: 12px;
}
.hub-log li {
  display: flex;
  gap: 8px;
  color: var(--text);
}
.hub-log li::before {
  content: "";
  flex: none;
  width: 7px;
  height: 7px;
  margin-top: 5px;
  border-radius: 50%;
  background: #22c55e;
}
.hub-log li.bad::before {
  background: var(--danger);
}
.hub-log time {
  flex: none;
  color: var(--muted);
}
.hub-body footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
}
@media (max-width: 600px) {
  .hub-toggle {
    flex-wrap: wrap;
  }
  .hub-card .status-pill {
    order: 3;
    max-width: none;
    margin-left: 0;
  }
  .hub-body footer > * {
    flex: 1 1 auto;
  }
}

/* ---------- Agenda por link (iCal) ---------- */
.ical-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ical-card h3 {
  margin: 8px 0 0;
  font-size: 0.86rem;
}
.ical-card p {
  margin: 0;
}
.ical-link {
  display: flex;
  gap: 8px;
  min-width: 0;
}
.ical-link input {
  flex: 1;
  min-width: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.78rem;
}
.ical-link .dark-button {
  flex: none;
}
.ical-help summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 0.84rem;
}
.ical-help ul {
  margin: 8px 0;
  padding-left: 18px;
  display: grid;
  gap: 4px;
  font-size: 0.84rem;
}
.ical-subs {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}
.ical-sub {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--r-md, 12px);
  background: var(--surface);
}
.ical-sub > div {
  flex: 1;
  min-width: 0;
  display: grid;
}
.ical-sub strong,
.ical-sub small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ical-sub small {
  color: var(--muted);
}
.ical-dot {
  width: 10px;
  height: 10px;
  flex: none;
  border-radius: 50%;
  background: var(--ev-ink);
}
.ical-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: 8px 10px;
  align-items: end;
}
.ical-form .form-error,
.ical-form button {
  grid-column: 1 / -1;
  justify-self: start;
}
@media (max-width: 600px) {
  .ical-form {
    grid-template-columns: minmax(0, 1fr);
  }
  .ical-link {
    flex-direction: column;
  }
}

/* Configurações › Importar dados */
.import-pick {
  cursor: pointer;
}
.import-summary {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 6px 16px;
  margin: 12px 0;
}
.import-summary dt {
  color: var(--muted);
}
.import-summary dd {
  margin: 0;
  font-weight: 600;
  overflow-wrap: anywhere;
}

/* ---------- Mensagens (estilo WhatsApp) ---------- */
.wa {
  display: grid;
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
  height: calc(100dvh - 132px);
  min-height: 520px;
  margin-top: 8px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-xl, 20px);
}
.wa-list {
  display: flex;
  flex-direction: column;
  min-height: 0;
  border-right: 1px solid var(--line);
}
.wa-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 16px 8px;
}
.wa-list-head h1 {
  margin: 0;
  font-size: 1.25rem;
}
.wa-search {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 4px 12px 8px;
  padding: 0 12px;
  height: 38px;
  border-radius: 10px;
  background: var(--subtle);
  color: var(--muted);
}
.wa-search .icon {
  width: 16px;
  height: 16px;
  flex: none;
}
.wa-search #wa-search,
.wa-search #wa-people-search {
  flex: 1;
  min-width: 0;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  font-size: 0.86rem;
}
.wa-search #wa-search:focus,
.wa-search #wa-people-search:focus {
  outline: none;
  box-shadow: none;
}
.wa-search:focus-within {
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 40%, transparent);
}
.wa-chips {
  display: flex;
  gap: 6px;
  padding: 0 12px 8px;
  overflow-x: auto;
  scrollbar-width: none;
}
.wa-chip {
  flex: none;
  min-height: 30px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  background: var(--subtle);
  color: var(--text);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}
.wa-chip b {
  margin-left: 4px;
  font-weight: 700;
}
.wa-chip.on {
  background: color-mix(in srgb, var(--accent) 18%, var(--surface));
  /* 70% dava 4,23:1; com 55% passa de 4,5:1. */
  color: color-mix(in srgb, var(--accent) 55%, var(--ink));
}
.wa-items {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}
.wa-empty {
  padding: 24px 16px;
  color: var(--muted);
  font-size: 0.86rem;
  text-align: center;
}
.wa-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 14px;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}
.wa-item:hover {
  background: var(--hover);
}
.wa-item.active {
  background: color-mix(in srgb, var(--accent) 10%, var(--subtle));
}
.wa-item-main {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 2px;
  padding-bottom: 10px;
  margin-bottom: -10px;
  border-bottom: 1px solid var(--line);
}
.wa-item-top,
.wa-item-bottom {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.wa-item-top strong {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.92rem;
}
.wa-item-top time {
  flex: none;
  color: var(--muted);
  font-size: 0.72rem;
}
.wa-item.has-unread time {
  color: var(--accent);
  font-weight: 700;
}
.wa-preview {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-size: 0.82rem;
}
.wa-preview .icon {
  width: 14px;
  height: 14px;
  margin-right: 3px;
  vertical-align: -2px;
}
.wa-badge {
  flex: none;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 0.7rem;
  line-height: 20px;
  text-align: center;
}
.wa-avatar {
  flex: none;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  overflow: hidden;
}
.wa-avatar .person-avatar {
  width: 46px;
  height: 46px;
  font-size: 0.9rem;
}
.wa-group {
  background: color-mix(in srgb, var(--g) 18%, var(--surface));
  color: var(--g);
}
.wa-group .icon {
  width: 22px;
  height: 22px;
}
/* Conversa com cliente (portal): iniciais na cor do cliente. */
.wa-client {
  background: color-mix(in srgb, var(--g) 18%, var(--surface));
  color: var(--g);
  font-size: 0.86rem;
  font-weight: 700;
}
.wa-forwarded.wa-about {
  display: block;
  max-width: 100%;
  overflow: hidden;
  color: color-mix(in srgb, var(--accent) 70%, var(--ink));
  font-style: normal;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.wa-about .icon {
  margin-right: 4px;
  vertical-align: -2px;
}
/* Conversa */
.wa-chat {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  background:
    radial-gradient(
        circle at 1px 1px,
        color-mix(in srgb, var(--ink) 7%, transparent) 1px,
        transparent 1.5px
      )
      0 0 / 18px 18px,
    color-mix(in srgb, var(--accent) 5%, var(--bg));
}
.wa-welcome {
  display: grid;
  place-items: center;
  padding: 32px;
  text-align: center;
}
.wa-welcome > div {
  max-width: 380px;
}
.wa-welcome h2 {
  margin: 14px 0 6px;
}
.wa-welcome p {
  color: var(--muted);
}
.wa-welcome-mark {
  display: inline-grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 16%, var(--surface));
  color: var(--accent);
}
.wa-welcome-mark .icon {
  width: 32px;
  height: 32px;
}
.wa-chat-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.wa-chat-head .wa-avatar,
.wa-chat-head .wa-avatar .person-avatar {
  width: 40px;
  height: 40px;
}
.wa-back {
  display: none;
}
.wa-chat-title {
  flex: 1;
  min-width: 0;
  display: grid;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  text-align: left;
  cursor: pointer;
}
.wa-chat-title strong,
.wa-chat-title small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.wa-chat-title small {
  color: var(--muted);
  font-size: 0.76rem;
}
.wa-chat-actions {
  display: flex;
  gap: 4px;
}
.wa-history {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 14px 6% 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.wa-day,
.wa-system {
  align-self: center;
  margin: 10px 0 6px;
}
.wa-day span {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.05);
}
.wa-system {
  max-width: 420px;
  padding: 8px 12px;
  border-radius: 8px;
  background: color-mix(in srgb, #f5c542 18%, var(--surface));
  color: var(--text);
  font-size: 0.78rem;
  text-align: center;
}
.wa-msg {
  position: relative;
  display: flex;
  align-items: flex-end;
  gap: 6px;
  max-width: min(78%, 560px);
}
.wa-msg.first {
  margin-top: 6px;
}
.wa-msg.mine {
  align-self: flex-end;
  flex-direction: row-reverse;
}
.wa-msg.theirs {
  align-self: flex-start;
}
.wa-msg-face {
  align-self: flex-start;
  flex: none;
}
.wa-msg-face .person-avatar {
  width: 28px;
  height: 28px;
  font-size: 0.66rem;
}
.wa-msg.theirs:not(.first) {
  margin-left: 34px;
}
.wa-bubble {
  position: relative;
  min-width: 80px;
  padding: 6px 9px 18px;
  border-radius: 10px;
  background: var(--surface);
  box-shadow: 0 1px 0.5px rgba(0, 0, 0, 0.1);
  font-size: 0.88rem;
  line-height: 1.4;
}
.wa-msg.mine .wa-bubble {
  background: color-mix(in srgb, var(--accent) 20%, var(--surface));
}
.wa-msg.first.theirs .wa-bubble {
  border-top-left-radius: 2px;
}
.wa-msg.first.mine .wa-bubble {
  border-top-right-radius: 2px;
}
.wa-bubble p {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.wa-bubble a {
  color: color-mix(in srgb, #2b6cd8 85%, var(--ink));
}
.wa-author {
  display: block;
  margin-bottom: 2px;
  font-size: 0.78rem;
}
.wa-mention {
  color: color-mix(in srgb, var(--accent) 80%, var(--ink));
}
.wa-meta {
  position: absolute;
  right: 8px;
  bottom: 3px;
  display: flex;
  align-items: center;
  gap: 3px;
  color: var(--muted);
  font-size: 0.66rem;
}
.wa-ticks {
  letter-spacing: -3px;
  padding-right: 3px;
  font-size: 0.72rem;
}
.wa-ticks.read {
  color: #2b8be6;
}
.wa-deleted {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-style: italic;
}
.wa-deleted .icon {
  width: 13px;
  height: 13px;
}
.wa-quote {
  display: grid;
  width: 100%;
  margin: 0 0 4px;
  padding: 5px 8px;
  border: 0;
  border-left: 4px solid var(--q);
  border-radius: 6px;
  background: color-mix(in srgb, var(--ink) 6%, transparent);
  color: inherit;
  text-align: left;
  font-size: 0.78rem;
  cursor: pointer;
}
.wa-quote strong {
  color: var(--q);
}
.wa-quote span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
}
.wa-photo {
  display: block;
  margin: -2px -5px 4px;
}
.wa-photo img {
  display: block;
  max-width: min(320px, 100%);
  max-height: 340px;
  border-radius: 8px;
  object-fit: cover;
}
.wa-bubble.is-photo {
  padding: 4px 4px 4px;
}
.wa-bubble.is-photo .wa-photo {
  margin: 0;
}
.wa-bubble.is-photo .wa-meta {
  right: 10px;
  bottom: 8px;
  padding: 1px 6px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
}
.wa-bubble.is-photo .wa-ticks.read {
  color: #9fd4ff;
}
.wa-doc {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 220px;
  margin-bottom: 4px;
  padding: 8px 10px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--ink) 6%, transparent);
  color: inherit !important;
  text-decoration: none;
}
.wa-doc span {
  flex: 1;
  min-width: 0;
  display: grid;
}
.wa-doc strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.82rem;
}
.wa-doc small {
  color: var(--muted);
}
.wa-reactions {
  position: absolute;
  left: 8px;
  bottom: -14px;
  display: flex;
  gap: 2px;
  z-index: 1;
}
.wa-msg.mine .wa-reactions {
  left: auto;
  right: 8px;
}
.wa-msg:has(.wa-reactions) {
  margin-bottom: 14px;
}
.wa-reactions button {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  height: 22px;
  padding: 0 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  font-size: 0.78rem;
  cursor: pointer;
}
.wa-reactions button.mine {
  border-color: color-mix(in srgb, var(--accent) 50%, transparent);
  background: color-mix(in srgb, var(--accent) 12%, var(--surface));
}
.wa-reactions small {
  color: var(--muted);
  font-size: 0.68rem;
}
.wa-more {
  position: absolute;
  top: 2px;
  right: 2px;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: inherit;
  color: var(--muted);
  opacity: 0;
  cursor: pointer;
}
.wa-more .icon {
  width: 14px;
  height: 14px;
}
.wa-msg:hover .wa-more,
.wa-more:focus-visible,
.wa-msg.show-tools .wa-more {
  opacity: 1;
}
@media (hover: none) {
  .wa-more {
    opacity: 0.7;
  }
}
.wa-tools {
  position: absolute;
  bottom: calc(100% + 4px);
  z-index: 4;
  display: grid;
  gap: 6px;
  width: 232px;
}
.wa-tools.below {
  top: calc(100% + 4px);
  bottom: auto;
}
.wa-msg.theirs .wa-tools {
  left: 0;
}
.wa-msg.mine .wa-tools {
  right: 0;
}
.wa-tools-react,
.wa-tools-list {
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-lift, 0 10px 24px rgba(0, 0, 0, 0.14));
}
.wa-tools-react {
  display: flex;
  justify-content: space-between;
  padding: 4px;
  border-radius: 999px;
}
.wa-tools-react button {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 50%;
  font-size: 1.1rem;
  transition: transform 0.12s;
}
.wa-tools-react button:hover {
  background: var(--hover);
  transform: scale(1.15);
}
.wa-tools-list {
  display: grid;
  padding: 6px;
  border-radius: 14px;
}
.wa-tools-list button {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 36px;
  padding: 0 10px;
  border-radius: 8px;
  color: var(--text);
  font-size: 0.86rem;
  text-align: left;
}
.wa-tools-list button:hover,
.wa-tools-list button:focus-visible {
  background: var(--hover);
}
.wa-tools-list button[data-action="chat-delete"] {
  color: var(--danger, #c0392b);
}
.wa-tools .icon {
  width: 16px;
  height: 16px;
}
.wa-msg.flash .wa-bubble {
  animation: wa-flash 1.2s ease;
}
@keyframes wa-flash {
  30% {
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 45%, transparent);
  }
}
.wa-archived {
  margin: 0;
  padding: 12px 16px;
  background: var(--surface);
  border-top: 1px solid var(--line);
  color: var(--muted);
  text-align: center;
  font-size: 0.84rem;
}
.wa-replying {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px 0;
  background: var(--surface);
}
.wa-replying > div {
  flex: 1;
  min-width: 0;
  display: grid;
  padding: 6px 10px;
  border-left: 4px solid var(--q);
  border-radius: 6px;
  background: var(--subtle);
  font-size: 0.8rem;
}
.wa-replying strong {
  color: var(--q);
}
.wa-replying span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
}
.wa-compose {
  position: relative;
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 10px 12px;
  background: var(--surface);
  border-top: 1px solid var(--line);
}
.wa-replying + .wa-compose {
  border-top: 0;
}
.wa-attach {
  flex: none;
  cursor: pointer;
}
.wa-compose textarea {
  flex: 1;
  min-width: 0;
  min-height: 42px;
  max-height: 140px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 21px;
  background: var(--subtle);
  resize: none;
  line-height: 1.4;
  font-size: 0.9rem;
}
.wa-send {
  flex: none;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
}
.wa-send .icon {
  width: 18px;
  height: 18px;
}
/* Painel de emojis do campo de mensagem (14/11/2026), no jeito do WhatsApp:
   abre acima do campo, com abas por categoria. */
.emoji-toggle {
  flex: none;
  color: var(--muted);
}
.emoji-toggle.is-on,
.emoji-toggle:hover {
  color: var(--accent);
}
.emoji-panel {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 8px;
  z-index: 6;
  display: grid;
  grid-template-rows: auto auto 1fr;
  width: min(380px, calc(100% - 16px));
  height: 320px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-md);
  background: var(--surface);
  box-shadow: var(--shadow-pop);
  overflow: hidden;
  animation: emoji-rise 0.16s ease;
}
@keyframes emoji-rise {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
}
.emoji-tabs {
  display: flex;
  gap: 2px;
  padding: 6px 6px 0;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
  scrollbar-width: none;
}
.emoji-tab {
  flex: none;
  width: 34px;
  height: 34px;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: var(--r-xs) var(--r-xs) 0 0;
  background: transparent;
  font-size: 18px;
  line-height: 1;
  opacity: 0.55;
  cursor: pointer;
}
.emoji-tab:hover {
  background: var(--hover);
  opacity: 1;
}
.emoji-tab.is-on {
  border-bottom-color: var(--accent);
  opacity: 1;
}
.emoji-title {
  margin: 0;
  padding: 8px 12px 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}
.emoji-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(38px, 1fr));
  align-content: start;
  gap: 2px;
  padding: 4px 8px 10px;
  overflow-y: auto;
}
.emoji-item {
  display: grid;
  place-items: center;
  height: 38px;
  border: 0;
  border-radius: var(--r-xs);
  background: transparent;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}
.emoji-item:hover,
.emoji-item:focus-visible {
  background: var(--hover);
}
@media (max-width: 600px) {
  .emoji-panel {
    left: 6px;
    width: calc(100% - 12px);
    height: 280px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .emoji-panel {
    animation: none;
  }
}
.wa-compose .chat-mention-picker {
  bottom: calc(100% + 4px);
  left: 56px;
}
.wa-profile {
  display: grid;
  justify-items: center;
  gap: 4px;
  margin-bottom: 12px;
  text-align: center;
}
.wa-profile h3 {
  margin: 8px 0 0;
}
.wa-profile p {
  margin: 0;
}
.wa-profile .person-avatar,
.wa-profile .wa-avatar {
  width: 72px;
  height: 72px;
  font-size: 1.3rem;
}
.wa-people {
  display: grid;
  gap: 2px;
  max-height: 50vh;
  overflow-y: auto;
  margin: 8px 0 12px;
}
.wa-people .chat-member {
  display: flex;
  align-items: center;
  gap: 10px;
}
.wa-people .chat-member > span:not(.person-avatar) {
  flex: 1;
  min-width: 0;
  display: grid;
}
.wa-person {
  width: 100%;
  padding: 8px;
  border: 0;
  border-radius: 10px;
  background: none;
  color: inherit;
  text-align: left;
  cursor: pointer;
}
.wa-person:hover {
  background: var(--hover);
}
.wa-extras {
  margin-top: 16px;
}
.wa-extras > summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--muted);
}
/* Tablet: lista mais estreita. */
@media (max-width: 1023px) {
  .wa {
    grid-template-columns: 280px minmax(0, 1fr);
  }
}
/* Celular: uma coisa por vez, na tela inteira. */
@media (max-width: 760px) {
  .wa {
    grid-template-columns: minmax(0, 1fr);
    height: calc(100dvh - 150px);
    min-height: 420px;
    margin: 4px -10px 0;
    border-radius: 16px;
  }
  .wa .wa-chat {
    display: none;
  }
  .wa.has-chat .wa-list {
    display: none;
  }
  .wa.has-chat .wa-chat {
    display: flex;
  }
  .wa-back {
    display: grid;
    margin-left: -6px;
  }
  .wa-history {
    padding: 10px 10px 8px;
  }
  .wa-msg {
    max-width: 86%;
  }
  .wa-doc {
    min-width: 0;
  }
  .wa-chat-actions .icon-button[data-action="open-project"] {
    display: none;
  }
}

/* Mensagens: rótulos, fixada, pesquisa, menu da conversa */
.wa-meta em {
  font-style: normal;
  margin-right: 2px;
}
.wa-star .icon {
  width: 11px;
  height: 11px;
  fill: currentColor;
}
.wa-forwarded {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 2px;
  color: var(--muted);
  font-size: 0.74rem;
  font-style: italic;
}
.wa-forwarded .icon {
  width: 13px;
  height: 13px;
}
.wa-pinned,
.wa-find {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.wa-pinned > .icon,
.wa-find > .icon {
  width: 16px;
  height: 16px;
  flex: none;
  color: var(--muted);
}
.wa-pinned > button:not(.icon-button) {
  flex: 1;
  min-width: 0;
  display: grid;
  padding: 2px 0;
  text-align: left;
  font-size: 0.8rem;
}
.wa-pinned strong {
  font-size: 0.74rem;
  color: var(--accent);
}
.wa-pinned span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text);
}
.wa-find #wa-find {
  flex: 1;
  min-width: 0;
  min-height: 34px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--subtle);
}
.wa-find small {
  flex: none;
  color: var(--muted);
}
.wa-replying.is-editing strong {
  display: flex;
  align-items: center;
  gap: 5px;
}
.wa-replying.is-editing .icon {
  width: 13px;
  height: 13px;
}
.wa-sheet {
  display: grid;
  gap: 2px;
}
.wa-sheet button {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  min-height: 44px;
  padding: 0 10px;
  border-radius: 10px;
  text-align: left;
}
.wa-sheet button:hover {
  background: var(--hover);
}
.wa-starred {
  display: grid;
  gap: 6px;
  max-height: 60vh;
  overflow-y: auto;
}
.wa-starred button {
  display: grid;
  gap: 2px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  text-align: left;
}
.wa-starred strong {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
}
.wa-starred time {
  color: var(--muted);
  font-weight: 400;
}
.wa-starred span {
  overflow-wrap: anywhere;
  font-size: 0.86rem;
}
.wa-forward-list label {
  cursor: pointer;
}
.wa-forward-list input[type="checkbox"] {
  flex: none;
}
.wa-info-text {
  padding: 10px 12px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--accent) 14%, var(--surface));
  overflow-wrap: anywhere;
}
.wa-info-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 12px 0 4px;
  font-size: 0.86rem;
}
.wa-delete-choices {
  flex-wrap: wrap;
}
@media (max-width: 760px) {
  .wa-tools {
    width: 220px;
  }
  .wa-chat-actions .icon-button[data-action="chat-find"] {
    display: none;
  }
}

/* Mensagens: opções na lista e visualizador de fotos */
.wa-row {
  position: relative;
}
.wa-row-more {
  position: absolute;
  right: 12px;
  bottom: 14px;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--surface);
  color: var(--muted);
  opacity: 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}
.wa-row-more .icon {
  width: 14px;
  height: 14px;
}
.wa-row:hover .wa-row-more,
.wa-row-more:focus-visible {
  opacity: 1;
}
.wa-row:hover .wa-badge {
  visibility: hidden;
}
@media (hover: none) {
  .wa-row-more {
    top: 10px;
    bottom: auto;
    opacity: 0.85;
    background: transparent;
    box-shadow: none;
  }
  .wa-item-top time {
    margin-right: 22px;
  }
}
.wa-photo {
  cursor: zoom-in;
}
body.wa-viewing {
  overflow: hidden;
}
.wa-viewer {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  flex-direction: column;
  background: rgba(11, 12, 14, 0.97);
  color: #fff;
  animation: wa-viewer-in 0.16s ease;
}
@keyframes wa-viewer-in {
  from {
    opacity: 0;
  }
}
.wa-viewer-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: max(12px, env(safe-area-inset-top)) 16px 12px;
}
.wa-viewer-head > div {
  flex: 1;
  min-width: 0;
  display: grid;
}
.wa-viewer-head small {
  color: rgba(255, 255, 255, 0.7);
}
.wa-viewer-btn {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  color: #fff;
}
.wa-viewer-btn:hover,
.wa-viewer-btn:focus-visible {
  background: rgba(255, 255, 255, 0.14);
}
.wa-viewer-btn .icon {
  width: 22px;
  height: 22px;
}
.wa-viewer-stage {
  position: relative;
  flex: 1;
  min-height: 0;
  display: grid;
  place-items: center;
  padding: 8px 64px 16px;
}
.wa-viewer-stage img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 4px;
  user-select: none;
}
.wa-viewer-nav {
  position: absolute;
  top: 50%;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-top: -22px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}
.wa-viewer-nav.prev {
  left: 12px;
}
.wa-viewer-nav.next {
  right: 12px;
}
.wa-viewer-nav:disabled {
  opacity: 0.25;
}
.wa-viewer-caption {
  margin: 0;
  padding: 0 16px max(18px, env(safe-area-inset-bottom));
  text-align: center;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
@media (max-width: 600px) {
  .wa-viewer-stage {
    padding: 4px 0 12px;
  }
  .wa-viewer-nav {
    width: 38px;
    height: 38px;
    background: rgba(0, 0, 0, 0.4);
  }
}

/* ---------- Segurança: recuperar acesso, mostrar senha e Configurações › Segurança ---------- */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.auth-label-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}
.forgot-link {
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}
.forgot-link:hover {
  text-decoration: underline;
}
.pw-wrap {
  position: relative;
  display: block;
}
.pw-wrap input {
  padding-right: 48px !important;
}
.pw-toggle {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.pw-toggle:hover {
  color: var(--ink);
  background: var(--hover);
}
.pw-toggle .icon {
  width: 18px;
  height: 18px;
}
.pw-meter {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: -4px;
}
.pw-meter span {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
}
.pw-meter i {
  height: 4px;
  border-radius: 4px;
  background: var(--line-2);
  transition: background 0.2s;
}
.pw-meter[data-level="1"] i:nth-child(1) {
  background: var(--danger);
}
.pw-meter[data-level="2"] i:nth-child(-n + 2) {
  background: var(--warn);
}
.pw-meter[data-level="3"] i {
  background: #16a974;
}
.pw-meter small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}
.as-link {
  display: grid;
  place-items: center;
  text-decoration: none;
  margin: 8px 0 4px;
  width: 100%;
}
.security-card h2 {
  display: flex;
  align-items: center;
  gap: 8px;
}
.security-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: 24px;
  margin-top: 16px;
}
.security-block {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}
.security-block h3 {
  margin: 0;
  font-size: 14px;
  color: var(--ink);
}
.security-block h3 small {
  color: var(--muted);
  font-weight: 600;
}
.security-block .auth-field input {
  height: 44px;
}
.security-block > .dark-button {
  align-self: flex-start;
}
.security-sessions,
.security-events {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.security-sessions li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--r);
}
.security-sessions li > div {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.security-sessions strong {
  font-size: 13px;
  color: var(--ink);
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.security-sessions small {
  font-size: 12px;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.security-device {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--subtle);
  flex: none;
}
.security-events li {
  display: grid;
  grid-template-columns: 10px 1fr auto;
  gap: 10px;
  align-items: start;
  font-size: 13px;
}
.security-events i {
  width: 8px;
  height: 8px;
  margin-top: 5px;
  border-radius: 50%;
  background: var(--faint);
}
.security-events li.is-alert i {
  background: var(--warn);
}
.security-events span {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.security-events small {
  color: var(--muted);
  font-size: 11px;
}
.security-events time {
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}
@media (max-width: 860px) {
  .security-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .security-sessions li {
    flex-wrap: wrap;
  }
}
.security-end-all {
  align-self: flex-start;
}
.security-events li.security-empty {
  display: block;
  color: var(--muted);
}
/* Ações de cada conta no painel: em linha (a regra geral de .admin-user > div
   empilhava os botões). */
.admin-user > .admin-user-actions {
  flex: none;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: flex-end;
}
@media (max-width: 720px) {
  .admin-user {
    flex-wrap: wrap;
  }
  .admin-user > .admin-user-actions {
    flex: 1 1 100%;
    justify-content: flex-start;
  }
}

/* Arrastar evento (01/11/2026): a hora vira um selo e o horário novo entra
   deslizando no sentido do movimento. */
.tg-event.is-dragging .tg-time {
  align-self: flex-start;
  padding: 1px 6px;
  border-radius: 6px;
  background: var(--ev-ink, var(--sky-ink));
  color: var(--surface);
  font-weight: 700;
}
.tg-time.is-tick[data-dir="later"] {
  animation: tg-tick-later 0.18s var(--ease);
}
.tg-time.is-tick[data-dir="earlier"] {
  animation: tg-tick-earlier 0.18s var(--ease);
}
@keyframes tg-tick-later {
  from {
    transform: translateY(70%);
    opacity: 0.2;
  }
}
@keyframes tg-tick-earlier {
  from {
    transform: translateY(-70%);
    opacity: 0.2;
  }
}
@media (prefers-reduced-motion: reduce) {
  .tg-time.is-tick {
    animation: none !important;
  }
}
.icon-editor-title {
  margin: 16px 0 6px;
  font-size: 14px;
}
.icon-editor-grid section > .brand-mark {
  width: 28px;
  height: 28px;
}
/* Sem o bloco de aparelhos (só administradores), a troca de senha ocupa a linha. */
.security-grid:has(> .security-block:only-child) {
  grid-template-columns: minmax(0, 1fr);
  max-width: 560px;
}
/* Desempenho e carga da equipe (Atividade, 03/11/2026). */
.perf-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 16px;
}
.perf-panel .section-heading small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.perf-panel .section-heading > .icon {
  color: var(--accent);
}
.perf-kpis {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}
.perf-kpi {
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--subtle);
}
.perf-kpi strong {
  display: block;
  font-size: 22px;
  letter-spacing: -0.02em;
}
.perf-kpi small {
  color: var(--muted);
  font-size: 12px;
}
.perf-kpi.is-bad strong {
  color: var(--danger-ink, #b4232f);
}
.perf-kpi.is-warn strong {
  color: #b45309;
}
.perf-kpi.is-ok strong {
  color: var(--accent);
}
.perf-alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0;
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--rose, #fde8ea);
  color: var(--danger-ink, #7f1d1d);
  font-size: 13px;
}
.perf-alert.is-ok {
  background: var(--accent-soft);
  color: var(--ink);
}
.perf-alert .icon {
  flex: none;
  width: 16px;
  height: 16px;
  margin-top: 1px;
}
.perf-highlights {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
}
.perf-highlights article {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
}
.perf-highlights .icon {
  flex: none;
  width: 18px;
  height: 18px;
  color: var(--accent);
}
.perf-highlights small,
.perf-highlights span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}
.perf-highlights b {
  display: block;
  font-size: 14px;
}
.perf-table {
  display: flex;
  flex-direction: column;
}
.perf-row {
  display: grid;
  grid-template-columns: minmax(150px, 1.6fr) minmax(150px, 1.6fr) repeat(5, minmax(56px, 0.6fr));
  align-items: center;
  gap: 10px;
  padding: 10px 4px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.perf-row > span:nth-child(n + 3) {
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.perf-row.is-head {
  padding-top: 0;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 600;
}
.perf-row .is-bad {
  color: var(--danger-ink, #b4232f);
  font-weight: 700;
}
.perf-who {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.perf-who b {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.perf-load {
  display: flex;
  align-items: center;
  gap: 8px;
}
.perf-bar {
  flex: 1;
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--subtle);
}
.perf-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
}
.perf-bar.tone-warn i {
  background: #f59e0b;
}
.perf-bar.tone-bad i {
  background: #e0464f;
}
.perf-chip {
  flex: none;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
}
.perf-chip.tone-ok {
  background: var(--accent-soft);
  color: var(--ink);
}
.perf-chip.tone-warn {
  background: #fef3c7;
  color: #92400e;
}
.perf-chip.tone-bad {
  background: #fde8ea;
  color: #9f1239;
}
.perf-chip.tone-info {
  background: var(--subtle);
  color: var(--muted);
}
.perf-sub {
  margin: 4px 0 0;
  font-size: 14px;
}
.perf-teams {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
}
.perf-teams article {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
}
.perf-teams article.is-bad {
  border-color: #f4b4bb;
}
.perf-teams small,
.perf-teams span {
  color: var(--muted);
  font-size: 12px;
}
.perf-teams .perf-chip {
  align-self: flex-start;
  margin-top: 4px;
}
@media (max-width: 900px) {
  .perf-kpis {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .perf-row.is-head {
    display: none;
  }
  .perf-row {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    row-gap: 6px;
  }
  .perf-row > .perf-who,
  .perf-row > .perf-load {
    grid-column: 1 / -1;
  }
  .perf-row > span[data-label]::before {
    content: attr(data-label);
    display: block;
    color: var(--muted);
    font-size: 10.5px;
  }
}
@media (max-width: 420px) {
  .perf-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
/* Ícone próprio do cliente no Jurídico (03/11/2026). */
.office-initial.has-img {
  overflow: hidden;
  padding: 0;
  background: var(--soft, #f4f4f5);
}
.office-initial.has-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Configurações › Webhooks e webhook de entrada no catálogo (03/11/2026). */
.wh-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.wh-head p {
  margin: 4px 0 0;
}
.wh-card code,
.hub-webhook code {
  padding: 1px 6px;
  border-radius: 6px;
  background: var(--soft, #f4f4f5);
  font-size: 12px;
  word-break: break-all;
}
.wh-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
}
.wh-events {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 8px;
}
.wh-events label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  cursor: pointer;
}
.wh-events label:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.wh-events input {
  margin: 2px 0 0;
  accent-color: var(--accent);
}
.wh-events span {
  display: flex;
  flex-direction: column;
  font-size: 13px;
  font-weight: 600;
}
.wh-events small {
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  font-weight: 400;
}
.wh-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
}
.wh-item {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
}
.wh-item.is-off {
  opacity: 0.7;
}
.wh-item header {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.wh-item header div {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.wh-item b {
  overflow: hidden;
  font-size: 13.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.wh-item small {
  color: var(--muted);
  font-size: 12px;
}
.wh-dot {
  flex: none;
  width: 10px;
  height: 10px;
  margin-top: 4px;
  border-radius: 50%;
  background: var(--line-2, #d4d4d8);
}
.wh-dot.ok {
  background: #16a974;
}
.wh-dot.bad {
  background: #e5484d;
}
.wh-item footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}
.wh-item footer .cf-del {
  margin-left: auto;
}
.wh-secret,
.hub-secret {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 10px 0 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--accent-soft);
  font-size: 12.5px;
}
.wh-empty {
  margin: 12px 0 0;
}
.hub-webhook {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 12px 0;
  padding: 12px 14px;
  border: 1px dashed var(--line);
  border-radius: 14px;
}
.hub-webhook > b {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
}
.hub-webhook > b .icon {
  width: 15px;
  height: 15px;
}
.hub-webhook p {
  margin: 0;
}
.hub-webhook-meta {
  color: var(--muted);
  font-size: 12px;
}
.hub-webhook > .subtle-button {
  align-self: flex-start;
}
@media (max-width: 600px) {
  .wh-head {
    flex-direction: column;
  }
}
/* Atendimentos: arrastar entre etapas e ações do cartão (03/11/2026). */
.office-intake {
  cursor: grab;
  user-select: none;
}
.office-intake.drag-source {
  opacity: 0.35;
}
.drag-ghost.office-intake {
  position: fixed;
  z-index: 500;
  pointer-events: none;
  box-shadow: var(--shadow-lift);
}
.office-stage.drag-over {
  outline: 2px dashed color-mix(in srgb, var(--accent) 60%, transparent);
  outline-offset: -2px;
  background: var(--accent-soft);
}
.office-intake-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 10px 10px;
}
.office-intake-actions:empty {
  display: none;
}
.office-intake-actions > * {
  max-width: 100%;
}
.office-intake-open small .icon {
  width: 13px;
  height: 13px;
  margin-right: 4px;
  vertical-align: -2px;
}

/* Modelos › Papel timbrado (03/11/2026). */
.lh-card {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  margin-bottom: 16px;
}
.lh-preview {
  aspect-ratio: 210 / 297;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  box-shadow: var(--shadow-sm, 0 1px 2px rgb(0 0 0 / 0.06));
}
.lh-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.lh-preview.is-empty {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}
.lh-info h2 {
  margin: 0 0 4px;
}
.lh-info > p {
  margin: 0 0 10px;
}
.lh-margins {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 10px;
}
.lh-margins .subtle-button {
  align-self: flex-start;
}
.lh-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.lh-pick {
  cursor: pointer;
}
.lh-auths {
  margin-top: 12px;
  max-height: 260px;
  overflow: auto;
}
.lh-auths table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}
.lh-auths th,
.lh-auths td {
  padding: 6px 8px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}
.lh-auths code {
  white-space: nowrap;
  font-weight: 700;
  letter-spacing: 0.04em;
}
@media (max-width: 600px) {
  .lh-card {
    grid-template-columns: 1fr;
  }
  .lh-preview {
    width: 120px;
  }
}
/* Folhas A4 (03/11/2026): prévia do documento igual ao PDF. As posições vêm
   de doc-pdf.js em % da folha; a fonte acompanha a largura (cqw). */
.a4-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  max-height: 62dvh;
  overflow: auto;
  padding: 16px;
  border-radius: var(--r);
  background: var(--subtle);
}
.a4-sheet {
  position: relative;
  flex: none;
  width: min(100%, 620px);
  aspect-ratio: 210 / 297;
  overflow: hidden;
  container-type: inline-size;
  background: #fff;
  color: #121212;
  box-shadow:
    0 1px 2px rgb(0 0 0 / 0.08),
    0 8px 24px rgb(0 0 0 / 0.08);
  font-family: Helvetica, Arial, sans-serif;
}
.a4-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}
.a4-line {
  position: absolute;
  font-size: calc(var(--pt) * 100cqw / 595.28);
  line-height: 1;
  white-space: pre;
}
.a4-foot {
  color: #555;
}
.doc-history {
  margin-top: 14px;
}
.doc-history h3 {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 6px;
  font-size: 14px;
}
.doc-history h3 .icon {
  width: 15px;
  height: 15px;
}
.doc-history .lh-auths {
  margin-top: 0;
  max-height: 180px;
}
.lh-view {
  text-align: right !important;
}
.lh-view .text-button {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.lh-view .icon,
.lh-sent .icon {
  width: 13px;
  height: 13px;
}
.lh-sent {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--muted);
  font-size: 11px;
}
.office-files .cf-rows {
  max-height: 52dvh;
  overflow: auto;
  margin: 0 0 8px;
  padding: 0;
}
.office-files-empty {
  list-style: none;
  padding: 12px 0;
}
.office-files-pick {
  cursor: pointer;
}
.lh-margins .form-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
/* Mensagens do portal do cliente (03/11/2026). */
.office-unread {
  display: inline-grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  margin-left: 4px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--danger-ink, #c0392b);
  color: #fff;
  font-size: 11px;
}
.office-thread {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 46dvh;
  margin: 0 0 12px;
  padding: 0;
  overflow: auto;
  list-style: none;
}
.office-thread li {
  max-width: 88%;
  padding: 10px 12px;
  border-radius: 14px;
  background: var(--subtle);
  font-size: 14px;
}
.office-thread li.is-team {
  align-self: flex-end;
  background: color-mix(in srgb, var(--accent) 12%, var(--surface));
}
.office-thread li.muted {
  max-width: none;
  background: none;
}
.office-thread small {
  display: block;
  color: var(--muted);
  font-size: 11px;
}
.office-thread p {
  margin: 4px 0 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.office-thread-task {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
}
.office-thread-task .icon {
  width: 12px;
  height: 12px;
}
.office-reply textarea {
  width: 100%;
  box-sizing: border-box;
}

/* Backup fora do servidor (/admin/ › Segurança, V3 04/11/2026) */
.ob-card > header {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 14px;
}
.ob-card > header h2 {
  margin: 0 0 2px;
}
.ob-card > header small {
  color: var(--muted);
  line-height: 1.45;
}
.ob-ico {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  flex: none;
  border-radius: var(--r);
  background: var(--sky);
  color: var(--sky-ink);
}
.ob-form .form-grid {
  margin-bottom: 4px;
}
.ob-pass {
  margin: 6px 0 10px;
  padding: 12px;
  border-radius: var(--r);
  background: var(--sun);
}
.ob-pass .field {
  margin: 0 0 8px;
}
.ob-pass p {
  display: flex;
  gap: 8px;
  margin: 0;
  color: var(--sun-ink);
  font-size: 12px;
  line-height: 1.45;
}
.ob-pass p svg {
  flex: none;
  width: 16px;
  height: 16px;
}
.ob-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 10px 0 4px;
  font-size: 13px;
}
.ob-warn {
  padding: 10px 12px;
  border-radius: var(--r);
  background: var(--rose);
  color: var(--rose-ink);
}
.ob-state {
  display: flex;
  gap: 10px;
  padding: 12px;
  border-radius: var(--r);
  background: var(--subtle);
}
.ob-state svg {
  flex: none;
  width: 18px;
  height: 18px;
}
.ob-state small {
  display: block;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.ob-state.is-ok {
  background: var(--mint);
  color: var(--mint-ink);
}
.ob-state.is-error {
  background: var(--rose);
  color: var(--rose-ink);
}
.ob-state.is-ok small,
.ob-state.is-error small {
  color: inherit;
  opacity: 0.8;
}
.ob-meta {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 12px;
  margin: 12px 0;
  font-size: 13px;
}
.ob-meta dt {
  color: var(--muted);
}
.ob-meta dd {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
}
.ob-history {
  margin: 0 0 12px;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
  font-size: 12px;
}
.ob-history li {
  display: grid;
  grid-template-columns: 110px 80px 1fr;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}
.ob-history li > span:last-child {
  min-width: 0;
  overflow-wrap: anywhere;
}
.ob-history li.is-error > span:last-child {
  color: var(--rose-ink);
}
.ob-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}
@media (max-width: 560px) {
  .ob-history li {
    grid-template-columns: 1fr auto;
  }
  .ob-history li > span:last-child {
    grid-column: 1 / -1;
  }
  .ob-actions > *,
  .ob-form .setup-actions > * {
    flex: 1 1 calc(50% - 8px);
  }
  .ob-form .setup-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }
}
/* Ensaio de restauração */
.ob-drills {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.ob-drills li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border-radius: var(--r);
  background: var(--subtle);
}
.ob-drills li > div {
  flex: 1;
  min-width: 0;
}
.ob-drills strong small {
  font-weight: 500;
  color: var(--muted);
}
.ob-drills li > div > small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.ob-drill-ico svg {
  width: 18px;
  height: 18px;
}
.ob-drills li.is-ok .ob-drill-ico {
  color: var(--mint-ink);
}
.ob-drills li.is-error {
  background: var(--rose);
}
.ob-drills li.is-error .ob-drill-ico,
.ob-drills li.is-error > div > small {
  color: var(--rose-ink);
}
@media (max-width: 560px) {
  .ob-drills li {
    flex-wrap: wrap;
  }
  .ob-drills li > button {
    flex: 1 1 100%;
  }
}
/* Troca de senha obrigatória (V3) */
.auth-head .chip svg {
  width: 14px;
  height: 14px;
  margin-right: 4px;
  vertical-align: -2px;
}
.auth-foot .link-button {
  border: 0;
  background: none;
  padding: 0;
  font: inherit;
  cursor: pointer;
}

/* Saúde do servidor (/admin/ › Saúde, V3 04/11/2026) */
.sv-page {
  display: grid;
  gap: 14px;
}
.sv-page > .settings-card {
  margin: 0;
}
.sv-summary {
  display: flex;
  align-items: center;
  gap: 12px;
}
.sv-summary > div {
  flex: 1;
  min-width: 0;
}
.sv-summary strong {
  display: block;
  font-size: 16px;
}
.sv-summary small {
  color: inherit;
  opacity: 0.75;
}
.sv-summary.ok {
  background: var(--mint);
  color: var(--mint-ink);
}
.sv-summary.warn {
  background: var(--sun);
  color: var(--sun-ink);
}
.sv-summary.bad {
  background: var(--rose);
  color: var(--rose-ink);
}
.sv-ico svg {
  width: 22px;
  height: 22px;
}
.sv-checks {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.sv-checks li {
  display: flex;
  gap: 10px;
  padding: 12px;
  border-radius: var(--r);
  background: var(--subtle);
}
.sv-checks li > svg {
  flex: none;
  width: 18px;
  height: 18px;
}
.sv-checks li.ok > svg {
  color: var(--mint-ink);
}
.sv-checks li.warn {
  background: var(--sun);
}
.sv-checks li.warn > svg {
  color: var(--sun-ink);
}
.sv-checks li.bad {
  background: var(--rose);
}
.sv-checks li.bad > svg,
.sv-checks li.bad small {
  color: var(--rose-ink);
}
.sv-checks small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}
.sv-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px;
}
.sv-tiles > .sv-tile {
  margin: 0;
}
.sv-tile {
  display: grid;
  gap: 6px;
  align-content: start;
}
.sv-tile > small {
  color: var(--muted);
  font-size: 12px;
}
.sv-tile > strong {
  font-size: 18px;
}
.sv-tile > span:last-child {
  color: var(--muted);
  font-size: 12px;
}
.sv-bar {
  display: block;
  height: 6px;
  border-radius: 99px;
  background: var(--line);
  overflow: hidden;
}
.sv-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--mint-ink);
}
.sv-bar.warn i {
  background: var(--sun-ink);
}
.sv-bar.bad i {
  background: var(--rose-ink);
}
.sv-errors > header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}
.sv-errors h2 small {
  color: var(--muted);
  font-weight: 500;
}
.sv-errors h3 {
  margin: 14px 0 6px;
  font-size: 13px;
}
.sv-groups,
.sv-recent {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 12px;
}
.sv-groups li,
.sv-recent li {
  display: grid;
  grid-template-columns: 110px 1fr auto;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}
.sv-groups li {
  grid-template-columns: 40px 1fr auto;
}
.sv-groups li > span,
.sv-recent li > span:nth-child(2) {
  min-width: 0;
  overflow-wrap: anywhere;
}
.sv-errors code {
  font-size: 11px;
}
.sv-errors li small {
  color: var(--muted);
}
.sv-none {
  display: flex;
  gap: 8px;
  align-items: center;
  color: var(--mint-ink);
}
.sv-none svg {
  width: 16px;
  height: 16px;
}
@media (max-width: 640px) {
  .sv-checks {
    grid-template-columns: 1fr;
  }
  .sv-groups li,
  .sv-recent li {
    grid-template-columns: 1fr auto;
  }
  .sv-recent li > span:nth-child(2),
  .sv-groups li > span {
    grid-column: 1 / -1;
    order: 3;
  }
  .sv-summary {
    flex-wrap: wrap;
  }
  .sv-errors > header {
    flex-direction: column;
  }
  .sv-summary > button {
    flex: 1 1 100%;
  }
}
/* Prévia do modelo de email (Integrações › Email) */
.hub-mail-preview {
  display: block;
  box-sizing: border-box;
  /* Os filhos do modal têm 22px de margem dos lados. */
  width: calc(100% - 44px);
  height: min(58vh, 560px);
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: #f2f4f8;
}
/* Resumo diário por email (Configurações, V3) */
.dg-card h2 svg {
  width: 18px;
  height: 18px;
  margin-right: 6px;
  vertical-align: -3px;
}
.dg-off {
  display: flex;
  gap: 8px;
  padding: 10px 12px;
  border-radius: var(--r);
  background: var(--sun);
  color: var(--sun-ink);
  font-size: 13px;
}
.dg-off svg {
  flex: none;
  width: 16px;
  height: 16px;
}
.dg-form {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 12px 20px;
  margin: 10px 0;
}
.dg-form .field {
  margin: 0;
  min-width: 140px;
}
.dg-last {
  display: block;
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}
.dg-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
/* Envio automático por email (V3 tarefa 8) */
.rs-form .form-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.rs-form .dg-off {
  margin: 0 0 10px;
}
.rs-form .hub-switch {
  margin: 6px 0 4px;
}
.rs-footer {
  flex-wrap: wrap;
}
@media (max-width: 560px) {
  .rs-form .form-grid {
    grid-template-columns: 1fr;
  }
  .rs-footer > * {
    flex: 1 1 calc(50% - 8px);
  }
}

/* Financeiro › Contas e extrato (V3 tarefa 10) */
.fi-views {
  margin: 0 0 14px;
}
.ba-head {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}
.ba-total {
  display: grid;
  gap: 2px;
  padding: 14px 18px;
  margin: 0;
}
.ba-total small,
.ba-total span {
  color: var(--muted);
  font-size: 12px;
}
.ba-total strong {
  font-size: 24px;
}
.ba-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.ba-total strong.neg,
.ba-card b.neg {
  color: var(--rose-ink);
}
.ba-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}
.ba-card {
  display: grid;
  gap: 3px;
  margin: 0;
  padding: 14px;
  text-align: left;
  border: 1px solid var(--line);
  cursor: pointer;
  font: inherit;
  color: inherit;
}
.ba-card.selected {
  border-color: var(--text, #14161a);
  box-shadow: 0 0 0 1px var(--text, #14161a);
}
.ba-card.is-off {
  opacity: 0.6;
}
.ba-card small,
.ba-card span {
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}
.ba-card b {
  font-size: 18px;
}
.ba-statement {
  margin: 0;
}
.ba-statement > header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px;
  margin-bottom: 10px;
}
.ba-statement h2 {
  margin: 0 0 2px;
}
.ba-statement header small {
  color: var(--muted);
}
.ba-period {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 8px;
}
.ba-period label {
  display: grid;
  gap: 2px;
  font-size: 12px;
  color: var(--muted);
}
.ba-table-wrap {
  overflow-x: auto;
}
.ba-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.ba-table th {
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  padding: 8px 6px;
  border-bottom: 1px solid var(--line);
}
.ba-table td {
  padding: 9px 6px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.ba-table td small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}
.ba-amt,
.ba-run,
.ba-table th:nth-child(3),
.ba-table th:nth-child(4) {
  text-align: right;
  white-space: nowrap;
}
.ba-amt.pos {
  color: var(--mint-ink);
}
.ba-amt.neg {
  color: var(--rose-ink);
}
.ba-table tfoot td {
  font-weight: 600;
  border-bottom: 0;
}
.ba-none {
  padding: 12px 0;
}
@media (max-width: 640px) {
  .ba-head {
    flex-direction: column;
  }
  .ba-actions > * {
    flex: 1 1 calc(50% - 8px);
  }
  .ba-table thead {
    display: none;
  }
  .ba-table,
  .ba-table tbody,
  .ba-table tr,
  .ba-table td {
    display: block;
    width: auto;
  }
  .ba-table tbody tr {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 2px 10px;
    padding: 8px 0;
    border-bottom: 1px solid var(--line);
  }
  .ba-table tbody td {
    padding: 0;
    border: 0;
  }
  .ba-table tbody td:nth-child(1) {
    grid-column: 1 / -1;
    color: var(--muted);
    font-size: 12px;
  }
  .ba-table tbody td:nth-child(4) {
    grid-column: 1 / 2;
    text-align: left;
    color: var(--muted);
    font-size: 12px;
  }
  .ba-table tfoot tr {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding-top: 8px;
  }
  .ba-table tfoot td:last-child {
    display: none;
  }
  .ba-table tfoot td {
    padding: 0;
  }
}

/* Financeiro › Conciliação (V3 tarefa 11) */
.rc-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.rc-account {
  min-width: 220px;
  margin: 0;
}
.rc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.rc-file {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
}
.rc-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(0, 2fr);
  gap: 12px;
  margin-bottom: 14px;
}
.rc-stat {
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 12px 16px;
}
.rc-stat small,
.rc-stat span {
  color: var(--muted);
  font-size: 12px;
}
.rc-stat strong {
  font-size: 20px;
}
.rc-balance strong {
  font-size: 16px;
}
.rc-balance.is-ok span {
  color: var(--mint-ink);
}
.rc-balance.is-off span {
  color: var(--rose-ink);
}
.rc-filter {
  margin: 0 0 12px;
  overflow-x: auto;
  scrollbar-width: none;
}
.rc-filter button {
  flex: 0 0 auto;
  white-space: nowrap;
}
.rc-list {
  display: grid;
  gap: 8px;
}
.rc-row {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px 16px;
  margin: 0;
  padding: 12px 14px;
}
.rc-row.is-matched,
.rc-row.is-ignored {
  opacity: 0.85;
}
.rc-line {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
}
.rc-line time,
.rc-pick-line time {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}
.rc-line strong {
  overflow-wrap: anywhere;
  font-weight: 600;
}
.rc-amt {
  white-space: nowrap;
  font-weight: 600;
}
.rc-amt.pos {
  color: var(--mint-ink);
}
.rc-amt.neg {
  color: var(--rose-ink);
}
.rc-link {
  display: grid;
  gap: 1px;
  min-width: 0;
  font-size: 13px;
}
.rc-link small {
  color: var(--muted);
  font-size: 12px;
}
.rc-link .in-chip {
  justify-self: start;
}
.rc-link strong {
  overflow-wrap: anywhere;
}
.rc-btns {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 6px;
}
.rc-none {
  padding: 12px 0;
}
.rc-loading {
  padding: 18px;
}
.rc-imports {
  margin: 14px 0 0;
  padding: 12px 16px;
}
.rc-imports summary {
  cursor: pointer;
  font-weight: 600;
}
.rc-imports ul,
.rc-pick ul {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
}
.rc-imports li,
.rc-pick li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 0;
  border-top: 1px solid var(--line);
}
.rc-imports li span,
.rc-pick li span {
  display: grid;
  min-width: 0;
}
.rc-imports small,
.rc-pick small {
  color: var(--muted);
  font-size: 12px;
}
.rc-pick h3 {
  margin: 14px 0 0;
  font-size: 13px;
}
.rc-pick-line {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
}
@media (max-width: 900px) {
  .rc-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .rc-balance {
    grid-column: 1 / -1;
  }
  .rc-row {
    grid-template-columns: minmax(0, 1fr);
  }
  .rc-btns {
    justify-content: flex-start;
  }
}
@media (max-width: 640px) {
  .rc-head,
  .rc-account {
    width: 100%;
  }
  .rc-actions > * {
    flex: 1 1 auto;
  }
  .rc-line {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .rc-line time {
    grid-column: 1 / -1;
  }
  .rc-stat {
    padding: 10px 12px;
  }
  .rc-stat strong {
    font-size: 17px;
  }
  .rc-filter {
    gap: 0;
  }
  .rc-filter button {
    padding: 10px 8px;
    font-size: 13px;
  }
}

/* V4 1.1 — contador de legenda por rede */
.cl-count {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  color: var(--muted);
  font-size: 12px;
}
.cl-total.over {
  color: var(--danger-ink);
}
.cl-nets {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
}
.cl-net {
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--mint);
  color: var(--mint-ink);
  font-size: 11px;
  white-space: nowrap;
}
.cl-net.over {
  background: var(--rose);
  color: var(--rose-ink);
}
.cl-tip {
  flex-basis: 100%;
  color: var(--muted);
  font-size: 11px;
}
.cl-default {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

/* V4 1.13 — lançamento rápido */
.fi-quick {
  display: grid;
  grid-template-columns: minmax(120px, 1.4fr) minmax(96px, 0.8fr) 140px minmax(150px, 1.2fr) auto auto;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  padding: 10px;
}
.fi-quick input:not([type="checkbox"]) {
  height: 40px;
  min-height: 0;
  font-size: 13px;
}
.fi-quick .dark-button {
  height: 40px;
  white-space: nowrap;
}
.fi-quick-paid {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  white-space: nowrap;
}
.fi-quick-hint {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 11px;
}
.fi-quick .form-error:empty {
  display: none;
}
.fi-quick .form-error {
  grid-column: 1 / -1;
  margin: 0;
}
@media (max-width: 900px) {
  .fi-quick {
    grid-template-columns: 1fr 1fr;
  }
  .fi-quick [name="title"] {
    grid-column: 1 / -1;
  }
  .fi-quick input {
    min-width: 0;
  }
}

/* V4 1.8 — notificações em abas */
.nt-tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  background: var(--subtle);
}
.nt-tabs button {
  flex: 1;
  height: 34px;
  border-radius: 999px;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
}
.nt-tabs button.selected {
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow);
}
.nt-tabs small {
  margin-left: 4px;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--on-ink);
  font-size: 11px;
}
.nt-item {
  display: flex;
  align-items: center;
  gap: 6px;
}
.nt-item .drawer-task {
  flex: 1;
  min-width: 0;
}
.nt-item .drawer-task span {
  overflow-wrap: anywhere;
}
.nt-more {
  width: 100%;
}

/* V4 1.4 e 1.6 — envio para aprovação (um post ou em lote) */
#hub-social-send {
  display: grid;
  gap: 14px;
}
.as-page {
  margin-bottom: 12px;
}
.as-posts,
.as-group {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}
.as-posts legend,
.as-group legend {
  margin-bottom: 6px;
  padding: 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}
.as-posts legend small {
  margin-left: 6px;
  color: var(--muted);
  font-weight: 600;
}
.as-post,
.as-choices label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface);
  cursor: pointer;
}
.as-post:has(input:checked),
.as-choices label:has(input:checked) {
  border-color: var(--ink);
}
.as-post input,
.as-choices input {
  flex: none;
  margin-top: 2px;
  accent-color: var(--ink);
}
.as-post span,
.as-choices span {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.as-post b,
.as-choices b {
  font-size: 13px;
  overflow-wrap: anywhere;
}
.as-post small,
.as-choices small {
  color: var(--muted);
  font-size: 12px;
}
.as-posts {
  max-height: 260px;
  overflow: auto;
}
.as-choices {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.as-auto {
  display: grid;
  gap: 10px;
  padding-top: 4px;
}
.as-note {
  margin: 0;
  color: var(--text);
  font-size: 12px;
}
.as-nets {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 13px;
  font-weight: 600;
}
.as-nets label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.as-stages {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.as-reach {
  display: flex;
  gap: 8px;
  margin: 0;
  padding: 10px 12px;
  border-radius: var(--r);
  background: var(--subtle);
  color: var(--text);
  font-size: 12px;
  line-height: 1.45;
}
.as-reach .icon {
  flex: none;
  width: 15px;
  height: 15px;
}
.as-done,
.as-empty {
  display: grid;
  justify-items: center;
  gap: 8px;
  text-align: center;
}
.as-done > .icon,
.as-empty > .icon {
  width: 34px;
  height: 34px;
  color: var(--accent);
}
.as-done h3 {
  margin: 0;
  font-size: 17px;
}
.as-done p,
.as-empty p {
  margin: 0;
  max-width: 42ch;
  color: var(--text);
  font-size: 13px;
}
.as-done .modal-footer {
  width: 100%;
}
/* Os três passos do envio no editor da postagem */
.as-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 14px;
  padding: 0;
  list-style: none;
}
.as-steps li {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface);
  color: var(--muted);
}
.as-steps li.on {
  color: var(--mint-ink);
  background: var(--mint);
  border-color: transparent;
}
.as-steps li .icon {
  flex: none;
  width: 16px;
  height: 16px;
}
.as-steps span {
  display: grid;
  min-width: 0;
}
.as-steps b {
  font-size: 12px;
  color: var(--ink);
}
.as-steps small {
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
@media (max-width: 720px) {
  .as-choices,
  .as-stages {
    grid-template-columns: 1fr;
  }
  .as-steps {
    grid-template-columns: 1fr;
  }
}

/* Abas de lista (Financeiro, Intimações…): no celular estreito, rolam de lado
   dentro da barra em vez de alargar a página. */
.in-tabs {
  overflow-x: auto;
  scrollbar-width: none;
}
.in-tabs button {
  flex: none;
  white-space: nowrap;
}

/* Email fácil (07/11/2026): na Hostinger, os campos avançados somem. */
.hub-easy .hub-adv {
  display: none;
}
.hub-mail-hint {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  padding: 10px 12px;
  margin: 0 0 12px;
  border-radius: 10px;
  background: #f0fdf4;
  color: #14532d;
  font-size: 13px;
}
.hub-mail-hint svg {
  width: 16px;
  height: 16px;
  flex: none;
  margin-top: 1px;
}
.hub-mail-hint.is-hidden {
  display: none;
}
.form-grid:not(.hub-easy) .hub-easy-only {
  display: none;
}

/* Desempenho: barras de carga mais legíveis (07/11/2026). */
.perf-bar { height: 8px; border-radius: 999px; background: var(--subtle); overflow: hidden; }
.perf-bar i { border-radius: 999px; }
.perf-kpi strong { font-variant-numeric: tabular-nums; letter-spacing: -.01em; }

/* Agendar direto (V4 5.11): os dois botões ficam juntos à direita. */
.social-toolbar > [data-action="social-direct"] { margin-left: auto; }
.social-toolbar > [data-action="social-direct"] + .dark-button { margin-left: 0; }
@media (max-width: 760px) { .social-toolbar > [data-action="social-direct"] { margin-left: 0; } }

/* Painel › Usuários (07/11/2026): a largura que vale é a do cartão (o painel
   tem menu lateral próprio), então a quebra usa container query. */
.admin-user-list { container-type: inline-size; }
.admin-user > div { min-width: 0; }
.admin-user strong { overflow-wrap: anywhere; }
@container (max-width: 680px) {
  .admin-user { flex-wrap: wrap; row-gap: 8px; }
  .admin-user > div { flex: 1 1 160px; }
  .admin-user > .admin-user-actions { flex: 1 1 100%; justify-content: flex-start; padding-left: 52px; }
}
@container (max-width: 380px) {
  .admin-user > .admin-user-actions { padding-left: 0; }
  .admin-user > .admin-user-actions .subtle-button, .admin-user > .admin-user-actions .dark-button { flex: 1 1 auto; }
}

/* Catálogo: acesso pela conta do sistema (Google/Canva) */
.hub-account { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 12px; border: 1px dashed var(--line-2); border-radius: 12px; margin: 8px 0; }
.hub-account.is-on { border-style: solid; border-color: #b9e3cc; background: color-mix(in srgb, #16a974 6%, transparent); }
.hub-account > div { display: grid; gap: 4px; min-width: 0; flex: 1 1 260px; }
.hub-account b { display: inline-flex; gap: 6px; align-items: center; }
.hub-account b svg { width: 16px; height: 16px; flex: none; }
.hub-account small { color: var(--muted); overflow-wrap: anywhere; }
.hub-account code { font-size: 0.78rem; }

/* Botão Sincronizar do Calendário (11/11/2026): gira enquanto atualiza. */
[data-action="agenda-sync"].is-spinning svg {
  animation: agenda-spin 0.9s linear infinite;
}
@keyframes agenda-spin {
  to {
    transform: rotate(360deg);
  }
}
@media (prefers-reduced-motion: reduce) {
  [data-action="agenda-sync"].is-spinning svg {
    animation: none;
  }
}

/* Passo a passo do provedor nas Integrações (Meta, 11/11/2026). */
.hub-guide {
  margin: 10px 0 14px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--subtle);
}
.hub-guide summary {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 650;
  cursor: pointer;
}
.hub-guide summary .icon {
  width: 16px;
  height: 16px;
}
.hub-guide ol {
  margin: 10px 0;
  padding-left: 20px;
  line-height: 1.5;
}
.hub-guide code {
  font-size: 11.5px;
}
.hub-copy-row {
  align-items: end;
  margin: 8px 0;
}
.hub-copy-row label {
  display: grid;
  flex: 1;
  gap: 3px;
  min-width: 0;
}
.hub-copy-row small {
  color: var(--muted);
}
/* Sistema de cada pessoa (Agência e Jurídico ao mesmo tempo, 14/11/2026). */
.admin-user-mode {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: none;
  font-size: 12px;
  color: var(--muted);
}
.admin-user-mode select {
  min-height: 32px !important;
  padding: 0 28px 0 10px !important;
  border-radius: 999px !important;
  font-size: 12px;
  font-weight: 600;
}
.admin-badge.is-mode {
  background: var(--lilac);
  color: var(--lilac-ink);
}
.mode-toggles {
  display: grid;
  gap: 10px;
  margin: 12px 0 16px;
}
.mode-toggle {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}
.mode-toggle:has(input:checked) {
  border-color: var(--ink);
}
/* Painel administrativo › Funções (14/11/2026). */
.fn-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
  gap: 14px;
}
.fn-card {
  display: grid;
  gap: 12px;
  align-content: start;
}
.fn-head {
  display: flex;
  align-items: flex-end;
  gap: 8px;
}
.fn-head .field {
  flex: 1;
  min-width: 0;
}
.fn-levels,
.fn-areas {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  border: 0;
}
.fn-levels legend,
.fn-areas legend {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}
.fn-level {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--line-2);
  border-radius: var(--r);
  cursor: pointer;
}
.fn-level:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.fn-level span {
  display: grid;
}
.fn-level small {
  color: var(--muted);
}
.fn-areas label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}
.fn-foot {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
/* Clientes de outra conta (compartilhados pela equipe). */
.clp-shared {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--sky);
  color: var(--sky-ink);
  font-size: 11px;
  font-weight: 600;
}
.clp-shared .icon {
  width: 12px;
  height: 12px;
}
.cb-readonly {
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}
.clp-shared-note {
  margin: 12px 0 0;
  opacity: 0.8;
  font-size: 12px;
}
/* Compartilhar sistema (14/11/2026). */
.ss-page .settings-card h2 small {
  color: var(--muted);
  font-weight: 500;
}
.ss-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.ss-inline input {
  flex: 1 1 220px;
  min-width: 0;
}
.ss-systems {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr));
  gap: 8px;
}
.ss-system {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line-2);
  border-radius: var(--r);
  background: var(--surface);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}
.ss-system > span:not(.ss-face-logo) {
  display: grid;
  flex: 1;
  min-width: 0;
}
.ss-system small {
  color: var(--muted);
}
.ss-system.is-on {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.ss-system .icon {
  flex: none;
  width: 18px;
  height: 18px;
}
.ss-teams {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}
.ss-team {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 2px 2px 10px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  font-size: 13px;
}
.ss-team i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--team);
}
.ss-team small {
  color: var(--muted);
}
.ss-team .icon-button {
  width: 26px;
  height: 26px;
}
.ss-add {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
  align-items: end;
}
.ss-add .ss-role-hint,
.ss-add .ss-custom,
.ss-add > button {
  grid-column: 1 / -1;
}
.ss-add > button {
  justify-self: start;
}
.ss-role-hint {
  margin: 0;
  font-size: 12px;
}
.ss-owner,
.ss-person > header,
.ss-invite {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}
.ss-owner > div,
.ss-person > header > div,
.ss-invite > span {
  display: grid;
  flex: 1;
  min-width: 0;
}
.ss-owner small,
.ss-person small,
.ss-invite small {
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
}
.ss-face {
  display: grid;
  place-items: center;
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--subtle);
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
}
.ss-person-form {
  display: grid;
  gap: 10px;
  padding: 4px 0 14px;
}
.ss-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.ss-person-form footer,
.ss-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}
.ss-sub {
  margin: 14px 0 0;
  font-size: 13px;
}
.ss-areas {
  display: grid;
  gap: 4px;
}
.ss-area {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 8px;
  border-radius: var(--r-xs);
  background: var(--subtle);
  font-size: 13px;
}
.ss-seg {
  display: inline-flex;
  gap: 2px;
  padding: 2px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: var(--surface);
}
.ss-seg label {
  position: relative;
  cursor: pointer;
}
.ss-seg input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.ss-seg span {
  display: block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  color: var(--muted);
}
.ss-seg input:checked + span {
  background: var(--ink);
  color: var(--on-ink);
}
.ss-seg input:focus-visible + span {
  outline: 2px solid var(--accent);
}
.ss-seg input:disabled + span {
  cursor: default;
}
.ss-acc {
  font-size: 12px;
}
.ss-acc.is-none {
  color: var(--muted);
}
.ss-acc.is-edit {
  color: var(--mint-ink);
}
@media (max-width: 600px) {
  .ss-add,
  .ss-row {
    grid-template-columns: 1fr;
  }
  .ss-person > header {
    flex-wrap: wrap;
  }
}
/* Jurídico › página do cliente (14/11/2026) e clientes no menu lateral. */
.rail-client-dot {
  background: var(--subtle);
  color: var(--text);
  font-size: 10px;
  font-weight: 700;
}
.rail-client-dot.is-pj {
  background: var(--sky);
  color: var(--sky-ink);
}
.office-card-open {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}
.office-card-open > div {
  display: grid;
  min-width: 0;
}
.office-card-open:hover strong {
  text-decoration: underline;
}
.lc-crumb {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 13px;
}
.lc-crumb strong {
  color: var(--ink);
}
.lc-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  padding: 18px;
}
.lc-id {
  flex: 1 1 260px;
  min-width: 0;
}
.lc-id h1 {
  margin: 0;
  font-size: 22px;
}
.lc-id small {
  color: var(--muted);
}
.lc-id dl {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
  margin: 8px 0 0;
  font-size: 13px;
}
.lc-id dt {
  color: var(--muted);
  font-size: 11px;
}
.lc-id dd {
  margin: 0;
}
.lc-head-actions,
.lc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.lc-actions {
  margin-top: 14px;
}
.lc-tabs {
  margin: 14px 0 10px;
  overflow-x: auto;
}
.lc-body {
  padding: 16px;
}
.lc-list {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.lc-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface);
}
.lc-row-main {
  display: grid;
  flex: 1;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
}
button.lc-row-main {
  cursor: pointer;
}
.lc-row-main small {
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.lc-row-side {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}
.lc-chip {
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--subtle);
  color: var(--text);
  font-size: 11px;
  font-style: normal;
  font-weight: 600;
}
.lc-chip.is-ok {
  background: var(--mint);
  color: var(--mint-ink);
}
.lc-chip.is-warn {
  background: var(--sun);
  color: var(--sun-ink);
}
.lc-empty {
  display: grid;
  justify-items: start;
  gap: 8px;
  padding: 8px 0;
}
.lc-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 180px), 1fr));
  gap: 10px;
}
.lc-kpi {
  display: grid;
  gap: 2px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface);
}
.lc-kpi small,
.lc-kpi span {
  color: var(--muted);
  font-size: 12px;
}
.lc-kpi strong {
  font-size: 20px;
}
.lc-sub {
  margin: 14px 0 6px;
  font-size: 13px;
}
.lc-note {
  margin: 0 0 8px;
  font-size: 13px;
}
.lc-files .office-files-pick {
  margin-top: 10px;
}
/* Cliente 360 do Jurídico (15/11/2026, J1–J7): situação, abas agrupadas,
   filtros, lote, linha do tempo, assessoria e relatório. Só tokens de base.css. */
.lc-chip.is-danger {
  background: var(--rose);
  color: var(--rose-ink);
}
.lc-status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 8px 0 0;
}
.lc-reason {
  padding: 2px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}
.lc-reason:hover {
  border-color: var(--line-2);
}
.lc-contact {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  margin: 8px 0 0;
  font-size: 13px;
}
.lc-contact a {
  color: var(--ink);
}
.lc-new {
  position: relative;
}
.lc-new > summary {
  list-style: none;
  cursor: pointer;
}
.lc-new > summary::-webkit-details-marker {
  display: none;
}
.lc-new > summary::before {
  content: none;
}
.lc-new > div {
  position: absolute;
  z-index: 20;
  right: 0;
  display: grid;
  min-width: 200px;
  margin-top: 6px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface);
  box-shadow: var(--shadow-pop);
}
.lc-new > div button {
  padding: 8px 10px;
  border: 0;
  border-radius: var(--r-xs);
  background: none;
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.lc-new > div button:hover,
.lc-new > div button:focus-visible {
  background: var(--subtle);
}
.lc-tabs {
  align-items: stretch;
}
.lc-page .lc-tabs {
  flex-wrap: wrap;
  overflow: visible;
}
.lc-info {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr));
  gap: 10px 16px;
  margin: 0;
}
.lc-info dt {
  color: var(--muted);
  font-size: 12px;
}
.lc-info dd {
  margin: 2px 0 0;
  color: var(--ink);
  overflow-wrap: anywhere;
}
.lc-more {
  position: relative;
  flex: none;
}
.lc-more > summary {
  display: flex;
  align-items: center;
  gap: 4px;
  height: 100%;
  padding: 10px 14px;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  font-weight: 700;
  list-style: none;
  cursor: pointer;
}
.lc-more > summary::-webkit-details-marker {
  display: none;
}
.lc-more > summary::before {
  content: none;
}
.lc-more > summary .icon {
  width: 14px;
  height: 14px;
}
.lc-more > summary.is-on {
  border-bottom-color: var(--ink);
  color: var(--ink);
}
.lc-more > div {
  position: absolute;
  z-index: 20;
  right: 0;
  display: grid;
  min-width: 210px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface);
  box-shadow: var(--shadow-pop);
}
.pc-tabs .lc-more > div button {
  padding: 8px 10px;
  border: 0;
  border-radius: var(--r-xs);
  text-align: left;
}
.pc-tabs .lc-more > div button:hover,
.pc-tabs .lc-more > div button.is-on {
  background: var(--subtle);
  color: var(--ink);
}
.lc-tab-group {
  display: flex;
  flex: none;
  align-items: center;
  padding: 0 4px 0 14px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.lc-tab-group:first-child {
  padding-left: 4px;
}
.lc-tab-select {
  display: none;
  margin: 14px 0 10px;
}
.lc-tab-select select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  background: var(--surface);
  font: inherit;
}
.lc-health {
  margin-bottom: 14px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface);
}
.lc-health-ok {
  background: var(--mint);
  color: var(--mint-ink);
}
.lc-health-warn {
  background: var(--sun);
  color: var(--sun-ink);
}
.lc-health-critical {
  background: var(--rose);
  color: var(--rose-ink);
}
.lc-health ul {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  margin: 6px 0 0;
  padding: 0;
  list-style: none;
}
.lc-health .text-button,
.lc-health .muted {
  color: inherit;
}
.lc-health p {
  margin: 4px 0 0;
}
.lc-split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 6px 16px;
}
.lc-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}
.lc-toolbar p {
  margin: 0;
  font-size: 13px;
}
.lc-toolbar select,
.lc-report-tools select {
  padding: 8px 12px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  background: var(--surface);
  font: inherit;
}
.lc-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}
.lc-filter {
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}
.lc-filter small {
  margin-left: 4px;
  color: var(--muted);
}
.lc-filter.is-on {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--on-ink);
}
.lc-filter.is-on small {
  color: inherit;
}
.lc-health-filter {
  margin: 12px 0 0;
}
.lc-pick {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
}
.lc-batch-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.lc-batch-label input {
  width: 120px;
  padding: 7px 10px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  font: inherit;
}
.lc-dates {
  flex-wrap: wrap;
  justify-content: flex-end;
}
.lc-dates small {
  color: var(--muted);
}
.lc-dates .neg {
  color: var(--rose-ink);
  font-weight: 700;
}
.lc-timeline {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}
.lc-timeline li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 10px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}
.lc-timeline li:last-child {
  border-bottom: 0;
}
.lc-timeline time {
  flex: none;
  width: 84px;
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.lc-tl-title {
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink);
  font: inherit;
  text-align: left;
}
button.lc-tl-title {
  cursor: pointer;
}
button.lc-tl-title:hover {
  text-decoration: underline;
}
.lc-timeline small {
  flex-basis: 100%;
  padding-left: 94px;
  color: var(--muted);
}
.lc-meter {
  display: block;
  overflow: hidden;
  height: 6px;
  margin: 6px 0 2px;
  border-radius: 999px;
  background: var(--subtle);
}
.lc-meter > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
}
.lc-meter > span.is-warn {
  background: var(--sun-ink);
}
.lc-meter > span.is-over {
  background: var(--rose-ink);
}
.lc-block + .lc-block {
  margin-top: 6px;
}
.lc-service-form[data-kind="monthly"] .lc-only-recurring,
.lc-service-form[data-kind="monthly"] .lc-only-oneoff,
.lc-service-form[data-kind="recurring"] .lc-only-monthly,
.lc-service-form[data-kind="recurring"] .lc-only-oneoff,
.lc-service-form[data-kind="oneoff"] .lc-only-monthly,
.lc-service-form[data-kind="oneoff"] .lc-only-recurring {
  display: none;
}
.lc-service-form fieldset.composer-segment {
  margin: 0 0 12px;
  padding: 0;
  border: 0;
}
.lc-service-actions {
  flex-wrap: wrap;
  gap: 8px;
}
.lc-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 12px;
  padding: 0;
  list-style: none;
  counter-reset: lc-step;
  color: var(--muted);
  font-size: 12px;
}
.lc-steps li {
  counter-increment: lc-step;
}
.lc-steps li::before {
  content: counter(lc-step) ". ";
  font-weight: 700;
}
.lc-steps li + li::before {
  content: "› " counter(lc-step) ". ";
}
.lc-deliv {
  display: grid;
  grid-template-columns: 1fr 84px minmax(0, 180px);
  gap: 6px;
  margin-bottom: 6px;
}
.lc-deliv input,
.lc-deliv select {
  width: 100%;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  background: var(--surface);
  font: inherit;
}
.lc-deliv label {
  display: flex;
  align-items: center;
  gap: 4px;
}
.lc-deliv small {
  color: var(--muted);
}
.lc-period {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 6px 0 12px;
}
.lc-warn {
  padding: 8px 12px;
  border-radius: var(--r-sm);
  background: var(--sun);
  color: var(--sun-ink);
  font-size: 13px;
}
.lc-service-actions > div {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}
.lc-plan-preview {
  display: grid;
  gap: 4px;
  margin: 8px 0 0;
  padding-left: 20px;
  font-size: 13px;
}
.lc-plan-preview small {
  display: block;
  color: var(--muted);
}
.lc-report-tools {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: 10px 14px;
  align-items: end;
  margin-bottom: 12px;
}
.lc-report-tools .field:has(textarea) {
  grid-column: 1 / -1;
}
.lc-report {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface);
}
.lc-report pre {
  margin: 0;
  font: inherit;
  font-size: 13px;
  line-height: 1.55;
  white-space: pre-wrap;
}
@media (max-width: 760px) {
  .lc-page .lc-tabs {
    display: none;
  }
  .lc-page .lc-tab-select {
    display: block;
  }
  .lc-deliv {
    grid-template-columns: 1fr 84px;
  }
  .lc-deliv select {
    grid-column: 1 / -1;
  }
  .lc-timeline small {
    padding-left: 0;
  }
}
@media print {
  .hub-rail,
  .topbar,
  .bottom-nav,
  .lc-tabs,
  .lc-tab-select,
  .lc-report-tools,
  .lc-status,
  .lc-actions,
  .lc-head-actions,
  .lc-crumb {
    display: none !important;
  }
}
@media (max-width: 600px) {
  .lc-row {
    flex-wrap: wrap;
  }
}
/* Configurações de sistema: marca, pessoas já cadastradas, excluir (15/11/2026). */
.ss-brand {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}
.ss-brand-preview {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  overflow: hidden;
  border: 1px solid var(--line-2);
  border-radius: var(--r);
  background: var(--subtle);
  color: var(--muted);
}
.ss-brand-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.ss-known {
  grid-column: 1 / -1;
  display: grid;
  gap: 6px;
}
.ss-known small {
  color: var(--muted);
}
.ss-known > div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.ss-known-chip {
  padding: 4px 10px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-size: 12px;
  cursor: pointer;
}
.ss-known-chip:hover,
.ss-known-chip:focus-visible {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.ss-danger {
  border-color: color-mix(in srgb, var(--danger) 30%, var(--line-2));
}
/* Configurações de sistema: criar, nome e cor, marca em 3 itens (15/11/2026). */
.ss-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.ss-head > div {
  flex: 1 1 260px;
}
.ss-create {
  display: none;
  gap: 8px;
  margin: 0 0 12px;
}
.ss-create.is-open {
  display: flex;
  flex-wrap: wrap;
}
.ss-create input {
  flex: 1 1 240px;
  min-width: 0;
}
.ss-name {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1.4fr) auto;
  gap: 10px;
  align-items: end;
}
.ss-color {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
}
.ss-color input[type="color"] {
  width: 42px;
  height: 36px;
  padding: 2px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-xs);
  background: var(--surface);
}
.ss-color-off {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
}
.ss-brands {
  display: grid;
  gap: 10px;
}
.ss-brand-text {
  display: grid;
  flex: 1 1 180px;
  min-width: 0;
}
.ss-brand-text small {
  color: var(--muted);
}
.ss-brand-preview.is-dark {
  background: var(--ink);
}
@media (max-width: 600px) {
  .ss-name {
    grid-template-columns: 1fr;
  }
}
/* Sistema: marca em quadradinho, visão do sistema e janela de criar (15/11/2026). */
.ss-face-logo {
  display: grid;
  place-items: center;
  flex: none;
  width: 34px;
  height: 34px;
  overflow: hidden;
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
}
.ss-face-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.ss-face-logo.is-initials {
  border-color: transparent;
  background: var(--sys, var(--accent));
  color: var(--on-accent);
}
.ss-face-logo.is-home {
  background: var(--subtle);
}
.ss-face-logo.is-home .icon {
  width: 18px;
  height: 18px;
}
.ss-face-logo.is-big {
  width: 64px;
  height: 64px;
  border-radius: var(--r-md);
  font-size: 22px;
}
.ss-view {
  padding: 0;
  overflow: hidden;
}
.ss-view > :not(.ss-hero) {
  margin-left: 18px;
  margin-right: 18px;
}
.ss-hero {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 14px;
  padding: 22px 18px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--sys) 16%, var(--surface)), var(--surface) 70%);
  border-bottom: 1px solid var(--line);
}
.ss-hero-text {
  display: grid;
  gap: 4px;
  min-width: 0;
}
.ss-hero-text small {
  color: var(--muted);
  font-size: 12px;
}
.ss-hero-text h2 {
  margin: 0;
  font-size: 22px;
}
.ss-hero-text p {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 2px 0 0;
}
.ss-tag {
  padding: 2px 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--sys) 14%, var(--surface));
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
}
.ss-tag.is-role {
  background: var(--ink);
  color: var(--on-ink);
}
.ss-by {
  color: var(--muted);
  font-size: 12px;
}
.ss-group {
  margin-bottom: 14px;
}
.ss-group h3 {
  margin: 0 0 8px;
  font-size: 14px;
}
.ss-group h3 small {
  color: var(--muted);
  font-weight: 500;
}
.ss-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.ss-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border: 1px solid var(--line-2);
  border-radius: var(--r);
  background: var(--surface);
  font-size: 13px;
}
.ss-chip .icon {
  width: 16px;
  height: 16px;
}
.ss-chip.is-edit {
  border-color: color-mix(in srgb, var(--accent) 35%, var(--line-2));
  background: var(--accent-soft);
}
.ss-chip.is-edit .icon {
  color: var(--accent);
}
.ss-chip.is-view .icon {
  color: var(--muted);
}
.ss-note {
  font-size: 12px;
}
.ss-view .ss-foot {
  padding-bottom: 18px;
}
.ss-system .ss-face-logo {
  width: 32px;
  height: 32px;
}
.ss-wizard {
  display: grid;
  gap: 14px;
}
.ss-wz-steps {
  display: flex;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
  overflow-x: auto;
}
.ss-wz-steps li {
  display: flex;
  flex: 1 0 auto;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}
.ss-wz-steps b {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--subtle);
  font-size: 12px;
}
.ss-wz-steps b .icon {
  width: 14px;
  height: 14px;
}
.ss-wz-steps .is-on {
  color: var(--ink);
  font-weight: 700;
}
.ss-wz-steps .is-on b {
  background: var(--ink);
  color: var(--on-ink);
}
.ss-wz-steps .is-done b {
  background: var(--accent);
  color: var(--on-accent);
}
.ss-wz-pane {
  display: grid;
  gap: 12px;
}
.ss-wz-modes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  border: 0;
}
.ss-wz-modes legend {
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 600;
}
.ss-wz-modes legend small {
  color: var(--muted);
  font-weight: 500;
}
.ss-wz-mode {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line-2);
  border-radius: var(--r);
  cursor: pointer;
}
.ss-wz-mode input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.ss-wz-mode:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.ss-wz-mode:has(input:focus-visible) {
  outline: 2px solid var(--accent);
}
.ss-wz-mode > .icon {
  flex: none;
  width: 22px;
  height: 22px;
}
.ss-wz-mode span {
  display: grid;
  gap: 2px;
}
.ss-wz-mode small {
  color: var(--muted);
}
.ss-wz-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--subtle);
}
.ss-wz-brand div {
  display: grid;
}
.ss-wz-brand small {
  color: var(--muted);
}
.ss-wz-logo {
  justify-self: start;
}
.ss-wz-add {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
}
.ss-wz-people {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.ss-wz-people li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: var(--r-xs);
}
.ss-wz-people li span {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ss-wz-people li small {
  color: var(--muted);
}
.ss-dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-right: 6px;
  border-radius: 50%;
  vertical-align: -1px;
}
@media (max-width: 600px) {
  .ss-wz-add {
    grid-template-columns: 1fr;
  }
  .ss-hero {
    flex-wrap: wrap;
  }
}
.ss-view > .ss-hero:last-child {
  margin-bottom: 0;
  border-bottom: 0;
}
/* Configurações de sistema › Exportar e importar dados (15/11/2026). */
.ss-export {
  display: grid;
  gap: 12px;
}
.ss-parts {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr));
  gap: 6px 14px;
  margin: 0;
  padding: 0;
  border: 0;
}
.ss-parts legend {
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 600;
}
.ss-parts label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  font-size: 13px;
}
.ss-export-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

/* Dashboard do cliente no Jurídico (15/11/2026): números do mês, demandas,
   providências, matriz de riscos, documentos, reuniões e resumo do mês. */
.lc-db {
  display: grid;
  gap: 16px;
}
.lc-db-status {
  margin: 0;
  padding: 4px 0 4px 14px;
  border-left: 3px solid var(--accent);
  color: var(--text);
  font-size: 14px;
}
.lc-db-status b {
  color: var(--ink);
}
.lc-db-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.lc-db-kpi {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  text-align: left;
  color: var(--ink);
}
.lc-db-kpi:hover {
  border-color: var(--line-2);
  box-shadow: var(--shadow-pop);
}
.lc-db-kpi > span:last-child {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.lc-db-kpi strong {
  font-size: 14px;
  font-weight: 700;
}
.lc-db-kpi b {
  font-size: 26px;
  font-weight: 800;
  line-height: 1.15;
}
.lc-db-kpi small,
.lc-db-kpi small span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--muted);
  font-size: 12px;
}
.lc-db-kpi small .icon {
  width: 14px;
  height: 14px;
}
.lc-db-up {
  color: var(--mint-ink) !important;
}
.lc-db-down {
  color: var(--rose-ink) !important;
}
.lc-db-ico {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  flex: none;
  border-radius: var(--r);
}
.lc-db-ico .icon {
  width: 24px;
  height: 24px;
}
.lc-db-ico.is-mint { background: var(--mint); color: var(--mint-ink); }
.lc-db-ico.is-sky { background: var(--sky); color: var(--sky-ink); }
.lc-db-ico.is-sun { background: var(--sun); color: var(--sun-ink); }
.lc-db-ico.is-rose { background: var(--rose); color: var(--rose-ink); }
.lc-db-row {
  display: grid;
  gap: 16px;
  align-items: start;
}
.lc-db-row.is-top {
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 1.05fr);
}
.lc-db-row.is-bottom {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.1fr);
}
.lc-db-panel {
  display: grid;
  gap: 10px;
  align-content: start;
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}
.lc-db-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.lc-db-head h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-size: 16px;
}
.lc-db-head h3 .icon {
  width: 20px;
  height: 20px;
}
.lc-db-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--mint-ink);
  font-size: 12.5px;
  font-weight: 700;
  white-space: nowrap;
}
.lc-db-link .icon {
  width: 15px;
  height: 15px;
}
.lc-db-info {
  color: var(--muted);
  cursor: help;
}
.lc-db-info .icon {
  width: 18px;
  height: 18px;
}
.lc-db-sub {
  margin: 0;
  color: var(--muted);
  font-size: 12.5px;
}
.lc-db-table-wrap {
  overflow-x: auto;
}
.lc-db-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 12.5px;
}
.lc-db-table th:nth-child(2) { width: 78px; }
.lc-db-table th:nth-child(3) { width: 118px; }
.lc-db-table th:nth-child(4) { width: 82px; }
.lc-db-table th {
  padding: 8px;
  background: var(--subtle);
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
  text-align: left;
  white-space: nowrap;
}
.lc-db-table th:first-child {
  border-radius: var(--r-xs) 0 0 var(--r-xs);
}
.lc-db-table th:last-child {
  border-radius: 0 var(--r-xs) var(--r-xs) 0;
}
.lc-db-table td {
  padding: 9px 8px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
.lc-db-table tr:last-child td {
  border-bottom: 0;
}
.lc-db-demand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  color: var(--ink);
}
.lc-db-demand .icon {
  width: 18px;
  height: 18px;
  flex: none;
  color: var(--muted);
}
.lc-db-demand:hover span {
  text-decoration: underline;
}
.lc-db-chip {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--subtle);
  color: var(--text);
  font-size: 11.5px;
  font-style: normal;
  font-weight: 600;
  white-space: nowrap;
}
.lc-db-chip .icon {
  width: 13px;
  height: 13px;
}
.lc-db-chip.is-ok { background: var(--mint); color: var(--mint-ink); }
.lc-db-chip.is-warn { background: var(--sun); color: var(--sun-ink); }
.lc-db-chip.is-info { background: var(--sky); color: var(--sky-ink); }
.lc-db-date {
  white-space: nowrap;
}
.lc-db-date .icon {
  width: 14px;
  height: 14px;
  margin-right: 6px;
  vertical-align: -2px;
  color: var(--muted);
}
.lc-db-list {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
}
.lc-db-list > li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}
.lc-db-list > li:first-child {
  border-top: 0;
}
.lc-db-check {
  width: 20px;
  height: 20px;
  flex: none;
  border: 1.5px solid var(--line-2);
  border-radius: 6px;
  background: var(--surface);
}
.lc-db-check:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.lc-db-prov-main,
.lc-db-list > li > span {
  display: grid;
  gap: 2px;
  flex: 1;
  min-width: 0;
  text-align: left;
}
.lc-db-prov-main strong,
.lc-db-list strong {
  color: var(--ink);
  font-size: 13px;
  overflow-wrap: anywhere;
}
.lc-db-list small {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}
.lc-db-list small .icon {
  width: 15px;
  height: 15px;
}
.lc-db-due {
  flex: none;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--subtle);
  color: var(--ink);
  font-size: 11.5px;
  font-style: normal;
  font-weight: 700;
}
.lc-db-due.is-late {
  background: var(--rose);
  color: var(--rose-ink);
}
.lc-db-matrix {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-rows: auto auto;
  gap: 4px 6px;
  align-items: center;
}
.lc-db-axis-title {
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
}
.lc-db-axis-title.is-y {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}
.lc-db-axis-title.is-x {
  grid-column: 2;
  text-align: center;
}
.lc-db-grid {
  display: grid;
  grid-template-columns: auto repeat(3, minmax(0, 1fr));
  gap: 3px;
}
.lc-db-axis-y,
.lc-db-axis-x {
  color: var(--muted);
  font-size: 11.5px;
  text-align: center;
}
.lc-db-axis-y {
  align-self: center;
  padding-right: 4px;
}
.lc-db-cell {
  display: grid;
  align-content: start;
  gap: 4px;
  min-height: 62px;
  padding: 6px;
  border-radius: 6px;
}
.lc-db-cell.is-baixo { background: color-mix(in srgb, var(--mint) 80%, var(--surface)); }
.lc-db-cell.is-medio { background: color-mix(in srgb, var(--sun) 80%, var(--surface)); }
.lc-db-cell.is-alto { background: color-mix(in srgb, var(--rose) 80%, var(--surface)); }
.lc-db-dot {
  display: flex;
  align-items: flex-start;
  gap: 5px;
  min-width: 0;
  color: var(--ink);
  font-size: 11px;
  line-height: 1.25;
  text-align: left;
}
.lc-db-dot i,
.lc-db-legend i {
  width: 9px;
  height: 9px;
  flex: none;
  margin-top: 2px;
  border-radius: 50%;
}
.lc-db-dot span {
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.lc-db-dot small {
  color: var(--text);
}
.lc-db-dot.is-baixo > i,
.lc-db-legend .is-baixo { background: var(--mint-ink); }
.lc-db-dot.is-medio > i,
.lc-db-legend .is-medio { background: var(--sun-ink); }
.lc-db-dot.is-alto > i,
.lc-db-legend .is-alto { background: var(--rose-ink); }
.lc-db-legend {
  display: flex;
  justify-content: center;
  gap: 18px;
  margin: 0;
  color: var(--text);
  font-size: 12px;
}
.lc-db-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.lc-db-legend i {
  margin: 0;
}
.lc-db-badge {
  display: grid;
  place-items: center;
  width: 38px;
  height: 30px;
  flex: none;
  border-radius: 8px;
  font-size: 10.5px;
  font-style: normal;
  font-weight: 800;
}
.lc-db-badge.is-pdf { background: var(--rose); color: var(--rose-ink); }
.lc-db-badge.is-doc { background: var(--sky); color: var(--sky-ink); }
.lc-db-badge.is-xls { background: var(--mint); color: var(--mint-ink); }
.lc-db-badge.is-img { background: var(--lilac); color: var(--lilac-ink); }
.lc-db-badge.is-arq { background: var(--subtle); color: var(--text); }
.lc-db-dl {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: none;
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--ink);
}
.lc-db-dl:hover {
  background: var(--hover);
}
.lc-db-dl .icon {
  width: 18px;
  height: 18px;
}
.lc-db-meet {
  padding: 12px !important;
  border: 1px solid var(--line) !important;
  border-radius: var(--r);
  margin-bottom: 8px;
}
.lc-db-day {
  display: grid;
  justify-items: center;
  width: 58px;
  flex: none;
  padding: 8px 4px;
  border-radius: var(--r-sm);
  background: var(--subtle);
  color: var(--text);
}
.lc-db-day small {
  font-size: 11px;
  font-weight: 700;
}
.lc-db-day b {
  color: var(--ink);
  font-size: 22px;
  line-height: 1.1;
}
.lc-db-sum {
  display: flex;
  gap: 12px;
  padding: 14px;
  border-radius: var(--r);
}
.lc-db-sum.is-ok { background: var(--mint); }
.lc-db-sum.is-warn { background: var(--sun); }
.lc-db-sum > span .icon {
  width: 24px;
  height: 24px;
}
.lc-db-sum.is-ok > span { color: var(--mint-ink); }
.lc-db-sum.is-warn > span { color: var(--sun-ink); }
.lc-db-sum strong {
  color: var(--ink);
  font-size: 14px;
}
.lc-db-sum ul,
.lc-db-sum p {
  margin: 6px 0 0;
  padding-left: 18px;
  color: var(--text);
  font-size: 12.5px;
}
.lc-db-sum p {
  padding-left: 0;
}
@media (max-width: 1280px) {
  .lc-db-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .lc-db-row.is-top,
  .lc-db-row.is-bottom {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .lc-db-row.is-top .lc-db-demands {
    grid-column: 1 / -1;
  }
}
@media (max-width: 760px) {
  .lc-db-kpis,
  .lc-db-row.is-top,
  .lc-db-row.is-bottom {
    grid-template-columns: minmax(0, 1fr);
  }
  .lc-db-kpi {
    padding: 14px;
  }
  /* No celular a tabela fica com Demanda, Status e Prazo. */
  .lc-db-table th:nth-child(2),
  .lc-db-table td:nth-child(2) {
    display: none;
  }
  .lc-db-table th:nth-child(3) { width: 104px; }
  .lc-db-table th:nth-child(4) { width: 72px; }
  .lc-db-date .icon {
    display: none;
  }
}

/* Tarefas do cliente agrupadas pelas etapas do quadro (15/11/2026). */
.lc-tt-sync {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
  padding: 10px 14px;
  border-radius: var(--r);
  background: var(--accent-soft);
  color: var(--text);
  font-size: 13px;
}
.lc-tt-sync > .icon {
  width: 18px;
  height: 18px;
  color: var(--ink);
}
.lc-tt-sync > span {
  flex: 1;
  min-width: 200px;
}
.lc-tt-sync b {
  color: var(--ink);
}
.lc-tt-sync.is-off {
  background: var(--sun);
  color: var(--sun-ink);
}
.lc-tt-group {
  margin-top: 14px;
}
.lc-tt-ghead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border-radius: var(--r-sm);
  background: var(--subtle);
}
.lc-tt-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
}
.lc-tt-toggle > .icon {
  width: 16px;
  height: 16px;
  color: var(--muted);
}
.lc-tt-bar {
  width: 4px;
  height: 18px;
  border-radius: 2px;
  background: var(--stage, var(--faint));
}
.lc-tt-toggle strong {
  font-size: 14px;
}
.lc-tt-count {
  min-width: 22px;
  padding: 1px 7px;
  border-radius: 6px;
  background: var(--lilac);
  color: var(--lilac-ink);
  font-size: 11.5px;
  font-weight: 700;
  text-align: center;
}
.lc-tt-wrap {
  overflow-x: auto;
}
.lc-tt {
  width: 100%;
  min-width: 900px;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 13px;
}
.lc-tt th {
  padding: 10px 10px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  text-align: left;
  white-space: nowrap;
}
.lc-tt th.tt-c-pick { width: 40px; }
.lc-tt th.tt-c-title { width: 27%; }
.lc-tt th.tt-c-client { width: 64px; }
.lc-tt th.tt-c-desc { width: 22%; }
.lc-tt th.tt-c-date { width: 132px; }
.lc-tt th.tt-c-type { width: 120px; }
.lc-tt th.tt-c-people { width: 104px; }
.lc-tt th.tt-c-prio { width: 100px; }
.lc-tt th.tt-c-more { width: 44px; }
.lc-tt td.tt-c-client { text-align: center; }
.lc-tt td {
  padding: 10px;
  border-bottom: 1px solid var(--line);
  border-left: 1px solid var(--line);
  vertical-align: middle;
}
.lc-tt td:first-child {
  border-left: 0;
}
.lc-tt tbody tr:hover {
  background: color-mix(in srgb, var(--hover) 55%, transparent);
}
.lc-tt .lc-tt-pick .lc-pick {
  margin: 0;
}
.lc-tt-title {
  color: var(--ink);
  font-weight: 700;
  text-align: left;
  overflow-wrap: anywhere;
}
.lc-tt-title:hover {
  text-decoration: underline;
}
.lc-tt tr.is-done .lc-tt-title {
  color: var(--muted);
  text-decoration: line-through;
}
.lc-tt-desc {
  color: var(--text);
  font-size: 12.5px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
td.lc-tt-desc {
  display: table-cell;
}
.lc-tt-date {
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
}
.lc-tt-date small {
  display: block;
  color: var(--muted);
  font-weight: 500;
}
.lc-tt-date.is-late,
.lc-tt-date.is-late small {
  color: var(--rose-ink);
}
.lc-tt-tag {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--subtle);
  color: var(--text);
  font-size: 11.5px;
  font-style: normal;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lc-tt-tag.is-lilac { background: var(--lilac); color: var(--lilac-ink); }
.lc-tt-tag.is-sky { background: var(--sky); color: var(--sky-ink); }
.lc-tt-tag.is-mint { background: var(--mint); color: var(--mint-ink); }
.lc-tt-tag.is-sun { background: var(--sun); color: var(--sun-ink); }
.lc-tt-tag.is-peach { background: var(--peach); color: var(--peach-ink); }
.lc-tt-tag.is-rose { background: var(--rose); color: var(--rose-ink); }
.lc-tt-people {
  display: inline-flex;
  align-items: center;
}
.lc-tt-people i {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  margin-left: -6px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--face, var(--lilac-ink)) 22%, var(--surface));
  box-shadow: 0 0 0 2px var(--surface);
  color: var(--ink);
  font-size: 10px;
  font-style: normal;
  font-weight: 700;
}
.lc-tt-people i:first-child {
  margin-left: 0;
}
.lc-tt-people b {
  margin-left: 4px;
  color: var(--muted);
  font-size: 11px;
}
.lc-tt-more {
  width: 30px;
  height: 30px;
}
.lc-tt-empty {
  margin: 8px 12px;
  color: var(--muted);
  font-size: 12.5px;
}

/* Tarefas do cliente: subtarefas em cascata e edição na linha (15/11/2026). */
.lc-tt-name {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.lc-tt-name.is-sub {
  padding-left: 18px;
}
.lc-tt-branch {
  width: 12px;
  height: 14px;
  flex: none;
  margin-top: -8px;
  border-left: 1.5px solid var(--line-2);
  border-bottom: 1.5px solid var(--line-2);
  border-bottom-left-radius: 5px;
}
.lc-tt tr.is-sub td {
  background: color-mix(in srgb, var(--subtle) 55%, transparent);
}
.lc-tt tr.is-sub .lc-tt-title {
  font-weight: 600;
}
.lc-tt-kids {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  flex: none;
  padding: 1px 5px 1px 2px;
  border-radius: 6px;
  background: var(--subtle);
  color: var(--text);
  font-size: 11px;
}
.lc-tt-kids .icon {
  width: 14px;
  height: 14px;
}
.lc-tt-kids:hover {
  background: var(--hover);
}
/* Campos que parecem texto até passar o mouse ou focar. */
.lc-tt .lc-tt-in,
.lc-tt input.lc-tt-in:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="file"]) {
  width: 100%;
  min-height: 30px;
  padding: 4px 6px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 12.5px;
  box-shadow: none;
}
.lc-tt .lc-tt-in:hover {
  border-color: var(--line-2);
  background: var(--surface);
}
.lc-tt .lc-tt-in:focus {
  border-color: var(--accent);
  background: var(--surface);
  outline: none;
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.lc-tt textarea.lc-tt-area {
  min-height: 30px;
  height: 30px;
  resize: none;
  overflow: hidden;
  line-height: 1.35;
}
.lc-tt textarea.lc-tt-area:focus {
  height: 72px;
  overflow: auto;
}
.lc-tt textarea.lc-tt-area::placeholder,
.lc-tt input.lc-tt-dt:not([value]),
.lc-tt input.lc-tt-dt[value=""] {
  color: var(--faint);
}
.lc-tt input.lc-tt-dt:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="file"]) {
  font-weight: 600;
  color: var(--ink);
}
.lc-tt-date.is-late input.lc-tt-dt:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="file"]) {
  color: var(--rose-ink);
}
.lc-tt td.lc-tt-desc {
  overflow: visible;
}
.lc-tt select.lc-tt-sel {
  width: auto;
  max-width: 100%;
  min-height: 26px;
  padding: 2px 22px 2px 8px;
  background-position: right 4px center;
  background-size: 13px;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
}
.lc-tt select.lc-tt-sel.lc-tt-tag {
  border-radius: 6px;
}
.lc-tt select.lc-tt-sel:not(.is-lilac):not(.is-sky):not(.is-mint):not(.is-sun):not(.is-peach):not(.is-rose) {
  color: var(--muted);
}
.lc-tt-who {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.lc-tt-assign {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 1.5px dashed var(--line-2);
  border-radius: 50%;
  color: var(--muted);
  opacity: 0;
}
.lc-tt tr:hover .lc-tt-assign,
.lc-tt-assign:focus-within {
  opacity: 1;
}
.lc-tt-assign .icon {
  width: 13px;
  height: 13px;
}
.lc-tt-assign select {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  padding: 0;
  opacity: 0;
  cursor: pointer;
}
@media (hover: none) {
  .lc-tt-assign {
    opacity: 1;
  }
}
.lc-tt input.lc-tt-dt[value=""]:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="file"]):not(:focus) {
  color: var(--faint);
  font-weight: 500;
}

/* Coluna Cliente na tabela de tarefas (15/11/2026). */
.lc-tt-client {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  min-width: 0;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink);
}
.lc-tt-client i {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  flex: none;
  border-radius: 6px;
  background: var(--sky);
  color: var(--sky-ink);
  font-size: 9.5px;
  font-style: normal;
  font-weight: 800;
}
.lc-tt-client span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Tabela compartilhada (Quadros › Lista e Clientes › Tarefas): concluir,
   arrastar entre etapas e a lista do quadro (15/11/2026). */
.lc-tt .tt-done {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  flex: none;
  color: var(--muted);
}
.lc-tt .tt-done .icon {
  width: 18px;
  height: 18px;
}
.lc-tt .tt-done:hover {
  color: var(--mint-ink);
}
.lc-tt tr.is-done .tt-done {
  color: var(--mint-ink);
}
.lc-tt tr.tt-row[data-drag-id] {
  cursor: grab;
}
.lc-tt tr.tt-row.drag-source {
  opacity: 0.45;
}
.lc-tt-group.drag-over {
  border-radius: var(--r);
  outline: 2px dashed var(--accent);
  outline-offset: 4px;
}
.lc-tt-group.drag-over .lc-tt-ghead {
  background: var(--accent-soft);
}
.demand-list.tt-list {
  display: grid;
  gap: 4px;
  padding: 12px 16px 16px;
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--line);
}
.demand-list.tt-list .lc-tt-group:first-child {
  margin-top: 0;
}

/* Tarefas: barra com filtros e Lista/Quadro, modo quadro e celular
   (15/11/2026). */
.tt-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.tt-toolbar > .lc-filters {
  flex: 1;
  margin: 0;
}
.tt-view {
  display: inline-flex;
  flex: none;
  padding: 3px;
  border-radius: 999px;
  background: var(--subtle);
}
.tt-view button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}
.tt-view button .icon {
  width: 16px;
  height: 16px;
}
.tt-view button.is-on {
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow);
}
.tt-board {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(250px, 1fr);
  gap: 12px;
  margin-top: 14px;
  overflow-x: auto;
  padding-bottom: 8px;
}
.tt-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 160px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--subtle);
}
.tt-col.drag-over {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.tt-col > header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 2px 2px 4px;
}
.tt-col > header strong {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13.5px;
}
.tt-col > header .icon-button {
  width: 28px;
  height: 28px;
}
.tt-col-body {
  display: grid;
  gap: 8px;
}
.tt-card {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface);
  box-shadow: var(--shadow);
  cursor: grab;
}
.tt-card.drag-source {
  opacity: 0.45;
}
.tt-card > header {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.tt-card > header .lc-tt-title {
  flex: 1;
  min-width: 0;
  font-size: 13.5px;
}
.tt-card.is-done .lc-tt-title {
  color: var(--muted);
  text-decoration: line-through;
}
.tt-card p {
  margin: 0;
  color: var(--text);
  font-size: 12.5px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.tt-card > footer {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}
.tt-card-due,
.tt-card-kids {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: 6px;
  background: var(--subtle);
  color: var(--text);
  font-size: 11.5px;
  font-weight: 600;
}
.tt-card-due .icon,
.tt-card-kids .icon {
  width: 13px;
  height: 13px;
}
.tt-card-due.is-late {
  background: var(--rose);
  color: var(--rose-ink);
}
.tt-card-people {
  margin-left: auto;
}
@media (max-width: 760px) {
  .lc-tt-sync {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
  }
  .lc-tt-sync > span {
    min-width: 0;
  }
  .lc-tt-sync > .subtle-button,
  .lc-tt-sync > .text-button,
  .lc-tt-sync > .dark-button {
    grid-column: 1 / -1;
    justify-self: start;
  }
  .tt-toolbar {
    flex-direction: column-reverse;
  }
  .tt-board {
    grid-auto-columns: 84%;
    scroll-snap-type: x mandatory;
  }
  .tt-col {
    scroll-snap-align: start;
  }
  /* Tabela vira cartões: título, cliente, prazo, pessoas e prioridade. */
  .lc-tt-wrap {
    overflow: visible;
  }
  .lc-tt,
  .lc-tt tbody {
    display: block;
    width: 100%;
    min-width: 0;
  }
  .lc-tt thead {
    display: none;
  }
  .lc-tt tr {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 8px;
    padding: 10px 8px;
    border-bottom: 1px solid var(--line);
  }
  .lc-tt tr.is-sub {
    padding-left: 20px;
  }
  .lc-tt td {
    display: block;
    padding: 0;
    border: 0;
    background: none;
  }
  .lc-tt tr.is-sub td {
    background: none;
  }
  .lc-tt td.lc-tt-pick {
    order: 0;
  }
  .lc-tt td.tt-c-title {
    order: 1;
    flex: 1 1 60%;
    min-width: 0;
  }
  .lc-tt td.tt-c-more {
    order: 2;
  }
  .lc-tt td.tt-c-client {
    order: 3;
    margin-left: 28px;
  }
  .lc-tt td.lc-tt-date {
    order: 4;
  }
  .lc-tt td.tt-c-people {
    order: 5;
  }
  .lc-tt td.tt-c-prio {
    order: 6;
  }
  .lc-tt td.lc-tt-desc,
  .lc-tt td.tt-c-type {
    display: none;
  }
  .lc-tt input.lc-tt-dt:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="file"]) {
    width: 132px;
  }
  .lc-tt-date small {
    display: inline;
    margin-left: 4px;
  }
  .lc-tt-assign {
    opacity: 1;
  }
  .demand-list.tt-list {
    padding: 8px;
  }
}
@media (max-width: 760px) {
  .lc-tt td.tt-c-prio:has(.is-empty) {
    display: none;
  }
}

/* Dashboard do cliente montável (15/11/2026, segundo modelo do usuário):
   coluna do perfil à esquerda, números e abas à direita; cada caixa é um
   widget que a pessoa adiciona, tira, move e troca de coluna. */
.cd-page .lc-tabs {
  display: none;
}
.cd-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 48px;
}
.cd-title h1 {
  margin: 0;
  color: var(--ink);
  font-size: 19px;
  white-space: nowrap;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.cd-w {
  position: relative;
  min-width: 0;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.cd-w.is-bare {
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
}
.cd-w-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}
.cd-w-head h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: var(--ink);
  font-size: 15px;
  font-weight: 700;
}
.cd-w-head h3 .icon {
  width: 18px;
  height: 18px;
  color: var(--muted);
}
.cd-w-tools {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex: none;
}
.cd-w-float {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
}
.cd-w.is-bare > .cd-w-float {
  top: -12px;
  right: -8px;
}
/* Menu ⋯ de cada widget: discreto até o mouse ou o foco chegar. */
.cd-wmenu {
  position: relative;
}
.cd-wmenu > summary {
  list-style: none;
  width: 30px;
  height: 30px;
  opacity: 0.45;
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
}
.cd-wmenu > summary::-webkit-details-marker {
  display: none;
}
.cd-wmenu > summary::before,
.cd-more > summary::before {
  content: none;
}
.cd-wmenu > summary:hover {
  background: var(--hover);
}
.cd-w:hover .cd-wmenu > summary,
.cd-wmenu > summary:focus-visible,
.cd-wmenu[open] > summary {
  opacity: 1;
}
.cd-wmenu > div,
.cd-more > div {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 30;
  display: grid;
  min-width: 220px;
  padding: 6px;
  border: 1px solid var(--line-2);
  border-radius: var(--r);
  background: var(--surface);
  box-shadow: var(--shadow-pop);
}
.cd-wmenu [role="menuitem"],
.cd-more [role="menuitem"] {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: var(--r-xs);
  color: var(--text);
  font-size: 13px;
  text-align: left;
}
.cd-wmenu [role="menuitem"]:hover,
.cd-more [role="menuitem"]:hover {
  background: var(--hover);
  color: var(--ink);
}
.cd-wmenu [role="menuitem"] .icon {
  width: 16px;
  height: 16px;
}
.cd-more {
  position: relative;
}
.cd-more > summary {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  cursor: pointer;
}
.cd-more > summary::-webkit-details-marker {
  display: none;
}
.cd-more > summary .icon {
  width: 14px;
  height: 14px;
}
.cd-areas > summary {
  white-space: nowrap;
  padding: 7px 12px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
}

/* Perfil do cliente. */
.cd-pf {
  display: grid;
  justify-items: center;
  gap: 6px;
  text-align: center;
}
.cd-pf-face {
  position: relative;
  margin: 4px 0 6px;
}
.cd-pf-face > img,
.cd-pf-face > span {
  display: grid;
  place-items: center;
  width: 108px;
  height: 108px;
  border: 4px solid var(--surface);
  border-radius: 999px;
  background: var(--lilac);
  color: var(--lilac-ink);
  font-size: 34px;
  font-weight: 800;
  object-fit: cover;
  box-shadow: var(--shadow-pop);
}
.cd-pf-pen {
  position: absolute;
  top: 2px;
  right: -2px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-pop);
}
.cd-pf-pen .icon {
  width: 15px;
  height: 15px;
}
.cd-pf h2 {
  margin: 0;
  color: var(--ink);
  font-size: 20px;
  font-weight: 800;
  line-height: 1.2;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}
.cd-pf-doc {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}
.cd-pf-status {
  padding: 3px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.cd-pf-status.is-ok { background: var(--mint); color: var(--mint-ink); }
.cd-pf-status.is-warn { background: var(--sun); color: var(--sun-ink); }
.cd-pf-status.is-critical { background: var(--rose); color: var(--rose-ink); }
.cd-pf-fields {
  display: grid;
  gap: 10px;
  width: 100%;
  margin-top: 10px;
  text-align: left;
}
.cd-pf-field {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--subtle);
}
.cd-pf-field small {
  color: var(--muted);
  font-size: 11px;
}
.cd-pf-field b {
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  overflow-wrap: anywhere;
}
.cd-pf-field a {
  color: inherit;
}
.cd-pf-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--subtle);
}
.cd-pf-pair .cd-pf-field {
  border: 0;
  background: none;
}
.cd-pf-actions {
  display: grid;
  justify-items: center;
  gap: 10px;
  width: 100%;
  margin-top: 12px;
}
.cd-pf-actions > span {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}
.cd-pf-more {
  padding: 11px 22px;
  border-radius: var(--r);
  background: var(--accent-soft);
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.cd-pf-more:hover {
  background: color-mix(in srgb, var(--accent) 22%, transparent);
}
.cd-pf-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--sky);
  color: var(--sky-ink);
  font-size: 12px;
  font-weight: 700;
}
.cd-pf-pill .icon {
  width: 14px;
  height: 14px;
}
.cd-pf-actions .lc-new > summary {
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 12px;
}

/* Números do mês. */
.cd-tiles,
.cd-inds {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px;
}
.cd-tile {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
  box-shadow: var(--shadow);
  text-align: left;
}
.cd-tile:hover,
.cd-ind:hover {
  box-shadow: var(--shadow-pop);
}
.cd-tile > span:last-child {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.cd-tile strong {
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
}
.cd-tile b {
  color: var(--ink);
  font-size: 22px;
  font-weight: 800;
  line-height: 1.1;
}
.cd-tile small,
.cd-tile small span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--muted);
  font-size: 11px;
}
.cd-tile small .icon {
  width: 13px;
  height: 13px;
  flex: none;
}
.cd-tile-ico {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: none;
  border-radius: var(--r);
}
.cd-tile-ico .icon {
  width: 20px;
  height: 20px;
}
.cd-tile-ico.is-mint { background: var(--mint); color: var(--mint-ink); }
.cd-tile-ico.is-sky { background: var(--sky); color: var(--sky-ink); }
.cd-tile-ico.is-rose { background: var(--rose); color: var(--rose-ink); }

/* Indicadores com gráfico. */
.cd-ind {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  background: var(--surface);
  box-shadow: var(--shadow);
  text-align: left;
  --tone: var(--sky-ink);
  --tone-soft: var(--sky-2);
}
.cd-ind.is-lilac { --tone: var(--lilac-ink); --tone-soft: var(--lilac-2); }
.cd-ind.is-peach { --tone: var(--peach-ink); --tone-soft: var(--peach-2); }
.cd-ind-main {
  display: grid;
  gap: 4px;
  min-width: 0;
}
.cd-ind-main b {
  color: var(--tone);
  font-size: 34px;
  font-weight: 700;
  line-height: 1;
}
.cd-ind-main strong {
  color: var(--ink);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.03em;
  line-height: 1.3;
  text-transform: uppercase;
}
.cd-ind-main small {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}
.cd-ind-arrow {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: var(--muted);
  color: var(--surface);
}
.cd-ind-arrow .icon {
  width: 12px;
  height: 12px;
  transform: rotate(-45deg);
}
.cd-ind-bars {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  width: 76px;
  height: 64px;
  flex: none;
}
.cd-ind-bars i {
  flex: 1;
  min-height: 4px;
  border-radius: 4px 4px 0 0;
  background: var(--tone-soft);
}
.cd-ind-bars i.is-now {
  background: var(--tone);
}

/* Abas dentro do widget. */
.cd-wtabs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 18px;
  min-width: 0;
}
.cd-wtabs > button,
.cd-wtabs .cd-more > summary {
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.cd-wtabs > button:hover,
.cd-wtabs .cd-more > summary:hover {
  color: var(--ink);
}
.cd-wtabs > button.is-on {
  border-color: var(--ink);
  color: var(--ink);
}
.cd-wtabs .cd-more > div {
  left: 0;
  right: auto;
}

/* Busca e filtros das demandas. */
.cd-dt-tools,
.cd-fin-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
.cd-search {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 0 1 220px;
  padding: 0 10px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--muted);
}
.cd-search .icon {
  width: 15px;
  height: 15px;
  flex: none;
}
.cd-search input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="file"]) {
  width: 100%;
  min-height: 34px;
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
  font-size: 12px;
}
.cd-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.cd-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 10px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
}
.cd-chip small {
  color: var(--muted);
  font-size: 11px;
}
.cd-chip .icon {
  width: 14px;
  height: 14px;
}
.cd-chip.is-on {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--on-ink);
}
.cd-chip.is-on small {
  color: inherit;
  opacity: 0.75;
}

/* Tabela com o dia à esquerda. */
.cd-dt-wrap {
  overflow-x: auto;
}
.cd-dt {
  min-width: 640px;
  --cd-cols: minmax(100px, 1.3fr) 44px minmax(80px, 1.3fr) 64px 96px 56px 72px;
}
.cd-dt-head,
.cd-dt-row {
  display: grid;
  grid-template-columns: var(--cd-cols);
  align-items: center;
  gap: 8px;
}
.cd-dt-head {
  padding: 0 9px 8px 73px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}
.cd-dt-head > span:first-child {
  display: none;
}
.cd-dt-group {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--line-2);
}
.cd-dt-day {
  display: grid;
  align-content: start;
  color: var(--ink);
}
.cd-dt-day b {
  font-size: 22px;
  font-weight: 800;
  line-height: 1;
}
.cd-dt-day small {
  color: var(--muted);
  font-size: 12px;
}
.cd-dt-rows {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.cd-dt-row {
  min-height: 44px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  font-size: 12px;
}
.cd-dt.is-acts {
  --cd-cols: minmax(100px, 1.3fr) 44px minmax(80px, 1.3fr) 64px 96px 72px;
}
.cd-dt-row > span {
  min-width: 0;
}
.cd-dt-title button {
  max-width: 100%;
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  text-align: left;
}
.cd-dt-title button:hover {
  text-decoration: underline;
}
.cd-dt-desc {
  color: var(--text);
  line-height: 1.35;
}
.cd-dt-date {
  color: var(--ink);
  font-weight: 600;
}
.cd-dt-date.is-late {
  color: var(--danger-ink);
}
.cd-mono {
  font-variant-numeric: tabular-nums;
}
.cd-fin-act {
  width: 44px;
  text-align: right;
}
.cd-select select {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: var(--surface);
  font-size: 12px;
}

/* Adicionar widget. */
.cd-add {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 120px;
  border: 1px dashed var(--line-2);
  border-radius: var(--r-xl);
  background: var(--surface);
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.cd-add .icon {
  width: 22px;
  height: 22px;
  padding: 3px;
  border: 1.5px solid currentColor;
  border-radius: 999px;
}
.cd-add:hover {
  border-color: var(--ink);
}
.cd-wpick ul {
  display: grid;
  gap: 8px;
  margin: 12px 0;
  padding: 0;
  list-style: none;
}
.cd-wpick li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--r);
}
.cd-wpick li > span:nth-child(2) {
  display: grid;
  flex: 1;
  gap: 2px;
  min-width: 0;
}
.cd-wpick li strong {
  color: var(--ink);
  font-size: 14px;
}
.cd-wpick li small {
  color: var(--muted);
  font-size: 12px;
}
.cd-wpick-ico {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: none;
  border-radius: var(--r-sm);
  background: var(--subtle);
  color: var(--ink);
}
.cd-wpick-ico .icon {
  width: 18px;
  height: 18px;
}
.cd-wpick li button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: none;
}
.cd-wpick li button .icon {
  width: 15px;
  height: 15px;
}
.cd-wpick-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

@media (max-width: 1180px) {
  .cd-tiles,
  .cd-inds {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }
}
@media (max-width: 760px) {
  .cd-title h1 {
    font-size: 17px;
  }
  /* No celular os números passam de lado (deslizar). */
  .cd-tiles,
  .cd-inds {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: 78%;
    overflow-x: auto;
    padding: 2px 2px 6px;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }
  .cd-tile,
  .cd-ind {
    scroll-snap-align: start;
  }
  .cd-w.is-bare > .cd-w-float {
    top: -14px;
    right: 0;
  }
  .cd-w {
    padding: 16px;
    border-radius: var(--r-lg);
  }
  .cd-wmenu > summary {
    opacity: 1;
  }
  .cd-search {
    flex: 1 1 100%;
  }
  .cd-wtabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 14px;
    scrollbar-width: none;
  }
  .cd-wtabs > button {
    flex: none;
  }
  .cd-wtabs .cd-more {
    position: static;
  }
  .cd-add {
    min-height: 72px;
  }
  .cd-wpick li {
    flex-wrap: wrap;
  }
}
/* Tabelas de cobranças e processos do painel: colunas pelo conteúdo. */
.lc-db-table.cd-fin,
.lc-db-table.cd-proc {
  table-layout: auto;
}
.lc-db-table.cd-fin th:nth-child(n),
.lc-db-table.cd-proc th:nth-child(n) {
  width: auto;
}
.lc-db-table.cd-fin td:nth-child(3),
.lc-db-table.cd-fin td:nth-child(1) {
  white-space: nowrap;
}
.lc-db-table.cd-fin td:nth-child(2) {
  color: var(--ink);
  font-weight: 600;
}
@media (max-width: 760px) {
  .lc-db-table.cd-fin th:nth-child(2),
  .lc-db-table.cd-fin td:nth-child(2) {
    display: table-cell;
  }
  .lc-db-table.cd-fin th:nth-child(1),
  .lc-db-table.cd-fin td:nth-child(1) {
    display: none;
  }
}
/* Menus fechados não ocupam espaço (evitava rolagem lateral no celular). */
.cd-wmenu:not([open]) > div,
.cd-more:not([open]) > div {
  display: none;
}
@media (max-width: 760px) {
  /* No celular a tabela do painel fica com Tarefa, Prazo e Tipo. */
  .cd-dt,
  .cd-dt.is-acts {
    min-width: 0;
    --cd-cols: minmax(0, 1fr) 62px 96px;
  }
  .cd-dt-head > :nth-child(3),
  .cd-dt-head > :nth-child(4),
  .cd-dt-head > :nth-child(7),
  .cd-dt-head > :nth-child(8),
  .cd-dt-row > :nth-child(2),
  .cd-dt-row > :nth-child(3),
  .cd-dt-row > :nth-child(6),
  .cd-dt-row > :nth-child(7) {
    display: none;
  }
  .cd-dt-group {
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 8px;
  }
  .cd-dt-head {
    padding-left: 55px;
  }
}

/* Painel em grade de 6 colunas, como o Início (15/11/2026): cada caixa ocupa
   as colunas escolhidas e as linhas de 4 px da sua altura; as caixas sobem
   para os espaços livres. No modo de edição: puxador, X e bordas. */
.cd-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  grid-auto-rows: 4px;
  grid-auto-flow: row dense;
  column-gap: 16px;
  row-gap: 0;
  margin-top: 12px;
}
.cd-item {
  position: relative;
  min-width: 0;
  grid-column: span var(--span, 2);
  grid-row-end: span var(--rows, 60);
}
.cd-item > .cd-w,
.cd-item > .cd-title,
.cd-item > .cd-add {
  box-sizing: border-box;
}
.cd-cell {
  position: relative;
}
.cd-item.has-h .cd-cell > .cd-w {
  min-height: var(--h);
}
.cd-item-add > .cd-add {
  width: 100%;
}
.cd-title-tools {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.cd-edit {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.cd-edit .icon {
  width: 14px;
  height: 14px;
}
.cd-edit.is-on {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--on-ink);
}
.cd-locked {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  color: var(--muted);
}
.cd-locked .icon {
  width: 16px;
  height: 16px;
}
.cd-item.is-dragging {
  z-index: 20;
  opacity: 0.92;
  cursor: grabbing;
}
.cd-item.is-dragging .cd-w {
  box-shadow: var(--shadow-lift);
}
.cd-edit-hint {
  margin: 8px 0 0;
  font-size: 12px;
}
.cd-tview {
  margin-bottom: 10px;
}
.cd-board-go .icon {
  width: 17px;
  height: 17px;
}
.cd-wtabs .cd-more > summary.is-on {
  border-color: var(--ink);
  color: var(--ink);
}
/* Subtarefas abaixo da principal. */
.cd-dt-row.is-sub {
  margin-left: 22px;
  border-style: dashed;
}
.cd-dt-row.is-sub .cd-dt-title {
  display: flex;
  align-items: center;
  gap: 6px;
}
.cd-dt-row.is-sub .cd-dt-title button {
  font-weight: 600;
}
.cd-dt-row.is-done .cd-dt-title button {
  color: var(--muted);
  text-decoration: line-through;
}
.cd-dt-kids {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-left: 6px;
  color: var(--muted);
  font-size: 11px;
  vertical-align: middle;
}
.cd-dt-kids .icon {
  width: 12px;
  height: 12px;
}
.cd-area {
  min-width: 0;
}
.cd-loading {
  margin: 24px 0;
}
/* Janela de widgets: áreas e a parte do administrador. */
.cd-wpick h3 {
  margin: 14px 0 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}
.cd-wpick ul {
  max-height: none;
}
.cd-wpick small b {
  color: var(--mint-ink);
}
.cd-wpick-admin {
  margin-top: 16px;
  padding: 14px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-md);
  background: var(--subtle);
}
.cd-wpick-admin h3 {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 8px;
}
.cd-wpick-admin h3 .icon {
  width: 16px;
  height: 16px;
}
.cd-wpick-admin h3 small {
  color: var(--muted);
  font-weight: 500;
}
.cd-wpick-admin fieldset {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  border: 0;
}
.cd-wpick-admin label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface);
  cursor: pointer;
}
.cd-wpick-admin label > span {
  display: grid;
  gap: 2px;
}
.cd-wpick-admin label strong {
  color: var(--ink);
  font-size: 13px;
}
.cd-wpick-admin label small {
  color: var(--muted);
  font-size: 12px;
}
.cd-wpick-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 6px;
}
.cd-wpick-admin p {
  margin: 0;
  font-size: 12px;
}
@media (max-width: 1100px) {
  .cd-item[data-span="1"],
  .cd-item[data-span="2"],
  .cd-item[data-span="3"] {
    grid-column: span 3;
  }
  .cd-item[data-span="4"],
  .cd-item[data-span="5"],
  .cd-item[data-span="6"] {
    grid-column: span 6;
  }
}
@media (max-width: 760px) {
  .cd-grid {
    grid-template-columns: minmax(0, 1fr);
    grid-auto-rows: auto;
    grid-auto-flow: row;
    row-gap: 16px;
  }
  .cd-item,
  .cd-item[data-span] {
    grid-column: auto;
    grid-row-end: auto;
  }
  .cd-item.has-h .cd-cell > .cd-w {
    height: auto;
  }
  .cd-wmenu .is-size {
    display: none;
  }
  .cd-edit span {
    display: none;
  }
}

/* Edição do painel com as alças do Início (lx-grip, lx-rs) e o X. */
.cd-grid.is-editing .lx-grip {
  display: grid;
}
.cd-grid.is-editing .lx-rs {
  display: block;
}
.cd-grid.is-editing .cd-cell > .cd-w {
  outline: 2px dashed color-mix(in srgb, var(--accent) 45%, transparent);
  outline-offset: 3px;
}
.cd-x {
  position: absolute;
  top: -10px;
  right: -10px;
  z-index: 6;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-pop);
}
.cd-x .icon {
  width: 15px;
  height: 15px;
}
/* Barra de edição (mesmo visual da .lx-bar do Início, com classe própria
   porque o editor do Início remove as .lx-bar ao redesenhar). */
.cd-bar {
  position: fixed;
  left: 50%;
  bottom: 18px;
  z-index: 90;
  display: flex;
  align-items: center;
  gap: 10px;
  width: min(900px, calc(100% - 32px));
  padding: 10px 12px 10px 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow-pop);
  transform: translateX(-50%);
  font-size: 13px;
}
.cd-bar > .icon {
  flex: none;
  color: var(--accent);
}
.cd-bar > span {
  flex: 1;
  min-width: 0;
  color: var(--text);
}
.cd-bar button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: none;
}
.cd-bar button .icon {
  width: 15px;
  height: 15px;
}
.cd-grid.is-editing {
  padding-bottom: 90px;
}
@media (max-width: 760px) {
  .cd-bar {
    flex-wrap: wrap;
    bottom: calc(var(--bottom-nav, 0px) + 10px);
  }
  .cd-bar > span {
    flex: 1 1 100%;
    order: -1;
  }
}
/* Tarefas: Visão geral e Agenda. */
.cd-tview {
  flex-wrap: wrap;
}
.cd-ov {
  display: grid;
  gap: 14px;
}
.cd-ov-nums {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 10px;
}
.cd-ov-num {
  display: grid;
  gap: 2px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--subtle);
}
.cd-ov-num b {
  color: var(--ink);
  font-size: 22px;
  font-weight: 800;
  line-height: 1.1;
}
.cd-ov-num small {
  color: var(--muted);
  font-size: 12px;
}
.cd-ov-num.is-late b {
  color: var(--danger-ink);
}
.cd-ov-num.is-ok b {
  color: var(--mint-ink);
}
.cd-ov-lanes {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.cd-ov-lanes li {
  display: grid;
  grid-template-columns: minmax(90px, 160px) minmax(0, 1fr) 32px;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text);
}
.cd-ov-lanes b {
  color: var(--ink);
  text-align: right;
}
.cd-ov-bar {
  height: 8px;
  border-radius: 99px;
  background: var(--subtle);
  overflow: hidden;
}
.cd-ov-bar i {
  display: block;
  height: 100%;
  min-width: 2px;
  border-radius: 99px;
  background: var(--accent);
}
.cd-ag {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}
.cd-ag-day {
  display: grid;
  align-content: start;
  gap: 6px;
  min-height: 120px;
  min-width: 0;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--r);
}
.cd-ag-day.is-today {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.cd-ag-day header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}
.cd-ag-day header small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}
.cd-ag-day header b {
  color: var(--ink);
  font-size: 18px;
  font-weight: 800;
}
.cd-ag-task {
  padding: 5px 7px;
  border-radius: var(--r-xs);
  background: var(--sky);
  color: var(--sky-ink);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.3;
  text-align: left;
  overflow-wrap: anywhere;
}
.cd-ag-task.is-hot {
  background: var(--peach);
  color: var(--peach-ink);
}
.cd-ag-none {
  color: var(--faint);
  font-size: 12px;
}
.cd-ag-late {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
  padding: 8px 10px;
  border-radius: var(--r);
  background: var(--rose);
}
.cd-ag-late strong {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--rose-ink);
  font-size: 12px;
}
.cd-ag-late .icon {
  width: 14px;
  height: 14px;
}
.cd-ag-late .cd-ag-task {
  background: var(--surface);
  color: var(--rose-ink);
}
.cd-ag-foot {
  margin: 8px 0 0;
  font-size: 12px;
}
@media (max-width: 1100px) {
  .cd-ag {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  }
}

/* Celular (15/11/2026): caixas compactas e simples. */
@media (max-width: 760px) {
  .cd-grid {
    row-gap: 12px;
  }
  .cd-w {
    padding: 14px;
    border-radius: var(--r-md);
  }
  .cd-w-head {
    margin-bottom: 8px;
  }
  .cd-title h1 {
    font-size: 16px;
  }
  /* Perfil: foto ao lado do nome, dados em duas colunas. */
  .cd-pf {
    grid-template-columns: 64px minmax(0, 1fr);
    justify-items: start;
    align-items: center;
    column-gap: 12px;
    row-gap: 2px;
    text-align: left;
  }
  .cd-pf-face {
    grid-row: span 3;
    margin: 0;
  }
  .cd-pf-face > img,
  .cd-pf-face > span {
    width: 60px;
    height: 60px;
    border-width: 2px;
    font-size: 20px;
  }
  .cd-pf-pen {
    top: -4px;
    right: -6px;
    width: 26px;
    height: 26px;
  }
  .cd-pf h2 {
    font-size: 15px;
  }
  .cd-pf-doc {
    font-size: 12px;
  }
  .cd-pf-status {
    font-size: 10px;
    padding: 2px 8px;
  }
  .cd-pf-fields {
    grid-column: 1 / -1;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    margin-top: 10px;
  }
  .cd-pf-field {
    padding: 7px 10px;
    border-radius: var(--r-sm);
  }
  .cd-pf-field b {
    font-size: 12px;
  }
  .cd-pf-pair {
    display: contents;
  }
  .cd-pf-pair .cd-pf-field {
    border: 1px solid var(--line);
    background: var(--subtle);
  }
  .cd-pf-actions {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 6px;
    margin-top: 8px;
  }
  .cd-pf-more {
    padding: 7px 12px;
    font-size: 11px;
  }
  /* Números e indicadores: três por linha, só o essencial. */
  .cd-tiles,
  .cd-inds {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-auto-flow: row;
    grid-auto-columns: auto;
    overflow: visible;
    padding: 0;
    gap: 8px;
  }
  .cd-tile {
    display: grid;
    gap: 2px;
    padding: 10px;
    border-radius: var(--r);
  }
  .cd-tile-ico,
  .cd-tile small {
    display: none;
  }
  .cd-tile strong {
    font-size: 10px;
    line-height: 1.25;
    font-weight: 600;
    color: var(--muted);
  }
  .cd-tile b {
    font-size: 18px;
  }
  .cd-ind {
    display: grid;
    padding: 10px;
    border-radius: var(--r);
  }
  .cd-ind-bars {
    display: none;
  }
  .cd-ind-main b {
    font-size: 22px;
  }
  .cd-ind-main strong {
    font-size: 9px;
    letter-spacing: 0;
  }
  .cd-ind-main small {
    margin-top: 2px;
    font-size: 11px;
  }
  .cd-ind-arrow {
    display: none;
  }
  .cd-w.is-bare > .cd-w-float {
    top: -12px;
    right: -4px;
  }
  .cd-ag {
    grid-template-columns: minmax(0, 1fr);
  }
  .cd-ag-day {
    min-height: 0;
    grid-template-columns: 56px minmax(0, 1fr);
    align-items: center;
  }
  .cd-ag-day header {
    grid-row: span 9;
    display: grid;
  }
  .cd-tview button span {
    font-size: 12px;
  }
}
@media (max-width: 760px) {
  .cd-pf-actions > span {
    display: contents;
  }
  .cd-pf-pill,
  .cd-pf-actions .lc-new > summary {
    padding: 6px 12px;
    font-size: 11px;
    min-height: 0;
  }
  .cd-tview {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .cd-tview button {
    flex: none;
    padding: 6px 10px;
  }
}
@media (max-width: 760px) {
  .cd-ov-nums {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }
  .cd-ov-num {
    padding: 8px 10px;
  }
  .cd-ov-num b {
    font-size: 18px;
  }
  .cd-ov-num small {
    font-size: 10px;
  }
  .cd-ov-lanes li {
    grid-template-columns: minmax(80px, 1fr) minmax(0, 1.4fr) 24px;
    font-size: 12px;
  }
}

/* Caixas sem barras de rolagem (16/11/2026): a altura escolhida é a mínima
   (o conteúdo nunca fica escondido) e as tabelas se ajustam à largura da
   caixa, tirando colunas quando ela é estreita. */
.cd-w {
  container: cdw / inline-size;
}
.cd-w .lc-tt-wrap,
.cd-w .cd-dt-wrap,
.cd-w .lc-db-table-wrap,
.cd-w .tt-board {
  scrollbar-width: none;
}
.cd-w .lc-tt-wrap::-webkit-scrollbar,
.cd-w .cd-dt-wrap::-webkit-scrollbar,
.cd-w .lc-db-table-wrap::-webkit-scrollbar,
.cd-w .tt-board::-webkit-scrollbar {
  display: none;
}
.cd-w .lc-tt {
  min-width: 0;
}
.cd-w .cd-dt {
  min-width: 0;
}
@container cdw (max-width: 900px) {
  .lc-tt th.tt-c-desc,
  .lc-tt td.lc-tt-desc,
  .lc-tt th.tt-c-type,
  .lc-tt td.tt-c-type {
    display: none;
  }
  .lc-tt th.tt-c-title {
    width: auto;
  }
  .cd-dt {
    --cd-cols: minmax(0, 1.4fr) 40px 64px 96px 56px 72px;
  }
  .cd-dt.is-acts {
    --cd-cols: minmax(0, 1.4fr) 40px 64px 96px 72px;
  }
  .cd-dt-head > :nth-child(4),
  .cd-dt-row > :nth-child(3) {
    display: none;
  }
  .cd-ag {
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  }
}
@container cdw (max-width: 620px) {
  .lc-tt th.tt-c-people,
  .lc-tt td.tt-c-people,
  .lc-tt th.tt-c-client,
  .lc-tt td.tt-c-client {
    display: none;
  }
  .lc-tt th.tt-c-date {
    width: 120px;
  }
  .lc-tt th.tt-c-prio {
    width: 84px;
  }
  .cd-dt,
  .cd-dt.is-acts {
    --cd-cols: minmax(0, 1fr) 62px 96px;
  }
  .cd-dt-head > :nth-child(3),
  .cd-dt-head > :nth-child(7),
  .cd-dt-head > :nth-child(8),
  .cd-dt-row > :nth-child(2),
  .cd-dt-row > :nth-child(6),
  .cd-dt-row > :nth-child(7) {
    display: none;
  }
  .cd-dt-group {
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 8px;
  }
  .cd-dt-head {
    padding-left: 55px;
  }
  .lc-db-table.cd-fin th:nth-child(1),
  .lc-db-table.cd-fin td:nth-child(1),
  .lc-db-table.cd-proc th:nth-child(2),
  .lc-db-table.cd-proc td:nth-child(2) {
    display: none;
  }
}
.cd-grid.al-grid {
  align-items: start;
}

/* Portal do cliente no perfil e "O que o cliente vê" (16/11/2026). */
.post-sections > button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 14px;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}
.post-sections > button .icon {
  width: 16px;
  height: 16px;
}
.cd-pf-portal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 12px;
  width: 100%;
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  font-size: 12px;
}
.cd-pf-portal > span {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
}
.cd-pf-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
}
.cd-pf-chip .icon {
  width: 13px;
  height: 13px;
}
.cd-pf-chip.is-mint { background: var(--mint); color: var(--mint-ink); }
.cd-pf-chip.is-sun { background: var(--sun); color: var(--sun-ink); }
.cd-pf-chip.is-rose { background: var(--rose); color: var(--rose-ink); }
.pv-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 14px;
  padding: 18px;
  border-radius: var(--r-xl);
}
.pv-head > div:first-child {
  flex: 1 1 320px;
  display: grid;
  gap: 6px;
}
.pv-head h3,
.pv-head p {
  margin: 0;
}
.pv-head p.muted {
  max-width: 62ch;
  font-size: 13px;
  line-height: 1.5;
}
.pv-head-actions {
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 8px;
}
.pv-tiles {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0;
}
.pv-tiles > span {
  display: grid;
  gap: 2px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
}
.pv-tiles b {
  font-size: 22px;
}
.pv-tiles small {
  color: var(--muted);
  font-size: 12px;
}
.pv-block {
  margin-bottom: 14px;
  padding: 16px 18px;
  border-radius: var(--r-xl);
}
.pv-block h4 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
  font-size: 14px;
}
.pv-block h4 small {
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--subtle);
  color: var(--muted);
  font-size: 11px;
}
.pv-list {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.pv-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--r);
  background: var(--subtle);
  font-size: 13px;
}
.pv-row > .icon {
  flex: none;
  color: var(--muted);
}
.pv-row > span:nth-child(2) {
  flex: 1;
  display: grid;
  min-width: 0;
}
.pv-row strong {
  overflow-wrap: anywhere;
}
.pv-row small {
  color: var(--muted);
  font-size: 12px;
}
.pv-actions {
  display: flex;
  flex: none;
  gap: 10px;
}
.pv-status {
  padding: 1px 8px;
  border-radius: 999px;
  font-style: normal;
  font-weight: 700;
}
.pv-status.is-sky { background: var(--sky); color: var(--sky-ink); }
.pv-status.is-lilac { background: var(--lilac); color: var(--lilac-ink); }
.pv-status.is-sun { background: var(--sun); color: var(--sun-ink); }
.pv-status.is-peach { background: var(--peach); color: var(--peach-ink); }
.pv-status.is-mint { background: var(--mint); color: var(--mint-ink); }
.pv-history {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 13px;
}
.pv-history li {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 10px;
}
.pv-history time {
  color: var(--muted);
  font-size: 12px;
}
.pv-history span {
  overflow-wrap: anywhere;
}
.office-portal-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 10px 0 0;
}
@media (max-width: 720px) {
  .pv-tiles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .pv-row {
    flex-wrap: wrap;
  }
  .pv-actions {
    width: 100%;
    justify-content: flex-end;
  }
  .pv-history li {
    grid-template-columns: 1fr;
    gap: 0;
  }
}
/* O que o cliente vê: pendências, riscos e relatórios (etapas 2 e 3). */
.pv-block h4 .pv-add {
  margin-left: auto;
  height: 30px;
  padding: 0 12px;
  font-size: 12px;
}
.pv-form {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--subtle);
}
.pv-form h5 {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.pv-form textarea {
  resize: vertical;
}
.pv-form > p.muted {
  margin: 0;
  font-size: 12px;
}
.pv-form > footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.pv-form > footer > span {
  display: flex;
  gap: 8px;
}
.pv-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
@media (max-width: 720px) {
  .pv-grid {
    grid-template-columns: 1fr;
  }
}
/* Indicadores do Acompanhamento do Cliente (etapa 3). */
.office-indicators {
  margin: 16px 0;
  padding: 16px 18px;
  border-radius: var(--r-xl);
}
.office-indicators h2 {
  margin: 0 0 10px;
  font-size: 15px;
}
.office-indicators > div {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 8px;
}
.office-ind {
  display: grid;
  gap: 2px;
  padding: 10px 12px;
  border-radius: var(--r);
  background: var(--subtle);
}
.office-ind strong {
  font-size: 20px;
}
.office-ind span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}
.office-ind.is-sun { background: var(--sun); color: var(--sun-ink); }
.office-ind.is-rose { background: var(--rose); color: var(--rose-ink); }
.office-ind.is-sun span,
.office-ind.is-rose span { color: inherit; }
/* Integrações por sistema (16/11/2026). */
.si-card h3 {
  margin: 18px 0 8px;
  font-size: 14px;
}
.si-orch {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--r-md);
  background: var(--lilac);
  color: var(--lilac-ink);
}
.si-orch > div {
  flex: 1;
  display: grid;
  min-width: 0;
}
.si-orch small {
  font-size: 12px;
}
.si-list {
  display: grid;
  gap: 6px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}
.si-row {
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface);
}
.si-head {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  text-align: left;
}
.si-head > span {
  flex: 1;
  display: grid;
  min-width: 0;
}
.si-head small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}
.si-chip {
  flex: none;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--subtle);
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
  white-space: nowrap;
}
.si-chip.is-mint { background: var(--mint); color: var(--mint-ink); }
.si-chip.is-sun { background: var(--sun); color: var(--sun-ink); }
.si-chip.is-sky { background: var(--sky); color: var(--sky-ink); }
.si-chip.is-lilac { background: var(--lilac); color: var(--lilac-ink); }
.si-form {
  padding: 0 12px 12px;
}
.si-form > p.muted {
  margin: 0;
  font-size: 12px;
}
.si-form > footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.si-form > footer > span {
  display: flex;
  gap: 8px;
}
.si-msg {
  margin: 6px 0 0;
  padding: 8px 10px;
  border-radius: var(--r-sm);
  background: var(--subtle);
  font-size: 12px;
}
.si-flows {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 10px;
}
.si-flow {
  display: grid;
  gap: 8px;
  align-content: start;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
}
.si-flow.is-test {
  border-style: dashed;
}
.si-flow header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.si-flow > p.muted {
  margin: 0;
  font-size: 12px;
}
.si-flow > .subtle-button {
  justify-self: start;
}
.si-steps {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.si-step {
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--subtle);
  font-size: 11px;
  font-weight: 700;
}
.si-step.is-mint { background: var(--mint); color: var(--mint-ink); }
.si-step.is-sun { background: var(--sun); color: var(--sun-ink); }
.si-step.is-sky { background: var(--sky); color: var(--sky-ink); }
.si-step.is-lilac { background: var(--lilac); color: var(--lilac-ink); }
.si-step.is-plain { color: var(--muted); }
.si-arrow {
  display: inline-flex;
  color: var(--muted);
}
.si-arrow .icon {
  width: 12px;
  height: 12px;
}

/* Painel do cliente no celular, revisão de 16/11/2026: a mesma leitura do
   Início. Letras maiores, títulos sem caixa alta, números em duas colunas,
   dados do perfil em lista e as linhas das tabelas como cartões. A linha do
   portal ocupa a largura toda (antes caía na coluna estreita da foto). */
@media (max-width: 760px) {
  .cd-w {
    padding: 16px;
    border-radius: var(--r-lg);
  }
  /* Perfil */
  .cd-pf {
    grid-template-columns: 72px minmax(0, 1fr);
    column-gap: 14px;
  }
  .cd-pf-face > img,
  .cd-pf-face > span {
    width: 68px;
    height: 68px;
    font-size: 22px;
  }
  .cd-pf h2 {
    font-size: 17px;
  }
  .cd-pf-doc {
    font-size: 13px;
  }
  .cd-pf-status {
    padding: 3px 10px;
    font-size: 11px;
  }
  .cd-pf-fields {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    margin-top: 14px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    background: var(--subtle);
  }
  .cd-pf-fields .cd-pf-field,
  .cd-pf-pair .cd-pf-field {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    padding: 11px 14px;
    border: 0;
    border-top: 1px solid var(--line);
    border-radius: 0;
    background: none;
  }
  .cd-pf-fields > .cd-pf-field:first-child {
    border-top: 0;
  }
  .cd-pf-field small {
    flex: none;
    font-size: 13px;
  }
  .cd-pf-field b {
    min-width: 0;
    font-size: 14px;
    text-align: right;
  }
  .cd-pf-portal {
    grid-column: 1 / -1;
    justify-content: space-between;
    gap: 8px 12px;
    margin-top: 10px;
    padding: 11px 14px;
    font-size: 13px;
  }
  .cd-pf-portal > span {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    width: 100%;
  }
  .cd-pf-portal > span .text-button {
    justify-content: center;
    min-height: 38px;
    border: 1px solid var(--line-2);
    border-radius: var(--r);
    background: var(--surface);
    color: var(--ink);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
  }
  .cd-pf-portal > .muted {
    color: var(--text);
  }
  .cd-pf-chip {
    font-size: 13px;
  }
  .cd-pf-field b .muted {
    font-weight: 500;
  }
  /* Ações: "Ver mais informações" na linha toda; Editar e Novo lado a lado. */
  .cd-pf-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    justify-items: stretch;
    gap: 8px;
    margin-top: 12px;
  }
  .cd-pf-more {
    grid-column: 1 / -1;
    min-height: 40px;
    padding: 9px 14px;
    font-size: 13px;
    letter-spacing: 0;
    text-transform: none;
  }
  .cd-pf-pill,
  .cd-pf-actions .lc-new > summary {
    justify-content: center;
    width: 100%;
    min-height: 40px;
    padding: 8px 14px;
    border-radius: var(--r);
    font-size: 13px;
  }
  .cd-pf-portal .cd-pf-pill {
    width: auto;
    min-height: 36px;
  }
  .cd-pf-actions .lc-new {
    min-width: 0;
  }
  /* Números e indicadores: duas colunas; a última sozinha ocupa a linha. */
  .cd-tiles,
  .cd-inds {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .cd-tiles > :last-child:nth-child(odd),
  .cd-inds > :last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }
  .cd-ind {
    align-items: flex-start;
  }
  .cd-tile,
  .cd-ind {
    gap: 4px;
    padding: 14px;
    border-radius: var(--r-lg);
  }
  .cd-tile strong {
    font-size: 13px;
    font-weight: 600;
  }
  .cd-tile b {
    font-size: 26px;
  }
  .cd-ind-main b {
    font-size: 28px;
  }
  .cd-ind-main strong {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
  }
  .cd-ind-main small {
    font-size: 12px;
  }
  /* Abas das caixas: sem caixa alta, deslizam de lado sem cortar o nome. */
  .cd-w-head {
    margin-bottom: 12px;
  }
  .cd-w-head > .cd-wtabs {
    flex: 1 1 auto;
    gap: 18px;
    -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 24px), transparent);
    mask-image: linear-gradient(90deg, #000 calc(100% - 24px), transparent);
    padding-right: 24px;
  }
  .cd-wtabs button[role="tab"],
  .cd-wtabs .cd-more > summary {
    flex: none;
    padding: 8px 0;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: none;
    white-space: nowrap;
  }
  .cd-w-head h3 {
    font-size: 16px;
  }
  /* Busca e filtros: a busca em cima, os filtros numa linha que desliza. */
  .cd-dt-tools {
    display: grid;
    gap: 10px;
  }
  .cd-search input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="file"]) {
    min-height: 42px;
    font-size: 16px;
  }
  .cd-chips {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .cd-chips::-webkit-scrollbar {
    display: none;
  }
  .cd-chip {
    flex: none;
    padding: 8px 12px;
    font-size: 13px;
  }
  .cd-chip small {
    font-size: 12px;
  }
  /* Tabela com o dia à esquerda: cada linha vira um cartão (título em cima,
     prazo e tipo embaixo). */
  .cd-dt-head {
    display: none;
  }
  .cd-dt-group {
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 10px;
    padding: 12px 0;
  }
  .cd-dt-head + .cd-dt-group {
    border-top: 0;
    padding-top: 2px;
  }
  .cd-dt-day b {
    font-size: 24px;
  }
  .cd-dt-day small {
    font-size: 13px;
  }
  .cd-dt-rows {
    gap: 8px;
  }
  .cd-dt-row,
  .cd-dt.is-acts .cd-dt-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 10px;
    min-height: 0;
    padding: 12px 14px;
    border-radius: var(--r-md);
    font-size: 13px;
  }
  .cd-dt-row > .cd-dt-title {
    flex: 1 1 100%;
  }
  .cd-dt-title button {
    font-size: 15px;
    line-height: 1.3;
  }
  .cd-dt-row > span:has(> .muted:only-child),
  .cd-dt-row > .cd-dt-date.is-empty {
    display: none;
  }
  /* Linha do tempo */
  .cd-w .lc-timeline li {
    padding: 12px 0;
    font-size: 14px;
  }
  .cd-w .lc-timeline time {
    width: auto;
    font-size: 13px;
  }
  .cd-w .lc-tl-title {
    flex-basis: 100%;
    font-weight: 600;
    line-height: 1.35;
  }
  .cd-w .lc-timeline small {
    font-size: 13px;
  }
}

/* Abas dos widgets do painel do cliente no celular (16/11/2026): quebram em
   linhas em vez de deslizar, para "Mais" e as últimas abas ficarem à vista. */
@media (max-width: 760px) {
  .cd-w-head > .cd-wtabs,
  .cd-wtabs {
    flex-wrap: wrap;
    overflow: visible;
    row-gap: 0;
    padding-right: 0;
    -webkit-mask-image: none;
    mask-image: none;
  }
  /* Sem rolagem, a lista do "Mais" volta a abrir logo abaixo dele. */
  .cd-wtabs .cd-more {
    position: relative;
  }
  .cd-wtabs .cd-more > div {
    left: auto;
    right: 0;
  }
}

/* Relatórios sem o resultado financeiro (quem não é administrador): os dois
   números restantes dividem a linha (16/11/2026). */
.rep-stats:has(> :nth-child(2):last-child) {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
