:root {
  --ink: #343a40;
  --muted: #6c757d;
  --paper: #e2e9ed;
  --panel: #ffffff;
  --line: #dee2e6;
  --primary: #2c4d5e;
  --primary-mid: #4a6d7e;
  --primary-dark: #1a3645;
  --accent: #09d3d3;
  --accent-deep: #008b98;
  --ok: #28a745;
  --danger: #dc3545;
  --input: #f5f7f8;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Geist, "Segoe UI", sans-serif;
}

.app {
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: 100%;
}

.rail {
  padding: 28px 22px;
  background: var(--primary);
  color: #fff;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.eyebrow {
  margin: 0 0 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 11px;
  color: var(--accent);
  font-weight: 700;
}

.brand h1 {
  margin: 0;
  font-family: Geist, "Segoe UI", sans-serif;
  font-size: 28px;
  line-height: 1.1;
  font-weight: 650;
  color: #fff;
}

.lede {
  margin: 14px 0 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 14px;
  line-height: 1.5;
}

.hints { display: flex; flex-direction: column; gap: 8px; }
.hints-label {
  margin: 0 0 4px;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}
.hints button {
  text-align: left;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-radius: 8px;
  padding: 10px 12px;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}
.hints button:hover {
  background: rgba(9, 211, 211, 0.18);
  border-color: var(--accent);
}

.foot {
  margin-top: auto;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.55);
}
.nova {
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: transparent;
  color: rgba(255, 255, 255, 0.8);
  border-radius: 8px;
  padding: 8px 10px;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
  text-align: left;
}
.nova:hover { border-color: var(--accent); color: #fff; }

.stage {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: var(--paper);
}

.top {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 24px;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
  font-size: 13px;
  color: var(--muted);
}
.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ok);
}

.thread {
  flex: 1;
  overflow: auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
/* Estilo ChatGPT: conteúdo ancorado no rodapé — cresce pra cima, não pra baixo.
   margin-top:auto no primeiro filho evita o bug de overflow do justify-content. */
.thread > *:first-child { margin-top: auto; }
.thread > *:last-child { margin-bottom: 4px; }

.msg {
  max-width: 720px;
  padding: 14px 16px;
  border-radius: 10px;
  line-height: 1.55;
  font-size: 15px;
  white-space: pre-wrap;
}
.msg.user {
  margin-left: auto;
  background: var(--primary);
  color: #fff;
  border-bottom-right-radius: 4px;
}
.msg.assistant {
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-bottom-left-radius: 4px;
}
.msg.system {
  align-self: center;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
  max-width: 520px;
}

/* Ações na mensagem do usuário (Editar e Reprocessar) */
.msg-user-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  margin-top: 6px;
}
.btn-msg-edit {
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 6px;
  padding: 3px 9px;
  font-size: 11px;
  font-family: inherit;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.2s ease;
  opacity: 0.85;
  user-select: none;
}
.btn-msg-edit:hover {
  background: rgba(255, 255, 255, 0.28);
  border-color: rgba(255, 255, 255, 0.45);
  opacity: 1;
  transform: translateY(-1px);
}
.btn-msg-edit svg {
  flex-shrink: 0;
}

/* Caixa de edição inline da mensagem */
.msg-edit-box {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  margin-top: 4px;
}
.msg-edit-input {
  width: 100%;
  box-sizing: border-box;
  resize: vertical;
  min-height: 60px;
  max-height: 280px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 8px;
  padding: 10px 12px;
  font: inherit;
  font-size: 14px;
  line-height: 1.5;
  background: rgba(0, 0, 0, 0.32);
  color: #ffffff;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.msg-edit-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(9, 211, 211, 0.3);
}
.msg-edit-btn-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.msg-edit-tip {
  font-size: 11px;
  opacity: 0.8;
  color: #e2e8f0;
}
.msg-edit-right-btns {
  display: flex;
  align-items: center;
  gap: 8px;
}
.btn-msg-edit-cancel {
  background: rgba(255, 255, 255, 0.12);
  color: #f1f5f9;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 12px;
  font-family: inherit;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn-msg-edit-cancel:hover {
  background: rgba(255, 255, 255, 0.22);
}
.btn-msg-edit-save {
  background: var(--accent);
  color: #0b1329;
  border: none;
  border-radius: 6px;
  padding: 6px 14px;
  font-size: 12px;
  font-family: inherit;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}
.btn-msg-edit-save:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.tools {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}
.chip {
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 8px;
  color: var(--primary-mid);
}

.composer {
  display: flex;
  gap: 10px;
  padding: 16px 24px 22px;
  border-top: 1px solid var(--line);
  background: var(--panel);
  align-items: flex-end;
}
.composer-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}
.composer textarea {
  width: 100%;
  resize: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  font: inherit;
  background: var(--input);
  color: var(--ink);
  max-height: 160px;
}
.composer textarea:focus {
  outline: 2px solid rgba(9, 211, 211, 0.35);
  border-color: var(--accent-deep);
}

#prompt-input {
  width: 100%;
  min-height: 400px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  font: inherit;
  font-size: 13px;
  line-height: 1.5;
  background: var(--input);
  color: var(--ink);
  font-family: monospace;
}

.db-info {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.db-info .db-card {
  background: var(--input);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 18px 20px;
}

.db-info .db-card h3 {
  margin: 0 0 10px;
  font-size: 14px;
  color: var(--accent-deep);
}

.db-info .db-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 6px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}

.db-info .db-row:last-child {
  border-bottom: none;
}

.db-info .db-label {
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
}

.db-info .db-value {
  color: var(--muted);
  text-align: right;
  font-family: monospace;
  word-break: break-all;
}
.composer button#send {
  border: 0;
  background: var(--primary);
  color: #fff;
  border-radius: 999px;
  width: 44px;
  height: 44px;
  min-width: 44px;
  padding: 0;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.composer button#send:hover { background: var(--primary-dark); }
.composer button.anexo {
  background: var(--input);
  color: var(--primary);
  border: 1px solid var(--line);
  padding: 0 14px;
  font-size: 18px;
  line-height: 1;
}
.composer button#send:disabled {
  opacity: 0.5;
  cursor: wait;
}
.anexos-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.anexo-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  background: var(--input);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 8px 4px 10px;
  color: var(--ink);
}
.anexo-chip button {
  height: auto;
  padding: 0 4px;
  background: transparent;
  color: var(--muted);
  font-size: 16px;
  font-weight: 500;
  line-height: 1;
}
.msg .files {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}
.chip.file {
  text-transform: none;
  letter-spacing: 0;
}

.hidden { display: none !important; }

.login {
  min-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: linear-gradient(160deg, var(--primary-dark) 0%, var(--primary) 55%, #3a7fa3 100%);
}
.login-card {
  width: min(420px, 100%);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 16px 40px rgba(26, 54, 69, 0.25);
}
.login-card .eyebrow { color: var(--accent-deep); }
.login-card h1 {
  margin: 0;
  font-family: Geist, "Segoe UI", sans-serif;
  font-size: 32px;
  color: var(--primary);
}
.login-card .lede { color: var(--muted); }
.login-card label, .user-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
}
.login-card input, .user-form input:not([type="checkbox"]) {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  font: inherit;
  color: var(--ink);
  background: var(--input);
}
.login-card button, .form-actions button[type="submit"] {
  border: 0;
  background: var(--primary);
  color: #fff;
  border-radius: 8px;
  padding: 12px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.login-card button:hover, .form-actions button[type="submit"]:hover {
  background: var(--primary-dark);
}
.erro {
  color: var(--danger);
  font-size: 13px;
  margin: 0;
}
.sucesso {
  color: #2e7d32;
  font-size: 13px;
  margin: 0;
}
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(26, 54, 69, 0.65);
  display: flex;
  justify-content: center;
  padding: 24px;
  overflow: auto;
  z-index: 100;
}
.sheet {
  width: min(980px, 100%);
  background: var(--paper);
  border-radius: 12px;
  padding: 28px;
  margin: auto;
  border: 1px solid var(--line);
}
.sheet-top {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 20px;
}
.sheet-top h2 {
  margin: 0;
  font-family: Geist, "Segoe UI", sans-serif;
  color: var(--primary);
}
.sheet-top .lede { color: var(--muted); }
.sheet .hints-label { color: var(--muted); }
.sheet-top .nova {
  border-color: var(--line);
  color: var(--primary);
  background: var(--panel);
}
.sheet-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.user-list { display: flex; flex-direction: column; gap: 8px; }
.user-card {
  text-align: left;
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 8px;
  padding: 12px;
  font: inherit;
  cursor: pointer;
}
.user-card strong { display: block; color: var(--primary); }
.user-card span { color: var(--muted); font-size: 12px; }
.user-card.active { border-color: var(--accent-deep); box-shadow: 0 0 0 2px rgba(9, 211, 211, 0.25); }
.user-form { display: flex; flex-direction: column; gap: 10px; }
.perms { display: flex; flex-direction: column; gap: 8px; }
.perms label, .check {
  flex-direction: row;
  align-items: flex-start;
  gap: 8px;
  color: var(--ink);
  font-size: 13px;
}
.perms small { display: block; color: var(--muted); font-weight: 400; }
.perms-empresas {
  max-height: 180px;
  overflow-y: auto;
  padding: 8px 10px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.empresa-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  cursor: pointer;
  padding: 4px 0;
  color: var(--ink);
  font-size: 13px;
}
.empresa-item:hover {
  opacity: 0.9;
}
.empresa-todas {
  border-bottom: 1px solid var(--line);
  padding-bottom: 6px;
  margin-bottom: 4px;
}
.form-actions { display: flex; gap: 8px; }
.ghost {
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink);
  border-radius: 8px;
  padding: 12px 14px;
  font: inherit;
  cursor: pointer;
}

@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .sheet-grid { grid-template-columns: 1fr; }
}

