/* Central de Atendimento MLopes: visual inspirado nos apps da Apple */
:root {
  --bg: #f2f2f7;
  --surface: #ffffff;
  --surface-2: #f9f9fb;
  --elev: #ffffff;
  --sidebar: rgba(246, 246, 249, 0.82);
  --ink: #1d1d1f;
  --ink-2: #3a3a3c;
  --ink-3: #6e6e73;
  --sep: rgba(60, 60, 67, 0.13);
  --sep-strong: rgba(60, 60, 67, 0.22);
  --fill: rgba(118, 118, 128, 0.14);
  --fill-2: rgba(118, 118, 128, 0.08);
  --accent: #1a6b46;
  --accent-ink: #ffffff;
  --accent-soft: rgba(26, 107, 70, 0.11);
  --accent-text: #145c3b;
  --blue: #0066cc;
  --blue-bg: rgba(0, 113, 227, 0.1);
  --green: #1e7a36; --green-bg: rgba(52, 199, 89, 0.15); --green-dot: #34c759;
  --orange: #a34a00; --orange-bg: rgba(255, 149, 0, 0.16); --orange-dot: #ff9500;
  --red: #c4000f; --red-bg: rgba(255, 59, 48, 0.12); --red-dot: #ff3b30;
  --yellow-bg: #fff6d6; --yellow-ink: #6b5200;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.05), 0 4px 16px rgba(0, 0, 0, 0.04);
  --shadow-pop: 0 18px 50px rgba(0, 0, 0, 0.18), 0 2px 6px rgba(0, 0, 0, 0.08);
  --r: 12px; --r-lg: 18px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", "Inter", system-ui, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #000000; --surface: #1c1c1e; --surface-2: #242426; --elev: #2c2c2e; --sidebar: rgba(28, 28, 30, 0.78);
    --ink: #f5f5f7; --ink-2: #d1d1d6; --ink-3: #98989f; --sep: rgba(84, 84, 88, 0.55); --sep-strong: rgba(120, 120, 128, 0.6);
    --fill: rgba(118, 118, 128, 0.3); --fill-2: rgba(118, 118, 128, 0.18);
    --accent: #30d158; --accent-ink: #002810; --accent-soft: rgba(48, 209, 88, 0.17); --accent-text: #5ee08a;
    --blue: #409cff; --blue-bg: rgba(10, 132, 255, 0.18);
    --green: #4fd97a; --green-bg: rgba(48, 209, 88, 0.18); --orange: #ffb340; --orange-bg: rgba(255, 159, 10, 0.2);
    --red: #ff6961; --red-bg: rgba(255, 69, 58, 0.2); --yellow-bg: #3a3214; --yellow-ink: #ffd95c;
    --shadow: 0 0 0 1px rgba(255, 255, 255, 0.06); --shadow-pop: 0 24px 60px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.1);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #000000; --surface: #1c1c1e; --surface-2: #242426; --elev: #2c2c2e; --sidebar: rgba(28, 28, 30, 0.78);
  --ink: #f5f5f7; --ink-2: #d1d1d6; --ink-3: #98989f; --sep: rgba(84, 84, 88, 0.55); --sep-strong: rgba(120, 120, 128, 0.6);
  --fill: rgba(118, 118, 128, 0.3); --fill-2: rgba(118, 118, 128, 0.18);
  --accent: #30d158; --accent-ink: #002810; --accent-soft: rgba(48, 209, 88, 0.17); --accent-text: #5ee08a;
  --blue: #409cff; --blue-bg: rgba(10, 132, 255, 0.18);
  --green: #4fd97a; --green-bg: rgba(48, 209, 88, 0.18); --orange: #ffb340; --orange-bg: rgba(255, 159, 10, 0.2);
  --red: #ff6961; --red-bg: rgba(255, 69, 58, 0.2); --yellow-bg: #3a3214; --yellow-ink: #ffd95c;
  --shadow: 0 0 0 1px rgba(255, 255, 255, 0.06); --shadow-pop: 0 24px 60px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.1);
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--ink); font: 15px/1.47 var(--font); -webkit-font-smoothing: antialiased; letter-spacing: -0.012em; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--blue) 55%, transparent); outline-offset: 2px; border-radius: 8px; }
svg.i { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
svg.i.s { width: 17px; height: 17px; }
svg.i.xs { width: 14px; height: 14px; }
.mut { color: var(--ink-3); }
.num { font-variant-numeric: tabular-nums; }
.pequeno { font-size: 13px; }

/* ================= estrutura ================= */
.app { display: grid; grid-template-columns: 252px minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); height: 100vh; }
.side { background: var(--sidebar); backdrop-filter: saturate(180%) blur(24px); -webkit-backdrop-filter: saturate(180%) blur(24px);
  border-right: 1px solid var(--sep); display: flex; flex-direction: column; padding: 16px 10px 10px; overflow: auto; }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px 14px; }
