@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,600;9..144,700&family=Inter:wght@400;500;600;700&display=swap');

:root {
  --coral: #FF5A5F;
  --coral-dark: #E8474C;
  --teal: #00A896;
  --teal-dark: #00857A;
  --off-white: #f2ecdd;
  --ink: #2B2622;
  --ink-soft: #6B6259;
  --line: #E8E0D6;
  --amber: #F2A93B;
  --gray-status: #B7AEA1;
  --card-bg: #FFFFFF;

  /* Tokens do redesign da aba Planejamento — aditivos, não substituem os acima
     (que Orçamento também usa). --green-900/--magenta promovem hex que já
     existiam soltos no CSS (mesmo valor, ver comentários abaixo); --status-navy
     é o --teal do mockup renomeado pra não colidir com o --teal já existente aqui. */
  --green-900: #1c361d;
  --green-800: #24422a;
  --green-700: #2f5236;
  --beige-soft: #f8f4e9;
  --mkt-white: #ffffff;
  --muted: #7a7566;
  --muted-soft: #a39d8b;
  --border: #e6dfc9;
  --border-soft: #ece6d4;
  --magenta: #e315e2;
  --magenta-soft: #fceafc;
  --yellow: #ffd150;
  --yellow-soft: #fff6e0;
  --lavender: #8a81fe;
  --lavender-soft: #eeecff;
  --status-navy: #17333f;
  --status-navy-soft: #e7eef0;
  --green-ok: #3f7a4a;
  --green-ok-soft: #e7f2e8;
  --red: #c65b4e;
  --red-soft: #fbeae7;
  --gray-soft: #eeece4;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 9px;
  --shadow-card: 0 1px 2px rgba(28,54,29,.05), 0 10px 28px -14px rgba(28,54,29,.16);
  --shadow-pop: 0 12px 36px -12px rgba(28,54,29,.30);
  --mkt-ease: cubic-bezier(0.23, 1, 0.32, 1);

  /* Tokens de tipografia — padronização 2026-08-26 (ver memória "Padronização de fontes"):
     antes disso cada arquivo CSS do Workspace tinha seu próprio valor solto pra título/
     botão/texto (~40 valores distintos fazendo o mesmo papel visual). Estes tokens vivem
     aqui porque marketing.css carrega primeiro e é reaproveitado por todo o resto — mesma
     lógica das cores acima. Cobrem por ora: título de página (h1), título de seção (h2/
     modal grande), título de card/subseção (h3/painel), botão, texto corrido e texto
     secundário/meta — as categorias citadas ao pedir a padronização. Rótulos minúsculos
     em caixa alta (abas, tags, contadores) e sub-níveis mais raros de heading ficam de fora
     desta primeira passada de propósito, pra não arriscar quebrar layouts apertados (ex:
     abas de etapa da Mídia Paga) sem poder testar visualmente logado no app de produção. */
  --fs-page-title: 28px;
  --fs-section-title: 19px;
  --fs-card-title: 16px;
  --fs-btn: 13px;
  --fs-btn-sm: 11.5px;
  --fs-body: 13px;
  --fs-body-sm: 12px;
  --fw-regular: 400;
  --fw-medium: 500;
  --fw-semibold: 600;
  --fw-bold: 700;
}

* { box-sizing: border-box; }

.app {
  font-family: 'Inter', -apple-system, sans-serif;
  color: var(--ink);
  background: var(--off-white);
  padding: 28px 24px 60px;
  min-height: 100%;
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 24px;
}

.header h1 {
  font-family: 'Fraunces', serif;
  font-size: var(--fs-page-title);
  font-weight: var(--fw-semibold);
  margin: 0;
  color: var(--green-900);
  text-transform: lowercase;
}