.msg-hora {
  display: block;
  margin-top: 6px;
  font-size: 11px;
  opacity: 0.65;
  text-align: right;
}
.msg.assistant .msg-hora,
.msg.system .msg-hora {
  color: var(--muted);
}
.msg-body a {
  color: inherit;
  text-decoration: underline;
  word-break: break-all;
}
.pdf-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  padding: 7px 12px;
  border-radius: 8px;
  background: var(--accent);
  color: #fff !important;
  text-decoration: none !important;
  font-weight: 600;
  font-size: 13px;
}
.pdf-link:hover {
  filter: brightness(1.1);
}
.msg-foto {
  display: block;
  max-width: 220px;
  max-height: 220px;
  width: auto;
  height: auto;
  margin-top: 8px;
  border-radius: 10px;
  border: 1px solid var(--border);
  object-fit: cover;
}

.conversas {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 220px;
  overflow-y: auto;
}
.conversas-vazio {
  color: var(--muted);
  font-size: 12px;
  margin: 2px 0;
}
.conversa-item {
  display: flex;
  align-items: stretch;
  gap: 4px;
  border-radius: 8px;
  border: 1px solid var(--line);
  overflow: hidden;
}
.conversa-item.active {
  border-color: var(--accent);
  background: rgba(15, 59, 76, 0.06);
}
.conversa-abrir {
  flex: 1;
  min-width: 0;
  text-align: left;
  background: transparent;
  border: none;
  padding: 6px 8px;
  cursor: pointer;
  font-family: inherit;
  color: inherit;
}
.conversa-abrir strong {
  display: block;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.conversa-abrir span {
  font-size: 10px;
  color: var(--muted);
}
.conversa-excluir {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0 8px;
  color: var(--muted);
  font-size: 14px;
}
.conversa-excluir:hover {
  color: #c0392b;
}

/* ===== Botão de menu + backdrop (visíveis só no mobile) ===== */
.menu-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  color: var(--primary);
  font-size: 20px;
  cursor: pointer;
  flex-shrink: 0;
}
.backdrop {
  position: fixed;
  inset: 0;
  background: rgba(26, 54, 69, 0.5);
  z-index: 30;
}

/* ===== Mobile-first: drawer deslizante ===== */
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }

  .menu-btn { display: inline-flex; }

  .top {
    position: sticky;
    top: 0;
    z-index: 10;
    padding: calc(8px + env(safe-area-inset-top)) 12px 8px;
  }
  .top #top-status {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .rail {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(320px, 88vw);
    z-index: 40;
    transform: translateX(-105%);
    transition: transform 0.25s ease;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: max(22px, env(safe-area-inset-top)) 18px max(22px, env(safe-area-inset-bottom));
    gap: 20px;
  }
  .rail.aberto {
    transform: translateX(0);
    box-shadow: 14px 0 36px rgba(26, 54, 69, 0.4);
  }
  .rail .brand h1 { font-size: 22px; }
  .foot { margin-top: auto; }

  /* alvos de toque maiores no menu */
  .hints button,
  .nova,
  .conversa-abrir {
    min-height: 44px;
    display: flex;
    align-items: center;
  }
  .hints button { font-size: 14px; }
  .conversa-excluir { width: 40px; font-size: 16px; }

  .msg { max-width: 94%; }
}

/* ===== Marca + seletor de empresa na barra superior ===== */
.top-empresa {
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.empresa-select {
  max-width: 200px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 8px;
  font: inherit;
  font-size: 12px;
  color: var(--ink);
  background: var(--input);
}
@media (max-width: 860px) {
  .top-empresa { font-size: 14px; }
  .empresa-select { max-width: 130px; font-size: 13px; }
}

/* ============================================================

/* ============================================================
   DESIGN SYSTEM ERGON (idêntico ao app.ergonerp.com.br/ergonparceiros)
   Tema claro + identidade #2C4D5E · Poppins · cards brancos
   ============================================================ */
:root {
  --ink: #343A40;
  --muted: #6C757D;
  --paper: #E2E9ED;
  --panel: #FFFFFF;
  --line: #DEE2E6;
  --input: #f5f7f8;
  --primary: #2C4D5E;
  --primary-mid: #4A6D7E;
  --primary-dark: #1a3645;
  --accent: #008B98;
  --accent-deep: #007481;
  --send: #2C4D5E;
  --hover: #e8f0f5;
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: Poppins, Geist, "Segoe UI", sans-serif;
}

/* --- barra lateral --- */
.rail { background: var(--panel); }
.brand h1 { color: var(--primary); }
.eyebrow { color: var(--accent); }
.lede { color: var(--muted); }
.hints-label { color: var(--muted); }
.hints button {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
}
.hints button:hover { background: var(--hover); border-color: var(--primary-mid); }
.foot { color: var(--muted); }
.nova {
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink);
}
.nova:hover { border-color: var(--primary); color: var(--primary); }

/* conversas salvas */
.conversa-item { border-color: var(--line); background: var(--panel); }
.conversa-item.active { border-color: var(--primary); background: var(--hover); }
.conversa-abrir { color: var(--ink); }
.conversa-abrir span { color: var(--muted); }
.conversas-vazio { color: var(--muted); }

/* --- palco --- */
.stage { background: transparent; }
.top {
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  color: var(--muted);
}
.top-empresa { color: var(--primary); }
.empresa-select {
  background: var(--input);
  color: var(--ink);
  border-color: var(--line);
}
.menu-btn {
  background: var(--panel);
  color: var(--primary);
  border-color: var(--line);
}

/* --- mensagens --- */
.msg.user {
  background: var(--primary);
  color: #fff;
  border-radius: 18px;
  border-bottom-right-radius: 6px;
}
.msg.assistant {
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 3px solid var(--primary);
  color: var(--ink);
}
.msg.system { color: var(--muted); }
.chip { border-color: var(--line); color: var(--primary-mid); background: var(--panel); }
.chip.file { color: var(--ink); }
.msg-hora { color: var(--muted); }
.msg-body a { color: var(--accent-deep); }
.pdf-link { background: var(--primary); color: #fff !important; }

/* --- hero + composer --- */
.stage { position: relative; }
#composer-wrap { padding: 14px 24px 20px; }
#hero { display: none; text-align: center; margin-bottom: 20px; }
#hero h2 {
  margin: 0;
  font-size: clamp(24px, 3.8vw, 36px);
  font-weight: 700;
  color: var(--primary);
  letter-spacing: -0.01em;
  line-height: 1.25;
}
#hero p { margin: 8px auto 0; color: var(--muted); font-size: 14.5px; font-weight: 500; max-width: 680px; line-height: 1.45; }

.composer {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 10px 8px 18px;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 18px rgba(44, 77, 94, 0.12);
}
.composer-main { gap: 4px; }
.composer textarea {
  background: transparent;
  border: none;
  color: var(--ink);
  font-size: 16px;
  padding: 10px 6px;
}
.composer textarea:focus { outline: none; border: none; }
.composer textarea::placeholder { color: #9aa5ab; }
.composer button#send {
  background: var(--send);
  border-radius: 999px;
  width: 46px;
  height: 46px;
  min-width: 46px;
  padding: 0;
  font-size: 20px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, box-shadow 0.15s;
}
.composer button#send:hover { background: var(--primary-dark); box-shadow: 0 4px 14px rgba(44,77,94,.28); }
.composer button#send:disabled { opacity: 0.45; }
.composer button.anexo {
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 22px;
  padding: 0 6px;
  height: 44px;
  width: 44px;
}
.composer button.anexo:hover { color: var(--primary); }
.anexo-chip { background: var(--input); border-color: var(--line); color: var(--ink); }
.anexo-chip button { color: var(--muted); }

/* --- Gravação e Áudio no Composer --- */
.composer button.btn-mic {
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 20px;
  padding: 0 6px;
  height: 44px;
  width: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s, transform 0.15s;
}
.composer button.btn-mic:hover {
  color: #ef4444;
  transform: scale(1.08);
}
.composer button.btn-mic.recording {
  color: #ef4444;
  animation: micBlink 1s infinite alternate;
}
@keyframes micBlink {
  0% { transform: scale(1); filter: drop-shadow(0 0 2px rgba(239, 68, 68, 0.4)); }
  100% { transform: scale(1.15); filter: drop-shadow(0 0 8px rgba(239, 68, 68, 0.9)); }
}

.audio-gravando-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  padding: 2px 4px;
}
.audio-gravando-left {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.rec-dot {
  width: 10px;
  height: 10px;
  background: #ef4444;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.9);
  animation: recPulse 1.2s infinite ease-in-out;
}
@keyframes recPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.85); }
}
.rec-label {
  font-size: 12px;
  font-weight: 700;
  color: #ef4444;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.rec-tempo {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  min-width: 44px;
}
.rec-waves {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 20px;
  flex: 1;
  padding: 0 6px;
  min-width: 24px;
  max-width: 120px;
}
.rec-waves span {
  display: block;
  width: 3px;
  background: #ef4444;
  border-radius: 3px;
  animation: soundWave 0.9s infinite ease-in-out alternate;
}
.rec-waves span:nth-child(1) { height: 6px; animation-delay: 0.1s; }
.rec-waves span:nth-child(2) { height: 16px; animation-delay: 0.3s; }
.rec-waves span:nth-child(3) { height: 20px; animation-delay: 0.2s; }
.rec-waves span:nth-child(4) { height: 12px; animation-delay: 0.4s; }
.rec-waves span:nth-child(5) { height: 18px; animation-delay: 0.15s; }
.rec-waves span:nth-child(6) { height: 8px; animation-delay: 0.35s; }

@keyframes soundWave {
  0% { transform: scaleY(0.4); opacity: 0.5; }
  100% { transform: scaleY(1.3); opacity: 1; }
}

.audio-gravando-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* Botoes de acao de gravacao e reproducao */
.composer button.btn-rec-action,
.btn-rec-action {
  height: 36px !important;
  min-height: 36px !important;
  padding: 0 14px !important;
  border-radius: 999px !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  cursor: pointer !important;
  border: 1px solid transparent !important;
  box-sizing: border-box !important;
  white-space: nowrap !important;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1) !important;
  line-height: 1 !important;
  user-select: none !important;
}

