/* Brain WhatsApp - visual calmo (carrega depois de app.css e o sobrepoe).
   Base neutra + UM acento azul-petroleo; vermelho so em urgente/vencido; sem gradiente, pilulas coloridas nem sombra pesada.
   Contem: tokens (claro/escuro), menu lateral, ajustes gerais e a tela Hoje (lista fina + detalhe).
   O casco novo (barra inferior, secoes, gaveta, paleta) esta em casco.css; os componentes do kit, em kit.css. */

:root {
  --bg: #F5F7F9; --bg2: #F5F7F9; --card: #FFFFFF; --card2: #F1F4F7;
  --surface: #FFFFFF; --side: #F5F7F9; --hover: #F1F4F7; --sel: #EAF3F7;
  --ink: #18212B; --ink2: #46515E; --mute: #5C6876; --line: #E3E8ED; --line2: #D2D9E0;
  --accent: #0A6B87; --accent-on: #FFFFFF; --accent-ink: #0A6B87; --focus: #0A6B87;
  --bad: #C23131; --warn: #9A4406; --good: #15803D;
  --bad-bg: rgba(194, 49, 49, .09); --warn-bg: rgba(180, 83, 9, .10); --good-bg: rgba(21, 128, 61, .10); --info-bg: rgba(10, 107, 135, .10);
  --input-bg: #FFFFFF; --input-line: #8C98A5;
  --bubble-me: #E1F0F5; --bubble-them: #F1F4F7;
  --shadow: 0 1px 2px rgba(15, 25, 35, .06), 0 4px 12px rgba(15, 25, 35, .05);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #10151B; --bg2: #10151B; --card: #161D25; --card2: #1B242E;
    --surface: #10151B; --side: #0C1015; --hover: #171E26; --sel: #13303B;
    --ink: #E7ECF1; --ink2: #B0BAC5; --mute: #8D99A7; --line: #232C36; --line2: #323D49;
    --accent: #5FB4C8; --accent-on: #06222B; --accent-ink: #6FBDD0; --focus: #6FBDD0;
    --bad: #F27573; --warn: #FBBF24; --good: #4ADE80;
    --bad-bg: rgba(242, 117, 115, .14); --warn-bg: rgba(251, 191, 36, .13); --good-bg: rgba(74, 222, 128, .13); --info-bg: rgba(79, 195, 224, .14);
    --input-bg: #0C1015; --input-line: #526070;
    --bubble-me: #14424F; --bubble-them: #1B242E;
    --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 4px 12px rgba(0, 0, 0, .25);
  }
}
:root[data-theme="dark"] {
  --bg: #10151B; --bg2: #10151B; --card: #161D25; --card2: #1B242E;
  --surface: #10151B; --side: #0C1015; --hover: #171E26; --sel: #13303B;
  --ink: #E7ECF1; --ink2: #B0BAC5; --mute: #8D99A7; --line: #232C36; --line2: #323D49;
  --accent: #5FB4C8; --accent-on: #06222B; --accent-ink: #6FBDD0; --focus: #6FBDD0;
  --bad: #F27573; --warn: #FBBF24; --good: #4ADE80;
  --bad-bg: rgba(242, 117, 115, .14); --warn-bg: rgba(251, 191, 36, .13); --good-bg: rgba(74, 222, 128, .13); --info-bg: rgba(79, 195, 224, .14);
  --input-bg: #0C1015; --input-line: #526070;
  --bubble-me: #14424F; --bubble-them: #1B242E;
  --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 4px 12px rgba(0, 0, 0, .25);
}

body { background: var(--bg); background-color: var(--bg); font-variant-numeric: tabular-nums; }
:focus-visible { outline-color: var(--focus); }