.header .eyebrow {
  margin: 0 0 6px;
  color: var(--ink-soft);
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.header-actions { display: flex; align-items: center; gap: 10px; }
.header-title-group { display: flex; align-items: center; gap: 14px; }

.page-nav-row {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px;
  margin-bottom: 22px;
}
.budget-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
}
.budget-card {
  background: var(--off-white);
  border-radius: 12px;
  padding: 14px 16px;
}
.budget-card-label {
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--ink-soft);
  margin-bottom: 6px;
}
.budget-card-value {
  font-family: 'Fraunces', serif;
  font-size: 22px;
  font-weight: 600;
  color: var(--ink);
}
.currency-input-wrap { display: flex; align-items: baseline; gap: 6px; border-bottom: 2px solid var(--line); }
.currency-input-wrap:focus-within { border-color: var(--teal); }
.currency-prefix { font-family: 'Fraunces', serif; font-size: 22px; font-weight: 600; color: var(--ink-soft); }
.budget-proj-input {
  font-family: 'Fraunces', serif;
  font-size: 22px;
  font-weight: 600;
  color: var(--ink);
  background: transparent;
  border: none;
  width: 100%;
  padding: 2px 0;
}
.budget-proj-input:focus { outline: none; }
.budget-bar-track {
  width: 100%;
  height: 8px;
  background: white;
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 6px;
}
.budget-bar-fill { height: 100%; border-radius: 6px; transition: width 0.2s ease; }
.month-select {
  font-family: 'Inter', sans-serif;
  font-size: var(--fs-btn);
  font-weight: var(--fw-bold);
  padding: 11px 20px;
  border-radius: 9px;
  border: none;
  background: var(--green-900);
  color: white;
  cursor: pointer;
}
.refresh-btn {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 600;
  padding: 9px 14px;
  border-radius: 10px;
  border: 1.5px solid var(--line);
  background: white;
  color: var(--ink);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  text-transform: lowercase;
}
.refresh-btn:hover { border-color: var(--teal); color: var(--teal-dark); }