/* Botao Cancelar: fundo vermelho suave, icone e texto vermelhos bem legiveis */
.composer button.btn-rec-cancel,
.btn-rec-cancel {
  background: #fef2f2 !important;
  color: #dc2626 !important;
  border-color: #fecaca !important;
}
.composer button.btn-rec-cancel:hover,
.btn-rec-cancel:hover {
  background: #fee2e2 !important;
  color: #b91c1c !important;
  border-color: #fca5a5 !important;
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(220, 38, 38, 0.15) !important;
}

/* Botao Concluir: verde esmeralda com icone de check para finalizar */
.composer button.btn-rec-stop,
.btn-rec-stop {
  background: #10b981 !important;
  color: #ffffff !important;
  border-color: #059669 !important;
  box-shadow: 0 2px 6px rgba(16, 185, 129, 0.28) !important;
}
.composer button.btn-rec-stop:hover,
.btn-rec-stop:hover {
  background: #059669 !important;
  color: #ffffff !important;
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(16, 185, 129, 0.38) !important;
}

/* Barra de Previa de Audio */
.audio-preview-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 4px 10px;
  background: rgba(44, 77, 94, 0.05);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-sizing: border-box;
}
.preview-audio-tag {
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.preview-tempo {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}
.composer button.btn-rec-play,
.btn-rec-play {
  background: var(--primary) !important;
  color: #ffffff !important;
  border-color: transparent !important;
  padding: 0 14px !important;
  box-shadow: 0 2px 6px rgba(44, 77, 94, 0.25) !important;
}
.composer button.btn-rec-play:hover,
.btn-rec-play:hover {
  background: var(--primary-dark) !important;
  transform: translateY(-1px);
}

/* Responsividade Mobile para Gravacao e Composer */
@media (max-width: 600px) {
  .audio-gravando-bar {
    gap: 6px;
    padding: 2px;
  }
  .rec-label {
    display: none;
  }
  .rec-waves {
    max-width: 45px;
    padding: 0 2px;
  }
  .audio-gravando-actions {
    gap: 6px;
  }
  .composer button.btn-rec-action,
  .btn-rec-action {
    height: 36px !important;
    min-height: 36px !important;
    padding: 0 10px !important;
    font-size: 12px !important;
  }
  .composer button.btn-rec-action svg {
    width: 14px;
    height: 14px;
  }
}

@media (max-width: 420px) {
  .rec-waves {
    display: none;
  }
  .btn-rec-text {
    font-size: 11px;
  }
  .composer button.btn-rec-action {
    padding: 0 8px !important;
  }
}

/* Áudio no Thread do Chat */
.msg-audio-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 6px 0;
  padding: 10px 12px;
  background: rgba(0, 0, 0, 0.04);
  border-radius: 14px;
  max-width: 340px;
}
.msg.user .msg-audio-card {
  background: rgba(255, 255, 255, 0.18);
}
.msg-audio-header {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  opacity: 0.9;
}
.msg-audio-player {
  width: 100%;
  height: 36px;
  border-radius: 18px;
  outline: none;
}
.msg.user .msg-audio-player {
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.12));
}

/* estado vazio: hero + composer no fluxo normal com rolagem confortável */
.stage.vazio {
  overflow-y: auto !important;
}
.stage.vazio .thread { display: none; }
.stage.vazio #composer-wrap {
  position: relative;
  top: auto;
  left: auto;
  transform: none;
  width: min(840px, 94%);
  margin: 20px auto 36px;
  padding: 0;
}
.stage.vazio #hero { display: block; margin-bottom: 16px; }

/* --- login (fundo primário, como no ErgonParceiros) --- */
.login { background: var(--primary); }
.login-card {
  background: var(--panel);
  border-color: var(--line);
  box-shadow: 0 20px 60px rgba(26, 54, 69, 0.35);
}
.login-card .eyebrow { color: var(--accent); }
.login-card h1 { color: var(--primary); }
.login-card .lede { color: var(--muted); }
.login-card input, .user-form input:not([type="checkbox"]) {
  background: var(--input);
  color: var(--ink);
  border-color: var(--input-borda, #d0d5d8);
}
.login-card button, .form-actions button[type="submit"] { background: var(--primary); }
.login-card button:hover, .form-actions button[type="submit"]:hover { background: var(--primary-dark); }

/* --- overlay usuários --- */
.overlay { background: rgba(26, 54, 69, 0.45); }
.sheet { background: var(--paper); border-color: var(--line); }
.sheet-top h2 { color: var(--primary); }
.sheet-top .lede, .sheet .hints-label { color: var(--muted); }
.sheet-top .nova { background: var(--panel); color: var(--primary); border-color: var(--line); }
.user-card { background: var(--panel); border-color: var(--line); color: var(--ink); }
.user-card strong { color: var(--primary); }
.user-card span { color: var(--muted); }
.user-card.active { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(44, 77, 94, 0.18); }
.perms label, .check { color: var(--ink); }
.perms small { color: var(--muted); }
.ghost { background: var(--panel); color: var(--ink); border-color: var(--line); }
.erro { color: #dc3545; }

@media (max-width: 860px) {
  .rail { background: var(--panel); }
  .composer { padding: 6px 8px 6px 14px; }
  .composer button#send { width: 42px; height: 42px; min-width: 42px; }
  .stage.vazio { overflow-y: auto !important; }
  .stage.vazio #composer-wrap {
    position: relative;
    top: auto;
    left: auto;
    transform: none;
    width: 94%;
    margin: 14px auto 28px;
  }
  #hero h2 { font-size: clamp(26px, 7vw, 36px); }
}

/* ============================================================
   LAYOUT FIXO: composer sempre visível; SOMA A CONVERSA que rola
   ============================================================ */
html, body {
  height: 100%;
  overflow: hidden;
}
.app {
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}
.rail {
  overflow-y: auto;
  min-height: 0;
}
.stage {
  height: 100%;
  min-height: 0;
  overflow: hidden;
}
.top { flex-shrink: 0; }
.thread {
  flex: 1 1 0 !important;
  min-height: 0 !important;
  overflow-y: auto !important;
}
#composer-wrap {
  flex-shrink: 0;
}
.stage.vazio #composer-wrap {
  flex-shrink: 0;
}

