/*
  Norte — estilo.
  Mesmos tokens dos wireframes (docs/wireframes/00-indice.md), adaptados para
  web: claro e escuro automáticos, área segura do iPhone respeitada e alvos de
  toque de 44 pt.
*/

:root {
  --accent: #2563EB;
  --accent-soft: #EFF6FF;
  --positive: #10B981;
  --positive-text: #047857;
  --negative: #EF4444;
  --negative-text: #B91C1C;
  --warn: #B45309;
  --warn-bg: #FFFBEB;
  --warn-border: #FDE68A;

  --bg: #F2F3F7;
  --surface: #FFFFFF;
  --surface-alt: #F3F4F6;
  --text: #111827;
  --text-muted: #6B7280;
  --stroke: #D1D5DB;
  --divider: #E5E7EB;

  --radius-card: 14px;
  --radius-control: 11px;
  --shadow: 0 1px 2px rgb(16 24 40 / 6%), 0 4px 12px rgb(16 24 40 / 4%);

  --topbar-h: 56px;
  --tabbar-h: 58px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --accent: #3B82F6;
    --accent-soft: #11213D;
    --positive: #34D399;
    --positive-text: #6EE7B7;
    --negative: #F87171;
    --negative-text: #FCA5A5;
    --warn: #FCD34D;
    --warn-bg: #2A2314;
    --warn-border: #4D3F16;

    --bg: #0B0D12;
    --surface: #161A22;
    --surface-alt: #1F2430;
    --text: #F3F4F6;
    --text-muted: #9BA3AF;
    --stroke: #2C3240;
    --divider: #262C38;
    --shadow: none;
  }
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.45 -apple-system, BlinkMacSystemFont, 'SF Pro Text', Inter, system-ui, sans-serif;
  /* Impede o "pull to refresh" dentro do app instalado. */
  overscroll-behavior-y: none;
}

body.no-scroll { overflow: hidden; }

/* ---------------------------------------------------------------- chrome */

.topbar {
  position: fixed; inset: 0 0 auto 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; padding: 0 16px;
  height: calc(var(--topbar-h) + env(safe-area-inset-top));
  padding-top: env(safe-area-inset-top);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--divider);
}

.topbar h1 { margin: 0; font-size: 22px; font-weight: 700; letter-spacing: -0.01em; }
.topbar-actions { display: flex; gap: 8px; }

main {
  padding:
    calc(var(--topbar-h) + env(safe-area-inset-top) + 12px)
    16px
    calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 24px);
  min-height: 100%;
  -webkit-overflow-scrolling: touch;
}

.tabbar {
  position: fixed; inset: auto 0 0 0; z-index: 20;
  display: grid; grid-template-columns: repeat(5, 1fr);
  height: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  border-top: 1px solid var(--divider);
}

.tab {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; border: 0; background: none; color: var(--text-muted);
  font: inherit; cursor: pointer; padding: 0;
}
.tab.active { color: var(--accent); }
.tab-icon { font-size: 19px; line-height: 1; }
.tab-label { font-size: 10px; }

/* ----------------------------------------------------------- utilitários */

