@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800&family=Quicksand:wght@400;500;600;700&display=swap');

.hidden { display: none !important; }

:root {
  /* Paleta — alinhada ao novo estilo do quiz M90 (cinza-frio + verde de ação) */
  --paper:        #EDF0F2;   /* fundo da página (cinza-claro frio) */
  --paper-soft:   #F4F6F8;   /* superfícies sutis */
  --paper-2:      #FFFFFF;   /* cartões */
  --green:        #4E7A33;   /* verde da marca (texto/estados) */
  --green-bright: #6CB33F;   /* verde vivo (ação/realce) */
  --green-deep:   #20351F;   /* títulos */
  --olive:        #5C6B43;
  --terra:        #6CB33F;   /* ação agora é verde (era terra) */
  --terra-dark:   #4E7A33;
  --gold:         #CBA85E;
  --ink:          #2B362C;
  --ink-soft:     #5C6B60;
  --cream:        #EAF2E2;   /* verde bem claro p/ realces */

  --green-dim:    #4E7A3315;
  --terra-dim:    #6CB33F18;
  --gold-dim:     #CBA85E22;
  --red:          #C0492F;
  --coral:        #E0834B;

  --bg:           var(--paper);
  --card:         #FFFFFF;
  --sidebar-bg:   #20351F;
  --border:       #E3E8EC;       /* linha cinza-frio */
  --hover:        #F1F4F6;
  --text:         var(--ink);
  --text-muted:   #8A938C;       /* muted cinza-frio */

  /* superfícies neutras (substituem os beges do KV kraft) */
  --bar-bg:       #E6EBEF;       /* fundo de barras/progresso */
  --surface-2:    #F1F4F6;       /* cabeçalhos de tabela, rodapés, pills */
  --surface-3:    #F4F6F8;       /* hover de linha, campos */

  --font-display: "Nunito", "Quicksand", "Helvetica Neue", sans-serif;
  --font-script:  "Nunito", "Quicksand", sans-serif;
  --font-body:    "Quicksand", "Helvetica Neue", sans-serif;

  --radius:     16px;
  --radius-sm:  10px;
  --sidebar-w:  244px;
  --shadow:     0 4px 12px rgba(31,45,36,.07), 0 16px 40px rgba(31,45,36,.10);
  --shadow-sm:  0 1px 2px rgba(31,45,36,.04), 0 4px 12px rgba(31,45,36,.05);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font-body);
  background:
    radial-gradient(1200px 600px at 100% -10%, #E7F1DD 0%, transparent 60%),
    var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.55;
  font-weight: 500;
}

/* ── Layout ── */
.layout { display: grid; grid-template-columns: var(--sidebar-w) 1fr; height: 100vh; overflow: hidden; }