/* ===== Painel de Administração de Múltiplos Bancos ===== */
.sheet-wide {
  max-width: 900px !important;
  width: 95%;
}
.db-admin-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 16px;
}
@media (max-width: 768px) {
  .db-admin-grid {
    grid-template-columns: 1fr;
  }
}
.db-section {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.db-section h3 {
  font-size: 15px;
  font-weight: 600;
  margin: 0;
  color: var(--ink);
}
.db-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.btn-mini {
  padding: 4px 8px;
  font-size: 11px;
  border-radius: 6px;
  cursor: pointer;
}
.db-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 280px;
  overflow-y: auto;
}
.db-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  transition: border-color 0.2s;
}
.db-item:hover {
  border-color: var(--primary);
}
.db-item-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.db-item-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.db-item-sub {
  font-size: 11px;
  color: var(--muted);
}
.db-badge {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 10px;
  font-weight: 500;
  text-transform: uppercase;
}
.db-badge.principal { background: #e8f4fd; color: #1976d2; border: 1px solid #bbdefb; }
.db-badge.custom { background: #e8f8f5; color: #00897b; border: 1px solid #b2dfdb; }
.db-badge.autodescoberta { background: #fdf2e9; color: #e67e22; border: 1px solid #f8c471; }

.db-item-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.db-item-actions button {
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 11px;
  cursor: pointer;
  color: var(--ink);
}
.db-item-actions button:hover {
  background: var(--line);
}
.db-item-actions button.btn-del:hover {
  background: #fee2e2;
  color: #dc2626;
  border-color: #fca5a5;
}

.toggle-visivel-ia {
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: transparent;
  transition: all 0.2s;
}
.toggle-visivel-ia:hover {
  background: var(--line);
}
.toggle-visivel-ia input[type="checkbox"] {
  width: 14px;
  height: 14px;
  cursor: pointer;
}
.toggle-visivel-ia .toggle-label {
  white-space: nowrap;
}

.db-descobertos {
  margin-top: 12px;
  border-top: 1px dashed var(--line);
  padding-top: 10px;
}
.db-descobertos h4 {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.db-desc-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg);
  padding: 6px 10px;
  border-radius: 6px;
  margin-bottom: 6px;
  font-size: 12px;
}
.hint-text {
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}
.teste-status {
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
}
.teste-status.ok { background: #e8f8f5; color: #00796b; border: 1px solid #b2dfdb; }
.teste-status.erro { background: #fde8e8; color: #c0392b; border: 1px solid #f5c6cb; }
.teste-status.testando { background: #f0f4f8; color: var(--muted); border: 1px solid var(--line); }

/* ===== Banner e Notificação de Atualização (Admin) ===== */
.badge-versao {
  background: #ff5252;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 10px;
  margin-left: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  animation: pulse-badge 2s infinite;
}

@keyframes pulse-badge {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.08); opacity: 0.85; }
  100% { transform: scale(1); opacity: 1; }
}

.banner-atualizacao {
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
  color: #fff;
  padding: 10px 16px;
  margin: 8px 16px 0 16px;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  font-size: 13px;
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.banner-icon { font-size: 16px; }
.btn-banner-link {
  margin-left: auto;
  background: #00e676;
  color: #0d2818;
  font-weight: 700;
  font-size: 12px;
  padding: 6px 12px;
  border-radius: 6px;
  text-decoration: none;
  transition: opacity 0.2s;
  white-space: nowrap;
}
.btn-banner-link:hover { opacity: 0.9; }
.btn-banner-close {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  font-size: 18px;
  cursor: pointer;
  padding: 0 4px;
}
.btn-banner-close:hover { color: #fff; }

/* Modal de Versão */
.versao-content { padding: 16px 0; }
.versao-card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px;
}
.versao-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}
.versao-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 12px;
  background: #e0e0e0;
  color: #333;
}
.versao-badge.atualizado { background: #e8f8f5; color: #00796b; }
.versao-badge.desatualizado { background: #fff3e0; color: #e65100; border: 1px solid #ffe0b2; }
.versao-timestamp { font-size: 11px; color: var(--muted); }
.versao-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.versao-info-item { display: flex; flex-direction: column; gap: 4px; }
.versao-label { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; }
.versao-val { font-size: 14px; color: var(--ink); }
.versao-changelog { margin-bottom: 16px; }
.changelog-box {
  background: var(--input);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.4;
  color: var(--ink);
  margin-top: 6px;
  white-space: pre-wrap;
}
.versao-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
}

/* ===== Markdown e Tabelas nas Mensagens ===== */
.msg-body h1, .msg-body h2, .msg-body h3, .msg-body h4 {
  margin: 10px 0 6px;
  color: inherit;
  font-weight: 700;
  line-height: 1.25;
}
.msg-body h1 { font-size: 1.15rem; }
.msg-body h2 { font-size: 1.05rem; }
.msg-body h3 { font-size: 0.98rem; }
.msg-body h4 { font-size: 0.90rem; }

.msg-body hr.msg-hr {
  border: none;
  border-top: 1px solid rgba(0, 0, 0, 0.12);
  margin: 12px 0;
}

.msg-body p {
  margin: 0 0 8px;
}
.msg-body p:last-child {
  margin-bottom: 0;
}

.msg-body ul, .msg-body ol {
  margin: 6px 0 10px 20px;
  padding: 0;
}
.msg-body li {
  margin-bottom: 4px;
  line-height: 1.45;
}

.msg-body code {
  background: rgba(0, 0, 0, 0.06);
  color: #0d5f50;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.88em;
}

.msg.user .msg-body code {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.msg-body pre {
  background: #1e293b;
  color: #f8fafc;
  padding: 12px;
  border-radius: 8px;
  overflow-x: auto;
  margin: 10px 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.85rem;
}
.msg-body pre code {
  background: transparent;
  color: inherit;
  padding: 0;
}

/* Tabelas Elegantes e Responsivas */
.msg-table-wrap {
  width: 100%;
  overflow-x: auto;
  margin: 10px 0 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--panel);
}

.msg-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
  text-align: left;
}

.msg-table th {
  background: rgba(16, 149, 133, 0.08);
  color: var(--primary);
  font-weight: 700;
  padding: 8px 12px;
  border-bottom: 2px solid var(--line);
  white-space: nowrap;
}

.msg-table td {
  padding: 7px 12px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
}

.msg-table tr:nth-child(even) td {
  background: rgba(0, 0, 0, 0.015);
}

.msg-table tr:hover td {
  background: rgba(16, 149, 133, 0.04);
}

/* ===== Auto-Update & Barra de Atualizações ===== */
.btn-banner-ghost {
  color: rgba(255, 255, 255, 0.85);
  font-size: 11px;
  text-decoration: none;
  padding: 4px 8px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  transition: all 0.2s;
  white-space: nowrap;
}
.btn-banner-ghost:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

.versao-progresso-box {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #eef2ff;
  border: 1px solid #c7d2fe;
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 14px;
}
.versao-progresso-texto {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 12px;
  color: #312e81;
}
.versao-progresso-texto strong {
  font-size: 13px;
  color: #1e1b4b;
}

.versao-autoupdate-box {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(0, 0, 0, 0.03);
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 10px 14px;
  margin-top: 14px;
}
.versao-autoupdate-icon {
  font-size: 20px;
}
.versao-autoupdate-info strong {
  display: block;
  font-size: 12px;
  color: var(--ink);
}
.versao-autoupdate-info p {
  font-size: 11px;
  color: var(--muted);
  margin: 2px 0 0 0;
}

/* Overlay Bloqueante de Atualização em Tempo Real */
.overlay-atualizacao {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  padding: 20px;
  animation: fadeIn 0.3s ease;
}
.card-atualizacao {
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  padding: 32px 28px;
  max-width: 440px;
  width: 100%;
  text-align: center;
}
.atualizacao-icon-spin {
  display: inline-flex;
  font-size: 36px;
  margin-bottom: 12px;
  animation: pulseGlow 1.2s infinite ease-in-out;
}
.card-atualizacao h2 {
  font-size: 20px;
  color: #0f172a;
  margin: 0 0 8px;
}
.card-atualizacao p {
  font-size: 13px;
  color: #64748b;
  margin: 0 0 20px;
  line-height: 1.4;
}
.progress-bar-wrap {
  width: 100%;
  height: 8px;
  background: #e2e8f0;
  border-radius: 4px;
  overflow: hidden;
  position: relative;
  margin-bottom: 12px;
}
.progress-bar-fill {
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg, #10b981, #06b6d4, #3b82f6);
  border-radius: 4px;
  animation: indeterminateBar 1.6s infinite linear;
}
@keyframes indeterminateBar {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(250%); }
}
@keyframes pulseGlow {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 4px #06b6d4); }
  50% { transform: scale(1.15); filter: drop-shadow(0 0 12px #3b82f6); }
}
.atualizacao-ping {
  font-size: 12px !important;
  color: #059669 !important;
  font-weight: 600;
  margin: 0 !important;
}

/* ===== Regras de Cadastro de Produtos Modal ===== */
.regras-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-top: 14px;
}
.regras-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.regras-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
}
.regras-icon {
  font-size: 24px;
  line-height: 1;
}
.regras-card-header h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
}
.regras-card-header p {
  margin: 2px 0 0;
  font-size: 12px;
}
.regras-checks {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
@media (max-width: 680px) {
  .regras-checks {
    grid-template-columns: 1fr;
  }
}
.check-tile {
  display: flex !important;
  flex-direction: row !important;
  align-items: flex-start !important;
  gap: 10px !important;
  padding: 10px 12px;
  background: var(--input);
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.check-tile:hover {
  border-color: var(--primary);
  background: rgba(14, 165, 233, 0.05);
}
.check-tile input[type="checkbox"] {
  margin-top: 3px;
  width: 17px;
  height: 17px;
  accent-color: var(--primary);
  cursor: pointer;
}
.check-tile-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.check-tile-body strong {
  font-size: 13px;
  color: var(--ink);
}
.check-tile-body span {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.3;
}
.regras-defaults-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}
.form-select, .form-textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 12px;
  font: inherit;
  color: var(--ink);
  background: var(--input);
  outline: none;
  box-sizing: border-box;
}
.form-select:focus, .form-textarea:focus {
  border-color: var(--primary);
}
.form-textarea {
  resize: vertical;
  min-height: 60px;
}

/* ===== Tela de APIs e Integrações (Administrador) ===== */
.integracoes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 16px;
  margin-top: 14px;
}

.integracao-card {
  background: var(--input);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.integracao-card:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.integracao-card.ativo {
  border-left: 4px solid #10b981;
}

.integracao-card.pendente {
  border-left: 4px solid #f59e0b;
}

.integracao-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.integracao-icon-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.integracao-icon {
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  flex-shrink: 0;
}

.integracao-info h4 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
}

.integracao-sub {
  margin: 2px 0 0;
  font-size: 11px;
  color: var(--muted);
}

.integracao-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}

.integracao-badge.status-ativo {
  background: #d1fae5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.integracao-badge.status-alerta {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
}

.integracao-desc {
  font-size: 12px;
  color: var(--ink);
  line-height: 1.45;
  margin: 0;
}

.integracao-recursos-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.integracao-tag {
  font-size: 10px;
  background: var(--panel);
  color: var(--ink);
  border: 1px solid var(--line);
  padding: 3px 7px;
  border-radius: 6px;
}

.integracao-footer {
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: var(--muted);
}

.integracao-chave {
  font-family: monospace;
  background: var(--panel);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid var(--line);
  color: var(--ink);
}

/* ============================================================
   Gatilhos Rápidos de Informação e Ações Rápidas (Abaixo do Composer)
   ============================================================ */
.gatilhos-wrap {
  width: 100%;
  margin-top: 14px;
  animation: fadeInGatilhos 0.3s ease-out;
}

@keyframes fadeInGatilhos {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.gatilhos-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  width: 100%;
}

.gatilho-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px 3px 7px;
  min-height: 64px;
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 6px rgba(44, 77, 94, 0.05);
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  color: var(--ink);
  outline: none;
}

.gatilho-btn:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  background: #f0f7fa;
  box-shadow: 0 6px 14px rgba(44, 77, 94, 0.12);
}

.gatilho-btn:active {
  transform: scale(0.95);
  background: #e2eff5;
  border-color: var(--primary);
}

.gatilho-icon {
  font-size: 22px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.18s ease;
}

.gatilho-btn:hover .gatilho-icon {
  transform: scale(1.15);
}

.gatilho-text {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--ink);
  text-align: center;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  padding: 0 2px;
}

/* Modo Conversa Ativa (.stage:not(.vazio)):
   Gatilhos se transformam em uma elegante barra de rolagem horizontal */
.stage:not(.vazio) .gatilhos-wrap {
  margin-top: 8px;
  padding: 0 2px;
}

.stage:not(.vazio) .gatilhos-grid {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  gap: 6px;
  padding: 2px 2px 4px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.stage:not(.vazio) .gatilhos-grid::-webkit-scrollbar {
  display: none;
}

.stage:not(.vazio) .gatilho-btn {
  flex-direction: row;
  min-height: 32px;
  height: 32px;
  padding: 4px 12px;
  border-radius: 999px;
  flex-shrink: 0;
  gap: 6px;
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: 0 1px 4px rgba(44, 77, 94, 0.05);
}

.stage:not(.vazio) .gatilho-btn:hover {
  transform: translateY(-1px);
}

.stage:not(.vazio) .gatilho-icon {
  font-size: 14px;
}

.stage:not(.vazio) .gatilho-text {
  font-size: 12px;
}

@media (max-width: 900px) {
  .gatilhos-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Ajustes em dispositivos móveis */
@media (max-width: 600px) {
  .stage.vazio #hero {
    margin-bottom: 12px;
  }
  .stage.vazio #hero h2 {
    font-size: clamp(20px, 5.5vw, 28px);
  }
  .stage.vazio #hero p {
    font-size: 12px;
    margin-top: 4px;
    max-height: 80px;
    overflow-y: auto;
  }
  .gatilhos-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
  }
  .gatilho-btn {
    min-height: 58px;
    padding: 6px 2px 5px;
    border-radius: 10px;
  }
  .gatilho-icon {
    font-size: 19px;
  }
  .gatilho-text {
    font-size: 9.5px;
    letter-spacing: -0.2px;
  }
}

