:root {
  --bg: #edf1f5;
  --surface: #ffffff;
  --surface-2: #f5f7fa;
  --line: #d8e0e7;
  --text: #163650;
  --muted: #6c7f92;
  --primary: #163f63;
  --primary-2: #4d95c6;
  --primary-3: #0f2f49;
  --success: #2f8057;
  --warning: #c98d2f;
  --danger: #b84a4a;
  --shadow: 0 18px 38px rgba(21, 55, 85, 0.08);
  --radius: 22px;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: linear-gradient(180deg, var(--bg-gradient-1, #f4f8fb) 0%, var(--bg-gradient-2, #ebf0f4) 100%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body.dark-theme {
  --bg: #0f1721;
  --surface: #16212d;
  --surface-2: #1c2a38;
  --line: #29394a;
  --text: #edf4fb;
  --muted: #a8bacd;
  --primary: #4d95c6;
  --primary-2: #77b1d8;
  --primary-3: #0e1722;
  --shadow: 0 18px 38px rgba(0, 0, 0, 0.28);
  --bg-gradient-1: #0d1520;
  --bg-gradient-2: #111d29;
}

button, input, textarea, select { font: inherit; }
a { color: inherit; }
.hidden { display: none !important; }

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 290px 1fr;
}

.sidebar {
  background: linear-gradient(180deg, var(--primary) 0%, var(--primary-3) 100%);
  color: #fff;
  padding: 24px 18px;
  position: sticky;
  top: 0;
  height: 100vh;
}

.brand {
  padding: 6px 10px 22px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
  margin-bottom: 22px;
}

.brand img {
  width: 190px;
  max-width: 100%;
  display: block;
  margin-bottom: 14px;
  object-fit: contain;
}

.brand strong {
  display: block;
  font-size: 24px;
  letter-spacing: -0.05em;
}

.brand span {
  display: block;
  margin-top: 4px;
  color: rgba(255,255,255,0.72);
  font-size: 13px;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.nav button {
  border: 0;
  background: transparent;
  color: rgba(255,255,255,0.80);
  text-align: left;
  padding: 14px 16px;
  border-radius: 16px;
  cursor: pointer;
  font-weight: 700;
}

.nav button:hover,
.nav button.active {
  color: #fff;
  background: rgba(255,255,255,0.12);
}

.main {
  padding: 28px;
  overflow-x: hidden;
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.eyebrow {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .08em;
}

h1 {
  margin: 0;
  font-size: 36px;
  letter-spacing: -0.05em;
  line-height: 1.04;
}

h2 { margin: 0 0 16px; font-size: 24px; letter-spacing: -0.035em; }
h3 { margin: 0 0 12px; font-size: 18px; }
p { line-height: 1.55; }
small { color: var(--muted); }

.grid { display: grid; gap: 18px; }
.grid.cols-4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
.grid.cols-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.grid.cols-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
}

.metric {
  min-height: 132px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.metric span { color: var(--muted); font-size: 13px; font-weight: 800; }
.metric strong { font-size: 38px; letter-spacing: -0.06em; }
.metric .hint { color: var(--muted); font-size: 12px; }

.btn {
  border: 0;
  background: linear-gradient(135deg, var(--primary) 0%, #21557f 100%);
  color: #fff;
  padding: 12px 16px;
  border-radius: 14px;
  cursor: pointer;
  font-weight: 800;
}
.btn.secondary {
  background: #eef4f8;
  color: var(--text);
}
.btn.ghost {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text);
}
.btn.small {
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 13px;
}
.btn.danger { background: linear-gradient(135deg, #b84a4a 0%, #8e3535 100%); }
.btn:hover { filter: brightness(.98); }

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.input, .select, .textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 14px;
  padding: 12px 13px;
  color: var(--text);
  outline: none;
}
.textarea { min-height: 110px; resize: vertical; }
label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 13px;
  font-weight: 800;
  color: var(--muted);
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 14px;
}
.full { grid-column: 1 / -1; }

.table { width: 100%; border-collapse: collapse; table-layout: auto; }
.table th {
  text-align: left;
  padding: 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
  border-bottom: 1px solid var(--line);
}
.table td {
  padding: 14px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.table tr:last-child td { border-bottom: 0; }
.table .row-clickable { cursor: pointer; }
.table .row-clickable:hover { background: #f7fafc; }

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 800;
  background: #ecf3f8;
  color: var(--text);
  white-space: nowrap;
}
.badge.Ideia { background: #e5e7eb; color: #4b5563; }
.badge.Em-producao { background: #f4d35e; color: #6b4f00; }
.badge.Arte-pronta, .badge.Legenda-pronta { background: #e8f1fa; color: #46789d; }
.badge.Enviado-para-aprovacao { background: #e5f0f8; color: #2f6f95; }
.badge.Ajuste-solicitado { background: #f8e6e6; color: #aa4a4a; }
.badge.Aprovado, .badge.Agendado, .badge.Concluido, .badge.Concluídos, .badge.Concluidos { background: #b785d5; color: #fff; }
.badge.Publicado, .badge.Postado { background: #5ab784; color: #fff; }

.badge.Gravacao { background: #e5f0f8; color: #275d81; }
.badge.Reuniao { background: #ececf9; color: #5956a5; }
.badge.Outro { background: #f2f2f2; color: #666; }

.tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.tabs button {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  padding: 10px 14px;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 800;
}
.tabs button.active {
  background: var(--surface-2);
  color: var(--text);
  border-color: var(--primary);
}

.empty {
  background: var(--surface);
  border: 1px dashed var(--line);
  border-radius: 18px;
  padding: 28px;
  text-align: center;
  color: var(--muted);
}

.link { color: #2e7097; text-decoration: underline; text-underline-offset: 3px; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; margin-top: 18px; }
.list { display: flex; flex-direction: column; gap: 10px; }
.list-item {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 30;
  background: rgba(14, 37, 57, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.modal {
  width: min(880px, 100%);
  max-height: 90vh;
  overflow: auto;
  background: var(--surface-2);
  border-radius: 24px;
  box-shadow: 0 28px 70px rgba(0,0,0,0.24);
  padding: 22px;
}
.modal-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 18px;
}
.close {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  cursor: pointer;
  background: var(--surface);
  font-size: 24px;
  color: var(--text);
}
.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 50;
  background: var(--surface-2);
  color: var(--text);
  padding: 14px 16px;
  border-radius: 14px;
  font-weight: 800;
  box-shadow: var(--shadow);
}

.hero-card {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #ffffff 0%, #eff5f9 100%);
}
.hero-card::after {
  content: "";
  position: absolute;
  right: -80px;
  top: -40px;
  width: 230px;
  height: 230px;
  background: radial-gradient(circle, rgba(77,149,198,0.18) 0%, rgba(77,149,198,0) 68%);
}

.calendar-presentation {
  background: #e7eaed;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid #d0d7de;
}

.calendar-head {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 22px 36px 18px 132px;
}

.month-side {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-size: 54px;
  font-weight: 900;
  color: var(--primary);
  letter-spacing: -0.05em;
  text-transform: capitalize;
  line-height: 0.9;
  align-self: stretch;
}

.calendar-title {
  text-align: center;
}
.calendar-title h2 {
  font-size: 52px;
  margin: 0;
  color: var(--primary);
}
.calendar-title p {
  margin: 8px 0 0;
  color: var(--muted);
  font-weight: 700;
}
.calendar-logo img {
  width: 120px;
  display: block;
}

.calendar-board {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 0;
}

.calendar-grid-wrap { overflow: auto; }

.calendar-grid {
  min-width: 980px;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  border-top: 1px solid #ccd4dc;
  border-left: 1px solid #ccd4dc;
}

.week-head {
  background: #d7dde3;
  color: #52687a;
  padding: 12px 8px;
  text-align: center;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: .10em;
  text-transform: uppercase;
  border-right: 1px solid rgba(255,255,255,0.12);
}

.calendar-cell {
  min-height: 170px;
  padding: 10px;
  background: #eef1f3;
  border-right: 1px solid #ccd4dc;
  border-bottom: 1px solid #ccd4dc;
}
.calendar-cell.muted { opacity: 0.48; }
.cell-number {
  font-size: 13px;
  font-weight: 700;
  color: #52687a;
  margin-bottom: 10px;
}
.cal-post {
  font-size: 12px;
  line-height: 1.25;
  background: #fff;
  border-radius: 12px;
  padding: 8px;
  margin-bottom: 8px;
  border: 1px solid #dde4ea;
  cursor: pointer;
}
.cal-post strong { display: block; font-size: 12px; margin-bottom: 5px; color: #1d3143; }
.cal-post small { display: block; font-weight: 800; color: #3d7da9; }
.calendar-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px 18px;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.group-stack { display: flex; flex-direction: column; gap: 16px; }
.client-group {
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
}
.client-group-head {
  background: #f4f8fb;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}
.client-group-body { padding: 12px 16px; }

.agenda-calendar {
  display: grid;
  grid-template-columns: repeat(7, minmax(0,1fr));
  gap: 10px;
}
.agenda-day {
  min-height: 124px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 10px;
}
.agenda-day strong { font-size: 13px; color: var(--muted); display: block; margin-bottom: 8px; }
.agenda-event {
  padding: 8px;
  border-radius: 12px;
  background: #eef4f8;
  font-size: 12px;
  margin-bottom: 8px;
}
.agenda-event .time { font-weight: 900; display: block; margin-bottom: 4px; }

@media (max-width: 1150px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { height: auto; position: relative; }
  .nav { flex-direction: row; flex-wrap: wrap; }
  .grid.cols-4, .grid.cols-3, .grid.cols-2 { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .calendar-head, .calendar-board { grid-template-columns: 1fr; }
  .month-side { writing-mode: horizontal-tb; transform: none; font-size: 38px; padding: 0 20px 10px; }
  .calendar-title h2 { font-size: 34px; }
  .calendar-logo { padding: 0 20px 10px; }
  .agenda-calendar { grid-template-columns: 1fr; }
}


.cal-post[draggable="true"] {
  cursor: grab;
}

.cal-post[draggable="true"]:active {
  cursor: grabbing;
  opacity: 0.72;
}

.calendar-cell {
  transition: background .15s ease, box-shadow .15s ease;
}

.calendar-cell:hover {
  background: #f7fafc;
  box-shadow: inset 0 0 0 2px rgba(77, 149, 198, 0.16);
}


.cell-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.calendar-add {
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 999px;
  background: #d7dde3;
  color: #52687a;
  cursor: pointer;
  font-weight: 900;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.calendar-add:hover {
  background: #c6d0d8;
}

.drive-open-btn {
  text-align: center;
  text-decoration: none;
}

.mini-demand-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 10px 0 0;
}

.mini-demand {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  text-align: left;
  padding: 8px 10px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 12px;
}

.mini-demand:hover {
  background: #f4f8fb;
}


.calendar-cell.weekend {
  background: #e2e5e8;
}

.calendar-cell.weekend:hover {
  background: #e8ebee;
}

.calendar-title h2 {
  text-align: center;
}


.modal-top-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

@media (max-width: 720px) {
  .modal-header {
    flex-direction: column;
  }

  .modal-top-actions {
    width: 100%;
    justify-content: flex-start;
  }
}


.table {
  width: 100%;
  border-collapse: collapse;
  table-layout: auto;
}
.table td strong,
.table td small {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.badge.Ideia,
.status-chip.status-ideia {
  background: #e5e7eb;
  color: #4b5563;
}

.badge.Em-producao,
.status-chip.status-em-producao {
  background: #f4d35e;
  color: #6b4f00;
}

.badge.Aprovado,
.badge.Agendado,
.badge.Concluido,
.badge.Concluídos,
.badge.Concluidos,
.status-chip.status-concluido {
  background: #b785d5;
  color: #fff;
}

.badge.Publicado,
.badge.Postado,
.status-chip.status-postado {
  background: #5ab784;
  color: #fff;
}

.cal-post {
  font-size: 12px;
  line-height: 1.25;
  background: #fff;
  border-radius: 12px;
  padding: 8px;
  margin-bottom: 8px;
  border: 1px solid #dde4ea;
  cursor: pointer;
}
.cal-post.status-ideia {
  background: #f3f4f6;
  border-color: #d1d5db;
}
.cal-post.status-em-producao {
  background: #fff3c6;
  border-color: #efcd55;
}
.cal-post.status-concluido {
  background: #f1e6f8;
  border-color: #c69adf;
}
.cal-post.status-postado {
  background: #e3f4ea;
  border-color: #7dca9b;
}

.cal-post-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 4px;
}
.status-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
}


/* Status oficiais LEME Flow */
.badge.Ideia,
.status-chip.status-ideia {
  background: #e5e7eb !important;
  color: #4b5563 !important;
}

.badge.Em-producao,
.status-chip.status-em-producao {
  background: #f4d35e !important;
  color: #6b4f00 !important;
}

.badge.Concluido,
.badge.Conclu-do,
.status-chip.status-concluido {
  background: #b785d5 !important;
  color: #fff !important;
}

.badge.Postado,
.status-chip.status-postado {
  background: #5ab784 !important;
  color: #fff !important;
}


/* Status oficiais LEME Flow v12 */
.badge.Ideia,
.status-chip.status-ideia {
  background: #e5e7eb !important;
  color: #4b5563 !important;
}

.badge.Em-andamento,
.status-chip.status-em-andamento {
  background: #f4d35e !important;
  color: #6b4f00 !important;
}

.badge.Concluidos,
.status-chip.status-concluidos {
  background: #b785d5 !important;
  color: #fff !important;
}

.badge.Publicado,
.status-chip.status-publicado {
  background: #5ab784 !important;
  color: #fff !important;
}

.cal-post.status-ideia {
  background: #f3f4f6 !important;
  border-color: #d1d5db !important;
}
.cal-post.status-em-andamento {
  background: #fff3c6 !important;
  border-color: #efcd55 !important;
}
.cal-post.status-concluidos {
  background: #f1e6f8 !important;
  border-color: #c69adf !important;
}
.cal-post.status-publicado {
  background: #e3f4ea !important;
  border-color: #7dca9b !important;
}


.dashboard-main-grid > .card {
  min-width: 0;
}

.money-card {
  background: linear-gradient(135deg, #f7fbf8, #e8f6ee);
  border: 1px solid #cfe8d8;
}

.money-card h2 {
  font-size: clamp(24px, 3vw, 38px);
  margin-bottom: 10px;
  color: #163f63;
}

.money-card p {
  font-size: 18px;
  line-height: 1.45;
  margin: 0 0 10px;
}

.money-value {
  display: inline-flex;
  margin-top: 12px;
  background: #5ab784;
  color: #fff;
  border-radius: 999px;
  padding: 7px 12px;
  font-weight: 900;
}


.client-cell,
.client-card-head,
.client-name-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.client-name-logo {
  gap: 6px;
  vertical-align: middle;
}

.client-logo,
.client-avatar {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  object-fit: contain;
  background: #fff;
  border: 1px solid var(--line);
  flex: 0 0 auto;
}

.client-logo.xs,
.client-avatar.xs {
  width: 18px;
  height: 18px;
  border-radius: 6px;
  font-size: 10px;
}

.client-logo.md,
.client-avatar.md {
  width: 44px;
  height: 44px;
  border-radius: 12px;
}

.client-logo.lg,
.client-avatar.lg {
  width: 74px;
  height: 74px;
  border-radius: 18px;
}

.client-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #edf4f8;
  color: var(--primary);
  font-weight: 900;
}

.logo-upload-row {
  display: flex;
  gap: 14px;
  align-items: center;
  background: #f7fafc;
  border: 1px solid var(--line);
  padding: 12px;
  border-radius: 16px;
}

.logo-preview {
  width: 86px;
  height: 86px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex: 0 0 auto;
}

.logo-preview img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.agenda-day-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.agenda-day-head strong {
  margin-bottom: 0;
}

.agenda-add {
  width: 24px;
  height: 24px;
  font-size: 14px;
}


.client-cell,
.client-card-head,
.client-name-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.client-name-logo {
  gap: 6px;
  vertical-align: middle;
}

.client-logo,
.client-avatar {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  object-fit: contain;
  background: #fff;
  border: 1px solid var(--line);
  flex: 0 0 auto;
}

.client-logo.xs,
.client-avatar.xs {
  width: 18px;
  height: 18px;
  border-radius: 6px;
  font-size: 10px;
}

.client-logo.md,
.client-avatar.md {
  width: 44px;
  height: 44px;
  border-radius: 12px;
}

.client-logo.lg,
.client-avatar.lg {
  width: 74px;
  height: 74px;
  border-radius: 18px;
}

.client-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #edf4f8;
  color: var(--primary);
  font-weight: 900;
}

.logo-upload-row {
  display: flex;
  gap: 14px;
  align-items: center;
  background: #f7fafc;
  border: 1px solid var(--line);
  padding: 12px;
  border-radius: 16px;
}

.logo-preview {
  width: 86px;
  height: 86px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex: 0 0 auto;
}

.logo-preview img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.agenda-day-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.agenda-day-head strong {
  margin-bottom: 0;
}

.agenda-add {
  width: 24px;
  height: 24px;
  font-size: 14px;
}

.runtime-error {
  max-width: 760px;
  margin: 60px auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 28px;
  box-shadow: var(--shadow);
}


.report-uploader {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.report-preview {
  margin-top: 18px;
}

.report-kpi-mini {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.report-kpi-mini div {
  background: #fff;
  border: 1px solid var(--line);
  border-left: 4px solid var(--primary-2);
  border-radius: 14px;
  padding: 14px;
}

.report-kpi-mini small {
  color: var(--muted);
  font-weight: 800;
  display: block;
  margin-bottom: 6px;
}

.report-kpi-mini strong {
  color: var(--primary);
  font-size: 22px;
}

@media (max-width: 900px) {
  .report-kpi-mini {
    grid-template-columns: 1fr 1fr;
  }
}


.theme-toggle {
  width: 100%;
  margin-top: 14px;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.08);
  color: #fff;
  border-radius: 14px;
  padding: 12px 14px;
  font-weight: 800;
  cursor: pointer;
  text-align: left;
}
.theme-toggle.active {
  background: rgba(255,255,255,0.18);
}

body.dark-theme .card,
body.dark-theme .hero-card,
body.dark-theme .money-card,
body.dark-theme .agenda-day,
body.dark-theme .logo-preview,
body.dark-theme .logo-upload-row,
body.dark-theme .client-group-head,
body.dark-theme .calendar-presentation,
body.dark-theme .kanban-column,
body.dark-theme .traffic-card,
body.dark-theme .report-preview {
  color: var(--text);
}

body.dark-theme .hero-card {
  background: linear-gradient(135deg, #16222d 0%, #1b2b3b 100%);
}
body.dark-theme .money-card {
  background: linear-gradient(135deg, #16252d, #1d3430);
  border-color: #32504b;
}
body.dark-theme .money-card h2 { color: #edf4fb; }
body.dark-theme .table .row-clickable:hover,
body.dark-theme .mini-demand:hover { background: rgba(255,255,255,0.04); }
body.dark-theme .agenda-event,
body.dark-theme .mini-demand,
body.dark-theme .cal-post,
body.dark-theme .kanban-card { background: #1d2a37; border-color: #314457; color: var(--text); }
body.dark-theme .calendar-presentation { background: #151f2a; border-color: #27384a; }
body.dark-theme .week-head { background: #18314a; color: #edf4fb; }
body.dark-theme .calendar-cell { background: #13202c; border-color: #26384b; }
body.dark-theme .calendar-cell.weekend { background: #101a25; }
body.dark-theme .calendar-cell:hover { background: #182737; }
body.dark-theme .cell-number,
body.dark-theme .cal-post strong,
body.dark-theme .calendar-title h2,
body.dark-theme .month-side { color: #edf4fb; }
body.dark-theme .calendar-add { background: #243647; color: #edf4fb; }
body.dark-theme .badge { background: #223242; color: #edf4fb; }
body.dark-theme .btn.secondary { background: #223242; color: #edf4fb; }
body.dark-theme .btn.ghost { border-color: #32475c; color: #edf4fb; }
body.dark-theme .list-item { background: #152230; }
body.dark-theme .client-avatar,
body.dark-theme .client-logo { background: #0f1721; }

.kanban-board {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.kanban-column {
  border: 1px solid var(--line);
  background: var(--surface-2);
  border-radius: 18px;
  min-height: 360px;
  padding: 12px;
}
.kanban-column-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}
.kanban-column-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 280px;
}
.kanban-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  cursor: grab;
  box-shadow: var(--shadow);
}
.kanban-card:active { cursor: grabbing; }
.kanban-card strong {
  display: block;
  margin: 10px 0;
  font-size: 14px;
  line-height: 1.35;
}
.kanban-card-top,
.kanban-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
}
.kanban-card-top { justify-content: flex-start; }
.kanban-empty {
  border: 1px dashed var(--line);
  border-radius: 14px;
  padding: 16px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

.traffic-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.traffic-card {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px;
}
.traffic-card.is-active {
  background: linear-gradient(135deg, rgba(90, 183, 132, 0.22), rgba(90, 183, 132, 0.10));
  border-color: rgba(90, 183, 132, 0.72);
  box-shadow: 0 12px 28px rgba(90, 183, 132, 0.16), inset 0 0 0 9999px rgba(90, 183, 132, 0.06);
}
body.dark-theme .traffic-card.is-active {
  background: linear-gradient(135deg, rgba(60, 190, 126, 0.24), rgba(42, 122, 86, 0.24));
  border-color: rgba(77, 206, 143, 0.76);
  box-shadow: 0 12px 28px rgba(28, 142, 88, 0.18), inset 0 0 0 9999px rgba(77, 206, 143, 0.06);
}
body:not(.dark-theme) .traffic-card.is-active {
  background: linear-gradient(135deg, rgba(83, 191, 134, 0.24), rgba(83, 191, 134, 0.12));
  border-color: rgba(75, 190, 128, 0.76);
  box-shadow: 0 12px 28px rgba(75, 190, 128, 0.14), inset 0 0 0 9999px rgba(83, 191, 134, 0.04);
}
.traffic-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.traffic-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.traffic-switch {
  position: relative;
  width: 54px;
  height: 30px;
  display: inline-flex;
}
.traffic-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.traffic-switch span {
  position: absolute;
  inset: 0;
  background: #c7d0d9;
  border-radius: 999px;
  cursor: pointer;
  transition: .2s ease;
}
.traffic-switch span::after {
  content: '';
  position: absolute;
  width: 22px;
  height: 22px;
  left: 4px;
  top: 4px;
  background: #fff;
  border-radius: 50%;
  transition: .2s ease;
}
.traffic-switch input:checked + span {
  background: #5ab784;
}
.traffic-switch input:checked + span::after {
  transform: translateX(24px);
}
.traffic-expand {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  font-size: 16px;
}
.traffic-card-body {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.traffic-inline-data {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

@media (max-width: 1150px) {
  .kanban-board { grid-template-columns: 1fr; }
}


/* Ajustes v24 */
.sidebar {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.sidebar-bottom {
  margin-top: 24px;
  padding: 14px 10px 4px;
  border-top: 1px solid rgba(255,255,255,0.12);
}

.theme-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  color: rgba(255,255,255,0.84);
  font-weight: 800;
  font-size: 13px;
}

.switch-toggle {
  position: relative;
  width: 54px;
  height: 30px;
  border: 1px solid rgba(255,255,255,0.24);
  border-radius: 999px;
  background: rgba(255,255,255,0.16);
  cursor: pointer;
  padding: 0;
}

.switch-toggle span {
  position: absolute;
  width: 22px;
  height: 22px;
  top: 3px;
  left: 4px;
  border-radius: 50%;
  background: #fff;
  transition: .2s ease;
}

.switch-toggle.active {
  background: #4d95c6;
}

.switch-toggle.active span {
  transform: translateX(24px);
}

.theme-toggle {
  display: none;
}

.responsible-card {
  background: linear-gradient(135deg, #163f63 0%, #21577f 100%);
  border-color: rgba(255,255,255,0.12);
  color: #fff;
}

.responsible-card h2,
.responsible-card small,
.responsible-card .section-title small {
  color: #fff;
}

.responsible-item {
  background: rgba(255,255,255,0.10);
  border-color: rgba(255,255,255,0.16);
  color: #fff;
}

.responsible-item small {
  color: rgba(255,255,255,0.76);
}

.responsible-item .btn.ghost {
  color: #fff;
  border-color: rgba(255,255,255,0.35);
}

.kanban-drive-link {
  display: inline-flex;
  margin-top: 8px;
  font-size: 12px;
  font-weight: 800;
  color: #2e7097;
  text-decoration: underline;
  text-underline-offset: 3px;
}

body.dark-theme .responsible-card {
  background: linear-gradient(135deg, #112d45 0%, #1a4b70 100%);
}

body.dark-theme .responsible-item {
  background: rgba(255,255,255,0.08);
}

body.dark-theme .traffic-expand {
  background: #182737;
  color: #edf4fb;
}


/* Ajustes v25 */
.drive-status-btn {
  text-decoration: none;
  justify-content: center;
  min-width: 72px;
}

.drive-status-btn.active {
  background: linear-gradient(135deg, var(--primary) 0%, #21557f 100%);
  color: #fff;
}

.drive-status-btn.disabled,
.drive-status-btn:disabled {
  background: #e6edf2;
  color: #9aacbc;
  cursor: not-allowed;
  opacity: .74;
}

body.dark-theme .drive-status-btn.disabled,
body.dark-theme .drive-status-btn:disabled {
  background: #223242;
  color: #6f8397;
}

body.dark-theme .sidebar {
  background: linear-gradient(180deg, #132333 0%, #0e1a26 100%) !important;
}

body.dark-theme .nav button:hover,
body.dark-theme .nav button.active {
  background: rgba(255,255,255,0.09) !important;
}

body.dark-theme .switch-toggle.active {
  background: #2f5f83 !important;
}

body.dark-theme .brand {
  border-bottom-color: rgba(255,255,255,0.10);
}


/* Correções v26 */
body.dark-theme .calendar-title h2 {
  color: #f4f8fb !important;
}

body.dark-theme .cal-post {
  background: #f4f6f8 !important;
  border-color: #d8e0e7 !important;
  color: #0f1f2d !important;
}

body.dark-theme .cal-post strong {
  color: #0f1f2d !important;
  opacity: 1 !important;
}

body.dark-theme .cal-post small {
  color: #2f7fae !important;
}

body.dark-theme .cal-post.status-ideia {
  background: #f4f6f8 !important;
  border-color: #d8e0e7 !important;
}

body.dark-theme .cal-post.status-em-andamento {
  background: #fff3c6 !important;
  border-color: #efcd55 !important;
}

body.dark-theme .cal-post.status-concluidos {
  background: #f1e6f8 !important;
  border-color: #c69adf !important;
}

body.dark-theme .cal-post.status-publicado {
  background: #e3f4ea !important;
  border-color: #7dca9b !important;
}

body.dark-theme .status-chip.status-ideia {
  background: #e5e7eb !important;
  color: #4b5563 !important;
}

body.dark-theme .status-chip.status-em-andamento {
  background: #f4d35e !important;
  color: #6b4f00 !important;
}

body.dark-theme .status-chip.status-concluidos {
  background: #b785d5 !important;
  color: #fff !important;
}

body.dark-theme .status-chip.status-publicado {
  background: #5ab784 !important;
  color: #fff !important;
}

.login-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
  background: linear-gradient(135deg, #0f2f49 0%, #163f63 100%);
}

.login-card {
  width: min(460px, 100%);
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.20);
  color: #fff;
  border-radius: 28px;
  padding: 30px;
  box-shadow: 0 28px 70px rgba(0,0,0,0.24);
  backdrop-filter: blur(16px);
}

.login-card h1,
.login-card p,
.login-card small,
.login-card .eyebrow {
  color: #fff;
}

.login-logo {
  width: 170px;
  display: block;
  margin-bottom: 24px;
}

.login-form {
  margin: 20px 0;
}

.login-form label {
  color: rgba(255,255,255,0.80);
}

.login-form .input {
  background: rgba(255,255,255,0.96);
  color: #163650;
}

.login-btn {
  width: 100%;
  margin-bottom: 14px;
  background: #4d95c6;
}

.sidebar-user {
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}

.sidebar-user strong,
.sidebar-user small {
  display: block;
  color: #fff;
}

.sidebar-user small {
  color: rgba(255,255,255,0.65);
  margin-top: 3px;
}

.sidebar-logout {
  margin-top: 10px;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.08);
  color: #fff;
  border-radius: 10px;
  padding: 8px 10px;
  font-weight: 800;
  cursor: pointer;
}


/* Ajustes v27 */
.password-field {
  position: relative;
  display: flex;
  align-items: stretch;
  width: 100%;
}

.password-field .input {
  padding-right: 86px;
}

.password-field button {
  position: absolute;
  right: 7px;
  top: 7px;
  bottom: 7px;
  border: 0;
  border-radius: 10px;
  background: #eef4f8;
  color: var(--text);
  font-weight: 900;
  cursor: pointer;
  padding: 0 12px;
}

body.dark-theme .password-field button {
  background: #223242;
  color: #edf4fb;
}

body.dark-theme .login-form .password-field button {
  background: #163f63;
  color: #fff;
}

/* Cards do calendário em modo escuro com faixa de status */
body.dark-theme .calendar-cell .cal-post {
  position: relative;
  overflow: hidden;
  background: #182737 !important;
  border: 1px solid #33506a !important;
  color: #edf4fb !important;
  padding: 12px 12px 28px !important;
  border-radius: 14px !important;
  box-shadow: 0 10px 24px rgba(0,0,0,.18);
}

body.dark-theme .calendar-cell .cal-post strong {
  color: #ffffff !important;
  opacity: 1 !important;
  font-size: 13px;
  line-height: 1.32;
}

body.dark-theme .calendar-cell .cal-post small {
  color: #9fd0ef !important;
  font-weight: 900;
}

body.dark-theme .calendar-cell .cal-post .status-chip {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  justify-content: center;
  border-radius: 0;
  padding: 6px 8px;
  font-size: 10px;
  letter-spacing: .02em;
}

body.dark-theme .calendar-cell .cal-post.status-ideia {
  background: #182737 !important;
  border-color: #3a4b5b !important;
}

body.dark-theme .calendar-cell .cal-post.status-em-andamento {
  background: #1f2930 !important;
  border-color: #b98922 !important;
}

body.dark-theme .calendar-cell .cal-post.status-concluidos {
  background: #241c31 !important;
  border-color: #8f62ac !important;
}

body.dark-theme .calendar-cell .cal-post.status-publicado {
  background: #173023 !important;
  border-color: #4c9c6d !important;
}

body.dark-theme .calendar-cell .cal-post.status-ideia .status-chip {
  background: #3a4b5b !important;
  color: #e7eef5 !important;
}

body.dark-theme .calendar-cell .cal-post.status-em-andamento .status-chip {
  background: #c7962c !important;
  color: #1f1600 !important;
}

body.dark-theme .calendar-cell .cal-post.status-concluidos .status-chip {
  background: #9a6abb !important;
  color: #fff !important;
}

body.dark-theme .calendar-cell .cal-post.status-publicado .status-chip {
  background: #5ab784 !important;
  color: #fff !important;
}

body.dark-theme .calendar-cell .cal-post .cal-post-meta {
  gap: 8px;
  align-items: flex-start;
}


/* Correções v28 - página do colaborador no modo escuro */
body.dark-theme .client-group {
  background: #142130;
  border-color: #2c4156;
}

body.dark-theme .client-group-head {
  background: #1a2a3a !important;
  border-bottom-color: #2c4156 !important;
  color: #edf4fb !important;
}

body.dark-theme .client-group-head strong {
  color: #ffffff !important;
}

body.dark-theme .client-group-head small {
  color: #a8bacd !important;
}

body.dark-theme .client-group-body {
  background: #142130;
}

body.dark-theme .table th {
  color: #b9cce0;
  border-bottom-color: #2c4156;
}

body.dark-theme .table td {
  border-bottom-color: #2c4156;
  color: #edf4fb;
}

body.dark-theme .table td strong {
  color: #ffffff;
}

body.dark-theme .table td small {
  color: #a8c2dc;
}

body.dark-theme .card {
  background: #142130;
  border-color: #2c4156;
}

body.dark-theme .card .section-title small,
body.dark-theme .card p {
  color: #a8bacd;
}

body.dark-theme .list-item {
  background: #1a2a3a;
  border-color: #2c4156;
}

body.dark-theme .btn.small.ghost {
  border-color: #3a536b;
  color: #edf4fb;
}

body.dark-theme .drive-status-btn.active {
  background: #2f7fae;
  color: #fff;
}

body.dark-theme .drive-status-btn.disabled,
body.dark-theme .drive-status-btn:disabled {
  background: #1d2c3b;
  color: #61798f;
  opacity: .75;
}


/* Correções v30 - sincronização n8n */
.sidebar-sync {
  width: 100%;
  border: 1px solid rgba(255,255,255,.22);
  background: rgba(255,255,255,.1);
  color: #fff;
  border-radius: 12px;
  padding: 10px 12px;
  font-weight: 800;
  cursor: pointer;
  margin-bottom: 10px;
}

.sidebar-sync:hover {
  background: rgba(255,255,255,.18);
}


/* Correções v36 - agenda dos colaboradores */
.collaborator-agenda-card .section-title {
  margin-bottom: 18px;
}

.collaborator-agenda-calendar {
  gap: 0;
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
}

.agenda-week-head {
  color: #52687a;
  background: #f4f8fb;
  padding: 12px 8px;
  text-align: center;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.collaborator-agenda-calendar .agenda-day {
  min-height: 170px;
  border-radius: 0;
  border: 0;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #eef1f3;
  transition: background .15s ease, box-shadow .15s ease;
}

.collaborator-agenda-calendar .agenda-day:hover {
  background: #f7fafc;
  box-shadow: inset 0 0 0 2px rgba(77,149,198,.16);
}

.collaborator-agenda-calendar .agenda-day.muted {
  opacity: .52;
}

.collaborator-agenda-calendar .agenda-day.weekend {
  background: #e7ebef;
}

.agenda-day-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.agenda-day-head strong {
  margin: 0;
}

.agenda-event {
  cursor: pointer;
  line-height: 1.25;
  border: 1px solid #dde4ea;
}

.agenda-event[draggable="true"] {
  cursor: grab;
}

.agenda-event[draggable="true"]:active {
  cursor: grabbing;
  opacity: .72;
}

.agenda-event strong {
  color: #1d3143;
  font-size: 12px;
  margin: 0 0 5px;
}

.agenda-event small {
  color: #3d7da9;
  font-weight: 800;
}

body.dark-theme .collaborator-agenda-calendar {
  border-color: #2c4156;
}

body.dark-theme .agenda-week-head {
  background: #102030;
  color: #a8c2dc;
  border-color: #2c4156;
}

body.dark-theme .collaborator-agenda-calendar .agenda-day {
  background: #112131;
  border-color: #2c4156;
}

body.dark-theme .collaborator-agenda-calendar .agenda-day.weekend {
  background: #0e1c2a;
}

body.dark-theme .collaborator-agenda-calendar .agenda-day:hover {
  background: #14283a;
  box-shadow: inset 0 0 0 2px rgba(77,149,198,.20);
}

body.dark-theme .agenda-day-head strong {
  color: #edf4fb;
}

body.dark-theme .agenda-event {
  background: #172b3d;
  border-color: #38546e;
  color: #edf4fb;
  box-shadow: inset 0 -28px 0 rgba(100,128,153,.32);
}

body.dark-theme .agenda-event strong {
  color: #ffffff;
}

body.dark-theme .agenda-event .time {
  color: #dbe8f4;
}

body.dark-theme .agenda-event small {
  color: #b9d4ec;
}


/* Correções v43 - Blog retrátil com imagem destacada */
.blog-card .form-grid {
  margin-bottom: 14px;
}

.blog-top-actions {
  margin-bottom: 16px;
}

.blog-accordion {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.blog-article-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255,255,255,.72);
  overflow: hidden;
}

.blog-article-card.expanded {
  box-shadow: var(--shadow);
}

.blog-article-toggle {
  width: 100%;
  border: 0;
  background: transparent;
  padding: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  text-align: left;
  color: var(--text);
}

.blog-article-toggle strong {
  display: block;
  font-size: 15px;
  margin-bottom: 4px;
}

.blog-article-toggle small {
  color: var(--muted);
  display: block;
  max-width: 720px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.blog-article-status {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.chevron {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 18px;
}

.blog-article-body {
  padding: 0 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.blog-textarea {
  min-height: 170px;
}

.blog-image-box {
  border: 1px dashed var(--line);
  background: var(--surface-2);
  border-radius: 16px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.blog-image-box strong {
  display: block;
}

.blog-image-box small {
  color: var(--muted);
}

.blog-image-empty {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  color: var(--muted);
  background: rgba(255,255,255,.55);
}

.blog-image-preview {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 14px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px;
  background: rgba(255,255,255,.65);
}

.blog-image-preview img {
  width: 180px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--line);
}

.blog-file-button {
  width: fit-content;
  cursor: pointer;
}

.blog-file-button input {
  display: none;
}

body.dark-theme .blog-article-card {
  background: #142130;
  border-color: #2c4156;
}

body.dark-theme .blog-article-toggle {
  color: #edf4fb;
}

body.dark-theme .blog-image-box,
body.dark-theme .chevron {
  background: #172636;
  border-color: #2c4156;
}

body.dark-theme .blog-image-empty,
body.dark-theme .blog-image-preview {
  background: #101c29;
  border-color: #2c4156;
}

@media (max-width: 760px) {
  .blog-article-toggle {
    align-items: flex-start;
    flex-direction: column;
  }
  .blog-article-status {
    width: 100%;
    justify-content: space-between;
  }
  .blog-image-preview {
    grid-template-columns: 1fr;
  }
  .blog-image-preview img {
    width: 100%;
  }
}



/* Correções v44 - Blog simplificado e imagem por arrastar */
.blog-accordion {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.blog-article-toggle {
  width: 100%;
  border: 0;
  background: transparent;
  padding: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  text-align: left;
  color: var(--text);
}

.blog-article-toggle strong {
  display: block;
  font-size: 15px;
  margin-bottom: 4px;
}

.blog-article-toggle small {
  color: var(--muted);
}

.blog-article-status {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.chevron {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 18px;
}

.blog-article-body {
  padding: 0 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.blog-textarea {
  min-height: 260px;
}

.blog-image-dropzone {
  border: 2px dashed var(--line);
  background: var(--surface-2);
  border-radius: 18px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: .2s ease;
}

.blog-image-dropzone.dragging {
  border-color: var(--primary);
  background: rgba(22, 63, 99, .08);
  transform: translateY(-1px);
}

.blog-image-dropzone-text strong {
  display: block;
}

.blog-image-dropzone-text small {
  color: var(--muted);
}

.blog-image-empty {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px;
  color: var(--muted);
  background: rgba(255,255,255,.55);
  text-align: center;
}

.blog-image-preview {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 14px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px;
  background: rgba(255,255,255,.65);
}

.blog-image-preview img {
  width: 180px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--line);
}

.blog-file-button {
  width: fit-content;
  cursor: pointer;
}

.blog-file-button input {
  display: none;
}

body.dark-theme .blog-article-toggle {
  color: #edf4fb;
}

body.dark-theme .blog-image-dropzone,
body.dark-theme .chevron {
  background: #172636;
  border-color: #2c4156;
}

body.dark-theme .blog-image-dropzone.dragging {
  border-color: #4d95c6;
  background: rgba(77, 149, 198, .12);
}

body.dark-theme .blog-image-empty,
body.dark-theme .blog-image-preview {
  background: #101c29;
  border-color: #2c4156;
}

@media (max-width: 760px) {
  .blog-article-toggle {
    align-items: flex-start;
    flex-direction: column;
  }
  .blog-article-status {
    width: 100%;
    justify-content: space-between;
  }
  .blog-image-preview {
    grid-template-columns: 1fr;
  }
  .blog-image-preview img {
    width: 100%;
  }
}


/* Correções v45 - Upload do Blog igual ao relatório */
.blog-image-upload {
  border: 1px dashed var(--line);
  background: var(--surface-2);
  border-radius: 18px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.blog-file-input {
  min-height: 82px;
  padding: 26px 18px;
  cursor: pointer;
  border-style: dashed;
  background: rgba(255,255,255,.72);
}

.blog-file-input.dragging,
.blog-file-input:hover {
  border-color: var(--primary);
  background: rgba(22, 63, 99, .08);
}

.blog-file-button {
  display: none;
}

body.dark-theme .blog-image-upload {
  background: #172636;
  border-color: #2c4156;
}

body.dark-theme .blog-file-input {
  background: #101c29;
  border-color: #2c4156;
}

body.dark-theme .blog-file-input.dragging,
body.dark-theme .blog-file-input:hover {
  border-color: #4d95c6;
  background: rgba(77, 149, 198, .12);
}


/* Correções v46 - Arrastar arquivos na área inteira do relatório */
.report-uploader {
  border: 1px dashed var(--line);
  border-radius: 18px;
  padding: 16px;
  background: var(--surface-2);
  transition: .2s ease;
}

.report-uploader.dragging {
  border-color: var(--primary);
  background: rgba(22, 63, 99, .08);
  transform: translateY(-1px);
}

.report-file-input {
  min-height: 82px;
  padding: 26px 18px;
  cursor: pointer;
  border-style: dashed;
  background: rgba(255,255,255,.72);
}

.report-file-input:hover {
  border-color: var(--primary);
  background: rgba(22, 63, 99, .08);
}

.report-files-feedback {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  background: rgba(255,255,255,.65);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  margin-bottom: 14px;
}

body.dark-theme .report-uploader {
  background: #172636;
  border-color: #2c4156;
}

body.dark-theme .report-uploader.dragging {
  border-color: #4d95c6;
  background: rgba(77, 149, 198, .12);
}

body.dark-theme .report-file-input,
body.dark-theme .report-files-feedback {
  background: #101c29;
  border-color: #2c4156;
}


/* v51 — Arrastar e soltar mais fluido */
.cal-post,
.agenda-event {
  user-select: none;
  -webkit-user-select: none;
  transition: transform .16s ease, opacity .16s ease, box-shadow .16s ease, border-color .16s ease;
  will-change: transform, opacity;
}

.cal-post[draggable="true"],
.agenda-event[draggable="true"] {
  cursor: grab;
}

.cal-post[draggable="true"]:active,
.agenda-event[draggable="true"]:active {
  cursor: grabbing;
}

.cal-post.is-dragging,
.agenda-event.is-dragging {
  opacity: .35 !important;
  transform: scale(.98);
  box-shadow: none;
}

.calendar-cell.drop-target-active,
.agenda-day.drop-target-active {
  transition: background .14s ease, border-color .14s ease, transform .14s ease;
}

.calendar-cell.drop-target-hover,
.agenda-day.drop-target-hover {
  background: rgba(22, 63, 99, .10) !important;
  border-color: var(--primary) !important;
  box-shadow: inset 0 0 0 2px rgba(22, 63, 99, .22);
  transform: translateY(-1px);
}

.drag-preview {
  opacity: .94;
  transform: rotate(1.5deg) scale(1.02);
  box-shadow: 0 18px 50px rgba(0, 0, 0, .22);
  border-radius: 14px;
  background: var(--surface);
}

body.dark-theme .calendar-cell.drop-target-hover,
body.dark-theme .agenda-day.drop-target-hover {
  background: rgba(77, 149, 198, .16) !important;
  border-color: #4d95c6 !important;
  box-shadow: inset 0 0 0 2px rgba(77, 149, 198, .28);
}

/* Evita que os filhos do cartão interrompam o início do arraste. */
.cal-post *,
.agenda-event * {
  pointer-events: none;
}


/* v52 — Agenda e navegação */
.agenda-event,
.cal-post {
  touch-action: none;
}


/* v53 — Agenda e Kanban com drag and drop robusto */
.event-drop-zone,
.kanban-drop-zone {
  position: relative;
  transition:
    background .14s ease,
    border-color .14s ease,
    box-shadow .14s ease,
    transform .14s ease;
}

.event-drop-zone.drop-target-active,
.kanban-drop-zone.drop-target-active {
  border-color: rgba(22, 63, 99, .45);
}

.event-drop-zone.drop-target-hover,
.kanban-drop-zone.drop-target-hover {
  background: rgba(22, 63, 99, .10) !important;
  border-color: var(--primary) !important;
  box-shadow: inset 0 0 0 2px rgba(22, 63, 99, .22);
  transform: translateY(-1px);
}

.kanban-card,
.agenda-event {
  transform-origin: center;
  transition:
    transform .16s ease,
    opacity .16s ease,
    box-shadow .16s ease;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
}

.kanban-card:active,
.agenda-event:active {
  cursor: grabbing;
}

.kanban-card.is-dragging,
.agenda-event.is-dragging {
  opacity: .35 !important;
  transform: scale(.98);
  box-shadow: none;
}

.kanban-column-body {
  min-height: 250px;
  pointer-events: auto;
}

body.dark-theme .event-drop-zone.drop-target-hover,
body.dark-theme .kanban-drop-zone.drop-target-hover {
  background: rgba(77, 149, 198, .16) !important;
  border-color: #4d95c6 !important;
  box-shadow: inset 0 0 0 2px rgba(77, 149, 198, .28);
}


/* v55 — sincronização automática em tempo quase real */
.sync-live-indicator {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: var(--muted);
}

.sync-live-indicator::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #36a269;
  box-shadow: 0 0 0 4px rgba(54, 162, 105, .12);
}


/* v57 — drag das publicações no calendário */
.publication-drop-zone {
  position: relative;
}

.publication-drop-zone.drop-target-active,
.publication-drop-zone.drop-target-hover {
  border-color: var(--primary) !important;
}

.cal-post {
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
}

.cal-post:active {
  cursor: grabbing;
}


/* ============================================================
   v60 — Publicações do dia, navegação e melhorias operacionais
   ============================================================ */

.daily-nav-button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 16px 0 12px;
  padding: 13px 14px;
  border: 1px solid rgba(108, 190, 247, .42);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(49, 141, 204, .30), rgba(61, 172, 219, .12));
  color: #fff;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(0, 0, 0, .12);
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}

.daily-nav-button:hover,
.daily-nav-button.active {
  transform: translateY(-1px);
  border-color: rgba(116, 208, 255, .9);
  background: linear-gradient(135deg, rgba(49, 141, 204, .52), rgba(61, 172, 219, .25));
}

.daily-nav-button > span:last-child {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.daily-nav-button strong {
  font-size: 13px;
}

.daily-nav-button small {
  margin-top: 2px;
  color: rgba(255,255,255,.68);
  font-size: 10px;
}

.daily-nav-icon {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #58b3e5;
  color: #fff;
  box-shadow: 0 0 0 5px rgba(88,179,229,.15);
}

.sidebar-tools {
  display: flex;
  align-items: center;
  gap: 9px;
}

.sidebar-settings-icon {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 12px;
  background: rgba(255,255,255,.06);
  color: #fff;
  font-size: 20px;
  cursor: pointer;
}

.sidebar-settings-icon:hover,
.sidebar-settings-icon.active {
  background: rgba(91, 174, 226, .24);
  border-color: rgba(91, 174, 226, .7);
}

.theme-toggle-row.compact {
  flex: 1;
  margin: 0;
}

.daily-publications-hero {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 26px;
  margin-bottom: 20px;
  padding: 30px;
  border: 1px solid rgba(72, 162, 220, .38);
  border-radius: 24px;
  background:
    radial-gradient(circle at 88% 12%, rgba(93, 194, 239, .26), transparent 38%),
    linear-gradient(135deg, #123b5c, #174e76);
  color: #fff;
  box-shadow: 0 22px 50px rgba(8, 37, 61, .24);
}

.daily-publications-hero h1 {
  margin: 3px 0 8px;
  color: #fff;
  font-size: clamp(30px, 4vw, 48px);
}

.daily-publications-hero p {
  margin: 0;
  color: rgba(255,255,255,.75);
}

.daily-publications-summary {
  display: flex;
  gap: 12px;
}

.daily-publications-summary > div {
  min-width: 105px;
  padding: 15px 18px;
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 16px;
  background: rgba(255,255,255,.09);
  backdrop-filter: blur(8px);
}

.daily-publications-summary strong,
.daily-publications-summary span {
  display: block;
}

.daily-publications-summary strong {
  font-size: 27px;
}

.daily-publications-summary span {
  margin-top: 3px;
  color: rgba(255,255,255,.7);
  font-size: 11px;
}

.daily-publications-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
  gap: 16px;
  padding-bottom: 82px;
}

.daily-publication-card {
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--card);
  box-shadow: 0 12px 32px rgba(10, 35, 55, .08);
  transition: opacity .2s ease, transform .2s ease, border-color .2s ease;
}

.daily-publication-card:hover {
  transform: translateY(-2px);
  border-color: rgba(60, 156, 215, .5);
}

.daily-publication-card.is-published {
  opacity: .66;
}

.daily-publication-card-head,
.daily-publication-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.daily-publication-content {
  padding: 24px 0 22px;
}

.daily-publication-content h2 {
  margin: 11px 0 7px;
}

.daily-publication-content p {
  margin: 0;
  color: var(--muted);
}

.daily-publication-actions {
  justify-content: flex-start;
  flex-wrap: wrap;
}

.published-toggle {
  position: relative;
  width: 48px;
  height: 27px;
  flex: 0 0 auto;
  cursor: pointer;
}

.published-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.published-toggle span {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: #a9b5bf;
  transition: .2s ease;
}

.published-toggle span::after {
  content: '';
  position: absolute;
  top: 4px;
  left: 4px;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,.2);
  transition: .2s ease;
}

.published-toggle input:checked + span {
  background: #2c9a68;
}

.published-toggle input:checked + span::after {
  transform: translateX(21px);
}

.daily-empty-state {
  grid-column: 1 / -1;
  padding: 54px 24px;
  border: 1px dashed var(--border);
  border-radius: 22px;
  background: var(--card);
  text-align: center;
}

.daily-empty-icon {
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: rgba(49, 154, 103, .14);
  color: #319a67;
  font-size: 30px;
  font-weight: 900;
}

.daily-drive-fab {
  position: fixed;
  right: 28px;
  bottom: 25px;
  z-index: 40;
  padding: 14px 19px;
  border-radius: 999px;
  background: linear-gradient(135deg, #247fbc, #52addd);
  color: #fff !important;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 16px 35px rgba(23, 78, 118, .35);
}

.daily-drive-fab:hover {
  transform: translateY(-2px);
}

.meta-suite-button.active {
  border-color: #2f8fca !important;
  background: #2f8fca !important;
  color: #fff !important;
}

.meta-suite-button.disabled {
  border-color: var(--border) !important;
  background: rgba(130, 145, 158, .14) !important;
  color: var(--muted) !important;
  cursor: not-allowed;
  opacity: .62;
}

.quick-status-select {
  min-width: 135px;
  padding: 7px 31px 7px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--card);
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.client-logo-dropzone {
  padding: 14px;
  border: 2px dashed var(--border);
  border-radius: 16px;
  transition: border-color .18s ease, background .18s ease, transform .18s ease;
}

.client-logo-dropzone.drag-active {
  border-color: #4ca6dc;
  background: rgba(76, 166, 220, .09);
  transform: scale(1.006);
}

.client-logo-dropzone strong {
  display: block;
  margin-bottom: 8px;
}

.calendar-brand-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.calendar-brand-left .calendar-logo {
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.calendar-month-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

@media (max-width: 760px) {
  .daily-publications-hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .daily-publications-summary {
    width: 100%;
  }

  .daily-publications-summary > div {
    flex: 1;
  }

  .daily-drive-fab {
    right: 16px;
    bottom: 16px;
  }

  .calendar-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .calendar-month-actions {
    margin-left: 0;
  }
}


/* ============================================================
   v61 — listas compactas e edição por linha
   ============================================================ */

.daily-publications-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-bottom: 98px;
}

.daily-publication-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.05fr) minmax(280px, 2fr) auto;
  align-items: center;
  gap: 18px;
  min-height: 86px;
  padding: 13px 17px;
  border: 1px solid var(--border);
  border-radius: 17px;
  background: var(--card);
  box-shadow: 0 8px 23px rgba(12, 41, 64, .07);
  cursor: pointer;
  transition: transform .17s ease, border-color .17s ease, box-shadow .17s ease, opacity .17s ease;
}

.daily-publication-row:hover {
  transform: translateY(-1px);
  border-color: rgba(66, 158, 214, .55);
  box-shadow: 0 13px 28px rgba(12, 41, 64, .11);
}

.daily-publication-row.is-published {
  opacity: 1;
  background: linear-gradient(135deg, rgba(83, 191, 134, 0.24), rgba(83, 191, 134, 0.12));
  border-color: rgba(75, 190, 128, 0.76);
  box-shadow: 0 12px 28px rgba(75, 190, 128, 0.14), inset 0 0 0 9999px rgba(83, 191, 134, 0.04);
}
body.dark-theme .daily-publication-row.is-published {
  background: linear-gradient(135deg, rgba(60, 190, 126, 0.24), rgba(42, 122, 86, 0.24));
  border-color: rgba(77, 206, 143, 0.76);
  box-shadow: 0 12px 28px rgba(28, 142, 88, 0.18), inset 0 0 0 9999px rgba(77, 206, 143, 0.06);
}
.daily-publication-row.is-published:hover {
  border-color: rgba(77, 206, 143, 0.9);
  box-shadow: 0 14px 30px rgba(28, 142, 88, 0.22), inset 0 0 0 9999px rgba(77, 206, 143, 0.08);
}

.daily-row-client,
.demand-client-cell {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.daily-row-client > div:last-child,
.demand-client-cell > div:last-child {
  min-width: 0;
}

.daily-row-client strong,
.daily-row-client small,
.demand-client-cell strong,
.demand-client-cell small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.daily-row-client small,
.demand-client-cell small {
  margin-top: 3px;
  color: var(--muted);
}

.daily-row-publication {
  min-width: 0;
}

.daily-row-publication > strong,
.daily-row-publication > small {
  display: block;
}

.daily-row-publication > strong {
  margin-top: 7px;
  overflow: hidden;
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.daily-row-publication > small {
  margin-top: 4px;
  color: var(--muted);
}

.daily-row-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
}

.daily-row-toggle {
  width: 50px;
  height: 28px;
}

.daily-drive-fab-large {
  padding: 18px 27px;
  font-size: 14px;
  box-shadow: 0 18px 42px rgba(23, 78, 118, .44);
}

.demands-progress-table td {
  vertical-align: middle;
}

.demand-client-cell {
  min-width: 220px;
}

.demand-format-chip {
  display: inline-flex;
  align-items: center;
  min-height: 29px;
  padding: 5px 11px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: color-mix(in srgb, var(--card) 84%, var(--primary) 16%);
  font-size: 12px;
  font-weight: 800;
}

.quick-status-select {
  min-width: 148px;
  min-height: 34px;
  padding: 7px 34px 7px 12px;
  border-width: 1px;
  border-style: solid;
  border-radius: 999px;
  color: #102235;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.2;
  cursor: pointer;
  color-scheme: light;
}

.quick-status-select.status-ideia {
  border-color: #91a0ad;
  background: #e9eef2;
  color: #354656;
}

.quick-status-select.status-em-andamento,
.quick-status-select.status-andamento {
  border-color: #d8ae34;
  background: #f7d96b;
  color: #4b3900;
}

.quick-status-select.status-concluidos,
.quick-status-select.status-concluido {
  border-color: #9e66bc;
  background: #d9b6e9;
  color: #462255;
}

.quick-status-select.status-publicado {
  border-color: #269467;
  background: #b7e5ce;
  color: #124f36;
}

/* O menu nativo costuma abrir branco no Windows. */
.quick-status-select option {
  background: #ffffff !important;
  color: #132333 !important;
  font-weight: 700;
}

html[data-theme="dark"] .quick-status-select,
body.dark .quick-status-select {
  color-scheme: light;
}

.publication-edit-row td,
.demand-progress-row td {
  transition: background .15s ease;
}

.publication-edit-row:hover td,
.demand-progress-row:hover td {
  background: color-mix(in srgb, var(--card) 86%, var(--primary) 14%);
}

.publications-table .drive-status-btn,
.demands-progress-table .drive-status-btn {
  min-width: 72px;
  justify-content: center;
}

@media (max-width: 980px) {
  .daily-publication-row {
    grid-template-columns: minmax(190px, 1fr) minmax(230px, 1.5fr) auto;
  }
}

@media (max-width: 760px) {
  .daily-publication-row {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .daily-row-actions {
    justify-content: space-between;
  }

  .daily-drive-fab-large {
    padding: 16px 21px;
  }
}


/* ============================================================
   v62 — status colorido legível em Demandas em andamento
   ============================================================ */

.demands-progress-table .quick-status-select {
  display: inline-block;
  width: auto;
  min-width: 145px;
  min-height: 32px;
  padding: 6px 34px 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.1;
  opacity: 1 !important;
  -webkit-text-fill-color: currentColor;
}

.demands-progress-table .quick-status-select.status-ideia {
  border-color: #c7ced5 !important;
  background-color: #e5e7eb !important;
  color: #4b5563 !important;
}

.demands-progress-table .quick-status-select.status-em-andamento {
  border-color: #e0b62e !important;
  background-color: #f4d35e !important;
  color: #6b4f00 !important;
}

.demands-progress-table .quick-status-select.status-concluidos {
  border-color: #9d69bd !important;
  background-color: #b785d5 !important;
  color: #ffffff !important;
}

.demands-progress-table .quick-status-select.status-publicado {
  border-color: #459e70 !important;
  background-color: #5ab784 !important;
  color: #ffffff !important;
}

body.dark-theme .demands-progress-table .quick-status-select {
  color-scheme: light;
  opacity: 1 !important;
}

body.dark-theme .demands-progress-table .quick-status-select option,
.demands-progress-table .quick-status-select option {
  background: #ffffff !important;
  color: #132333 !important;
  -webkit-text-fill-color: #132333 !important;
  font-weight: 700;
}


/* ============================================================
   v64 — WhatsApp por cliente e responsividade completa
   ============================================================ */

.whatsapp-copy-btn {
  border-color: #1f9f61 !important;
  background: #e8f8ef !important;
  color: #12623b !important;
  white-space: nowrap;
}

.whatsapp-copy-btn:hover {
  border-color: #14844d !important;
  background: #d8f2e4 !important;
}

.whatsapp-copy-btn.disabled,
.whatsapp-copy-btn:disabled {
  border-color: var(--border) !important;
  background: color-mix(in srgb, var(--card) 88%, #8897a5 12%) !important;
  color: var(--muted) !important;
  cursor: not-allowed;
  opacity: .65;
}

.table-scroll {
  width: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  -webkit-overflow-scrolling: touch;
}

.table-scroll > .table {
  min-width: 720px;
}

img,
video,
canvas,
svg {
  max-width: 100%;
}

.main {
  min-width: 0;
}

.card,
.hero-card,
.calendar-presentation,
.traffic-card,
.client-group {
  min-width: 0;
}

.toolbar,
.topbar,
.section-title,
.actions {
  min-width: 0;
}

.tabs {
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.tabs button {
  flex: 0 0 auto;
  white-space: nowrap;
}

.calendar-grid-wrap {
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  -webkit-overflow-scrolling: touch;
}

.calendar-grid {
  min-width: 760px;
}

@media (max-width: 1024px) {
  .main {
    padding: 22px;
  }

  .sidebar {
    padding: 18px 20px;
  }

  .brand {
    max-width: 260px;
  }

  .daily-publication-row {
    grid-template-columns: minmax(180px, 1fr) minmax(230px, 1.4fr);
  }

  .daily-row-actions {
    grid-column: 1 / -1;
    justify-content: flex-end;
  }

  .calendar-board {
    display: block;
  }

  .month-side {
    writing-mode: horizontal-tb;
    transform: none;
    padding: 0 0 12px;
    font-size: 30px;
  }
}

@media (max-width: 760px) {
  html,
  body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  body {
    font-size: 14px;
  }

  .app-shell {
    display: block;
    width: 100%;
  }

  .sidebar {
    position: relative;
    width: 100%;
    min-height: auto;
    height: auto;
    padding: 14px;
    gap: 12px;
  }

  .brand {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: none;
    gap: 12px;
  }

  .brand img {
    width: min(165px, 48vw);
    height: auto;
  }

  .brand span {
    display: none;
  }

  .daily-nav-button {
    margin: 10px 0;
  }

  .nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
  }

  .nav button {
    width: 100%;
    padding: 10px 8px;
    text-align: center;
    font-size: 12px;
  }

  .sidebar-bottom {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-top: 12px;
    padding: 12px 0 0;
  }

  .sidebar-user {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 4px 10px;
  }

  .sidebar-user small {
    grid-column: 1;
  }

  .sidebar-logout {
    grid-column: 2;
    grid-row: 1 / span 2;
  }

  .sidebar-tools {
    width: 100%;
  }

  .main {
    width: 100%;
    max-width: 100%;
    padding: 14px;
  }

  .topbar {
    align-items: stretch;
    flex-direction: column;
    gap: 14px;
  }

  .topbar > div:last-child,
  .topbar > button,
  .topbar .btn {
    max-width: 100%;
  }

  .topbar > div:last-child {
    width: 100%;
  }

  .topbar > div:last-child .btn {
    flex: 1 1 auto;
  }

  .toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .toolbar .input,
  .toolbar .select,
  .toolbar input,
  .toolbar select {
    width: 100% !important;
    max-width: none !important;
  }

  .grid.cols-4,
  .grid.cols-3,
  .grid.cols-2,
  .report-kpi-mini {
    grid-template-columns: 1fr !important;
  }

  .card,
  .hero-card,
  .money-card,
  .traffic-card {
    padding: 15px;
    border-radius: 16px;
  }

  .section-title {
    align-items: flex-start;
    flex-direction: column;
  }

  .section-title > div:last-child,
  .section-title .actions {
    width: 100%;
  }

  .actions {
    align-items: stretch;
    flex-direction: column;
  }

  .actions .btn,
  .modal-top-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .modal-backdrop {
    align-items: flex-start;
    padding: 8px;
    overflow-y: auto;
  }

  .modal {
    width: 100%;
    max-width: none;
    max-height: none;
    margin: 0;
    padding: 16px;
    border-radius: 16px;
  }

  .modal-header {
    gap: 12px;
  }

  .modal-top-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .modal-top-actions .close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 36px;
  }

  .form-grid {
    grid-template-columns: 1fr !important;
  }

  .form-grid label,
  .form-grid .full {
    grid-column: auto !important;
    min-width: 0;
  }

  .logo-upload-row,
  .client-logo-dropzone {
    align-items: flex-start;
    flex-direction: column;
  }

  .logo-preview {
    width: 100%;
    min-height: 150px;
  }

  .daily-publications-hero {
    padding: 22px 18px;
  }

  .daily-publications-summary {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .daily-publication-row {
    grid-template-columns: 1fr;
    gap: 13px;
  }

  .daily-row-actions {
    grid-column: auto;
    justify-content: stretch;
    flex-wrap: wrap;
  }

  .daily-row-actions .btn {
    flex: 1 1 145px;
    justify-content: center;
  }

  .daily-row-toggle {
    margin-left: auto;
  }

  .daily-drive-fab {
    right: 14px;
    bottom: 14px;
    left: 14px;
    width: auto;
    text-align: center;
  }

  .calendar-head {
    align-items: stretch;
    flex-direction: column;
  }

  .calendar-brand-left {
    align-items: flex-start;
    flex-direction: column;
  }

  .calendar-title h2 {
    text-align: left;
    font-size: 27px;
  }

  .calendar-month-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
    margin-left: 0;
  }

  .calendar-month-actions .btn {
    width: 100%;
  }

  .calendar-grid {
    min-width: 700px;
  }

  .calendar-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .calendar-footer > div:last-child {
    display: grid !important;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .calendar-footer .btn {
    width: 100%;
  }

  .kanban-board {
    grid-template-columns: 1fr !important;
  }

  .kanban-column {
    min-width: 0;
  }

  .agenda-calendar {
    grid-template-columns: 1fr !important;
  }

  .traffic-inline-data {
    align-items: stretch;
    flex-direction: column;
  }

  .traffic-inline-data > * {
    width: 100%;
  }

  /* Tabelas viram cartões no celular */
  .table-scroll {
    overflow: visible;
  }

  .demands-progress-table,
  .publications-table,
  .clients-table {
    display: block;
    min-width: 0 !important;
    width: 100%;
  }

  .demands-progress-table thead,
  .publications-table thead,
  .clients-table thead {
    display: none;
  }

  .demands-progress-table tbody,
  .publications-table tbody,
  .clients-table tbody {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
  }

  .demands-progress-table tr,
  .publications-table tr,
  .clients-table tr {
    display: block;
    width: 100%;
    padding: 13px;
    border: 1px solid var(--border);
    border-radius: 15px;
    background: var(--card);
    box-shadow: 0 7px 20px rgba(10, 35, 55, .07);
  }

  .demands-progress-table td,
  .publications-table td,
  .clients-table td {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-width: 0 !important;
    padding: 8px 0 !important;
    border: 0 !important;
    gap: 13px;
    text-align: right;
  }

  .demands-progress-table td::before,
  .publications-table td::before,
  .clients-table td::before {
    content: attr(data-label);
    flex: 0 0 88px;
    color: var(--muted);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .05em;
    text-align: left;
    text-transform: uppercase;
  }

  .demands-progress-table td[data-label="Cliente"],
  .publications-table td[data-label="Publicação"],
  .publications-table td[data-label="Cliente"],
  .clients-table td[data-label="Cliente"] {
    align-items: flex-start;
  }

  .demands-progress-table td[data-label="Cliente"] > *,
  .publications-table td[data-label="Publicação"] > *,
  .publications-table td[data-label="Cliente"] > *,
  .clients-table td[data-label="Cliente"] > * {
    min-width: 0;
    text-align: left;
  }

  .demand-client-cell {
    flex: 1;
    min-width: 0;
  }

  .quick-status-select {
    width: min(180px, 100%);
    min-width: 0;
  }

  .drive-status-btn {
    width: auto;
  }

  .client-cell {
    min-width: 0;
  }

  .client-cell strong,
  .demand-client-cell strong,
  .demand-client-cell small {
    overflow-wrap: anywhere;
    white-space: normal;
  }

  .blog-image-upload,
  .report-drop-zone,
  .client-logo-dropzone {
    min-width: 0;
  }
}

@media (max-width: 420px) {
  .main {
    padding: 10px;
  }

  .nav {
    grid-template-columns: 1fr;
  }

  .daily-publications-summary {
    grid-template-columns: 1fr;
  }

  .modal-top-actions {
    grid-template-columns: 1fr;
  }

  .demands-progress-table td,
  .publications-table td,
  .clients-table td {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
    text-align: left;
  }

  .demands-progress-table td::before,
  .publications-table td::before,
  .clients-table td::before {
    flex-basis: auto;
  }

  .quick-status-select,
  .drive-status-btn {
    width: 100%;
  }
}


/* ============================================================
   v67 — Dashboard com responsáveis em destaque
   ============================================================ */

.dashboard-topbar {
  margin-bottom: 18px;
}

.dashboard-intro {
  max-width: 680px;
  margin: 7px 0 0;
  color: var(--muted);
}

.dashboard-top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.dashboard-focus-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(270px, .65fr);
  align-items: stretch;
  gap: 18px;
}

.dashboard-responsibles-panel {
  position: relative;
  overflow: hidden;
  padding: 24px;
  border-color: rgba(66, 155, 211, .42);
  background:
    radial-gradient(circle at 0 0, rgba(76, 166, 220, .14), transparent 38%),
    var(--card);
  box-shadow:
    0 20px 48px rgba(15, 58, 88, .13),
    inset 0 1px 0 rgba(255,255,255,.12);
}

.dashboard-responsibles-panel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 7px;
  height: 100%;
  background: linear-gradient(180deg, #4ca6dc, #1d648f);
}

.dashboard-responsibles-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
  padding-left: 7px;
}

.dashboard-responsibles-header h2 {
  margin: 2px 0 5px;
  font-size: clamp(24px, 3vw, 34px);
}

.dashboard-responsibles-header small {
  color: var(--muted);
}

.dashboard-responsibles-total {
  min-width: 105px;
  padding: 12px 15px;
  border: 1px solid rgba(76, 166, 220, .28);
  border-radius: 16px;
  background: color-mix(in srgb, var(--card) 82%, #4ca6dc 18%);
  text-align: center;
}

.dashboard-responsibles-total strong,
.dashboard-responsibles-total span {
  display: block;
}

.dashboard-responsibles-total strong {
  color: var(--primary);
  font-size: 27px;
  line-height: 1;
}

.dashboard-responsibles-total span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.dashboard-responsibles-list {
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.dashboard-responsible-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(190px, 1fr) minmax(330px, 1.45fr) auto;
  align-items: center;
  gap: 18px;
  min-height: 104px;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-left: 6px solid var(--responsible-accent);
  border-radius: 18px;
  background:
    linear-gradient(
      90deg,
      color-mix(in srgb, var(--responsible-accent) 12%, transparent),
      transparent 34%
    ),
    var(--card);
  box-shadow: 0 9px 24px rgba(12, 43, 67, .07);
  cursor: pointer;
  outline: none;
  transition:
    transform .17s ease,
    border-color .17s ease,
    box-shadow .17s ease,
    background .17s ease;
}

.dashboard-responsible-card:hover,
.dashboard-responsible-card:focus-visible {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--responsible-accent) 58%, var(--border));
  box-shadow: 0 16px 34px rgba(12, 43, 67, .14);
}

.dashboard-responsible-card:focus-visible {
  box-shadow:
    0 0 0 3px color-mix(in srgb, var(--responsible-accent) 28%, transparent),
    0 16px 34px rgba(12, 43, 67, .14);
}

.dashboard-responsible-identity {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.dashboard-responsible-avatar {
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: var(--responsible-accent);
  color: #fff;
  font-size: 21px;
  font-weight: 950;
  box-shadow: 0 9px 20px color-mix(in srgb, var(--responsible-accent) 28%, transparent);
}

.dashboard-responsible-name {
  min-width: 0;
}

.dashboard-responsible-name strong,
.dashboard-responsible-name small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-responsible-name strong {
  font-size: 16px;
}

.dashboard-responsible-name small {
  margin-top: 4px;
  color: var(--muted);
}

.dashboard-responsible-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(72px, 1fr));
  gap: 8px;
}

.responsible-stat {
  min-width: 0;
  padding: 10px 9px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: color-mix(in srgb, var(--card) 92%, #93a7b7 8%);
  text-align: center;
}

.responsible-stat.primary {
  border-color: color-mix(in srgb, var(--responsible-accent) 42%, var(--border));
  background: color-mix(in srgb, var(--card) 78%, var(--responsible-accent) 22%);
}

.responsible-stat strong,
.responsible-stat span {
  display: block;
}

.responsible-stat strong {
  color: var(--text);
  font-size: 20px;
  line-height: 1;
}

.responsible-stat.primary strong {
  color: var(--responsible-accent);
}

.responsible-stat span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 850;
  line-height: 1.15;
}

.dashboard-responsible-open {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
  color: var(--responsible-accent);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.dashboard-responsible-open strong {
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--responsible-accent) 16%, transparent);
  font-size: 18px;
  transition: transform .17s ease;
}

.dashboard-responsible-card:hover .dashboard-responsible-open strong {
  transform: translateX(3px);
}

.dashboard-responsibles-empty {
  padding: 34px 20px;
  border: 1px dashed var(--border);
  border-radius: 18px;
  text-align: center;
}

.dashboard-responsibles-empty p {
  color: var(--muted);
}

.dashboard-side-column {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.dashboard-side-card {
  flex: 1 1 0;
  min-height: 0;
}

.dashboard-metric-card {
  display: flex;
  align-items: center;
}

.dashboard-metric-card .metric {
  width: 100%;
}

.dashboard-agenda-section {
  margin-top: 18px;
}

body.dark-theme .dashboard-responsibles-panel {
  background:
    radial-gradient(circle at 0 0, rgba(76, 166, 220, .16), transparent 38%),
    var(--card);
}

body.dark-theme .dashboard-responsible-card {
  background:
    linear-gradient(
      90deg,
      color-mix(in srgb, var(--responsible-accent) 17%, transparent),
      transparent 34%
    ),
    var(--card);
}

@media (max-width: 1180px) {
  .dashboard-focus-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-side-column {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .dashboard-responsible-card {
    grid-template-columns: 1fr auto;
  }

  .dashboard-responsible-stats {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .dashboard-responsible-open {
    grid-column: 2;
    grid-row: 1;
  }

  .dashboard-side-column {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .dashboard-responsibles-panel {
    padding: 18px 14px 16px 20px;
  }

  .dashboard-responsibles-header {
    align-items: stretch;
    flex-direction: column;
  }

  .dashboard-responsibles-total {
    width: 100%;
  }

  .dashboard-responsible-card {
    grid-template-columns: 1fr;
    gap: 13px;
    padding: 15px;
  }

  .dashboard-responsible-open {
    grid-column: auto;
    grid-row: auto;
    justify-content: space-between;
    width: 100%;
    padding-top: 10px;
    border-top: 1px solid var(--border);
  }

  .dashboard-responsible-stats {
    grid-column: auto;
    grid-row: auto;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-responsible-name strong,
  .dashboard-responsible-name small {
    white-space: normal;
  }
}


/* ============================================================
   v68 — Dashboard reorganizado e simplificado
   ============================================================ */

.dashboard-clean-topbar {
  margin-bottom: 18px;
}

.dashboard-clean-intro {
  max-width: 620px;
  margin: 7px 0 0;
  color: var(--muted);
}

.dashboard-clean-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, .65fr);
  align-items: start;
  gap: 18px;
}

.dashboard-access-panel {
  position: relative;
  overflow: hidden;
  padding: 24px;
  border-color: rgba(76, 166, 220, .42);
  background:
    radial-gradient(circle at 0 0, rgba(76, 166, 220, .12), transparent 38%),
    var(--card);
  box-shadow: 0 18px 42px rgba(12, 43, 67, .11);
}

.dashboard-access-panel::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 6px;
  background: linear-gradient(180deg, #4ca6dc, #1e668f);
}

.dashboard-access-header {
  margin-bottom: 17px;
  padding-left: 5px;
}

.dashboard-access-header h2 {
  margin: 3px 0 5px;
  font-size: clamp(25px, 3vw, 34px);
}

.dashboard-access-header small {
  color: var(--muted);
}

.dashboard-access-list {
  display: grid;
  gap: 11px;
}

.dashboard-access-card {
  width: 100%;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-height: 78px;
  padding: 13px 15px;
  border: 1px solid var(--border);
  border-left: 5px solid var(--access-accent);
  border-radius: 16px;
  background:
    linear-gradient(
      90deg,
      color-mix(in srgb, var(--access-accent) 11%, transparent),
      transparent 35%
    ),
    var(--card);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  box-shadow: 0 7px 20px rgba(12, 43, 67, .06);
  transition:
    transform .17s ease,
    border-color .17s ease,
    box-shadow .17s ease;
}

.dashboard-access-card:hover,
.dashboard-access-card:focus-visible {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--access-accent) 58%, var(--border));
  box-shadow: 0 13px 28px rgba(12, 43, 67, .13);
  outline: none;
}

.dashboard-access-avatar {
  width: 45px;
  height: 45px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--access-accent);
  color: #fff;
  font-size: 18px;
  font-weight: 950;
  box-shadow: 0 8px 18px color-mix(in srgb, var(--access-accent) 25%, transparent);
}

.dashboard-access-person {
  min-width: 0;
}

.dashboard-access-person strong,
.dashboard-access-person small {
  display: block;
}

.dashboard-access-person strong {
  overflow: hidden;
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-access-person small {
  margin-top: 3px;
  color: var(--muted);
}

.dashboard-access-action {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--access-accent);
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

.dashboard-access-action strong {
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: color-mix(in srgb, var(--access-accent) 15%, transparent);
  font-size: 17px;
  transition: transform .17s ease;
}

.dashboard-access-card:hover .dashboard-access-action strong {
  transform: translateX(3px);
}

.dashboard-access-empty {
  padding: 30px 18px;
  border: 1px dashed var(--border);
  border-radius: 16px;
  text-align: center;
}

.dashboard-access-empty p {
  color: var(--muted);
}

.dashboard-summary-column {
  display: grid;
  align-content: start;
  gap: 18px;
  min-width: 0;
}

.dashboard-payment-card,
.dashboard-summary-card {
  min-width: 0;
  height: auto;
  min-height: 0;
  overflow: hidden;
}

.dashboard-payment-card {
  padding: 21px;
}

.dashboard-payment-card h2 {
  max-width: 100%;
  margin: 8px 0 10px;
  font-size: clamp(25px, 2.5vw, 40px);
  line-height: 1.02;
  overflow-wrap: anywhere;
}

.dashboard-payment-card p {
  margin: 0 0 8px;
  line-height: 1.45;
}

.dashboard-payment-card small,
.dashboard-payment-card .money-value {
  display: block;
  margin-top: 7px;
}

.dashboard-summary-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.dashboard-summary-card {
  display: flex;
  align-items: center;
  padding: 20px;
}

.dashboard-summary-card .metric {
  width: 100%;
  min-width: 0;
}

.dashboard-summary-card .metric small,
.dashboard-summary-card .metric span,
.dashboard-summary-card .metric strong {
  display: block;
}

.dashboard-summary-card .metric strong {
  margin: 7px 0;
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1;
}

.dashboard-summary-card .metric span {
  overflow-wrap: anywhere;
  line-height: 1.35;
}

.dashboard-clean-agenda {
  margin-top: 18px;
}

body.dark-theme .dashboard-access-panel {
  background:
    radial-gradient(circle at 0 0, rgba(76, 166, 220, .15), transparent 38%),
    var(--card);
}

body.dark-theme .dashboard-access-card {
  background:
    linear-gradient(
      90deg,
      color-mix(in srgb, var(--access-accent) 16%, transparent),
      transparent 35%
    ),
    var(--card);
}

@media (max-width: 1180px) {
  .dashboard-clean-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-summary-column {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  }

  .dashboard-summary-pair {
    height: 100%;
  }
}

@media (max-width: 820px) {
  .dashboard-summary-column {
    grid-template-columns: 1fr;
  }

  .dashboard-summary-pair {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .dashboard-access-panel {
    padding: 19px 14px 15px 20px;
  }

  .dashboard-access-card {
    grid-template-columns: auto minmax(0, 1fr) auto;
    padding: 12px;
  }

  .dashboard-access-action > span {
    display: none;
  }

  .dashboard-summary-pair {
    grid-template-columns: 1fr;
  }

  .dashboard-payment-card h2 {
    font-size: 28px;
  }
}

@media (max-width: 420px) {
  .dashboard-access-card {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .dashboard-access-action {
    grid-column: 1 / -1;
    justify-content: space-between;
    padding-top: 9px;
    border-top: 1px solid var(--border);
  }

  .dashboard-access-action > span {
    display: inline;
  }
}


/* ============================================================
   v69 — Avatares dos responsáveis padronizados
   ============================================================ */

.dashboard-access-avatar {
  background: #4d95c6 !important;
  box-shadow: 0 8px 18px rgba(77, 149, 198, .28) !important;
}


/* ============================================================
   v70 — Blog, aprovação, calendário e janelas independentes
   ============================================================ */

/* Janelas internas */
.workspace-tabs-bar {
  position: sticky;
  top: 0;
  z-index: 80;
  display: flex;
  align-items: stretch;
  gap: 7px;
  width: 100%;
  margin: -10px 0 18px;
  padding: 8px 0 9px;
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg) 94%, transparent);
  backdrop-filter: blur(14px);
}

.workspace-tabs-scroll {
  display: flex;
  flex: 1;
  gap: 5px;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: thin;
}

.workspace-tab {
  display: flex;
  align-items: center;
  min-width: 160px;
  max-width: 270px;
  border: 1px solid var(--border);
  border-radius: 11px 11px 0 0;
  background: color-mix(in srgb, var(--card) 83%, #8294a3 17%);
  overflow: hidden;
}

.workspace-tab.active {
  border-color: rgba(76, 166, 220, .7);
  background: var(--card);
  box-shadow: inset 0 -3px 0 #4ca6dc;
}

.workspace-tab-open {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
  padding: 10px 6px 10px 11px;
  border: 0;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}

.workspace-tab-icon {
  color: #4ca6dc;
  font-size: 12px;
}

.workspace-tab-label {
  overflow: hidden;
  font-size: 12px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workspace-tab-close {
  width: 31px;
  align-self: stretch;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 16px;
}

.workspace-tab-close:hover {
  background: rgba(210, 74, 74, .12);
  color: #c84b4b;
}

.workspace-tab-add {
  width: 39px;
  flex: 0 0 39px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--card);
  color: var(--text);
  cursor: pointer;
  font-size: 22px;
}

.workspace-tab-add:hover {
  border-color: #4ca6dc;
  color: #4ca6dc;
}

.workspace-page-content {
  min-width: 0;
}

/* Blog */
.blog-send-all-fab {
  position: fixed;
  right: 28px;
  bottom: 25px;
  z-index: 70;
  padding: 16px 23px;
  border: 1px solid #2b8ac4;
  border-radius: 999px;
  background: linear-gradient(135deg, #247fbc, #52addd);
  color: #fff;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 18px 38px rgba(23, 78, 118, .36);
}

.blog-send-all-fab:hover {
  transform: translateY(-2px);
}

/* Aprovação do cliente */
.client-approval-panel {
  border-color: rgba(76, 166, 220, .42);
}

.client-approval-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 20px;
  padding: 17px;
  border: 1px solid var(--border);
  border-radius: 17px;
  background: color-mix(in srgb, var(--card) 84%, #4ca6dc 16%);
}

.client-approval-button {
  flex: 0 0 auto;
}

/* Etiquetas de formato */
.format-chip {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 4px 8px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}

.format-post-unico {
  border-color: #38996c;
  background: #c9eddc;
  color: #145b3d;
}

.format-carrossel {
  border-color: #438fc4;
  background: #cbe6f7;
  color: #174f76;
}

.format-reels {
  border-color: #c25592;
  background: #f4cde3;
  color: #78214f;
}

.format-stories {
  border-color: #c84f53;
  background: #f6d0d2;
  color: #7b2024;
}

.format-outro {
  border-color: #82909d;
  background: #e3e8ec;
  color: #354656;
}

.cal-post-tags {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 7px;
}

.cal-post-drive-row {
  display: flex;
  justify-content: flex-end;
  margin-top: 7px;
}

.calendar-post-drive {
  min-height: 24px;
  padding: 4px 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 9px;
  font-weight: 900;
  text-decoration: none;
}

.calendar-post-drive.active {
  border-color: #318ec5;
  background: #318ec5;
  color: #fff;
}

.calendar-post-drive.disabled {
  background: rgba(130, 145, 158, .12);
  color: var(--muted);
  opacity: .6;
  cursor: not-allowed;
}

/* Destaque dos responsáveis no dashboard */
.dashboard-access-card {
  border-color: #69afe0 !important;
  border-left-color: #8ac9ef !important;
  background: #69afe0 !important;
  color: #0e3451 !important;
}

.dashboard-access-avatar {
  background: #123f63 !important;
  color: #fff !important;
  box-shadow: 0 8px 18px rgba(18, 63, 99, .3) !important;
}

.dashboard-access-person strong,
.dashboard-access-person small,
.dashboard-access-action {
  color: #0e3451 !important;
}

.dashboard-access-action strong {
  background: rgba(18, 63, 99, .17) !important;
}

.dashboard-access-card:hover,
.dashboard-access-card:focus-visible {
  border-color: #9ad7f7 !important;
  background: #7bbbea !important;
}

/* Modo escuro: etiquetas continuam legíveis */
body.dark-theme .format-post-unico {
  border-color: #4fc28b;
  background: #174f3a;
  color: #bff2d9;
}

body.dark-theme .format-carrossel {
  border-color: #61b4ec;
  background: #184a6c;
  color: #d0edff;
}

body.dark-theme .format-reels {
  border-color: #e17db7;
  background: #652647;
  color: #ffd8ed;
}

body.dark-theme .format-stories {
  border-color: #e87579;
  background: #67282b;
  color: #ffdcde;
}

body.dark-theme .format-outro {
  border-color: #8fa2b2;
  background: #334553;
  color: #e5eef4;
}

body.dark-theme .dashboard-access-card {
  background: #69afe0 !important;
  color: #0e3451 !important;
}

@media (max-width: 760px) {
  .workspace-tabs-bar {
    margin-top: -5px;
  }

  .workspace-tab {
    min-width: 145px;
  }

  .blog-send-all-fab {
    right: 14px;
    bottom: 14px;
    left: 14px;
    width: auto;
  }

  .client-approval-summary {
    align-items: stretch;
    flex-direction: column;
  }

  .client-approval-button {
    width: 100%;
  }
}


/* ============================================================
   v71 — Drive, janelas fixas e publicações em sanfona
   ============================================================ */

/* Drive destacado dentro da edição */
.drive-open-btn.active {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #318ec5 !important;
  background: linear-gradient(135deg, #247fbc, #4da8d9) !important;
  color: #fff !important;
  text-decoration: none;
  box-shadow: 0 10px 22px rgba(36, 127, 188, .24);
}

.drive-open-btn.active:hover {
  transform: translateY(-1px);
  background: linear-gradient(135deg, #1d70a8, #3d98ca) !important;
}

/* Botão do Drive no Kanban */
.kanban-drive-button {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  margin-top: 9px;
  padding: 7px 10px !important;
  border: 1px solid #318ec5 !important;
  border-radius: 9px !important;
  background: #318ec5 !important;
  color: #fff !important;
  font-size: 10px !important;
  line-height: 1 !important;
  text-decoration: none !important;
  box-shadow: 0 5px 12px rgba(49, 142, 197, .22);
}

.kanban-drive-button:hover {
  background: #247bad !important;
}

/* A barra fica discreta e presa no topo durante a rolagem */
.main {
  overflow: visible !important;
}

.workspace-tabs-bar {
  position: sticky !important;
  top: 0 !important;
  z-index: 300 !important;
  min-height: 40px;
  width: calc(100% + 56px) !important;
  box-sizing: border-box;
  margin: -28px -28px 16px !important;
  padding: 5px 28px 6px !important;
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg) 96%, transparent) !important;
  box-shadow: 0 5px 14px rgba(10, 35, 55, .07);
  backdrop-filter: blur(16px);
}

.workspace-tab {
  min-width: 145px !important;
  max-width: 235px !important;
  min-height: 32px;
  border-radius: 9px 9px 0 0 !important;
}

.workspace-tab-open {
  padding: 7px 5px 7px 9px !important;
}

.workspace-tab-label {
  font-size: 11px !important;
}

.workspace-tab-close {
  width: 27px !important;
}

.workspace-tab-add {
  width: 34px !important;
  flex-basis: 34px !important;
  font-size: 18px !important;
}

/* Sanfona de publicações por cliente */
.publication-client-accordion {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.publication-client-group {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--card);
  box-shadow: 0 9px 24px rgba(10, 35, 55, .07);
}

.publication-client-group.expanded {
  border-color: rgba(76, 166, 220, .52);
}

.publication-client-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 15px 17px;
  border: 0;
  background: color-mix(in srgb, var(--card) 91%, #4ca6dc 9%);
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.publication-client-toggle:hover {
  background: color-mix(in srgb, var(--card) 84%, #4ca6dc 16%);
}

.publication-client-identity {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.publication-client-identity > div:last-child {
  min-width: 0;
}

.publication-client-identity strong,
.publication-client-identity small {
  display: block;
}

.publication-client-identity strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.publication-client-identity small {
  margin-top: 4px;
  color: var(--muted);
}

.publication-client-arrow {
  width: 33px;
  height: 33px;
  flex: 0 0 33px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: color-mix(in srgb, var(--card) 75%, #4ca6dc 25%);
  color: var(--primary);
  font-size: 14px;
  font-weight: 900;
}

.publication-client-content {
  padding: 0 15px 15px;
  border-top: 1px solid var(--border);
}

.publication-client-content .table-scroll {
  margin-top: 12px;
}

.publication-client-content .table {
  box-shadow: none;
}

@media (max-width: 1024px) {
  .workspace-tabs-bar {
    width: calc(100% + 44px) !important;
  }
}

@media (max-width: 760px) {
  .workspace-tabs-bar {
    width: calc(100% + 28px) !important;
    margin: -14px -14px 14px !important;
    padding: 5px 14px 6px !important;
  }

  .workspace-tab {
    min-width: 132px !important;
  }

  .publication-client-toggle {
    padding: 13px;
  }

  .publication-client-content {
    padding: 0 10px 10px;
  }
}


/* ============================================================
   v72 — Cards clicáveis e fechamento por clique externo
   ============================================================ */

.collaborator-list-card,
.collaborator-client-calendar-card {
  position: relative;
  cursor: pointer;
  outline: none;
  transition:
    transform .17s ease,
    border-color .17s ease,
    box-shadow .17s ease,
    background .17s ease;
}

.collaborator-list-card:hover,
.collaborator-list-card:focus-visible,
.collaborator-client-calendar-card:hover,
.collaborator-client-calendar-card:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(76, 166, 220, .66);
  background: color-mix(in srgb, var(--card) 87%, #4ca6dc 13%);
  box-shadow: 0 15px 31px rgba(10, 38, 60, .14);
}

.collaborator-list-card:focus-visible,
.collaborator-client-calendar-card:focus-visible {
  box-shadow:
    0 0 0 3px rgba(76, 166, 220, .22),
    0 15px 31px rgba(10, 38, 60, .14);
}

.collaborator-edit-button {
  position: relative;
  z-index: 2;
}

.collaborator-card-hint,
.calendar-card-open-hint {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 13px;
  color: #4ca6dc;
  font-size: 11px;
  font-weight: 900;
}

.collaborator-card-hint strong,
.calendar-card-open-hint strong {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(76, 166, 220, .14);
  font-size: 16px;
  transition: transform .17s ease;
}

.collaborator-list-card:hover .collaborator-card-hint strong,
.collaborator-client-calendar-card:hover .calendar-card-open-hint strong {
  transform: translateX(3px);
}

.collaborator-client-calendar-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.collaborator-client-calendar-card p {
  margin: 12px 0 0;
}

/* Ajuda visual para indicar que o fundo fecha a janela */
.modal-backdrop {
  cursor: pointer;
}

.modal-backdrop .modal {
  cursor: default;
}

@media (max-width: 620px) {
  .collaborator-client-calendar-head {
    align-items: stretch;
    flex-direction: column;
  }

  .collaborator-client-calendar-head .badge {
    align-self: flex-start;
  }

  .collaborator-card-hint,
  .calendar-card-open-hint {
    justify-content: space-between;
    padding-top: 10px;
    border-top: 1px solid var(--border);
  }
}


/* ============================================================
   v73 reconstruída — Abas, autosave e Base de clientes
   ============================================================ */

/* Abas reorganizáveis */
.workspace-tabs-scroll {
  flex: 0 1 auto !important;
  max-width: 100%;
  align-items: stretch;
}

.workspace-tab {
  position: relative;
  cursor: grab;
  transition:
    transform .16s ease,
    background .16s ease,
    border-color .16s ease,
    box-shadow .16s ease,
    opacity .16s ease;
}

.workspace-tab:hover {
  transform: translateY(-1px);
  border-color: rgba(76, 166, 220, .75);
  background: color-mix(in srgb, var(--card) 76%, #4ca6dc 24%);
  box-shadow: 0 8px 18px rgba(10, 35, 55, .12);
}

.workspace-tab.dragging {
  opacity: .55;
  cursor: grabbing;
  transform: scale(.985);
}

.workspace-tab.drop-before::before,
.workspace-tab.drop-after::after {
  content: '';
  position: absolute;
  top: 3px;
  bottom: 3px;
  width: 3px;
  border-radius: 999px;
  background: #4ca6dc;
  box-shadow: 0 0 0 3px rgba(76, 166, 220, .16);
}

.workspace-tab.drop-before::before {
  left: -3px;
}

.workspace-tab.drop-after::after {
  right: -3px;
}

.workspace-tab-open {
  cursor: inherit;
}

.workspace-tab-add {
  position: static !important;
  align-self: stretch;
  flex: 0 0 34px !important;
  width: 34px !important;
  min-height: 32px;
  margin-left: 2px;
  transition:
    transform .16s ease,
    background .16s ease,
    border-color .16s ease,
    color .16s ease;
}

.workspace-tab-add:hover {
  transform: translateY(-1px);
  background: color-mix(in srgb, var(--card) 76%, #4ca6dc 24%);
}

/* O + fica dentro da mesma faixa rolável, imediatamente após a última aba */
.workspace-tabs-bar {
  justify-content: flex-start;
}

/* Base de clientes separada por responsável */
.clients-base-description {
  max-width: 620px;
  margin: 7px 0 0;
  color: var(--muted);
}

.clients-by-collaborator-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 18px;
}

.client-responsible-column {
  min-width: 0;
  padding: 0;
  overflow: hidden;
}

.client-responsible-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px;
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--card) 86%, #4ca6dc 14%);
}

.client-responsible-identity {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 11px;
}

.client-responsible-avatar {
  width: 43px;
  height: 43px;
  flex: 0 0 43px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: #4d95c6;
  color: #fff;
  font-size: 17px;
  font-weight: 950;
  box-shadow: 0 8px 18px rgba(77, 149, 198, .22);
}

.client-responsible-identity h2 {
  margin: 0;
  overflow: hidden;
  font-size: 19px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.client-responsible-identity small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
}

.client-responsible-count {
  flex: 0 0 auto;
  padding: 6px 10px;
  border: 1px solid rgba(76, 166, 220, .32);
  border-radius: 999px;
  background: color-mix(in srgb, var(--card) 76%, #4ca6dc 24%);
  color: var(--text);
  font-size: 10px;
  font-weight: 900;
}

.client-responsible-list {
  display: flex;
  flex-direction: column;
}

.client-responsible-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  min-height: 76px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  outline: none;
  transition:
    background .16s ease,
    transform .16s ease,
    box-shadow .16s ease;
}

.client-responsible-item:last-child {
  border-bottom: 0;
}

.client-responsible-item:hover,
.client-responsible-item:focus-visible {
  position: relative;
  z-index: 1;
  transform: translateY(-1px);
  background: color-mix(in srgb, var(--card) 82%, #4ca6dc 18%);
  box-shadow: 0 8px 22px rgba(10, 35, 55, .08);
}

.client-responsible-item:focus-visible {
  box-shadow:
    inset 0 0 0 2px rgba(76, 166, 220, .55),
    0 8px 22px rgba(10, 35, 55, .08);
}

.client-responsible-main {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 10px;
}

.client-responsible-copy {
  min-width: 0;
}

.client-responsible-copy strong,
.client-responsible-copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.client-responsible-copy small {
  margin-top: 4px;
  color: var(--muted);
}

.client-responsible-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex: 0 0 auto;
  gap: 9px;
  color: var(--muted);
  font-size: 11px;
}

.client-responsible-meta > strong {
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(76, 166, 220, .14);
  color: #4ca6dc;
  font-size: 15px;
  transition: transform .16s ease;
}

.client-responsible-item:hover .client-responsible-meta > strong {
  transform: translateX(3px);
}

.client-responsible-empty {
  padding: 28px 18px;
  color: var(--muted);
  text-align: center;
}

.modal-backdrop {
  cursor: pointer;
}

.modal-backdrop .modal {
  cursor: default;
}

@media (max-width: 1000px) {
  .clients-by-collaborator-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .client-responsible-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .client-responsible-item {
    align-items: flex-start;
    flex-direction: column;
  }

  .client-responsible-meta {
    justify-content: space-between;
    width: 100%;
  }

  .client-responsible-copy strong,
  .client-responsible-copy small {
    white-space: normal;
  }

  .workspace-tab {
    min-width: 132px !important;
  }
}


/* ============================================================
   v74 — Exclusão confirmada
   ============================================================ */

.modal .btn.danger:disabled {
  cursor: wait;
  opacity: .72;
}

/* ============================================================
   v77 — Experiência mobile fluida
   ============================================================ */

/* Estrutura do menu mobile. No computador, mantém o comportamento original. */
.mobile-sidebar-header,
.mobile-nav-panel {
  display: contents;
}

.mobile-menu-toggle {
  display: none;
}

/* Toggles com movimento físico mais perceptível e suave. */
.switch-toggle,
.traffic-switch span,
.published-toggle span {
  transition:
    background-color .3s cubic-bezier(.22, 1, .36, 1),
    border-color .3s cubic-bezier(.22, 1, .36, 1),
    box-shadow .3s cubic-bezier(.22, 1, .36, 1),
    transform .18s ease !important;
}

.switch-toggle span,
.traffic-switch span::after,
.published-toggle span::after {
  transition:
    transform .32s cubic-bezier(.22, 1, .36, 1),
    width .18s ease,
    box-shadow .25s ease !important;
  will-change: transform;
}

.switch-toggle:active span,
.traffic-switch:active span::after,
.published-toggle:active span::after {
  width: 25px;
}

.switch-toggle.active span {
  transform: translate3d(24px, 0, 0);
}

.traffic-switch input:checked + span::after {
  transform: translate3d(24px, 0, 0);
}

.published-toggle input:checked + span::after {
  transform: translate3d(21px, 0, 0);
}

.switch-toggle:focus-visible,
.traffic-switch input:focus-visible + span,
.published-toggle input:focus-visible + span {
  outline: 3px solid rgba(77, 149, 198, .24);
  outline-offset: 3px;
}

/* Botão do Drive também funciona visualmente como botão após o deep link. */
.daily-drive-fab {
  border: 0;
  cursor: pointer;
}

/* Alça exclusiva para arrastar no celular. */
.mobile-drag-handle {
  display: none;
}

.mobile-drag-ghost {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  z-index: 10000 !important;
  max-width: calc(100vw - 28px);
  margin: 0 !important;
  pointer-events: none !important;
  opacity: .94;
  transform: translate3d(-9999px, -9999px, 0);
  transform-origin: top left;
  box-shadow: 0 22px 48px rgba(5, 25, 40, .34) !important;
  filter: saturate(1.05);
  will-change: transform;
}

.mobile-card-dragging {
  overflow: hidden !important;
  overscroll-behavior: none;
  touch-action: none;
}

.mobile-is-dragging {
  opacity: .28 !important;
  transform: scale(.985) !important;
}

.mobile-drop-hover {
  border-color: #4d95c6 !important;
  background: rgba(77, 149, 198, .17) !important;
  box-shadow: inset 0 0 0 2px rgba(77, 149, 198, .34) !important;
}

@media (max-width: 760px) {
  html {
    scroll-behavior: smooth;
  }

  body {
    -webkit-tap-highlight-color: transparent;
    overscroll-behavior-y: contain;
  }

  /* Menu compacto, recolhido por padrão. */
  .sidebar {
    position: sticky !important;
    top: 0;
    z-index: 700;
    width: 100%;
    padding: 9px 12px !important;
    gap: 0 !important;
    box-shadow: 0 7px 18px rgba(7, 28, 45, .18);
  }

  .mobile-sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 48px;
  }

  .mobile-sidebar-header .brand {
    flex: 1;
    min-width: 0;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
  }

  .mobile-sidebar-header .brand img {
    width: min(145px, 48vw) !important;
    margin: 0 !important;
  }

  .mobile-menu-toggle {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 4px;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: 13px;
    background: rgba(255, 255, 255, .1);
    cursor: pointer;
    transition:
      background-color .24s ease,
      border-color .24s ease,
      transform .18s ease;
  }

  .mobile-menu-toggle:active {
    transform: scale(.94);
  }

  .mobile-menu-toggle span {
    width: 19px;
    height: 2px;
    border-radius: 999px;
    background: #fff;
    transform-origin: center;
    transition:
      transform .3s cubic-bezier(.22, 1, .36, 1),
      opacity .2s ease;
  }

  .mobile-menu-toggle.active {
    border-color: rgba(94, 190, 239, .7);
    background: rgba(77, 149, 198, .32);
  }

  .mobile-menu-toggle.active span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
  }

  .mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
    transform: scaleX(.35);
  }

  .mobile-menu-toggle.active span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
  }

  .mobile-nav-panel {
    display: grid;
    grid-template-rows: 0fr;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-7px);
    transition:
      grid-template-rows .36s cubic-bezier(.22, 1, .36, 1),
      opacity .24s ease,
      transform .3s cubic-bezier(.22, 1, .36, 1),
      visibility 0s linear .36s;
  }

  .mobile-nav-panel > * {
    min-height: 0;
    overflow: hidden;
  }

  .sidebar.mobile-open .mobile-nav-panel {
    grid-template-rows: 1fr;
    max-height: calc(100dvh - 68px);
    margin-top: 8px;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    transition:
      grid-template-rows .36s cubic-bezier(.22, 1, .36, 1),
      opacity .24s ease,
      transform .3s cubic-bezier(.22, 1, .36, 1),
      visibility 0s;
  }

  .sidebar .daily-nav-button {
    margin: 6px 0 9px !important;
  }

  .sidebar .nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sidebar .nav button {
    min-height: 43px;
    transition:
      background-color .18s ease,
      transform .14s ease,
      color .18s ease;
  }

  .sidebar .nav button:active {
    transform: scale(.97);
  }

  .sidebar-bottom {
    margin-top: 10px !important;
    padding-top: 10px !important;
  }

  /* A barra de janelas continua fixa, mas sem blur pesado no celular. */
  .workspace-tabs-bar {
    top: 66px !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background: var(--bg) !important;
  }

  /* Arraste por alça: rolagem normal no restante do card. */
  .cal-post,
  .kanban-card,
  .agenda-event {
    position: relative;
    touch-action: pan-x pan-y !important;
    contain: layout paint;
    padding-right: 38px !important;
    transform: translateZ(0);
  }

  .mobile-drag-handle {
    position: absolute;
    top: 7px;
    right: 7px;
    z-index: 8;
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border: 1px solid rgba(77, 149, 198, .3);
    border-radius: 9px;
    background: color-mix(in srgb, var(--card) 78%, #4d95c6 22%);
    color: var(--primary);
    font-size: 13px;
    font-weight: 900;
    line-height: 1;
    letter-spacing: -3px;
    cursor: grab;
    pointer-events: auto !important;
    touch-action: none !important;
    user-select: none;
    -webkit-user-select: none;
    box-shadow: 0 4px 10px rgba(9, 40, 62, .12);
    transition:
      transform .15s ease,
      background-color .18s ease,
      box-shadow .18s ease;
  }

  .mobile-drag-handle:active {
    cursor: grabbing;
    transform: scale(.91);
    background: #4d95c6;
    color: #fff;
    box-shadow: 0 7px 16px rgba(9, 40, 62, .2);
  }

  .cal-post .mobile-drag-handle,
  .agenda-event .mobile-drag-handle,
  .kanban-card .mobile-drag-handle {
    pointer-events: auto !important;
  }

  .cal-post *,
  .agenda-event * {
    pointer-events: auto;
  }

  .cal-post > *:not(.mobile-drag-handle),
  .agenda-event > *:not(.mobile-drag-handle) {
    pointer-events: none;
  }

  .kanban-board,
  .calendar-grid-wrap,
  .collaborator-agenda-calendar,
  .workspace-tabs-scroll {
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-inline: contain;
  }

  .kanban-column-body {
    min-height: 170px;
  }

  /* Menos efeitos caros durante rolagem em aparelhos móveis. */
  .modal,
  .card,
  .workspace-tab,
  .calendar-presentation,
  .kanban-column {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  .modal-backdrop {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  .btn,
  button,
  .card,
  .list-item,
  .kanban-card,
  .cal-post,
  .agenda-event {
    -webkit-tap-highlight-color: transparent;
  }
}

@media (max-width: 420px) {
  .sidebar .nav {
    grid-template-columns: 1fr;
  }

  .workspace-tabs-bar {
    top: 66px !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .switch-toggle,
  .switch-toggle span,
  .traffic-switch span,
  .traffic-switch span::after,
  .published-toggle span,
  .published-toggle span::after,
  .mobile-menu-toggle,
  .mobile-menu-toggle span,
  .mobile-nav-panel,
  .mobile-drag-handle {
    transition-duration: .01ms !important;
  }
}

/* Correção do recolhimento: todo o painel entra e sai como uma unidade. */
@media (max-width: 760px) {
  .mobile-nav-panel {
    display: block;
    max-height: 0;
    margin-top: 0;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-7px);
    transition:
      max-height .38s cubic-bezier(.22, 1, .36, 1),
      opacity .24s ease,
      transform .3s cubic-bezier(.22, 1, .36, 1),
      margin-top .3s ease,
      visibility 0s linear .38s;
  }

  .mobile-nav-panel > * {
    overflow: visible;
  }

  .sidebar.mobile-open .mobile-nav-panel {
    max-height: calc(100dvh - 68px);
    margin-top: 8px;
    overflow-y: auto;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
    transition:
      max-height .38s cubic-bezier(.22, 1, .36, 1),
      opacity .24s ease,
      transform .3s cubic-bezier(.22, 1, .36, 1),
      margin-top .3s ease,
      visibility 0s;
  }
}

/* Mantém a estrutura original da barra lateral no computador. */
@media (min-width: 761px) {
  .mobile-sidebar-header {
    display: block;
  }

  .mobile-nav-panel {
    display: flex;
    flex: 1;
    min-height: 0;
    flex-direction: column;
    justify-content: space-between;
  }
}

@media (max-width: 760px) {
  .mobile-card-dragging {
    overflow: auto !important;
    user-select: none;
    -webkit-user-select: none;
  }
}


/* v82 — Atalhos dos colaboradores na sidebar */
.sidebar-collaborator-shortcuts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 168px 12px 22px;
}

.sidebar-collaborator-shortcut {
  appearance: none;
  border: 1px solid rgba(160, 205, 242, 0.24);
  background: linear-gradient(145deg, rgba(255,255,255,0.10), rgba(255,255,255,0.035));
  color: #f7fbff;
  border-radius: 18px;
  min-height: 96px;
  padding: 12px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.sidebar-collaborator-shortcut:hover {
  transform: translateY(-2px);
  border-color: rgba(116, 181, 231, 0.58);
  background: linear-gradient(145deg, rgba(67, 151, 209, 0.32), rgba(255,255,255,0.06));
}

.sidebar-collaborator-shortcut span {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: rgba(79, 170, 222, 0.22);
  color: #ffffff;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: -0.04em;
  border: 1px solid rgba(132, 204, 245, 0.32);
}

.sidebar-collaborator-shortcut small {
  color: rgba(241, 248, 255, 0.84);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.1;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

body.dark-theme .sidebar-collaborator-shortcut {
  background: linear-gradient(145deg, rgba(255,255,255,0.085), rgba(255,255,255,0.025));
}

@media (max-height: 760px) {
  .sidebar-collaborator-shortcuts {
    margin-top: 72px;
  }

  .sidebar-collaborator-shortcut {
    min-height: 78px;
  }
}

@media (max-width: 980px) {
  .sidebar-collaborator-shortcuts {
    margin: 18px 0 8px;
  }
}


/* v83 — Tráfego pago: caixa ativa verde */
.traffic-client-active,
.traffic-client-card.active,
.traffic-row.active,
.trafego-row.active,
.traffic-item.active,
.paid-traffic-row.active,
.traffic-control-client.active,
.traffic-card.active,
.traffic-card.is-active,
.traffic-client-row.active,
.traffic-month-client.active {
  background: linear-gradient(135deg, rgba(65, 184, 126, 0.22), rgba(65, 184, 126, 0.10)) !important;
  border-color: rgba(65, 184, 126, 0.72) !important;
  box-shadow: 0 0 0 1px rgba(65, 184, 126, 0.22), 0 16px 38px rgba(65, 184, 126, 0.08) !important;
}

.traffic-client-active *,
.traffic-client-card.active *,
.traffic-row.active *,
.trafego-row.active *,
.traffic-item.active *,
.paid-traffic-row.active *,
.traffic-control-client.active *,
.traffic-card.active *,
.traffic-client-row.active *,
.traffic-month-client.active * {
  border-color: rgba(65, 184, 126, 0.38);
}

body.dark-theme .traffic-client-active,
body.dark-theme .traffic-client-card.active,
body.dark-theme .traffic-row.active,
body.dark-theme .trafego-row.active,
body.dark-theme .traffic-item.active,
body.dark-theme .paid-traffic-row.active,
body.dark-theme .traffic-control-client.active,
body.dark-theme .traffic-card.active,
body.dark-theme .traffic-card.is-active,
.traffic-card.is-active,
body.dark-theme .traffic-client-row.active,
body.dark-theme .traffic-month-client.active {
  background: linear-gradient(135deg, rgba(60, 190, 126, 0.24), rgba(42, 122, 86, 0.24)) !important;
  border-color: rgba(77, 206, 143, 0.76) !important;
  box-shadow: 0 0 0 1px rgba(77, 206, 143, 0.22), 0 18px 44px rgba(28, 142, 88, 0.14) !important;
}

body:not(.dark-theme) .traffic-client-active,
body:not(.dark-theme) .traffic-client-card.active,
body:not(.dark-theme) .traffic-row.active,
body:not(.dark-theme) .trafego-row.active,
body:not(.dark-theme) .traffic-item.active,
body:not(.dark-theme) .paid-traffic-row.active,
body:not(.dark-theme) .traffic-control-client.active,
body:not(.dark-theme) .traffic-card.active,
body:not(.dark-theme) .traffic-card.is-active,
.traffic-card.is-active,
body:not(.dark-theme) .traffic-client-row.active,
body:not(.dark-theme) .traffic-month-client.active {
  background: linear-gradient(135deg, rgba(83, 191, 134, 0.22), rgba(83, 191, 134, 0.10)) !important;
  border-color: rgba(75, 190, 128, 0.76) !important;
}


/* v88 — Sidebar mais compacta e abas deletáveis */
.sidebar {
  overflow: hidden;
}

.mobile-nav-panel {
  min-height: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.sidebar-collaborator-shortcuts {
  margin: 34px 12px 16px !important;
  gap: 12px !important;
}

.sidebar-collaborator-shortcut {
  min-height: 82px !important;
  border-radius: 16px !important;
}

.sidebar-collaborator-shortcut span {
  width: 40px !important;
  height: 40px !important;
  border-radius: 13px !important;
  font-size: 17px !important;
}

.sidebar-bottom {
  flex-shrink: 0;
  margin-top: 12px !important;
  padding: 12px 10px 0 !important;
  background: linear-gradient(180deg, rgba(10, 27, 43, 0), rgba(10, 27, 43, 0.28));
}

.sidebar-user.compact {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px !important;
  padding-bottom: 10px !important;
}

.sidebar-user.compact div {
  min-width: 0;
}

.sidebar-user.compact strong,
.sidebar-user.compact small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-user.compact .sidebar-logout {
  margin-top: 0 !important;
  flex: 0 0 auto;
  padding: 8px 10px !important;
}

.sidebar-sync {
  padding: 9px 12px !important;
  margin-bottom: 9px !important;
}

.sidebar-tools {
  gap: 8px !important;
}

.sidebar-settings-icon {
  width: 38px !important;
  height: 38px !important;
  flex-basis: 38px !important;
  border-radius: 11px !important;
}

.theme-toggle-row.compact {
  min-height: 38px;
}

@media (max-height: 760px) {
  .sidebar-collaborator-shortcuts {
    margin-top: 18px !important;
  }

  .sidebar-collaborator-shortcut {
    min-height: 68px !important;
    padding: 9px 6px !important;
  }

  .sidebar-collaborator-shortcut span {
    width: 34px !important;
    height: 34px !important;
    font-size: 15px !important;
  }

  .daily-nav-button {
    margin-bottom: 8px !important;
  }

  .nav button {
    min-height: 42px;
    padding-top: 10px;
    padding-bottom: 10px;
  }
}

@media (max-width: 980px) {
  .sidebar {
    overflow: visible;
  }

  .mobile-nav-panel {
    display: grid;
  }

  .sidebar-bottom {
    background: transparent;
  }
}


/* v91 — Menu mobile centralizado */
@media (max-width: 980px) {
  .sidebar.mobile-open {
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%) !important;
    width: min(92vw, 430px) !important;
    max-width: 430px !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    border-radius: 28px !important;
  }

  .sidebar.mobile-open .mobile-nav-panel {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  body:has(.sidebar.mobile-open) {
    overflow-x: hidden !important;
  }
}

@media (max-width: 520px) {
  .sidebar.mobile-open {
    width: calc(100vw - 28px) !important;
    max-width: calc(100vw - 28px) !important;
  }
}


/* v92 - Ctrl+Z / Desfazer */
.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: min(560px, calc(100vw - 32px));
}

.toast.hidden {
  display: none;
}

.toast-action {
  border: 1px solid rgba(255,255,255,.35);
  background: rgba(255,255,255,.16);
  color: #fff;
  border-radius: 999px;
  padding: 7px 12px;
  font-weight: 900;
  cursor: pointer;
}

.toast-action:hover {
  background: rgba(255,255,255,.26);
}


/* v96 - Prompts + ChatGPT, Radar e mobile */
.prompt-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.prompt-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface-2);
  padding: 18px;
  box-shadow: 0 10px 28px rgba(12, 41, 64, .08);
}

.prompt-card.inactive {
  opacity: .58;
}

.prompt-card h3 {
  margin: 12px 0 6px;
}

.prompt-card pre {
  white-space: pre-wrap;
  max-height: 180px;
  overflow: auto;
  margin: 14px 0;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.04);
  font-family: inherit;
  font-size: 12px;
  color: var(--muted);
}

.prompt-variable-help {
  display: grid;
  gap: 10px;
}

.prompt-variable-help div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.prompt-variable-help code,
.prompt-variable-help button {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text);
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 800;
}

.prompt-variable-help button {
  cursor: pointer;
}

.prompt-textarea {
  min-height: 320px;
  font-family: inherit;
  line-height: 1.45;
}

.prompt-chatgpt-button {
  width: 100%;
  background: linear-gradient(135deg, #1f6fa5, #4db3e6);
  border-color: rgba(104, 196, 245, .6);
  box-shadow: 0 12px 30px rgba(45, 150, 210, .18);
}

.sidebar-radar-button {
  width: 100%;
  border: 1px solid rgba(108, 190, 247, .34);
  border-radius: 14px;
  background: rgba(255,255,255,.06);
  color: #fff;
  font-weight: 900;
  padding: 12px 14px;
  margin: 12px 0 4px;
  cursor: pointer;
  text-align: left;
}

.sidebar-radar-button:hover {
  background: rgba(77, 149, 198, .22);
  border-color: rgba(108, 190, 247, .72);
}

.mobile-daily-shortcut {
  display: none;
}

@media (max-width: 760px) {
  .sidebar .daily-nav-button {
    display: none !important;
  }

  .mobile-daily-shortcut {
    position: fixed;
    right: 16px;
    bottom: 76px;
    z-index: 820;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(108, 190, 247, .42);
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(49, 141, 204, .92), rgba(61, 172, 219, .82));
    color: #fff;
    padding: 11px 14px;
    box-shadow: 0 18px 36px rgba(0,0,0,.22);
    font-weight: 900;
  }

  .mobile-daily-shortcut span {
    width: 12px;
    height: 12px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: rgba(255,255,255,.28);
    color: transparent;
  }

  .mobile-daily-shortcut.active {
    transform: translateY(-2px);
    border-color: rgba(255,255,255,.7);
  }

  .sidebar.mobile-open {
    position: fixed !important;
    top: 12px !important;
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%) !important;
    width: calc(100vw - 28px) !important;
    max-width: 430px !important;
    max-height: calc(100dvh - 24px) !important;
    overflow-y: auto !important;
    border-radius: 28px !important;
    z-index: 900 !important;
  }

  .sidebar.mobile-open .mobile-nav-panel {
    width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }
}
