/* =====================================================================
   Marechal Hub — identidade visual baseada em govinline.com.br
   Azul institucional, ouro, verde; Montserrat (títulos) + Inter (texto).
   ===================================================================== */
@font-face { font-family: Inter; font-weight: 400; font-display: swap; src: url(/vendor/fonts/inter/inter-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: Inter; font-weight: 500; font-display: swap; src: url(/vendor/fonts/inter/inter-latin-500-normal.woff2) format('woff2'); }
@font-face { font-family: Inter; font-weight: 600; font-display: swap; src: url(/vendor/fonts/inter/inter-latin-600-normal.woff2) format('woff2'); }
@font-face { font-family: Inter; font-weight: 400; font-display: swap; src: url(/vendor/fonts/inter/inter-latin-ext-400-normal.woff2) format('woff2'); unicode-range: U+0100-024F, U+1E00-1EFF; }
@font-face { font-family: Montserrat; font-weight: 600; font-display: swap; src: url(/vendor/fonts/montserrat/montserrat-latin-600-normal.woff2) format('woff2'); }
@font-face { font-family: Montserrat; font-weight: 700; font-display: swap; src: url(/vendor/fonts/montserrat/montserrat-latin-700-normal.woff2) format('woff2'); }
@font-face { font-family: Montserrat; font-weight: 800; font-display: swap; src: url(/vendor/fonts/montserrat/montserrat-latin-800-normal.woff2) format('woff2'); }

:root {
  --azul: #12306f; --azul-esc: #0b1f4a; --azul-900: #071433; --ouro: #ffcc00; --ouro-esc: #c79a00;
  --verde: #008c4a; --verde-claro: #e3f4ea; --vermelho: #d92d20; --vermelho-claro: #fdecea;
  --raio: 12px; --raio-sm: 8px;
  --font: Inter, system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --font-head: Montserrat, Inter, system-ui, sans-serif;

  --bg: #f3f5f9; --surface: #ffffff; --surface-2: #f3f5f9; --surface-3: #e9edf5;
  --text: #2b3345; --muted: #5d6679; --faint: #8a93a6; --line: #e1e5ee; --heading: #0b1f4a;
  --primary: #12306f; --primary-ink: #ffffff; --primary-hover: #0b1f4a;
  --hover: rgba(18, 48, 111, .06); --active: rgba(18, 48, 111, .10); --link: #12306f;
  --rail: #0b1f4a; --rail-ink: rgba(255, 255, 255, .72);
  --shadow: 0 10px 30px rgba(11, 31, 74, .12); --shadow-sm: 0 2px 8px rgba(11, 31, 74, .08);
  --mine: #e8eefb; --focus: 0 0 0 3px rgba(255, 204, 0, .55);
  color-scheme: light;
}
[data-theme="dark"] {
  --bg: #071433; --surface: #0c1d42; --surface-2: #0a1838; --surface-3: #13295a;
  --text: #dbe3f4; --muted: #9ba8c4; --faint: #6d7a98; --line: #1c3368; --heading: #ffffff;
  --primary: #ffcc00; --primary-ink: #0b1f4a; --primary-hover: #ffd633;
  --hover: rgba(255, 255, 255, .05); --active: rgba(255, 204, 0, .12); --link: #ffcc00;
  --rail: #050f27; --shadow: 0 10px 30px rgba(0, 0, 0, .45); --shadow-sm: 0 2px 8px rgba(0, 0, 0, .35);
  --mine: #15306a; --verde-claro: rgba(0, 140, 74, .18); --vermelho-claro: rgba(217, 45, 32, .18);
  color-scheme: dark;
}

/* Cor do tema (menu da conta → "Cor do tema"), como no Workspace. Sem data-cor = Gov In Line (acima).
   Cada cor troca também --azul/--ouro, que muitos componentes usam como destaque.
   Claro usa [data-theme="light"] para não vazar no modo escuro. Escuro e Preto sempre ligam o modo escuro (main.js). */
[data-theme="light"][data-cor="verde"] { /* verde do Workspace (tema Verde: #00b578 / #015c41 / #2ecc8f) — padrão do Hub */
  --azul: #00b578; --azul-esc: #015c41; --azul-900: #013d2b; --ouro: #2ecc8f; --ouro-esc: #00a868;
  --bg: #eef4f1; --surface-2: #eef4f1; --surface-3: #e2ebe6; --line: #dbe6e0; --text: #20292a; --heading: #013d2b;
  --primary: #00b578; --primary-hover: #00a868; --link: #015c41; --rail: #00b578; --rail-ink: rgba(255, 255, 255, .88); --mine: #e6f7f0;
  --hover: rgba(0, 181, 120, .07); --active: rgba(0, 181, 120, .12); --focus: 0 0 0 3px rgba(0, 181, 120, .45);
}
[data-theme="dark"][data-cor="verde"] {
  --azul: #2ecc8f; --azul-esc: #015c41; --azul-900: #012a1e; --ouro: #6ee7b7; --ouro-esc: #2ecc8f;
  --bg: #121a16; --surface: #18231e; --surface-2: #151e1a; --surface-3: #213029; --line: #28372f;
  --text: #e6ece9; --muted: #9fb0a7; --faint: #6f8077;
  --primary: #2ecc8f; --primary-ink: #012a1e; --primary-hover: #6ee7b7; --link: #6ee7b7; --rail: #012a1e; --mine: #12291f;
  --active: rgba(46, 204, 143, .14); --focus: 0 0 0 3px rgba(46, 204, 143, .45);
}
[data-theme="light"][data-cor="esmeralda"] { /* tema Esmeralda do ERP e do Desk (#10b981 / #047857 / #064e3b, ouro #d4a72c) */
  --azul: #059669; --azul-esc: #064e3b; --azul-900: #022c22; --ouro: #d4a72c; --ouro-esc: #b08a1e;
  --bg: #f3f7f5; --surface-2: #f3f7f5; --surface-3: #e6efea; --line: #dbe7e1; --text: #10241c; --muted: #4b6359; --heading: #022c22;
  --primary: #059669; --primary-hover: #047857; --link: #047857; --rail: #064e3b; --mine: #ecfdf5;
  --hover: rgba(16, 185, 129, .07); --active: rgba(16, 185, 129, .12); --focus: 0 0 0 3px rgba(16, 185, 129, .45);
}
[data-theme="dark"][data-cor="esmeralda"] {
  --azul: #34d399; --azul-esc: #064e3b; --azul-900: #022c22; --ouro: #d4a72c; --ouro-esc: #34d399;
  --bg: #0b1a15; --surface: #10241c; --surface-2: #0e1f18; --surface-3: #173328; --line: #1e3d31;
  --text: #e3efe9; --muted: #9db5aa; --faint: #6a8579;
  --primary: #34d399; --primary-ink: #022c22; --primary-hover: #6ee7b7; --link: #6ee7b7; --rail: #022c22; --mine: #065f46;
  --active: rgba(52, 211, 153, .14); --focus: 0 0 0 3px rgba(52, 211, 153, .45);
}
[data-theme="light"][data-cor="cinza"] {
  --azul: #5f6368; --azul-esc: #3c4043; --azul-900: #202124; --ouro: #80868b; --ouro-esc: #5f6368;
  --bg: #f1f3f4; --surface-2: #f1f3f4; --surface-3: #e8eaed; --line: #dadce0; --text: #3c4043; --heading: #202124;
  --primary: #5f6368; --primary-hover: #3c4043; --link: #3c4043; --rail: #3c4043; --mine: #f1f3f4;
  --hover: rgba(95, 99, 104, .07); --active: rgba(95, 99, 104, .12); --focus: 0 0 0 3px rgba(95, 99, 104, .4);
}
[data-theme="dark"][data-cor="cinza"] {
  --azul: #9aa0a6; --azul-esc: #3c4043; --azul-900: #171717; --ouro: #bdc1c6; --ouro-esc: #9aa0a6;
  --bg: #202124; --surface: #292a2d; --surface-2: #242528; --surface-3: #35363a; --line: #3c4043;
  --text: #e8eaed; --muted: #9aa0a6; --faint: #80868b;
  --primary: #bdc1c6; --primary-ink: #202124; --primary-hover: #dadce0; --link: #dadce0; --rail: #171717; --mine: #35363a;
  --active: rgba(255, 255, 255, .1); --focus: 0 0 0 3px rgba(189, 193, 198, .4);
}
[data-theme="light"][data-cor="azul"] { /* azul-céu */
  --azul: #0ea5e9; --azul-esc: #075985; --azul-900: #0c4a6e; --ouro: #38bdf8; --ouro-esc: #0369a1; --heading: #0c4a6e;
  --primary: #0ea5e9; --primary-hover: #0284c7; --link: #0369a1; --rail: #075985; --mine: #e0f2fe;
  --hover: rgba(14, 165, 233, .07); --active: rgba(14, 165, 233, .12); --focus: 0 0 0 3px rgba(14, 165, 233, .4);
}
[data-theme="dark"][data-cor="azul"] {
  --azul: #38bdf8; --azul-esc: #0c4a6e; --azul-900: #082f49; --ouro: #38bdf8; --ouro-esc: #0ea5e9;
  --bg: #0b1620; --surface: #0f2030; --surface-2: #0d1b28; --surface-3: #15304a; --line: #1b3a55;
  --primary: #38bdf8; --primary-ink: #082f49; --primary-hover: #7dd3fc; --link: #7dd3fc; --rail: #071521; --mine: #0c2d3d;
  --active: rgba(56, 189, 248, .14); --focus: 0 0 0 3px rgba(56, 189, 248, .4);
}
[data-theme="light"][data-cor="branco"] {
  --azul: #475569; --azul-esc: #1e293b; --azul-900: #0f172a; --ouro: #94a3b8; --ouro-esc: #475569;
  --bg: #f8fafc; --surface-2: #f1f5f9; --surface-3: #e2e8f0; --line: #e2e8f0; --heading: #0f172a;
  --primary: #475569; --primary-hover: #1e293b; --link: #334155; --rail: #ffffff; --rail-ink: #475569; --mine: #f1f5f9;
  --hover: rgba(71, 85, 105, .07); --active: rgba(71, 85, 105, .12); --focus: 0 0 0 3px rgba(71, 85, 105, .35);
}
[data-theme="dark"][data-cor="branco"] {
  --azul: #94a3b8; --azul-esc: #1e293b; --azul-900: #0f172a; --ouro: #cbd5e1; --ouro-esc: #94a3b8;
  --bg: #0f172a; --surface: #1e293b; --surface-2: #172033; --surface-3: #273449; --line: #334155;
  --text: #e2e8f0; --muted: #94a3b8; --faint: #64748b;
  --primary: #94a3b8; --primary-ink: #0f172a; --primary-hover: #cbd5e1; --link: #cbd5e1; --rail: #1e293b; --rail-ink: #cbd5e1; --mine: #273449;
  --active: rgba(148, 163, 184, .14); --focus: 0 0 0 3px rgba(148, 163, 184, .4);
}
[data-cor="branco"] .rail { border-right: 1px solid var(--line); }
[data-cor="branco"] .rail a:hover, [data-cor="branco"] .rail a.active { color: var(--heading); background: var(--active); }
[data-theme="dark"][data-cor="escuro"] { /* grafite + verde-menta, igual ao Escuro do Workspace */
  --azul: #34d399; --azul-esc: #0f2a21; --azul-900: #07070a; --ouro: #34d399; --ouro-esc: #10b981;
  --bg: #0a0a0d; --surface: #131318; --surface-2: #0f0f13; --surface-3: #1c1c23; --line: #26262e;
  --text: #e6e8eb; --muted: #8b93a1; --faint: #5d6470;
  --primary: #34d399; --primary-ink: #062b1e; --primary-hover: #6ee7b7; --link: #6ee7b7; --rail: #07070a; --mine: #0f2a21;
  --active: rgba(52, 211, 153, .14); --focus: 0 0 0 3px rgba(52, 211, 153, .4);
}
[data-theme="dark"][data-cor="preto"] { /* o escuro azul do Hub, mas todo preto (mantém o ouro) */
  --azul-esc: #0b0b0b; --azul-900: #000000;
  --bg: #000000; --surface: #0b0b0b; --surface-2: #050505; --surface-3: #161616; --line: #1f1f1f;
  --text: #e4e4e4; --muted: #a0a0a0; --faint: #6e6e6e; --rail: #000000; --mine: #1a1a1a;
}
[data-cor="preto"] .rail, [data-cor="escuro"] .rail { border-right: 1px solid var(--line); }

/* "Cor também no topo e nas guias" (menu da conta, mh_cobrir): topo, pesquisa e guias do Navegador na cor da barra lateral.
   --rail-2 = tom um pouco mais claro para a guia ativa e a barra de endereço. Branco fica de fora (topo já é branco). */
:root { --rail-2: color-mix(in srgb, var(--rail) 85%, #fff); }
[data-theme="light"][data-cor="verde"] { --rail-2: #00a868; }
[data-cor="verde"] .topbar::after { display: none; } /* verde padrão: topo uniforme, sem a listra azul/verde/ouro */ /* cabeçalho do Workspace = --primary #00b578 */
[data-theme="light"][data-cor="esmeralda"] { --rail-2: #047857; }
html[data-cobrir]:not([data-cor="branco"]) .topbar { background: var(--rail); border-bottom-color: transparent; }
html[data-cobrir]:not([data-cor="branco"]) .topbar .logo-text b,
html[data-cobrir]:not([data-cor="branco"]) .topbar .top-app-name,
html[data-cobrir]:not([data-cor="branco"]) .topbar .icon-btn { color: #fff; }
html[data-cobrir]:not([data-cor="branco"]) .topbar .icon-btn:hover,
html[data-cobrir]:not([data-cor="branco"]) .topbar .me-btn:hover { background: rgba(255, 255, 255, .12); }
html[data-cobrir]:not([data-cor="branco"]) .topbar .top-app { border-left-color: rgba(255, 255, 255, .2); }
html[data-cobrir]:not([data-cor="branco"]) .topbar .search input { background: rgba(255, 255, 255, .13); border-color: transparent; color: #fff; }
html[data-cobrir]:not([data-cor="branco"]) .topbar .search input::placeholder,
html[data-cobrir]:not([data-cor="branco"]) .topbar .search > .icon { color: rgba(255, 255, 255, .75); }
html[data-cobrir]:not([data-cor="branco"]) .topbar .search input:focus { background: rgba(255, 255, 255, .2); border-color: var(--ouro); }
html[data-cobrir]:not([data-cor="branco"]) .topbar .conn-pill:not(.off) { background: rgba(255, 255, 255, .14); color: #fff; }
html[data-cobrir]:not([data-cor="branco"]) .topbar .icon-btn .count { border-color: var(--rail); }
html[data-cobrir]:not([data-cor="branco"]) .nav-abas { background: var(--rail); border-bottom-color: transparent; }
html[data-cobrir]:not([data-cor="branco"]) .nav-aba { color: rgba(255, 255, 255, .8); }
html[data-cobrir]:not([data-cor="branco"]) .nav-aba:hover { background: rgba(255, 255, 255, .1); }
html[data-cobrir]:not([data-cor="branco"]) .nav-aba.ativa,
html[data-cobrir]:not([data-cor="branco"]) .nav-barra { background: var(--rail-2); color: #fff; border-bottom-color: transparent; }
html[data-cobrir]:not([data-cor="branco"]) .nav-nova { color: #fff; }
html[data-cobrir]:not([data-cor="branco"]) .nav-x:hover, html[data-cobrir]:not([data-cor="branco"]) .nav-nova:hover { background: rgba(255, 255, 255, .15); }
html[data-cobrir]:not([data-cor="branco"]) .nav-barra .btn-ghost { color: #fff; }
html[data-cobrir]:not([data-cor="branco"]) .nav-barra .btn-ghost:hover { background: rgba(255, 255, 255, .12); }
html[data-cobrir]:not([data-cor="branco"]) .nav-barra .nav-escudo { color: rgba(255, 255, 255, .6); }
html[data-cobrir]:not([data-cor="branco"]) .nav-barra .nav-estrela { color: rgba(255, 255, 255, .85); }
html[data-cobrir]:not([data-cor="branco"]) .nav-barra .nav-estrela.on { color: var(--ouro); }
html[data-cobrir]:not([data-cor="branco"]) .nav-barra .nav-escudo.on { color: var(--ouro); }
html[data-cobrir]:not([data-cor="branco"]) .nav-end .input { background: rgba(255, 255, 255, .14); border-color: transparent; color: #fff; }
html[data-cobrir]:not([data-cor="branco"]) .nav-end .input:focus { background: rgba(255, 255, 255, .22); border-color: var(--ouro); }
html[data-cobrir]:not([data-cor="branco"]) .nav-cad { color: rgba(255, 255, 255, .75); }

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { font-family: var(--font); font-size: 14px; line-height: 1.5; color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; overflow: hidden; }
h1, h2, h3, h4 { font-family: var(--font-head); color: var(--heading); margin: 0; line-height: 1.2; }
h1 { font-size: 26px; font-weight: 800; } h2 { font-size: 20px; font-weight: 700; } h3 { font-size: 16px; font-weight: 700; } h4 { font-size: 14px; font-weight: 700; }
a { color: var(--link); text-decoration: none; } a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 6px; }
::selection { background: rgba(255, 204, 0, .45); }
.hidden { display: none !important; }
.muted { color: var(--muted); } .faint { color: var(--faint); } .small { font-size: 12px; } .nowrap { white-space: nowrap; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.row { display: flex; align-items: center; gap: 8px; } .col { display: flex; flex-direction: column; gap: 8px; }
.grow { flex: 1; min-width: 0; } .wrap { flex-wrap: wrap; } .gap-4 { gap: 4px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; }
.mt-8 { margin-top: 8px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; } .mb-8 { margin-bottom: 8px; } .mb-16 { margin-bottom: 16px; }
.scroll { overflow: auto; } .scroll::-webkit-scrollbar, .scroll-thin::-webkit-scrollbar { width: 10px; height: 10px; }
.scroll::-webkit-scrollbar-thumb, .scroll-thin::-webkit-scrollbar-thumb { background: rgba(93, 102, 121, .28); border-radius: 10px; border: 3px solid transparent; background-clip: content-box; }
.icon { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icon.sm { width: 15px; height: 15px; } .icon.lg { width: 22px; height: 22px; } .icon.xl { width: 32px; height: 32px; }

/* ---------- elementos da marca ---------- */
.eyebrow { font-family: var(--font-head); font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--ouro-esc); }
[data-theme="dark"] .eyebrow { color: var(--ouro); }
.eyebrow.verde { color: var(--verde); }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none !important; }
.logo-mark { width: 34px; height: 34px; flex: none; }
.logo-text { display: flex; flex-direction: column; line-height: 1; font-family: var(--font-head); }
.logo-text b { font-weight: 800; font-size: 16px; letter-spacing: .02em; color: var(--heading); }
.logo-text span { font-weight: 800; font-size: 12px; letter-spacing: .18em; color: var(--ouro-esc); margin-top: 3px; }
.logo-text span i { font-style: normal; color: var(--verde); }
[data-theme="dark"] .logo-text span { color: var(--ouro); }
.bar-accent { border-left: 4px solid var(--ouro); padding-left: 16px; }

/* ---------- botões ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 36px; padding: 0 14px; border-radius: var(--raio-sm); border: 1px solid transparent; background: var(--surface); color: var(--text); font-weight: 600; font-size: 13.5px; cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s, color .15s, transform .05s; text-decoration: none !important; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--primary); color: var(--primary-ink); }
.btn-primary:hover { background: var(--primary-hover); }
.btn-gold { background: var(--ouro); color: var(--azul-esc); }
.btn-gold:hover { background: #ffd633; }
.btn-outline { background: transparent; border-color: var(--ouro); color: var(--heading); }
.btn-outline:hover { background: rgba(255, 204, 0, .12); }
.btn-ghost { background: transparent; color: var(--text); }
.btn-ghost:hover { background: var(--hover); }
.btn-line { background: var(--surface); border-color: var(--line); }
.btn-line:hover { border-color: var(--azul); }
.btn-success { background: var(--verde); color: #fff; } .btn-success:hover { background: #007a40; }
.btn-danger { background: var(--vermelho); color: #fff; } .btn-danger:hover { background: #b42318; }
.btn-sm { height: 30px; padding: 0 10px; font-size: 12.5px; }
.btn-lg { height: 44px; padding: 0 20px; font-size: 15px; }
.btn-icon { width: 36px; padding: 0; } .btn-icon.btn-sm { width: 30px; }
.btn-block { width: 100%; }

/* ---------- formulários ---------- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field > label { font-size: 12.5px; font-weight: 600; color: var(--heading); }
.field .hint { font-size: 12px; color: var(--muted); }
.input, .select, .textarea { width: 100%; height: 38px; padding: 0 12px; border: 1px solid var(--line); border-radius: var(--raio-sm); background: var(--surface); transition: border-color .15s, box-shadow .15s; }
.textarea { height: auto; min-height: 84px; padding: 10px 12px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--azul); box-shadow: 0 0 0 3px rgba(18, 48, 111, .12); }
[data-theme="dark"] .input:focus, [data-theme="dark"] .select:focus, [data-theme="dark"] .textarea:focus { border-color: var(--ouro); box-shadow: 0 0 0 3px rgba(255, 204, 0, .15); }
.check { display: flex; align-items: center; gap: 8px; cursor: pointer; user-select: none; }
.check input { width: 16px; height: 16px; accent-color: var(--azul); }
.switch { position: relative; width: 38px; height: 22px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: var(--surface-3); border-radius: 22px; cursor: pointer; transition: .2s; }
.switch span::after { content: ''; position: absolute; width: 16px; height: 16px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .2s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.switch input:checked + span { background: var(--verde); }
.switch input:checked + span::after { transform: translateX(16px); }
.form-error { background: var(--vermelho-claro); color: var(--vermelho); padding: 10px 12px; border-radius: var(--raio-sm); font-size: 13px; margin-bottom: 12px; }

/* ---------- avatares e presença ---------- */
.av { position: relative; flex: none; width: 32px; height: 32px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: #fff; font-family: var(--font-head); font-weight: 700; font-size: 12px; letter-spacing: .02em; user-select: none; }
.av.s24 { width: 24px; height: 24px; font-size: 10px; } .av.s40 { width: 40px; height: 40px; font-size: 14px; } .av.s56 { width: 56px; height: 56px; font-size: 19px; } .av.s96 { width: 96px; height: 96px; font-size: 32px; }
.av.group { border-radius: 10px; }
.av .pres { position: absolute; right: -2px; bottom: -2px; width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--surface); background: #9aa3b5; }
.av.s40 .pres, .av.s56 .pres { width: 14px; height: 14px; }
.pres.available { background: var(--verde); } .pres.busy, .pres.meeting { background: var(--vermelho); } .pres.dnd { background: var(--vermelho); box-shadow: inset 0 0 0 2px var(--vermelho), inset 0 0 0 4px #fff; } .pres.away { background: var(--ouro); } .pres.offline { background: transparent; box-shadow: inset 0 0 0 2px #9aa3b5; }
.status-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; }

/* ---------- casca do aplicativo ---------- */
.shell { display: grid; grid-template-columns: 66px minmax(0, 1fr); grid-template-rows: 60px 1fr; height: 100vh; height: 100dvh; }
.topbar { grid-column: 1 / 3; display: flex; align-items: center; gap: 16px; padding: 0 16px 0 20px; background: var(--surface); border-bottom: 1px solid var(--line); position: relative; z-index: 20; }
.topbar::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: linear-gradient(90deg, var(--azul) 0 70%, var(--verde) 70% 85%, var(--ouro) 85%); opacity: .9; }
.top-app { display: flex; align-items: center; gap: 6px; padding-left: 12px; border-left: 1px solid var(--line); min-width: 0; }
.top-app[hidden] { display: none; }
.top-app .app-ic { margin-left: 6px; flex-shrink: 0; }
.top-app-name { font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .search { flex: 1; max-width: 560px; margin: 0 auto; position: relative; }
.topbar .search input { width: 100%; height: 36px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface-2); padding: 0 12px 0 36px; }
.topbar .search input:focus { outline: none; background: var(--surface); border-color: var(--azul); }
.topbar .search > .icon { position: absolute; left: 11px; top: 9px; color: var(--muted); }
.search-results { position: absolute; top: 42px; left: 0; right: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--raio); box-shadow: var(--shadow); max-height: 70vh; overflow: auto; padding: 8px; }
.search-results h5 { margin: 8px 8px 4px; font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-family: var(--font-head); }
.top-actions { display: flex; align-items: center; gap: 6px; }
.icon-btn { position: relative; width: 38px; height: 38px; border: 0; border-radius: 8px; background: transparent; color: var(--heading); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.icon-btn:hover { background: var(--hover); }
.icon-btn .count { position: absolute; top: 3px; right: 3px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: var(--vermelho); color: #fff; font-size: 10.5px; font-weight: 700; display: flex; align-items: center; justify-content: center; border: 2px solid var(--surface); }
.conn-pill { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 14px; font-size: 12px; font-weight: 600; background: var(--verde-claro); color: var(--verde); }
.conn-pill.off { background: var(--vermelho-claro); color: var(--vermelho); }
.me-btn { display: flex; align-items: center; gap: 8px; padding: 4px 6px 4px 4px; border-radius: 22px; border: 0; background: transparent; cursor: pointer; }
.me-btn:hover { background: var(--hover); }

.rail { background: var(--rail); display: flex; flex-direction: column; align-items: stretch; padding: 10px 0; gap: 2px; overflow-y: auto; overflow-x: hidden; }
.rail a { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 7px 2px 6px; color: var(--rail-ink); font-size: 9.5px; font-weight: 600; text-decoration: none; }
.rail a .icon { width: 19px; height: 19px; }
.rail a:hover { color: #fff; background: rgba(255, 255, 255, .05); }
.rail a.active { color: #fff; background: rgba(255, 255, 255, .08); }
.rail a.active::before { content: ''; position: absolute; left: 0; top: 8px; bottom: 8px; width: 4px; border-radius: 0 4px 4px 0; background: var(--ouro); }
.rail a .count { position: absolute; top: 2px; right: 9px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: var(--vermelho); color: #fff; font-size: 10px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.rail .sep { height: 1px; background: rgba(255, 255, 255, .1); margin: 6px 14px; }
.rail .spacer { flex: 1; }
.rail-items { display: contents; }
.rail a.dragging { opacity: .4; }
.rail a.drop-before { box-shadow: inset 0 3px 0 var(--ouro); }
.rail a.drop-after { box-shadow: inset 0 -3px 0 var(--ouro); }
.rail-edit-list { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.rail-edit-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.rail-edit-row:last-child { border-bottom: 0; }
.rail-edit-row > .icon { color: var(--muted); }
.app-pin { opacity: .55; }
.app-pin.on, .app-pin:hover { opacity: 1; color: var(--ouro); }

.main { display: flex; min-width: 0; min-height: 0; background: var(--bg); }
.pane-list { width: 320px; flex: none; background: var(--surface); border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.pane-head { display: flex; align-items: center; gap: 8px; padding: 16px 16px 12px; min-height: 64px; }
.pane-head h2 { flex: 1; font-size: 19px; }
.pane-body { flex: 1; overflow: auto; padding: 0 8px 12px; }
.pane-content { flex: 1; min-width: 0; min-height: 0; display: flex; flex-direction: column; background: var(--surface); }
.page { flex: 1; overflow: auto; padding: 28px 32px 40px; }
.page-head { display: flex; align-items: flex-end; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head .titles { flex: 1; min-width: 240px; }
.page-head h1 { margin-top: 6px; }

/* listas */
.list-item { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: var(--raio-sm); cursor: pointer; color: var(--text); text-decoration: none !important; position: relative; }
.list-item:hover { background: var(--hover); }
.list-item.active { background: var(--active); }
.list-item.active::before { content: ''; position: absolute; left: -8px; top: 8px; bottom: 8px; width: 3px; border-radius: 3px; background: var(--ouro); }
.list-item .li-main { flex: 1; min-width: 0; }
.list-item .li-title { font-weight: 600; color: var(--heading); display: flex; gap: 6px; align-items: center; }
.list-item .li-sub { font-size: 12.5px; color: var(--muted); }
.list-item .li-side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; font-size: 11.5px; color: var(--faint); }
.list-item.unread .li-title, .list-item.unread .li-sub { color: var(--heading); font-weight: 700; }
.badge { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; font-size: 11px; font-weight: 700; background: var(--azul); color: #fff; }
[data-theme="dark"] .badge { background: var(--ouro); color: var(--azul-esc); }
.badge.red { background: var(--vermelho); color: #fff; }
.tag { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: 6px; font-size: 11.5px; font-weight: 600; background: var(--surface-3); color: var(--muted); }
.tag.green { background: var(--verde-claro); color: var(--verde); } .tag.gold { background: rgba(255, 204, 0, .2); color: #8a6a00; } .tag.red { background: var(--vermelho-claro); color: var(--vermelho); } .tag.blue { background: rgba(18, 48, 111, .1); color: var(--azul); }
[data-theme="dark"] .tag.gold { color: var(--ouro); } [data-theme="dark"] .tag.blue { color: #b9c9f0; background: rgba(255,255,255,.08); }
.section-title { display: flex; align-items: center; gap: 6px; padding: 12px 10px 6px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); font-family: var(--font-head); }

/* cards */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--raio); padding: 20px; position: relative; }
.card.top-gold { border-top: 3px solid var(--ouro); } .card.top-green { border-top: 3px solid var(--verde); } .card.top-blue { border-top: 3px solid var(--azul); }
.card.hoverable { transition: box-shadow .2s, transform .2s; cursor: pointer; }
.card.hoverable:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.grid-cards { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.stat { display: flex; flex-direction: column; gap: 4px; }
.stat b { font-family: var(--font-head); font-size: 26px; font-weight: 800; color: var(--heading); }
.empty { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 12px; padding: 48px 24px; color: var(--muted); flex: 1; }
.empty .icon-wrap { width: 72px; height: 72px; border-radius: 20px; display: flex; align-items: center; justify-content: center; background: rgba(255, 204, 0, .16); color: var(--azul); }
[data-theme="dark"] .empty .icon-wrap { color: var(--ouro); }
.empty h3 { color: var(--heading); }

/* abas */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); padding: 0 20px; }
.tabs button { position: relative; height: 42px; padding: 0 12px; border: 0; background: transparent; cursor: pointer; font-weight: 600; color: var(--muted); }
.tabs button:hover { color: var(--heading); }
.tabs button.active { color: var(--heading); }
.tabs button.active::after { content: ''; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 3px; border-radius: 3px 3px 0 0; background: var(--ouro); }

/* cabeçalho de conversa */
.conv-head { display: flex; align-items: center; gap: 12px; padding: 12px 20px; border-bottom: 1px solid var(--line); min-height: 64px; background: var(--surface); }
.conv-head .titles { flex: 1; min-width: 0; }
.conv-head h3 { font-size: 16px; }
.active-call-banner { display: flex; align-items: center; gap: 12px; padding: 10px 20px; background: linear-gradient(90deg, var(--azul-esc), var(--azul)); color: #fff; }
.active-call-banner .pulse { width: 10px; height: 10px; border-radius: 50%; background: var(--verde); box-shadow: 0 0 0 0 rgba(0, 140, 74, .7); animation: pulse 1.6s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(0, 140, 74, .7); } 70% { box-shadow: 0 0 0 10px rgba(0, 140, 74, 0); } 100% { box-shadow: 0 0 0 0 rgba(0, 140, 74, 0); } }

/* mensagens */
.messages { flex: 1; overflow-y: auto; padding: 16px 20px 8px; background: var(--surface-2); }
.msg-day { display: flex; align-items: center; gap: 12px; margin: 18px 0 10px; color: var(--muted); font-size: 12px; font-weight: 600; }
.msg-day::before, .msg-day::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.msg { display: flex; gap: 10px; padding: 3px 8px; margin: 0 -8px; border-radius: 8px; position: relative; }
.msg:hover { background: var(--hover); }
.msg.cont { padding-top: 0; }
.msg .av-col { width: 34px; flex: none; }
.msg .bubble-wrap { flex: 1; min-width: 0; }
.msg .meta { display: flex; align-items: baseline; gap: 8px; margin-top: 6px; }
.msg .meta b { color: var(--heading); font-weight: 700; font-size: 13.5px; }
.msg .meta time { font-size: 11.5px; color: var(--faint); }
.msg .body { color: var(--text); word-wrap: break-word; overflow-wrap: anywhere; }
.msg .body p { margin: 0; }
.msg .body code { background: var(--surface-3); padding: 1px 5px; border-radius: 4px; font-size: 12.5px; }
.msg .body pre { background: var(--azul-900); color: #e6ecfa; padding: 10px 12px; border-radius: 8px; overflow: auto; font-size: 12.5px; margin: 6px 0; }
.msg .body .mention { background: rgba(255, 204, 0, .25); color: var(--heading); border-radius: 4px; padding: 0 3px; font-weight: 600; }
.msg.deleted .body { color: var(--faint); font-style: italic; }
.msg .edited { font-size: 11px; color: var(--faint); margin-left: 4px; }
.msg.system { justify-content: center; color: var(--muted); font-size: 12.5px; padding: 6px; }
.msg.system:hover { background: transparent; }
.msg .reply-quote { border-left: 3px solid var(--ouro); background: var(--surface); padding: 4px 10px; border-radius: 0 6px 6px 0; margin: 4px 0; font-size: 12.5px; color: var(--muted); }
.msg .reply-quote b { color: var(--heading); }
.msg-actions { position: absolute; right: 10px; top: -14px; display: none; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow-sm); padding: 2px; z-index: 2; }
.msg:hover .msg-actions { display: flex; }
.msg-actions button { width: 30px; height: 28px; border: 0; background: transparent; border-radius: 6px; cursor: pointer; color: var(--muted); display: flex; align-items: center; justify-content: center; font-size: 15px; }
.msg-actions button:hover { background: var(--hover); color: var(--heading); }
.reactions { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.reaction { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 8px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; font-size: 12.5px; }
.reaction.mine { border-color: var(--ouro); background: rgba(255, 204, 0, .14); }
.attach { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); max-width: 380px; margin-top: 6px; text-decoration: none !important; color: var(--text); }
.attach:hover { border-color: var(--azul); }
.attach .file-ic { width: 36px; height: 36px; border-radius: 8px; display: flex; align-items: center; justify-content: center; background: rgba(18, 48, 111, .1); color: var(--azul); flex: none; }
[data-theme="dark"] .attach .file-ic { color: var(--ouro); background: rgba(255, 204, 0, .1); }
.attach-img { display: block; max-width: 340px; max-height: 260px; border-radius: 10px; margin-top: 6px; border: 1px solid var(--line); cursor: zoom-in; }
.event-card { margin-top: 6px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); overflow: hidden; max-width: 440px; }
.event-card .ec-head { display: flex; align-items: center; gap: 12px; padding: 12px 14px; }
.event-card .ec-ic { width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; flex: none; color: #fff; background: var(--azul); }
.event-card.call .ec-ic { background: var(--verde); } .event-card.rec .ec-ic { background: var(--vermelho); } .event-card.hook .ec-ic { background: var(--ouro); color: var(--azul-esc); }
.event-card .ec-foot { display: flex; gap: 8px; padding: 10px 14px; border-top: 1px solid var(--line); background: var(--surface-2); }
.event-card.hook { border-left: 4px solid var(--ouro); }

.typing { height: 22px; padding: 0 22px; font-size: 12px; color: var(--muted); background: var(--surface-2); }
.composer { padding: 0 20px 16px; background: var(--surface-2); }
.composer-box { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); transition: border-color .15s, box-shadow .15s; }
.composer-box:focus-within { border-color: var(--azul); box-shadow: 0 -2px 0 var(--ouro) inset; }
[data-theme="dark"] .composer-box:focus-within { border-color: var(--ouro); }
.composer textarea { display: block; width: 100%; border: 0; resize: none; background: transparent; padding: 12px 14px 4px; min-height: 44px; max-height: 220px; outline: none; }
.composer-tools { display: flex; align-items: center; gap: 2px; padding: 4px 6px 6px; }
.composer-reply { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-bottom: 1px solid var(--line); font-size: 12.5px; color: var(--muted); }
.pending-files { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 10px 0; }
.pending-file { display: flex; align-items: center; gap: 6px; padding: 4px 6px 4px 10px; border-radius: 8px; background: var(--surface-3); font-size: 12px; max-width: 260px; }
.pending-file .bar { height: 3px; background: var(--verde); border-radius: 2px; }
.drop-overlay { position: absolute; inset: 0; background: rgba(18, 48, 111, .85); color: #fff; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 12px; font-family: var(--font-head); font-weight: 700; font-size: 18px; z-index: 5; border: 3px dashed var(--ouro); border-radius: 12px; margin: 10px; }

/* menus, popovers, modais, toasts */
.menu { position: fixed; z-index: 1000; min-width: 220px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 6px; max-height: calc(100vh - 16px); overflow-y: auto; overscroll-behavior: contain; }
.menu button, .menu a { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; border-radius: 8px; background: transparent; cursor: pointer; text-align: left; color: var(--text); font-size: 13.5px; text-decoration: none !important; }
.menu button:hover, .menu a:hover { background: var(--hover); }
.menu .sep { height: 1px; background: var(--line); margin: 6px 4px; }
.menu .danger { color: var(--vermelho); }
.emoji-grid { display: grid; grid-template-columns: repeat(8, 32px); gap: 2px; padding: 4px; }
.emoji-grid button { width: 32px; height: 32px; padding: 0; justify-content: center; font-size: 18px; }

.modal-back { position: fixed; inset: 0; background: rgba(7, 20, 51, .55); backdrop-filter: blur(2px); z-index: 900; display: flex; align-items: center; justify-content: center; padding: 16px; animation: fade .15s; }
.modal { width: 100%; max-width: 520px; max-height: calc(100vh - 32px); display: flex; flex-direction: column; background: var(--surface); border-radius: 16px; box-shadow: 0 24px 60px rgba(7, 20, 51, .35); overflow: hidden; animation: pop .18s; }
.modal.wide { max-width: 760px; } .modal.xwide { max-width: 1040px; }
/* visualizador de imagem com zoom (verImagem em core/ui.js) */
.modal.img-viewer { max-width: min(1400px, 96vw); }
.imgv-bar { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.imgv-bar .btn[data-z="-"], .imgv-bar .btn[data-z="+"] { font-size: 18px; min-width: 34px; justify-content: center; }
.imgv-pct { width: 74px; height: 32px; text-align: center; padding: 0 6px; }
.imgv-stage { position: relative; display: flex; height: max(240px, calc(100vh - 240px)); overflow: auto; background: #eef1f5; border-radius: 8px; cursor: grab; }
[data-theme="dark"] .imgv-stage { background: #0e131c; }   /* sólido: o tema translúcido deixava a tela de trás aparecer em PNG transparente */
.imgv-stage.arrastando { cursor: grabbing; }
.imgv-stage img { margin: auto; flex: none; max-width: none; user-select: none; }
@media (max-width: 900px) { .imgv-dica { display: none; } }
.modal-head { display: flex; align-items: center; gap: 12px; padding: 18px 20px 14px; border-bottom: 1px solid var(--line); }
.modal-head h2 { flex: 1; font-size: 18px; }
.modal-body { padding: 18px 20px; overflow: auto; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--line); background: var(--surface-2); }
@keyframes fade { from { opacity: 0; } } @keyframes pop { from { transform: translateY(8px) scale(.98); opacity: 0; } }
.toasts { position: fixed; right: 18px; bottom: 18px; z-index: 2000; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: flex-start; gap: 10px; min-width: 280px; max-width: 400px; padding: 12px 14px; border-radius: 12px; background: var(--azul-esc); color: #fff; box-shadow: var(--shadow); border-left: 4px solid var(--ouro); animation: pop .2s; cursor: pointer; }
.toast.error { border-left-color: var(--vermelho); } .toast.success { border-left-color: var(--verde); }
.toast b { display: block; font-family: var(--font-head); }
.chip-select { display: flex; flex-wrap: wrap; gap: 6px; padding: 6px; border: 1px solid var(--line); border-radius: 8px; min-height: 40px; background: var(--surface); }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 4px 0 4px; border-radius: 14px; background: var(--surface-3); font-size: 12.5px; }
.chip button { border: 0; background: transparent; cursor: pointer; color: var(--muted); display: flex; padding: 2px; }
.chip-select input { flex: 1; min-width: 120px; border: 0; outline: none; background: transparent; height: 28px; }
.picker-list { max-height: 260px; overflow: auto; border: 1px solid var(--line); border-radius: 8px; margin-top: 6px; }
.picker-list .list-item { border-radius: 0; }

/* tabelas */
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; padding: 10px 12px; border-bottom: 1px solid var(--line); font-family: var(--font-head); }
.table td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:hover td { background: var(--hover); }
.code { font-family: Consolas, "Cascadia Mono", monospace; font-size: 12.5px; background: var(--surface-3); padding: 2px 6px; border-radius: 5px; word-break: break-all; }
.copy-line { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); }
.copy-line .code { background: transparent; padding: 0; flex: 1; }

/* ---------- autenticação ---------- */
.auth { position: fixed; inset: 0; display: grid; grid-template-columns: 1.1fr 1fr; background: var(--azul-esc); overflow: auto; }
.auth-hero { position: relative; overflow: hidden; background: linear-gradient(160deg, #0b1f4a 0%, #12306f 60%, #12306f 100%); padding: 48px; display: flex; flex-direction: column; color: #fff; }
.auth-hero .stripes { position: absolute; right: -18%; top: -10%; bottom: -10%; width: 55%; transform: skewX(-14deg); background: linear-gradient(90deg, var(--verde) 0 16%, var(--ouro) 16% 100%); opacity: .95; }
.auth-hero .content { position: relative; z-index: 1; max-width: 520px; margin: auto 0; background: rgba(11, 31, 74, .88); border-radius: 16px; padding: 36px; border-left: 4px solid var(--ouro); box-shadow: 0 30px 60px rgba(0,0,0,.25); }
.auth-hero h1 { color: #fff; font-size: 40px; line-height: 1.12; margin: 14px 0 16px; }
.auth-hero p { color: rgba(255, 255, 255, .82); font-size: 16px; margin: 0; }
.auth-hero .feats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 24px; }
.auth-hero .feat { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: rgba(255,255,255,.9); }
.auth-hero .feat .icon { color: var(--ouro); }
.auth-hero .logo-text b { color: #fff; }
.auth-form { display: flex; align-items: center; justify-content: center; padding: 40px 24px; background: var(--bg); }
.auth-card { width: 100%; max-width: 420px; background: var(--surface); border-radius: 16px; padding: 32px; box-shadow: var(--shadow); border-top: 4px solid var(--ouro); }
.auth-card h2 { font-size: 24px; margin: 8px 0 6px; }

/* ---------- calendário ---------- */
.cal { display: grid; grid-template-columns: 56px repeat(7, 1fr); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--surface); }
.cal-head { position: sticky; top: 0; z-index: 2; background: var(--surface); border-bottom: 1px solid var(--line); padding: 10px 8px; text-align: center; font-size: 12px; color: var(--muted); }
.cal-head b { display: block; font-family: var(--font-head); font-size: 20px; color: var(--heading); }
.cal-head.today b { color: var(--azul); } .cal-head.today { box-shadow: inset 0 -3px 0 var(--ouro); }
[data-theme="dark"] .cal-head.today b { color: var(--ouro); }
.cal-hours { border-right: 1px solid var(--line); }
.cal-hours div { height: 48px; font-size: 11px; color: var(--faint); text-align: right; padding: 0 6px; transform: translateY(-7px); }
.cal-col { position: relative; border-right: 1px solid var(--line); background-image: repeating-linear-gradient(to bottom, transparent 0 47px, var(--line) 47px 48px); cursor: pointer; }
.cal-col:last-child { border-right: 0; }
.cal-modos { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--surface); }
.cal-modos button { border: 0; background: none; padding: 7px 11px; font-size: 13px; color: var(--text); cursor: pointer; }
.cal-modos button + button { border-left: 1px solid var(--line); }
.cal-modos button:hover { background: var(--hover); }
.cal-modos button.on { background: var(--azul); color: #fff; font-weight: 600; }
[data-theme="dark"] .cal-modos button.on { background: var(--ouro); color: var(--azul-900); }
.calm-wrap { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.calm-wrap.cheio { grid-template-columns: 1fr; }
.calm { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); padding: 8px 10px 10px; min-width: 0; }
.calm h4 { margin: 4px 4px 8px; color: var(--heading); }
.calm-g { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; }
.calm-wd { font-size: 11px; color: var(--muted); text-align: center; padding: 4px 0; }
.calm-d { min-height: 34px; border-radius: 6px; padding: 3px; cursor: pointer; font-size: 12px; text-align: center; color: var(--text); min-width: 0; }
.calm-d:hover { background: var(--hover); }
.calm-d.fds { color: var(--faint); }
.calm-d .num { display: inline-block; min-width: 22px; line-height: 22px; border-radius: 11px; }
.calm-d.fer .num { color: var(--vermelho); font-weight: 700; }
.calm-d.hoje .num { background: var(--azul); color: #fff; font-weight: 700; }
[data-theme="dark"] .calm-d.hoje .num { background: var(--ouro); color: var(--azul-900); }
.calm-dots { display: flex; gap: 2px; justify-content: center; min-height: 6px; }
.calm-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--c); }
.cheio .calm-d { min-height: 112px; text-align: left; border: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; overflow: hidden; }
.cheio .calm-d .num { align-self: flex-start; }
.calm-ev { font-size: 11px; padding: 2px 6px; border-radius: 6px; background: rgba(18, 48, 111, .1); color: var(--heading); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
[data-theme="dark"] .calm-ev { background: rgba(255, 204, 0, .12); }
@media (max-width: 900px) { .cheio .calm-d { min-height: 64px; } .cheio .cal-ob, .cheio .calm-ev { font-size: 10px; padding: 1px 3px; } .cal-modos button { padding: 6px 8px; } }
.cal-allday-lab { border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); font-size: 11px; color: var(--muted); padding: 6px 4px; text-align: right; }
.cal-allday { border-bottom: 1px solid var(--line); border-left: 1px solid var(--line); padding: 4px; display: flex; flex-direction: column; gap: 3px; max-height: 150px; overflow-y: auto; min-width: 0; }
.cal-ob { font-size: 11px; line-height: 1.3; padding: 2px 6px; border-radius: 6px; border-left: 3px solid var(--c); background: color-mix(in srgb, var(--c) 12%, transparent); color: var(--heading); cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-dep { display: inline-block; font-size: 9px; font-weight: 700; font-style: normal; letter-spacing: .02em; padding: 0 4px; margin-right: 4px; border-radius: 4px; background: var(--c); color: #fff; vertical-align: 1px; }
.cal-ob:hover { background: color-mix(in srgb, var(--c) 22%, transparent); }
.cal-ob.fac { opacity: .7; font-style: italic; }
.cal-ev { position: absolute; left: 4px; right: 4px; border-radius: 8px; padding: 4px 8px; font-size: 12px; background: rgba(18, 48, 111, .1); border-left: 3px solid var(--azul); color: var(--heading); overflow: hidden; cursor: pointer; }
.cal-ev:hover { background: rgba(18, 48, 111, .18); }
.cal-ev.live { border-left-color: var(--verde); background: var(--verde-claro); }
[data-theme="dark"] .cal-ev { background: rgba(255, 204, 0, .12); border-left-color: var(--ouro); }
.cal-now { position: absolute; left: 0; right: 0; height: 2px; background: var(--vermelho); z-index: 1; }
.cal-now::before { content: ''; position: absolute; left: -5px; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: var(--vermelho); }

/* gravações e apps */
.rec-card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; transition: box-shadow .2s, transform .2s; }
.rec-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.rec-thumb { position: relative; aspect-ratio: 16 / 9; background: linear-gradient(135deg, var(--azul-esc), var(--azul)); display: flex; align-items: center; justify-content: center; cursor: pointer; overflow: hidden; }
.rec-thumb video { width: 100%; height: 100%; object-fit: cover; }
.rec-thumb .play { position: absolute; width: 52px; height: 52px; border-radius: 50%; background: rgba(255, 204, 0, .95); color: var(--azul-esc); display: flex; align-items: center; justify-content: center; box-shadow: 0 8px 20px rgba(0,0,0,.3); }
.rec-thumb .dur { position: absolute; right: 8px; bottom: 8px; background: rgba(0,0,0,.7); color: #fff; font-size: 11.5px; padding: 2px 6px; border-radius: 4px; font-weight: 600; }
.rec-body { padding: 12px 14px; }
.app-card { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px; }
/* cartões de Apps mais compactos (pedido do dono 27/11/2026); ícone vem com 48px inline */
.app-card .app-ic { width: 36px !important; height: 36px !important; border-radius: 9px; }
.app-card .app-ic .icon { width: 18px; height: 18px; }
.app-card h3 { font-size: 14.5px; }
.app-card p.small { font-size: 12px; margin-top: 4px !important; }
.grid-cards:has(> .app-card) { gap: 12px; grid-template-columns: repeat(auto-fill, minmax(205px, 1fr)); }
/* Nada pode empurrar a tela para o lado (rótulos da barra cortados): scrollIntoView vindo de iframe rolava o body,
   que com overflow:hidden ainda rola por script; clip não rola. */
.shell { overflow: clip; }
html { overflow: hidden; } body { overflow: clip; }
.app-ic { width: 48px; height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center; color: #fff; }
.app-frame { flex: 1; border: 0; width: 100%; background: #fff; }

/* barra flutuante de gravação de tela */
.rec-float { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 1500; display: flex; align-items: center; gap: 12px; padding: 8px 10px 8px 16px; border-radius: 30px; background: var(--azul-esc); color: #fff; box-shadow: 0 16px 40px rgba(0,0,0,.35); border: 1px solid rgba(255,255,255,.1); }
.rec-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--vermelho); animation: blink 1.2s infinite; }
@keyframes blink { 50% { opacity: .25; } }

/* ---------- chamada recebida ---------- */
.incoming { position: fixed; right: 20px; bottom: 20px; z-index: 1800; width: 340px; background: var(--azul-esc); color: #fff; border-radius: 16px; box-shadow: 0 24px 60px rgba(0,0,0,.4); overflow: hidden; animation: pop .2s; }
.incoming .in-top { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 26px 20px 18px; text-align: center; background: linear-gradient(160deg, #0b1f4a, #12306f); position: relative; }
.incoming .in-top::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: linear-gradient(90deg, var(--verde) 0 30%, var(--ouro) 30%); }
.incoming h3 { color: #fff; }
.incoming .ring { animation: ring 1.2s infinite; border-radius: 50%; }
@keyframes ring { 0% { box-shadow: 0 0 0 0 rgba(255, 204, 0, .6); } 100% { box-shadow: 0 0 0 22px rgba(255, 204, 0, 0); } }
.incoming .in-actions { display: flex; justify-content: center; gap: 14px; padding: 16px; }
.round-btn { width: 52px; height: 52px; border-radius: 50%; border: 0; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; color: #fff; }
.round-btn.green { background: var(--verde); } .round-btn.red { background: var(--vermelho); } .round-btn.blue { background: var(--azul); }
.round-btn:hover { filter: brightness(1.1); }

@media (max-width: 900px) {
  .auth { grid-template-columns: 1fr; } .auth-hero { display: none; }
  .pane-list { width: 260px; }
}
@media (max-width: 680px) {
  .shell { grid-template-columns: 1fr; grid-template-rows: 56px 1fr 60px; }
  .rail { grid-row: 3; flex-direction: row; padding: 0; overflow-x: auto; }
  .rail a { flex: 1; min-width: 62px; } .rail .sep, .rail .spacer { display: none; }
  .rail a.active::before { left: 12px; right: 12px; top: 0; bottom: auto; width: auto; height: 3px; border-radius: 0 0 3px 3px; }
  .topbar { grid-column: 1; padding: 0 12px; gap: 8px; } .topbar .logo-text, .conn-pill { display: none; }
  .main.has-detail .pane-list { display: none; } .main:not(.has-detail) .pane-list { width: 100%; } .main:not(.has-detail) .pane-list + .pane-content { display: none; }
  .page { padding: 20px 16px 32px; }
}

/* foto de perfil (12/11/2026) */
.av > img { width: 100%; height: 100%; border-radius: inherit; object-fit: cover; display: block; }

/* Planilhas e Quadro Branco (12/11/2026) */
.doc-wrap { display: flex; flex-direction: column; height: 100%; min-height: 0; padding: 12px 16px; gap: 10px; }
.doc-head { flex-wrap: wrap; }
.doc-title { margin: 0; font-size: 18px; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 120px; }
.doc-title:hover { text-decoration: underline dotted; }
.board-bar { align-items: center; }
.sep-v { width: 1px; align-self: stretch; background: var(--line); margin: 0 4px; }
.board-cor { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--line); cursor: pointer; padding: 0; }
.board-cor.on { border-color: var(--ouro); box-shadow: 0 0 0 2px var(--ouro); }
.board-area { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; background: var(--bg); border-radius: var(--raio-sm); overflow: hidden; }
.board-area canvas { max-width: 100%; max-height: 100%; aspect-ratio: 16 / 9; background: #fff; border-radius: 6px; box-shadow: var(--shadow-sm); touch-action: none; cursor: crosshair; }
@media (max-width: 680px) { .hide-sm { display: none; } .doc-wrap { padding: 8px; } }

/* Planilhas v2 (estilo Google Planilhas) — grade sempre clara, como no Google */
.sh-tool { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; padding: 4px 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 22px; }
.sh-b { min-width: 30px; height: 30px; padding: 0 7px; border: 0; border-radius: 6px; background: transparent; color: var(--text); font: 600 13px var(--font); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 4px; position: relative; }
.sh-b:hover { background: var(--hover); }
.sh-b.on { background: color-mix(in srgb, var(--primary) 22%, transparent); color: var(--heading); }
.sh-cbar { position: absolute; left: 7px; right: 7px; bottom: 4px; height: 3px; border-radius: 2px; border: 1px solid var(--line); }
.sh-a { font-family: serif; font-size: 15px; margin-bottom: 4px; } .sh-balde { margin-bottom: 4px; }
.sh-fs { height: 30px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--text); padding: 0 4px; }
.sh-bar { align-items: center; }
.sh-name { width: 96px; flex: none; text-align: center; font-weight: 600; }
.sh-fx { font-style: italic; color: var(--muted); font-weight: 700; }
.sh-scroll { flex: 1; min-height: 0; overflow: auto; border: 1px solid var(--line); border-radius: var(--raio-sm); background: #fff; outline: none; scroll-padding: 26px 0 0 46px; }
.sh-scroll:focus-visible { box-shadow: 0 0 0 2px var(--focus); }
.sh-inner { position: relative; width: max-content; }
table.sh { border-collapse: separate; border-spacing: 0; table-layout: fixed; font: 13px Inter, system-ui, sans-serif; color: #1f2937; user-select: none; }
table.sh th { position: sticky; background: #f8f9fa; color: #5f6368; font-weight: 500; font-size: 12px; border-right: 1px solid #e2e3e3; border-bottom: 1px solid #e2e3e3; padding: 0 4px; z-index: 3; }
table.sh thead th { top: 0; height: 26px; text-align: center; z-index: 4; }
table.sh tbody th { left: 0; text-align: center; }
table.sh th.sh-corner { left: 0; z-index: 6; cursor: pointer; }
table.sh th.on { background: #d3e3fd; color: #0b57d0; font-weight: 700; }
table.sh td { height: 24px; padding: 0 5px; border-right: 1px solid #e2e3e3; border-bottom: 1px solid #e2e3e3; white-space: nowrap; overflow: hidden; text-overflow: clip; background: #fff; line-height: 1.3; vertical-align: bottom; cursor: cell; }
table.sh td.bd { box-shadow: inset -1px -1px 0 #9aa0a6; }
table.sh td.err { color: #c5221f; }
/* congelar: linhas do topo (tr.fz, o "top" de cada célula vem do JS) e a 1ª coluna (table.fzc) */
table.sh tr.fz > * { position: sticky; z-index: 2; }
table.sh tr.fz > th { z-index: 5; }
table.sh tr.fz-ult > * { box-shadow: 0 2px 0 #b0b4b8; }
table.sh.fzc tbody td:nth-child(2) { position: sticky; left: 46px; z-index: 1; box-shadow: 2px 0 0 #b0b4b8; }
table.sh.fzc tbody tr.fz > td:nth-child(2) { z-index: 4; }
table.sh.fzc thead th:nth-child(2) { left: 46px; z-index: 5; box-shadow: 2px 0 0 #b0b4b8; }
table.sh td.nota { position: relative; }
/* nota em célula congelada: continua grudada (sticky também serve de base para o triângulo da nota) */
table.sh tr.fz > td.nota, table.sh.fzc tbody td.nota:nth-child(2) { position: sticky; }
table.sh td.nota::after { content: ''; position: absolute; top: 0; right: 0; border: 4px solid transparent; border-top-color: #e37400; border-right-color: #e37400; }
.sh-dd { position: absolute; z-index: 3; width: 18px; height: 18px; border: 0; border-radius: 3px; background: #e8eaed; color: #3c4043; font-size: 10px; line-height: 18px; text-align: center; cursor: pointer; padding: 0; }
.sh-dd:hover { background: #d3e3fd; }
.sh-graf { position: absolute; z-index: 1; width: 460px; height: 290px; background: #fff; border: 1px solid #dadce0; border-radius: 8px; box-shadow: 0 2px 8px rgba(0,0,0,.12); color: #1f2937; display: flex; flex-direction: column; }
.sh-graf header { display: flex; align-items: center; gap: 6px; padding: 6px 10px; font: 600 13px Inter, system-ui, sans-serif; cursor: move; user-select: none; }
.sh-graf header span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sh-graf header button { border: 0; background: none; cursor: pointer; padding: 2px 5px; border-radius: 4px; color: #5f6368; visibility: hidden; }
.sh-graf:hover header button { visibility: visible; }
.sh-graf header button:hover { background: #f1f3f4; }
.sh-graf svg { flex: 1; width: 100%; font: 11px Inter, system-ui, sans-serif; }
.rz-c { position: absolute; right: -3px; top: 0; bottom: 0; width: 7px; cursor: col-resize; z-index: 2; }
.rz-r { position: absolute; left: 0; right: 0; bottom: -3px; height: 7px; cursor: row-resize; z-index: 2; }
.rz-c:hover, .rz-r:hover { background: #0b57d0; }
table.sh th { position: sticky; } table.sh thead th, table.sh tbody th { overflow: visible; }
.sh-sel, .sh-act, .sh-prev, .sh-remote { position: absolute; pointer-events: none; box-sizing: border-box; z-index: 1; }
.sh-sel.multi { background: rgba(11, 87, 208, .1); border: 1px solid #0b57d0; }
.sh-act { border: 2px solid #0b57d0; }
.sh-fill { position: absolute; width: 8px; height: 8px; background: #0b57d0; border: 1px solid #fff; cursor: crosshair; pointer-events: auto; }
.sh-prev { border: 2px dashed #0b57d0; }
.sh-remote { border: 2px solid var(--cor); }
.sh-remote::after { content: attr(data-nome); position: absolute; top: -18px; right: -2px; background: var(--cor); color: #fff; font: 600 11px var(--font); padding: 1px 5px; border-radius: 4px 4px 0 0; white-space: nowrap; }
.sh-ed { position: absolute; z-index: 5; box-sizing: border-box; margin: 0; padding: 3px 5px; border: 2px solid #0b57d0; outline: none; resize: none; overflow: hidden; background: #fff; color: #1f2937; font: 13px Inter, system-ui, sans-serif; line-height: 1.3; white-space: pre; box-shadow: 0 2px 8px rgba(0,0,0,.25); }
.sh-sug { position: fixed; z-index: 50; width: 330px; max-height: 300px; overflow: auto; background: #fff; color: #1f2937; border: 1px solid #dadce0; border-radius: 8px; box-shadow: 0 4px 16px rgba(0,0,0,.2); padding: 4px 0; font: 13px Inter, system-ui, sans-serif; }
.sh-sug-i, .sh-sug-h { padding: 6px 12px; cursor: pointer; display: flex; flex-direction: column; gap: 2px; }
.sh-sug-i.on, .sh-sug-i:hover { background: #e8f0fe; }
.sh-sug small { color: #5f6368; } .sh-sug mark { background: #fde293; border-radius: 3px; padding: 0 2px; }
.sh-foot { align-items: center; }
.sh-pal { display: grid; grid-template-columns: repeat(8, 22px); gap: 4px; padding: 8px; }
.sh-pal button { width: 22px; height: 22px; border-radius: 50%; border: 1px solid #ccc; cursor: pointer; padding: 0; }
.sh-pal-reset { margin: 0 8px 6px; }
.sh-temas { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.sh-tema { display: flex; flex-direction: column; border: 2px solid var(--line); border-radius: 8px; overflow: hidden; padding: 0; cursor: pointer; background: #fff; }
.sh-tema span { height: 12px; } .sh-tema.on { border-color: var(--ouro); box-shadow: 0 0 0 2px var(--ouro); }

/* Planilhas v3: filtro, busca, mesclas */
.sh-fbtn { position: absolute; z-index: 2; width: 18px; height: 18px; padding: 0; border: 1px solid #c4c7c5; border-radius: 4px; background: #fff; color: #444; font-size: 11px; line-height: 1; cursor: pointer; }
.sh-fbtn.on { background: #0b57d0; border-color: #0b57d0; color: #fff; }
.sh-filt { width: 270px; padding: 8px 10px; display: flex; flex-direction: column; gap: 8px; }
.sh-filt-o { text-align: left; background: none; border: 0; padding: 4px 2px; cursor: pointer; color: var(--text); font: inherit; }
.sh-filt-o:hover { background: var(--hover); }
.sh-filt-l { max-height: 220px; overflow: auto; display: flex; flex-direction: column; gap: 4px; border: 1px solid var(--line); border-radius: 6px; padding: 6px; }
.sh-filt-l label { display: flex; gap: 6px; align-items: center; }
.sh-filt-l label[hidden] { display: none; }
.sh-busca { align-items: center; padding: 6px 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }
.sh-busca[hidden] { display: none; }
.sh-busca .input { width: 180px; }
table.sh td.achado { box-shadow: inset 0 0 0 2px #f9ab00 !important; background-image: linear-gradient(rgba(253, 226, 147, .55), rgba(253, 226, 147, .55)); }
table.sh td[hidden] { display: none; }
table.sh td[colspan], table.sh td[rowspan] { vertical-align: middle; }
.menu .sh-filt a { display: inline; width: auto; padding: 0; color: var(--link); background: none; }
.menu .sh-filt .btn { width: auto; display: inline-flex; padding: 6px 14px; }
.menu .sh-filt .btn-primary { background: var(--primary); color: var(--primary-ink); }
.menu .sh-filt-o { padding: 6px 4px; }
.menu .sh-pal button { width: 22px; padding: 0; display: block; }
.sh-clip { position: fixed; left: -9999px; top: 0; width: 10px; height: 10px; opacity: 0; }
.sh-tema { min-height: 64px; }
.sh-tema i { display: block; height: 12px; flex: none; border-bottom: 1px solid #e5e7eb; }

/* ---------- Omnichannel (e-mail + WhatsApp do Workspace) ---------- */
.om-filters { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 16px 10px; }
.chip-btn { border: 1px solid var(--line); background: var(--surface); color: var(--muted); border-radius: 999px; padding: 4px 11px; font-size: 12px; font-weight: 600; cursor: pointer; }
.chip-btn:hover { background: var(--hover); }
.chip-btn.active { background: var(--azul); border-color: var(--azul); color: #fff; }
.om-mail { width: 100%; max-width: 900px; height: 120px; border: 1px solid var(--line); border-radius: 10px; background: #fff; margin-top: 6px; display: block; }
.om-mail.full { max-width: none; height: 70vh; }
.om-mailhead { margin-top: 2px; }
.om-opts { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; margin-top: 6px; }
.om-opts summary { cursor: pointer; font-weight: 600; color: var(--azul); margin-bottom: 2px; }
[data-theme="dark"] .om-opts summary { color: var(--ouro); }
.om-opt { height: auto; min-height: 30px; padding: 4px 10px; text-align: left; white-space: normal; border: 1px solid var(--line); }
.msg.om.me .av-col .av { box-shadow: 0 0 0 2px var(--ouro); }
.back-btn { display: none; }
@media (max-width: 900px) { .back-btn { display: inline-flex; } }

/* ---------- "Abrir no aplicativo" (entrou pelo navegador no Windows) ---------- */
.app-offer { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 900; display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  max-width: calc(100vw - 32px); padding: 10px 14px; border-radius: 12px; background: var(--surface); color: var(--text); border: 1px solid var(--line); box-shadow: 0 10px 30px rgba(11, 31, 74, .25); }
/* Windows no navegador: tela inteira, o Hub só abre no app */
.app-offer.app-exige { inset: 0; transform: none; max-width: none; border-radius: 0; border: 0; z-index: 5000; flex-direction: column; justify-content: center; gap: 14px; padding: 16px; text-align: center; background: var(--bg, var(--surface)); }
.app-exige [data-txt] { flex: 0 0 auto; font-size: 16px; max-width: 460px; }
.app-exige > .icon { width: 44px; height: 44px; color: var(--ouro, currentColor); }
.av > .om-foto { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: inherit; background: var(--surface); }   /* foto cobre o ícone; sem foto, o ícone aparece */
/* Omnichannel: ações da mensagem (responder, ver, encaminhar), menção e prévia */
.om-acts { margin-left: auto; display: inline-flex; gap: 2px; opacity: 0; transition: opacity .15s; }
.msg.om:hover .om-acts, .om-acts:focus-within { opacity: 1; }
@media (hover: none) { .om-acts { opacity: 1; } }
.om-acts .btn { padding: 2px 6px; }
/* Omnichannel: comentários internos (amarelo tracejado, como no Workspace; só a equipe vê) */
.om-notes { max-height: 160px; overflow: auto; margin-bottom: 8px; padding: 6px 8px; border: 1px dashed #f59e0b; border-radius: 10px; background: rgba(245, 158, 11, .1); }
.om-note-grp { margin: 8px auto; width: min(600px, 94%); padding: 4px 6px; border: 1px dashed #f59e0b; border-radius: 10px; background: rgba(245, 158, 11, .06); }
.om-note-gh { font-size: 11px; font-weight: 700; color: #d97706; padding: 2px 4px; }
.om-note { margin: 4px 0; padding: 6px 10px; border-radius: 8px; background: rgba(245, 158, 11, .14); font-size: 13px; word-break: break-word; }
.om-note-h { font-size: 11px; font-weight: 700; opacity: .8; margin-bottom: 2px; }
textarea.om-note-mode { background: rgba(245, 158, 11, .14) !important; }
.composer-tools .btn.active { background: #f59e0b; color: #fff; }
.om-mention { position: absolute; left: 8px; bottom: 100%; margin-bottom: 6px; width: min(360px, calc(100% - 16px)); max-height: 280px; overflow: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 30px rgba(11, 31, 74, .2); padding: 6px; z-index: 50; }
.om-pdf { width: 100%; height: 75vh; border: 0; border-radius: 8px; background: #fff; }
.om-pdfmini { position: relative; width: 380px; max-width: 100%; height: 230px; margin-top: 6px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; display: flex; align-items: center; justify-content: center; }
.om-pdfmini iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; pointer-events: none; }
.om-pdfmini-tampa { position: absolute; inset: 0; cursor: zoom-in; }
.om-pdfmini + .attach { margin-top: 4px; }
.om-txt { max-height: 72vh; overflow: auto; white-space: pre-wrap; word-break: break-word; background: var(--surface-2); padding: 12px; border-radius: 8px; font-size: 12.5px; margin: 0; }
/* Omnichannel: gravação de áudio */
.om-rec { display: flex; align-items: center; gap: 8px; padding: 6px 10px; margin-bottom: 6px; border-radius: 8px; background: color-mix(in srgb, var(--vermelho) 10%, transparent); font-variant-numeric: tabular-nums; }
.om-rec-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--vermelho); animation: omPulse 1s infinite; }
@keyframes omPulse { 50% { opacity: .3; } }
/* Navegador (abas <webview> do app desktop) */
.nav-abas { display: flex; align-items: flex-end; gap: 2px; padding: 6px 8px 0; background: var(--surface-2); border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.nav-aba { display: flex; align-items: center; gap: 6px; min-width: 90px; max-width: 220px; flex: 0 1 220px; padding: 7px 8px 7px 10px; border-radius: 8px 8px 0 0; cursor: pointer; font-size: 12.5px; color: var(--text); user-select: none; }
.nav-aba:hover { background: color-mix(in srgb, var(--surface) 60%, transparent); }
.nav-aba.ativa { background: var(--surface); color: var(--heading); font-weight: 600; }
.nav-aba.carregando .nav-ic { animation: omPulse 1s infinite; }
.nav-ic { display: inline-flex; width: 16px; height: 16px; flex: none; }
.nav-ic img { width: 16px; height: 16px; }
.nav-tit { flex: 1; min-width: 0; }
.nav-x, .nav-nova { display: inline-flex; border: 0; background: none; color: inherit; padding: 3px; border-radius: 6px; cursor: pointer; }
.nav-x:hover, .nav-nova:hover { background: color-mix(in srgb, var(--text) 12%, transparent); }
.nav-nova { margin: 0 0 6px 4px; }
.nav-barra { display: flex; align-items: center; gap: 4px; padding: 6px 10px; border-bottom: 1px solid var(--line); background: var(--surface); }
.nav-end { flex: 1; position: relative; display: flex; align-items: center; }
.nav-end .input { padding-left: 34px; border-radius: 999px; height: 34px; }
.nav-cad { position: absolute; left: 12px; display: inline-flex; color: var(--muted); pointer-events: none; }
.nav-telas { flex: 1; position: relative; min-height: 0; background: #fff; }
.nav-tela { position: absolute; inset: 0; width: 100%; height: 100%; visibility: hidden; pointer-events: none; }
.nav-tela.ativa { visibility: visible; pointer-events: auto; }
/* Navegador em tela cheia (F11) */
.nav-sair { display: none; }
#navHost.cheia { position: fixed; inset: 0; z-index: 8000; }
#navHost.cheia .nav-abas, #navHost.cheia .nav-barra { display: none; }
#navHost.cheia .nav-sair { display: block; position: absolute; top: 0; left: 50%; transform: translateX(-50%); z-index: 2; padding: 2px 14px 4px; border: 0; border-radius: 0 0 10px 10px; background: rgba(0, 0, 0, .7); color: #fff; font-size: 12px; cursor: pointer; opacity: .35; }
#navHost.cheia .nav-sair:hover, #navHost.cheia .nav-sair:focus-visible { opacity: 1; }
.nav-estrela { font-size: 18px; line-height: 1; color: var(--muted); }
.nav-estrela[hidden] { display: none; }
.nav-estrela.on { color: var(--ouro, #c9a227); }
/* Nova aba: atalhos e mais visitados, como a página inicial do Chrome/Edge */
.nav-inicio { position: absolute; inset: 0; z-index: 1; overflow: auto; background: var(--bg, var(--surface-2)); }
.ni-meio { max-width: 720px; margin: 0 auto; padding: 12vh 16px 32px; }
.ni-busca { position: relative; display: flex; align-items: center; margin: 0 auto 28px; max-width: 560px; }
.ni-busca .input { height: 46px; border-radius: 999px; padding-left: 40px; font-size: 15px; box-shadow: 0 1px 6px rgba(0, 0, 0, .1); }
.ni-busca .nav-cad { left: 15px; }
.ni-grade { display: grid; grid-template-columns: repeat(auto-fill, 104px); justify-content: center; gap: 4px; }
.ni-sub { margin: 22px 0 8px; text-align: center; font-size: 12px; color: var(--muted); }
.ni-bloco { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 6px 10px; border-radius: 12px; color: var(--text); text-decoration: none; }
.ni-bloco:hover { background: color-mix(in srgb, var(--text) 7%, transparent); }
.ni-ic { width: 48px; height: 48px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--surface); box-shadow: 0 1px 4px rgba(0, 0, 0, .12); font-weight: 700; font-size: 19px; color: hsl(var(--h) 55% 42%); }
.ni-ic img { width: 24px; height: 24px; }
.ni-nome { max-width: 100%; font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ni-acao { position: absolute; top: 4px; right: 6px; width: 22px; height: 22px; border: 0; border-radius: 50%; background: none; color: var(--muted); font-size: 15px; line-height: 1; cursor: pointer; opacity: 0; }
.ni-bloco:hover .ni-acao { opacity: 1; }
.ni-acao:hover { background: color-mix(in srgb, var(--text) 14%, transparent); color: var(--text); }
.nav-escudo { color: var(--faint); }
.nav-escudo.on { color: var(--verde, #008c4a); }
.nav-trad { font-size: 13px; font-weight: 700; letter-spacing: -.5px; color: var(--muted); }
.nav-trad[hidden] { display: none; }
.nav-trad.on { color: var(--azul, #1a56db); }
.nav-trad.carregando { animation: blink 1s infinite; }
.nav-zoom { display: flex; align-items: center; }
.nav-zoom .btn-icon { width: 26px; font-size: 17px; }
.nav-zoom-pct { min-width: 50px; padding: 0 4px; font-size: 12px; color: var(--muted); }
.nav-zoom-pct.on { color: var(--text); font-weight: 700; }
html[data-cobrir]:not([data-cor="branco"]) .nav-barra .nav-trad, html[data-cobrir]:not([data-cor="branco"]) .nav-barra .nav-zoom-pct { color: rgba(255, 255, 255, .85); }
html[data-cobrir]:not([data-cor="branco"]) .nav-barra .nav-trad.on { color: var(--ouro); }

/* aviso do login pelo e-mail: sobe na tela */
@keyframes sobeAviso { from { transform: translateY(70px); opacity: 0; } }

/* CRM: anexos das tarefas (miniaturas, fila do comentário, citação da resposta) */
.tk-anexos { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.tk-thumb { width: 96px; height: 72px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); cursor: zoom-in; }
.tk-quote { border-left: 3px solid var(--azul); background: var(--hover); border-radius: 6px; padding: 4px 8px; margin: 4px 0; font-size: 12.5px; }

/* rodapé com módulo, autoria e versão (16/11/2026), igual ao Workspace/Desk */
.rodape-hub { grid-column: 2; grid-row: 3; text-align: center; font-size: 11.5px; color: var(--muted); padding: 6px 16px; border-top: 1px solid var(--line); background: var(--surface); }
.rodape-hub b { font-weight: 600; color: var(--heading); }
.rodape-hub .rodape-versao { margin-left: 8px; padding: 1px 8px; border-radius: 9px; background: var(--bg); border: 1px solid var(--line); white-space: nowrap; }
@media (min-width: 681px) { .shell { grid-template-rows: 60px 1fr auto; } .rail { grid-row: 2 / 4; } }
@media (max-width: 680px) { .rodape-hub { display: none; } }
.attach-ver { cursor: pointer; }
.attach .btn { flex: none; }
.om-plan-aba { margin-bottom: 8px; } .om-plan-aba summary { cursor: pointer; padding: 4px 0; }
.om-plan-rolo { max-height: 64vh; overflow: auto; border: 1px solid var(--line); border-radius: 8px; }
.om-plan { border-collapse: collapse; font-size: 12px; } .om-plan td { border: 1px solid var(--line); padding: 3px 8px; white-space: nowrap; max-width: 320px; overflow: hidden; text-overflow: ellipsis; }
.om-plan tr:first-child td { background: var(--surface-2); font-weight: 600; position: sticky; top: 0; }

/* bolhas flutuantes (17/11/2026): js/core/bolhas.js */
.bolhas { --bolha-esq: 84px; }
@media (max-width: 680px) { .bolhas { --bolha-esq: 8px; } }
.bolha { position: fixed; z-index: 1400; width: var(--bolha, 56px); height: var(--bolha, 56px); padding: 0; border: 0; border-radius: 50%; background: none; cursor: grab; touch-action: none; box-shadow: 0 8px 24px rgba(7, 20, 51, .35); transition: opacity .2s, transform .15s; }
.bolhas.transparente .bolha:not(:hover):not(.ativa):not(.arrastando) { opacity: .6; }
.bolha:hover { transform: scale(1.06); }
.bolha.arrastando { cursor: grabbing; transition: none; transform: scale(1.1); }
.bolha.ativa { box-shadow: 0 0 0 3px var(--ouro), 0 8px 24px rgba(7, 20, 51, .35); }
.bolha > .av { width: 100%; height: 100%; font-size: calc(var(--bolha, 56px) * .34); pointer-events: none; }
.bolha > .av .pres { display: none; }
.bolha > .av.bolha-ico { background: var(--azul); }
.bolha > .av.bolha-ico .icon { width: 45%; height: 45%; }
.bolha .bolha-tipo { position: absolute; left: -2px; bottom: -2px; width: 22px; height: 22px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--surface); color: var(--azul); border: 1px solid var(--line); pointer-events: none; }
.bolha .count { position: absolute; top: -4px; right: -4px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: var(--vermelho); color: #fff; font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; border: 2px solid var(--surface); pointer-events: none; }
.bolha .count.hidden { display: none; }
.bolha-janela { position: fixed; z-index: 1450; width: 380px; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 24px 60px rgba(7, 20, 51, .4); overflow: hidden; animation: pop .15s; }
.bolha-janela[hidden] { display: none; }
.bolha-topo { display: flex; align-items: center; gap: 2px; padding: 6px 6px 6px 14px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.bolha-topo .bolha-titulo { flex: 1; min-width: 0; color: var(--heading); }
.bolha-corpo { flex: 1; min-height: 0; position: relative; }
.bolha-corpo iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: var(--bg); }
.bolha-lixo { position: fixed; z-index: 1460; left: 50%; bottom: 28px; width: 60px; height: 60px; margin-left: -30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: rgba(7, 20, 51, .75); color: #fff; transition: transform .15s, background .15s; }
.bolha-lixo[hidden] { display: none; }
.bolha-lixo.perto { transform: scale(1.25); background: var(--vermelho); }
@media (max-width: 680px) { .bolha-janela { left: 8px !important; right: 8px !important; top: 64px !important; width: auto; height: auto !important; bottom: 8px; } }
/* dentro da mini-janela: só a tela */
:root[data-bolha] .topbar, :root[data-bolha] .rail, :root[data-bolha] .rodape-hub { display: none; }
:root[data-bolha] .shell { grid-template-columns: 1fr; grid-template-rows: 1fr; }
:root[data-bolha] .main { grid-column: 1; grid-row: 1; }
/* app do Windows: bolhas por cima de todos os programas (a página só monta a imagem) */
.bolhas.nativa .bolha, .bolhas.nativa .bolha-janela { display: none; }
.mini-topo { position: fixed; top: 0; left: 0; right: 0; height: 36px; z-index: 50; display: flex; align-items: center; gap: 2px; padding: 0 4px 0 12px;
  background: var(--azul-esc); color: #fff; -webkit-app-region: drag; user-select: none; }
.mini-topo b { flex: 1; min-width: 0; font-size: 13px; }
.mini-topo button { -webkit-app-region: no-drag; width: 30px; height: 28px; border: 0; border-radius: 6px; background: transparent; color: #fff; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.mini-topo button:hover { background: rgba(255, 255, 255, .14); }
.mini-topo button[data-a=fechar]:hover { background: var(--vermelho); }
:root[data-bolha-nativa] .shell { height: calc(100vh - 36px); height: calc(100dvh - 36px); margin-top: 36px; }

/* Ctrl+F: barra "Localizar na página" (core/busca.js) */
#hubBusca { position: fixed; top: 64px; right: 18px; z-index: 9000; display: flex; align-items: center; gap: 2px; padding: 6px 6px 6px 12px; background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 6px 24px rgba(0, 0, 0, .18); }
#hubBusca input { width: 220px; border: 0; outline: 0; background: none; color: inherit; font: inherit; font-size: 13.5px; }
#hubBusca .hb-cont { min-width: 44px; padding: 0 6px; text-align: right; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; border-right: 1px solid var(--line); margin-right: 4px; }
#hubBusca.sem input { color: var(--vermelho, #c62828); }
#hubBusca button { display: inline-flex; border: 0; background: none; color: inherit; padding: 5px; border-radius: 6px; cursor: pointer; }
#hubBusca button:hover { background: color-mix(in srgb, var(--text) 10%, transparent); }
#hubBusca [data-b="anterior"] svg { transform: rotate(180deg); }
::highlight(hub-busca) { background-color: #ffe066; color: #000; }
::highlight(hub-busca-atual) { background-color: #ff9632; color: #000; }

/* Chat: fixadas, enquetes (18/11/2026) */
.pins-bar { display: flex; align-items: center; gap: 8px; width: 100%; padding: 7px 14px; border: 0; border-bottom: 1px solid var(--line); background: var(--surface-2, var(--surface)); color: var(--text); font: inherit; font-size: 12.5px; text-align: left; cursor: pointer; }
.pins-bar:hover { background: color-mix(in srgb, var(--azul) 8%, var(--surface)); }
.pin-mark { display: inline-flex; align-items: center; gap: 3px; margin-left: 8px; font-size: 11px; color: var(--ouro-esc, #c79a00); font-weight: 600; }
.msg.flash { animation: msgFlash 1.6s ease; }
@keyframes msgFlash { 0%, 60% { background: color-mix(in srgb, var(--ouro) 30%, transparent); } 100% { background: transparent; } }
.event-card.poll .ec-ic { background: var(--azul); }
.poll-opts { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.poll-opt { position: relative; display: flex; align-items: center; gap: 8px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--text); font: inherit; font-size: 13px; text-align: left; cursor: pointer; overflow: hidden; }
.poll-opt > span, .poll-opt > b { position: relative; }
.poll-opt .poll-bar { position: absolute; inset: 0 auto 0 0; background: color-mix(in srgb, var(--azul) 14%, transparent); transition: width .3s; }
.poll-opt.mine { border-color: var(--azul); }
.poll-opt:hover { border-color: var(--azul); }

/* Planilhas: abas embaixo (18/11/2026) */
.sh-abas { display: flex; gap: 2px; overflow-x: auto; min-width: 0; max-width: 60%; }
.sh-aba { flex: none; max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; border: 1px solid var(--line); border-top: 0; border-radius: 0 0 6px 6px; background: var(--surface-2); color: var(--muted); font: inherit; font-size: 12.5px; padding: 5px 12px; cursor: pointer; }
.sh-aba:hover { color: var(--text); }
.sh-aba.on { background: var(--surface); color: var(--azul); font-weight: 700; box-shadow: inset 0 3px 0 var(--verde); }
[data-theme="dark"] .sh-aba.on { color: var(--ouro); }
.sh-aba-mais { font-weight: 700; padding: 5px 10px; }
/* Planilha (23/11/2026): caixa de seleção e intervalo protegido (listras leves) */
table.sh td.cb { text-align: center !important; font-size: 16px; cursor: pointer; user-select: none; }
table.sh td.prot { background-image: repeating-linear-gradient(135deg, transparent 0 6px, rgba(18, 48, 111, .07) 6px 8px); }
.sh-ultima { white-space: nowrap; cursor: pointer; }
.sh-ultima:empty { display: none; }

/* ---------- Omnichannel no celular, estilo WhatsApp (23/11/2026) ---------- */
.composer-tools [data-act=camera], .om-mais, .om-hora { display: none; }
.composer-reply .om-rep { min-width: 0; }
.om-info-topo { text-align: center; padding: 4px 0 12px; }
.om-info-topo .av { margin: 0 auto 10px; }
.om-info-topo h3 { overflow-wrap: anywhere; }
.om-info-l { padding: 8px 0; border-bottom: 1px solid var(--line); }
.om-info .section-title { padding-left: 0; }
/* app "Marechal Omnichannel" (?app=omni, instalado pelo govinline.com.br/omni/): só o Omnichannel */
:root[data-app-omni] .topbar, :root[data-app-omni] .rail, :root[data-app-omni] .rodape-hub, :root[data-app-omni] .bolhas, :root[data-app-omni] .om-info a[href^="#/crm"] { display: none; }
:root[data-app-omni] .shell { grid-template-columns: minmax(0, 1fr); grid-template-rows: 1fr; }
:root[data-app-omni] .main { grid-column: 1; grid-row: 1; }
:root[data-app-omni] .om-app #omNew { bottom: calc(16px + env(safe-area-inset-bottom)); }
@media (max-width: 680px) {
  /* a coluna não pode crescer além da tela por causa da barra de cima (cortava a hora da lista no lado direito) */
  .shell { grid-template-columns: minmax(0, 1fr); }
  .main, .topbar .search { min-width: 0; }
  .om-app { --wa-bg: #efeae2; --wa-in: #fff; --wa-out: #d9fdd3; --wa-verde: #00a884; --wa-verde-esc: #008069; --wa-tique: #53bdeb; --wa-texto: #111b21; --wa-meta: #667781; }
  [data-theme="dark"] .om-app { --wa-bg: #0b141a; --wa-in: #202c33; --wa-out: #005c4b; --wa-verde-esc: #00a884; --wa-texto: #e9edef; --wa-meta: #8696a0; }
  /* conversa aberta = tela cheia, sem barra de cima/de baixo nem bolhas; a altura acompanha o teclado (--om-vh/--om-vt vêm do omni.js) */
  html.om-conversa .shell { position: fixed; left: 0; right: 0; top: var(--om-vt, 0px); height: var(--om-vh, 100dvh); grid-template-rows: 1fr; }
  html.om-conversa .topbar, html.om-conversa .rail, html.om-conversa .bolhas { display: none; }

  /* lista de conversas */
  .om-app .pane-head { padding: 10px 12px 6px; min-height: 52px; }
  .om-app .pane-head h2 { font-size: 22px; }
  .om-app #omQ { height: 40px; border-radius: 20px; border-color: transparent; background: var(--surface-2); font-size: 16px; padding: 0 16px; }
  .om-app .om-filters { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding: 0 12px 8px; }
  .om-app .om-filters::-webkit-scrollbar { display: none; }
  .om-app .chip-btn { flex: none; padding: 6px 12px; font-size: 13px; }
  .om-app .chip-btn.active { background: color-mix(in srgb, var(--wa-verde) 18%, transparent); border-color: transparent; color: var(--wa-verde-esc); }
  .om-app #omList { padding: 0 0 90px; }
  .om-app #omList .list-item { border-radius: 0; padding: 10px 14px; gap: 12px; }
  .om-app #omList .list-item::after { content: ''; position: absolute; left: 76px; right: 0; bottom: 0; height: 1px; background: var(--line); }
  .om-app #omList .list-item.active::before { display: none; }
  .om-app #omList .list-item > .av { width: 50px; height: 50px; }
  .om-app #omList .li-title { font-size: 16px; }
  .om-app #omList .li-sub { font-size: 14px; }
  .om-app #omList .li-sub.small { font-size: 12px; }
  .om-app #omList .li-side { flex: none; white-space: nowrap; align-self: flex-start; padding-top: 3px; font-size: 12px; }
  .om-app #omList .unread .li-side { color: var(--wa-verde); font-weight: 700; }
  .om-app #omList .badge { min-width: 22px; height: 22px; border-radius: 11px; background: var(--wa-verde); color: #fff; }
  /* botão verde de nova conversa, como o do WhatsApp */
  .om-app #omNew { position: fixed; right: 16px; bottom: calc(76px + env(safe-area-inset-bottom)); z-index: 30; width: 56px; height: 56px; border-radius: 16px; background: var(--wa-verde); color: #fff; box-shadow: 0 4px 12px rgba(0, 0, 0, .25); }
  .om-app #omNew .icon { width: 24px; height: 24px; }

  /* cabeçalho da conversa: ← foto nome … ⋮ */
  .om-app .conv-head { gap: 6px; min-height: 56px; padding: calc(6px + env(safe-area-inset-top)) 4px 6px 2px; }
  .om-app .conv-head [data-info] > .av { width: 40px; height: 40px; }
  .om-app .conv-head > [data-info] { display: flex; flex: none; }
  .om-app .conv-head > .titles[data-info] { display: block; flex: 1; }
  .om-app .conv-head h3 { font-size: 16.5px; }
  .om-app .conv-head .titles .small { font-size: 12.5px; }
  .om-app .conv-head [data-aprovar], .om-app .conv-head [data-spam], .om-app .conv-head [data-encerrar] { display: none; }
  .om-app .conv-head [data-assumir] { padding: 0 10px; }
  .om-app .om-mais { display: inline-flex; }

  /* balões */
  .om-app .messages { background: var(--wa-bg); padding: 8px 10px; }
  .om-app .msg-day { width: fit-content; margin: 10px auto; padding: 5px 12px; border-radius: 8px; background: var(--wa-in); color: var(--wa-meta); font-size: 12.5px; box-shadow: 0 1px .5px rgba(11, 20, 26, .13); }
  .om-app .msg-day::before, .om-app .msg-day::after { display: none; }
  .om-app .msg.om { flex-direction: column; align-items: flex-start; gap: 0; margin: 0 -10px; padding: 2px 10px; border-radius: 0; }
  .om-app .msg.om:hover { background: none; }
  .om-app .msg.om.me { align-items: flex-end; }
  .om-app .msg.om.sel { background: color-mix(in srgb, var(--wa-verde) 16%, transparent); }
  .om-app .msg.om .av-col { display: none; }
  .om-app .msg.om .bubble-wrap { flex: none; max-width: 85%; min-width: 76px; padding: 6px 8px 4px; border-radius: 8px; background: var(--wa-in); color: var(--wa-texto); box-shadow: 0 1px .5px rgba(11, 20, 26, .13); }
  .om-app .msg.om.me .bubble-wrap { background: var(--wa-out); }
  .om-app .msg.om.mail .bubble-wrap { width: 100%; max-width: 100%; }
  .om-app .msg.om.foto .bubble-wrap { padding: 3px 3px 4px; }
  .om-app .msg.om .meta { margin: 0; flex-wrap: wrap; }
  .om-app .msg.om .meta time, .om-app .msg.om .meta > .small, .om-app .msg.om:not(.grp) .meta b, .om-app .msg.om.me .meta b { display: none; }
  .om-app .msg.om.grp:not(.me) .meta b { color: var(--wa-verde-esc); font-size: 13px; }
  .om-app .msg.om .om-acts { display: none; }
  .om-app .msg.om.sel .om-acts { display: flex; opacity: 1; margin: 0 0 4px; }
  .om-app .msg.om .body { color: var(--wa-texto); font-size: 15px; line-height: 1.35; }
  .om-app .om-hora { display: flex; justify-content: flex-end; align-items: center; gap: 3px; margin-top: 2px; padding: 0 2px; font-size: 11px; line-height: 1; color: var(--wa-meta); }
  .om-app .om-tique { font-style: normal; font-size: 12px; letter-spacing: -4px; padding-right: 4px; color: var(--wa-meta); }
  .om-app .om-tique.lido { color: var(--wa-tique); }
  .om-app .msg.om .reply-quote { margin: 0 0 4px; border-left: 4px solid var(--wa-verde); border-radius: 6px; background: color-mix(in srgb, var(--wa-texto) 6%, transparent); }
  .om-app .msg.om .attach-img { width: 260px; max-width: 100%; max-height: 340px; object-fit: cover; margin: 0; border: 0; border-radius: 6px; }
  .om-app .msg.om video { width: 260px; max-width: 100% !important; display: block; }
  .om-app .msg.om audio { width: 250px; max-width: 100%; height: 40px; display: block; }
  .om-app .msg.om .attach { max-width: 100%; margin-top: 0; padding: 8px; border: 0; background: color-mix(in srgb, var(--wa-texto) 6%, transparent); color: var(--wa-texto); }

  /* caixa de texto: [😊 texto 🗒️ 📎 📷] (🎤 ou ➤) — enviar só aparece com texto */
  .om-app .composer { padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); background: var(--wa-bg); }
  .om-app .om-notes { max-height: 110px; margin-bottom: 6px; }
  .om-app .composer-box { display: flex; flex-wrap: wrap; align-items: stretch; border: 0; border-radius: 0; background: transparent; box-shadow: none !important; }
  .om-app .composer-tools { display: contents; }
  .om-app .composer-box > textarea:focus { outline: none; box-shadow: none; }
  .om-app .composer-reply { order: -1; flex: 0 0 100%; min-width: 0; margin-bottom: 4px; padding: 6px 4px 6px 10px; border: 0; border-left: 4px solid var(--wa-verde); border-radius: 8px; background: var(--wa-in); }
  .om-app .composer-reply > .icon { display: none; }
  .om-app .composer-reply .om-rep { display: flex; flex-direction: column; white-space: normal; }
  .om-app .composer-reply .om-rep-a { display: none; }
  .om-app .composer-reply .om-rep b { color: var(--wa-verde-esc); font-size: 13px; }
  .om-app .composer-reply .om-rep-t { color: var(--wa-meta); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .om-app .composer-reply [data-cancel-reply] { flex: none; align-self: center; }
  /* arrastando o balão para responder: tracinho verde avisa que já pode soltar */
  .om-app .msg.om.arrastando .bubble-wrap { box-shadow: -4px 0 0 var(--wa-verde), 0 1px .5px rgba(11, 20, 26, .13); }
  .om-app .msg.om .bubble-wrap { touch-action: pan-y; }
  .om-app #omHint, .om-app .om-lbl { display: none; }
  .om-app .composer-box > textarea { order: 2; flex: 1; min-width: 0; height: 48px; min-height: 48px; max-height: 160px; padding: 13px 4px; background: var(--wa-in); color: var(--wa-texto); font-size: 16px; line-height: 1.3; }
  .om-app .composer-tools > .btn:not([data-act=send]):not([data-act=mic]) { height: auto; min-height: 48px; width: 40px; padding: 0 0 12px; align-items: flex-end; border-radius: 0; background: var(--wa-in); color: var(--wa-meta); }
  .om-app .composer-tools .icon { width: 22px; height: 22px; }
  .om-app [data-act=emoji] { order: 1; width: 46px !important; padding-left: 6px !important; border-radius: 24px 0 0 24px !important; }
  .om-app [data-act=note] { order: 3; }
  .om-app [data-act=attach] { order: 4; }
  .om-app .composer-box [data-act=camera] { order: 5; display: inline-flex; }
  .om-app .composer-box:not(.tem-texto) [data-act=camera], .om-app .composer-box.tem-texto [data-act=attach] { width: 46px !important; padding-right: 6px !important; border-radius: 0 24px 24px 0 !important; }
  .om-app .composer-box.tem-texto [data-act=camera], .om-app .composer-box:not(.tem-texto) [data-act=send], .om-app .composer-box.tem-texto [data-act=mic] { display: none; }
  .om-app [data-act=send], .om-app [data-act=mic], .om-app .om-rec-ok { order: 7; align-self: flex-end; width: 48px; height: 48px; margin-left: 6px; padding: 0; border-radius: 50%; background: var(--wa-verde); color: #fff; font-size: 20px; }
  .om-app [data-act=mic].btn-danger { background: var(--vermelho); }
  /* gravando: a barra ocupa o lugar da caixa (lixeira, tempo, ➤) */
  .om-app .composer-box.gravando > textarea, .om-app .composer-box.gravando .composer-tools > * { display: none !important; }
  .om-app .om-rec { flex: 1 0 100%; min-height: 52px; margin: 0; padding: 0 2px 0 6px; border-radius: 26px; background: var(--wa-in); }
  .om-app .om-rec .om-rec-ok { width: 44px; height: 44px; margin: 0; }
}

/* 🖼️ Galeria e 🔎 Busca de mensagens (views/galeria.js) */
.gl-bar { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 8px; }
.gl-bar .input { flex: 1 1 220px; min-width: 160px; }
.gl-bar select, .gl-bar input[type=date] { padding: 7px 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: inherit; font-size: 13px; }
.gl-chip { padding: 4px 10px; border: 1px solid var(--line); border-radius: 99px; background: transparent; color: inherit; cursor: pointer; font-size: 12px; }
.gl-tabs { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 8px; }
.gl-tabs button { padding: 6px 12px; border: 0; border-bottom: 3px solid transparent; background: transparent; color: inherit; cursor: pointer; font-weight: 600; font-size: 13px; }
.gl-tabs button.active { border-bottom-color: var(--gold, #c9a227); }
.gl-list { max-height: 56vh; overflow: auto; }
.gl-mes { position: sticky; top: 0; background: var(--surface); padding: 6px 2px; font-weight: 700; font-size: 12px; opacity: .7; text-transform: capitalize; z-index: 1; }
.gl-grade { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 4px; }
.gl-tile { position: relative; aspect-ratio: 1; background: var(--surface-3); border-radius: 6px; overflow: hidden; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 30px; }
.gl-tile img { width: 100%; height: 100%; object-fit: cover; }
.gl-tile small { position: absolute; left: 0; right: 0; bottom: 0; background: rgba(0, 0, 0, .55); color: #fff; font-size: 10px; padding: 2px 4px; }
.gl-row { display: flex; gap: 10px; align-items: center; padding: 8px 4px; border-bottom: 1px solid var(--line); }
.gl-ic { width: 42px; height: 42px; flex: none; border-radius: 8px; background: var(--surface-3); display: flex; align-items: center; justify-content: center; font-size: 22px; overflow: hidden; cursor: pointer; }
.gl-ic img { width: 100%; height: 100%; object-fit: cover; }
.gl-info { flex: 1; min-width: 0; cursor: pointer; }
.gl-info b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 13px; }
.gl-info small { display: block; opacity: .7; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gl-act { display: flex; gap: 4px; flex: none; }
.gl-b { border: 1px solid var(--line); background: transparent; color: inherit; border-radius: 6px; cursor: pointer; padding: 3px 7px; text-decoration: none; font-size: 14px; }
.gl-vazio { padding: 30px; text-align: center; opacity: .7; }
.gl-hint { margin: 4px 0 8px; }
mark.gl-hit { background: #fde68a; color: #000; border-radius: 2px; }
.gl-hit-row { padding: 8px 6px; border-bottom: 1px solid var(--line); cursor: pointer; }
.gl-hit-row:hover { background: var(--surface-3); }
.gl-h { display: flex; gap: 6px; align-items: baseline; font-size: 12px; opacity: .85; }
.gl-h b { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 55%; }
.gl-h .gl-d { margin-left: auto; white-space: nowrap; }
.gl-s { font-size: 13px; margin-top: 2px; word-break: break-word; }
.om-volta-fim { position: sticky; top: 0; z-index: 2; display: flex; gap: 8px; align-items: center; justify-content: center; padding: 6px; background: var(--surface-3); border-radius: 8px; margin-bottom: 6px; font-size: 12px; }
.msg.om-flash { outline: 3px solid #00b578; border-radius: 10px; }
/* Aviso de ligação no WhatsApp (core/ligacao.js) */
#avisoLigacao { position: fixed; top: 4px; padding: 10px; left: 50%; transform: translateX(-50%); z-index: 100000; width: min(480px, 100vw); box-sizing: border-box; max-height: 98vh; overflow: auto; display: flex; flex-direction: column; gap: 10px; }
#avisoLigacao:empty { display: none; }
.al-card { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-start; background: var(--surface); color: var(--text); border: 3px solid #f59e0b; border-radius: 16px; padding: 14px; box-shadow: 0 10px 40px rgba(0,0,0,.45); }
.al-card.tocando { border-color: #16a34a; animation: al-toque 1s infinite; }
@keyframes al-toque { 0%, 100% { box-shadow: 0 0 0 0 rgba(22,163,74,.8), 0 10px 40px rgba(0,0,0,.45); } 50% { box-shadow: 0 0 0 9px rgba(22,163,74,.15), 0 10px 40px rgba(0,0,0,.45); } }
.al-foto { position: relative; width: 56px; height: 56px; flex: none; border-radius: 50%; overflow: hidden; display: flex; align-items: center; justify-content: center; background: #16a34a; color: #fff; font-size: 24px; font-weight: 700; }
.al-foto img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.al-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; font-size: 13px; overflow-wrap: anywhere; }
.al-info b { font-size: 18px; color: var(--heading); }
.al-botoes { display: flex; gap: 8px; width: 100%; }
.al-botoes .btn { flex: 1; }
.al-botoes .btn:not(.btn-primary) { border-color: var(--line); }