/* ---- Orçamento: cards de categoria + donut + filtro de lançamentos ---- */
.orc-sec-title {
  font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; font-weight: 700;
  color: var(--ink-soft); margin: 18px 0 12px;
}
.orc-alert {
  display: flex; align-items: center; gap: 10px; background: #fbeae7; border: 1px solid #f0c9c1;
  color: #8a3a2d; font-size: 12.5px; font-weight: 600; padding: 11px 16px; border-radius: 12px; margin-bottom: 16px;
}
.orc-cat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.orc-cat-card {
  background: var(--off-white); border: 1.5px solid transparent; border-radius: 14px; padding: 13px 15px;
  cursor: pointer; text-align: left; transition: border-color .15s;
}
.orc-cat-card:hover { border-color: var(--magenta); }
.orc-cat-card.active-sel { border-color: var(--green-900); }
.orc-cat-card .top { display: flex; align-items: center; gap: 8px; }
.orc-cat-card .sw { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.orc-cat-card .nome { font-size: 12.5px; font-weight: 700; }
.orc-cat-card .val { font-size: 13px; color: var(--ink); margin-top: 8px; font-weight: 600; }
.orc-cat-card .bar { height: 5px; border-radius: 999px; background: var(--line); overflow: hidden; margin-top: 9px; }
.orc-cat-card .bar > div { height: 100%; border-radius: 999px; }
.orc-cat-card .pct { font-size: 10px; font-weight: 700; color: var(--ink-soft); margin-top: 5px; }
.orc-split-row { display: flex; gap: 22px; flex-wrap: wrap; align-items: center; margin-top: 18px; }
.orc-donut { width: 118px; height: 118px; border-radius: 50%; flex: none; position: relative; }
.orc-donut-center {
  position: absolute; inset: 20px; background: var(--card-bg); border-radius: 50%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.orc-donut-center .v { font-family: 'Fraunces', serif; font-weight: 600; font-size: 13px; color: var(--green-900); }
.orc-donut-center .l { font-size: 8px; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .05em; }
.orc-donut-legend { display: flex; flex-direction: column; gap: 7px; flex: 1; min-width: 200px; }
.orc-donut-legend .li { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.orc-donut-legend .dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.orc-donut-legend .nm { flex: 1; font-weight: 600; }
.orc-donut-legend .val { color: var(--ink-soft); font-size: 11.5px; }
.orc-filter-bar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.orc-filter-bar select, .orc-filter-bar input[type="text"] {
  padding: 8px 11px; border: 1.5px solid var(--line); border-radius: 9px; font-size: 12.5px; color: var(--ink); background: white;
}
.orc-search-wrap { position: relative; flex: 1; min-width: 180px; }
.orc-search-wrap input { width: 100%; }
.orc-filter-bar .clear-filter { white-space: nowrap; }

.orc-guia-list { display: flex; flex-direction: column; gap: 2px; }
.orc-guia-row { display: flex; align-items: center; gap: 9px; padding: 7px 0; font-size: 13px; border-bottom: 1px solid var(--line); }
.orc-guia-row:last-child { border-bottom: none; }
.orc-guia-row .sw { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.orc-guia-row .nome { font-weight: 700; flex: 1; }
.orc-guia-row .pct { color: var(--ink-soft); font-size: 11.5px; }

/* Tabelas do Orçamento (Lançamentos + Resumo do ano) — linhas em formato de cartão,
   mais espaçadas e legíveis que a tabela compacta de 9.5px usada no Planejamento. */
.orc-scroll-block { max-height: 420px; overflow-y: auto; }
.orc-table { border-collapse: separate; border-spacing: 0 8px; width: 100%; table-layout: auto; font-size: 12.5px; }
.orc-table thead th {
  position: sticky; top: 0; background: var(--card-bg); z-index: 1;
  font-size: 10.5px; padding: 8px 14px; border-bottom: none; box-shadow: 0 1px 0 var(--line);
}
.orc-table tbody td { background: var(--off-white); padding: 11px 14px; border-bottom: none; vertical-align: middle; line-height: 1.4; }
.orc-table tbody tr:hover td { background: var(--line); }
.orc-table tbody td:first-child { border-top-left-radius: 10px; border-bottom-left-radius: 10px; }
.orc-table tbody td:last-child { border-top-right-radius: 10px; border-bottom-right-radius: 10px; }
.orc-table tr.current-month td { background: var(--magenta-soft, #fceafc); }
.orc-table .status-pill { font-size: 11px; padding: 5px 22px 5px 10px; width: auto; }
.orc-table .cell-input { font-size: 12.5px; padding: 5px 7px; }
.orc-table .mini-bar {
  height: 5px; border-radius: 999px; background: var(--line); width: 70px; overflow: hidden;
  display: inline-block; vertical-align: middle; margin-left: 8px;
}
.orc-table .mini-bar > div { height: 100%; border-radius: 999px; }

section {
  background: var(--card-bg);
  border-radius: 16px;
  border: 1px solid var(--line);
  padding: 20px 22px;
  margin-bottom: 20px;
}

.side-by-side {
  display: grid;
  grid-template-columns: minmax(300px, 380px) 1fr;
  gap: 20px;
  align-items: start;
}
.side-by-side section { margin-bottom: 0; min-width: 0; }
@media (max-width: 900px) {
  .side-by-side { grid-template-columns: 1fr; }
}

.planning-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.planning-item { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; line-height: 1.45; }
.planning-bullet { color: var(--magenta); font-weight: 700; flex-shrink: 0; }
.planning-text { flex: 1; word-break: normal; overflow-wrap: break-word; }
.planning-add { display: flex; gap: 10px; flex-wrap: wrap; }
.planning-add input {
  flex: 1;
  min-width: 200px;
  padding: 9px 12px;
  border-radius: 8px;
  border: 1.5px solid var(--line);
  font-family: 'Inter', sans-serif;
  font-size: 13.5px;
  background: white;
  color: var(--ink);
}
.planning-add input:focus { outline: none; border-color: var(--teal); }

.guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}
.guide-card {
  background: var(--off-white);
  border-left: 4px solid;
  border-radius: 8px;
  padding: 12px 14px;
}
.guide-card-title {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: 14.5px;
  color: var(--ink);
  margin-bottom: 4px;
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}
.guide-card-group {
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--ink-soft);
}
.guide-card-text {
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--ink-soft);
}

section h2 {
  font-family: 'Fraunces', serif;
  font-size: 17px;
  font-weight: 600;
  margin: 0 0 4px;
  text-transform: lowercase;
}

section .subtitle {
  font-size: 12.5px;
  color: var(--ink-soft);
  margin: 0 0 16px;
}

/* Calendar */
.calendar-scroll { overflow-x: auto; }
.calendar-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 1260px;
}
.calendar-row {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
}
.calendar-row.head .cal-cell.head {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  height: auto;
  padding: 0 4px 6px;
  border: none;
  background: transparent;
  cursor: default;
}
.cal-cell {
  background: white;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  height: 230px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
  transition: border-color 0.12s ease;
}
.cal-cell:hover { border-color: var(--teal); }
.cal-cell.out-month { opacity: 0.32; background: var(--off-white); cursor: default; }
.cal-cell.out-month:hover { border-color: var(--line); }
.cal-cell.gap { border-style: dashed; border-color: var(--coral); }
.cal-cell.selected { border-color: var(--ink); border-width: 2px; }
.cal-cell.today { border-color: var(--teal); }
.cal-daynum {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: 16px;
  color: var(--ink);
}
.cal-daynum.is-today {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--teal);
  color: #fff;
}
.cal-items {
  display: flex;
  flex-direction: column;
  gap: 5px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}
.cal-item {
  font-size: 12px;
  line-height: 1.4;
  background: var(--off-white);
  border-left: 3px solid;
  border-radius: 5px;
  padding: 4px 7px;
  word-break: break-word;
}
.cal-item-ch {
  display: block;
  font-weight: 700;
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--ink-soft);
}

