/* ==========================================================================
   Terramundi · NEO — tema futurista do portal (carregado por último)
   Escuro profundo, neon ciano/teal, painéis de vidro e tipografia técnica.
   Cores de status replicam a formatação condicional do Power BI.
   ========================================================================== */

:root {
  color-scheme: dark;
  --tm-bg: #04070c;
  --tm-bg-2: #08101a;
  --tm-panel: rgba(12, 21, 33, .74);
  --tm-panel-solid: #0b1521;
  --tm-panel-2: rgba(22, 37, 55, .55);
  --tm-raise: rgba(30, 50, 72, .55);
  --tm-line: rgba(122, 205, 255, .10);
  --tm-line-2: rgba(122, 205, 255, .20);
  --tm-text: #e8f3fb;
  --tm-muted: #8ea6ba;
  --tm-dim: #5d7387;
  --tm-cyan: #36d6f5;
  --tm-cyan-2: #7ae9ff;
  --tm-teal: #21c7b0;
  --tm-brand: #4195aa;
  --tm-violet: #8b7bff;
  --tm-up: #22d47e;      /* PBI #00BF63 */
  --tm-flat: #f2c230;    /* PBI #D9B300 */
  --tm-down: #ff4d5e;    /* PBI #FF3131 */
  --tm-axis: #8ea6ba;
  --tm-grid: rgba(140, 200, 255, .08);
  --tm-glow: 0 0 0 1px rgba(54, 214, 245, .25), 0 0 28px rgba(54, 214, 245, .18);
  --tm-shadow: 0 18px 50px rgba(0, 0, 0, .45);
  --tm-radius: 16px;
  --tm-radius-sm: 10px;
  --tm-font: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --tm-display: 'Space Grotesk', 'Inter', ui-sans-serif, system-ui, sans-serif;
  --tm-mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Consolas, monospace;

  /* variáveis antigas do portal, remapeadas */
  --base: var(--tm-bg);
  --base-dark: #050a11;
  --surface: var(--tm-panel-solid);
  --surface-2: #0f1b29;
  --accent: var(--tm-cyan);
  --accent-hover: var(--tm-cyan-2);
  --muted: var(--tm-muted);
  --muted-2: var(--tm-dim);
  --border: var(--tm-line);
  --radius: var(--tm-radius);
  --shadow-card: var(--tm-shadow);
  --sidebar-w: 268px;
}