/* ── Sidebar ── */
.sidebar {
  background: linear-gradient(180deg, #2c4a28 0%, var(--sidebar-bg) 100%);
  display: flex; flex-direction: column; overflow-y: auto;
}
.sidebar-logo {
  display: flex; align-items: baseline; gap: 8px;
  padding: 24px 20px 18px;
  border-bottom: 1px solid rgba(236,242,226,.12);
}
.logo-mark {
  font-family: var(--font-display); font-weight: 800;
  background: var(--green-bright); color: #fff;
  font-size: 14px; padding: 4px 9px; border-radius: 8px; letter-spacing: .5px;
}
.logo-label { font-family: var(--font-display); font-weight: 800; font-size: 18px; color: var(--cream); line-height: 1; letter-spacing: .2px; }

.sidebar-nav { padding: 16px 10px; display: flex; flex-direction: column; gap: 3px; }
.nav-item {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 13px; border-radius: var(--radius-sm);
  color: rgba(236,242,226,.62); text-decoration: none;
  font-weight: 600; font-size: 14px; transition: all .15s;
}
.nav-item svg { width: 18px; height: 18px; fill: currentColor; flex-shrink: 0; }
.nav-item:hover  { background: rgba(236,242,226,.10); color: var(--cream); }
.nav-item.active { background: rgba(108,179,63,.20); color: #fff; box-shadow: inset 3px 0 0 var(--green-bright); }

.sidebar-footer {
  margin-top: auto;
  padding: 12px 10px 16px;
  border-top: 1px solid rgba(236,242,226,.10);
}
.btn-logout {
  width: 100%;
  display: flex; align-items: center; gap: 11px;
  padding: 10px 13px; border: 0; border-radius: var(--radius-sm);
  background: transparent; color: rgba(236,242,226,.62);
  cursor: pointer; font-family: var(--font-body);
  font-size: 14px; font-weight: 600; text-align: left;
  transition: background .15s, color .15s;
}
.btn-logout svg { width: 18px; height: 18px; fill: currentColor; flex-shrink: 0; }
.btn-logout:hover { background: rgba(236,242,226,.10); color: var(--cream); }

/* ── Main / Topbar ── */
.main { display: flex; flex-direction: column; overflow: hidden; }
.topbar {
  background: var(--card); border-bottom: 1px solid var(--border);
  padding: 0 26px; height: 60px; display: flex; align-items: center;
  justify-content: space-between; flex-shrink: 0; box-shadow: var(--shadow-sm);
}
.topbar-title { font-family: var(--font-display); font-weight: 800; font-size: 20px; letter-spacing: 0; color: var(--green-deep); }
.badge-online { font-size: 12px; font-weight: 700; color: var(--green-bright); animation: pulse-badge 2s ease-in-out infinite; }
@keyframes pulse-badge { 0%,100%{opacity:1} 50%{opacity:.55} }

/* ── Pages ── */
.page { display: none; padding: 26px; overflow-y: auto; flex: 1; }
.page.active { display: block; }

/* ── Metric cards ── */
.metrics-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; margin-bottom: 22px; }
.metric-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px 20px; display: flex; align-items: center; gap: 15px; box-shadow: var(--shadow-sm);
  transition: box-shadow .15s, transform .15s;
}
.metric-card:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.metric-icon { width: 46px; height: 46px; border-radius: 13px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.metric-icon svg { width: 23px; height: 23px; fill: currentColor; }
.metric-icon.purple { background: var(--green-dim);  color: var(--green); }
.metric-icon.green  { background: var(--terra-dim);  color: var(--green-bright); }
.metric-icon.orange { background: #E0834B18;         color: var(--coral); }
.metric-icon.blue   { background: var(--gold-dim);   color: var(--terra-dark); }
.metric-value { font-family: var(--font-display); font-size: 32px; font-weight: 800; line-height: 1; color: var(--green-deep); }
.metric-label { font-size: 12px; color: var(--text-muted); margin-top: 5px; font-weight: 600; }

/* ── Dashboard grid ── */
.dashboard-grid { display: grid; grid-template-columns: 1fr 1.6fr; gap: 16px; }
@media (max-width: 900px) { .dashboard-grid { grid-template-columns: 1fr; } }

/* ── Card ── */
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); }
.card + .card { margin-top: 16px; }
.card-header { padding: 15px 20px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.card-header h3 { font-family: var(--font-display); font-weight: 800; font-size: 15px; letter-spacing: 0; color: var(--green-deep); }
.link-ver-todos { color: var(--green-bright); text-decoration: none; font-size: 12px; font-weight: 700; }
.link-ver-todos:hover { text-decoration: underline; }
.card-body { padding: 16px 20px; }

/* ── Funil ── */
.funil-list { display: flex; flex-direction: column; gap: 12px; }
.funil-item .funil-top { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 5px; font-weight: 600; }
.funil-item .funil-top .qtd { color: var(--text-muted); }
.funil-bar-bg { height: 9px; background: var(--bar-bg); border-radius: 99px; overflow: hidden; }
.funil-bar-fill { height: 100%; border-radius: 99px; transition: width .5s ease; }
.fb-1 { background: var(--gold); }
.fb-2 { background: var(--green-bright); }
.fb-3 { background: var(--olive); }
.fb-4 { background: var(--green); }
.fb-0 { background: #C2CBD1; }

/* ── Canal bars ── */
.canal-item { margin-bottom: 14px; }
.canal-item:last-child { margin-bottom: 0; }
.canal-label { display: flex; justify-content: space-between; margin-bottom: 6px; font-size: 13px; font-weight: 600; }
.canal-label span:last-child { color: var(--text-muted); font-weight: 500; }
.canal-bar-bg { height: 7px; background: var(--bar-bg); border-radius: 99px; overflow: hidden; }
.canal-bar-fill { height: 100%; background: var(--green); border-radius: 99px; transition: width .5s ease; }

/* ── Recentes ── */
.recente-item { display: flex; align-items: center; justify-content: space-between; padding: 11px 0; border-bottom: 1px solid var(--border); gap: 10px; }
.recente-item:last-child { border-bottom: none; }
.recente-nome { font-weight: 700; font-size: 13px; color: var(--green-deep); }
.recente-meta { font-size: 11px; color: var(--text-muted); margin-top: 3px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }

/* ── Toolbar ── */
.toolbar { display: flex; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.search-wrap { flex: 1; min-width: 200px; position: relative; }
.search-icon { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; fill: var(--text-muted); }
.search-wrap input {
  width: 100%; padding: 10px 12px 10px 35px; background: var(--card);
  border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text);
  font-family: var(--font-body); font-size: 14px; outline: none; transition: border-color .15s, box-shadow .15s; box-shadow: var(--shadow-sm);
}
.search-wrap input:focus { border-color: var(--green-bright); box-shadow: 0 0 0 3px rgba(108,179,63,.14); }
.search-wrap input::placeholder { color: var(--text-muted); }
select {
  padding: 10px 12px; background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text); font-family: var(--font-body);
  font-size: 14px; outline: none; cursor: pointer; box-shadow: var(--shadow-sm); transition: border-color .15s, box-shadow .15s;
}
select:focus { border-color: var(--green-bright); box-shadow: 0 0 0 3px rgba(108,179,63,.14); }

/* ── Table ── */
.data-table { width: 100%; border-collapse: collapse; }
.data-table th {
  padding: 12px 16px; text-align: left; font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .6px; color: var(--ink-soft);
  background: var(--surface-2); border-bottom: 1px solid var(--border);
}
.data-table td { padding: 13px 16px; border-bottom: 1px solid var(--border); font-size: 13px; vertical-align: middle; }
.data-table tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover { background: var(--surface-3); }
.loading-cell { text-align: center; color: var(--text-muted); padding: 48px !important; }

/* ── Chips ── */
.chip {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 20px;
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .3px; white-space: nowrap;
}
.chip-canal-whatsapp  { background: #25d36618; color: #1c7a43; }
.chip-canal-telegram  { background: #2CA5E018; color: #1d6fa0; }
.chip-canal-instagram { background: #E1306C18; color: #b02457; }
.chip-canal-web_quiz  { background: var(--terra-dim); color: var(--green); }
.chip-canal-default   { background: var(--surface-2); color: var(--text-muted); }

.chip-status-concluida     { background: var(--green-dim);  color: var(--green); }
.chip-status-em_andamento  { background: var(--terra-dim);  color: var(--green-bright); }
.chip-status-sem_avaliacao { background: var(--surface-2);  color: var(--text-muted); }

/* etapas do funil */
.chip-etapa-consentimento { background: var(--gold-dim);  color: var(--terra-dark); }
.chip-etapa-coletando     { background: var(--green-dim); color: var(--green); }
.chip-etapa-gerando       { background: #5C6B4322;        color: var(--olive); }
.chip-etapa-concluido     { background: var(--green-dim); color: var(--green); }
.chip-etapa-sem_inicio    { background: var(--surface-2); color: var(--text-muted); }

/* status de envio de e-mail */
.chip-mail-pendente    { background: var(--gold-dim);  color: var(--terra-dark); }
.chip-mail-processando { background: #2CA5E018;        color: #1d6fa0; }
.chip-mail-processado  { background: var(--green-dim); color: var(--green); }
.chip-mail-falha       { background: #C0492F18;        color: var(--red); }

/* badge de abandono */
.badge-abandono {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 20px;
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .3px;
  background: #C0492F18; color: var(--red);
}

/* progresso (coletando dados) */
.progress { display: flex; align-items: center; gap: 8px; margin-top: 5px; }
.progress-bar-bg { width: 90px; height: 6px; background: var(--bar-bg); border-radius: 99px; overflow: hidden; }
.progress-bar-fill { height: 100%; background: var(--green-bright); border-radius: 99px; }
.progress-txt { font-size: 10px; color: var(--text-muted); font-weight: 700; }

/* ── Table footer ── */
.table-footer {
  display: flex; align-items: center; justify-content: space-between; padding: 12px 16px;
  border-top: 1px solid var(--border); font-size: 12px; color: var(--text-muted); background: var(--surface-2);
}
.pagination { display: flex; gap: 4px; }

/* ── Botão ── */
.btn-detalhes {
  padding: 6px 13px; background: transparent; border: 1px solid var(--green-bright);
  border-radius: 9px; color: var(--green); cursor: pointer; font-family: var(--font-body);
  font-size: 12px; font-weight: 700; transition: all .15s; white-space: nowrap;
}
.btn-detalhes:hover { background: var(--green-bright); color: #fff; }
.btn-detalhes:disabled { opacity: .5; cursor: not-allowed; }
.btn-sm {
  padding: 4px 10px; border-radius: 7px; font-size: 11px; font-weight: 700;
  cursor: pointer; border: 1px solid; transition: all .15s; white-space: nowrap;
  font-family: var(--font-body);
}
.btn-sm:disabled { opacity: .5; cursor: not-allowed; }
.btn-secondary { background: transparent; border-color: var(--border); color: var(--text-muted); }
.btn-secondary:hover:not(:disabled) { background: var(--hover); color: var(--text); }
.btn-danger-sm { background: transparent; border-color: var(--red); color: var(--red); }
.btn-danger-sm:hover:not(:disabled) { background: var(--red); color: #fff; }
.token-cell { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.token-cell code {
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 7px;
  padding: 4px 7px; color: var(--green-deep); font-size: 12px; font-weight: 700;
}
.campanha-link-preview {
  min-height: 38px; display: flex; align-items: center; padding: 9px 12px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface-3); color: var(--ink-soft); font-size: 13px;
  word-break: break-all;
}
.perfil-layout { display: grid; grid-template-columns: minmax(260px, 340px) 1fr; gap: 16px; align-items: start; }
.perfil-foto-box { display: flex; flex-direction: column; gap: 10px; }
.perfil-foto-preview {
  width: 132px; height: 132px; border-radius: 50%; object-fit: cover;
  border: 3px solid var(--green-dim); background: var(--surface-2);
}
.indicacao-box { margin-top: 22px; display: flex; flex-direction: column; gap: 8px; }
.indicacao-box label {
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; color: var(--text-muted);
}
.indicacao-link-row { display: flex; gap: 8px; align-items: center; }
.indicacao-link-row input {
  flex: 1; min-width: 0; padding: 9px 12px; border: 1px solid var(--border);
  border-radius: var(--radius-sm); background: var(--surface-3); color: var(--ink-soft);
}
.rede-nome { display: flex; align-items: center; gap: 8px; min-width: 240px; }
.rede-spacer { width: calc(var(--nivel, 0) * 22px); flex: 0 0 calc(var(--nivel, 0) * 22px); }
.rede-branch { color: var(--text-muted); font-weight: 700; }
.rede-email { color: var(--text-muted); font-size: 12px; font-weight: 500; }
.switch { position: relative; display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 700; color: var(--text-muted); }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch-slider {
  width: 42px; height: 24px; border-radius: 999px; background: #C9D1D6;
  position: relative; transition: background .15s; flex-shrink: 0;
}
.switch-slider::after {
  content: ""; position: absolute; width: 18px; height: 18px; border-radius: 50%;
  top: 3px; left: 3px; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.22);
  transition: transform .15s;
}
.switch input:checked + .switch-slider { background: var(--green-bright); }
.switch input:checked + .switch-slider::after { transform: translateX(18px); }
.switch-label { font-size: 12px; min-width: 44px; }

/* ── Modal ── */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(20,32,18,.45); backdrop-filter: blur(3px);
  z-index: 100; display: flex; align-items: center; justify-content: center; padding: 20px;
}
.modal-overlay.hidden { display: none; }
.modal {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  width: 100%; max-width: 600px; max-height: 90vh; display: flex; flex-direction: column;
  overflow: hidden; box-shadow: 0 24px 70px rgba(20,32,18,.30);
}
.modal-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  padding: 20px 24px 16px; border-bottom: 1px solid var(--border); gap: 16px;
  background: linear-gradient(180deg, var(--surface-2), var(--card));
}
.modal-header h2 { font-family: var(--font-display); font-weight: 800; font-size: 21px; letter-spacing: 0; color: var(--green-deep); }
.modal-close {
  background: none; border: none; cursor: pointer; color: var(--text-muted); padding: 4px;
  border-radius: 7px; display: flex; flex-shrink: 0; transition: color .15s, background .15s;
}
.modal-close svg { width: 20px; height: 20px; fill: currentColor; }
.modal-close:hover { color: var(--ink); background: var(--surface-2); }
.modal-body { padding: 20px 24px; overflow-y: auto; flex: 1; }
.modal-note { font-size: 13px; line-height: 1.5; color: var(--ink-soft); margin-bottom: 16px; }
.modal-promover { max-width: 560px; }
.confirm-check {
  display: flex; gap: 10px; align-items: flex-start; margin-top: 16px;
  padding: 12px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface-3); font-size: 13px; color: var(--ink-soft); line-height: 1.45;
}
.confirm-check input { margin-top: 2px; accent-color: var(--green-bright); }

/* linha de visão 360 no topo do modal */
.modal-360 { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.modal-360 .pill {
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 11px;
  padding: 8px 12px; font-size: 12px; color: var(--ink-soft);
}
.modal-360 .pill b { display: block; font-size: 10px; text-transform: uppercase; letter-spacing: .5px; color: var(--text-muted); margin-bottom: 2px; font-weight: 700; }

/* ── Avaliação fields ── */
.aval-section { margin-bottom: 20px; }
.aval-section-title {
  font-family: var(--font-display); font-weight: 800; font-size: 12px; letter-spacing: .6px;
  text-transform: uppercase; color: var(--green-bright); margin-bottom: 12px; display: flex; align-items: center; gap: 8px;
}
.aval-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.aval-field { background: var(--surface-3); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 12px; }
.aval-field.full { grid-column: 1 / -1; }
.aval-field-label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--text-muted); margin-bottom: 4px; }
.aval-field-value { font-size: 13px; color: var(--ink); word-break: break-word; }

.campo { padding: 9px 0; border-bottom: 1px solid var(--border); }
.campo:last-child { border-bottom: none; }
.campo-label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--text-muted); margin-bottom: 3px; }
.campo-valor { font-size: 13px; color: var(--ink); }

.risco-alto  { color: var(--red); font-weight: 700; }
.risco-medio { color: var(--coral); font-weight: 700; }
.risco-baixo { color: var(--green); font-weight: 700; }

/* ── Skeleton ── */
.skeleton-lines { display: flex; flex-direction: column; gap: 8px; }
.skeleton { height: 14px; background: var(--bar-bg); border-radius: 5px; animation: shimmer 1.5s ease-in-out infinite; }
.skeleton.short { width: 55%; }
@keyframes shimmer { 0%,100%{opacity:1} 50%{opacity:.45} }

/* ── Botão primário ── */
.btn-primary {
  padding: 8px 18px; background: var(--green-bright); border: 1px solid var(--green-bright);
  border-radius: 9px; color: #fff; cursor: pointer; font-family: var(--font-body);
  font-size: 13px; font-weight: 700; transition: all .15s; box-shadow: 0 6px 16px rgba(108,179,63,.26);
}
.btn-primary:hover { background: var(--green); border-color: var(--green); }
.btn-primary:disabled { opacity: .5; cursor: not-allowed; box-shadow: none; }

/* ── Formulário (novo produto) ── */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-field { display: flex; flex-direction: column; gap: 5px; }
.form-field.full { grid-column: 1 / -1; }
.form-field label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; color: var(--text-muted); }
.form-field input, .form-field select {
  padding: 9px 12px; background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text); font-family: var(--font-body);
  font-size: 13px; outline: none; transition: border-color .15s, box-shadow .15s;
}
.form-field input:focus, .form-field select:focus { border-color: var(--green-bright); box-shadow: 0 0 0 3px rgba(108,179,63,.14); }