@media (max-width: 380px) {
  .gatilhos-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 5px;
  }
  .gatilho-btn {
    min-height: 52px;
    padding: 5px 1px 4px;
    border-radius: 8px;
  }
  .gatilho-icon {
    font-size: 17px;
  }
  .gatilho-text {
    font-size: 9px;
  }
}

/* ============================================================
   BOTÕES INÍCIO / NOVA CONVERSA E HISTÓRICO DE CONVERSAS
   ============================================================ */

/* Top bar actions */
.top-status-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
}

.top-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.btn-top-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 9999px;
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

.btn-top-inicio {
  background: rgba(0, 217, 245, 0.12);
  color: #00d9f5;
  border: 1px solid rgba(0, 217, 245, 0.35);
}

.btn-top-inicio:hover {
  background: rgba(0, 217, 245, 0.22);
  border-color: #00d9f5;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 217, 245, 0.28);
}

.btn-top-historico {
  background: rgba(139, 92, 246, 0.12);
  color: #a78bfa;
  border: 1px solid rgba(139, 92, 246, 0.35);
}

.btn-top-historico:hover {
  background: rgba(139, 92, 246, 0.22);
  border-color: #a78bfa;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.28);
}

.btn-top-ajuda {
  background: rgba(16, 185, 129, 0.1);
  color: #047857;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.btn-top-ajuda:hover {
  background: rgba(16, 185, 129, 0.18);
  border-color: #10b981;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}

.btn-help-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border: 1.5px solid currentColor;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 700;
}

.btn-top-action:active {
  transform: translateY(0);
}

.btn-top-icon {
  font-size: 1rem;
  line-height: 1;
}

@media (max-width: 680px) {
  .btn-top-action {
    padding: 5px 10px;
    font-size: 0.78rem;
    gap: 4px;
  }
  .btn-top-icon {
    font-size: 0.95rem;
  }
}

@media (max-width: 480px) {
  .btn-top-action {
    padding: 5px 8px;
    font-size: 0.74rem;
  }
}

/* Sidebar primary nav buttons */
.rail-nav-buttons {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0 0 14px 0;
}

.btn-rail-action {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
}

.btn-rail-inicio {
  background: linear-gradient(135deg, rgba(0, 217, 245, 0.18), rgba(14, 165, 233, 0.24));
  color: #00d9f5;
  border: 1px solid rgba(0, 217, 245, 0.4);
}

.btn-rail-inicio:hover {
  background: linear-gradient(135deg, rgba(0, 217, 245, 0.28), rgba(14, 165, 233, 0.35));
  border-color: #00d9f5;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(0, 217, 245, 0.25);
}

.btn-rail-historico {
  background: rgba(139, 92, 246, 0.14);
  color: #c4b5fd;
  border: 1px solid rgba(139, 92, 246, 0.3);
}

.btn-rail-historico:hover {
  background: rgba(139, 92, 246, 0.24);
  border-color: #a78bfa;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(139, 92, 246, 0.25);
}

.btn-rail-ajuda {
  background: rgba(16, 185, 129, 0.12);
  color: #a7f3d0;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.btn-rail-ajuda:hover {
  background: rgba(16, 185, 129, 0.22);
  border-color: #34d399;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.2);
}

.btn-rail-ajuda .btn-rail-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border: 1.5px solid currentColor;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

/* ============================================================
   BANNER DE NOVIDADES APÓS O ACESSO
   ============================================================ */

.banner-novidades {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 10px 18px 0;
  padding: 12px 14px;
  color: #173c3d;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  border-left: 4px solid #10b981;
  border-radius: 8px;
  box-shadow: 0 4px 14px rgba(15, 118, 110, 0.09);
  animation: slideDown 0.25s ease;
}

.banner-novidades-selo {
  flex-shrink: 0;
  padding: 5px 7px;
  border-radius: 5px;
  background: #047857;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.banner-novidades-conteudo {
  display: flex;
  flex: 1;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
}

.banner-novidades-conteudo strong {
  font-size: 13px;
  color: #134e4a;
}

.banner-novidades-conteudo span {
  font-size: 12px;
  line-height: 1.35;
  color: #4b6f6b;
}