.logo { width: 34px; height: 34px; border-radius: 9px; background: linear-gradient(150deg, #2e8b5f, #145236); color: #fff;
  display: grid; place-items: center; font-weight: 700; font-size: 16px; box-shadow: 0 2px 8px rgba(20, 82, 54, 0.35); flex: none; }
.brand b { display: block; font-size: 16px; letter-spacing: -0.02em; line-height: 1.2; }
.brand small { display: block; color: var(--ink-3); font-size: 12px; }
.side h6 { margin: 14px 10px 4px; font-size: 12px; font-weight: 600; color: var(--ink-3); }
.nav { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 8px; color: var(--ink); cursor: pointer;
  font-size: 14.5px; border: 0; background: none; width: 100%; text-align: left; }
.nav:hover { background: var(--fill-2); }
.nav.on { background: var(--accent); color: var(--accent-ink); font-weight: 600; }
.nav .i { color: var(--accent-text); }
.nav.on .i { color: var(--accent-ink); }
.nav .n { margin-left: auto; min-width: 22px; height: 20px; padding: 0 7px; border-radius: 10px; font-size: 12px; font-weight: 600;
  display: grid; place-items: center; font-variant-numeric: tabular-nums; color: var(--ink-3); }
.nav .n.forte { background: var(--red-dot); color: #fff; }
.nav.on .n { color: var(--accent-ink); background: rgba(255, 255, 255, .22); }
.side .rod { margin-top: auto; padding-top: 10px; display: grid; gap: 8px; }
.tema { display: grid; grid-template-columns: repeat(3, 1fr); background: var(--fill-2); border-radius: 9px; padding: 2px; }
.tema button { border: 0; background: none; border-radius: 7px; padding: 5px 0; cursor: pointer; color: var(--ink-2); display: flex; gap: 5px; align-items: center; justify-content: center; font-size: 12px; }
.tema button.on { background: var(--surface); box-shadow: 0 1px 3px rgba(0, 0, 0, .14); color: var(--ink); font-weight: 600; }
.eu { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; background: var(--fill-2); cursor: pointer; border: 0; width: 100%; text-align: left; }
.eu:hover { background: var(--fill); }
.av { width: 34px; height: 34px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center;
  font-size: 13px; font-weight: 600; flex: none; }
.av.g { width: 44px; height: 44px; font-size: 16px; }
.av.cinza { background: linear-gradient(180deg, #a1a1a8, #86868d); color: #fff; }
.eu b { display: block; font-size: 14px; line-height: 1.25; }
.eu small { color: var(--ink-3); font-size: 12px; }

.main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.top { display: flex; align-items: center; gap: 12px; padding: 10px 24px; border-bottom: 1px solid var(--sep); min-height: 56px;
  background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); position: relative; z-index: 5; }
.top .esp { flex: 1; }
.busca { position: relative; width: min(380px, 36vw); }
.busca input { width: 100%; height: 36px; border-radius: 10px; border: 0; background: var(--fill); padding: 0 12px 0 36px; outline: none; font-size: 14.5px; }
.busca input:focus { box-shadow: 0 0 0 3px var(--accent-soft); }
.busca .i { position: absolute; left: 11px; top: 9px; color: var(--ink-3); }
.pop { position: absolute; top: 44px; right: 0; width: 400px; max-width: 90vw; background: var(--elev); border-radius: 14px; box-shadow: var(--shadow-pop); padding: 6px; max-height: 460px; overflow: auto; z-index: 30; }
.pop .lin { padding: 9px 10px; border-radius: 9px; cursor: pointer; display: flex; gap: 10px; align-items: center; color: var(--ink); text-decoration: none; }
.pop .lin:hover { background: var(--fill-2); }
.pop .lin small { display: block; color: var(--ink-3); font-size: 12.5px; }
.pop h6 { margin: 8px 10px 4px; font-size: 12px; color: var(--ink-3); font-weight: 600; }
.icone-btn { width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--fill-2); display: grid; place-items: center; cursor: pointer; position: relative; color: var(--ink-2); flex: none; }
.icone-btn:hover { background: var(--fill); }
.icone-btn .ponto { position: absolute; top: 5px; right: 6px; min-width: 16px; height: 16px; border-radius: 8px; background: var(--red-dot); color: #fff; font-size: 10px; font-weight: 700; display: grid; place-items: center; padding: 0 4px; border: 2px solid var(--bg); }
.selo-modo { font-size: 12.5px; font-weight: 600; padding: 5px 11px; border-radius: 999px; background: var(--orange-bg); color: var(--orange); white-space: nowrap; display: inline-flex; gap: 6px; align-items: center; }
.selo-modo.real { background: var(--green-bg); color: var(--green); }

.vista { flex: 1; overflow: auto; min-height: 0; }
.pagina { padding: 26px 32px 48px; max-width: 1360px; }
.cab { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.cab h1 { margin: 0; font-size: 30px; line-height: 1.15; font-weight: 700; letter-spacing: -0.025em; }
.cab p { margin: 4px 0 0; color: var(--ink-3); font-size: 15px; }
.cab .acoes { margin-left: auto; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* ================= controles ================= */
.btn { height: 34px; padding: 0 15px; border-radius: 9px; border: 0; background: var(--fill); color: var(--ink); cursor: pointer;
  font-size: 14px; font-weight: 500; display: inline-flex; align-items: center; justify-content: center; gap: 7px; white-space: nowrap; text-decoration: none !important; }
.btn:hover { filter: brightness(0.97); }
.btn:active { transform: scale(0.985); }
.btn.pri { background: var(--accent); color: var(--accent-ink); font-weight: 600; }
.btn.azul { background: var(--blue); color: #fff; }
.btn.perigo { background: var(--red-bg); color: var(--red); }
.btn.fant { background: none; color: var(--blue); }
.btn.fant:hover { background: var(--fill-2); }
.btn.mini { height: 28px; padding: 0 11px; font-size: 13px; border-radius: 8px; }
.btn.grande { height: 42px; padding: 0 20px; font-size: 15px; border-radius: 11px; }
.btn:disabled { opacity: .45; cursor: default; transform: none; }
.ferr { display: flex; gap: 6px; flex-wrap: wrap; }
.ferr .btn:not(.pri):not(.perigo) { background: var(--fill-2); }
.ferr .btn:not(.pri):not(.perigo):hover { background: var(--fill); }
.seg { display: inline-flex; background: var(--fill); padding: 2px; border-radius: 9px; gap: 2px; flex-wrap: wrap; }
.seg button { border: 0; background: none; padding: 5px 12px; border-radius: 7px; font-size: 13.5px; font-weight: 500; cursor: pointer; color: var(--ink); display: inline-flex; gap: 6px; align-items: center; }
.seg button.on { background: var(--elev); box-shadow: 0 1px 3px rgba(0, 0, 0, .14), 0 0 0 .5px rgba(0, 0, 0, .04); font-weight: 600; }
.seg .c { font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.abas { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.abas::-webkit-scrollbar { display: none; }
.abas button { border: 0; background: var(--fill-2); color: var(--ink-2); padding: 6px 12px; border-radius: 999px; font-size: 13.5px; font-weight: 500; cursor: pointer; white-space: nowrap; display: inline-flex; gap: 6px; align-items: center; }
.abas button:hover { background: var(--fill); }
.abas button.on { background: var(--ink); color: var(--bg); }
.abas button .c { font-size: 12px; font-weight: 700; opacity: .75; font-variant-numeric: tabular-nums; }
.abas button .c.alerta { color: #fff; background: var(--red-dot); opacity: 1; border-radius: 9px; padding: 0 6px; }
.tabs-pag { display: flex; gap: 22px; border-bottom: 1px solid var(--sep); margin-bottom: 20px; }
.tabs-pag button { border: 0; background: none; padding: 10px 0; font-size: 15px; font-weight: 500; color: var(--ink-3); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs-pag button.on { color: var(--ink); border-bottom-color: var(--accent); font-weight: 600; }
.sel, .campo { height: 36px; border-radius: 9px; border: 1px solid var(--sep-strong); background: var(--surface); padding: 0 11px; font-size: 14.5px; outline: none; min-width: 0; }
textarea.campo { height: auto; padding: 10px 12px; resize: vertical; line-height: 1.45; width: 100%; }
.campo:focus, .sel:focus { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-bg); }
label.f { display: grid; gap: 6px; font-size: 13px; color: var(--ink-2); font-weight: 600; }
label.f .campo, label.f .sel { width: 100%; font-weight: 400; }
label.f .dica { font-weight: 400; color: var(--ink-3); }
.grade-f { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; }
.toggle { position: relative; width: 51px; height: 31px; flex: none; display: inline-block; }
.toggle input { opacity: 0; width: 0; height: 0; position: absolute; }
.toggle span { position: absolute; inset: 0; background: var(--fill); border-radius: 999px; transition: .2s; cursor: pointer; }
.toggle span::after { content: ""; position: absolute; width: 27px; height: 27px; left: 2px; top: 2px; background: #fff; border-radius: 50%;
  box-shadow: 0 3px 8px rgba(0, 0, 0, .15), 0 3px 1px rgba(0, 0, 0, .06); transition: .2s; }
.toggle input:checked + span { background: var(--green-dot); }
.toggle input:checked + span::after { transform: translateX(20px); }
.toggle input:disabled + span { opacity: .5; cursor: default; }
.chk { display: inline-flex; gap: 7px; align-items: center; font-size: 14px; cursor: pointer; padding: 5px 10px; border-radius: 8px; background: var(--fill-2); }
.chk input { accent-color: var(--accent); width: 16px; height: 16px; }

/* ================= cartões e listas ================= */
.card { background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: 18px 20px; min-width: 0; }
.card.plano { box-shadow: none; border: 1px solid var(--sep); }
.card h2 { margin: 0; font-size: 18px; font-weight: 600; letter-spacing: -0.015em; display: flex; align-items: center; gap: 8px; }
.card .sub { color: var(--ink-3); font-size: 13.5px; margin-top: 2px; }
.card .cab-c { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.card .cab-c .dir { margin-left: auto; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.grade { display: grid; gap: 16px; }
.g-kpi { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.g-2-1 { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); }
.g-1-1 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.g-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.kpi { display: flex; flex-direction: column; gap: 2px; padding: 16px 18px; }
.kpi .t { font-size: 13.5px; color: var(--ink-2); font-weight: 600; display: flex; gap: 7px; align-items: center; }
.kpi .t .i { color: var(--accent-text); }
.kpi .v { font-size: 32px; font-weight: 700; letter-spacing: -0.03em; line-height: 1.15; margin-top: 6px; font-variant-numeric: tabular-nums; }
.kpi .v small { font-size: 18px; color: var(--ink-3); font-weight: 600; }
.kpi .d { font-size: 13px; color: var(--ink-3); display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.delta { font-weight: 600; font-size: 12.5px; padding: 1px 7px; border-radius: 999px; }
.delta.sobe { color: var(--green); background: var(--green-bg); }
.delta.desce { color: var(--red); background: var(--red-bg); }
.delta.neutro { color: var(--ink-3); background: var(--fill-2); }
.kpi.alerta { background: color-mix(in srgb, var(--red-bg) 60%, var(--surface)); }
.kpi.alerta .v { color: var(--red); }
.kpi.clicavel { cursor: pointer; transition: transform .12s; }
.kpi.clicavel:hover { transform: translateY(-1px); }

.lista { background: var(--surface); border-radius: var(--r); overflow: hidden; }
.card .lista { border-radius: 0; background: none; margin: 0 -20px; }
.lin { display: flex; align-items: center; gap: 12px; padding: 12px 20px; border-top: 1px solid var(--sep); min-width: 0; }
.lista > .lin:first-child { border-top: 0; }
.lin.clic { cursor: pointer; }
.lin.clic:hover { background: var(--fill-2); }
.lin .meio { flex: 1; min-width: 0; }
.lin .meio b { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lin .meio small { display: block; color: var(--ink-3); font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lin .dir { display: flex; gap: 8px; align-items: center; flex: none; }
.tab { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.tab th { text-align: left; font-size: 12.5px; font-weight: 600; color: var(--ink-3); padding: 8px 12px; border-bottom: 1px solid var(--sep); white-space: nowrap; }
.tab td { padding: 12px; border-bottom: 1px solid var(--sep); vertical-align: middle; }
.tab tr:last-child td { border-bottom: 0; }
.tab tr.clic { cursor: pointer; }
.tab tr.clic:hover td { background: var(--fill-2); }
.tab-wrap { overflow-x: auto; margin: 0 -8px; padding: 0 8px; }
.quem { display: flex; align-items: center; gap: 11px; min-width: 0; max-width: 340px; }
.quem b { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.quem small { display: block; color: var(--ink-3); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ================= selos ================= */
.risco { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.risco::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.risco.verde { color: var(--green); background: var(--green-bg); }
.risco.amarelo { color: var(--orange); background: var(--orange-bg); }
.risco.vermelho { color: var(--red); background: var(--red-bg); }
.selo { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 500; padding: 3px 9px; border-radius: 999px; background: var(--fill-2); color: var(--ink-2); white-space: nowrap; }
.selo.ok { background: var(--green-bg); color: var(--green); }
.selo.aviso { background: var(--orange-bg); color: var(--orange); }
.selo.erro { background: var(--red-bg); color: var(--red); }
.selo.azul { background: var(--blue-bg); color: var(--blue); }
.selo.tag { background: none; border: 1px solid var(--sep-strong); }
.estrelas { color: #ff9f0a; letter-spacing: 1px; }

/* ================= caixa de entrada ================= */
.inbox { display: grid; grid-template-columns: 380px minmax(0, 1fr) 320px; height: 100%; }
.inbox.sem-conv { grid-template-columns: 380px minmax(0, 1fr); }
.inbox.sem-conv .col-info { display: none; }
.col { min-height: 0; display: flex; flex-direction: column; border-right: 1px solid var(--sep); min-width: 0; }
.col:last-child { border-right: 0; }
.col-lista { background: var(--surface); }
.col-lista .topo { padding: 14px 14px 10px; display: grid; gap: 10px; border-bottom: 1px solid var(--sep); }
.col-lista .topo .linha { display: flex; gap: 8px; }
.col-lista .topo .linha .campo, .col-lista .topo .linha .sel { flex: 1; background: var(--fill-2); border: 0; height: 34px; }
.itens { overflow: auto; flex: 1; }
.conv { padding: 12px 16px 12px 18px; border-bottom: 1px solid var(--sep); cursor: pointer; display: grid; gap: 3px; position: relative; }
.conv:hover { background: var(--fill-2); }
.conv.on { background: var(--accent-soft); }
.conv .l1 { display: flex; gap: 8px; align-items: baseline; }
.conv .l1 b { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; }
.conv .l1 time { color: var(--ink-3); font-size: 12.5px; flex: none; }
.conv .quemc { font-size: 13px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conv .prev { color: var(--ink-2); font-size: 13.5px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.conv .l3 { display: flex; gap: 5px; align-items: center; margin-top: 4px; flex-wrap: wrap; }
.conv .barra { position: absolute; left: 0; top: 12px; bottom: 12px; width: 4px; border-radius: 0 4px 4px 0; }
.conv .barra.vermelho { background: var(--red-dot); } .conv .barra.amarelo { background: var(--orange-dot); } .conv .barra.verde { background: var(--green-dot); }
.col-conv { background: var(--bg); }
.conv-top { padding: 12px 20px; border-bottom: 1px solid var(--sep); background: var(--surface); display: grid; gap: 10px; }
.conv-top .l { display: flex; align-items: center; gap: 12px; min-width: 0; }
.conv-top h2 { margin: 0; font-size: 17px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conv-top small { color: var(--ink-3); font-size: 13px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conv-top .ferr { justify-content: flex-start; }
.msgs { flex: 1; overflow: auto; padding: 18px 24px; display: flex; flex-direction: column; gap: 6px; min-height: 0; }
.dia { align-self: center; font-size: 12.5px; color: var(--ink-3); margin: 10px 0 4px; font-weight: 600; }
.bal { max-width: min(580px, 78%); padding: 9px 14px; border-radius: 18px; white-space: pre-wrap; word-wrap: break-word; font-size: 15px; line-height: 1.4; }
.bal .q { font-size: 12px; opacity: .78; margin-bottom: 3px; display: flex; gap: 6px; align-items: center; font-weight: 500; }
.bal.in { align-self: flex-start; background: var(--surface); box-shadow: var(--shadow); border-bottom-left-radius: 5px; }
.bal.bot { align-self: flex-end; background: var(--fill); border-bottom-right-radius: 5px; }
.bal.eq { align-self: flex-end; background: var(--accent); color: var(--accent-ink); border-bottom-right-radius: 5px; }
.bal.eq a { color: inherit; text-decoration: underline; }
.nota { align-self: center; max-width: min(600px, 86%); background: var(--yellow-bg); color: var(--yellow-ink); padding: 9px 14px; border-radius: 12px; font-size: 14px; white-space: pre-wrap; display: grid; gap: 2px; }
.nota .q { font-size: 12px; font-weight: 600; display: flex; gap: 6px; align-items: center; opacity: .85; }
.anexo-card { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 12px; background: rgba(0, 0, 0, .06); margin-top: 6px; color: inherit; text-decoration: none !important; }
.bal.in .anexo-card { background: var(--fill-2); }
.anexo-card .ic { width: 34px; height: 34px; border-radius: 8px; background: var(--red-dot); color: #fff; display: grid; place-items: center; font-size: 11px; font-weight: 700; flex: none; }
.anexo-img { display: block; max-width: 260px; max-height: 260px; border-radius: 12px; margin-top: 6px; }
.rasc { margin: 12px 20px 0; border-radius: 16px; background: var(--surface); box-shadow: var(--shadow); padding: 14px 16px; border-left: 4px solid var(--orange-dot); display: grid; gap: 10px; }
.rasc textarea { background: var(--surface-2); }
.compor { border-top: 1px solid var(--sep); background: var(--surface); padding: 10px 16px 14px; display: grid; gap: 8px; }
.compor .linha { display: flex; gap: 8px; align-items: flex-end; }
.compor textarea { flex: 1; border-radius: 18px; border: 1px solid var(--sep-strong); background: var(--surface); padding: 9px 14px; resize: none; outline: none; min-height: 40px; max-height: 180px; line-height: 1.4; }
.compor textarea:focus { border-color: var(--blue); }
.compor.modo-nota textarea { background: var(--yellow-bg); border-color: transparent; color: var(--yellow-ink); }
.enviar { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; cursor: pointer; flex: none; }
.compor.modo-nota .enviar { background: #c99700; color: #fff; }
.enviar:disabled { opacity: .4; }
.aviso-l { font-size: 12.5px; color: var(--orange); display: flex; gap: 6px; align-items: center; }
.arquivo-sel { display: inline-flex; gap: 8px; align-items: center; background: var(--fill-2); border-radius: 10px; padding: 6px 10px; font-size: 13.5px; }
.col-info { background: var(--surface); overflow: auto; padding: 18px; display: grid; gap: 18px; align-content: start; }
.col-info h3 { margin: 0 0 8px; font-size: 12.5px; color: var(--ink-3); font-weight: 600; }
.dl { display: grid; grid-template-columns: auto 1fr; gap: 7px 12px; font-size: 14px; }
.dl dt { color: var(--ink-3); } .dl dd { margin: 0; text-align: right; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.bloco-info { background: var(--fill-2); border-radius: 12px; padding: 12px; display: grid; gap: 8px; }
.vazio { color: var(--ink-3); text-align: center; padding: 44px 20px; display: grid; gap: 10px; place-items: center; }
.vazio .i { width: 44px; height: 44px; stroke-width: 1.2; opacity: .7; }
.vazio b { color: var(--ink-2); font-size: 16px; }

/* ================= gráficos ================= */
.barras { display: flex; align-items: flex-end; gap: 4px; height: 190px; padding-top: 10px; }
.barras .b { flex: 1; display: flex; flex-direction: column-reverse; gap: 2px; min-width: 3px; height: 100%; position: relative; }
.barras .b span { border-radius: 4px 4px 2px 2px; display: block; }
.barras .b .robo { background: var(--accent); }
.barras .b .eq { background: var(--orange-dot); }
.barras .b:hover::after { content: attr(data-t); position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); background: var(--ink); color: var(--bg);
  font-size: 12px; padding: 5px 9px; border-radius: 7px; white-space: nowrap; margin-bottom: 6px; z-index: 3; }
.eixo { display: flex; justify-content: space-between; font-size: 12px; color: var(--ink-3); margin-top: 6px; }
.legenda { display: flex; gap: 14px; font-size: 13px; color: var(--ink-2); }
.legenda i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.hbar { display: grid; grid-template-columns: 130px 1fr 40px; gap: 10px; align-items: center; font-size: 14px; margin: 9px 0; }
.hbar .tr { height: 10px; background: var(--fill-2); border-radius: 999px; overflow: hidden; }
.hbar .tr span { display: block; height: 100%; background: var(--accent); border-radius: 999px; }

/* ================= folhas, alertas, gaveta ================= */
.veu { position: fixed; inset: 0; background: rgba(0, 0, 0, .32); backdrop-filter: blur(2px); display: grid; place-items: center; z-index: 50; padding: 16px; animation: fade .15s; }
.folha { background: var(--elev); border-radius: 18px; box-shadow: var(--shadow-pop); width: min(640px, 100%); max-height: 90vh; overflow: auto; padding: 22px 24px; display: grid; gap: 16px; animation: sobe .22s cubic-bezier(.2, .9, .3, 1.1); }
.folha.larga { width: min(860px, 100%); }
.folha h2 { margin: 0; font-size: 21px; letter-spacing: -0.02em; }
.folha .topo-f { display: flex; gap: 12px; align-items: center; }
.folha .rodape { display: flex; gap: 10px; justify-content: flex-end; margin-top: 4px; flex-wrap: wrap; }
.alerta-dlg { width: min(300px, 100%); text-align: center; padding: 20px 18px 14px; gap: 8px; }
.alerta-dlg h2 { font-size: 17px; }
.alerta-dlg p { margin: 0; font-size: 13.5px; color: var(--ink-2); }
.alerta-dlg .rodape { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.alerta-dlg .rodape .btn { width: 100%; height: 38px; }
.gaveta-veu { position: fixed; inset: 0; background: rgba(0, 0, 0, .2); z-index: 45; animation: fade .15s; }
.gaveta { position: fixed; top: 0; right: 0; bottom: 0; width: min(560px, 100%); background: var(--elev); box-shadow: var(--shadow-pop); z-index: 46; display: flex; flex-direction: column; animation: entra .22s ease-out; }
.gaveta .g-top { padding: 18px 22px; border-bottom: 1px solid var(--sep); display: flex; gap: 12px; align-items: center; }
.gaveta .g-top h2 { margin: 0; font-size: 19px; flex: 1; min-width: 0; }
.gaveta .g-corpo { flex: 1; overflow: auto; padding: 18px 22px; display: grid; gap: 18px; align-content: start; }
.gaveta .g-rod { padding: 14px 22px; border-top: 1px solid var(--sep); display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
.secao h3 { margin: 0 0 8px; font-size: 13px; color: var(--ink-3); font-weight: 600; }
.copiar { display: flex; gap: 8px; } .copiar .campo { flex: 1; font-family: ui-monospace, Menlo, monospace; font-size: 12px; }
.solta { border: 2px dashed var(--sep-strong); border-radius: 14px; padding: 18px; text-align: center; color: var(--ink-3); cursor: pointer; }
.solta.ativa { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-text); }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px); background: color-mix(in srgb, var(--ink) 94%, transparent);
  color: var(--bg); padding: 11px 18px; border-radius: 14px; font-size: 14px; font-weight: 500; opacity: 0; transition: .25s; pointer-events: none; z-index: 60; max-width: 90vw; }
.toast.on { opacity: 1; transform: translateX(-50%) translateY(0); }
@keyframes fade { from { opacity: 0; } }
@keyframes sobe { from { opacity: 0; transform: translateY(14px) scale(.98); } }
@keyframes entra { from { transform: translateX(40px); opacity: 0; } }

/* carregando */
.esq { animation: fade .25s; display: grid; gap: 14px; padding: 26px 32px; }
.esq i { display: block; height: 18px; border-radius: 8px; background: linear-gradient(90deg, var(--fill-2), var(--fill), var(--fill-2)); background-size: 200% 100%; animation: brilho 1.2s infinite; }
.esq i.t { height: 32px; width: 280px; } .esq i.c { height: 110px; border-radius: 18px; }
@keyframes brilho { from { background-position: 200% 0; } to { background-position: -200% 0; } }

.menu-mob { display: none; }
@media (max-width: 1480px) { .ocultar-l { display: none; } .kpi .v { font-size: 28px; } .kpi { padding: 14px 16px; } }
@media (max-width: 1240px) { .g-kpi { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 1280px) {
  .inbox { grid-template-columns: 330px minmax(0, 1fr); }
  .inbox .col-info { display: none; }
}
@media (max-width: 1000px) { .g-2-1, .g-1-1, .g-3 { grid-template-columns: 1fr; } }
@media (max-width: 820px) {
  .app { grid-template-columns: 1fr; }
  .side { position: fixed; inset: 0 auto 0 0; width: 280px; z-index: 40; transform: translateX(-105%); transition: transform .25s; }
  .side.aberta { transform: none; box-shadow: var(--shadow-pop); }
  .menu-mob { display: grid; }
  .pagina { padding: 18px 16px 40px; }
  .cab h1 { font-size: 26px; }
  .top { padding: 8px 12px; }
  .busca { width: auto; flex: 1; }
  .selo-modo { display: none; }
  .inbox { grid-template-columns: 1fr; }
  .inbox.com-conv .col-lista { display: none; }
  .inbox:not(.com-conv) .col-conv { display: none; }
  .g-kpi { grid-template-columns: 1fr 1fr; }
  .kpi .v { font-size: 28px; }
  .ocultar-m { display: none; }
  .bal { max-width: 88%; }
  .conv-top .ferr .btn span { display: none; }
}

/* ================================================================ MOVIMENTO
   Efeitos de toque, transição entre telas e janelas. Quem pede menos movimento no sistema
   (Ajustes do Mac/Windows) recebe tudo instantâneo, no fim do arquivo. */
:root { --mola: cubic-bezier(.34, 1.45, .64, 1); --suave: cubic-bezier(.2, .8, .2, 1); --rapido: cubic-bezier(.3, 0, .2, 1); }

/* botões: sobem ao passar o mouse, afundam ao clicar */
.btn, .icone-btn, .seg button, .tabs-pag button, .nav, .lin.clic, .kpi.clicavel, .card.clicavel { position: relative; overflow: hidden; -webkit-tap-highlight-color: transparent; }
.btn { transition: transform .18s var(--mola), box-shadow .2s var(--suave), filter .2s, background-color .2s; }
.btn:hover:not(:disabled) { transform: translateY(-1px); filter: none; box-shadow: 0 4px 12px rgba(0, 0, 0, .08); }
.btn.pri:hover:not(:disabled) { box-shadow: 0 6px 18px color-mix(in srgb, var(--accent) 38%, transparent); }
.btn.azul:hover:not(:disabled) { box-shadow: 0 6px 18px color-mix(in srgb, var(--blue) 36%, transparent); }
.btn.perigo:hover:not(:disabled) { box-shadow: 0 6px 18px color-mix(in srgb, var(--red) 22%, transparent); }
.btn:active:not(:disabled) { transform: translateY(0) scale(.95); box-shadow: none; transition-duration: .08s; }
.icone-btn { transition: transform .18s var(--mola), background-color .2s; }
.icone-btn:hover { transform: scale(1.08); }
.icone-btn:active { transform: scale(.9); transition-duration: .08s; }

/* onda que nasce no ponto do clique */
.onda { position: absolute; border-radius: 50%; pointer-events: none; background: currentColor; opacity: .22; transform: scale(0); animation: onda .55s var(--suave) forwards; }
@keyframes onda { to { transform: scale(1); opacity: 0; } }

/* menu lateral */
.nav { transition: background-color .2s, color .2s, transform .2s var(--mola); }
.nav:hover:not(.on) { transform: translateX(3px); }
.nav .i { transition: transform .25s var(--mola); }
.nav:hover .i { transform: scale(1.12); }
.nav.on { animation: acende .35s var(--mola); }
@keyframes acende { from { transform: scale(.94); } }
.nav .n { transition: transform .3s var(--mola); }
.nav .n.pulo { animation: pulo .5s var(--mola); }
@keyframes pulo { 0% { transform: scale(.6); } 60% { transform: scale(1.25); } 100% { transform: scale(1); } }

/* listas, linhas e conversas */
.lin.clic, .conv, .tab tr.clic td { transition: background-color .15s, transform .2s var(--mola); }
.lin.clic:active, .conv:active { transform: scale(.985); background: var(--fill); transition-duration: .06s; }
.conv:hover { transform: translateX(2px); }
.conv.on { box-shadow: inset 3px 0 0 var(--accent); }
.card { transition: box-shadow .25s var(--suave), transform .25s var(--mola); }
.card.clicavel, .kpi.clicavel { cursor: pointer; }
.card.clicavel:hover, .kpi.clicavel:hover { transform: translateY(-3px); box-shadow: 0 14px 34px rgba(0, 0, 0, .10), 0 2px 6px rgba(0, 0, 0, .05); }
.card.clicavel:active, .kpi.clicavel:active { transform: translateY(0) scale(.985); transition-duration: .08s; }

/* abas e seletores */
.seg button { transition: background-color .2s, box-shadow .2s, transform .2s var(--mola); }
.seg button:active { transform: scale(.94); }
.seg button.on { animation: acende .3s var(--mola); }
.tabs-pag button { overflow: visible; transition: color .2s; }
.tabs-pag button.on { border-bottom-color: transparent; }
.tabs-pag button.on::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; border-radius: 2px; background: var(--accent); animation: risco .35s var(--suave); }
@keyframes risco { from { transform: scaleX(0); } }
.toggle span, .toggle span::after { transition: .28s var(--mola); }

/* troca de tela: o conteúdo entra subindo e os blocos aparecem em sequência */
body.transicao .pagina { animation: pagina .28s var(--suave); }
@keyframes pagina { from { transform: translateY(6px); } }
body.transicao .grade > *, body.transicao .lista > .lin, body.transicao #cxItens > .conv {
  animation: degrau .32s var(--suave) backwards; animation-delay: calc(var(--d, 0) * 18ms); }
@keyframes degrau { from { transform: translateY(8px); } }
.msgs > .bal:last-child { animation: degrau .3s var(--suave) both; }

/* janelas: abrem com mola e fecham suavemente */
.veu { animation: fade .2s var(--suave); backdrop-filter: blur(6px) saturate(140%); -webkit-backdrop-filter: blur(6px) saturate(140%); }
.folha { animation: janela .38s var(--mola); }
@keyframes janela { from { opacity: 0; transform: translateY(24px) scale(.96); } }
.veu.saindo { animation: some .18s var(--rapido) forwards; pointer-events: none; }
.veu.saindo .folha { animation: janela-sai .18s var(--rapido) forwards; }
@keyframes some { to { opacity: 0; } }
@keyframes janela-sai { to { opacity: 0; transform: translateY(12px) scale(.97); } }
.gaveta { animation: gaveta .42s var(--mola); }
@keyframes gaveta { from { transform: translateX(105%); } }
.gaveta.saindo { animation: gaveta-sai .22s var(--rapido) forwards; }
.gaveta-veu.saindo { animation: some .22s var(--rapido) forwards; pointer-events: none; }
@keyframes gaveta-sai { to { transform: translateX(105%); } }

/* aviso no rodapé */
.toast { transition: opacity .25s, transform .45s var(--mola); transform: translateX(-50%) translateY(24px) scale(.94); }
.toast.on { transform: translateX(-50%) translateY(0) scale(1); }

/* sino balança quando chega algo novo */
#sino.balanca svg { animation: balanca .7s var(--mola); transform-origin: 50% 10%; }
@keyframes balanca { 0% { transform: rotate(0); } 20% { transform: rotate(16deg); } 40% { transform: rotate(-12deg); } 60% { transform: rotate(8deg); } 80% { transform: rotate(-4deg); } 100% { transform: rotate(0); } }

/* teclado: anel de foco visível */
:focus-visible { outline: 2.5px solid color-mix(in srgb, var(--accent) 70%, transparent); outline-offset: 2px; }
.btn:focus-visible, .nav:focus-visible { outline-offset: 3px; }

/* troca de tema com círculo que se expande a partir do clique */
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0ms !important; transition-duration: .01ms !important; }
  .onda { display: none; }
}


/* ================================================================ ESTILO 2: Attio (visual geral e Início) + Intercom (caixa de entrada)
   Fica no fim do arquivo para sobrepor o estilo anterior sem apagá-lo. Usa só as variáveis de cor, então vale no claro e no escuro. */

/* menu lateral discreto: item ativo em cinza, sem bloco verde */
.side { background: var(--surface-2); backdrop-filter: none; -webkit-backdrop-filter: none; }
.nav { font-size: 14px; padding: 6px 10px; color: var(--ink-2); border-radius: 8px; }
.nav .i { color: var(--ink-3); width: 18px; height: 18px; }
.nav.on { background: var(--fill); color: var(--ink); font-weight: 600; }
.nav.on .i { color: var(--ink); }
.nav.on .n { background: none; color: var(--ink-3); }
.nav.on .n.forte { background: var(--red-dot); color: #fff; }
.side h6 { font-size: 11.5px; letter-spacing: .02em; }
.top { background: color-mix(in srgb, var(--surface) 88%, transparent); }
.vista { background: var(--surface); }

/* cartões planos com linha fina, como no Attio */
.card { box-shadow: none; border: 1px solid var(--sep); border-radius: 14px; }
.kpi.alerta { background: color-mix(in srgb, var(--red-bg) 45%, var(--surface)); border-color: color-mix(in srgb, var(--red) 25%, var(--sep)); }

/* avatares coloridos por pessoa */
.av.c0 { --c: #2f6fde; } .av.c1 { --c: #c2410c; } .av.c2 { --c: #15803d; } .av.c3 { --c: #7c3aed; }
.av.c4 { --c: #be185d; } .av.c5 { --c: #0e7490; } .av.c6 { --c: #a16207; } .av.c7 { --c: #4f46e5; }
.av.c0, .av.c1, .av.c2, .av.c3, .av.c4, .av.c5, .av.c6, .av.c7 { background: color-mix(in srgb, var(--c) 15%, var(--surface)); color: color-mix(in srgb, var(--c) 80%, var(--ink)); font-weight: 700; }
.av.quad { border-radius: 9px; }

/* ---------------- Início (Attio) ---------------- */
.inicio2 { max-width: 1120px; margin: 0 auto; }
.ini-hero { padding: 34px 0 30px; display: grid; justify-items: center; text-align: center; gap: 10px; }
.ini-data { font-size: 13px; color: var(--ink-3); text-transform: capitalize; }
.ini-hero h1 { margin: 0; font-size: 40px; line-height: 1.1; font-weight: 700; letter-spacing: -0.035em; }
.ini-resumo { margin: 0; font-size: 16.5px; color: var(--ink-2); max-width: 640px; }
.ini-resumo b { color: var(--red); font-weight: 600; }
.ini-perg { width: min(640px, 100%); height: 54px; margin-top: 12px; display: flex; align-items: center; gap: 10px; padding: 0 16px; border-radius: 15px;
  border: 1px solid var(--sep-strong); background: var(--surface); color: var(--ink-3);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 10px 30px rgba(0, 0, 0, .06); transition: border-color .2s, box-shadow .25s; }
.ini-perg:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft), 0 10px 30px rgba(0, 0, 0, .06); }
.ini-perg input { flex: 1; border: 0; outline: none; background: transparent; font-size: 16px; color: var(--ink); min-width: 0; }
.ini-perg kbd { font: 600 11.5px var(--font); color: var(--ink-3); border: 1px solid var(--sep-strong); border-radius: 6px; padding: 2px 6px; }
.ini-res { width: min(640px, 100%); text-align: left; border: 1px solid var(--sep); border-radius: 14px; background: var(--surface); padding: 6px; box-shadow: var(--shadow-pop); animation: degrau .2s var(--suave); }
.ini-res .lin { border: 0; padding: 8px 10px; border-radius: 10px; color: var(--ink); text-decoration: none; }
.ini-res .lin:hover { background: var(--fill-2); text-decoration: none; }
.ini-res .av { width: 30px; height: 30px; font-size: 12px; }
.ini-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 8px; }
.ini-chip { height: 34px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--sep); background: var(--surface); color: var(--ink-2);
  font-size: 13.5px; display: inline-flex; align-items: center; gap: 8px; cursor: pointer; transition: transform .2s var(--mola), border-color .2s, box-shadow .2s; }
.ini-chip span { font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.ini-chip.forte span { color: var(--red); }
.ini-chip:hover { border-color: var(--sep-strong); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0, 0, 0, .06); }
.ini-chip:active { transform: scale(.96); }
.ini-titulo { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 6px 0 12px; }
.ini-titulo h2 { margin: 0; font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }

/* ---------------- Caixa de entrada (Intercom) ---------------- */
.inbox { grid-template-columns: 340px minmax(0, 1fr) 360px; }
.inbox.sem-conv { grid-template-columns: 340px minmax(0, 1fr); }
.col-lista { background: var(--surface-2); }
.col-lista .topo { border-bottom: 0; padding: 16px 12px 8px; gap: 10px; }
.cx-cab { display: flex; align-items: center; justify-content: space-between; padding: 0 4px; }
.cx-cab h1 { margin: 0; font-size: 19px; font-weight: 700; letter-spacing: -0.02em; }
.icone-btn.ativo { background: var(--accent-soft); color: var(--accent-text); }
.cx-filtros { display: grid; gap: 8px; animation: degrau .2s var(--suave); }
.cx-filtros .linha { display: flex; gap: 8px; }
.cx-filtros .campo, .cx-filtros .sel { flex: 1; background: var(--surface); border: 1px solid var(--sep); height: 34px; }
.itens { padding: 2px 0 12px; }
.conv { display: flex; gap: 11px; align-items: flex-start; margin: 2px 8px; padding: 11px 12px; border-radius: 12px; border-bottom: 0; }
.conv .barra { display: none; }
.conv:hover { background: var(--fill-2); transform: none; }
.conv.on { background: var(--surface); box-shadow: 0 1px 2px rgba(0, 0, 0, .06), 0 0 0 1px var(--sep); }
.conv .av { width: 34px; height: 34px; font-size: 12.5px; margin-top: 1px; }
.cv-meio { flex: 1; min-width: 0; display: grid; gap: 2px; }
.conv .l1 b { font-size: 14.5px; font-weight: 600; }
.conv.pendente .l1 time::before { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--blue); margin-right: 6px; vertical-align: 1px; }
.conv .prev { display: block; -webkit-line-clamp: unset; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 13.5px; color: var(--ink-3); }
.conv .prev .quemc { color: var(--ink-2); display: inline; font-size: inherit; }
.conv .l3 { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 3px; }
.sinal { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 500; color: var(--ink-3); white-space: nowrap; }
.sinal i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.sinal.erro { color: var(--red); font-weight: 600; }
.sinal.aviso { color: var(--orange); font-weight: 600; }
.sinal.azul { color: var(--blue); }

.col-conv { background: var(--surface); }
.conv-top { padding: 12px 18px; background: var(--surface); }
.conv-top h2 { display: flex; align-items: center; gap: 8px; font-size: 16.5px; }
.conv-top h2 .risco { font-size: 11.5px; padding: 2px 8px; }
.ferr-ic { display: flex; align-items: center; gap: 4px; flex: none; }
.ferr-ic .icone-btn { background: transparent; color: var(--ink-3); }
.ferr-ic .icone-btn:hover { background: var(--fill-2); color: var(--ink); }
.ferr-ic .btn { height: 34px; margin-left: 4px; }
.btn.escuro { background: var(--ink); color: var(--surface); font-weight: 600; }
.msgs { padding: 20px 28px; gap: 8px; }
.bal.in { background: var(--fill-2); box-shadow: none; }
.bal.bot { background: color-mix(in srgb, var(--accent) 9%, var(--surface)); }
.bal.eq { background: color-mix(in srgb, var(--blue) 13%, var(--surface)); color: var(--ink); }
.bal .q { opacity: .7; }
.compor { margin: 0 16px 16px; border: 1px solid var(--sep-strong); border-radius: 16px; padding: 8px 10px 10px; box-shadow: 0 2px 10px rgba(0, 0, 0, .04); }
.compor textarea { border: 0; padding: 8px 6px; background: transparent; }
.compor textarea:focus { border: 0; }
.compor:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-bg); }
.compor.modo-nota { background: var(--yellow-bg); border-color: transparent; }

/* Copiloto */
.col-info { background: var(--surface-2); padding: 14px; gap: 12px; border-left: 1px solid var(--sep); }
.copi-cab { display: flex; align-items: center; gap: 8px; padding: 2px 2px 4px; }
.copi-cab b { font-size: 15.5px; }
.copi-cab .mut { margin-left: auto; }
.copi-ic { width: 26px; height: 26px; border-radius: 8px; background: var(--blue); color: #fff; display: grid; place-items: center; }
.copi-ic .i { width: 15px; height: 15px; }
.copi-bloco { background: var(--surface); border: 1px solid var(--sep); border-radius: 14px; padding: 14px; display: grid; gap: 8px; }
.copi-bloco h3, .copi-bloco summary { margin: 0; font-size: 13px; font-weight: 700; color: var(--ink); }
.copi-bloco summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; }
.copi-bloco summary::-webkit-details-marker { display: none; }
.copi-bloco summary::after { content: '⌄'; color: var(--ink-3); transition: transform .2s; }
.copi-bloco[open] summary::after { transform: rotate(180deg); }
.copi-bloco p { margin: 0; font-size: 14px; line-height: 1.5; color: var(--ink-2); }
.copi-bloco p b { color: var(--ink); }
.copi-bloco.sug textarea { min-height: 130px; border-radius: 12px; border: 1px solid var(--sep-strong); background: var(--surface); resize: vertical; line-height: 1.45; }
.copi-acoes { display: flex; gap: 6px; justify-content: flex-end; align-items: center; }
.copi-sobre { display: grid; gap: 16px; margin-top: 10px; }
.copi-sobre h3 { font-size: 12px; color: var(--ink-3); font-weight: 600; margin: 0 0 6px; }
.copi-perg { display: grid; gap: 4px; margin-top: 2px; }
.copi-perg input { height: 40px; border-radius: 12px; border: 1px solid var(--sep); padding: 0 12px; background: var(--surface); }
.copi-perg small { font-size: 12px; color: var(--ink-3); padding: 0 4px; }

@media (max-width: 1360px) { .inbox { grid-template-columns: 300px minmax(0, 1fr) 320px; } .inbox .col-info { display: grid; } }
@media (max-width: 1150px) { .inbox, .inbox.sem-conv { grid-template-columns: 300px minmax(0, 1fr); } .inbox .col-info { display: none; } }
@media (max-width: 820px) {
  .inbox, .inbox.sem-conv { grid-template-columns: 1fr; }
  .ini-hero h1 { font-size: 30px; }
  .ini-hero { padding-top: 18px; }
  .ferr-ic .icone-btn { width: 32px; height: 32px; }
}

/* ---------------- ESTILO 2 nas demais telas (Pedidos, Solicitações, Documentos, Contatos, Empresas, Base, Relatórios, Equipe, Segurança, Configurações) ---------------- */
.pagina { padding: 28px 36px 56px; }
.cab { margin-bottom: 22px; }
.cab h1 { font-size: 27px; letter-spacing: -0.032em; }
.cab p { font-size: 14px; max-width: 760px; }
.card h2 { font-size: 16px; }
.card .sub { font-size: 13px; }
.card .cab-c { margin-bottom: 12px; }

/* tabelas no estilo Attio: cabeçalho leve, linhas finas, nada de caixa pesada */
.tab { font-size: 14px; }
.tab th { font-size: 12px; font-weight: 500; color: var(--ink-3); padding: 9px 12px; border-bottom: 1px solid var(--sep); }
.tab td { padding: 11px 12px; }
.tab tr.clic td { transition: background-color .15s; }
.tab tr.clic:hover td { background: var(--fill-2); }
.tab tr.clic:hover td:first-child { border-radius: 10px 0 0 10px; }
.tab tr.clic:hover td:last-child { border-radius: 0 10px 10px 0; }
.quem .av { width: 32px; height: 32px; font-size: 12px; }

/* etiquetas menores, em formato de tag; risco vira ponto + texto */
.selo { font-size: 12px; padding: 2px 8px; border-radius: 6px; }
.selo.tag { border-radius: 999px; }
.risco { background: none !important; padding: 0; font-size: 12.5px; }

/* campos e seletores */
.campo, .sel { border-radius: 9px; }
.cab-c .campo, .cab-c .sel { background: var(--surface); border: 1px solid var(--sep-strong); }

/* listas dentro de cartões */
.card .lista .lin { padding: 11px 20px; }
.lin .meio b { font-weight: 600; }

/* abas de página */
.tabs-pag { gap: 20px; margin-bottom: 22px; }
.tabs-pag button { font-size: 14.5px; }

/* indicadores */
.kpi .v { font-size: 30px; }
.kpi .t { font-size: 13px; font-weight: 500; color: var(--ink-3); }
.kpi .t .i { color: var(--ink-3); }

/* fichas laterais (contato, empresa, pedido, solicitação) */
.gaveta { width: min(600px, 100%); border-left: 1px solid var(--sep); }
.gaveta .g-top { padding: 16px 22px; }
.gaveta .g-top h2 { font-size: 18px; letter-spacing: -0.02em; }
.gaveta .g-corpo { gap: 20px; }
.gaveta .g-rod { background: var(--surface-2); }
.secao h3 { font-size: 12px; font-weight: 600; letter-spacing: .01em; }

/* janelas */
.folha { border-radius: 16px; padding: 24px; border: 1px solid var(--sep); }
.folha h2 { font-size: 20px; }

/* estados vazios mais leves */
.vazio .i { width: 36px; height: 36px; opacity: .5; }
.vazio b { font-size: 15px; }

@media (max-width: 820px) { .pagina { padding: 18px 16px 40px; } .cab h1 { font-size: 24px; } }

/* ---------------- celular e telas estreitas ---------------- */
.so-estreito { display: none; }
@media (max-width: 1150px) {
  .so-estreito { display: grid; }
  .inbox.copi-aberto .col-info { display: grid; position: fixed; top: 0; right: 0; bottom: 0; width: min(390px, 100%); z-index: 46;
    overflow: auto; box-shadow: var(--shadow-pop); animation: gaveta .38s var(--mola); }
  .copi-cab .so-estreito { margin-left: 4px; }
}
@media (max-width: 820px) {
  .conv-top .l { flex-wrap: wrap; row-gap: 10px; }
  .conv-top .l > div[style*="flex:1"] { flex: 1 1 calc(100% - 100px) !important; }
  .ferr-ic { width: 100%; justify-content: flex-end; flex-wrap: wrap; }
  .ferr-ic .btn { height: 32px; padding: 0 12px; }
  .msgs { padding: 14px 12px; }
  .compor { margin: 0 8px 8px; }
  .tab { min-width: 640px; }
  .tab-wrap { margin: 0 -12px; padding: 0 12px; }
  .tabs-pag { overflow-x: auto; scrollbar-width: none; flex-wrap: nowrap; gap: 18px; }
  .tabs-pag::-webkit-scrollbar { display: none; }
  .tabs-pag button { white-space: nowrap; flex: none; }
  .cab .acoes { margin-left: 0; width: 100%; }
}


/* seletor de fila no estilo Intercom ("Aguardando · 8"), no lugar das abas que não cabiam */
.cx-vista { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 0 2px; }
.cx-sel { appearance: none; -webkit-appearance: none; height: 34px; max-width: 100%; padding: 0 32px 0 12px; border-radius: 10px; border: 1px solid var(--sep);
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238e8e93' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 11px center;
  font-weight: 600; font-size: 14px; color: var(--ink); cursor: pointer; transition: border-color .2s, box-shadow .2s; }
.cx-sel:hover { border-color: var(--sep-strong); }
.cx-sel:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }


/* ---------------- Tarefas: calendário ---------------- */
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.cal-h { font-size: 12px; color: var(--ink-3); font-weight: 600; padding: 0 4px 2px; }
.cal-d { min-height: 86px; border: 1px solid var(--sep); border-radius: 12px; background: var(--surface); padding: 8px; display: grid; align-content: start; gap: 4px; text-align: left; font: inherit; color: var(--ink);
  transition: transform .2s var(--mola), box-shadow .2s, border-color .2s; }
.cal-d .n { font-size: 13px; font-weight: 600; color: var(--ink-3); }
.cal-d.tem { cursor: pointer; }
.cal-d.tem:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0, 0, 0, .07); border-color: var(--sep-strong); }
.cal-d.hoje { border-color: var(--accent); }
.cal-d.hoje .n { color: var(--accent-text); }
.cal-d:disabled { cursor: default; }
.cal-d.vazio-d { border: 0; background: none; }
.cal-q { font-size: 12.5px; font-weight: 600; }
.cal-a { font-size: 12px; color: var(--red); font-weight: 600; }
.cal-ok { font-size: 12px; color: var(--green); }
@media (max-width: 820px) { .cal-d { min-height: 64px; padding: 6px; } .cal-q, .cal-a, .cal-ok { font-size: 10.5px; } }

/* conexão com a Meta */
.meta-trilha { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.meta-trilha > div { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border: 1px solid var(--sep); border-radius: 12px; font-size: 13.5px; font-weight: 500; color: var(--ink-3); background: var(--surface); min-width: 0; }
.meta-trilha i, .meta-n { font-style: normal; flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 12.5px; font-weight: 600; background: var(--fill-2); color: var(--ink-3); }
.meta-trilha .on { border-color: var(--blue); color: var(--ink); } .meta-trilha .on i, .meta-n.on { background: var(--blue); color: #fff; }
.meta-trilha .ok { color: var(--ink); } .meta-trilha .ok i, .meta-n.ok { background: var(--green-bg); color: var(--green); }
.meta-pe { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 14px; }
.meta-ajuda { margin-top: 14px; font-size: 13.5px; color: var(--ink-2); } .meta-ajuda summary { cursor: pointer; font-weight: 600; }
.meta-ajuda ol, .meta-ol { margin: 10px 0 0; padding-left: 20px; display: grid; gap: 6px; font-size: 13.5px; color: var(--ink-2); }
.lin .meio small.mono-q { font-family: ui-monospace, Menlo, monospace; font-size: 12.5px; white-space: normal; overflow-wrap: anywhere; }
.meta-passo .lin { flex-wrap: wrap; } .meta-passo .lin .meio { flex: 1 1 220px; }
@media (max-width: 620px) { .meta-trilha { grid-template-columns: 1fr 1fr; } }
/* cabeçalho da conversa: com pouco espaço, os botões descem e o nome do cliente aparece inteiro */
.col-conv { container-type: inline-size; }
@container (max-width: 660px) {
  .conv-top .l { flex-wrap: wrap; row-gap: 10px; }
  .conv-top .l > div[style*="flex:1"] { flex: 1 1 calc(100% - 100px) !important; }
  .ferr-ic { width: 100%; justify-content: flex-end; flex-wrap: wrap; }
}
@media (max-width: 620px) { .barras { gap: 1px; } .barras .b { min-width: 1px; } }
