/* ===== Tokens ===== */
:root {
  --bg: #f4f5f7;
  --panel: #ffffff;
  --panel-2: #f9fafb;
  --line: #e4e7ec;
  --line-strong: #d0d5dd;
  --text: #101828;
  --muted: #667085;
  --subtle: #98a2b3;

  --brand: #e6124c;            /* rosa do logotipo */
  --brand-strong: #c40d3f;
  --brand-soft: #fdeaf0;

  --wa: #00a884;               /* verde do WhatsApp: só em envio e bolhas */
  --wa-strong: #008069;
  --ai: #6d4ae0;
  --ai-soft: #f1ecff;
  --warn: #b25e09;
  --warn-soft: #fff1dc;
  --ok: #067647;
  --ok-soft: #dcf6e8;
  --info: #175cd3;
  --focus: #2e6bf0;

  --chat-bg: #efeae2;
  --chat-dots: rgba(11, 20, 26, .045);
  --bubble-in: #ffffff;
  --bubble-out: #d9fdd3;
  --bar: #f0f2f5;
  --input: #ffffff;
  --pill: #ffffff;
  --note: #fff5c4;
  --note-text: #54656f;

  --rail: #151823;
  --rail-text: #9aa3b5;

  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .06);
  --shadow-md: 0 8px 24px rgba(16, 24, 40, .12);
  --bubble-shadow: 0 1px .5px rgba(11, 20, 26, .13);
  --radius: 12px;
  --font: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b141a; --panel: #111b21; --panel-2: #16232b; --line: #222d34; --line-strong: #2f3d46;
    --text: #e9edef; --muted: #8696a0; --subtle: #667781;
    --brand: #ff3d72; --brand-strong: #ff6b92; --brand-soft: #3a1a26;
    --ai: #a58bff; --ai-soft: #251d45; --warn: #f0a23b; --warn-soft: #3a2a12; --ok: #4ad08a; --ok-soft: #12301f;
    --info: #7ab1ff; --focus: #7ab1ff;
    --chat-bg: #0b141a; --chat-dots: rgba(255, 255, 255, .035);
    --bubble-in: #202c33; --bubble-out: #005c4b; --bar: #202c33; --input: #2a3942; --pill: #182229;
    --note: #182229; --note-text: #8696a0;
    --rail: #0a1014;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4); --shadow-md: 0 8px 24px rgba(0, 0, 0, .5);
    --bubble-shadow: 0 1px .5px rgba(0, 0, 0, .3);
    color-scheme: dark;
  }
}

