/* ===== Copilot B3 — tema fintech escuro ===== */
:root {
  --bg: #0a0e14;
  --bg-panel: #10151d;
  --bg-raised: #161d27;
  --border: #1f2733;
  --border-soft: #1a212c;
  --text: #dbe4ee;
  --text-dim: #8a97a8;
  --text-faint: #5b6675;
  --accent: #2f81f7;
  --accent-soft: rgba(47, 129, 247, 0.12);
  --green: #3fb950;
  --red: #f85149;
  --amber: #d29922;
  --purple: #a371f7;
  --radius: 12px;
  --mono: "JetBrains Mono", ui-monospace, monospace;
}

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

[hidden] { display: none !important; }

html, body { height: 100%; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", system-ui, sans-serif;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  display: flex; flex-direction: column;
  height: 100vh; height: 100dvh;
}

.app { display: flex; flex: 1; min-height: 0; overflow: hidden; }

/* Controles mobile — invisíveis no desktop */
.hamburger {
  display: none;
  position: fixed; top: 10px; left: 10px; z-index: 60;
  width: 38px; height: 38px;
  place-items: center;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text); font-size: 16px;
  cursor: pointer;
}
.backdrop {
  position: fixed; inset: 0; z-index: 49;
  background: rgba(6, 9, 14, 0.62);
  opacity: 0; pointer-events: none;
  transition: opacity .2s;
}
.backdrop.show { opacity: 1; pointer-events: auto; }
.bottom-nav { display: none; }

/* ===== Sidebar ===== */
.sidebar {
  width: 290px;
  min-width: 290px;
  background: var(--bg-panel);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px 16px;
  overflow-y: auto;
}

.brand { display: flex; align-items: center; gap: 12px; }
.brand-logo {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, #1d4ed8, #2f81f7);
  display: grid; place-items: center;
  font-weight: 700; font-size: 15px; color: #fff;
  letter-spacing: 0.5px;
  box-shadow: 0 0 24px rgba(47, 129, 247, 0.35);
}
.brand h1 { font-size: 16px; font-weight: 700; }
.brand p { font-size: 11px; color: var(--text-dim); margin-top: 2px; }