.banner-novidades-acoes {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.btn-novidades-primary,
.btn-novidades-secondary {
  min-height: 34px;
  padding: 7px 11px;
  border-radius: 6px;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.btn-novidades-primary {
  border: 1px solid #047857;
  background: #047857;
  color: #fff;
}

.btn-novidades-primary:hover {
  background: #065f46;
}

.btn-novidades-secondary {
  border: 1px solid #6ee7b7;
  background: #fff;
  color: #047857;
}

.btn-novidades-secondary:hover {
  border-color: #10b981;
  background: #f0fdf4;
}

.btn-novidades-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #527a76;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
}

.btn-novidades-close:hover {
  color: #134e4a;
}

/* ============================================================
   CENTRAL DE AJUDA E NOVIDADES
   ============================================================ */

body.ajuda-aberta {
  overflow: hidden;
}

.ajuda-overlay {
  z-index: 90;
  padding: 18px;
  background: rgba(26, 54, 69, 0.66);
}

.ajuda-sheet {
  width: min(1160px, 100%);
  max-width: 100%;
  max-height: calc(100vh - 36px);
  margin: auto;
  padding: 0;
  overflow-x: hidden;
  overflow-y: auto;
  background: #f7f9fa;
  border-color: rgba(255, 255, 255, 0.5);
  box-shadow: 0 24px 70px rgba(26, 54, 69, 0.3);
}

.ajuda-top {
  position: sticky;
  top: 0;
  z-index: 3;
  align-items: center;
  margin: 0;
  padding: 22px 26px 18px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.ajuda-top > div {
  min-width: 0;
}

.ajuda-top .eyebrow {
  margin-bottom: 5px;
  color: #047857;
}

.ajuda-top h2 {
  font-size: 24px;
}

.ajuda-descricao {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.ajuda-fechar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--primary);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
}

.ajuda-fechar:hover {
  background: var(--input);
  border-color: var(--primary-mid);
}

.ajuda-tabs {
  position: sticky;
  top: 102px;
  z-index: 2;
  display: flex;
  gap: 6px;
  padding: 10px 26px 0;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.ajuda-tab {
  padding: 10px 14px 11px;
  border: 0;
  border-bottom: 3px solid transparent;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.ajuda-tab:hover {
  color: var(--primary);
}

.ajuda-tab.active {
  color: var(--primary);
  border-bottom-color: #10b981;
}

.ajuda-tab span {
  margin-left: 5px;
  padding: 2px 5px;
  border-radius: 4px;
  background: #ecfdf5;
  color: #047857;
  font-size: 10px;
}

.ajuda-painel {
  min-width: 0;
  max-width: 100%;
  padding: 24px 26px 30px;
}

.ajuda-busca-wrap {
  position: relative;
  display: flex;
  align-items: center;
  width: min(680px, 100%);
  margin: 0 auto 24px;
}

.ajuda-busca-icon {
  position: absolute;
  left: 14px;
  color: var(--muted);
  font-size: 22px;
  pointer-events: none;
}

.ajuda-busca-wrap input {
  width: 100%;
  height: 46px;
  padding: 10px 72px 10px 44px;
  border: 1px solid #cbd5db;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  box-shadow: 0 3px 10px rgba(44, 77, 94, 0.06);
}

.ajuda-busca-wrap input:focus {
  outline: 2px solid rgba(16, 185, 129, 0.18);
  border-color: #10b981;
}

.ajuda-limpar {
  position: absolute;
  right: 8px;
  padding: 6px 8px;
  border: 0;
  background: transparent;
  color: #047857;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.ajuda-layout {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
  min-width: 0;
  max-width: 100%;
}

.ajuda-indice {
  position: sticky;
  top: 180px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  min-width: 0;
  max-width: 100%;
}

.ajuda-indice p {
  margin: 0 0 7px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ajuda-indice a {
  padding: 7px 8px;
  border-radius: 5px;
  color: var(--primary);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
}

.ajuda-indice a:hover {
  background: #edf3f5;
}

.ajuda-conteudo {
  min-width: 0;
  max-width: 100%;
}

.ajuda-secao {
  margin-bottom: 18px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  scroll-margin-top: 180px;
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.ajuda-secao-cabecalho {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
}

.ajuda-secao-cabecalho h3,
.ajuda-suporte h3 {
  margin: 0;
  color: var(--primary);
  font-size: 17px;
}

.ajuda-secao-cabecalho p,
.ajuda-suporte p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.ajuda-numero {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 7px;
  background: #cffafe;
  color: #0e7490;
  font-size: 13px;
  font-weight: 800;
  flex-shrink: 0;
}

.ajuda-numero-amber {
  background: #fef3c7;
  color: #b45309;
}

.ajuda-numero-green {
  background: #d1fae5;
  color: #047857;
}

.ajuda-numero-purple {
  background: #ede9fe;
  color: #6d28d9;
}

.ajuda-passos {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.ajuda-passos article {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-height: 104px;
  padding: 13px;
  border-radius: 7px;
  background: #f5f8f9;
  border-top: 3px solid #7dd3fc;
}

.ajuda-passos article:nth-child(2) {
  border-top-color: #fbbf24;
}

.ajuda-passos article:nth-child(3) {
  border-top-color: #34d399;
}

.ajuda-passos strong,
.ajuda-recursos-grid strong {
  color: var(--primary);
  font-size: 13px;
}

.ajuda-passos span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.ajuda-exemplos {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.ajuda-prompt {
  display: flex;
  min-height: 112px;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.ajuda-prompt:hover {
  border-color: #10b981;
  background: #f0fdf4;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.1);
}

.ajuda-prompt span {
  color: #047857;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.ajuda-prompt strong {
  color: var(--primary);
  font-size: 12px;
  line-height: 1.45;
}

.ajuda-dica {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.ajuda-recursos-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.ajuda-recursos-grid article {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #f9fbfb;
}

.ajuda-recursos-grid p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.ajuda-recurso-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 6px;
  background: #e6f4f1;
  color: #047857;
  font-size: 15px;
  font-weight: 800;
  flex-shrink: 0;
}

.ajuda-faq-lista {
  border-top: 1px solid var(--line);
}

.ajuda-faq-lista details {
  border-bottom: 1px solid var(--line);
}

.ajuda-faq-lista summary {
  padding: 13px 4px;
  color: var(--primary);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.ajuda-faq-lista details p {
  margin: -2px 4px 14px 22px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.ajuda-suporte {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 20px;
  border: 1px solid #a7f3d0;
  border-radius: 8px;
  background: #ecfdf5;
  scroll-margin-top: 180px;
}

.ajuda-suporte-label {
  display: block;
  margin-bottom: 5px;
  color: #047857;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ajuda-suporte-contato {
  padding: 10px 13px;
  border-radius: 7px;
  background: #047857;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.ajuda-suporte-contato:hover {
  background: #065f46;
}

.ajuda-sem-resultados {
  padding: 30px 20px;
  border: 1px dashed #b9c5ca;
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  text-align: center;
  font-size: 13px;
}

.novidades-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 190px;
  gap: 30px;
  padding: 30px;
  border-radius: 8px;
  background: #163f4a;
  color: #fff;
  overflow: hidden;
}

.novidades-hero > div:first-child {
  max-width: 620px;
}

.novidades-versao {
  display: inline-block;
  margin-bottom: 10px;
  padding: 4px 7px;
  border-radius: 4px;
  background: #34d399;
  color: #073b2c;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.novidades-hero h3 {
  margin: 0;
  color: #fff;
  font-size: 28px;
}

.novidades-hero p {
  margin: 10px 0 0;
  color: #c8dfe2;
  font-size: 14px;
  line-height: 1.55;
}

.novidades-mark {
  color: rgba(255, 255, 255, 0.12);
  font-size: 92px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0;
  flex-shrink: 0;
}

.novidades-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.novidades-grid article {
  min-height: 150px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.novidades-grid h4 {
  margin: 12px 0 6px;
  color: var(--primary);
  font-size: 16px;
}

.novidades-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.novidade-tag {
  display: inline-block;
  padding: 3px 6px;
  border-radius: 4px;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.novidade-tag-cyan {
  background: #cffafe;
  color: #0e7490;
}

.novidade-tag-green {
  background: #d1fae5;
  color: #047857;
}

.novidade-tag-amber {
  background: #fef3c7;
  color: #b45309;
}

.novidade-tag-purple {
  background: #ede9fe;
  color: #6d28d9;
}

.novidades-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 16px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.novidades-footer div {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.novidades-footer strong {
  color: var(--primary);
  font-size: 14px;
}

.novidades-footer span {
  color: var(--muted);
  font-size: 12px;
}

.novidades-footer .btn-primary {
  border: 0;
  border-radius: 7px;
  padding: 10px 14px;
  background: var(--primary);
  color: #fff;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}

.novidades-footer .btn-primary:hover {
  background: var(--primary-dark);
}

@media (max-width: 900px) {
  .banner-novidades {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .banner-novidades-conteudo {
    min-width: calc(100% - 100px);
  }

  .banner-novidades-acoes {
    margin-left: 52px;
  }

  .btn-novidades-close {
    position: absolute;
    right: 22px;
  }

  .ajuda-layout {
    grid-template-columns: 1fr;
  }

  .ajuda-indice {
    position: static;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .ajuda-indice p {
    grid-column: 1 / -1;
  }
}

@media (max-width: 680px) {
  .top-actions {
    gap: 5px;
  }

  .btn-top-action .btn-top-text {
    display: none;
  }

  .btn-top-action {
    width: 36px;
    height: 36px;
    justify-content: center;
    padding: 0;
  }

  .banner-novidades {
    margin: 8px 10px 0;
    padding: 11px;
    gap: 9px;
  }

  .banner-novidades-conteudo {
    padding-right: 24px;
  }

  .banner-novidades-conteudo span {
    display: none;
  }

  .banner-novidades-acoes {
    width: 100%;
    margin-left: 0;
  }

  .btn-novidades-primary,
  .btn-novidades-secondary {
    flex: 1;
  }

  .btn-novidades-close {
    right: 14px;
    margin-top: -4px;
  }

  .ajuda-overlay {
    padding: 0;
  }

  .ajuda-sheet {
    width: 100%;
    max-width: 100vw;
    max-height: 100vh;
    min-height: 100vh;
    border: 0;
    border-radius: 0;
  }

  .ajuda-top {
    padding: 16px 16px 13px;
  }

  .ajuda-top h2 {
    font-size: 20px;
  }

  .ajuda-descricao {
    display: none;
  }

  .ajuda-tabs {
    top: 78px;
    padding: 8px 16px 0;
  }

  .ajuda-tab {
    flex: 1;
    padding: 9px 7px 10px;
  }

  .ajuda-painel {
    padding: 18px 14px 24px;
  }

  .ajuda-busca-wrap {
    margin-bottom: 16px;
  }

  .ajuda-indice {
    display: flex;
    flex-direction: row;
    gap: 5px;
    overflow-x: auto;
    width: 100%;
    padding: 8px;
  }

  .ajuda-indice p {
    display: none;
  }

  .ajuda-indice a {
    white-space: nowrap;
    background: #f1f5f6;
  }

  .ajuda-secao {
    padding: 16px;
    scroll-margin-top: 145px;
  }

  .ajuda-passos,
  .ajuda-exemplos,
  .ajuda-recursos-grid,
  .novidades-grid {
    grid-template-columns: 1fr;
  }

  .ajuda-passos article,
  .ajuda-prompt {
    min-height: 0;
  }

  .ajuda-suporte,
  .novidades-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .ajuda-suporte-contato,
  .novidades-footer .btn-primary {
    text-align: center;
  }

  .novidades-hero {
    min-height: 0;
    padding: 24px 20px;
  }

  .novidades-hero h3 {
    font-size: 22px;
  }

  .novidades-mark {
    display: none;
  }
}

.btn-rail-icon {
  font-size: 1.1rem;
}

/* Sidebar Conversas Salvas */
.conversas-header-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 14px;
  margin-bottom: 6px;
}

.btn-ver-todas-link {
  background: none;
  border: none;
  color: var(--primary);
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 4px;
  transition: opacity 0.15s;
}

.btn-ver-todas-link:hover {
  text-decoration: underline;
  opacity: 0.85;
}

.conversas {
  max-height: 220px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding-right: 2px;
}

.conversas::-webkit-scrollbar {
  width: 4px;
}

.conversas::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}

.conversa-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 7px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: all 0.15s ease;
}

.conversa-item:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--line);
}

.conversa-item.active {
  background: rgba(0, 217, 245, 0.12);
  border-color: rgba(0, 217, 245, 0.45);
}

.conversa-abrir {
  flex: 1;
  min-width: 0;
  background: none;
  border: none;
  text-align: left;
  cursor: pointer;
  color: var(--ink);
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.conversa-abrir strong {
  font-size: 0.82rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--ink);
}

.conversa-item.active .conversa-abrir strong {
  color: #00d9f5;
}

.conversa-abrir span {
  font-size: 0.7rem;
  color: var(--muted);
}

.conversa-excluir {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 1.15rem;
  line-height: 1;
  padding: 2px 6px;
  border-radius: 4px;
  transition: all 0.15s;
}

.conversa-excluir:hover {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.18);
}

.conversas-vazio {
  font-size: 0.78rem;
  color: var(--muted);
  margin: 6px 0;
  font-style: italic;
}

/* ============================================================
   MODAL DE HISTÓRICO DE CONVERSAS (COMPLETO)
   ============================================================ */

.sheet-historico {
  max-width: 760px;
  width: 95%;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  padding: 24px;
  border-radius: 18px;
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.65);
}

.sheet-top-buttons {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nova-conversa-destaque {
  background: linear-gradient(135deg, #0ea5e9, #0284c7);
  color: #fff;
  border: none;
  padding: 9px 18px;
  border-radius: 8px;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
  box-shadow: 0 4px 14px rgba(14, 165, 233, 0.35);
  white-space: nowrap;
}

.nova-conversa-destaque:hover {
  filter: brightness(1.12);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(14, 165, 233, 0.45);
}

.historico-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 18px 0 14px 0;
}

.historico-search-box {
  position: relative;
  flex: 1;
}

.historico-search-box input {
  width: 100%;
  padding: 10px 38px 10px 38px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--input);
  color: var(--ink);
  font-family: inherit;
  font-size: 0.88rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.historico-search-box input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.2);
}

.historico-search-box .search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.95rem;
  opacity: 0.6;
  pointer-events: none;
}

.btn-limpar-busca {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  font-size: 1.25rem;
  color: var(--muted);
  cursor: pointer;
  padding: 0 4px;
}

.historico-meta-info {
  font-size: 0.82rem;
  color: var(--muted);
  white-space: nowrap;
  font-weight: 500;
}

.historico-body {
  flex: 1;
  overflow-y: auto;
  min-height: 280px;
  padding-right: 6px;
}

.historico-body::-webkit-scrollbar {
  width: 6px;
}

.historico-body::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.18);
  border-radius: 6px;
}

.historico-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 50px 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.historico-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid rgba(14, 165, 233, 0.2);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.historico-grupo {
  margin-bottom: 22px;
}

.historico-grupo-titulo {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  gap: 6px;
}

.historico-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  margin-bottom: 8px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  transition: all 0.2s ease;
  cursor: pointer;
}

.historico-card:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(14, 165, 233, 0.45);
  transform: translateX(2px);
}

.historico-card.active {
  background: rgba(14, 165, 233, 0.08);
  border-color: var(--primary);
  box-shadow: 0 0 0 1px var(--primary);
}

.historico-card-main {
  flex: 1;
  min-width: 0;
}

.historico-card-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 5px;
}

.historico-card-icon {
  font-size: 1rem;
  opacity: 0.85;
}

.historico-card-title {
  margin: 0;
  font-size: 0.94rem;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.badge-ativa {
  background: #10b981;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 9999px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}

.historico-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.76rem;
  color: var(--muted);
}

.meta-dot {
  opacity: 0.5;
}

.historico-card-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.btn-card-action {
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.btn-card-abrir {
  background: rgba(14, 165, 233, 0.15);
  color: #38bdf8;
  padding: 7px 12px;
}

.btn-card-abrir:hover {
  background: var(--primary);
  color: #fff;
}

.btn-card-renomear {
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
  padding: 7px 9px;
}

.btn-card-renomear:hover {
  background: rgba(255, 255, 255, 0.15);
  color: var(--ink);
}

.btn-card-excluir {
  background: rgba(239, 68, 68, 0.12);
  color: #f87171;
  padding: 7px 9px;
}

.btn-card-excluir:hover {
  background: #ef4444;
  color: #fff;
}

.historico-vazio {
  text-align: center;
  padding: 48px 20px;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.historico-vazio-icon {
  font-size: 3rem;
  opacity: 0.6;
}

.historico-vazio h3 {
  margin: 0;
  font-size: 1.15rem;
  color: var(--ink);
}

.historico-vazio p {
  margin: 0;
  font-size: 0.88rem;
  max-width: 400px;
  line-height: 1.4;
}

/* ===== Metas por Loja / Empresa ===== */
.meta-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 8px;
  padding: 12px 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-bottom: 6px;
}
.meta-card:hover, .meta-card.active {
  border-color: var(--primary);
  background: rgba(44, 77, 94, 0.14);
}
.meta-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
}
.meta-info strong {
  color: var(--primary);
  font-size: 0.95rem;
}
.meta-info span {
  color: var(--muted);
  font-size: 0.8rem;
}
.meta-card-right {
  display: flex;
  align-items: center;
  gap: 12px;
}
.meta-valor-badge {
  font-size: 1rem;
  font-weight: 700;
  color: #10b981;
  text-align: right;
  white-space: nowrap;
}
.btn-meta-del {
  background: transparent;
  border: none;
  color: #ef4444;
  cursor: pointer;
  padding: 6px;
  border-radius: 4px;
  font-size: 1.1rem;
  line-height: 1;
  transition: background 0.2s, transform 0.1s;
}
.btn-meta-del:hover {
  background: rgba(239, 68, 68, 0.18);
  transform: scale(1.1);
}

/* ===== Modais Largos e Componentes de Agendamento & Integrações ===== */
.sheet-modal-largo {
  max-width: 980px !important;
  width: 94vw !important;
}

.modal-tabs {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 16px;
  padding-bottom: 4px;
}

.modal-tab-btn {
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 8px 8px 0 0;
  cursor: pointer;
  transition: color 0.2s, background 0.2s, border-bottom 0.2s;
  border-bottom: 2px solid transparent;
}

.modal-tab-btn:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.04);
}