/* ===== Base ===== */
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { font: 14px/1.5 var(--font); background: var(--bg); color: var(--text); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
[hidden] { display: none !important; }
h1, h2, h3, p { margin: 0; }
h1, h2 { text-wrap: balance; }
svg { width: 20px; height: 20px; flex: none; }
button, input, textarea { font: inherit; color: inherit; }
button { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
a { color: var(--info); }
code { background: var(--bg); padding: 1px 6px; border-radius: 6px; font-size: .9em; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 12px; top: -48px; z-index: 100; background: var(--text); color: var(--panel); padding: 8px 14px; border-radius: 8px; }
.skip-link:focus { top: 12px; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.tabular, time, .count, .badge, .unread-badge { font-variant-numeric: tabular-nums; }

/* ===== Botões e campos ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 36px; padding: 0 14px; border-radius: 9px;
  border: 1px solid var(--line-strong); background: var(--panel); color: var(--text); font-weight: 500; cursor: pointer; text-decoration: none; white-space: nowrap;
  box-shadow: var(--shadow-sm); transition: background-color .15s, border-color .15s, box-shadow .15s;
}
.btn:hover { background: var(--panel-2); border-color: var(--subtle); }
.btn:active { transform: translateY(.5px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: 0 1px 2px rgba(230, 18, 76, .35); }
.btn.primary:hover { background: var(--brand-strong); border-color: var(--brand-strong); }
.btn.ghost { border-color: transparent; background: transparent; box-shadow: none; color: var(--muted); }
.btn.ghost:hover { background: var(--bg); color: var(--text); }
.btn.lg { height: 44px; font-size: 15px; }
.btn svg { width: 16px; height: 16px; }
.icon-btn { display: inline-grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: 9px; background: none; color: var(--muted); cursor: pointer; transition: background-color .15s; }
.icon-btn:hover { background: var(--bg); color: var(--text); }

input[type="email"], input[type="password"], input[type="search"], input[type="text"], textarea {
  border: 1px solid var(--line-strong); border-radius: 9px; background: var(--panel); padding: 9px 12px;
}
input::placeholder, textarea::placeholder { color: var(--subtle); }
.form-error { color: #d92d20; font-size: 13px; }

/* ===== Login ===== */
.login { min-height: 100%; display: grid; place-items: center; padding: 24px 16px; background: radial-gradient(900px 500px at 50% -10%, var(--brand-soft), transparent 70%), var(--bg); }
.login-card { width: min(400px, 100%); background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 32px; display: grid; gap: 18px; box-shadow: var(--shadow-md); }
.login-card h1 { font-size: 22px; line-height: 1.25; margin-bottom: 4px; }
.login-card label { display: grid; gap: 6px; font-weight: 600; font-size: 13px; }
.login-card input { height: 42px; font-weight: 400; font-size: 14px; }
.login-logo { border-radius: 12px; }

/* ===== Estrutura ===== */
.app { height: 100%; display: flex; position: relative; }
.rail { width: 76px; flex: none; background: var(--rail); color: var(--rail-text); display: flex; flex-direction: column; justify-content: space-between; align-items: center; padding: 14px 0 12px; }
.rail-top, .rail-bottom { display: grid; gap: 4px; justify-items: center; }
.rail-logo { margin-bottom: 14px; border-radius: 9px; }
.rail-btn { position: relative; width: 60px; padding: 8px 0 6px; border: 0; border-radius: 12px; background: none; color: inherit; cursor: pointer; display: grid; justify-items: center; gap: 3px; font-size: 10.5px; font-weight: 500; transition: background-color .15s, color .15s; }
.rail-btn:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.rail-btn.active { background: rgba(255, 255, 255, .12); color: #fff; }
.rail-btn:focus-visible { outline-color: #fff; }
.me { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--brand); color: #fff; font-weight: 700; font-size: 13px; margin-bottom: 6px; }
.badge { position: absolute; top: 2px; right: 6px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--brand); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; box-shadow: 0 0 0 2px var(--rail); }
.banner { position: absolute; top: 0; left: 76px; right: 0; z-index: 5; background: var(--warn-soft); color: var(--warn); padding: 8px 16px; font-weight: 600; border-bottom: 1px solid var(--line); }
.banner:not([hidden]) ~ .view { padding-top: 38px; }
.view { flex: 1; min-width: 0; height: 100%; }
.chats { display: grid; grid-template-columns: 400px minmax(0, 1fr); background: var(--panel); }

/* ===== Lista de conversas ===== */
.list { display: flex; flex-direction: column; min-height: 0; border-right: 1px solid var(--line); background: var(--panel); }
.list-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px 10px; }
.list-head h1 { font-size: 20px; font-weight: 700; letter-spacing: -.01em; }

.ai-switch { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; font-size: 12.5px; font-weight: 600; user-select: none; color: var(--muted); }
.ai-switch.on { color: var(--ok); }
.ai-switch input, .switch input { position: absolute; opacity: 0; pointer-events: none; }
.track { width: 40px; height: 24px; border-radius: 12px; background: var(--line-strong); position: relative; transition: background-color .15s; flex: none; }
.thumb { position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); }
input:checked ~ .track { background: var(--ok); }
input:checked ~ .track .thumb { transform: translateX(16px); }
input:focus-visible ~ .track { outline: 2px solid var(--focus); outline-offset: 2px; }
.ai-off-note { margin: 0 18px 8px; padding: 8px 12px; border-radius: 9px; background: var(--warn-soft); color: var(--warn); font-size: 12.5px; }

.search { position: relative; margin: 4px 18px 10px; }
.search svg { position: absolute; left: 11px; top: 50%; translate: 0 -50%; width: 17px; height: 17px; color: var(--subtle); pointer-events: none; }
.search input { width: 100%; height: 38px; padding-left: 36px; background: var(--bg); border-color: transparent; }
.search input:focus { background: var(--panel); border-color: var(--line-strong); }

.tabs { display: flex; gap: 6px; padding: 0 18px 12px; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--line); }
.tabs::-webkit-scrollbar { display: none; }
.tab { display: inline-flex; align-items: center; gap: 6px; flex: none; height: 30px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); color: var(--muted); font-size: 12.5px; font-weight: 600; cursor: pointer; transition: background-color .15s, color .15s, border-color .15s; }
.tab:hover { color: var(--text); border-color: var(--line-strong); }
.tab.active { background: var(--text); border-color: var(--text); color: var(--panel); }
.count { font-size: 11.5px; opacity: .8; }
.count.warn:not([data-zero]) { background: var(--warn); color: #fff; opacity: 1; border-radius: 999px; padding: 0 6px; font-weight: 700; }

.conv-list { list-style: none; margin: 0; padding: 0; overflow-y: auto; flex: 1; overscroll-behavior: contain; }
.conv { position: relative; display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 12px; padding: 12px 18px; cursor: pointer; align-items: center; transition: background-color .12s; }
.conv::after { content: ""; position: absolute; left: 78px; right: 0; bottom: 0; border-bottom: 1px solid var(--line); }
.conv:hover { background: var(--panel-2); }
.conv.active { background: var(--brand-soft); }
.conv.active::before { content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--brand); }
.conv-main { min-width: 0; }
.conv-name { font-size: 15px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conv-prev { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conv.unread .conv-prev { color: var(--text); font-weight: 500; }
.conv.asking .conv-prev { color: var(--ai); font-weight: 600; }
.conv-meta { display: grid; justify-items: end; gap: 5px; align-self: start; padding-top: 2px; font-size: 11.5px; color: var(--subtle); }
.conv.unread .when { color: var(--brand); font-weight: 600; }
.unread-badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--brand); color: #fff; font-size: 11.5px; font-weight: 700; display: grid; place-items: center; }

.empty { display: grid; justify-items: center; gap: 6px; text-align: center; padding: 48px 24px; color: var(--muted); }
.empty-logo { opacity: .85; margin-bottom: 6px; }
.empty strong { color: var(--text); }

.avatar { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; font-weight: 600; font-size: 17px; color: #fff; position: relative; flex: none; letter-spacing: .02em; }
.avatar .ch { position: absolute; right: -1px; bottom: -1px; width: 15px; height: 15px; border-radius: 50%; border: 2px solid var(--panel); font-size: 0; }
.ch.whatsapp { background: #25d366; }
.ch.site { background: #2e90fa; }

.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 3px 10px 3px 8px; border-radius: 999px; white-space: nowrap; }
.chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.chip.sm { font-size: 11px; padding: 1px 8px 1px 6px; margin-top: 3px; }
.chip.ia { background: var(--ai-soft); color: var(--ai); }
.chip.aguardando { background: var(--warn-soft); color: var(--warn); }
.chip.humano { background: var(--ok-soft); color: var(--ok); }
.chip.encerrada { background: var(--bg); color: var(--muted); }

/* ===== Conversa (estilo WhatsApp) ===== */
.thread { display: flex; background: var(--chat-bg); min-width: 0; min-height: 0; }
.thread-empty { margin: auto; text-align: center; display: grid; gap: 6px; justify-items: center; padding: 24px; }
.thread-empty img { margin-bottom: 8px; opacity: .9; }
.thread-empty h2 { font-size: 20px; }
.thread-inner { display: flex; flex-direction: column; width: 100%; min-height: 0; }
.thread-head { display: flex; align-items: center; gap: 12px; padding: 10px 18px; background: var(--panel); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.thread-head .avatar { width: 42px; height: 42px; font-size: 15px; }
.th-title { display: grid; min-width: 0; }
.th-title h2 { font-size: 16px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.th-title span { font-size: 12.5px; }
.th-actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }

.messages {
  flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 16px 7% 12px; display: flex; flex-direction: column; gap: 2px;
  background-color: var(--chat-bg);
  background-image: radial-gradient(var(--chat-dots) 1.2px, transparent 1.4px), radial-gradient(var(--chat-dots) 1.2px, transparent 1.4px);
  background-size: 26px 26px; background-position: 0 0, 13px 13px;
}
.msg { position: relative; align-self: flex-start; max-width: min(66%, 560px); padding: 6px 9px 6px 10px; border-radius: 8px; background: var(--bubble-in); box-shadow: var(--bubble-shadow); white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14.3px; line-height: 1.4; }
.msg.out { align-self: flex-end; background: var(--bubble-out); }
.msg.first { margin-top: 9px; }
.msg.first::before { content: ""; position: absolute; top: 0; width: 8px; height: 13px; background: inherit; }
.msg:not(.out).first { border-top-left-radius: 0; }
.msg:not(.out).first::before { left: -8px; clip-path: polygon(100% 0, 0 0, 100% 100%); }
.msg.out.first { border-top-right-radius: 0; }
.msg.out.first::before { right: -8px; clip-path: polygon(0 0, 100% 0, 0 100%); }
.msg .who { display: flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 600; margin-bottom: 1px; color: var(--wa-strong); }
.msg.ai .who { color: var(--brand-strong); }
.msg .who img { border-radius: 3px; }
.msg time { float: right; margin: 7px 0 -3px 12px; font-size: 11px; color: var(--muted); }
.msg a { color: var(--info); }
.msg .mono { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 13px; }
.day, .sys { align-self: center; margin: 8px 0; font-size: 12px; text-align: center; border-radius: 8px; padding: 5px 12px; box-shadow: var(--bubble-shadow); }
.day { background: var(--pill); color: var(--note-text); text-transform: uppercase; letter-spacing: .02em; }
.sys { background: var(--note); color: var(--note-text); max-width: 80%; }

/* cartões internos: dúvida da IA e orientação do atendente */
.ask-card, .note-card { align-self: center; width: min(560px, 92%); margin: 10px 0; border-radius: 14px; padding: 14px 16px; box-shadow: var(--shadow-sm); }
.ask-card { background: var(--panel); border: 1.5px solid var(--ai); display: grid; gap: 10px; }
.ask-card.done { border-color: var(--line-strong); opacity: .92; }
.ask-card h3 { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: var(--ai); }
.ask-card.done h3 { color: var(--muted); }
.ask-card h3 svg { width: 17px; height: 17px; }
.ask-card .q { font-size: 14.5px; white-space: pre-wrap; overflow-wrap: anywhere; }
.ask-card textarea { width: 100%; min-height: 64px; resize: vertical; }
.ask-card .row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.note-card { background: var(--panel); border: 1px dashed var(--line-strong); display: grid; gap: 4px; font-size: 13.5px; }
.note-card strong { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.note-card p { white-space: pre-wrap; overflow-wrap: anywhere; }

.typing { display: flex; align-items: center; gap: 7px; padding: 4px 7%; color: var(--muted); font-size: 12.5px; background: var(--chat-bg); }
.typing img { border-radius: 3px; }

.composer { background: var(--bar); padding: 10px 18px 12px; padding-bottom: max(12px, env(safe-area-inset-bottom)); border-top: 1px solid var(--line); }
.hint { margin-bottom: 8px; padding: 7px 12px; border-radius: 9px; background: var(--ai-soft); color: var(--ai); font-size: 12.5px; }
.composer-row { display: flex; gap: 10px; align-items: flex-end; }
.composer textarea { flex: 1; resize: none; border: 0; border-radius: 10px; background: var(--input); line-height: 1.4; max-height: 130px; min-height: 42px; overflow-y: hidden; }
.composer textarea.scroll { overflow-y: auto; }
.composer textarea:focus-visible { outline-offset: 0; }
.composer-btns { display: flex; gap: 8px; align-items: center; }
.send-btn { width: 42px; height: 42px; border-radius: 50%; border: 0; background: var(--wa); color: #fff; display: grid; place-items: center; cursor: pointer; transition: background-color .15s; }
.send-btn:hover { background: var(--wa-strong); }
.send-btn:disabled { opacity: .55; cursor: not-allowed; }

/* ===== Modal de detalhes ===== */
.modal { border: 0; padding: 0; border-radius: 18px; background: var(--panel); color: var(--text); box-shadow: var(--shadow-md); width: min(440px, calc(100vw - 32px)); max-height: calc(100dvh - 48px); overscroll-behavior: contain; }
.modal::backdrop { background: rgba(16, 24, 40, .5); backdrop-filter: blur(2px); }
.modal-card { display: grid; gap: 4px; margin: 0; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px 6px; }
.modal-head h2 { font-size: 18px; }
.details { margin: 0; padding: 6px 20px 8px; display: grid; }
.details > div { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.details > div:last-child { border-bottom: 0; }
.details dt { color: var(--muted); font-size: 13px; }
.details dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.modal-foot { display: flex; justify-content: flex-end; padding: 8px 20px 18px; }

/* ===== Páginas (memória e configurações) ===== */
.page { overflow-y: auto; background: var(--bg); }
.page-inner { max-width: 820px; margin: 0 auto; padding: 32px 24px 48px; display: grid; gap: 16px; }
.page-inner.wide { max-width: 980px; }
.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.page-head h1 { font-size: 24px; font-weight: 700; letter-spacing: -.01em; margin-bottom: 4px; }
.page-head p { max-width: 62ch; }
.page-actions { display: flex; align-items: center; gap: 12px; }
.page-tabs { padding: 0; border-bottom: 0; }
.page-tabs .tab { height: 34px; }
.mem-panel { display: grid; gap: 12px; }
.panel-bar { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.panel-bar > p { max-width: 62ch; }
.learn-form { gap: 8px; }
.learn-form label { font-weight: 600; font-size: 13px; }
.learn-form input, .learn-form textarea { width: 100%; }
.learn-form .row, .learn-item .row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.learn-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.learn-item { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; display: grid; gap: 8px; box-shadow: var(--shadow-sm); }
.learn-item .lq { font-weight: 600; overflow-wrap: anywhere; }
.learn-item .la { white-space: pre-wrap; overflow-wrap: anywhere; }
.learn-item .meta { font-size: 12px; color: var(--subtle); }
.learn-item input, .learn-item textarea { width: 100%; }
.ask-card .learn-opt { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; color: var(--muted); cursor: pointer; }
.ask-card .learn-opt input { margin-top: 3px; accent-color: var(--brand); }
#memory-text { width: 100%; height: min(64vh, 680px); padding: 16px 18px; border-radius: var(--radius); font: 13px/1.6 ui-monospace, "Cascadia Mono", Consolas, monospace; resize: vertical; box-shadow: var(--shadow-sm); }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; display: grid; gap: 10px; box-shadow: var(--shadow-sm); }
.card p { margin: 0; }
.switch-row { display: flex; gap: 16px; align-items: center; justify-content: space-between; cursor: pointer; }
.switch { position: relative; display: inline-flex; flex: none; }
.integ { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.integ:first-of-type { border-top: 0; }
.integ.block { display: grid; gap: 6px; }
.integ-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.integ-actions { display: inline-flex; align-items: center; gap: 10px; }
.integ code { overflow-wrap: anywhere; }
.pill { font-size: 12px; font-weight: 600; padding: 2px 10px; border-radius: 999px; }
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.off { background: var(--bg); color: var(--muted); }
.pill.bad { background: #fee4e2; color: #b42318; }
.ok { color: var(--ok); } .bad { color: #d92d20; }

/* ===== Avisos ===== */
.toasts { position: fixed; right: 16px; bottom: 16px; z-index: 50; display: grid; gap: 10px; width: min(360px, calc(100vw - 32px)); }
.toast { display: grid; gap: 6px; background: var(--text); color: var(--panel); border-radius: 12px; padding: 12px 14px; box-shadow: var(--shadow-md); animation: toast-in .2s ease-out; }
.toast strong { font-size: 13px; }
.toast span { font-size: 13px; opacity: .85; overflow-wrap: anywhere; }
.toast button { justify-self: start; border: 0; background: rgba(255, 255, 255, .16); color: inherit; border-radius: 8px; padding: 5px 10px; font-weight: 600; cursor: pointer; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.only-mobile { display: none; }

/* ===== Responsivo ===== */
@media (max-width: 1100px) { .chats { grid-template-columns: 340px minmax(0, 1fr); } }
@media (max-width: 860px) {
  .rail { width: 56px; }
  .rail-btn { width: 48px; font-size: 0; }
  .rail-btn span:not(.badge) { display: none; }
  .rail-logo { width: 30px; height: 30px; }
  .banner { left: 56px; }
  .chats { grid-template-columns: minmax(0, 1fr); }
  .chats .thread { display: none; }
  .chats.show-thread .thread { display: flex; }
  .chats.show-thread .list { display: none; }
  .only-mobile { display: inline-grid; }
  .messages, .typing { padding-left: 12px; padding-right: 12px; }
  .msg { max-width: 86%; }
  .th-actions { margin-left: 0; width: 100%; }
  .details > div { grid-template-columns: 1fr; gap: 2px; }
}

/* ===== Movimento reduzido ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