.panel {
  background: var(--bg-raised);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.panel.grow { flex: 1; min-height: 120px; }

.panel-header {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.8px;
  color: var(--text-dim);
}
.panel-hint { font-size: 10px; color: var(--text-faint); text-transform: none; letter-spacing: 0; }

.icon-btn {
  background: var(--accent-soft); color: var(--accent);
  border: none; border-radius: 6px;
  width: 22px; height: 22px;
  font-size: 15px; line-height: 1;
  cursor: pointer;
}
.icon-btn:hover { background: rgba(47, 129, 247, 0.25); }

/* Tickers */
.ticker-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ticker {
  background: var(--bg-panel);
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  padding: 8px 10px;
}
.ticker .sym { font-size: 10px; font-weight: 600; color: var(--text-dim); letter-spacing: 0.5px; }
.ticker .px { font-family: var(--mono); font-size: 14px; font-weight: 600; margin-top: 2px; }
.ticker .var { font-family: var(--mono); font-size: 11px; }
.up { color: var(--green); }
.down { color: var(--red); }
.flat { color: var(--text-dim); }

/* Histórico */
.history-list { display: flex; flex-direction: column; gap: 4px; overflow-y: auto; flex: 1; }
.history-item {
  display: flex; align-items: center; justify-content: space-between; gap: 6px;
  padding: 7px 9px;
  border-radius: 7px;
  font-size: 12.5px;
  color: var(--text-dim);
  cursor: pointer;
  border: 1px solid transparent;
}
.history-item:hover { background: var(--bg-panel); color: var(--text); }
.history-item.active { background: var(--accent-soft); color: var(--text); border-color: rgba(47,129,247,.25); }
.history-item span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.history-item .del {
  visibility: hidden; border: none; background: none;
  color: var(--text-faint); cursor: pointer; font-size: 13px;
}
.history-item:hover .del { visibility: visible; }
.history-item .del:hover { color: var(--red); }
.history-empty { font-size: 12px; color: var(--text-faint); padding: 6px 2px; }

/* Status */
.status-bar {
  display: flex; flex-direction: column; gap: 6px;
  font-size: 11.5px; color: var(--text-dim);
  padding: 4px 2px 0;
}
.status-row { display: flex; align-items: center; gap: 7px; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 6px var(--green); flex-shrink: 0; }
.dot.off { background: var(--amber); box-shadow: 0 0 6px var(--amber); }
.dot.err { background: var(--red); box-shadow: 0 0 6px var(--red); }

/* ===== Chat ===== */
.chat { flex: 1; display: flex; flex-direction: column; min-width: 0; }

.chat-header {
  padding: 16px 28px;
  border-bottom: 1px solid var(--border);
  background: rgba(16, 21, 29, 0.6);
  backdrop-filter: blur(6px);
}
.chat-header h2 { font-size: 16px; font-weight: 600; }
.chat-header p { font-size: 12px; color: var(--text-dim); margin-top: 2px; }

.messages {
  flex: 1; overflow-y: auto;
  padding: 26px 28px 14px;
  display: flex; flex-direction: column; gap: 18px;
}

/* Boas-vindas */
.welcome {
  max-width: 720px; margin: 8vh auto 0; text-align: center;
  display: flex; flex-direction: column; gap: 18px; align-items: center;
}
.welcome h3 { font-size: 22px; font-weight: 700; }
.welcome p { color: var(--text-dim); font-size: 13.5px; line-height: 1.6; max-width: 540px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.chip {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  color: var(--text-dim);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 12.5px;
  cursor: pointer;
  transition: all .15s;
}
.chip:hover { border-color: var(--accent); color: var(--text); background: var(--accent-soft); }

/* Mensagens */
.message { max-width: 860px; width: 100%; margin: 0 auto; display: flex; flex-direction: column; gap: 8px; }
.message .bubble {
  border-radius: var(--radius);
  padding: 14px 18px;
  line-height: 1.65;
  font-size: 14px;
  overflow-wrap: break-word;
}
.message.user .bubble {
  background: linear-gradient(135deg, #1b3a6b, #1d4ed8);
  color: #eaf1fb;
  margin-left: auto;
  max-width: 78%;
  white-space: pre-wrap;
}
.message.assistant .bubble {
  background: var(--bg-panel);
  border: 1px solid var(--border-soft);
}
.message.assistant .bubble:empty { display: none; }

/* Atividade (feedback em tempo real) */
.activity {
  background: var(--bg-raised);
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  padding: 8px 12px;
  display: flex; flex-direction: column; gap: 4px;
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--text-dim);
}
.activity .line { display: flex; align-items: center; gap: 8px; }
.activity .line .t { color: var(--text-faint); min-width: 14px; text-align: center; flex-shrink: 0; }
.activity .line.warn { color: var(--amber); }
.activity .line.err { color: var(--red); }
.activity .line.ok .t { color: var(--green); }
.activity .line .lbl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.activity .line .ms { margin-left: auto; color: var(--text-faint); flex-shrink: 0; }
.spin {
  display: inline-block; width: 10px; height: 10px;
  border: 2px solid var(--border); border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

details.activity-box summary {
  cursor: pointer; list-style: none;
  display: flex; gap: 6px; flex-wrap: wrap; align-items: center;
}
details.activity-box summary::-webkit-details-marker { display: none; }
details.activity-box .activity { margin-top: 8px; }
.meta-chip {
  font-family: var(--mono); font-size: 10.5px;
  background: var(--bg-raised); border: 1px solid var(--border-soft);
  color: var(--text-dim);
  border-radius: 999px; padding: 3px 9px;
}
.meta-chip.model { color: var(--purple); border-color: rgba(163, 113, 247, .3); }
.meta-chip.fallback { color: var(--amber); border-color: rgba(210, 153, 34, .35); }

/* Markdown */
.bubble h1, .bubble h2, .bubble h3 { margin: 12px 0 6px; line-height: 1.35; }
.bubble h1 { font-size: 17px; } .bubble h2 { font-size: 16px; } .bubble h3 { font-size: 15px; }
.bubble p { margin: 6px 0; }
.bubble ul, .bubble ol { margin: 6px 0 6px 20px; }
.bubble li { margin: 3px 0; }
.bubble code {
  font-family: var(--mono); font-size: 12.5px;
  background: var(--bg-raised); border: 1px solid var(--border-soft);
  border-radius: 5px; padding: 1px 5px;
}
.bubble pre {
  background: #0d1117; border: 1px solid var(--border-soft);
  border-radius: 8px; padding: 12px; overflow-x: auto; margin: 8px 0;
}
.bubble pre code { background: none; border: none; padding: 0; }
.bubble table {
  border-collapse: collapse; margin: 10px 0;
  font-size: 13px; max-width: 100%; display: block; overflow-x: auto;
}
.bubble th, .bubble td {
  border: 1px solid var(--border);
  padding: 6px 10px; text-align: left; white-space: nowrap;
}
.bubble th { background: var(--bg-raised); font-weight: 600; font-size: 12px; }
.bubble td { font-family: var(--mono); font-size: 12.5px; }
.bubble a { color: var(--accent); }
.bubble strong { font-weight: 600; color: #fff; }
.cursor-blink {
  display: inline-block; width: 7px; height: 15px;
  background: var(--accent); vertical-align: text-bottom;
  animation: blink 1s steps(2) infinite; border-radius: 1px;
}
@keyframes blink { 50% { opacity: 0; } }

/* Gráficos */
.chart-box {
  background: var(--bg-raised);
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  padding: 14px;
  margin: 10px 0;
}
.chart-title { font-size: 13px; font-weight: 600; margin-bottom: 8px; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 8px; }
.legend-item { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--text-dim); font-family: var(--mono); }
.legend-swatch { width: 10px; height: 10px; border-radius: 3px; }
.chart-svg { width: 100%; height: auto; display: block; cursor: crosshair; }
.chart-panel { margin-top: 6px; }
.legend-item .legend-px { color: var(--text); font-weight: 600; }

/* Tooltip do crosshair */
.chart-tip {
  position: absolute;
  z-index: 10;
  background: rgba(13, 17, 23, 0.96);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 11px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-dim);
  pointer-events: none;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  white-space: nowrap;
}
.chart-tip .tip-date {
  color: var(--text);
  font-weight: 600;
  margin-bottom: 5px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--border-soft);
}
.chart-tip .tip-row {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 3px;
}
.chart-tip .tip-row strong { margin-left: auto; color: var(--text); padding-left: 10px; }
.chart-pending { color: var(--text-faint); font-size: 12px; font-style: italic; }

/* Erro */
.bubble.error-bubble { border-color: rgba(248, 81, 73, .4); color: var(--red); }

/* ===== Composer ===== */
.composer { padding: 12px 28px 18px; border-top: 1px solid var(--border); background: var(--bg-panel); }
.composer form {
  max-width: 860px; margin: 0 auto;
  display: flex; align-items: flex-end; gap: 10px;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 10px 12px;
  transition: border-color .15s;
}
.composer form:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.composer textarea {
  flex: 1; resize: none; border: none; background: none; outline: none;
  color: var(--text); font-family: inherit; font-size: 14px;
  line-height: 1.5; max-height: 180px;
}
.composer textarea::placeholder { color: var(--text-faint); }
.composer button[type="submit"] {
  background: var(--accent); color: #fff;
  border: none; border-radius: 9px;
  width: 36px; height: 36px;
  display: grid; place-items: center;
  cursor: pointer; flex-shrink: 0;
  transition: opacity .15s;
}
.composer button[type="submit"]:disabled { opacity: .4; cursor: not-allowed; }
.composer-hint {
  max-width: 860px; margin: 8px auto 0;
  font-size: 11px; color: var(--text-faint); text-align: center;
}

/* ===== Navegação (abas da sidebar) ===== */
.nav-tabs {
  display: grid; grid-template-columns: 1fr 1fr; gap: 6px;
}
.nav-tab {
  background: var(--bg-raised);
  border: 1px solid var(--border-soft);
  color: var(--text-dim);
  border-radius: 9px;
  padding: 9px 0;
  font-size: 12.5px; font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all .15s;
}
.nav-tab:hover { color: var(--text); border-color: var(--border); }
.nav-tab.active {
  background: var(--accent-soft);
  border-color: rgba(47, 129, 247, .4);
  color: var(--accent);
}

/* ===== Módulo Opções ===== */
.options-view { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.options-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; }

.search-input {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 9px;
  color: var(--text);
  font-family: var(--mono); font-size: 12.5px;
  padding: 8px 12px;
  width: 230px;
  outline: none;
  transition: border-color .15s;
}
.search-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.search-input::placeholder { color: var(--text-faint); }

.options-body { flex: 1; overflow-y: auto; padding: 22px 28px; }

.options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 12px;
}
.uly-card {
  background: var(--bg-panel);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 14px;
  cursor: pointer;
  transition: all .15s;
  display: flex; flex-direction: column; gap: 8px;
}
.uly-card:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  transform: translateY(-2px);
}
.uly-ticker { font-family: var(--mono); font-size: 16px; font-weight: 700; }
.uly-total { font-size: 11.5px; color: var(--text-dim); }
.uly-total strong { color: var(--text); font-family: var(--mono); }
.uly-badges { display: flex; flex-wrap: wrap; gap: 4px; }
.uly-badge {
  font-family: var(--mono); font-size: 9.5px;
  border-radius: 5px; padding: 2px 6px;
  background: var(--bg-raised); border: 1px solid var(--border-soft);
  color: var(--text-dim);
}
.uly-badge.weekly { color: var(--purple); border-color: rgba(163, 113, 247, .3); }
.uly-badge.monthly { color: var(--accent); border-color: rgba(47, 129, 247, .3); }