html, body { background: var(--tm-bg); }
body { font-family: var(--tm-font); color: var(--tm-text); -webkit-font-smoothing: antialiased; }
h1, h2, h3 { font-family: var(--tm-display); letter-spacing: -.01em; }
a { color: inherit; }
::selection { background: rgba(54, 214, 245, .35); color: #fff; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb { background: rgba(122, 205, 255, .18); border-radius: 10px; border: 2px solid transparent; background-clip: padding-box; }
*::-webkit-scrollbar-thumb:hover { background: rgba(122, 205, 255, .32); background-clip: padding-box; border: 2px solid transparent; }
*::-webkit-scrollbar-track { background: transparent; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.tm-num, .tm-table td, .tm-kpi-value { font-variant-numeric: tabular-nums; }

/* ---------- Shell ---------- */
.app { background: var(--tm-bg); }
.content {
  position: relative;
  background:
    radial-gradient(900px 520px at 88% -8%, rgba(54, 214, 245, .13), transparent 60%),
    radial-gradient(700px 480px at -5% 105%, rgba(139, 123, 255, .10), transparent 60%),
    linear-gradient(180deg, #060b12, #04070c 40%);
}
.content::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background-image:
    linear-gradient(rgba(122, 205, 255, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(122, 205, 255, .035) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse at 60% 20%, #000 0%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at 60% 20%, #000 0%, transparent 75%);
}
.content > * { position: relative; z-index: 1; }

.sidebar {
  width: var(--sidebar-w);
  background: linear-gradient(180deg, #060c14, #04080d);
  border-right: 1px solid var(--tm-line);
  position: relative;
}
.sidebar::after {
  content: ""; position: absolute; top: 0; right: -1px; width: 1px; height: 40%;
  background: linear-gradient(180deg, transparent, rgba(54, 214, 245, .6), transparent);
}
.sidebar-head { padding: 22px 20px 18px; border-bottom: 1px solid var(--tm-line); }
.sidebar-head img { max-height: 40px; width: auto; filter: drop-shadow(0 0 14px rgba(54, 214, 245, .15)); }
.sidebar-nav { padding: 14px 12px; display: flex; flex-direction: column; gap: 3px; overflow-y: auto; flex: 1; }
.tm-nav-label { font: 600 10px/1 var(--tm-mono); letter-spacing: .16em; text-transform: uppercase; color: var(--tm-dim); padding: 14px 12px 8px; }
.nav-link {
  position: relative; display: flex; align-items: center; gap: 11px;
  padding: 10px 12px; border-radius: 11px; color: #b6c7d6; font-weight: 500; font-size: 14px;
  transition: background .18s, color .18s, transform .18s;
}
.nav-link .icon, .nav-link svg { color: var(--tm-dim); transition: color .18s; flex: none; }
.nav-link:hover { background: rgba(122, 205, 255, .06); color: #fff; }
.nav-link:hover svg { color: var(--tm-cyan); }
.nav-link.active {
  background: linear-gradient(90deg, rgba(54, 214, 245, .16), rgba(54, 214, 245, .02));
  color: #fff; box-shadow: inset 0 0 0 1px rgba(54, 214, 245, .16);
}
.nav-link.active::before {
  content: ""; position: absolute; left: -12px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0;
  background: var(--tm-cyan); box-shadow: 0 0 12px var(--tm-cyan);
}
.nav-link.active svg { color: var(--tm-cyan); }
.nav-link .tm-nav-tag { margin-left: auto; font: 600 9px/1 var(--tm-mono); letter-spacing: .08em; padding: 4px 6px; border-radius: 6px; background: rgba(139, 123, 255, .16); color: #b9b0ff; }
.sidebar-foot { border-top: 1px solid var(--tm-line); padding: 14px 12px 16px; }
.tm-user { display: flex; align-items: center; gap: 11px; padding: 8px 8px 12px; }
.tm-avatar {
  width: 36px; height: 36px; border-radius: 11px; flex: none; display: grid; place-items: center;
  font: 700 14px/1 var(--tm-display); color: #031018;
  background: linear-gradient(135deg, var(--tm-cyan-2), var(--tm-teal));
  box-shadow: 0 0 18px rgba(54, 214, 245, .25);
}
.tm-user-info { min-width: 0; }
.sidebar-foot .u-nome { margin: 0; font-weight: 600; font-size: 13.5px; color: #fff; }
.sidebar-foot .u-mail { margin: 2px 0 0; font-size: 11.5px; color: var(--tm-dim); }
.tm-role { display: inline-flex; margin-top: 5px; font: 600 9.5px/1 var(--tm-mono); letter-spacing: .1em; text-transform: uppercase; padding: 4px 7px; border-radius: 6px; color: var(--tm-cyan); background: rgba(54, 214, 245, .1); border: 1px solid rgba(54, 214, 245, .18); }
.tm-role.is-consultor { color: #c4b9ff; background: rgba(139, 123, 255, .12); border-color: rgba(139, 123, 255, .25); }
.tm-foot-links { display: grid; gap: 3px; }
.tm-foot-links a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 9px; font-size: 13px; color: #9fb3c4; }
.tm-foot-links a:hover, .tm-foot-links a.active { background: rgba(122, 205, 255, .07); color: #fff; }
.tm-foot-links a.active { box-shadow: inset 0 0 0 1px rgba(54, 214, 245, .18); }
.tm-foot-links a svg { color: var(--tm-dim); }
.tm-foot-links a:hover svg, .tm-foot-links a.active svg { color: var(--tm-cyan); }
.tm-foot-links .is-logout:hover { color: #ffb3bb; }
.tm-foot-links .is-logout:hover svg { color: var(--tm-down); }

.topbar { background: rgba(5, 10, 17, .92); border-bottom: 1px solid var(--tm-line); backdrop-filter: blur(10px); }
.footer { background: transparent; border-top: 1px solid var(--tm-line); }
.footer .inner { color: var(--tm-dim); font-size: 12.5px; }
.drawer-overlay .drawer { background: #05090f; }

/* ---------- Componentes genéricos (páginas antigas também) ---------- */
.card {
  background: linear-gradient(160deg, rgba(16, 28, 43, .82), rgba(9, 16, 26, .86));
  border: 1px solid var(--tm-line);
  border-radius: var(--tm-radius);
  box-shadow: var(--tm-shadow), inset 0 1px rgba(255, 255, 255, .04);
  backdrop-filter: blur(14px);
}
.section-title { font-family: var(--tm-display); }
.section-title .icon, .card .section-title svg { color: var(--tm-cyan); }
.btn { border-radius: 11px; font-weight: 600; transition: transform .15s, box-shadow .2s, background .2s; }
.btn-accent, .tm-btn-primary {
  background: linear-gradient(135deg, #7ae9ff 0%, #36d6f5 45%, #21c7b0 100%);
  color: #021017; border: 0; box-shadow: 0 8px 26px rgba(54, 214, 245, .28);
}
.btn-accent:hover:not(:disabled), .tm-btn-primary:hover { transform: translateY(-1px); box-shadow: 0 10px 32px rgba(54, 214, 245, .42); background: linear-gradient(135deg, #a1f1ff, #4fe0fa 45%, #2fd8c0); }
.btn-ghost { background: rgba(122, 205, 255, .06); border: 1px solid var(--tm-line); color: #d4e4f0; }
.btn-ghost:hover:not(:disabled) { background: rgba(122, 205, 255, .12); border-color: var(--tm-line-2); }
.input, textarea.input, select.input {
  background: rgba(6, 13, 21, .8); border: 1px solid var(--tm-line-2); border-radius: 11px; color: var(--tm-text);
}
.input:focus, textarea.input:focus, select.input:focus { border-color: var(--tm-cyan); box-shadow: 0 0 0 3px rgba(54, 214, 245, .15); outline: none; }
.input option { background: #0b1521; }
.alert-error { background: rgba(255, 77, 94, .1); border: 1px solid rgba(255, 77, 94, .35); color: #ffc9cf; border-radius: 12px; }
.stat .ic, .access-avatar, .portal-modal-icon { color: var(--tm-cyan); background: rgba(54, 214, 245, .1); }
.badge { color: var(--tm-cyan); background: rgba(54, 214, 245, .12); }
.list-item, .link-item, .week .day, .toast { background: rgba(18, 31, 47, .6); border-color: var(--tm-line); }
.portal-modal-overlay { background: rgba(2, 5, 9, .72); backdrop-filter: blur(6px); }
.portal-modal { border: 1px solid var(--tm-line-2); box-shadow: var(--tm-glow), var(--tm-shadow); }

/* ---------- Login ---------- */
.login-wrap {
  background:
    radial-gradient(700px 420px at 80% 10%, rgba(54, 214, 245, .16), transparent 60%),
    radial-gradient(600px 420px at 10% 95%, rgba(139, 123, 255, .14), transparent 60%),
    #04070c;
  position: relative; overflow: hidden;
}
.login-wrap::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(rgba(122, 205, 255, .05) 1px, transparent 1px), linear-gradient(90deg, rgba(122, 205, 255, .05) 1px, transparent 1px);
  background-size: 40px 40px; mask-image: radial-gradient(circle at 50% 45%, #000, transparent 70%); -webkit-mask-image: radial-gradient(circle at 50% 45%, #000, transparent 70%);
}
.login-box { position: relative; z-index: 1; }
.login-box .card { border-color: var(--tm-line-2); box-shadow: var(--tm-glow), var(--tm-shadow); }
.login-box h1 { font-family: var(--tm-display); }

/* ==========================================================================
   Dashboards (tm-*)
   ========================================================================== */
.tm-page { padding: 26px 28px 40px; display: flex; flex-direction: column; gap: 18px; max-width: 1760px; margin: 0 auto; width: 100%; }
.tm-page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.tm-eyebrow { display: inline-flex; align-items: center; gap: 8px; font: 600 11px/1 var(--tm-mono); letter-spacing: .2em; text-transform: uppercase; color: var(--tm-cyan); }
.tm-eyebrow::before { content: ""; width: 18px; height: 1px; background: var(--tm-cyan); box-shadow: 0 0 8px var(--tm-cyan); }
.tm-page-title h1 { margin: 10px 0 4px; font-size: clamp(24px, 2.4vw, 34px); font-weight: 700; color: #fff; }
.tm-page-title h1 .tm-grad { background: linear-gradient(90deg, #fff, var(--tm-cyan-2) 60%, var(--tm-teal)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.tm-page-title p { margin: 0; color: var(--tm-muted); font-size: 14px; }

.tm-update { display: flex; align-items: center; gap: 12px; padding: 11px 16px; border-radius: 14px; background: var(--tm-panel); border: 1px solid var(--tm-line); backdrop-filter: blur(12px); }
.tm-update small { display: block; font: 600 10px/1.2 var(--tm-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--tm-dim); }
.tm-update strong { display: block; font: 600 15px/1.3 var(--tm-mono); color: #fff; margin-top: 3px; }
.tm-update em { display: block; font-style: normal; font-size: 11.5px; color: var(--tm-muted); max-width: 230px; }
.tm-pulse { width: 10px; height: 10px; border-radius: 50%; background: var(--tm-up); box-shadow: 0 0 0 0 rgba(34, 212, 126, .6); animation: tmPulse 2.2s infinite; flex: none; }
.tm-update.is-stale .tm-pulse { background: var(--tm-flat); animation-name: tmPulseWarn; }
@keyframes tmPulse { 0% { box-shadow: 0 0 0 0 rgba(34, 212, 126, .55); } 70% { box-shadow: 0 0 0 10px rgba(34, 212, 126, 0); } 100% { box-shadow: 0 0 0 0 rgba(34, 212, 126, 0); } }
@keyframes tmPulseWarn { 0% { box-shadow: 0 0 0 0 rgba(242, 194, 48, .55); } 70% { box-shadow: 0 0 0 10px rgba(242, 194, 48, 0); } 100% { box-shadow: 0 0 0 0 rgba(242, 194, 48, 0); } }

/* Abas */
.tm-tabs { display: flex; gap: 6px; padding: 5px; border-radius: 14px; background: rgba(6, 12, 20, .7); border: 1px solid var(--tm-line); width: max-content; max-width: 100%; overflow-x: auto; }
.tm-tabs a { display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 10px; font-size: 13.5px; font-weight: 600; color: var(--tm-muted); white-space: nowrap; transition: .18s; }
.tm-tabs a:hover { color: #fff; background: rgba(122, 205, 255, .06); }
.tm-tabs a.active { color: #021017; background: linear-gradient(135deg, #7ae9ff, #36d6f5 55%, #21c7b0); box-shadow: 0 6px 20px rgba(54, 214, 245, .3); }
.tm-tabs a.active svg { color: #021017; }

/* ---------- Barra de filtros ---------- */
.tm-filterbar {
  position: sticky; top: 0; z-index: 40;
  margin: 0 -6px; padding: 10px 12px; border-radius: 16px;
  background: rgba(7, 13, 21, .84); border: 1px solid var(--tm-line); backdrop-filter: blur(16px) saturate(1.3);
  box-shadow: 0 12px 34px rgba(0, 0, 0, .35);
}
.tm-filterbar.is-loading { opacity: .75; pointer-events: none; }
.tm-filterbar.is-loading::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: 0; height: 2px; background: linear-gradient(90deg, transparent, var(--tm-cyan), transparent); background-size: 50% 100%; animation: tmScan 1s linear infinite; }
@keyframes tmScan { from { background-position: -50% 0; } to { background-position: 150% 0; } }
.tm-filterbar-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.tm-filterbar-title { display: inline-flex; align-items: center; gap: 7px; font: 600 11px/1 var(--tm-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--tm-cyan); padding: 0 8px 0 4px; margin-right: 2px; border-right: 1px solid var(--tm-line); height: 30px; }
.tm-filterbar-actions { margin-left: auto; display: flex; gap: 8px; }
.tm-filter { position: relative; }
.tm-filter-trigger {
  display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px; border-radius: 11px;
  background: rgba(18, 31, 47, .7); border: 1px solid var(--tm-line); color: var(--tm-text); cursor: pointer;
  font: 500 13px/1 var(--tm-font); max-width: 260px; transition: border-color .18s, background .18s, box-shadow .18s;
}
.tm-filter-trigger:hover { border-color: var(--tm-line-2); background: rgba(24, 41, 61, .8); }
.tm-filter.is-open .tm-filter-trigger { border-color: var(--tm-cyan); box-shadow: 0 0 0 3px rgba(54, 214, 245, .14); }
.tm-filter.is-active .tm-filter-trigger { border-color: rgba(54, 214, 245, .45); background: linear-gradient(135deg, rgba(54, 214, 245, .14), rgba(33, 199, 176, .06)); }
.tm-filter-label { color: var(--tm-dim); font-size: 11px; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; white-space: nowrap; }
.tm-filter-value { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; color: #dbe9f4; }
.tm-filter.is-active .tm-filter-value { color: #fff; }
.tm-filter-count { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; display: inline-grid; place-items: center; font: 700 11px/1 var(--tm-mono); color: #021017; background: var(--tm-cyan); }
.tm-filter-chev { color: var(--tm-dim); transition: transform .2s; flex: none; }
.tm-filter.is-open .tm-filter-chev { transform: rotate(180deg); color: var(--tm-cyan); }
.tm-filter-locked .tm-filter-trigger { cursor: default; border-style: dashed; color: #c4b9ff; background: rgba(139, 123, 255, .08); }
.tm-filter-locked svg { color: #b9b0ff; }

.tm-filter-pop {
  position: absolute; top: calc(100% + 8px); left: 0; z-index: 60; width: 300px;
  background: linear-gradient(170deg, rgba(14, 25, 39, .98), rgba(8, 15, 24, .98));
  border: 1px solid var(--tm-line-2); border-radius: 14px; box-shadow: var(--tm-shadow), 0 0 0 1px rgba(0, 0, 0, .4), 0 0 40px rgba(54, 214, 245, .08);
  animation: tmPop .16s ease-out; overflow: hidden;
}
.tm-filter-pop.align-right { left: auto; right: 0; }
.tm-filter-pop-wide { width: 360px; }
@keyframes tmPop { from { opacity: 0; transform: translateY(-6px) scale(.98); } to { opacity: 1; transform: none; } }
.tm-filter-pop-head { display: flex; justify-content: space-between; align-items: baseline; padding: 12px 14px 8px; }
.tm-filter-pop-head strong { font: 600 14px/1.2 var(--tm-display); color: #fff; }
.tm-filter-pop-head span { font: 500 11px/1 var(--tm-mono); color: var(--tm-dim); }
.tm-filter-search { padding: 0 12px 8px; }
.tm-filter-search input, .tm-filter-text input {
  width: 100%; height: 36px; border-radius: 10px; border: 1px solid var(--tm-line-2); background: rgba(4, 9, 15, .8);
  color: var(--tm-text); padding: 0 12px; font: 500 13px var(--tm-font); outline: none;
}
.tm-filter-search input:focus, .tm-filter-text input:focus { border-color: var(--tm-cyan); box-shadow: 0 0 0 3px rgba(54, 214, 245, .14); }
.tm-filter-tools { display: flex; gap: 6px; padding: 0 12px 8px; }
.tm-filter-tools button { flex: 1; height: 28px; border-radius: 8px; border: 1px solid var(--tm-line); background: rgba(122, 205, 255, .05); color: #b9cddd; font: 600 11.5px var(--tm-font); cursor: pointer; }
.tm-filter-tools button:hover { border-color: var(--tm-line-2); color: #fff; }
.tm-filter-options { max-height: 290px; overflow-y: auto; padding: 4px 8px 8px; border-top: 1px solid var(--tm-line); }
.tm-filter-empty { color: var(--tm-dim); font-size: 12.5px; padding: 10px; margin: 0; }
.tm-filter-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border-top: 1px solid var(--tm-line); background: rgba(4, 9, 15, .5); }
.tm-filter-hint { font: 500 11px/1 var(--tm-mono); color: var(--tm-dim); }
.tm-check { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 8px; cursor: pointer; font-size: 13px; color: #cfdeea; user-select: none; }
.tm-check:hover { background: rgba(122, 205, 255, .07); color: #fff; }
.tm-check.is-hidden, .tm-tree-group.is-hidden { display: none; }
.tm-check input { position: absolute; opacity: 0; pointer-events: none; }
.tm-box { width: 17px; height: 17px; border-radius: 5px; border: 1.5px solid rgba(142, 166, 186, .55); flex: none; display: grid; place-items: center; transition: .15s; }
.tm-check input:checked + .tm-box { background: var(--tm-cyan); border-color: var(--tm-cyan); box-shadow: 0 0 10px rgba(54, 214, 245, .45); }
.tm-check input:checked + .tm-box::after { content: ""; width: 9px; height: 5px; border: 2px solid #021017; border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px); }
.tm-check input:focus-visible + .tm-box { outline: 2px solid var(--tm-cyan-2); outline-offset: 2px; }
.tm-txt { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: flex; align-items: center; gap: 8px; }
.tm-txt small { font: 600 10px/1 var(--tm-mono); color: var(--tm-dim); padding: 3px 6px; border-radius: 6px; background: rgba(122, 205, 255, .06); }
.tm-tree-head { display: flex; align-items: center; gap: 2px; }
.tm-tree-head .tm-check { flex: 1; }
.tm-tree-toggle { width: 26px; height: 26px; border: 0; background: none; color: var(--tm-dim); cursor: pointer; border-radius: 7px; display: grid; place-items: center; }
.tm-tree-toggle:hover { background: rgba(122, 205, 255, .08); color: var(--tm-cyan); }
.tm-tree-toggle svg { transform: rotate(-90deg); transition: transform .18s; }
.tm-tree-group.is-open .tm-tree-toggle svg { transform: none; color: var(--tm-cyan); }
.tm-tree-spacer { width: 26px; flex: none; }
.tm-tree-children { display: none; padding-left: 28px; border-left: 1px dashed var(--tm-line-2); margin-left: 13px; }
.tm-tree-group.is-open .tm-tree-children { display: block; }
.tm-filter-text { position: relative; display: inline-flex; align-items: center; }
.tm-filter-text svg { position: absolute; left: 11px; color: var(--tm-dim); pointer-events: none; }
.tm-filter-text input { width: 190px; height: 38px; padding-left: 32px; background: rgba(18, 31, 47, .7); border-color: var(--tm-line); }
.tm-filter-text.is-active input { border-color: rgba(54, 214, 245, .45); }
.tm-chips { display: flex; flex-wrap: wrap; gap: 6px; padding-top: 10px; margin-top: 10px; border-top: 1px dashed var(--tm-line); }
.tm-chips[hidden] { display: none; }
.tm-chip { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 6px 0 10px; border-radius: 13px; border: 1px solid rgba(54, 214, 245, .3); background: rgba(54, 214, 245, .08); color: #dff7ff; font: 500 12px var(--tm-font); cursor: pointer; }
.tm-chip span { color: var(--tm-dim); font-size: 10.5px; text-transform: uppercase; letter-spacing: .04em; font-weight: 600; }
.tm-chip b { font-weight: 600; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tm-chip i { font-style: normal; width: 18px; height: 18px; border-radius: 9px; display: grid; place-items: center; background: rgba(255, 255, 255, .08); color: #fff; font-size: 13px; }
.tm-chip:hover { border-color: rgba(255, 77, 94, .5); background: rgba(255, 77, 94, .1); }
.tm-chip:hover i { background: var(--tm-down); }

/* ---------- Botões tm ---------- */
.tm-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 38px; padding: 0 16px; border-radius: 11px; font: 600 13.5px var(--tm-font); border: 1px solid transparent; cursor: pointer; white-space: nowrap; text-decoration: none; transition: .18s; }
.tm-btn-sm { height: 32px; padding: 0 12px; font-size: 12.5px; border-radius: 9px; }
.tm-btn-ghost { background: rgba(122, 205, 255, .06); border-color: var(--tm-line); color: #d4e4f0; }
.tm-btn-ghost:hover { background: rgba(122, 205, 255, .12); border-color: var(--tm-line-2); color: #fff; }
.tm-btn-danger { background: rgba(255, 77, 94, .1); border-color: rgba(255, 77, 94, .35); color: #ffc0c7; }
.tm-btn-danger:hover { background: rgba(255, 77, 94, .2); }
.tm-btn:disabled { opacity: .5; cursor: not-allowed; }

/* ---------- Painéis ---------- */
.tm-panel {
  position: relative; min-width: 0;
  background: linear-gradient(165deg, rgba(15, 27, 42, .78), rgba(8, 15, 24, .82));
  border: 1px solid var(--tm-line); border-radius: var(--tm-radius); padding: 18px 20px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, .32), inset 0 1px rgba(255, 255, 255, .035);
  backdrop-filter: blur(12px);
}
.tm-panel::before {
  content: ""; position: absolute; left: 22px; right: 22px; top: -1px; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(54, 214, 245, .55), transparent);
}
.tm-panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 14px; }
.tm-kicker { font: 600 10px/1 var(--tm-mono); letter-spacing: .18em; text-transform: uppercase; color: var(--tm-cyan); opacity: .85; }
.tm-panel-head h2 { margin: 7px 0 0; font-size: 17px; font-weight: 600; color: #fff; }
.tm-panel-head p { margin: 4px 0 0; color: var(--tm-muted); font-size: 12.5px; }
.tm-panel-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.tm-grid { display: grid; gap: 16px; }
.tm-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tm-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tm-grid-12 { grid-template-columns: repeat(12, minmax(0, 1fr)); }
.tm-span-4 { grid-column: span 4; } .tm-span-5 { grid-column: span 5; } .tm-span-6 { grid-column: span 6; } .tm-span-7 { grid-column: span 7; } .tm-span-8 { grid-column: span 8; } .tm-span-12 { grid-column: 1 / -1; }
.tm-empty { color: var(--tm-dim); font-size: 13px; text-align: center; padding: 34px 10px; margin: 0; }
.tm-chart { position: relative; width: 100%; }
.tm-chart-skeleton { position: absolute; inset: 10px 0; border-radius: 10px; background: linear-gradient(90deg, rgba(122, 205, 255, .03), rgba(122, 205, 255, .08), rgba(122, 205, 255, .03)); background-size: 200% 100%; animation: tmShimmer 1.4s infinite; }
@keyframes tmShimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.apexcharts-tooltip.apexcharts-theme-dark { background: rgba(8, 15, 24, .96) !important; border: 1px solid var(--tm-line-2) !important; box-shadow: var(--tm-shadow) !important; border-radius: 10px !important; }
.apexcharts-tooltip-title { background: rgba(122, 205, 255, .06) !important; border-bottom: 1px solid var(--tm-line) !important; font-family: var(--tm-display) !important; }
.apexcharts-xaxistooltip { display: none; }
.apexcharts-legend-text { color: var(--tm-muted) !important; }
.tm-apx-tip { padding: 8px 12px; display: grid; gap: 3px; font-size: 12px; }
.tm-apx-tip span { font: 600 13px var(--tm-mono); color: var(--tm-cyan); }

/* ---------- KPIs ---------- */
.tm-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.tm-kpi { position: relative; padding: 14px 15px; border-radius: 13px; background: rgba(4, 9, 15, .55); border: 1px solid var(--tm-line); overflow: hidden; }
.tm-kpi::after { content: ""; position: absolute; right: -30px; top: -30px; width: 90px; height: 90px; border-radius: 50%; background: radial-gradient(circle, rgba(54, 214, 245, .14), transparent 70%); }
.tm-kpi-label { display: block; font: 600 10.5px/1.25 var(--tm-font); letter-spacing: .04em; text-transform: uppercase; color: var(--tm-muted); }
.tm-kpi-value { display: block; margin-top: 8px; font: 700 24px/1 var(--tm-display); color: #fff; letter-spacing: -.02em; white-space: nowrap; }
.tm-kpi-sub { display: block; margin-top: 7px; font-size: 11.5px; color: var(--tm-dim); }
.tm-kpi.is-high { border-color: rgba(34, 212, 126, .35); } .tm-kpi.is-high .tm-kpi-value { color: var(--tm-up); text-shadow: 0 0 18px rgba(34, 212, 126, .35); }
.tm-kpi.is-mid { border-color: rgba(242, 194, 48, .35); } .tm-kpi.is-mid .tm-kpi-value { color: var(--tm-flat); text-shadow: 0 0 18px rgba(242, 194, 48, .3); }
.tm-kpi.is-low { border-color: rgba(255, 77, 94, .35); } .tm-kpi.is-low .tm-kpi-value { color: var(--tm-down); text-shadow: 0 0 18px rgba(255, 77, 94, .3); }
.tm-kpi.is-accent .tm-kpi-value { color: var(--tm-cyan-2); text-shadow: 0 0 22px rgba(54, 214, 245, .35); }
.tm-progress { margin-top: 10px; height: 5px; border-radius: 5px; background: rgba(255, 255, 255, .06); overflow: hidden; }
.tm-progress i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--tm-teal), var(--tm-cyan)); box-shadow: 0 0 10px var(--tm-cyan); }
.tm-kpi.is-high .tm-progress i { background: var(--tm-up); box-shadow: 0 0 10px var(--tm-up); }
.tm-kpi.is-mid .tm-progress i { background: var(--tm-flat); box-shadow: 0 0 10px var(--tm-flat); }
.tm-kpi.is-low .tm-progress i { background: var(--tm-down); box-shadow: 0 0 10px var(--tm-down); }

/* ---------- Indicadores condicionais ---------- */
.tm-trend { display: inline-flex; align-items: center; gap: 5px; font: 600 12.5px/1 var(--tm-mono); white-space: nowrap; padding: 4px 7px; border-radius: 7px; }
.tm-trend i { font-style: normal; font-size: 9px; }
.tm-trend.is-up { color: var(--tm-up); background: rgba(34, 212, 126, .1); }
.tm-trend.is-down { color: var(--tm-down); background: rgba(255, 77, 94, .1); }
.tm-trend.is-flat { color: var(--tm-flat); background: rgba(242, 194, 48, .1); }
.tm-trend.is-none { color: var(--tm-dim); background: none; }
.tm-meta { display: inline-flex; align-items: center; gap: 7px; font: 600 12.5px/1 var(--tm-mono); white-space: nowrap; }
.tm-meta i { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.tm-meta.is-high { color: var(--tm-up); } .tm-meta.is-high i { background: var(--tm-up); box-shadow: 0 0 8px var(--tm-up); }
.tm-meta.is-mid { color: var(--tm-flat); } .tm-meta.is-mid i { background: var(--tm-flat); box-shadow: 0 0 8px var(--tm-flat); }
.tm-meta.is-low { color: var(--tm-down); } .tm-meta.is-low i { background: var(--tm-down); box-shadow: 0 0 8px var(--tm-down); }
.tm-meta.is-none { color: var(--tm-dim); }
.tm-move { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 6px; font-size: 10px; margin-right: 6px; vertical-align: middle; }
.tm-move.is-up { color: var(--tm-up); background: rgba(34, 212, 126, .12); }
.tm-move.is-down { color: var(--tm-down); background: rgba(255, 77, 94, .12); }
.tm-move.is-flat { color: var(--tm-flat); background: rgba(242, 194, 48, .12); }
.tm-move.is-none { color: var(--tm-dim); }
.tm-score { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; font: 700 12.5px/1 var(--tm-mono); }
.tm-score.s0 { color: var(--tm-dim); }
.tm-score.s1 { color: #ffd0d5; background: rgba(255, 77, 94, .22); box-shadow: inset 0 0 0 1px rgba(255, 77, 94, .4); }
.tm-score.s2 { color: #ffd9c2; background: rgba(255, 140, 84, .2); box-shadow: inset 0 0 0 1px rgba(255, 140, 84, .38); }
.tm-score.s3 { color: #fff0bf; background: rgba(242, 194, 48, .18); box-shadow: inset 0 0 0 1px rgba(242, 194, 48, .36); }
.tm-score.s4 { color: #cdf7e3; background: rgba(34, 212, 126, .16); box-shadow: inset 0 0 0 1px rgba(34, 212, 126, .34); }
.tm-score.s5 { color: #021017; background: linear-gradient(135deg, #7ae9ff, #22d47e); box-shadow: 0 0 12px rgba(34, 212, 126, .45); }
.tm-databar { position: relative; display: block; min-width: 110px; padding: 3px 0; }
.tm-databar i { position: absolute; left: 0; top: 50%; height: 22px; transform: translateY(-50%); border-radius: 5px; background: linear-gradient(90deg, rgba(54, 214, 245, .26), rgba(54, 214, 245, .06)); border-left: 2px solid var(--tm-cyan); }
.tm-databar.tone-violet i { background: linear-gradient(90deg, rgba(139, 123, 255, .3), rgba(139, 123, 255, .06)); border-left-color: var(--tm-violet); }
.tm-databar.tone-green i { background: linear-gradient(90deg, rgba(34, 212, 126, .26), rgba(34, 212, 126, .05)); border-left-color: var(--tm-up); }
.tm-databar b { position: relative; font-weight: 600; padding-left: 8px; }
.tm-seg { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; font-weight: 500; }
.tm-seg i { width: 10px; height: 10px; border-radius: 3px; flex: none; box-shadow: 0 0 10px currentColor; }

/* ---------- Tabelas ---------- */
.tm-table-wrap { overflow: auto; border-radius: 12px; border: 1px solid var(--tm-line); background: rgba(3, 7, 12, .45); max-height: 560px; }
.tm-table-wrap.is-tall { max-height: 74vh; }
.tm-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
.tm-table th {
  position: sticky; top: 0; z-index: 2; text-align: left; white-space: nowrap;
  padding: 11px 12px; font: 600 10.5px/1.2 var(--tm-font); letter-spacing: .06em; text-transform: uppercase; color: var(--tm-muted);
  background: linear-gradient(180deg, #0d1826, #0a131e); border-bottom: 1px solid var(--tm-line-2);
}
.tm-table th.is-num, .tm-table td.is-num { text-align: right; }
.tm-table th.is-sortable { cursor: pointer; }
.tm-table th.is-sortable:hover { color: #fff; }
.tm-table th[data-dir]::after { content: " ▼"; color: var(--tm-cyan); font-size: 8px; }
.tm-table th[data-dir="asc"]::after { content: " ▲"; }
.tm-table td { padding: 10px 12px; border-bottom: 1px solid rgba(122, 205, 255, .06); white-space: nowrap; color: #d6e5f1; }
.tm-table td.is-num { font-family: var(--tm-mono); font-size: 12.5px; }
/* Textos quebram linha para as colunas de números continuarem visíveis (sem rolagem lateral). */
.tm-table td { padding-left: 10px; padding-right: 10px; }
.tm-table th { padding-left: 10px; padding-right: 10px; }
.tm-table td:not(.is-num) { white-space: normal; overflow-wrap: anywhere; min-width: 92px; line-height: 1.35; }
.tm-table td:first-child { min-width: 132px; }
.tm-table th { white-space: normal; }
.tm-table th:first-child { min-width: 132px; }
.tm-table td.is-num .tm-trend { padding: 3px 6px; font-size: 12px; }
.tm-tree .tm-tt-cell > span:last-child { min-width: 0; }
.tm-wrap-text { display: block; min-width: 200px; max-width: 460px; white-space: normal; }
.tm-table .tm-tag, .tm-table .tm-trend, .tm-table .tm-meta, .tm-table .tm-seg { white-space: nowrap; }
.tm-table tbody tr { transition: background .12s; }
.tm-table tbody tr:hover td { background: rgba(54, 214, 245, .05); }
.tm-table td:first-child, .tm-table th:first-child { position: sticky; left: 0; z-index: 1; }
.tm-table th:first-child { z-index: 3; }
.tm-table td:first-child { background: rgba(7, 13, 21, .96); }
.tm-table tbody tr:hover td:first-child { background: #0c1a27; }
.tm-table tr.tm-total td { position: sticky; bottom: 0; z-index: 1; background: #0d1a28; border-top: 1px solid var(--tm-line-2); font-weight: 700; color: #fff; }
.tm-table tr.tm-total td:first-child { z-index: 2; }
.tm-table .tm-sub { display: block; font-size: 11px; color: var(--tm-dim); margin-top: 2px; }
.tm-table tr.is-pareto td:first-child { box-shadow: inset 3px 0 0 var(--tm-cyan); }
.tm-rank { display: inline-grid; place-items: center; min-width: 30px; height: 24px; padding: 0 7px; border-radius: 7px; font: 700 12px/1 var(--tm-mono); color: #cfe0ec; background: rgba(122, 205, 255, .07); }
.tm-rank.is-pareto { color: #021017; background: linear-gradient(135deg, #7ae9ff, #4195aa); box-shadow: 0 0 12px rgba(65, 149, 170, .55); }
.tm-col-group { text-align: center !important; color: var(--tm-cyan) !important; border-left: 1px solid var(--tm-line-2); }
.tm-table th.tm-gs, .tm-table td.tm-gs { border-left: 1px solid rgba(122, 205, 255, .12); }

/* Tabela-sanfona */
.tm-tree tr[hidden] { display: none; }
.tm-tree td.tm-tt-cell { display: flex; align-items: center; gap: 6px; min-width: 240px; }
.tm-tree tr[data-tt-level="1"] td.tm-tt-cell { padding-left: 36px; }
.tm-tree tr[data-tt-level="2"] td.tm-tt-cell { padding-left: 62px; }
.tm-tree tr[data-tt-level="0"] td { font-weight: 600; color: #f2f9ff; }
.tm-tree tr[data-tt-level="1"] td { color: #c9d9e6; }
.tm-tree tr[data-tt-level="2"] td { color: #aebfce; font-size: 12.5px; }
.tm-tree tr[data-tt-level="1"] td:first-child { background: rgba(10, 19, 30, .97); }
.tm-tree tr[data-tt-level="2"] td:first-child { background: rgba(12, 22, 34, .97); }
.tm-tt-btn {
  width: 22px; height: 22px; flex: none; display: grid; place-items: center; border-radius: 7px; cursor: pointer;
  border: 1px solid var(--tm-line-2); background: rgba(54, 214, 245, .06); color: var(--tm-cyan); font: 700 13px/1 var(--tm-mono); padding: 0;
}
.tm-tt-btn:hover { background: rgba(54, 214, 245, .16); box-shadow: 0 0 12px rgba(54, 214, 245, .3); }
.tm-tt-btn::before { content: "+"; }
.tr-open .tm-tt-btn::before, tr.is-open > td .tm-tt-btn::before { content: "−"; }
.tm-tt-leaf { width: 22px; flex: none; display: grid; place-items: center; }
.tm-tt-leaf::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--tm-dim); }
.tm-tree tr.is-open > td { background: rgba(54, 214, 245, .045); }

/* ---------- Explicação RFV / legenda ---------- */
.tm-legend { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.tm-legend-card { padding: 14px 16px; border-radius: 13px; background: rgba(4, 9, 15, .5); border: 1px solid var(--tm-line); }
.tm-legend-card h3 { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; font-size: 14px; color: #fff; }
.tm-legend-card h3 b { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; font: 700 14px var(--tm-mono); color: #021017; background: linear-gradient(135deg, #7ae9ff, #21c7b0); box-shadow: 0 0 14px rgba(54, 214, 245, .35); }
.tm-legend-card h3 small { font: 500 11.5px var(--tm-font); color: var(--tm-muted); }
.tm-bands { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 5px; }
.tm-band { padding: 7px 6px; border-radius: 8px; text-align: center; background: rgba(122, 205, 255, .05); border: 1px solid var(--tm-line); }
.tm-band b { display: block; font: 700 12px var(--tm-mono); color: var(--tm-cyan); }
.tm-band span { display: block; font-size: 10.5px; color: var(--tm-muted); margin-top: 3px; line-height: 1.25; }
.tm-band.b5 { border-color: rgba(34, 212, 126, .4); } .tm-band.b5 b { color: var(--tm-up); }
.tm-band.b1 { border-color: rgba(255, 77, 94, .35); } .tm-band.b1 b { color: var(--tm-down); }
details.tm-details > summary { cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
details.tm-details > summary::-webkit-details-marker { display: none; }
details.tm-details > summary .tm-sum-ico { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; border: 1px solid var(--tm-line-2); color: var(--tm-cyan); transition: transform .2s; }
details.tm-details[open] > summary .tm-sum-ico { transform: rotate(180deg); }
.tm-details-body { margin-top: 14px; display: grid; gap: 14px; }

/* ---------- RFV ---------- */
.tm-rfv-top { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 16px; }
.tm-rfv-map { width: 100%; height: auto; display: block; }
.tm-rfv-map .reg path { stroke: #04070c; stroke-width: 3; transition: filter .2s, opacity .2s; }
.tm-rfv-map .reg:hover path { filter: brightness(1.15) drop-shadow(0 0 10px rgba(255, 255, 255, .25)); }
.tm-rfv-map .reg text { pointer-events: none; }
.tm-rfv-map .lbl { font: 600 12px var(--tm-font); fill: #06121a; }
.tm-rfv-map .val { font: 700 17px var(--tm-mono); fill: #021017; }
.tm-rfv-map .ax text { font: 500 11px var(--tm-mono); fill: var(--tm-dim); }
.tm-rfv-map .ax .ttl { font: 600 11px var(--tm-font); fill: var(--tm-muted); letter-spacing: .1em; text-transform: uppercase; }
.tm-rfv-map .halo { fill: none; stroke: rgba(54, 214, 245, .35); stroke-width: 1; }
.tm-segs { display: grid; gap: 4px; }
.tm-seg-row {
  display: grid; grid-template-columns: minmax(0, 1fr) 84px 122px 22px; align-items: center; gap: 10px;
  padding: 9px 10px; border-radius: 10px; border: 1px solid transparent; transition: .15s; color: #d9e7f2;
}
.tm-seg-row:hover { background: rgba(122, 205, 255, .06); border-color: var(--tm-line); }
.tm-seg-row .tm-seg-name { display: flex; flex-direction: column; min-width: 0; }
.tm-seg-row .tm-seg-name small { font-size: 11px; color: var(--tm-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tm-seg-row .tm-seg-bar { position: relative; height: 4px; border-radius: 4px; background: rgba(255, 255, 255, .05); margin-top: 6px; overflow: hidden; }
.tm-seg-row .tm-seg-bar i { position: absolute; inset: 0 auto 0 0; border-radius: inherit; }
.tm-seg-row strong { font: 600 13px var(--tm-mono); text-align: right; color: #fff; }
.tm-seg-row .tm-seg-pct { display: block; font: 500 10.5px var(--tm-mono); color: var(--tm-dim); }
.tm-seg-row .tm-go { color: var(--tm-dim); }
.tm-seg-row:hover .tm-go { color: var(--tm-cyan); }
.tm-seg-head { display: grid; grid-template-columns: minmax(0, 1fr) 84px 122px 22px; gap: 10px; padding: 0 10px 8px; font: 600 10px var(--tm-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--tm-dim); border-bottom: 1px solid var(--tm-line); margin-bottom: 4px; }
.tm-seg-head span:not(:first-child) { text-align: right; }
.tm-seg-total { display: grid; grid-template-columns: minmax(0, 1fr) 84px 122px 22px; gap: 10px; padding: 10px; border-top: 1px solid var(--tm-line-2); margin-top: 4px; font-weight: 700; color: #fff; }
.tm-seg-total strong { font: 700 13px var(--tm-mono); text-align: right; }
.tm-segpick { display: flex; flex-wrap: wrap; gap: 8px; }
.tm-segpick label { position: relative; cursor: pointer; }
.tm-segpick input { position: absolute; opacity: 0; }
.tm-segpick span { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 13px; border-radius: 10px; border: 1px solid var(--tm-line); background: rgba(18, 31, 47, .6); font-size: 12.5px; color: #c6d6e3; transition: .15s; }
.tm-segpick span i { width: 9px; height: 9px; border-radius: 3px; }
.tm-segpick input:checked + span { border-color: rgba(54, 214, 245, .55); background: rgba(54, 214, 245, .12); color: #fff; box-shadow: 0 0 0 1px rgba(54, 214, 245, .2), 0 0 18px rgba(54, 214, 245, .12); }
.tm-segpick input:focus-visible + span { outline: 2px solid var(--tm-cyan); outline-offset: 2px; }
.tm-segpick small { font: 600 10.5px var(--tm-mono); color: var(--tm-dim); }
.tm-detail-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--tm-line); }
.tm-note { font-size: 12px; color: var(--tm-dim); margin: 10px 2px 0; }
.tm-callout { display: flex; gap: 12px; align-items: flex-start; padding: 13px 16px; border-radius: 13px; border: 1px solid rgba(242, 194, 48, .35); background: rgba(242, 194, 48, .07); color: #f6e3a8; font-size: 13px; }
.tm-callout.is-info { border-color: rgba(54, 214, 245, .3); background: rgba(54, 214, 245, .06); color: #cdeefa; }
.tm-callout.is-ok { border-color: rgba(34, 212, 126, .35); background: rgba(34, 212, 126, .07); color: #c9f6de; }
.tm-callout.is-err { border-color: rgba(255, 77, 94, .4); background: rgba(255, 77, 94, .08); color: #ffd0d5; }
.tm-callout b { color: #fff; }

/* ---------- Pareto ---------- */
.tm-pareto-hero { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
.tm-pareto-sum h2 { font-size: clamp(18px, 1.6vw, 23px); line-height: 1.35; margin: 10px 0 8px; color: #fff; font-weight: 600; }
.tm-pareto-sum h2 em { font-style: normal; color: var(--tm-cyan-2); text-shadow: 0 0 18px rgba(54, 214, 245, .35); }
.tm-pareto-sum p { color: var(--tm-muted); margin: 0; font-size: 13.5px; line-height: 1.55; }
.tm-pareto-sum p strong { color: #fff; font-family: var(--tm-mono); font-weight: 600; }
.tm-waffle { display: flex; align-items: center; gap: 18px; }
.tm-waffle-dots { display: grid; grid-template-columns: repeat(10, 1fr); gap: 4px; width: 140px; flex: none; }
.tm-waffle-dots i { aspect-ratio: 1; border-radius: 3px; background: rgba(122, 205, 255, .08); }
.tm-waffle-dots i.on { background: linear-gradient(135deg, #7ae9ff, #4195aa); box-shadow: 0 0 6px rgba(54, 214, 245, .45); }
.tm-waffle-dots.is-violet i.on { background: linear-gradient(135deg, #c4b9ff, #8b7bff); box-shadow: 0 0 6px rgba(139, 123, 255, .5); }
.tm-waffle strong { display: block; font: 700 34px/1 var(--tm-display); color: #fff; }
.tm-waffle span { display: block; margin-top: 6px; font-size: 12.5px; color: var(--tm-muted); }
.tm-waffle small { display: block; margin-top: 8px; font: 500 11px var(--tm-mono); color: var(--tm-dim); }

/* ---------- Pré-Vendas ---------- */
.tm-pv-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; }
.tm-pv-grid > .tm-panel { grid-column: span 6; }
.tm-pv-grid > .tm-panel.is-wide { grid-column: 1 / -1; }
.tm-pv-grid > .tm-panel.is-5 { grid-column: span 5; }
.tm-pv-grid > .tm-panel.is-7 { grid-column: span 7; }
.tm-kpi-group h3 { margin: 0 0 10px; font-size: 13px; color: var(--tm-muted); font-family: var(--tm-mono); letter-spacing: .14em; text-transform: uppercase; display: flex; align-items: center; gap: 8px; }
.tm-kpi-group h3::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--tm-cyan); box-shadow: 0 0 10px var(--tm-cyan); }
.tm-kpi-group.is-violet h3::before { background: var(--tm-violet); box-shadow: 0 0 10px var(--tm-violet); }
/* Cards de Leads/Negócios: os 5 indicadores sempre em uma linha */
.tm-panel .tm-kpi-group .tm-kpis { grid-template-columns: repeat(5, minmax(0, 1fr)) !important; gap: 8px; }
/* Com a previsão do mês são 6 cards: duas linhas de 3, sem card sozinho embaixo. */
.tm-panel .tm-kpi-group .tm-kpis:has(> .tm-kpi:nth-child(6)) { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
.tm-kpi-group .tm-kpi { padding: 11px 11px 12px; border-radius: 11px; }
.tm-kpi-group .tm-kpi-label { font-size: 9.5px; letter-spacing: .02em; min-height: 24px; }
.tm-kpi-group .tm-kpi-value { margin-top: 6px; font-size: clamp(16px, 1.35vw, 22px); }
.tm-kpi-group .tm-progress { margin-top: 8px; height: 4px; }
@media (max-width: 720px) {
  .tm-panel .tm-kpi-group .tm-kpis, .tm-panel .tm-kpi-group .tm-kpis:has(> .tm-kpi:nth-child(6)) { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}

/* ---------- Carteira de Clientes ---------- */
.tm-section { display: flex; align-items: center; gap: 14px; margin: 14px 0 -2px; padding: 12px 16px; border-radius: 14px; background: linear-gradient(90deg, rgba(54, 214, 245, .1), rgba(54, 214, 245, 0) 70%); border: 1px solid var(--tm-line); }
.tm-section-num { font: 700 13px/1 var(--tm-mono); color: #021017; background: linear-gradient(135deg, #7ae9ff, #21c7b0); padding: 7px 9px; border-radius: 9px; box-shadow: 0 0 16px rgba(54, 214, 245, .35); }
.tm-section h2 { margin: 0; font-size: 18px; color: #fff; }
.tm-section p { margin: 3px 0 0; font-size: 12.5px; color: var(--tm-muted); }
.tm-kpi-pct { font: 600 13px var(--tm-mono); color: var(--tm-muted); margin-left: 4px; }
.tm-info { display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; margin-left: 4px; vertical-align: middle; font: 700 10px/1 var(--tm-mono); color: var(--tm-cyan); border: 1px solid rgba(54, 214, 245, .5); cursor: help; text-transform: none; }
.tm-info:hover, .tm-info:focus { background: rgba(54, 214, 245, .18); outline: none; }
.tm-form-inline { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)) auto; gap: 12px; align-items: end; }
.tm-form-inline-actions { display: flex; gap: 8px; }
@media (max-width: 1100px) { .tm-form-inline { grid-template-columns: 1fr 1fr; } .tm-form-inline-actions { grid-column: 1 / -1; } }

/* ---------- Central de acessos ---------- */
.tm-users { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.tm-user-card { border: 1px solid var(--tm-line); border-radius: 14px; background: rgba(6, 12, 20, .55); transition: border-color .2s, box-shadow .2s; }
.tm-user-card:hover { border-color: var(--tm-line-2); }
.tm-user-card[open] { border-color: rgba(54, 214, 245, .4); box-shadow: 0 0 0 1px rgba(54, 214, 245, .12), 0 16px 40px rgba(0, 0, 0, .35); grid-column: 1 / -1; }
.tm-user-card > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 12px; padding: 14px; }
.tm-user-card > summary::-webkit-details-marker { display: none; }
.tm-user-card .tm-avatar { width: 40px; height: 40px; }
.tm-user-card.is-off .tm-avatar { background: linear-gradient(135deg, #4a5a6a, #2a3644); color: #9fb0bf; box-shadow: none; }
.tm-user-meta { min-width: 0; flex: 1; }
.tm-user-meta b { display: block; color: #fff; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tm-user-meta small { display: block; color: var(--tm-dim); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tm-user-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 7px; }
.tm-tag { display: inline-flex; align-items: center; gap: 5px; height: 21px; padding: 0 8px; border-radius: 6px; font: 600 10.5px/1 var(--tm-mono); letter-spacing: .04em; border: 1px solid var(--tm-line-2); color: #b9cddd; background: rgba(122, 205, 255, .05); }
.tm-tag.is-admin { color: var(--tm-cyan); border-color: rgba(54, 214, 245, .35); background: rgba(54, 214, 245, .08); }
.tm-tag.is-consultor { color: #c4b9ff; border-color: rgba(139, 123, 255, .35); background: rgba(139, 123, 255, .08); }
.tm-tag.is-off { color: #ffb3bb; border-color: rgba(255, 77, 94, .35); background: rgba(255, 77, 94, .08); }
.tm-tag.is-warn { color: #ffe08a; border-color: rgba(242, 194, 48, .35); background: rgba(242, 194, 48, .08); }
.tm-user-body { padding: 4px 16px 16px; border-top: 1px solid var(--tm-line); }
.tm-form { display: grid; gap: 14px; }
.tm-form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.tm-field { display: grid; gap: 6px; }
.tm-field > span { font: 600 11px var(--tm-font); letter-spacing: .05em; text-transform: uppercase; color: var(--tm-muted); }
.tm-field input:not([type=checkbox]):not([type=radio]), .tm-field select {
  height: 40px; border-radius: 10px; border: 1px solid var(--tm-line-2); background: rgba(4, 9, 15, .8); color: var(--tm-text); padding: 0 12px; font: 500 13.5px var(--tm-font); outline: none; width: 100%;
}
.tm-field select option { background: #0b1521; }
.tm-field input:focus, .tm-field select:focus { border-color: var(--tm-cyan); box-shadow: 0 0 0 3px rgba(54, 214, 245, .14); }
.tm-field small { color: var(--tm-dim); font-size: 11.5px; }
.tm-seg-switch { display: inline-flex; padding: 4px; border-radius: 12px; background: rgba(4, 9, 15, .8); border: 1px solid var(--tm-line-2); gap: 4px; }
.tm-seg-switch label { position: relative; cursor: pointer; }
.tm-seg-switch input { position: absolute; opacity: 0; }
.tm-seg-switch span { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 14px; border-radius: 9px; font: 600 12.5px var(--tm-font); color: var(--tm-muted); }
.tm-seg-switch input:checked + span { color: #021017; background: linear-gradient(135deg, #7ae9ff, #36d6f5); box-shadow: 0 4px 14px rgba(54, 214, 245, .3); }
.tm-seg-switch input[value=consultor]:checked + span { background: linear-gradient(135deg, #d6ceff, #8b7bff); box-shadow: 0 4px 14px rgba(139, 123, 255, .35); }
.tm-perm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.tm-perm { position: relative; display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--tm-line); background: rgba(18, 31, 47, .45); cursor: pointer; font-size: 13px; color: #cddcea; }
.tm-perm input { position: absolute; opacity: 0; }
.tm-perm .tm-box { width: 18px; height: 18px; }
.tm-perm input:checked + .tm-box { background: var(--tm-cyan); border-color: var(--tm-cyan); box-shadow: 0 0 10px rgba(54, 214, 245, .45); }
.tm-perm input:checked + .tm-box::after { content: ""; width: 9px; height: 5px; border: 2px solid #021017; border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px); }
.tm-perm:has(input:checked) { border-color: rgba(54, 214, 245, .4); background: rgba(54, 214, 245, .07); color: #fff; }
.tm-perm small { display: block; font-size: 10.5px; color: var(--tm-dim); }
.tm-perm.is-fixed { cursor: default; border-style: dashed; }
.tm-switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 13px; color: #cddcea; }
.tm-switch input { position: absolute; opacity: 0; }
.tm-switch i { width: 38px; height: 22px; border-radius: 11px; background: rgba(255, 255, 255, .1); position: relative; transition: .2s; flex: none; }
.tm-switch i::after { content: ""; position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: #9fb0bf; transition: .2s; }
.tm-switch input:checked + i { background: rgba(34, 212, 126, .35); }
.tm-switch input:checked + i::after { left: 19px; background: var(--tm-up); box-shadow: 0 0 10px var(--tm-up); }
.tm-secret { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 16px; border-radius: 14px; border: 1px solid rgba(34, 212, 126, .4); background: rgba(34, 212, 126, .07); }
.tm-secret code { font: 700 20px var(--tm-mono); letter-spacing: .06em; color: #fff; padding: 8px 14px; border-radius: 10px; background: rgba(0, 0, 0, .35); border: 1px dashed rgba(34, 212, 126, .5); user-select: all; }
.tm-feed { display: grid; gap: 2px; }
.tm-feed-item { display: grid; grid-template-columns: 34px 1fr auto; gap: 12px; align-items: center; padding: 9px 8px; border-radius: 10px; }
.tm-feed-item:hover { background: rgba(122, 205, 255, .04); }
.tm-feed-item .tm-avatar { width: 30px; height: 30px; font-size: 12px; border-radius: 9px; }
.tm-feed-item p { margin: 0; font-size: 13px; color: #cddcea; }
.tm-feed-item p b { color: #fff; }
.tm-feed-item time { font: 500 11.5px var(--tm-mono); color: var(--tm-dim); white-space: nowrap; }
.tm-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: middle; }
.tm-dot.is-on { background: var(--tm-up); box-shadow: 0 0 8px var(--tm-up); }
.tm-dot.is-recent { background: var(--tm-flat); }
.tm-dot.is-off { background: #3a4a5a; }

/* ---------- Comercial ---------- */
.tm-tabs .tm-nav-tag { font: 600 9px/1 var(--tm-mono); letter-spacing: .08em; padding: 3px 5px; border-radius: 5px; background: rgba(139, 123, 255, .2); color: #c9c1ff; }
.tm-tabs a.active .tm-nav-tag { background: rgba(2, 16, 23, .2); color: #021017; }
.tm-funnel { display: grid; gap: 12px; padding: 6px 0; }
.tm-funnel-row { display: grid; grid-template-columns: 170px minmax(0, 1fr) 64px; gap: 14px; align-items: center; font-size: 13px; color: #cddcea; }
.tm-funnel-bar { position: relative; height: 34px; border-radius: 9px; background: rgba(255, 255, 255, .035); overflow: hidden; }
.tm-funnel-bar i { position: absolute; inset: 0 auto 0 0; border-radius: inherit; background: linear-gradient(90deg, rgba(54, 214, 245, .85), rgba(139, 123, 255, .7)); box-shadow: 0 0 18px rgba(54, 214, 245, .25); }
.tm-funnel-bar b { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); font: 700 13px var(--tm-mono); color: #fff; text-shadow: 0 1px 4px rgba(0, 0, 0, .6); }
.tm-funnel-row em { font: 600 12px var(--tm-mono); font-style: normal; color: var(--tm-cyan-2); text-align: right; }
.tm-podium { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.tm-podium .tm-panel { position: relative; overflow: hidden; }
.tm-podium h3 { margin: 4px 0 14px; font: 700 19px var(--tm-display, inherit); color: #fff; }
.tm-podium-pos { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; font: 800 16px var(--tm-mono); color: #021017; background: linear-gradient(135deg, #ffe08a, #f2c230); box-shadow: 0 0 22px rgba(242, 194, 48, .45); }
.tm-podium-2 .tm-podium-pos { background: linear-gradient(135deg, #eef4f8, #a9bccb); box-shadow: 0 0 18px rgba(169, 188, 203, .4); }
.tm-podium-3 .tm-podium-pos { background: linear-gradient(135deg, #ffc49a, #c8783f); box-shadow: 0 0 18px rgba(200, 120, 63, .4); }
.tm-podium-1 { border-color: rgba(242, 194, 48, .4); }
.tm-podium-nums { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.tm-podium-nums small { display: block; font-size: 11px; color: var(--tm-dim); }
.tm-podium-nums strong { display: block; font: 700 17px var(--tm-mono); color: #fff; margin: 3px 0; }
.tm-podium-nums em { font-style: normal; font-size: 11px; color: var(--tm-cyan-2); }
.tm-spark { display: inline-flex; align-items: flex-end; gap: 3px; height: 26px; }
.tm-spark i { width: 7px; border-radius: 2px; background: #5d7387; }
.tm-spark i.is-high { background: var(--tm-up); } .tm-spark i.is-mid { background: var(--tm-flat); } .tm-spark i.is-low { background: var(--tm-down); }
.tm-heat td.is-num { font: 600 12px var(--tm-mono); color: #fff; text-align: center; }
.tm-heat th.is-num { text-align: center; }

/* ---------- Glossário ---------- */
.tm-head-actions { display: flex; align-items: stretch; gap: 10px; flex-wrap: wrap; }
.tm-gloss-btn { align-self: center; height: 44px; padding: 0 16px; border-radius: 13px; }
.tm-gloss { width: min(860px, calc(100vw - 32px)); height: calc(100vh - 48px); max-height: calc(100vh - 48px); padding: 0; border-radius: 18px; border: 1px solid var(--tm-line); background: #08111b; color: var(--tm-text, #e6f3ff); box-shadow: 0 30px 80px rgba(0, 0, 0, .6); overflow: hidden; }
.tm-gloss[open] { display: flex; flex-direction: column; }
.tm-gloss::backdrop { background: rgba(2, 6, 12, .72); backdrop-filter: blur(4px); }
.tm-gloss-head { display: flex; justify-content: space-between; gap: 16px; padding: 20px 22px 12px; border-bottom: 1px solid var(--tm-line); }
.tm-gloss-head h2 { margin: 4px 0 6px; font-size: 21px; color: #fff; }
.tm-gloss-head p { margin: 0; font-size: 13px; color: var(--tm-muted); max-width: 680px; }
.tm-gloss-close { flex: none; width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--tm-line); background: rgba(255, 255, 255, .03); color: #cfe0ec; font-size: 22px; line-height: 1; cursor: pointer; }
.tm-gloss-close:hover { color: #fff; border-color: var(--tm-cyan); }
.tm-gloss-tools { padding: 12px 22px; border-bottom: 1px solid var(--tm-line); display: grid; gap: 10px; }
.tm-gloss-tools input { width: 100%; height: 40px; padding: 0 14px; border-radius: 11px; border: 1px solid var(--tm-line); background: rgba(255, 255, 255, .03); color: #fff; font: inherit; font-size: 14px; }
.tm-gloss-tools input:focus { outline: none; border-color: var(--tm-cyan); }
.tm-gloss-tools nav { display: flex; flex-wrap: wrap; gap: 6px; }
.tm-gloss-tools nav a { font-size: 11.5px; padding: 5px 10px; border-radius: 8px; color: var(--tm-muted); background: rgba(122, 205, 255, .06); }
.tm-gloss-tools nav a:hover { color: #fff; background: rgba(54, 214, 245, .14); }
.tm-gloss-body { overflow-y: auto; padding: 8px 22px 24px; }
.tm-gloss-body section { padding-top: 14px; }
.tm-gloss-body h3 { margin: 0 0 8px; font: 700 11px var(--tm-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--tm-cyan-2); }
.tm-gloss-body article { padding: 11px 0; border-bottom: 1px dashed var(--tm-line); }
.tm-gloss-body article:last-child { border-bottom: 0; }
.tm-gloss-body h4 { margin: 0 0 4px; font-size: 14px; color: #fff; }
.tm-gloss-body p { margin: 0; font-size: 13px; line-height: 1.55; color: #c6d6e3; }
.tm-gloss-meta { display: flex; gap: 8px; align-items: baseline; margin-top: 6px; }
.tm-gloss-meta span { flex: none; width: 62px; font: 600 10px var(--tm-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--tm-dim); }
.tm-gloss-meta code { font: 12px/1.5 var(--tm-mono); color: #9fe9ff; background: rgba(54, 214, 245, .07); padding: 2px 7px; border-radius: 6px; white-space: normal; word-break: break-word; }
@media (max-width: 720px) { .tm-head-actions { width: 100%; } .tm-gloss-btn { width: 100%; justify-content: center; } .tm-gloss-meta { flex-direction: column; gap: 3px; } }

/* ---------- Painel da Diretoria ---------- */
.tm-exec-hero { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.tm-exec-hero .tm-kpi-value { font-size: 26px; }
.tm-alerts { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; max-height: 330px; overflow-y: auto; }
.tm-alerts li { display: grid; grid-template-columns: 22px 1fr; gap: 8px; align-items: start; padding: 10px 12px; border-radius: 11px; font-size: 13px; line-height: 1.45; color: #d7e6f2; background: rgba(255, 255, 255, .025); border: 1px solid var(--tm-line); }
.tm-alerts li i { font-style: normal; font-size: 11px; line-height: 19px; text-align: center; }
.tm-alerts li.is-ok { border-color: rgba(34, 212, 126, .28); } .tm-alerts li.is-ok i { color: var(--tm-up); }
.tm-alerts li.is-warn { border-color: rgba(242, 194, 48, .3); } .tm-alerts li.is-warn i { color: var(--tm-flat); }
.tm-alerts li.is-bad { border-color: rgba(255, 77, 94, .38); background: rgba(255, 77, 94, .06); } .tm-alerts li.is-bad i { color: var(--tm-down); }
@media (max-width: 1500px) { .tm-exec-hero { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 720px) { .tm-exec-hero { grid-template-columns: 1fr; } }

/* ---------- Responsivo ---------- */
@media (max-width: 1380px) {
  .tm-pareto-hero { grid-template-columns: 1fr 1fr; }
  .tm-pareto-hero > :first-child { grid-column: 1 / -1; }
}
@media (max-width: 1200px) {
  .tm-rfv-top, .tm-grid-2, .tm-grid-3 { grid-template-columns: 1fr; }
  .tm-pv-grid > .tm-panel, .tm-pv-grid > .tm-panel.is-5, .tm-pv-grid > .tm-panel.is-7 { grid-column: 1 / -1; }
  .tm-grid-12 > * { grid-column: 1 / -1; }
  .tm-legend { grid-template-columns: 1fr; }
}
@media (max-width: 1023px) {
  .tm-page { padding: 18px 16px 32px; }
  .tm-filterbar { position: relative; top: auto; }
}
@media (max-width: 720px) {
  .tm-pareto-hero { grid-template-columns: 1fr; }
  .tm-page-head { align-items: flex-start; }
  .tm-update { width: 100%; }
  .tm-filter, .tm-filter-text, .tm-filter-text input { width: 100%; }
  .tm-filter-trigger { width: 100%; max-width: none; justify-content: flex-start; }
  .tm-filter-trigger .tm-filter-chev { margin-left: auto; }
  .tm-filter-pop, .tm-filter-pop-wide { position: fixed; left: 12px !important; right: 12px !important; top: auto; bottom: 12px; width: auto; max-height: 75vh; display: flex; flex-direction: column; }
  .tm-filter-pop .tm-filter-options { max-height: none; flex: 1; }
  .tm-filterbar-title { border: 0; width: 100%; }
  .tm-filterbar-actions { margin-left: 0; width: 100%; }
  .tm-filterbar-actions .tm-btn { flex: 1; }
  .tm-seg-row, .tm-seg-head, .tm-seg-total { grid-template-columns: minmax(0, 1fr) 64px 96px 16px; gap: 6px; }
  .tm-bands { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .tm-waffle-dots { width: 110px; }
  .tm-users { grid-template-columns: 1fr; }
  .tm-tabs { width: 100%; }
  .tm-podium, .tm-podium-nums { grid-template-columns: 1fr; }
  .tm-funnel-row { grid-template-columns: 1fr 52px; }
  .tm-funnel-row > span { grid-column: 1 / -1; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- Filtros sem recarregar (troca de conteúdo) ---------- */
.fade-in.is-pjax-loading .tm-page > :not(.tm-filterbar):not(.tm-page-head) { opacity: .55; transition: opacity .15s; pointer-events: none; }
html.tm-pjax-busy::before {
  content: ""; position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 9999;
  background: linear-gradient(90deg, transparent, var(--tm-cyan), var(--tm-violet), transparent); background-size: 200% 100%;
  animation: tm-busy 0.9s linear infinite;
}
@keyframes tm-busy { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* ---------- Troca de visão (ex.: Losts da Carteira) ---------- */
.tm-view-switch { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 10px; }
.tm-view-switch a { display: flex; flex-direction: column; gap: 4px; padding: 13px 16px; border-radius: 12px; border: 1px solid var(--tm-line); background: var(--tm-panel); color: var(--tm-muted); text-decoration: none; transition: .15s; }
.tm-view-switch a b { color: #dbe9f4; font-size: 14px; }
.tm-view-switch a span { font-size: 12.5px; line-height: 1.45; }
.tm-view-switch a:hover { border-color: var(--tm-line-2); }
.tm-view-switch a.active { border-color: rgba(54, 214, 245, .55); box-shadow: var(--tm-glow); background: linear-gradient(180deg, rgba(54, 214, 245, .10), rgba(54, 214, 245, .02)); }
.tm-view-switch a.active b { color: var(--tm-cyan-2); }

/* ---------- Página inicial ---------- */
.tm-home { gap: 22px; }
.tm-home-hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; padding: 30px 32px; border-radius: 22px; border: 1px solid var(--tm-line-2);
  background: radial-gradient(120% 140% at 0% 0%, rgba(54, 214, 245, .16), transparent 55%), radial-gradient(90% 120% at 100% 100%, rgba(139, 123, 255, .16), transparent 60%), var(--tm-panel-solid); }
.tm-home-hero-txt { max-width: 760px; }
.tm-home-hero h1 { font: 700 34px/1.15 var(--tm-display); color: #fff; margin: 6px 0 10px; letter-spacing: -.01em; }
.tm-home-hero p { color: #b9cbd9; font-size: 15px; line-height: 1.6; margin: 0; }
.tm-home-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.tm-home-badge { display: inline-flex; align-items: center; gap: 7px; padding: 6px 11px; border-radius: 999px; font-size: 12.5px; color: #cfe3f1; background: rgba(122, 205, 255, .08); border: 1px solid var(--tm-line); }
.tm-home-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 14px; }
.tm-home-card { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 20px; border-radius: 16px; border: 1px solid var(--tm-line); background: var(--tm-panel); color: var(--tm-text); text-decoration: none; transition: transform .15s, border-color .15s, box-shadow .15s; }
.tm-home-card:hover { transform: translateY(-2px); border-color: rgba(54, 214, 245, .45); box-shadow: var(--tm-glow); }
.tm-home-card-ico { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; color: var(--tm-cyan); background: rgba(54, 214, 245, .10); border: 1px solid rgba(54, 214, 245, .25); }
.tm-home-card h3 { font: 700 17px var(--tm-display); color: #fff; margin: 4px 0 0; }
.tm-home-card p { font-size: 13.5px; line-height: 1.55; color: #a9bccb; margin: 0; }
.tm-home-card ul { margin: 2px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 4px; }
.tm-home-card li { font-size: 12.5px; color: #cfe0ec; padding-left: 16px; position: relative; }
.tm-home-card li::before { content: "?"; position: absolute; left: 0; top: 0; font: 700 11px var(--tm-mono); color: var(--tm-violet); }
.tm-home-card-go { margin-top: auto; padding-top: 8px; display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 13px; color: var(--tm-cyan); }
.tm-home-how { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.tm-home-step { display: flex; gap: 14px; padding: 16px 18px; border-radius: 14px; border: 1px solid var(--tm-line); background: var(--tm-panel); }
.tm-home-step > span { flex: none; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; color: var(--tm-violet); background: rgba(139, 123, 255, .12); }
.tm-home-step h3 { margin: 0 0 4px; font-size: 14.5px; color: #fff; }
.tm-home-step p { margin: 0; font-size: 13px; line-height: 1.55; color: #a9bccb; }
.tm-home-step b { color: #dbe9f4; }
.tm-home-terms { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tm-home-terms dl { margin: 0; padding: 6px 18px; border-radius: 14px; border: 1px solid var(--tm-line); background: var(--tm-panel); }
.tm-home-terms dl > div { display: grid; grid-template-columns: 170px 1fr; gap: 12px; padding: 11px 0; border-bottom: 1px solid rgba(122, 205, 255, .06); }
.tm-home-terms dl > div:last-child { border-bottom: 0; }
.tm-home-terms dt { font-weight: 600; color: #fff; font-size: 13.5px; }
.tm-home-terms dd { margin: 0; color: #a9bccb; font-size: 13px; line-height: 1.5; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.tm-home-flow { display: flex; align-items: stretch; gap: 10px; }
.tm-home-flow > div { flex: 1; display: flex; flex-direction: column; gap: 5px; padding: 16px 18px; border-radius: 14px; border: 1px solid var(--tm-line); background: var(--tm-panel); }
.tm-home-flow b { color: var(--tm-cyan-2); font-size: 14px; }
.tm-home-flow span { color: #a9bccb; font-size: 13px; line-height: 1.5; }
.tm-home-flow > i { align-self: center; color: var(--tm-dim); }

/* ---------- NPS ---------- */
.tm-score-bars { display: flex; flex-direction: column; gap: 14px; padding: 4px 2px; }
.tm-score-bar { display: grid; grid-template-columns: minmax(140px, 1.2fr) 2fr 44px; align-items: center; gap: 12px; font-size: 13px; color: #cfe0ec; }
.tm-score-bar > div { height: 10px; border-radius: 6px; background: rgba(122, 205, 255, .08); overflow: hidden; }
.tm-score-bar i { display: block; height: 100%; border-radius: 6px; }
.tm-score-bar b { font: 700 14px var(--tm-mono); color: #fff; text-align: right; }
.tm-sent { font-weight: 700; }
.tm-sent.is-good { color: var(--tm-up); }
.tm-sent.is-bad { color: var(--tm-down); }
.tm-nps { font: 700 13px var(--tm-mono); }
.tm-nps.is-high { color: var(--tm-up); } .tm-nps.is-mid { color: var(--tm-flat); } .tm-nps.is-low { color: var(--tm-down); }
.tm-nota { display: inline-grid; place-items: center; min-width: 26px; height: 24px; padding: 0 6px; border-radius: 7px; font: 700 12px/1 var(--tm-mono); color: #04070c; }
.tm-nota.is-high { background: var(--tm-up); } .tm-nota.is-mid { background: var(--tm-flat); } .tm-nota.is-low { background: var(--tm-down); color: #fff; }
.tm-quotes { display: flex; flex-direction: column; gap: 10px; max-height: 640px; overflow: auto; padding-right: 4px; }
.tm-quote { padding: 12px 14px; border-radius: 12px; border: 1px solid var(--tm-line); background: rgba(3, 7, 12, .45); border-left: 3px solid var(--tm-dim); }
.tm-quote.is-promoter { border-left-color: var(--tm-up); } .tm-quote.is-passive { border-left-color: var(--tm-flat); } .tm-quote.is-detractor { border-left-color: var(--tm-down); }
.tm-quote header { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 6px; }
.tm-quote header b { color: #fff; font-size: 13.5px; }
.tm-quote header small { color: var(--tm-dim); font-size: 12px; width: 100%; }
.tm-quote p { margin: 4px 0 0; font-size: 13px; line-height: 1.55; color: #c9d9e6; }
.tm-quote em { font-style: normal; color: var(--tm-muted); font-weight: 600; }

@media (max-width: 1023px) {
  .tm-home-terms { grid-template-columns: 1fr; }
  .tm-home-flow { flex-direction: column; }
  .tm-home-flow > i { transform: rotate(90deg); }
}
@media (max-width: 720px) {
  .tm-home-hero { flex-direction: column; align-items: stretch; padding: 22px 18px; }
  .tm-home-hero h1 { font-size: 26px; }
  .tm-home-terms dl > div { grid-template-columns: 1fr; gap: 4px; }
  .tm-home-how { grid-template-columns: 1fr; }
  .tm-score-bar { grid-template-columns: 1fr 44px; }
  .tm-score-bar > div { grid-column: 1 / -1; grid-row: 2; }
}
/* ---------- Página inicial personalizada ---------- */
.tm-ini-hero { align-items: center; }
.tm-ini-todo { border-radius: 18px; border: 1px solid rgba(54, 214, 245, .28); background: linear-gradient(180deg, rgba(54, 214, 245, .07), rgba(54, 214, 245, .01)), var(--tm-panel); padding: 18px 20px; }
.tm-ini-todo header { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 12px; }
.tm-ini-todo header > span { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; color: var(--tm-cyan); background: rgba(54, 214, 245, .12); flex: none; }
.tm-ini-todo h2 { margin: 0; font: 700 18px var(--tm-display); color: #fff; }
.tm-ini-todo header p { margin: 2px 0 0; font-size: 12.5px; color: var(--tm-muted); }
.tm-ini-todo ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 10px; }
.tm-ini-todo li a { display: flex; gap: 12px; align-items: flex-start; height: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--tm-line); background: rgba(3, 7, 12, .5); color: var(--tm-text); text-decoration: none; border-left: 3px solid var(--tm-dim); transition: .15s; }
.tm-ini-todo li a:hover { border-color: var(--tm-line-2); transform: translateY(-1px); }
.tm-ini-todo li.is-bad a { border-left-color: var(--tm-down); }
.tm-ini-todo li.is-warn a { border-left-color: var(--tm-flat); }
.tm-ini-todo li.is-ok a { border-left-color: var(--tm-up); }
.tm-ini-todo li a > svg { flex: none; margin-top: 3px; color: var(--tm-dim); }
.tm-ini-todo li a > div { flex: 1; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.tm-ini-todo strong { font-size: 13.5px; color: #fff; }
.tm-ini-todo li span { font-size: 13px; line-height: 1.5; color: #b9cbd9; }
.tm-ini-n { flex: none; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; font: 700 12px var(--tm-mono); color: #04070c; background: var(--tm-dim); }
.tm-ini-todo li.is-bad .tm-ini-n { background: var(--tm-down); color: #fff; }
.tm-ini-todo li.is-warn .tm-ini-n { background: var(--tm-flat); }
.tm-ini-todo li.is-ok .tm-ini-n { background: var(--tm-up); }
.tm-ini-day { border-radius: 14px; border: 1px solid var(--tm-line); background: var(--tm-panel); padding: 12px 16px; }
.tm-ini-day header { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; color: var(--tm-cyan-2); font-size: 13px; margin-bottom: 10px; }
.tm-ini-day header span { color: var(--tm-dim); font-size: 12px; }
.tm-ini-day-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.tm-ini-day-grid > div { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; border-radius: 10px; background: rgba(3, 7, 12, .45); }
.tm-ini-day-grid small { font-size: 11.5px; color: var(--tm-muted); }
.tm-ini-day-grid b { font: 700 20px var(--tm-display); color: #fff; }
.tm-ini-day-grid .tm-trend { align-self: flex-start; }
.tm-ini-links { display: flex; flex-wrap: wrap; gap: 10px; }
.tm-ini-links a { display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--tm-line); background: var(--tm-panel); color: #dbe9f4; text-decoration: none; font-size: 13px; font-weight: 600; transition: .15s; }
.tm-ini-links a:hover { border-color: rgba(54, 214, 245, .45); color: #fff; }
.tm-ini-links a svg:first-child { color: var(--tm-cyan); }

/* "Onde eu vejo...?" da página inicial */
.tm-faq { scroll-margin-top: 80px; border-radius: 18px; border: 1px solid var(--tm-line-2); background: var(--tm-panel); padding: 18px 20px; display: flex; flex-direction: column; gap: 14px; }
.tm-faq-head { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.tm-faq-head > span { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; color: var(--tm-violet); background: rgba(139, 123, 255, .14); flex: none; }
.tm-faq-head > div { flex: 1 1 260px; min-width: 0; }
.tm-faq-head h2 { margin: 0; font: 700 18px var(--tm-display); color: #fff; }
.tm-faq-head p { margin: 2px 0 0; font-size: 12.5px; color: var(--tm-muted); }
.tm-faq-busca { flex: 0 1 320px; display: flex; align-items: center; gap: 8px; padding: 0 12px; height: 38px; border-radius: 10px; border: 1px solid var(--tm-line-2); background: rgba(3, 7, 12, .55); color: var(--tm-muted); }
.tm-faq-busca:focus-within { border-color: rgba(54, 214, 245, .55); }
.tm-faq-busca input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--tm-text); font: inherit; font-size: 13px; }
.tm-faq-temas { display: flex; flex-wrap: wrap; gap: 6px; }
.tm-faq-temas button { display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border-radius: 999px; border: 1px solid var(--tm-line); background: transparent; color: #b6c7d6; font: 500 12.5px var(--tm-font); cursor: pointer; transition: .15s; }
.tm-faq-temas button:hover { color: #fff; border-color: var(--tm-line-2); }
.tm-faq-temas button.active { color: #021017; background: var(--tm-cyan); border-color: var(--tm-cyan); font-weight: 600; }
.tm-faq-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 12px; align-items: start; }
.tm-faq-grupo h3 { display: flex; align-items: center; gap: 7px; margin: 0 0 8px; font: 600 12px var(--tm-font); letter-spacing: .06em; text-transform: uppercase; color: var(--tm-muted); }
.tm-faq-grupo h3 svg { color: var(--tm-cyan); }
.tm-faq-grupo ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.tm-faq-grupo li { padding: 10px 12px; border-radius: 12px; border: 1px solid var(--tm-line); background: rgba(3, 7, 12, .45); display: flex; flex-direction: column; gap: 3px; }
.tm-faq-grupo li b { font-size: 13.5px; color: #fff; font-weight: 600; }
.tm-faq-grupo li > span { font-size: 12.5px; line-height: 1.45; color: #a9bccb; }
.tm-faq-links { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 5px; }
.tm-faq-links a { display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px; border-radius: 8px; border: 1px solid var(--tm-line-2); color: #cfe0ec; font-size: 12px; font-weight: 500; text-decoration: none; transition: .15s; }
.tm-faq-links a:hover { color: #fff; border-color: rgba(54, 214, 245, .55); }
.tm-faq-links a.is-main { color: var(--tm-cyan-2); border-color: rgba(54, 214, 245, .4); background: rgba(54, 214, 245, .08); font-weight: 600; }
.tm-faq [hidden] { display: none !important; }
.tm-faq-mais { margin-top: 6px; padding: 4px 2px; border: 0; background: none; color: var(--tm-cyan-2); font: 600 12.5px var(--tm-font); cursor: pointer; }
.tm-faq-mais:hover { text-decoration: underline; }
.tm-faq-vazio { margin: 0; font-size: 13px; color: var(--tm-muted); }
.tm-faq-nota { margin: 0; display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--tm-muted); }
.tm-faq-nota svg { color: var(--tm-cyan); flex: none; }
@media (max-width: 640px) {
  .tm-faq { padding: 16px; }
  .tm-faq-busca { flex: 1 1 100%; }
  .tm-faq-grid { grid-template-columns: 1fr; }
}
.tm-ini-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.tm-ini-list li { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; color: #c9d9e6; line-height: 1.5; padding: 10px 12px; border-radius: 10px; background: rgba(3, 7, 12, .45); }
.tm-ini-list li > svg { flex: none; margin-top: 3px; color: var(--tm-cyan); }
.tm-ini-list b { color: #fff; }
.tm-ini-opps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.tm-ini-opps a { display: flex; flex-direction: column; gap: 6px; padding: 16px; border-radius: 14px; border: 1px solid var(--tm-line); background: var(--tm-panel); text-decoration: none; transition: .15s; }
.tm-ini-opps a:hover { border-color: rgba(139, 123, 255, .5); transform: translateY(-2px); }
.tm-ini-opps span { color: var(--tm-violet); }
.tm-ini-opps b { font: 700 30px var(--tm-display); color: #fff; }
.tm-ini-opps small { font-size: 12.5px; line-height: 1.45; color: #a9bccb; }
.tm-ini-opps em { margin-top: auto; font-style: normal; font-size: 12px; font-weight: 600; color: var(--tm-cyan); }

/* Guia geral */
.tm-fun-hero { align-items: center; }
.tm-trail-ring { --p: 0; flex: none; width: 150px; height: 150px; border-radius: 50%; display: grid; place-items: center;
  background: conic-gradient(var(--tm-cyan) calc(var(--p) * 1%), rgba(122, 205, 255, .10) 0); box-shadow: 0 0 40px rgba(54, 214, 245, .18); }
.tm-trail-ring > div { width: 118px; height: 118px; border-radius: 50%; background: var(--tm-panel-solid); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.tm-trail-ring b { font: 700 28px var(--tm-display); color: #fff; }
.tm-trail-ring small { font-size: 11px; color: var(--tm-muted); max-width: 90px; line-height: 1.3; }
.tm-fact { background: radial-gradient(120% 120% at 100% 0%, rgba(139, 123, 255, .16), transparent 55%), var(--tm-panel); }
.tm-fact-body { display: flex; gap: 16px; align-items: center; margin: 12px 0 4px; }
.tm-fact-ico { width: 56px; height: 56px; flex: none; display: grid; place-items: center; border-radius: 16px; color: #fff; background: linear-gradient(135deg, var(--tm-violet), var(--tm-cyan)); }
.tm-fact-body small { display: block; font-size: 12.5px; color: var(--tm-muted); }
.tm-fact-body b { display: block; font: 700 30px/1.15 var(--tm-display); color: #fff; margin: 2px 0; }
.tm-fact-body p { margin: 0; color: #b9cbd9; font-size: 13.5px; }
.tm-fact-more { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.tm-fact-more div { display: inline-flex; align-items: center; gap: 7px; padding: 7px 11px; border-radius: 999px; font-size: 12.5px; color: #b9cbd9; background: rgba(122, 205, 255, .07); border: 1px solid var(--tm-line); }
.tm-fact-more b { color: #fff; }
.tm-level h3 { margin: 6px 0 2px; font: 700 24px var(--tm-display); color: #fff; }
.tm-level p { margin: 0 0 12px; font-size: 13.5px; color: #b9cbd9; }
.tm-level-bar { height: 10px; border-radius: 6px; background: rgba(122, 205, 255, .08); overflow: hidden; }
.tm-level-bar i { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, var(--tm-cyan), var(--tm-violet)); }
.tm-level-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 8px; font-size: 11px; color: var(--tm-dim); text-align: center; }
.tm-level-steps .on { color: var(--tm-cyan-2); font-weight: 600; }
.tm-tip { display: flex; gap: 10px; margin-top: 16px; padding: 12px 14px; border-radius: 12px; background: rgba(139, 123, 255, .08); border: 1px solid rgba(139, 123, 255, .22); }
.tm-tip > svg { flex: none; color: var(--tm-violet); margin-top: 2px; }
.tm-tip b { display: block; font-size: 13px; color: #fff; }
.tm-tip span { font-size: 12.5px; color: #b9cbd9; line-height: 1.5; }
.tm-home-card.is-new { border-color: rgba(139, 123, 255, .35); }
.tm-home-card.is-done { opacity: .92; }
.tm-trail-tag { position: absolute; top: 18px; right: 18px; display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: 999px; color: #c4b9ff; background: rgba(139, 123, 255, .14); }
.tm-home-card.is-done .tm-trail-tag { color: var(--tm-up); background: rgba(34, 212, 126, .12); }
.tm-news { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.tm-news > div { padding: 16px; border-radius: 14px; border: 1px solid var(--tm-line); background: var(--tm-panel); display: flex; flex-direction: column; gap: 6px; }
.tm-news .tm-nav-tag { align-self: flex-start; font: 600 9.5px/1 var(--tm-mono); letter-spacing: .08em; padding: 4px 7px; border-radius: 6px; background: rgba(139, 123, 255, .2); color: #c4b9ff; }
.tm-news b { color: #fff; font-size: 14px; }
.tm-news p { margin: 0; font-size: 12.5px; color: #a9bccb; line-height: 1.5; }
.tm-home-guide > summary { display: flex; align-items: center; gap: 14px; cursor: pointer; list-style: none; }
.tm-home-guide > summary::-webkit-details-marker { display: none; }
.tm-home-guide > summary h2 { margin: 0; font: 700 18px var(--tm-display); color: #fff; }
.tm-home-guide > summary p { margin: 2px 0 0; font-size: 12.5px; color: var(--tm-muted); }
.tm-home-guide > summary > svg { margin-left: auto; color: var(--tm-muted); transition: transform .2s; }
.tm-home-guide[open] > summary > svg { transform: rotate(180deg); }
@media (max-width: 1200px) {
  .tm-ini-day-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tm-ini-opps, .tm-news { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .tm-ini-todo ol { grid-template-columns: 1fr; }
  .tm-ini-day-grid, .tm-ini-opps, .tm-news { grid-template-columns: 1fr 1fr; }
  .tm-trail-ring { align-self: center; }
}
/* Ver a página inicial como outra pessoa (gestor de acessos) */
.tm-viewas { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 12px; border: 1px dashed var(--tm-line-2); background: rgba(3, 7, 12, .45); font-size: 13px; color: var(--tm-muted); }
.tm-viewas > span { display: inline-flex; align-items: center; gap: 8px; }
.tm-viewas b { color: #fff; }
.tm-viewas select { min-width: 280px; max-width: 100%; height: 36px; padding: 0 10px; border-radius: 10px; border: 1px solid var(--tm-line-2); background: var(--tm-panel-solid); color: #e8f3fb; font: 500 13px var(--tm-font); }
.tm-viewas.is-on { border-style: solid; border-color: rgba(255, 194, 75, .55); background: rgba(255, 194, 75, .08); }
.tm-viewas.is-on > span svg { color: var(--tm-flat); }
/* Faixa do modo "ver como" (portal inteiro) */
.tm-viewas-bar { position: sticky; top: 0; z-index: 60; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 9px 18px; font-size: 13px; color: #1b1300; background: linear-gradient(90deg, #ffc24b, #ffd98a); }
.tm-viewas-bar b { color: #000; }
.tm-viewas-bar a { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 8px; font-weight: 700; color: #1b1300; background: rgba(0, 0, 0, .1); text-decoration: none; }
.tm-viewas-bar a:hover { background: rgba(0, 0, 0, .18); }
.tm-viewas small { flex-basis: 100%; font-size: 11.5px; color: var(--tm-dim); }
/* ---------- Números clicáveis que abrem a lista de clientes ---------- */
.tm-lista-link, [data-lista] { cursor: pointer; }
.tm-lista-link { display: inline-flex; align-items: center; gap: 6px; border-bottom: 1px dashed rgba(54, 214, 245, .55); transition: color .15s, border-color .15s; }
.tm-lista-link i { display: inline-grid; place-items: center; opacity: .55; color: var(--tm-cyan); font-style: normal; }
.tm-lista-link:hover, .tm-lista-link:focus-visible { color: var(--tm-cyan-2); border-bottom-color: var(--tm-cyan); outline: none; }
.tm-lista-link:hover i { opacity: 1; }
a[data-lista]:hover, .tm-ini-opps a[data-lista]:hover { border-color: rgba(54, 214, 245, .55); }
.tm-lista-dlg { width: min(1180px, calc(100vw - 32px)); }
.tm-lista-dlg > .tm-gloss-close { position: absolute; top: 16px; right: 16px; z-index: 2; }
.tm-lista-body { flex: 1; min-height: 0; display: flex; flex-direction: column; padding: 22px 24px; }
.tm-lista { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 14px; }
.tm-lista-head { padding-right: 48px; }
.tm-lista-head h2 { margin: 0; font: 700 20px var(--tm-display); color: #fff; }
.tm-lista-head p { margin: 4px 0 0; font-size: 13px; color: var(--tm-muted); }
.tm-lista-tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.tm-lista-tools input { flex: 1; min-width: 220px; height: 38px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--tm-line-2); background: rgba(3, 7, 12, .6); color: #e8f3fb; font: 500 13.5px var(--tm-font); }
.tm-lista .tm-table-wrap { flex: 1; min-height: 0; max-height: none; }
.tm-lista .tm-table a { color: var(--tm-cyan-2); text-decoration: none; }
.tm-lista .tm-table a:hover { text-decoration: underline; }
.tm-lista-skel { flex: 1; border-radius: 12px; background: linear-gradient(90deg, rgba(122, 205, 255, .04), rgba(122, 205, 255, .09), rgba(122, 205, 255, .04)); background-size: 200% 100%; animation: tm-busy 1.2s linear infinite; }.tm-lista .tm-table td { overflow-wrap: normal; }
.tm-lista .tm-table td:nth-child(2), .tm-lista .tm-table td:nth-child(3) { white-space: nowrap; }
/* ---------- Painel de Produtos ---------- */
.tm-prod-acoes { display: flex; flex-direction: column; gap: 10px; }
.tm-prod-acoes > div { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border-radius: 12px; background: rgba(3, 7, 12, .45); border-left: 3px solid var(--tm-dim); }
.tm-prod-acoes .is-warn { border-left-color: var(--tm-flat); } .tm-prod-acoes .is-info { border-left-color: var(--tm-cyan); }
.tm-prod-acoes .is-ok { border-left-color: var(--tm-up); } .tm-prod-acoes .is-bad { border-left-color: var(--tm-down); }
.tm-prod-acoes b { color: #fff; font-size: 13.5px; }
.tm-prod-acoes span { font-size: 12.5px; color: #b9cbd9; line-height: 1.45; }
.tm-prod-acoes em { font-style: normal; font-size: 12px; color: var(--tm-cyan-2); line-height: 1.5; }
.tm-abc { display: inline-grid; place-items: center; width: 24px; height: 22px; border-radius: 6px; font: 700 12px/1 var(--tm-mono); }
.tm-abc.is-a { background: rgba(34, 212, 126, .18); color: var(--tm-up); }
.tm-abc.is-b { background: rgba(242, 194, 48, .18); color: var(--tm-flat); }
.tm-abc.is-c { background: rgba(255, 77, 94, .16); color: var(--tm-down); }
.tm-prod-nome { display: block; min-width: 180px; }

/* ---------- Análises Estratégicas ---------- */
/* Pasta no menu lateral */
.tm-nav-folder > summary { list-style: none; cursor: pointer; user-select: none; }
.tm-nav-folder > summary::-webkit-details-marker { display: none; }
.tm-nav-folder > summary .tm-nav-tag { margin-left: auto; }
.tm-nav-folder > summary .tm-nav-chev { margin-left: 6px; transition: transform .18s; }
.tm-nav-folder[open] > summary .tm-nav-chev { transform: rotate(180deg); }
.tm-nav-sub { display: flex; flex-direction: column; gap: 1px; margin: 3px 0 6px 21px; padding-left: 10px; border-left: 1px solid var(--tm-line-2); }
.tm-nav-sub .nav-link { padding: 7px 10px; font-size: 13px; border-radius: 9px; }
.tm-nav-sub .nav-link.is-current { color: #fff; background: rgba(54, 214, 245, .1); }
.tm-nav-sub .nav-link.is-current svg { color: var(--tm-cyan); }
/* Seletores compactos */
.tm-an-segs { display: flex; flex-wrap: wrap; gap: 10px; }
.tm-an-seg { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 12px; border: 1px solid var(--tm-line); background: var(--tm-panel); }
.tm-an-seg a { padding: 7px 12px; border-radius: 9px; font-size: 13px; font-weight: 500; color: #b6c7d6; text-decoration: none; transition: .15s; }
.tm-an-seg a:hover { color: #fff; background: rgba(122, 205, 255, .06); }
.tm-an-seg a.active { color: #021017; background: var(--tm-cyan); font-weight: 600; }
/* Recomendações e cartões */
.tm-an-recs { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 10px; }
.tm-an-recs em a { display: inline-flex; align-items: center; gap: 4px; color: var(--tm-cyan-2); text-decoration: none; }
.tm-an-recs em a:hover { text-decoration: underline; }
.tm-an-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; }
.tm-an-card { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; border-radius: 12px; border: 1px solid var(--tm-line); background: rgba(3, 7, 12, .45); color: #b9cbd9; text-decoration: none; transition: .15s; }
.tm-an-card:hover { border-color: rgba(54, 214, 245, .45); transform: translateY(-1px); }
.tm-an-card b { display: flex; align-items: center; gap: 7px; color: #fff; font-size: 14.5px; }
.tm-an-card b svg { color: var(--tm-cyan); }
.tm-an-card > span:not(.tm-an-tag) { font-size: 13px; line-height: 1.45; color: #dbe9f4; }
.tm-an-card em { font-style: normal; font-size: 12px; color: var(--tm-dim); line-height: 1.45; }
.tm-an-tag { align-self: flex-start; font: 600 9.5px/1 var(--tm-mono); letter-spacing: .08em; text-transform: uppercase; padding: 4px 7px; border-radius: 6px; background: rgba(54, 214, 245, .12); color: var(--tm-cyan-2); }
.tm-an-tag.is-diagnostica { background: rgba(139, 123, 255, .18); color: #c4b9ff; }
.tm-an-tag.is-preditiva { background: rgba(255, 194, 75, .16); color: #ffd27a; }
.tm-an-tag.is-prescritiva { background: rgba(34, 212, 126, .16); color: #6ff0b0; }
.tm-an-tag.is-inferencial { background: rgba(255, 107, 139, .16); color: #ff9db3; }
.tm-an-lista { margin: 0; padding: 0 0 0 18px; display: flex; flex-direction: column; gap: 8px; font-size: 13px; line-height: 1.5; color: #b9cbd9; }
.tm-an-lista b { color: #fff; }
.tm-an-lista a { color: var(--tm-cyan-2); margin-left: 4px; }
/* Matriz ABC x XYZ */
.tm-an-xyz { display: grid; grid-template-columns: 90px repeat(3, minmax(0, 1fr)); gap: 8px; align-items: stretch; }
.tm-an-xyz > b { display: flex; align-items: center; font: 600 11px/1.3 var(--tm-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--tm-dim); }
.tm-an-xyz-cell { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--tm-line); min-height: 96px; }
.tm-an-xyz-cell strong { color: #fff; font: 700 14px var(--tm-mono); }
.tm-an-xyz-cell span { font-size: 12px; color: #dbe9f4; line-height: 1.4; }
.tm-an-xyz-cell em { font-style: normal; font-size: 11.5px; color: var(--tm-cyan-2); line-height: 1.4; }
@media (max-width: 720px) { .tm-an-xyz { grid-template-columns: 1fr; } .tm-an-xyz > span, .tm-an-xyz > b:nth-child(-n+4) { display: none; } }
/* Quadrantes BCG e correlação fraca */
.tm-an-quad { display: inline-block; padding: 3px 8px; border-radius: 7px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.tm-an-quad.is-estrela { background: rgba(34, 212, 126, .16); color: #6ff0b0; }
.tm-an-quad.is-vaca { background: rgba(54, 214, 245, .14); color: var(--tm-cyan-2); }
.tm-an-quad.is-interrogacao { background: rgba(255, 194, 75, .16); color: #ffd27a; }
.tm-an-quad.is-abacaxi { background: rgba(255, 107, 139, .16); color: #ff9db3; }
.tm-an-fraco { opacity: .45; }
/* ---------- Como analisar (guia passo a passo) ---------- */
.tm-guia-btn { border-color: rgba(54, 214, 245, .35); color: var(--tm-cyan-2); }
.tm-guia { width: min(760px, calc(100vw - 32px)); max-height: calc(100vh - 48px); padding: 0; border-radius: 18px; border: 1px solid var(--tm-line); background: #08111b; color: var(--tm-text, #e6f3ff); box-shadow: 0 30px 80px rgba(0, 0, 0, .6); overflow: hidden; }
.tm-guia[open] { display: flex; flex-direction: column; }
.tm-guia::backdrop { background: rgba(2, 6, 12, .72); backdrop-filter: blur(4px); }
.tm-guia .tm-gloss-head p { max-width: 640px; margin-top: 4px; color: #cfe0ec; font-size: 14px; }
.tm-guia-body { flex: 1; }
.tm-guia-body h3 { margin: 4px 0 10px; font: 600 11px var(--tm-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--tm-dim); }
.tm-guia-body h3 ~ h3 { margin-top: 22px; }
.tm-guia-passos { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.tm-guia-passos li { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--tm-line); background: rgba(255, 255, 255, .015); }
.tm-guia-passos li > div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.tm-guia-passos b { font-size: 14.5px; color: #fff; font-weight: 600; }
.tm-guia-num { flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: rgba(54, 214, 245, .16); color: var(--tm-cyan-2); font: 700 13px var(--tm-mono); }
.tm-guia-onde { display: block; font-size: 13px; line-height: 1.5; color: #b9cbd9; }
.tm-guia-onde > svg { color: var(--tm-cyan); vertical-align: -2px; margin-right: 3px; }
.tm-guia-onde .tm-guia-ir { margin-left: 6px; }
.tm-guia-ex { font-size: 13px; line-height: 1.5; color: #d9d3ff; }
.tm-guia-atencao { display: flex; gap: 5px; align-items: baseline; font-size: 12.5px; color: #ffc9d3; }
.tm-guia-atencao svg { color: var(--tm-down); flex: none; transform: translateY(1px); }
.tm-guia-ir { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; font-weight: 600; color: var(--tm-cyan-2); white-space: nowrap; }
.tm-guia-diz { margin-top: 2px; padding: 7px 10px; border-radius: 8px; background: rgba(54, 214, 245, .06); border-left: 2px solid rgba(54, 214, 245, .45); font-size: 13px; line-height: 1.5; color: #d7e8f3; }
.tm-guia-passos .tm-guia-diz b { font-size: 13px; color: var(--tm-cyan-2); }
/* Caso falado: alguém analisando o painel */
.tm-guia-caso { margin: 0; padding: 14px 16px; border-radius: 14px; border: 1px solid rgba(139, 123, 255, .3); background: linear-gradient(160deg, rgba(139, 123, 255, .09), rgba(255, 255, 255, .01)); }
.tm-guia-caso figcaption { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; color: #c6d6e3; }
.tm-guia-caso figcaption > svg { color: #b3a8ff; flex: none; }
.tm-guia-caso figcaption b { color: #fff; }
.tm-guia-caso figcaption small { margin-left: auto; font: 600 10px var(--tm-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--tm-dim); }
.tm-guia-caso blockquote { margin: 10px 0 0; padding: 0 0 0 12px; border-left: 2px solid rgba(139, 123, 255, .45); display: grid; gap: 8px; }
.tm-guia-caso blockquote p { margin: 0; font-size: 14px; line-height: 1.6; color: #ebe8ff; font-style: italic; }
.tm-guia-decide { display: flex; gap: 8px; align-items: flex-start; margin: 12px 0 0; padding: 9px 12px; border-radius: 10px; background: rgba(34, 212, 126, .07); border: 1px solid rgba(34, 212, 126, .2); font-size: 13.5px; line-height: 1.5; color: #d6f5e6; }
.tm-guia-decide svg { color: var(--tm-up); flex: none; margin-top: 2px; }
.tm-guia-decide b { color: #fff; }
.tm-guia-acoes { display: grid; gap: 6px; }
.tm-guia-acoes div { display: grid; grid-template-columns: minmax(0, 1fr) 16px minmax(0, 1.3fr); gap: 10px; align-items: center; padding: 10px 14px; border-radius: 12px; background: rgba(34, 212, 126, .06); border: 1px solid rgba(34, 212, 126, .18); font-size: 13px; line-height: 1.45; }
.tm-guia-acoes span { color: #c6d6e3; }
.tm-guia-acoes svg { color: var(--tm-up); }
.tm-guia-acoes b { color: #fff; font-weight: 600; }
.tm-guia-termos { margin-top: 18px; font-size: 13px; }
.tm-guia-termos summary { cursor: pointer; color: var(--tm-muted); font-weight: 600; }
.tm-guia-termos dl { display: grid; gap: 6px; margin: 10px 0 0; }
.tm-guia-termos dl div { display: grid; grid-template-columns: 150px 1fr; gap: 12px; }
.tm-guia-termos dt { color: #fff; font-weight: 600; }
.tm-guia-termos dd { margin: 0; color: #c6d6e3; }
@media (max-width: 720px) { .tm-guia[open] { display: block; overflow-y: auto; } .tm-guia .tm-gloss-body { overflow: visible; } .tm-guia .tm-gloss-close { position: fixed; top: 34px; right: 34px; z-index: 3; background: #0d1a28; } .tm-guia-acoes div { grid-template-columns: 1fr; gap: 4px; } .tm-guia-acoes svg { transform: rotate(90deg); } .tm-guia-termos dl div { grid-template-columns: 1fr; gap: 2px; } }
.tm-an-veredito { border-left: 3px solid var(--tm-cyan); }
.tm-an-veredito.is-ok { border-left-color: var(--tm-up); background: linear-gradient(90deg, rgba(34, 212, 126, .07), transparent 60%), var(--tm-panel); }
.tm-an-veredito .tm-an-lista { font-size: 13.5px; gap: 10px; }

/* Como usar cada painel */
.tm-uso-todos { margin-left: auto; flex: none; }
.tm-uso-lista { display: grid; gap: 10px; }
.tm-uso { border-radius: 16px; border: 1px solid var(--tm-line); background: var(--tm-panel); scroll-margin-top: 80px; transition: border-color .15s; }
.tm-uso[open] { border-color: var(--tm-line-2); }
.tm-uso > summary { list-style: none; display: flex; align-items: center; gap: 14px; padding: 16px 18px; cursor: pointer; }
.tm-uso > summary::-webkit-details-marker { display: none; }
.tm-uso > summary:hover .tm-uso-tit b { color: var(--tm-cyan-2); }
.tm-uso-ico { flex: none; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 11px; color: var(--tm-cyan); background: rgba(54, 214, 245, .1); }
.tm-uso-tit { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.tm-uso-tit b { font: 700 16px var(--tm-display); color: #fff; transition: color .15s; }
.tm-uso-tit small { font-size: 13px; line-height: 1.45; color: #a9bccb; }
.tm-uso-chev { flex: none; color: var(--tm-muted); transition: transform .2s; }
.tm-uso[open] .tm-uso-chev { transform: rotate(180deg); }
.tm-uso-body { padding: 4px 18px 18px 72px; display: flex; flex-direction: column; gap: 18px; }
.tm-uso-body h4 { margin: 0 0 8px; font: 600 11px var(--tm-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--tm-dim); }
.tm-uso-meta { display: flex; flex-wrap: wrap; gap: 10px; }
.tm-uso-meta > div { display: flex; gap: 9px; align-items: flex-start; padding: 9px 13px; border-radius: 11px; background: rgba(54, 214, 245, .06); border: 1px solid var(--tm-line); font-size: 13px; color: #dbe9f4; }
.tm-uso-meta svg { flex: none; margin-top: 2px; color: var(--tm-cyan); }
.tm-uso-meta small { display: block; font-size: 11px; color: var(--tm-muted); }
.tm-uso-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 20px; }
.tm-uso-perg, .tm-uso-abas { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.tm-uso-perg li { display: flex; gap: 6px; align-items: baseline; font-size: 13.5px; color: #e3eef7; }
.tm-uso-perg svg { flex: none; color: var(--tm-violet); transform: translateY(2px); }
.tm-uso-abas li { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 12px; align-items: baseline; font-size: 13px; }
.tm-uso-abas a, .tm-uso-abas b { display: inline-flex; align-items: center; gap: 4px; color: var(--tm-cyan-2); font-weight: 600; text-decoration: none; }
.tm-uso-abas b { color: #fff; }
.tm-uso-abas a:hover { text-decoration: underline; }
.tm-uso-abas span { color: #b9cbd9; line-height: 1.45; }
.tm-uso-passos { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px; }
.tm-uso-passos li { display: flex; gap: 10px; padding: 11px 13px; border-radius: 12px; border: 1px solid var(--tm-line); background: rgba(255, 255, 255, .015); }
.tm-uso-passos li > div { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.tm-uso-passos b { font-size: 13.5px; color: #fff; }
.tm-uso-passos span { font-size: 12.5px; color: #b9cbd9; }
.tm-uso-passos span svg { color: var(--tm-cyan); vertical-align: -2px; }
.tm-uso-passos em { font-style: normal; font-size: 12.5px; color: #d9d3ff; }
.tm-uso-ir { display: flex; }
/* Blocos da página Como usar: sanfonas fechadas ao abrir */
.tm-sec { margin-bottom: 12px; scroll-margin-top: 80px; }
.tm-sec > summary { list-style: none; cursor: pointer; margin: 0; transition: border-color .15s, background .15s; }
.tm-sec > summary::-webkit-details-marker { display: none; }
.tm-sec > summary:hover { border-color: rgba(54, 214, 245, .45); }
.tm-sec > summary > div { flex: 1; min-width: 0; }
.tm-sec-chev { flex: none; color: var(--tm-cyan-2); transition: transform .2s; }
.tm-sec[open] > summary .tm-sec-chev { transform: rotate(180deg); }
.tm-sec[open] > summary { border-color: rgba(54, 214, 245, .4); }
.tm-sec-body { padding: 12px 0 14px; }
.tm-sec-body .tm-faq-head { justify-content: flex-end; }
.tm-uso-acoes { display: flex; justify-content: flex-end; margin-bottom: 10px; }
.tm-sec-body .tm-liga-lista { margin-bottom: 0; }
.tm-uso-passos .tm-guia-diz { display: block; margin-top: 4px; font-size: 12.5px; }
.tm-uso-passos .tm-guia-diz b { font-size: 12.5px; color: var(--tm-cyan-2); }
.tm-uso-body .tm-guia-caso blockquote p { font-size: 13.5px; }
/* Ligando os painéis */
.tm-liga-lista { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 12px; margin-bottom: 26px; }
.tm-liga { display: flex; flex-direction: column; gap: 10px; padding: 16px; border-radius: 16px; border: 1px solid var(--tm-line); background: var(--tm-panel); }
.tm-liga h3 { margin: 0; font-size: 15px; color: #fff; }
.tm-liga ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; position: relative; }
.tm-liga li { display: flex; gap: 10px; padding: 6px 0; position: relative; }
.tm-liga li:not(:last-child)::after { content: ''; position: absolute; left: 12px; top: 32px; bottom: -6px; width: 2px; background: rgba(54, 214, 245, .2); }
.tm-liga li > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tm-liga li a { display: inline-flex; align-items: center; gap: 4px; font-size: 13.5px; font-weight: 600; color: var(--tm-cyan-2); }
.tm-liga li span:not(.tm-guia-num) { font-size: 13px; line-height: 1.45; color: #c6d6e3; }
.tm-liga > p { display: flex; gap: 8px; align-items: flex-start; margin: auto 0 0; padding: 9px 12px; border-radius: 10px; background: rgba(34, 212, 126, .07); border: 1px solid rgba(34, 212, 126, .2); font-size: 13px; line-height: 1.45; color: #d6f5e6; }
.tm-liga > p svg { color: var(--tm-up); flex: none; margin-top: 2px; }
@media (max-width: 760px) { .tm-liga-lista { grid-template-columns: 1fr; } }
.tm-uso-dicas { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.tm-uso-dicas > div { display: flex; gap: 12px; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--tm-line); background: var(--tm-panel); }
.tm-uso-dicas > div > span { flex: none; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; color: var(--tm-violet); background: rgba(139, 123, 255, .12); }
.tm-uso-dicas b { font-size: 14px; color: #fff; }
.tm-uso-dicas p { margin: 3px 0 0; font-size: 13px; line-height: 1.5; color: #a9bccb; }
@media (max-width: 760px) {
  .tm-uso > summary { padding: 14px; gap: 12px; }
  .tm-uso-body { padding: 0 14px 16px; }
  .tm-uso-cols { grid-template-columns: 1fr; }
  .tm-uso-abas li { grid-template-columns: 1fr; gap: 2px; }
  .tm-uso-todos span { display: none; }
}
/* ---------- Filtro macro B2C / B2B (topo das páginas de dados) ---------- */
.tm-macrobar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 0 0 14px; padding: 8px 12px; border: 1px solid var(--tm-line); border-radius: 12px; background: rgba(4, 9, 15, .55); }
.tm-macro { display: inline-flex; align-items: center; gap: 2px; padding: 3px; border-radius: 10px; background: rgba(30, 50, 72, .45); border: 1px solid var(--tm-line); }
.tm-macro-label { font: 600 10.5px/1 var(--tm-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--tm-dim); padding: 0 8px 0 6px; }
.tm-macro a, .tm-macro > span.is-on { padding: 6px 12px; border-radius: 8px; color: var(--tm-muted); font-size: 13px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.tm-macro a:hover { color: #fff; background: rgba(54, 214, 245, .08); }
.tm-macro a.is-on, .tm-macro > span.is-on { color: #04121a; background: var(--tm-cyan); }
.tm-macro a.is-on::before, .tm-macro > span.is-on::before { content: "✓ "; font-weight: 800; }
.tm-macro > span.is-on { cursor: default; }
.tm-macro a:focus-visible { outline: 2px solid var(--tm-cyan); outline-offset: 2px; }
.tm-macro-nota { color: var(--tm-muted); font-size: 12px; flex: 1 1 260px; min-width: 0; }
.tm-ajuda-mini { display: inline-grid; place-items: center; width: 15px; height: 15px; border-radius: 50%; border: 1px solid var(--tm-dim); font: 700 10px/1 var(--tm-font); color: var(--tm-muted); vertical-align: 1px; }

/* ---------- "?" de cada quadro ---------- */
.tm-ajuda-btn { display: inline-grid; place-items: center; width: 22px; height: 22px; flex: 0 0 22px; padding: 0; border-radius: 50%; border: 1px solid rgba(142, 166, 186, .35); background: rgba(4, 9, 15, .6); color: var(--tm-muted); font: 700 12px/1 var(--tm-font); cursor: pointer; transition: color .15s, border-color .15s, background .15s; }
.tm-ajuda-btn:hover, .tm-ajuda-btn[aria-expanded="true"] { color: #04121a; background: var(--tm-cyan); border-color: var(--tm-cyan); }
.tm-ajuda-btn:focus-visible { outline: 2px solid var(--tm-cyan); outline-offset: 2px; }
.tm-kpi > .tm-ajuda-btn { position: absolute; top: 8px; right: 8px; width: 20px; height: 20px; font-size: 11px; z-index: 2; }
.tm-kpi { padding-right: 32px; }
.tm-panel > .tm-ajuda-btn { position: absolute; top: 12px; right: 12px; z-index: 2; }
.tm-panel-head > .tm-ajuda-btn { margin-top: 2px; }
.tm-ajuda-pop { position: fixed; z-index: 1200; max-height: min(70vh, 520px); overflow: auto; padding: 14px 16px; border-radius: 14px; background: #0b1521; border: 1px solid rgba(54, 214, 245, .28); box-shadow: 0 22px 60px rgba(0, 0, 0, .6); color: var(--tm-text); font-size: 13px; line-height: 1.45; }
.tm-ajuda-head span { display: block; font: 600 10.5px/1.3 var(--tm-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--tm-cyan); }
.tm-ajuda-head strong { display: block; margin-top: 4px; font-size: 15px; color: #fff; }
.tm-ajuda-sec { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--tm-line); }
.tm-ajuda-sec h5 { margin: 0 0 6px; font: 600 11px/1.2 var(--tm-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--tm-muted); }
.tm-ajuda-sec p { margin: 0 0 6px; }
.tm-ajuda-sec ul { margin: 0; padding-left: 16px; }
.tm-ajuda-sec li { margin: 0 0 4px; }
.tm-ajuda-sec code { font: 500 11.5px/1.4 var(--tm-mono); color: var(--tm-teal); }
.tm-ajuda-dim { color: var(--tm-dim); }
.tm-ajuda-fora { color: var(--tm-flat); font-size: 12px; margin-top: 6px !important; }
.tm-ajuda-nota { color: var(--tm-muted); font-size: 12px; margin-top: 6px !important; }

/* ---------- Total + quebra por tipo de venda nos cards de dinheiro ---------- */
.tm-kpi-quebra { display: grid; grid-template-columns: repeat(auto-fit, minmax(84px, 1fr)); gap: 4px 10px; margin-top: 9px; padding-top: 8px; border-top: 1px dashed rgba(122, 205, 255, .14); }
.tm-kpi-quebra span { display: flex; flex-direction: column; min-width: 0; }
.tm-kpi-quebra i { font-style: normal; font-size: 10.5px; color: var(--tm-dim); text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; }
.tm-kpi-quebra b { font: 600 12.5px/1.3 var(--tm-mono); color: var(--tm-text); white-space: nowrap; }
@media (max-width: 640px) { .tm-macro a, .tm-macro > span.is-on { padding: 6px 9px; } }
/* Agrupa quadros só para dar contexto ao "?" (sem mexer no layout). */
.tm-ctx { display: contents; }

/* ---------- Popup de novidades ---------- */
.tm-novidades { width: min(560px, calc(100vw - 32px)); }
.tm-novidades-lista { list-style: none; margin: 4px 0 0; padding: 0 22px; display: grid; gap: 12px; max-height: min(58vh, 520px); overflow: auto; }
.tm-novidades-lista li { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 12px; align-items: start; padding: 12px; border: 1px solid var(--tm-line); border-radius: 12px; background: rgba(4, 9, 15, .45); }
.tm-novidades-ico { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; color: var(--tm-cyan); background: rgba(54, 214, 245, .1); }
.tm-novidades-lista strong { display: block; color: #fff; font-size: 14px; }
.tm-novidades-lista p { margin: 3px 0 0; color: var(--tm-muted); font-size: 13px; line-height: 1.45; }
.tm-novidades-foot { display: flex; justify-content: flex-end; padding: 16px 22px 20px; }

/* ---------- Análises: "o que é e como usar" de cada aba ---------- */
.tm-an-explica { padding: 0; }
.tm-an-explica > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px 20px; }
.tm-an-explica > summary::-webkit-details-marker { display: none; }
.tm-an-explica > summary b { color: #fff; font-size: 15px; font-weight: 600; flex: 1 1 auto; }
.tm-an-explica-hint { color: var(--tm-cyan); font-size: 12px; font-weight: 600; }
.tm-an-explica-hint::before { content: "abrir ▾"; }
.tm-an-explica[open] .tm-an-explica-hint::before { content: "fechar ▴"; }
.tm-an-explica-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; padding: 0 20px 18px; }
.tm-an-explica-grid h4 { margin: 0 0 6px; font: 600 11px/1.2 var(--tm-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--tm-muted); }
.tm-an-explica-grid p, .tm-an-explica-grid li { margin: 0 0 10px; color: var(--tm-text); font-size: 13px; line-height: 1.5; }
.tm-an-explica-grid ol { margin: 0; padding-left: 18px; }
.tm-an-explica-perg { color: var(--tm-cyan) !important; font-weight: 600; }
.tm-an-explica-caso { padding: 12px 14px; border-radius: 12px; background: rgba(54, 214, 245, .06); border: 1px dashed rgba(54, 214, 245, .25); align-self: start; }
@media (max-width: 900px) { .tm-an-explica-grid { grid-template-columns: 1fr; } }

/* ---------- Marketing: atalhos para outros painéis ---------- */
.tm-mkt-links { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.tm-mkt-link { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--tm-line); background: rgba(4, 9, 15, .45); color: var(--tm-text); text-decoration: none; transition: border-color .15s, background .15s; }
.tm-mkt-link:hover { border-color: rgba(54, 214, 245, .45); background: rgba(54, 214, 245, .06); }
.tm-mkt-link svg { color: var(--tm-cyan); flex: 0 0 auto; margin-top: 2px; }
.tm-mkt-link b { display: block; color: #fff; font-size: 14px; }
.tm-mkt-link small { display: block; color: var(--tm-muted); font-size: 12.5px; line-height: 1.4; margin-top: 2px; }

/* ---------- Tela cheia (gráficos, tabelas e a página inteira para TV) ---------- */
.tm-cheia-btn { display: inline-grid; place-items: center; width: 22px; height: 22px; flex: 0 0 22px; padding: 0; border-radius: 6px; border: 1px solid rgba(142, 166, 186, .35); background: rgba(4, 9, 15, .6); color: var(--tm-muted); cursor: pointer; transition: color .15s, border-color .15s, background .15s; }
.tm-cheia-btn:hover { color: #04121a; background: var(--tm-cyan); border-color: var(--tm-cyan); }
.tm-cheia-btn:focus-visible { outline: 2px solid var(--tm-cyan); outline-offset: 2px; }
.tm-panel-head > .tm-cheia-btn { margin-top: 2px; }
.tm-panel > .tm-cheia-btn.is-solto { position: absolute; top: 12px; right: 40px; z-index: 2; }
.tm-cheia-btn.is-pagina { width: auto; height: auto; flex: none; display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 12px; font: 600 14px/1 var(--tm-font); }
.tm-panel:fullscreen, .tm-panel.tm-maximizado { overflow: auto; padding: 28px 40px; border-radius: 0; background: #050b12; backdrop-filter: none; }
.tm-panel.tm-maximizado { position: fixed; inset: 0; z-index: 3000; }
.tm-panel:fullscreen::backdrop { background: #04070c; }
.tm-panel:fullscreen .tm-panel-head h2, .tm-panel.tm-maximizado .tm-panel-head h2 { font-size: 24px; }
.tm-panel:fullscreen .tm-panel-head p, .tm-panel.tm-maximizado .tm-panel-head p { font-size: 14px; }
.tm-panel:fullscreen .tm-table-wrap, .tm-panel.tm-maximizado .tm-table-wrap { max-height: calc(100vh - 150px); }
.tm-panel:fullscreen .tm-table td, .tm-panel:fullscreen .tm-table th { font-size: 14.5px; }
.tm-panel:fullscreen .tm-kpi-value { font-size: 34px; }
/* Página inteira na TV: some o menu lateral, fica só o painel. */
body.tm-modo-tv .sidebar.desktop, body.tm-modo-tv .topbar, body.tm-modo-tv .footer { display: none !important; }
body.tm-modo-tv .content { padding-left: 28px; padding-right: 28px; }

/* Botões do quadro (tela cheia + "?") juntos no canto direito. */
.tm-panel-head > div:first-child { flex: 1 1 auto; min-width: 0; }
.tm-panel-tools { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; margin-top: 2px; }
.tm-panel-tools.is-solto { position: absolute; top: 12px; right: 12px; z-index: 2; margin: 0; }
.tm-panel-tools .tm-ajuda-btn, .tm-panel-tools .tm-cheia-btn { width: 24px; height: 24px; flex: 0 0 24px; margin: 0; }
.tm-panel-tools .tm-cheia-btn { border-radius: 50%; }