/* ── Catálogo — chip categoria e restrição ── */
.chip-categoria { background: var(--gold-dim); color: var(--terra-dark); }
.tag-restricao {
  display: inline-block; font-size: 10px; padding: 1px 6px; border-radius: 5px;
  background: #C0492F12; color: var(--red); font-weight: 700; margin-right: 3px;
}

/* ── Receitas grid ── */
.receitas-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px; align-items: start;
}
.receita-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow-sm); transition: box-shadow .15s, transform .15s;
}
.receita-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.receita-header {
  padding: 14px 16px 10px; background: linear-gradient(135deg, var(--surface-2), var(--card));
  border-bottom: 1px solid var(--border);
}
.receita-nome { font-family: var(--font-display); font-weight: 800; font-size: 16px; color: var(--green-deep); }
.receita-body { padding: 12px 16px; display: flex; flex-direction: column; gap: 8px; }
.receita-desc { font-size: 13px; color: var(--ink-soft); line-height: 1.5; }
.receita-ingredientes, .receita-preparo { font-size: 12px; color: var(--ink-soft); line-height: 1.5; }
.chip-objetivo { background: var(--green-dim); color: var(--green); }

/* ── Cérebro M90 — layout ── */
.cerebro-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.cerebro-card { height: fit-content; }
#card-validator { grid-column: 1 / -1; }