.stack { display: flex; flex-direction: column; gap: 16px; }
.stack-sm { display: flex; flex-direction: column; gap: 10px; }
.stack-xs { display: flex; flex-direction: column; gap: 4px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.grow { flex: 1; }
.center { text-align: center; }
.right { text-align: right; align-items: flex-end; }
.mono { font-variant-numeric: tabular-nums; }
.tiny { font-size: 11px; }

.caption { font-size: 12px; color: var(--text-muted); }
.caption.accent { color: var(--accent); }
.caption.negative, .negative { color: var(--negative-text); }
.positive { color: var(--positive-text); }
.warn { color: var(--warn); }

hr { border: 0; border-top: 1px solid var(--divider); margin: 4px 0; }

.hscroll {
  display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px;
  scrollbar-width: none; scroll-snap-type: x proximity;
}
.hscroll::-webkit-scrollbar { display: none; }
.hscroll > * { scroll-snap-align: start; flex: 0 0 auto; }

/* ----------------------------------------------------------------- cards */

.card {
  background: var(--surface); border-radius: var(--radius-card);
  padding: 16px; display: flex; flex-direction: column; gap: 12px;
  box-shadow: var(--shadow);
  border: 1px solid transparent;
}
@media (prefers-color-scheme: dark) { .card { border-color: var(--stroke); } }

.card.accent-soft { background: var(--accent-soft); }
.card.danger-card { border-color: color-mix(in srgb, var(--negative) 40%, transparent); }
.card h2 { margin: 0; font-size: 15px; font-weight: 600; }

.card-head { display: flex; align-items: center; justify-content: space-between; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.section-head h2 { margin: 0; font-size: 15px; font-weight: 600; }

.big-money { margin: 0; font-size: 30px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.big-money.sm { font-size: 22px; }
.big-percent { font-size: 22px; font-weight: 700; color: var(--accent); }

.pill {
  font-size: 11px; padding: 3px 10px; border-radius: 999px;
  background: var(--surface-alt); color: var(--text-muted);
}

.banner {
  display: flex; flex-direction: column; gap: 4px; text-align: left;
  padding: 14px; border-radius: var(--radius-card); font: inherit; cursor: pointer;
  background: var(--warn-bg); border: 1px solid var(--warn-border); color: var(--text);
}
.banner strong { color: var(--warn); }
.banner span { font-size: 12px; color: var(--text-muted); }
.banner-cta { color: var(--accent) !important; font-weight: 600; }

.mini-card {
  width: 150px; padding: 12px; border-radius: 12px; background: var(--surface);
  display: flex; flex-direction: column; gap: 6px; box-shadow: var(--shadow);
}
.mini-head { display: flex; align-items: center; gap: 6px; }
.mini-title { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex: 0 0 auto; }

.row { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 28px; }
.row-label { display: flex; align-items: center; gap: 8px; }
.row-value { display: flex; align-items: center; gap: 8px; font-variant-numeric: tabular-nums; }
.row.tappable { cursor: pointer; padding: 6px 0; }

.bar-row { display: flex; flex-direction: column; gap: 4px; }
.bar-top { display: flex; justify-content: space-between; font-size: 13px; }
.bar-track { height: 10px; border-radius: 999px; background: var(--surface-alt); overflow: hidden; }
.bar-track span { display: block; height: 100%; border-radius: 999px; }

.cat-row { display: flex; flex-direction: column; gap: 4px; }
.cat-top { display: flex; justify-content: space-between; font-size: 13px; gap: 8px; }

.progress { height: 8px; border-radius: 999px; background: var(--surface-alt); overflow: hidden; }
.progress span { display: block; height: 100%; border-radius: 999px; transition: width 0.25s ease; }

/* ------------------------------------------------------------- atalhos */

.shortcuts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.shortcut {
  display: flex; flex-direction: column; gap: 2px; align-items: center; justify-content: center;
  padding: 14px 8px; border-radius: 12px; border: 0; cursor: pointer;
  background: var(--surface); color: var(--text); font: inherit; box-shadow: var(--shadow);
}
.shortcut strong { font-size: 13px; }
.shortcut span { font-size: 10px; color: var(--text-muted); }
.shortcut.primary { background: var(--accent); color: #fff; }
.shortcut.primary span { color: rgb(255 255 255 / 80%); }

/* --------------------------------------------------------- transações */

.month-nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 2px 4px;
}
.toolbar { display: flex; gap: 8px; align-items: center; }
.toolbar .input { flex: 1; }

.day-group { display: flex; flex-direction: column; gap: 8px; }
.day-head { margin: 0; font-size: 11px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; }

.tx {
  display: flex; align-items: center; gap: 12px;
  background: var(--surface); border-radius: 12px; padding: 12px;
  box-shadow: var(--shadow);
}
.tx-icon {
  width: 34px; height: 34px; flex: 0 0 auto; border-radius: 9px;
  display: grid; place-items: center; font-size: 16px;
}
.tx-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.tx-main strong { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tx-right { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.tx-more {
  border: 0; background: none; color: var(--text-muted); font-size: 18px;
  cursor: pointer; padding: 4px 2px; min-width: 24px;
}

.amount { font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.amount.income { color: var(--positive-text); }
.amount.expense { color: var(--negative-text); }

.preview {
  background: var(--surface-alt); border-radius: 12px; padding: 12px;
  display: flex; flex-direction: column; gap: 6px;
}

/* --------------------------------------------------------------- metas */

.goal-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.goal-card {
  display: flex; flex-direction: column; text-align: left; padding: 0; border: 0;
  background: var(--surface); border-radius: var(--radius-card); overflow: hidden;
  cursor: pointer; font: inherit; color: var(--text); box-shadow: var(--shadow);
}
.goal-card.achieved { opacity: 0.68; }

.goal-hero {
  position: relative; height: 92px; background: var(--accent-soft);
  display: grid; place-items: center; overflow: hidden;
}
.goal-hero.large { height: 150px; border-radius: var(--radius-card); }
.goal-hero img { width: 100%; height: 100%; object-fit: cover; }
.goal-emoji { font-size: 34px; }

.badge {
  position: absolute; top: 8px; right: 8px;
  font-size: 10px; padding: 3px 8px; border-radius: 999px;
  background: var(--surface-alt); color: var(--text-muted);
}
.badge.high { background: #FEE2E2; color: #B91C1C; }
.badge.medium { background: var(--surface-alt); }
.badge.low { background: #DBEAFE; color: #1D4ED8; }
.badge.ok { background: #DCFCE7; color: #047857; position: static; }

.goal-body { padding: 12px; display: flex; flex-direction: column; gap: 6px; }
.goal-body strong { font-size: 14px; }
.goal-foot { display: flex; justify-content: space-between; align-items: baseline; }
.goal-foot strong { font-size: 13px; }

.contribution { padding: 6px 0; border-bottom: 1px solid var(--divider); }
.contribution:last-child { border-bottom: 0; }

/* -------------------------------------------------------------- diário */

.note {
  display: flex; flex-direction: column; gap: 6px; text-align: left;
  background: var(--surface); border: 0; border-radius: 12px; padding: 14px;
  font: inherit; color: var(--text); cursor: pointer; box-shadow: var(--shadow);
}
.note-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.note-preview {
  margin: 0; font-size: 13px; color: var(--text-muted);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.note-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tag {
  font-size: 10px; padding: 2px 7px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent);
}

/* ---------------------------------------------------------- calendário */

.nav-arrows { display: inline-flex; gap: 6px; }

.weekdays, .days { display: grid; grid-template-columns: repeat(7, 1fr); }
.weekdays span { text-align: center; font-size: 11px; color: var(--text-muted); padding-bottom: 4px; }

.day {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  min-height: 44px; border: 0; background: none; font: inherit; color: var(--text);
  cursor: pointer; padding: 4px 0; border-radius: 10px;
}
.day.empty { pointer-events: none; }
.day-number {
  width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center; font-size: 14px;
}
.day.today .day-number { box-shadow: inset 0 0 0 1.5px var(--accent); }
.day.selected .day-number { background: var(--accent); color: #fff; font-weight: 700; }
.day-dots { display: flex; gap: 3px; height: 5px; }
.day-dots i { width: 5px; height: 5px; border-radius: 50%; display: block; }

.event {
  display: flex; background: var(--surface); border-radius: 12px;
  overflow: hidden; box-shadow: var(--shadow);
}
.event.done { opacity: 0.55; }
.event.done strong { text-decoration: line-through; }
.event-bar { width: 4px; flex: 0 0 auto; }
.event-body { padding: 12px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.event-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ----------------------------------------------------------------- chat */

.chat { display: flex; flex-direction: column; gap: 12px; min-height: 50vh; }
/* O viewport rola; a lista so empilha. Separa-los e o que permite o
   espacador no fim, que cede a altura necessaria para a pergunta nova
   chegar ao topo da tela. */
.chat-area { position: relative; flex: 1; min-height: 0; }
/* Altura fixa, e nao max-height: a regiao de rolagem precisa existir mesmo
   com a conversa curta. Com altura variavel ela colapsa no tamanho do
   conteudo, e ai nao ha para onde rolar nem como levar a pergunta ao topo. */
.chat-viewport {
  overflow-y: auto; /* a suavidade e escolhida por chamada em chat-scroll.js */
  height: min(56vh, 460px); min-height: 220px;
}
.chat-viewport:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.chat-log { display: flex; flex-direction: column; gap: 12px; }
.chat-espacador { flex: none; }

.chat-barra { display: flex; justify-content: flex-end; }

/* Aviso de que ha resposta chegando fora de vista. */
.chat-jump {
  position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%);
  padding: 7px 14px; border: 0; border-radius: 999px;
  background: var(--accent); color: #fff; font: 600 13px inherit;
  cursor: pointer; box-shadow: 0 4px 14px rgb(0 0 0 / .28);
}
.chat-jump[hidden] { display: none; }

.chat-composer { display: flex; gap: 8px; align-items: center; }
.chat-composer .input { flex: 1; }

.bubble {
  padding: 10px 14px; border-radius: 16px; max-width: 86%;
  background: var(--surface-alt); white-space: pre-wrap; font-size: 14px;
}
.bubble.user { align-self: flex-end; background: var(--accent); color: #fff; }
.bubble.error { background: color-mix(in srgb, var(--negative) 14%, transparent); }

/* "Pesquisando na web…": existe só enquanto a resposta não começa a chegar. */
.bubble.status {
  background: none; color: var(--text-muted); font-style: italic; padding-left: 0;
}

/* ----------------------------------------------------------- formulário */

.field { display: flex; flex-direction: column; gap: 5px; }
.field-label { font-size: 12px; color: var(--text-muted); }
.field-hint { font-size: 11px; color: var(--text-muted); }

.input {
  width: 100%; padding: 11px 12px; border-radius: var(--radius-control);
  border: 1px solid var(--stroke); background: var(--surface); color: var(--text);
  /* 16px evita o zoom automático do Safari ao focar um campo. */
  font: 400 16px/1.3 inherit;
  appearance: none;
}
.input:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.input.money { font-size: 19px; font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
.textarea { resize: vertical; min-height: 96px; line-height: 1.5; }

.segmented {
  display: flex; background: var(--surface-alt); border-radius: var(--radius-control); padding: 3px; gap: 3px;
}
.seg {
  flex: 1; padding: 8px 6px; border: 0; border-radius: 9px; background: none;
  font: 500 13px inherit; color: var(--text-muted); cursor: pointer;
}
.seg.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }

.toggle {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 8px 0; cursor: pointer;
}
.toggle-label { font-size: 14px; display: block; }
.switch { width: 46px; height: 28px; flex: 0 0 auto; accent-color: var(--accent); }

/* ---------------------------------------------------------------- botões */

.btn {
  padding: 11px 16px; border-radius: var(--radius-control); border: 1px solid var(--stroke);
  background: var(--surface); color: var(--text); font: 500 14px inherit; cursor: pointer;
  min-height: 44px;
}
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.btn.danger { color: var(--negative-text); border-color: color-mix(in srgb, var(--negative) 35%, transparent); }
.btn.dashed { border-style: dashed; color: var(--text-muted); background: none; }
.btn:disabled { opacity: 0.5; cursor: default; }

.icon-btn {
  width: 36px; height: 36px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--surface-alt); color: var(--text); font-size: 16px; display: grid; place-items: center;
}
.icon-btn.accent { background: var(--accent); color: #fff; }

.mini-btn {
  font-size: 11px; padding: 4px 9px; border-radius: 999px;
  border: 1px solid var(--stroke); background: var(--surface); color: var(--text-muted); cursor: pointer;
}
.mini-btn.danger { color: var(--negative-text); }

.link-btn { border: 0; background: none; color: var(--accent); font: 400 15px inherit; cursor: pointer; padding: 4px; }
.link-btn.strong { font-weight: 600; }
.link-btn.danger { color: var(--negative-text); }
.link { color: var(--accent); font-size: 13px; text-decoration: none; }
.back-link { align-self: flex-start; border: 0; background: none; color: var(--accent); font: inherit; cursor: pointer; padding: 4px 0; }

.chip {
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
  padding: 7px 13px; border-radius: 999px; border: 1px solid var(--stroke);
  background: var(--surface); color: var(--text); font: 400 12px inherit; cursor: pointer;
}
.chip.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.chips { padding-bottom: 2px; }

.fab {
  position: fixed; right: 18px; z-index: 15;
  bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 18px);
  width: 56px; height: 56px; border-radius: 50%; border: 0;
  background: var(--accent); color: #fff; font-size: 28px; line-height: 1; cursor: pointer;
  box-shadow: 0 6px 18px rgb(37 99 235 / 35%);
}

/* ----------------------------------------------------------------- vazio */

.empty {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  text-align: center; padding: 40px 24px; color: var(--text-muted);
}
.empty-icon { font-size: 34px; opacity: 0.6; }
.empty h3 { margin: 0; color: var(--text); font-size: 16px; }
.empty p { margin: 0; font-size: 14px; }

/* ----------------------------------------------------------------- folha */

.sheet-backdrop {
  position: fixed; inset: 0; z-index: 40;
  background: rgb(0 0 0 / 40%);
  display: flex; align-items: flex-end; justify-content: center;
}
.sheet-backdrop[hidden] { display: none; }

.sheet {
  width: 100%; max-width: 640px; max-height: 92vh;
  background: var(--bg); border-radius: 18px 18px 0 0;
  display: flex; flex-direction: column;
  animation: rise 0.22s ease-out;
}
@keyframes rise { from { transform: translateY(14px); opacity: 0.7; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .sheet { animation: none; } }

.sheet-head {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding: 12px 14px; border-bottom: 1px solid var(--divider);
}
.sheet-head h2 { margin: 0; font-size: 15px; font-weight: 600; text-align: center; }
.sheet-head .link-btn:first-child { justify-self: start; }
.sheet-head .link-btn:last-child { justify-self: end; }

.sheet-body {
  padding: 16px 16px calc(24px + env(safe-area-inset-bottom));
  overflow-y: auto; -webkit-overflow-scrolling: touch;
}

/* ----------------------------------------------------------------- toast */

.toast {
  position: fixed; left: 50%; transform: translateX(-50%); z-index: 60;
  bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 22px);
  max-width: calc(100% - 32px); padding: 11px 16px; border-radius: 12px;
  background: #111827; color: #fff; font-size: 13px; text-align: center;
  box-shadow: 0 8px 24px rgb(0 0 0 / 25%);
}
.toast[hidden] { display: none; }
.toast.error { background: var(--negative); }

@media (prefers-color-scheme: dark) {
  .toast { background: #E5E7EB; color: #111827; }
}

/* ------------------------------------------------------------------ entrada */
/* A tela de login some junto com as abas e o topo: deixar a navegação
   visível permitiria trocar o hash e chegar numa tela do app antes de
   entrar — sem dado nenhum, mas com aparência de defeito. */
body.deslogado .tabbar,
body.deslogado .topbar-actions { display: none; }
body.deslogado #screen-title { visibility: hidden; }

.auth { max-width: 380px; margin: 0 auto; padding: 24px 0 48px; }
.auth-marca { display: flex; flex-direction: column; align-items: center; gap: 8px; margin-bottom: 24px; }
.auth-marca img { border-radius: 14px; }
.auth-marca h1 { font-size: 24px; margin: 0; }
.auth .card { display: flex; flex-direction: column; gap: 14px; }

.btn.wide { width: 100%; justify-content: center; }

/* Linha de sincronização em Configurações. */
.sync-linha { display: flex; align-items: center; gap: 8px; }
.sync-ponto { width: 8px; height: 8px; border-radius: 50%; background: var(--positive); flex: none; }
.sync-ponto.pendente { background: var(--accent); }
.sync-ponto.offline { background: var(--text-muted); }

/* Aviso destacado dentro de um cartão, para instrução que não pode passar
   despercebida. */
.callout {
  display: flex; flex-direction: column; gap: 8px;
  padding: 12px; border-radius: 10px;
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
}

/* ------------------------------------------------------- gráfico de rosca */
.donut { display: flex; flex-direction: column; gap: 14px; }

/* O centro é HTML sobreposto, não <text> do SVG: assim herda a tipografia do
   app e quebra linha sozinho em nome comprido. */
.donut-area { position: relative; width: 100%; max-width: 230px; margin: 0 auto; }
.donut-svg { display: block; width: 100%; height: auto; overflow: visible; }

.donut-fatia {
  cursor: pointer;
  transition: stroke-width .15s ease, opacity .15s ease;
  /* A fatia é um traço fino: sem isto, só o pixel exato da linha responde
     ao toque, e no celular é quase impossível acertar. */
  stroke-linecap: butt;
}
.donut-fatia:focus { outline: none; }
.donut-fatia:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.donut-centro {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; padding: 0 22%; text-align: center;
  pointer-events: none; /* o clique precisa chegar nas fatias */
}
.donut-centro-rotulo {
  font-size: 11px; color: var(--text-muted);
  line-height: 1.2; overflow-wrap: anywhere;
}
.donut-centro-valor { font-size: 17px; line-height: 1.2; }
.donut-centro.selecionado .donut-centro-rotulo { color: var(--text); font-weight: 600; }

.donut-legenda { display: flex; flex-direction: column; gap: 2px; }
.donut-item {
  display: grid; grid-template-columns: 10px 1fr auto auto;
  align-items: center; gap: 8px;
  padding: 7px 6px; border: 0; border-radius: 8px;
  background: none; color: inherit; font: inherit; text-align: left; cursor: pointer;
}
.donut-item:hover, .donut-item.ativa { background: var(--surface-alt); }
.donut-ponto { width: 10px; height: 10px; border-radius: 50%; }
.donut-nome { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.donut-valor { font-size: 14px; }
.donut-share { min-width: 42px; text-align: right; }

@media (prefers-reduced-motion: reduce) {
  .donut-fatia { transition: none; }
}

/* Botao de apagar a conversa, armado pelo primeiro toque. */
.chat-barra .mini-btn.armado {
  background: color-mix(in srgb, var(--negative) 18%, transparent);
  border-color: color-mix(in srgb, var(--negative) 45%, transparent);
}

/* ---------------------------------------------------- quem está conectado */
/* É um botão porque leva às Configurações, onde se troca de conta. Parece
   uma linha de texto: o destaque da tela é o saldo, não quem está logado. */
.saudacao {
  display: flex; align-items: center; gap: 10px;
  width: 100%; padding: 2px 2px 0; border: 0;
  background: none; color: inherit; font: inherit; text-align: left; cursor: pointer;
}
.saudacao-inicial {
  flex: none; width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--accent); color: #fff; font-weight: 600; font-size: 14px;
}
.saudacao-texto { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.saudacao-texto strong { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
