/* Design system "Do It On" — tokens extraídos do projeto Claude Design
   (claude.ai/design/p/13f95ac1-9c9a-457b-87cc-204a9172355c, 17/09/2026),
   aplicado por cima das classes já existentes (sem reescrever os templates)
   — mesmo princípio já usado na Reporting para o mesmo Design System. */
:root {
  /* Paleta de marca (logo): pink primário, cyan secundário, mint acento */
  --pink-500: #b03090;
  --pink-600: #8f2275;
  --cyan-500: #1090d0;
  --mint-400: #30c090;
  --neutral-900: #131426;
  --neutral-700: #3b3d5c;
  --neutral-500: #767896;
  --neutral-300: #bbbcce;
  --neutral-100: #eeeef4;
  --neutral-50: #f7f7fa;

  /* Aliases legados — mantidos para não obrigar a tocar em cada template,
     apontados para os tokens novos (mesmo padrão da Reporting). */
  --brand: var(--neutral-900);
  --accent: var(--pink-500);
  --accent2: var(--cyan-500);
  --green: var(--mint-400);
  --yellow: #f0a020;
  --red: #e0435a;
  --blue: var(--cyan-500);
  --purple: var(--pink-500);
  --bg: var(--neutral-50);
  --card: #ffffff;
  --border: var(--neutral-100);
  --text: var(--neutral-900);
  --muted: #6b6b7a;
  --radius: 16px;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: 'Comfortaa', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg); color: var(--text); font-size: 14px;
}

/* HEADER */
.header { background: var(--neutral-900); color: #fff; padding: 18px 32px 12px; }
.header-logo { display: flex; align-items: center; gap: 12px; text-decoration: none; color: #fff; }
.header-logo img { height: 24px; width: auto; display: block; }
.header-logo .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--pink-500); flex-shrink: 0; }
.header-agency { font-size: 14px; font-weight: 400; opacity: .55; }
.header-sub { font-size: 12px; opacity: 0.55; margin-top: 6px; padding-left: 20px; }