/* Protocolo */
.protocolo-versao {
  font-size: 11px; color: var(--text-muted); font-weight: 700;
  text-transform: uppercase; letter-spacing: .4px; margin-bottom: 14px;
}
.protocolo-bloco { margin-bottom: 16px; }
.protocolo-bloco:last-child { margin-bottom: 0; }
.protocolo-titulo {
  font-family: var(--font-display); font-weight: 800; font-size: 14px; color: var(--green-deep);
  margin-bottom: 8px; letter-spacing: 0;
}
.protocolo-regra { font-size: 13px; color: var(--ink-soft); line-height: 1.6; background: var(--surface-3); padding: 10px 12px; border-radius: 9px; }
.protocolo-item-regra { font-size: 13px; color: var(--ink-soft); padding: 4px 0; }
.protocolo-grupo { margin-bottom: 10px; }
.protocolo-grupo-titulo { font-size: 11px; font-weight: 700; text-transform: uppercase; color: var(--green-bright); margin-bottom: 6px; }
.protocolo-item { display: flex; justify-content: space-between; align-items: center; padding: 5px 0; border-bottom: 1px solid var(--border); font-size: 13px; gap: 10px; }
.protocolo-item:last-child { border-bottom: none; }
.protocolo-produto { font-weight: 700; color: var(--ink); }
.protocolo-meta { color: var(--text-muted); font-size: 12px; text-align: right; }