.modal-tab-btn.active {
  color: var(--primary);
  border-bottom: 2px solid var(--primary);
  background: rgba(14, 165, 233, 0.08);
}

.modal-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.btn-destaque-primary {
  background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
  color: #fff;
  border: none;
  padding: 8px 16px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  box-shadow: 0 2px 6px rgba(14, 165, 233, 0.25);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-destaque-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(14, 165, 233, 0.35);
}

.card-config-box {
  background: var(--card, #1e293b);
  border: 1px solid var(--line, #334155);
  border-radius: 10px;
  padding: 16px 20px;
  margin-bottom: 16px;
}

.grid-form label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 0.84rem;
  color: var(--ink);
  font-weight: 500;
}

.grid-form input[type="text"],
.grid-form input[type="password"],
.grid-form input[type="email"],
.grid-form input[type="number"],
.grid-form input[type="time"],
.grid-form select,
.grid-form textarea {
  background: var(--input, #0f172a);
  border: 1px solid var(--line, #334155);
  color: var(--ink);
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 0.88rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.grid-form input:focus,
.grid-form select:focus,
.grid-form textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(14, 165, 233, 0.2);
}

.form-row-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

.form-row-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

.tabela-responsiva-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
}

.tabela-erp {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  text-align: left;
}

.tabela-erp th {
  background: rgba(15, 23, 42, 0.7);
  color: var(--muted);
  font-weight: 600;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-transform: uppercase;
  font-size: 0.76rem;
  letter-spacing: 0.5px;
}

.tabela-erp td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--ink);
  vertical-align: middle;
}

.tabela-erp tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.badge-status-ativo {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  display: inline-block;
}

.badge-status-inativo {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  display: inline-block;
}

.btn-tabela-acao {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink);
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 0.78rem;
  cursor: pointer;
  margin-right: 4px;
  transition: all 0.15s;
}

.btn-tabela-acao:hover {
  background: var(--line);
  border-color: var(--muted);
}

.btn-tabela-disparar {
  border-color: #0ea5e9;
  color: #38bdf8;
}

.btn-tabela-disparar:hover {
  background: rgba(14, 165, 233, 0.2);
}

.btn-tabela-excluir {
  border-color: #ef4444;
  color: #f87171;
}

.btn-tabela-excluir:hover {
  background: rgba(239, 68, 68, 0.2);
}

.card-passo {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.passo-numero {
  width: 24px;
  height: 24px;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 700;
  margin-bottom: 2px;
}

.passo-titulo {
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--ink);
}

.passo-desc {
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.35;
}





.login-card select { width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; font: inherit; color: var(--ink); background: var(--input); outline: none; cursor: pointer; font-size: 0.92rem; }
.login-card select:focus { border-color: var(--accent-deep); box-shadow: 0 0 0 2px rgba(9, 211, 211, 0.25); }