/* Cards mais compactos dentro da visão "calendário" — cabem mais itens por dia
   antes de precisar rolar (mesmo .mkt-card das outras visões, só menor aqui). */
.cal-cell .mkt-card { font-size: 10px; padding: 5px 6px; margin-bottom: 4px; border-radius: 6px; }
.cal-cell .mkt-card-top { margin-bottom: 2px; }
.cal-cell .mkt-card-ch { font-size: 8.5px; }
.cal-cell .mkt-card-desc { margin-bottom: 3px; }
.cal-cell .mkt-card-tag { font-size: 8.5px; padding: 1px 5px; margin-bottom: 3px; }
.cal-cell .mkt-card-avatar { width: 15px; height: 15px; font-size: 8.5px; }
.cal-cell .status-pill { font-size: 8px; padding: 2px 4px; }

.legend { display: flex; gap: 18px; margin-top: 14px; flex-wrap: wrap; }

.cal-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 4px;
}
.view-toggle {
  display: flex;
  background: var(--off-white);
  border-radius: 10px;
  padding: 3px;
  gap: 2px;
}
.view-toggle button {
  border: none;
  background: transparent;
  color: var(--ink-soft);
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 600;
  padding: 7px 12px;
  border-radius: 8px;
  cursor: pointer;
  text-transform: lowercase;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.view-toggle button.active { background: var(--green-900); color: white; }

/* Matriz dias × canais */
.matrix-scroll {
  overflow: auto;
  max-height: 640px;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.matrix-table { border-collapse: separate; border-spacing: 0; min-width: 1280px; width: 100%; }
.matrix-table th, .matrix-table td {
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
  padding: 8px;
  vertical-align: top;
  font-size: 11px;
}
.matrix-table thead th {
  position: sticky;
  top: 0;
  background: white;
  z-index: 2;
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--ink);
  font-weight: 700;
  padding: 10px 8px;
  text-align: left;
  /* Sem isso, o Chrome às vezes perde o fundo/texto do cabeçalho sticky ao rolar a
     página (fica só a borda de baixo visível) — o cabeçalho tem linhas de altura
     diferente (DATAS COMERCIAIS quebra em 2 linhas, os outros em 1) e o navegador
     reaproveita um raster antigo/errado da célula sticky em vez de repintar do zero.
     will-change força uma camada de composição própria pra essa célula, que evita
     esse reaproveitamento incorreto. */
  will-change: transform;
}
.matrix-table .sticky-col {
  position: sticky;
  left: 0;
  background: var(--off-white);
  z-index: 1;
  min-width: 38px;
  max-width: 42px;
  padding: 6px 4px;
  text-align: center;
  will-change: transform;
}
.matrix-table thead th.sticky-col { z-index: 3; background: var(--off-white); }
.matrix-table .day-cell { cursor: pointer; font-weight: 700; font-size: 11.5px; }
.matrix-table td.day-cell { color: var(--green-900); }
.matrix-table .day-dow {
  display: block;
  font-weight: 400;
  font-size: 8px;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.channel-cell { min-width: 150px; }
tr.row-gap .day-cell {
  background: repeating-linear-gradient(45deg, var(--off-white), var(--off-white) 4px, #ffffff 4px, #ffffff 8px);
  color: var(--green-900);
}
tr.row-selected td { background: #FFF8F5; }
tr.row-selected .day-cell { outline: 2px solid var(--ink); outline-offset: -2px; }
tr.row-today .day-cell { color: var(--teal-dark); }
tr.row-today .day-cell::after { content: '•'; margin-left: 4px; color: var(--teal); }
.cal-item-mini {
  font-size: 10.5px;
  line-height: 1.35;
  background: var(--off-white);
  border-left: 3px solid;
  border-radius: 5px;
  padding: 3px 6px;
  margin-bottom: 4px;
  word-break: normal;
  overflow-wrap: break-word;
}
.cal-item-mini:last-child { margin-bottom: 0; }
.legend-item { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-soft); }
.legend-swatch { width: 13px; height: 13px; border-radius: 4px; }

/* Form */
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  align-items: end;
}
.field label {
  display: block;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink-soft);
  margin-bottom: 5px;
}
.field input, .field select {
  width: 100%;
  padding: 9px 10px;
  border-radius: 8px;
  border: 1.5px solid var(--line);
  font-family: 'Inter', sans-serif;
  font-size: 13.5px;
  background: white;
  color: var(--ink);
}
.field input:focus, .field select:focus { outline: none; border-color: var(--teal); }
.field textarea {
  width: 100%;
  padding: 9px 10px;
  border-radius: 8px;
  border: 1.5px solid var(--line);
  font-family: 'Inter', sans-serif;
  font-size: 13.5px;
  background: white;
  color: var(--ink);
  min-height: 64px;
  resize: vertical;
}
.field textarea:focus { outline: none; border-color: var(--teal); }
.btn-add {
  background: var(--green-900);
  color: white;
  border: none;
  border-radius: 9px;
  padding: 11px 20px;
  font-weight: var(--fw-bold);
  font-size: var(--fs-btn);
  cursor: pointer;
  text-transform: lowercase;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.btn-add:hover { background: #2b4d2c; }

/* Filters */
.filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.filters select {
  padding: 7px 10px;
  border-radius: 7px;
  border: 1.5px solid var(--line);
  font-size: 12.5px;
  font-family: 'Inter', sans-serif;
  background: white;
}
.clear-filter {
  font-size: 12px;
  color: var(--teal-dark);
  cursor: pointer;
  font-weight: 600;
  padding: 7px 4px;
  text-transform: lowercase;
}

/* Table */
.table-scroll { overflow-x: visible; width: 100%; }
table { width: 100%; border-collapse: collapse; font-size: 9.5px; table-layout: fixed; }
col.col-data { width: 11%; }
col.col-canal { width: 15%; }
col.col-desc { width: 28%; }
col.col-resp { width: 14%; }
col.col-status { width: 18%; }
col.col-link { width: 6%; }
col.col-remove { width: 8%; }
th {
  text-align: left;
  font-size: 8.5px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--ink-soft);
  padding: 8px 6px;
  border-bottom: 1.5px solid var(--line);
}
td {
  padding: 7px 6px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  line-height: 1.35;
  word-break: normal;
  overflow-wrap: break-word;
  hyphens: none;
  white-space: normal;
}
tr:last-child td { border-bottom: none; }
.status-pill {
  border: none;
  border-radius: 14px;
  padding: 3px 5px;
  font-size: 9px;
  font-weight: 700;
  color: white;
  cursor: pointer;
  width: 100%;
  max-width: 100%;
  text-transform: lowercase;
}
.link-icon { color: var(--teal-dark); text-decoration: none; font-weight: 600; font-size: 9.5px; }
.cell-input {
  width: 100%;
  border: 1px solid transparent;
  background: transparent;
  font-family: 'Inter', sans-serif;
  font-size: 10.5px;
  color: var(--ink);
  padding: 3px 4px;
  border-radius: 5px;
}
.cell-input:hover { border-color: var(--line); background: var(--off-white); }
.cell-input:focus { outline: none; border-color: var(--teal); background: white; }
.expense-origin-tag { display: inline-flex; vertical-align: -2px; color: var(--teal-dark); margin-right: 3px; }
.summary-total-row { background: var(--off-white); font-weight: 700; }
.summary-total-row td { border-bottom: none; }

/* Modal "adicionar novo" (responsável / tipo de gasto) */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(43,38,34,0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
}
.modal-box {
  background: white;
  border-radius: 14px;
  padding: 24px;
  width: 340px;
  max-width: 90vw;
  box-shadow: 0 12px 40px rgba(0,0,0,0.25);
}
.modal-title {
  font-family: 'Fraunces', serif;
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 14px;
  text-transform: lowercase;
}
.modal-input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1.5px solid var(--line);
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  margin-bottom: 14px;
}
.modal-input:focus { outline: none; border-color: var(--teal); }
.modal-actions { display: flex; gap: 12px; align-items: center; }

/* Gerenciar Listas */
.manager-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}
.manager-col-title {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: 14px;
  color: var(--ink);
  margin-bottom: 10px;
}
.chip-list { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--off-white);
  border-radius: 20px;
  padding: 6px 6px 6px 12px;
  font-size: 12.5px;
  color: var(--ink);
}
.chip-remove {
  background: none;
  border: none;
  color: var(--ink-soft);
  cursor: pointer;
  font-size: 12px;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  line-height: 1;
}
.chip-remove:hover { color: white; background: var(--coral); }
.remove-btn {
  background: none;
  border: none;
  color: var(--ink-soft);
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  padding: 2px;
}
.remove-btn:hover { color: var(--coral); }
.actions-inner { display: flex; gap: 4px; align-items: center; }