/* Arquétipos */
.arq-stats { display: flex; gap: 12px; margin-bottom: 12px; }
.arq-stat { background: var(--surface-3); border-radius: 9px; padding: 10px 14px; text-align: center; flex: 1; }
.arq-stat-val { font-family: var(--font-display); font-weight: 800; font-size: 24px; color: var(--green-deep); }
.arq-stat-lbl { font-size: 11px; color: var(--text-muted); font-weight: 700; text-transform: uppercase; margin-top: 2px; }

.arquetipos-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.arq-chip {
  background: var(--surface-3); border: 1px solid var(--border); border-radius: 9px;
  padding: 8px 10px; cursor: default; position: relative;
}
.arq-chip:hover .arq-reprocessar-btn { opacity: 1; }
.arq-reprocessar-btn {
  display: block; width: 100%; margin-top: 6px;
  padding: 3px 0; font-size: 10px; font-weight: 700; font-family: var(--font-body);
  background: transparent; border: 1px solid var(--green-bright); border-radius: 5px;
  color: var(--green); cursor: pointer; opacity: 0; transition: opacity .15s, background .12s;
}
.arq-reprocessar-btn:hover { background: var(--green-bright); color: #fff; }
.arq-reprocessar-btn:disabled { opacity: .5 !important; cursor: not-allowed; }
.arq-inativo { opacity: .45; }
.arq-codigo { font-size: 11px; font-weight: 700; color: var(--green-deep); margin-bottom: 3px; word-break: break-all; }
.arq-dims { font-size: 10px; color: var(--text-muted); line-height: 1.4; }
.arq-inativo-label { font-size: 9px; text-transform: uppercase; color: var(--red); font-weight: 700; margin-top: 3px; }

/* Validator logs */
.val-stats { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.val-stat { font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 20px; }
.val-ok   { background: var(--green-dim); color: var(--green); }
.val-warn { background: #E0834B18; color: var(--coral); }
.val-err  { background: #C0492F12; color: var(--red); }

.val-list { display: flex; flex-direction: column; gap: 8px; }
.val-item { border-radius: 9px; padding: 10px 12px; border-left: 3px solid; }
.val-item-ok   { background: #F1F8EA; border-color: var(--green-bright); }
.val-item-warn { background: #FBF1E8; border-color: var(--coral); }
.val-item-err  { background: #FBEDEB; border-color: var(--red); }
.val-item-header { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; }
.val-plano-id { font-family: monospace; font-size: 11px; color: var(--text-muted); }
.val-msgs { display: flex; flex-direction: column; gap: 3px; margin-top: 5px; }
.val-err-msg  { font-size: 12px; color: var(--red); }
.val-warn-msg { font-size: 12px; color: var(--coral); }

/* ── Responsive ── */
@media (max-width: 900px) {
  .cerebro-layout { grid-template-columns: 1fr; }
  #card-validator { grid-column: 1; }
}
@media (max-width: 768px) {
  .layout { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .sidebar { display: none; }
  .aval-grid { grid-template-columns: 1fr; }
  .metrics-grid { grid-template-columns: 1fr 1fr; }
  .page { padding: 16px; }
  .form-grid { grid-template-columns: 1fr; }
  .perfil-layout { grid-template-columns: 1fr; }
  .indicacao-link-row { flex-direction: column; align-items: stretch; }
  .receitas-grid { grid-template-columns: 1fr; }
  .arquetipos-grid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
}

/* ── Acompanhamento de check-ins (modal do cliente) ───────────────────────── */
.ci-stat {
  background: var(--surface-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
}
.ci-stat-label { font-size: 12px; color: var(--text-muted); font-weight: 600; }
.ci-stat-value {
  font-family: var(--font-display);
  font-size: 26px; font-weight: 800; line-height: 1.1;
  color: var(--green-deep); margin-top: 2px;
}
.ci-stat-sub { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.ci-sub-label { font-size: 12px; color: var(--text-muted); font-weight: 600; margin-bottom: 2px; }
.ci-tag {
  display: inline-block;
  font-size: 12px; padding: 1px 8px; border-radius: 8px;
  background: var(--terra-dim); color: var(--green); font-weight: 600;
}