/* ---------- ajustes gerais (todas as telas) ---------- */
.btn--primary { background: var(--accent); color: var(--accent-on); border-color: var(--accent); }
.btn--primary:hover:not(:disabled) { filter: brightness(1.08); }
.btn--outline { border-color: var(--line2); }
.btn--ghost { color: var(--ink2); }
.card { border-radius: 12px; box-shadow: none; border: 1px solid var(--line); }
.plan { border-color: var(--line); }
.callout--warn { background: var(--warn-bg); border-color: transparent; }
.callout--bad { background: var(--bad-bg); border-color: transparent; }
.meter::-webkit-progress-value { background: var(--accent); }
.meter::-moz-progress-bar { background: var(--accent); }
.avatar[class*="avatar--"] { background: var(--hover); color: var(--ink2); border: 1px solid var(--line); }
.nav__count--alert { background: var(--bad); color: #fff; }
.switch__track { border-color: var(--line2); }
.switch[aria-checked="true"] .switch__track { background: var(--accent); border-color: var(--accent); }
.switch[aria-checked="true"] .switch__thumb { background: var(--accent-on); }
.count { background: var(--accent); color: var(--accent-on); }
.chip--on { border-color: var(--accent); background: var(--info-bg); }
.pick__btn[aria-pressed="true"] { border-color: var(--accent); }

/* ---------- casca: menu lateral ---------- */
.shell { display: grid; grid-template-columns: 208px minmax(0, 1fr); min-height: 100dvh; background: var(--bg); }
.shell__body { min-width: 0; display: flex; flex-direction: column; }
.shell__body > .main { flex: 1 1 auto; width: 100%; }
.sb {
  position: sticky; top: 0; align-self: start; height: 100dvh; z-index: 40;
  display: flex; flex-direction: column; gap: 14px; padding: 14px 10px 12px;
  background: var(--side); border-right: 1px solid var(--line); overflow-y: auto;
}
.sb__brand { display: flex; align-items: center; gap: 8px; padding: 0 8px; min-height: 30px; text-decoration: none; color: var(--ink); font-weight: 700; font-size: 14px; }
.sb__logo { width: 20px; height: 20px; border-radius: 5px; background: var(--accent); color: var(--accent-on); display: grid; place-items: center; font-size: 12px; font-weight: 700; flex: none; }
.sb__nav { display: flex; flex-direction: column; gap: 1px; }
.sb__link { display: flex; align-items: center; gap: 9px; height: 30px; padding: 0 8px; border-radius: 6px; color: var(--ink2); text-decoration: none; font-weight: 500; font-size: 13px; }
.sb__link .icon { flex: none; }
.sb__link:hover { background: var(--hover); }
.sb__link[aria-current="page"] { background: var(--sel); color: var(--ink); font-weight: 600; }
.sb__link[aria-current="page"] .icon { color: var(--accent); }
.sb__count { margin-left: auto; color: var(--mute); font-size: 12px; font-weight: 500; }
.sb__count--alert { color: var(--bad); font-weight: 700; }
.sb__sep { font-size: 12px; color: var(--mute); padding: 12px 8px 4px; font-weight: 600; }
.sb__foot { margin-top: auto; display: flex; flex-direction: column; gap: 2px; border-top: 1px solid var(--line); padding-top: 10px; font-size: 12px; color: var(--ink2); }
.sb__stat { display: flex; align-items: center; min-height: 22px; padding: 0 8px; }
.sb__stat--warn { color: var(--warn); font-weight: 600; }
.sb__stat--on .sb__stat-text { font-weight: 600; color: var(--ink); }
.sb__btns { display: flex; gap: 6px; margin-top: 6px; }
.sb__btn { flex: 1; height: 28px; padding: 0 10px; background: none; border: 1px solid var(--line2); border-radius: 6px; color: var(--ink2); font-size: 12px; font-weight: 500; }
.sb__btn:hover { background: var(--hover); color: var(--ink); }
.banner { border-radius: 0; }

/* paginas comuns (nao-Hoje) */
.main { padding: 22px 26px 48px; max-width: 1180px; margin: 0; }

/* ---------- Hoje: ocupa a area toda, com rolagem interna ---------- */
.main:has(> .today) { padding: 0; max-width: none; height: 100dvh; overflow: hidden; display: flex; flex-direction: column; }
.shell:has(.today) { height: 100dvh; overflow: hidden; }
.today { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; background: var(--surface); position: relative; }

.today__head { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 20px 0; min-height: 36px; }
.today__ttl { display: flex; align-items: baseline; gap: 14px; min-width: 0; flex: 1; }
.today__h1 { margin: 0; font-size: 20px; line-height: 24px; font-weight: 700; letter-spacing: -.01em; white-space: nowrap; font-family: var(--font); }
.today__h1:focus { outline: none; }
.today__h1:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.today__h1 .wd-s { display: none; }
.today__sub { margin: 0; color: var(--ink2); font-size: 13px; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.today__sub b { color: var(--ink); font-weight: 600; }
.today__dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--bad); vertical-align: 0; }
.today__sub-over { color: var(--bad); font-weight: 600; }
.tlink { background: none; border: 0; padding: 5px 2px; margin: -5px -2px; display: inline-block; color: var(--accent-ink); font-weight: 600; font-size: inherit; line-height: inherit; vertical-align: baseline; text-align: left; min-height: 28px; }
.tlink:hover { text-decoration: underline; }
.today__acts { display: flex; align-items: center; gap: 8px; flex: none; }
.tbtn { height: 28px; padding: 0 11px; border: 1px solid var(--line2); background: var(--surface); border-radius: 6px; font-weight: 600; font-size: 13px; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; color: var(--ink); }
.tbtn:hover { background: var(--hover); }
.tbtn--plan { border-color: transparent; background: none; color: var(--accent-ink); }
.tbtn--plan:hover { background: var(--hover); }