.toast {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--teal);
  color: white;
  padding: 10px 16px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 13.5px;
  margin-bottom: 16px;
  display: inline-block;
}
.form-error {
  background: #FFF0EE;
  color: var(--coral-dark);
  border: 1.5px solid var(--coral);
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 600;
  margin-bottom: 12px;
}
.empty-state {
  text-align: center;
  padding: 30px 10px;
  color: var(--ink-soft);
  font-size: 13.5px;
}
.loading { text-align: center; padding: 40px; color: var(--ink-soft); font-size: 14px; }

/* ===== Redesign "dias × canais" — filtros compactos, cards, painel de detalhe,
   modal de item (prefixo mkt- pra não colidir com as classes genéricas acima) ===== */

.mkt-filterbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 10px 0 16px;
}
.mkt-filterbar-icon { color: var(--ink-soft); display: flex; }
.mkt-filterbar select {
  padding: 7px 10px;
  border-radius: 7px;
  border: 1.5px solid var(--line);
  font-size: 12.5px;
  font-family: 'Inter', sans-serif;
  background: white;
  color: var(--ink);
  text-transform: lowercase;
}
.mkt-exec-toggle {
  display: flex;
  background: var(--off-white);
  border-radius: 10px;
  padding: 3px;
  gap: 2px;
}
.mkt-exec-toggle button {
  border: none;
  background: transparent;
  color: var(--ink-soft);
  font-family: 'Inter', sans-serif;
  font-size: 11.5px;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 8px;
  cursor: pointer;
  text-transform: lowercase;
}
.mkt-exec-toggle button.active { background: var(--green-900); color: white; }