/* Animação e feedback instantâneo de clique nos botões */
.btn-ativo {
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 3px rgba(0, 229, 255, 0.35) !important;
  transform: scale(0.97) !important;
  transition: all 0.15s ease !important;
}
.btn-pulsar {
  animation: pulsarAviso 0.4s ease !important;
}
@keyframes pulsarAviso {
  0% { transform: scale(1); }
  50% { transform: scale(0.95); opacity: 0.7; }
  100% { transform: scale(1); opacity: 1; }
}
.pensando-live {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  animation: fadeProgresso 0.4s ease;
  font-weight: 500;
}
@keyframes fadeProgresso {
  from { opacity: 0.3; transform: translateY(2px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   MURAL DE RECADOS & TAREFAS DA IA (CLIENTES COM LIMITE EXCEDIDO)
   ============================================================ */

.btn-top-recados {
  position: relative;
}

.badge-top-recados {
  position: absolute;
  top: -4px;
  right: -5px;
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 999px;
  box-shadow: 0 2px 6px rgba(239, 68, 68, 0.4);
  animation: pulseBadge 2s infinite ease-in-out;
}

@keyframes pulseBadge {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.18); box-shadow: 0 0 10px rgba(239, 68, 68, 0.7); }
}

/* Mural de Recados no Hero (Tela Inicial) */
.mural-recados-inicio {
  margin: 6px auto;
  max-width: 880px;
  width: 100%;
  text-align: left;
  background: var(--panel, #ffffff);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-left: 3px solid #f59e0b;
  border-radius: 9px;
  padding: 6px 12px;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.08);
  animation: slideDown 0.25s ease;
}

.mural-inicio-compact-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.mural-inicio-compact-left {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  font-size: 12px;
}

.mural-inicio-icon-small {
  font-size: 16px;
  line-height: 1;
}

.mural-inicio-title-small {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink, #1e293b);
}

.badge-mural-inicio-small {
  background: #f59e0b;
  color: #fff;
  font-size: 10.5px;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 999px;
}

.mural-inicio-chips-resumo {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

.chip-alerta-small {
  font-size: 11px;
  font-weight: 600;
  padding: 1px 7px;
  border-radius: 5px;
}
.chip-alerta-limite {
  background: #fef3c7;
  color: #b45309;
}
.chip-alerta-inadimplente {
  background: #fee2e2;
  color: #b91c1c;
}
.chip-alerta-estoque {
  background: #e0f2fe;
  color: #0369a1;
}

.mural-inicio-compact-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.btn-mural-action-primary-small {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 4px 9px;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.btn-mural-action-primary-small:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.btn-mural-action-danger-small {
  background: linear-gradient(135deg, #ef4444, #b91c1c);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 4px 9px;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.btn-mural-action-danger-small:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.btn-mural-action-ghost-small {
  background: transparent;
  color: var(--muted, #64748b);
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.btn-mural-action-ghost-small:hover {
  color: var(--ink, #1e293b);
  border-color: var(--muted, #64748b);
}

.btn-destaque-danger {
  background: linear-gradient(135deg, #ef4444, #b91c1c);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}
.btn-destaque-danger:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.btn-mural-action-primary {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.25);
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.btn-mural-action-primary:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.btn-mural-action-ghost {
  background: transparent;
  color: var(--primary, #0284c7);
  border: 1px solid rgba(2, 132, 199, 0.3);
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-mural-action-ghost:hover {
  background: rgba(2, 132, 199, 0.08);
}

/* Cards Grid */
.mural-inicio-cards,
.mural-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 10px;
  margin-top: 12px;
}

/* Individual Task Card */
.tarefa-card {
  background: var(--card-bg, #f8fafc);
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 10px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.tarefa-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
  border-color: rgba(245, 158, 11, 0.4);
}

.tarefa-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.tarefa-cliente-nome {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink, #0f172a);
  line-height: 1.25;
}

.tarefa-cliente-doc {
  font-size: 11px;
  color: var(--muted, #64748b);
  display: block;
  margin-top: 2px;
}

.tarefa-urgencia-badge {
  font-size: 10px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  white-space: nowrap;
}

.tarefa-urgencia-alta {
  background: #fee2e2;
  color: #b91c1c;
}

.tarefa-urgencia-media {
  background: #fef3c7;
  color: #b45309;
}

.tarefa-metricas {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 2px 0;
}

.tarefa-chip {
  font-size: 11px;
  padding: 3px 7px;
  border-radius: 5px;
  background: rgba(0, 0, 0, 0.04);
  color: var(--muted, #475569);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.tarefa-chip strong {
  color: var(--ink, #1e293b);
}

.tarefa-chip.chip-alerta {
  background: #fff1f2;
  color: #e11d48;
  border: 1px solid #fecdd3;
  font-weight: 700;
}

.tarefa-sugestao {
  background: rgba(16, 185, 129, 0.08);
  border: 1px dashed rgba(16, 185, 129, 0.4);
  border-radius: 6px;
  padding: 6px 9px;
  font-size: 11.5px;
  color: #065f46;
  line-height: 1.3;
}

.tarefa-acoes {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
}

.btn-tarefa-executar {
  flex: 1;
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  border: none;
  border-radius: 7px;
  padding: 7px 10px;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: all 0.2s ease;
}

.btn-tarefa-executar:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.btn-tarefa-executar:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.btn-tarefa-chat {
  background: rgba(59, 130, 246, 0.1);
  color: #2563eb;
  border: 1px solid rgba(59, 130, 246, 0.25);
  border-radius: 7px;
  padding: 7px 10px;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s ease;
}

.btn-tarefa-chat:hover {
  background: rgba(59, 130, 246, 0.2);
}

/* Card Resolvido */
.tarefa-card.resolvida {
  background: rgba(16, 185, 129, 0.06);
  border-color: #10b981;
  animation: pulseSucesso 0.5s ease;
}

@keyframes pulseSucesso {
  0% { transform: scale(0.98); }
  50% { transform: scale(1.02); }
  100% { transform: scale(1); }
}

.tarefa-resolvida-msg {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: #059669;
  padding: 8px 4px;
}

/* Modal Filtros */
.mural-modal-icon-badge {
  font-size: 26px;
  background: rgba(245, 158, 11, 0.15);
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  flex-shrink: 0;
}

.mural-modal-filtros-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.btn-filtro-mural {
  padding: 6px 12px;
  border-radius: 7px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-filtro-mural.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.mural-inicio-escopo {
  font-size: 11px;
  color: var(--muted);
  font-weight: 500;
}

.mural-modal-escopo-bar {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  padding: 8px 0 4px;
}

.mural-escopo-campo {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  min-width: 180px;
  flex: 1;
}

.mural-escopo-campo select {
  padding: 7px 10px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
}

.mural-escopo-resumo {
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
  margin-left: auto;
  padding-bottom: 6px;
}

.mural-grupo-origem {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 6px;
  padding: 6px 10px;
  border-radius: 8px;
  background: rgba(99, 102, 241, 0.08);
  border: 1px solid rgba(99, 102, 241, 0.18);
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}

.mural-grupo-origem:first-child {
  margin-top: 0;
}

.mural-grupo-origem span {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
}

/* ============================================================
   CARD DE VENDAS DA REDE AO VIVO (AO ABRIR A PLATAFORMA)
   ============================================================ */

.card-vendas-rede-inicio {
  margin: 6px auto;
  max-width: 880px;
  width: 100%;
  text-align: left;
  background: linear-gradient(135deg, rgba(30, 58, 138, 0.05), rgba(59, 130, 246, 0.08));
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-left: 3px solid #3b82f6;
  border-radius: 9px;
  padding: 6px 12px;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.06);
  animation: slideDown 0.25s ease;
}

.vendas-rede-compact-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.vendas-rede-compact-left {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--ink, #1e293b);
}

.vendas-rede-icone-small {
  font-size: 16px;
  line-height: 1;
}

.vendas-rede-compact-titulo {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink, #1e293b);
}

.vendas-rede-destaque {
  font-size: 13.5px;
  font-weight: 800;
  color: #1d4ed8;
}

.vendas-rede-pill {
  background: rgba(59, 130, 246, 0.12);
  color: #1e40af;
  font-size: 11px;
  font-weight: 600;
  padding: 1px 7px;
  border-radius: 999px;
}

.vendas-rede-sep {
  opacity: 0.35;
  margin: 0 2px;
}

.vendas-rede-label-small {
  color: var(--muted, #64748b);
  font-size: 11.5px;
  font-weight: 600;
}

.vendas-rede-val-small {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink, #1e293b);
}

.btn-rede-chat-small {
  background: #2563eb;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}
.btn-rede-chat-small:hover {
  background: #1d4ed8;
  transform: translateY(-1px);
}

.vendas-rede-topo {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(59, 130, 246, 0.15);
}

.vendas-rede-titulo-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.vendas-rede-icone {
  font-size: 22px;
  background: rgba(59, 130, 246, 0.15);
  padding: 6px;
  border-radius: 8px;
  line-height: 1;
}

.vendas-rede-textos {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.vendas-rede-badge-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.vendas-rede-titulo {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink, #1e293b);
}

.badge-rede-online {
  background: #dcfce7;
  color: #166534;
  font-size: 10.5px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 999px;
  letter-spacing: 0.02em;
}

.vendas-rede-sub {
  font-size: 12px;
  color: var(--muted, #64748b);
}

.vendas-rede-acoes {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-rede-chat {
  background: #2563eb;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
  transition: all 0.2s ease;
}

.btn-rede-chat:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.vendas-rede-metricas-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.vendas-rede-metrica-item {
  background: var(--panel, #ffffff);
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 9px;
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  transition: all 0.2s ease;
}

.vendas-rede-metrica-item:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.vendas-rede-metrica-item.destaque-azul {
  border-color: rgba(59, 130, 246, 0.4);
  background: rgba(59, 130, 246, 0.03);
}

.vendas-rede-metrica-item.destaque-verde {
  border-color: rgba(16, 185, 129, 0.4);
  background: rgba(16, 185, 129, 0.03);
}

.metrica-label {
  font-size: 11px;
  color: var(--muted, #64748b);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.metrica-valor {
  font-size: 18px;
  font-weight: 800;
  color: var(--ink, #0f172a);
}

.metrica-sub {
  font-size: 11px;
  color: var(--muted, #64748b);
}

/* ── Mensagens entre Usuários (Recados) ── */
.btn-recado-ler:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.btn-recado-responder:hover {
  background: rgba(59, 130, 246, 0.12) !important;
  color: #2563eb !important;
  border-color: rgba(59, 130, 246, 0.3) !important;
}

.btn-recado-excluir:hover {
  background: rgba(239, 68, 68, 0.12) !important;
  color: #dc2626 !important;
  border-color: rgba(239, 68, 68, 0.3) !important;
}

/* ── Apresentações da Empresa (Executive Slide Decks) ── */
.btn-rail-apresentacoes {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.12), rgba(59, 130, 246, 0.12));
  border: 1px solid rgba(6, 182, 212, 0.3) !important;
  color: #0284c7 !important;
  font-weight: 600;
}
.btn-rail-apresentacoes:hover {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.22), rgba(59, 130, 246, 0.22));
  transform: translateY(-1px);
}

.card-apresentacao-inline {
  background: linear-gradient(135deg, #0b1329 0%, #172554 100%);
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 14px;
  padding: 16px 20px;
  margin: 14px 0;
  box-shadow: 0 10px 25px -5px rgba(2, 132, 199, 0.25), 0 8px 10px -6px rgba(0, 0, 0, 0.3);
  color: #f8fafc;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.card-apresentacao-inline .apres-inline-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.card-apresentacao-inline .apres-inline-icon {
  font-size: 28px;
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.3);
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.card-apresentacao-inline .apres-inline-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.card-apresentacao-inline .apres-inline-info strong {
  font-size: 15px;
  font-weight: 700;
  color: #38bdf8;
  letter-spacing: -0.01em;
}

.card-apresentacao-inline .apres-inline-info span {
  font-size: 12px;
  color: #94a3b8;
}

.card-apresentacao-inline .apres-inline-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.btn-assistir-apresentacao {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #0284c7 0%, #2563eb 100%);
  color: #ffffff;
  border: none;
  padding: 8px 18px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.35);
  transition: all 0.2s ease;
}

.btn-assistir-apresentacao:hover {
  filter: brightness(1.12);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(2, 132, 199, 0.45);
}

.btn-apres-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-apres-link:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.3);
}

/* Apresentações Grid no Modal */
.apresentacoes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 14px;
}

.apresentacao-item-card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.apresentacao-item-card:hover {
  transform: translateY(-2px);
  border-color: #38bdf8;
  box-shadow: 0 6px 18px rgba(56, 189, 248, 0.12);
}

.apres-item-top {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.apres-item-badge-icon {
  font-size: 22px;
  background: rgba(6, 182, 212, 0.12);
  color: #0284c7;
  border: 1px solid rgba(6, 182, 212, 0.25);
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.apres-item-header {
  flex: 1;
}

.apres-item-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 4px 0;
  line-height: 1.3;
}

.apres-item-periodo {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  background: rgba(59, 130, 246, 0.1);
  color: #2563eb;
  padding: 2px 8px;
  border-radius: 6px;
  margin-bottom: 6px;
}

.apres-item-meta {
  font-size: 11px;
  color: var(--muted);
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.apres-item-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.btn-apres-play {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: #0284c7;
  color: #fff;
  border: none;
  padding: 7px 12px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: filter 0.2s;
}

.btn-apres-play:hover {
  filter: brightness(1.1);
}

.btn-apres-delete {
  background: transparent;
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.2);
  padding: 7px 10px;
  border-radius: 7px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-apres-delete:hover {
  background: rgba(239, 68, 68, 0.1);
}

.btn-pptx-link {
  background: linear-content;
  background: rgba(217, 119, 6, 0.18) !important;
  color: #f59e0b !important;
  border-color: rgba(245, 158, 11, 0.35) !important;
  font-weight: 600;
}

.btn-pptx-link:hover {
  background: rgba(217, 119, 6, 0.3) !important;
  border-color: rgba(245, 158, 11, 0.6) !important;
  color: #fbbf24 !important;
}

.btn-apres-pptx {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: #d97706;
  color: #fff;
  border: none;
  padding: 7px 12px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: filter 0.2s;
}

.btn-apres-pptx:hover {
  filter: brightness(1.12);
  color: #fff;
}