/* TABS / NAV */
.tabs {
  background: var(--neutral-900); padding: 6px 32px 10px; display: flex; align-items: center; gap: 8px;
  overflow-x: auto;
}
.tabs a, .tabs .btn-link {
  height: 36px; display: inline-flex; align-items: center; padding: 0 18px; color: rgba(255,255,255,0.85);
  text-decoration: none; cursor: pointer; font-size: 13px; font-weight: 600; border: none; background: none;
  border-radius: 999px; white-space: nowrap; transition: background .15s, color .15s; font-family: inherit;
}
.tabs a:hover, .tabs .btn-link:hover { background: rgba(255,255,255,0.1); color: #fff; }
.tabs a.active { background: var(--pink-500); color: #fff; font-weight: 700; }

main { max-width: 1200px; margin: 0 auto; padding: 40px 32px 60px; }
h1 { margin-bottom: 4px; font-weight: 700; letter-spacing: -.3px; color: var(--neutral-900); }
.subtitle { color: var(--muted); margin-top: 0; margin-bottom: 20px; font-size: 13px; }

.flash-wrap { margin-bottom: 16px; }
.flash { padding: 10px 14px; border-radius: 10px; margin-bottom: 8px; font-size: 13px; }
.flash-ok { background: rgba(48,192,144,0.14); color: #0e744f; }
.flash-error { background: rgba(224,67,90,0.12); color: #a1233a; }

.card { background: var(--card); border: none; box-shadow: 0 4px 16px rgba(19,20,38,0.08); border-radius: var(--radius); padding: 24px; margin-bottom: 20px; }
.card h2 { font-size: 18px; font-weight: 700; margin-bottom: 4px; }
.client-edit summary { cursor: pointer; font-size: 15px; font-weight: 700; display: flex; gap: 10px; align-items: center; list-style: none; }
.client-edit summary::-webkit-details-marker { display: none; }
.client-edit summary::before { content: "▸"; color: var(--neutral-300); font-size: 12px; }
.client-edit[open] summary::before { content: "▾"; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; margin-top: 14px; }
.form-grid label { display: flex; flex-direction: column; font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; gap: 6px; }
.form-grid .full { grid-column: 1 / -1; }
.form-grid input[type=text], .form-grid input[type=email], .form-grid input[type=date], .form-grid textarea {
  padding: 10px 14px; border: 1px solid var(--neutral-100); border-radius: 12px; font-size: 14px;
  font-family: inherit; color: var(--text); font-weight: 400; text-transform: none; letter-spacing: normal;
}
.form-grid input:focus, .form-grid textarea:focus, .tier-select:focus, .titulo-input:focus {
  outline: none; border-color: var(--cyan-500); box-shadow: 0 0 0 3px rgba(16,144,208,0.15);
}
.form-grid .checkbox { flex-direction: row; align-items: center; gap: 8px; text-transform: none; font-weight: 500; }
.form-grid .actions { grid-column: 1 / -1; }

.btn {
  display: inline-flex; align-items: center; height: 38px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--neutral-100);
  background: #fff; color: var(--neutral-900); text-decoration: none; font-size: 13px; font-weight: 700; cursor: pointer;
  font-family: inherit; transition: background .15s;
}
.btn:hover { background: var(--neutral-50); border-color: var(--neutral-100); color: var(--neutral-900); }
.btn-primary { background: var(--pink-500); border-color: var(--pink-500); color: #fff; }
.btn-primary:hover { background: var(--pink-600); border-color: var(--pink-600); color: #fff; transform: scale(1.02); }
.btn-danger { background: #fff; color: var(--red); border-color: rgba(224,67,90,0.3); margin-top: 12px; }
.btn-danger:hover { background: rgba(224,67,90,0.08); }

/* Botão discreto tipo link, usado fora da barra de separadores (ex: remover
   uma linha de uma tabela) — a versão dentro de .tabs tem estilo próprio. */
.btn-link { background: none; border: none; cursor: pointer; padding: 4px 6px; font-size: 14px; color: var(--muted); font-family: inherit; }
.btn-link:hover { color: var(--red); }

table.grid { width: 100%; border-collapse: collapse; background: var(--card); border-radius: var(--radius); overflow: hidden; box-shadow: 0 4px 16px rgba(19,20,38,0.08); }
table.grid th, table.grid td { padding: 14px 16px; border-bottom: 1px solid var(--neutral-100); text-align: left; font-size: 13px; vertical-align: top; }
table.grid th { background: var(--neutral-50); color: var(--muted); font-weight: 700; font-size: 12px; }
table.grid tr:hover td { background: var(--neutral-50); }
table.grid tr:last-child td { border-bottom: none; }
.table-wrap { overflow-x: auto; border-radius: var(--radius); }
.row-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.results .resumo { max-width: 260px; }

.badge { display: inline-block; padding: 4px 12px; border-radius: 999px; font-size: 11px; font-weight: 700; letter-spacing: .2px; }
.badge-ok, .badge-green { background: rgba(48,192,144,0.14); color: #0e744f; }
.badge-off, .badge-gray { background: var(--neutral-50); color: var(--muted); }
.badge-carma, .badge-blue { background: rgba(16,144,208,0.12); color: var(--cyan-500); }
.badge-scraper, .badge-purple { background: rgba(176,48,144,0.12); color: var(--pink-500); }
.badge-yellow { background: rgba(240,160,32,0.14); color: #a1650f; }
.badge-red { background: rgba(224,67,90,0.12); color: #a1233a; }
.badge-teal { background: rgba(16,144,208,0.12); color: var(--cyan-500); }

.tag { display: inline-block; background: rgba(16,144,208,0.1); color: var(--cyan-500); border-radius: 999px; padding: 3px 10px; font-size: 11px; font-weight: 700; margin: 2px 3px 2px 0; }

.filters { display: flex; flex-direction: column; gap: 12px; margin-bottom: 18px; }
.preset-buttons { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { height: 38px; display: inline-flex; align-items: center; padding: 0 20px; border-radius: 999px; border: 1px solid var(--neutral-100); background: #fff; text-decoration: none; color: var(--neutral-900); font-size: 13px; font-weight: 700; }
.chip:hover { border-color: var(--neutral-300); }
.chip-active { background: var(--neutral-900); color: #fff; border-color: var(--neutral-900); }
.custom-range { display: flex; gap: 12px; align-items: end; flex-wrap: wrap; }
.custom-range label { display: flex; flex-direction: column; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); gap: 6px; }
.custom-range input { padding: 9px 12px; border-radius: 12px; border: 1px solid var(--neutral-100); font-family: inherit; }

.tier-form { margin: 0; }
.tier-select {
  padding: 4px 8px; border: 1px solid var(--neutral-100); border-radius: 8px;
  font-family: inherit; font-size: 12px; color: var(--text); background: #fff;
  cursor: pointer;
}
.titulo-cell { min-width: 220px; }
.titulo-form { margin: 0; display: flex; gap: 4px; align-items: center; }
.titulo-input {
  flex: 1; padding: 6px 9px; border: 1px solid var(--neutral-100); border-radius: 8px;
  font-family: inherit; font-size: 13px; color: var(--text); background: #fff;
}
.actions-row { margin-bottom: 18px; }
.bulk-actions {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 12px 16px; margin-bottom: 12px; background: var(--card);
  box-shadow: 0 4px 16px rgba(19,20,38,0.08); border-radius: var(--radius);
}
.bulk-actions .btn[disabled] { opacity: .45; cursor: not-allowed; }
.empty { color: var(--muted); padding: 34px; text-align: center; background: var(--card); border-radius: var(--radius); box-shadow: 0 4px 16px rgba(19,20,38,0.08); }
.nowrap { white-space: nowrap; }

/* ── Grelha de artigos (dashboard): colunas estruturadas, cabeçalho fixo ── */
main.wide { max-width: 1680px; }
.results-scroll {
  max-height: 78vh; overflow: auto; background: var(--card);
  box-shadow: 0 4px 16px rgba(19,20,38,0.08); border-radius: var(--radius);
}
.results-scroll table.results { box-shadow: none; border-radius: 0; overflow: visible; min-width: 1560px; }
table.results thead th { position: sticky; top: 0; z-index: 2; box-shadow: 0 1px 0 var(--neutral-100); }
table.results th .th-hint { font-weight: 400; font-size: 11px; opacity: .7; }
table.results td { padding: 12px 12px; }
table.results tr.sel td { background: rgba(176,48,144,0.06); }
.c-sel { width: 38px; }
.c-data { width: 96px; white-space: nowrap; }
.c-meio { width: 128px; font-weight: 700; }
.c-tier { width: 92px; }
.c-titulo { width: 270px; min-width: 240px; }
.c-link { width: 52px; text-align: center; }
.c-tema { width: 170px; }
.c-resumo { width: 360px; min-width: 300px; }
.c-kw { width: 150px; }
.c-ave { width: 70px; white-space: nowrap; }
.c-status { width: 112px; }
.c-acoes { width: 108px; }
.titulo-form { align-items: flex-start; }
textarea.titulo-input { resize: vertical; min-height: 58px; line-height: 1.35; }
.tema-input {
  flex: 1; min-width: 0; padding: 7px 9px; border: 1px solid var(--neutral-100); border-radius: 8px;
  font-family: inherit; font-size: 13px; color: var(--text); background: #fff;
}
.tema-input:focus { outline: none; border-color: var(--cyan-500); box-shadow: 0 0 0 3px rgba(16,144,208,0.15); }
.resumo-txt { cursor: pointer; font-size: 12.5px; line-height: 1.5; margin-bottom: 8px; color: #33334a; }
.resumo-txt.clamp { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.lang {
  display: inline-block; font-size: 10px; font-weight: 700; padding: 1px 7px; border-radius: 999px;
  background: rgba(176,48,144,0.12); color: var(--pink-500); margin-right: 4px; vertical-align: 1px;
}
.lang-en { background: rgba(16,144,208,0.12); color: var(--cyan-500); }
.stack { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.acoes { display: flex; gap: 2px; align-items: center; }
.acoes form { margin: 0; }