/* Card compacto de item na grade dias × canais / calendário */
.mkt-card {
  font-size: 9.5px;
  line-height: 1.25;
  background: white;
  border: 1px solid var(--line);
  border-left: 3px solid;
  border-radius: 6px;
  padding: 4px 6px;
  margin-bottom: 3px;
  cursor: pointer;
  transition: box-shadow 0.12s ease, border-color 0.12s ease;
}
.mkt-card:last-child { margin-bottom: 0; }
.mkt-card:hover { box-shadow: 0 2px 8px rgba(43,38,34,0.12); border-left-color: var(--teal); }
.mkt-card-dragging { opacity: 0.4; }
.mkt-cell-over { outline: 2px dashed var(--teal); outline-offset: -2px; }
.mkt-card-top { display: flex; align-items: center; justify-content: space-between; gap: 5px; margin-bottom: 1px; }
.mkt-card-ch {
  font-weight: 700;
  font-size: 8.5px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--ink-soft);
}
.mkt-card-desc { color: var(--ink); word-break: normal; overflow-wrap: break-word; margin-bottom: 2px; }
.mkt-card-tag {
  display: inline-block;
  font-size: 8.5px;
  font-weight: 600;
  color: var(--teal-dark);
  background: rgba(0,168,150,0.1);
  border-radius: 5px;
  padding: 1px 4px;
  margin-bottom: 2px;
}
.mkt-card-bottom { display: flex; align-items: center; justify-content: space-between; gap: 5px; }
.mkt-card-bottom .status-pill { width: auto; max-width: 100%; font-size: 8px; padding: 2px 4px; }
.mkt-card-avatar {
  width: 14px; height: 14px; border-radius: 50%;
  background: #e4aad7; color: var(--green-900);
  font-size: 8px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.mkt-todo-dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.mkt-todo-dot-active { background: var(--teal); }
.mkt-todo-dot-done { background: var(--green-900); }
.mkt-card-meta { margin-bottom: 2px; }
.mkt-card-briefing-pill {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 8.5px; font-weight: 600; color: var(--teal-dark);
  background: rgba(0,168,150,0.1); border: none; border-radius: 5px;
  padding: 1px 4px; cursor: pointer; font-family: inherit;
}
.mkt-card-briefing-pill:hover { background: rgba(0,168,150,0.2); }

/* Botão discreto "+" numa célula vazia da grade */
.mkt-cell-add {
  width: 100%;
  border: 1.5px dashed var(--line);
  background: transparent;
  color: var(--ink-soft);
  border-radius: 8px;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.mkt-cell-add:hover { border-color: var(--teal); color: var(--teal-dark); }

/* Descrição clicável na tabela "Itens do mês" */
.mkt-row-desc { cursor: pointer; }
.mkt-row-desc:hover { color: var(--teal-dark); text-decoration: underline; }

/* Modal "novo/editar item de planejamento" — mesma base do .modal-box, só mais largo */
.mkt-item-modal { width: 640px; max-width: 92vw; text-align: left; }

/* Painel de detalhe do item — flutuante e centralizado (redesign), classes
   próprias pra este módulo (mkt-detail-*) */
.mkt-detail-overlay {
  position: fixed; inset: 0; background: rgba(28,54,29,.35);
  display: none; align-items: center; justify-content: center; z-index: 70;
  opacity: 0; transition: opacity .22s var(--mkt-ease);
}
.mkt-detail-overlay.open { display: flex; opacity: 1; }
.mkt-detail {
  background: var(--mkt-white); width: min(560px, 92vw); max-height: 85vh; overflow-y: auto;
  padding: 24px 26px 28px; border-radius: var(--radius-lg); box-shadow: var(--shadow-pop);
  transform: scale(.97); transition: transform .22s var(--mkt-ease);
}
.mkt-detail-overlay.open .mkt-detail { transform: scale(1); }
.mkt-detail-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 8px; }
.mkt-detail-head h2 { font-family: 'Fraunces', serif; font-size: 19px; font-weight: 600; color: var(--ink); margin: 6px 0 0; text-transform: none; }
.mkt-detail-head-actions { display: flex; gap: 6px; flex-shrink: 0; }
.mkt-icon-btn {
  background: var(--off-white); border: none; border-radius: 8px;
  width: 32px; height: 32px; display: flex; align-items: center; justify-content: center;
  color: var(--ink-soft); cursor: pointer;
}
.mkt-icon-btn:hover { color: var(--teal-dark); }
.mkt-detail-meta { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 12px; }
.mkt-meta-chip {
  display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 600;
  padding: 3px 9px; border-radius: 20px; background: var(--off-white); color: var(--ink);
}
.mkt-detail-section { margin-bottom: 20px; padding-top: 16px; border-top: 1px solid var(--line); }
.mkt-detail-section h3 { font-size: 11.5px; font-weight: 700; text-transform: lowercase; color: var(--green-900); margin: 0 0 10px; }
.mkt-detail-desc { font-size: 13px; line-height: 1.5; color: var(--ink); white-space: pre-wrap; }
.mkt-empty-hint { font-size: 12px; color: var(--ink-soft); }
.mkt-links-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.mkt-link-row {
  display: flex; align-items: center; gap: 6px; font-size: 12px;
  color: var(--teal-dark); text-decoration: none; word-break: break-all;
}
.mkt-link-row:hover { text-decoration: underline; }
.mkt-add-link-row { display: flex; gap: 8px; }
.mkt-add-link-row input {
  flex: 1; padding: 7px 9px; border-radius: 7px; border: 1px solid var(--line);
  font-family: 'Inter', sans-serif; font-size: 12.5px; background: var(--off-white); color: var(--ink);
}
.mkt-linked-todo {
  display: flex; align-items: center; gap: 8px; padding: 8px 10px;
  border: 1px solid var(--line); border-radius: 10px; text-decoration: none; color: var(--ink);
  margin-bottom: 6px;
}
.mkt-linked-todo:hover { border-color: var(--teal); }
.mkt-todo-status {
  font-size: 10px; font-weight: 700; text-transform: lowercase;
  padding: 2px 8px; border-radius: 10px; background: var(--off-white);
}
.mkt-todo-due { font-size: 11px; color: var(--ink-soft); display: flex; align-items: center; gap: 3px; }
.mkt-todo-link { color: var(--ink-soft); margin-left: auto; }
.mkt-detail-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }

/* ===== Ícones próprios da aba Planejamento (dicionário MKT_ICONS/mktIcon() em
   marketing.js) — exceção deliberada ao AyaIcon() central, só nesta página ===== */
.mkt-ico { width: 16px; height: 16px; flex: none; display: inline-flex; vertical-align: middle; }
.mkt-ico svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

/* ===== Visão semanal "Dias × Canais" (Segunda a Domingo) ===== */
.mkt-week-nav {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 12px 2px; margin-bottom: 10px; flex-wrap: wrap;
}
.mkt-week-navbtns { display: flex; gap: 6px; align-items: center; }
.mkt-week-arrow {
  width: 30px; height: 30px; border-radius: 9px; background: white; border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center; color: var(--ink); cursor: pointer;
}
.mkt-week-arrow:hover { background: var(--off-white); }
.mkt-week-range { font-family: 'Fraunces', serif; font-weight: 600; font-size: 15px; color: var(--green-900); }
.mkt-week-grid-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
.mkt-week-grid { display: grid; min-width: 1180px; }
.mkt-week-corner { padding: 10px 12px; border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); background: white; }
.mkt-week-daylabel { padding: 10px 12px; border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); text-align: left; background: white; }
.mkt-week-daylabel:last-child { border-right: none; }
.mkt-week-dow { font-size: 9.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-soft); font-weight: 700; }
.mkt-week-dnum { font-family: 'Fraunces', serif; font-weight: 600; font-size: 15px; color: var(--green-900); }
.mkt-week-daylabel.today { background: rgba(227,21,226,0.06); }
.mkt-chan-label {
  display: flex; align-items: center; gap: 7px; padding: 10px 12px; font-size: 11.5px; font-weight: 700;
  color: var(--ink); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line);
  position: sticky; left: 0; background: var(--off-white);
}
.mkt-chan-label .mkt-ico { color: var(--ink-soft); }
.mkt-day-cell { padding: 6px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); min-height: 60px; display: flex; flex-direction: column; gap: 5px; }
.mkt-day-cell:last-child { border-right: none; }
.mkt-day-cell.today { background: #fdf7fd; }

/* Botão discreto "+" numa célula vazia da grade semanal (reusa .mkt-cell-add) */

/* ===== Layout duas colunas: calendário + histórico lateral fixo ===== */
.mkt-plan-layout { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.mkt-plan-layout-main { flex: 2 1 560px; min-width: 0; }
.mkt-plan-layout-side { flex: 1 1 300px; min-width: 280px; max-width: 380px; position: sticky; top: 14px; }
.mkt-hist-list { max-height: 900px; overflow-y: auto; }
.mkt-hist-row { padding: 11px 4px; border-bottom: 1px dashed var(--line); cursor: pointer; transition: background .12s; }
.mkt-hist-row:hover { background: var(--off-white); }
.mkt-hist-row:last-child { border-bottom: none; }
.mkt-hist-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.mkt-hist-date { font-size: 10.5px; color: var(--ink-soft); font-weight: 700; letter-spacing: 0.02em; }
.mkt-hist-canal { font-size: 10px; color: var(--ink-soft); font-weight: 600; }
.mkt-hist-title { font-size: 12.5px; font-weight: 700; margin-top: 5px; line-height: 1.35; color: var(--ink); }
.mkt-hist-meta { font-size: 11px; color: var(--ink-soft); margin-top: 3px; }
.mkt-hist-bottom { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.mkt-hist-bottom .status-pill { width: auto; max-width: 100%; }
.mkt-hist-actions { display: flex; align-items: center; gap: 4px; }
.mkt-hist-actions .remove-btn { width: 24px; height: 24px; padding: 0; display: flex; align-items: center; justify-content: center; }

@media (max-width: 980px) {
  .mkt-plan-layout-side { max-width: none; position: static; }
  .mkt-hist-list { max-height: 420px; }
}