.grid-loading {
  grid-column: 1 / -1;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  color: var(--text-dim); font-size: 13px;
  padding: 60px 0;
}

/* Cadeia de opções */
.chain-view { display: flex; flex-direction: column; gap: 14px; }
.chain-top { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.back-btn {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  color: var(--text-dim);
  border-radius: 8px;
  padding: 7px 14px;
  font-size: 12.5px; font-family: inherit;
  cursor: pointer;
}
.back-btn:hover { color: var(--text); border-color: var(--accent); }
.chain-title { font-size: 18px; font-weight: 700; font-family: var(--mono); }
.chain-spot { font-size: 13px; color: var(--text-dim); }
.chain-spot strong { color: var(--green); font-family: var(--mono); }

.chain-filters {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: var(--bg-panel);
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 12px; color: var(--text-dim);
}
.chain-filters label { display: flex; align-items: center; gap: 6px; }
.chain-filters select, .chain-filters input[type="checkbox"] {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 6px;
  padding: 5px 8px;
  font-family: var(--mono); font-size: 11.5px;
  outline: none;
}
.chain-filters select:focus { border-color: var(--accent); }
.chain-count { margin-left: auto; font-family: var(--mono); font-size: 11px; color: var(--text-faint); }

.chain-table-wrap {
  background: var(--bg-panel);
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  overflow: auto;
  max-height: calc(100vh - 320px);
}
.chain-table { border-collapse: collapse; width: 100%; font-size: 12px; }
.chain-table th {
  position: sticky; top: 0; z-index: 2;
  background: var(--bg-raised);
  color: var(--text-dim);
  font-size: 10.5px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .5px;
  padding: 9px 10px; text-align: right;
  border-bottom: 1px solid var(--border);
  cursor: pointer; user-select: none; white-space: nowrap;
}
.chain-table th:first-child, .chain-table td:first-child { text-align: left; }
.chain-table th:hover { color: var(--text); }
.chain-table th .arrow { font-size: 9px; margin-left: 3px; }
.chain-table td {
  padding: 7px 10px; text-align: right;
  font-family: var(--mono); font-size: 11.5px;
  border-bottom: 1px solid var(--border-soft);
  white-space: nowrap;
}
.chain-table tbody tr:hover { background: var(--accent-soft); }
.opt-type {
  font-size: 10px; font-weight: 700;
  border-radius: 5px; padding: 2px 7px;
}
.opt-type.call { background: rgba(63, 185, 80, .12); color: var(--green); }
.opt-type.put { background: rgba(248, 81, 73, .12); color: var(--red); }
.mny {
  font-size: 10px; font-weight: 600;
  border-radius: 5px; padding: 2px 6px;
}
.mny.itm { background: rgba(63, 185, 80, .12); color: var(--green); }
.mny.atm { background: rgba(210, 153, 34, .15); color: var(--amber); }
.mny.otm { color: var(--text-faint); }
.chain-empty { padding: 40px; text-align: center; color: var(--text-dim); font-size: 13px; }

/* ===== Módulos FIIs / Agro ===== */
.module-view { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.module-body {
  flex: 1; display: flex; gap: 16px;
  padding: 20px 28px; overflow: hidden; min-height: 0;
}
.module-main {
  flex: 1; min-width: 0; min-height: 0;
  display: flex; flex-direction: column; gap: 12px;
  overflow-y: auto;
  padding-right: 4px;
}
/* altura natural nos filhos — sem isso o flex comprime as tabelas em vez de
   deixar o module-main rolar, cortando a última seção */
.module-main > * { flex-shrink: 0; }
.module-table { max-height: none; }
/* FII é uma tabela única e alta: scroll interno preserva o cabeçalho sticky */
#fiisTable { max-height: calc(100vh - 240px); }

.seg-chips { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.seg-chip {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  color: var(--text-dim);
  border-radius: 999px;
  padding: 6px 13px;
  font-size: 12px; font-family: inherit;
  cursor: pointer;
  transition: all .15s;
}
.seg-chip:hover { color: var(--text); border-color: var(--accent); }
.seg-chip.active {
  background: var(--accent-soft);
  border-color: rgba(47, 129, 247, .45);
  color: var(--accent);
  font-weight: 600;
}
.seg-chip small { opacity: .7; font-family: var(--mono); }
.seg-meta { margin-left: auto; font-size: 11px; color: var(--text-faint); font-family: var(--mono); }

.sec-title {
  font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .8px;
  color: var(--text-dim);
  margin-top: 6px;
  display: flex; align-items: center; gap: 8px;
}
.sec-title .meta-chip { text-transform: none; letter-spacing: 0; }

.tipo-chip {
  font-size: 10px; font-weight: 700;
  border-radius: 5px; padding: 2px 7px;
}
.tipo-chip.fii { background: rgba(47, 129, 247, .12); color: var(--accent); }
.tipo-chip.fiagro { background: rgba(63, 185, 80, .12); color: var(--green); }
.cell-name {
  max-width: 260px; overflow: hidden; text-overflow: ellipsis;
  font-family: "Inter", sans-serif !important; font-size: 11.5px !important;
  color: var(--text-dim);
}
.mini-link {
  background: var(--accent-soft); color: var(--accent);
  border: 1px solid rgba(47, 129, 247, .3);
  border-radius: 6px; padding: 3px 8px;
  font-family: var(--mono); font-size: 10.5px;
  cursor: pointer;
}
.mini-link:hover { background: rgba(47, 129, 247, .25); }

/* Painel de notícias */
.news-panel {
  width: 330px; flex-shrink: 0;
  background: var(--bg-panel);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 14px;
  display: flex; flex-direction: column; gap: 10px;
  overflow: hidden;
}
.news-head {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .8px;
  color: var(--text-dim);
}
.news-search { display: flex; gap: 6px; }
.news-search input {
  flex: 1; min-width: 0;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 7px;
  color: var(--text);
  font-family: var(--mono); font-size: 11.5px;
  padding: 7px 10px;
  outline: none;
}
.news-search input:focus { border-color: var(--accent); }
.news-search button {
  background: var(--accent-soft); color: var(--accent);
  border: 1px solid rgba(47, 129, 247, .3);
  border-radius: 7px; padding: 0 11px;
  cursor: pointer; font-size: 13px;
}
.news-list { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }
.news-item {
  display: block;
  padding: 9px 8px;
  border-radius: 8px;
  border-bottom: 1px solid var(--border-soft);
  text-decoration: none;
}
.news-item:hover { background: var(--bg-raised); }
.news-item .nt {
  font-size: 12px; line-height: 1.45; color: var(--text);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.news-item .nm {
  margin-top: 4px;
  font-size: 10px; color: var(--text-faint); font-family: var(--mono);
  display: flex; justify-content: space-between; gap: 8px;
}
.news-empty { color: var(--text-faint); font-size: 12px; padding: 14px 6px; text-align: center; }

@media (max-width: 1200px) and (min-width: 901px) {
  .news-panel { display: none; }
}

/* Scrollbars */
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: #2c3644; }
::-webkit-scrollbar-track { background: transparent; }

/* ===================================================================
 * MOBILE (≤ 900px) — desktop permanece intocado acima desse corte
 * =================================================================== */
@media (max-width: 900px) {
  /* sidebar vira drawer deslizante */
  .sidebar {
    position: fixed; top: 0; bottom: 0; left: 0; z-index: 50;
    width: min(85vw, 320px);
    height: 100dvh;
    padding-top: 58px; /* respiro p/ o botão ☰ fixo não cobrir o logo */
    transform: translateX(-105%);
    transition: transform .25s ease;
    box-shadow: 12px 0 40px rgba(0, 0, 0, .5);
    border-right: 1px solid var(--border);
  }
  .sidebar.open { transform: translateX(0); }

  .hamburger { display: grid; }
  .bottom-nav {
    display: flex;
    border-top: 1px solid var(--border);
    background: var(--bg-panel);
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
    z-index: 40;
  }
  .bnav {
    flex: 1;
    display: flex; flex-direction: column; align-items: center; gap: 2px;
    background: none; border: none;
    color: var(--text-dim);
    font-size: 10px; font-weight: 600; font-family: inherit;
    padding: 4px 0; border-radius: 8px;
    cursor: pointer;
  }
  .bnav .ico { font-size: 18px; line-height: 1.2; }
  .bnav.active { color: var(--accent); }

  /* cabeçalhos: espaço para o hambúrguer + busca em linha própria */
  .chat-header { padding: 10px 14px 10px 58px; }
  .chat-header h2 { font-size: 14.5px; }
  .chat-header p { font-size: 10.5px; }
  .options-header { flex-wrap: wrap; gap: 8px; }
  .options-header .search-input { width: 100%; order: 3; }

  /* chat */
  .messages { padding: 14px 12px 10px; }
  .message.user .bubble { max-width: 90%; }
  .message .bubble { padding: 12px 14px; }
  .composer { padding: 8px 10px 10px; }
  .composer-hint { display: none; }
  .composer textarea, .search-input, .news-search input { font-size: 16px; } /* evita auto-zoom do iOS */
  .welcome { margin-top: 3vh; }
  .welcome h3 { font-size: 19px; }

  /* módulo opções */
  .options-body { padding: 12px 10px; }
  .options-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
  .chain-table-wrap { max-height: 65vh; }
  .chain-filters { gap: 8px; padding: 8px 10px; }
  .chain-count { width: 100%; margin-left: 0; }

  /* módulos FIIs/Agro: empilha conteúdo + notícias numa coluna rolável */
  .module-body {
    flex-direction: column;
    overflow-y: auto;
    padding: 12px 10px;
  }
  .module-main { overflow: visible; flex: none; min-height: auto; padding-right: 0; }
  #fiisTable { max-height: 70vh; }
  .news-panel { display: flex; width: 100%; flex: none; }
  .news-list { max-height: 320px; }

  /* gráficos */
  .chart-tip { font-size: 10px; padding: 6px 8px; }
  .chart-box { padding: 10px; }
}

/* ===================================================================
 * Painel do assessor — login, clientes, mensagens, wizard, relatório
 * =================================================================== */
.login-screen {
  position: fixed; inset: 0; z-index: 100;
  display: grid; place-items: center;
  background: radial-gradient(ellipse at 30% 20%, #101a2e 0%, var(--bg) 60%);
  padding: 20px;
}
.login-card {
  width: min(380px, 100%);
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
  display: flex; flex-direction: column; gap: 14px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, .5);
}
.login-brand { margin-bottom: 6px; }
.login-card label {
  display: flex; flex-direction: column; gap: 6px;
  font-size: 12px; font-weight: 600; color: var(--text-dim);
}
.login-card input, .modal input, .modal select, .modal textarea, .pos-form input, .pos-form select {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 9px;
  color: var(--text);
  font-family: inherit; font-size: 14px;
  padding: 10px 12px;
  outline: none;
  transition: border-color .15s;
}
.login-card input:focus, .modal input:focus, .modal select:focus, .modal textarea:focus,
.pos-form input:focus, .pos-form select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.login-btn, .primary-btn {
  background: var(--accent); color: #fff;
  border: none; border-radius: 9px;
  padding: 10px 16px;
  font-size: 13.5px; font-weight: 600; font-family: inherit;
  cursor: pointer;
  transition: filter .15s;
}
.login-btn:hover, .primary-btn:hover { filter: brightness(1.12); }
.primary-btn:disabled { opacity: .45; cursor: not-allowed; }
.login-error {
  background: rgba(248, 81, 73, .1);
  border: 1px solid rgba(248, 81, 73, .35);
  color: var(--red);
  border-radius: 8px; padding: 8px 12px; font-size: 12.5px;
}
.login-hint { font-size: 11.5px; color: var(--text-faint); text-align: center; }
.login-hint code { font-family: var(--mono); color: var(--text-dim); }

.logout-link {
  align-self: flex-start;
  background: none; border: none;
  color: var(--text-faint); font-size: 11px; font-family: inherit;
  cursor: pointer; text-decoration: underline; padding: 0;
}
.logout-link:hover { color: var(--red); }

.nav-badge {
  display: inline-grid; place-items: center;
  min-width: 16px; height: 16px;
  margin-left: 5px; padding: 0 4px;
  background: var(--red); color: #fff;
  border-radius: 999px;
  font-size: 9.5px; font-weight: 700; font-family: var(--mono);
}

/* ---- lista de clientes ---- */
.clients-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 12px;
}
.clients-grid.archived { opacity: .55; margin-top: 8px; }
.client-card {
  background: var(--bg-panel);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 14px;
  cursor: pointer;
  display: flex; flex-direction: column; gap: 9px;
  transition: all .15s;
}
.client-card:hover { border-color: var(--accent); background: var(--accent-soft); transform: translateY(-2px); }
.cc-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.cc-name { font-weight: 600; font-size: 14px; }
.cc-badge {
  font-size: 10.5px; font-family: var(--mono);
  color: var(--red);
  background: rgba(248, 81, 73, .12);
  border-radius: 999px; padding: 2px 8px;
}
.cc-meta { display: flex; flex-wrap: wrap; gap: 5px; }
.cc-on { color: var(--green) !important; border-color: rgba(63, 185, 80, .35) !important; }
.cc-cpf { font-family: var(--mono); font-size: 11px; color: var(--text-faint); }

/* ---- detalhe do cliente ---- */
.cli-actions { margin-left: auto; display: flex; gap: 8px; }
.client-detail {
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px;
  margin-top: 14px;
  align-items: start;
}
.cd-col { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.cd-full { grid-column: 1 / -1; }
.cd-panel { gap: 12px; }
.cd-info { display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.cd-info > div { display: flex; gap: 10px; }
.cd-info span { color: var(--text-faint); min-width: 76px; font-size: 12px; }
.cd-info strong { font-weight: 500; word-break: break-word; }
.cd-access { font-size: 13px; display: flex; flex-direction: column; gap: 8px; }
.cd-access a { color: var(--accent); }
.access-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; }
.access-code {
  font-family: var(--mono); font-size: 18px; letter-spacing: 3px;
  color: var(--green);
  background: rgba(63, 185, 80, .1);
  border: 1px dashed rgba(63, 185, 80, .4);
  border-radius: 8px; padding: 4px 12px;
}

/* toggle */
.toggle { position: relative; display: inline-block; width: 38px; height: 21px; }
.toggle input { display: none; }
.toggle span {
  position: absolute; inset: 0;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 999px; cursor: pointer;
  transition: background .2s;
}
.toggle span::after {
  content: ""; position: absolute; top: 2px; left: 2px;
  width: 15px; height: 15px; border-radius: 50%;
  background: var(--text-dim);
  transition: all .2s;
}
.toggle input:checked + span { background: rgba(63, 185, 80, .25); border-color: rgba(63, 185, 80, .5); }
.toggle input:checked + span::after { left: 19px; background: var(--green); }

.pos-form { display: flex; gap: 7px; flex-wrap: wrap; }
.pos-form input, .pos-form select { font-size: 12.5px; padding: 8px 10px; }
.pos-form input[name="symbol"] { width: 110px; font-family: var(--mono); }
.pos-form input[name="qty"] { width: 76px; }
.pos-form input[name="avg_price"] { width: 100px; }
.pf-wrap { max-height: 320px; }
.pf-wrap tfoot td {
  position: sticky; bottom: 0;
  background: var(--bg-raised);
  border-top: 1px solid var(--border);
  font-size: 12px;
}
.del-pos {
  background: none; border: none; color: var(--text-faint);
  cursor: pointer; font-size: 12px;
}
.del-pos:hover { color: var(--red); }

/* ---- modal ---- */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(6, 9, 14, .7);
  display: grid; place-items: center;
  padding: 18px;
}
.modal {
  width: min(560px, 100%);
  max-height: 90vh; overflow-y: auto;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px;
  display: flex; flex-direction: column; gap: 14px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, .55);
}
.modal h3 { font-size: 16px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-grid label { display: flex; flex-direction: column; gap: 5px; font-size: 12px; font-weight: 600; color: var(--text-dim); }
.form-grid .span2 { grid-column: 1 / -1; }
.form-actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; align-items: center; }

/* ---- wizard ---- */
.wizard-modal { width: min(480px, 100%); }
.wiz-progress { display: flex; gap: 6px; }
.wiz-progress span { flex: 1; height: 4px; border-radius: 4px; background: var(--border); }
.wiz-progress span.done { background: var(--green); }
.wiz-progress span.cur { background: var(--accent); }
.wiz-options { display: flex; flex-direction: column; gap: 8px; margin: 6px 0; }
.wiz-opt {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 13.5px; font-family: inherit; text-align: left;
  cursor: pointer;
  transition: all .15s;
}
.wiz-opt:hover { border-color: var(--accent); background: var(--accent-soft); }
.wiz-opt.sel { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.wizard-modal textarea { width: 100%; resize: vertical; }

/* ---- análise / relatório ---- */
.an-bubble {
  background: var(--bg-panel);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 14px 16px;
  font-size: 13.5px; line-height: 1.6;
  overflow-wrap: break-word;
}
.an-bubble:empty { display: none; }
.analysis-item {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: var(--bg-panel);
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  padding: 10px 12px;
  margin-top: 8px;
}
.ai-top { display: flex; align-items: center; gap: 8px; font-size: 12.5px; flex-wrap: wrap; }
.report-modal { width: min(760px, 100%); }
.report-edit {
  width: 100%; resize: vertical;
  font-family: var(--mono); font-size: 12.5px; line-height: 1.55;
}

/* ---- mensagens ---- */
.msg-list { display: flex; flex-direction: column; gap: 10px; max-width: 760px; }
.msg-item {
  background: var(--bg-panel);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 14px 16px;
  display: flex; flex-direction: column; gap: 8px;
}
.msg-item:not(.read) { border-left: 3px solid var(--accent); }
.msg-item.read { opacity: .65; }
.msg-head { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.msg-head .panel-hint { margin-left: auto; }
.msg-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 6px var(--accent); }
.msg-q { font-size: 13.5px; line-height: 1.5; color: var(--text); }
.msg-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.msg-actions a { text-decoration: none; display: inline-block; }

/* ===================================================================
 * Painel do cliente final (/cliente)
 * =================================================================== */
.client-page { overflow-y: auto; }
.client-app { display: flex; flex-direction: column; min-height: 100dvh; }
.client-header {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 16px 26px;
  border-bottom: 1px solid var(--border);
  background: rgba(16, 21, 29, .7);
}
.client-body {
  flex: 1;
  display: grid; grid-template-columns: 1fr 360px; gap: 16px;
  padding: 18px 26px 26px;
  max-width: 1280px; margin: 0 auto; width: 100%;
  align-items: start;
}
.client-main { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.client-panel { gap: 10px; }
.client-table { max-height: 50vh; }

.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.kpi-card {
  background: var(--bg-raised);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 13px 15px;
  display: flex; flex-direction: column; gap: 3px;
}
.kpi-label { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .7px; color: var(--text-dim); }
.kpi-value { font-family: var(--mono); font-size: 19px; font-weight: 600; }
.kpi-sub { font-size: 11px; color: var(--text-faint); font-family: var(--mono); }

.alloc-bar {
  display: flex; height: 14px; border-radius: 999px; overflow: hidden;
  background: var(--bg);
}
.alloc-bar span { display: block; height: 100%; }
.alloc-legend { display: flex; flex-wrap: wrap; gap: 12px; }
.alloc-legend .legend-item strong { color: var(--text); }

.client-chat {
  background: var(--bg-panel);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 14px;
  display: flex; flex-direction: column; gap: 10px;
  position: sticky; top: 14px;
  max-height: calc(100dvh - 120px);
}
.mini-messages {
  flex: 1; min-height: 220px;
  overflow-y: auto;
  display: flex; flex-direction: column; gap: 8px;
  padding: 2px;
}
.mini-bubble {
  border-radius: 12px;
  padding: 9px 12px;
  font-size: 12.5px; line-height: 1.55;
  max-width: 92%;
  overflow-wrap: break-word;
}
.mini-bubble p { margin: 3px 0; }
.mini-bubble ul { margin: 4px 0 4px 16px; }
.mini-bubble code { font-family: var(--mono); font-size: 11px; background: var(--bg); border-radius: 4px; padding: 1px 4px; }
.mini-bubble.user { background: linear-gradient(135deg, #1b3a6b, #1d4ed8); color: #eaf1fb; align-self: flex-end; }
.mini-bubble.bot { background: var(--bg-raised); border: 1px solid var(--border-soft); align-self: flex-start; }
.mini-bubble.forwarded { border-color: rgba(63, 185, 80, .45); }
.mini-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.mini-chip { font-size: 11px; padding: 5px 10px; }
.mini-form { display: flex; gap: 7px; }
.mini-form input {
  flex: 1; min-width: 0;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-family: inherit; font-size: 13px;
  padding: 9px 12px; outline: none;
}
.mini-form input:focus { border-color: var(--accent); }
.mini-form button {
  background: var(--accent); color: #fff;
  border: none; border-radius: 9px;
  width: 38px; cursor: pointer; font-size: 14px;
}
.mini-disclaimer { font-size: 10px; color: var(--text-faint); line-height: 1.5; }

@media (max-width: 980px) {
  .client-body { grid-template-columns: 1fr; }
  .client-chat { position: static; max-height: none; }
  .mini-messages { min-height: 160px; max-height: 320px; }
}

@media (max-width: 900px) {
  .client-detail { grid-template-columns: 1fr; }
  .cli-actions { width: 100%; margin-left: 0; }
  .clients-grid { grid-template-columns: 1fr; }
  .client-header { padding: 12px 14px; }
  .client-body { padding: 12px 12px 20px; }
  .kpi-value { font-size: 16px; }
}

/* ===================================================================
 * M7/M8/M9 — Dashboard "Hoje", compositor e feed do cliente
 * =================================================================== */
.quick-ask { display: flex; gap: 7px; width: min(420px, 100%); }
.quick-ask input {
  flex: 1; min-width: 0;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-family: inherit; font-size: 13px;
  padding: 9px 12px; outline: none;
}
.quick-ask input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.quick-ask button {
  background: var(--accent); color: #fff;
  border: none; border-radius: 9px;
  width: 38px; cursor: pointer;
}

.today-market {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}
.today-mkt-card { position: relative; }
.book-card { border-color: rgba(47, 129, 247, .4); background: var(--accent-soft); }

.send-to-client {
  position: absolute; top: 8px; right: 8px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 7px;
  font-size: 12px; padding: 3px 6px;
  cursor: pointer;
  opacity: 0; transition: opacity .15s;
}
.today-mkt-card:hover .send-to-client,
.alert-item:hover .send-to-client,
.today-news-item:hover .send-to-client,
tr:hover .send-to-client { opacity: 1; }
.send-to-client:hover { border-color: var(--accent); background: var(--accent-soft); }
td .send-to-client, .send-cell .send-to-client { position: static; }

.today-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px;
  margin-bottom: 14px;
  align-items: start;
}
.alert-config { font-size: 11px; color: var(--text-faint); text-transform: none; letter-spacing: 0; }
.alert-config select {
  background: var(--bg-raised); border: 1px solid var(--border);
  color: var(--text); border-radius: 5px;
  font-family: var(--mono); font-size: 11px; padding: 2px 4px;
}
.alert-list { display: flex; flex-direction: column; gap: 7px; max-height: 380px; overflow-y: auto; }
.alert-item {
  position: relative;
  display: flex; align-items: flex-start; gap: 10px;
  background: var(--bg-panel);
  border: 1px solid var(--border-soft);
  border-left: 3px solid var(--amber);
  border-radius: 9px;
  padding: 10px 36px 10px 12px;
  cursor: pointer;
  transition: border-color .15s;
}
.alert-item:hover { border-color: var(--accent); }
.alert-item.sev2 { border-left-color: var(--red); }
.alert-ico { font-size: 15px; }
.alert-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.alert-txt strong { font-size: 13px; }
.alert-txt span { font-size: 11.5px; color: var(--text-dim); }

.today-news { max-height: 380px; }
.today-news-item { position: relative; padding-right: 38px; }
.news-book { border-left: 3px solid var(--green); background: rgba(63, 185, 80, .05); }
.book-tag {
  display: inline-block;
  font-size: 9.5px; font-weight: 700; font-family: var(--mono);
  color: var(--green);
  background: rgba(63, 185, 80, .12);
  border-radius: 5px; padding: 1px 6px;
  vertical-align: 1px;
}

.sends-list { display: flex; flex-direction: column; gap: 4px; }
.send-row {
  display: flex; align-items: center; gap: 10px;
  font-size: 12px; padding: 6px 8px;
  border-bottom: 1px solid var(--border-soft);
}
.send-row:last-child { border-bottom: none; }
.send-who { font-weight: 600; min-width: 70px; }
.send-title { color: var(--text-dim); flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.send-when { font-family: var(--mono); font-size: 10.5px; color: var(--text-faint); }
.send-read { font-family: var(--mono); font-size: 10.5px; color: var(--text-faint); min-width: 92px; text-align: right; }
.send-read.ok { color: var(--green); }

/* compositor */
.composer-modal { width: min(620px, 100%); }
.composer-ctx {
  background: var(--bg-raised);
  border: 1px solid var(--border-soft);
  border-left: 3px solid var(--accent);
  border-radius: 9px;
  padding: 10px 12px;
  font-size: 13px;
  display: flex; flex-direction: column; gap: 3px;
}
.composer-ctx span { font-size: 11.5px; color: var(--text-dim); }
.composer-clients {
  display: flex; flex-direction: column; gap: 4px;
  max-height: 160px; overflow-y: auto;
  border: 1px solid var(--border-soft);
  border-radius: 9px; padding: 8px;
}
.comp-client {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; padding: 4px 6px; border-radius: 6px;
  cursor: pointer;
}
.comp-client:hover { background: var(--bg-raised); }
.composer-modal textarea { width: 100%; resize: vertical; font-size: 13.5px; line-height: 1.55; }
.comp-warn { background: rgba(210, 153, 34, .1); border-color: rgba(210, 153, 34, .4); color: var(--amber); }
.comp-sent { font-size: 14px; font-weight: 600; color: var(--green); margin-bottom: 8px; }
#compDone { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
#compDone a { text-decoration: none; }

/* feed do cliente */
.feed-list { display: flex; flex-direction: column; gap: 10px; }
.feed-item {
  background: var(--bg-raised);
  border: 1px solid var(--border-soft);
  border-left: 3px solid var(--accent);
  border-radius: 10px;
  padding: 11px 14px;
}
.feed-head { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; margin-bottom: 4px; }
.feed-head span { font-family: var(--mono); font-size: 10.5px; color: var(--text-faint); }
.feed-body { font-size: 13px; line-height: 1.6; color: var(--text); }
.feed-body p { margin: 4px 0; }

@media (max-width: 900px) {
  .today-grid { grid-template-columns: 1fr; }
  .options-header .quick-ask { width: 100%; order: 3; }
  .send-to-client { opacity: 1; } /* sem hover no touch */
  .send-row { flex-wrap: wrap; }
}

/* M10 — banner do modo "visão do cliente" */
.imp-banner {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  flex-wrap: wrap;
  background: rgba(210, 153, 34, .14);
  border-bottom: 1px solid rgba(210, 153, 34, .5);
  color: var(--amber);
  font-size: 12.5px; font-weight: 600;
  padding: 8px 14px;
}
.imp-banner button {
  background: none;
  border: 1px solid rgba(210, 153, 34, .5);
  color: var(--amber);
  border-radius: 7px;
  padding: 3px 10px;
  font-size: 11.5px; font-family: inherit;
  cursor: pointer;
}
.imp-banner button:hover { background: rgba(210, 153, 34, .18); }

/* M11 — ações da resposta do chat */
.chat-actions { display: flex; gap: 8px; justify-content: flex-end; }
.chat-send-btn { font-size: 11.5px; padding: 5px 12px; }

/* M12 — indicador de modo do rascunho (pessoal × grupo) */
.comp-mode {
  font-size: 11px; font-family: var(--mono);
  color: var(--text-dim);
  background: var(--bg-raised);
  border: 1px solid var(--border-soft);
  border-radius: 7px;
  padding: 5px 10px;
}
.comp-mode.group { color: var(--purple); border-color: rgba(163, 113, 247, .35); }

/* Indicador de digitação — chat nunca parece travado */
.typing { display: inline-flex; gap: 4px; align-items: center; }
.tdot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent);
  animation: tblink 1.2s infinite ease-in-out;
}
.tdot:nth-child(2) { animation-delay: .2s; }
.tdot:nth-child(3) { animation-delay: .4s; }
@keyframes tblink {
  0%, 80%, 100% { opacity: .25; transform: scale(.8); }
  40% { opacity: 1; transform: scale(1); }
}
.typing-label {
  margin-left: 9px;
  color: var(--text-dim);
  font-size: 12.5px;
  font-style: italic;
}