.today__pop { position: absolute; z-index: 50; right: 20px; top: calc(100% + 2px); width: 520px; max-width: calc(100vw - 32px); max-height: 70dvh; overflow-y: auto; background: var(--surface); border: 1px solid var(--line2); border-radius: 8px; padding: 10px 14px 12px; box-shadow: var(--shadow); }
.today__pop h3 { margin: 0 0 6px; font-size: 13px; font-weight: 700; }
.today__pop h3 span { color: var(--mute); font-weight: 500; margin-left: 8px; }
.today__pop .plan__body { margin: 0; gap: 6px; }
.today__pop .plan__steps { font-size: 13px; color: var(--ink2); gap: 6px; padding-left: 1.5em; }
.today__pop .plan__steps li::marker { color: var(--mute); font-weight: 600; }
.today__pop p { margin: 0; }

.today__alerts { padding: 0 20px; }
.today__alerts .callout { margin: 8px 0 0; padding: 8px 12px; border-radius: 8px; font-size: 12px; }
.today__alerts .callout--warn { background: var(--card2); border: 1px solid var(--line); color: var(--ink2); }
.today__off { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.today__off-link { margin-left: auto; min-height: 28px; }
.analyst-notice__link { margin-left: 8px; }

/* faixa unica: abas + filtros */
.today__strip { display: flex; align-items: center; gap: 10px; padding: 0 20px; min-height: 30px; margin-top: 4px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); position: relative; }
.today__tabs { display: flex; gap: 2px; flex-wrap: nowrap; overflow-x: auto; min-width: 0; scrollbar-width: none; }
.today__tabs::-webkit-scrollbar { display: none; }
.ttab { flex: none; white-space: nowrap; height: 29px; padding: 0 9px; border: 0; background: none; color: var(--ink2); font-weight: 500; font-size: 13px; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.ttab i { font-style: normal; color: var(--mute); margin-left: 4px; font-weight: 500; }
.ttab:hover { color: var(--ink); }
.ttab[aria-pressed="true"] { color: var(--ink); font-weight: 600; border-bottom-color: var(--accent); }
.ttab[aria-pressed="true"] i { color: var(--accent-ink); }
.today__fbtn { display: none; }
.today__filters { margin-left: auto; display: flex; gap: 6px; align-items: center; }
.today__sel, .today__search { height: 28px; border: 1px solid var(--line2); background: var(--input-bg); border-radius: 6px; padding: 0 8px; font-size: 13px; color: var(--ink2); min-height: 28px; }
.today__sel { padding-right: 4px; }
.today__search { width: 150px; color: var(--ink); }
.today__search::placeholder { color: var(--mute); }

/* lista + detalhe */
.today__split { display: grid; grid-template-columns: minmax(0, 1fr) 360px; flex: 1 1 auto; min-height: 0; }
.today__listwrap { overflow-y: auto; min-width: 0; border-right: 1px solid var(--line); }
.today__cols, .trow { display: grid; grid-template-columns: 20px 28px 24px 150px minmax(0, 1fr) 96px 104px 12px 40px; column-gap: 8px; align-items: center; padding: 0 12px 0 14px; }
.today__cols { height: 26px; font-size: 12px; color: var(--mute); border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--surface); z-index: 2; font-weight: 500; }
.today__cols .r { text-align: right; }
.trow { height: 38px; border-bottom: 1px solid var(--line); position: relative; cursor: default; }
.trow:hover { background: var(--hover); }
.trow[aria-selected="true"] { background: var(--sel); }
.trow:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; border-radius: 4px; }
.trow__idx { color: var(--mute); font-size: 12px; text-align: right; }
.trow--first .trow__idx { color: var(--accent-ink); font-weight: 700; }
.tstar { width: 28px; height: 28px; min-height: 28px; padding: 0; border: 0; background: none; border-radius: 5px; display: grid; place-items: center; color: var(--mute); }
.tstar:hover { background: var(--line); }
.tstar--on { color: var(--accent-ink); }
.tstar--on svg { fill: currentColor; }
.trow__nm { font-weight: 600; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.trow__ac { color: var(--ink2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.trow__ar { color: var(--mute); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.trow__wt { color: var(--mute); text-align: right; white-space: nowrap; font-size: 12px; overflow: hidden; text-overflow: ellipsis; }
.trow__wt--over { color: var(--bad); font-weight: 600; }
.turg { width: 8px; height: 8px; border-radius: 50%; justify-self: center; }
.turg--on { background: var(--bad); }
.today__empty { padding: 40px 20px; color: var(--ink2); text-align: center; }
.today__empty b { display: block; font-size: 14px; color: var(--ink); margin-bottom: 2px; }
.today__listwrap .empty, .today__listwrap .skeleton-block { margin: 16px; }


/* detalhe: o cartao (com toda a logica de envio) vira um painel simples, sem moldura */
.today__detail { overflow-y: auto; padding: 12px 18px 18px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.today__dh { display: flex; align-items: center; gap: 8px; }
.today__dh-sp { flex: 1; }
.today__back { display: none; }
.today__dbody { display: flex; flex-direction: column; }
.today__d-empty { margin: 40px auto; color: var(--mute); text-align: center; }
.today__detail .tcard { background: transparent; border: 0; border-radius: 0; box-shadow: none; padding: 0; gap: 12px; }
.today__detail .tcard__action { font-size: 15px; font-weight: 600; line-height: 1.35; font-family: var(--font); }
.today__detail .tcard__meta { gap: 4px 10px; font-size: 12px; color: var(--mute); }
.today__detail .tcard__who { color: var(--ink); font-weight: 700; font-size: 13px; }
.today__detail .tcard__step { font-size: 11px; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--mute); }
.today__detail .badge { background: none; border: 0; padding: 0; font-size: 12px; font-weight: 500; color: var(--mute); }
.today__detail .badge--bad { color: var(--bad); font-weight: 700; }
.today__detail .badge--warn { color: var(--warn); font-weight: 600; }
.today__detail .tcard__summary { font-size: 13px; color: var(--ink2); }
.today__detail .tcard__quote { background: none; border-left: 2px solid var(--line2); border-radius: 0; padding: 2px 0 2px 10px; }
.today__detail .tcard__quote-who { font-size: 12px; color: var(--mute); }
.today__detail .tcard__quote-line { font-size: 13px; color: var(--ink2); }
.today__detail .tcard__ask { background: var(--card2); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; gap: 6px; }
.today__detail .tcard__ask .eyebrow { font-size: 12px; font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--mute); }
.today__detail .tcard--provisional .tcard__text { border-style: dashed; }
.today__detail .tcard__text { min-height: 72px; font-size: 13px; }
.today__detail .field__label { font-size: 12px; font-weight: 500; color: var(--mute); }
.today__detail .tcard__actions { gap: 6px; align-items: center; }
.today__detail .tcard__actions .btn { min-height: 28px; font-size: 13px; font-weight: 600; padding: 0 12px; border-radius: 6px; }
.today__detail .tcard .btn--ghost { border: 0; background: none; color: var(--mute); font-weight: 500; padding: 0 4px; text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 3px; }
.today__detail .tcard .btn--ghost:hover:not(:disabled) { background: none; color: var(--ink); text-decoration-color: currentColor; }
.today__detail .tcard__stale { font-size: 13px; }
.tcard--offer { background: var(--card2); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; box-shadow: none; }
.today__alerts .tcard--offer { margin-top: 8px; }

/* ---------- telas estreitas ---------- */
@media (max-width: 1280px) {
  .today__split { grid-template-columns: minmax(0, 1fr) 300px; }
  .today__cols, .trow { grid-template-columns: 20px 28px 24px 116px minmax(0, 1fr) 104px 12px 40px; column-gap: 6px; }
  .trow__ar, .today__cols .c-area { display: none; }
  .today__h1 .wd { display: none; }
  .today__h1 .wd-s { display: inline; }
  .today__head, .today__ttl { gap: 10px; }
}
@media (max-width: 1060px) { .today__cols, .trow { grid-template-columns: 20px 28px 24px 104px minmax(0, 1fr) 104px 12px 40px; } }
@media (max-width: 899px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .shell:has(.today), .main:has(> .today) { height: auto; overflow: visible; }
  .main { padding: 16px 16px 40px; }
  .today__head { flex-wrap: wrap; padding: 4px 16px 6px; row-gap: 2px; min-height: 0; }
  .today__ttl { display: contents; }
  .today__h1 { order: 0; }
  .today__sub { order: 5; flex-basis: 100%; white-space: normal; overflow: visible; line-height: 1.4; }
  .today__acts { margin-left: auto; }
  .tbtn, .today__sel, .today__search { height: 36px; min-height: 36px; }
  .tstar { width: 36px; height: 36px; min-height: 36px; }
  .today__pop { right: 16px; }
  .today__alerts { padding: 0 16px; }
  .today__strip { padding: 0 16px; gap: 4px; flex-wrap: nowrap; }
  .today__tabs { flex: 1; gap: 0; }
  .today__tabs--fade { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); }
  .ttab { height: 36px; padding: 0 5px; }
  .ttab i { margin-left: 2px; }
  .ttab[data-t="todos"] i { display: none; }
  .today__fbtn { display: inline-flex; flex: none; padding: 0 10px; }
  .today__fbtn[data-on="1"] { color: var(--accent-ink); border-color: var(--accent); }
  .today__filters { display: none; position: absolute; z-index: 50; left: 8px; right: 8px; top: calc(100% + 2px); margin: 0; padding: 8px; background: var(--surface); border: 1px solid var(--line2); border-radius: 8px; box-shadow: var(--shadow); }
  .today__filters--open { display: flex; }
  .today__filters .today__sel { width: 100px; flex: none; }
  .today__filters .today__search { flex: 1; width: auto; min-width: 0; }
  .today__split { display: block; }
  .today__listwrap { border-right: 0; overflow: visible; }
  .today__cols { display: none; }
  .trow { height: auto; padding: 6px 8px 6px 10px; grid-template-columns: 36px 28px minmax(0, 1fr) auto 12px 36px; grid-template-areas: "star plus nm wt urg more" "star plus ac ac ac more"; row-gap: 0; column-gap: 8px; }
  .trow__idx, .trow__ar { display: none; }
  .trow > .tstar { grid-area: star; }
  .trow > .tplus { grid-area: plus; width: 28px; height: 36px; }
  .trow__nm { grid-area: nm; }
  .trow__wt { grid-area: wt; }
  .trow > .turg { grid-area: urg; }
  .trow > .tnrcell { grid-area: more; width: 36px; height: 36px; }
  .trow__ac { grid-area: ac; white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .today__detail { display: none; position: fixed; inset: 0; z-index: 65; background: var(--surface); padding: 12px 16px 24px; }
  .today__detail--show { display: flex; }
  .today__back { display: inline-flex; }
}
@media (max-width: 600px) { .today__h1 .wd, .today__h1 .wd-s { display: none; } .today__h1 { font-size: 16px; } }


/* ================= rodada 2: o resto do painel fala a mesma lingua da Hoje ================= */
.page-title { font-size: 20px; font-weight: 700; line-height: 24px; }
h1:focus, h1:focus-visible, h2:focus, h2:focus-visible, .page-title:focus, .page-title:focus-visible, .tcard__action:focus { outline: none; }
.muted { font-size: 12px; }
.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--mute); }
.field__hint, .badge, .chip__n { font-size: 12px; }

/* etiquetas viram texto; so urgente/vencido ganha cor */
.badge { background: none; border: 0; padding: 0; border-radius: 0; font-weight: 500; color: var(--mute); }
.badge--info, .badge--neutral, .badge--warn { background: none; color: var(--mute); }
.badge--bad { background: none; color: var(--bad); font-weight: 700; }
.count { background: none; color: var(--accent-ink); min-width: 0; height: auto; padding: 0; border-radius: 0; font-size: 12px; font-weight: 700; }

/* abas em pilula viram abas sublinhadas */
.chips { gap: 2px; margin-bottom: 12px; border-bottom: 1px solid var(--line); }
.chip { min-height: 32px; padding: 0 10px; border: 0; border-radius: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; background: none; color: var(--ink2); font-size: 13px; font-weight: 500; }
.chip:hover { background: none; color: var(--ink); }
.chip--on { background: none; border-bottom-color: var(--accent); color: var(--ink); font-weight: 600; }
.chip__n { background: none; padding: 0; color: var(--mute); margin-left: 2px; }
.chip--on .chip__n { color: var(--accent-ink); }
.addform .chips, .pick__list { border-bottom: 0; }

/* cartoes e blocos sem raio grande, sem fundo cinza */
.card { border-radius: 8px; }
.kpi { background: none; border-radius: 8px; padding: 10px 12px; }
.callout, .callout--warn { background: var(--card2); border: 1px solid var(--line); border-radius: 8px; color: var(--ink2); }
.callout--bad { background: var(--bad-bg); border: 1px solid transparent; border-radius: 8px; }
.crow--overdue { border-left: 0; padding-left: 0; }
.crow--overdue .crow__desc { color: var(--ink); }
.sendstate--on, .sendstate--off { color: var(--ink2); font-weight: 600; }
.input, .btn { border-radius: 6px; }
.reply .btn, .convo .btn { min-height: 28px; }

/* aviso de toast neutro */
.toast { background: var(--ink); color: var(--bg); border: 0; border-radius: 8px; }
.toast--success, .toast--error { border: 0; }
.toast--error { background: var(--bad); color: #fff; }
.toast .btn--ghost { color: var(--bg); text-decoration: underline; }
.toast__x { color: inherit; }


/* Hoje: aviso de envio desligado em linha fina; filtros iguais entre si */
.today__alerts .callout--warn, .today__alerts .callout { background: none; border: 0; padding: 4px 0 0; margin: 0; border-radius: 0; font-size: 13px; color: var(--ink2); }
.today__off-link, .today__alerts .analyst-notice__link { border: 0; background: none; padding: 0 4px; min-height: 28px; color: var(--accent-ink); text-decoration: underline; font-weight: 600; margin-left: 4px; }
.today__off-link:hover, .today__alerts .analyst-notice__link:hover { background: none; }
.today__sel { appearance: none; -webkit-appearance: none; padding: 0 22px 0 8px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23778392' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 8px center; }
.today__detail .badge--warn { color: var(--ink2); font-weight: 500; }
.today__detail .tcard__ask { background: none; border: 0; border-left: 2px solid var(--line2); border-radius: 0; padding: 2px 0 2px 10px; }
.today__detail .tcard__stale { background: none; border: 0; border-left: 2px solid var(--warn); border-radius: 0; padding: 2px 0 2px 10px; margin: 0; color: var(--ink2); }
.today__detail .tcard__summary, .today__detail .tcard__quote-line, .today__detail .tcard__text, .today__detail .tcard__actions .btn { font-size: 13px; }
.today__detail .tcard__action { font-size: 14px; }
.today__detail .tcard__step, .today__detail .tcard__quote-who, .today__detail .field__label { font-size: 12px; }
@media (max-width: 899px) {
  .today__tabs { padding-right: 4px; }
  .ttab { padding: 0 6px; }
}
.qstat { background: none; border-radius: 8px; }


/* ================= rodada 3 ================= */
/* escala tipografica: 12 / 13 / 14 / 16 / 20 */
.chip__n, .count, .chat-row__meta, .chat-row__drafts, .daysep span, .msg__who, .msg__note, .msg__time, .draft__instr,
.exact__label, .exact__jid, .exact__more, .login__foot, .field__hint, .reply .field__label, .reply .muted, .draft .muted,
.reply .btn--ghost.btn--sm, .btn--sm { font-size: 12px; }
.result__body, .toast, .tcard__summary, .reply .btn, .reply .input { font-size: 13px; }
.msg__body, .queued-text, .state__title { font-size: 14px; }
.convo__title { font-size: 16px; }
.kpi__v, .qstat__n { font-size: 20px; font-weight: 700; }
.eyebrow { text-transform: none; }

/* blocos mais discretos fora da Hoje */
.card { border-radius: 6px; padding: 14px 16px; }
.page { gap: 12px; }
.state { text-align: left; align-items: flex-start; }
.muted + .field, p + .field, .muted + .stack { margin-top: 8px; }

/* menu lateral: uma linha de estado + botoes com borda fina (como na maquete) */
.sb__btn { height: 28px; border-color: var(--line2); }

/* Hoje: cabecalho de uma linha */
.today__alerts { padding: 0 20px; }
.today__alerts .callout, .today__alerts .callout--warn { padding: 2px 0 0; min-height: 0; font-size: 12px; line-height: 20px; color: var(--mute); }
.today__off strong { font-weight: 500; }
.today__off { flex-wrap: nowrap; gap: 4px; }
.today__off-link, .today__alerts .analyst-notice__link { min-height: 20px; font-size: 12px; margin-left: 0; }
.today__dh-name { flex: 1; min-width: 0; font-weight: 700; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.today__detail .tcard__who { display: none; }
.today__acts { gap: 4px; }
@media (max-width: 899px) {
  .today__fbtn { display: inline-flex; flex: none; padding: 0 10px; }
  .today__strip { padding: 0 16px; }
  .today__tabs { flex: 1; padding-right: 0; }
  .today__alerts { padding: 0 16px; }
  .today__alerts .callout, .today__alerts .callout--warn { line-height: 18px; }
  .today__off { flex-wrap: wrap; }
}
.sb__stat-on { font-weight: 600; color: var(--ink); }
.sb__stat { display: block; min-height: 22px; padding: 2px 8px; line-height: 18px; }
.today__alerts .callout { font-size: 12px; }

/* ================= rodada 4: margens iguais entre telas, estado vazio empilhado, vaos menores ================= */
.page { margin: 0; }
.state { flex-direction: column; gap: 4px; }
.cgroup .eyebrow { margin: 0 0 4px; }
.crow { padding: 8px 0; }
.today__off-link, .today__alerts .analyst-notice__link { padding: 7px 4px; margin: -7px 0; display: inline-block; }
.state__text { margin: 4px 0 0; max-width: 60ch; }


/* "+" abre a conversa direto da lista do Hoje */
.tplus { width: 24px; height: 28px; display: grid; place-items: center; border-radius: 5px; color: var(--accent-ink); font-size: 16px; font-weight: 600; text-decoration: none; line-height: 1; }
.tplus:hover { background: var(--line); }
.tplus:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }

/* busca dentro da conversa */
.convo__search { display: flex; flex-direction: column; border-bottom: 1px solid var(--line); background: var(--surface); }
.convo__search-row { display: flex; align-items: center; gap: 6px; padding: 8px 16px; }
.convo__search-in { flex: 1; min-width: 0; height: 28px; border: 1px solid var(--line2); background: var(--input-bg); border-radius: 6px; padding: 0 9px; font-size: 13px; color: var(--ink); }
.convo__search-n { font-size: 12px; color: var(--mute); white-space: nowrap; min-width: 4.5em; text-align: right; }
.convo__search-btn { width: 28px; height: 28px; min-height: 28px; padding: 0; border: 1px solid var(--line2); background: none; border-radius: 6px; color: var(--ink2); font-size: 14px; line-height: 1; display: inline-grid; place-items: center; }
.convo__search-btn:hover:not(:disabled) { background: var(--hover); color: var(--ink); }
.convo__hits { list-style: none; margin: 0; padding: 0; max-height: 220px; overflow-y: auto; border-top: 1px solid var(--line); }
.convo__hit { display: grid; grid-template-columns: 86px minmax(0, 1fr); gap: 10px; width: 100%; text-align: left; padding: 6px 16px; border: 0; border-bottom: 1px solid var(--line); background: none; font-size: 13px; color: var(--ink2); }
.convo__hit:hover, .convo__hit[aria-current="true"] { background: var(--hover); }
.convo__hit time { color: var(--mute); font-size: 12px; white-space: nowrap; }
.convo__hit span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.convo__hit mark { background: var(--info-bg); color: var(--ink); border-radius: 2px; padding: 0 1px; }
.msg--hit { outline: 2px solid var(--accent); outline-offset: 2px; transition: outline-color .4s; }


/* NR: coluna de caixinhas + barra de confirmacao em lote */
.tnrcell { width: 28px; height: 28px; display: grid; place-items: center; justify-self: center; }
.tnr { width: 16px; height: 16px; margin: 0; accent-color: var(--accent); cursor: pointer; }
.today__nr-h { display: flex; align-items: center; justify-content: flex-end; gap: 6px; cursor: pointer; font-weight: 500; }
.trow:has(.tnr:checked) { background: var(--sel); }
.today__bulk { display: flex; align-items: center; gap: 8px; padding: 0 20px; min-height: 38px; background: var(--sel); border-bottom: 1px solid var(--line); font-size: 13px; }
.today__bulk-n { font-weight: 600; color: var(--ink); }
.today__bulk-hint { color: var(--mute); font-size: 12px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tbtn--primary { background: var(--accent); border-color: var(--accent); color: var(--accent-on); }
.tbtn--primary:hover { background: var(--accent); filter: brightness(1.08); }
@media (max-width: 899px) { .today__bulk { padding: 6px 16px; flex-wrap: wrap; } .today__bulk-hint { display: none; } .today__nr-h { display: none; } }

/* citacao (resposta a outra mensagem) */
.msg__quote { border-left: 2px solid var(--line2); padding-left: 6px; margin-bottom: 3px; font-size: 12px; color: var(--mute); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }

/* Hoje no celular: UMA acao por linha (a linha inteira e o alvo de 44 px); estrela, "+" e NR ficam no detalhe
   (favoritar, "Abrir conversa" e "Nao precisa responder"). Cabecalho compacto, filtros como chip sem borda. */
@media (max-width: 899px) {
  .trow { min-height: 44px; padding: 6px 12px; grid-template-columns: minmax(0, 1fr) auto 12px; grid-template-areas: "nm wt urg" "ac ac ac"; column-gap: 8px; align-content: center; }
  .trow > .tstar, .trow > .tplus, .trow > .tnrcell { display: none; grid-area: auto; }
  .trow__nm { font-size: 14px; }
  .trow__ac { -webkit-line-clamp: 1; line-clamp: 1; font-size: 13px; }
  .today__h1 { font-size: 15px; line-height: 20px; }
  .today__h1 .wd { display: none; }
  .today__h1 .wd-s { display: inline; }
  .today__sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 18px; font-size: 12px; }
  .today__fbtn { border: 0; background: none; box-shadow: none; padding: 0 8px; color: var(--ink2); font-weight: 500; min-height: 36px; }
  .today__fbtn[data-on="1"] { color: var(--accent-ink); border: 0; font-weight: 600; }
  .today__tabs--fade { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 44px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 44px), transparent); }
}
